aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/stable/sysfs-bus-xen-backend9
-rw-r--r--Documentation/ABI/testing/sysfs-driver-xen-blkback10
-rw-r--r--Documentation/arm/Samsung/Bootloader-interface.txt1
-rw-r--r--Documentation/arm64/sve.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/amlogic.txt7
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/rockchip.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/scu.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/shmobile.txt16
-rw-r--r--Documentation/devicetree/bindings/arm/syna.txt (renamed from Documentation/devicetree/bindings/arm/marvell/marvell,berlin.txt)11
-rw-r--r--Documentation/devicetree/bindings/arm/tegra.txt9
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt93
-rw-r--r--Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt103
-rw-r--r--Documentation/devicetree/bindings/arm/ux500/boards.txt2
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt14
-rw-r--r--Documentation/devicetree/bindings/net/dsa/b53.txt36
-rw-r--r--Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt1
-rw-r--r--Documentation/devicetree/bindings/soc/rockchip/grf.txt2
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--Documentation/devicetree/bindings/watchdog/renesas-wdt.txt5
-rw-r--r--Documentation/hwmon/ina2xx2
-rw-r--r--Documentation/i2c/DMA-considerations10
-rw-r--r--MAINTAINERS8
-rw-r--r--Makefile5
-rw-r--r--arch/arm/boot/dts/Makefile10
-rw-r--r--[-rwxr-xr-x]arch/arm/boot/dts/am335x-osd3358-sm-red.dts0
-rw-r--r--arch/arm/boot/dts/am4372.dtsi1
-rw-r--r--arch/arm/boot/dts/arm-realview-eb.dtsi2
-rw-r--r--arch/arm/boot/dts/arm-realview-pb1176.dts2
-rw-r--r--arch/arm/boot/dts/arm-realview-pb11mp.dts2
-rw-r--r--arch/arm/boot/dts/arm-realview-pbx.dtsi2
-rw-r--r--arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts207
-rw-r--r--arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts146
-rw-r--r--arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts47
-rw-r--r--arch/arm/boot/dts/aspeed-g4.dtsi2
-rw-r--r--arch/arm/boot/dts/aspeed-g5.dtsi2
-rw-r--r--arch/arm/boot/dts/at91-dvk_su60_somc.dtsi4
-rw-r--r--arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi4
-rw-r--r--arch/arm/boot/dts/at91-nattis-2-natte-2.dts103
-rw-r--r--arch/arm/boot/dts/at91-sama5d27_som1_ek.dts42
-rw-r--r--arch/arm/boot/dts/at91-sama5d2_xplained.dts30
-rw-r--r--arch/arm/boot/dts/at91-tse850-3.dts32
-rw-r--r--arch/arm/boot/dts/at91-vinco.dts2
-rw-r--r--arch/arm/boot/dts/at91sam9260ek.dts2
-rw-r--r--arch/arm/boot/dts/at91sam9261ek.dts2
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek_common.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi2
-rw-r--r--arch/arm/boot/dts/bcm-hr2.dtsi2
-rw-r--r--arch/arm/boot/dts/bcm-nsp.dtsi33
-rw-r--r--arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts87
-rw-r--r--arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi52
-rw-r--r--arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi14
-rw-r--r--arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts28
-rw-r--r--arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts31
-rw-r--r--arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts28
-rw-r--r--arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi4
-rw-r--r--arch/arm/boot/dts/bcm5301x.dtsi5
-rw-r--r--arch/arm/boot/dts/bcm958625hr.dts26
-rw-r--r--arch/arm/boot/dts/exynos3250-artik5.dtsi7
-rw-r--r--arch/arm/boot/dts/exynos4210-origen.dts9
-rw-r--r--arch/arm/boot/dts/exynos4210-trats.dts15
-rw-r--r--arch/arm/boot/dts/exynos4210-universal_c210.dts11
-rw-r--r--arch/arm/boot/dts/exynos4412-midas.dtsi3
-rw-r--r--arch/arm/boot/dts/exynos4412-odroid-common.dtsi3
-rw-r--r--arch/arm/boot/dts/exynos5250-arndale.dts102
-rw-r--r--arch/arm/boot/dts/exynos5250-pinctrl.dtsi11
-rw-r--r--arch/arm/boot/dts/exynos5250-snow-rev5.dts11
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi152
-rw-r--r--arch/arm/boot/dts/exynos5420-peach-pit.dts5
-rw-r--r--arch/arm/boot/dts/exynos5422-odroid-core.dtsi157
-rw-r--r--arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi6
-rw-r--r--arch/arm/boot/dts/exynos5422-odroidxu3.dts6
-rw-r--r--arch/arm/boot/dts/exynos5800-peach-pi.dts5
-rw-r--r--arch/arm/boot/dts/hip04.dtsi346
-rw-r--r--arch/arm/boot/dts/imx23-evk.dts90
-rw-r--r--arch/arm/boot/dts/imx28-evk.dts183
-rw-r--r--arch/arm/boot/dts/imx7d.dtsi12
-rw-r--r--arch/arm/boot/dts/iwg20d-q7-common.dtsi4
-rw-r--r--arch/arm/boot/dts/lpc32xx.dtsi4
-rw-r--r--arch/arm/boot/dts/meson8.dtsi2
-rw-r--r--arch/arm/boot/dts/meson8b-ec100.dts248
-rw-r--r--arch/arm/boot/dts/meson8b-odroidc1.dts109
-rw-r--r--arch/arm/boot/dts/meson8b.dtsi47
-rw-r--r--arch/arm/boot/dts/omap4-droid4-xt894.dts20
-rw-r--r--arch/arm/boot/dts/pxa25x.dtsi4
-rw-r--r--arch/arm/boot/dts/pxa27x.dtsi6
-rw-r--r--arch/arm/boot/dts/pxa2xx.dtsi27
-rw-r--r--arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts4
-rw-r--r--arch/arm/boot/dts/r8a7743-iwg20d-q7.dts4
-rw-r--r--arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts12
-rw-r--r--arch/arm/boot/dts/r8a77470.dtsi168
-rw-r--r--arch/arm/boot/dts/r8a7778-bockw.dts2
-rw-r--r--arch/arm/boot/dts/r8a7778.dtsi2
-rw-r--r--arch/arm/boot/dts/r8a7779-marzen.dts2
-rw-r--r--arch/arm/boot/dts/r8a7779.dtsi4
-rw-r--r--arch/arm/boot/dts/r8a7790-stout.dts4
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi6
-rw-r--r--arch/arm/boot/dts/r8a7791.dtsi6
-rw-r--r--arch/arm/boot/dts/r8a7792.dtsi3
-rw-r--r--arch/arm/boot/dts/r8a7793-gose.dts16
-rw-r--r--arch/arm/boot/dts/r8a7793.dtsi2
-rw-r--r--arch/arm/boot/dts/r8a7794-silk.dts25
-rw-r--r--arch/arm/boot/dts/r8a7794.dtsi3
-rw-r--r--arch/arm/boot/dts/r9a06g032.dtsi88
-rw-r--r--arch/arm/boot/dts/s5pv210.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d2.dtsi123
-rw-r--r--arch/arm/boot/dts/sama5d4.dtsi8
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi20
-rw-r--r--arch/arm/boot/dts/socfpga_arria10.dtsi30
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts (renamed from arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts)2
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_socrates.dts3
-rw-r--r--arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts3
-rw-r--r--arch/arm/boot/dts/ste-dbx5x0.dtsi80
-rw-r--r--arch/arm/boot/dts/ste-href-family-pinctrl.dtsi8
-rw-r--r--arch/arm/boot/dts/ste-href.dtsi1
-rw-r--r--arch/arm/boot/dts/ste-hrefprev60.dtsi2
-rw-r--r--arch/arm/boot/dts/ste-snowball.dts3
-rw-r--r--arch/arm/boot/dts/ste-u300.dts2
-rw-r--r--arch/arm/boot/dts/stih410-b2260.dts5
-rw-r--r--arch/arm/boot/dts/stihxxx-b2120.dtsi11
-rw-r--r--arch/arm/boot/dts/stm32429i-eval.dts3
-rw-r--r--arch/arm/boot/dts/stm32f429.dtsi2
-rw-r--r--arch/arm/boot/dts/stm32f469-disco.dts3
-rw-r--r--arch/arm/boot/dts/stm32f746-disco.dts3
-rw-r--r--arch/arm/boot/dts/stm32f769-disco.dts3
-rw-r--r--arch/arm/boot/dts/stm32h743.dtsi2
-rw-r--r--arch/arm/boot/dts/stm32mp157c-ev1.dts73
-rw-r--r--arch/arm/boot/dts/stm32mp157c.dtsi2
-rw-r--r--arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi3
-rw-r--r--arch/arm/boot/dts/sun5i.dtsi26
-rw-r--r--arch/arm/boot/dts/sun7i-a20.dtsi26
-rw-r--r--arch/arm/boot/dts/sun8i-a33.dtsi26
-rw-r--r--arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts5
-rw-r--r--arch/arm/boot/dts/sun8i-a83t.dtsi18
-rw-r--r--arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus-v1.2.dts13
-rw-r--r--arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts190
-rw-r--r--arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts140
-rw-r--r--arch/arm/boot/dts/sun8i-h3.dtsi25
-rw-r--r--arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts21
-rw-r--r--arch/arm/boot/dts/sun8i-r40.dtsi13
-rw-r--r--arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi3
-rw-r--r--arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts2
-rw-r--r--arch/arm/boot/dts/sun9i-a80.dtsi2
-rw-r--r--arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi31
-rw-r--r--arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi231
-rw-r--r--arch/arm/boot/dts/sunxi-h3-h5.dtsi2
-rw-r--r--arch/arm/boot/dts/tegra124-apalis-eval.dts40
-rw-r--r--arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts43
-rw-r--r--arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi452
-rw-r--r--arch/arm/boot/dts/tegra124-apalis.dtsi451
-rw-r--r--arch/arm/boot/dts/tegra20-colibri-eval-v3.dts262
-rw-r--r--arch/arm/boot/dts/tegra20-colibri-iris.dts200
-rw-r--r--arch/arm/boot/dts/tegra20-colibri.dtsi657
-rw-r--r--arch/arm/boot/dts/tegra20-paz00.dts12
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi28
-rw-r--r--arch/arm/boot/dts/tegra30-apalis-eval.dts148
-rw-r--r--arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts266
-rw-r--r--arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi1189
-rw-r--r--arch/arm/boot/dts/tegra30-apalis.dtsi705
-rw-r--r--arch/arm/boot/dts/tegra30-colibri-eval-v3.dts130
-rw-r--r--arch/arm/boot/dts/tegra30-colibri.dtsi780
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi10
-rw-r--r--arch/arm/boot/dts/versatile-ab.dts2
-rw-r--r--arch/arm/boot/dts/zynq-zc702.dts12
-rw-r--r--arch/arm/boot/dts/zynq-zc770-xm010.dts2
-rw-r--r--arch/arm/boot/dts/zynq-zc770-xm013.dts2
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig1
-rw-r--r--arch/arm/configs/mxs_defconfig1
-rw-r--r--arch/arm/configs/versatile_defconfig14
-rw-r--r--arch/arm/mach-exynos/common.h1
-rw-r--r--arch/arm/mach-exynos/firmware.c14
-rw-r--r--arch/arm/mach-exynos/suspend.c34
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c39
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c42
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c113
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/arm64/boot/dts/allwinner/Makefile4
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts2
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts30
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts85
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts99
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts175
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts13
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts28
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts9
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts28
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts2
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi193
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts11
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus.dts11
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi43
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts150
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi23
-rw-r--r--arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts2
-rw-r--r--arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi4
-rw-r--r--arch/arm64/boot/dts/amlogic/Makefile1
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-axg-s400.dts368
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-axg.dtsi1575
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts29
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-g12a.dtsi172
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gx.dtsi19
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi2
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts2
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxl.dtsi2
-rw-r--r--arch/arm64/boot/dts/arm/juno-base.dtsi162
-rw-r--r--arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi52
-rw-r--r--arch/arm64/boot/dts/arm/juno.dts13
-rw-r--r--arch/arm64/boot/dts/broadcom/Makefile3
-rw-r--r--arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts2
-rw-r--r--arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi4
-rw-r--r--arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi2
-rw-r--r--arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi4
-rw-r--r--arch/arm64/boot/dts/hisilicon/Makefile1
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts35
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi3670.dtsi162
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi181
-rw-r--r--arch/arm64/boot/dts/hisilicon/hi6220.dtsi7
-rw-r--r--arch/arm64/boot/dts/lg/lg1312.dtsi4
-rw-r--r--arch/arm64/boot/dts/lg/lg1313.dtsi4
-rw-r--r--arch/arm64/boot/dts/nvidia/tegra186.dtsi76
-rw-r--r--arch/arm64/boot/dts/nvidia/tegra194.dtsi16
-rw-r--r--arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi12
-rw-r--r--arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi1
-rw-r--r--arch/arm64/boot/dts/nvidia/tegra210.dtsi57
-rw-r--r--arch/arm64/boot/dts/renesas/Makefile2
-rw-r--r--arch/arm64/boot/dts/renesas/r8a774a1.dtsi1663
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts3
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi18
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts3
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts3
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts17
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7795.dtsi137
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts3
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts3
-rw-r--r--arch/arm64/boot/dts/renesas/r8a7796.dtsi103
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts16
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts33
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts14
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77965.dtsi417
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts26
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77970.dtsi116
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77980-condor.dts123
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts134
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77980.dtsi677
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts272
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77990.dtsi681
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77995-draak.dts362
-rw-r--r--arch/arm64/boot/dts/renesas/r8a77995.dtsi82
-rw-r--r--arch/arm64/boot/dts/renesas/salvator-common.dtsi9
-rw-r--r--arch/arm64/boot/dts/renesas/ulcb-kf.dtsi2
-rw-r--r--arch/arm64/boot/dts/renesas/ulcb.dtsi4
-rw-r--r--arch/arm64/boot/dts/rockchip/Makefile2
-rw-r--r--arch/arm64/boot/dts/rockchip/px30-evb.dts231
-rw-r--r--arch/arm64/boot/dts/rockchip/px30.dtsi2031
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts30
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3328-rock64.dts4
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3328.dtsi7
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399-firefly.dts36
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts680
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi44
-rw-r--r--arch/arm64/boot/dts/rockchip/rk3399.dtsi28
-rw-r--r--arch/arm64/boot/dts/synaptics/as370.dtsi173
-rw-r--r--arch/arm64/boot/dts/ti/k3-am65-main.dtsi51
-rw-r--r--arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi18
-rw-r--r--arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi46
-rw-r--r--arch/arm64/boot/dts/ti/k3-am65.dtsi54
-rw-r--r--arch/arm64/boot/dts/ti/k3-am654-base-board.dts5
-rw-r--r--arch/arm64/configs/defconfig3
-rw-r--r--arch/arm64/crypto/ghash-ce-glue.c29
-rw-r--r--arch/arm64/crypto/sm4-ce-glue.c2
-rw-r--r--arch/m68k/mac/misc.c10
-rw-r--r--arch/nios2/Kconfig.debug9
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/riscv/include/asm/tlb.h4
-rw-r--r--arch/riscv/kernel/sys_riscv.c15
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/Makefile23
-rw-r--r--arch/x86/crypto/aesni-intel_asm.S66
-rw-r--r--arch/x86/events/core.c2
-rw-r--r--arch/x86/include/asm/irqflags.h3
-rw-r--r--arch/x86/include/asm/pgtable-3level.h7
-rw-r--r--arch/x86/include/asm/processor.h4
-rw-r--r--arch/x86/include/asm/signal.h7
-rw-r--r--arch/x86/include/asm/stacktrace.h2
-rw-r--r--arch/x86/include/asm/tlbflush.h40
-rw-r--r--arch/x86/include/asm/vgtod.h2
-rw-r--r--arch/x86/kernel/alternative.c9
-rw-r--r--arch/x86/kernel/cpu/bugs.c46
-rw-r--r--arch/x86/kernel/cpu/common.c1
-rw-r--r--arch/x86/kernel/cpu/intel.c3
-rw-r--r--arch/x86/kernel/dumpstack.c20
-rw-r--r--arch/x86/lib/usercopy.c5
-rw-r--r--arch/x86/mm/fault.c2
-rw-r--r--arch/x86/mm/pageattr.c25
-rw-r--r--arch/x86/mm/pti.c2
-rw-r--r--arch/x86/mm/tlb.c7
-rw-r--r--arch/x86/platform/efi/efi_32.c8
-rw-r--r--arch/x86/xen/mmu_pv.c9
-rw-r--r--block/blk-wbt.c89
-rw-r--r--block/bsg.c8
-rw-r--r--block/elevator.c3
-rw-r--r--drivers/ata/pata_ftide010.c27
-rw-r--r--drivers/base/power/clock_ops.c2
-rw-r--r--drivers/block/xen-blkback/blkback.c99
-rw-r--r--drivers/block/xen-blkback/common.h14
-rw-r--r--drivers/block/xen-blkfront.c110
-rw-r--r--drivers/bluetooth/Kconfig1
-rw-r--r--drivers/bluetooth/btmtkuart.c8
-rw-r--r--drivers/bus/ti-sysc.c37
-rw-r--r--drivers/cdrom/cdrom.c2
-rw-r--r--drivers/clk/clk-npcm7xx.c4
-rw-r--r--drivers/clk/x86/clk-st.c2
-rw-r--r--drivers/cpuidle/governors/menu.c13
-rw-r--r--drivers/crypto/caam/caamalg_qi.c6
-rw-r--r--drivers/crypto/caam/caampkc.c20
-rw-r--r--drivers/crypto/caam/jr.c3
-rw-r--r--drivers/crypto/cavium/nitrox/nitrox_dev.h3
-rw-r--r--drivers/crypto/cavium/nitrox/nitrox_lib.c1
-rw-r--r--drivers/crypto/cavium/nitrox/nitrox_reqmgr.c57
-rw-r--r--drivers/crypto/chelsio/chtls/chtls.h5
-rw-r--r--drivers/crypto/chelsio/chtls/chtls_main.c7
-rw-r--r--drivers/crypto/vmx/aes_cbc.c30
-rw-r--r--drivers/crypto/vmx/aes_xts.c21
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c47
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c35
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c11
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/kv_dpm.c49
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dpm.c3
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c12
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_link.c6
-rw-r--r--drivers/gpu/drm/i915/i915_vma.c4
-rw-r--r--drivers/gpu/drm/i915/intel_audio.c3
-rw-r--r--drivers/gpu/drm/i915/intel_display.c7
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c8
-rw-r--r--drivers/gpu/drm/i915/intel_lspcon.c2
-rw-r--r--drivers/gpu/drm/mediatek/mtk_disp_ovl.c11
-rw-r--r--drivers/gpu/drm/mediatek/mtk_disp_rdma.c92
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_crtc.c47
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_crtc.h3
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_ddp.c18
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h9
-rw-r--r--drivers/gpu/drm/mediatek/mtk_drm_drv.c27
-rw-r--r--drivers/hwmon/adt7475.c25
-rw-r--r--drivers/hwmon/ina2xx.c13
-rw-r--r--drivers/hwmon/nct6775.c2
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c55
-rw-r--r--drivers/i2c/busses/i2c-designware-master.c1
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c7
-rw-r--r--drivers/i2c/busses/i2c-i801.c9
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c15
-rw-r--r--drivers/i2c/i2c-core-base.c11
-rw-r--r--drivers/mmc/core/queue.c12
-rw-r--r--drivers/mmc/core/queue.h1
-rw-r--r--drivers/mmc/host/android-goldfish.c4
-rw-r--r--drivers/mmc/host/atmel-mci.c12
-rw-r--r--drivers/mmc/host/renesas_sdhi_internal_dmac.c10
-rw-r--r--drivers/mtd/nand/raw/denali.c5
-rw-r--r--drivers/mtd/nand/raw/docg4.c4
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c6
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c36
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c10
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c5
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hnae.h6
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_enet.c108
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c3
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.h6
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_ethtool.c7
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c2
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c15
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h15
-rw-r--r--drivers/net/ethernet/intel/ice/ice_adminq_cmd.h25
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c30
-rw-r--r--drivers/net/ethernet/intel/ice/ice_controlq.c29
-rw-r--r--drivers/net/ethernet/intel/ice/ice_ethtool.c52
-rw-r--r--drivers/net/ethernet/intel/ice/ice_hw_autogen.h8
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h1
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c115
-rw-r--r--drivers/net/ethernet/intel/ice/ice_nvm.c5
-rw-r--r--drivers/net/ethernet/intel/ice/ice_sched.c3
-rw-r--r--drivers/net/ethernet/intel/ice/ice_switch.c4
-rw-r--r--drivers/net/ethernet/intel/ice/ice_switch.h6
-rw-r--r--drivers/net/ethernet/intel/ice/ice_txrx.h2
-rw-r--r--drivers/net/ethernet/intel/ice/ice_type.h16
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c7
-rw-r--r--drivers/net/ethernet/intel/ixgb/ixgb_main.c5
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c36
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c31
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_type.h1
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c19
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h2
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c11
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c20
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/action.c6
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_init_ops.c2
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.c187
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.h27
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_reg_addr.h2
-rw-r--r--drivers/net/ethernet/qlogic/qede/qede_filter.c6
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c23
-rw-r--r--drivers/net/ethernet/renesas/ravb.h5
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c5
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c13
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.h13
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/Kconfig10
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c5
-rw-r--r--drivers/net/hyperv/netvsc_drv.c5
-rw-r--r--drivers/net/usb/r8152.c4
-rw-r--r--drivers/nvme/host/pci.c8
-rw-r--r--drivers/nvme/target/core.c4
-rw-r--r--drivers/nvme/target/fcloop.c3
-rw-r--r--drivers/of/base.c47
-rw-r--r--drivers/thermal/of-thermal.c7
-rw-r--r--drivers/thermal/qoriq_thermal.c27
-rw-r--r--drivers/thermal/rcar_gen3_thermal.c11
-rw-r--r--drivers/thermal/rcar_thermal.c16
-rw-r--r--drivers/vhost/vhost.c2
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c9
-rw-r--r--fs/buffer.c1
-rw-r--r--fs/isofs/inode.c7
-rw-r--r--fs/notify/mark.c6
-rw-r--r--fs/quota/quota.c14
-rw-r--r--fs/udf/super.c93
-rw-r--r--include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h18
-rw-r--r--include/linux/arm-smccc.h38
-rw-r--r--include/linux/i2c.h2
-rw-r--r--include/linux/of.h33
-rw-r--r--include/linux/platform_data/ina2xx.h2
-rw-r--r--include/linux/quota.h8
-rw-r--r--include/net/act_api.h7
-rw-r--r--include/net/pkt_cls.h25
-rw-r--r--kernel/bpf/hashtab.c23
-rw-r--r--kernel/bpf/sockmap.c11
-rw-r--r--kernel/cpu.c26
-rw-r--r--kernel/printk/printk.c1
-rw-r--r--kernel/watchdog.c4
-rw-r--r--kernel/watchdog_hld.c2
-rw-r--r--kernel/workqueue.c2
-rw-r--r--lib/percpu_counter.c1
-rw-r--r--lib/rhashtable.c1
-rw-r--r--mm/page-writeback.c1
-rw-r--r--mm/page_alloc.c1
-rw-r--r--mm/slub.c1
-rw-r--r--net/core/dev.c1
-rw-r--r--net/dsa/slave.c4
-rw-r--r--net/ipv4/tcp_bbr.c42
-rw-r--r--net/ipv4/tcp_ipv4.c6
-rw-r--r--net/ipv6/addrconf.c6
-rw-r--r--net/ipv6/ip6_fib.c2
-rw-r--r--net/ipv6/ip6_vti.c3
-rw-r--r--net/ipv6/route.c2
-rw-r--r--net/ncsi/ncsi-netlink.c4
-rw-r--r--net/rds/tcp.c1
-rw-r--r--net/sched/act_api.c70
-rw-r--r--net/sched/act_bpf.c8
-rw-r--r--net/sched/act_connmark.c8
-rw-r--r--net/sched/act_csum.c8
-rw-r--r--net/sched/act_gact.c8
-rw-r--r--net/sched/act_ife.c92
-rw-r--r--net/sched/act_ipt.c16
-rw-r--r--net/sched/act_mirred.c8
-rw-r--r--net/sched/act_nat.c8
-rw-r--r--net/sched/act_pedit.c8
-rw-r--r--net/sched/act_police.c8
-rw-r--r--net/sched/act_sample.c8
-rw-r--r--net/sched/act_simple.c8
-rw-r--r--net/sched/act_skbedit.c8
-rw-r--r--net/sched/act_skbmod.c8
-rw-r--r--net/sched/act_tunnel_key.c8
-rw-r--r--net/sched/act_vlan.c8
-rw-r--r--net/sched/cls_u32.c10
-rw-r--r--net/sched/sch_cake.c24
-rw-r--r--net/tls/tls_main.c9
-rw-r--r--net/xdp/xdp_umem.c4
-rw-r--r--scripts/Kbuild.include4
-rw-r--r--scripts/Makefile.build2
-rw-r--r--tools/bpf/bpftool/map_perf_ring.c5
488 files changed, 20571 insertions, 5230 deletions
diff --git a/Documentation/ABI/stable/sysfs-bus-xen-backend b/Documentation/ABI/stable/sysfs-bus-xen-backend
index 3d5951c8bf5f..e8b60bd766f7 100644
--- a/Documentation/ABI/stable/sysfs-bus-xen-backend
+++ b/Documentation/ABI/stable/sysfs-bus-xen-backend
@@ -73,3 +73,12 @@ KernelVersion: 3.0
73Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> 73Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
74Description: 74Description:
75 Number of sectors written by the frontend. 75 Number of sectors written by the frontend.
76
77What: /sys/bus/xen-backend/devices/*/state
78Date: August 2018
79KernelVersion: 4.19
80Contact: Joe Jin <joe.jin@oracle.com>
81Description:
82 The state of the device. One of: 'Unknown',
83 'Initialising', 'Initialised', 'Connected', 'Closing',
84 'Closed', 'Reconfiguring', 'Reconfigured'.
diff --git a/Documentation/ABI/testing/sysfs-driver-xen-blkback b/Documentation/ABI/testing/sysfs-driver-xen-blkback
index 8bb43b66eb55..4e7babb3ba1f 100644
--- a/Documentation/ABI/testing/sysfs-driver-xen-blkback
+++ b/Documentation/ABI/testing/sysfs-driver-xen-blkback
@@ -15,3 +15,13 @@ Description:
15 blkback. If the frontend tries to use more than 15 blkback. If the frontend tries to use more than
16 max_persistent_grants, the LRU kicks in and starts 16 max_persistent_grants, the LRU kicks in and starts
17 removing 5% of max_persistent_grants every 100ms. 17 removing 5% of max_persistent_grants every 100ms.
18
19What: /sys/module/xen_blkback/parameters/persistent_grant_unused_seconds
20Date: August 2018
21KernelVersion: 4.19
22Contact: Roger Pau Monné <roger.pau@citrix.com>
23Description:
24 How long a persistent grant is allowed to remain
25 allocated without being in use. The time is in
26 seconds, 0 means indefinitely long.
27 The default is 60 seconds.
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt
index ed494ac0beb2..d17ed518a7ea 100644
--- a/Documentation/arm/Samsung/Bootloader-interface.txt
+++ b/Documentation/arm/Samsung/Bootloader-interface.txt
@@ -26,6 +26,7 @@ Offset Value Purpose
260x20 0xfcba0d10 (Magic cookie) AFTR 260x20 0xfcba0d10 (Magic cookie) AFTR
270x24 exynos_cpu_resume_ns AFTR 270x24 exynos_cpu_resume_ns AFTR
280x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR 280x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR
290x28 0x0 or last value during resume (Exynos542x) System suspend
29 30
30 31
312. Secure mode 322. Secure mode
diff --git a/Documentation/arm64/sve.txt b/Documentation/arm64/sve.txt
index f128f736b4a5..7169a0ec41d8 100644
--- a/Documentation/arm64/sve.txt
+++ b/Documentation/arm64/sve.txt
@@ -200,7 +200,7 @@ prctl(PR_SVE_SET_VL, unsigned long arg)
200 thread. 200 thread.
201 201
202 * Changing the vector length causes all of P0..P15, FFR and all bits of 202 * Changing the vector length causes all of P0..P15, FFR and all bits of
203 Z0..V31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become 203 Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
204 unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current 204 unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current
205 vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC 205 vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC
206 flag, does not constitute a change to the vector length for this purpose. 206 flag, does not constitute a change to the vector length for this purpose.
@@ -500,7 +500,7 @@ References
500[2] arch/arm64/include/uapi/asm/ptrace.h 500[2] arch/arm64/include/uapi/asm/ptrace.h
501 AArch64 Linux ptrace ABI definitions 501 AArch64 Linux ptrace ABI definitions
502 502
503[3] linux/Documentation/arm64/cpu-feature-registers.txt 503[3] Documentation/arm64/cpu-feature-registers.txt
504 504
505[4] ARM IHI0055C 505[4] ARM IHI0055C
506 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf 506 http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf
diff --git a/Documentation/devicetree/bindings/arm/amlogic.txt b/Documentation/devicetree/bindings/arm/amlogic.txt
index b5c2b5c35766..4498292b833d 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.txt
+++ b/Documentation/devicetree/bindings/arm/amlogic.txt
@@ -57,12 +57,17 @@ Boards with the Amlogic Meson AXG A113D SoC shall have the following properties:
57 Required root node property: 57 Required root node property:
58 compatible: "amlogic,a113d", "amlogic,meson-axg"; 58 compatible: "amlogic,a113d", "amlogic,meson-axg";
59 59
60Boards with the Amlogic Meson G12A S905D2 SoC shall have the following properties:
61 Required root node property:
62 compatible: "amlogic,g12a";
63
60Board compatible values (alphabetically, grouped by SoC): 64Board compatible values (alphabetically, grouped by SoC):
61 65
62 - "geniatech,atv1200" (Meson6) 66 - "geniatech,atv1200" (Meson6)
63 67
64 - "minix,neo-x8" (Meson8) 68 - "minix,neo-x8" (Meson8)
65 69
70 - "endless,ec100" (Meson8b)
66 - "hardkernel,odroid-c1" (Meson8b) 71 - "hardkernel,odroid-c1" (Meson8b)
67 - "tronfy,mxq" (Meson8b) 72 - "tronfy,mxq" (Meson8b)
68 73
@@ -101,6 +106,8 @@ Board compatible values (alphabetically, grouped by SoC):
101 106
102 - "amlogic,s400" (Meson axg a113d) 107 - "amlogic,s400" (Meson axg a113d)
103 108
109 - "amlogic,u200" (Meson g12a s905d2)
110
104Amlogic Meson Firmware registers Interface 111Amlogic Meson Firmware registers Interface
105------------------------------------------ 112------------------------------------------
106 113
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index 1e3e29a545e2..0dcc3ea5adff 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -42,6 +42,14 @@ Raspberry Pi Compute Module
42Required root node properties: 42Required root node properties:
43compatible = "raspberrypi,compute-module", "brcm,bcm2835"; 43compatible = "raspberrypi,compute-module", "brcm,bcm2835";
44 44
45Raspberry Pi Compute Module 3
46Required root node properties:
47compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
48
49Raspberry Pi Compute Module 3 Lite
50Required root node properties:
51compatible = "raspberrypi,3-compute-module-lite", "brcm,bcm2837";
52
45Raspberry Pi Zero 53Raspberry Pi Zero
46Required root node properties: 54Required root node properties:
47compatible = "raspberrypi,model-zero", "brcm,bcm2835"; 55compatible = "raspberrypi,model-zero", "brcm,bcm2835";
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
index 199cd36fe1ba..a97f643e7d1c 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -8,6 +8,14 @@ HiKey960 Board
8Required root node properties: 8Required root node properties:
9 - compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660"; 9 - compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
10 10
11Hi3670 SoC
12Required root node properties:
13 - compatible = "hisilicon,hi3670";
14
15HiKey970 Board
16Required root node properties:
17 - compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
18
11Hi3798cv200 SoC 19Hi3798cv200 SoC
12Required root node properties: 20Required root node properties:
13 - compatible = "hisilicon,hi3798cv200"; 21 - compatible = "hisilicon,hi3798cv200";
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index acfd3c773dd0..5fc9c236ca87 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -59,6 +59,10 @@ Rockchip platforms device tree bindings
59 Required root node properties: 59 Required root node properties:
60 - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328"; 60 - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
61 61
62- Firefly ROC-RK3399-PC board:
63 Required root node properties:
64 - compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
65
62- ChipSPARK PopMetal-RK3288 board: 66- ChipSPARK PopMetal-RK3288 board:
63 Required root node properties: 67 Required root node properties:
64 - compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288"; 68 - compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
@@ -168,6 +172,10 @@ Rockchip platforms device tree bindings
168 Required root node properties: 172 Required root node properties:
169 - compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368"; 173 - compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368";
170 174
175- Rockchip PX30 Evaluation board:
176 Required root node properties:
177 - compatible = "rockchip,px30-evb", "rockchip,px30";
178
171- Rockchip RV1108 Evaluation board 179- Rockchip RV1108 Evaluation board
172 Required root node properties: 180 Required root node properties:
173 - compatible = "rockchip,rv1108-evb", "rockchip,rv1108"; 181 - compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
diff --git a/Documentation/devicetree/bindings/arm/scu.txt b/Documentation/devicetree/bindings/arm/scu.txt
index 08a587875996..74d0a780ce51 100644
--- a/Documentation/devicetree/bindings/arm/scu.txt
+++ b/Documentation/devicetree/bindings/arm/scu.txt
@@ -22,7 +22,7 @@ References:
22 22
23Example: 23Example:
24 24
25scu@a04100000 { 25scu@a0410000 {
26 compatible = "arm,cortex-a9-scu"; 26 compatible = "arm,cortex-a9-scu";
27 reg = <0xa0410000 0x100>; 27 reg = <0xa0410000 0x100>;
28}; 28};
diff --git a/Documentation/devicetree/bindings/arm/shmobile.txt b/Documentation/devicetree/bindings/arm/shmobile.txt
index 89b4a389fbc7..f5e0f82fd503 100644
--- a/Documentation/devicetree/bindings/arm/shmobile.txt
+++ b/Documentation/devicetree/bindings/arm/shmobile.txt
@@ -7,6 +7,8 @@ SoCs:
7 compatible = "renesas,emev2" 7 compatible = "renesas,emev2"
8 - RZ/A1H (R7S72100) 8 - RZ/A1H (R7S72100)
9 compatible = "renesas,r7s72100" 9 compatible = "renesas,r7s72100"
10 - RZ/A2 (R7S9210)
11 compatible = "renesas,r7s9210"
10 - SH-Mobile AG5 (R8A73A00/SH73A0) 12 - SH-Mobile AG5 (R8A73A00/SH73A0)
11 compatible = "renesas,sh73a0" 13 compatible = "renesas,sh73a0"
12 - R-Mobile APE6 (R8A73A40) 14 - R-Mobile APE6 (R8A73A40)
@@ -23,6 +25,10 @@ SoCs:
23 compatible = "renesas,r8a7745" 25 compatible = "renesas,r8a7745"
24 - RZ/G1C (R8A77470) 26 - RZ/G1C (R8A77470)
25 compatible = "renesas,r8a77470" 27 compatible = "renesas,r8a77470"
28 - RZ/G2M (R8A774A1)
29 compatible = "renesas,r8a774a1"
30 - RZ/G2E (RA8774C0)
31 compatible = "renesas,r8a774c0"
26 - R-Car M1A (R8A77781) 32 - R-Car M1A (R8A77781)
27 compatible = "renesas,r8a7778" 33 compatible = "renesas,r8a7778"
28 - R-Car H1 (R8A77790) 34 - R-Car H1 (R8A77790)
@@ -107,6 +113,8 @@ Boards:
107 compatible = "renesas,lager", "renesas,r8a7790" 113 compatible = "renesas,lager", "renesas,r8a7790"
108 - M3ULCB (R-Car Starter Kit Pro, RTP0RC7796SKBX0010SA09 (M3 ES1.0)) 114 - M3ULCB (R-Car Starter Kit Pro, RTP0RC7796SKBX0010SA09 (M3 ES1.0))
109 compatible = "renesas,m3ulcb", "renesas,r8a7796" 115 compatible = "renesas,m3ulcb", "renesas,r8a7796"
116 - M3NULCB (R-Car Starter Kit Pro, RTP0RC77965SKBX010SA00 (M3-N ES1.1))
117 compatible = "renesas,m3nulcb", "renesas,r8a77965"
110 - Marzen (R0P7779A00010S) 118 - Marzen (R0P7779A00010S)
111 compatible = "renesas,marzen", "renesas,r8a7779" 119 compatible = "renesas,marzen", "renesas,r8a7779"
112 - Porter (M2-LCDP) 120 - Porter (M2-LCDP)
@@ -143,12 +151,12 @@ Boards:
143 compatible = "renesas,wheat", "renesas,r8a7792" 151 compatible = "renesas,wheat", "renesas,r8a7792"
144 152
145 153
146Most Renesas ARM SoCs have a Product Register that allows to retrieve SoC 154Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
147product and revision information. If present, a device node for this register 155allows to retrieve SoC product and revision information. If present, a device
148should be added. 156node for this register should be added.
149 157
150Required properties: 158Required properties:
151 - compatible: Must be "renesas,prr". 159 - compatible: Must be "renesas,prr" or "renesas,bsid"
152 - reg: Base address and length of the register block. 160 - reg: Base address and length of the register block.
153 161
154 162
diff --git a/Documentation/devicetree/bindings/arm/marvell/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/syna.txt
index 3bab18409b7a..2face46a5f64 100644
--- a/Documentation/devicetree/bindings/arm/marvell/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/syna.txt
@@ -1,4 +1,9 @@
1Marvell Berlin SoC Family Device Tree Bindings 1Synaptics SoC Device Tree Bindings
2
3According to https://www.synaptics.com/company/news/conexant-marvell
4Synaptics has acquired the Multimedia Solutions Business of Marvell, so
5berlin SoCs are now Synaptics' SoCs now.
6
2--------------------------------------------------------------- 7---------------------------------------------------------------
3 8
4Work in progress statement: 9Work in progress statement:
@@ -13,6 +18,10 @@ stable binding/ABI.
13 18
14--------------------------------------------------------------- 19---------------------------------------------------------------
15 20
21Boards with the Synaptics AS370 SoC shall have the following properties:
22 Required root node property:
23 compatible: "syna,as370"
24
16Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500 25Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500
17shall have the following properties: 26shall have the following properties:
18 27
diff --git a/Documentation/devicetree/bindings/arm/tegra.txt b/Documentation/devicetree/bindings/arm/tegra.txt
index 32f62bb7006d..c59b15f64346 100644
--- a/Documentation/devicetree/bindings/arm/tegra.txt
+++ b/Documentation/devicetree/bindings/arm/tegra.txt
@@ -47,12 +47,17 @@ board-specific compatible values:
47 nvidia,ventana 47 nvidia,ventana
48 toradex,apalis_t30 48 toradex,apalis_t30
49 toradex,apalis_t30-eval 49 toradex,apalis_t30-eval
50 toradex,apalis_t30-v1.1
51 toradex,apalis_t30-v1.1-eval
50 toradex,apalis-tk1 52 toradex,apalis-tk1
51 toradex,apalis-tk1-eval 53 toradex,apalis-tk1-eval
52 toradex,colibri_t20-512 54 toradex,apalis-tk1-v1.2
55 toradex,apalis-tk1-v1.2-eval
56 toradex,colibri_t20
57 toradex,colibri_t20-eval-v3
58 toradex,colibri_t20-iris
53 toradex,colibri_t30 59 toradex,colibri_t30
54 toradex,colibri_t30-eval-v3 60 toradex,colibri_t30-eval-v3
55 toradex,iris
56 61
57Trusted Foundations 62Trusted Foundations
58------------------------------------------- 63-------------------------------------------
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt
index 5a3bf7c5a7a0..c9fd6d1de57e 100644
--- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt
@@ -34,3 +34,96 @@ Board DTS:
34 pmc@c360000 { 34 pmc@c360000 {
35 nvidia,invert-interrupt; 35 nvidia,invert-interrupt;
36 }; 36 };
37
38== Pad Control ==
39
40On Tegra SoCs a pad is a set of pins which are configured as a group.
41The pin grouping is a fixed attribute of the hardware. The PMC can be
42used to set pad power state and signaling voltage. A pad can be either
43in active or power down mode. The support for power state and signaling
44voltage configuration varies depending on the pad in question. 3.3 V and
451.8 V signaling voltages are supported on pins where software
46controllable signaling voltage switching is available.
47
48Pad configurations are described with pin configuration nodes which
49are placed under the pmc node and they are referred to by the pinctrl
50client properties. For more information see
51Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt.
52
53The following pads are present on Tegra186:
54csia csib dsi mipi-bias
55pex-clk-bias pex-clk3 pex-clk2 pex-clk1
56usb0 usb1 usb2 usb-bias
57uart audio hsic dbg
58hdmi-dp0 hdmi-dp1 pex-cntrl sdmmc2-hv
59sdmmc4 cam dsib dsic
60dsid csic csid csie
61dsif spi ufs dmic-hv
62edp sdmmc1-hv sdmmc3-hv conn
63audio-hv ao-hv
64
65Required pin configuration properties:
66 - pins: A list of strings, each of which contains the name of a pad
67 to be configured.
68
69Optional pin configuration properties:
70 - low-power-enable: Configure the pad into power down mode
71 - low-power-disable: Configure the pad into active mode
72 - power-source: Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or
73 TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages.
74 The values are defined in
75 include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h.
76
77Note: The power state can be configured on all of the above pads except
78 for ao-hv. Following pads have software configurable signaling
79 voltages: sdmmc2-hv, dmic-hv, sdmmc1-hv, sdmmc3-hv, audio-hv,
80 ao-hv.
81
82Pad configuration state example:
83 pmc: pmc@7000e400 {
84 compatible = "nvidia,tegra186-pmc";
85 reg = <0 0x0c360000 0 0x10000>,
86 <0 0x0c370000 0 0x10000>,
87 <0 0x0c380000 0 0x10000>,
88 <0 0x0c390000 0 0x10000>;
89 reg-names = "pmc", "wake", "aotag", "scratch";
90
91 ...
92
93 sdmmc1_3v3: sdmmc1-3v3 {
94 pins = "sdmmc1-hv";
95 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
96 };
97
98 sdmmc1_1v8: sdmmc1-1v8 {
99 pins = "sdmmc1-hv";
100 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
101 };
102
103 hdmi_off: hdmi-off {
104 pins = "hdmi";
105 low-power-enable;
106 }
107
108 hdmi_on: hdmi-on {
109 pins = "hdmi";
110 low-power-disable;
111 }
112 };
113
114Pinctrl client example:
115 sdmmc1: sdhci@3400000 {
116 ...
117 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
118 pinctrl-0 = <&sdmmc1_3v3>;
119 pinctrl-1 = <&sdmmc1_1v8>;
120 };
121
122 ...
123
124 sor0: sor@15540000 {
125 ...
126 pinctrl-0 = <&hdmi_off>;
127 pinctrl-1 = <&hdmi_on>;
128 pinctrl-names = "hdmi-on", "hdmi-off";
129 };
diff --git a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
index a74b37b07e5c..cb12f33a247f 100644
--- a/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
+++ b/Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
@@ -195,3 +195,106 @@ Example:
195 power-domains = <&pd_audio>; 195 power-domains = <&pd_audio>;
196 ... 196 ...
197 }; 197 };
198
199== Pad Control ==
200
201On Tegra SoCs a pad is a set of pins which are configured as a group.
202The pin grouping is a fixed attribute of the hardware. The PMC can be
203used to set pad power state and signaling voltage. A pad can be either
204in active or power down mode. The support for power state and signaling
205voltage configuration varies depending on the pad in question. 3.3 V and
2061.8 V signaling voltages are supported on pins where software
207controllable signaling voltage switching is available.
208
209The pad configuration state nodes are placed under the pmc node and they
210are referred to by the pinctrl client properties. For more information
211see Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt.
212The pad name should be used as the value of the pins property in pin
213configuration nodes.
214
215The following pads are present on Tegra124 and Tegra132:
216audio bb cam comp
217csia csb cse dsi
218dsib dsic dsid hdmi
219hsic hv lvds mipi-bias
220nand pex-bias pex-clk1 pex-clk2
221pex-cntrl sdmmc1 sdmmc3 sdmmc4
222sys_ddc uart usb0 usb1
223usb2 usb_bias
224
225The following pads are present on Tegra210:
226audio audio-hv cam csia
227csib csic csid csie
228csif dbg debug-nonao dmic
229dp dsi dsib dsic
230dsid emmc emmc2 gpio
231hdmi hsic lvds mipi-bias
232pex-bias pex-clk1 pex-clk2 pex-cntrl
233sdmmc1 sdmmc3 spi spi-hv
234uart usb0 usb1 usb2
235usb3 usb-bias
236
237Required pin configuration properties:
238 - pins: Must contain name of the pad(s) to be configured.
239
240Optional pin configuration properties:
241 - low-power-enable: Configure the pad into power down mode
242 - low-power-disable: Configure the pad into active mode
243 - power-source: Must contain either TEGRA_IO_PAD_VOLTAGE_1V8
244 or TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages.
245 The values are defined in
246 include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h.
247
248Note: The power state can be configured on all of the Tegra124 and
249 Tegra132 pads. None of the Tegra124 or Tegra132 pads support
250 signaling voltage switching.
251
252Note: All of the listed Tegra210 pads except pex-cntrl support power
253 state configuration. Signaling voltage switching is supported on
254 following Tegra210 pads: audio, audio-hv, cam, dbg, dmic, gpio,
255 pex-cntrl, sdmmc1, sdmmc3, spi, spi-hv, and uart.
256
257Pad configuration state example:
258 pmc: pmc@7000e400 {
259 compatible = "nvidia,tegra210-pmc";
260 reg = <0x0 0x7000e400 0x0 0x400>;
261 clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
262 clock-names = "pclk", "clk32k_in";
263
264 ...
265
266 sdmmc1_3v3: sdmmc1-3v3 {
267 pins = "sdmmc1";
268 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
269 };
270
271 sdmmc1_1v8: sdmmc1-1v8 {
272 pins = "sdmmc1";
273 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
274 };
275
276 hdmi_off: hdmi-off {
277 pins = "hdmi";
278 low-power-enable;
279 }
280
281 hdmi_on: hdmi-on {
282 pins = "hdmi";
283 low-power-disable;
284 }
285 };
286
287Pinctrl client example:
288 sdmmc1: sdhci@700b0000 {
289 ...
290 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
291 pinctrl-0 = <&sdmmc1_3v3>;
292 pinctrl-1 = <&sdmmc1_1v8>;
293 };
294 ...
295 sor@54540000 {
296 ...
297 pinctrl-0 = <&hdmi_off>;
298 pinctrl-1 = <&hdmi_on>;
299 pinctrl-names = "hdmi-on", "hdmi-off";
300 };
diff --git a/Documentation/devicetree/bindings/arm/ux500/boards.txt b/Documentation/devicetree/bindings/arm/ux500/boards.txt
index 0fa429534f49..89408de55bfd 100644
--- a/Documentation/devicetree/bindings/arm/ux500/boards.txt
+++ b/Documentation/devicetree/bindings/arm/ux500/boards.txt
@@ -60,7 +60,7 @@ Example:
60 <0xa0410100 0x100>; 60 <0xa0410100 0x100>;
61 }; 61 };
62 62
63 scu@a04100000 { 63 scu@a0410000 {
64 compatible = "arm,cortex-a9-scu"; 64 compatible = "arm,cortex-a9-scu";
65 reg = <0xa0410000 0x100>; 65 reg = <0xa0410000 0x100>;
66 }; 66 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt
index b0a8af51c388..265b223cd978 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt
@@ -11,7 +11,7 @@ The RISC-V supervisor ISA manual specifies three interrupt sources that are
11attached to every HLIC: software interrupts, the timer interrupt, and external 11attached to every HLIC: software interrupts, the timer interrupt, and external
12interrupts. Software interrupts are used to send IPIs between cores. The 12interrupts. Software interrupts are used to send IPIs between cores. The
13timer interrupt comes from an architecturally mandated real-time timer that is 13timer interrupt comes from an architecturally mandated real-time timer that is
14controller via Supervisor Binary Interface (SBI) calls and CSR reads. External 14controlled via Supervisor Binary Interface (SBI) calls and CSR reads. External
15interrupts connect all other device interrupts to the HLIC, which are routed 15interrupts connect all other device interrupts to the HLIC, which are routed
16via the platform-level interrupt controller (PLIC). 16via the platform-level interrupt controller (PLIC).
17 17
@@ -25,7 +25,15 @@ in the system.
25 25
26Required properties: 26Required properties:
27- compatible : "riscv,cpu-intc" 27- compatible : "riscv,cpu-intc"
28- #interrupt-cells : should be <1> 28- #interrupt-cells : should be <1>. The interrupt sources are defined by the
29 RISC-V supervisor ISA manual, with only the following three interrupts being
30 defined for supervisor mode:
31 - Source 1 is the supervisor software interrupt, which can be sent by an SBI
32 call and is reserved for use by software.
33 - Source 5 is the supervisor timer interrupt, which can be configured by
34 SBI calls and implements a one-shot timer.
35 - Source 9 is the supervisor external interrupt, which chains to all other
36 device interrupts.
29- interrupt-controller : Identifies the node as an interrupt controller 37- interrupt-controller : Identifies the node as an interrupt controller
30 38
31Furthermore, this interrupt-controller MUST be embedded inside the cpu 39Furthermore, this interrupt-controller MUST be embedded inside the cpu
@@ -38,7 +46,7 @@ An example device tree entry for a HLIC is show below.
38 ... 46 ...
39 cpu1-intc: interrupt-controller { 47 cpu1-intc: interrupt-controller {
40 #interrupt-cells = <1>; 48 #interrupt-cells = <1>;
41 compatible = "riscv,cpu-intc", "sifive,fu540-c000-cpu-intc"; 49 compatible = "sifive,fu540-c000-cpu-intc", "riscv,cpu-intc";
42 interrupt-controller; 50 interrupt-controller;
43 }; 51 };
44 }; 52 };
diff --git a/Documentation/devicetree/bindings/net/dsa/b53.txt b/Documentation/devicetree/bindings/net/dsa/b53.txt
index 1811e1972a7a..5201bc15fdd6 100644
--- a/Documentation/devicetree/bindings/net/dsa/b53.txt
+++ b/Documentation/devicetree/bindings/net/dsa/b53.txt
@@ -46,6 +46,42 @@ Required properties:
46 "brcm,bcm6328-switch" 46 "brcm,bcm6328-switch"
47 "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch" 47 "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"
48 48
49Required properties for BCM585xx/586xx/88312 SoCs:
50
51 - reg: a total of 3 register base addresses, the first one must be the
52 Switch Register Access block base, the second is the port 5/4 mux
53 configuration register and the third one is the SGMII configuration
54 and status register base address.
55
56 - interrupts: a total of 13 interrupts must be specified, in the following
57 order: port 0-5, 7-8 link status change, then the integrated PHY interrupt,
58 then the timestamping interrupt and the sleep timer interrupts for ports
59 5,7,8.
60
61Optional properties for BCM585xx/586xx/88312 SoCs:
62
63 - reg-names: a total of 3 names matching the 3 base register address, must
64 be in the following order:
65 "srab"
66 "mux_config"
67 "sgmii_config"
68
69 - interrupt-names: a total of 13 names matching the 13 interrupts specified
70 must be in the following order:
71 "link_state_p0"
72 "link_state_p1"
73 "link_state_p2"
74 "link_state_p3"
75 "link_state_p4"
76 "link_state_p5"
77 "link_state_p7"
78 "link_state_p8"
79 "phy"
80 "ts"
81 "imp_sleep_timer_p5"
82 "imp_sleep_timer_p7"
83 "imp_sleep_timer_p8"
84
49See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional 85See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
50required and optional properties. 86required and optional properties.
51 87
diff --git a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
index e319fe5e205a..99c4ba6a3f61 100644
--- a/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
+++ b/Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
@@ -7,6 +7,7 @@ Required properties:
7 "allwinner,sun8i-a83t-sid" 7 "allwinner,sun8i-a83t-sid"
8 "allwinner,sun8i-h3-sid" 8 "allwinner,sun8i-h3-sid"
9 "allwinner,sun50i-a64-sid" 9 "allwinner,sun50i-a64-sid"
10 "allwinner,sun50i-h5-sid"
10 11
11- reg: Should contain registers location and length 12- reg: Should contain registers location and length
12 13
diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.txt b/Documentation/devicetree/bindings/soc/rockchip/grf.txt
index 7dc5ce858a0e..46e27cd69f18 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.txt
@@ -13,6 +13,7 @@ On RK3328 SoCs, the GRF adds a section for USB2PHYGRF,
13Required Properties: 13Required Properties:
14 14
15- compatible: GRF should be one of the following: 15- compatible: GRF should be one of the following:
16 - "rockchip,px30-grf", "syscon": for px30
16 - "rockchip,rk3036-grf", "syscon": for rk3036 17 - "rockchip,rk3036-grf", "syscon": for rk3036
17 - "rockchip,rk3066-grf", "syscon": for rk3066 18 - "rockchip,rk3066-grf", "syscon": for rk3066
18 - "rockchip,rk3188-grf", "syscon": for rk3188 19 - "rockchip,rk3188-grf", "syscon": for rk3188
@@ -23,6 +24,7 @@ Required Properties:
23 - "rockchip,rk3399-grf", "syscon": for rk3399 24 - "rockchip,rk3399-grf", "syscon": for rk3399
24 - "rockchip,rv1108-grf", "syscon": for rv1108 25 - "rockchip,rv1108-grf", "syscon": for rv1108
25- compatible: PMUGRF should be one of the following: 26- compatible: PMUGRF should be one of the following:
27 - "rockchip,px30-pmugrf", "syscon": for px30
26 - "rockchip,rk3368-pmugrf", "syscon": for rk3368 28 - "rockchip,rk3368-pmugrf", "syscon": for rk3368
27 - "rockchip,rk3399-pmugrf", "syscon": for rk3399 29 - "rockchip,rk3399-pmugrf", "syscon": for rk3399
28- compatible: SGRF should be one of the following 30- compatible: SGRF should be one of the following
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 2c3fc512e746..b84a705c5c14 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -114,6 +114,7 @@ elan Elan Microelectronic Corp.
114embest Shenzhen Embest Technology Co., Ltd. 114embest Shenzhen Embest Technology Co., Ltd.
115emmicro EM Microelectronic 115emmicro EM Microelectronic
116emtrion emtrion GmbH 116emtrion emtrion GmbH
117endless Endless Mobile, Inc.
117energymicro Silicon Laboratories (formerly Energy Micro AS) 118energymicro Silicon Laboratories (formerly Energy Micro AS)
118engicam Engicam S.r.l. 119engicam Engicam S.r.l.
119epcos EPCOS AG 120epcos EPCOS AG
@@ -297,6 +298,7 @@ pine64 Pine64
297pixcir PIXCIR MICROELECTRONICS Co., Ltd 298pixcir PIXCIR MICROELECTRONICS Co., Ltd
298plathome Plat'Home Co., Ltd. 299plathome Plat'Home Co., Ltd.
299plda PLDA 300plda PLDA
301plx Broadcom Corporation (formerly PLX Technology)
300portwell Portwell Inc. 302portwell Portwell Inc.
301poslab Poslab Technology Co., Ltd. 303poslab Poslab Technology Co., Ltd.
302powervr PowerVR (deprecated, use img) 304powervr PowerVR (deprecated, use img)
diff --git a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
index 5d47a262474c..9407212a85a8 100644
--- a/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
@@ -7,6 +7,7 @@ Required properties:
7 Examples with soctypes are: 7 Examples with soctypes are:
8 - "renesas,r8a7743-wdt" (RZ/G1M) 8 - "renesas,r8a7743-wdt" (RZ/G1M)
9 - "renesas,r8a7745-wdt" (RZ/G1E) 9 - "renesas,r8a7745-wdt" (RZ/G1E)
10 - "renesas,r8a774a1-wdt" (RZ/G2M)
10 - "renesas,r8a7790-wdt" (R-Car H2) 11 - "renesas,r8a7790-wdt" (R-Car H2)
11 - "renesas,r8a7791-wdt" (R-Car M2-W) 12 - "renesas,r8a7791-wdt" (R-Car M2-W)
12 - "renesas,r8a7792-wdt" (R-Car V2H) 13 - "renesas,r8a7792-wdt" (R-Car V2H)
@@ -21,8 +22,8 @@ Required properties:
21 - "renesas,r7s72100-wdt" (RZ/A1) 22 - "renesas,r7s72100-wdt" (RZ/A1)
22 The generic compatible string must be: 23 The generic compatible string must be:
23 - "renesas,rza-wdt" for RZ/A 24 - "renesas,rza-wdt" for RZ/A
24 - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G 25 - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G1
25 - "renesas,rcar-gen3-wdt" for R-Car Gen3 26 - "renesas,rcar-gen3-wdt" for R-Car Gen3 and RZ/G2
26 27
27- reg : Should contain WDT registers location and length 28- reg : Should contain WDT registers location and length
28- clocks : the clock feeding the watchdog timer. 29- clocks : the clock feeding the watchdog timer.
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx
index 72d16f08e431..b8df81f6d6bc 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx
@@ -32,7 +32,7 @@ Supported chips:
32 Datasheet: Publicly available at the Texas Instruments website 32 Datasheet: Publicly available at the Texas Instruments website
33 http://www.ti.com/ 33 http://www.ti.com/
34 34
35Author: Lothar Felten <l-felten@ti.com> 35Author: Lothar Felten <lothar.felten@gmail.com>
36 36
37Description 37Description
38----------- 38-----------
diff --git a/Documentation/i2c/DMA-considerations b/Documentation/i2c/DMA-considerations
index 966610aa4620..203002054120 100644
--- a/Documentation/i2c/DMA-considerations
+++ b/Documentation/i2c/DMA-considerations
@@ -50,10 +50,14 @@ bounce buffer. But you don't need to care about that detail, just use the
50returned buffer. If NULL is returned, the threshold was not met or a bounce 50returned buffer. If NULL is returned, the threshold was not met or a bounce
51buffer could not be allocated. Fall back to PIO in that case. 51buffer could not be allocated. Fall back to PIO in that case.
52 52
53In any case, a buffer obtained from above needs to be released. It ensures data 53In any case, a buffer obtained from above needs to be released. Another helper
54is copied back to the message and a potentially used bounce buffer is freed:: 54function ensures a potentially used bounce buffer is freed::
55 55
56 i2c_release_dma_safe_msg_buf(msg, dma_buf); 56 i2c_put_dma_safe_msg_buf(dma_buf, msg, xferred);
57
58The last argument 'xferred' controls if the buffer is synced back to the
59message or not. No syncing is needed in cases setting up DMA had an error and
60there was no data transferred.
57 61
58The bounce buffer handling from the core is generic and simple. It will always 62The bounce buffer handling from the core is generic and simple. It will always
59allocate a new bounce buffer. If you want a more sophisticated handling (e.g. 63allocate a new bounce buffer. If you want a more sophisticated handling (e.g.
diff --git a/MAINTAINERS b/MAINTAINERS
index a5b256b25905..9ad052aeac39 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8255,9 +8255,9 @@ F: drivers/ata/pata_arasan_cf.c
8255 8255
8256LIBATA PATA DRIVERS 8256LIBATA PATA DRIVERS
8257M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> 8257M: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
8258M: Jens Axboe <kernel.dk> 8258M: Jens Axboe <axboe@kernel.dk>
8259L: linux-ide@vger.kernel.org 8259L: linux-ide@vger.kernel.org
8260T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git 8260T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
8261S: Maintained 8261S: Maintained
8262F: drivers/ata/pata_*.c 8262F: drivers/ata/pata_*.c
8263F: drivers/ata/ata_generic.c 8263F: drivers/ata/ata_generic.c
@@ -8275,7 +8275,7 @@ LIBATA SATA AHCI PLATFORM devices support
8275M: Hans de Goede <hdegoede@redhat.com> 8275M: Hans de Goede <hdegoede@redhat.com>
8276M: Jens Axboe <axboe@kernel.dk> 8276M: Jens Axboe <axboe@kernel.dk>
8277L: linux-ide@vger.kernel.org 8277L: linux-ide@vger.kernel.org
8278T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git 8278T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
8279S: Maintained 8279S: Maintained
8280F: drivers/ata/ahci_platform.c 8280F: drivers/ata/ahci_platform.c
8281F: drivers/ata/libahci_platform.c 8281F: drivers/ata/libahci_platform.c
@@ -8291,7 +8291,7 @@ F: drivers/ata/sata_promise.*
8291LIBATA SUBSYSTEM (Serial and Parallel ATA drivers) 8291LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
8292M: Jens Axboe <axboe@kernel.dk> 8292M: Jens Axboe <axboe@kernel.dk>
8293L: linux-ide@vger.kernel.org 8293L: linux-ide@vger.kernel.org
8294T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git 8294T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
8295S: Maintained 8295S: Maintained
8296F: drivers/ata/ 8296F: drivers/ata/
8297F: include/linux/ata.h 8297F: include/linux/ata.h
diff --git a/Makefile b/Makefile
index 2b458801ba74..19948e556941 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
2VERSION = 4 2VERSION = 4
3PATCHLEVEL = 19 3PATCHLEVEL = 19
4SUBLEVEL = 0 4SUBLEVEL = 0
5EXTRAVERSION = -rc1 5EXTRAVERSION = -rc2
6NAME = Merciless Moray 6NAME = Merciless Moray
7 7
8# *DOCUMENTATION* 8# *DOCUMENTATION*
@@ -807,6 +807,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
807# disable pointer signed / unsigned warnings in gcc 4.0 807# disable pointer signed / unsigned warnings in gcc 4.0
808KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) 808KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
809 809
810# disable stringop warnings in gcc 8+
811KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
812
810# disable invalid "can't wrap" optimizations for signed / pointers 813# disable invalid "can't wrap" optimizations for signed / pointers
811KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) 814KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
812 815
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b5bd3de87c33..7edf93d1ba73 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
81 bcm2836-rpi-2-b.dtb \ 81 bcm2836-rpi-2-b.dtb \
82 bcm2837-rpi-3-b.dtb \ 82 bcm2837-rpi-3-b.dtb \
83 bcm2837-rpi-3-b-plus.dtb \ 83 bcm2837-rpi-3-b-plus.dtb \
84 bcm2837-rpi-cm3-io3.dtb \
84 bcm2835-rpi-zero.dtb \ 85 bcm2835-rpi-zero.dtb \
85 bcm2835-rpi-zero-w.dtb 86 bcm2835-rpi-zero-w.dtb
86dtb-$(CONFIG_ARCH_BCM_5301X) += \ 87dtb-$(CONFIG_ARCH_BCM_5301X) += \
@@ -321,6 +322,7 @@ dtb-$(CONFIG_MACH_MESON6) += \
321 meson6-atv1200.dtb 322 meson6-atv1200.dtb
322dtb-$(CONFIG_MACH_MESON8) += \ 323dtb-$(CONFIG_MACH_MESON8) += \
323 meson8-minix-neo-x8.dtb \ 324 meson8-minix-neo-x8.dtb \
325 meson8b-ec100.dtb \
324 meson8b-mxq.dtb \ 326 meson8b-mxq.dtb \
325 meson8b-odroidc1.dtb \ 327 meson8b-odroidc1.dtb \
326 meson8m2-mxiii-plus.dtb 328 meson8m2-mxiii-plus.dtb
@@ -892,7 +894,7 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
892 socfpga_arria10_socdk_sdmmc.dtb \ 894 socfpga_arria10_socdk_sdmmc.dtb \
893 socfpga_cyclone5_mcvevk.dtb \ 895 socfpga_cyclone5_mcvevk.dtb \
894 socfpga_cyclone5_socdk.dtb \ 896 socfpga_cyclone5_socdk.dtb \
895 socfpga_cyclone5_de0_sockit.dtb \ 897 socfpga_cyclone5_de0_nano_soc.dtb \
896 socfpga_cyclone5_sockit.dtb \ 898 socfpga_cyclone5_sockit.dtb \
897 socfpga_cyclone5_socrates.dtb \ 899 socfpga_cyclone5_socrates.dtb \
898 socfpga_cyclone5_sodia.dtb \ 900 socfpga_cyclone5_sodia.dtb \
@@ -1033,6 +1035,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
1033 sun8i-h2-plus-orangepi-r1.dtb \ 1035 sun8i-h2-plus-orangepi-r1.dtb \
1034 sun8i-h2-plus-orangepi-zero.dtb \ 1036 sun8i-h2-plus-orangepi-zero.dtb \
1035 sun8i-h3-bananapi-m2-plus.dtb \ 1037 sun8i-h3-bananapi-m2-plus.dtb \
1038 sun8i-h3-bananapi-m2-plus-v1.2.dtb \
1036 sun8i-h3-beelink-x2.dtb \ 1039 sun8i-h3-beelink-x2.dtb \
1037 sun8i-h3-libretech-all-h3-cc.dtb \ 1040 sun8i-h3-libretech-all-h3-cc.dtb \
1038 sun8i-h3-nanopi-m1.dtb \ 1041 sun8i-h3-nanopi-m1.dtb \
@@ -1046,6 +1049,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
1046 sun8i-h3-orangepi-pc-plus.dtb \ 1049 sun8i-h3-orangepi-pc-plus.dtb \
1047 sun8i-h3-orangepi-plus.dtb \ 1050 sun8i-h3-orangepi-plus.dtb \
1048 sun8i-h3-orangepi-plus2e.dtb \ 1051 sun8i-h3-orangepi-plus2e.dtb \
1052 sun8i-h3-orangepi-zero-plus2.dtb \
1049 sun8i-r16-bananapi-m2m.dtb \ 1053 sun8i-r16-bananapi-m2m.dtb \
1050 sun8i-r16-nintendo-nes-classic.dtb \ 1054 sun8i-r16-nintendo-nes-classic.dtb \
1051 sun8i-r16-nintendo-super-nes-classic.dtb \ 1055 sun8i-r16-nintendo-super-nes-classic.dtb \
@@ -1061,6 +1065,7 @@ dtb-$(CONFIG_ARCH_TANGO) += \
1061 tango4-vantage-1172.dtb 1065 tango4-vantage-1172.dtb
1062dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ 1066dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
1063 tegra20-harmony.dtb \ 1067 tegra20-harmony.dtb \
1068 tegra20-colibri-eval-v3.dtb \
1064 tegra20-colibri-iris.dtb \ 1069 tegra20-colibri-iris.dtb \
1065 tegra20-medcom-wide.dtb \ 1070 tegra20-medcom-wide.dtb \
1066 tegra20-paz00.dtb \ 1071 tegra20-paz00.dtb \
@@ -1071,6 +1076,7 @@ dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
1071 tegra20-ventana.dtb 1076 tegra20-ventana.dtb
1072dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += \ 1077dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += \
1073 tegra30-apalis-eval.dtb \ 1078 tegra30-apalis-eval.dtb \
1079 tegra30-apalis-v1.1-eval.dtb \
1074 tegra30-beaver.dtb \ 1080 tegra30-beaver.dtb \
1075 tegra30-cardhu-a02.dtb \ 1081 tegra30-cardhu-a02.dtb \
1076 tegra30-cardhu-a04.dtb \ 1082 tegra30-cardhu-a04.dtb \
@@ -1199,6 +1205,8 @@ dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
1199dtb-$(CONFIG_ARCH_ASPEED) += \ 1205dtb-$(CONFIG_ARCH_ASPEED) += \
1200 aspeed-ast2500-evb.dtb \ 1206 aspeed-ast2500-evb.dtb \
1201 aspeed-bmc-arm-centriq2400-rep.dtb \ 1207 aspeed-bmc-arm-centriq2400-rep.dtb \
1208 aspeed-bmc-arm-stardragon4800-rep2.dtb \
1209 aspeed-bmc-facebook-tiogapass.dtb \
1202 aspeed-bmc-intel-s2600wf.dtb \ 1210 aspeed-bmc-intel-s2600wf.dtb \
1203 aspeed-bmc-opp-lanyang.dtb \ 1211 aspeed-bmc-opp-lanyang.dtb \
1204 aspeed-bmc-opp-palmetto.dtb \ 1212 aspeed-bmc-opp-palmetto.dtb \
diff --git a/arch/arm/boot/dts/am335x-osd3358-sm-red.dts b/arch/arm/boot/dts/am335x-osd3358-sm-red.dts
index 4d969013f99a..4d969013f99a 100755..100644
--- a/arch/arm/boot/dts/am335x-osd3358-sm-red.dts
+++ b/arch/arm/boot/dts/am335x-osd3358-sm-red.dts
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index f0cbd86312dc..d4b7c59eec68 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -469,6 +469,7 @@
469 ti,hwmods = "rtc"; 469 ti,hwmods = "rtc";
470 clocks = <&clk_32768_ck>; 470 clocks = <&clk_32768_ck>;
471 clock-names = "int-clk"; 471 clock-names = "int-clk";
472 system-power-controller;
472 status = "disabled"; 473 status = "disabled";
473 }; 474 };
474 475
diff --git a/arch/arm/boot/dts/arm-realview-eb.dtsi b/arch/arm/boot/dts/arm-realview-eb.dtsi
index a917cf8825ca..0e4c7c4c8c09 100644
--- a/arch/arm/boot/dts/arm-realview-eb.dtsi
+++ b/arch/arm/boot/dts/arm-realview-eb.dtsi
@@ -371,7 +371,7 @@
371 clock-names = "uartclk", "apb_pclk"; 371 clock-names = "uartclk", "apb_pclk";
372 }; 372 };
373 373
374 ssp: ssp@1000d000 { 374 ssp: spi@1000d000 {
375 compatible = "arm,pl022", "arm,primecell"; 375 compatible = "arm,pl022", "arm,primecell";
376 reg = <0x1000d000 0x1000>; 376 reg = <0x1000d000 0x1000>;
377 clocks = <&sspclk>, <&pclk>; 377 clocks = <&sspclk>, <&pclk>;
diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts
index f935b72d3d96..f2a1d25eb6cf 100644
--- a/arch/arm/boot/dts/arm-realview-pb1176.dts
+++ b/arch/arm/boot/dts/arm-realview-pb1176.dts
@@ -380,7 +380,7 @@
380 clock-names = "apb_pclk"; 380 clock-names = "apb_pclk";
381 }; 381 };
382 382
383 pb1176_ssp: ssp@1010b000 { 383 pb1176_ssp: spi@1010b000 {
384 compatible = "arm,pl022", "arm,primecell"; 384 compatible = "arm,pl022", "arm,primecell";
385 reg = <0x1010b000 0x1000>; 385 reg = <0x1010b000 0x1000>;
386 interrupt-parent = <&intc_dc1176>; 386 interrupt-parent = <&intc_dc1176>;
diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
index 36203288de42..7f9cbdf33a51 100644
--- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
+++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
@@ -523,7 +523,7 @@
523 clock-names = "uartclk", "apb_pclk"; 523 clock-names = "uartclk", "apb_pclk";
524 }; 524 };
525 525
526 ssp@1000d000 { 526 spi@1000d000 {
527 compatible = "arm,pl022", "arm,primecell"; 527 compatible = "arm,pl022", "arm,primecell";
528 reg = <0x1000d000 0x1000>; 528 reg = <0x1000d000 0x1000>;
529 interrupt-parent = <&intc_pb11mp>; 529 interrupt-parent = <&intc_pb11mp>;
diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
index 10868ba3277f..a5676697ff3b 100644
--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
+++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
@@ -362,7 +362,7 @@
362 clock-names = "uartclk", "apb_pclk"; 362 clock-names = "uartclk", "apb_pclk";
363 }; 363 };
364 364
365 ssp: ssp@1000d000 { 365 ssp: spi@1000d000 {
366 compatible = "arm,pl022", "arm,primecell"; 366 compatible = "arm,pl022", "arm,primecell";
367 reg = <0x1000d000 0x1000>; 367 reg = <0x1000d000 0x1000>;
368 clocks = <&sspclk>, <&pclk>; 368 clocks = <&sspclk>, <&pclk>;
diff --git a/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts b/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts
new file mode 100644
index 000000000000..bdfd8c9f3a7c
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts
@@ -0,0 +1,207 @@
1// SPDX-License-Identifier: GPL-2.0+
2/dts-v1/;
3
4#include "aspeed-g5.dtsi"
5#include <dt-bindings/gpio/aspeed-gpio.h>
6
7/ {
8 model = "HXT StarDragon 4800 REP2 AST2520";
9 compatible = "hxt,stardragon4800-rep2-bmc", "aspeed,ast2500";
10
11 chosen {
12 stdout-path = &uart5;
13 bootargs = "console=ttyS4,115200 earlyprintk";
14 };
15
16 memory@80000000 {
17 reg = <0x80000000 0x40000000>;
18 };
19
20 iio-hwmon {
21 compatible = "iio-hwmon";
22 io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
23 <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>;
24 };
25
26 iio-hwmon-battery {
27 compatible = "iio-hwmon";
28 io-channels = <&adc 7>;
29 };
30
31 leds {
32 compatible = "gpio-leds";
33
34 system_fault1 {
35 label = "System_fault1";
36 gpios = <&gpio ASPEED_GPIO(I, 3) GPIO_ACTIVE_LOW>;
37 };
38
39 system_fault2 {
40 label = "System_fault2";
41 gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>;
42 };
43 };
44};
45
46&fmc {
47 status = "okay";
48 flash@0 {
49 status = "okay";
50 m25p,fast-read;
51 label = "bmc";
52#include "openbmc-flash-layout.dtsi"
53 };
54};
55
56&spi1 {
57 status = "okay";
58 pinctrl-names = "default";
59 pinctrl-0 = <&pinctrl_spi1_default>;
60 flash@0 {
61 status = "okay";
62 };
63};
64
65&spi2 {
66 pinctrl-names = "default";
67 pinctrl-0 = <&pinctrl_spi2ck_default
68 &pinctrl_spi2miso_default
69 &pinctrl_spi2mosi_default
70 &pinctrl_spi2cs0_default>;
71};
72
73&uart3 {
74 status = "okay";
75
76 pinctrl-names = "default";
77 pinctrl-0 = <&pinctrl_txd3_default &pinctrl_rxd3_default>;
78 current-speed = <115200>;
79};
80
81&uart5 {
82 status = "okay";
83};
84
85&mac0 {
86 status = "okay";
87 pinctrl-names = "default";
88 pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
89};
90
91&mac1 {
92 status = "okay";
93 pinctrl-names = "default";
94 pinctrl-0 = <&pinctrl_rmii2_default>;
95 use-ncsi;
96};
97
98&i2c0 {
99 status = "okay";
100};
101
102&i2c1 {
103 status = "okay";
104
105 tmp421@1e {
106 compatible = "ti,tmp421";
107 reg = <0x1e>;
108 };
109 tmp421@2a {
110 compatible = "ti,tmp421";
111 reg = <0x2a>;
112 };
113 tmp421@1c {
114 compatible = "ti,tmp421";
115 reg = <0x1c>;
116 };
117};
118
119&i2c2 {
120 status = "okay";
121};
122
123&i2c3 {
124 status = "okay";
125};
126
127&i2c4 {
128 status = "okay";
129};
130
131&i2c5 {
132 status = "okay";
133};
134
135&i2c6 {
136 status = "okay";
137
138 tmp421@1f {
139 compatible = "ti,tmp421";
140 reg = <0x1f>;
141 };
142 nvt210@4c {
143 compatible = "nvt210";
144 reg = <0x4c>;
145 };
146 eeprom@50 {
147 compatible = "atmel,24c128";
148 reg = <0x50>;
149 pagesize = <128>;
150 };
151};
152
153&i2c7 {
154 status = "okay";
155};
156
157&i2c8 {
158 status = "okay";
159
160 pca9641@70 {
161 compatible = "nxp,pca9641";
162 reg = <0x70>;
163 i2c-arb {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 eeprom@50 {
167 compatible = "atmel,24c02";
168 reg = <0x50>;
169 };
170 dps650ab@58 {
171 compatible = "dps650ab";
172 reg = <0x58>;
173 };
174 };
175 };
176};
177
178&i2c9 {
179 status = "okay";
180};
181
182&vuart {
183 status = "okay";
184};
185
186&gfx {
187 status = "okay";
188};
189
190&pinctrl {
191 aspeed,external-nodes = <&gfx &lhc>;
192};
193
194&gpio {
195 pin_gpio_c7 {
196 gpio-hog;
197 gpios = <ASPEED_GPIO(C, 7) GPIO_ACTIVE_HIGH>;
198 output-low;
199 line-name = "BIOS_SPI_MUX_S";
200 };
201 pin_gpio_d1 {
202 gpio-hog;
203 gpios = <ASPEED_GPIO(D, 1) GPIO_ACTIVE_HIGH>;
204 output-high;
205 line-name = "PHY2_RESET_N";
206 };
207};
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts
new file mode 100644
index 000000000000..f8e7b71af7e6
--- /dev/null
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts
@@ -0,0 +1,146 @@
1// SPDX-License-Identifier: GPL-2.0+
2// Copyright (c) 2018 Facebook Inc.
3// Author: Vijay Khemka <vijaykhemka@fb.com>
4/dts-v1/;
5
6#include "aspeed-g5.dtsi"
7#include <dt-bindings/gpio/aspeed-gpio.h>
8
9/ {
10 model = "Facebook TiogaPass BMC";
11 compatible = "facebook,tiogapass-bmc", "aspeed,ast2500";
12 aliases {
13 serial0 = &uart1;
14 serial4 = &uart5;
15 };
16 chosen {
17 stdout-path = &uart5;
18 bootargs = "console=ttyS4,115200 earlyprintk";
19 };
20
21 memory@80000000 {
22 reg = <0x80000000 0x20000000>;
23 };
24};
25
26&fmc {
27 status = "okay";
28 flash@0 {
29 status = "okay";
30 m25p,fast-read;
31#include "openbmc-flash-layout.dtsi"
32 };
33};
34
35&spi1 {
36 status = "okay";
37 pinctrl-names = "default";
38 pinctrl-0 = <&pinctrl_spi1_default>;
39 flash@0 {
40 status = "okay";
41 m25p,fast-read;
42 label = "pnor";
43 };
44};
45
46&uart1 {
47 // Host Console
48 status = "okay";
49 pinctrl-names = "default";
50 pinctrl-0 = <&pinctrl_txd1_default
51 &pinctrl_rxd1_default>;
52};
53
54&uart5 {
55 // BMC Console
56 status = "okay";
57};
58
59&mac0 {
60 status = "okay";
61
62 pinctrl-names = "default";
63 pinctrl-0 = <&pinctrl_rmii1_default>;
64 use-ncsi;
65};
66
67&i2c0 {
68 status = "okay";
69 //Airmax Conn B, CPU0 PIROM, CPU1 PIROM
70};
71
72&i2c1 {
73 status = "okay";
74 //X24 Riser
75};
76
77&i2c2 {
78 status = "okay";
79 // Mezz Management SMBus
80};
81
82&i2c3 {
83 status = "okay";
84 // SMBus to Board ID EEPROM
85};
86
87&i2c4 {
88 status = "okay";
89 // BMC Debug Header
90};
91
92&i2c5 {
93 status = "okay";
94 // CPU Voltage regulators
95};
96
97&i2c6 {
98 status = "okay";
99 tpm@20 {
100 compatible = "infineon,slb9645tt";
101 reg = <0x20>;
102 };
103 tmp421@4e {
104 compatible = "ti,tmp421";
105 reg = <0x4e>;
106 };
107 tmp421@4f {
108 compatible = "ti,tmp421";
109 reg = <0x4f>;
110 };
111 eeprom@54 {
112 compatible = "atmel,24c64";
113 reg = <0x54>;
114 pagesize = <32>;
115 };
116};
117
118&i2c7 {
119 status = "okay";
120 //HSC, AirMax Conn A
121};
122
123&i2c8 {
124 status = "okay";
125 //Mezz Sensor SMBus
126};
127
128&i2c9 {
129 status = "okay";
130 //USB Debug Connector
131};
132
133&pwm_tacho {
134 status = "okay";
135 pinctrl-names = "default";
136 pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
137 fan@0 {
138 reg = <0x00>;
139 aspeed,fan-tach-ch = /bits/ 8 <0x00>;
140 };
141
142 fan@1 {
143 reg = <0x00>;
144 aspeed,fan-tach-ch = /bits/ 8 <0x01>;
145 };
146};
diff --git a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
index 76aa6ea1f988..385c0f4b69ee 100644
--- a/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
@@ -7,6 +7,25 @@
7 model = "Quanta Q71L BMC"; 7 model = "Quanta Q71L BMC";
8 compatible = "quanta,q71l-bmc", "aspeed,ast2400"; 8 compatible = "quanta,q71l-bmc", "aspeed,ast2400";
9 9
10 aliases {
11 i2c14 = &i2c_pcie2;
12 i2c15 = &i2c_pcie3;
13 i2c16 = &i2c_pcie6;
14 i2c17 = &i2c_pcie7;
15 i2c18 = &i2c_pcie1;
16 i2c19 = &i2c_pcie4;
17 i2c20 = &i2c_pcie5;
18 i2c21 = &i2c_pcie8;
19 i2c22 = &i2c_pcie9;
20 i2c23 = &i2c_pcie10;
21 i2c24 = &i2c_ssd1;
22 i2c25 = &i2c_ssd2;
23 i2c26 = &i2c_psu4;
24 i2c27 = &i2c_psu1;
25 i2c28 = &i2c_psu3;
26 i2c29 = &i2c_psu2;
27 };
28
10 chosen { 29 chosen {
11 stdout-path = &uart5; 30 stdout-path = &uart5;
12 bootargs = "console=ttyS4,115200 earlyprintk"; 31 bootargs = "console=ttyS4,115200 earlyprintk";
@@ -93,6 +112,10 @@
93 &pinctrl_ddcclk_default &pinctrl_ddcdat_default>; 112 &pinctrl_ddcclk_default &pinctrl_ddcdat_default>;
94}; 113};
95 114
115&ibt {
116 status = "okay";
117};
118
96&lpc_snoop { 119&lpc_snoop {
97 status = "okay"; 120 status = "okay";
98 snoop-ports = <0x80>; 121 snoop-ports = <0x80>;
@@ -299,24 +322,44 @@
299 #address-cells = <1>; 322 #address-cells = <1>;
300 #size-cells = <0>; 323 #size-cells = <0>;
301 reg = <0>; 324 reg = <0>;
325
326 psu@59 {
327 compatible = "pmbus";
328 reg = <0x59>;
329 };
302 }; 330 };
303 331
304 i2c_psu1: i2c@1 { 332 i2c_psu1: i2c@1 {
305 #address-cells = <1>; 333 #address-cells = <1>;
306 #size-cells = <0>; 334 #size-cells = <0>;
307 reg = <1>; 335 reg = <1>;
336
337 psu@58 {
338 compatible = "pmbus";
339 reg = <0x58>;
340 };
308 }; 341 };
309 342
310 i2c_psu3: i2c@2 { 343 i2c_psu3: i2c@2 {
311 #address-cells = <1>; 344 #address-cells = <1>;
312 #size-cells = <0>; 345 #size-cells = <0>;
313 reg = <2>; 346 reg = <2>;
347
348 psu@58 {
349 compatible = "pmbus";
350 reg = <0x58>;
351 };
314 }; 352 };
315 353
316 i2c_psu2: i2c@3 { 354 i2c_psu2: i2c@3 {
317 #address-cells = <1>; 355 #address-cells = <1>;
318 #size-cells = <0>; 356 #size-cells = <0>;
319 reg = <3>; 357 reg = <3>;
358
359 psu@59 {
360 compatible = "pmbus";
361 reg = <0x59>;
362 };
320 }; 363 };
321 }; 364 };
322 365
@@ -345,6 +388,10 @@
345 status = "okay"; 388 status = "okay";
346}; 389};
347 390
391&adc {
392 status = "okay";
393};
394
348&pwm_tacho { 395&pwm_tacho {
349 status = "okay"; 396 status = "okay";
350 397
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index b23a983f95a5..69f6b9d2e7e7 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -350,7 +350,7 @@
350 status = "disabled"; 350 status = "disabled";
351 }; 351 };
352 352
353 i2c: i2c@1e78a000 { 353 i2c: bus@1e78a000 {
354 compatible = "simple-bus"; 354 compatible = "simple-bus";
355 #address-cells = <1>; 355 #address-cells = <1>;
356 #size-cells = <1>; 356 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 87fdc146ff52..d107459fc0f8 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -410,7 +410,7 @@
410 status = "disabled"; 410 status = "disabled";
411 }; 411 };
412 412
413 i2c: i2c@1e78a000 { 413 i2c: bus@1e78a000 {
414 compatible = "simple-bus"; 414 compatible = "simple-bus";
415 #address-cells = <1>; 415 #address-cells = <1>;
416 #size-cells = <1>; 416 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/at91-dvk_su60_somc.dtsi b/arch/arm/boot/dts/at91-dvk_su60_somc.dtsi
index bb86f17ed5ed..21876da7c442 100644
--- a/arch/arm/boot/dts/at91-dvk_su60_somc.dtsi
+++ b/arch/arm/boot/dts/at91-dvk_su60_somc.dtsi
@@ -70,9 +70,9 @@
70&i2c1 { 70&i2c1 {
71 status = "okay"; 71 status = "okay";
72 72
73 eeprom@87 { 73 eeprom@57 {
74 compatible = "giantec,gt24c32a", "atmel,24c32"; 74 compatible = "giantec,gt24c32a", "atmel,24c32";
75 reg = <87>; 75 reg = <0x57>;
76 pagesize = <32>; 76 pagesize = <32>;
77 }; 77 };
78}; 78};
diff --git a/arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi b/arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi
index 4b9176dc5d02..df0f0cc575c1 100644
--- a/arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi
+++ b/arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi
@@ -59,9 +59,9 @@
59&i2c1 { 59&i2c1 {
60 status = "okay"; 60 status = "okay";
61 61
62 ft5426@56 { 62 ft5426@38 {
63 compatible = "focaltech,ft5426", "edt,edt-ft5406"; 63 compatible = "focaltech,ft5426", "edt,edt-ft5406";
64 reg = <56>; 64 reg = <0x38>;
65 pinctrl-names = "default"; 65 pinctrl-names = "default";
66 pinctrl-0 = <&pinctrl_lcd_ctp_int>; 66 pinctrl-0 = <&pinctrl_lcd_ctp_int>;
67 67
diff --git a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
index af9f38456d04..911d2c7c1500 100644
--- a/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
+++ b/arch/arm/boot/dts/at91-nattis-2-natte-2.dts
@@ -16,46 +16,6 @@
16 compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea", 16 compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
17 "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; 17 "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
18 18
19 ahb {
20 apb {
21 pinctrl@fffff200 {
22 nattis {
23 pinctrl_usba_vbus: usba_vbus {
24 atmel,pins =
25 <AT91_PIOD 28
26 AT91_PERIPH_GPIO
27 AT91_PINCTRL_DEGLITCH>;
28 };
29
30 pinctrl_mmc0_cd: mmc0_cd {
31 atmel,pins =
32 <AT91_PIOD 5
33 AT91_PERIPH_GPIO
34 AT91_PINCTRL_PULL_UP_DEGLITCH>;
35 };
36
37 pinctrl_lcd_prlud0: lcd_prlud0 {
38 atmel,pins =
39 <AT91_PIOA 21
40 AT91_PERIPH_GPIO
41 AT91_PINCTRL_OUTPUT_VAL(0)>;
42 };
43
44 pinctrl_lcd_hipow0: lcd_hipow0 {
45 atmel,pins =
46 <AT91_PIOA 23
47 AT91_PERIPH_GPIO
48 AT91_PINCTRL_OUTPUT_VAL(0)>;
49 };
50 };
51 };
52
53 watchdog@fffffe40 {
54 status = "okay";
55 };
56 };
57 };
58
59 gpio-keys { 19 gpio-keys {
60 compatible = "gpio-keys"; 20 compatible = "gpio-keys";
61 21
@@ -103,10 +63,29 @@
103 }; 63 };
104 64
105 panel: panel { 65 panel: panel {
106 compatible = "sharp,lq150x1lg11"; 66 compatible = "sharp,lq150x1lg11", "panel-lvds";
67
107 backlight = <&panel_bl>; 68 backlight = <&panel_bl>;
108 power-supply = <&panel_reg>; 69 power-supply = <&panel_reg>;
109 70
71 width-mm = <304>;
72 height-mm = <228>;
73
74 data-mapping = "jeida-18";
75
76 panel-timing {
77 // 1024x768 @ 60Hz (typical)
78 clock-frequency = <50000000 65000000 80000000>;
79 hactive = <1024>;
80 vactive = <768>;
81 hfront-porch = <48 88 88>;
82 hback-porch = <96 168 168>;
83 hsync-len = <32 64 64>;
84 vsync-len = <3 13 74>;
85 vfront-porch = <3 13 74>;
86 vback-porch = <3 12 74>;
87 };
88
110 port { 89 port {
111 panel_input: endpoint { 90 panel_input: endpoint {
112 remote-endpoint = <&lvds_encoder_output>; 91 remote-endpoint = <&lvds_encoder_output>;
@@ -115,7 +94,10 @@
115 }; 94 };
116 95
117 lvds-encoder { 96 lvds-encoder {
118 compatible = "lvds-encoder"; 97 compatible = "ti,ds90c185", "lvds-encoder";
98
99 pinctrl-names = "default";
100 pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;
119 101
120 ports { 102 ports {
121 #address-cells = <1>; 103 #address-cells = <1>;
@@ -159,6 +141,36 @@
159 }; 141 };
160}; 142};
161 143
144&pinctrl {
145 nattis {
146 pinctrl_usba_vbus: usba_vbus {
147 atmel,pins = <AT91_PIOD 28 AT91_PERIPH_GPIO
148 AT91_PINCTRL_DEGLITCH>;
149 };
150
151 pinctrl_mmc0_cd: mmc0_cd {
152 atmel,pins = <AT91_PIOD 5 AT91_PERIPH_GPIO
153 AT91_PINCTRL_PULL_UP_DEGLITCH>;
154 };
155
156 pinctrl_lvds_prlud0: lvds_prlud0 {
157 atmel,pins = <AT91_PIOA 21 AT91_PERIPH_GPIO
158 (AT91_PINCTRL_OUTPUT |
159 AT91_PINCTRL_OUTPUT_VAL(0))>;
160 };
161
162 pinctrl_lvds_hipow0: lvds_hipow0 {
163 atmel,pins = <AT91_PIOA 23 AT91_PERIPH_GPIO
164 (AT91_PINCTRL_OUTPUT |
165 AT91_PINCTRL_OUTPUT_VAL(0))>;
166 };
167 };
168};
169
170&watchdog {
171 status = "okay";
172};
173
162&i2c0 { 174&i2c0 {
163 status = "okay"; 175 status = "okay";
164 176
@@ -195,14 +207,12 @@
195 207
196 hlcdc-display-controller { 208 hlcdc-display-controller {
197 pinctrl-names = "default"; 209 pinctrl-names = "default";
198 pinctrl-0 = <&pinctrl_lcd_base 210 pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;
199 &pinctrl_lcd_rgb565
200 &pinctrl_lcd_prlud0
201 &pinctrl_lcd_hipow0>;
202 211
203 port@0 { 212 port@0 {
204 hlcdc_output: endpoint { 213 hlcdc_output: endpoint {
205 remote-endpoint = <&lvds_encoder_input>; 214 remote-endpoint = <&lvds_encoder_input>;
215 bus-width = <16>;
206 }; 216 };
207 }; 217 };
208 }; 218 };
@@ -219,6 +229,7 @@
219 reg = <0>; 229 reg = <0>;
220 bus-width = <4>; 230 bus-width = <4>;
221 cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>; 231 cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
232 cd-inverted;
222 }; 233 };
223}; 234};
224 235
diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
index e86e0c00eb6b..363a43d77424 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
@@ -283,6 +283,13 @@
283 status = "okay"; 283 status = "okay";
284 }; 284 };
285 285
286 adc: adc@fc030000 {
287 vddana-supply = <&vddana>;
288 vref-supply = <&advref>;
289
290 status = "disabled";
291 };
292
286 pinctrl@fc038000 { 293 pinctrl@fc038000 {
287 294
288 pinctrl_can1_default: can1_default { 295 pinctrl_can1_default: can1_default {
@@ -549,4 +556,39 @@
549 linux,default-trigger = "heartbeat"; 556 linux,default-trigger = "heartbeat";
550 }; 557 };
551 }; 558 };
559
560 vddin_3v3: fixed-regulator-vddin_3v3 {
561 compatible = "regulator-fixed";
562
563 regulator-name = "VDDIN_3V3";
564 regulator-min-microvolt = <3300000>;
565 regulator-max-microvolt = <3300000>;
566 regulator-always-on;
567 regulator-boot-on;
568 status = "okay";
569 };
570
571 vddana: fixed-regulator-vddana {
572 compatible = "regulator-fixed";
573
574 regulator-name = "VDDANA";
575 regulator-min-microvolt = <3300000>;
576 regulator-max-microvolt = <3300000>;
577 regulator-always-on;
578 regulator-boot-on;
579 vin-supply = <&vddin_3v3>;
580 status = "okay";
581 };
582
583 advref: fixed-regulator-advref {
584 compatible = "regulator-fixed";
585
586 regulator-name = "advref";
587 regulator-min-microvolt = <3300000>;
588 regulator-max-microvolt = <3300000>;
589 regulator-always-on;
590 regulator-boot-on;
591 vin-supply = <&vddana>;
592 status = "okay";
593 };
552}; 594};
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index fcc85d70f36e..518e2b095ccf 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -281,6 +281,12 @@
281 status = "okay"; 281 status = "okay";
282 }; 282 };
283 283
284 i2s0: i2s@f8050000 {
285 pinctrl-names = "default";
286 pinctrl-0 = <&pinctrl_i2s0_default>;
287 status = "disabled"; /* conflict with can0 */
288 };
289
284 can0: can@f8054000 { 290 can0: can@f8054000 {
285 pinctrl-names = "default"; 291 pinctrl-names = "default";
286 pinctrl-0 = <&pinctrl_can0_default>; 292 pinctrl-0 = <&pinctrl_can0_default>;
@@ -424,6 +430,24 @@
424 bias-disable; 430 bias-disable;
425 }; 431 };
426 432
433 pinctrl_i2s0_default: i2s0_default {
434 pinmux = <PIN_PC1__I2SC0_CK>,
435 <PIN_PC2__I2SC0_MCK>,
436 <PIN_PC3__I2SC0_WS>,
437 <PIN_PC4__I2SC0_DI0>,
438 <PIN_PC5__I2SC0_DO0>;
439 bias-disable;
440 };
441
442 pinctrl_i2s1_default: i2s1_default {
443 pinmux = <PIN_PA15__I2SC1_CK>,
444 <PIN_PA14__I2SC1_MCK>,
445 <PIN_PA16__I2SC1_WS>,
446 <PIN_PA17__I2SC1_DI0>,
447 <PIN_PA18__I2SC1_DO0>;
448 bias-disable;
449 };
450
427 pinctrl_key_gpio_default: key_gpio_default { 451 pinctrl_key_gpio_default: key_gpio_default {
428 pinmux = <PIN_PB9__GPIO>; 452 pinmux = <PIN_PB9__GPIO>;
429 bias-pull-up; 453 bias-pull-up;
@@ -546,6 +570,12 @@
546 status = "okay"; 570 status = "okay";
547 }; 571 };
548 572
573 i2s1: i2s@fc04c000 {
574 pinctrl-names = "default";
575 pinctrl-0 = <&pinctrl_i2s1_default>;
576 status = "disabled"; /* conflict with spi0, sdmmc1 */
577 };
578
549 can1: can@fc050000 { 579 can1: can@fc050000 {
550 pinctrl-names = "default"; 580 pinctrl-names = "default";
551 pinctrl-0 = <&pinctrl_can1_default>; 581 pinctrl-0 = <&pinctrl_can1_default>;
diff --git a/arch/arm/boot/dts/at91-tse850-3.dts b/arch/arm/boot/dts/at91-tse850-3.dts
index 2fbec69d9cd6..fe8876eaf917 100644
--- a/arch/arm/boot/dts/at91-tse850-3.dts
+++ b/arch/arm/boot/dts/at91-tse850-3.dts
@@ -16,25 +16,6 @@
16 compatible = "axentia,tse850v3", "axentia,linea", 16 compatible = "axentia,tse850v3", "axentia,linea",
17 "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; 17 "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
18 18
19 ahb {
20 apb {
21 pinctrl@fffff200 {
22 tse850 {
23 pinctrl_usba_vbus: usba-vbus {
24 atmel,pins =
25 <AT91_PIOC 31
26 AT91_PERIPH_GPIO
27 AT91_PINCTRL_DEGLITCH>;
28 };
29 };
30 };
31
32 watchdog@fffffe40 {
33 status = "okay";
34 };
35 };
36 };
37
38 sck: oscillator { 19 sck: oscillator {
39 compatible = "fixed-clock"; 20 compatible = "fixed-clock";
40 21
@@ -253,6 +234,19 @@
253 }; 234 };
254}; 235};
255 236
237&pinctrl {
238 tse850 {
239 pinctrl_usba_vbus: usba-vbus {
240 atmel,pins = <AT91_PIOC 31 AT91_PERIPH_GPIO
241 AT91_PINCTRL_DEGLITCH>;
242 };
243 };
244};
245
246&watchdog {
247 status = "okay";
248};
249
256&usart0 { 250&usart0 {
257 status = "okay"; 251 status = "okay";
258 252
diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts
index 1be9889a2b3a..430277291e02 100644
--- a/arch/arm/boot/dts/at91-vinco.dts
+++ b/arch/arm/boot/dts/at91-vinco.dts
@@ -128,7 +128,7 @@
128 i2c2: i2c@f8024000 { 128 i2c2: i2c@f8024000 {
129 status = "okay"; 129 status = "okay";
130 130
131 rtc1: rtc@64 { 131 rtc1: rtc@32 {
132 compatible = "epson,rx8900"; 132 compatible = "epson,rx8900";
133 reg = <0x32>; 133 reg = <0x32>;
134 }; 134 };
diff --git a/arch/arm/boot/dts/at91sam9260ek.dts b/arch/arm/boot/dts/at91sam9260ek.dts
index d2b865f60293..07d1b571e601 100644
--- a/arch/arm/boot/dts/at91sam9260ek.dts
+++ b/arch/arm/boot/dts/at91sam9260ek.dts
@@ -127,7 +127,7 @@
127 127
128 spi0: spi@fffc8000 { 128 spi0: spi@fffc8000 {
129 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>; 129 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
130 mtd_dataflash@0 { 130 mtd_dataflash@1 {
131 compatible = "atmel,at45", "atmel,dataflash"; 131 compatible = "atmel,at45", "atmel,dataflash";
132 spi-max-frequency = <50000000>; 132 spi-max-frequency = <50000000>;
133 reg = <1>; 133 reg = <1>;
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index a29fc0494076..a57f2d435dca 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -160,7 +160,7 @@
160 spi-max-frequency = <15000000>; 160 spi-max-frequency = <15000000>;
161 }; 161 };
162 162
163 tsc2046@0 { 163 tsc2046@2 {
164 reg = <2>; 164 reg = <2>;
165 compatible = "ti,ads7843"; 165 compatible = "ti,ads7843";
166 interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>; 166 interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index 71df3adfc7ca..ec1f17ab6753 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -109,7 +109,7 @@
109 109
110 spi0: spi@fffc8000 { 110 spi0: spi@fffc8000 {
111 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>; 111 cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
112 mtd_dataflash@0 { 112 mtd_dataflash@1 {
113 compatible = "atmel,at45", "atmel,dataflash"; 113 compatible = "atmel,at45", "atmel,dataflash";
114 spi-max-frequency = <50000000>; 114 spi-max-frequency = <50000000>;
115 reg = <1>; 115 reg = <1>;
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 1ee25a475be8..d16db1fa7e15 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -570,7 +570,7 @@
570 }; 570 };
571 }; 571 };
572 572
573 uart1 { 573 usart1 {
574 pinctrl_usart1: usart1-0 { 574 pinctrl_usart1: usart1-0 {
575 atmel,pins = 575 atmel,pins =
576 <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE 576 <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE
diff --git a/arch/arm/boot/dts/bcm-hr2.dtsi b/arch/arm/boot/dts/bcm-hr2.dtsi
index 3084a7c95733..e4d49731287f 100644
--- a/arch/arm/boot/dts/bcm-hr2.dtsi
+++ b/arch/arm/boot/dts/bcm-hr2.dtsi
@@ -216,7 +216,7 @@
216 reg = <0x33000 0x14>; 216 reg = <0x33000 0x14>;
217 }; 217 };
218 218
219 qspi: qspi@27200 { 219 qspi: spi@27200 {
220 compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"; 220 compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
221 reg = <0x027200 0x184>, 221 reg = <0x027200 0x184>,
222 <0x027000 0x124>, 222 <0x027000 0x124>,
diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 09ba85046322..2fd111d9d59c 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -273,7 +273,7 @@
273 brcm,nand-has-wp; 273 brcm,nand-has-wp;
274 }; 274 };
275 275
276 qspi: qspi@27200 { 276 qspi: spi@27200 {
277 compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi"; 277 compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
278 reg = <0x027200 0x184>, 278 reg = <0x027200 0x184>,
279 <0x027000 0x124>, 279 <0x027000 0x124>,
@@ -377,7 +377,36 @@
377 377
378 srab: srab@36000 { 378 srab: srab@36000 {
379 compatible = "brcm,nsp-srab"; 379 compatible = "brcm,nsp-srab";
380 reg = <0x36000 0x1000>; 380 reg = <0x36000 0x1000>,
381 <0x3f308 0x8>,
382 <0x3f410 0xc>;
383 reg-names = "srab", "mux_config", "sgmii";
384 interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
385 <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
386 <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
387 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
388 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
389 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
390 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
391 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
392 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
393 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
394 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
395 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
396 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
397 interrupt-names = "link_state_p0",
398 "link_state_p1",
399 "link_state_p2",
400 "link_state_p3",
401 "link_state_p4",
402 "link_state_p5",
403 "link_state_p7",
404 "link_state_p8",
405 "phy",
406 "ts",
407 "imp_sleep_timer_p5",
408 "imp_sleep_timer_p7",
409 "imp_sleep_timer_p8";
381 #address-cells = <1>; 410 #address-cells = <1>;
382 #size-cells = <0>; 411 #size-cells = <0>;
383 412
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
new file mode 100644
index 000000000000..6c8233a36d86
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts
@@ -0,0 +1,87 @@
1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3#include "bcm2837-rpi-cm3.dtsi"
4#include "bcm283x-rpi-usb-host.dtsi"
5
6/ {
7 compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
8 model = "Raspberry Pi Compute Module 3 IO board V3.0";
9};
10
11&gpio {
12 /*
13 * This is based on the official GPU firmware DT blob.
14 *
15 * Legend:
16 * "NC" = not connected (no rail from the SoC)
17 * "FOO" = GPIO line named "FOO" on the schematic
18 * "FOO_N" = GPIO line named "FOO" on schematic, active low
19 */
20 gpio-line-names = "GPIO0",
21 "GPIO1",
22 "GPIO2",
23 "GPIO3",
24 "GPIO4",
25 "GPIO5",
26 "GPIO6",
27 "GPIO7",
28 "GPIO8",
29 "GPIO9",
30 "GPIO10",
31 "GPIO11",
32 "GPIO12",
33 "GPIO13",
34 "GPIO14",
35 "GPIO15",
36 "GPIO16",
37 "GPIO17",
38 "GPIO18",
39 "GPIO19",
40 "GPIO20",
41 "GPIO21",
42 "GPIO22",
43 "GPIO23",
44 "GPIO24",
45 "GPIO25",
46 "GPIO26",
47 "GPIO27",
48 "GPIO28",
49 "GPIO29",
50 "GPIO30",
51 "GPIO31",
52 "GPIO32",
53 "GPIO33",
54 "GPIO34",
55 "GPIO35",
56 "GPIO36",
57 "GPIO37",
58 "GPIO38",
59 "GPIO39",
60 "GPIO40",
61 "GPIO41",
62 "GPIO42",
63 "GPIO43",
64 "GPIO44",
65 "GPIO45",
66 "GPIO46",
67 "GPIO47",
68 /* Used by eMMC */
69 "SD_CLK_R",
70 "SD_CMD_R",
71 "SD_DATA0_R",
72 "SD_DATA1_R",
73 "SD_DATA2_R",
74 "SD_DATA3_R";
75
76 pinctrl-0 = <&gpioout &alt0>;
77};
78
79&hdmi {
80 hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
81};
82
83&uart0 {
84 pinctrl-names = "default";
85 pinctrl-0 = <&uart0_gpio14>;
86 status = "okay";
87};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
new file mode 100644
index 000000000000..7b7ab6aea988
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
@@ -0,0 +1,52 @@
1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3#include "bcm2837.dtsi"
4#include "bcm2835-rpi.dtsi"
5
6/ {
7 memory {
8 reg = <0 0x40000000>;
9 };
10
11 reg_3v3: fixed-regulator {
12 compatible = "regulator-fixed";
13 regulator-name = "3V3";
14 regulator-min-microvolt = <3300000>;
15 regulator-max-microvolt = <3300000>;
16 regulator-always-on;
17 };
18
19 reg_1v8: fixed-regulator {
20 compatible = "regulator-fixed";
21 regulator-name = "1V8";
22 regulator-min-microvolt = <1800000>;
23 regulator-max-microvolt = <1800000>;
24 regulator-always-on;
25 };
26};
27
28&firmware {
29 expgpio: gpio {
30 compatible = "raspberrypi,firmware-gpio";
31 gpio-controller;
32 #gpio-cells = <2>;
33 gpio-line-names = "HDMI_HPD_N",
34 "EMMC_EN_N",
35 "NC",
36 "NC",
37 "NC",
38 "NC",
39 "NC",
40 "NC";
41 status = "okay";
42 };
43};
44
45&sdhost {
46 pinctrl-names = "default";
47 pinctrl-0 = <&sdhost_gpio48>;
48 bus-width = <4>;
49 vmmc-supply = <&reg_3v3>;
50 vqmmc-supply = <&reg_1v8>;
51 status = "okay";
52};
diff --git a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
index 9403da0990d0..70bece63f9a7 100644
--- a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
@@ -1,4 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/net/microchip-lan78xx.h>
3
2/ { 4/ {
3 aliases { 5 aliases {
4 ethernet0 = &ethernet; 6 ethernet0 = &ethernet;
@@ -21,6 +23,18 @@
21 ethernet: ethernet@1 { 23 ethernet: ethernet@1 {
22 compatible = "usb424,7800"; 24 compatible = "usb424,7800";
23 reg = <1>; 25 reg = <1>;
26
27 mdio {
28 #address-cells = <0x1>;
29 #size-cells = <0x0>;
30 eth_phy: ethernet-phy@1 {
31 reg = <1>;
32 microchip,led-modes = <
33 LAN78XX_LINK_1000_ACTIVITY
34 LAN78XX_LINK_10_100_ACTIVITY
35 >;
36 };
37 };
24 }; 38 };
25 }; 39 };
26 }; 40 };
diff --git a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
index 5f663f848db1..189cc3dcd6ef 100644
--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
@@ -94,6 +94,34 @@
94 94
95&spi_nor { 95&spi_nor {
96 status = "okay"; 96 status = "okay";
97
98 partitions {
99 compatible = "fixed-partitions";
100 #address-cells = <1>;
101 #size-cells = <1>;
102
103 boot@0 {
104 label = "boot";
105 reg = <0x000000 0x040000>;
106 read-only;
107 };
108
109 os-image@100000 {
110 label = "os-image";
111 reg = <0x040000 0x200000>;
112 compatible = "brcm,trx";
113 };
114
115 rootfs@240000 {
116 label = "rootfs";
117 reg = <0x240000 0xc00000>;
118 };
119
120 nvram@ff0000 {
121 label = "nvram";
122 reg = <0xff0000 0x010000>;
123 };
124 };
97}; 125};
98 126
99&usb2 { 127&usb2 {
diff --git a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
index 2033411240c7..4cb10f88a95e 100644
--- a/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
+++ b/arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
@@ -66,3 +66,34 @@
66&usb3_phy { 66&usb3_phy {
67 status = "okay"; 67 status = "okay";
68}; 68};
69
70&nandcs {
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 boot@0 {
77 label = "boot";
78 reg = <0x00000000 0x00080000>;
79 read-only;
80 };
81
82 nvram@80000 {
83 label = "nvram";
84 reg = <0x00080000 0x00180000>;
85 };
86
87 firmware@200000 {
88 label = "firmware";
89 reg = <0x00200000 0x07cc0000>;
90 compatible = "brcm,trx";
91 };
92
93 asus@7ec0000 {
94 label = "asus";
95 reg = <0x07ec0000 0x00140000>;
96 read-only;
97 };
98 };
99};
diff --git a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
index c7143a9daa1a..b527d2ff987e 100644
--- a/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
+++ b/arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
@@ -103,6 +103,34 @@
103 103
104&spi_nor { 104&spi_nor {
105 status = "okay"; 105 status = "okay";
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 boot@0 {
113 label = "boot";
114 reg = <0x000000 0x040000>;
115 read-only;
116 };
117
118 os-image@100000 {
119 label = "os-image";
120 reg = <0x040000 0x200000>;
121 compatible = "brcm,trx";
122 };
123
124 rootfs@240000 {
125 label = "rootfs";
126 reg = <0x240000 0xc00000>;
127 };
128
129 nvram@ff0000 {
130 label = "nvram";
131 reg = <0xff0000 0x010000>;
132 };
133 };
106}; 134};
107 135
108&usb3_phy { 136&usb3_phy {
diff --git a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
index e5a2d62daf92..925a7c9ce5b7 100644
--- a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
+++ b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
@@ -12,6 +12,10 @@
12 reg = <0>; 12 reg = <0>;
13 #address-cells = <1>; 13 #address-cells = <1>;
14 #size-cells = <1>; 14 #size-cells = <1>;
15
16 partitions {
17 compatible = "brcm,bcm947xx-cfe-partitions";
18 };
15 }; 19 };
16 }; 20 };
17}; 21};
diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
index bc607d11eef8..7a5c188c2676 100644
--- a/arch/arm/boot/dts/bcm5301x.dtsi
+++ b/arch/arm/boot/dts/bcm5301x.dtsi
@@ -475,8 +475,11 @@
475 compatible = "jedec,spi-nor"; 475 compatible = "jedec,spi-nor";
476 reg = <0>; 476 reg = <0>;
477 spi-max-frequency = <20000000>; 477 spi-max-frequency = <20000000>;
478 linux,part-probe = "ofpart", "bcm47xxpart";
479 status = "disabled"; 478 status = "disabled";
479
480 partitions {
481 compatible = "brcm,bcm947xx-cfe-partitions";
482 };
480 }; 483 };
481 }; 484 };
482 485
diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts
index ea3fc194f8f3..a53a2f629d74 100644
--- a/arch/arm/boot/dts/bcm958625hr.dts
+++ b/arch/arm/boot/dts/bcm958625hr.dts
@@ -58,6 +58,24 @@
58 open-source; 58 open-source;
59 priority = <200>; 59 priority = <200>;
60 }; 60 };
61
62 /* Hardware I2C block cannot do more than 63 bytes per transfer,
63 * which would prevent reading from a SFP's EEPROM (256 byte).
64 */
65 i2c1: i2c {
66 compatible = "i2c-gpio";
67 sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
68 scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
69 };
70
71 sfp: sfp {
72 compatible = "sff,sfp";
73 i2c-bus = <&i2c1>;
74 mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
75 los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
76 tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
77 tx-disable-gpios = <&gpioa 26 GPIO_ACTIVE_HIGH>;
78 };
61}; 79};
62 80
63&amac0 { 81&amac0 {
@@ -210,6 +228,14 @@
210 reg = <4>; 228 reg = <4>;
211 }; 229 };
212 230
231 port@5 {
232 label = "sfp";
233 phy-mode = "sgmii";
234 reg = <5>;
235 sfp = <&sfp>;
236 managed = "in-band-status";
237 };
238
213 port@8 { 239 port@8 {
214 ethernet = <&amac2>; 240 ethernet = <&amac2>;
215 label = "cpu"; 241 label = "cpu";
diff --git a/arch/arm/boot/dts/exynos3250-artik5.dtsi b/arch/arm/boot/dts/exynos3250-artik5.dtsi
index 620b50c19ead..7c22cbf6f3d4 100644
--- a/arch/arm/boot/dts/exynos3250-artik5.dtsi
+++ b/arch/arm/boot/dts/exynos3250-artik5.dtsi
@@ -69,6 +69,8 @@
69 compatible = "samsung,s2mps14-pmic"; 69 compatible = "samsung,s2mps14-pmic";
70 interrupt-parent = <&gpx3>; 70 interrupt-parent = <&gpx3>;
71 interrupts = <5 IRQ_TYPE_NONE>; 71 interrupts = <5 IRQ_TYPE_NONE>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&s2mps14_irq>;
72 reg = <0x66>; 74 reg = <0x66>;
73 75
74 s2mps14_osc: clocks { 76 s2mps14_osc: clocks {
@@ -350,6 +352,11 @@
350 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>; 352 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>;
351 samsung,pin-val = <1>; 353 samsung,pin-val = <1>;
352 }; 354 };
355
356 s2mps14_irq: s2mps14-irq {
357 samsung,pins = "gpx3-5";
358 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
359 };
353}; 360};
354 361
355&rtc { 362&rtc {
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts
index 2ab99f9f3d0a..dd9ec05eb0f7 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -151,6 +151,8 @@
151 reg = <0x66>; 151 reg = <0x66>;
152 interrupt-parent = <&gpx0>; 152 interrupt-parent = <&gpx0>;
153 interrupts = <4 IRQ_TYPE_NONE>, <3 IRQ_TYPE_NONE>; 153 interrupts = <4 IRQ_TYPE_NONE>, <3 IRQ_TYPE_NONE>;
154 pinctrl-names = "default";
155 pinctrl-0 = <&max8997_irq>;
154 156
155 max8997,pmic-buck1-dvs-voltage = <1350000>; 157 max8997,pmic-buck1-dvs-voltage = <1350000>;
156 max8997,pmic-buck2-dvs-voltage = <1100000>; 158 max8997,pmic-buck2-dvs-voltage = <1100000>;
@@ -288,6 +290,13 @@
288 }; 290 };
289}; 291};
290 292
293&pinctrl_1 {
294 max8997_irq: max8997-irq {
295 samsung,pins = "gpx0-3", "gpx0-4";
296 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
297 };
298};
299
291&sdhci_0 { 300&sdhci_0 {
292 bus-width = <4>; 301 bus-width = <4>;
293 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_cd>; 302 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_cd>;
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts
index 6f1d76cb7951..f9bbc6315cd9 100644
--- a/arch/arm/boot/dts/exynos4210-trats.dts
+++ b/arch/arm/boot/dts/exynos4210-trats.dts
@@ -385,6 +385,12 @@
385 regulator-max-microvolt = <1800000>; 385 regulator-max-microvolt = <1800000>;
386 }; 386 };
387 387
388 tflash_reg: LDO17 {
389 regulator-name = "VTF_2.8V";
390 regulator-min-microvolt = <2800000>;
391 regulator-max-microvolt = <2800000>;
392 };
393
388 vddq_reg: LDO21 { 394 vddq_reg: LDO21 {
389 regulator-name = "VDDQ_M1M2_1.2V"; 395 regulator-name = "VDDQ_M1M2_1.2V";
390 regulator-min-microvolt = <1200000>; 396 regulator-min-microvolt = <1200000>;
@@ -452,6 +458,15 @@
452 status = "okay"; 458 status = "okay";
453}; 459};
454 460
461&sdhci_2 {
462 bus-width = <4>;
463 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
464 pinctrl-names = "default";
465 vmmc-supply = <&tflash_reg>;
466 cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
467 status = "okay";
468};
469
455&serial_0 { 470&serial_0 {
456 status = "okay"; 471 status = "okay";
457}; 472};
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index 4e6ff97e1ec4..5c3d98654f13 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -310,6 +310,9 @@
310 310
311 pmic@66 { 311 pmic@66 {
312 compatible = "national,lp3974"; 312 compatible = "national,lp3974";
313 interrupts-extended = <&gpx0 7 0>, <&gpx2 7 0>;
314 pinctrl-names = "default";
315 pinctrl-0 = <&lp3974_irq>;
313 reg = <0x66>; 316 reg = <0x66>;
314 317
315 max8998,pmic-buck1-default-dvs-idx = <0>; 318 max8998,pmic-buck1-default-dvs-idx = <0>;
@@ -503,6 +506,11 @@
503}; 506};
504 507
505&pinctrl_1 { 508&pinctrl_1 {
509 lp3974_irq: lp3974-irq {
510 samsung,pins = "gpx0-7", "gpx2-7";
511 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
512 };
513
506 hdmi_hpd: hdmi-hpd { 514 hdmi_hpd: hdmi-hpd {
507 samsung,pins = "gpx3-7"; 515 samsung,pins = "gpx3-7";
508 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 516 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
@@ -537,8 +545,7 @@
537 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>; 545 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
538 pinctrl-names = "default"; 546 pinctrl-names = "default";
539 vmmc-supply = <&ldo5_reg>; 547 vmmc-supply = <&ldo5_reg>;
540 cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>; 548 cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
541 cd-inverted;
542 status = "okay"; 549 status = "okay";
543}; 550};
544 551
diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi
index c0476c290977..aed2f2e2b0d1 100644
--- a/arch/arm/boot/dts/exynos4412-midas.dtsi
+++ b/arch/arm/boot/dts/exynos4412-midas.dtsi
@@ -1269,8 +1269,7 @@
1269 1269
1270&sdhci_2 { 1270&sdhci_2 {
1271 bus-width = <4>; 1271 bus-width = <4>;
1272 cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>; 1272 cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
1273 cd-inverted;
1274 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>; 1273 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
1275 pinctrl-names = "default"; 1274 pinctrl-names = "default";
1276 vmmc-supply = <&ldo21_reg>; 1275 vmmc-supply = <&ldo21_reg>;
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index a09e46c9dbc0..2caa3132f34e 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -539,8 +539,7 @@
539 pinctrl-names = "default"; 539 pinctrl-names = "default";
540 vmmc-supply = <&ldo21_reg>; 540 vmmc-supply = <&ldo21_reg>;
541 vqmmc-supply = <&ldo4_reg>; 541 vqmmc-supply = <&ldo4_reg>;
542 cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>; 542 cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
543 cd-inverted;
544 status = "okay"; 543 status = "okay";
545}; 544};
546 545
diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts b/arch/arm/boot/dts/exynos5250-arndale.dts
index 7a8a5c55701a..7d1f2dc59038 100644
--- a/arch/arm/boot/dts/exynos5250-arndale.dts
+++ b/arch/arm/boot/dts/exynos5250-arndale.dts
@@ -71,6 +71,17 @@
71 }; 71 };
72 }; 72 };
73 73
74 panel: panel {
75 compatible = "boe,hv070wsa-100";
76 power-supply = <&vcc_3v3_reg>;
77 enable-gpios = <&gpd1 3 GPIO_ACTIVE_HIGH>;
78 port {
79 panel_ep: endpoint {
80 remote-endpoint = <&bridge_out_ep>;
81 };
82 };
83 };
84
74 regulators { 85 regulators {
75 compatible = "simple-bus"; 86 compatible = "simple-bus";
76 #address-cells = <1>; 87 #address-cells = <1>;
@@ -97,6 +108,30 @@
97 reg = <2>; 108 reg = <2>;
98 regulator-name = "hdmi-en"; 109 regulator-name = "hdmi-en";
99 }; 110 };
111
112 vcc_1v2_reg: regulator@3 {
113 compatible = "regulator-fixed";
114 reg = <3>;
115 regulator-name = "VCC_1V2";
116 regulator-min-microvolt = <1200000>;
117 regulator-max-microvolt = <1200000>;
118 };
119
120 vcc_1v8_reg: regulator@4 {
121 compatible = "regulator-fixed";
122 reg = <4>;
123 regulator-name = "VCC_1V8";
124 regulator-min-microvolt = <1800000>;
125 regulator-max-microvolt = <1800000>;
126 };
127
128 vcc_3v3_reg: regulator@5 {
129 compatible = "regulator-fixed";
130 reg = <5>;
131 regulator-name = "VCC_3V3";
132 regulator-min-microvolt = <3300000>;
133 regulator-max-microvolt = <3300000>;
134 };
100 }; 135 };
101 136
102 fixed-rate-clocks { 137 fixed-rate-clocks {
@@ -119,6 +154,32 @@
119 cpu0-supply = <&buck2_reg>; 154 cpu0-supply = <&buck2_reg>;
120}; 155};
121 156
157&dsi_0 {
158 vddcore-supply = <&ldo8_reg>;
159 vddio-supply = <&ldo10_reg>;
160 samsung,pll-clock-frequency = <24000000>;
161 samsung,burst-clock-frequency = <320000000>;
162 samsung,esc-clock-frequency = <10000000>;
163 status = "okay";
164
165 bridge@0 {
166 reg = <0>;
167 compatible = "toshiba,tc358764";
168 vddc-supply = <&vcc_1v2_reg>;
169 vddio-supply = <&vcc_1v8_reg>;
170 vddlvds-supply = <&vcc_3v3_reg>;
171 reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
172 #address-cells = <1>;
173 #size-cells = <0>;
174 port@1 {
175 reg = <1>;
176 bridge_out_ep: endpoint {
177 remote-endpoint = <&panel_ep>;
178 };
179 };
180 };
181};
182
122&dp { 183&dp {
123 status = "okay"; 184 status = "okay";
124 samsung,color-space = <0>; 185 samsung,color-space = <0>;
@@ -149,9 +210,11 @@
149}; 210};
150 211
151&hdmi { 212&hdmi {
213 pinctrl-names = "default";
214 pinctrl-0 = <&hdmi_hpd>;
152 status = "okay"; 215 status = "okay";
153 ddc = <&i2c_2>; 216 ddc = <&i2c_ddc>;
154 hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>; 217 hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
155 vdd_osc-supply = <&ldo10_reg>; 218 vdd_osc-supply = <&ldo10_reg>;
156 vdd_pll-supply = <&ldo8_reg>; 219 vdd_pll-supply = <&ldo8_reg>;
157 vdd-supply = <&ldo8_reg>; 220 vdd-supply = <&ldo8_reg>;
@@ -168,6 +231,8 @@
168 reg = <0x66>; 231 reg = <0x66>;
169 interrupt-parent = <&gpx3>; 232 interrupt-parent = <&gpx3>;
170 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 233 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
234 pinctrl-names = "default";
235 pinctrl-0 = <&s5m8767_irq>;
171 236
172 vinb1-supply = <&main_dc_reg>; 237 vinb1-supply = <&main_dc_reg>;
173 vinb2-supply = <&main_dc_reg>; 238 vinb2-supply = <&main_dc_reg>;
@@ -452,13 +517,6 @@
452 }; 517 };
453}; 518};
454 519
455&i2c_2 {
456 status = "okay";
457 /* used by HDMI DDC */
458 samsung,i2c-sda-delay = <100>;
459 samsung,i2c-max-bus-freq = <66000>;
460};
461
462&i2c_3 { 520&i2c_3 {
463 status = "okay"; 521 status = "okay";
464 522
@@ -535,6 +593,13 @@
535 cap-sd-highspeed; 593 cap-sd-highspeed;
536}; 594};
537 595
596&pinctrl_0 {
597 s5m8767_irq: s5m8767-irq {
598 samsung,pins = "gpx3-2";
599 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
600 };
601};
602
538&rtc { 603&rtc {
539 status = "okay"; 604 status = "okay";
540}; 605};
@@ -547,3 +612,22 @@
547 status = "okay"; 612 status = "okay";
548 samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>; 613 samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>;
549}; 614};
615
616&soc {
617 /*
618 * For unknown reasons HDMI-DDC does not work with Exynos I2C
619 * controllers. Lets use software I2C over GPIO pins as a workaround.
620 */
621 i2c_ddc: i2c-gpio {
622 pinctrl-names = "default";
623 pinctrl-0 = <&i2c2_gpio_bus>;
624 status = "okay";
625 compatible = "i2c-gpio";
626 gpios = <&gpa0 6 0 /* sda */
627 &gpa0 7 0 /* scl */
628 >;
629 i2c-gpio,delay-us = <2>;
630 #address-cells = <1>;
631 #size-cells = <0>;
632 };
633};
diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
index 6ff6dea29d44..d31a68672bfa 100644
--- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
@@ -225,6 +225,12 @@
225 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 225 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
226 }; 226 };
227 227
228 i2c2_gpio_bus: i2c2-gpio-bus {
229 samsung,pins = "gpa0-6", "gpa0-7";
230 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
231 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
232 };
233
228 uart2_data: uart2-data { 234 uart2_data: uart2-data {
229 samsung,pins = "gpa1-0", "gpa1-1"; 235 samsung,pins = "gpa1-0", "gpa1-1";
230 samsung,pin-function = <EXYNOS_PIN_FUNC_2>; 236 samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
@@ -593,6 +599,11 @@
593 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>; 599 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
594 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>; 600 samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
595 }; 601 };
602
603 hdmi_hpd: hdmi-hpd {
604 samsung,pins = "gpx3-7";
605 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
606 };
596}; 607};
597 608
598&pinctrl_1 { 609&pinctrl_1 {
diff --git a/arch/arm/boot/dts/exynos5250-snow-rev5.dts b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
index 0348b1c49a69..7cbfc6f1f4b8 100644
--- a/arch/arm/boot/dts/exynos5250-snow-rev5.dts
+++ b/arch/arm/boot/dts/exynos5250-snow-rev5.dts
@@ -20,6 +20,14 @@
20 20
21 samsung,model = "Snow-I2S-MAX98090"; 21 samsung,model = "Snow-I2S-MAX98090";
22 samsung,audio-codec = <&max98090>; 22 samsung,audio-codec = <&max98090>;
23
24 cpu {
25 sound-dai = <&i2s0 0>;
26 };
27
28 codec {
29 sound-dai = <&max98090 0>, <&hdmi>;
30 };
23 }; 31 };
24}; 32};
25 33
@@ -31,6 +39,9 @@
31 interrupt-parent = <&gpx0>; 39 interrupt-parent = <&gpx0>;
32 pinctrl-names = "default"; 40 pinctrl-names = "default";
33 pinctrl-0 = <&max98090_irq>; 41 pinctrl-0 = <&max98090_irq>;
42 clocks = <&pmu_system_controller 0>;
43 clock-names = "mclk";
44 #sound-dai-cells = <1>;
34 }; 45 };
35}; 46};
36 47
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index da163a40af15..5044f754e6e5 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -54,62 +54,109 @@
54 device_type = "cpu"; 54 device_type = "cpu";
55 compatible = "arm,cortex-a15"; 55 compatible = "arm,cortex-a15";
56 reg = <0>; 56 reg = <0>;
57 clock-frequency = <1700000000>;
58 clocks = <&clock CLK_ARM_CLK>; 57 clocks = <&clock CLK_ARM_CLK>;
59 clock-names = "cpu"; 58 clock-names = "cpu";
60 clock-latency = <140000>; 59 operating-points-v2 = <&cpu0_opp_table>;
61
62 operating-points = <
63 1700000 1300000
64 1600000 1250000
65 1500000 1225000
66 1400000 1200000
67 1300000 1150000
68 1200000 1125000
69 1100000 1100000
70 1000000 1075000
71 900000 1050000
72 800000 1025000
73 700000 1012500
74 600000 1000000
75 500000 975000
76 400000 950000
77 300000 937500
78 200000 925000
79 >;
80 #cooling-cells = <2>; /* min followed by max */ 60 #cooling-cells = <2>; /* min followed by max */
81 }; 61 };
82 cpu@1 { 62 cpu@1 {
83 device_type = "cpu"; 63 device_type = "cpu";
84 compatible = "arm,cortex-a15"; 64 compatible = "arm,cortex-a15";
85 reg = <1>; 65 reg = <1>;
86 clock-frequency = <1700000000>;
87 clocks = <&clock CLK_ARM_CLK>; 66 clocks = <&clock CLK_ARM_CLK>;
88 clock-names = "cpu"; 67 clock-names = "cpu";
89 clock-latency = <140000>; 68 operating-points-v2 = <&cpu0_opp_table>;
90
91 operating-points = <
92 1700000 1300000
93 1600000 1250000
94 1500000 1225000
95 1400000 1200000
96 1300000 1150000
97 1200000 1125000
98 1100000 1100000
99 1000000 1075000
100 900000 1050000
101 800000 1025000
102 700000 1012500
103 600000 1000000
104 500000 975000
105 400000 950000
106 300000 937500
107 200000 925000
108 >;
109 #cooling-cells = <2>; /* min followed by max */ 69 #cooling-cells = <2>; /* min followed by max */
110 }; 70 };
111 }; 71 };
112 72
73 cpu0_opp_table: opp_table0 {
74 compatible = "operating-points-v2";
75 opp-shared;
76
77 opp-200000000 {
78 opp-hz = /bits/ 64 <200000000>;
79 opp-microvolt = <925000>;
80 clock-latency-ns = <140000>;
81 };
82 opp-300000000 {
83 opp-hz = /bits/ 64 <300000000>;
84 opp-microvolt = <937500>;
85 clock-latency-ns = <140000>;
86 };
87 opp-400000000 {
88 opp-hz = /bits/ 64 <400000000>;
89 opp-microvolt = <950000>;
90 clock-latency-ns = <140000>;
91 };
92 opp-500000000 {
93 opp-hz = /bits/ 64 <500000000>;
94 opp-microvolt = <975000>;
95 clock-latency-ns = <140000>;
96 };
97 opp-600000000 {
98 opp-hz = /bits/ 64 <600000000>;
99 opp-microvolt = <1000000>;
100 clock-latency-ns = <140000>;
101 };
102 opp-700000000 {
103 opp-hz = /bits/ 64 <700000000>;
104 opp-microvolt = <1012500>;
105 clock-latency-ns = <140000>;
106 };
107 opp-800000000 {
108 opp-hz = /bits/ 64 <800000000>;
109 opp-microvolt = <1025000>;
110 clock-latency-ns = <140000>;
111 };
112 opp-900000000 {
113 opp-hz = /bits/ 64 <900000000>;
114 opp-microvolt = <1050000>;
115 clock-latency-ns = <140000>;
116 };
117 opp-1000000000 {
118 opp-hz = /bits/ 64 <1000000000>;
119 opp-microvolt = <1075000>;
120 clock-latency-ns = <140000>;
121 opp-suspend;
122 };
123 opp-1100000000 {
124 opp-hz = /bits/ 64 <1100000000>;
125 opp-microvolt = <1100000>;
126 clock-latency-ns = <140000>;
127 };
128 opp-1200000000 {
129 opp-hz = /bits/ 64 <1200000000>;
130 opp-microvolt = <1125000>;
131 clock-latency-ns = <140000>;
132 };
133 opp-1300000000 {
134 opp-hz = /bits/ 64 <1300000000>;
135 opp-microvolt = <1150000>;
136 clock-latency-ns = <140000>;
137 };
138 opp-1400000000 {
139 opp-hz = /bits/ 64 <1400000000>;
140 opp-microvolt = <1200000>;
141 clock-latency-ns = <140000>;
142 };
143 opp-1500000000 {
144 opp-hz = /bits/ 64 <1500000000>;
145 opp-microvolt = <1225000>;
146 clock-latency-ns = <140000>;
147 };
148 opp-1600000000 {
149 opp-hz = /bits/ 64 <1600000000>;
150 opp-microvolt = <1250000>;
151 clock-latency-ns = <140000>;
152 };
153 opp-1700000000 {
154 opp-hz = /bits/ 64 <1700000000>;
155 opp-microvolt = <1300000>;
156 clock-latency-ns = <140000>;
157 };
158 };
159
113 soc: soc { 160 soc: soc {
114 sysram@2020000 { 161 sysram@2020000 {
115 compatible = "mmio-sram"; 162 compatible = "mmio-sram";
@@ -756,6 +803,27 @@
756 #phy-cells = <0>; 803 #phy-cells = <0>;
757 }; 804 };
758 805
806 mipi_phy: video-phy@10040710 {
807 compatible = "samsung,s5pv210-mipi-video-phy";
808 reg = <0x10040710 0x100>;
809 #phy-cells = <1>;
810 syscon = <&pmu_system_controller>;
811 };
812
813 dsi_0: dsi@14500000 {
814 compatible = "samsung,exynos4210-mipi-dsi";
815 reg = <0x14500000 0x10000>;
816 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
817 samsung,power-domain = <&pd_disp1>;
818 phys = <&mipi_phy 3>;
819 phy-names = "dsim";
820 clocks = <&clock CLK_DSIM0>, <&clock CLK_SCLK_MIPI1>;
821 clock-names = "bus_clk", "sclk_mipi";
822 status = "disabled";
823 #address-cells = <1>;
824 #size-cells = <0>;
825 };
826
759 adc: adc@12d10000 { 827 adc: adc@12d10000 {
760 compatible = "samsung,exynos-adc-v1"; 828 compatible = "samsung,exynos-adc-v1";
761 reg = <0x12D10000 0x100>; 829 reg = <0x12D10000 0x100>;
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 57c2332bf282..f78db6809cca 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -153,7 +153,7 @@
153 153
154&clock_audss { 154&clock_audss {
155 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>; 155 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
156 assigned-clock-parents = <&clock CLK_FOUT_EPLL>; 156 assigned-clock-parents = <&clock CLK_MAU_EPLL>;
157}; 157};
158 158
159&cpu0 { 159&cpu0 {
@@ -312,6 +312,7 @@
312 regulator-name = "vdd_1v35"; 312 regulator-name = "vdd_1v35";
313 regulator-min-microvolt = <1350000>; 313 regulator-min-microvolt = <1350000>;
314 regulator-max-microvolt = <1350000>; 314 regulator-max-microvolt = <1350000>;
315 regulator-always-on;
315 regulator-boot-on; 316 regulator-boot-on;
316 regulator-state-mem { 317 regulator-state-mem {
317 regulator-on-in-suspend; 318 regulator-on-in-suspend;
@@ -333,6 +334,7 @@
333 regulator-name = "vdd_2v"; 334 regulator-name = "vdd_2v";
334 regulator-min-microvolt = <2000000>; 335 regulator-min-microvolt = <2000000>;
335 regulator-max-microvolt = <2000000>; 336 regulator-max-microvolt = <2000000>;
337 regulator-always-on;
336 regulator-boot-on; 338 regulator-boot-on;
337 regulator-state-mem { 339 regulator-state-mem {
338 regulator-on-in-suspend; 340 regulator-on-in-suspend;
@@ -343,6 +345,7 @@
343 regulator-name = "vdd_1v8"; 345 regulator-name = "vdd_1v8";
344 regulator-min-microvolt = <1800000>; 346 regulator-min-microvolt = <1800000>;
345 regulator-max-microvolt = <1800000>; 347 regulator-max-microvolt = <1800000>;
348 regulator-always-on;
346 regulator-boot-on; 349 regulator-boot-on;
347 regulator-state-mem { 350 regulator-state-mem {
348 regulator-on-in-suspend; 351 regulator-on-in-suspend;
diff --git a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
index 2f4f40882dab..2fac4baf1eb4 100644
--- a/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroid-core.dtsi
@@ -154,6 +154,13 @@
154 regulator-always-on; 154 regulator-always-on;
155 }; 155 };
156 156
157 ldo2_reg: LDO2 {
158 regulator-name = "vdd_ldo2";
159 regulator-min-microvolt = <1800000>;
160 regulator-max-microvolt = <1800000>;
161 regulator-always-on;
162 };
163
157 ldo3_reg: LDO3 { 164 ldo3_reg: LDO3 {
158 regulator-name = "vddq_mmc0"; 165 regulator-name = "vddq_mmc0";
159 regulator-min-microvolt = <1800000>; 166 regulator-min-microvolt = <1800000>;
@@ -216,10 +223,10 @@
216 }; 223 };
217 224
218 ldo12_reg: LDO12 { 225 ldo12_reg: LDO12 {
226 /* Unused */
219 regulator-name = "vdd_ldo12"; 227 regulator-name = "vdd_ldo12";
220 regulator-min-microvolt = <1800000>; 228 regulator-min-microvolt = <800000>;
221 regulator-max-microvolt = <1800000>; 229 regulator-max-microvolt = <2375000>;
222 regulator-always-on;
223 }; 230 };
224 231
225 ldo13_reg: LDO13 { 232 ldo13_reg: LDO13 {
@@ -228,6 +235,13 @@
228 regulator-max-microvolt = <2800000>; 235 regulator-max-microvolt = <2800000>;
229 }; 236 };
230 237
238 ldo14_reg: LDO14 {
239 /* Unused */
240 regulator-name = "vdd_ldo14";
241 regulator-min-microvolt = <800000>;
242 regulator-max-microvolt = <3950000>;
243 };
244
231 ldo15_reg: LDO15 { 245 ldo15_reg: LDO15 {
232 regulator-name = "vdd_ldo15"; 246 regulator-name = "vdd_ldo15";
233 regulator-min-microvolt = <3300000>; 247 regulator-min-microvolt = <3300000>;
@@ -236,10 +250,10 @@
236 }; 250 };
237 251
238 ldo16_reg: LDO16 { 252 ldo16_reg: LDO16 {
253 /* Unused */
239 regulator-name = "vdd_ldo16"; 254 regulator-name = "vdd_ldo16";
240 regulator-min-microvolt = <2200000>; 255 regulator-min-microvolt = <800000>;
241 regulator-max-microvolt = <2200000>; 256 regulator-max-microvolt = <3950000>;
242 regulator-always-on;
243 }; 257 };
244 258
245 ldo17_reg: LDO17 { 259 ldo17_reg: LDO17 {
@@ -261,20 +275,139 @@
261 regulator-max-microvolt = <2800000>; 275 regulator-max-microvolt = <2800000>;
262 }; 276 };
263 277
264 ldo24_reg: LDO24 { 278 ldo20_reg: LDO20 {
265 regulator-name = "tsp_io"; 279 /* Unused */
266 regulator-min-microvolt = <2800000>; 280 regulator-name = "vdd_ldo20";
267 regulator-max-microvolt = <2800000>; 281 regulator-min-microvolt = <800000>;
282 regulator-max-microvolt = <3950000>;
283 };
284
285 ldo21_reg: LDO21 {
286 /* Unused */
287 regulator-name = "vdd_ldo21";
288 regulator-min-microvolt = <800000>;
289 regulator-max-microvolt = <3950000>;
290 };
291
292 ldo22_reg: LDO22 {
293 /* Unused */
294 regulator-name = "vdd_ldo22";
295 regulator-min-microvolt = <800000>;
296 regulator-max-microvolt = <2375000>;
297 };
298
299 ldo23_reg: LDO23 {
300 regulator-name = "vdd_mifs";
301 regulator-min-microvolt = <1100000>;
302 regulator-max-microvolt = <1100000>;
268 regulator-always-on; 303 regulator-always-on;
269 }; 304 };
270 305
306 ldo24_reg: LDO24 {
307 /* Unused */
308 regulator-name = "vdd_ldo24";
309 regulator-min-microvolt = <800000>;
310 regulator-max-microvolt = <3950000>;
311 };
312
313 ldo25_reg: LDO25 {
314 /* Unused */
315 regulator-name = "vdd_ldo25";
316 regulator-min-microvolt = <800000>;
317 regulator-max-microvolt = <3950000>;
318 };
319
271 ldo26_reg: LDO26 { 320 ldo26_reg: LDO26 {
321 /* Used on XU3, XU3-Lite and XU4 */
272 regulator-name = "vdd_ldo26"; 322 regulator-name = "vdd_ldo26";
273 regulator-min-microvolt = <3000000>; 323 regulator-min-microvolt = <800000>;
274 regulator-max-microvolt = <3000000>; 324 regulator-max-microvolt = <3950000>;
325 };
326
327 ldo27_reg: LDO27 {
328 regulator-name = "vdd_g3ds";
329 regulator-min-microvolt = <1000000>;
330 regulator-max-microvolt = <1000000>;
275 regulator-always-on; 331 regulator-always-on;
276 }; 332 };
277 333
334 ldo28_reg: LDO28 {
335 /* Used on XU3 */
336 regulator-name = "vdd_ldo28";
337 regulator-min-microvolt = <800000>;
338 regulator-max-microvolt = <3950000>;
339 };
340
341 ldo29_reg: LDO29 {
342 /* Unused */
343 regulator-name = "vdd_ldo29";
344 regulator-min-microvolt = <800000>;
345 regulator-max-microvolt = <3950000>;
346 };
347
348 ldo30_reg: LDO30 {
349 /* Unused */
350 regulator-name = "vdd_ldo30";
351 regulator-min-microvolt = <800000>;
352 regulator-max-microvolt = <3950000>;
353 };
354
355 ldo31_reg: LDO31 {
356 /* Unused */
357 regulator-name = "vdd_ldo31";
358 regulator-min-microvolt = <800000>;
359 regulator-max-microvolt = <3950000>;
360 };
361
362 ldo32_reg: LDO32 {
363 /* Unused */
364 regulator-name = "vdd_ldo32";
365 regulator-min-microvolt = <800000>;
366 regulator-max-microvolt = <3950000>;
367 };
368
369 ldo33_reg: LDO33 {
370 /* Unused */
371 regulator-name = "vdd_ldo33";
372 regulator-min-microvolt = <800000>;
373 regulator-max-microvolt = <3950000>;
374 };
375
376 ldo34_reg: LDO34 {
377 /* Unused */
378 regulator-name = "vdd_ldo34";
379 regulator-min-microvolt = <800000>;
380 regulator-max-microvolt = <3950000>;
381 };
382
383 ldo35_reg: LDO35 {
384 /* Unused */
385 regulator-name = "vdd_ldo35";
386 regulator-min-microvolt = <800000>;
387 regulator-max-microvolt = <2375000>;
388 };
389
390 ldo36_reg: LDO36 {
391 /* Unused */
392 regulator-name = "vdd_ldo36";
393 regulator-min-microvolt = <800000>;
394 regulator-max-microvolt = <3950000>;
395 };
396
397 ldo37_reg: LDO37 {
398 /* Unused */
399 regulator-name = "vdd_ldo37";
400 regulator-min-microvolt = <800000>;
401 regulator-max-microvolt = <3950000>;
402 };
403
404 ldo38_reg: LDO38 {
405 /* Unused */
406 regulator-name = "vdd_ldo38";
407 regulator-min-microvolt = <800000>;
408 regulator-max-microvolt = <3950000>;
409 };
410
278 buck1_reg: BUCK1 { 411 buck1_reg: BUCK1 {
279 regulator-name = "vdd_mif"; 412 regulator-name = "vdd_mif";
280 regulator-min-microvolt = <800000>; 413 regulator-min-microvolt = <800000>;
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 96e281c0a118..e522edb2bb82 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -367,6 +367,12 @@
367 status = "okay"; 367 status = "okay";
368}; 368};
369 369
370&ldo26_reg {
371 regulator-min-microvolt = <3000000>;
372 regulator-max-microvolt = <3000000>;
373 regulator-always-on;
374};
375
370&mixer { 376&mixer {
371 status = "okay"; 377 status = "okay";
372}; 378};
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index 0322f281912c..db0bc17a667b 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -49,6 +49,12 @@
49 }; 49 };
50}; 50};
51 51
52&ldo28_reg {
53 regulator-name = "dp_p3v3";
54 regulator-min-microvolt = <3300000>;
55 regulator-max-microvolt = <3300000>;
56};
57
52&pwm { 58&pwm {
53 /* 59 /*
54 * PWM 0 -- fan 60 * PWM 0 -- fan
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index d80ab9085da1..e0f470fe54c8 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -153,7 +153,7 @@
153 153
154&clock_audss { 154&clock_audss {
155 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>; 155 assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
156 assigned-clock-parents = <&clock CLK_FOUT_EPLL>; 156 assigned-clock-parents = <&clock CLK_MAU_EPLL>;
157}; 157};
158 158
159&cpu0 { 159&cpu0 {
@@ -312,6 +312,7 @@
312 regulator-name = "vdd_1v35"; 312 regulator-name = "vdd_1v35";
313 regulator-min-microvolt = <1350000>; 313 regulator-min-microvolt = <1350000>;
314 regulator-max-microvolt = <1350000>; 314 regulator-max-microvolt = <1350000>;
315 regulator-always-on;
315 regulator-boot-on; 316 regulator-boot-on;
316 regulator-state-mem { 317 regulator-state-mem {
317 regulator-on-in-suspend; 318 regulator-on-in-suspend;
@@ -333,6 +334,7 @@
333 regulator-name = "vdd_2v"; 334 regulator-name = "vdd_2v";
334 regulator-min-microvolt = <2000000>; 335 regulator-min-microvolt = <2000000>;
335 regulator-max-microvolt = <2000000>; 336 regulator-max-microvolt = <2000000>;
337 regulator-always-on;
336 regulator-boot-on; 338 regulator-boot-on;
337 regulator-state-mem { 339 regulator-state-mem {
338 regulator-on-in-suspend; 340 regulator-on-in-suspend;
@@ -343,6 +345,7 @@
343 regulator-name = "vdd_1v8"; 345 regulator-name = "vdd_1v8";
344 regulator-min-microvolt = <1800000>; 346 regulator-min-microvolt = <1800000>;
345 regulator-max-microvolt = <1800000>; 347 regulator-max-microvolt = <1800000>;
348 regulator-always-on;
346 regulator-boot-on; 349 regulator-boot-on;
347 regulator-state-mem { 350 regulator-state-mem {
348 regulator-on-in-suspend; 351 regulator-on-in-suspend;
diff --git a/arch/arm/boot/dts/hip04.dtsi b/arch/arm/boot/dts/hip04.dtsi
index 44044f275115..0f917b272ff3 100644
--- a/arch/arm/boot/dts/hip04.dtsi
+++ b/arch/arm/boot/dts/hip04.dtsi
@@ -277,10 +277,11 @@
277 277
278 clocks = <&clk_375m>; 278 clocks = <&clk_375m>;
279 clock-names = "apb_pclk"; 279 clock-names = "apb_pclk";
280 port { 280 in-ports {
281 etb0_in_port: endpoint@0 { 281 port {
282 slave-mode; 282 etb0_in_port: endpoint@0 {
283 remote-endpoint = <&replicator0_out_port0>; 283 remote-endpoint = <&replicator0_out_port0>;
284 };
284 }; 285 };
285 }; 286 };
286 }; 287 };
@@ -291,10 +292,11 @@
291 292
292 clocks = <&clk_375m>; 293 clocks = <&clk_375m>;
293 clock-names = "apb_pclk"; 294 clock-names = "apb_pclk";
294 port { 295 in-ports {
295 etb1_in_port: endpoint@0 { 296 port {
296 slave-mode; 297 etb1_in_port: endpoint@0 {
297 remote-endpoint = <&replicator1_out_port0>; 298 remote-endpoint = <&replicator1_out_port0>;
299 };
298 }; 300 };
299 }; 301 };
300 }; 302 };
@@ -305,10 +307,11 @@
305 307
306 clocks = <&clk_375m>; 308 clocks = <&clk_375m>;
307 clock-names = "apb_pclk"; 309 clock-names = "apb_pclk";
308 port { 310 in-ports {
309 etb2_in_port: endpoint@0 { 311 port {
310 slave-mode; 312 etb2_in_port: endpoint@0 {
311 remote-endpoint = <&replicator2_out_port0>; 313 remote-endpoint = <&replicator2_out_port0>;
314 };
312 }; 315 };
313 }; 316 };
314 }; 317 };
@@ -319,10 +322,11 @@
319 322
320 clocks = <&clk_375m>; 323 clocks = <&clk_375m>;
321 clock-names = "apb_pclk"; 324 clock-names = "apb_pclk";
322 port { 325 in-ports {
323 etb3_in_port: endpoint@0 { 326 port {
324 slave-mode; 327 etb3_in_port: endpoint@0 {
325 remote-endpoint = <&replicator3_out_port0>; 328 remote-endpoint = <&replicator3_out_port0>;
329 };
326 }; 330 };
327 }; 331 };
328 }; 332 };
@@ -333,10 +337,11 @@
333 337
334 clocks = <&clk_375m>; 338 clocks = <&clk_375m>;
335 clock-names = "apb_pclk"; 339 clock-names = "apb_pclk";
336 port { 340 in-ports {
337 tpiu_in_port: endpoint@0 { 341 port {
338 slave-mode; 342 tpiu_in_port: endpoint@0 {
339 remote-endpoint = <&funnel4_out_port0>; 343 remote-endpoint = <&funnel4_out_port0>;
344 };
340 }; 345 };
341 }; 346 };
342 }; 347 };
@@ -347,7 +352,7 @@
347 */ 352 */
348 compatible = "arm,coresight-replicator"; 353 compatible = "arm,coresight-replicator";
349 354
350 ports { 355 out-ports {
351 #address-cells = <1>; 356 #address-cells = <1>;
352 #size-cells = <0>; 357 #size-cells = <0>;
353 358
@@ -365,12 +370,11 @@
365 remote-endpoint = <&funnel4_in_port0>; 370 remote-endpoint = <&funnel4_in_port0>;
366 }; 371 };
367 }; 372 };
373 };
368 374
369 /* replicator input port */ 375 in-ports {
370 port@2 { 376 port {
371 reg = <0>;
372 replicator0_in_port0: endpoint { 377 replicator0_in_port0: endpoint {
373 slave-mode;
374 remote-endpoint = <&funnel0_out_port0>; 378 remote-endpoint = <&funnel0_out_port0>;
375 }; 379 };
376 }; 380 };
@@ -383,7 +387,7 @@
383 */ 387 */
384 compatible = "arm,coresight-replicator"; 388 compatible = "arm,coresight-replicator";
385 389
386 ports { 390 out-ports {
387 #address-cells = <1>; 391 #address-cells = <1>;
388 #size-cells = <0>; 392 #size-cells = <0>;
389 393
@@ -401,12 +405,11 @@
401 remote-endpoint = <&funnel4_in_port1>; 405 remote-endpoint = <&funnel4_in_port1>;
402 }; 406 };
403 }; 407 };
408 };
404 409
405 /* replicator input port */ 410 in-ports {
406 port@2 { 411 port {
407 reg = <0>;
408 replicator1_in_port0: endpoint { 412 replicator1_in_port0: endpoint {
409 slave-mode;
410 remote-endpoint = <&funnel1_out_port0>; 413 remote-endpoint = <&funnel1_out_port0>;
411 }; 414 };
412 }; 415 };
@@ -419,11 +422,10 @@
419 */ 422 */
420 compatible = "arm,coresight-replicator"; 423 compatible = "arm,coresight-replicator";
421 424
422 ports { 425 out-ports {
423 #address-cells = <1>; 426 #address-cells = <1>;
424 #size-cells = <0>; 427 #size-cells = <0>;
425 428
426 /* replicator output ports */
427 port@0 { 429 port@0 {
428 reg = <0>; 430 reg = <0>;
429 replicator2_out_port0: endpoint { 431 replicator2_out_port0: endpoint {
@@ -437,12 +439,11 @@
437 remote-endpoint = <&funnel4_in_port2>; 439 remote-endpoint = <&funnel4_in_port2>;
438 }; 440 };
439 }; 441 };
442 };
440 443
441 /* replicator input port */ 444 in-ports {
442 port@2 { 445 port {
443 reg = <0>;
444 replicator2_in_port0: endpoint { 446 replicator2_in_port0: endpoint {
445 slave-mode;
446 remote-endpoint = <&funnel2_out_port0>; 447 remote-endpoint = <&funnel2_out_port0>;
447 }; 448 };
448 }; 449 };
@@ -455,11 +456,10 @@
455 */ 456 */
456 compatible = "arm,coresight-replicator"; 457 compatible = "arm,coresight-replicator";
457 458
458 ports { 459 out-ports {
459 #address-cells = <1>; 460 #address-cells = <1>;
460 #size-cells = <0>; 461 #size-cells = <0>;
461 462
462 /* replicator output ports */
463 port@0 { 463 port@0 {
464 reg = <0>; 464 reg = <0>;
465 replicator3_out_port0: endpoint { 465 replicator3_out_port0: endpoint {
@@ -473,12 +473,11 @@
473 remote-endpoint = <&funnel4_in_port3>; 473 remote-endpoint = <&funnel4_in_port3>;
474 }; 474 };
475 }; 475 };
476 };
476 477
477 /* replicator input port */ 478 in-ports {
478 port@2 { 479 port {
479 reg = <0>;
480 replicator3_in_port0: endpoint { 480 replicator3_in_port0: endpoint {
481 slave-mode;
482 remote-endpoint = <&funnel3_out_port0>; 481 remote-endpoint = <&funnel3_out_port0>;
483 }; 482 };
484 }; 483 };
@@ -491,48 +490,43 @@
491 490
492 clocks = <&clk_375m>; 491 clocks = <&clk_375m>;
493 clock-names = "apb_pclk"; 492 clock-names = "apb_pclk";
494 ports { 493 out-ports {
495 #address-cells = <1>; 494 port {
496 #size-cells = <0>;
497
498 /* funnel output port */
499 port@0 {
500 reg = <0>;
501 funnel0_out_port0: endpoint { 495 funnel0_out_port0: endpoint {
502 remote-endpoint = 496 remote-endpoint =
503 <&replicator0_in_port0>; 497 <&replicator0_in_port0>;
504 }; 498 };
505 }; 499 };
500 };
506 501
507 /* funnel input ports */ 502 in-ports {
508 port@1 { 503 #address-cells = <1>;
504 #size-cells = <0>;
505
506 port@0 {
509 reg = <0>; 507 reg = <0>;
510 funnel0_in_port0: endpoint { 508 funnel0_in_port0: endpoint {
511 slave-mode;
512 remote-endpoint = <&ptm0_out_port>; 509 remote-endpoint = <&ptm0_out_port>;
513 }; 510 };
514 }; 511 };
515 512
516 port@2 { 513 port@1 {
517 reg = <1>; 514 reg = <1>;
518 funnel0_in_port1: endpoint { 515 funnel0_in_port1: endpoint {
519 slave-mode;
520 remote-endpoint = <&ptm1_out_port>; 516 remote-endpoint = <&ptm1_out_port>;
521 }; 517 };
522 }; 518 };
523 519
524 port@3 { 520 port@2 {
525 reg = <2>; 521 reg = <2>;
526 funnel0_in_port2: endpoint { 522 funnel0_in_port2: endpoint {
527 slave-mode;
528 remote-endpoint = <&ptm2_out_port>; 523 remote-endpoint = <&ptm2_out_port>;
529 }; 524 };
530 }; 525 };
531 526
532 port@4 { 527 port@3 {
533 reg = <3>; 528 reg = <3>;
534 funnel0_in_port3: endpoint { 529 funnel0_in_port3: endpoint {
535 slave-mode;
536 remote-endpoint = <&ptm3_out_port>; 530 remote-endpoint = <&ptm3_out_port>;
537 }; 531 };
538 }; 532 };
@@ -545,48 +539,43 @@
545 539
546 clocks = <&clk_375m>; 540 clocks = <&clk_375m>;
547 clock-names = "apb_pclk"; 541 clock-names = "apb_pclk";
548 ports { 542 out-ports {
549 #address-cells = <1>; 543 port {
550 #size-cells = <0>;
551
552 /* funnel output port */
553 port@0 {
554 reg = <0>;
555 funnel1_out_port0: endpoint { 544 funnel1_out_port0: endpoint {
556 remote-endpoint = 545 remote-endpoint =
557 <&replicator1_in_port0>; 546 <&replicator1_in_port0>;
558 }; 547 };
559 }; 548 };
549 };
560 550
561 /* funnel input ports */ 551 in-ports {
562 port@1 { 552 #address-cells = <1>;
553 #size-cells = <0>;
554
555 port@0 {
563 reg = <0>; 556 reg = <0>;
564 funnel1_in_port0: endpoint { 557 funnel1_in_port0: endpoint {
565 slave-mode;
566 remote-endpoint = <&ptm4_out_port>; 558 remote-endpoint = <&ptm4_out_port>;
567 }; 559 };
568 }; 560 };
569 561
570 port@2 { 562 port@1 {
571 reg = <1>; 563 reg = <1>;
572 funnel1_in_port1: endpoint { 564 funnel1_in_port1: endpoint {
573 slave-mode;
574 remote-endpoint = <&ptm5_out_port>; 565 remote-endpoint = <&ptm5_out_port>;
575 }; 566 };
576 }; 567 };
577 568
578 port@3 { 569 port@2 {
579 reg = <2>; 570 reg = <2>;
580 funnel1_in_port2: endpoint { 571 funnel1_in_port2: endpoint {
581 slave-mode;
582 remote-endpoint = <&ptm6_out_port>; 572 remote-endpoint = <&ptm6_out_port>;
583 }; 573 };
584 }; 574 };
585 575
586 port@4 { 576 port@3 {
587 reg = <3>; 577 reg = <3>;
588 funnel1_in_port3: endpoint { 578 funnel1_in_port3: endpoint {
589 slave-mode;
590 remote-endpoint = <&ptm7_out_port>; 579 remote-endpoint = <&ptm7_out_port>;
591 }; 580 };
592 }; 581 };
@@ -599,48 +588,43 @@
599 588
600 clocks = <&clk_375m>; 589 clocks = <&clk_375m>;
601 clock-names = "apb_pclk"; 590 clock-names = "apb_pclk";
602 ports { 591 out-ports {
603 #address-cells = <1>; 592 port {
604 #size-cells = <0>;
605
606 /* funnel output port */
607 port@0 {
608 reg = <0>;
609 funnel2_out_port0: endpoint { 593 funnel2_out_port0: endpoint {
610 remote-endpoint = 594 remote-endpoint =
611 <&replicator2_in_port0>; 595 <&replicator2_in_port0>;
612 }; 596 };
613 }; 597 };
598 };
614 599
615 /* funnel input ports */ 600 in-ports {
616 port@1 { 601 #address-cells = <1>;
602 #size-cells = <0>;
603
604 port@0 {
617 reg = <0>; 605 reg = <0>;
618 funnel2_in_port0: endpoint { 606 funnel2_in_port0: endpoint {
619 slave-mode;
620 remote-endpoint = <&ptm8_out_port>; 607 remote-endpoint = <&ptm8_out_port>;
621 }; 608 };
622 }; 609 };
623 610
624 port@2 { 611 port@1 {
625 reg = <1>; 612 reg = <1>;
626 funnel2_in_port1: endpoint { 613 funnel2_in_port1: endpoint {
627 slave-mode;
628 remote-endpoint = <&ptm9_out_port>; 614 remote-endpoint = <&ptm9_out_port>;
629 }; 615 };
630 }; 616 };
631 617
632 port@3 { 618 port@2 {
633 reg = <2>; 619 reg = <2>;
634 funnel2_in_port2: endpoint { 620 funnel2_in_port2: endpoint {
635 slave-mode;
636 remote-endpoint = <&ptm10_out_port>; 621 remote-endpoint = <&ptm10_out_port>;
637 }; 622 };
638 }; 623 };
639 624
640 port@4 { 625 port@3 {
641 reg = <3>; 626 reg = <3>;
642 funnel2_in_port3: endpoint { 627 funnel2_in_port3: endpoint {
643 slave-mode;
644 remote-endpoint = <&ptm11_out_port>; 628 remote-endpoint = <&ptm11_out_port>;
645 }; 629 };
646 }; 630 };
@@ -653,48 +637,43 @@
653 637
654 clocks = <&clk_375m>; 638 clocks = <&clk_375m>;
655 clock-names = "apb_pclk"; 639 clock-names = "apb_pclk";
656 ports { 640 out-ports {
657 #address-cells = <1>; 641 port {
658 #size-cells = <0>;
659
660 /* funnel output port */
661 port@0 {
662 reg = <0>;
663 funnel3_out_port0: endpoint { 642 funnel3_out_port0: endpoint {
664 remote-endpoint = 643 remote-endpoint =
665 <&replicator3_in_port0>; 644 <&replicator3_in_port0>;
666 }; 645 };
667 }; 646 };
647 };
668 648
669 /* funnel input ports */ 649 in-ports {
670 port@1 { 650 #address-cells = <1>;
651 #size-cells = <0>;
652
653 port@0 {
671 reg = <0>; 654 reg = <0>;
672 funnel3_in_port0: endpoint { 655 funnel3_in_port0: endpoint {
673 slave-mode;
674 remote-endpoint = <&ptm12_out_port>; 656 remote-endpoint = <&ptm12_out_port>;
675 }; 657 };
676 }; 658 };
677 659
678 port@2 { 660 port@1 {
679 reg = <1>; 661 reg = <1>;
680 funnel3_in_port1: endpoint { 662 funnel3_in_port1: endpoint {
681 slave-mode;
682 remote-endpoint = <&ptm13_out_port>; 663 remote-endpoint = <&ptm13_out_port>;
683 }; 664 };
684 }; 665 };
685 666
686 port@3 { 667 port@2 {
687 reg = <2>; 668 reg = <2>;
688 funnel3_in_port2: endpoint { 669 funnel3_in_port2: endpoint {
689 slave-mode;
690 remote-endpoint = <&ptm14_out_port>; 670 remote-endpoint = <&ptm14_out_port>;
691 }; 671 };
692 }; 672 };
693 673
694 port@4 { 674 port@3 {
695 reg = <3>; 675 reg = <3>;
696 funnel3_in_port3: endpoint { 676 funnel3_in_port3: endpoint {
697 slave-mode;
698 remote-endpoint = <&ptm15_out_port>; 677 remote-endpoint = <&ptm15_out_port>;
699 }; 678 };
700 }; 679 };
@@ -707,50 +686,45 @@
707 686
708 clocks = <&clk_375m>; 687 clocks = <&clk_375m>;
709 clock-names = "apb_pclk"; 688 clock-names = "apb_pclk";
710 ports { 689 out-ports {
711 #address-cells = <1>; 690 port {
712 #size-cells = <0>;
713
714 /* funnel output port */
715 port@0 {
716 reg = <0>;
717 funnel4_out_port0: endpoint { 691 funnel4_out_port0: endpoint {
718 remote-endpoint = <&tpiu_in_port>; 692 remote-endpoint = <&tpiu_in_port>;
719 }; 693 };
720 }; 694 };
695 };
721 696
722 /* funnel input ports */ 697 in-ports {
723 port@1 { 698 #address-cells = <1>;
699 #size-cells = <0>;
700
701 port@0 {
724 reg = <0>; 702 reg = <0>;
725 funnel4_in_port0: endpoint { 703 funnel4_in_port0: endpoint {
726 slave-mode;
727 remote-endpoint = 704 remote-endpoint =
728 <&replicator0_out_port1>; 705 <&replicator0_out_port1>;
729 }; 706 };
730 }; 707 };
731 708
732 port@2 { 709 port@1 {
733 reg = <1>; 710 reg = <1>;
734 funnel4_in_port1: endpoint { 711 funnel4_in_port1: endpoint {
735 slave-mode;
736 remote-endpoint = 712 remote-endpoint =
737 <&replicator1_out_port1>; 713 <&replicator1_out_port1>;
738 }; 714 };
739 }; 715 };
740 716
741 port@3 { 717 port@2 {
742 reg = <2>; 718 reg = <2>;
743 funnel4_in_port2: endpoint { 719 funnel4_in_port2: endpoint {
744 slave-mode;
745 remote-endpoint = 720 remote-endpoint =
746 <&replicator2_out_port1>; 721 <&replicator2_out_port1>;
747 }; 722 };
748 }; 723 };
749 724
750 port@4 { 725 port@3 {
751 reg = <3>; 726 reg = <3>;
752 funnel4_in_port3: endpoint { 727 funnel4_in_port3: endpoint {
753 slave-mode;
754 remote-endpoint = 728 remote-endpoint =
755 <&replicator3_out_port1>; 729 <&replicator3_out_port1>;
756 }; 730 };
@@ -765,9 +739,11 @@
765 clocks = <&clk_375m>; 739 clocks = <&clk_375m>;
766 clock-names = "apb_pclk"; 740 clock-names = "apb_pclk";
767 cpu = <&CPU0>; 741 cpu = <&CPU0>;
768 port { 742 out-ports {
769 ptm0_out_port: endpoint { 743 port {
770 remote-endpoint = <&funnel0_in_port0>; 744 ptm0_out_port: endpoint {
745 remote-endpoint = <&funnel0_in_port0>;
746 };
771 }; 747 };
772 }; 748 };
773 }; 749 };
@@ -779,9 +755,11 @@
779 clocks = <&clk_375m>; 755 clocks = <&clk_375m>;
780 clock-names = "apb_pclk"; 756 clock-names = "apb_pclk";
781 cpu = <&CPU1>; 757 cpu = <&CPU1>;
782 port { 758 out-ports {
783 ptm1_out_port: endpoint { 759 port {
784 remote-endpoint = <&funnel0_in_port1>; 760 ptm1_out_port: endpoint {
761 remote-endpoint = <&funnel0_in_port1>;
762 };
785 }; 763 };
786 }; 764 };
787 }; 765 };
@@ -793,9 +771,11 @@
793 clocks = <&clk_375m>; 771 clocks = <&clk_375m>;
794 clock-names = "apb_pclk"; 772 clock-names = "apb_pclk";
795 cpu = <&CPU2>; 773 cpu = <&CPU2>;
796 port { 774 out-ports {
797 ptm2_out_port: endpoint { 775 port {
798 remote-endpoint = <&funnel0_in_port2>; 776 ptm2_out_port: endpoint {
777 remote-endpoint = <&funnel0_in_port2>;
778 };
799 }; 779 };
800 }; 780 };
801 }; 781 };
@@ -807,9 +787,11 @@
807 clocks = <&clk_375m>; 787 clocks = <&clk_375m>;
808 clock-names = "apb_pclk"; 788 clock-names = "apb_pclk";
809 cpu = <&CPU3>; 789 cpu = <&CPU3>;
810 port { 790 out-ports {
811 ptm3_out_port: endpoint { 791 port {
812 remote-endpoint = <&funnel0_in_port3>; 792 ptm3_out_port: endpoint {
793 remote-endpoint = <&funnel0_in_port3>;
794 };
813 }; 795 };
814 }; 796 };
815 }; 797 };
@@ -821,9 +803,11 @@
821 clocks = <&clk_375m>; 803 clocks = <&clk_375m>;
822 clock-names = "apb_pclk"; 804 clock-names = "apb_pclk";
823 cpu = <&CPU4>; 805 cpu = <&CPU4>;
824 port { 806 out-ports {
825 ptm4_out_port: endpoint { 807 port {
826 remote-endpoint = <&funnel1_in_port0>; 808 ptm4_out_port: endpoint {
809 remote-endpoint = <&funnel1_in_port0>;
810 };
827 }; 811 };
828 }; 812 };
829 }; 813 };
@@ -835,9 +819,11 @@
835 clocks = <&clk_375m>; 819 clocks = <&clk_375m>;
836 clock-names = "apb_pclk"; 820 clock-names = "apb_pclk";
837 cpu = <&CPU5>; 821 cpu = <&CPU5>;
838 port { 822 out-ports {
839 ptm5_out_port: endpoint { 823 port {
840 remote-endpoint = <&funnel1_in_port1>; 824 ptm5_out_port: endpoint {
825 remote-endpoint = <&funnel1_in_port1>;
826 };
841 }; 827 };
842 }; 828 };
843 }; 829 };
@@ -849,9 +835,11 @@
849 clocks = <&clk_375m>; 835 clocks = <&clk_375m>;
850 clock-names = "apb_pclk"; 836 clock-names = "apb_pclk";
851 cpu = <&CPU6>; 837 cpu = <&CPU6>;
852 port { 838 out-ports {
853 ptm6_out_port: endpoint { 839 port {
854 remote-endpoint = <&funnel1_in_port2>; 840 ptm6_out_port: endpoint {
841 remote-endpoint = <&funnel1_in_port2>;
842 };
855 }; 843 };
856 }; 844 };
857 }; 845 };
@@ -863,9 +851,11 @@
863 clocks = <&clk_375m>; 851 clocks = <&clk_375m>;
864 clock-names = "apb_pclk"; 852 clock-names = "apb_pclk";
865 cpu = <&CPU7>; 853 cpu = <&CPU7>;
866 port { 854 out-ports {
867 ptm7_out_port: endpoint { 855 port {
868 remote-endpoint = <&funnel1_in_port3>; 856 ptm7_out_port: endpoint {
857 remote-endpoint = <&funnel1_in_port3>;
858 };
869 }; 859 };
870 }; 860 };
871 }; 861 };
@@ -877,9 +867,11 @@
877 clocks = <&clk_375m>; 867 clocks = <&clk_375m>;
878 clock-names = "apb_pclk"; 868 clock-names = "apb_pclk";
879 cpu = <&CPU8>; 869 cpu = <&CPU8>;
880 port { 870 out-ports {
881 ptm8_out_port: endpoint { 871 port {
882 remote-endpoint = <&funnel2_in_port0>; 872 ptm8_out_port: endpoint {
873 remote-endpoint = <&funnel2_in_port0>;
874 };
883 }; 875 };
884 }; 876 };
885 }; 877 };
@@ -890,9 +882,11 @@
890 clocks = <&clk_375m>; 882 clocks = <&clk_375m>;
891 clock-names = "apb_pclk"; 883 clock-names = "apb_pclk";
892 cpu = <&CPU9>; 884 cpu = <&CPU9>;
893 port { 885 out-ports {
894 ptm9_out_port: endpoint { 886 port {
895 remote-endpoint = <&funnel2_in_port1>; 887 ptm9_out_port: endpoint {
888 remote-endpoint = <&funnel2_in_port1>;
889 };
896 }; 890 };
897 }; 891 };
898 }; 892 };
@@ -904,9 +898,11 @@
904 clocks = <&clk_375m>; 898 clocks = <&clk_375m>;
905 clock-names = "apb_pclk"; 899 clock-names = "apb_pclk";
906 cpu = <&CPU10>; 900 cpu = <&CPU10>;
907 port { 901 out-ports {
908 ptm10_out_port: endpoint { 902 port {
909 remote-endpoint = <&funnel2_in_port2>; 903 ptm10_out_port: endpoint {
904 remote-endpoint = <&funnel2_in_port2>;
905 };
910 }; 906 };
911 }; 907 };
912 }; 908 };
@@ -918,9 +914,11 @@
918 clocks = <&clk_375m>; 914 clocks = <&clk_375m>;
919 clock-names = "apb_pclk"; 915 clock-names = "apb_pclk";
920 cpu = <&CPU11>; 916 cpu = <&CPU11>;
921 port { 917 out-ports {
922 ptm11_out_port: endpoint { 918 port {
923 remote-endpoint = <&funnel2_in_port3>; 919 ptm11_out_port: endpoint {
920 remote-endpoint = <&funnel2_in_port3>;
921 };
924 }; 922 };
925 }; 923 };
926 }; 924 };
@@ -932,9 +930,11 @@
932 clocks = <&clk_375m>; 930 clocks = <&clk_375m>;
933 clock-names = "apb_pclk"; 931 clock-names = "apb_pclk";
934 cpu = <&CPU12>; 932 cpu = <&CPU12>;
935 port { 933 out-ports {
936 ptm12_out_port: endpoint { 934 port {
937 remote-endpoint = <&funnel3_in_port0>; 935 ptm12_out_port: endpoint {
936 remote-endpoint = <&funnel3_in_port0>;
937 };
938 }; 938 };
939 }; 939 };
940 }; 940 };
@@ -946,9 +946,11 @@
946 clocks = <&clk_375m>; 946 clocks = <&clk_375m>;
947 clock-names = "apb_pclk"; 947 clock-names = "apb_pclk";
948 cpu = <&CPU13>; 948 cpu = <&CPU13>;
949 port { 949 out-ports {
950 ptm13_out_port: endpoint { 950 port {
951 remote-endpoint = <&funnel3_in_port1>; 951 ptm13_out_port: endpoint {
952 remote-endpoint = <&funnel3_in_port1>;
953 };
952 }; 954 };
953 }; 955 };
954 }; 956 };
@@ -960,9 +962,11 @@
960 clocks = <&clk_375m>; 962 clocks = <&clk_375m>;
961 clock-names = "apb_pclk"; 963 clock-names = "apb_pclk";
962 cpu = <&CPU14>; 964 cpu = <&CPU14>;
963 port { 965 out-ports {
964 ptm14_out_port: endpoint { 966 port {
965 remote-endpoint = <&funnel3_in_port2>; 967 ptm14_out_port: endpoint {
968 remote-endpoint = <&funnel3_in_port2>;
969 };
966 }; 970 };
967 }; 971 };
968 }; 972 };
@@ -974,9 +978,11 @@
974 clocks = <&clk_375m>; 978 clocks = <&clk_375m>;
975 clock-names = "apb_pclk"; 979 clock-names = "apb_pclk";
976 cpu = <&CPU15>; 980 cpu = <&CPU15>;
977 port { 981 out-ports {
978 ptm15_out_port: endpoint { 982 port {
979 remote-endpoint = <&funnel3_in_port3>; 983 ptm15_out_port: endpoint {
984 remote-endpoint = <&funnel3_in_port3>;
985 };
980 }; 986 };
981 }; 987 };
982 }; 988 };
diff --git a/arch/arm/boot/dts/imx23-evk.dts b/arch/arm/boot/dts/imx23-evk.dts
index 9fb47724b9c1..ad2ae25b7b4d 100644
--- a/arch/arm/boot/dts/imx23-evk.dts
+++ b/arch/arm/boot/dts/imx23-evk.dts
@@ -13,6 +13,43 @@
13 reg = <0x40000000 0x08000000>; 13 reg = <0x40000000 0x08000000>;
14 }; 14 };
15 15
16 reg_vddio_sd0: regulator-vddio-sd0 {
17 compatible = "regulator-fixed";
18 regulator-name = "vddio-sd0";
19 regulator-min-microvolt = <3300000>;
20 regulator-max-microvolt = <3300000>;
21 gpio = <&gpio1 29 0>;
22 };
23
24 reg_lcd_3v3: regulator-lcd-3v3 {
25 compatible = "regulator-fixed";
26 regulator-name = "lcd-3v3";
27 regulator-min-microvolt = <3300000>;
28 regulator-max-microvolt = <3300000>;
29 gpio = <&gpio1 18 0>;
30 enable-active-high;
31 };
32
33 reg_lcd_5v: regulator-lcd-5v {
34 compatible = "regulator-fixed";
35 regulator-name = "lcd-5v";
36 regulator-min-microvolt = <5000000>;
37 regulator-max-microvolt = <5000000>;
38 };
39
40 panel {
41 compatible = "sii,43wvf1g";
42 backlight = <&backlight_display>;
43 dvdd-supply = <&reg_lcd_3v3>;
44 avdd-supply = <&reg_lcd_5v>;
45
46 port {
47 panel_in: endpoint {
48 remote-endpoint = <&display_out>;
49 };
50 };
51 };
52
16 apb@80000000 { 53 apb@80000000 {
17 apbh@80000000 { 54 apbh@80000000 {
18 gpmi-nand@8000c000 { 55 gpmi-nand@8000c000 {
@@ -52,31 +89,11 @@
52 lcdif@80030000 { 89 lcdif@80030000 {
53 pinctrl-names = "default"; 90 pinctrl-names = "default";
54 pinctrl-0 = <&lcdif_24bit_pins_a>; 91 pinctrl-0 = <&lcdif_24bit_pins_a>;
55 lcd-supply = <&reg_lcd_3v3>;
56 display = <&display0>;
57 status = "okay"; 92 status = "okay";
58 93
59 display0: display0 { 94 port {
60 bits-per-pixel = <32>; 95 display_out: endpoint {
61 bus-width = <24>; 96 remote-endpoint = <&panel_in>;
62
63 display-timings {
64 native-mode = <&timing0>;
65 timing0: timing0 {
66 clock-frequency = <9200000>;
67 hactive = <480>;
68 vactive = <272>;
69 hback-porch = <15>;
70 hfront-porch = <8>;
71 vback-porch = <12>;
72 vfront-porch = <4>;
73 hsync-len = <1>;
74 vsync-len = <1>;
75 hsync-active = <0>;
76 vsync-active = <0>;
77 de-active = <1>;
78 pixelclk-active = <0>;
79 };
80 }; 97 };
81 }; 98 };
82 }; 99 };
@@ -118,32 +135,7 @@
118 }; 135 };
119 }; 136 };
120 137
121 regulators { 138 backlight_display: backlight {
122 compatible = "simple-bus";
123 #address-cells = <1>;
124 #size-cells = <0>;
125
126 reg_vddio_sd0: regulator@0 {
127 compatible = "regulator-fixed";
128 reg = <0>;
129 regulator-name = "vddio-sd0";
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
132 gpio = <&gpio1 29 0>;
133 };
134
135 reg_lcd_3v3: regulator@1 {
136 compatible = "regulator-fixed";
137 reg = <1>;
138 regulator-name = "lcd-3v3";
139 regulator-min-microvolt = <3300000>;
140 regulator-max-microvolt = <3300000>;
141 gpio = <&gpio1 18 0>;
142 enable-active-high;
143 };
144 };
145
146 backlight {
147 compatible = "pwm-backlight"; 139 compatible = "pwm-backlight";
148 pwms = <&pwm 2 5000000>; 140 pwms = <&pwm 2 5000000>;
149 brightness-levels = <0 4 8 16 32 64 128 255>; 141 brightness-levels = <0 4 8 16 32 64 128 255>;
diff --git a/arch/arm/boot/dts/imx28-evk.dts b/arch/arm/boot/dts/imx28-evk.dts
index 6b0ae667640f..93ab5bdfe068 100644
--- a/arch/arm/boot/dts/imx28-evk.dts
+++ b/arch/arm/boot/dts/imx28-evk.dts
@@ -13,6 +13,87 @@
13 reg = <0x40000000 0x08000000>; 13 reg = <0x40000000 0x08000000>;
14 }; 14 };
15 15
16
17 reg_3p3v: regulator-3p3v {
18 compatible = "regulator-fixed";
19 regulator-name = "3P3V";
20 regulator-min-microvolt = <3300000>;
21 regulator-max-microvolt = <3300000>;
22 regulator-always-on;
23 };
24
25 reg_vddio_sd0: regulator-vddio-sd0 {
26 compatible = "regulator-fixed";
27 regulator-name = "vddio-sd0";
28 regulator-min-microvolt = <3300000>;
29 regulator-max-microvolt = <3300000>;
30 gpio = <&gpio3 28 0>;
31 };
32
33 reg_fec_3v3: regulator-fec-3v3 {
34 compatible = "regulator-fixed";
35 regulator-name = "fec-3v3";
36 regulator-min-microvolt = <3300000>;
37 regulator-max-microvolt = <3300000>;
38 gpio = <&gpio2 15 0>;
39 };
40
41 reg_usb0_vbus: regulator-usb0-vbus {
42 compatible = "regulator-fixed";
43 regulator-name = "usb0_vbus";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 gpio = <&gpio3 9 0>;
47 enable-active-high;
48 };
49
50 reg_usb1_vbus: regulator-usb1-vbus {
51 compatible = "regulator-fixed";
52 regulator-name = "usb1_vbus";
53 regulator-min-microvolt = <5000000>;
54 regulator-max-microvolt = <5000000>;
55 gpio = <&gpio3 8 0>;
56 enable-active-high;
57 };
58
59 reg_lcd_3v3: regulator-lcd-3v3 {
60 compatible = "regulator-fixed";
61 regulator-name = "lcd-3v3";
62 regulator-min-microvolt = <3300000>;
63 regulator-max-microvolt = <3300000>;
64 gpio = <&gpio3 30 0>;
65 enable-active-high;
66 };
67
68 reg_can_3v3: regulator-can-3v3 {
69 compatible = "regulator-fixed";
70 regulator-name = "can-3v3";
71 regulator-min-microvolt = <3300000>;
72 regulator-max-microvolt = <3300000>;
73 gpio = <&gpio2 13 0>;
74 enable-active-high;
75 };
76
77 reg_lcd_5v: regulator-lcd-5v {
78 compatible = "regulator-fixed";
79 regulator-name = "lcd-5v";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
82 };
83
84 panel {
85 compatible = "sii,43wvf1g";
86 backlight = <&backlight_display>;
87 dvdd-supply = <&reg_lcd_3v3>;
88 avdd-supply = <&reg_lcd_5v>;
89
90 port {
91 panel_in: endpoint {
92 remote-endpoint = <&display_out>;
93 };
94 };
95 };
96
16 apb@80000000 { 97 apb@80000000 {
17 apbh@80000000 { 98 apbh@80000000 {
18 gpmi-nand@8000c000 { 99 gpmi-nand@8000c000 {
@@ -116,31 +197,11 @@
116 pinctrl-names = "default"; 197 pinctrl-names = "default";
117 pinctrl-0 = <&lcdif_24bit_pins_a 198 pinctrl-0 = <&lcdif_24bit_pins_a
118 &lcdif_pins_evk>; 199 &lcdif_pins_evk>;
119 lcd-supply = <&reg_lcd_3v3>;
120 display = <&display0>;
121 status = "okay"; 200 status = "okay";
122 201
123 display0: display0 { 202 port {
124 bits-per-pixel = <32>; 203 display_out: endpoint {
125 bus-width = <24>; 204 remote-endpoint = <&panel_in>;
126
127 display-timings {
128 native-mode = <&timing0>;
129 timing0: timing0 {
130 clock-frequency = <33500000>;
131 hactive = <800>;
132 vactive = <480>;
133 hback-porch = <89>;
134 hfront-porch = <164>;
135 vback-porch = <23>;
136 vfront-porch = <10>;
137 hsync-len = <10>;
138 vsync-len = <10>;
139 hsync-active = <0>;
140 vsync-active = <0>;
141 de-active = <1>;
142 pixelclk-active = <0>;
143 };
144 }; 205 };
145 }; 206 };
146 }; 207 };
@@ -269,80 +330,6 @@
269 }; 330 };
270 }; 331 };
271 332
272 regulators {
273 compatible = "simple-bus";
274 #address-cells = <1>;
275 #size-cells = <0>;
276
277 reg_3p3v: regulator@0 {
278 compatible = "regulator-fixed";
279 reg = <0>;
280 regulator-name = "3P3V";
281 regulator-min-microvolt = <3300000>;
282 regulator-max-microvolt = <3300000>;
283 regulator-always-on;
284 };
285
286 reg_vddio_sd0: regulator@1 {
287 compatible = "regulator-fixed";
288 reg = <1>;
289 regulator-name = "vddio-sd0";
290 regulator-min-microvolt = <3300000>;
291 regulator-max-microvolt = <3300000>;
292 gpio = <&gpio3 28 0>;
293 };
294
295 reg_fec_3v3: regulator@2 {
296 compatible = "regulator-fixed";
297 reg = <2>;
298 regulator-name = "fec-3v3";
299 regulator-min-microvolt = <3300000>;
300 regulator-max-microvolt = <3300000>;
301 gpio = <&gpio2 15 0>;
302 };
303
304 reg_usb0_vbus: regulator@3 {
305 compatible = "regulator-fixed";
306 reg = <3>;
307 regulator-name = "usb0_vbus";
308 regulator-min-microvolt = <5000000>;
309 regulator-max-microvolt = <5000000>;
310 gpio = <&gpio3 9 0>;
311 enable-active-high;
312 };
313
314 reg_usb1_vbus: regulator@4 {
315 compatible = "regulator-fixed";
316 reg = <4>;
317 regulator-name = "usb1_vbus";
318 regulator-min-microvolt = <5000000>;
319 regulator-max-microvolt = <5000000>;
320 gpio = <&gpio3 8 0>;
321 enable-active-high;
322 };
323
324 reg_lcd_3v3: regulator@5 {
325 compatible = "regulator-fixed";
326 reg = <5>;
327 regulator-name = "lcd-3v3";
328 regulator-min-microvolt = <3300000>;
329 regulator-max-microvolt = <3300000>;
330 gpio = <&gpio3 30 0>;
331 enable-active-high;
332 };
333
334 reg_can_3v3: regulator@6 {
335 compatible = "regulator-fixed";
336 reg = <6>;
337 regulator-name = "can-3v3";
338 regulator-min-microvolt = <3300000>;
339 regulator-max-microvolt = <3300000>;
340 gpio = <&gpio2 13 0>;
341 enable-active-high;
342 };
343
344 };
345
346 sound { 333 sound {
347 compatible = "fsl,imx28-evk-sgtl5000", 334 compatible = "fsl,imx28-evk-sgtl5000",
348 "fsl,mxs-audio-sgtl5000"; 335 "fsl,mxs-audio-sgtl5000";
@@ -363,7 +350,7 @@
363 }; 350 };
364 }; 351 };
365 352
366 backlight { 353 backlight_display: backlight {
367 compatible = "pwm-backlight"; 354 compatible = "pwm-backlight";
368 pwms = <&pwm 2 5000000>; 355 pwms = <&pwm 2 5000000>;
369 brightness-levels = <0 4 8 16 32 64 128 255>; 356 brightness-levels = <0 4 8 16 32 64 128 255>;
diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi
index 7cbc2ffa4b3a..7234e8330a57 100644
--- a/arch/arm/boot/dts/imx7d.dtsi
+++ b/arch/arm/boot/dts/imx7d.dtsi
@@ -126,10 +126,14 @@
126 interrupt-names = "msi"; 126 interrupt-names = "msi";
127 #interrupt-cells = <1>; 127 #interrupt-cells = <1>;
128 interrupt-map-mask = <0 0 0 0x7>; 128 interrupt-map-mask = <0 0 0 0x7>;
129 interrupt-map = <0 0 0 1 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, 129 /*
130 <0 0 0 2 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, 130 * Reference manual lists pci irqs incorrectly
131 <0 0 0 3 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, 131 * Real hardware ordering is same as imx6: D+MSI, C, B, A
132 <0 0 0 4 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>; 132 */
133 interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
134 <0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
135 <0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
136 <0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
133 clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>, 137 clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>,
134 <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>, 138 <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>,
135 <&clks IMX7D_PCIE_PHY_ROOT_CLK>; 139 <&clks IMX7D_PCIE_PHY_ROOT_CLK>;
diff --git a/arch/arm/boot/dts/iwg20d-q7-common.dtsi b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
index 5cae74eb6cdd..ca9154dd8052 100644
--- a/arch/arm/boot/dts/iwg20d-q7-common.dtsi
+++ b/arch/arm/boot/dts/iwg20d-q7-common.dtsi
@@ -160,10 +160,6 @@
160 clock-frequency = <100000000>; 160 clock-frequency = <100000000>;
161}; 161};
162 162
163&pciec {
164 status = "okay";
165};
166
167&pfc { 163&pfc {
168 can0_pins: can0 { 164 can0_pins: can0 {
169 groups = "can0_data_d"; 165 groups = "can0_data_d";
diff --git a/arch/arm/boot/dts/lpc32xx.dtsi b/arch/arm/boot/dts/lpc32xx.dtsi
index abff7ef7c9cd..b7303a4e4236 100644
--- a/arch/arm/boot/dts/lpc32xx.dtsi
+++ b/arch/arm/boot/dts/lpc32xx.dtsi
@@ -179,7 +179,7 @@
179 * ssp0 and spi1 are shared pins; 179 * ssp0 and spi1 are shared pins;
180 * enable one in your board dts, as needed. 180 * enable one in your board dts, as needed.
181 */ 181 */
182 ssp0: ssp@20084000 { 182 ssp0: spi@20084000 {
183 compatible = "arm,pl022", "arm,primecell"; 183 compatible = "arm,pl022", "arm,primecell";
184 reg = <0x20084000 0x1000>; 184 reg = <0x20084000 0x1000>;
185 interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; 185 interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
@@ -199,7 +199,7 @@
199 * ssp1 and spi2 are shared pins; 199 * ssp1 and spi2 are shared pins;
200 * enable one in your board dts, as needed. 200 * enable one in your board dts, as needed.
201 */ 201 */
202 ssp1: ssp@2008c000 { 202 ssp1: spi@2008c000 {
203 compatible = "arm,pl022", "arm,primecell"; 203 compatible = "arm,pl022", "arm,primecell";
204 reg = <0x2008c000 0x1000>; 204 reg = <0x2008c000 0x1000>;
205 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; 205 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index d77dcf890cfc..7162e0ca05b0 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -194,7 +194,7 @@
194 #clock-cells = <1>; 194 #clock-cells = <1>;
195 #reset-cells = <1>; 195 #reset-cells = <1>;
196 compatible = "amlogic,meson8-clkc"; 196 compatible = "amlogic,meson8-clkc";
197 reg = <0x8000 0x4>, <0x4000 0x460>; 197 reg = <0x8000 0x4>, <0x4000 0x400>;
198 }; 198 };
199 199
200 reset: reset-controller@4404 { 200 reset: reset-controller@4404 {
diff --git a/arch/arm/boot/dts/meson8b-ec100.dts b/arch/arm/boot/dts/meson8b-ec100.dts
new file mode 100644
index 000000000000..0872f6e3abf5
--- /dev/null
+++ b/arch/arm/boot/dts/meson8b-ec100.dts
@@ -0,0 +1,248 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
4 */
5
6/dts-v1/;
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/input/input.h>
10
11#include "meson8b.dtsi"
12
13/ {
14 model = "Endless Computers Endless Mini";
15 compatible = "endless,ec100", "amlogic,meson8b";
16
17 aliases {
18 serial0 = &uart_AO;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
25 memory {
26 reg = <0x40000000 0x40000000>;
27 };
28
29 gpio-keys {
30 compatible = "gpio-keys-polled";
31 #address-cells = <1>;
32 #size-cells = <0>;
33 poll-interval = <100>;
34
35 pal-switch {
36 label = "pal";
37 linux,input-type = <EV_SW>;
38 linux,code = <KEY_SWITCHVIDEOMODE>;
39 gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
40 };
41
42 ntsc-switch {
43 label = "ntsc";
44 linux,input-type = <EV_SW>;
45 linux,code = <KEY_SWITCHVIDEOMODE>;
46 gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;
47 };
48
49 power-button {
50 label = "power";
51 linux,code = <KEY_POWER>;
52 gpios = <&gpio GPIOH_9 GPIO_ACTIVE_LOW>;
53 };
54 };
55
56 gpio-poweroff {
57 compatible = "gpio-poweroff";
58 /*
59 * shutdown is managed by the EC (embedded micro-controller)
60 * which is configured through GPIOAO_2 (poweroff GPIO) and
61 * GPIOAO_7 (power LED, which has to go LOW as well).
62 */
63 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
64 timeout-ms = <20000>;
65 };
66
67 leds {
68 compatible = "gpio-leds";
69
70 power {
71 label = "ec100:red:power";
72 /*
73 * Needs to go LOW (together with the poweroff GPIO)
74 * during shutdown to allow the EC (embedded
75 * micro-controller) to shutdown the system. Setting
76 * the output to LOW signals the EC to start a
77 * "breathing"/pulsing effect until the power is fully
78 * turned off.
79 */
80 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
81 default-state = "on";
82 };
83 };
84
85 usb_vbus: regulator-usb-vbus {
86 compatible = "regulator-fixed";
87
88 regulator-name = "USB_VBUS";
89
90 regulator-min-microvolt = <5000000>;
91 regulator-max-microvolt = <5000000>;
92
93 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
94 enable-active-high;
95 };
96
97 vcc_5v: regulator-vcc5v {
98 compatible = "regulator-fixed";
99
100 regulator-name = "VCC5V";
101
102 regulator-min-microvolt = <5000000>;
103 regulator-max-microvolt = <5000000>;
104
105 gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>;
106
107 regulator-boot-on;
108 regulator-always-on;
109 };
110
111 vcck: regulator-vcck {
112 compatible = "pwm-regulator";
113
114 regulator-name = "VCCK";
115 regulator-min-microvolt = <860000>;
116 regulator-max-microvolt = <1140000>;
117
118 pwms = <&pwm_cd 0 1148 0>;
119 pwm-dutycycle-range = <100 0>;
120
121 regulator-boot-on;
122 regulator-always-on;
123 };
124
125 vcc_1v8: regulator-vcc1v8 {
126 compatible = "regulator-fixed";
127
128 regulator-name = "VCC1V8";
129 regulator-min-microvolt = <1800000>;
130 regulator-max-microvolt = <1800000>;
131 };
132
133 vcc_3v3: regulator-vcc3v3 {
134 compatible = "regulator-fixed";
135
136 regulator-name = "VCC3V3";
137 regulator-min-microvolt = <3300000>;
138 regulator-max-microvolt = <3300000>;
139 };
140};
141
142&cpu0 {
143 cpu-supply = <&vcck>;
144};
145
146&ethmac {
147 status = "okay";
148
149 pinctrl-0 = <&eth_rmii_pins>;
150 pinctrl-names = "default";
151
152 phy-handle = <&eth_phy0>;
153 phy-mode = "rmii";
154
155 snps,reset-gpio = <&gpio GPIOH_4 0>;
156 snps,reset-delays-us = <0 10000 1000000>;
157 snps,reset-active-low;
158
159 mdio {
160 compatible = "snps,dwmac-mdio";
161 #address-cells = <1>;
162 #size-cells = <0>;
163
164 eth_phy0: ethernet-phy@0 {
165 /* IC Plus IP101A/G (0x02430c54) */
166 reg = <0>;
167 };
168 };
169};
170
171&i2c_A {
172 status = "okay";
173 pinctrl-0 = <&i2c_a_pins>;
174 pinctrl-names = "default";
175
176 rt5640: codec@1c {
177 compatible = "realtek,rt5640";
178 reg = <0x1c>;
179 interrupt-parent = <&gpio_intc>;
180 interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */
181 realtek,in1-differential;
182 };
183};
184
185&saradc {
186 status = "okay";
187 vref-supply = <&vcc_1v8>;
188};
189
190&sdio {
191 status = "okay";
192
193 pinctrl-0 = <&sd_b_pins>;
194 pinctrl-names = "default";
195
196 /* SD card */
197 sd_card_slot: slot@1 {
198 compatible = "mmc-slot";
199 reg = <1>;
200 status = "okay";
201
202 bus-width = <4>;
203 no-sdio;
204 cap-mmc-highspeed;
205 cap-sd-highspeed;
206 disable-wp;
207
208 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
209 cd-inverted;
210
211 vmmc-supply = <&vcc_3v3>;
212 };
213};
214
215&pwm_cd {
216 status = "okay";
217 pinctrl-0 = <&pwm_c1_pins>;
218 pinctrl-names = "default";
219 clocks = <&clkc CLKID_XTAL>;
220 clock-names = "clkin0";
221};
222
223/* exposed through the pin headers labeled "URDUG1" on the top of the PCB */
224&uart_AO {
225 status = "okay";
226 pinctrl-0 = <&uart_ao_a_pins>;
227 pinctrl-names = "default";
228};
229
230/*
231 * connected to the Bluetooth part of the RTL8723BS SDIO wifi / Bluetooth
232 * combo chip. This is only available on the variant with 2GB RAM.
233 */
234&uart_B {
235 status = "okay";
236 pinctrl-0 = <&uart_b0_pins>, <&uart_b0_cts_rts_pins>;
237 pinctrl-names = "default";
238 uart-has-rtscts;
239};
240
241&usb1 {
242 status = "okay";
243 vbus-supply = <&usb_vbus>;
244};
245
246&usb1_phy {
247 status = "okay";
248};
diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
index ef3177d3da3d..58669abda259 100644
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
@@ -57,6 +57,10 @@
57 mmc0 = &sd_card_slot; 57 mmc0 = &sd_card_slot;
58 }; 58 };
59 59
60 chosen {
61 stdout-path = "serial0:115200n8";
62 };
63
60 memory { 64 memory {
61 reg = <0x40000000 0x40000000>; 65 reg = <0x40000000 0x40000000>;
62 }; 66 };
@@ -71,6 +75,14 @@
71 }; 75 };
72 }; 76 };
73 77
78 p5v0: regulator-p5v0 {
79 compatible = "regulator-fixed";
80
81 regulator-name = "P5V0";
82 regulator-min-microvolt = <5000000>;
83 regulator-max-microvolt = <5000000>;
84 };
85
74 tflash_vdd: regulator-tflash_vdd { 86 tflash_vdd: regulator-tflash_vdd {
75 /* 87 /*
76 * signal name from schematics: TFLASH_VDD_EN 88 * signal name from schematics: TFLASH_VDD_EN
@@ -81,6 +93,8 @@
81 regulator-min-microvolt = <3300000>; 93 regulator-min-microvolt = <3300000>;
82 regulator-max-microvolt = <3300000>; 94 regulator-max-microvolt = <3300000>;
83 95
96 vin-supply = <&vcc_3v3>;
97
84 gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>; 98 gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
85 enable-active-high; 99 enable-active-high;
86 }; 100 };
@@ -92,6 +106,8 @@
92 regulator-min-microvolt = <1800000>; 106 regulator-min-microvolt = <1800000>;
93 regulator-max-microvolt = <3300000>; 107 regulator-max-microvolt = <3300000>;
94 108
109 vin-supply = <&vcc_3v3>;
110
95 /* 111 /*
96 * signal name from schematics: TF_3V3N_1V8_EN 112 * signal name from schematics: TF_3V3N_1V8_EN
97 */ 113 */
@@ -101,6 +117,86 @@
101 states = <3300000 0 117 states = <3300000 0
102 1800000 1>; 118 1800000 1>;
103 }; 119 };
120
121 vcc_1v8: regulator-vcc-1v8 {
122 /*
123 * RICHTEK RT9179 configured for a fixed output voltage of
124 * 1.8V. This supplies not only VCC1V8 but also IOREF_1V8 and
125 * VDD1V8 according to the schematics.
126 */
127 compatible = "regulator-fixed";
128
129 regulator-name = "VCC1V8";
130 regulator-min-microvolt = <1800000>;
131 regulator-max-microvolt = <1800000>;
132
133 vin-supply = <&p5v0>;
134 };
135
136 vcc_3v3: regulator-vcc-3v3 {
137 /*
138 * Monolithic Power Systems MP2161 configured for a fixed
139 * output voltage of 3.3V. This supplies not only VCC3V3 but
140 * also VDD3V3 and VDDIO_AO3V3 according to the schematics.
141 */
142 compatible = "regulator-fixed";
143
144 regulator-name = "VCC3V3";
145 regulator-min-microvolt = <3300000>;
146 regulator-max-microvolt = <3300000>;
147
148 vin-supply = <&p5v0>;
149 };
150
151 vcck: regulator-vcck {
152 /* Monolithic Power Systems MP2161 */
153 compatible = "pwm-regulator";
154
155 regulator-name = "VCCK";
156 regulator-min-microvolt = <860000>;
157 regulator-max-microvolt = <1140000>;
158
159 vin-supply = <&p5v0>;
160
161 pwms = <&pwm_cd 0 12218 0>;
162 pwm-dutycycle-range = <91 0>;
163
164 regulator-boot-on;
165 regulator-always-on;
166 };
167
168 vddc_ddr: regulator-vddc-ddr {
169 /*
170 * Monolithic Power Systems MP2161 configured for a fixed
171 * output voltage of 1.5V. This supplies not only DDR_VDDC but
172 * also DDR3_1V5 according to the schematics.
173 */
174 compatible = "regulator-fixed";
175
176 regulator-name = "DDR_VDDC";
177 regulator-min-microvolt = <1500000>;
178 regulator-max-microvolt = <1500000>;
179
180 vin-supply = <&p5v0>;
181 };
182
183 vdd_rtc: regulator-vdd-rtc {
184 /*
185 * Torex Semiconductor XC6215 configured for a fixed output of
186 * 0.9V.
187 */
188 compatible = "regulator-fixed";
189
190 regulator-name = "VDD_RTC";
191 regulator-min-microvolt = <900000>;
192 regulator-max-microvolt = <900000>;
193
194 vin-supply = <&vcc_3v3>;
195 };
196};
197
198&cpu0 {
199 cpu-supply = <&vcck>;
104}; 200};
105 201
106&ethmac { 202&ethmac {
@@ -154,6 +250,11 @@
154 pinctrl-names = "default"; 250 pinctrl-names = "default";
155}; 251};
156 252
253&saradc {
254 status = "okay";
255 vref-supply = <&vcc_1v8>;
256};
257
157&sdio { 258&sdio {
158 status = "okay"; 259 status = "okay";
159 260
@@ -180,6 +281,14 @@
180 }; 281 };
181}; 282};
182 283
284&pwm_cd {
285 status = "okay";
286 pinctrl-0 = <&pwm_c1_pins>;
287 pinctrl-names = "default";
288 clocks = <&clkc CLKID_XTAL>;
289 clock-names = "clkin0";
290};
291
183&uart_AO { 292&uart_AO {
184 status = "okay"; 293 status = "okay";
185 pinctrl-0 = <&uart_ao_a_pins>; 294 pinctrl-0 = <&uart_ao_a_pins>;
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 08f7f6be7254..cd1ca9dda126 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -163,7 +163,7 @@
163 #clock-cells = <1>; 163 #clock-cells = <1>;
164 #reset-cells = <1>; 164 #reset-cells = <1>;
165 compatible = "amlogic,meson8b-clkc"; 165 compatible = "amlogic,meson8b-clkc";
166 reg = <0x8000 0x4>, <0x4000 0x460>; 166 reg = <0x8000 0x4>, <0x4000 0x400>;
167 }; 167 };
168 168
169 reset: reset-controller@4404 { 169 reset: reset-controller@4404 {
@@ -223,6 +223,28 @@
223 }; 223 };
224 }; 224 };
225 225
226 eth_rmii_pins: eth-rmii {
227 mux {
228 groups = "eth_tx_en",
229 "eth_txd1_0",
230 "eth_txd0_0",
231 "eth_rx_clk",
232 "eth_rx_dv",
233 "eth_rxd1",
234 "eth_rxd0",
235 "eth_mdio_en",
236 "eth_mdc";
237 function = "ethernet";
238 };
239 };
240
241 i2c_a_pins: i2c-a {
242 mux {
243 groups = "i2c_sda_a", "i2c_sck_a";
244 function = "i2c_a";
245 };
246 };
247
226 sd_b_pins: sd-b { 248 sd_b_pins: sd-b {
227 mux { 249 mux {
228 groups = "sd_d0_b", "sd_d1_b", "sd_d2_b", 250 groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
@@ -230,6 +252,29 @@
230 function = "sd_b"; 252 function = "sd_b";
231 }; 253 };
232 }; 254 };
255
256 pwm_c1_pins: pwm-c1 {
257 mux {
258 groups = "pwm_c1";
259 function = "pwm_c";
260 };
261 };
262
263 uart_b0_pins: uart-b0 {
264 mux {
265 groups = "uart_tx_b0",
266 "uart_rx_b0";
267 function = "uart_b";
268 };
269 };
270
271 uart_b0_cts_rts_pins: uart-b0-cts-rts {
272 mux {
273 groups = "uart_cts_b0",
274 "uart_rts_b0";
275 function = "uart_b";
276 };
277 };
233 }; 278 };
234}; 279};
235 280
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index 12d6822f0057..04758a2a87f0 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -354,7 +354,7 @@
354&mmc2 { 354&mmc2 {
355 vmmc-supply = <&vsdio>; 355 vmmc-supply = <&vsdio>;
356 bus-width = <8>; 356 bus-width = <8>;
357 non-removable; 357 ti,non-removable;
358}; 358};
359 359
360&mmc3 { 360&mmc3 {
@@ -621,15 +621,6 @@
621 OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */ 621 OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */
622 >; 622 >;
623 }; 623 };
624};
625
626&omap4_pmx_wkup {
627 usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
628 /* gpio_wk0 */
629 pinctrl-single,pins = <
630 OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
631 >;
632 };
633 624
634 vibrator_direction_pin: pinmux_vibrator_direction_pin { 625 vibrator_direction_pin: pinmux_vibrator_direction_pin {
635 pinctrl-single,pins = < 626 pinctrl-single,pins = <
@@ -644,6 +635,15 @@
644 }; 635 };
645}; 636};
646 637
638&omap4_pmx_wkup {
639 usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
640 /* gpio_wk0 */
641 pinctrl-single,pins = <
642 OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
643 >;
644 };
645};
646
647/* 647/*
648 * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for 648 * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for
649 * uart1 wakeirq. 649 * uart1 wakeirq.
diff --git a/arch/arm/boot/dts/pxa25x.dtsi b/arch/arm/boot/dts/pxa25x.dtsi
index 95d59be97213..8494b5787170 100644
--- a/arch/arm/boot/dts/pxa25x.dtsi
+++ b/arch/arm/boot/dts/pxa25x.dtsi
@@ -80,6 +80,10 @@
80 #pwm-cells = <1>; 80 #pwm-cells = <1>;
81 clocks = <&clks CLK_PWM1>; 81 clocks = <&clks CLK_PWM1>;
82 }; 82 };
83
84 rtc@40900000 {
85 clocks = <&clks CLK_OSC32k768>;
86 };
83 }; 87 };
84 88
85 timer@40a00000 { 89 timer@40a00000 {
diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
index 747f750f675d..3228ad5fb725 100644
--- a/arch/arm/boot/dts/pxa27x.dtsi
+++ b/arch/arm/boot/dts/pxa27x.dtsi
@@ -71,7 +71,7 @@
71 clocks = <&clks CLK_PWM1>; 71 clocks = <&clks CLK_PWM1>;
72 }; 72 };
73 73
74 pwri2c: i2c@40f000180 { 74 pwri2c: i2c@40f00180 {
75 compatible = "mrvl,pxa-i2c"; 75 compatible = "mrvl,pxa-i2c";
76 reg = <0x40f00180 0x24>; 76 reg = <0x40f00180 0x24>;
77 interrupts = <6>; 77 interrupts = <6>;
@@ -113,6 +113,10 @@
113 113
114 status = "disabled"; 114 status = "disabled";
115 }; 115 };
116
117 rtc@40900000 {
118 clocks = <&clks CLK_OSC32k768>;
119 };
116 }; 120 };
117 121
118 clocks { 122 clocks {
diff --git a/arch/arm/boot/dts/pxa2xx.dtsi b/arch/arm/boot/dts/pxa2xx.dtsi
index a520b4c14ea9..080d5c5169b5 100644
--- a/arch/arm/boot/dts/pxa2xx.dtsi
+++ b/arch/arm/boot/dts/pxa2xx.dtsi
@@ -9,6 +9,25 @@
9#include "skeleton.dtsi" 9#include "skeleton.dtsi"
10#include "dt-bindings/clock/pxa-clock.h" 10#include "dt-bindings/clock/pxa-clock.h"
11 11
12#define PMGROUP(pin) #pin
13#define PMMUX(func, pin, af) \
14 mux- ## func { \
15 groups = PMGROUP(P ## pin); \
16 function = #af; \
17 }
18#define PMMUX_LPM_LOW(func, pin, af) \
19 mux- ## func { \
20 groups = PMGROUP(P ## pin); \
21 function = #af; \
22 low-power-disable; \
23 }
24#define PMMUX_LPM_HIGH(func, pin, af) \
25 mux- ## func { \
26 groups = PMGROUP(P ## pin); \
27 function = #af; \
28 low-power-enable; \
29 }
30
12/ { 31/ {
13 model = "Marvell PXA2xx family SoC"; 32 model = "Marvell PXA2xx family SoC";
14 compatible = "marvell,pxa2xx"; 33 compatible = "marvell,pxa2xx";
@@ -76,7 +95,7 @@
76 }; 95 };
77 }; 96 };
78 97
79 ffuart: uart@40100000 { 98 ffuart: serial@40100000 {
80 compatible = "mrvl,pxa-uart"; 99 compatible = "mrvl,pxa-uart";
81 reg = <0x40100000 0x30>; 100 reg = <0x40100000 0x30>;
82 interrupts = <22>; 101 interrupts = <22>;
@@ -84,7 +103,7 @@
84 status = "disabled"; 103 status = "disabled";
85 }; 104 };
86 105
87 btuart: uart@40200000 { 106 btuart: serial@40200000 {
88 compatible = "mrvl,pxa-uart"; 107 compatible = "mrvl,pxa-uart";
89 reg = <0x40200000 0x30>; 108 reg = <0x40200000 0x30>;
90 interrupts = <21>; 109 interrupts = <21>;
@@ -92,7 +111,7 @@
92 status = "disabled"; 111 status = "disabled";
93 }; 112 };
94 113
95 stuart: uart@40700000 { 114 stuart: serial@40700000 {
96 compatible = "mrvl,pxa-uart"; 115 compatible = "mrvl,pxa-uart";
97 reg = <0x40700000 0x30>; 116 reg = <0x40700000 0x30>;
98 interrupts = <20>; 117 interrupts = <20>;
@@ -100,7 +119,7 @@
100 status = "disabled"; 119 status = "disabled";
101 }; 120 };
102 121
103 hwuart: uart@41100000 { 122 hwuart: serial@41100000 {
104 compatible = "mrvl,pxa-uart"; 123 compatible = "mrvl,pxa-uart";
105 reg = <0x41100000 0x30>; 124 reg = <0x41100000 0x30>;
106 interrupts = <7>; 125 interrupts = <7>;
diff --git a/arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts
index 327545119ee3..0d006aea99da 100644
--- a/arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts
+++ b/arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts
@@ -14,3 +14,7 @@
14 model = "iW-RainboW-G20D-Q7 RZ/G1M based plus camera daughter board"; 14 model = "iW-RainboW-G20D-Q7 RZ/G1M based plus camera daughter board";
15 compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743"; 15 compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743";
16}; 16};
17
18&pciec {
19 status = "okay";
20};
diff --git a/arch/arm/boot/dts/r8a7743-iwg20d-q7.dts b/arch/arm/boot/dts/r8a7743-iwg20d-q7.dts
index b683db4da8b1..498e223a5f93 100644
--- a/arch/arm/boot/dts/r8a7743-iwg20d-q7.dts
+++ b/arch/arm/boot/dts/r8a7743-iwg20d-q7.dts
@@ -13,3 +13,7 @@
13 model = "iWave Systems RainboW-G20D-Qseven board based on RZ/G1M"; 13 model = "iWave Systems RainboW-G20D-Qseven board based on RZ/G1M";
14 compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743"; 14 compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743";
15}; 15};
16
17&pciec {
18 status = "okay";
19};
diff --git a/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts b/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
index e3585daafdd6..22da819f186b 100644
--- a/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
+++ b/arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
@@ -35,6 +35,8 @@
35 35
36 phy3: ethernet-phy@3 { 36 phy3: ethernet-phy@3 {
37 reg = <3>; 37 reg = <3>;
38 interrupt-parent = <&gpio5>;
39 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
38 micrel,led-mode = <1>; 40 micrel,led-mode = <1>;
39 }; 41 };
40}; 42};
@@ -43,6 +45,16 @@
43 clock-frequency = <20000000>; 45 clock-frequency = <20000000>;
44}; 46};
45 47
48&pfc {
49 scif1_pins: scif1 {
50 groups = "scif1_data_b";
51 function = "scif1";
52 };
53};
54
46&scif1 { 55&scif1 {
56 pinctrl-0 = <&scif1_pins>;
57 pinctrl-names = "default";
58
47 status = "okay"; 59 status = "okay";
48}; 60};
diff --git a/arch/arm/boot/dts/r8a77470.dtsi b/arch/arm/boot/dts/r8a77470.dtsi
index 87d32d3e23de..9ec78d3d0ca8 100644
--- a/arch/arm/boot/dts/r8a77470.dtsi
+++ b/arch/arm/boot/dts/r8a77470.dtsi
@@ -8,6 +8,7 @@
8#include <dt-bindings/interrupt-controller/irq.h> 8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/interrupt-controller/arm-gic.h> 9#include <dt-bindings/interrupt-controller/arm-gic.h>
10#include <dt-bindings/clock/r8a77470-cpg-mssr.h> 10#include <dt-bindings/clock/r8a77470-cpg-mssr.h>
11#include <dt-bindings/power/r8a77470-sysc.h>
11/ { 12/ {
12 compatible = "renesas,r8a77470"; 13 compatible = "renesas,r8a77470";
13 #address-cells = <2>; 14 #address-cells = <2>;
@@ -16,6 +17,7 @@
16 cpus { 17 cpus {
17 #address-cells = <1>; 18 #address-cells = <1>;
18 #size-cells = <0>; 19 #size-cells = <0>;
20 enable-method = "renesas,apmu";
19 21
20 cpu0: cpu@0 { 22 cpu0: cpu@0 {
21 device_type = "cpu"; 23 device_type = "cpu";
@@ -23,16 +25,25 @@
23 reg = <0>; 25 reg = <0>;
24 clock-frequency = <1000000000>; 26 clock-frequency = <1000000000>;
25 clocks = <&cpg CPG_CORE R8A77470_CLK_Z2>; 27 clocks = <&cpg CPG_CORE R8A77470_CLK_Z2>;
26 power-domains = <&sysc 5>; 28 power-domains = <&sysc R8A77470_PD_CA7_CPU0>;
27 next-level-cache = <&L2_CA7>; 29 next-level-cache = <&L2_CA7>;
28 }; 30 };
29 31
32 cpu1: cpu@1 {
33 device_type = "cpu";
34 compatible = "arm,cortex-a7";
35 reg = <1>;
36 clock-frequency = <1000000000>;
37 clocks = <&cpg CPG_CORE R8A77470_CLK_Z2>;
38 power-domains = <&sysc R8A77470_PD_CA7_CPU1>;
39 next-level-cache = <&L2_CA7>;
40 };
30 41
31 L2_CA7: cache-controller-0 { 42 L2_CA7: cache-controller-0 {
32 compatible = "cache"; 43 compatible = "cache";
33 cache-unified; 44 cache-unified;
34 cache-level = <2>; 45 cache-level = <2>;
35 power-domains = <&sysc 21>; 46 power-domains = <&sysc R8A77470_PD_CA7_SCU>;
36 }; 47 };
37 }; 48 };
38 49
@@ -60,6 +71,102 @@
60 #size-cells = <2>; 71 #size-cells = <2>;
61 ranges; 72 ranges;
62 73
74 gpio0: gpio@e6050000 {
75 compatible = "renesas,gpio-r8a77470",
76 "renesas,rcar-gen2-gpio";
77 reg = <0 0xe6050000 0 0x50>;
78 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
79 #gpio-cells = <2>;
80 gpio-controller;
81 gpio-ranges = <&pfc 0 0 23>;
82 #interrupt-cells = <2>;
83 interrupt-controller;
84 clocks = <&cpg CPG_MOD 912>;
85 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
86 resets = <&cpg 912>;
87 };
88
89 gpio1: gpio@e6051000 {
90 compatible = "renesas,gpio-r8a77470",
91 "renesas,rcar-gen2-gpio";
92 reg = <0 0xe6051000 0 0x50>;
93 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
94 #gpio-cells = <2>;
95 gpio-controller;
96 gpio-ranges = <&pfc 0 32 23>;
97 #interrupt-cells = <2>;
98 interrupt-controller;
99 clocks = <&cpg CPG_MOD 911>;
100 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
101 resets = <&cpg 911>;
102 };
103
104 gpio2: gpio@e6052000 {
105 compatible = "renesas,gpio-r8a77470",
106 "renesas,rcar-gen2-gpio";
107 reg = <0 0xe6052000 0 0x50>;
108 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
109 #gpio-cells = <2>;
110 gpio-controller;
111 gpio-ranges = <&pfc 0 64 32>;
112 #interrupt-cells = <2>;
113 interrupt-controller;
114 clocks = <&cpg CPG_MOD 910>;
115 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
116 resets = <&cpg 910>;
117 };
118
119 gpio3: gpio@e6053000 {
120 compatible = "renesas,gpio-r8a77470",
121 "renesas,rcar-gen2-gpio";
122 reg = <0 0xe6053000 0 0x50>;
123 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
124 #gpio-cells = <2>;
125 gpio-controller;
126 gpio-ranges = <&pfc 0 96 30>;
127 gpio-reserved-ranges = <17 10>;
128 #interrupt-cells = <2>;
129 interrupt-controller;
130 clocks = <&cpg CPG_MOD 909>;
131 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
132 resets = <&cpg 909>;
133 };
134
135 gpio4: gpio@e6054000 {
136 compatible = "renesas,gpio-r8a77470",
137 "renesas,rcar-gen2-gpio";
138 reg = <0 0xe6054000 0 0x50>;
139 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
140 #gpio-cells = <2>;
141 gpio-controller;
142 gpio-ranges = <&pfc 0 128 26>;
143 #interrupt-cells = <2>;
144 interrupt-controller;
145 clocks = <&cpg CPG_MOD 908>;
146 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
147 resets = <&cpg 908>;
148 };
149
150 gpio5: gpio@e6055000 {
151 compatible = "renesas,gpio-r8a77470",
152 "renesas,rcar-gen2-gpio";
153 reg = <0 0xe6055000 0 0x50>;
154 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
155 #gpio-cells = <2>;
156 gpio-controller;
157 gpio-ranges = <&pfc 0 160 32>;
158 #interrupt-cells = <2>;
159 interrupt-controller;
160 clocks = <&cpg CPG_MOD 907>;
161 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
162 resets = <&cpg 907>;
163 };
164
165 pfc: pin-controller@e6060000 {
166 compatible = "renesas,pfc-r8a77470";
167 reg = <0 0xe6060000 0 0x118>;
168 };
169
63 cpg: clock-controller@e6150000 { 170 cpg: clock-controller@e6150000 {
64 compatible = "renesas,r8a77470-cpg-mssr"; 171 compatible = "renesas,r8a77470-cpg-mssr";
65 reg = <0 0xe6150000 0 0x1000>; 172 reg = <0 0xe6150000 0 0x1000>;
@@ -70,6 +177,12 @@
70 #reset-cells = <1>; 177 #reset-cells = <1>;
71 }; 178 };
72 179
180 apmu@e6151000 {
181 compatible = "renesas,r8a77470-apmu", "renesas,apmu";
182 reg = <0 0xe6151000 0 0x188>;
183 cpus = <&cpu0 &cpu1>;
184 };
185
73 rst: reset-controller@e6160000 { 186 rst: reset-controller@e6160000 {
74 compatible = "renesas,r8a77470-rst"; 187 compatible = "renesas,r8a77470-rst";
75 reg = <0 0xe6160000 0 0x100>; 188 reg = <0 0xe6160000 0 0x100>;
@@ -97,7 +210,7 @@
97 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>, 210 <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
98 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 211 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
99 clocks = <&cpg CPG_MOD 407>; 212 clocks = <&cpg CPG_MOD 407>;
100 power-domains = <&sysc 32>; 213 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
101 resets = <&cpg 407>; 214 resets = <&cpg 407>;
102 }; 215 };
103 216
@@ -124,6 +237,20 @@
124 reg = <0 0xe6300000 0 0x20000>; 237 reg = <0 0xe6300000 0 0x20000>;
125 }; 238 };
126 239
240 i2c4: i2c@e6520000 {
241 #address-cells = <1>;
242 #size-cells = <0>;
243 compatible = "renesas,i2c-r8a77470",
244 "renesas,rcar-gen2-i2c";
245 reg = <0 0xe6520000 0 0x40>;
246 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
247 clocks = <&cpg CPG_MOD 927>;
248 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
249 resets = <&cpg 927>;
250 i2c-scl-internal-delay-ns = <6>;
251 status = "disabled";
252 };
253
127 dmac0: dma-controller@e6700000 { 254 dmac0: dma-controller@e6700000 {
128 compatible = "renesas,dmac-r8a77470", 255 compatible = "renesas,dmac-r8a77470",
129 "renesas,rcar-dmac"; 256 "renesas,rcar-dmac";
@@ -151,7 +278,7 @@
151 "ch12", "ch13", "ch14"; 278 "ch12", "ch13", "ch14";
152 clocks = <&cpg CPG_MOD 219>; 279 clocks = <&cpg CPG_MOD 219>;
153 clock-names = "fck"; 280 clock-names = "fck";
154 power-domains = <&sysc 32>; 281 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
155 resets = <&cpg 219>; 282 resets = <&cpg 219>;
156 #dma-cells = <1>; 283 #dma-cells = <1>;
157 dma-channels = <15>; 284 dma-channels = <15>;
@@ -184,7 +311,7 @@
184 "ch12", "ch13", "ch14"; 311 "ch12", "ch13", "ch14";
185 clocks = <&cpg CPG_MOD 218>; 312 clocks = <&cpg CPG_MOD 218>;
186 clock-names = "fck"; 313 clock-names = "fck";
187 power-domains = <&sysc 32>; 314 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
188 resets = <&cpg 218>; 315 resets = <&cpg 218>;
189 #dma-cells = <1>; 316 #dma-cells = <1>;
190 dma-channels = <15>; 317 dma-channels = <15>;
@@ -196,7 +323,7 @@
196 reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>; 323 reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
197 interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>; 324 interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
198 clocks = <&cpg CPG_MOD 812>; 325 clocks = <&cpg CPG_MOD 812>;
199 power-domains = <&sysc 32>; 326 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
200 resets = <&cpg 812>; 327 resets = <&cpg 812>;
201 #address-cells = <1>; 328 #address-cells = <1>;
202 #size-cells = <0>; 329 #size-cells = <0>;
@@ -214,7 +341,7 @@
214 dmas = <&dmac0 0x29>, <&dmac0 0x2a>, 341 dmas = <&dmac0 0x29>, <&dmac0 0x2a>,
215 <&dmac1 0x29>, <&dmac1 0x2a>; 342 <&dmac1 0x29>, <&dmac1 0x2a>;
216 dma-names = "tx", "rx", "tx", "rx"; 343 dma-names = "tx", "rx", "tx", "rx";
217 power-domains = <&sysc 32>; 344 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
218 resets = <&cpg 721>; 345 resets = <&cpg 721>;
219 status = "disabled"; 346 status = "disabled";
220 }; 347 };
@@ -230,7 +357,7 @@
230 dmas = <&dmac0 0x2d>, <&dmac0 0x2e>, 357 dmas = <&dmac0 0x2d>, <&dmac0 0x2e>,
231 <&dmac1 0x2d>, <&dmac1 0x2e>; 358 <&dmac1 0x2d>, <&dmac1 0x2e>;
232 dma-names = "tx", "rx", "tx", "rx"; 359 dma-names = "tx", "rx", "tx", "rx";
233 power-domains = <&sysc 32>; 360 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
234 resets = <&cpg 720>; 361 resets = <&cpg 720>;
235 status = "disabled"; 362 status = "disabled";
236 }; 363 };
@@ -246,7 +373,7 @@
246 dmas = <&dmac0 0x2b>, <&dmac0 0x2c>, 373 dmas = <&dmac0 0x2b>, <&dmac0 0x2c>,
247 <&dmac1 0x2b>, <&dmac1 0x2c>; 374 <&dmac1 0x2b>, <&dmac1 0x2c>;
248 dma-names = "tx", "rx", "tx", "rx"; 375 dma-names = "tx", "rx", "tx", "rx";
249 power-domains = <&sysc 32>; 376 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
250 resets = <&cpg 719>; 377 resets = <&cpg 719>;
251 status = "disabled"; 378 status = "disabled";
252 }; 379 };
@@ -262,7 +389,7 @@
262 dmas = <&dmac0 0x2f>, <&dmac0 0x30>, 389 dmas = <&dmac0 0x2f>, <&dmac0 0x30>,
263 <&dmac1 0x2f>, <&dmac1 0x30>; 390 <&dmac1 0x2f>, <&dmac1 0x30>;
264 dma-names = "tx", "rx", "tx", "rx"; 391 dma-names = "tx", "rx", "tx", "rx";
265 power-domains = <&sysc 32>; 392 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
266 resets = <&cpg 718>; 393 resets = <&cpg 718>;
267 status = "disabled"; 394 status = "disabled";
268 }; 395 };
@@ -278,7 +405,7 @@
278 dmas = <&dmac0 0xfb>, <&dmac0 0xfc>, 405 dmas = <&dmac0 0xfb>, <&dmac0 0xfc>,
279 <&dmac1 0xfb>, <&dmac1 0xfc>; 406 <&dmac1 0xfb>, <&dmac1 0xfc>;
280 dma-names = "tx", "rx", "tx", "rx"; 407 dma-names = "tx", "rx", "tx", "rx";
281 power-domains = <&sysc 32>; 408 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
282 resets = <&cpg 715>; 409 resets = <&cpg 715>;
283 status = "disabled"; 410 status = "disabled";
284 }; 411 };
@@ -294,11 +421,26 @@
294 dmas = <&dmac0 0xfd>, <&dmac0 0xfe>, 421 dmas = <&dmac0 0xfd>, <&dmac0 0xfe>,
295 <&dmac1 0xfd>, <&dmac1 0xfe>; 422 <&dmac1 0xfd>, <&dmac1 0xfe>;
296 dma-names = "tx", "rx", "tx", "rx"; 423 dma-names = "tx", "rx", "tx", "rx";
297 power-domains = <&sysc 32>; 424 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
298 resets = <&cpg 714>; 425 resets = <&cpg 714>;
299 status = "disabled"; 426 status = "disabled";
300 }; 427 };
301 428
429 sdhi2: sd@ee160000 {
430 compatible = "renesas,sdhi-r8a77470",
431 "renesas,rcar-gen2-sdhi";
432 reg = <0 0xee160000 0 0x328>;
433 interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
434 clocks = <&cpg CPG_MOD 312>;
435 dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
436 <&dmac1 0xd3>, <&dmac1 0xd4>;
437 dma-names = "tx", "rx", "tx", "rx";
438 max-frequency = <97500000>;
439 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
440 resets = <&cpg 312>;
441 status = "disabled";
442 };
443
302 gic: interrupt-controller@f1001000 { 444 gic: interrupt-controller@f1001000 {
303 compatible = "arm,gic-400"; 445 compatible = "arm,gic-400";
304 #interrupt-cells = <3>; 446 #interrupt-cells = <3>;
@@ -309,7 +451,7 @@
309 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>; 451 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
310 clocks = <&cpg CPG_MOD 408>; 452 clocks = <&cpg CPG_MOD 408>;
311 clock-names = "clk"; 453 clock-names = "clk";
312 power-domains = <&sysc 32>; 454 power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
313 resets = <&cpg 408>; 455 resets = <&cpg 408>;
314 }; 456 };
315 457
diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts
index de808d2ea856..cecb22924ec4 100644
--- a/arch/arm/boot/dts/r8a7778-bockw.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw.dts
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Reference Device Tree Source for the Bock-W board 3 * Reference Device Tree Source for the R-Car M1A (R8A77781) Bock-W board
4 * 4 *
5 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 6 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index 1bce16cc6b20..05db0ccad7a6 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for Renesas r8a7778 3 * Device Tree Source for the R-Car M1A (R8A77781) SoC
4 * 4 *
5 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 6 * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index a4d0038363f0..abc14e7a4c93 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the Marzen board 3 * Device Tree Source for the R-Car H1 (R8A77790) Marzen board
4 * 4 *
5 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Simon Horman 6 * Copyright (C) 2013 Simon Horman
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
index 6b997bc016ee..3bc133d9489c 100644
--- a/arch/arm/boot/dts/r8a7779.dtsi
+++ b/arch/arm/boot/dts/r8a7779.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for Renesas r8a7779 3 * Device Tree Source for the R-Car H1 (R8A77790) SoC
4 * 4 *
5 * Copyright (C) 2013 Renesas Solutions Corp. 5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Simon Horman 6 * Copyright (C) 2013 Simon Horman
@@ -344,7 +344,7 @@
344 344
345 sata: sata@fc600000 { 345 sata: sata@fc600000 {
346 compatible = "renesas,sata-r8a7779", "renesas,rcar-sata"; 346 compatible = "renesas,sata-r8a7779", "renesas,rcar-sata";
347 reg = <0xfc600000 0x2000>; 347 reg = <0xfc600000 0x200000>;
348 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 348 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
349 clocks = <&mstp1_clks R8A7779_CLK_SATA>; 349 clocks = <&mstp1_clks R8A7779_CLK_SATA>;
350 power-domains = <&sysc R8A7779_PD_ALWAYS_ON>; 350 power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
diff --git a/arch/arm/boot/dts/r8a7790-stout.dts b/arch/arm/boot/dts/r8a7790-stout.dts
index a13a92c26645..629da4cee1b9 100644
--- a/arch/arm/boot/dts/r8a7790-stout.dts
+++ b/arch/arm/boot/dts/r8a7790-stout.dts
@@ -318,6 +318,10 @@
318 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 318 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
319 interrupt-controller; 319 interrupt-controller;
320 320
321 onkey {
322 compatible = "dlg,da9063-onkey";
323 };
324
321 rtc { 325 rtc {
322 compatible = "dlg,da9063-rtc"; 326 compatible = "dlg,da9063-rtc";
323 }; 327 };
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 0925bdca438f..5a2747758f67 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7790 SoC 3 * Device Tree Source for the R-Car H2 (R8A77900) SoC
4 * 4 *
5 * Copyright (C) 2015 Renesas Electronics Corporation 5 * Copyright (C) 2015 Renesas Electronics Corporation
6 * Copyright (C) 2013-2014 Renesas Solutions Corp. 6 * Copyright (C) 2013-2014 Renesas Solutions Corp.
@@ -1559,7 +1559,7 @@
1559 sata0: sata@ee300000 { 1559 sata0: sata@ee300000 {
1560 compatible = "renesas,sata-r8a7790", 1560 compatible = "renesas,sata-r8a7790",
1561 "renesas,rcar-gen2-sata"; 1561 "renesas,rcar-gen2-sata";
1562 reg = <0 0xee300000 0 0x2000>; 1562 reg = <0 0xee300000 0 0x200000>;
1563 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; 1563 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
1564 clocks = <&cpg CPG_MOD 815>; 1564 clocks = <&cpg CPG_MOD 815>;
1565 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 1565 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
@@ -1570,7 +1570,7 @@
1570 sata1: sata@ee500000 { 1570 sata1: sata@ee500000 {
1571 compatible = "renesas,sata-r8a7790", 1571 compatible = "renesas,sata-r8a7790",
1572 "renesas,rcar-gen2-sata"; 1572 "renesas,rcar-gen2-sata";
1573 reg = <0 0xee500000 0 0x2000>; 1573 reg = <0 0xee500000 0 0x200000>;
1574 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; 1574 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
1575 clocks = <&cpg CPG_MOD 814>; 1575 clocks = <&cpg CPG_MOD 814>;
1576 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; 1576 power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index 991ac6feedd5..6f875502453c 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7791 SoC 3 * Device Tree Source for the R-Car M2-W (R8A77910) SoC
4 * 4 *
5 * Copyright (C) 2013-2015 Renesas Electronics Corporation 5 * Copyright (C) 2013-2015 Renesas Electronics Corporation
6 * Copyright (C) 2013-2014 Renesas Solutions Corp. 6 * Copyright (C) 2013-2014 Renesas Solutions Corp.
@@ -1543,7 +1543,7 @@
1543 sata0: sata@ee300000 { 1543 sata0: sata@ee300000 {
1544 compatible = "renesas,sata-r8a7791", 1544 compatible = "renesas,sata-r8a7791",
1545 "renesas,rcar-gen2-sata"; 1545 "renesas,rcar-gen2-sata";
1546 reg = <0 0xee300000 0 0x2000>; 1546 reg = <0 0xee300000 0 0x200000>;
1547 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; 1547 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
1548 clocks = <&cpg CPG_MOD 815>; 1548 clocks = <&cpg CPG_MOD 815>;
1549 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; 1549 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
@@ -1554,7 +1554,7 @@
1554 sata1: sata@ee500000 { 1554 sata1: sata@ee500000 {
1555 compatible = "renesas,sata-r8a7791", 1555 compatible = "renesas,sata-r8a7791",
1556 "renesas,rcar-gen2-sata"; 1556 "renesas,rcar-gen2-sata";
1557 reg = <0 0xee500000 0 0x2000>; 1557 reg = <0 0xee500000 0 0x200000>;
1558 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; 1558 interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
1559 clocks = <&cpg CPG_MOD 814>; 1559 clocks = <&cpg CPG_MOD 814>;
1560 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>; 1560 power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
diff --git a/arch/arm/boot/dts/r8a7792.dtsi b/arch/arm/boot/dts/r8a7792.dtsi
index 63a978ec81cc..8e9eb4b704d3 100644
--- a/arch/arm/boot/dts/r8a7792.dtsi
+++ b/arch/arm/boot/dts/r8a7792.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7792 SoC 3 * Device Tree Source for the R-Car V2H (R8A77920) SoC
4 * 4 *
5 * Copyright (C) 2016 Cogent Embedded Inc. 5 * Copyright (C) 2016 Cogent Embedded Inc.
6 */ 6 */
@@ -829,7 +829,6 @@
829 du: display@feb00000 { 829 du: display@feb00000 {
830 compatible = "renesas,du-r8a7792"; 830 compatible = "renesas,du-r8a7792";
831 reg = <0 0xfeb00000 0 0x40000>; 831 reg = <0 0xfeb00000 0 0x40000>;
832 reg-names = "du";
833 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, 832 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
834 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>; 833 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
835 clocks = <&cpg CPG_MOD 724>, 834 clocks = <&cpg CPG_MOD 724>,
diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
index 6b2f3a4fd13d..f51601af89a2 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -596,6 +596,10 @@
596 status = "okay"; 596 status = "okay";
597}; 597};
598 598
599&cpu0 {
600 cpu0-supply = <&vdd_dvfs>;
601};
602
599&rwdt { 603&rwdt {
600 timeout-sec = <60>; 604 timeout-sec = <60>;
601 status = "okay"; 605 status = "okay";
@@ -725,6 +729,18 @@
725 compatible = "dlg,da9063-watchdog"; 729 compatible = "dlg,da9063-watchdog";
726 }; 730 };
727 }; 731 };
732
733 vdd_dvfs: regulator@68 {
734 compatible = "dlg,da9210";
735 reg = <0x68>;
736 interrupt-parent = <&irqc0>;
737 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
738
739 regulator-min-microvolt = <1000000>;
740 regulator-max-microvolt = <1000000>;
741 regulator-boot-on;
742 regulator-always-on;
743 };
728}; 744};
729 745
730&i2c4 { 746&i2c4 {
diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index 620a570307ff..bf05110fac4e 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7793 SoC 3 * Device Tree Source for the R-Car M2-N (R8A77930) SoC
4 * 4 *
5 * Copyright (C) 2014-2015 Renesas Electronics Corporation 5 * Copyright (C) 2014-2015 Renesas Electronics Corporation
6 */ 6 */
diff --git a/arch/arm/boot/dts/r8a7794-silk.dts b/arch/arm/boot/dts/r8a7794-silk.dts
index daec965889d3..60e91ebfa65d 100644
--- a/arch/arm/boot/dts/r8a7794-silk.dts
+++ b/arch/arm/boot/dts/r8a7794-silk.dts
@@ -405,6 +405,31 @@
405 clock-frequency = <400000>; 405 clock-frequency = <400000>;
406}; 406};
407 407
408&i2c7 {
409 status = "okay";
410 clock-frequency = <100000>;
411
412 pmic@58 {
413 compatible = "dlg,da9063";
414 reg = <0x58>;
415 interrupt-parent = <&gpio3>;
416 interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
417 interrupt-controller;
418
419 onkey {
420 compatible = "dlg,da9063-onkey";
421 };
422
423 rtc {
424 compatible = "dlg,da9063-rtc";
425 };
426
427 wdt {
428 compatible = "dlg,da9063-watchdog";
429 };
430 };
431};
432
408&mmcif0 { 433&mmcif0 {
409 pinctrl-0 = <&mmcif0_pins>; 434 pinctrl-0 = <&mmcif0_pins>;
410 pinctrl-names = "default"; 435 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index ea2ca4bdaf1c..8d797d34816e 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7794 SoC 3 * Device Tree Source for the R-Car E2 (R8A77940) SoC
4 * 4 *
5 * Copyright (C) 2014 Renesas Electronics Corporation 5 * Copyright (C) 2014 Renesas Electronics Corporation
6 * Copyright (C) 2014 Ulrich Hecht 6 * Copyright (C) 2014 Ulrich Hecht
@@ -1349,7 +1349,6 @@
1349 du: display@feb00000 { 1349 du: display@feb00000 {
1350 compatible = "renesas,du-r8a7794"; 1350 compatible = "renesas,du-r8a7794";
1351 reg = <0 0xfeb00000 0 0x40000>; 1351 reg = <0 0xfeb00000 0 0x40000>;
1352 reg-names = "du";
1353 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, 1352 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
1354 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>; 1353 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
1355 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>; 1354 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>;
diff --git a/arch/arm/boot/dts/r9a06g032.dtsi b/arch/arm/boot/dts/r9a06g032.dtsi
index afe29c95a006..eaf94976ed6d 100644
--- a/arch/arm/boot/dts/r9a06g032.dtsi
+++ b/arch/arm/boot/dts/r9a06g032.dtsi
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include <dt-bindings/interrupt-controller/arm-gic.h> 9#include <dt-bindings/interrupt-controller/arm-gic.h>
10#include <dt-bindings/clock/r9a06g032-sysctrl.h>
10 11
11/ { 12/ {
12 compatible = "renesas,r9a06g032"; 13 compatible = "renesas,r9a06g032";
@@ -21,14 +22,14 @@
21 device_type = "cpu"; 22 device_type = "cpu";
22 compatible = "arm,cortex-a7"; 23 compatible = "arm,cortex-a7";
23 reg = <0>; 24 reg = <0>;
24 clocks = <&sysctrl 84>; 25 clocks = <&sysctrl R9A06G032_CLK_A7MP>;
25 }; 26 };
26 27
27 cpu@1 { 28 cpu@1 {
28 device_type = "cpu"; 29 device_type = "cpu";
29 compatible = "arm,cortex-a7"; 30 compatible = "arm,cortex-a7";
30 reg = <1>; 31 reg = <1>;
31 clocks = <&sysctrl 84>; 32 clocks = <&sysctrl R9A06G032_CLK_A7MP>;
32 enable-method = "renesas,r9a06g032-smp"; 33 enable-method = "renesas,r9a06g032-smp";
33 cpu-release-addr = <0 0x4000c204>; 34 cpu-release-addr = <0 0x4000c204>;
34 }; 35 };
@@ -77,13 +78,90 @@
77 }; 78 };
78 79
79 uart0: serial@40060000 { 80 uart0: serial@40060000 {
80 compatible = "snps,dw-apb-uart"; 81 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
81 reg = <0x40060000 0x400>; 82 reg = <0x40060000 0x400>;
82 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 83 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
83 reg-shift = <2>; 84 reg-shift = <2>;
84 reg-io-width = <4>; 85 reg-io-width = <4>;
85 clocks = <&sysctrl 146>; 86 clocks = <&sysctrl R9A06G032_CLK_UART0>, <&sysctrl R9A06G032_HCLK_UART0>;
86 clock-names = "baudclk"; 87 clock-names = "baudclk", "apb_pclk";
88 status = "disabled";
89 };
90
91 uart1: serial@40061000 {
92 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
93 reg = <0x40061000 0x400>;
94 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
95 reg-shift = <2>;
96 reg-io-width = <4>;
97 clocks = <&sysctrl R9A06G032_CLK_UART1>, <&sysctrl R9A06G032_HCLK_UART1>;
98 clock-names = "baudclk", "apb_pclk";
99 status = "disabled";
100 };
101
102 uart2: serial@40062000 {
103 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
104 reg = <0x40062000 0x400>;
105 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
106 reg-shift = <2>;
107 reg-io-width = <4>;
108 clocks = <&sysctrl R9A06G032_CLK_UART2>, <&sysctrl R9A06G032_HCLK_UART2>;
109 clock-names = "baudclk", "apb_pclk";
110 status = "disabled";
111 };
112
113 uart3: serial@50000000 {
114 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
115 reg = <0x50000000 0x400>;
116 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
117 reg-shift = <2>;
118 reg-io-width = <4>;
119 clocks = <&sysctrl R9A06G032_CLK_UART3>, <&sysctrl R9A06G032_HCLK_UART3>;
120 clock-names = "baudclk", "apb_pclk";
121 status = "disabled";
122 };
123
124 uart4: serial@50001000 {
125 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
126 reg = <0x50001000 0x400>;
127 interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
128 reg-shift = <2>;
129 reg-io-width = <4>;
130 clocks = <&sysctrl R9A06G032_CLK_UART4>, <&sysctrl R9A06G032_HCLK_UART4>;
131 clock-names = "baudclk", "apb_pclk";
132 status = "disabled";
133 };
134
135 uart5: serial@50002000 {
136 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
137 reg = <0x50002000 0x400>;
138 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
139 reg-shift = <2>;
140 reg-io-width = <4>;
141 clocks = <&sysctrl R9A06G032_CLK_UART5>, <&sysctrl R9A06G032_HCLK_UART5>;
142 clock-names = "baudclk", "apb_pclk";
143 status = "disabled";
144 };
145
146 uart6: serial@50003000 {
147 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
148 reg = <0x50003000 0x400>;
149 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
150 reg-shift = <2>;
151 reg-io-width = <4>;
152 clocks = <&sysctrl R9A06G032_CLK_UART6>, <&sysctrl R9A06G032_HCLK_UART6>;
153 clock-names = "baudclk", "apb_pclk";
154 status = "disabled";
155 };
156
157 uart7: serial@50004000 {
158 compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
159 reg = <0x50004000 0x400>;
160 interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
161 reg-shift = <2>;
162 reg-io-width = <4>;
163 clocks = <&sysctrl R9A06G032_CLK_UART7>, <&sysctrl R9A06G032_HCLK_UART7>;
164 clock-names = "baudclk", "apb_pclk";
87 status = "disabled"; 165 status = "disabled";
88 }; 166 };
89 167
diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 67358562a6ea..75f454a210d6 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -120,7 +120,7 @@
120 interrupts = <30>; 120 interrupts = <30>;
121 121
122 wakeup-interrupt-controller { 122 wakeup-interrupt-controller {
123 compatible = "samsung,exynos4210-wakeup-eint"; 123 compatible = "samsung,s5pv210-wakeup-eint";
124 interrupts = <16>; 124 interrupts = <16>;
125 interrupt-parent = <&vic0>; 125 interrupt-parent = <&vic0>;
126 }; 126 };
diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index 61f68e5c48e9..843052f14f1c 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -47,6 +47,7 @@
47#include <dt-bindings/dma/at91.h> 47#include <dt-bindings/dma/at91.h>
48#include <dt-bindings/interrupt-controller/irq.h> 48#include <dt-bindings/interrupt-controller/irq.h>
49#include <dt-bindings/clock/at91.h> 49#include <dt-bindings/clock/at91.h>
50#include <dt-bindings/iio/adc/at91-sama5d2_adc.h>
50 51
51/ { 52/ {
52 model = "Atmel SAMA5D2 family SoC"; 53 model = "Atmel SAMA5D2 family SoC";
@@ -58,6 +59,8 @@
58 serial1 = &uart3; 59 serial1 = &uart3;
59 tcb0 = &tcb0; 60 tcb0 = &tcb0;
60 tcb1 = &tcb1; 61 tcb1 = &tcb1;
62 i2s0 = &i2s0;
63 i2s1 = &i2s1;
61 }; 64 };
62 65
63 cpus { 66 cpus {
@@ -84,10 +87,11 @@
84 clocks = <&mck>; 87 clocks = <&mck>;
85 clock-names = "apb_pclk"; 88 clock-names = "apb_pclk";
86 89
87 port { 90 in-ports {
88 etb_in: endpoint { 91 port {
89 slave-mode; 92 etb_in: endpoint {
90 remote-endpoint = <&etm_out>; 93 remote-endpoint = <&etm_out>;
94 };
91 }; 95 };
92 }; 96 };
93 }; 97 };
@@ -99,9 +103,11 @@
99 clocks = <&mck>; 103 clocks = <&mck>;
100 clock-names = "apb_pclk"; 104 clock-names = "apb_pclk";
101 105
102 port { 106 out-ports {
103 etm_out: endpoint { 107 port {
104 remote-endpoint = <&etb_in>; 108 etm_out: endpoint {
109 remote-endpoint = <&etb_in>;
110 };
105 }; 111 };
106 }; 112 };
107 }; 113 };
@@ -323,44 +329,6 @@
323 }; 329 };
324 }; 330 };
325 331
326 nand0: nand@80000000 {
327 compatible = "atmel,sama5d2-nand";
328 #address-cells = <1>;
329 #size-cells = <1>;
330 ranges;
331 reg = < /* EBI CS3 */
332 0x80000000 0x08000000
333 /* SMC PMECC regs */
334 0xf8014070 0x00000490
335 /* SMC PMECC Error Location regs */
336 0xf8014500 0x00000200
337 /* ROM Galois tables */
338 0x00040000 0x00018000
339 >;
340 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 6>;
341 atmel,nand-addr-offset = <21>;
342 atmel,nand-cmd-offset = <22>;
343 atmel,nand-has-dma;
344 atmel,has-pmecc;
345 atmel,pmecc-lookup-table-offset = <0x0 0x8000>;
346 status = "disabled";
347
348 nfc@c0000000 {
349 compatible = "atmel,sama5d3-nfc";
350 #address-cells = <1>;
351 #size-cells = <1>;
352 reg = < /* NFC Command Registers */
353 0xc0000000 0x08000000
354 /* NFC HSMC regs */
355 0xf8014000 0x00000070
356 /* NFC SRAM banks */
357 0x00100000 0x00100000
358 >;
359 clocks = <&hsmc_clk>;
360 atmel,write-by-sram;
361 };
362 };
363
364 sdmmc0: sdio-host@a0000000 { 332 sdmmc0: sdio-host@a0000000 {
365 compatible = "atmel,sama5d2-sdhci"; 333 compatible = "atmel,sama5d2-sdhci";
366 reg = <0xa0000000 0x300>; 334 reg = <0xa0000000 0x300>;
@@ -992,6 +960,24 @@
992 atmel,clk-output-range = <0 100000000>; 960 atmel,clk-output-range = <0 100000000>;
993 }; 961 };
994 }; 962 };
963
964 i2s_clkmux {
965 compatible = "atmel,sama5d2-clk-i2s-mux";
966 #address-cells = <1>;
967 #size-cells = <0>;
968
969 i2s0muxck: i2s0_muxclk {
970 clocks = <&i2s0_clk>, <&i2s0_gclk>;
971 #clock-cells = <0>;
972 reg = <0>;
973 };
974
975 i2s1muxck: i2s1_muxclk {
976 clocks = <&i2s1_clk>, <&i2s1_gclk>;
977 #clock-cells = <0>;
978 reg = <1>;
979 };
980 };
995 }; 981 };
996 982
997 qspi0: spi@f0020000 { 983 qspi0: spi@f0020000 {
@@ -1295,6 +1281,24 @@
1295 clocks = <&clk32k>; 1281 clocks = <&clk32k>;
1296 }; 1282 };
1297 1283
1284 i2s0: i2s@f8050000 {
1285 compatible = "atmel,sama5d2-i2s";
1286 reg = <0xf8050000 0x100>;
1287 interrupts = <54 IRQ_TYPE_LEVEL_HIGH 7>;
1288 dmas = <&dma0
1289 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
1290 AT91_XDMAC_DT_PERID(31))>,
1291 <&dma0
1292 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
1293 AT91_XDMAC_DT_PERID(32))>;
1294 dma-names = "tx", "rx";
1295 clocks = <&i2s0_clk>, <&i2s0_gclk>;
1296 clock-names = "pclk", "gclk";
1297 assigned-clocks = <&i2s0muxck>;
1298 assigned-clock-parents = <&i2s0_gclk>;
1299 status = "disabled";
1300 };
1301
1298 can0: can@f8054000 { 1302 can0: can@f8054000 {
1299 compatible = "bosch,m_can"; 1303 compatible = "bosch,m_can";
1300 reg = <0xf8054000 0x4000>, <0x210000 0x4000>; 1304 reg = <0xf8054000 0x4000>, <0x210000 0x4000>;
@@ -1437,6 +1441,17 @@
1437 atmel,max-sample-rate-hz = <20000000>; 1441 atmel,max-sample-rate-hz = <20000000>;
1438 atmel,startup-time-ms = <4>; 1442 atmel,startup-time-ms = <4>;
1439 atmel,trigger-edge-type = <IRQ_TYPE_EDGE_RISING>; 1443 atmel,trigger-edge-type = <IRQ_TYPE_EDGE_RISING>;
1444 #io-channel-cells = <1>;
1445 status = "disabled";
1446 };
1447
1448 resistive_touch: resistive-touch {
1449 compatible = "resistive-adc-touch";
1450 io-channels = <&adc AT91_SAMA5D2_ADC_X_CHANNEL>,
1451 <&adc AT91_SAMA5D2_ADC_Y_CHANNEL>,
1452 <&adc AT91_SAMA5D2_ADC_P_CHANNEL>;
1453 io-channel-names = "x", "y", "pressure";
1454 touchscreen-min-pressure = <50000>;
1440 status = "disabled"; 1455 status = "disabled";
1441 }; 1456 };
1442 1457
@@ -1488,6 +1503,24 @@
1488 status = "disabled"; 1503 status = "disabled";
1489 }; 1504 };
1490 1505
1506 i2s1: i2s@fc04c000 {
1507 compatible = "atmel,sama5d2-i2s";
1508 reg = <0xfc04c000 0x100>;
1509 interrupts = <55 IRQ_TYPE_LEVEL_HIGH 7>;
1510 dmas = <&dma0
1511 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
1512 AT91_XDMAC_DT_PERID(33))>,
1513 <&dma0
1514 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
1515 AT91_XDMAC_DT_PERID(34))>;
1516 dma-names = "tx", "rx";
1517 clocks = <&i2s1_clk>, <&i2s1_gclk>;
1518 clock-names = "pclk", "gclk";
1519 assigned-clocks = <&i2s1muxck>;
1520 assigned-parrents = <&i2s1_gclk>;
1521 status = "disabled";
1522 };
1523
1491 can1: can@fc050000 { 1524 can1: can@fc050000 {
1492 compatible = "bosch,m_can"; 1525 compatible = "bosch,m_can";
1493 reg = <0xfc050000 0x4000>, <0x210000 0x4000>; 1526 reg = <0xfc050000 0x4000>, <0x210000 0x4000>;
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 92a35a1942b6..7371f2a0460f 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -1323,13 +1323,13 @@
1323 }; 1323 };
1324 }; 1324 };
1325 1325
1326 rstc@fc068600 { 1326 reset_controller: rstc@fc068600 {
1327 compatible = "atmel,sama5d3-rstc", "atmel,at91sam9g45-rstc"; 1327 compatible = "atmel,sama5d3-rstc", "atmel,at91sam9g45-rstc";
1328 reg = <0xfc068600 0x10>; 1328 reg = <0xfc068600 0x10>;
1329 clocks = <&clk32k>; 1329 clocks = <&clk32k>;
1330 }; 1330 };
1331 1331
1332 shdwc@fc068610 { 1332 shutdown_controller: shdwc@fc068610 {
1333 compatible = "atmel,at91sam9x5-shdwc"; 1333 compatible = "atmel,at91sam9x5-shdwc";
1334 reg = <0xfc068610 0x10>; 1334 reg = <0xfc068610 0x10>;
1335 clocks = <&clk32k>; 1335 clocks = <&clk32k>;
@@ -1342,7 +1342,7 @@
1342 clocks = <&h32ck>; 1342 clocks = <&h32ck>;
1343 }; 1343 };
1344 1344
1345 watchdog@fc068640 { 1345 watchdog: watchdog@fc068640 {
1346 compatible = "atmel,sama5d4-wdt"; 1346 compatible = "atmel,sama5d4-wdt";
1347 reg = <0xfc068640 0x10>; 1347 reg = <0xfc068640 0x10>;
1348 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>; 1348 interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>;
@@ -1376,7 +1376,7 @@
1376 }; 1376 };
1377 1377
1378 1378
1379 pinctrl@fc06a000 { 1379 pinctrl: pinctrl@fc06a000 {
1380 #address-cells = <1>; 1380 #address-cells = <1>;
1381 #size-cells = <1>; 1381 #size-cells = <1>;
1382 compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus"; 1382 compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index b38f8c240558..b3ff5a86efdb 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -483,10 +483,17 @@
483 clk-gate = <0xa0 9>; 483 clk-gate = <0xa0 9>;
484 }; 484 };
485 485
486 nand_ecc_clk: nand_ecc_clk {
487 #clock-cells = <0>;
488 compatible = "altr,socfpga-gate-clk";
489 clocks = <&nand_x_clk>;
490 clk-gate = <0xa0 9>;
491 };
492
486 nand_clk: nand_clk { 493 nand_clk: nand_clk {
487 #clock-cells = <0>; 494 #clock-cells = <0>;
488 compatible = "altr,socfpga-gate-clk"; 495 compatible = "altr,socfpga-gate-clk";
489 clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>; 496 clocks = <&nand_x_clk>;
490 clk-gate = <0xa0 10>; 497 clk-gate = <0xa0 10>;
491 fixed-divider = <4>; 498 fixed-divider = <4>;
492 }; 499 };
@@ -754,7 +761,8 @@
754 reg-names = "nand_data", "denali_reg"; 761 reg-names = "nand_data", "denali_reg";
755 interrupts = <0x0 0x90 0x4>; 762 interrupts = <0x0 0x90 0x4>;
756 dma-mask = <0xffffffff>; 763 dma-mask = <0xffffffff>;
757 clocks = <&nand_x_clk>; 764 clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
765 clock-names = "nand", "nand_x", "ecc";
758 status = "disabled"; 766 status = "disabled";
759 }; 767 };
760 768
@@ -841,6 +849,8 @@
841 reg = <0xffc08000 0x1000>; 849 reg = <0xffc08000 0x1000>;
842 clocks = <&l4_sp_clk>; 850 clocks = <&l4_sp_clk>;
843 clock-names = "timer"; 851 clock-names = "timer";
852 resets = <&rst SPTIMER0_RESET>;
853 reset-names = "timer";
844 }; 854 };
845 855
846 timer1: timer1@ffc09000 { 856 timer1: timer1@ffc09000 {
@@ -849,6 +859,8 @@
849 reg = <0xffc09000 0x1000>; 859 reg = <0xffc09000 0x1000>;
850 clocks = <&l4_sp_clk>; 860 clocks = <&l4_sp_clk>;
851 clock-names = "timer"; 861 clock-names = "timer";
862 resets = <&rst SPTIMER1_RESET>;
863 reset-names = "timer";
852 }; 864 };
853 865
854 timer2: timer2@ffd00000 { 866 timer2: timer2@ffd00000 {
@@ -857,6 +869,8 @@
857 reg = <0xffd00000 0x1000>; 869 reg = <0xffd00000 0x1000>;
858 clocks = <&osc1>; 870 clocks = <&osc1>;
859 clock-names = "timer"; 871 clock-names = "timer";
872 resets = <&rst OSC1TIMER0_RESET>;
873 reset-names = "timer";
860 }; 874 };
861 875
862 timer3: timer3@ffd01000 { 876 timer3: timer3@ffd01000 {
@@ -865,6 +879,8 @@
865 reg = <0xffd01000 0x1000>; 879 reg = <0xffd01000 0x1000>;
866 clocks = <&osc1>; 880 clocks = <&osc1>;
867 clock-names = "timer"; 881 clock-names = "timer";
882 resets = <&rst OSC1TIMER1_RESET>;
883 reset-names = "timer";
868 }; 884 };
869 885
870 uart0: serial0@ffc02000 { 886 uart0: serial0@ffc02000 {
diff --git a/arch/arm/boot/dts/socfpga_arria10.dtsi b/arch/arm/boot/dts/socfpga_arria10.dtsi
index a4dcb68f4322..4e0c26423d84 100644
--- a/arch/arm/boot/dts/socfpga_arria10.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria10.dtsi
@@ -377,13 +377,28 @@
377 clk-gate = <0xC8 11>; 377 clk-gate = <0xC8 11>;
378 }; 378 };
379 379
380 nand_clk: nand_clk { 380 nand_x_clk: nand_x_clk {
381 #clock-cells = <0>; 381 #clock-cells = <0>;
382 compatible = "altr,socfpga-a10-gate-clk"; 382 compatible = "altr,socfpga-a10-gate-clk";
383 clocks = <&l4_mp_clk>; 383 clocks = <&l4_mp_clk>;
384 clk-gate = <0xC8 10>; 384 clk-gate = <0xC8 10>;
385 }; 385 };
386 386
387 nand_ecc_clk: nand_ecc_clk {
388 #clock-cells = <0>;
389 compatible = "altr,socfpga-a10-gate-clk";
390 clocks = <&nand_x_clk>;
391 clk-gate = <0xC8 10>;
392 };
393
394 nand_clk: nand_clk {
395 #clock-cells = <0>;
396 compatible = "altr,socfpga-a10-gate-clk";
397 clocks = <&nand_x_clk>;
398 fixed-divider = <4>;
399 clk-gate = <0xC8 10>;
400 };
401
387 spi_m_clk: spi_m_clk { 402 spi_m_clk: spi_m_clk {
388 #clock-cells = <0>; 403 #clock-cells = <0>;
389 compatible = "altr,socfpga-a10-gate-clk"; 404 compatible = "altr,socfpga-a10-gate-clk";
@@ -650,7 +665,8 @@
650 reg-names = "nand_data", "denali_reg"; 665 reg-names = "nand_data", "denali_reg";
651 interrupts = <0 99 4>; 666 interrupts = <0 99 4>;
652 dma-mask = <0xffffffff>; 667 dma-mask = <0xffffffff>;
653 clocks = <&nand_clk>; 668 clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
669 clock-names = "nand", "nand_x", "ecc";
654 status = "disabled"; 670 status = "disabled";
655 }; 671 };
656 672
@@ -760,7 +776,7 @@
760 timer@ffffc600 { 776 timer@ffffc600 {
761 compatible = "arm,cortex-a9-twd-timer"; 777 compatible = "arm,cortex-a9-twd-timer";
762 reg = <0xffffc600 0x100>; 778 reg = <0xffffc600 0x100>;
763 interrupts = <1 13 0xf04>; 779 interrupts = <1 13 0xf01>;
764 clocks = <&mpu_periph_clk>; 780 clocks = <&mpu_periph_clk>;
765 }; 781 };
766 782
@@ -770,6 +786,8 @@
770 reg = <0xffc02700 0x100>; 786 reg = <0xffc02700 0x100>;
771 clocks = <&l4_sp_clk>; 787 clocks = <&l4_sp_clk>;
772 clock-names = "timer"; 788 clock-names = "timer";
789 resets = <&rst SPTIMER0_RESET>;
790 reset-names = "timer";
773 }; 791 };
774 792
775 timer1: timer1@ffc02800 { 793 timer1: timer1@ffc02800 {
@@ -778,6 +796,8 @@
778 reg = <0xffc02800 0x100>; 796 reg = <0xffc02800 0x100>;
779 clocks = <&l4_sp_clk>; 797 clocks = <&l4_sp_clk>;
780 clock-names = "timer"; 798 clock-names = "timer";
799 resets = <&rst SPTIMER1_RESET>;
800 reset-names = "timer";
781 }; 801 };
782 802
783 timer2: timer2@ffd00000 { 803 timer2: timer2@ffd00000 {
@@ -786,6 +806,8 @@
786 reg = <0xffd00000 0x100>; 806 reg = <0xffd00000 0x100>;
787 clocks = <&l4_sys_free_clk>; 807 clocks = <&l4_sys_free_clk>;
788 clock-names = "timer"; 808 clock-names = "timer";
809 resets = <&rst L4SYSTIMER0_RESET>;
810 reset-names = "timer";
789 }; 811 };
790 812
791 timer3: timer3@ffd00100 { 813 timer3: timer3@ffd00100 {
@@ -794,6 +816,8 @@
794 reg = <0xffd01000 0x100>; 816 reg = <0xffd01000 0x100>;
795 clocks = <&l4_sys_free_clk>; 817 clocks = <&l4_sys_free_clk>;
796 clock-names = "timer"; 818 clock-names = "timer";
819 resets = <&rst L4SYSTIMER1_RESET>;
820 reset-names = "timer";
797 }; 821 };
798 822
799 uart0: serial0@ffc02000 { 823 uart0: serial0@ffc02000 {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts
index b280e6494193..31b01a998b2e 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts
@@ -88,7 +88,7 @@
88 status = "okay"; 88 status = "okay";
89 clock-frequency = <100000>; 89 clock-frequency = <100000>;
90 90
91 adxl345: adxl345@0 { 91 adxl345: adxl345@53 {
92 compatible = "adi,adxl345"; 92 compatible = "adi,adxl345";
93 reg = <0x53>; 93 reg = <0x53>;
94 94
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
index 53bf99eef66d..6f5255a7d192 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
@@ -22,7 +22,8 @@
22 compatible = "ebv,socrates", "altr,socfpga-cyclone5", "altr,socfpga"; 22 compatible = "ebv,socrates", "altr,socfpga-cyclone5", "altr,socfpga";
23 23
24 chosen { 24 chosen {
25 bootargs = "console=ttyS0,115200"; 25 bootargs = "earlyprintk";
26 stdout-path = "serial0:115200n8";
26 }; 27 };
27 28
28 memory@0 { 29 memory@0 {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts b/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
index f50b19447de6..e61efe16e79c 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
@@ -54,7 +54,8 @@
54 compatible = "samtec,vining", "altr,socfpga-cyclone5", "altr,socfpga"; 54 compatible = "samtec,vining", "altr,socfpga-cyclone5", "altr,socfpga";
55 55
56 chosen { 56 chosen {
57 bootargs = "console=ttyS0,115200"; 57 bootargs = "earlyprintk";
58 stdout-path = "serial0:115200n8";
58 }; 59 };
59 60
60 memory@0 { 61 memory@0 {
diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index 2310a4e97768..e6ed7c0354a2 100644
--- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
@@ -15,9 +15,14 @@
15#include <dt-bindings/arm/ux500_pm_domains.h> 15#include <dt-bindings/arm/ux500_pm_domains.h>
16#include <dt-bindings/gpio/gpio.h> 16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/clock/ste-ab8500.h> 17#include <dt-bindings/clock/ste-ab8500.h>
18#include "skeleton.dtsi"
19 18
20/ { 19/ {
20 #address-cells = <1>;
21 #size-cells = <1>;
22
23 chosen {
24 };
25
21 cpus { 26 cpus {
22 #address-cells = <1>; 27 #address-cells = <1>;
23 #size-cells = <0>; 28 #size-cells = <0>;
@@ -67,9 +72,11 @@
67 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>; 72 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
68 clock-names = "apb_pclk", "atclk"; 73 clock-names = "apb_pclk", "atclk";
69 cpu = <&CPU0>; 74 cpu = <&CPU0>;
70 port { 75 out-ports {
71 ptm0_out_port: endpoint { 76 port {
72 remote-endpoint = <&funnel_in_port0>; 77 ptm0_out_port: endpoint {
78 remote-endpoint = <&funnel_in_port0>;
79 };
73 }; 80 };
74 }; 81 };
75 }; 82 };
@@ -81,9 +88,11 @@
81 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>; 88 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
82 clock-names = "apb_pclk", "atclk"; 89 clock-names = "apb_pclk", "atclk";
83 cpu = <&CPU1>; 90 cpu = <&CPU1>;
84 port { 91 out-ports {
85 ptm1_out_port: endpoint { 92 port {
86 remote-endpoint = <&funnel_in_port1>; 93 ptm1_out_port: endpoint {
94 remote-endpoint = <&funnel_in_port1>;
95 };
87 }; 96 };
88 }; 97 };
89 }; 98 };
@@ -94,32 +103,29 @@
94 103
95 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>; 104 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
96 clock-names = "apb_pclk", "atclk"; 105 clock-names = "apb_pclk", "atclk";
97 ports { 106 out-ports {
98 #address-cells = <1>; 107 port {
99 #size-cells = <0>;
100
101 /* funnel output ports */
102 port@0 {
103 reg = <0>;
104 funnel_out_port: endpoint { 108 funnel_out_port: endpoint {
105 remote-endpoint = 109 remote-endpoint =
106 <&replicator_in_port0>; 110 <&replicator_in_port0>;
107 }; 111 };
108 }; 112 };
113 };
109 114
110 /* funnel input ports */ 115 in-ports {
111 port@1 { 116 #address-cells = <1>;
117 #size-cells = <0>;
118
119 port@0 {
112 reg = <0>; 120 reg = <0>;
113 funnel_in_port0: endpoint { 121 funnel_in_port0: endpoint {
114 slave-mode;
115 remote-endpoint = <&ptm0_out_port>; 122 remote-endpoint = <&ptm0_out_port>;
116 }; 123 };
117 }; 124 };
118 125
119 port@2 { 126 port@1 {
120 reg = <1>; 127 reg = <1>;
121 funnel_in_port1: endpoint { 128 funnel_in_port1: endpoint {
122 slave-mode;
123 remote-endpoint = <&ptm1_out_port>; 129 remote-endpoint = <&ptm1_out_port>;
124 }; 130 };
125 }; 131 };
@@ -131,11 +137,10 @@
131 clocks = <&prcmu_clk PRCMU_APEATCLK>; 137 clocks = <&prcmu_clk PRCMU_APEATCLK>;
132 clock-names = "atclk"; 138 clock-names = "atclk";
133 139
134 ports { 140 out-ports {
135 #address-cells = <1>; 141 #address-cells = <1>;
136 #size-cells = <0>; 142 #size-cells = <0>;
137 143
138 /* replicator output ports */
139 port@0 { 144 port@0 {
140 reg = <0>; 145 reg = <0>;
141 replicator_out_port0: endpoint { 146 replicator_out_port0: endpoint {
@@ -148,12 +153,11 @@
148 remote-endpoint = <&etb_in_port>; 153 remote-endpoint = <&etb_in_port>;
149 }; 154 };
150 }; 155 };
156 };
151 157
152 /* replicator input port */ 158 in-ports {
153 port@2 { 159 port {
154 reg = <0>;
155 replicator_in_port0: endpoint { 160 replicator_in_port0: endpoint {
156 slave-mode;
157 remote-endpoint = <&funnel_out_port>; 161 remote-endpoint = <&funnel_out_port>;
158 }; 162 };
159 }; 163 };
@@ -166,10 +170,11 @@
166 170
167 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>; 171 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
168 clock-names = "apb_pclk", "atclk"; 172 clock-names = "apb_pclk", "atclk";
169 port { 173 in-ports {
170 tpiu_in_port: endpoint { 174 port {
171 slave-mode; 175 tpiu_in_port: endpoint {
172 remote-endpoint = <&replicator_out_port0>; 176 remote-endpoint = <&replicator_out_port0>;
177 };
173 }; 178 };
174 }; 179 };
175 }; 180 };
@@ -180,10 +185,11 @@
180 185
181 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>; 186 clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
182 clock-names = "apb_pclk", "atclk"; 187 clock-names = "apb_pclk", "atclk";
183 port { 188 in-ports {
184 etb_in_port: endpoint { 189 port {
185 slave-mode; 190 etb_in_port: endpoint {
186 remote-endpoint = <&replicator_out_port1>; 191 remote-endpoint = <&replicator_out_port1>;
192 };
187 }; 193 };
188 }; 194 };
189 }; 195 };
@@ -197,7 +203,7 @@
197 <0xa0410100 0x100>; 203 <0xa0410100 0x100>;
198 }; 204 };
199 205
200 scu@a04100000 { 206 scu@a0410000 {
201 compatible = "arm,cortex-a9-scu"; 207 compatible = "arm,cortex-a9-scu";
202 reg = <0xa0410000 0x100>; 208 reg = <0xa0410000 0x100>;
203 }; 209 };
@@ -487,7 +493,7 @@
487 }; 493 };
488 494
489 prcmu: prcmu@80157000 { 495 prcmu: prcmu@80157000 {
490 compatible = "stericsson,db8500-prcmu"; 496 compatible = "stericsson,db8500-prcmu", "syscon";
491 reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>; 497 reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>;
492 reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm"; 498 reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm";
493 interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>; 499 interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
@@ -878,7 +884,7 @@
878 power-domains = <&pm_domains DOMAIN_VAPE>; 884 power-domains = <&pm_domains DOMAIN_VAPE>;
879 }; 885 };
880 886
881 ssp@80002000 { 887 spi@80002000 {
882 compatible = "arm,pl022", "arm,primecell"; 888 compatible = "arm,pl022", "arm,primecell";
883 reg = <0x80002000 0x1000>; 889 reg = <0x80002000 0x1000>;
884 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; 890 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -892,7 +898,7 @@
892 power-domains = <&pm_domains DOMAIN_VAPE>; 898 power-domains = <&pm_domains DOMAIN_VAPE>;
893 }; 899 };
894 900
895 ssp@80003000 { 901 spi@80003000 {
896 compatible = "arm,pl022", "arm,primecell"; 902 compatible = "arm,pl022", "arm,primecell";
897 reg = <0x80003000 0x1000>; 903 reg = <0x80003000 0x1000>;
898 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; 904 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
index 5c5cea232743..1ec193b0c506 100644
--- a/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
+++ b/arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
@@ -607,16 +607,20 @@
607 607
608 mcde { 608 mcde {
609 lcd_default_mode: lcd_default { 609 lcd_default_mode: lcd_default {
610 default_mux { 610 default_mux1 {
611 /* Mux in VSI0 and all the data lines */ 611 /* Mux in VSI0 and all the data lines */
612 function = "lcd"; 612 function = "lcd";
613 groups = 613 groups =
614 "lcdvsi0_a_1", /* VSI0 for LCD */ 614 "lcdvsi0_a_1", /* VSI0 for LCD */
615 "lcd_d0_d7_a_1", /* Data lines */ 615 "lcd_d0_d7_a_1", /* Data lines */
616 "lcd_d8_d11_a_1", /* TV-out */ 616 "lcd_d8_d11_a_1", /* TV-out */
617 "lcdaclk_b_1", /* Clock line for TV-out */
618 "lcdvsi1_a_1"; /* VSI1 for HDMI */ 617 "lcdvsi1_a_1"; /* VSI1 for HDMI */
619 }; 618 };
619 default_mux2 {
620 function = "lcda";
621 groups =
622 "lcdaclk_b_1"; /* Clock line for TV-out */
623 };
620 default_cfg1 { 624 default_cfg1 {
621 pins = 625 pins =
622 "GPIO68_E1", /* VSI0 */ 626 "GPIO68_E1", /* VSI0 */
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index 9e359e4f342e..feb682a3d363 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -15,6 +15,7 @@
15 15
16/ { 16/ {
17 memory { 17 memory {
18 device_type = "memory";
18 reg = <0x00000000 0x20000000>; 19 reg = <0x00000000 0x20000000>;
19 }; 20 };
20 21
diff --git a/arch/arm/boot/dts/ste-hrefprev60.dtsi b/arch/arm/boot/dts/ste-hrefprev60.dtsi
index 3f14b4df69b4..94eeb7f1c947 100644
--- a/arch/arm/boot/dts/ste-hrefprev60.dtsi
+++ b/arch/arm/boot/dts/ste-hrefprev60.dtsi
@@ -57,7 +57,7 @@
57 }; 57 };
58 }; 58 };
59 59
60 ssp@80002000 { 60 spi@80002000 {
61 /* 61 /*
62 * On the first generation boards, this SSP/SPI port was connected 62 * On the first generation boards, this SSP/SPI port was connected
63 * to the AB8500. 63 * to the AB8500.
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index b0b94d053098..2de3ce79e496 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -26,6 +26,7 @@
26 }; 26 };
27 27
28 memory { 28 memory {
29 device_type = "memory";
29 reg = <0x00000000 0x20000000>; 30 reg = <0x00000000 0x20000000>;
30 }; 31 };
31 32
@@ -376,7 +377,7 @@
376 pinctrl-1 = <&i2c3_sleep_mode>; 377 pinctrl-1 = <&i2c3_sleep_mode>;
377 }; 378 };
378 379
379 ssp@80002000 { 380 spi@80002000 {
380 pinctrl-names = "default"; 381 pinctrl-names = "default";
381 pinctrl-0 = <&ssp0_snowball_mode>; 382 pinctrl-0 = <&ssp0_snowball_mode>;
382 }; 383 };
diff --git a/arch/arm/boot/dts/ste-u300.dts b/arch/arm/boot/dts/ste-u300.dts
index 62ecb6a2fa39..1bd1aba3322f 100644
--- a/arch/arm/boot/dts/ste-u300.dts
+++ b/arch/arm/boot/dts/ste-u300.dts
@@ -442,7 +442,7 @@
442 dma-names = "rx"; 442 dma-names = "rx";
443 }; 443 };
444 444
445 spi: ssp@c0006000 { 445 spi: spi@c0006000 {
446 compatible = "arm,pl022", "arm,primecell"; 446 compatible = "arm,pl022", "arm,primecell";
447 reg = <0xc0006000 0x1000>; 447 reg = <0xc0006000 0x1000>;
448 interrupt-parent = <&vica>; 448 interrupt-parent = <&vica>;
diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts
index 155caa8c002a..4ee6d51d8d1e 100644
--- a/arch/arm/boot/dts/stih410-b2260.dts
+++ b/arch/arm/boot/dts/stih410-b2260.dts
@@ -61,8 +61,11 @@
61 compatible = "simple-audio-card"; 61 compatible = "simple-audio-card";
62 simple-audio-card,name = "STI-B2260"; 62 simple-audio-card,name = "STI-B2260";
63 status = "okay"; 63 status = "okay";
64 #address-cells = <1>;
65 #size-cells = <0>;
64 66
65 simple-audio-card,dai-link0 { 67 simple-audio-card,dai-link@0 {
68 reg = <0>;
66 /* DAC */ 69 /* DAC */
67 format = "i2s"; 70 format = "i2s";
68 mclk-fs = <128>; 71 mclk-fs = <128>;
diff --git a/arch/arm/boot/dts/stihxxx-b2120.dtsi b/arch/arm/boot/dts/stihxxx-b2120.dtsi
index 4dedfcb0fcb3..97e05f55fb6e 100644
--- a/arch/arm/boot/dts/stihxxx-b2120.dtsi
+++ b/arch/arm/boot/dts/stihxxx-b2120.dtsi
@@ -27,8 +27,11 @@
27 compatible = "simple-audio-card"; 27 compatible = "simple-audio-card";
28 simple-audio-card,name = "STI-B2120"; 28 simple-audio-card,name = "STI-B2120";
29 status = "okay"; 29 status = "okay";
30 #address-cells = <1>;
31 #size-cells = <0>;
30 32
31 simple-audio-card,dai-link0 { 33 simple-audio-card,dai-link@0 {
34 reg = <0>;
32 /* HDMI */ 35 /* HDMI */
33 format = "i2s"; 36 format = "i2s";
34 mclk-fs = <128>; 37 mclk-fs = <128>;
@@ -41,7 +44,8 @@
41 }; 44 };
42 }; 45 };
43 46
44 simple-audio-card,dai-link1 { 47 simple-audio-card,dai-link@1 {
48 reg = <1>;
45 /* DAC */ 49 /* DAC */
46 format = "i2s"; 50 format = "i2s";
47 mclk-fs = <256>; 51 mclk-fs = <256>;
@@ -55,7 +59,8 @@
55 }; 59 };
56 }; 60 };
57 61
58 simple-audio-card,dai-link2 { 62 simple-audio-card,dai-link@2 {
63 reg = <2>;
59 /* SPDIF */ 64 /* SPDIF */
60 format = "left_j"; 65 format = "left_j";
61 mclk-fs = <128>; 66 mclk-fs = <128>;
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts
index 7eb786a2d624..ed7d7f46465e 100644
--- a/arch/arm/boot/dts/stm32429i-eval.dts
+++ b/arch/arm/boot/dts/stm32429i-eval.dts
@@ -264,8 +264,7 @@
264&sdio { 264&sdio {
265 status = "okay"; 265 status = "okay";
266 vmmc-supply = <&mmc_vcard>; 266 vmmc-supply = <&mmc_vcard>;
267 cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_HIGH>; 267 cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_LOW>;
268 cd-inverted;
269 pinctrl-names = "default", "opendrain"; 268 pinctrl-names = "default", "opendrain";
270 pinctrl-0 = <&sdio_pins>; 269 pinctrl-0 = <&sdio_pins>;
271 pinctrl-1 = <&sdio_pins_od>; 270 pinctrl-1 = <&sdio_pins_od>;
diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi
index e35d782e7e5f..8d6f028ae285 100644
--- a/arch/arm/boot/dts/stm32f429.dtsi
+++ b/arch/arm/boot/dts/stm32f429.dtsi
@@ -58,7 +58,7 @@
58 clock-frequency = <0>; 58 clock-frequency = <0>;
59 }; 59 };
60 60
61 clk-lse { 61 clk_lse: clk-lse {
62 #clock-cells = <0>; 62 #clock-cells = <0>;
63 compatible = "fixed-clock"; 63 compatible = "fixed-clock";
64 clock-frequency = <32768>; 64 clock-frequency = <32768>;
diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts
index 3ee768cb86fc..7937b43d7788 100644
--- a/arch/arm/boot/dts/stm32f469-disco.dts
+++ b/arch/arm/boot/dts/stm32f469-disco.dts
@@ -210,8 +210,7 @@
210&sdio { 210&sdio {
211 status = "okay"; 211 status = "okay";
212 vmmc-supply = <&mmc_vcard>; 212 vmmc-supply = <&mmc_vcard>;
213 cd-gpios = <&gpiog 2 GPIO_ACTIVE_HIGH>; 213 cd-gpios = <&gpiog 2 GPIO_ACTIVE_LOW>;
214 cd-inverted;
215 broken-cd; 214 broken-cd;
216 pinctrl-names = "default", "opendrain"; 215 pinctrl-names = "default", "opendrain";
217 pinctrl-0 = <&sdio_pins>; 216 pinctrl-0 = <&sdio_pins>;
diff --git a/arch/arm/boot/dts/stm32f746-disco.dts b/arch/arm/boot/dts/stm32f746-disco.dts
index f9ad71f7c807..e3a7bd338d61 100644
--- a/arch/arm/boot/dts/stm32f746-disco.dts
+++ b/arch/arm/boot/dts/stm32f746-disco.dts
@@ -101,8 +101,7 @@
101&sdio1 { 101&sdio1 {
102 status = "okay"; 102 status = "okay";
103 vmmc-supply = <&mmc_vcard>; 103 vmmc-supply = <&mmc_vcard>;
104 cd-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; 104 cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
105 cd-inverted;
106 pinctrl-names = "default", "opendrain"; 105 pinctrl-names = "default", "opendrain";
107 pinctrl-0 = <&sdio_pins_a>; 106 pinctrl-0 = <&sdio_pins_a>;
108 pinctrl-1 = <&sdio_pins_od_a>; 107 pinctrl-1 = <&sdio_pins_od_a>;
diff --git a/arch/arm/boot/dts/stm32f769-disco.dts b/arch/arm/boot/dts/stm32f769-disco.dts
index 677276ba4dbe..483d896e2bc1 100644
--- a/arch/arm/boot/dts/stm32f769-disco.dts
+++ b/arch/arm/boot/dts/stm32f769-disco.dts
@@ -126,8 +126,7 @@
126&sdio2 { 126&sdio2 {
127 status = "okay"; 127 status = "okay";
128 vmmc-supply = <&mmc_vcard>; 128 vmmc-supply = <&mmc_vcard>;
129 cd-gpios = <&gpioi 15 GPIO_ACTIVE_HIGH>; 129 cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>;
130 cd-inverted;
131 broken-cd; 130 broken-cd;
132 pinctrl-names = "default", "opendrain"; 131 pinctrl-names = "default", "opendrain";
133 pinctrl-0 = <&sdio_pins_b>; 132 pinctrl-0 = <&sdio_pins_b>;
diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
index 637beffe5067..cbdd69ca9e7a 100644
--- a/arch/arm/boot/dts/stm32h743.dtsi
+++ b/arch/arm/boot/dts/stm32h743.dtsi
@@ -472,7 +472,7 @@
472 interrupt-parent = <&exti>; 472 interrupt-parent = <&exti>;
473 interrupts = <17 IRQ_TYPE_EDGE_RISING>; 473 interrupts = <17 IRQ_TYPE_EDGE_RISING>;
474 interrupt-names = "alarm"; 474 interrupt-names = "alarm";
475 st,syscfg = <&pwrcfg>; 475 st,syscfg = <&pwrcfg 0x00 0x100>;
476 status = "disabled"; 476 status = "disabled";
477 }; 477 };
478 478
diff --git a/arch/arm/boot/dts/stm32mp157c-ev1.dts b/arch/arm/boot/dts/stm32mp157c-ev1.dts
index 372bc2ea6b92..063ee8ac5dcb 100644
--- a/arch/arm/boot/dts/stm32mp157c-ev1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ev1.dts
@@ -6,6 +6,7 @@
6/dts-v1/; 6/dts-v1/;
7 7
8#include "stm32mp157c-ed1.dts" 8#include "stm32mp157c-ed1.dts"
9#include <dt-bindings/gpio/gpio.h>
9 10
10/ { 11/ {
11 model = "STMicroelectronics STM32MP157C eval daughter on eval mother"; 12 model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -19,6 +20,58 @@
19 serial0 = &uart4; 20 serial0 = &uart4;
20 ethernet0 = &ethernet0; 21 ethernet0 = &ethernet0;
21 }; 22 };
23
24 panel_backlight: panel-backlight {
25 compatible = "gpio-backlight";
26 gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
27 default-on;
28 status = "okay";
29 };
30};
31
32&cec {
33 pinctrl-names = "default";
34 pinctrl-0 = <&cec_pins_a>;
35 status = "okay";
36};
37
38&dsi {
39 #address-cells = <1>;
40 #size-cells = <0>;
41 status = "okay";
42
43 ports {
44 #address-cells = <1>;
45 #size-cells = <0>;
46
47 port@0 {
48 reg = <0>;
49 dsi_in: endpoint {
50 remote-endpoint = <&ltdc_ep0_out>;
51 };
52 };
53
54 port@1 {
55 reg = <1>;
56 dsi_out: endpoint {
57 remote-endpoint = <&dsi_panel_in>;
58 };
59 };
60 };
61
62 panel-dsi@0 {
63 compatible = "raydium,rm68200";
64 reg = <0>;
65 reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
66 backlight = <&panel_backlight>;
67 status = "okay";
68
69 port {
70 dsi_panel_in: endpoint {
71 remote-endpoint = <&dsi_out>;
72 };
73 };
74 };
22}; 75};
23 76
24&ethernet0 { 77&ethernet0 {
@@ -40,12 +93,6 @@
40 }; 93 };
41}; 94};
42 95
43&cec {
44 pinctrl-names = "default";
45 pinctrl-0 = <&cec_pins_a>;
46 status = "okay";
47};
48
49&i2c2 { 96&i2c2 {
50 pinctrl-names = "default"; 97 pinctrl-names = "default";
51 pinctrl-0 = <&i2c2_pins_a>; 98 pinctrl-0 = <&i2c2_pins_a>;
@@ -62,6 +109,20 @@
62 status = "okay"; 109 status = "okay";
63}; 110};
64 111
112&ltdc {
113 status = "okay";
114
115 port {
116 #address-cells = <1>;
117 #size-cells = <0>;
118
119 ltdc_ep0_out: endpoint@0 {
120 reg = <0>;
121 remote-endpoint = <&dsi_in>;
122 };
123 };
124};
125
65&m_can1 { 126&m_can1 {
66 pinctrl-names = "default"; 127 pinctrl-names = "default";
67 pinctrl-0 = <&m_can1_pins_a>; 128 pinctrl-0 = <&m_can1_pins_a>;
diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi
index 661be948ab74..0e5a2f89f2d9 100644
--- a/arch/arm/boot/dts/stm32mp157c.dtsi
+++ b/arch/arm/boot/dts/stm32mp157c.dtsi
@@ -947,7 +947,7 @@
947 dma-requests = <48>; 947 dma-requests = <48>;
948 }; 948 };
949 949
950 qspi: qspi@58003000 { 950 qspi: spi@58003000 {
951 compatible = "st,stm32f469-qspi"; 951 compatible = "st,stm32f469-qspi";
952 reg = <0x58003000 0x1000>, <0x70000000 0x10000000>; 952 reg = <0x58003000 0x1000>, <0x70000000 0x10000000>;
953 reg-names = "qspi", "qspi_mm"; 953 reg-names = "qspi", "qspi_mm";
diff --git a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
index 8acbaab14fe5..d2a2eb8b3f26 100644
--- a/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
@@ -92,7 +92,8 @@
92 */ 92 */
93 clock-frequency = <400000>; 93 clock-frequency = <400000>;
94 94
95 touchscreen: touchscreen { 95 touchscreen: touchscreen@40 {
96 reg = <0x40>;
96 interrupt-parent = <&pio>; 97 interrupt-parent = <&pio>;
97 interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */ 98 interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */
98 pinctrl-names = "default"; 99 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
index 8bfb36651177..9cd65c46720b 100644
--- a/arch/arm/boot/dts/sun5i.dtsi
+++ b/arch/arm/boot/dts/sun5i.dtsi
@@ -108,6 +108,21 @@
108 }; 108 };
109 }; 109 };
110 110
111 reserved-memory {
112 #address-cells = <1>;
113 #size-cells = <1>;
114 ranges;
115
116 /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
117 cma_pool: cma@4a000000 {
118 compatible = "shared-dma-pool";
119 size = <0x6000000>;
120 alloc-ranges = <0x4a000000 0x6000000>;
121 reusable;
122 linux,cma-default;
123 };
124 };
125
111 soc@1c00000 { 126 soc@1c00000 {
112 compatible = "simple-bus"; 127 compatible = "simple-bus";
113 #address-cells = <1>; 128 #address-cells = <1>;
@@ -294,6 +309,17 @@
294 }; 309 };
295 }; 310 };
296 311
312 video-codec@1c0e000 {
313 compatible = "allwinner,sun5i-a13-video-engine";
314 reg = <0x01c0e000 0x1000>;
315 clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
316 <&ccu CLK_DRAM_VE>;
317 clock-names = "ahb", "mod", "ram";
318 resets = <&ccu RST_VE>;
319 interrupts = <53>;
320 allwinner,sram = <&ve_sram 1>;
321 };
322
297 mmc0: mmc@1c0f000 { 323 mmc0: mmc@1c0f000 {
298 compatible = "allwinner,sun5i-a13-mmc"; 324 compatible = "allwinner,sun5i-a13-mmc";
299 reg = <0x01c0f000 0x1000>; 325 reg = <0x01c0f000 0x1000>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 9c52712af241..02e40da9f028 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -174,6 +174,21 @@
174 reg = <0x40000000 0x80000000>; 174 reg = <0x40000000 0x80000000>;
175 }; 175 };
176 176
177 reserved-memory {
178 #address-cells = <1>;
179 #size-cells = <1>;
180 ranges;
181
182 /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
183 cma_pool: cma@4a000000 {
184 compatible = "shared-dma-pool";
185 size = <0x6000000>;
186 alloc-ranges = <0x4a000000 0x6000000>;
187 reusable;
188 linux,cma-default;
189 };
190 };
191
177 timer { 192 timer {
178 compatible = "arm,armv7-timer"; 193 compatible = "arm,armv7-timer";
179 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 194 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -479,6 +494,17 @@
479 }; 494 };
480 }; 495 };
481 496
497 video-codec@1c0e000 {
498 compatible = "allwinner,sun7i-a20-video-engine";
499 reg = <0x01c0e000 0x1000>;
500 clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
501 <&ccu CLK_DRAM_VE>;
502 clock-names = "ahb", "mod", "ram";
503 resets = <&ccu RST_VE>;
504 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
505 allwinner,sram = <&ve_sram 1>;
506 };
507
482 mmc0: mmc@1c0f000 { 508 mmc0: mmc@1c0f000 {
483 compatible = "allwinner,sun7i-a20-mmc"; 509 compatible = "allwinner,sun7i-a20-mmc";
484 reg = <0x01c0f000 0x1000>; 510 reg = <0x01c0f000 0x1000>;
diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 4e92741b24a7..c1cc8f09dd9a 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -190,6 +190,21 @@
190 reg = <0x40000000 0x80000000>; 190 reg = <0x40000000 0x80000000>;
191 }; 191 };
192 192
193 reserved-memory {
194 #address-cells = <1>;
195 #size-cells = <1>;
196 ranges;
197
198 /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
199 cma_pool: cma@4a000000 {
200 compatible = "shared-dma-pool";
201 size = <0x6000000>;
202 alloc-ranges = <0x4a000000 0x6000000>;
203 reusable;
204 linux,cma-default;
205 };
206 };
207
193 sound: sound { 208 sound: sound {
194 compatible = "simple-audio-card"; 209 compatible = "simple-audio-card";
195 simple-audio-card,name = "sun8i-a33-audio"; 210 simple-audio-card,name = "sun8i-a33-audio";
@@ -254,6 +269,17 @@
254 }; 269 };
255 }; 270 };
256 271
272 video-codec@01c0e000 {
273 compatible = "allwinner,sun8i-a33-video-engine";
274 reg = <0x01c0e000 0x1000>;
275 clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
276 <&ccu CLK_DRAM_VE>;
277 clock-names = "ahb", "mod", "ram";
278 resets = <&ccu RST_BUS_VE>;
279 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
280 allwinner,sram = <&ve_sram 1>;
281 };
282
257 crypto: crypto-engine@1c15000 { 283 crypto: crypto-engine@1c15000 {
258 compatible = "allwinner,sun4i-a10-crypto"; 284 compatible = "allwinner,sun4i-a10-crypto";
259 reg = <0x01c15000 0x1000>; 285 reg = <0x01c15000 0x1000>;
diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
index c7ce4158d6c8..742d2946b08b 100644
--- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
@@ -191,6 +191,11 @@
191 status = "okay"; 191 status = "okay";
192}; 192};
193 193
194&r_cir {
195 clock-frequency = <3000000>;
196 status = "okay";
197};
198
194&r_rsb { 199&r_rsb {
195 status = "okay"; 200 status = "okay";
196 201
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 00a02b037320..5617dd387fd3 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -990,6 +990,19 @@
990 reg = <0x1f01c00 0x400>; 990 reg = <0x1f01c00 0x400>;
991 }; 991 };
992 992
993 r_cir: ir@1f02000 {
994 compatible = "allwinner,sun8i-a83t-ir",
995 "allwinner,sun5i-a13-ir";
996 clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
997 clock-names = "apb", "ir";
998 resets = <&r_ccu RST_APB0_IR>;
999 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
1000 reg = <0x01f02000 0x400>;
1001 pinctrl-names = "default";
1002 pinctrl-0 = <&r_cir_pin>;
1003 status = "disabled";
1004 };
1005
993 r_pio: pinctrl@1f02c00 { 1006 r_pio: pinctrl@1f02c00 {
994 compatible = "allwinner,sun8i-a83t-r-pinctrl"; 1007 compatible = "allwinner,sun8i-a83t-r-pinctrl";
995 reg = <0x01f02c00 0x400>; 1008 reg = <0x01f02c00 0x400>;
@@ -1002,6 +1015,11 @@
1002 interrupt-controller; 1015 interrupt-controller;
1003 #interrupt-cells = <3>; 1016 #interrupt-cells = <3>;
1004 1017
1018 r_cir_pin: r-cir-pin {
1019 pins = "PL12";
1020 function = "s_cir_rx";
1021 };
1022
1005 r_rsb_pins: r-rsb-pins { 1023 r_rsb_pins: r-rsb-pins {
1006 pins = "PL0", "PL1"; 1024 pins = "PL0", "PL1";
1007 function = "s_rsb"; 1025 function = "s_rsb";
diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus-v1.2.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus-v1.2.dts
new file mode 100644
index 000000000000..fc4a8c3d084d
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus-v1.2.dts
@@ -0,0 +1,13 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
4 */
5
6/dts-v1/;
7#include "sun8i-h3.dtsi"
8#include "sunxi-bananapi-m2-plus-v1.2.dtsi"
9
10/ {
11 model = "Banana Pi BPI-M2-Plus v1.2 H3";
12 compatible = "bananapi,bpi-m2-plus-v1.2", "allwinner,sun8i-h3";
13};
diff --git a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
index 30540dc8e0c5..195a75da13f1 100644
--- a/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
@@ -42,195 +42,9 @@
42 42
43/dts-v1/; 43/dts-v1/;
44#include "sun8i-h3.dtsi" 44#include "sun8i-h3.dtsi"
45#include "sunxi-common-regulators.dtsi" 45#include "sunxi-bananapi-m2-plus.dtsi"
46
47#include <dt-bindings/gpio/gpio.h>
48#include <dt-bindings/input/input.h>
49 46
50/ { 47/ {
51 model = "Banana Pi BPI-M2-Plus"; 48 model = "Banana Pi BPI-M2-Plus H3";
52 compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3"; 49 compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
53
54 aliases {
55 ethernet0 = &emac;
56 serial0 = &uart0;
57 serial1 = &uart1;
58 };
59
60 chosen {
61 stdout-path = "serial0:115200n8";
62 };
63
64 connector {
65 compatible = "hdmi-connector";
66 type = "a";
67
68 port {
69 hdmi_con_in: endpoint {
70 remote-endpoint = <&hdmi_out_con>;
71 };
72 };
73 };
74
75 leds {
76 compatible = "gpio-leds";
77 pinctrl-names = "default";
78
79 pwr_led {
80 label = "bananapi-m2-plus:red:pwr";
81 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
82 default-state = "on";
83 };
84 };
85
86 gpio_keys {
87 compatible = "gpio-keys";
88 pinctrl-names = "default";
89
90 sw4 {
91 label = "power";
92 linux,code = <BTN_0>;
93 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
94 };
95 };
96
97 reg_gmac_3v3: gmac-3v3 {
98 compatible = "regulator-fixed";
99 regulator-name = "gmac-3v3";
100 regulator-min-microvolt = <3300000>;
101 regulator-max-microvolt = <3300000>;
102 startup-delay-us = <100000>;
103 enable-active-high;
104 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
105 };
106
107 wifi_pwrseq: wifi_pwrseq {
108 compatible = "mmc-pwrseq-simple";
109 pinctrl-names = "default";
110 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
111 };
112};
113
114&de {
115 status = "okay";
116};
117
118&ehci0 {
119 status = "okay";
120};
121
122&ehci1 {
123 status = "okay";
124};
125
126&ehci2 {
127 status = "okay";
128};
129
130&emac {
131 pinctrl-names = "default";
132 pinctrl-0 = <&emac_rgmii_pins>;
133 phy-supply = <&reg_gmac_3v3>;
134 phy-handle = <&ext_rgmii_phy>;
135 phy-mode = "rgmii";
136
137 status = "okay";
138};
139
140&external_mdio {
141 ext_rgmii_phy: ethernet-phy@1 {
142 compatible = "ethernet-phy-ieee802.3-c22";
143 reg = <0>;
144 };
145};
146
147&hdmi {
148 status = "okay";
149};
150
151&hdmi_out {
152 hdmi_out_con: endpoint {
153 remote-endpoint = <&hdmi_con_in>;
154 };
155};
156
157&ir {
158 pinctrl-names = "default";
159 pinctrl-0 = <&ir_pins_a>;
160 status = "okay";
161};
162
163&mmc0 {
164 vmmc-supply = <&reg_vcc3v3>;
165 bus-width = <4>;
166 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
167 status = "okay";
168};
169
170&mmc1 {
171 vmmc-supply = <&reg_vcc3v3>;
172 vqmmc-supply = <&reg_vcc3v3>;
173 mmc-pwrseq = <&wifi_pwrseq>;
174 bus-width = <4>;
175 non-removable;
176 status = "okay";
177
178 brcmf: wifi@1 {
179 reg = <1>;
180 compatible = "brcm,bcm4329-fmac";
181 interrupt-parent = <&pio>;
182 interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
183 interrupt-names = "host-wake";
184 };
185};
186
187&mmc2 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&mmc2_8bit_pins>;
190 vmmc-supply = <&reg_vcc3v3>;
191 vqmmc-supply = <&reg_vcc3v3>;
192 bus-width = <8>;
193 non-removable;
194 status = "okay";
195};
196
197&ohci0 {
198 status = "okay";
199};
200
201&ohci1 {
202 status = "okay";
203};
204
205&ohci2 {
206 status = "okay";
207};
208
209&reg_usb0_vbus {
210 gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
211 status = "okay";
212};
213
214&uart0 {
215 pinctrl-names = "default";
216 pinctrl-0 = <&uart0_pins_a>;
217 status = "okay";
218};
219
220&uart1 {
221 pinctrl-names = "default";
222 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
223 status = "okay";
224};
225
226&usb_otg {
227 dr_mode = "otg";
228 status = "okay";
229};
230
231&usbphy {
232 usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
233 usb0_vbus-supply = <&reg_usb0_vbus>;
234 /* USB host VBUS is on as long as VCC-IO is on */
235 status = "okay";
236}; 50};
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
new file mode 100644
index 000000000000..c834048c325e
--- /dev/null
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts
@@ -0,0 +1,140 @@
1/*
2 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3 * Copyright (C) 2018 Diego Rondini <diego.rondini@kynetics.com>
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
14 *
15 * This file is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively,
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use,
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
42 */
43
44/dts-v1/;
45
46#include "sun8i-h3.dtsi"
47
48#include <dt-bindings/gpio/gpio.h>
49
50/ {
51 model = "OrangePi Zero Plus2 H3";
52 compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3";
53
54 aliases {
55 serial0 = &uart0;
56 };
57
58 chosen {
59 stdout-path = "serial0:115200n8";
60 };
61
62 connector {
63 compatible = "hdmi-connector";
64 type = "a";
65
66 port {
67 hdmi_con_in: endpoint {
68 remote-endpoint = <&hdmi_out_con>;
69 };
70 };
71 };
72
73 reg_vcc3v3: vcc3v3 {
74 compatible = "regulator-fixed";
75 regulator-name = "vcc3v3";
76 regulator-min-microvolt = <3300000>;
77 regulator-max-microvolt = <3300000>;
78 };
79
80 wifi_pwrseq: wifi_pwrseq {
81 compatible = "mmc-pwrseq-simple";
82 pinctrl-names = "default";
83 reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
84 post-power-on-delay-ms = <200>;
85 };
86};
87
88&de {
89 status = "okay";
90};
91
92&hdmi {
93 status = "okay";
94};
95
96&hdmi_out {
97 hdmi_out_con: endpoint {
98 remote-endpoint = <&hdmi_con_in>;
99 };
100};
101
102&mmc0 {
103 vmmc-supply = <&reg_vcc3v3>;
104 bus-width = <4>;
105 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
106 status = "okay";
107};
108
109&mmc1 {
110 vmmc-supply = <&reg_vcc3v3>;
111 vqmmc-supply = <&reg_vcc3v3>;
112 mmc-pwrseq = <&wifi_pwrseq>;
113 bus-width = <4>;
114 non-removable;
115 status = "okay";
116
117 brcmf: wifi@1 {
118 reg = <1>;
119 compatible = "brcm,bcm4329-fmac";
120 interrupt-parent = <&r_pio>;
121 interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>; /* PL7 */
122 interrupt-names = "host-wake";
123 };
124};
125
126&mmc2 {
127 pinctrl-names = "default";
128 pinctrl-0 = <&mmc2_8bit_pins>;
129 vmmc-supply = <&reg_vcc3v3>;
130 bus-width = <8>;
131 non-removable;
132 cap-mmc-hw-reset;
133 status = "okay";
134};
135
136&uart0 {
137 pinctrl-names = "default";
138 pinctrl-0 = <&uart0_pins_a>;
139 status = "okay";
140};
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
index f0096074a467..3ecfabb10151 100644
--- a/arch/arm/boot/dts/sun8i-h3.dtsi
+++ b/arch/arm/boot/dts/sun8i-h3.dtsi
@@ -119,6 +119,20 @@
119 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 119 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
120 }; 120 };
121 121
122 reserved-memory {
123 #address-cells = <1>;
124 #size-cells = <1>;
125 ranges;
126
127 cma_pool: cma@4a000000 {
128 compatible = "shared-dma-pool";
129 size = <0x6000000>;
130 alloc-ranges = <0x4a000000 0x6000000>;
131 reusable;
132 linux,cma-default;
133 };
134 };
135
122 soc { 136 soc {
123 system-control@1c00000 { 137 system-control@1c00000 {
124 compatible = "allwinner,sun8i-h3-system-control"; 138 compatible = "allwinner,sun8i-h3-system-control";
@@ -142,6 +156,17 @@
142 }; 156 };
143 }; 157 };
144 158
159 video-codec@01c0e000 {
160 compatible = "allwinner,sun8i-h3-video-engine";
161 reg = <0x01c0e000 0x1000>;
162 clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
163 <&ccu CLK_DRAM_VE>;
164 clock-names = "ahb", "mod", "ram";
165 resets = <&ccu RST_BUS_VE>;
166 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
167 allwinner,sram = <&ve_sram 1>;
168 };
169
145 mali: gpu@1c40000 { 170 mali: gpu@1c40000 {
146 compatible = "allwinner,sun8i-h3-mali", "arm,mali-400"; 171 compatible = "allwinner,sun8i-h3-mali", "arm,mali-400";
147 reg = <0x01c40000 0x10000>; 172 reg = <0x01c40000 0x10000>;
diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
index c39b9169ea64..438b7b44dab3 100644
--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
@@ -105,6 +105,12 @@
105 }; 105 };
106}; 106};
107 107
108&ahci {
109 ahci-supply = <&reg_dldo4>;
110 phy-supply = <&reg_eldo3>;
111 status = "okay";
112};
113
108&de { 114&de {
109 status = "okay"; 115 status = "okay";
110}; 116};
@@ -159,8 +165,7 @@
159&mmc0 { 165&mmc0 {
160 vmmc-supply = <&reg_dcdc1>; 166 vmmc-supply = <&reg_dcdc1>;
161 bus-width = <4>; 167 bus-width = <4>;
162 cd-gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */ 168 cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
163 cd-inverted;
164 status = "okay"; 169 status = "okay";
165}; 170};
166 171
@@ -251,6 +256,18 @@
251 regulator-name = "vcc-wifi"; 256 regulator-name = "vcc-wifi";
252}; 257};
253 258
259&reg_dldo4 {
260 regulator-min-microvolt = <2500000>;
261 regulator-max-microvolt = <2500000>;
262 regulator-name = "vdd2v5-sata";
263};
264
265&reg_eldo3 {
266 regulator-min-microvolt = <1200000>;
267 regulator-max-microvolt = <1200000>;
268 regulator-name = "vdd1v2-sata";
269};
270
254&tcon_tv0 { 271&tcon_tv0 {
255 status = "okay"; 272 status = "okay";
256}; 273};
diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index ffd9f00f74a4..45ceb943a111 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -529,6 +529,19 @@
529 #size-cells = <0>; 529 #size-cells = <0>;
530 }; 530 };
531 531
532 ahci: sata@1c18000 {
533 compatible = "allwinner,sun8i-r40-ahci";
534 reg = <0x01c18000 0x1000>;
535 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
536 clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>;
537 resets = <&ccu RST_BUS_SATA>;
538 resets-name = "ahci";
539 #address-cells = <1>;
540 #size-cells = <0>;
541 status = "disabled";
542
543 };
544
532 gmac: ethernet@1c50000 { 545 gmac: ethernet@1c50000 {
533 compatible = "allwinner,sun8i-r40-gmac"; 546 compatible = "allwinner,sun8i-r40-gmac";
534 syscon = <&ccu>; 547 syscon = <&ccu>;
diff --git a/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
index 880096c7e252..5e8a95af89b8 100644
--- a/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
+++ b/arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
@@ -69,7 +69,8 @@
69 */ 69 */
70 clock-frequency = <400000>; 70 clock-frequency = <400000>;
71 71
72 touchscreen: touchscreen@0 { 72 touchscreen: touchscreen@40 {
73 reg = <0x40>;
73 interrupt-parent = <&pio>; 74 interrupt-parent = <&pio>;
74 interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */ 75 interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
75 pinctrl-names = "default"; 76 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
index 35859d8f3267..bf97f6244c23 100644
--- a/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
+++ b/arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
@@ -95,7 +95,7 @@
95&i2c0 { 95&i2c0 {
96 status = "okay"; 96 status = "okay";
97 97
98 axp22x: pmic@68 { 98 axp22x: pmic@34 {
99 compatible = "x-powers,axp221"; 99 compatible = "x-powers,axp221";
100 reg = <0x34>; 100 reg = <0x34>;
101 interrupt-parent = <&nmi_intc>; 101 interrupt-parent = <&nmi_intc>;
diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi
index 25591d6883ef..d9532fb1ef65 100644
--- a/arch/arm/boot/dts/sun9i-a80.dtsi
+++ b/arch/arm/boot/dts/sun9i-a80.dtsi
@@ -1196,7 +1196,7 @@
1196 }; 1196 };
1197 }; 1197 };
1198 1198
1199 r_rsb: i2c@8003400 { 1199 r_rsb: rsb@8003400 {
1200 compatible = "allwinner,sun8i-a23-rsb"; 1200 compatible = "allwinner,sun8i-a23-rsb";
1201 reg = <0x08003400 0x400>; 1201 reg = <0x08003400 0x400>;
1202 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; 1202 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi
new file mode 100644
index 000000000000..53edd1faee99
--- /dev/null
+++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi
@@ -0,0 +1,31 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
4 */
5
6#include "sunxi-bananapi-m2-plus.dtsi"
7
8/ {
9 /*
10 * Bananapi M2+ v1.2 uses a GPIO line to change the effective
11 * resistance on the CPU regulator's feedback pin.
12 */
13 reg_vdd_cpux: vdd-cpux {
14 compatible = "regulator-gpio";
15 regulator-name = "vdd-cpux";
16 regulator-type = "voltage";
17 regulator-boot-on;
18 regulator-always-on;
19 regulator-min-microvolt = <1100000>;
20 regulator-max-microvolt = <1300000>;
21 regulator-ramp-delay = <50>; /* 4ms */
22 gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
23 gpios-states = <0x1>;
24 states = <1100000 0x0
25 1300000 0x1>;
26 };
27};
28
29&cpu0 {
30 cpu-supply = <&reg_vdd_cpux>;
31};
diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
new file mode 100644
index 000000000000..b3283aeb5b7d
--- /dev/null
+++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
@@ -0,0 +1,231 @@
1/*
2 * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43#include "sunxi-common-regulators.dtsi"
44
45#include <dt-bindings/gpio/gpio.h>
46#include <dt-bindings/input/input.h>
47
48/ {
49 aliases {
50 ethernet0 = &emac;
51 serial0 = &uart0;
52 serial1 = &uart1;
53 };
54
55 chosen {
56 stdout-path = "serial0:115200n8";
57 };
58
59 connector {
60 compatible = "hdmi-connector";
61 type = "a";
62
63 port {
64 hdmi_con_in: endpoint {
65 remote-endpoint = <&hdmi_out_con>;
66 };
67 };
68 };
69
70 leds {
71 compatible = "gpio-leds";
72 pinctrl-names = "default";
73
74 pwr_led {
75 label = "bananapi-m2-plus:red:pwr";
76 gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
77 default-state = "on";
78 };
79 };
80
81 gpio_keys {
82 compatible = "gpio-keys";
83 pinctrl-names = "default";
84
85 sw4 {
86 label = "power";
87 linux,code = <BTN_0>;
88 gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
89 };
90 };
91
92 reg_gmac_3v3: gmac-3v3 {
93 compatible = "regulator-fixed";
94 regulator-name = "gmac-3v3";
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 startup-delay-us = <100000>;
98 enable-active-high;
99 gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
100 };
101
102 wifi_pwrseq: wifi_pwrseq {
103 compatible = "mmc-pwrseq-simple";
104 pinctrl-names = "default";
105 reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
106 };
107};
108
109&de {
110 status = "okay";
111};
112
113&ehci0 {
114 status = "okay";
115};
116
117&ehci1 {
118 status = "okay";
119};
120
121&ehci2 {
122 status = "okay";
123};
124
125&emac {
126 pinctrl-names = "default";
127 pinctrl-0 = <&emac_rgmii_pins>;
128 phy-supply = <&reg_gmac_3v3>;
129 phy-handle = <&ext_rgmii_phy>;
130 phy-mode = "rgmii";
131
132 status = "okay";
133};
134
135&external_mdio {
136 ext_rgmii_phy: ethernet-phy@1 {
137 compatible = "ethernet-phy-ieee802.3-c22";
138 reg = <1>;
139 };
140};
141
142&hdmi {
143 status = "okay";
144};
145
146&hdmi_out {
147 hdmi_out_con: endpoint {
148 remote-endpoint = <&hdmi_con_in>;
149 };
150};
151
152&ir {
153 pinctrl-names = "default";
154 pinctrl-0 = <&ir_pins_a>;
155 status = "okay";
156};
157
158&mmc0 {
159 vmmc-supply = <&reg_vcc3v3>;
160 bus-width = <4>;
161 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
162 status = "okay";
163};
164
165&mmc1 {
166 vmmc-supply = <&reg_vcc3v3>;
167 vqmmc-supply = <&reg_vcc3v3>;
168 mmc-pwrseq = <&wifi_pwrseq>;
169 bus-width = <4>;
170 non-removable;
171 status = "okay";
172
173 brcmf: wifi@1 {
174 reg = <1>;
175 compatible = "brcm,bcm4329-fmac";
176 interrupt-parent = <&pio>;
177 interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
178 interrupt-names = "host-wake";
179 };
180};
181
182&mmc2 {
183 pinctrl-names = "default";
184 pinctrl-0 = <&mmc2_8bit_pins>;
185 vmmc-supply = <&reg_vcc3v3>;
186 vqmmc-supply = <&reg_vcc3v3>;
187 bus-width = <8>;
188 non-removable;
189 status = "okay";
190};
191
192&ohci0 {
193 status = "okay";
194};
195
196&ohci1 {
197 status = "okay";
198};
199
200&ohci2 {
201 status = "okay";
202};
203
204&reg_usb0_vbus {
205 gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
206 status = "okay";
207};
208
209&uart0 {
210 pinctrl-names = "default";
211 pinctrl-0 = <&uart0_pins_a>;
212 status = "okay";
213};
214
215&uart1 {
216 pinctrl-names = "default";
217 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
218 status = "okay";
219};
220
221&usb_otg {
222 dr_mode = "otg";
223 status = "okay";
224};
225
226&usbphy {
227 usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
228 usb0_vbus-supply = <&reg_usb0_vbus>;
229 /* USB host VBUS is on as long as VCC-IO is on */
230 status = "okay";
231};
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index fc6131315c47..4b1530ebe427 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -816,7 +816,7 @@
816 clock-names = "apb", "ir"; 816 clock-names = "apb", "ir";
817 resets = <&r_ccu RST_APB0_IR>; 817 resets = <&r_ccu RST_APB0_IR>;
818 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 818 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
819 reg = <0x01f02000 0x40>; 819 reg = <0x01f02000 0x400>;
820 status = "disabled"; 820 status = "disabled";
821 }; 821 };
822 822
diff --git a/arch/arm/boot/dts/tegra124-apalis-eval.dts b/arch/arm/boot/dts/tegra124-apalis-eval.dts
index a6ad759dddb4..eaee10ef6512 100644
--- a/arch/arm/boot/dts/tegra124-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-eval.dts
@@ -72,6 +72,7 @@
72 host1x@50000000 { 72 host1x@50000000 {
73 hdmi@54280000 { 73 hdmi@54280000 {
74 status = "okay"; 74 status = "okay";
75 hdmi-supply = <&reg_5v0>;
75 }; 76 };
76 }; 77 };
77 78
@@ -122,7 +123,7 @@
122 /* 123 /*
123 * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID) 124 * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
124 */ 125 */
125 hdmi_ddc: i2c@7000c400 { 126 i2c@7000c400 {
126 status = "okay"; 127 status = "okay";
127 }; 128 };
128 129
@@ -141,29 +142,19 @@
141 spi@7000d400 { 142 spi@7000d400 {
142 status = "okay"; 143 status = "okay";
143 spi-max-frequency = <50000000>; 144 spi-max-frequency = <50000000>;
144
145 spidev0: spidev@0 {
146 compatible = "spidev";
147 reg = <0>;
148 spi-max-frequency = <50000000>;
149 };
150 }; 145 };
151 146
152 /* SPI4: Apalis SPI2 */ 147 /* SPI4: Apalis SPI2 */
153 spi@7000da00 { 148 spi@7000da00 {
154 status = "okay"; 149 status = "okay";
155 spi-max-frequency = <50000000>; 150 spi-max-frequency = <50000000>;
156
157 spidev1: spidev@0 {
158 compatible = "spidev";
159 reg = <0>;
160 spi-max-frequency = <50000000>;
161 };
162 }; 151 };
163 152
164 /* Apalis Serial ATA */ 153 /* Apalis Serial ATA */
165 sata@70020000 { 154 sata@70020000 {
166 status = "okay"; 155 status = "okay";
156 target-5v-supply = <&reg_5v0>;
157 target-12v-supply = <&reg_12v0>;
167 }; 158 };
168 159
169 hda@70030000 { 160 hda@70030000 {
@@ -177,18 +168,18 @@
177 /* Apalis MMC1 */ 168 /* Apalis MMC1 */
178 sdhci@700b0000 { 169 sdhci@700b0000 {
179 status = "okay"; 170 status = "okay";
171 bus-width = <4>;
180 /* MMC1_CD# */ 172 /* MMC1_CD# */
181 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>; 173 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
182 bus-width = <4>;
183 vqmmc-supply = <&vddio_sdmmc1>; 174 vqmmc-supply = <&vddio_sdmmc1>;
184 }; 175 };
185 176
186 /* Apalis SD1 */ 177 /* Apalis SD1 */
187 sdhci@700b0400 { 178 sdhci@700b0400 {
188 status = "okay"; 179 status = "okay";
180 bus-width = <4>;
189 /* SD1_CD# */ 181 /* SD1_CD# */
190 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>; 182 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
191 bus-width = <4>;
192 vqmmc-supply = <&vddio_sdmmc3>; 183 vqmmc-supply = <&vddio_sdmmc3>;
193 }; 184 };
194 185
@@ -225,11 +216,12 @@
225 216
226 backlight: backlight { 217 backlight: backlight {
227 compatible = "pwm-backlight"; 218 compatible = "pwm-backlight";
228 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
229 brightness-levels = <255 231 223 207 191 159 127 0>; 219 brightness-levels = <255 231 223 207 191 159 127 0>;
230 default-brightness-level = <6>; 220 default-brightness-level = <6>;
231 /* BKL1_ON */ 221 /* BKL1_ON */
232 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>; 222 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
223 power-supply = <&reg_3v3>;
224 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
233 }; 225 };
234 226
235 gpio-keys { 227 gpio-keys {
@@ -244,6 +236,13 @@
244 }; 236 };
245 }; 237 };
246 238
239 reg_3v3: regulator-3v3 {
240 compatible = "regulator-fixed";
241 regulator-name = "3.3V_SW";
242 regulator-min-microvolt = <3300000>;
243 regulator-max-microvolt = <3300000>;
244 };
245
247 reg_5v0: regulator-5v0 { 246 reg_5v0: regulator-5v0 {
248 compatible = "regulator-fixed"; 247 compatible = "regulator-fixed";
249 regulator-name = "5V_SW"; 248 regulator-name = "5V_SW";
@@ -251,6 +250,13 @@
251 regulator-max-microvolt = <5000000>; 250 regulator-max-microvolt = <5000000>;
252 }; 251 };
253 252
253 reg_12v0: regulator-12v0 {
254 compatible = "regulator-fixed";
255 regulator-name = "12V_SW";
256 regulator-min-microvolt = <12000000>;
257 regulator-max-microvolt = <12000000>;
258 };
259
254 /* USBO1_EN */ 260 /* USBO1_EN */
255 reg_usbo1_vbus: regulator-usbo1-vbus { 261 reg_usbo1_vbus: regulator-usbo1-vbus {
256 compatible = "regulator-fixed"; 262 compatible = "regulator-fixed";
@@ -276,7 +282,7 @@
276 282
277&gpio { 283&gpio {
278 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */ 284 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
279 pex_perst_n { 285 pex-perst-n {
280 gpio-hog; 286 gpio-hog;
281 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>; 287 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
282 output-high; 288 output-high;
diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts b/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
index 8a8d5fa0ecd1..7961eb4bd803 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
@@ -11,7 +11,8 @@
11/ { 11/ {
12 model = "Toradex Apalis TK1 on Apalis Evaluation Board"; 12 model = "Toradex Apalis TK1 on Apalis Evaluation Board";
13 compatible = "toradex,apalis-tk1-v1.2-eval", "toradex,apalis-tk1-eval", 13 compatible = "toradex,apalis-tk1-v1.2-eval", "toradex,apalis-tk1-eval",
14 "toradex,apalis-tk1", "nvidia,tegra124"; 14 "toradex,apalis-tk1-v1.2", "toradex,apalis-tk1",
15 "nvidia,tegra124";
15 16
16 aliases { 17 aliases {
17 rtc0 = "/i2c@7000c000/rtc@68"; 18 rtc0 = "/i2c@7000c000/rtc@68";
@@ -36,6 +37,7 @@
36 host1x@50000000 { 37 host1x@50000000 {
37 hdmi@54280000 { 38 hdmi@54280000 {
38 status = "okay"; 39 status = "okay";
40 hdmi-supply = <&reg_5v0>;
39 }; 41 };
40 }; 42 };
41 43
@@ -98,7 +100,7 @@
98 * I2C4 (DDC): I2C4_SDA/SCL (DDC) on MXM3 pin 205/207 100 * I2C4 (DDC): I2C4_SDA/SCL (DDC) on MXM3 pin 205/207
99 * (e.g. display EDID) 101 * (e.g. display EDID)
100 */ 102 */
101 hdmi_ddc: i2c@7000c700 { 103 i2c@7000c700 {
102 status = "okay"; 104 status = "okay";
103 }; 105 };
104 106
@@ -106,29 +108,19 @@
106 spi@7000d400 { 108 spi@7000d400 {
107 status = "okay"; 109 status = "okay";
108 spi-max-frequency = <50000000>; 110 spi-max-frequency = <50000000>;
109
110 spidev0: spidev@0 {
111 compatible = "spidev";
112 reg = <0>;
113 spi-max-frequency = <50000000>;
114 };
115 }; 111 };
116 112
117 /* SPI4: Apalis SPI2 */ 113 /* SPI4: Apalis SPI2 */
118 spi@7000da00 { 114 spi@7000da00 {
119 status = "okay"; 115 status = "okay";
120 spi-max-frequency = <50000000>; 116 spi-max-frequency = <50000000>;
121
122 spidev1: spidev@0 {
123 compatible = "spidev";
124 reg = <0>;
125 spi-max-frequency = <50000000>;
126 };
127 }; 117 };
128 118
129 /* Apalis Serial ATA */ 119 /* Apalis Serial ATA */
130 sata@70020000 { 120 sata@70020000 {
131 status = "okay"; 121 status = "okay";
122 target-5v-supply = <&reg_5v0>;
123 target-12v-supply = <&reg_12v0>;
132 }; 124 };
133 125
134 hda@70030000 { 126 hda@70030000 {
@@ -142,18 +134,18 @@
142 /* Apalis MMC1 */ 134 /* Apalis MMC1 */
143 sdhci@700b0000 { 135 sdhci@700b0000 {
144 status = "okay"; 136 status = "okay";
137 bus-width = <4>;
145 /* MMC1_CD# */ 138 /* MMC1_CD# */
146 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>; 139 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
147 bus-width = <4>;
148 vqmmc-supply = <&vddio_sdmmc1>; 140 vqmmc-supply = <&vddio_sdmmc1>;
149 }; 141 };
150 142
151 /* Apalis SD1 */ 143 /* Apalis SD1 */
152 sdhci@700b0400 { 144 sdhci@700b0400 {
153 status = "okay"; 145 status = "okay";
146 bus-width = <4>;
154 /* SD1_CD# */ 147 /* SD1_CD# */
155 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>; 148 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
156 bus-width = <4>;
157 vqmmc-supply = <&vddio_sdmmc3>; 149 vqmmc-supply = <&vddio_sdmmc3>;
158 }; 150 };
159 151
@@ -190,11 +182,12 @@
190 182
191 backlight: backlight { 183 backlight: backlight {
192 compatible = "pwm-backlight"; 184 compatible = "pwm-backlight";
193 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
194 brightness-levels = <255 231 223 207 191 159 127 0>; 185 brightness-levels = <255 231 223 207 191 159 127 0>;
195 default-brightness-level = <6>; 186 default-brightness-level = <6>;
196 /* BKL1_ON */ 187 /* BKL1_ON */
197 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>; 188 enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
189 power-supply = <&reg_3v3>;
190 pwms = <&pwm 3 5000000>; /* BKL1_PWM */
198 }; 191 };
199 192
200 gpio-keys { 193 gpio-keys {
@@ -209,6 +202,13 @@
209 }; 202 };
210 }; 203 };
211 204
205 reg_3v3: regulator-3v3 {
206 compatible = "regulator-fixed";
207 regulator-name = "3.3V_SW";
208 regulator-min-microvolt = <3300000>;
209 regulator-max-microvolt = <3300000>;
210 };
211
212 reg_5v0: regulator-5v0 { 212 reg_5v0: regulator-5v0 {
213 compatible = "regulator-fixed"; 213 compatible = "regulator-fixed";
214 regulator-name = "5V_SW"; 214 regulator-name = "5V_SW";
@@ -216,6 +216,13 @@
216 regulator-max-microvolt = <5000000>; 216 regulator-max-microvolt = <5000000>;
217 }; 217 };
218 218
219 reg_12v0: regulator-12v0 {
220 compatible = "regulator-fixed";
221 regulator-name = "12V_SW";
222 regulator-min-microvolt = <12000000>;
223 regulator-max-microvolt = <12000000>;
224 };
225
219 /* USBO1_EN */ 226 /* USBO1_EN */
220 reg_usbo1_vbus: regulator-usbo1-vbus { 227 reg_usbo1_vbus: regulator-usbo1-vbus {
221 compatible = "regulator-fixed"; 228 compatible = "regulator-fixed";
@@ -241,7 +248,7 @@
241 248
242&gpio { 249&gpio {
243 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */ 250 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
244 pex_perst_n { 251 pex-perst-n {
245 gpio-hog; 252 gpio-hog;
246 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>; 253 gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
247 output-high; 254 output-high;
diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
index 573aaa50fff1..367eb8c86098 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
@@ -11,23 +11,19 @@
11 * Compatible for Revisions 2GB: V1.2A 11 * Compatible for Revisions 2GB: V1.2A
12 */ 12 */
13/ { 13/ {
14 model = "Toradex Apalis TK1";
15 compatible = "toradex,apalis-tk1-v1.2", "toradex,apalis-tk1",
16 "nvidia,tegra124";
17
18 memory@80000000 { 14 memory@80000000 {
19 reg = <0x0 0x80000000 0x0 0x80000000>; 15 reg = <0x0 0x80000000 0x0 0x80000000>;
20 }; 16 };
21 17
22 pcie@1003000 { 18 pcie@1003000 {
23 status = "okay"; 19 status = "okay";
24 avddio-pex-supply = <&vdd_1v05>; 20 avddio-pex-supply = <&reg_1v05_vdd>;
25 avdd-pex-pll-supply = <&vdd_1v05>; 21 avdd-pex-pll-supply = <&reg_1v05_vdd>;
26 avdd-pll-erefe-supply = <&avdd_1v05>; 22 avdd-pll-erefe-supply = <&reg_1v05_avdd>;
27 dvddio-pex-supply = <&vdd_1v05>; 23 dvddio-pex-supply = <&reg_1v05_vdd>;
28 hvdd-pex-pll-e-supply = <&reg_3v3>; 24 hvdd-pex-pll-e-supply = <&reg_module_3v3>;
29 hvdd-pex-supply = <&reg_3v3>; 25 hvdd-pex-supply = <&reg_module_3v3>;
30 vddio-pex-ctl-supply = <&reg_3v3>; 26 vddio-pex-ctl-supply = <&reg_module_3v3>;
31 27
32 /* Apalis PCIe (additional lane Apalis type specific) */ 28 /* Apalis PCIe (additional lane Apalis type specific) */
33 pci@1,0 { 29 pci@1,0 {
@@ -42,16 +38,21 @@
42 phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>; 38 phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
43 phy-names = "pcie-0"; 39 phy-names = "pcie-0";
44 status = "okay"; 40 status = "okay";
41
42 pcie@0 {
43 reg = <0 0 0 0 0>;
44 local-mac-address = [00 00 00 00 00 00];
45 };
45 }; 46 };
46 }; 47 };
47 48
48 host1x@50000000 { 49 host1x@50000000 {
49 hdmi@54280000 { 50 hdmi@54280000 {
50 pll-supply = <&reg_1v05_avdd_hdmi_pll>;
51 vdd-supply = <&reg_3v3_avdd_hdmi>;
52 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 51 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
53 nvidia,hpd-gpio = 52 nvidia,hpd-gpio =
54 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; 53 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
54 pll-supply = <&reg_1v05_avdd_hdmi_pll>;
55 vdd-supply = <&reg_3v3_avdd_hdmi>;
55 }; 56 };
56 }; 57 };
57 58
@@ -60,44 +61,44 @@
60 * Node left disabled on purpose - the bootloader will enable 61 * Node left disabled on purpose - the bootloader will enable
61 * it after having set the VPR up 62 * it after having set the VPR up
62 */ 63 */
63 vdd-supply = <&vdd_gpu>; 64 vdd-supply = <&reg_vdd_gpu>;
64 }; 65 };
65 66
66 pinmux: pinmux@70000868 { 67 pinmux@70000868 {
67 pinctrl-names = "default"; 68 pinctrl-names = "default";
68 pinctrl-0 = <&state_default>; 69 pinctrl-0 = <&state_default>;
69 70
70 state_default: pinmux { 71 state_default: pinmux {
71 /* Analogue Audio (On-module) */ 72 /* Analogue Audio (On-module) */
72 dap3_fs_pp0 { 73 dap3-fs-pp0 {
73 nvidia,pins = "dap3_fs_pp0"; 74 nvidia,pins = "dap3_fs_pp0";
74 nvidia,function = "i2s2"; 75 nvidia,function = "i2s2";
75 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 76 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
76 nvidia,tristate = <TEGRA_PIN_DISABLE>; 77 nvidia,tristate = <TEGRA_PIN_DISABLE>;
77 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 78 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
78 }; 79 };
79 dap3_din_pp1 { 80 dap3-din-pp1 {
80 nvidia,pins = "dap3_din_pp1"; 81 nvidia,pins = "dap3_din_pp1";
81 nvidia,function = "i2s2"; 82 nvidia,function = "i2s2";
82 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 83 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
83 nvidia,tristate = <TEGRA_PIN_ENABLE>; 84 nvidia,tristate = <TEGRA_PIN_ENABLE>;
84 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 85 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
85 }; 86 };
86 dap3_dout_pp2 { 87 dap3-dout-pp2 {
87 nvidia,pins = "dap3_dout_pp2"; 88 nvidia,pins = "dap3_dout_pp2";
88 nvidia,function = "i2s2"; 89 nvidia,function = "i2s2";
89 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 90 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
90 nvidia,tristate = <TEGRA_PIN_DISABLE>; 91 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 92 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
92 }; 93 };
93 dap3_sclk_pp3 { 94 dap3-sclk-pp3 {
94 nvidia,pins = "dap3_sclk_pp3"; 95 nvidia,pins = "dap3_sclk_pp3";
95 nvidia,function = "i2s2"; 96 nvidia,function = "i2s2";
96 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 97 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
97 nvidia,tristate = <TEGRA_PIN_DISABLE>; 98 nvidia,tristate = <TEGRA_PIN_DISABLE>;
98 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 99 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
99 }; 100 };
100 dap_mclk1_pw4 { 101 dap-mclk1-pw4 {
101 nvidia,pins = "dap_mclk1_pw4"; 102 nvidia,pins = "dap_mclk1_pw4";
102 nvidia,function = "extperiph1"; 103 nvidia,function = "extperiph1";
103 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 104 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -124,7 +125,7 @@
124 }; 125 };
125 126
126 /* Apalis CAM1_MCLK */ 127 /* Apalis CAM1_MCLK */
127 cam_mclk_pcc0 { 128 cam-mclk-pcc0 {
128 nvidia,pins = "cam_mclk_pcc0"; 129 nvidia,pins = "cam_mclk_pcc0";
129 nvidia,function = "vi_alt3"; 130 nvidia,function = "vi_alt3";
130 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 131 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -133,28 +134,28 @@
133 }; 134 };
134 135
135 /* Apalis Digital Audio */ 136 /* Apalis Digital Audio */
136 dap2_fs_pa2 { 137 dap2-fs-pa2 {
137 nvidia,pins = "dap2_fs_pa2"; 138 nvidia,pins = "dap2_fs_pa2";
138 nvidia,function = "hda"; 139 nvidia,function = "hda";
139 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 140 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
140 nvidia,tristate = <TEGRA_PIN_DISABLE>; 141 nvidia,tristate = <TEGRA_PIN_DISABLE>;
141 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 142 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
142 }; 143 };
143 dap2_sclk_pa3 { 144 dap2-sclk-pa3 {
144 nvidia,pins = "dap2_sclk_pa3"; 145 nvidia,pins = "dap2_sclk_pa3";
145 nvidia,function = "hda"; 146 nvidia,function = "hda";
146 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 147 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
147 nvidia,tristate = <TEGRA_PIN_DISABLE>; 148 nvidia,tristate = <TEGRA_PIN_DISABLE>;
148 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 149 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
149 }; 150 };
150 dap2_din_pa4 { 151 dap2-din-pa4 {
151 nvidia,pins = "dap2_din_pa4"; 152 nvidia,pins = "dap2_din_pa4";
152 nvidia,function = "hda"; 153 nvidia,function = "hda";
153 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 154 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
154 nvidia,tristate = <TEGRA_PIN_ENABLE>; 155 nvidia,tristate = <TEGRA_PIN_ENABLE>;
155 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 156 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
156 }; 157 };
157 dap2_dout_pa5 { 158 dap2-dout-pa5 {
158 nvidia,pins = "dap2_dout_pa5"; 159 nvidia,pins = "dap2_dout_pa5";
159 nvidia,function = "hda"; 160 nvidia,function = "hda";
160 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 161 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -167,7 +168,7 @@
167 nvidia,tristate = <TEGRA_PIN_DISABLE>; 168 nvidia,tristate = <TEGRA_PIN_DISABLE>;
168 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 169 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
169 }; 170 };
170 clk3_out_pee0 { 171 clk3-out-pee0 {
171 nvidia,pins = "clk3_out_pee0"; 172 nvidia,pins = "clk3_out_pee0";
172 nvidia,function = "extperiph3"; 173 nvidia,function = "extperiph3";
173 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 174 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -176,7 +177,7 @@
176 }; 177 };
177 178
178 /* Apalis GPIO */ 179 /* Apalis GPIO */
179 usb_vbus_en0_pn4 { 180 usb-vbus-en0-pn4 {
180 nvidia,pins = "usb_vbus_en0_pn4"; 181 nvidia,pins = "usb_vbus_en0_pn4";
181 nvidia,function = "rsvd2"; 182 nvidia,function = "rsvd2";
182 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 183 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -184,7 +185,7 @@
184 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 185 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
185 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 186 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
186 }; 187 };
187 usb_vbus_en1_pn5 { 188 usb-vbus-en1-pn5 {
188 nvidia,pins = "usb_vbus_en1_pn5"; 189 nvidia,pins = "usb_vbus_en1_pn5";
189 nvidia,function = "rsvd2"; 190 nvidia,function = "rsvd2";
190 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 191 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -192,35 +193,35 @@
192 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 193 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
193 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 194 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
194 }; 195 };
195 pex_l0_rst_n_pdd1 { 196 pex-l0-rst-n-pdd1 {
196 nvidia,pins = "pex_l0_rst_n_pdd1"; 197 nvidia,pins = "pex_l0_rst_n_pdd1";
197 nvidia,function = "rsvd2"; 198 nvidia,function = "rsvd2";
198 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 199 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
199 nvidia,tristate = <TEGRA_PIN_DISABLE>; 200 nvidia,tristate = <TEGRA_PIN_DISABLE>;
200 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 201 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
201 }; 202 };
202 pex_l0_clkreq_n_pdd2 { 203 pex-l0-clkreq-n-pdd2 {
203 nvidia,pins = "pex_l0_clkreq_n_pdd2"; 204 nvidia,pins = "pex_l0_clkreq_n_pdd2";
204 nvidia,function = "rsvd2"; 205 nvidia,function = "rsvd2";
205 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 206 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
206 nvidia,tristate = <TEGRA_PIN_DISABLE>; 207 nvidia,tristate = <TEGRA_PIN_DISABLE>;
207 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 208 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
208 }; 209 };
209 pex_l1_rst_n_pdd5 { 210 pex-l1-rst-n-pdd5 {
210 nvidia,pins = "pex_l1_rst_n_pdd5"; 211 nvidia,pins = "pex_l1_rst_n_pdd5";
211 nvidia,function = "rsvd2"; 212 nvidia,function = "rsvd2";
212 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 213 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
213 nvidia,tristate = <TEGRA_PIN_DISABLE>; 214 nvidia,tristate = <TEGRA_PIN_DISABLE>;
214 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 215 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
215 }; 216 };
216 pex_l1_clkreq_n_pdd6 { 217 pex-l1-clkreq-n-pdd6 {
217 nvidia,pins = "pex_l1_clkreq_n_pdd6"; 218 nvidia,pins = "pex_l1_clkreq_n_pdd6";
218 nvidia,function = "rsvd2"; 219 nvidia,function = "rsvd2";
219 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 220 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
220 nvidia,tristate = <TEGRA_PIN_DISABLE>; 221 nvidia,tristate = <TEGRA_PIN_DISABLE>;
221 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 222 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
222 }; 223 };
223 dp_hpd_pff0 { 224 dp-hpd-pff0 {
224 nvidia,pins = "dp_hpd_pff0"; 225 nvidia,pins = "dp_hpd_pff0";
225 nvidia,function = "dp"; 226 nvidia,function = "dp";
226 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 227 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -244,7 +245,7 @@
244 }; 245 };
245 246
246 /* Apalis HDMI1_CEC */ 247 /* Apalis HDMI1_CEC */
247 hdmi_cec_pee3 { 248 hdmi-cec-pee3 {
248 nvidia,pins = "hdmi_cec_pee3"; 249 nvidia,pins = "hdmi_cec_pee3";
249 nvidia,function = "cec"; 250 nvidia,function = "cec";
250 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 251 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -254,7 +255,7 @@
254 }; 255 };
255 256
256 /* Apalis HDMI1_HPD */ 257 /* Apalis HDMI1_HPD */
257 hdmi_int_pn7 { 258 hdmi-int-pn7 {
258 nvidia,pins = "hdmi_int_pn7"; 259 nvidia,pins = "hdmi_int_pn7";
259 nvidia,function = "rsvd1"; 260 nvidia,function = "rsvd1";
260 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 261 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -264,7 +265,7 @@
264 }; 265 };
265 266
266 /* Apalis I2C1 */ 267 /* Apalis I2C1 */
267 gen1_i2c_scl_pc4 { 268 gen1-i2c-scl-pc4 {
268 nvidia,pins = "gen1_i2c_scl_pc4"; 269 nvidia,pins = "gen1_i2c_scl_pc4";
269 nvidia,function = "i2c1"; 270 nvidia,function = "i2c1";
270 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 271 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -272,7 +273,7 @@
272 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 273 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
273 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 274 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
274 }; 275 };
275 gen1_i2c_sda_pc5 { 276 gen1-i2c-sda-pc5 {
276 nvidia,pins = "gen1_i2c_sda_pc5"; 277 nvidia,pins = "gen1_i2c_sda_pc5";
277 nvidia,function = "i2c1"; 278 nvidia,function = "i2c1";
278 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 279 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -282,7 +283,7 @@
282 }; 283 };
283 284
284 /* Apalis I2C3 (CAM) */ 285 /* Apalis I2C3 (CAM) */
285 cam_i2c_scl_pbb1 { 286 cam-i2c-scl-pbb1 {
286 nvidia,pins = "cam_i2c_scl_pbb1"; 287 nvidia,pins = "cam_i2c_scl_pbb1";
287 nvidia,function = "i2c3"; 288 nvidia,function = "i2c3";
288 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 289 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -290,7 +291,7 @@
290 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 291 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
291 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 292 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
292 }; 293 };
293 cam_i2c_sda_pbb2 { 294 cam-i2c-sda-pbb2 {
294 nvidia,pins = "cam_i2c_sda_pbb2"; 295 nvidia,pins = "cam_i2c_sda_pbb2";
295 nvidia,function = "i2c3"; 296 nvidia,function = "i2c3";
296 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 297 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -300,7 +301,7 @@
300 }; 301 };
301 302
302 /* Apalis I2C4 (DDC) */ 303 /* Apalis I2C4 (DDC) */
303 ddc_scl_pv4 { 304 ddc-scl-pv4 {
304 nvidia,pins = "ddc_scl_pv4"; 305 nvidia,pins = "ddc_scl_pv4";
305 nvidia,function = "i2c4"; 306 nvidia,function = "i2c4";
306 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 307 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -308,7 +309,7 @@
308 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 309 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
309 nvidia,rcv-sel = <TEGRA_PIN_ENABLE>; 310 nvidia,rcv-sel = <TEGRA_PIN_ENABLE>;
310 }; 311 };
311 ddc_sda_pv5 { 312 ddc-sda-pv5 {
312 nvidia,pins = "ddc_sda_pv5"; 313 nvidia,pins = "ddc_sda_pv5";
313 nvidia,function = "i2c4"; 314 nvidia,function = "i2c4";
314 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 315 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -318,77 +319,77 @@
318 }; 319 };
319 320
320 /* Apalis MMC1 */ 321 /* Apalis MMC1 */
321 sdmmc1_cd_n_pv3 { /* CD# GPIO */ 322 sdmmc1-cd-n-pv3 { /* CD# GPIO */
322 nvidia,pins = "sdmmc1_wp_n_pv3"; 323 nvidia,pins = "sdmmc1_wp_n_pv3";
323 nvidia,function = "sdmmc1"; 324 nvidia,function = "sdmmc1";
324 nvidia,pull = <TEGRA_PIN_PULL_UP>; 325 nvidia,pull = <TEGRA_PIN_PULL_UP>;
325 nvidia,tristate = <TEGRA_PIN_ENABLE>; 326 nvidia,tristate = <TEGRA_PIN_ENABLE>;
326 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 327 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
327 }; 328 };
328 clk2_out_pw5 { /* D5 GPIO */ 329 clk2-out-pw5 { /* D5 GPIO */
329 nvidia,pins = "clk2_out_pw5"; 330 nvidia,pins = "clk2_out_pw5";
330 nvidia,function = "rsvd2"; 331 nvidia,function = "rsvd2";
331 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 332 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
332 nvidia,tristate = <TEGRA_PIN_DISABLE>; 333 nvidia,tristate = <TEGRA_PIN_DISABLE>;
333 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 334 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
334 }; 335 };
335 sdmmc1_dat3_py4 { 336 sdmmc1-dat3-py4 {
336 nvidia,pins = "sdmmc1_dat3_py4"; 337 nvidia,pins = "sdmmc1_dat3_py4";
337 nvidia,function = "sdmmc1"; 338 nvidia,function = "sdmmc1";
338 nvidia,pull = <TEGRA_PIN_PULL_UP>; 339 nvidia,pull = <TEGRA_PIN_PULL_UP>;
339 nvidia,tristate = <TEGRA_PIN_DISABLE>; 340 nvidia,tristate = <TEGRA_PIN_DISABLE>;
340 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 341 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
341 }; 342 };
342 sdmmc1_dat2_py5 { 343 sdmmc1-dat2-py5 {
343 nvidia,pins = "sdmmc1_dat2_py5"; 344 nvidia,pins = "sdmmc1_dat2_py5";
344 nvidia,function = "sdmmc1"; 345 nvidia,function = "sdmmc1";
345 nvidia,pull = <TEGRA_PIN_PULL_UP>; 346 nvidia,pull = <TEGRA_PIN_PULL_UP>;
346 nvidia,tristate = <TEGRA_PIN_DISABLE>; 347 nvidia,tristate = <TEGRA_PIN_DISABLE>;
347 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 348 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
348 }; 349 };
349 sdmmc1_dat1_py6 { 350 sdmmc1-dat1-py6 {
350 nvidia,pins = "sdmmc1_dat1_py6"; 351 nvidia,pins = "sdmmc1_dat1_py6";
351 nvidia,function = "sdmmc1"; 352 nvidia,function = "sdmmc1";
352 nvidia,pull = <TEGRA_PIN_PULL_UP>; 353 nvidia,pull = <TEGRA_PIN_PULL_UP>;
353 nvidia,tristate = <TEGRA_PIN_DISABLE>; 354 nvidia,tristate = <TEGRA_PIN_DISABLE>;
354 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 355 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
355 }; 356 };
356 sdmmc1_dat0_py7 { 357 sdmmc1-dat0-py7 {
357 nvidia,pins = "sdmmc1_dat0_py7"; 358 nvidia,pins = "sdmmc1_dat0_py7";
358 nvidia,function = "sdmmc1"; 359 nvidia,function = "sdmmc1";
359 nvidia,pull = <TEGRA_PIN_PULL_UP>; 360 nvidia,pull = <TEGRA_PIN_PULL_UP>;
360 nvidia,tristate = <TEGRA_PIN_DISABLE>; 361 nvidia,tristate = <TEGRA_PIN_DISABLE>;
361 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 362 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
362 }; 363 };
363 sdmmc1_clk_pz0 { 364 sdmmc1-clk-pz0 {
364 nvidia,pins = "sdmmc1_clk_pz0"; 365 nvidia,pins = "sdmmc1_clk_pz0";
365 nvidia,function = "sdmmc1"; 366 nvidia,function = "sdmmc1";
366 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 367 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
367 nvidia,tristate = <TEGRA_PIN_DISABLE>; 368 nvidia,tristate = <TEGRA_PIN_DISABLE>;
368 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 369 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
369 }; 370 };
370 sdmmc1_cmd_pz1 { 371 sdmmc1-cmd-pz1 {
371 nvidia,pins = "sdmmc1_cmd_pz1"; 372 nvidia,pins = "sdmmc1_cmd_pz1";
372 nvidia,function = "sdmmc1"; 373 nvidia,function = "sdmmc1";
373 nvidia,pull = <TEGRA_PIN_PULL_UP>; 374 nvidia,pull = <TEGRA_PIN_PULL_UP>;
374 nvidia,tristate = <TEGRA_PIN_DISABLE>; 375 nvidia,tristate = <TEGRA_PIN_DISABLE>;
375 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 376 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
376 }; 377 };
377 clk2_req_pcc5 { /* D4 GPIO */ 378 clk2-req-pcc5 { /* D4 GPIO */
378 nvidia,pins = "clk2_req_pcc5"; 379 nvidia,pins = "clk2_req_pcc5";
379 nvidia,function = "rsvd2"; 380 nvidia,function = "rsvd2";
380 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 381 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
381 nvidia,tristate = <TEGRA_PIN_DISABLE>; 382 nvidia,tristate = <TEGRA_PIN_DISABLE>;
382 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 383 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
383 }; 384 };
384 sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */ 385 sdmmc3-clk-lb-in-pee5 { /* D6 GPIO */
385 nvidia,pins = "sdmmc3_clk_lb_in_pee5"; 386 nvidia,pins = "sdmmc3_clk_lb_in_pee5";
386 nvidia,function = "rsvd2"; 387 nvidia,function = "rsvd2";
387 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 388 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
388 nvidia,tristate = <TEGRA_PIN_DISABLE>; 389 nvidia,tristate = <TEGRA_PIN_DISABLE>;
389 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 390 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
390 }; 391 };
391 usb_vbus_en2_pff1 { /* D7 GPIO */ 392 usb-vbus-en2-pff1 { /* D7 GPIO */
392 nvidia,pins = "usb_vbus_en2_pff1"; 393 nvidia,pins = "usb_vbus_en2_pff1";
393 nvidia,function = "rsvd2"; 394 nvidia,function = "rsvd2";
394 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 395 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -428,7 +429,7 @@
428 }; 429 };
429 430
430 /* Apalis SATA1_ACT# */ 431 /* Apalis SATA1_ACT# */
431 dap1_dout_pn2 { 432 dap1-dout-pn2 {
432 nvidia,pins = "dap1_dout_pn2"; 433 nvidia,pins = "dap1_dout_pn2";
433 nvidia,function = "gmi"; 434 nvidia,function = "gmi";
434 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 435 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -437,49 +438,49 @@
437 }; 438 };
438 439
439 /* Apalis SD1 */ 440 /* Apalis SD1 */
440 sdmmc3_clk_pa6 { 441 sdmmc3-clk-pa6 {
441 nvidia,pins = "sdmmc3_clk_pa6"; 442 nvidia,pins = "sdmmc3_clk_pa6";
442 nvidia,function = "sdmmc3"; 443 nvidia,function = "sdmmc3";
443 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 444 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
444 nvidia,tristate = <TEGRA_PIN_DISABLE>; 445 nvidia,tristate = <TEGRA_PIN_DISABLE>;
445 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 446 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
446 }; 447 };
447 sdmmc3_cmd_pa7 { 448 sdmmc3-cmd-pa7 {
448 nvidia,pins = "sdmmc3_cmd_pa7"; 449 nvidia,pins = "sdmmc3_cmd_pa7";
449 nvidia,function = "sdmmc3"; 450 nvidia,function = "sdmmc3";
450 nvidia,pull = <TEGRA_PIN_PULL_UP>; 451 nvidia,pull = <TEGRA_PIN_PULL_UP>;
451 nvidia,tristate = <TEGRA_PIN_DISABLE>; 452 nvidia,tristate = <TEGRA_PIN_DISABLE>;
452 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 453 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
453 }; 454 };
454 sdmmc3_dat3_pb4 { 455 sdmmc3-dat3-pb4 {
455 nvidia,pins = "sdmmc3_dat3_pb4"; 456 nvidia,pins = "sdmmc3_dat3_pb4";
456 nvidia,function = "sdmmc3"; 457 nvidia,function = "sdmmc3";
457 nvidia,pull = <TEGRA_PIN_PULL_UP>; 458 nvidia,pull = <TEGRA_PIN_PULL_UP>;
458 nvidia,tristate = <TEGRA_PIN_DISABLE>; 459 nvidia,tristate = <TEGRA_PIN_DISABLE>;
459 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 460 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
460 }; 461 };
461 sdmmc3_dat2_pb5 { 462 sdmmc3-dat2-pb5 {
462 nvidia,pins = "sdmmc3_dat2_pb5"; 463 nvidia,pins = "sdmmc3_dat2_pb5";
463 nvidia,function = "sdmmc3"; 464 nvidia,function = "sdmmc3";
464 nvidia,pull = <TEGRA_PIN_PULL_UP>; 465 nvidia,pull = <TEGRA_PIN_PULL_UP>;
465 nvidia,tristate = <TEGRA_PIN_DISABLE>; 466 nvidia,tristate = <TEGRA_PIN_DISABLE>;
466 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 467 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
467 }; 468 };
468 sdmmc3_dat1_pb6 { 469 sdmmc3-dat1-pb6 {
469 nvidia,pins = "sdmmc3_dat1_pb6"; 470 nvidia,pins = "sdmmc3_dat1_pb6";
470 nvidia,function = "sdmmc3"; 471 nvidia,function = "sdmmc3";
471 nvidia,pull = <TEGRA_PIN_PULL_UP>; 472 nvidia,pull = <TEGRA_PIN_PULL_UP>;
472 nvidia,tristate = <TEGRA_PIN_DISABLE>; 473 nvidia,tristate = <TEGRA_PIN_DISABLE>;
473 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 474 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
474 }; 475 };
475 sdmmc3_dat0_pb7 { 476 sdmmc3-dat0-pb7 {
476 nvidia,pins = "sdmmc3_dat0_pb7"; 477 nvidia,pins = "sdmmc3_dat0_pb7";
477 nvidia,function = "sdmmc3"; 478 nvidia,function = "sdmmc3";
478 nvidia,pull = <TEGRA_PIN_PULL_UP>; 479 nvidia,pull = <TEGRA_PIN_PULL_UP>;
479 nvidia,tristate = <TEGRA_PIN_DISABLE>; 480 nvidia,tristate = <TEGRA_PIN_DISABLE>;
480 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 481 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
481 }; 482 };
482 sdmmc3_cd_n_pv2 { /* CD# GPIO */ 483 sdmmc3-cd-n-pv2 { /* CD# GPIO */
483 nvidia,pins = "sdmmc3_cd_n_pv2"; 484 nvidia,pins = "sdmmc3_cd_n_pv2";
484 nvidia,function = "rsvd3"; 485 nvidia,function = "rsvd3";
485 nvidia,pull = <TEGRA_PIN_PULL_UP>; 486 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -488,14 +489,14 @@
488 }; 489 };
489 490
490 /* Apalis SPDIF */ 491 /* Apalis SPDIF */
491 spdif_out_pk5 { 492 spdif-out-pk5 {
492 nvidia,pins = "spdif_out_pk5"; 493 nvidia,pins = "spdif_out_pk5";
493 nvidia,function = "spdif"; 494 nvidia,function = "spdif";
494 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 495 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
495 nvidia,tristate = <TEGRA_PIN_DISABLE>; 496 nvidia,tristate = <TEGRA_PIN_DISABLE>;
496 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 497 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
497 }; 498 };
498 spdif_in_pk6 { 499 spdif-in-pk6 {
499 nvidia,pins = "spdif_in_pk6"; 500 nvidia,pins = "spdif_in_pk6";
500 nvidia,function = "spdif"; 501 nvidia,function = "spdif";
501 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 502 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -504,28 +505,28 @@
504 }; 505 };
505 506
506 /* Apalis SPI1 */ 507 /* Apalis SPI1 */
507 ulpi_clk_py0 { 508 ulpi-clk-py0 {
508 nvidia,pins = "ulpi_clk_py0"; 509 nvidia,pins = "ulpi_clk_py0";
509 nvidia,function = "spi1"; 510 nvidia,function = "spi1";
510 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 511 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
511 nvidia,tristate = <TEGRA_PIN_DISABLE>; 512 nvidia,tristate = <TEGRA_PIN_DISABLE>;
512 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 513 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
513 }; 514 };
514 ulpi_dir_py1 { 515 ulpi-dir-py1 {
515 nvidia,pins = "ulpi_dir_py1"; 516 nvidia,pins = "ulpi_dir_py1";
516 nvidia,function = "spi1"; 517 nvidia,function = "spi1";
517 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 518 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
518 nvidia,tristate = <TEGRA_PIN_ENABLE>; 519 nvidia,tristate = <TEGRA_PIN_ENABLE>;
519 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 520 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
520 }; 521 };
521 ulpi_nxt_py2 { 522 ulpi-nxt-py2 {
522 nvidia,pins = "ulpi_nxt_py2"; 523 nvidia,pins = "ulpi_nxt_py2";
523 nvidia,function = "spi1"; 524 nvidia,function = "spi1";
524 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 525 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
525 nvidia,tristate = <TEGRA_PIN_DISABLE>; 526 nvidia,tristate = <TEGRA_PIN_DISABLE>;
526 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 527 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
527 }; 528 };
528 ulpi_stp_py3 { 529 ulpi-stp-py3 {
529 nvidia,pins = "ulpi_stp_py3"; 530 nvidia,pins = "ulpi_stp_py3";
530 nvidia,function = "spi1"; 531 nvidia,function = "spi1";
531 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 532 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -578,42 +579,42 @@
578 nvidia,tristate = <TEGRA_PIN_ENABLE>; 579 nvidia,tristate = <TEGRA_PIN_ENABLE>;
579 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 580 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
580 }; 581 };
581 uart1_txd_pu0 { 582 uart1-txd-pu0 {
582 nvidia,pins = "pu0"; 583 nvidia,pins = "pu0";
583 nvidia,function = "uarta"; 584 nvidia,function = "uarta";
584 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 585 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
585 nvidia,tristate = <TEGRA_PIN_DISABLE>; 586 nvidia,tristate = <TEGRA_PIN_DISABLE>;
586 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 587 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
587 }; 588 };
588 uart1_rxd_pu1 { 589 uart1-rxd-pu1 {
589 nvidia,pins = "pu1"; 590 nvidia,pins = "pu1";
590 nvidia,function = "uarta"; 591 nvidia,function = "uarta";
591 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 592 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
592 nvidia,tristate = <TEGRA_PIN_ENABLE>; 593 nvidia,tristate = <TEGRA_PIN_ENABLE>;
593 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 594 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
594 }; 595 };
595 uart1_cts_n_pu2 { 596 uart1-cts-n-pu2 {
596 nvidia,pins = "pu2"; 597 nvidia,pins = "pu2";
597 nvidia,function = "uarta"; 598 nvidia,function = "uarta";
598 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 599 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
599 nvidia,tristate = <TEGRA_PIN_ENABLE>; 600 nvidia,tristate = <TEGRA_PIN_ENABLE>;
600 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 601 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
601 }; 602 };
602 uart1_rts_n_pu3 { 603 uart1-rts-n-pu3 {
603 nvidia,pins = "pu3"; 604 nvidia,pins = "pu3";
604 nvidia,function = "uarta"; 605 nvidia,function = "uarta";
605 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 606 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
606 nvidia,tristate = <TEGRA_PIN_DISABLE>; 607 nvidia,tristate = <TEGRA_PIN_DISABLE>;
607 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 608 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
608 }; 609 };
609 uart3_cts_n_pa1 { /* DSR GPIO */ 610 uart3-cts-n-pa1 { /* DSR GPIO */
610 nvidia,pins = "uart3_cts_n_pa1"; 611 nvidia,pins = "uart3_cts_n_pa1";
611 nvidia,function = "gmi"; 612 nvidia,function = "gmi";
612 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 613 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
613 nvidia,tristate = <TEGRA_PIN_ENABLE>; 614 nvidia,tristate = <TEGRA_PIN_ENABLE>;
614 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 615 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
615 }; 616 };
616 uart3_rts_n_pc0 { /* DTR GPIO */ 617 uart3-rts-n-pc0 { /* DTR GPIO */
617 nvidia,pins = "uart3_rts_n_pc0"; 618 nvidia,pins = "uart3_rts_n_pc0";
618 nvidia,function = "gmi"; 619 nvidia,function = "gmi";
619 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 620 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -622,28 +623,28 @@
622 }; 623 };
623 624
624 /* Apalis UART2 */ 625 /* Apalis UART2 */
625 uart2_txd_pc2 { 626 uart2-txd-pc2 {
626 nvidia,pins = "uart2_txd_pc2"; 627 nvidia,pins = "uart2_txd_pc2";
627 nvidia,function = "irda"; 628 nvidia,function = "irda";
628 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 629 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
629 nvidia,tristate = <TEGRA_PIN_DISABLE>; 630 nvidia,tristate = <TEGRA_PIN_DISABLE>;
630 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 631 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
631 }; 632 };
632 uart2_rxd_pc3 { 633 uart2-rxd-pc3 {
633 nvidia,pins = "uart2_rxd_pc3"; 634 nvidia,pins = "uart2_rxd_pc3";
634 nvidia,function = "irda"; 635 nvidia,function = "irda";
635 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 636 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
636 nvidia,tristate = <TEGRA_PIN_ENABLE>; 637 nvidia,tristate = <TEGRA_PIN_ENABLE>;
637 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 638 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
638 }; 639 };
639 uart2_cts_n_pj5 { 640 uart2-cts-n-pj5 {
640 nvidia,pins = "uart2_cts_n_pj5"; 641 nvidia,pins = "uart2_cts_n_pj5";
641 nvidia,function = "uartb"; 642 nvidia,function = "uartb";
642 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 643 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
643 nvidia,tristate = <TEGRA_PIN_ENABLE>; 644 nvidia,tristate = <TEGRA_PIN_ENABLE>;
644 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 645 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
645 }; 646 };
646 uart2_rts_n_pj6 { 647 uart2-rts-n-pj6 {
647 nvidia,pins = "uart2_rts_n_pj6"; 648 nvidia,pins = "uart2_rts_n_pj6";
648 nvidia,function = "uartb"; 649 nvidia,function = "uartb";
649 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 650 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -652,14 +653,14 @@
652 }; 653 };
653 654
654 /* Apalis UART3 */ 655 /* Apalis UART3 */
655 uart3_txd_pw6 { 656 uart3-txd-pw6 {
656 nvidia,pins = "uart3_txd_pw6"; 657 nvidia,pins = "uart3_txd_pw6";
657 nvidia,function = "uartc"; 658 nvidia,function = "uartc";
658 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 659 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
659 nvidia,tristate = <TEGRA_PIN_DISABLE>; 660 nvidia,tristate = <TEGRA_PIN_DISABLE>;
660 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 661 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
661 }; 662 };
662 uart3_rxd_pw7 { 663 uart3-rxd-pw7 {
663 nvidia,pins = "uart3_rxd_pw7"; 664 nvidia,pins = "uart3_rxd_pw7";
664 nvidia,function = "uartc"; 665 nvidia,function = "uartc";
665 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 666 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -668,14 +669,14 @@
668 }; 669 };
669 670
670 /* Apalis UART4 */ 671 /* Apalis UART4 */
671 uart4_rxd_pb0 { 672 uart4-rxd-pb0 {
672 nvidia,pins = "pb0"; 673 nvidia,pins = "pb0";
673 nvidia,function = "uartd"; 674 nvidia,function = "uartd";
674 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 675 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
675 nvidia,tristate = <TEGRA_PIN_ENABLE>; 676 nvidia,tristate = <TEGRA_PIN_ENABLE>;
676 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 677 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
677 }; 678 };
678 uart4_txd_pj7 { 679 uart4-txd-pj7 {
679 nvidia,pins = "pj7"; 680 nvidia,pins = "pj7";
680 nvidia,function = "uartd"; 681 nvidia,function = "uartd";
681 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 682 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -684,7 +685,7 @@
684 }; 685 };
685 686
686 /* Apalis USBH_EN */ 687 /* Apalis USBH_EN */
687 gen2_i2c_sda_pt6 { 688 gen2-i2c-sda-pt6 {
688 nvidia,pins = "gen2_i2c_sda_pt6"; 689 nvidia,pins = "gen2_i2c_sda_pt6";
689 nvidia,function = "rsvd2"; 690 nvidia,function = "rsvd2";
690 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 691 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -703,7 +704,7 @@
703 }; 704 };
704 705
705 /* Apalis USBO1_EN */ 706 /* Apalis USBO1_EN */
706 gen2_i2c_scl_pt5 { 707 gen2-i2c-scl-pt5 {
707 nvidia,pins = "gen2_i2c_scl_pt5"; 708 nvidia,pins = "gen2_i2c_scl_pt5";
708 nvidia,function = "rsvd2"; 709 nvidia,function = "rsvd2";
709 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 710 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -722,7 +723,7 @@
722 }; 723 };
723 724
724 /* Apalis WAKE1_MICO */ 725 /* Apalis WAKE1_MICO */
725 pex_wake_n_pdd3 { 726 pex-wake-n-pdd3 {
726 nvidia,pins = "pex_wake_n_pdd3"; 727 nvidia,pins = "pex_wake_n_pdd3";
727 nvidia,function = "rsvd2"; 728 nvidia,function = "rsvd2";
728 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 729 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -731,7 +732,7 @@
731 }; 732 };
732 733
733 /* CORE_PWR_REQ */ 734 /* CORE_PWR_REQ */
734 core_pwr_req { 735 core-pwr-req {
735 nvidia,pins = "core_pwr_req"; 736 nvidia,pins = "core_pwr_req";
736 nvidia,function = "pwron"; 737 nvidia,function = "pwron";
737 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 738 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -740,7 +741,7 @@
740 }; 741 };
741 742
742 /* CPU_PWR_REQ */ 743 /* CPU_PWR_REQ */
743 cpu_pwr_req { 744 cpu-pwr-req {
744 nvidia,pins = "cpu_pwr_req"; 745 nvidia,pins = "cpu_pwr_req";
745 nvidia,function = "cpu"; 746 nvidia,function = "cpu";
746 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 747 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -749,14 +750,14 @@
749 }; 750 };
750 751
751 /* DVFS */ 752 /* DVFS */
752 dvfs_pwm_px0 { 753 dvfs-pwm-px0 {
753 nvidia,pins = "dvfs_pwm_px0"; 754 nvidia,pins = "dvfs_pwm_px0";
754 nvidia,function = "cldvfs"; 755 nvidia,function = "cldvfs";
755 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 756 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
756 nvidia,tristate = <TEGRA_PIN_DISABLE>; 757 nvidia,tristate = <TEGRA_PIN_DISABLE>;
757 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 758 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
758 }; 759 };
759 dvfs_clk_px2 { 760 dvfs-clk-px2 {
760 nvidia,pins = "dvfs_clk_px2"; 761 nvidia,pins = "dvfs_clk_px2";
761 nvidia,function = "cldvfs"; 762 nvidia,function = "cldvfs";
762 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 763 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -765,70 +766,70 @@
765 }; 766 };
766 767
767 /* eMMC */ 768 /* eMMC */
768 sdmmc4_dat0_paa0 { 769 sdmmc4-dat0-paa0 {
769 nvidia,pins = "sdmmc4_dat0_paa0"; 770 nvidia,pins = "sdmmc4_dat0_paa0";
770 nvidia,function = "sdmmc4"; 771 nvidia,function = "sdmmc4";
771 nvidia,pull = <TEGRA_PIN_PULL_UP>; 772 nvidia,pull = <TEGRA_PIN_PULL_UP>;
772 nvidia,tristate = <TEGRA_PIN_DISABLE>; 773 nvidia,tristate = <TEGRA_PIN_DISABLE>;
773 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 774 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
774 }; 775 };
775 sdmmc4_dat1_paa1 { 776 sdmmc4-dat1-paa1 {
776 nvidia,pins = "sdmmc4_dat1_paa1"; 777 nvidia,pins = "sdmmc4_dat1_paa1";
777 nvidia,function = "sdmmc4"; 778 nvidia,function = "sdmmc4";
778 nvidia,pull = <TEGRA_PIN_PULL_UP>; 779 nvidia,pull = <TEGRA_PIN_PULL_UP>;
779 nvidia,tristate = <TEGRA_PIN_DISABLE>; 780 nvidia,tristate = <TEGRA_PIN_DISABLE>;
780 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 781 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
781 }; 782 };
782 sdmmc4_dat2_paa2 { 783 sdmmc4-dat2-paa2 {
783 nvidia,pins = "sdmmc4_dat2_paa2"; 784 nvidia,pins = "sdmmc4_dat2_paa2";
784 nvidia,function = "sdmmc4"; 785 nvidia,function = "sdmmc4";
785 nvidia,pull = <TEGRA_PIN_PULL_UP>; 786 nvidia,pull = <TEGRA_PIN_PULL_UP>;
786 nvidia,tristate = <TEGRA_PIN_DISABLE>; 787 nvidia,tristate = <TEGRA_PIN_DISABLE>;
787 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 788 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
788 }; 789 };
789 sdmmc4_dat3_paa3 { 790 sdmmc4-dat3-paa3 {
790 nvidia,pins = "sdmmc4_dat3_paa3"; 791 nvidia,pins = "sdmmc4_dat3_paa3";
791 nvidia,function = "sdmmc4"; 792 nvidia,function = "sdmmc4";
792 nvidia,pull = <TEGRA_PIN_PULL_UP>; 793 nvidia,pull = <TEGRA_PIN_PULL_UP>;
793 nvidia,tristate = <TEGRA_PIN_DISABLE>; 794 nvidia,tristate = <TEGRA_PIN_DISABLE>;
794 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 795 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
795 }; 796 };
796 sdmmc4_dat4_paa4 { 797 sdmmc4-dat4-paa4 {
797 nvidia,pins = "sdmmc4_dat4_paa4"; 798 nvidia,pins = "sdmmc4_dat4_paa4";
798 nvidia,function = "sdmmc4"; 799 nvidia,function = "sdmmc4";
799 nvidia,pull = <TEGRA_PIN_PULL_UP>; 800 nvidia,pull = <TEGRA_PIN_PULL_UP>;
800 nvidia,tristate = <TEGRA_PIN_DISABLE>; 801 nvidia,tristate = <TEGRA_PIN_DISABLE>;
801 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 802 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
802 }; 803 };
803 sdmmc4_dat5_paa5 { 804 sdmmc4-dat5-paa5 {
804 nvidia,pins = "sdmmc4_dat5_paa5"; 805 nvidia,pins = "sdmmc4_dat5_paa5";
805 nvidia,function = "sdmmc4"; 806 nvidia,function = "sdmmc4";
806 nvidia,pull = <TEGRA_PIN_PULL_UP>; 807 nvidia,pull = <TEGRA_PIN_PULL_UP>;
807 nvidia,tristate = <TEGRA_PIN_DISABLE>; 808 nvidia,tristate = <TEGRA_PIN_DISABLE>;
808 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 809 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
809 }; 810 };
810 sdmmc4_dat6_paa6 { 811 sdmmc4-dat6-paa6 {
811 nvidia,pins = "sdmmc4_dat6_paa6"; 812 nvidia,pins = "sdmmc4_dat6_paa6";
812 nvidia,function = "sdmmc4"; 813 nvidia,function = "sdmmc4";
813 nvidia,pull = <TEGRA_PIN_PULL_UP>; 814 nvidia,pull = <TEGRA_PIN_PULL_UP>;
814 nvidia,tristate = <TEGRA_PIN_DISABLE>; 815 nvidia,tristate = <TEGRA_PIN_DISABLE>;
815 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 816 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
816 }; 817 };
817 sdmmc4_dat7_paa7 { 818 sdmmc4-dat7-paa7 {
818 nvidia,pins = "sdmmc4_dat7_paa7"; 819 nvidia,pins = "sdmmc4_dat7_paa7";
819 nvidia,function = "sdmmc4"; 820 nvidia,function = "sdmmc4";
820 nvidia,pull = <TEGRA_PIN_PULL_UP>; 821 nvidia,pull = <TEGRA_PIN_PULL_UP>;
821 nvidia,tristate = <TEGRA_PIN_DISABLE>; 822 nvidia,tristate = <TEGRA_PIN_DISABLE>;
822 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 823 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
823 }; 824 };
824 sdmmc4_clk_pcc4 { 825 sdmmc4-clk-pcc4 {
825 nvidia,pins = "sdmmc4_clk_pcc4"; 826 nvidia,pins = "sdmmc4_clk_pcc4";
826 nvidia,function = "sdmmc4"; 827 nvidia,function = "sdmmc4";
827 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 828 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
828 nvidia,tristate = <TEGRA_PIN_DISABLE>; 829 nvidia,tristate = <TEGRA_PIN_DISABLE>;
829 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 830 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
830 }; 831 };
831 sdmmc4_cmd_pt7 { 832 sdmmc4-cmd-pt7 {
832 nvidia,pins = "sdmmc4_cmd_pt7"; 833 nvidia,pins = "sdmmc4_cmd_pt7";
833 nvidia,function = "sdmmc4"; 834 nvidia,function = "sdmmc4";
834 nvidia,pull = <TEGRA_PIN_PULL_UP>; 835 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -837,7 +838,7 @@
837 }; 838 };
838 839
839 /* JTAG_RTCK */ 840 /* JTAG_RTCK */
840 jtag_rtck { 841 jtag-rtck {
841 nvidia,pins = "jtag_rtck"; 842 nvidia,pins = "jtag_rtck";
842 nvidia,function = "rtck"; 843 nvidia,function = "rtck";
843 nvidia,pull = <TEGRA_PIN_PULL_UP>; 844 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -846,7 +847,7 @@
846 }; 847 };
847 848
848 /* LAN_DEV_OFF# */ 849 /* LAN_DEV_OFF# */
849 ulpi_data5_po6 { 850 ulpi-data5-po6 {
850 nvidia,pins = "ulpi_data5_po6"; 851 nvidia,pins = "ulpi_data5_po6";
851 nvidia,function = "ulpi"; 852 nvidia,function = "ulpi";
852 nvidia,pull = <TEGRA_PIN_PULL_UP>; 853 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -855,7 +856,7 @@
855 }; 856 };
856 857
857 /* LAN_RESET# */ 858 /* LAN_RESET# */
858 kb_row10_ps2 { 859 kb-row10-ps2 {
859 nvidia,pins = "kb_row10_ps2"; 860 nvidia,pins = "kb_row10_ps2";
860 nvidia,function = "rsvd2"; 861 nvidia,function = "rsvd2";
861 nvidia,pull = <TEGRA_PIN_PULL_UP>; 862 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -864,7 +865,7 @@
864 }; 865 };
865 866
866 /* LAN_WAKE# */ 867 /* LAN_WAKE# */
867 ulpi_data4_po5 { 868 ulpi-data4-po5 {
868 nvidia,pins = "ulpi_data4_po5"; 869 nvidia,pins = "ulpi_data4_po5";
869 nvidia,function = "ulpi"; 870 nvidia,function = "ulpi";
870 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 871 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -918,35 +919,35 @@
918 }; 919 };
919 920
920 /* MCU SPI */ 921 /* MCU SPI */
921 gpio_x4_aud_px4 { 922 gpio-x4-aud-px4 {
922 nvidia,pins = "gpio_x4_aud_px4"; 923 nvidia,pins = "gpio_x4_aud_px4";
923 nvidia,function = "spi2"; 924 nvidia,function = "spi2";
924 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 925 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
925 nvidia,tristate = <TEGRA_PIN_DISABLE>; 926 nvidia,tristate = <TEGRA_PIN_DISABLE>;
926 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 927 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
927 }; 928 };
928 gpio_x5_aud_px5 { 929 gpio-x5-aud-px5 {
929 nvidia,pins = "gpio_x5_aud_px5"; 930 nvidia,pins = "gpio_x5_aud_px5";
930 nvidia,function = "spi2"; 931 nvidia,function = "spi2";
931 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 932 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
932 nvidia,tristate = <TEGRA_PIN_DISABLE>; 933 nvidia,tristate = <TEGRA_PIN_DISABLE>;
933 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 934 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
934 }; 935 };
935 gpio_x6_aud_px6 { /* MCU_CS */ 936 gpio-x6-aud-px6 { /* MCU_CS */
936 nvidia,pins = "gpio_x6_aud_px6"; 937 nvidia,pins = "gpio_x6_aud_px6";
937 nvidia,function = "spi2"; 938 nvidia,function = "spi2";
938 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 939 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
939 nvidia,tristate = <TEGRA_PIN_DISABLE>; 940 nvidia,tristate = <TEGRA_PIN_DISABLE>;
940 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 941 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
941 }; 942 };
942 gpio_x7_aud_px7 { 943 gpio-x7-aud-px7 {
943 nvidia,pins = "gpio_x7_aud_px7"; 944 nvidia,pins = "gpio_x7_aud_px7";
944 nvidia,function = "spi2"; 945 nvidia,function = "spi2";
945 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 946 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
946 nvidia,tristate = <TEGRA_PIN_ENABLE>; 947 nvidia,tristate = <TEGRA_PIN_ENABLE>;
947 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 948 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
948 }; 949 };
949 gpio_w2_aud_pw2 { /* MCU_CSEZP */ 950 gpio-w2-aud-pw2 { /* MCU_CSEZP */
950 nvidia,pins = "gpio_w2_aud_pw2"; 951 nvidia,pins = "gpio_w2_aud_pw2";
951 nvidia,function = "spi2"; 952 nvidia,function = "spi2";
952 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 953 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -955,7 +956,7 @@
955 }; 956 };
956 957
957 /* PMIC_CLK_32K */ 958 /* PMIC_CLK_32K */
958 clk_32k_in { 959 clk-32k-in {
959 nvidia,pins = "clk_32k_in"; 960 nvidia,pins = "clk_32k_in";
960 nvidia,function = "clk"; 961 nvidia,function = "clk";
961 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 962 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -964,7 +965,7 @@
964 }; 965 };
965 966
966 /* PMIC_CPU_OC_INT */ 967 /* PMIC_CPU_OC_INT */
967 clk_32k_out_pa0 { 968 clk-32k-out-pa0 {
968 nvidia,pins = "clk_32k_out_pa0"; 969 nvidia,pins = "clk_32k_out_pa0";
969 nvidia,function = "soc"; 970 nvidia,function = "soc";
970 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 971 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -973,7 +974,7 @@
973 }; 974 };
974 975
975 /* PWR_I2C */ 976 /* PWR_I2C */
976 pwr_i2c_scl_pz6 { 977 pwr-i2c-scl-pz6 {
977 nvidia,pins = "pwr_i2c_scl_pz6"; 978 nvidia,pins = "pwr_i2c_scl_pz6";
978 nvidia,function = "i2cpwr"; 979 nvidia,function = "i2cpwr";
979 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 980 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -981,7 +982,7 @@
981 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 982 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
982 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 983 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
983 }; 984 };
984 pwr_i2c_sda_pz7 { 985 pwr-i2c-sda-pz7 {
985 nvidia,pins = "pwr_i2c_sda_pz7"; 986 nvidia,pins = "pwr_i2c_sda_pz7";
986 nvidia,function = "i2cpwr"; 987 nvidia,function = "i2cpwr";
987 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 988 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -991,7 +992,7 @@
991 }; 992 };
992 993
993 /* PWR_INT_N */ 994 /* PWR_INT_N */
994 pwr_int_n { 995 pwr-int-n {
995 nvidia,pins = "pwr_int_n"; 996 nvidia,pins = "pwr_int_n";
996 nvidia,function = "pmi"; 997 nvidia,function = "pmi";
997 nvidia,pull = <TEGRA_PIN_PULL_UP>; 998 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1009,7 +1010,7 @@
1009 }; 1010 };
1010 1011
1011 /* RESET_OUT_N */ 1012 /* RESET_OUT_N */
1012 reset_out_n { 1013 reset-out-n {
1013 nvidia,pins = "reset_out_n"; 1014 nvidia,pins = "reset_out_n";
1014 nvidia,function = "reset_out_n"; 1015 nvidia,function = "reset_out_n";
1015 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1016 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1018,14 +1019,14 @@
1018 }; 1019 };
1019 1020
1020 /* SHIFT_CTRL_DIR_IN */ 1021 /* SHIFT_CTRL_DIR_IN */
1021 kb_row0_pr0 { 1022 kb-row0-pr0 {
1022 nvidia,pins = "kb_row0_pr0"; 1023 nvidia,pins = "kb_row0_pr0";
1023 nvidia,function = "rsvd2"; 1024 nvidia,function = "rsvd2";
1024 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1025 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1025 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1026 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1026 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1027 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1027 }; 1028 };
1028 kb_row1_pr1 { 1029 kb-row1-pr1 {
1029 nvidia,pins = "kb_row1_pr1"; 1030 nvidia,pins = "kb_row1_pr1";
1030 nvidia,function = "rsvd2"; 1031 nvidia,function = "rsvd2";
1031 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1032 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1034,7 +1035,7 @@
1034 }; 1035 };
1035 1036
1036 /* Configure level-shifter as output for HDA */ 1037 /* Configure level-shifter as output for HDA */
1037 kb_row11_ps3 { 1038 kb-row11-ps3 {
1038 nvidia,pins = "kb_row11_ps3"; 1039 nvidia,pins = "kb_row11_ps3";
1039 nvidia,function = "rsvd2"; 1040 nvidia,function = "rsvd2";
1040 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1041 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1043,21 +1044,21 @@
1043 }; 1044 };
1044 1045
1045 /* SHIFT_CTRL_DIR_OUT */ 1046 /* SHIFT_CTRL_DIR_OUT */
1046 kb_col5_pq5 { 1047 kb-col5-pq5 {
1047 nvidia,pins = "kb_col5_pq5"; 1048 nvidia,pins = "kb_col5_pq5";
1048 nvidia,function = "rsvd2"; 1049 nvidia,function = "rsvd2";
1049 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1050 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1050 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1051 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1051 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1052 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1052 }; 1053 };
1053 kb_col6_pq6 { 1054 kb-col6-pq6 {
1054 nvidia,pins = "kb_col6_pq6"; 1055 nvidia,pins = "kb_col6_pq6";
1055 nvidia,function = "rsvd2"; 1056 nvidia,function = "rsvd2";
1056 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1057 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1057 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1058 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1058 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1059 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1059 }; 1060 };
1060 kb_col7_pq7 { 1061 kb-col7-pq7 {
1061 nvidia,pins = "kb_col7_pq7"; 1062 nvidia,pins = "kb_col7_pq7";
1062 nvidia,function = "rsvd2"; 1063 nvidia,function = "rsvd2";
1063 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1064 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1066,35 +1067,35 @@
1066 }; 1067 };
1067 1068
1068 /* SHIFT_CTRL_OE */ 1069 /* SHIFT_CTRL_OE */
1069 kb_col0_pq0 { 1070 kb-col0-pq0 {
1070 nvidia,pins = "kb_col0_pq0"; 1071 nvidia,pins = "kb_col0_pq0";
1071 nvidia,function = "rsvd2"; 1072 nvidia,function = "rsvd2";
1072 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1073 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1073 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1074 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1074 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1075 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1075 }; 1076 };
1076 kb_col1_pq1 { 1077 kb-col1-pq1 {
1077 nvidia,pins = "kb_col1_pq1"; 1078 nvidia,pins = "kb_col1_pq1";
1078 nvidia,function = "rsvd2"; 1079 nvidia,function = "rsvd2";
1079 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1080 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1080 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1081 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1081 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1082 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1082 }; 1083 };
1083 kb_col2_pq2 { 1084 kb-col2-pq2 {
1084 nvidia,pins = "kb_col2_pq2"; 1085 nvidia,pins = "kb_col2_pq2";
1085 nvidia,function = "rsvd2"; 1086 nvidia,function = "rsvd2";
1086 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1087 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1087 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1088 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1088 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1089 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1089 }; 1090 };
1090 kb_col4_pq4 { 1091 kb-col4-pq4 {
1091 nvidia,pins = "kb_col4_pq4"; 1092 nvidia,pins = "kb_col4_pq4";
1092 nvidia,function = "kbc"; 1093 nvidia,function = "kbc";
1093 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1094 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1094 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1095 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1095 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1096 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1096 }; 1097 };
1097 kb_row2_pr2 { 1098 kb-row2-pr2 {
1098 nvidia,pins = "kb_row2_pr2"; 1099 nvidia,pins = "kb_row2_pr2";
1099 nvidia,function = "rsvd2"; 1100 nvidia,function = "rsvd2";
1100 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1101 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1112,7 +1113,7 @@
1112 }; 1113 };
1113 1114
1114 /* TOUCH_INT */ 1115 /* TOUCH_INT */
1115 gpio_w3_aud_pw3 { 1116 gpio-w3-aud-pw3 {
1116 nvidia,pins = "gpio_w3_aud_pw3"; 1117 nvidia,pins = "gpio_w3_aud_pw3";
1117 nvidia,function = "spi6"; 1118 nvidia,function = "spi6";
1118 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1119 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1253,189 +1254,189 @@
1253 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1254 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1254 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1255 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1255 }; 1256 };
1256 dap1_fs_pn0 { /* NC */ 1257 dap1-fs-pn0 { /* NC */
1257 nvidia,pins = "dap1_fs_pn0"; 1258 nvidia,pins = "dap1_fs_pn0";
1258 nvidia,function = "rsvd4"; 1259 nvidia,function = "rsvd4";
1259 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1260 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1260 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1261 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1261 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1262 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1262 }; 1263 };
1263 dap1_din_pn1 { /* NC */ 1264 dap1-din-pn1 { /* NC */
1264 nvidia,pins = "dap1_din_pn1"; 1265 nvidia,pins = "dap1_din_pn1";
1265 nvidia,function = "rsvd4"; 1266 nvidia,function = "rsvd4";
1266 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1267 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1267 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1268 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1268 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1269 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1269 }; 1270 };
1270 dap1_sclk_pn3 { /* NC */ 1271 dap1-sclk-pn3 { /* NC */
1271 nvidia,pins = "dap1_sclk_pn3"; 1272 nvidia,pins = "dap1_sclk_pn3";
1272 nvidia,function = "rsvd4"; 1273 nvidia,function = "rsvd4";
1273 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1274 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1274 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1275 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1275 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1276 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1276 }; 1277 };
1277 ulpi_data7_po0 { /* NC */ 1278 ulpi-data7-po0 { /* NC */
1278 nvidia,pins = "ulpi_data7_po0"; 1279 nvidia,pins = "ulpi_data7_po0";
1279 nvidia,function = "ulpi"; 1280 nvidia,function = "ulpi";
1280 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1281 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1281 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1282 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1282 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1283 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1283 }; 1284 };
1284 ulpi_data0_po1 { /* NC */ 1285 ulpi-data0-po1 { /* NC */
1285 nvidia,pins = "ulpi_data0_po1"; 1286 nvidia,pins = "ulpi_data0_po1";
1286 nvidia,function = "ulpi"; 1287 nvidia,function = "ulpi";
1287 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1288 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1288 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1289 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1289 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1290 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1290 }; 1291 };
1291 ulpi_data1_po2 { /* NC */ 1292 ulpi-data1-po2 { /* NC */
1292 nvidia,pins = "ulpi_data1_po2"; 1293 nvidia,pins = "ulpi_data1_po2";
1293 nvidia,function = "ulpi"; 1294 nvidia,function = "ulpi";
1294 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1295 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1295 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1296 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1296 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1297 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1297 }; 1298 };
1298 ulpi_data2_po3 { /* NC */ 1299 ulpi-data2-po3 { /* NC */
1299 nvidia,pins = "ulpi_data2_po3"; 1300 nvidia,pins = "ulpi_data2_po3";
1300 nvidia,function = "ulpi"; 1301 nvidia,function = "ulpi";
1301 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1302 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1302 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1303 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1303 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1304 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1304 }; 1305 };
1305 ulpi_data3_po4 { /* NC */ 1306 ulpi-data3-po4 { /* NC */
1306 nvidia,pins = "ulpi_data3_po4"; 1307 nvidia,pins = "ulpi_data3_po4";
1307 nvidia,function = "ulpi"; 1308 nvidia,function = "ulpi";
1308 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1309 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1309 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1310 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1310 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1311 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1311 }; 1312 };
1312 ulpi_data6_po7 { /* NC */ 1313 ulpi-data6-po7 { /* NC */
1313 nvidia,pins = "ulpi_data6_po7"; 1314 nvidia,pins = "ulpi_data6_po7";
1314 nvidia,function = "ulpi"; 1315 nvidia,function = "ulpi";
1315 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1316 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1316 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1317 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1317 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1318 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1318 }; 1319 };
1319 dap4_fs_pp4 { /* NC */ 1320 dap4-fs-pp4 { /* NC */
1320 nvidia,pins = "dap4_fs_pp4"; 1321 nvidia,pins = "dap4_fs_pp4";
1321 nvidia,function = "rsvd4"; 1322 nvidia,function = "rsvd4";
1322 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1323 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1323 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1324 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1324 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1325 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1325 }; 1326 };
1326 dap4_din_pp5 { /* NC */ 1327 dap4-din-pp5 { /* NC */
1327 nvidia,pins = "dap4_din_pp5"; 1328 nvidia,pins = "dap4_din_pp5";
1328 nvidia,function = "rsvd3"; 1329 nvidia,function = "rsvd3";
1329 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1330 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1330 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1331 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1331 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1332 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1332 }; 1333 };
1333 dap4_dout_pp6 { /* NC */ 1334 dap4-dout-pp6 { /* NC */
1334 nvidia,pins = "dap4_dout_pp6"; 1335 nvidia,pins = "dap4_dout_pp6";
1335 nvidia,function = "rsvd4"; 1336 nvidia,function = "rsvd4";
1336 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1337 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1337 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1338 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1338 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1339 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1339 }; 1340 };
1340 dap4_sclk_pp7 { /* NC */ 1341 dap4-sclk-pp7 { /* NC */
1341 nvidia,pins = "dap4_sclk_pp7"; 1342 nvidia,pins = "dap4_sclk_pp7";
1342 nvidia,function = "rsvd3"; 1343 nvidia,function = "rsvd3";
1343 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1344 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1344 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1345 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1345 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1346 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1346 }; 1347 };
1347 kb_col3_pq3 { /* NC */ 1348 kb-col3-pq3 { /* NC */
1348 nvidia,pins = "kb_col3_pq3"; 1349 nvidia,pins = "kb_col3_pq3";
1349 nvidia,function = "kbc"; 1350 nvidia,function = "kbc";
1350 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1351 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1351 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1352 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1352 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1353 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1353 }; 1354 };
1354 kb_row3_pr3 { /* NC */ 1355 kb-row3-pr3 { /* NC */
1355 nvidia,pins = "kb_row3_pr3"; 1356 nvidia,pins = "kb_row3_pr3";
1356 nvidia,function = "kbc"; 1357 nvidia,function = "kbc";
1357 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1358 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1358 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1359 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1359 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1360 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1360 }; 1361 };
1361 kb_row4_pr4 { /* NC */ 1362 kb-row4-pr4 { /* NC */
1362 nvidia,pins = "kb_row4_pr4"; 1363 nvidia,pins = "kb_row4_pr4";
1363 nvidia,function = "rsvd3"; 1364 nvidia,function = "rsvd3";
1364 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1365 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1365 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1366 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1366 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1367 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1367 }; 1368 };
1368 kb_row5_pr5 { /* NC */ 1369 kb-row5-pr5 { /* NC */
1369 nvidia,pins = "kb_row5_pr5"; 1370 nvidia,pins = "kb_row5_pr5";
1370 nvidia,function = "rsvd3"; 1371 nvidia,function = "rsvd3";
1371 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1372 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1372 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1373 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1373 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1374 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1374 }; 1375 };
1375 kb_row6_pr6 { /* NC */ 1376 kb-row6-pr6 { /* NC */
1376 nvidia,pins = "kb_row6_pr6"; 1377 nvidia,pins = "kb_row6_pr6";
1377 nvidia,function = "kbc"; 1378 nvidia,function = "kbc";
1378 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1379 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1379 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1380 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1380 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1381 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1381 }; 1382 };
1382 kb_row7_pr7 { /* NC */ 1383 kb-row7-pr7 { /* NC */
1383 nvidia,pins = "kb_row7_pr7"; 1384 nvidia,pins = "kb_row7_pr7";
1384 nvidia,function = "rsvd2"; 1385 nvidia,function = "rsvd2";
1385 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1386 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1386 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1387 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1387 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1388 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1388 }; 1389 };
1389 kb_row8_ps0 { /* NC */ 1390 kb-row8-ps0 { /* NC */
1390 nvidia,pins = "kb_row8_ps0"; 1391 nvidia,pins = "kb_row8_ps0";
1391 nvidia,function = "rsvd2"; 1392 nvidia,function = "rsvd2";
1392 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1393 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1393 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1394 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1394 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1395 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1395 }; 1396 };
1396 kb_row9_ps1 { /* NC */ 1397 kb-row9-ps1 { /* NC */
1397 nvidia,pins = "kb_row9_ps1"; 1398 nvidia,pins = "kb_row9_ps1";
1398 nvidia,function = "rsvd2"; 1399 nvidia,function = "rsvd2";
1399 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1400 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1400 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1401 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1401 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1402 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1402 }; 1403 };
1403 kb_row12_ps4 { /* NC */ 1404 kb-row12-ps4 { /* NC */
1404 nvidia,pins = "kb_row12_ps4"; 1405 nvidia,pins = "kb_row12_ps4";
1405 nvidia,function = "rsvd2"; 1406 nvidia,function = "rsvd2";
1406 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1407 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1407 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1408 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1408 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1409 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1409 }; 1410 };
1410 kb_row13_ps5 { /* NC */ 1411 kb-row13-ps5 { /* NC */
1411 nvidia,pins = "kb_row13_ps5"; 1412 nvidia,pins = "kb_row13_ps5";
1412 nvidia,function = "rsvd2"; 1413 nvidia,function = "rsvd2";
1413 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1414 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1414 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1415 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1415 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1416 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1416 }; 1417 };
1417 kb_row14_ps6 { /* NC */ 1418 kb-row14-ps6 { /* NC */
1418 nvidia,pins = "kb_row14_ps6"; 1419 nvidia,pins = "kb_row14_ps6";
1419 nvidia,function = "rsvd2"; 1420 nvidia,function = "rsvd2";
1420 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1421 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1421 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1422 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1422 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1423 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1423 }; 1424 };
1424 kb_row15_ps7 { /* NC */ 1425 kb-row15-ps7 { /* NC */
1425 nvidia,pins = "kb_row15_ps7"; 1426 nvidia,pins = "kb_row15_ps7";
1426 nvidia,function = "rsvd3"; 1427 nvidia,function = "rsvd3";
1427 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1428 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1428 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1429 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1429 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1430 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1430 }; 1431 };
1431 kb_row16_pt0 { /* NC */ 1432 kb-row16-pt0 { /* NC */
1432 nvidia,pins = "kb_row16_pt0"; 1433 nvidia,pins = "kb_row16_pt0";
1433 nvidia,function = "rsvd2"; 1434 nvidia,function = "rsvd2";
1434 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1435 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1435 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1436 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1436 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1437 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1437 }; 1438 };
1438 kb_row17_pt1 { /* NC */ 1439 kb-row17-pt1 { /* NC */
1439 nvidia,pins = "kb_row17_pt1"; 1440 nvidia,pins = "kb_row17_pt1";
1440 nvidia,function = "rsvd2"; 1441 nvidia,function = "rsvd2";
1441 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1442 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1467,14 +1468,14 @@
1467 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1468 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1468 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1469 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1469 }; 1470 };
1470 gpio_x1_aud_px1 { /* NC */ 1471 gpio-x1-aud-px1 { /* NC */
1471 nvidia,pins = "gpio_x1_aud_px1"; 1472 nvidia,pins = "gpio_x1_aud_px1";
1472 nvidia,function = "rsvd2"; 1473 nvidia,function = "rsvd2";
1473 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1474 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1474 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1475 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1475 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1476 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1476 }; 1477 };
1477 gpio_x3_aud_px3 { /* NC */ 1478 gpio-x3-aud-px3 { /* NC */
1478 nvidia,pins = "gpio_x3_aud_px3"; 1479 nvidia,pins = "gpio_x3_aud_px3";
1479 nvidia,function = "rsvd4"; 1480 nvidia,function = "rsvd4";
1480 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1481 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1502,14 +1503,14 @@
1502 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1503 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1503 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1504 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1504 }; 1505 };
1505 clk3_req_pee1 { /* NC */ 1506 clk3-req-pee1 { /* NC */
1506 nvidia,pins = "clk3_req_pee1"; 1507 nvidia,pins = "clk3_req_pee1";
1507 nvidia,function = "rsvd2"; 1508 nvidia,function = "rsvd2";
1508 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1509 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1509 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1510 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1510 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1511 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1511 }; 1512 };
1512 dap_mclk1_req_pee2 { /* NC */ 1513 dap-mclk1-req-pee2 { /* NC */
1513 nvidia,pins = "dap_mclk1_req_pee2"; 1514 nvidia,pins = "dap_mclk1_req_pee2";
1514 nvidia,function = "rsvd4"; 1515 nvidia,function = "rsvd4";
1515 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1516 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1525,7 +1526,7 @@
1525 * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 1526 * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
1526 * bits being set to 0xfffd according to the TRM! 1527 * bits being set to 0xfffd according to the TRM!
1527 */ 1528 */
1528 sdmmc3_clk_lb_out_pee4 { /* NC */ 1529 sdmmc3-clk-lb-out-pee4 { /* NC */
1529 nvidia,pins = "sdmmc3_clk_lb_out_pee4"; 1530 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
1530 nvidia,function = "sdmmc3"; 1531 nvidia,function = "sdmmc3";
1531 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1532 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1560,8 +1561,9 @@
1560 sgtl5000: codec@a { 1561 sgtl5000: codec@a {
1561 compatible = "fsl,sgtl5000"; 1562 compatible = "fsl,sgtl5000";
1562 reg = <0x0a>; 1563 reg = <0x0a>;
1563 VDDA-supply = <&reg_3v3>; 1564 VDDA-supply = <&reg_module_3v3_audio>;
1564 VDDIO-supply = <&vddio_1v8>; 1565 VDDD-supply = <&reg_1v8_vddio>;
1566 VDDIO-supply = <&reg_1v8_vddio>;
1565 clocks = <&tegra_car TEGRA124_CLK_EXTERN1>; 1567 clocks = <&tegra_car TEGRA124_CLK_EXTERN1>;
1566 }; 1568 };
1567 1569
@@ -1578,14 +1580,14 @@
1578 pinctrl-0 = <&as3722_default>; 1580 pinctrl-0 = <&as3722_default>;
1579 1581
1580 as3722_default: pinmux { 1582 as3722_default: pinmux {
1581 gpio2_7 { 1583 gpio2-7 {
1582 pins = "gpio2", /* PWR_EN_+V3.3 */ 1584 pins = "gpio2", /* PWR_EN_+V3.3 */
1583 "gpio7"; /* +V1.6_LPO */ 1585 "gpio7"; /* +V1.6_LPO */
1584 function = "gpio"; 1586 function = "gpio";
1585 bias-pull-up; 1587 bias-pull-up;
1586 }; 1588 };
1587 1589
1588 gpio0_1_3_4_5_6 { 1590 gpio0-1-3-4-5-6 {
1589 pins = "gpio0", "gpio1", "gpio3", 1591 pins = "gpio0", "gpio1", "gpio3",
1590 "gpio4", "gpio5", "gpio6"; 1592 "gpio4", "gpio5", "gpio6";
1591 bias-high-impedance; 1593 bias-high-impedance;
@@ -1593,18 +1595,18 @@
1593 }; 1595 };
1594 1596
1595 regulators { 1597 regulators {
1596 vsup-sd2-supply = <&reg_3v3>; 1598 vsup-sd2-supply = <&reg_module_3v3>;
1597 vsup-sd3-supply = <&reg_3v3>; 1599 vsup-sd3-supply = <&reg_module_3v3>;
1598 vsup-sd4-supply = <&reg_3v3>; 1600 vsup-sd4-supply = <&reg_module_3v3>;
1599 vsup-sd5-supply = <&reg_3v3>; 1601 vsup-sd5-supply = <&reg_module_3v3>;
1600 vin-ldo0-supply = <&vddio_ddr_1v35>; 1602 vin-ldo0-supply = <&reg_1v35_vddio_ddr>;
1601 vin-ldo1-6-supply = <&reg_3v3>; 1603 vin-ldo1-6-supply = <&reg_module_3v3>;
1602 vin-ldo2-5-7-supply = <&vddio_1v8>; 1604 vin-ldo2-5-7-supply = <&reg_1v8_vddio>;
1603 vin-ldo3-4-supply = <&reg_3v3>; 1605 vin-ldo3-4-supply = <&reg_module_3v3>;
1604 vin-ldo9-10-supply = <&reg_3v3>; 1606 vin-ldo9-10-supply = <&reg_module_3v3>;
1605 vin-ldo11-supply = <&reg_3v3>; 1607 vin-ldo11-supply = <&reg_module_3v3>;
1606 1608
1607 vdd_cpu: sd0 { 1609 reg_vdd_cpu: sd0 {
1608 regulator-name = "+VDD_CPU_AP"; 1610 regulator-name = "+VDD_CPU_AP";
1609 regulator-min-microvolt = <700000>; 1611 regulator-min-microvolt = <700000>;
1610 regulator-max-microvolt = <1400000>; 1612 regulator-max-microvolt = <1400000>;
@@ -1626,7 +1628,7 @@
1626 ams,ext-control = <1>; 1628 ams,ext-control = <1>;
1627 }; 1629 };
1628 1630
1629 vddio_ddr_1v35: sd2 { 1631 reg_1v35_vddio_ddr: sd2 {
1630 regulator-name = 1632 regulator-name =
1631 "+V1.35_VDDIO_DDR(sd2)"; 1633 "+V1.35_VDDIO_DDR(sd2)";
1632 regulator-min-microvolt = <1350000>; 1634 regulator-min-microvolt = <1350000>;
@@ -1644,13 +1646,13 @@
1644 regulator-boot-on; 1646 regulator-boot-on;
1645 }; 1647 };
1646 1648
1647 vdd_1v05: sd4 { 1649 reg_1v05_vdd: sd4 {
1648 regulator-name = "+V1.05"; 1650 regulator-name = "+V1.05";
1649 regulator-min-microvolt = <1050000>; 1651 regulator-min-microvolt = <1050000>;
1650 regulator-max-microvolt = <1050000>; 1652 regulator-max-microvolt = <1050000>;
1651 }; 1653 };
1652 1654
1653 vddio_1v8: sd5 { 1655 reg_1v8_vddio: sd5 {
1654 regulator-name = "+V1.8"; 1656 regulator-name = "+V1.8";
1655 regulator-min-microvolt = <1800000>; 1657 regulator-min-microvolt = <1800000>;
1656 regulator-max-microvolt = <1800000>; 1658 regulator-max-microvolt = <1800000>;
@@ -1658,7 +1660,7 @@
1658 regulator-always-on; 1660 regulator-always-on;
1659 }; 1661 };
1660 1662
1661 vdd_gpu: sd6 { 1663 reg_vdd_gpu: sd6 {
1662 regulator-name = "+VDD_GPU_AP"; 1664 regulator-name = "+VDD_GPU_AP";
1663 regulator-min-microvolt = <650000>; 1665 regulator-min-microvolt = <650000>;
1664 regulator-max-microvolt = <1200000>; 1666 regulator-max-microvolt = <1200000>;
@@ -1668,7 +1670,7 @@
1668 regulator-always-on; 1670 regulator-always-on;
1669 }; 1671 };
1670 1672
1671 avdd_1v05: ldo0 { 1673 reg_1v05_avdd: ldo0 {
1672 regulator-name = "+V1.05_AVDD"; 1674 regulator-name = "+V1.05_AVDD";
1673 regulator-min-microvolt = <1050000>; 1675 regulator-min-microvolt = <1050000>;
1674 regulator-max-microvolt = <1050000>; 1676 regulator-max-microvolt = <1050000>;
@@ -1743,12 +1745,13 @@
1743 * TMP451 temperature sensor 1745 * TMP451 temperature sensor
1744 * Note: THERM_N directly connected to AS3722 PMIC THERM 1746 * Note: THERM_N directly connected to AS3722 PMIC THERM
1745 */ 1747 */
1746 temperature-sensor@4c { 1748 temp-sensor@4c {
1747 compatible = "ti,tmp451"; 1749 compatible = "ti,tmp451";
1748 reg = <0x4c>; 1750 reg = <0x4c>;
1749 interrupt-parent = <&gpio>; 1751 interrupt-parent = <&gpio>;
1750 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; 1752 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
1751 #thermal-sensor-cells = <1>; 1753 #thermal-sensor-cells = <1>;
1754 vcc-supply = <&reg_module_3v3>;
1752 }; 1755 };
1753 }; 1756 };
1754 1757
@@ -1780,9 +1783,9 @@
1780 sata@70020000 { 1783 sata@70020000 {
1781 phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>; 1784 phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
1782 phy-names = "sata-0"; 1785 phy-names = "sata-0";
1783 avdd-supply = <&vdd_1v05>; 1786 avdd-supply = <&reg_1v05_vdd>;
1784 hvdd-supply = <&reg_3v3>; 1787 hvdd-supply = <&reg_module_3v3>;
1785 vddio-supply = <&vdd_1v05>; 1788 vddio-supply = <&reg_1v05_vdd>;
1786 }; 1789 };
1787 1790
1788 usb@70090000 { 1791 usb@70090000 {
@@ -1793,14 +1796,14 @@
1793 <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>, 1796 <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>,
1794 <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>; 1797 <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>;
1795 phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0"; 1798 phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0";
1796 avddio-pex-supply = <&vdd_1v05>; 1799 avddio-pex-supply = <&reg_1v05_vdd>;
1797 avdd-pll-erefe-supply = <&avdd_1v05>; 1800 avdd-pll-erefe-supply = <&reg_1v05_avdd>;
1798 avdd-pll-utmip-supply = <&vddio_1v8>; 1801 avdd-pll-utmip-supply = <&reg_1v8_vddio>;
1799 avdd-usb-ss-pll-supply = <&vdd_1v05>; 1802 avdd-usb-ss-pll-supply = <&reg_1v05_vdd>;
1800 avdd-usb-supply = <&reg_3v3>; 1803 avdd-usb-supply = <&reg_module_3v3>;
1801 dvddio-pex-supply = <&vdd_1v05>; 1804 dvddio-pex-supply = <&reg_1v05_vdd>;
1802 hvdd-usb-ss-pll-e-supply = <&reg_3v3>; 1805 hvdd-usb-ss-pll-e-supply = <&reg_module_3v3>;
1803 hvdd-usb-ss-supply = <&reg_3v3>; 1806 hvdd-usb-ss-supply = <&reg_module_3v3>;
1804 }; 1807 };
1805 1808
1806 padctl@7009f000 { 1809 padctl@7009f000 {
@@ -1810,18 +1813,18 @@
1810 1813
1811 lanes { 1814 lanes {
1812 usb2-0 { 1815 usb2-0 {
1813 nvidia,function = "xusb";
1814 status = "okay"; 1816 status = "okay";
1817 nvidia,function = "xusb";
1815 }; 1818 };
1816 1819
1817 usb2-1 { 1820 usb2-1 {
1818 nvidia,function = "xusb";
1819 status = "okay"; 1821 status = "okay";
1822 nvidia,function = "xusb";
1820 }; 1823 };
1821 1824
1822 usb2-2 { 1825 usb2-2 {
1823 nvidia,function = "xusb";
1824 status = "okay"; 1826 status = "okay";
1827 nvidia,function = "xusb";
1825 }; 1828 };
1826 }; 1829 };
1827 }; 1830 };
@@ -1831,28 +1834,28 @@
1831 1834
1832 lanes { 1835 lanes {
1833 pcie-0 { 1836 pcie-0 {
1834 nvidia,function = "usb3-ss";
1835 status = "okay"; 1837 status = "okay";
1838 nvidia,function = "usb3-ss";
1836 }; 1839 };
1837 1840
1838 pcie-1 { 1841 pcie-1 {
1839 nvidia,function = "usb3-ss";
1840 status = "okay"; 1842 status = "okay";
1843 nvidia,function = "usb3-ss";
1841 }; 1844 };
1842 1845
1843 pcie-2 { 1846 pcie-2 {
1844 nvidia,function = "pcie";
1845 status = "okay"; 1847 status = "okay";
1848 nvidia,function = "pcie";
1846 }; 1849 };
1847 1850
1848 pcie-3 { 1851 pcie-3 {
1849 nvidia,function = "pcie";
1850 status = "okay"; 1852 status = "okay";
1853 nvidia,function = "pcie";
1851 }; 1854 };
1852 1855
1853 pcie-4 { 1856 pcie-4 {
1854 nvidia,function = "pcie";
1855 status = "okay"; 1857 status = "okay";
1858 nvidia,function = "pcie";
1856 }; 1859 };
1857 }; 1860 };
1858 }; 1861 };
@@ -1862,8 +1865,8 @@
1862 1865
1863 lanes { 1866 lanes {
1864 sata-0 { 1867 sata-0 {
1865 nvidia,function = "sata";
1866 status = "okay"; 1868 status = "okay";
1869 nvidia,function = "sata";
1867 }; 1870 };
1868 }; 1871 };
1869 }; 1872 };
@@ -1874,7 +1877,6 @@
1874 usb2-0 { 1877 usb2-0 {
1875 status = "okay"; 1878 status = "okay";
1876 mode = "otg"; 1879 mode = "otg";
1877
1878 vbus-supply = <&reg_usbo1_vbus>; 1880 vbus-supply = <&reg_usbo1_vbus>;
1879 }; 1881 };
1880 1882
@@ -1882,7 +1884,6 @@
1882 usb2-1 { 1884 usb2-1 {
1883 status = "okay"; 1885 status = "okay";
1884 mode = "host"; 1886 mode = "host";
1885
1886 vbus-supply = <&reg_usbh_vbus>; 1887 vbus-supply = <&reg_usbh_vbus>;
1887 }; 1888 };
1888 1889
@@ -1890,18 +1891,19 @@
1890 usb2-2 { 1891 usb2-2 {
1891 status = "okay"; 1892 status = "okay";
1892 mode = "host"; 1893 mode = "host";
1893
1894 vbus-supply = <&reg_usbh_vbus>; 1894 vbus-supply = <&reg_usbh_vbus>;
1895 }; 1895 };
1896 1896
1897 usb3-0 { 1897 usb3-0 {
1898 nvidia,usb2-companion = <2>;
1899 status = "okay"; 1898 status = "okay";
1899 nvidia,usb2-companion = <2>;
1900 vbus-supply = <&reg_usbh_vbus>;
1900 }; 1901 };
1901 1902
1902 usb3-1 { 1903 usb3-1 {
1903 nvidia,usb2-companion = <0>;
1904 status = "okay"; 1904 status = "okay";
1905 nvidia,usb2-companion = <0>;
1906 vbus-supply = <&reg_usbo1_vbus>;
1905 }; 1907 };
1906 }; 1908 };
1907 }; 1909 };
@@ -1911,13 +1913,16 @@
1911 status = "okay"; 1913 status = "okay";
1912 bus-width = <8>; 1914 bus-width = <8>;
1913 non-removable; 1915 non-removable;
1916 vmmc-supply = <&reg_module_3v3>; /* VCC */
1917 vqmmc-supply = <&reg_1v8_vddio>; /* VCCQ */
1918 mmc-ddr-1_8v;
1914 }; 1919 };
1915 1920
1916 /* CPU DFLL clock */ 1921 /* CPU DFLL clock */
1917 clock@70110000 { 1922 clock@70110000 {
1918 status = "okay"; 1923 status = "okay";
1919 vdd-cpu-supply = <&vdd_cpu>;
1920 nvidia,i2c-fs-rate = <400000>; 1924 nvidia,i2c-fs-rate = <400000>;
1925 vdd-cpu-supply = <&reg_vdd_cpu>;
1921 }; 1926 };
1922 1927
1923 ahub@70300000 { 1928 ahub@70300000 {
@@ -1926,22 +1931,15 @@
1926 }; 1931 };
1927 }; 1932 };
1928 1933
1929 clocks { 1934 clk32k_in: osc3 {
1930 compatible = "simple-bus"; 1935 compatible = "fixed-clock";
1931 #address-cells = <1>; 1936 #clock-cells = <0>;
1932 #size-cells = <0>; 1937 clock-frequency = <32768>;
1933
1934 clk32k_in: clock@0 {
1935 compatible = "fixed-clock";
1936 reg = <0>;
1937 #clock-cells = <0>;
1938 clock-frequency = <32768>;
1939 };
1940 }; 1938 };
1941 1939
1942 cpus { 1940 cpus {
1943 cpu@0 { 1941 cpu@0 {
1944 vdd-cpu-supply = <&vdd_cpu>; 1942 vdd-cpu-supply = <&reg_vdd_cpu>;
1945 }; 1943 };
1946 }; 1944 };
1947 1945
@@ -1951,7 +1949,7 @@
1951 regulator-min-microvolt = <1050000>; 1949 regulator-min-microvolt = <1050000>;
1952 regulator-max-microvolt = <1050000>; 1950 regulator-max-microvolt = <1050000>;
1953 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>; 1951 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
1954 vin-supply = <&vdd_1v05>; 1952 vin-supply = <&reg_1v05_vdd>;
1955 }; 1953 };
1956 1954
1957 reg_3v3_mxm: regulator-3v3-mxm { 1955 reg_3v3_mxm: regulator-3v3-mxm {
@@ -1963,7 +1961,15 @@
1963 regulator-boot-on; 1961 regulator-boot-on;
1964 }; 1962 };
1965 1963
1966 reg_3v3: regulator-3v3 { 1964 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
1965 compatible = "regulator-fixed";
1966 regulator-name = "+V3.3_AVDD_HDMI";
1967 regulator-min-microvolt = <3300000>;
1968 regulator-max-microvolt = <3300000>;
1969 vin-supply = <&reg_1v05_vdd>;
1970 };
1971
1972 reg_module_3v3: regulator-module-3v3 {
1967 compatible = "regulator-fixed"; 1973 compatible = "regulator-fixed";
1968 regulator-name = "+V3.3"; 1974 regulator-name = "+V3.3";
1969 regulator-min-microvolt = <3300000>; 1975 regulator-min-microvolt = <3300000>;
@@ -1976,12 +1982,12 @@
1976 vin-supply = <&reg_3v3_mxm>; 1982 vin-supply = <&reg_3v3_mxm>;
1977 }; 1983 };
1978 1984
1979 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi { 1985 reg_module_3v3_audio: regulator-module-3v3-audio {
1980 compatible = "regulator-fixed"; 1986 compatible = "regulator-fixed";
1981 regulator-name = "+V3.3_AVDD_HDMI"; 1987 regulator-name = "+V3.3_AUDIO_AVDD_S";
1982 regulator-min-microvolt = <3300000>; 1988 regulator-min-microvolt = <3300000>;
1983 regulator-max-microvolt = <3300000>; 1989 regulator-max-microvolt = <3300000>;
1984 vin-supply = <&vdd_1v05>; 1990 regulator-always-on;
1985 }; 1991 };
1986 1992
1987 sound { 1993 sound {
@@ -2035,7 +2041,7 @@
2035 2041
2036&gpio { 2042&gpio {
2037 /* I210 Gigabit Ethernet Controller Reset */ 2043 /* I210 Gigabit Ethernet Controller Reset */
2038 lan_reset_n { 2044 lan-reset-n {
2039 gpio-hog; 2045 gpio-hog;
2040 gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>; 2046 gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
2041 output-high; 2047 output-high;
@@ -2043,7 +2049,7 @@
2043 }; 2049 };
2044 2050
2045 /* Control MXM3 pin 26 Reset Module Output Carrier Input */ 2051 /* Control MXM3 pin 26 Reset Module Output Carrier Input */
2046 reset_moci_ctrl { 2052 reset-moci-ctrl {
2047 gpio-hog; 2053 gpio-hog;
2048 gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>; 2054 gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
2049 output-high; 2055 output-high;
diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi
index 0f0d4a4988b9..13c93cd507d8 100644
--- a/arch/arm/boot/dts/tegra124-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis.dtsi
@@ -47,22 +47,19 @@
47 * Compatible for Revisions 2GB: V1.0A, V1.0B, V1.1A 47 * Compatible for Revisions 2GB: V1.0A, V1.0B, V1.1A
48 */ 48 */
49/ { 49/ {
50 model = "Toradex Apalis TK1";
51 compatible = "toradex,apalis-tk1", "nvidia,tegra124";
52
53 memory@80000000 { 50 memory@80000000 {
54 reg = <0x0 0x80000000 0x0 0x80000000>; 51 reg = <0x0 0x80000000 0x0 0x80000000>;
55 }; 52 };
56 53
57 pcie@1003000 { 54 pcie@1003000 {
58 status = "okay"; 55 status = "okay";
59 avddio-pex-supply = <&vdd_1v05>; 56 avddio-pex-supply = <&reg_1v05_vdd>;
60 avdd-pex-pll-supply = <&vdd_1v05>; 57 avdd-pex-pll-supply = <&reg_1v05_vdd>;
61 avdd-pll-erefe-supply = <&avdd_1v05>; 58 avdd-pll-erefe-supply = <&reg_1v05_avdd>;
62 dvddio-pex-supply = <&vdd_1v05>; 59 dvddio-pex-supply = <&reg_1v05_vdd>;
63 hvdd-pex-pll-e-supply = <&reg_3v3>; 60 hvdd-pex-pll-e-supply = <&reg_module_3v3>;
64 hvdd-pex-supply = <&reg_3v3>; 61 hvdd-pex-supply = <&reg_module_3v3>;
65 vddio-pex-ctl-supply = <&reg_3v3>; 62 vddio-pex-ctl-supply = <&reg_module_3v3>;
66 63
67 /* Apalis PCIe (additional lane Apalis type specific) */ 64 /* Apalis PCIe (additional lane Apalis type specific) */
68 pci@1,0 { 65 pci@1,0 {
@@ -77,16 +74,21 @@
77 phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>; 74 phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
78 phy-names = "pcie-0"; 75 phy-names = "pcie-0";
79 status = "okay"; 76 status = "okay";
77
78 pcie@0 {
79 reg = <0 0 0 0 0>;
80 local-mac-address = [00 00 00 00 00 00];
81 };
80 }; 82 };
81 }; 83 };
82 84
83 host1x@50000000 { 85 host1x@50000000 {
84 hdmi@54280000 { 86 hdmi@54280000 {
85 pll-supply = <&reg_1v05_avdd_hdmi_pll>;
86 vdd-supply = <&reg_3v3_avdd_hdmi>;
87 nvidia,ddc-i2c-bus = <&hdmi_ddc>; 87 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
88 nvidia,hpd-gpio = 88 nvidia,hpd-gpio =
89 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; 89 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
90 pll-supply = <&reg_1v05_avdd_hdmi_pll>;
91 vdd-supply = <&reg_3v3_avdd_hdmi>;
90 }; 92 };
91 }; 93 };
92 94
@@ -95,44 +97,44 @@
95 * Node left disabled on purpose - the bootloader will enable 97 * Node left disabled on purpose - the bootloader will enable
96 * it after having set the VPR up 98 * it after having set the VPR up
97 */ 99 */
98 vdd-supply = <&vdd_gpu>; 100 vdd-supply = <&reg_vdd_gpu>;
99 }; 101 };
100 102
101 pinmux: pinmux@70000868 { 103 pinmux@70000868 {
102 pinctrl-names = "default"; 104 pinctrl-names = "default";
103 pinctrl-0 = <&state_default>; 105 pinctrl-0 = <&state_default>;
104 106
105 state_default: pinmux { 107 state_default: pinmux {
106 /* Analogue Audio (On-module) */ 108 /* Analogue Audio (On-module) */
107 dap3_fs_pp0 { 109 dap3-fs-pp0 {
108 nvidia,pins = "dap3_fs_pp0"; 110 nvidia,pins = "dap3_fs_pp0";
109 nvidia,function = "i2s2"; 111 nvidia,function = "i2s2";
110 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 112 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
111 nvidia,tristate = <TEGRA_PIN_DISABLE>; 113 nvidia,tristate = <TEGRA_PIN_DISABLE>;
112 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 114 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
113 }; 115 };
114 dap3_din_pp1 { 116 dap3-din-pp1 {
115 nvidia,pins = "dap3_din_pp1"; 117 nvidia,pins = "dap3_din_pp1";
116 nvidia,function = "i2s2"; 118 nvidia,function = "i2s2";
117 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 119 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
118 nvidia,tristate = <TEGRA_PIN_ENABLE>; 120 nvidia,tristate = <TEGRA_PIN_ENABLE>;
119 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 121 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
120 }; 122 };
121 dap3_dout_pp2 { 123 dap3-dout-pp2 {
122 nvidia,pins = "dap3_dout_pp2"; 124 nvidia,pins = "dap3_dout_pp2";
123 nvidia,function = "i2s2"; 125 nvidia,function = "i2s2";
124 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 126 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
125 nvidia,tristate = <TEGRA_PIN_DISABLE>; 127 nvidia,tristate = <TEGRA_PIN_DISABLE>;
126 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 128 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
127 }; 129 };
128 dap3_sclk_pp3 { 130 dap3-sclk-pp3 {
129 nvidia,pins = "dap3_sclk_pp3"; 131 nvidia,pins = "dap3_sclk_pp3";
130 nvidia,function = "i2s2"; 132 nvidia,function = "i2s2";
131 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 133 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
132 nvidia,tristate = <TEGRA_PIN_DISABLE>; 134 nvidia,tristate = <TEGRA_PIN_DISABLE>;
133 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 135 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
134 }; 136 };
135 dap_mclk1_pw4 { 137 dap-mclk1-pw4 {
136 nvidia,pins = "dap_mclk1_pw4"; 138 nvidia,pins = "dap_mclk1_pw4";
137 nvidia,function = "extperiph1"; 139 nvidia,function = "extperiph1";
138 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 140 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -159,7 +161,7 @@
159 }; 161 };
160 162
161 /* Apalis CAM1_MCLK */ 163 /* Apalis CAM1_MCLK */
162 cam_mclk_pcc0 { 164 cam-mclk-pcc0 {
163 nvidia,pins = "cam_mclk_pcc0"; 165 nvidia,pins = "cam_mclk_pcc0";
164 nvidia,function = "vi_alt3"; 166 nvidia,function = "vi_alt3";
165 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 167 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -168,28 +170,28 @@
168 }; 170 };
169 171
170 /* Apalis Digital Audio */ 172 /* Apalis Digital Audio */
171 dap2_fs_pa2 { 173 dap2-fs-pa2 {
172 nvidia,pins = "dap2_fs_pa2"; 174 nvidia,pins = "dap2_fs_pa2";
173 nvidia,function = "hda"; 175 nvidia,function = "hda";
174 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 176 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
175 nvidia,tristate = <TEGRA_PIN_DISABLE>; 177 nvidia,tristate = <TEGRA_PIN_DISABLE>;
176 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 178 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
177 }; 179 };
178 dap2_sclk_pa3 { 180 dap2-sclk-pa3 {
179 nvidia,pins = "dap2_sclk_pa3"; 181 nvidia,pins = "dap2_sclk_pa3";
180 nvidia,function = "hda"; 182 nvidia,function = "hda";
181 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 183 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
182 nvidia,tristate = <TEGRA_PIN_DISABLE>; 184 nvidia,tristate = <TEGRA_PIN_DISABLE>;
183 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 185 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
184 }; 186 };
185 dap2_din_pa4 { 187 dap2-din-pa4 {
186 nvidia,pins = "dap2_din_pa4"; 188 nvidia,pins = "dap2_din_pa4";
187 nvidia,function = "hda"; 189 nvidia,function = "hda";
188 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 190 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
189 nvidia,tristate = <TEGRA_PIN_ENABLE>; 191 nvidia,tristate = <TEGRA_PIN_ENABLE>;
190 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 192 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
191 }; 193 };
192 dap2_dout_pa5 { 194 dap2-dout-pa5 {
193 nvidia,pins = "dap2_dout_pa5"; 195 nvidia,pins = "dap2_dout_pa5";
194 nvidia,function = "hda"; 196 nvidia,function = "hda";
195 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 197 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -202,7 +204,7 @@
202 nvidia,tristate = <TEGRA_PIN_DISABLE>; 204 nvidia,tristate = <TEGRA_PIN_DISABLE>;
203 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 205 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
204 }; 206 };
205 clk3_out_pee0 { 207 clk3-out-pee0 {
206 nvidia,pins = "clk3_out_pee0"; 208 nvidia,pins = "clk3_out_pee0";
207 nvidia,function = "extperiph3"; 209 nvidia,function = "extperiph3";
208 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 210 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -211,49 +213,49 @@
211 }; 213 };
212 214
213 /* Apalis GPIO */ 215 /* Apalis GPIO */
214 ddc_scl_pv4 { 216 ddc-scl-pv4 {
215 nvidia,pins = "ddc_scl_pv4"; 217 nvidia,pins = "ddc_scl_pv4";
216 nvidia,function = "rsvd2"; 218 nvidia,function = "rsvd2";
217 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 219 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
218 nvidia,tristate = <TEGRA_PIN_DISABLE>; 220 nvidia,tristate = <TEGRA_PIN_DISABLE>;
219 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 221 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
220 }; 222 };
221 ddc_sda_pv5 { 223 ddc-sda-pv5 {
222 nvidia,pins = "ddc_sda_pv5"; 224 nvidia,pins = "ddc_sda_pv5";
223 nvidia,function = "rsvd2"; 225 nvidia,function = "rsvd2";
224 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 226 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
225 nvidia,tristate = <TEGRA_PIN_DISABLE>; 227 nvidia,tristate = <TEGRA_PIN_DISABLE>;
226 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 228 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
227 }; 229 };
228 pex_l0_rst_n_pdd1 { 230 pex-l0-rst-n-pdd1 {
229 nvidia,pins = "pex_l0_rst_n_pdd1"; 231 nvidia,pins = "pex_l0_rst_n_pdd1";
230 nvidia,function = "rsvd2"; 232 nvidia,function = "rsvd2";
231 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 233 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
232 nvidia,tristate = <TEGRA_PIN_DISABLE>; 234 nvidia,tristate = <TEGRA_PIN_DISABLE>;
233 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 235 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
234 }; 236 };
235 pex_l0_clkreq_n_pdd2 { 237 pex-l0-clkreq-n-pdd2 {
236 nvidia,pins = "pex_l0_clkreq_n_pdd2"; 238 nvidia,pins = "pex_l0_clkreq_n_pdd2";
237 nvidia,function = "rsvd2"; 239 nvidia,function = "rsvd2";
238 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 240 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
239 nvidia,tristate = <TEGRA_PIN_DISABLE>; 241 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 242 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
241 }; 243 };
242 pex_l1_rst_n_pdd5 { 244 pex-l1-rst-n-pdd5 {
243 nvidia,pins = "pex_l1_rst_n_pdd5"; 245 nvidia,pins = "pex_l1_rst_n_pdd5";
244 nvidia,function = "rsvd2"; 246 nvidia,function = "rsvd2";
245 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 247 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
246 nvidia,tristate = <TEGRA_PIN_DISABLE>; 248 nvidia,tristate = <TEGRA_PIN_DISABLE>;
247 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 249 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
248 }; 250 };
249 pex_l1_clkreq_n_pdd6 { 251 pex-l1-clkreq-n-pdd6 {
250 nvidia,pins = "pex_l1_clkreq_n_pdd6"; 252 nvidia,pins = "pex_l1_clkreq_n_pdd6";
251 nvidia,function = "rsvd2"; 253 nvidia,function = "rsvd2";
252 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 254 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
253 nvidia,tristate = <TEGRA_PIN_DISABLE>; 255 nvidia,tristate = <TEGRA_PIN_DISABLE>;
254 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 256 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
255 }; 257 };
256 dp_hpd_pff0 { 258 dp-hpd-pff0 {
257 nvidia,pins = "dp_hpd_pff0"; 259 nvidia,pins = "dp_hpd_pff0";
258 nvidia,function = "dp"; 260 nvidia,function = "dp";
259 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 261 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -277,7 +279,7 @@
277 }; 279 };
278 280
279 /* Apalis HDMI1_CEC */ 281 /* Apalis HDMI1_CEC */
280 hdmi_cec_pee3 { 282 hdmi-cec-pee3 {
281 nvidia,pins = "hdmi_cec_pee3"; 283 nvidia,pins = "hdmi_cec_pee3";
282 nvidia,function = "cec"; 284 nvidia,function = "cec";
283 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 285 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -287,7 +289,7 @@
287 }; 289 };
288 290
289 /* Apalis HDMI1_HPD */ 291 /* Apalis HDMI1_HPD */
290 hdmi_int_pn7 { 292 hdmi-int-pn7 {
291 nvidia,pins = "hdmi_int_pn7"; 293 nvidia,pins = "hdmi_int_pn7";
292 nvidia,function = "rsvd1"; 294 nvidia,function = "rsvd1";
293 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 295 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -297,7 +299,7 @@
297 }; 299 };
298 300
299 /* Apalis I2C1 */ 301 /* Apalis I2C1 */
300 gen1_i2c_scl_pc4 { 302 gen1-i2c-scl-pc4 {
301 nvidia,pins = "gen1_i2c_scl_pc4"; 303 nvidia,pins = "gen1_i2c_scl_pc4";
302 nvidia,function = "i2c1"; 304 nvidia,function = "i2c1";
303 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 305 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -305,7 +307,7 @@
305 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 307 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
306 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 308 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
307 }; 309 };
308 gen1_i2c_sda_pc5 { 310 gen1-i2c-sda-pc5 {
309 nvidia,pins = "gen1_i2c_sda_pc5"; 311 nvidia,pins = "gen1_i2c_sda_pc5";
310 nvidia,function = "i2c1"; 312 nvidia,function = "i2c1";
311 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 313 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -315,7 +317,7 @@
315 }; 317 };
316 318
317 /* Apalis I2C2 (DDC) */ 319 /* Apalis I2C2 (DDC) */
318 gen2_i2c_scl_pt5 { 320 gen2-i2c-scl-pt5 {
319 nvidia,pins = "gen2_i2c_scl_pt5"; 321 nvidia,pins = "gen2_i2c_scl_pt5";
320 nvidia,function = "i2c2"; 322 nvidia,function = "i2c2";
321 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 323 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -323,7 +325,7 @@
323 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 325 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
324 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 326 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
325 }; 327 };
326 gen2_i2c_sda_pt6 { 328 gen2-i2c-sda-pt6 {
327 nvidia,pins = "gen2_i2c_sda_pt6"; 329 nvidia,pins = "gen2_i2c_sda_pt6";
328 nvidia,function = "i2c2"; 330 nvidia,function = "i2c2";
329 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 331 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -333,7 +335,7 @@
333 }; 335 };
334 336
335 /* Apalis I2C3 (CAM) */ 337 /* Apalis I2C3 (CAM) */
336 cam_i2c_scl_pbb1 { 338 cam-i2c-scl-pbb1 {
337 nvidia,pins = "cam_i2c_scl_pbb1"; 339 nvidia,pins = "cam_i2c_scl_pbb1";
338 nvidia,function = "i2c3"; 340 nvidia,function = "i2c3";
339 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 341 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -341,7 +343,7 @@
341 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 343 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
342 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 344 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
343 }; 345 };
344 cam_i2c_sda_pbb2 { 346 cam-i2c-sda-pbb2 {
345 nvidia,pins = "cam_i2c_sda_pbb2"; 347 nvidia,pins = "cam_i2c_sda_pbb2";
346 nvidia,function = "i2c3"; 348 nvidia,function = "i2c3";
347 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 349 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -351,77 +353,77 @@
351 }; 353 };
352 354
353 /* Apalis MMC1 */ 355 /* Apalis MMC1 */
354 sdmmc1_cd_n_pv3 { /* CD# GPIO */ 356 sdmmc1-cd-n-pv3 { /* CD# GPIO */
355 nvidia,pins = "sdmmc1_wp_n_pv3"; 357 nvidia,pins = "sdmmc1_wp_n_pv3";
356 nvidia,function = "sdmmc1"; 358 nvidia,function = "sdmmc1";
357 nvidia,pull = <TEGRA_PIN_PULL_UP>; 359 nvidia,pull = <TEGRA_PIN_PULL_UP>;
358 nvidia,tristate = <TEGRA_PIN_ENABLE>; 360 nvidia,tristate = <TEGRA_PIN_ENABLE>;
359 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 361 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
360 }; 362 };
361 clk2_out_pw5 { /* D5 GPIO */ 363 clk2-out-pw5 { /* D5 GPIO */
362 nvidia,pins = "clk2_out_pw5"; 364 nvidia,pins = "clk2_out_pw5";
363 nvidia,function = "rsvd2"; 365 nvidia,function = "rsvd2";
364 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 366 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
365 nvidia,tristate = <TEGRA_PIN_DISABLE>; 367 nvidia,tristate = <TEGRA_PIN_DISABLE>;
366 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 368 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
367 }; 369 };
368 sdmmc1_dat3_py4 { 370 sdmmc1-dat3-py4 {
369 nvidia,pins = "sdmmc1_dat3_py4"; 371 nvidia,pins = "sdmmc1_dat3_py4";
370 nvidia,function = "sdmmc1"; 372 nvidia,function = "sdmmc1";
371 nvidia,pull = <TEGRA_PIN_PULL_UP>; 373 nvidia,pull = <TEGRA_PIN_PULL_UP>;
372 nvidia,tristate = <TEGRA_PIN_DISABLE>; 374 nvidia,tristate = <TEGRA_PIN_DISABLE>;
373 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 375 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
374 }; 376 };
375 sdmmc1_dat2_py5 { 377 sdmmc1-dat2-py5 {
376 nvidia,pins = "sdmmc1_dat2_py5"; 378 nvidia,pins = "sdmmc1_dat2_py5";
377 nvidia,function = "sdmmc1"; 379 nvidia,function = "sdmmc1";
378 nvidia,pull = <TEGRA_PIN_PULL_UP>; 380 nvidia,pull = <TEGRA_PIN_PULL_UP>;
379 nvidia,tristate = <TEGRA_PIN_DISABLE>; 381 nvidia,tristate = <TEGRA_PIN_DISABLE>;
380 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 382 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
381 }; 383 };
382 sdmmc1_dat1_py6 { 384 sdmmc1-dat1-py6 {
383 nvidia,pins = "sdmmc1_dat1_py6"; 385 nvidia,pins = "sdmmc1_dat1_py6";
384 nvidia,function = "sdmmc1"; 386 nvidia,function = "sdmmc1";
385 nvidia,pull = <TEGRA_PIN_PULL_UP>; 387 nvidia,pull = <TEGRA_PIN_PULL_UP>;
386 nvidia,tristate = <TEGRA_PIN_DISABLE>; 388 nvidia,tristate = <TEGRA_PIN_DISABLE>;
387 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 389 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
388 }; 390 };
389 sdmmc1_dat0_py7 { 391 sdmmc1-dat0-py7 {
390 nvidia,pins = "sdmmc1_dat0_py7"; 392 nvidia,pins = "sdmmc1_dat0_py7";
391 nvidia,function = "sdmmc1"; 393 nvidia,function = "sdmmc1";
392 nvidia,pull = <TEGRA_PIN_PULL_UP>; 394 nvidia,pull = <TEGRA_PIN_PULL_UP>;
393 nvidia,tristate = <TEGRA_PIN_DISABLE>; 395 nvidia,tristate = <TEGRA_PIN_DISABLE>;
394 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 396 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
395 }; 397 };
396 sdmmc1_clk_pz0 { 398 sdmmc1-clk-pz0 {
397 nvidia,pins = "sdmmc1_clk_pz0"; 399 nvidia,pins = "sdmmc1_clk_pz0";
398 nvidia,function = "sdmmc1"; 400 nvidia,function = "sdmmc1";
399 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 401 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
400 nvidia,tristate = <TEGRA_PIN_DISABLE>; 402 nvidia,tristate = <TEGRA_PIN_DISABLE>;
401 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 403 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
402 }; 404 };
403 sdmmc1_cmd_pz1 { 405 sdmmc1-cmd-pz1 {
404 nvidia,pins = "sdmmc1_cmd_pz1"; 406 nvidia,pins = "sdmmc1_cmd_pz1";
405 nvidia,function = "sdmmc1"; 407 nvidia,function = "sdmmc1";
406 nvidia,pull = <TEGRA_PIN_PULL_UP>; 408 nvidia,pull = <TEGRA_PIN_PULL_UP>;
407 nvidia,tristate = <TEGRA_PIN_DISABLE>; 409 nvidia,tristate = <TEGRA_PIN_DISABLE>;
408 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 410 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
409 }; 411 };
410 clk2_req_pcc5 { /* D4 GPIO */ 412 clk2-req-pcc5 { /* D4 GPIO */
411 nvidia,pins = "clk2_req_pcc5"; 413 nvidia,pins = "clk2_req_pcc5";
412 nvidia,function = "rsvd2"; 414 nvidia,function = "rsvd2";
413 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 415 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
414 nvidia,tristate = <TEGRA_PIN_DISABLE>; 416 nvidia,tristate = <TEGRA_PIN_DISABLE>;
415 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 417 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
416 }; 418 };
417 sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */ 419 sdmmc3-clk-lb-in-pee5 { /* D6 GPIO */
418 nvidia,pins = "sdmmc3_clk_lb_in_pee5"; 420 nvidia,pins = "sdmmc3_clk_lb_in_pee5";
419 nvidia,function = "rsvd2"; 421 nvidia,function = "rsvd2";
420 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 422 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
421 nvidia,tristate = <TEGRA_PIN_DISABLE>; 423 nvidia,tristate = <TEGRA_PIN_DISABLE>;
422 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 424 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
423 }; 425 };
424 usb_vbus_en2_pff1 { /* D7 GPIO */ 426 usb-vbus-en2-pff1 { /* D7 GPIO */
425 nvidia,pins = "usb_vbus_en2_pff1"; 427 nvidia,pins = "usb_vbus_en2_pff1";
426 nvidia,function = "rsvd2"; 428 nvidia,function = "rsvd2";
427 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 429 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -461,7 +463,7 @@
461 }; 463 };
462 464
463 /* Apalis SATA1_ACT# */ 465 /* Apalis SATA1_ACT# */
464 dap1_dout_pn2 { 466 dap1-dout-pn2 {
465 nvidia,pins = "dap1_dout_pn2"; 467 nvidia,pins = "dap1_dout_pn2";
466 nvidia,function = "gmi"; 468 nvidia,function = "gmi";
467 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 469 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -470,49 +472,49 @@
470 }; 472 };
471 473
472 /* Apalis SD1 */ 474 /* Apalis SD1 */
473 sdmmc3_clk_pa6 { 475 sdmmc3-clk-pa6 {
474 nvidia,pins = "sdmmc3_clk_pa6"; 476 nvidia,pins = "sdmmc3_clk_pa6";
475 nvidia,function = "sdmmc3"; 477 nvidia,function = "sdmmc3";
476 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 478 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
477 nvidia,tristate = <TEGRA_PIN_DISABLE>; 479 nvidia,tristate = <TEGRA_PIN_DISABLE>;
478 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 480 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
479 }; 481 };
480 sdmmc3_cmd_pa7 { 482 sdmmc3-cmd-pa7 {
481 nvidia,pins = "sdmmc3_cmd_pa7"; 483 nvidia,pins = "sdmmc3_cmd_pa7";
482 nvidia,function = "sdmmc3"; 484 nvidia,function = "sdmmc3";
483 nvidia,pull = <TEGRA_PIN_PULL_UP>; 485 nvidia,pull = <TEGRA_PIN_PULL_UP>;
484 nvidia,tristate = <TEGRA_PIN_DISABLE>; 486 nvidia,tristate = <TEGRA_PIN_DISABLE>;
485 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 487 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
486 }; 488 };
487 sdmmc3_dat3_pb4 { 489 sdmmc3-dat3-pb4 {
488 nvidia,pins = "sdmmc3_dat3_pb4"; 490 nvidia,pins = "sdmmc3_dat3_pb4";
489 nvidia,function = "sdmmc3"; 491 nvidia,function = "sdmmc3";
490 nvidia,pull = <TEGRA_PIN_PULL_UP>; 492 nvidia,pull = <TEGRA_PIN_PULL_UP>;
491 nvidia,tristate = <TEGRA_PIN_DISABLE>; 493 nvidia,tristate = <TEGRA_PIN_DISABLE>;
492 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 494 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
493 }; 495 };
494 sdmmc3_dat2_pb5 { 496 sdmmc3-dat2-pb5 {
495 nvidia,pins = "sdmmc3_dat2_pb5"; 497 nvidia,pins = "sdmmc3_dat2_pb5";
496 nvidia,function = "sdmmc3"; 498 nvidia,function = "sdmmc3";
497 nvidia,pull = <TEGRA_PIN_PULL_UP>; 499 nvidia,pull = <TEGRA_PIN_PULL_UP>;
498 nvidia,tristate = <TEGRA_PIN_DISABLE>; 500 nvidia,tristate = <TEGRA_PIN_DISABLE>;
499 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 501 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
500 }; 502 };
501 sdmmc3_dat1_pb6 { 503 sdmmc3-dat1-pb6 {
502 nvidia,pins = "sdmmc3_dat1_pb6"; 504 nvidia,pins = "sdmmc3_dat1_pb6";
503 nvidia,function = "sdmmc3"; 505 nvidia,function = "sdmmc3";
504 nvidia,pull = <TEGRA_PIN_PULL_UP>; 506 nvidia,pull = <TEGRA_PIN_PULL_UP>;
505 nvidia,tristate = <TEGRA_PIN_DISABLE>; 507 nvidia,tristate = <TEGRA_PIN_DISABLE>;
506 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 508 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
507 }; 509 };
508 sdmmc3_dat0_pb7 { 510 sdmmc3-dat0-pb7 {
509 nvidia,pins = "sdmmc3_dat0_pb7"; 511 nvidia,pins = "sdmmc3_dat0_pb7";
510 nvidia,function = "sdmmc3"; 512 nvidia,function = "sdmmc3";
511 nvidia,pull = <TEGRA_PIN_PULL_UP>; 513 nvidia,pull = <TEGRA_PIN_PULL_UP>;
512 nvidia,tristate = <TEGRA_PIN_DISABLE>; 514 nvidia,tristate = <TEGRA_PIN_DISABLE>;
513 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 515 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
514 }; 516 };
515 sdmmc3_cd_n_pv2 { /* CD# GPIO */ 517 sdmmc3-cd-n-pv2 { /* CD# GPIO */
516 nvidia,pins = "sdmmc3_cd_n_pv2"; 518 nvidia,pins = "sdmmc3_cd_n_pv2";
517 nvidia,function = "rsvd3"; 519 nvidia,function = "rsvd3";
518 nvidia,pull = <TEGRA_PIN_PULL_UP>; 520 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -521,14 +523,14 @@
521 }; 523 };
522 524
523 /* Apalis SPDIF */ 525 /* Apalis SPDIF */
524 spdif_out_pk5 { 526 spdif-out-pk5 {
525 nvidia,pins = "spdif_out_pk5"; 527 nvidia,pins = "spdif_out_pk5";
526 nvidia,function = "spdif"; 528 nvidia,function = "spdif";
527 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 529 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
528 nvidia,tristate = <TEGRA_PIN_DISABLE>; 530 nvidia,tristate = <TEGRA_PIN_DISABLE>;
529 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 531 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
530 }; 532 };
531 spdif_in_pk6 { 533 spdif-in-pk6 {
532 nvidia,pins = "spdif_in_pk6"; 534 nvidia,pins = "spdif_in_pk6";
533 nvidia,function = "spdif"; 535 nvidia,function = "spdif";
534 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 536 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -537,28 +539,28 @@
537 }; 539 };
538 540
539 /* Apalis SPI1 */ 541 /* Apalis SPI1 */
540 ulpi_clk_py0 { 542 ulpi-clk-py0 {
541 nvidia,pins = "ulpi_clk_py0"; 543 nvidia,pins = "ulpi_clk_py0";
542 nvidia,function = "spi1"; 544 nvidia,function = "spi1";
543 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 545 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
544 nvidia,tristate = <TEGRA_PIN_DISABLE>; 546 nvidia,tristate = <TEGRA_PIN_DISABLE>;
545 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 547 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
546 }; 548 };
547 ulpi_dir_py1 { 549 ulpi-dir-py1 {
548 nvidia,pins = "ulpi_dir_py1"; 550 nvidia,pins = "ulpi_dir_py1";
549 nvidia,function = "spi1"; 551 nvidia,function = "spi1";
550 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 552 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
551 nvidia,tristate = <TEGRA_PIN_ENABLE>; 553 nvidia,tristate = <TEGRA_PIN_ENABLE>;
552 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 554 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
553 }; 555 };
554 ulpi_nxt_py2 { 556 ulpi-nxt-py2 {
555 nvidia,pins = "ulpi_nxt_py2"; 557 nvidia,pins = "ulpi_nxt_py2";
556 nvidia,function = "spi1"; 558 nvidia,function = "spi1";
557 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 559 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
558 nvidia,tristate = <TEGRA_PIN_DISABLE>; 560 nvidia,tristate = <TEGRA_PIN_DISABLE>;
559 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 561 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
560 }; 562 };
561 ulpi_stp_py3 { 563 ulpi-stp-py3 {
562 nvidia,pins = "ulpi_stp_py3"; 564 nvidia,pins = "ulpi_stp_py3";
563 nvidia,function = "spi1"; 565 nvidia,function = "spi1";
564 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 566 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -611,42 +613,42 @@
611 nvidia,tristate = <TEGRA_PIN_ENABLE>; 613 nvidia,tristate = <TEGRA_PIN_ENABLE>;
612 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 614 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
613 }; 615 };
614 uart1_txd_pu0 { 616 uart1-txd-pu0 {
615 nvidia,pins = "pu0"; 617 nvidia,pins = "pu0";
616 nvidia,function = "uarta"; 618 nvidia,function = "uarta";
617 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 619 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
618 nvidia,tristate = <TEGRA_PIN_DISABLE>; 620 nvidia,tristate = <TEGRA_PIN_DISABLE>;
619 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 621 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
620 }; 622 };
621 uart1_rxd_pu1 { 623 uart1-rxd-pu1 {
622 nvidia,pins = "pu1"; 624 nvidia,pins = "pu1";
623 nvidia,function = "uarta"; 625 nvidia,function = "uarta";
624 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 626 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
625 nvidia,tristate = <TEGRA_PIN_ENABLE>; 627 nvidia,tristate = <TEGRA_PIN_ENABLE>;
626 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 628 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
627 }; 629 };
628 uart1_cts_n_pu2 { 630 uart1-cts-n-pu2 {
629 nvidia,pins = "pu2"; 631 nvidia,pins = "pu2";
630 nvidia,function = "uarta"; 632 nvidia,function = "uarta";
631 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 633 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
632 nvidia,tristate = <TEGRA_PIN_ENABLE>; 634 nvidia,tristate = <TEGRA_PIN_ENABLE>;
633 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 635 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
634 }; 636 };
635 uart1_rts_n_pu3 { 637 uart1-rts-n-pu3 {
636 nvidia,pins = "pu3"; 638 nvidia,pins = "pu3";
637 nvidia,function = "uarta"; 639 nvidia,function = "uarta";
638 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 640 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
639 nvidia,tristate = <TEGRA_PIN_DISABLE>; 641 nvidia,tristate = <TEGRA_PIN_DISABLE>;
640 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 642 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
641 }; 643 };
642 uart3_cts_n_pa1 { /* DSR GPIO */ 644 uart3-cts-n-pa1 { /* DSR GPIO */
643 nvidia,pins = "uart3_cts_n_pa1"; 645 nvidia,pins = "uart3_cts_n_pa1";
644 nvidia,function = "gmi"; 646 nvidia,function = "gmi";
645 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 647 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
646 nvidia,tristate = <TEGRA_PIN_ENABLE>; 648 nvidia,tristate = <TEGRA_PIN_ENABLE>;
647 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 649 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
648 }; 650 };
649 uart3_rts_n_pc0 { /* DTR GPIO */ 651 uart3-rts-n-pc0 { /* DTR GPIO */
650 nvidia,pins = "uart3_rts_n_pc0"; 652 nvidia,pins = "uart3_rts_n_pc0";
651 nvidia,function = "gmi"; 653 nvidia,function = "gmi";
652 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 654 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -655,28 +657,28 @@
655 }; 657 };
656 658
657 /* Apalis UART2 */ 659 /* Apalis UART2 */
658 uart2_txd_pc2 { 660 uart2-txd-pc2 {
659 nvidia,pins = "uart2_txd_pc2"; 661 nvidia,pins = "uart2_txd_pc2";
660 nvidia,function = "irda"; 662 nvidia,function = "irda";
661 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 663 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
662 nvidia,tristate = <TEGRA_PIN_DISABLE>; 664 nvidia,tristate = <TEGRA_PIN_DISABLE>;
663 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 665 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
664 }; 666 };
665 uart2_rxd_pc3 { 667 uart2-rxd-pc3 {
666 nvidia,pins = "uart2_rxd_pc3"; 668 nvidia,pins = "uart2_rxd_pc3";
667 nvidia,function = "irda"; 669 nvidia,function = "irda";
668 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 670 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
669 nvidia,tristate = <TEGRA_PIN_ENABLE>; 671 nvidia,tristate = <TEGRA_PIN_ENABLE>;
670 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 672 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
671 }; 673 };
672 uart2_cts_n_pj5 { 674 uart2-cts-n-pj5 {
673 nvidia,pins = "uart2_cts_n_pj5"; 675 nvidia,pins = "uart2_cts_n_pj5";
674 nvidia,function = "uartb"; 676 nvidia,function = "uartb";
675 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 677 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
676 nvidia,tristate = <TEGRA_PIN_ENABLE>; 678 nvidia,tristate = <TEGRA_PIN_ENABLE>;
677 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 679 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
678 }; 680 };
679 uart2_rts_n_pj6 { 681 uart2-rts-n-pj6 {
680 nvidia,pins = "uart2_rts_n_pj6"; 682 nvidia,pins = "uart2_rts_n_pj6";
681 nvidia,function = "uartb"; 683 nvidia,function = "uartb";
682 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 684 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -685,14 +687,14 @@
685 }; 687 };
686 688
687 /* Apalis UART3 */ 689 /* Apalis UART3 */
688 uart3_txd_pw6 { 690 uart3-txd-pw6 {
689 nvidia,pins = "uart3_txd_pw6"; 691 nvidia,pins = "uart3_txd_pw6";
690 nvidia,function = "uartc"; 692 nvidia,function = "uartc";
691 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 693 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
692 nvidia,tristate = <TEGRA_PIN_DISABLE>; 694 nvidia,tristate = <TEGRA_PIN_DISABLE>;
693 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 695 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
694 }; 696 };
695 uart3_rxd_pw7 { 697 uart3-rxd-pw7 {
696 nvidia,pins = "uart3_rxd_pw7"; 698 nvidia,pins = "uart3_rxd_pw7";
697 nvidia,function = "uartc"; 699 nvidia,function = "uartc";
698 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 700 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -701,14 +703,14 @@
701 }; 703 };
702 704
703 /* Apalis UART4 */ 705 /* Apalis UART4 */
704 uart4_rxd_pb0 { 706 uart4-rxd-pb0 {
705 nvidia,pins = "pb0"; 707 nvidia,pins = "pb0";
706 nvidia,function = "uartd"; 708 nvidia,function = "uartd";
707 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 709 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
708 nvidia,tristate = <TEGRA_PIN_ENABLE>; 710 nvidia,tristate = <TEGRA_PIN_ENABLE>;
709 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 711 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
710 }; 712 };
711 uart4_txd_pj7 { 713 uart4-txd-pj7 {
712 nvidia,pins = "pj7"; 714 nvidia,pins = "pj7";
713 nvidia,function = "uartd"; 715 nvidia,function = "uartd";
714 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 716 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -717,7 +719,7 @@
717 }; 719 };
718 720
719 /* Apalis USBH_EN */ 721 /* Apalis USBH_EN */
720 usb_vbus_en1_pn5 { 722 usb-vbus-en1-pn5 {
721 nvidia,pins = "usb_vbus_en1_pn5"; 723 nvidia,pins = "usb_vbus_en1_pn5";
722 nvidia,function = "rsvd2"; 724 nvidia,function = "rsvd2";
723 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 725 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -736,7 +738,7 @@
736 }; 738 };
737 739
738 /* Apalis USBO1_EN */ 740 /* Apalis USBO1_EN */
739 usb_vbus_en0_pn4 { 741 usb-vbus-en0-pn4 {
740 nvidia,pins = "usb_vbus_en0_pn4"; 742 nvidia,pins = "usb_vbus_en0_pn4";
741 nvidia,function = "rsvd2"; 743 nvidia,function = "rsvd2";
742 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 744 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -755,7 +757,7 @@
755 }; 757 };
756 758
757 /* Apalis WAKE1_MICO */ 759 /* Apalis WAKE1_MICO */
758 pex_wake_n_pdd3 { 760 pex-wake-n-pdd3 {
759 nvidia,pins = "pex_wake_n_pdd3"; 761 nvidia,pins = "pex_wake_n_pdd3";
760 nvidia,function = "rsvd2"; 762 nvidia,function = "rsvd2";
761 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 763 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -764,7 +766,7 @@
764 }; 766 };
765 767
766 /* CORE_PWR_REQ */ 768 /* CORE_PWR_REQ */
767 core_pwr_req { 769 core-pwr-req {
768 nvidia,pins = "core_pwr_req"; 770 nvidia,pins = "core_pwr_req";
769 nvidia,function = "pwron"; 771 nvidia,function = "pwron";
770 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 772 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -773,7 +775,7 @@
773 }; 775 };
774 776
775 /* CPU_PWR_REQ */ 777 /* CPU_PWR_REQ */
776 cpu_pwr_req { 778 cpu-pwr-req {
777 nvidia,pins = "cpu_pwr_req"; 779 nvidia,pins = "cpu_pwr_req";
778 nvidia,function = "cpu"; 780 nvidia,function = "cpu";
779 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 781 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -782,14 +784,14 @@
782 }; 784 };
783 785
784 /* DVFS */ 786 /* DVFS */
785 dvfs_pwm_px0 { 787 dvfs-pwm-px0 {
786 nvidia,pins = "dvfs_pwm_px0"; 788 nvidia,pins = "dvfs_pwm_px0";
787 nvidia,function = "cldvfs"; 789 nvidia,function = "cldvfs";
788 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 790 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
789 nvidia,tristate = <TEGRA_PIN_DISABLE>; 791 nvidia,tristate = <TEGRA_PIN_DISABLE>;
790 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 792 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
791 }; 793 };
792 dvfs_clk_px2 { 794 dvfs-clk-px2 {
793 nvidia,pins = "dvfs_clk_px2"; 795 nvidia,pins = "dvfs_clk_px2";
794 nvidia,function = "cldvfs"; 796 nvidia,function = "cldvfs";
795 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 797 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -798,70 +800,70 @@
798 }; 800 };
799 801
800 /* eMMC */ 802 /* eMMC */
801 sdmmc4_dat0_paa0 { 803 sdmmc4-dat0-paa0 {
802 nvidia,pins = "sdmmc4_dat0_paa0"; 804 nvidia,pins = "sdmmc4_dat0_paa0";
803 nvidia,function = "sdmmc4"; 805 nvidia,function = "sdmmc4";
804 nvidia,pull = <TEGRA_PIN_PULL_UP>; 806 nvidia,pull = <TEGRA_PIN_PULL_UP>;
805 nvidia,tristate = <TEGRA_PIN_DISABLE>; 807 nvidia,tristate = <TEGRA_PIN_DISABLE>;
806 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 808 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
807 }; 809 };
808 sdmmc4_dat1_paa1 { 810 sdmmc4-dat1-paa1 {
809 nvidia,pins = "sdmmc4_dat1_paa1"; 811 nvidia,pins = "sdmmc4_dat1_paa1";
810 nvidia,function = "sdmmc4"; 812 nvidia,function = "sdmmc4";
811 nvidia,pull = <TEGRA_PIN_PULL_UP>; 813 nvidia,pull = <TEGRA_PIN_PULL_UP>;
812 nvidia,tristate = <TEGRA_PIN_DISABLE>; 814 nvidia,tristate = <TEGRA_PIN_DISABLE>;
813 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 815 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
814 }; 816 };
815 sdmmc4_dat2_paa2 { 817 sdmmc4-dat2-paa2 {
816 nvidia,pins = "sdmmc4_dat2_paa2"; 818 nvidia,pins = "sdmmc4_dat2_paa2";
817 nvidia,function = "sdmmc4"; 819 nvidia,function = "sdmmc4";
818 nvidia,pull = <TEGRA_PIN_PULL_UP>; 820 nvidia,pull = <TEGRA_PIN_PULL_UP>;
819 nvidia,tristate = <TEGRA_PIN_DISABLE>; 821 nvidia,tristate = <TEGRA_PIN_DISABLE>;
820 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 822 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
821 }; 823 };
822 sdmmc4_dat3_paa3 { 824 sdmmc4-dat3-paa3 {
823 nvidia,pins = "sdmmc4_dat3_paa3"; 825 nvidia,pins = "sdmmc4_dat3_paa3";
824 nvidia,function = "sdmmc4"; 826 nvidia,function = "sdmmc4";
825 nvidia,pull = <TEGRA_PIN_PULL_UP>; 827 nvidia,pull = <TEGRA_PIN_PULL_UP>;
826 nvidia,tristate = <TEGRA_PIN_DISABLE>; 828 nvidia,tristate = <TEGRA_PIN_DISABLE>;
827 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 829 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
828 }; 830 };
829 sdmmc4_dat4_paa4 { 831 sdmmc4-dat4-paa4 {
830 nvidia,pins = "sdmmc4_dat4_paa4"; 832 nvidia,pins = "sdmmc4_dat4_paa4";
831 nvidia,function = "sdmmc4"; 833 nvidia,function = "sdmmc4";
832 nvidia,pull = <TEGRA_PIN_PULL_UP>; 834 nvidia,pull = <TEGRA_PIN_PULL_UP>;
833 nvidia,tristate = <TEGRA_PIN_DISABLE>; 835 nvidia,tristate = <TEGRA_PIN_DISABLE>;
834 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 836 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
835 }; 837 };
836 sdmmc4_dat5_paa5 { 838 sdmmc4-dat5-paa5 {
837 nvidia,pins = "sdmmc4_dat5_paa5"; 839 nvidia,pins = "sdmmc4_dat5_paa5";
838 nvidia,function = "sdmmc4"; 840 nvidia,function = "sdmmc4";
839 nvidia,pull = <TEGRA_PIN_PULL_UP>; 841 nvidia,pull = <TEGRA_PIN_PULL_UP>;
840 nvidia,tristate = <TEGRA_PIN_DISABLE>; 842 nvidia,tristate = <TEGRA_PIN_DISABLE>;
841 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 843 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
842 }; 844 };
843 sdmmc4_dat6_paa6 { 845 sdmmc4-dat6-paa6 {
844 nvidia,pins = "sdmmc4_dat6_paa6"; 846 nvidia,pins = "sdmmc4_dat6_paa6";
845 nvidia,function = "sdmmc4"; 847 nvidia,function = "sdmmc4";
846 nvidia,pull = <TEGRA_PIN_PULL_UP>; 848 nvidia,pull = <TEGRA_PIN_PULL_UP>;
847 nvidia,tristate = <TEGRA_PIN_DISABLE>; 849 nvidia,tristate = <TEGRA_PIN_DISABLE>;
848 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 850 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
849 }; 851 };
850 sdmmc4_dat7_paa7 { 852 sdmmc4-dat7-paa7 {
851 nvidia,pins = "sdmmc4_dat7_paa7"; 853 nvidia,pins = "sdmmc4_dat7_paa7";
852 nvidia,function = "sdmmc4"; 854 nvidia,function = "sdmmc4";
853 nvidia,pull = <TEGRA_PIN_PULL_UP>; 855 nvidia,pull = <TEGRA_PIN_PULL_UP>;
854 nvidia,tristate = <TEGRA_PIN_DISABLE>; 856 nvidia,tristate = <TEGRA_PIN_DISABLE>;
855 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 857 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
856 }; 858 };
857 sdmmc4_clk_pcc4 { 859 sdmmc4-clk-pcc4 {
858 nvidia,pins = "sdmmc4_clk_pcc4"; 860 nvidia,pins = "sdmmc4_clk_pcc4";
859 nvidia,function = "sdmmc4"; 861 nvidia,function = "sdmmc4";
860 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 862 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
861 nvidia,tristate = <TEGRA_PIN_DISABLE>; 863 nvidia,tristate = <TEGRA_PIN_DISABLE>;
862 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 864 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
863 }; 865 };
864 sdmmc4_cmd_pt7 { 866 sdmmc4-cmd-pt7 {
865 nvidia,pins = "sdmmc4_cmd_pt7"; 867 nvidia,pins = "sdmmc4_cmd_pt7";
866 nvidia,function = "sdmmc4"; 868 nvidia,function = "sdmmc4";
867 nvidia,pull = <TEGRA_PIN_PULL_UP>; 869 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -870,7 +872,7 @@
870 }; 872 };
871 873
872 /* JTAG_RTCK */ 874 /* JTAG_RTCK */
873 jtag_rtck { 875 jtag-rtck {
874 nvidia,pins = "jtag_rtck"; 876 nvidia,pins = "jtag_rtck";
875 nvidia,function = "rtck"; 877 nvidia,function = "rtck";
876 nvidia,pull = <TEGRA_PIN_PULL_UP>; 878 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -879,7 +881,7 @@
879 }; 881 };
880 882
881 /* LAN_DEV_OFF# */ 883 /* LAN_DEV_OFF# */
882 ulpi_data5_po6 { 884 ulpi-data5-po6 {
883 nvidia,pins = "ulpi_data5_po6"; 885 nvidia,pins = "ulpi_data5_po6";
884 nvidia,function = "ulpi"; 886 nvidia,function = "ulpi";
885 nvidia,pull = <TEGRA_PIN_PULL_UP>; 887 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -888,7 +890,7 @@
888 }; 890 };
889 891
890 /* LAN_RESET# */ 892 /* LAN_RESET# */
891 kb_row10_ps2 { 893 kb-row10-ps2 {
892 nvidia,pins = "kb_row10_ps2"; 894 nvidia,pins = "kb_row10_ps2";
893 nvidia,function = "rsvd2"; 895 nvidia,function = "rsvd2";
894 nvidia,pull = <TEGRA_PIN_PULL_UP>; 896 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -897,7 +899,7 @@
897 }; 899 };
898 900
899 /* LAN_WAKE# */ 901 /* LAN_WAKE# */
900 ulpi_data4_po5 { 902 ulpi-data4-po5 {
901 nvidia,pins = "ulpi_data4_po5"; 903 nvidia,pins = "ulpi_data4_po5";
902 nvidia,function = "ulpi"; 904 nvidia,function = "ulpi";
903 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 905 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -951,35 +953,35 @@
951 }; 953 };
952 954
953 /* MCU SPI */ 955 /* MCU SPI */
954 gpio_x4_aud_px4 { 956 gpio-x4-aud-px4 {
955 nvidia,pins = "gpio_x4_aud_px4"; 957 nvidia,pins = "gpio_x4_aud_px4";
956 nvidia,function = "spi2"; 958 nvidia,function = "spi2";
957 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 959 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
958 nvidia,tristate = <TEGRA_PIN_DISABLE>; 960 nvidia,tristate = <TEGRA_PIN_DISABLE>;
959 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 961 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
960 }; 962 };
961 gpio_x5_aud_px5 { 963 gpio-x5-aud-px5 {
962 nvidia,pins = "gpio_x5_aud_px5"; 964 nvidia,pins = "gpio_x5_aud_px5";
963 nvidia,function = "spi2"; 965 nvidia,function = "spi2";
964 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 966 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
965 nvidia,tristate = <TEGRA_PIN_DISABLE>; 967 nvidia,tristate = <TEGRA_PIN_DISABLE>;
966 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 968 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
967 }; 969 };
968 gpio_x6_aud_px6 { /* MCU_CS */ 970 gpio-x6-aud-px6 { /* MCU_CS */
969 nvidia,pins = "gpio_x6_aud_px6"; 971 nvidia,pins = "gpio_x6_aud_px6";
970 nvidia,function = "spi2"; 972 nvidia,function = "spi2";
971 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 973 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
972 nvidia,tristate = <TEGRA_PIN_DISABLE>; 974 nvidia,tristate = <TEGRA_PIN_DISABLE>;
973 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 975 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
974 }; 976 };
975 gpio_x7_aud_px7 { 977 gpio-x7-aud-px7 {
976 nvidia,pins = "gpio_x7_aud_px7"; 978 nvidia,pins = "gpio_x7_aud_px7";
977 nvidia,function = "spi2"; 979 nvidia,function = "spi2";
978 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 980 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
979 nvidia,tristate = <TEGRA_PIN_ENABLE>; 981 nvidia,tristate = <TEGRA_PIN_ENABLE>;
980 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 982 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
981 }; 983 };
982 gpio_w2_aud_pw2 { /* MCU_CSEZP */ 984 gpio-w2-aud-pw2 { /* MCU_CSEZP */
983 nvidia,pins = "gpio_w2_aud_pw2"; 985 nvidia,pins = "gpio_w2_aud_pw2";
984 nvidia,function = "spi2"; 986 nvidia,function = "spi2";
985 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 987 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -988,7 +990,7 @@
988 }; 990 };
989 991
990 /* PMIC_CLK_32K */ 992 /* PMIC_CLK_32K */
991 clk_32k_in { 993 clk-32k-in {
992 nvidia,pins = "clk_32k_in"; 994 nvidia,pins = "clk_32k_in";
993 nvidia,function = "clk"; 995 nvidia,function = "clk";
994 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 996 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -997,7 +999,7 @@
997 }; 999 };
998 1000
999 /* PMIC_CPU_OC_INT */ 1001 /* PMIC_CPU_OC_INT */
1000 clk_32k_out_pa0 { 1002 clk-32k-out-pa0 {
1001 nvidia,pins = "clk_32k_out_pa0"; 1003 nvidia,pins = "clk_32k_out_pa0";
1002 nvidia,function = "soc"; 1004 nvidia,function = "soc";
1003 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1005 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1006,7 +1008,7 @@
1006 }; 1008 };
1007 1009
1008 /* PWR_I2C */ 1010 /* PWR_I2C */
1009 pwr_i2c_scl_pz6 { 1011 pwr-i2c-scl-pz6 {
1010 nvidia,pins = "pwr_i2c_scl_pz6"; 1012 nvidia,pins = "pwr_i2c_scl_pz6";
1011 nvidia,function = "i2cpwr"; 1013 nvidia,function = "i2cpwr";
1012 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1014 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1014,7 +1016,7 @@
1014 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1016 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1015 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 1017 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1016 }; 1018 };
1017 pwr_i2c_sda_pz7 { 1019 pwr-i2c-sda-pz7 {
1018 nvidia,pins = "pwr_i2c_sda_pz7"; 1020 nvidia,pins = "pwr_i2c_sda_pz7";
1019 nvidia,function = "i2cpwr"; 1021 nvidia,function = "i2cpwr";
1020 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1022 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1024,7 +1026,7 @@
1024 }; 1026 };
1025 1027
1026 /* PWR_INT_N */ 1028 /* PWR_INT_N */
1027 pwr_int_n { 1029 pwr-int-n {
1028 nvidia,pins = "pwr_int_n"; 1030 nvidia,pins = "pwr_int_n";
1029 nvidia,function = "pmi"; 1031 nvidia,function = "pmi";
1030 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1032 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1042,7 +1044,7 @@
1042 }; 1044 };
1043 1045
1044 /* RESET_OUT_N */ 1046 /* RESET_OUT_N */
1045 reset_out_n { 1047 reset-out-n {
1046 nvidia,pins = "reset_out_n"; 1048 nvidia,pins = "reset_out_n";
1047 nvidia,function = "reset_out_n"; 1049 nvidia,function = "reset_out_n";
1048 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1050 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1051,14 +1053,14 @@
1051 }; 1053 };
1052 1054
1053 /* SHIFT_CTRL_DIR_IN */ 1055 /* SHIFT_CTRL_DIR_IN */
1054 kb_row0_pr0 { 1056 kb-row0-pr0 {
1055 nvidia,pins = "kb_row0_pr0"; 1057 nvidia,pins = "kb_row0_pr0";
1056 nvidia,function = "rsvd2"; 1058 nvidia,function = "rsvd2";
1057 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1059 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1058 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1060 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1059 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1061 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1060 }; 1062 };
1061 kb_row1_pr1 { 1063 kb-row1-pr1 {
1062 nvidia,pins = "kb_row1_pr1"; 1064 nvidia,pins = "kb_row1_pr1";
1063 nvidia,function = "rsvd2"; 1065 nvidia,function = "rsvd2";
1064 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1066 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1067,7 +1069,7 @@
1067 }; 1069 };
1068 1070
1069 /* Configure level-shifter as output for HDA */ 1071 /* Configure level-shifter as output for HDA */
1070 kb_row11_ps3 { 1072 kb-row11-ps3 {
1071 nvidia,pins = "kb_row11_ps3"; 1073 nvidia,pins = "kb_row11_ps3";
1072 nvidia,function = "rsvd2"; 1074 nvidia,function = "rsvd2";
1073 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1075 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1076,21 +1078,21 @@
1076 }; 1078 };
1077 1079
1078 /* SHIFT_CTRL_DIR_OUT */ 1080 /* SHIFT_CTRL_DIR_OUT */
1079 kb_col5_pq5 { 1081 kb-col5-pq5 {
1080 nvidia,pins = "kb_col5_pq5"; 1082 nvidia,pins = "kb_col5_pq5";
1081 nvidia,function = "rsvd2"; 1083 nvidia,function = "rsvd2";
1082 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1084 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1083 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1085 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1084 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1086 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1085 }; 1087 };
1086 kb_col6_pq6 { 1088 kb-col6-pq6 {
1087 nvidia,pins = "kb_col6_pq6"; 1089 nvidia,pins = "kb_col6_pq6";
1088 nvidia,function = "rsvd2"; 1090 nvidia,function = "rsvd2";
1089 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1091 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1090 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1092 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1091 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1093 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1092 }; 1094 };
1093 kb_col7_pq7 { 1095 kb-col7-pq7 {
1094 nvidia,pins = "kb_col7_pq7"; 1096 nvidia,pins = "kb_col7_pq7";
1095 nvidia,function = "rsvd2"; 1097 nvidia,function = "rsvd2";
1096 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1098 nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1099,35 +1101,35 @@
1099 }; 1101 };
1100 1102
1101 /* SHIFT_CTRL_OE */ 1103 /* SHIFT_CTRL_OE */
1102 kb_col0_pq0 { 1104 kb-col0-pq0 {
1103 nvidia,pins = "kb_col0_pq0"; 1105 nvidia,pins = "kb_col0_pq0";
1104 nvidia,function = "rsvd2"; 1106 nvidia,function = "rsvd2";
1105 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1107 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1106 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1108 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1107 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1109 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1108 }; 1110 };
1109 kb_col1_pq1 { 1111 kb-col1-pq1 {
1110 nvidia,pins = "kb_col1_pq1"; 1112 nvidia,pins = "kb_col1_pq1";
1111 nvidia,function = "rsvd2"; 1113 nvidia,function = "rsvd2";
1112 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1114 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1113 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1115 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1114 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1116 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1115 }; 1117 };
1116 kb_col2_pq2 { 1118 kb-col2-pq2 {
1117 nvidia,pins = "kb_col2_pq2"; 1119 nvidia,pins = "kb_col2_pq2";
1118 nvidia,function = "rsvd2"; 1120 nvidia,function = "rsvd2";
1119 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1121 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1120 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1122 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1121 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1123 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1122 }; 1124 };
1123 kb_col4_pq4 { 1125 kb-col4-pq4 {
1124 nvidia,pins = "kb_col4_pq4"; 1126 nvidia,pins = "kb_col4_pq4";
1125 nvidia,function = "kbc"; 1127 nvidia,function = "kbc";
1126 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1128 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1127 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1129 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1128 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1130 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1129 }; 1131 };
1130 kb_row2_pr2 { 1132 kb-row2-pr2 {
1131 nvidia,pins = "kb_row2_pr2"; 1133 nvidia,pins = "kb_row2_pr2";
1132 nvidia,function = "rsvd2"; 1134 nvidia,function = "rsvd2";
1133 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1135 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1145,7 +1147,7 @@
1145 }; 1147 };
1146 1148
1147 /* TOUCH_INT */ 1149 /* TOUCH_INT */
1148 gpio_w3_aud_pw3 { 1150 gpio-w3-aud-pw3 {
1149 nvidia,pins = "gpio_w3_aud_pw3"; 1151 nvidia,pins = "gpio_w3_aud_pw3";
1150 nvidia,function = "spi6"; 1152 nvidia,function = "spi6";
1151 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1153 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1286,189 +1288,189 @@
1286 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1288 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1287 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1289 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1288 }; 1290 };
1289 dap1_fs_pn0 { /* NC */ 1291 dap1-fs-pn0 { /* NC */
1290 nvidia,pins = "dap1_fs_pn0"; 1292 nvidia,pins = "dap1_fs_pn0";
1291 nvidia,function = "rsvd4"; 1293 nvidia,function = "rsvd4";
1292 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1294 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1293 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1295 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1294 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1296 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1295 }; 1297 };
1296 dap1_din_pn1 { /* NC */ 1298 dap1-din-pn1 { /* NC */
1297 nvidia,pins = "dap1_din_pn1"; 1299 nvidia,pins = "dap1_din_pn1";
1298 nvidia,function = "rsvd4"; 1300 nvidia,function = "rsvd4";
1299 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1301 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1300 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1302 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1301 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1303 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1302 }; 1304 };
1303 dap1_sclk_pn3 { /* NC */ 1305 dap1-sclk-pn3 { /* NC */
1304 nvidia,pins = "dap1_sclk_pn3"; 1306 nvidia,pins = "dap1_sclk_pn3";
1305 nvidia,function = "rsvd4"; 1307 nvidia,function = "rsvd4";
1306 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1308 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1307 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1309 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1308 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1310 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1309 }; 1311 };
1310 ulpi_data7_po0 { /* NC */ 1312 ulpi-data7-po0 { /* NC */
1311 nvidia,pins = "ulpi_data7_po0"; 1313 nvidia,pins = "ulpi_data7_po0";
1312 nvidia,function = "ulpi"; 1314 nvidia,function = "ulpi";
1313 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1315 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1314 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1316 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1315 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1317 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1316 }; 1318 };
1317 ulpi_data0_po1 { /* NC */ 1319 ulpi-data0-po1 { /* NC */
1318 nvidia,pins = "ulpi_data0_po1"; 1320 nvidia,pins = "ulpi_data0_po1";
1319 nvidia,function = "ulpi"; 1321 nvidia,function = "ulpi";
1320 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1322 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1321 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1323 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1322 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1324 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1323 }; 1325 };
1324 ulpi_data1_po2 { /* NC */ 1326 ulpi-data1-po2 { /* NC */
1325 nvidia,pins = "ulpi_data1_po2"; 1327 nvidia,pins = "ulpi_data1_po2";
1326 nvidia,function = "ulpi"; 1328 nvidia,function = "ulpi";
1327 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1329 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1328 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1330 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1329 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1331 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1330 }; 1332 };
1331 ulpi_data2_po3 { /* NC */ 1333 ulpi-data2-po3 { /* NC */
1332 nvidia,pins = "ulpi_data2_po3"; 1334 nvidia,pins = "ulpi_data2_po3";
1333 nvidia,function = "ulpi"; 1335 nvidia,function = "ulpi";
1334 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1336 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1335 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1337 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1336 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1338 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1337 }; 1339 };
1338 ulpi_data3_po4 { /* NC */ 1340 ulpi-data3-po4 { /* NC */
1339 nvidia,pins = "ulpi_data3_po4"; 1341 nvidia,pins = "ulpi_data3_po4";
1340 nvidia,function = "ulpi"; 1342 nvidia,function = "ulpi";
1341 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1343 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1342 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1344 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1343 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1345 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1344 }; 1346 };
1345 ulpi_data6_po7 { /* NC */ 1347 ulpi-data6-po7 { /* NC */
1346 nvidia,pins = "ulpi_data6_po7"; 1348 nvidia,pins = "ulpi_data6_po7";
1347 nvidia,function = "ulpi"; 1349 nvidia,function = "ulpi";
1348 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1350 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1349 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1351 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1350 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1352 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1351 }; 1353 };
1352 dap4_fs_pp4 { /* NC */ 1354 dap4-fs-pp4 { /* NC */
1353 nvidia,pins = "dap4_fs_pp4"; 1355 nvidia,pins = "dap4_fs_pp4";
1354 nvidia,function = "rsvd4"; 1356 nvidia,function = "rsvd4";
1355 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1357 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1356 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1358 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1357 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1359 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1358 }; 1360 };
1359 dap4_din_pp5 { /* NC */ 1361 dap4-din-pp5 { /* NC */
1360 nvidia,pins = "dap4_din_pp5"; 1362 nvidia,pins = "dap4_din_pp5";
1361 nvidia,function = "rsvd3"; 1363 nvidia,function = "rsvd3";
1362 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1364 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1363 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1365 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1364 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1366 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1365 }; 1367 };
1366 dap4_dout_pp6 { /* NC */ 1368 dap4-dout-pp6 { /* NC */
1367 nvidia,pins = "dap4_dout_pp6"; 1369 nvidia,pins = "dap4_dout_pp6";
1368 nvidia,function = "rsvd4"; 1370 nvidia,function = "rsvd4";
1369 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1371 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1370 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1372 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1371 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1373 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1372 }; 1374 };
1373 dap4_sclk_pp7 { /* NC */ 1375 dap4-sclk-pp7 { /* NC */
1374 nvidia,pins = "dap4_sclk_pp7"; 1376 nvidia,pins = "dap4_sclk_pp7";
1375 nvidia,function = "rsvd3"; 1377 nvidia,function = "rsvd3";
1376 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1378 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1377 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1379 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1378 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1380 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1379 }; 1381 };
1380 kb_col3_pq3 { /* NC */ 1382 kb-col3-pq3 { /* NC */
1381 nvidia,pins = "kb_col3_pq3"; 1383 nvidia,pins = "kb_col3_pq3";
1382 nvidia,function = "kbc"; 1384 nvidia,function = "kbc";
1383 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1385 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1384 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1386 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1385 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1387 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1386 }; 1388 };
1387 kb_row3_pr3 { /* NC */ 1389 kb-row3-pr3 { /* NC */
1388 nvidia,pins = "kb_row3_pr3"; 1390 nvidia,pins = "kb_row3_pr3";
1389 nvidia,function = "kbc"; 1391 nvidia,function = "kbc";
1390 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1392 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1391 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1393 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1392 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1394 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1393 }; 1395 };
1394 kb_row4_pr4 { /* NC */ 1396 kb-row4-pr4 { /* NC */
1395 nvidia,pins = "kb_row4_pr4"; 1397 nvidia,pins = "kb_row4_pr4";
1396 nvidia,function = "rsvd3"; 1398 nvidia,function = "rsvd3";
1397 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1399 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1398 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1400 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1399 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1401 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1400 }; 1402 };
1401 kb_row5_pr5 { /* NC */ 1403 kb-row5-pr5 { /* NC */
1402 nvidia,pins = "kb_row5_pr5"; 1404 nvidia,pins = "kb_row5_pr5";
1403 nvidia,function = "rsvd3"; 1405 nvidia,function = "rsvd3";
1404 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1406 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1405 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1407 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1406 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1408 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1407 }; 1409 };
1408 kb_row6_pr6 { /* NC */ 1410 kb-row6-pr6 { /* NC */
1409 nvidia,pins = "kb_row6_pr6"; 1411 nvidia,pins = "kb_row6_pr6";
1410 nvidia,function = "kbc"; 1412 nvidia,function = "kbc";
1411 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1413 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1412 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1414 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1413 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1415 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1414 }; 1416 };
1415 kb_row7_pr7 { /* NC */ 1417 kb-row7-pr7 { /* NC */
1416 nvidia,pins = "kb_row7_pr7"; 1418 nvidia,pins = "kb_row7_pr7";
1417 nvidia,function = "rsvd2"; 1419 nvidia,function = "rsvd2";
1418 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1420 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1419 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1421 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1420 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1422 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1421 }; 1423 };
1422 kb_row8_ps0 { /* NC */ 1424 kb-row8-ps0 { /* NC */
1423 nvidia,pins = "kb_row8_ps0"; 1425 nvidia,pins = "kb_row8_ps0";
1424 nvidia,function = "rsvd2"; 1426 nvidia,function = "rsvd2";
1425 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1427 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1426 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1428 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1427 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1429 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1428 }; 1430 };
1429 kb_row9_ps1 { /* NC */ 1431 kb-row9-ps1 { /* NC */
1430 nvidia,pins = "kb_row9_ps1"; 1432 nvidia,pins = "kb_row9_ps1";
1431 nvidia,function = "rsvd2"; 1433 nvidia,function = "rsvd2";
1432 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1434 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1433 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1435 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1434 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1436 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1435 }; 1437 };
1436 kb_row12_ps4 { /* NC */ 1438 kb-row12-ps4 { /* NC */
1437 nvidia,pins = "kb_row12_ps4"; 1439 nvidia,pins = "kb_row12_ps4";
1438 nvidia,function = "rsvd2"; 1440 nvidia,function = "rsvd2";
1439 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1441 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1440 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1442 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1441 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1443 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1442 }; 1444 };
1443 kb_row13_ps5 { /* NC */ 1445 kb-row13-ps5 { /* NC */
1444 nvidia,pins = "kb_row13_ps5"; 1446 nvidia,pins = "kb_row13_ps5";
1445 nvidia,function = "rsvd2"; 1447 nvidia,function = "rsvd2";
1446 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1448 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1447 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1449 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1448 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1450 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1449 }; 1451 };
1450 kb_row14_ps6 { /* NC */ 1452 kb-row14-ps6 { /* NC */
1451 nvidia,pins = "kb_row14_ps6"; 1453 nvidia,pins = "kb_row14_ps6";
1452 nvidia,function = "rsvd2"; 1454 nvidia,function = "rsvd2";
1453 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1455 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1454 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1456 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1455 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1457 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1456 }; 1458 };
1457 kb_row15_ps7 { /* NC */ 1459 kb-row15-ps7 { /* NC */
1458 nvidia,pins = "kb_row15_ps7"; 1460 nvidia,pins = "kb_row15_ps7";
1459 nvidia,function = "rsvd3"; 1461 nvidia,function = "rsvd3";
1460 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1462 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1461 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1463 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1462 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1464 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1463 }; 1465 };
1464 kb_row16_pt0 { /* NC */ 1466 kb-row16-pt0 { /* NC */
1465 nvidia,pins = "kb_row16_pt0"; 1467 nvidia,pins = "kb_row16_pt0";
1466 nvidia,function = "rsvd2"; 1468 nvidia,function = "rsvd2";
1467 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1469 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1468 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1470 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1469 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1471 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1470 }; 1472 };
1471 kb_row17_pt1 { /* NC */ 1473 kb-row17-pt1 { /* NC */
1472 nvidia,pins = "kb_row17_pt1"; 1474 nvidia,pins = "kb_row17_pt1";
1473 nvidia,function = "rsvd2"; 1475 nvidia,function = "rsvd2";
1474 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1476 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1496,14 +1498,14 @@
1496 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1498 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1497 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1499 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1498 }; 1500 };
1499 gpio_x1_aud_px1 { /* NC */ 1501 gpio-x1-aud-px1 { /* NC */
1500 nvidia,pins = "gpio_x1_aud_px1"; 1502 nvidia,pins = "gpio_x1_aud_px1";
1501 nvidia,function = "rsvd2"; 1503 nvidia,function = "rsvd2";
1502 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1504 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1503 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1505 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1504 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1506 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1505 }; 1507 };
1506 gpio_x3_aud_px3 { /* NC */ 1508 gpio-x3-aud-px3 { /* NC */
1507 nvidia,pins = "gpio_x3_aud_px3"; 1509 nvidia,pins = "gpio_x3_aud_px3";
1508 nvidia,function = "rsvd4"; 1510 nvidia,function = "rsvd4";
1509 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1511 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1531,14 +1533,14 @@
1531 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1533 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1532 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1534 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1533 }; 1535 };
1534 clk3_req_pee1 { /* NC */ 1536 clk3-req-pee1 { /* NC */
1535 nvidia,pins = "clk3_req_pee1"; 1537 nvidia,pins = "clk3_req_pee1";
1536 nvidia,function = "rsvd2"; 1538 nvidia,function = "rsvd2";
1537 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1539 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1538 nvidia,tristate = <TEGRA_PIN_ENABLE>; 1540 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1539 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1541 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1540 }; 1542 };
1541 dap_mclk1_req_pee2 { /* NC */ 1543 dap-mclk1-req-pee2 { /* NC */
1542 nvidia,pins = "dap_mclk1_req_pee2"; 1544 nvidia,pins = "dap_mclk1_req_pee2";
1543 nvidia,function = "rsvd4"; 1545 nvidia,function = "rsvd4";
1544 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1546 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1554,7 +1556,7 @@
1554 * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 1556 * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
1555 * bits being set to 0xfffd according to the TRM! 1557 * bits being set to 0xfffd according to the TRM!
1556 */ 1558 */
1557 sdmmc3_clk_lb_out_pee4 { /* NC */ 1559 sdmmc3-clk-lb-out-pee4 { /* NC */
1558 nvidia,pins = "sdmmc3_clk_lb_out_pee4"; 1560 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
1559 nvidia,function = "sdmmc3"; 1561 nvidia,function = "sdmmc3";
1560 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1562 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1589,8 +1591,9 @@
1589 sgtl5000: codec@a { 1591 sgtl5000: codec@a {
1590 compatible = "fsl,sgtl5000"; 1592 compatible = "fsl,sgtl5000";
1591 reg = <0x0a>; 1593 reg = <0x0a>;
1592 VDDA-supply = <&reg_3v3>; 1594 VDDA-supply = <&reg_module_3v3_audio>;
1593 VDDIO-supply = <&vddio_1v8>; 1595 VDDD-supply = <&reg_1v8_vddio>;
1596 VDDIO-supply = <&reg_1v8_vddio>;
1594 clocks = <&tegra_car TEGRA124_CLK_EXTERN1>; 1597 clocks = <&tegra_car TEGRA124_CLK_EXTERN1>;
1595 }; 1598 };
1596 1599
@@ -1607,14 +1610,14 @@
1607 pinctrl-0 = <&as3722_default>; 1610 pinctrl-0 = <&as3722_default>;
1608 1611
1609 as3722_default: pinmux { 1612 as3722_default: pinmux {
1610 gpio2_7 { 1613 gpio2-7 {
1611 pins = "gpio2", /* PWR_EN_+V3.3 */ 1614 pins = "gpio2", /* PWR_EN_+V3.3 */
1612 "gpio7"; /* +V1.6_LPO */ 1615 "gpio7"; /* +V1.6_LPO */
1613 function = "gpio"; 1616 function = "gpio";
1614 bias-pull-up; 1617 bias-pull-up;
1615 }; 1618 };
1616 1619
1617 gpio0_1_3_4_5_6 { 1620 gpio0-1-3-4-5-6 {
1618 pins = "gpio0", "gpio1", "gpio3", 1621 pins = "gpio0", "gpio1", "gpio3",
1619 "gpio4", "gpio5", "gpio6"; 1622 "gpio4", "gpio5", "gpio6";
1620 bias-high-impedance; 1623 bias-high-impedance;
@@ -1622,18 +1625,18 @@
1622 }; 1625 };
1623 1626
1624 regulators { 1627 regulators {
1625 vsup-sd2-supply = <&reg_3v3>; 1628 vsup-sd2-supply = <&reg_module_3v3>;
1626 vsup-sd3-supply = <&reg_3v3>; 1629 vsup-sd3-supply = <&reg_module_3v3>;
1627 vsup-sd4-supply = <&reg_3v3>; 1630 vsup-sd4-supply = <&reg_module_3v3>;
1628 vsup-sd5-supply = <&reg_3v3>; 1631 vsup-sd5-supply = <&reg_module_3v3>;
1629 vin-ldo0-supply = <&vddio_ddr_1v35>; 1632 vin-ldo0-supply = <&reg_1v35_vddio_ddr>;
1630 vin-ldo1-6-supply = <&reg_3v3>; 1633 vin-ldo1-6-supply = <&reg_module_3v3>;
1631 vin-ldo2-5-7-supply = <&vddio_1v8>; 1634 vin-ldo2-5-7-supply = <&reg_1v8_vddio>;
1632 vin-ldo3-4-supply = <&reg_3v3>; 1635 vin-ldo3-4-supply = <&reg_module_3v3>;
1633 vin-ldo9-10-supply = <&reg_3v3>; 1636 vin-ldo9-10-supply = <&reg_module_3v3>;
1634 vin-ldo11-supply = <&reg_3v3>; 1637 vin-ldo11-supply = <&reg_module_3v3>;
1635 1638
1636 vdd_cpu: sd0 { 1639 reg_vdd_cpu: sd0 {
1637 regulator-name = "+VDD_CPU_AP"; 1640 regulator-name = "+VDD_CPU_AP";
1638 regulator-min-microvolt = <700000>; 1641 regulator-min-microvolt = <700000>;
1639 regulator-max-microvolt = <1400000>; 1642 regulator-max-microvolt = <1400000>;
@@ -1655,7 +1658,7 @@
1655 ams,ext-control = <1>; 1658 ams,ext-control = <1>;
1656 }; 1659 };
1657 1660
1658 vddio_ddr_1v35: sd2 { 1661 reg_1v35_vddio_ddr: sd2 {
1659 regulator-name = 1662 regulator-name =
1660 "+V1.35_VDDIO_DDR(sd2)"; 1663 "+V1.35_VDDIO_DDR(sd2)";
1661 regulator-min-microvolt = <1350000>; 1664 regulator-min-microvolt = <1350000>;
@@ -1673,13 +1676,13 @@
1673 regulator-boot-on; 1676 regulator-boot-on;
1674 }; 1677 };
1675 1678
1676 vdd_1v05: sd4 { 1679 reg_1v05_vdd: sd4 {
1677 regulator-name = "+V1.05"; 1680 regulator-name = "+V1.05";
1678 regulator-min-microvolt = <1050000>; 1681 regulator-min-microvolt = <1050000>;
1679 regulator-max-microvolt = <1050000>; 1682 regulator-max-microvolt = <1050000>;
1680 }; 1683 };
1681 1684
1682 vddio_1v8: sd5 { 1685 reg_1v8_vddio: sd5 {
1683 regulator-name = "+V1.8"; 1686 regulator-name = "+V1.8";
1684 regulator-min-microvolt = <1800000>; 1687 regulator-min-microvolt = <1800000>;
1685 regulator-max-microvolt = <1800000>; 1688 regulator-max-microvolt = <1800000>;
@@ -1687,7 +1690,7 @@
1687 regulator-always-on; 1690 regulator-always-on;
1688 }; 1691 };
1689 1692
1690 vdd_gpu: sd6 { 1693 reg_vdd_gpu: sd6 {
1691 regulator-name = "+VDD_GPU_AP"; 1694 regulator-name = "+VDD_GPU_AP";
1692 regulator-min-microvolt = <650000>; 1695 regulator-min-microvolt = <650000>;
1693 regulator-max-microvolt = <1200000>; 1696 regulator-max-microvolt = <1200000>;
@@ -1697,7 +1700,7 @@
1697 regulator-always-on; 1700 regulator-always-on;
1698 }; 1701 };
1699 1702
1700 avdd_1v05: ldo0 { 1703 reg_1v05_avdd: ldo0 {
1701 regulator-name = "+V1.05_AVDD"; 1704 regulator-name = "+V1.05_AVDD";
1702 regulator-min-microvolt = <1050000>; 1705 regulator-min-microvolt = <1050000>;
1703 regulator-max-microvolt = <1050000>; 1706 regulator-max-microvolt = <1050000>;
@@ -1772,12 +1775,13 @@
1772 * TMP451 temperature sensor 1775 * TMP451 temperature sensor
1773 * Note: THERM_N directly connected to AS3722 PMIC THERM 1776 * Note: THERM_N directly connected to AS3722 PMIC THERM
1774 */ 1777 */
1775 temperature-sensor@4c { 1778 temp-sensor@4c {
1776 compatible = "ti,tmp451"; 1779 compatible = "ti,tmp451";
1777 reg = <0x4c>; 1780 reg = <0x4c>;
1778 interrupt-parent = <&gpio>; 1781 interrupt-parent = <&gpio>;
1779 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>; 1782 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
1780 #thermal-sensor-cells = <1>; 1783 #thermal-sensor-cells = <1>;
1784 vcc-supply = <&reg_module_3v3>;
1781 }; 1785 };
1782 }; 1786 };
1783 1787
@@ -1809,9 +1813,9 @@
1809 sata@70020000 { 1813 sata@70020000 {
1810 phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>; 1814 phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
1811 phy-names = "sata-0"; 1815 phy-names = "sata-0";
1812 avdd-supply = <&vdd_1v05>; 1816 avdd-supply = <&reg_1v05_vdd>;
1813 hvdd-supply = <&reg_3v3>; 1817 hvdd-supply = <&reg_module_3v3>;
1814 vddio-supply = <&vdd_1v05>; 1818 vddio-supply = <&reg_1v05_vdd>;
1815 }; 1819 };
1816 1820
1817 usb@70090000 { 1821 usb@70090000 {
@@ -1822,14 +1826,14 @@
1822 <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>, 1826 <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>,
1823 <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>; 1827 <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>;
1824 phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0"; 1828 phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0";
1825 avddio-pex-supply = <&vdd_1v05>; 1829 avddio-pex-supply = <&reg_1v05_vdd>;
1826 avdd-pll-erefe-supply = <&avdd_1v05>; 1830 avdd-pll-erefe-supply = <&reg_1v05_avdd>;
1827 avdd-pll-utmip-supply = <&vddio_1v8>; 1831 avdd-pll-utmip-supply = <&reg_1v8_vddio>;
1828 avdd-usb-ss-pll-supply = <&vdd_1v05>; 1832 avdd-usb-ss-pll-supply = <&reg_1v05_vdd>;
1829 avdd-usb-supply = <&reg_3v3>; 1833 avdd-usb-supply = <&reg_module_3v3>;
1830 dvddio-pex-supply = <&vdd_1v05>; 1834 dvddio-pex-supply = <&reg_1v05_vdd>;
1831 hvdd-usb-ss-pll-e-supply = <&reg_3v3>; 1835 hvdd-usb-ss-pll-e-supply = <&reg_module_3v3>;
1832 hvdd-usb-ss-supply = <&reg_3v3>; 1836 hvdd-usb-ss-supply = <&reg_module_3v3>;
1833 }; 1837 };
1834 1838
1835 padctl@7009f000 { 1839 padctl@7009f000 {
@@ -1839,18 +1843,18 @@
1839 1843
1840 lanes { 1844 lanes {
1841 usb2-0 { 1845 usb2-0 {
1842 nvidia,function = "xusb";
1843 status = "okay"; 1846 status = "okay";
1847 nvidia,function = "xusb";
1844 }; 1848 };
1845 1849
1846 usb2-1 { 1850 usb2-1 {
1847 nvidia,function = "xusb";
1848 status = "okay"; 1851 status = "okay";
1852 nvidia,function = "xusb";
1849 }; 1853 };
1850 1854
1851 usb2-2 { 1855 usb2-2 {
1852 nvidia,function = "xusb";
1853 status = "okay"; 1856 status = "okay";
1857 nvidia,function = "xusb";
1854 }; 1858 };
1855 }; 1859 };
1856 }; 1860 };
@@ -1860,28 +1864,28 @@
1860 1864
1861 lanes { 1865 lanes {
1862 pcie-0 { 1866 pcie-0 {
1863 nvidia,function = "usb3-ss";
1864 status = "okay"; 1867 status = "okay";
1868 nvidia,function = "usb3-ss";
1865 }; 1869 };
1866 1870
1867 pcie-1 { 1871 pcie-1 {
1868 nvidia,function = "usb3-ss";
1869 status = "okay"; 1872 status = "okay";
1873 nvidia,function = "usb3-ss";
1870 }; 1874 };
1871 1875
1872 pcie-2 { 1876 pcie-2 {
1873 nvidia,function = "pcie";
1874 status = "okay"; 1877 status = "okay";
1878 nvidia,function = "pcie";
1875 }; 1879 };
1876 1880
1877 pcie-3 { 1881 pcie-3 {
1878 nvidia,function = "pcie";
1879 status = "okay"; 1882 status = "okay";
1883 nvidia,function = "pcie";
1880 }; 1884 };
1881 1885
1882 pcie-4 { 1886 pcie-4 {
1883 nvidia,function = "pcie";
1884 status = "okay"; 1887 status = "okay";
1888 nvidia,function = "pcie";
1885 }; 1889 };
1886 }; 1890 };
1887 }; 1891 };
@@ -1891,8 +1895,8 @@
1891 1895
1892 lanes { 1896 lanes {
1893 sata-0 { 1897 sata-0 {
1894 nvidia,function = "sata";
1895 status = "okay"; 1898 status = "okay";
1899 nvidia,function = "sata";
1896 }; 1900 };
1897 }; 1901 };
1898 }; 1902 };
@@ -1903,7 +1907,6 @@
1903 usb2-0 { 1907 usb2-0 {
1904 status = "okay"; 1908 status = "okay";
1905 mode = "otg"; 1909 mode = "otg";
1906
1907 vbus-supply = <&reg_usbo1_vbus>; 1910 vbus-supply = <&reg_usbo1_vbus>;
1908 }; 1911 };
1909 1912
@@ -1911,7 +1914,6 @@
1911 usb2-1 { 1914 usb2-1 {
1912 status = "okay"; 1915 status = "okay";
1913 mode = "host"; 1916 mode = "host";
1914
1915 vbus-supply = <&reg_usbh_vbus>; 1917 vbus-supply = <&reg_usbh_vbus>;
1916 }; 1918 };
1917 1919
@@ -1919,18 +1921,19 @@
1919 usb2-2 { 1921 usb2-2 {
1920 status = "okay"; 1922 status = "okay";
1921 mode = "host"; 1923 mode = "host";
1922
1923 vbus-supply = <&reg_usbh_vbus>; 1924 vbus-supply = <&reg_usbh_vbus>;
1924 }; 1925 };
1925 1926
1926 usb3-0 { 1927 usb3-0 {
1927 nvidia,usb2-companion = <2>;
1928 status = "okay"; 1928 status = "okay";
1929 nvidia,usb2-companion = <2>;
1930 vbus-supply = <&reg_usbh_vbus>;
1929 }; 1931 };
1930 1932
1931 usb3-1 { 1933 usb3-1 {
1932 nvidia,usb2-companion = <0>;
1933 status = "okay"; 1934 status = "okay";
1935 nvidia,usb2-companion = <0>;
1936 vbus-supply = <&reg_usbo1_vbus>;
1934 }; 1937 };
1935 }; 1938 };
1936 }; 1939 };
@@ -1940,13 +1943,16 @@
1940 status = "okay"; 1943 status = "okay";
1941 bus-width = <8>; 1944 bus-width = <8>;
1942 non-removable; 1945 non-removable;
1946 vmmc-supply = <&reg_module_3v3>; /* VCC */
1947 vqmmc-supply = <&reg_1v8_vddio>; /* VCCQ */
1948 mmc-ddr-1_8v;
1943 }; 1949 };
1944 1950
1945 /* CPU DFLL clock */ 1951 /* CPU DFLL clock */
1946 clock@70110000 { 1952 clock@70110000 {
1947 status = "okay"; 1953 status = "okay";
1948 vdd-cpu-supply = <&vdd_cpu>;
1949 nvidia,i2c-fs-rate = <400000>; 1954 nvidia,i2c-fs-rate = <400000>;
1955 vdd-cpu-supply = <&reg_vdd_cpu>;
1950 }; 1956 };
1951 1957
1952 ahub@70300000 { 1958 ahub@70300000 {
@@ -1955,22 +1961,15 @@
1955 }; 1961 };
1956 }; 1962 };
1957 1963
1958 clocks { 1964 clk32k_in: osc3 {
1959 compatible = "simple-bus"; 1965 compatible = "fixed-clock";
1960 #address-cells = <1>; 1966 #clock-cells = <0>;
1961 #size-cells = <0>; 1967 clock-frequency = <32768>;
1962
1963 clk32k_in: clock@0 {
1964 compatible = "fixed-clock";
1965 reg = <0>;
1966 #clock-cells = <0>;
1967 clock-frequency = <32768>;
1968 };
1969 }; 1968 };
1970 1969
1971 cpus { 1970 cpus {
1972 cpu@0 { 1971 cpu@0 {
1973 vdd-cpu-supply = <&vdd_cpu>; 1972 vdd-cpu-supply = <&reg_vdd_cpu>;
1974 }; 1973 };
1975 }; 1974 };
1976 1975
@@ -1980,7 +1979,7 @@
1980 regulator-min-microvolt = <1050000>; 1979 regulator-min-microvolt = <1050000>;
1981 regulator-max-microvolt = <1050000>; 1980 regulator-max-microvolt = <1050000>;
1982 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>; 1981 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
1983 vin-supply = <&vdd_1v05>; 1982 vin-supply = <&reg_1v05_vdd>;
1984 }; 1983 };
1985 1984
1986 reg_3v3_mxm: regulator-3v3-mxm { 1985 reg_3v3_mxm: regulator-3v3-mxm {
@@ -1992,7 +1991,15 @@
1992 regulator-boot-on; 1991 regulator-boot-on;
1993 }; 1992 };
1994 1993
1995 reg_3v3: regulator-3v3 { 1994 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
1995 compatible = "regulator-fixed";
1996 regulator-name = "+V3.3_AVDD_HDMI";
1997 regulator-min-microvolt = <3300000>;
1998 regulator-max-microvolt = <3300000>;
1999 vin-supply = <&reg_1v05_vdd>;
2000 };
2001
2002 reg_module_3v3: regulator-module-3v3 {
1996 compatible = "regulator-fixed"; 2003 compatible = "regulator-fixed";
1997 regulator-name = "+V3.3"; 2004 regulator-name = "+V3.3";
1998 regulator-min-microvolt = <3300000>; 2005 regulator-min-microvolt = <3300000>;
@@ -2005,12 +2012,12 @@
2005 vin-supply = <&reg_3v3_mxm>; 2012 vin-supply = <&reg_3v3_mxm>;
2006 }; 2013 };
2007 2014
2008 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi { 2015 reg_module_3v3_audio: regulator-module-3v3-audio {
2009 compatible = "regulator-fixed"; 2016 compatible = "regulator-fixed";
2010 regulator-name = "+V3.3_AVDD_HDMI"; 2017 regulator-name = "+V3.3_AUDIO_AVDD_S";
2011 regulator-min-microvolt = <3300000>; 2018 regulator-min-microvolt = <3300000>;
2012 regulator-max-microvolt = <3300000>; 2019 regulator-max-microvolt = <3300000>;
2013 vin-supply = <&vdd_1v05>; 2020 regulator-always-on;
2014 }; 2021 };
2015 2022
2016 sound { 2023 sound {
@@ -2064,7 +2071,7 @@
2064 2071
2065&gpio { 2072&gpio {
2066 /* I210 Gigabit Ethernet Controller Reset */ 2073 /* I210 Gigabit Ethernet Controller Reset */
2067 lan_reset_n { 2074 lan-reset-n {
2068 gpio-hog; 2075 gpio-hog;
2069 gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>; 2076 gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
2070 output-high; 2077 output-high;
@@ -2072,7 +2079,7 @@
2072 }; 2079 };
2073 2080
2074 /* Control MXM3 pin 26 Reset Module Output Carrier Input */ 2081 /* Control MXM3 pin 26 Reset Module Output Carrier Input */
2075 reset_moci_ctrl { 2082 reset-moci-ctrl {
2076 gpio-hog; 2083 gpio-hog;
2077 gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>; 2084 gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
2078 output-high; 2085 output-high;
diff --git a/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
new file mode 100644
index 000000000000..3c0f2681fcde
--- /dev/null
+++ b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
@@ -0,0 +1,262 @@
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/dts-v1/;
3
4#include <dt-bindings/input/input.h>
5#include "tegra20-colibri.dtsi"
6
7/ {
8 model = "Toradex Colibri T20 on Colibri Evaluation Board";
9 compatible = "toradex,colibri_t20-eval-v3", "toradex,colibri_t20",
10 "nvidia,tegra20";
11
12 aliases {
13 rtc0 = "/i2c@7000c000/rtc@68";
14 rtc1 = "/i2c@7000d000/pmic@34";
15 rtc2 = "/rtc@7000e000";
16 serial0 = &uarta;
17 serial1 = &uartd;
18 serial2 = &uartb;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24
25 host1x@50000000 {
26 dc@54200000 {
27 rgb {
28 status = "okay";
29 nvidia,panel = <&panel>;
30 };
31 };
32
33 hdmi@54280000 {
34 status = "okay";
35 hdmi-supply = <&reg_5v0>;
36 };
37 };
38
39 pinmux@70000014 {
40 state_default: pinmux {
41 bl-on {
42 nvidia,tristate = <TEGRA_PIN_DISABLE>;
43 };
44
45 ddc {
46 nvidia,tristate = <TEGRA_PIN_DISABLE>;
47 };
48
49 hotplug-detect {
50 nvidia,tristate = <TEGRA_PIN_DISABLE>;
51 };
52
53 i2c {
54 nvidia,tristate = <TEGRA_PIN_DISABLE>;
55 };
56
57 lcd {
58 nvidia,tristate = <TEGRA_PIN_DISABLE>;
59 };
60
61 lm1 {
62 nvidia,tristate = <TEGRA_PIN_DISABLE>;
63 };
64
65 mmc {
66 nvidia,tristate = <TEGRA_PIN_DISABLE>;
67 };
68
69 mmccd {
70 nvidia,tristate = <TEGRA_PIN_DISABLE>;
71 };
72
73 pwm-a-b {
74 nvidia,tristate = <TEGRA_PIN_DISABLE>;
75 };
76
77 pwm-c-d {
78 nvidia,tristate = <TEGRA_PIN_DISABLE>;
79 };
80
81 ssp {
82 nvidia,tristate = <TEGRA_PIN_DISABLE>;
83 };
84
85 uart-a {
86 nvidia,tristate = <TEGRA_PIN_DISABLE>;
87 };
88
89 uart-b {
90 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 };
92
93 uart-c {
94 nvidia,tristate = <TEGRA_PIN_DISABLE>;
95 };
96
97 usbh-pen {
98 nvidia,tristate = <TEGRA_PIN_DISABLE>;
99 };
100 };
101 };
102
103 /* Colibri UART-A */
104 serial@70006000 {
105 status = "okay";
106 };
107
108 /* Colibri UART-C */
109 serial@70006040 {
110 status = "okay";
111 };
112
113 /* Colibri UART-B */
114 serial@70006300 {
115 status = "okay";
116 };
117
118 pwm@7000a000 {
119 status = "okay";
120 };
121
122 /*
123 * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
124 * board)
125 */
126 i2c@7000c000 {
127 status = "okay";
128 clock-frequency = <400000>;
129
130 /* M41T0M6 real time clock on carrier board */
131 rtc@68 {
132 compatible = "st,m41t0";
133 reg = <0x68>;
134 };
135 };
136
137 /* GEN2_I2C: unused */
138
139 /* CAM_I2C (I2C3): unused */
140
141 /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
142 i2c@7000c400 {
143 status = "okay";
144 };
145
146 /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
147 usb@c5000000 {
148 status = "okay";
149 dr_mode = "otg";
150 };
151
152 usb-phy@c5000000 {
153 status = "okay";
154 vbus-supply = <&reg_usbc_vbus>;
155 };
156
157 /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
158 usb@c5008000 {
159 status = "okay";
160 };
161
162 usb-phy@c5008000 {
163 status = "okay";
164 vbus-supply = <&reg_usbh_vbus>;
165 };
166
167 /* SPI4: Colibri SSP */
168 spi@7000da00 {
169 status = "okay";
170 spi-max-frequency = <25000000>;
171
172 can@0 {
173 compatible = "microchip,mcp2515";
174 reg = <0>;
175 clocks = <&clk16m>;
176 interrupt-parent = <&gpio>;
177 /* CAN_INT */
178 interrupts = <TEGRA_GPIO(A, 0) IRQ_TYPE_EDGE_FALLING>;
179 spi-max-frequency = <10000000>;
180 vdd-supply = <&reg_3v3>;
181 xceiver-supply = <&reg_5v0>;
182 };
183 };
184
185 /* SD/MMC */
186 sdhci@c8000600 {
187 status = "okay";
188 bus-width = <4>;
189 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
190 no-1-8-v;
191 };
192
193 backlight: backlight {
194 compatible = "pwm-backlight";
195 brightness-levels = <255 128 64 32 16 8 4 0>;
196 default-brightness-level = <6>;
197 /* BL_ON */
198 enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
199 power-supply = <&reg_3v3>;
200 pwms = <&pwm 0 5000000>; /* PWM<A> */
201 };
202
203 clk16m: osc3 {
204 compatible = "fixed-clock";
205 #clock-cells = <0>;
206 clock-frequency = <16000000>;
207 };
208
209 gpio-keys {
210 compatible = "gpio-keys";
211
212 wakeup {
213 label = "SODIMM pin 45 wakeup";
214 gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
215 linux,code = <KEY_WAKEUP>;
216 debounce-interval = <10>;
217 wakeup-source;
218 };
219 };
220
221 panel: panel {
222 /*
223 * edt,et057090dhu: EDT 5.7" LCD TFT
224 * edt,et070080dh6: EDT 7.0" LCD TFT
225 */
226 compatible = "edt,et057090dhu", "simple-panel";
227 backlight = <&backlight>;
228 power-supply = <&reg_3v3>;
229 };
230
231 reg_3v3: regulator-3v3 {
232 compatible = "regulator-fixed";
233 regulator-name = "3.3V_SW";
234 regulator-min-microvolt = <3300000>;
235 regulator-max-microvolt = <3300000>;
236 };
237
238 reg_5v0: regulator-5v0 {
239 compatible = "regulator-fixed";
240 regulator-name = "5V_SW";
241 regulator-min-microvolt = <5000000>;
242 regulator-max-microvolt = <5000000>;
243 };
244
245 reg_usbc_vbus: regulator-usbc-vbus {
246 compatible = "regulator-fixed";
247 regulator-name = "VCC_USB5";
248 regulator-min-microvolt = <5000000>;
249 regulator-max-microvolt = <5000000>;
250 vin-supply = <&reg_5v0>;
251 };
252
253 /* USBH_PEN resp. USB_P_EN */
254 reg_usbh_vbus: regulator-usbh-vbus {
255 compatible = "regulator-fixed";
256 regulator-name = "VCC_USB[1-4]";
257 regulator-min-microvolt = <5000000>;
258 regulator-max-microvolt = <5000000>;
259 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
260 vin-supply = <&reg_5v0>;
261 };
262};
diff --git a/arch/arm/boot/dts/tegra20-colibri-iris.dts b/arch/arm/boot/dts/tegra20-colibri-iris.dts
index 57f16c0e9917..d8004d68efa0 100644
--- a/arch/arm/boot/dts/tegra20-colibri-iris.dts
+++ b/arch/arm/boot/dts/tegra20-colibri-iris.dts
@@ -1,15 +1,21 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/; 2/dts-v1/;
3 3
4#include <dt-bindings/input/input.h>
4#include "tegra20-colibri.dtsi" 5#include "tegra20-colibri.dtsi"
5 6
6/ { 7/ {
7 model = "Toradex Colibri T20 256/512 MB on Iris"; 8 model = "Toradex Colibri T20 on Iris";
8 compatible = "toradex,iris", "toradex,colibri_t20-512", "nvidia,tegra20"; 9 compatible = "toradex,colibri_t20-iris", "toradex,colibri_t20",
10 "nvidia,tegra20";
9 11
10 aliases { 12 aliases {
13 rtc0 = "/i2c@7000c000/rtc@68";
14 rtc1 = "/i2c@7000d000/pmic@34";
15 rtc2 = "/rtc@7000e000";
11 serial0 = &uarta; 16 serial0 = &uarta;
12 serial1 = &uartd; 17 serial1 = &uartd;
18 serial2 = &uartb;
13 }; 19 };
14 20
15 chosen { 21 chosen {
@@ -17,90 +23,222 @@
17 }; 23 };
18 24
19 host1x@50000000 { 25 host1x@50000000 {
26 dc@54200000 {
27 rgb {
28 status = "okay";
29 nvidia,panel = <&panel>;
30 };
31 };
32
20 hdmi@54280000 { 33 hdmi@54280000 {
21 status = "okay"; 34 status = "okay";
35 hdmi-supply = <&reg_5v0>;
22 }; 36 };
23 }; 37 };
24 38
25 pinmux@70000014 { 39 pinmux@70000014 {
26 state_default: pinmux { 40 state_default: pinmux {
27 hdint { 41 bl-on {
42 nvidia,tristate = <TEGRA_PIN_DISABLE>;
43 };
44
45 ddc {
46 nvidia,tristate = <TEGRA_PIN_DISABLE>;
47 };
48
49 hotplug-detect {
50 nvidia,tristate = <TEGRA_PIN_DISABLE>;
51 };
52
53 i2c {
54 nvidia,tristate = <TEGRA_PIN_DISABLE>;
55 };
56
57 lcd {
58 nvidia,tristate = <TEGRA_PIN_DISABLE>;
59 };
60
61 lm1 {
62 nvidia,tristate = <TEGRA_PIN_DISABLE>;
63 };
64
65 mmc {
66 nvidia,tristate = <TEGRA_PIN_DISABLE>;
67 };
68
69 mmccd {
70 nvidia,tristate = <TEGRA_PIN_DISABLE>;
71 };
72
73 pwm-a-b {
74 nvidia,tristate = <TEGRA_PIN_DISABLE>;
75 };
76
77 pwm-c-d {
78 nvidia,tristate = <TEGRA_PIN_DISABLE>;
79 };
80
81 ssp {
28 nvidia,tristate = <TEGRA_PIN_DISABLE>; 82 nvidia,tristate = <TEGRA_PIN_DISABLE>;
29 }; 83 };
30 84
31 i2cddc { 85 uart-a {
32 nvidia,tristate = <TEGRA_PIN_DISABLE>; 86 nvidia,tristate = <TEGRA_PIN_DISABLE>;
33 }; 87 };
34 88
35 sdio4 { 89 uart-b {
36 nvidia,tristate = <TEGRA_PIN_DISABLE>; 90 nvidia,tristate = <TEGRA_PIN_DISABLE>;
37 }; 91 };
38 92
39 uarta { 93 uart-c {
40 nvidia,tristate = <TEGRA_PIN_DISABLE>; 94 nvidia,tristate = <TEGRA_PIN_DISABLE>;
41 }; 95 };
42 96
43 uartd { 97 usbh-pen {
44 nvidia,tristate = <TEGRA_PIN_DISABLE>; 98 nvidia,tristate = <TEGRA_PIN_DISABLE>;
45 }; 99 };
46 }; 100 };
47 }; 101 };
48 102
103 /* Colibri UART-A */
49 serial@70006000 { 104 serial@70006000 {
50 status = "okay"; 105 status = "okay";
51 }; 106 };
52 107
108 /* Colibri UART-C */
109 serial@70006040 {
110 status = "okay";
111 };
112
113 /* Colibri UART-B */
53 serial@70006300 { 114 serial@70006300 {
54 status = "okay"; 115 status = "okay";
55 }; 116 };
56 117
57 i2c_ddc: i2c@7000c400 { 118 pwm@7000a000 {
119 status = "okay";
120 };
121
122 /*
123 * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
124 * board)
125 */
126 i2c@7000c000 {
127 status = "okay";
128 clock-frequency = <400000>;
129
130 /* M41T0M6 real time clock on carrier board */
131 rtc@68 {
132 compatible = "st,m41t0";
133 reg = <0x68>;
134 };
135 };
136
137 /* GEN2_I2C: unused */
138
139 /* CAM_I2C (I2C3): unused */
140
141 /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
142 i2c@7000c400 {
58 status = "okay"; 143 status = "okay";
59 }; 144 };
60 145
146 /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
61 usb@c5000000 { 147 usb@c5000000 {
62 status = "okay"; 148 status = "okay";
149 dr_mode = "otg";
63 }; 150 };
64 151
65 usb-phy@c5000000 { 152 usb-phy@c5000000 {
66 status = "okay"; 153 status = "okay";
154 vbus-supply = <&reg_usbc_vbus>;
67 }; 155 };
68 156
157 /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
69 usb@c5008000 { 158 usb@c5008000 {
70 status = "okay"; 159 status = "okay";
71 }; 160 };
72 161
73 usb-phy@c5008000 { 162 usb-phy@c5008000 {
74 status = "okay"; 163 status = "okay";
164 vbus-supply = <&reg_usbh_vbus>;
165 };
166
167 /* SPI4: Colibri SSP */
168 spi@7000da00 {
169 status = "okay";
170 spi-max-frequency = <25000000>;
75 }; 171 };
76 172
173 /* SD/MMC */
77 sdhci@c8000600 { 174 sdhci@c8000600 {
78 status = "okay"; 175 status = "okay";
79 bus-width = <4>; 176 bus-width = <4>;
80 vmmc-supply = <&vcc_sd_reg>; 177 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
81 vqmmc-supply = <&vcc_sd_reg>; 178 no-1-8-v;
82 }; 179 };
83 180
84 regulators { 181 backlight: backlight {
85 regulator@0 { 182 compatible = "pwm-backlight";
86 compatible = "regulator-fixed"; 183 brightness-levels = <255 128 64 32 16 8 4 0>;
87 reg = <0>; 184 default-brightness-level = <6>;
88 regulator-name = "usb_host_vbus"; 185 /* BL_ON */
89 regulator-min-microvolt = <5000000>; 186 enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
90 regulator-max-microvolt = <5000000>; 187 power-supply = <&reg_3v3>;
91 regulator-boot-on; 188 pwms = <&pwm 0 5000000>; /* PWM<A> */
92 regulator-always-on; 189 };
93 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>; 190
94 }; 191 gpio-keys {
192 compatible = "gpio-keys";
95 193
96 vcc_sd_reg: regulator@1 { 194 wakeup {
97 compatible = "regulator-fixed"; 195 label = "SODIMM pin 45 wakeup";
98 reg = <1>; 196 gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
99 regulator-name = "vcc_sd"; 197 linux,code = <KEY_WAKEUP>;
100 regulator-min-microvolt = <3300000>; 198 debounce-interval = <10>;
101 regulator-max-microvolt = <3300000>; 199 wakeup-source;
102 regulator-boot-on;
103 regulator-always-on;
104 }; 200 };
105 }; 201 };
202
203 panel: panel {
204 /*
205 * edt,et057090dhu: EDT 5.7" LCD TFT
206 * edt,et070080dh6: EDT 7.0" LCD TFT
207 */
208 compatible = "edt,et057090dhu", "simple-panel";
209 backlight = <&backlight>;
210 power-supply = <&reg_3v3>;
211 };
212
213 reg_3v3: regulator-3v3 {
214 compatible = "regulator-fixed";
215 regulator-name = "3.3V";
216 regulator-min-microvolt = <3300000>;
217 regulator-max-microvolt = <3300000>;
218 };
219
220 reg_5v0: regulator-5v0 {
221 compatible = "regulator-fixed";
222 regulator-name = "5V";
223 regulator-min-microvolt = <5000000>;
224 regulator-max-microvolt = <5000000>;
225 };
226
227 reg_usbc_vbus: regulator-usbc-vbus {
228 compatible = "regulator-fixed";
229 regulator-name = "VCC_USB2";
230 regulator-min-microvolt = <5000000>;
231 regulator-max-microvolt = <5000000>;
232 vin-supply = <&reg_5v0>;
233 };
234
235 /* USBH_PEN resp. USB_P_EN */
236 reg_usbh_vbus: regulator-usbh-vbus {
237 compatible = "regulator-fixed";
238 regulator-name = "VCC_USB1";
239 regulator-min-microvolt = <5000000>;
240 regulator-max-microvolt = <5000000>;
241 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
242 vin-supply = <&reg_5v0>;
243 };
106}; 244};
diff --git a/arch/arm/boot/dts/tegra20-colibri.dtsi b/arch/arm/boot/dts/tegra20-colibri.dtsi
index e7b9ab09908a..6162d193e12c 100644
--- a/arch/arm/boot/dts/tegra20-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra20-colibri.dtsi
@@ -1,15 +1,13 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include "tegra20.dtsi" 2#include "tegra20.dtsi"
3 3
4/*
5 * Toradex Colibri T20 Module Device Tree
6 * Compatible for Revisions Colibri T20 256MB V1.1B, V1.2A;
7 * Colibri T20 256MB IT V1.2A; Colibri T20 512MB V1.1C, V1.2A;
8 * Colibri T20 512MB IT V1.2A
9 */
4/ { 10/ {
5 model = "Toradex Colibri T20 256/512 MB";
6 compatible = "toradex,colibri_t20-512", "nvidia,tegra20";
7
8 aliases {
9 rtc0 = "/i2c@7000d000/tps6586x@34";
10 rtc1 = "/rtc@7000e000";
11 };
12
13 memory@0 { 11 memory@0 {
14 /* 12 /*
15 * Set memory to 256 MB to be safe as this could be used on 13 * Set memory to 256 MB to be safe as this could be used on
@@ -21,12 +19,11 @@
21 19
22 host1x@50000000 { 20 host1x@50000000 {
23 hdmi@54280000 { 21 hdmi@54280000 {
24 vdd-supply = <&hdmi_vdd_reg>; 22 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
25 pll-supply = <&hdmi_pll_reg>; 23 nvidia,hpd-gpio =
26 24 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
27 nvidia,ddc-i2c-bus = <&i2c_ddc>; 25 pll-supply = <&reg_1v8_avdd_hdmi_pll>;
28 nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) 26 vdd-supply = <&reg_3v3_avdd_hdmi>;
29 GPIO_ACTIVE_HIGH>;
30 }; 27 };
31 }; 28 };
32 29
@@ -35,187 +32,406 @@
35 pinctrl-0 = <&state_default>; 32 pinctrl-0 = <&state_default>;
36 33
37 state_default: pinmux { 34 state_default: pinmux {
38 audio_refclk { 35 /* Analogue Audio AC97 to WM9712 (On-module) */
36 audio-refclk {
39 nvidia,pins = "cdev1"; 37 nvidia,pins = "cdev1";
40 nvidia,function = "plla_out"; 38 nvidia,function = "plla_out";
41 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 39 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
42 nvidia,tristate = <TEGRA_PIN_DISABLE>; 40 nvidia,tristate = <TEGRA_PIN_DISABLE>;
43 }; 41 };
44 crt {
45 nvidia,pins = "crtp";
46 nvidia,function = "crt";
47 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
48 nvidia,tristate = <TEGRA_PIN_ENABLE>;
49 };
50 dap3 { 42 dap3 {
51 nvidia,pins = "dap3"; 43 nvidia,pins = "dap3";
52 nvidia,function = "dap3"; 44 nvidia,function = "dap3";
53 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 45 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
54 nvidia,tristate = <TEGRA_PIN_DISABLE>; 46 nvidia,tristate = <TEGRA_PIN_DISABLE>;
55 }; 47 };
56 displaya { 48
57 nvidia,pins = "ld0", "ld1", "ld2", "ld3", 49 /*
58 "ld4", "ld5", "ld6", "ld7", "ld8", 50 * AC97_RESET, ULPI_RESET, AC97_INT aka WM9712 GENIRQ
59 "ld9", "ld10", "ld11", "ld12", "ld13", 51 * (All on-module), SODIMM Pin 45 Wakeup
60 "ld14", "ld15", "ld16", "ld17", 52 */
61 "lhs", "lpw0", "lpw2", "lsc0", 53 gpio-uac {
62 "lsc1", "lsck", "lsda", "lspi", "lvs"; 54 nvidia,pins = "uac";
63 nvidia,function = "displaya"; 55 nvidia,function = "rsvd2";
64 nvidia,tristate = <TEGRA_PIN_ENABLE>;
65 };
66 gpio_dte {
67 nvidia,pins = "dte";
68 nvidia,function = "rsvd1";
69 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
70 nvidia,tristate = <TEGRA_PIN_DISABLE>;
71 };
72 gpio_gmi {
73 nvidia,pins = "ata", "atc", "atd", "ate",
74 "dap1", "dap2", "dap4", "gpu", "irrx",
75 "irtx", "spia", "spib", "spic";
76 nvidia,function = "gmi";
77 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 56 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
78 nvidia,tristate = <TEGRA_PIN_DISABLE>; 57 nvidia,tristate = <TEGRA_PIN_DISABLE>;
79 }; 58 };
80 gpio_pta { 59
60 /*
61 * Buffer Enables for nPWE and RDnWR (On-module,
62 * see GPIO hogging further down below)
63 */
64 gpio-pta {
81 nvidia,pins = "pta"; 65 nvidia,pins = "pta";
82 nvidia,function = "rsvd4"; 66 nvidia,function = "rsvd4";
83 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 67 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
84 nvidia,tristate = <TEGRA_PIN_DISABLE>; 68 nvidia,tristate = <TEGRA_PIN_DISABLE>;
85 }; 69 };
86 gpio_uac { 70
87 nvidia,pins = "uac"; 71 /*
88 nvidia,function = "rsvd2"; 72 * CLK_32K_OUT, CORE_PWR_REQ, CPU_PWR_REQ, PWR_INT_N,
89 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 73 * SYS_CLK_REQ (All on-module)
74 */
75 pmc {
76 nvidia,pins = "pmc";
77 nvidia,function = "pwr_on";
90 nvidia,tristate = <TEGRA_PIN_DISABLE>; 78 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 }; 79 };
92 hdint { 80
93 nvidia,pins = "hdint"; 81 /*
82 * Colibri Address/Data Bus (GMI)
83 * Note: spid and spie optionally used for SPI1
84 */
85 gmi {
86 nvidia,pins = "atc", "atd", "ate", "dap1",
87 "dap2", "dap4", "gmd", "gpu",
88 "irrx", "irtx", "spia", "spib",
89 "spic", "spid", "spie", "uca",
90 "ucb";
91 nvidia,function = "gmi";
92 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
93 nvidia,tristate = <TEGRA_PIN_ENABLE>;
94 };
95 /* Further pins may be used as GPIOs */
96 gmi-gpio1 {
97 nvidia,pins = "lpw0", "lsc1", "lsck", "lsda";
94 nvidia,function = "hdmi"; 98 nvidia,function = "hdmi";
95 nvidia,tristate = <TEGRA_PIN_ENABLE>; 99 nvidia,tristate = <TEGRA_PIN_ENABLE>;
96 }; 100 };
97 i2c1 { 101 gmi-gpio2 {
98 nvidia,pins = "rm"; 102 nvidia,pins = "lcsn", "ldc", "lm0", "lsdi";
99 nvidia,function = "i2c1"; 103 nvidia,function = "rsvd4";
100 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
101 nvidia,tristate = <TEGRA_PIN_ENABLE>; 104 nvidia,tristate = <TEGRA_PIN_ENABLE>;
102 }; 105 };
103 i2c3 { 106
104 nvidia,pins = "dtf"; 107 /* Colibri BL_ON */
105 nvidia,function = "i2c3"; 108 bl-on {
109 nvidia,pins = "dta";
110 nvidia,function = "rsvd1";
106 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 111 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
107 nvidia,tristate = <TEGRA_PIN_ENABLE>; 112 nvidia,tristate = <TEGRA_PIN_ENABLE>;
108 }; 113 };
109 i2cddc { 114
115 /* Colibri Backlight PWM<A>, PWM<B> */
116 pwm-a-b {
117 nvidia,pins = "sdc";
118 nvidia,function = "pwm";
119 nvidia,tristate = <TEGRA_PIN_ENABLE>;
120 };
121
122 /* Colibri DDC */
123 ddc {
110 nvidia,pins = "ddc"; 124 nvidia,pins = "ddc";
111 nvidia,function = "i2c2"; 125 nvidia,function = "i2c2";
112 nvidia,pull = <TEGRA_PIN_PULL_UP>; 126 nvidia,pull = <TEGRA_PIN_PULL_UP>;
113 nvidia,tristate = <TEGRA_PIN_ENABLE>; 127 nvidia,tristate = <TEGRA_PIN_ENABLE>;
114 }; 128 };
115 i2cp { 129
116 nvidia,pins = "i2cp"; 130 /*
117 nvidia,function = "i2cp"; 131 * Colibri EXT_IO*
132 * Note: dtf optionally used for I2C3
133 */
134 ext-io {
135 nvidia,pins = "dtf", "spdi";
136 nvidia,function = "rsvd2";
118 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 137 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
119 nvidia,tristate = <TEGRA_PIN_DISABLE>; 138 nvidia,tristate = <TEGRA_PIN_ENABLE>;
120 }; 139 };
121 irda { 140
122 nvidia,pins = "uad"; 141 /*
123 nvidia,function = "irda"; 142 * Colibri Ethernet (On-module)
143 * ULPI EHCI instance 1 USB2_DP/N -> AX88772B
144 */
145 ulpi {
146 nvidia,pins = "uaa", "uab", "uda";
147 nvidia,function = "ulpi";
124 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 148 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
125 nvidia,tristate = <TEGRA_PIN_ENABLE>; 149 nvidia,tristate = <TEGRA_PIN_DISABLE>;
126 }; 150 };
127 nand { 151 ulpi-refclk {
128 nvidia,pins = "kbca", "kbcc", "kbcd", 152 nvidia,pins = "cdev2";
129 "kbce", "kbcf"; 153 nvidia,function = "pllp_out4";
130 nvidia,function = "nand";
131 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 154 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
132 nvidia,tristate = <TEGRA_PIN_DISABLE>; 155 nvidia,tristate = <TEGRA_PIN_DISABLE>;
133 }; 156 };
134 owc { 157
135 nvidia,pins = "owc"; 158 /* Colibri HOTPLUG_DETECT (HDMI) */
136 nvidia,function = "owr"; 159 hotplug-detect {
160 nvidia,pins = "hdint";
161 nvidia,function = "hdmi";
162 nvidia,tristate = <TEGRA_PIN_ENABLE>;
163 };
164
165 /* Colibri I2C */
166 i2c {
167 nvidia,pins = "rm";
168 nvidia,function = "i2c1";
137 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 169 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
138 nvidia,tristate = <TEGRA_PIN_ENABLE>; 170 nvidia,tristate = <TEGRA_PIN_ENABLE>;
139 }; 171 };
140 pmc { 172
141 nvidia,pins = "pmc"; 173 /*
142 nvidia,function = "pwr_on"; 174 * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE
143 nvidia,tristate = <TEGRA_PIN_DISABLE>; 175 * today's display need DE, disable LCD_M1
176 */
177 lm1 {
178 nvidia,pins = "lm1";
179 nvidia,function = "rsvd3";
180 nvidia,tristate = <TEGRA_PIN_ENABLE>;
144 }; 181 };
145 pwm { 182
146 nvidia,pins = "sdb", "sdc", "sdd"; 183 /* Colibri LCD (L_* resp. LDD<*>) */
147 nvidia,function = "pwm"; 184 lcd {
185 nvidia,pins = "ld0", "ld1", "ld2", "ld3",
186 "ld4", "ld5", "ld6", "ld7",
187 "ld8", "ld9", "ld10", "ld11",
188 "ld12", "ld13", "ld14", "ld15",
189 "ld16", "ld17", "lhs", "lsc0",
190 "lspi", "lvs";
191 nvidia,function = "displaya";
148 nvidia,tristate = <TEGRA_PIN_ENABLE>; 192 nvidia,tristate = <TEGRA_PIN_ENABLE>;
149 }; 193 };
150 sdio4 { 194 /* Colibri LCD (Optional 24 BPP Support) */
151 nvidia,pins = "atb", "gma", "gme"; 195 lcd-24 {
196 nvidia,pins = "ldi", "lhp0", "lhp1", "lhp2",
197 "lpp", "lvp1";
198 nvidia,function = "displaya";
199 nvidia,tristate = <TEGRA_PIN_ENABLE>;
200 };
201
202 /* Colibri MMC */
203 mmc {
204 nvidia,pins = "atb", "gma";
152 nvidia,function = "sdio4"; 205 nvidia,function = "sdio4";
153 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 206 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
154 nvidia,tristate = <TEGRA_PIN_ENABLE>; 207 nvidia,tristate = <TEGRA_PIN_ENABLE>;
155 }; 208 };
156 spi1 { 209
157 nvidia,pins = "spid", "spie", "spif"; 210 /* Colibri MMCCD */
158 nvidia,function = "spi1"; 211 mmccd {
212 nvidia,pins = "gmb";
213 nvidia,function = "gmi_int";
159 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 214 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
160 nvidia,tristate = <TEGRA_PIN_ENABLE>; 215 nvidia,tristate = <TEGRA_PIN_ENABLE>;
161 }; 216 };
162 spi4 { 217
218 /* Colibri MMC (Optional 8-bit) */
219 mmc-8bit {
220 nvidia,pins = "gme";
221 nvidia,function = "sdio4";
222 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
223 nvidia,tristate = <TEGRA_PIN_ENABLE>;
224 };
225
226 /*
227 * Colibri Parallel Camera (Optional)
228 * pins multiplexed with others and therefore disabled
229 * Note: dta used for BL_ON by default
230 */
231 cif-mclk {
232 nvidia,pins = "csus";
233 nvidia,function = "vi_sensor_clk";
234 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
235 nvidia,tristate = <TEGRA_PIN_ENABLE>;
236 };
237 cif {
238 nvidia,pins = "dtb", "dtc", "dtd";
239 nvidia,function = "vi";
240 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
241 nvidia,tristate = <TEGRA_PIN_ENABLE>;
242 };
243
244 /* Colibri PWM<C>, PWM<D> */
245 pwm-c-d {
246 nvidia,pins = "sdb", "sdd";
247 nvidia,function = "pwm";
248 nvidia,tristate = <TEGRA_PIN_ENABLE>;
249 };
250
251 /* Colibri SSP */
252 ssp {
163 nvidia,pins = "slxa", "slxc", "slxd", "slxk"; 253 nvidia,pins = "slxa", "slxc", "slxd", "slxk";
164 nvidia,function = "spi4"; 254 nvidia,function = "spi4";
165 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 255 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
166 nvidia,tristate = <TEGRA_PIN_ENABLE>; 256 nvidia,tristate = <TEGRA_PIN_ENABLE>;
167 }; 257 };
168 uarta { 258
259 /* Colibri UART-A */
260 uart-a {
169 nvidia,pins = "sdio1"; 261 nvidia,pins = "sdio1";
170 nvidia,function = "uarta"; 262 nvidia,function = "uarta";
171 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 263 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
172 nvidia,tristate = <TEGRA_PIN_ENABLE>; 264 nvidia,tristate = <TEGRA_PIN_ENABLE>;
173 }; 265 };
174 uartd { 266 uart-a-dsr {
267 nvidia,pins = "lpw1";
268 nvidia,function = "rsvd3";
269 nvidia,tristate = <TEGRA_PIN_ENABLE>;
270 };
271 uart-a-dcd {
272 nvidia,pins = "lpw2";
273 nvidia,function = "hdmi";
274 nvidia,tristate = <TEGRA_PIN_ENABLE>;
275 };
276
277 /* Colibri UART-B */
278 uart-b {
175 nvidia,pins = "gmc"; 279 nvidia,pins = "gmc";
176 nvidia,function = "uartd"; 280 nvidia,function = "uartd";
177 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 281 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
178 nvidia,tristate = <TEGRA_PIN_ENABLE>; 282 nvidia,tristate = <TEGRA_PIN_ENABLE>;
179 }; 283 };
180 ulpi { 284
181 nvidia,pins = "uaa", "uab", "uda"; 285 /* Colibri UART-C */
182 nvidia,function = "ulpi"; 286 uart-c {
287 nvidia,pins = "uad";
288 nvidia,function = "irda";
289 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
290 nvidia,tristate = <TEGRA_PIN_ENABLE>;
291 };
292
293 /* Colibri USB_CDET */
294 usb-cdet {
295 nvidia,pins = "spdo";
296 nvidia,function = "rsvd2";
297 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
298 nvidia,tristate = <TEGRA_PIN_ENABLE>;
299 };
300
301 /* Colibri USBH_OC */
302 usbh-oc {
303 nvidia,pins = "spih";
304 nvidia,function = "spi2_alt";
305 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
306 nvidia,tristate = <TEGRA_PIN_ENABLE>;
307 };
308
309 /* Colibri USBH_PEN */
310 usbh-pen {
311 nvidia,pins = "spig";
312 nvidia,function = "spi2_alt";
313 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
314 nvidia,tristate = <TEGRA_PIN_ENABLE>;
315 };
316
317 /* Colibri VGA not supported */
318 vga {
319 nvidia,pins = "crtp";
320 nvidia,function = "crt";
321 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
322 nvidia,tristate = <TEGRA_PIN_ENABLE>;
323 };
324
325 /* I2C3 (Optional) */
326 i2c3 {
327 nvidia,pins = "dtf";
328 nvidia,function = "i2c3";
329 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
330 nvidia,tristate = <TEGRA_PIN_ENABLE>;
331 };
332
333 /* JTAG_RTCK */
334 jtag-rtck {
335 nvidia,pins = "gpu7";
336 nvidia,function = "rtck";
337 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
338 nvidia,tristate = <TEGRA_PIN_ENABLE>;
339 };
340
341 /*
342 * LAN_RESET, LAN_EXT_WAKEUP and LAN_PME
343 * (All On-module)
344 */
345 gpio-gpv {
346 nvidia,pins = "gpv";
347 nvidia,function = "rsvd2";
183 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 348 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
184 nvidia,tristate = <TEGRA_PIN_DISABLE>; 349 nvidia,tristate = <TEGRA_PIN_DISABLE>;
185 }; 350 };
186 ulpi_refclk { 351
187 nvidia,pins = "cdev2"; 352 /*
188 nvidia,function = "pllp_out4"; 353 * LAN_V_BUS, VDD_FAULT, BATT_FAULT, WM9712 PENDOWN
354 * (All On-module); Colibri CAN_INT
355 */
356 gpio-dte {
357 nvidia,pins = "dte";
358 nvidia,function = "rsvd1";
189 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 359 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
190 nvidia,tristate = <TEGRA_PIN_DISABLE>; 360 nvidia,tristate = <TEGRA_PIN_DISABLE>;
191 }; 361 };
192 usb_gpio { 362
193 nvidia,pins = "spig", "spih"; 363 /* NAND (On-module) */
194 nvidia,function = "spi2_alt"; 364 nand {
365 nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
366 "kbce", "kbcf";
367 nvidia,function = "nand";
195 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 368 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
196 nvidia,tristate = <TEGRA_PIN_DISABLE>; 369 nvidia,tristate = <TEGRA_PIN_DISABLE>;
197 }; 370 };
198 vi { 371
199 nvidia,pins = "dta", "dtb", "dtc", "dtd"; 372 /* Onewire (Optional) */
200 nvidia,function = "vi"; 373 owr {
374 nvidia,pins = "owc";
375 nvidia,function = "owr";
201 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 376 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
202 nvidia,tristate = <TEGRA_PIN_ENABLE>; 377 nvidia,tristate = <TEGRA_PIN_ENABLE>;
203 }; 378 };
204 vi_sc { 379
205 nvidia,pins = "csus"; 380 /* Power I2C (On-module) */
206 nvidia,function = "vi_sensor_clk"; 381 i2cp {
382 nvidia,pins = "i2cp";
383 nvidia,function = "i2cp";
384 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
385 nvidia,tristate = <TEGRA_PIN_DISABLE>;
386 };
387
388 /* RESET_OUT */
389 reset-out {
390 nvidia,pins = "ata";
391 nvidia,function = "gmi";
392 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
393 nvidia,tristate = <TEGRA_PIN_DISABLE>;
394 };
395
396 /*
397 * SPI1 (Optional)
398 * Note: spid and spie used for Colibri Address/Data
399 * Bus (GMI)
400 */
401 spi1 {
402 nvidia,pins = "spid", "spie", "spif";
403 nvidia,function = "spi1";
207 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 404 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
208 nvidia,tristate = <TEGRA_PIN_ENABLE>; 405 nvidia,tristate = <TEGRA_PIN_ENABLE>;
209 }; 406 };
407
408 /*
409 * THERMD_ALERT# (On-module), unlatched I2C address pin
410 * of LM95245 temperature sensor therefore requires
411 * disabling for now
412 */
413 lvp0 {
414 nvidia,pins = "lvp0";
415 nvidia,function = "rsvd3";
416 nvidia,tristate = <TEGRA_PIN_ENABLE>;
417 };
210 }; 418 };
211 }; 419 };
212 420
213 ac97: ac97@70002000 { 421 tegra_ac97: ac97@70002000 {
214 status = "okay"; 422 status = "okay";
215 nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0) 423 nvidia,codec-reset-gpio =
216 GPIO_ACTIVE_HIGH>; 424 <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_HIGH>;
217 nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0) 425 nvidia,codec-sync-gpio =
218 GPIO_ACTIVE_HIGH>; 426 <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
427 };
428
429 serial@70006040 {
430 compatible = "nvidia,tegra20-hsuart";
431 };
432
433 serial@70006300 {
434 compatible = "nvidia,tegra20-hsuart";
219 }; 435 };
220 436
221 nand-controller@70008000 { 437 nand-controller@70008000 {
@@ -243,7 +459,7 @@
243 }; 459 };
244 460
245 /* DDC_SCL/SDA on X3 pin 15/16 (e.g. display EDID) */ 461 /* DDC_SCL/SDA on X3 pin 15/16 (e.g. display EDID) */
246 i2c_ddc: i2c@7000c400 { 462 hdmi_ddc: i2c@7000c400 {
247 clock-frequency = <10000>; 463 clock-frequency = <10000>;
248 }; 464 };
249 465
@@ -256,59 +472,45 @@
256 status = "okay"; 472 status = "okay";
257 clock-frequency = <100000>; 473 clock-frequency = <100000>;
258 474
259 pmic: tps6586x@34 { 475 pmic@34 {
260 compatible = "ti,tps6586x"; 476 compatible = "ti,tps6586x";
261 reg = <0x34>; 477 reg = <0x34>;
262 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; 478 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
263
264 ti,system-power-controller; 479 ti,system-power-controller;
265
266 #gpio-cells = <2>; 480 #gpio-cells = <2>;
267 gpio-controller; 481 gpio-controller;
268 482 sys-supply = <&reg_module_3v3>;
269 sys-supply = <&vdd_3v3_reg>; 483 vin-sm0-supply = <&reg_3v3_vsys>;
270 vin-sm0-supply = <&sys_reg>; 484 vin-sm1-supply = <&reg_3v3_vsys>;
271 vin-sm1-supply = <&sys_reg>; 485 vin-sm2-supply = <&reg_3v3_vsys>;
272 vin-sm2-supply = <&sys_reg>; 486 vinldo01-supply = <&reg_1v8_vdd_ddr2>;
273 vinldo01-supply = <&sm2_reg>; 487 vinldo23-supply = <&reg_module_3v3>;
274 vinldo23-supply = <&vdd_3v3_reg>; 488 vinldo4-supply = <&reg_module_3v3>;
275 vinldo4-supply = <&vdd_3v3_reg>; 489 vinldo678-supply = <&reg_module_3v3>;
276 vinldo678-supply = <&vdd_3v3_reg>; 490 vinldo9-supply = <&reg_module_3v3>;
277 vinldo9-supply = <&vdd_3v3_reg>;
278 491
279 regulators { 492 regulators {
280 #address-cells = <1>; 493 reg_3v3_vsys: sys {
281 #size-cells = <0>; 494 regulator-name = "VSYS_3.3V";
282
283 sys_reg: regulator@0 {
284 reg = <0>;
285 regulator-compatible = "sys";
286 regulator-name = "vdd_sys";
287 regulator-always-on; 495 regulator-always-on;
288 }; 496 };
289 497
290 regulator@1 { 498 sm0 {
291 reg = <1>; 499 regulator-name = "VDD_CORE_1.2V";
292 regulator-compatible = "sm0";
293 regulator-name = "vdd_sm0,vdd_core";
294 regulator-min-microvolt = <1200000>; 500 regulator-min-microvolt = <1200000>;
295 regulator-max-microvolt = <1200000>; 501 regulator-max-microvolt = <1200000>;
296 regulator-always-on; 502 regulator-always-on;
297 }; 503 };
298 504
299 regulator@2 { 505 sm1 {
300 reg = <2>; 506 regulator-name = "VDD_CPU_1.0V";
301 regulator-compatible = "sm1";
302 regulator-name = "vdd_sm1,vdd_cpu";
303 regulator-min-microvolt = <1000000>; 507 regulator-min-microvolt = <1000000>;
304 regulator-max-microvolt = <1000000>; 508 regulator-max-microvolt = <1000000>;
305 regulator-always-on; 509 regulator-always-on;
306 }; 510 };
307 511
308 sm2_reg: regulator@3 { 512 reg_1v8_vdd_ddr2: sm2 {
309 reg = <3>; 513 regulator-name = "VDD_DDR2_1.8V";
310 regulator-compatible = "sm2";
311 regulator-name = "vdd_sm2,vin_ldo*";
312 regulator-min-microvolt = <1800000>; 514 regulator-min-microvolt = <1800000>;
313 regulator-max-microvolt = <1800000>; 515 regulator-max-microvolt = <1800000>;
314 regulator-always-on; 516 regulator-always-on;
@@ -316,80 +518,68 @@
316 518
317 /* LDO0 is not connected to anything */ 519 /* LDO0 is not connected to anything */
318 520
319 regulator@5 { 521 /*
320 reg = <5>; 522 * +3.3V_ENABLE_N switching via FET:
321 regulator-compatible = "ldo1"; 523 * AVDD_AUDIO_S and +3.3V
322 regulator-name = "vdd_ldo1,avdd_pll*"; 524 * see also +3.3V fixed supply
525 */
526 ldo1 {
527 regulator-name = "AVDD_PLL_1.1V";
323 regulator-min-microvolt = <1100000>; 528 regulator-min-microvolt = <1100000>;
324 regulator-max-microvolt = <1100000>; 529 regulator-max-microvolt = <1100000>;
325 regulator-always-on; 530 regulator-always-on;
326 }; 531 };
327 532
328 regulator@6 { 533 ldo2 {
329 reg = <6>; 534 regulator-name = "VDD_RTC_1.2V";
330 regulator-compatible = "ldo2";
331 regulator-name = "vdd_ldo2,vdd_rtc";
332 regulator-min-microvolt = <1200000>; 535 regulator-min-microvolt = <1200000>;
333 regulator-max-microvolt = <1200000>; 536 regulator-max-microvolt = <1200000>;
334 }; 537 };
335 538
336 /* LDO3 is not connected to anything */ 539 /* LDO3 is not connected to anything */
337 540
338 regulator@8 { 541 ldo4 {
339 reg = <8>; 542 regulator-name = "VDDIO_SYS_1.8V";
340 regulator-compatible = "ldo4";
341 regulator-name = "vdd_ldo4,avdd_osc,vddio_sys";
342 regulator-min-microvolt = <1800000>; 543 regulator-min-microvolt = <1800000>;
343 regulator-max-microvolt = <1800000>; 544 regulator-max-microvolt = <1800000>;
344 regulator-always-on; 545 regulator-always-on;
345 }; 546 };
346 547
347 ldo5_reg: regulator@9 { 548 /* Switched via FET from regular +3.3V */
348 reg = <9>; 549 ldo5 {
349 regulator-compatible = "ldo5"; 550 regulator-name = "+3.3V_USB";
350 regulator-name = "vdd_ldo5,vdd_fuse";
351 regulator-min-microvolt = <3300000>; 551 regulator-min-microvolt = <3300000>;
352 regulator-max-microvolt = <3300000>; 552 regulator-max-microvolt = <3300000>;
353 regulator-always-on; 553 regulator-always-on;
354 }; 554 };
355 555
356 regulator@10 { 556 ldo6 {
357 reg = <10>; 557 regulator-name = "AVDD_VDAC_2.85V";
358 regulator-compatible = "ldo6";
359 regulator-name = "vdd_ldo6,avdd_vdac,vddio_vi,vddio_cam";
360 regulator-min-microvolt = <2850000>; 558 regulator-min-microvolt = <2850000>;
361 regulator-max-microvolt = <2850000>; 559 regulator-max-microvolt = <2850000>;
362 }; 560 };
363 561
364 hdmi_vdd_reg: regulator@11 { 562 reg_3v3_avdd_hdmi: ldo7 {
365 reg = <11>; 563 regulator-name = "AVDD_HDMI_3.3V";
366 regulator-compatible = "ldo7";
367 regulator-name = "vdd_ldo7,avdd_hdmi";
368 regulator-min-microvolt = <3300000>; 564 regulator-min-microvolt = <3300000>;
369 regulator-max-microvolt = <3300000>; 565 regulator-max-microvolt = <3300000>;
370 }; 566 };
371 567
372 hdmi_pll_reg: regulator@12 { 568 reg_1v8_avdd_hdmi_pll: ldo8 {
373 reg = <12>; 569 regulator-name = "AVDD_HDMI_PLL_1.8V";
374 regulator-compatible = "ldo8";
375 regulator-name = "vdd_ldo8,avdd_hdmi_pll";
376 regulator-min-microvolt = <1800000>; 570 regulator-min-microvolt = <1800000>;
377 regulator-max-microvolt = <1800000>; 571 regulator-max-microvolt = <1800000>;
378 }; 572 };
379 573
380 regulator@13 { 574 ldo9 {
381 reg = <13>; 575 regulator-name = "VDDIO_RX_DDR_2.85V";
382 regulator-compatible = "ldo9";
383 regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx";
384 regulator-min-microvolt = <2850000>; 576 regulator-min-microvolt = <2850000>;
385 regulator-max-microvolt = <2850000>; 577 regulator-max-microvolt = <2850000>;
386 regulator-always-on; 578 regulator-always-on;
387 }; 579 };
388 580
389 regulator@14 { 581 ldo_rtc {
390 reg = <14>; 582 regulator-name = "VCC_BATT";
391 regulator-compatible = "ldo_rtc";
392 regulator-name = "vdd_rtc_out,vdd_cell";
393 regulator-min-microvolt = <3300000>; 583 regulator-min-microvolt = <3300000>;
394 regulator-max-microvolt = <3300000>; 584 regulator-max-microvolt = <3300000>;
395 regulator-always-on; 585 regulator-always-on;
@@ -397,7 +587,8 @@
397 }; 587 };
398 }; 588 };
399 589
400 temperature-sensor@4c { 590 /* LM95245 temperature sensor */
591 temp-sensor@4c {
401 compatible = "national,lm95245"; 592 compatible = "national,lm95245";
402 reg = <0x4c>; 593 reg = <0x4c>;
403 }; 594 };
@@ -410,6 +601,14 @@
410 nvidia,core-pwr-good-time = <3845 3845>; 601 nvidia,core-pwr-good-time = <3845 3845>;
411 nvidia,core-pwr-off-time = <3875>; 602 nvidia,core-pwr-off-time = <3875>;
412 nvidia,sys-clock-req-active-high; 603 nvidia,sys-clock-req-active-high;
604
605 /* Set SLEEP MODE bit in SUPPLYENE register of TPS658643 PMIC */
606 i2c-thermtrip {
607 nvidia,i2c-controller-id = <3>;
608 nvidia,bus-addr = <0x34>;
609 nvidia,reg-addr = <0x14>;
610 nvidia,reg-data = <0x8>;
611 };
413 }; 612 };
414 613
415 memory-controller@7000f400 { 614 memory-controller@7000f400 {
@@ -483,79 +682,87 @@
483 }; 682 };
484 }; 683 };
485 684
685 /* EHCI instance 1: ULPI PHY -> AX88772B (On-module) */
486 usb@c5004000 { 686 usb@c5004000 {
487 status = "okay"; 687 status = "okay";
488 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) 688 #address-cells = <1>;
489 GPIO_ACTIVE_LOW>; 689 #size-cells = <0>;
690
691 asix@1 {
692 reg = <1>;
693 local-mac-address = [00 00 00 00 00 00];
694 };
490 }; 695 };
491 696
492 usb-phy@c5004000 { 697 usb-phy@c5004000 {
493 status = "okay"; 698 status = "okay";
494 nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) 699 nvidia,phy-reset-gpio =
495 GPIO_ACTIVE_LOW>; 700 <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
701 vbus-supply = <&reg_lan_v_bus>;
496 }; 702 };
497 703
498 sdhci@c8000600 { 704 clk32k_in: xtal3 {
499 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; 705 compatible = "fixed-clock";
706 #clock-cells = <0>;
707 clock-frequency = <32768>;
500 }; 708 };
501 709
502 clocks { 710 reg_lan_v_bus: regulator-lan-v-bus {
503 compatible = "simple-bus"; 711 compatible = "regulator-fixed";
504 #address-cells = <1>; 712 regulator-name = "LAN_V_BUS";
505 #size-cells = <0>; 713 regulator-min-microvolt = <5000000>;
506 714 regulator-max-microvolt = <5000000>;
507 clk32k_in: clock@0 { 715 enable-active-high;
508 compatible = "fixed-clock"; 716 gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
509 reg = <0>;
510 #clock-cells = <0>;
511 clock-frequency = <32768>;
512 };
513 }; 717 };
514 718
515 regulators { 719 reg_module_3v3: regulator-module-3v3 {
516 compatible = "simple-bus"; 720 compatible = "regulator-fixed";
517 #address-cells = <1>; 721 regulator-name = "+V3.3";
518 #size-cells = <0>; 722 regulator-min-microvolt = <3300000>;
519 723 regulator-max-microvolt = <3300000>;
520 vdd_3v3_reg: regulator@100 { 724 regulator-always-on;
521 compatible = "regulator-fixed";
522 reg = <100>;
523 regulator-name = "vdd_3v3";
524 regulator-min-microvolt = <3300000>;
525 regulator-max-microvolt = <3300000>;
526 regulator-always-on;
527 };
528
529 regulator@101 {
530 compatible = "regulator-fixed";
531 reg = <101>;
532 regulator-name = "internal_usb";
533 regulator-min-microvolt = <5000000>;
534 regulator-max-microvolt = <5000000>;
535 enable-active-high;
536 regulator-boot-on;
537 regulator-always-on;
538 gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
539 };
540 }; 725 };
541 726
542 sound { 727 sound {
543 compatible = "nvidia,tegra-audio-wm9712-colibri_t20", 728 compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
544 "nvidia,tegra-audio-wm9712"; 729 "nvidia,tegra-audio-wm9712";
545 nvidia,model = "Colibri T20 AC97 Audio"; 730 nvidia,model = "Toradex Colibri T20";
546
547 nvidia,audio-routing = 731 nvidia,audio-routing =
548 "Headphone", "HPOUTL", 732 "Headphone", "HPOUTL",
549 "Headphone", "HPOUTR", 733 "Headphone", "HPOUTR",
550 "LineIn", "LINEINL", 734 "LineIn", "LINEINL",
551 "LineIn", "LINEINR", 735 "LineIn", "LINEINR",
552 "Mic", "MIC1"; 736 "Mic", "MIC1";
553 737 nvidia,ac97-controller = <&tegra_ac97>;
554 nvidia,ac97-controller = <&ac97>;
555
556 clocks = <&tegra_car TEGRA20_CLK_PLL_A>, 738 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
557 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, 739 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
558 <&tegra_car TEGRA20_CLK_CDEV1>; 740 <&tegra_car TEGRA20_CLK_CDEV1>;
559 clock-names = "pll_a", "pll_a_out0", "mclk"; 741 clock-names = "pll_a", "pll_a_out0", "mclk";
560 }; 742 };
561}; 743};
744
745&gpio {
746 lan-reset-n {
747 gpio-hog;
748 gpios = <TEGRA_GPIO(V, 4) GPIO_ACTIVE_HIGH>;
749 output-high;
750 line-name = "LAN_RESET#";
751 };
752
753 /* Tri-stating GMI_WR_N on SODIMM pin 99 nPWE */
754 npwe {
755 gpio-hog;
756 gpios = <TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
757 output-high;
758 line-name = "Tri-state nPWE";
759 };
760
761 /* Not tri-stating GMI_WR_N on SODIMM pin 93 RDnWR */
762 rdnwr {
763 gpio-hog;
764 gpios = <TEGRA_GPIO(T, 6) GPIO_ACTIVE_HIGH>;
765 output-low;
766 line-name = "Not tri-state RDnWR";
767 };
768};
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index ef245291924f..8861e0976e37 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -303,7 +303,7 @@
303 request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; 303 request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
304 slave-addr = <138>; 304 slave-addr = <138>;
305 clocks = <&tegra_car TEGRA20_CLK_I2C3>, 305 clocks = <&tegra_car TEGRA20_CLK_I2C3>,
306 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>; 306 <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
307 clock-names = "div-clk", "fast-clk"; 307 clock-names = "div-clk", "fast-clk";
308 resets = <&tegra_car 67>; 308 resets = <&tegra_car 67>;
309 reset-names = "i2c"; 309 reset-names = "i2c";
@@ -524,10 +524,10 @@
524 gpio-keys { 524 gpio-keys {
525 compatible = "gpio-keys"; 525 compatible = "gpio-keys";
526 526
527 power { 527 wakeup {
528 label = "Power"; 528 label = "Wakeup";
529 gpios = <&gpio TEGRA_GPIO(J, 7) GPIO_ACTIVE_LOW>; 529 gpios = <&gpio TEGRA_GPIO(J, 7) GPIO_ACTIVE_LOW>;
530 linux,code = <KEY_POWER>; 530 linux,code = <KEY_WAKEUP>;
531 wakeup-source; 531 wakeup-source;
532 }; 532 };
533 }; 533 };
@@ -599,8 +599,8 @@
599 GPIO_ACTIVE_HIGH>; 599 GPIO_ACTIVE_HIGH>;
600 600
601 clocks = <&tegra_car TEGRA20_CLK_PLL_A>, 601 clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
602 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>, 602 <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
603 <&tegra_car TEGRA20_CLK_CDEV1>; 603 <&tegra_car TEGRA20_CLK_CDEV1>;
604 clock-names = "pll_a", "pll_a_out0", "mclk"; 604 clock-names = "pll_a", "pll_a_out0", "mclk";
605 }; 605 };
606}; 606};
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 15b73bd377f0..20869757d32f 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -419,19 +419,6 @@
419 status = "disabled"; 419 status = "disabled";
420 }; 420 };
421 421
422 gmi@70009000 {
423 compatible = "nvidia,tegra20-gmi";
424 reg = <0x70009000 0x1000>;
425 #address-cells = <2>;
426 #size-cells = <1>;
427 ranges = <0 0 0xd0000000 0xfffffff>;
428 clocks = <&tegra_car TEGRA20_CLK_NOR>;
429 clock-names = "gmi";
430 resets = <&tegra_car 42>;
431 reset-names = "gmi";
432 status = "disabled";
433 };
434
435 nand-controller@70008000 { 422 nand-controller@70008000 {
436 compatible = "nvidia,tegra20-nand"; 423 compatible = "nvidia,tegra20-nand";
437 reg = <0x70008000 0x100>; 424 reg = <0x70008000 0x100>;
@@ -447,6 +434,19 @@
447 status = "disabled"; 434 status = "disabled";
448 }; 435 };
449 436
437 gmi@70009000 {
438 compatible = "nvidia,tegra20-gmi";
439 reg = <0x70009000 0x1000>;
440 #address-cells = <2>;
441 #size-cells = <1>;
442 ranges = <0 0 0xd0000000 0xfffffff>;
443 clocks = <&tegra_car TEGRA20_CLK_NOR>;
444 clock-names = "gmi";
445 resets = <&tegra_car 42>;
446 reset-names = "gmi";
447 status = "disabled";
448 };
449
450 pwm: pwm@7000a000 { 450 pwm: pwm@7000a000 {
451 compatible = "nvidia,tegra20-pwm"; 451 compatible = "nvidia,tegra20-pwm";
452 reg = <0x7000a000 0x100>; 452 reg = <0x7000a000 0x100>;
@@ -865,5 +865,7 @@
865 compatible = "arm,cortex-a9-pmu"; 865 compatible = "arm,cortex-a9-pmu";
866 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, 866 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
867 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; 867 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
868 interrupt-affinity = <&{/cpus/cpu@0}>,
869 <&{/cpus/cpu@1}>;
868 }; 870 };
869}; 871};
diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 0dc85a20bd45..749fc6d1ff70 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -6,11 +6,12 @@
6 6
7/ { 7/ {
8 model = "Toradex Apalis T30 on Apalis Evaluation Board"; 8 model = "Toradex Apalis T30 on Apalis Evaluation Board";
9 compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30", "nvidia,tegra30"; 9 compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30",
10 "nvidia,tegra30";
10 11
11 aliases { 12 aliases {
12 rtc0 = "/i2c@7000c000/rtc@68"; 13 rtc0 = "/i2c@7000c000/rtc@68";
13 rtc1 = "/i2c@7000d000/tps65911@2d"; 14 rtc1 = "/i2c@7000d000/pmic@2d";
14 rtc2 = "/rtc@7000e000"; 15 rtc2 = "/rtc@7000e000";
15 serial0 = &uarta; 16 serial0 = &uarta;
16 serial1 = &uartb; 17 serial1 = &uartb;
@@ -23,8 +24,6 @@
23 }; 24 };
24 25
25 pcie@3000 { 26 pcie@3000 {
26 status = "okay";
27
28 pci@1,0 { 27 pci@1,0 {
29 status = "okay"; 28 status = "okay";
30 }; 29 };
@@ -32,10 +31,6 @@
32 pci@2,0 { 31 pci@2,0 {
33 status = "okay"; 32 status = "okay";
34 }; 33 };
35
36 pci@3,0 {
37 status = "okay";
38 };
39 }; 34 };
40 35
41 host1x@50000000 { 36 host1x@50000000 {
@@ -45,27 +40,30 @@
45 nvidia,panel = <&panel>; 40 nvidia,panel = <&panel>;
46 }; 41 };
47 }; 42 };
43
48 hdmi@54280000 { 44 hdmi@54280000 {
49 status = "okay"; 45 status = "okay";
46 hdmi-supply = <&reg_5v0>;
50 }; 47 };
51 }; 48 };
52 49
50 /* Apalis UART1 */
53 serial@70006000 { 51 serial@70006000 {
54 status = "okay"; 52 status = "okay";
55 }; 53 };
56 54
55 /* Apalis UART2 */
57 serial@70006040 { 56 serial@70006040 {
58 compatible = "nvidia,tegra30-hsuart";
59 status = "okay"; 57 status = "okay";
60 }; 58 };
61 59
60 /* Apalis UART3 */
62 serial@70006200 { 61 serial@70006200 {
63 compatible = "nvidia,tegra30-hsuart";
64 status = "okay"; 62 status = "okay";
65 }; 63 };
66 64
65 /* Apalis UART4 */
67 serial@70006300 { 66 serial@70006300 {
68 compatible = "nvidia,tegra30-hsuart";
69 status = "okay"; 67 status = "okay";
70 }; 68 };
71 69
@@ -99,13 +97,13 @@
99 * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on 97 * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
100 * carrier board) 98 * carrier board)
101 */ 99 */
102 cami2c: i2c@7000c500 { 100 i2c@7000c500 {
103 status = "okay"; 101 status = "okay";
104 clock-frequency = <400000>; 102 clock-frequency = <400000>;
105 }; 103 };
106 104
107 /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */ 105 /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
108 hdmiddc: i2c@7000c700 { 106 i2c@7000c700 {
109 status = "okay"; 107 status = "okay";
110 }; 108 };
111 109
@@ -113,29 +111,16 @@
113 spi@7000d400 { 111 spi@7000d400 {
114 status = "okay"; 112 status = "okay";
115 spi-max-frequency = <25000000>; 113 spi-max-frequency = <25000000>;
116 spidev0: spidev@1 {
117 compatible = "spidev";
118 reg = <1>;
119 spi-max-frequency = <25000000>;
120 };
121 }; 114 };
122 115
123 /* SPI5: Apalis SPI2 */ 116 /* SPI5: Apalis SPI2 */
124 spi@7000dc00 { 117 spi@7000dc00 {
125 status = "okay"; 118 status = "okay";
126 spi-max-frequency = <25000000>; 119 spi-max-frequency = <25000000>;
127 spidev1: spidev@2 {
128 compatible = "spidev";
129 reg = <2>;
130 spi-max-frequency = <25000000>;
131 };
132 };
133
134 hda@70030000 {
135 status = "okay";
136 }; 120 };
137 121
138 sd1: sdhci@78000000 { 122 /* Apalis SD1 */
123 sdhci@78000000 {
139 status = "okay"; 124 status = "okay";
140 bus-width = <4>; 125 bus-width = <4>;
141 /* SD1_CD# */ 126 /* SD1_CD# */
@@ -143,7 +128,8 @@
143 no-1-8-v; 128 no-1-8-v;
144 }; 129 };
145 130
146 mmc1: sdhci@78000400 { 131 /* Apalis MMC1 */
132 sdhci@78000400 {
147 status = "okay"; 133 status = "okay";
148 bus-width = <8>; 134 bus-width = <8>;
149 /* MMC1_CD# */ 135 /* MMC1_CD# */
@@ -154,12 +140,12 @@
154 /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */ 140 /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
155 usb@7d000000 { 141 usb@7d000000 {
156 status = "okay"; 142 status = "okay";
143 dr_mode = "otg";
157 }; 144 };
158 145
159 usb-phy@7d000000 { 146 usb-phy@7d000000 {
160 status = "okay"; 147 status = "okay";
161 dr_mode = "otg"; 148 vbus-supply = <&reg_usbo1_vbus>;
162 vbus-supply = <&usbo1_vbus_reg>;
163 }; 149 };
164 150
165 /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */ 151 /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
@@ -169,7 +155,7 @@
169 155
170 usb-phy@7d004000 { 156 usb-phy@7d004000 {
171 status = "okay"; 157 status = "okay";
172 vbus-supply = <&usbh_vbus_reg>; 158 vbus-supply = <&reg_usbh_vbus>;
173 }; 159 };
174 160
175 /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */ 161 /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
@@ -179,18 +165,17 @@
179 165
180 usb-phy@7d008000 { 166 usb-phy@7d008000 {
181 status = "okay"; 167 status = "okay";
182 vbus-supply = <&usbh_vbus_reg>; 168 vbus-supply = <&reg_usbh_vbus>;
183 }; 169 };
184 170
185 backlight: backlight { 171 backlight: backlight {
186 compatible = "pwm-backlight"; 172 compatible = "pwm-backlight";
187
188 /* PWM_BKL1 */
189 pwms = <&pwm 0 5000000>;
190 brightness-levels = <255 231 223 207 191 159 127 0>; 173 brightness-levels = <255 231 223 207 191 159 127 0>;
191 default-brightness-level = <6>; 174 default-brightness-level = <6>;
192 /* BKL1_ON */ 175 /* BKL1_ON */
193 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; 176 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
177 power-supply = <&reg_3v3>;
178 pwms = <&pwm 0 5000000>; /* BKL1_PWM */
194 }; 179 };
195 180
196 gpio-keys { 181 gpio-keys {
@@ -211,64 +196,53 @@
211 * edt,et070080dh6: EDT 7.0" LCD TFT 196 * edt,et070080dh6: EDT 7.0" LCD TFT
212 */ 197 */
213 compatible = "edt,et057090dhu", "simple-panel"; 198 compatible = "edt,et057090dhu", "simple-panel";
214
215 backlight = <&backlight>; 199 backlight = <&backlight>;
200 power-supply = <&reg_3v3>;
216 }; 201 };
217 202
218 pwmleds { 203 reg_3v3: regulator-3v3 {
219 compatible = "pwm-leds"; 204 compatible = "regulator-fixed";
220 205 regulator-name = "3.3V_SW";
221 pwm1 { 206 regulator-min-microvolt = <3300000>;
222 label = "PWM1"; 207 regulator-max-microvolt = <3300000>;
223 pwms = <&pwm 3 19600>; 208 };
224 max-brightness = <255>;
225 };
226
227 pwm2 {
228 label = "PWM2";
229 pwms = <&pwm 2 19600>;
230 max-brightness = <255>;
231 };
232 209
233 pwm3 { 210 reg_5v0: regulator-5v0 {
234 label = "PWM3"; 211 compatible = "regulator-fixed";
235 pwms = <&pwm 1 19600>; 212 regulator-name = "5V_SW";
236 max-brightness = <255>; 213 regulator-min-microvolt = <5000000>;
237 }; 214 regulator-max-microvolt = <5000000>;
238 }; 215 };
239 216
240 regulators { 217 /* USBO1_EN */
241 sys_5v0_reg: regulator@1 { 218 reg_usbo1_vbus: regulator-usbo1-vbus {
242 compatible = "regulator-fixed"; 219 compatible = "regulator-fixed";
243 reg = <1>; 220 regulator-name = "VCC_USBO1";
244 regulator-name = "5v0"; 221 regulator-min-microvolt = <5000000>;
245 regulator-min-microvolt = <5000000>; 222 regulator-max-microvolt = <5000000>;
246 regulator-max-microvolt = <5000000>; 223 gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
247 regulator-always-on; 224 enable-active-high;
248 }; 225 vin-supply = <&reg_5v0>;
226 };
249 227
250 /* USBO1_EN */ 228 /* USBH_EN */
251 usbo1_vbus_reg: regulator@2 { 229 reg_usbh_vbus: regulator-usbh-vbus {
252 compatible = "regulator-fixed"; 230 compatible = "regulator-fixed";
253 reg = <2>; 231 regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
254 regulator-name = "usbo1_vbus"; 232 regulator-min-microvolt = <5000000>;
255 regulator-min-microvolt = <5000000>; 233 regulator-max-microvolt = <5000000>;
256 regulator-max-microvolt = <5000000>; 234 gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
257 gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>; 235 enable-active-high;
258 enable-active-high; 236 vin-supply = <&reg_5v0>;
259 vin-supply = <&sys_5v0_reg>; 237 };
260 }; 238};
261 239
262 /* USBH_EN */ 240&gpio {
263 usbh_vbus_reg: regulator@3 { 241 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
264 compatible = "regulator-fixed"; 242 pex-perst-n {
265 reg = <3>; 243 gpio-hog;
266 regulator-name = "usbh_vbus"; 244 gpios = <TEGRA_GPIO(S, 7) GPIO_ACTIVE_HIGH>;
267 regulator-min-microvolt = <5000000>; 245 output-high;
268 regulator-max-microvolt = <5000000>; 246 line-name = "PEX_PERST_N";
269 gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
270 enable-active-high;
271 vin-supply = <&sys_5v0_reg>;
272 };
273 }; 247 };
274}; 248};
diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
new file mode 100644
index 000000000000..0be50e881684
--- /dev/null
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
@@ -0,0 +1,266 @@
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/dts-v1/;
3
4#include <dt-bindings/input/input.h>
5#include "tegra30-apalis-v1.1.dtsi"
6
7/ {
8 model = "Toradex Apalis T30 on Apalis Evaluation Board";
9 compatible = "toradex,apalis_t30-v1.1-eval", "toradex,apalis_t30-eval",
10 "toradex,apalis_t30-v1.1", "toradex,apalis_t30",
11 "nvidia,tegra30";
12
13 aliases {
14 rtc0 = "/i2c@7000c000/rtc@68";
15 rtc1 = "/i2c@7000d000/pmic@2d";
16 rtc2 = "/rtc@7000e000";
17 serial0 = &uarta;
18 serial1 = &uartb;
19 serial2 = &uartc;
20 serial3 = &uartd;
21 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
27 pcie@3000 {
28 pci@1,0 {
29 status = "okay";
30 };
31
32 pci@2,0 {
33 status = "okay";
34 };
35 };
36
37 host1x@50000000 {
38 dc@54200000 {
39 rgb {
40 status = "okay";
41 nvidia,panel = <&panel>;
42 };
43 };
44
45 hdmi@54280000 {
46 status = "okay";
47 hdmi-supply = <&reg_5v0>;
48 };
49 };
50
51 /* Apalis UART1 */
52 serial@70006000 {
53 status = "okay";
54 };
55
56 /* Apalis UART2 */
57 serial@70006040 {
58 status = "okay";
59 };
60
61 /* Apalis UART3 */
62 serial@70006200 {
63 status = "okay";
64 };
65
66 /* Apalis UART4 */
67 serial@70006300 {
68 status = "okay";
69 };
70
71 pwm@7000a000 {
72 status = "okay";
73 };
74
75 /*
76 * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
77 * board)
78 */
79 i2c@7000c000 {
80 status = "okay";
81 clock-frequency = <400000>;
82
83 pcie-switch@58 {
84 compatible = "plx,pex8605";
85 reg = <0x58>;
86 };
87
88 /* M41T0M6 real time clock on carrier board */
89 rtc@68 {
90 compatible = "st,m41t0";
91 reg = <0x68>;
92 };
93 };
94
95 /* GEN2_I2C: unused */
96
97 /*
98 * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
99 * carrier board)
100 */
101 i2c@7000c500 {
102 status = "okay";
103 clock-frequency = <400000>;
104 };
105
106 /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
107 i2c@7000c700 {
108 status = "okay";
109 };
110
111 /* SPI1: Apalis SPI1 */
112 spi@7000d400 {
113 status = "okay";
114 spi-max-frequency = <25000000>;
115 };
116
117 /* SPI5: Apalis SPI2 */
118 spi@7000dc00 {
119 status = "okay";
120 spi-max-frequency = <25000000>;
121 };
122
123 /* Apalis SD1 */
124 sdhci@78000000 {
125 status = "okay";
126 bus-width = <4>;
127 /* SD1_CD# */
128 cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_LOW>;
129 no-1-8-v;
130 };
131
132 /* Apalis MMC1 */
133 sdhci@78000400 {
134 status = "okay";
135 bus-width = <8>;
136 /* MMC1_CD# */
137 cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
138 vqmmc-supply = <&reg_vddio_sdmmc3>;
139 };
140
141 /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
142 usb@7d000000 {
143 status = "okay";
144 dr_mode = "otg";
145 };
146
147 usb-phy@7d000000 {
148 status = "okay";
149 vbus-supply = <&reg_usbo1_vbus>;
150 };
151
152 /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
153 usb@7d004000 {
154 status = "okay";
155 };
156
157 usb-phy@7d004000 {
158 status = "okay";
159 vbus-supply = <&reg_usbh_vbus>;
160 };
161
162 /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
163 usb@7d008000 {
164 status = "okay";
165 };
166
167 usb-phy@7d008000 {
168 status = "okay";
169 vbus-supply = <&reg_usbh_vbus>;
170 };
171
172 backlight: backlight {
173 compatible = "pwm-backlight";
174 brightness-levels = <255 231 223 207 191 159 127 0>;
175 default-brightness-level = <6>;
176 /* BKL1_ON */
177 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
178 power-supply = <&reg_3v3>;
179 pwms = <&pwm 0 5000000>; /* BKL1_PWM */
180 };
181
182 gpio-keys {
183 compatible = "gpio-keys";
184
185 wakeup {
186 label = "WAKE1_MICO";
187 gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
188 linux,code = <KEY_WAKEUP>;
189 debounce-interval = <10>;
190 wakeup-source;
191 };
192 };
193
194 panel: panel {
195 /*
196 * edt,et057090dhu: EDT 5.7" LCD TFT
197 * edt,et070080dh6: EDT 7.0" LCD TFT
198 */
199 compatible = "edt,et057090dhu", "simple-panel";
200 backlight = <&backlight>;
201 power-supply = <&reg_3v3>;
202 };
203
204 reg_3v3: regulator-3v3 {
205 compatible = "regulator-fixed";
206 regulator-name = "3.3V_SW";
207 regulator-min-microvolt = <3300000>;
208 regulator-max-microvolt = <3300000>;
209 };
210
211 reg_5v0: regulator-5v0 {
212 compatible = "regulator-fixed";
213 regulator-name = "5V_SW";
214 regulator-min-microvolt = <5000000>;
215 regulator-max-microvolt = <5000000>;
216 };
217
218 /* USBO1_EN */
219 reg_usbo1_vbus: regulator-usbo1-vbus {
220 compatible = "regulator-fixed";
221 regulator-name = "VCC_USBO1";
222 regulator-min-microvolt = <5000000>;
223 regulator-max-microvolt = <5000000>;
224 gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
225 enable-active-high;
226 vin-supply = <&reg_5v0>;
227 };
228
229 /* USBH_EN */
230 reg_usbh_vbus: regulator-usbh-vbus {
231 compatible = "regulator-fixed";
232 regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
233 regulator-min-microvolt = <5000000>;
234 regulator-max-microvolt = <5000000>;
235 gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
236 enable-active-high;
237 vin-supply = <&reg_5v0>;
238 };
239
240 /*
241 * 1.8 volt resp. 3.3 volt VDDIO_SDMMC3 depending on
242 * EN_+3.3_SDMMC3 GPIO
243 */
244 reg_vddio_sdmmc3: regulator-vddio-sdmmc3 {
245 compatible = "regulator-gpio";
246 regulator-name = "VDDIO_SDMMC3";
247 regulator-min-microvolt = <1800000>;
248 regulator-max-microvolt = <3300000>;
249 regulator-type = "voltage";
250 gpios = <&gpio TEGRA_GPIO(J, 5) GPIO_ACTIVE_HIGH>;
251 states = <1800000 0x0
252 3300000 0x1>;
253 startup-delay-us = <100000>;
254 vin-supply = <&vddio_sdmmc_1v8_reg>;
255 };
256};
257
258&gpio {
259 /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
260 pex-perst-n {
261 gpio-hog;
262 gpios = <TEGRA_GPIO(S, 7) GPIO_ACTIVE_HIGH>;
263 output-high;
264 line-name = "PEX_PERST_N";
265 };
266};
diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
new file mode 100644
index 000000000000..02f8126481a2
--- /dev/null
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
@@ -0,0 +1,1189 @@
1// SPDX-License-Identifier: GPL-2.0 OR MIT
2#include "tegra30.dtsi"
3
4/*
5 * Toradex Apalis T30 Module Device Tree
6 * Compatible for Revisions 1GB: V1.1A, V1.1B; 1GB IT: V1.1A, V1.1B;
7 * 2GB: V1.1A, V1.1B
8 */
9/ {
10 memory@80000000 {
11 reg = <0x80000000 0x40000000>;
12 };
13
14 pcie@3000 {
15 status = "okay";
16 avdd-pexa-supply = <&vdd2_reg>;
17 avdd-pexb-supply = <&vdd2_reg>;
18 avdd-pex-pll-supply = <&vdd2_reg>;
19 avdd-plle-supply = <&ldo6_reg>;
20 hvdd-pex-supply = <&reg_module_3v3>;
21 vddio-pex-ctl-supply = <&reg_module_3v3>;
22 vdd-pexa-supply = <&vdd2_reg>;
23 vdd-pexb-supply = <&vdd2_reg>;
24
25 /* Apalis type specific */
26 pci@1,0 {
27 nvidia,num-lanes = <4>;
28 };
29
30 /* Apalis PCIe */
31 pci@2,0 {
32 nvidia,num-lanes = <1>;
33 };
34
35 /* I210/I211 Gigabit Ethernet Controller (on-module) */
36 pci@3,0 {
37 status = "okay";
38 nvidia,num-lanes = <1>;
39
40 pcie@0 {
41 reg = <0 0 0 0 0>;
42 local-mac-address = [00 00 00 00 00 00];
43 };
44 };
45 };
46
47 host1x@50000000 {
48 hdmi@54280000 {
49 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
50 nvidia,hpd-gpio =
51 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
52 pll-supply = <&reg_1v8_avdd_hdmi_pll>;
53 vdd-supply = <&reg_3v3_avdd_hdmi>;
54 };
55 };
56
57 pinmux@70000868 {
58 pinctrl-names = "default";
59 pinctrl-0 = <&state_default>;
60
61 state_default: pinmux {
62 /* Analogue Audio (On-module) */
63 clk1-out-pw4 {
64 nvidia,pins = "clk1_out_pw4";
65 nvidia,function = "extperiph1";
66 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
67 nvidia,tristate = <TEGRA_PIN_DISABLE>;
68 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
69 };
70 dap3-fs-pp0 {
71 nvidia,pins = "dap3_fs_pp0",
72 "dap3_sclk_pp3",
73 "dap3_din_pp1",
74 "dap3_dout_pp2";
75 nvidia,function = "i2s2";
76 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
77 nvidia,tristate = <TEGRA_PIN_DISABLE>;
78 };
79
80 /* Apalis BKL1_ON */
81 pv2 {
82 nvidia,pins = "pv2";
83 nvidia,function = "rsvd4";
84 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
85 nvidia,tristate = <TEGRA_PIN_DISABLE>;
86 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
87 };
88
89 /* Apalis BKL1_PWM */
90 uart3-rts-n-pc0 {
91 nvidia,pins = "uart3_rts_n_pc0";
92 nvidia,function = "pwm0";
93 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
94 nvidia,tristate = <TEGRA_PIN_DISABLE>;
95 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
96 };
97 /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
98 uart3-cts-n-pa1 {
99 nvidia,pins = "uart3_cts_n_pa1";
100 nvidia,function = "rsvd2";
101 nvidia,pull = <TEGRA_PIN_PULL_UP>;
102 nvidia,tristate = <TEGRA_PIN_DISABLE>;
103 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
104 };
105
106 /* Apalis CAN1 on SPI6 */
107 spi2-cs0-n-px3 {
108 nvidia,pins = "spi2_cs0_n_px3",
109 "spi2_miso_px1",
110 "spi2_mosi_px0",
111 "spi2_sck_px2";
112 nvidia,function = "spi6";
113 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
114 nvidia,tristate = <TEGRA_PIN_DISABLE>;
115 };
116 /* CAN_INT1 */
117 spi2-cs1-n-pw2 {
118 nvidia,pins = "spi2_cs1_n_pw2";
119 nvidia,function = "spi3";
120 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
121 nvidia,tristate = <TEGRA_PIN_DISABLE>;
122 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
123 };
124
125 /* Apalis CAN2 on SPI4 */
126 gmi-a16-pj7 {
127 nvidia,pins = "gmi_a16_pj7",
128 "gmi_a17_pb0",
129 "gmi_a18_pb1",
130 "gmi_a19_pk7";
131 nvidia,function = "spi4";
132 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
133 nvidia,tristate = <TEGRA_PIN_DISABLE>;
134 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
135 };
136 /* CAN_INT2 */
137 spi2-cs2-n-pw3 {
138 nvidia,pins = "spi2_cs2_n_pw3";
139 nvidia,function = "spi3";
140 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
141 nvidia,tristate = <TEGRA_PIN_DISABLE>;
142 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
143 };
144
145 /* Apalis Digital Audio */
146 clk1-req-pee2 {
147 nvidia,pins = "clk1_req_pee2";
148 nvidia,function = "hda";
149 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
150 nvidia,tristate = <TEGRA_PIN_DISABLE>;
151 };
152 clk2-out-pw5 {
153 nvidia,pins = "clk2_out_pw5";
154 nvidia,function = "extperiph2";
155 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
156 nvidia,tristate = <TEGRA_PIN_DISABLE>;
157 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
158 };
159 dap1-fs-pn0 {
160 nvidia,pins = "dap1_fs_pn0",
161 "dap1_din_pn1",
162 "dap1_dout_pn2",
163 "dap1_sclk_pn3";
164 nvidia,function = "hda";
165 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
166 nvidia,tristate = <TEGRA_PIN_DISABLE>;
167 };
168
169 /* Apalis GPIO */
170 kb-col0-pq0 {
171 nvidia,pins = "kb_col0_pq0",
172 "kb_col1_pq1",
173 "kb_row10_ps2",
174 "kb_row11_ps3",
175 "kb_row12_ps4",
176 "kb_row13_ps5",
177 "kb_row14_ps6",
178 "kb_row15_ps7";
179 nvidia,function = "kbc";
180 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
181 nvidia,tristate = <TEGRA_PIN_DISABLE>;
182 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
183 };
184 /* Multiplexed and therefore disabled */
185 owr {
186 nvidia,pins = "owr";
187 nvidia,function = "rsvd3";
188 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
189 nvidia,tristate = <TEGRA_PIN_ENABLE>;
190 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
191 };
192
193 /* Apalis HDMI1 */
194 hdmi-cec-pee3 {
195 nvidia,pins = "hdmi_cec_pee3";
196 nvidia,function = "cec";
197 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
198 nvidia,tristate = <TEGRA_PIN_DISABLE>;
199 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
200 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
201 };
202 hdmi-int-pn7 {
203 nvidia,pins = "hdmi_int_pn7";
204 nvidia,function = "hdmi";
205 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
206 nvidia,tristate = <TEGRA_PIN_ENABLE>;
207 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
208 };
209
210 /* Apalis I2C1 */
211 gen1-i2c-scl-pc4 {
212 nvidia,pins = "gen1_i2c_scl_pc4",
213 "gen1_i2c_sda_pc5";
214 nvidia,function = "i2c1";
215 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
216 nvidia,tristate = <TEGRA_PIN_DISABLE>;
217 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
218 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
219 };
220
221 /* Apalis I2C2 (DDC) */
222 ddc-scl-pv4 {
223 nvidia,pins = "ddc_scl_pv4",
224 "ddc_sda_pv5";
225 nvidia,function = "i2c4";
226 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
227 nvidia,tristate = <TEGRA_PIN_DISABLE>;
228 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
229 };
230
231 /* Apalis I2C3 (CAM) */
232 cam-i2c-scl-pbb1 {
233 nvidia,pins = "cam_i2c_scl_pbb1",
234 "cam_i2c_sda_pbb2";
235 nvidia,function = "i2c3";
236 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
237 nvidia,tristate = <TEGRA_PIN_DISABLE>;
238 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
239 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
240 };
241
242 /* Apalis LCD1 */
243 lcd-d0-pe0 {
244 nvidia,pins = "lcd_d0_pe0",
245 "lcd_d1_pe1",
246 "lcd_d2_pe2",
247 "lcd_d3_pe3",
248 "lcd_d4_pe4",
249 "lcd_d5_pe5",
250 "lcd_d6_pe6",
251 "lcd_d7_pe7",
252 "lcd_d8_pf0",
253 "lcd_d9_pf1",
254 "lcd_d10_pf2",
255 "lcd_d11_pf3",
256 "lcd_d12_pf4",
257 "lcd_d13_pf5",
258 "lcd_d14_pf6",
259 "lcd_d15_pf7",
260 "lcd_d16_pm0",
261 "lcd_d17_pm1",
262 "lcd_d18_pm2",
263 "lcd_d19_pm3",
264 "lcd_d20_pm4",
265 "lcd_d21_pm5",
266 "lcd_d22_pm6",
267 "lcd_d23_pm7",
268 "lcd_de_pj1",
269 "lcd_hsync_pj3",
270 "lcd_pclk_pb3",
271 "lcd_vsync_pj4";
272 nvidia,function = "displaya";
273 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
274 nvidia,tristate = <TEGRA_PIN_DISABLE>;
275 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
276 };
277
278 /* Apalis MMC1 */
279 sdmmc3-clk-pa6 {
280 nvidia,pins = "sdmmc3_clk_pa6";
281 nvidia,function = "sdmmc3";
282 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
283 nvidia,tristate = <TEGRA_PIN_DISABLE>;
284 };
285 sdmmc3-dat0-pb7 {
286 nvidia,pins = "sdmmc3_cmd_pa7",
287 "sdmmc3_dat0_pb7",
288 "sdmmc3_dat1_pb6",
289 "sdmmc3_dat2_pb5",
290 "sdmmc3_dat3_pb4",
291 "sdmmc3_dat4_pd1",
292 "sdmmc3_dat5_pd0",
293 "sdmmc3_dat6_pd3",
294 "sdmmc3_dat7_pd4";
295 nvidia,function = "sdmmc3";
296 nvidia,pull = <TEGRA_PIN_PULL_UP>;
297 nvidia,tristate = <TEGRA_PIN_DISABLE>;
298 };
299 /* Apalis MMC1_CD# */
300 pv3 {
301 nvidia,pins = "pv3";
302 nvidia,function = "rsvd2";
303 nvidia,pull = <TEGRA_PIN_PULL_UP>;
304 nvidia,tristate = <TEGRA_PIN_DISABLE>;
305 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
306 };
307
308 /* Apalis Parallel Camera */
309 cam-mclk-pcc0 {
310 nvidia,pins = "cam_mclk_pcc0";
311 nvidia,function = "vi_alt3";
312 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
313 nvidia,tristate = <TEGRA_PIN_DISABLE>;
314 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
315 };
316 vi-vsync-pd6 {
317 nvidia,pins = "vi_d0_pt4",
318 "vi_d1_pd5",
319 "vi_d2_pl0",
320 "vi_d3_pl1",
321 "vi_d4_pl2",
322 "vi_d5_pl3",
323 "vi_d6_pl4",
324 "vi_d7_pl5",
325 "vi_d8_pl6",
326 "vi_d9_pl7",
327 "vi_d10_pt2",
328 "vi_d11_pt3",
329 "vi_hsync_pd7",
330 "vi_pclk_pt0",
331 "vi_vsync_pd6";
332 nvidia,function = "vi";
333 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
334 nvidia,tristate = <TEGRA_PIN_DISABLE>;
335 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
336 };
337 /* Multiplexed and therefore disabled */
338 kb-col2-pq2 {
339 nvidia,pins = "kb_col2_pq2",
340 "kb_col3_pq3",
341 "kb_col4_pq4",
342 "kb_row4_pr4";
343 nvidia,function = "rsvd4";
344 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
345 nvidia,tristate = <TEGRA_PIN_ENABLE>;
346 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
347 };
348 kb-row0-pr0 {
349 nvidia,pins = "kb_row0_pr0",
350 "kb_row1_pr1",
351 "kb_row2_pr2",
352 "kb_row3_pr3";
353 nvidia,function = "rsvd3";
354 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
355 nvidia,tristate = <TEGRA_PIN_ENABLE>;
356 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
357 };
358 kb-row5-pr5 {
359 nvidia,pins = "kb_row5_pr5",
360 "kb_row6_pr6",
361 "kb_row7_pr7";
362 nvidia,function = "kbc";
363 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
364 nvidia,tristate = <TEGRA_PIN_ENABLE>;
365 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
366 };
367 /*
368 * VI level-shifter direction
369 * (pull-down => default direction input)
370 */
371 vi-mclk-pt1 {
372 nvidia,pins = "vi_mclk_pt1";
373 nvidia,function = "vi_alt3";
374 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
375 nvidia,tristate = <TEGRA_PIN_ENABLE>;
376 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
377 };
378
379 /* Apalis PWM1 */
380 pu6 {
381 nvidia,pins = "pu6";
382 nvidia,function = "pwm3";
383 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
384 nvidia,tristate = <TEGRA_PIN_DISABLE>;
385 };
386
387 /* Apalis PWM2 */
388 pu5 {
389 nvidia,pins = "pu5";
390 nvidia,function = "pwm2";
391 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
392 nvidia,tristate = <TEGRA_PIN_DISABLE>;
393 };
394
395 /* Apalis PWM3 */
396 pu4 {
397 nvidia,pins = "pu4";
398 nvidia,function = "pwm1";
399 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
400 nvidia,tristate = <TEGRA_PIN_DISABLE>;
401 };
402
403 /* Apalis PWM4 */
404 pu3 {
405 nvidia,pins = "pu3";
406 nvidia,function = "pwm0";
407 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
408 nvidia,tristate = <TEGRA_PIN_DISABLE>;
409 };
410
411 /* Apalis RESET_MOCI# */
412 gmi-rst-n-pi4 {
413 nvidia,pins = "gmi_rst_n_pi4";
414 nvidia,function = "gmi";
415 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
416 nvidia,tristate = <TEGRA_PIN_DISABLE>;
417 };
418
419 /* Apalis SATA1_ACT# */
420 pex-l0-prsnt-n-pdd0 {
421 nvidia,pins = "pex_l0_prsnt_n_pdd0";
422 nvidia,function = "rsvd3";
423 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
424 nvidia,tristate = <TEGRA_PIN_DISABLE>;
425 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
426 };
427
428 /* Apalis SD1 */
429 sdmmc1-clk-pz0 {
430 nvidia,pins = "sdmmc1_clk_pz0";
431 nvidia,function = "sdmmc1";
432 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
433 nvidia,tristate = <TEGRA_PIN_DISABLE>;
434 };
435 sdmmc1-cmd-pz1 {
436 nvidia,pins = "sdmmc1_cmd_pz1",
437 "sdmmc1_dat0_py7",
438 "sdmmc1_dat1_py6",
439 "sdmmc1_dat2_py5",
440 "sdmmc1_dat3_py4";
441 nvidia,function = "sdmmc1";
442 nvidia,pull = <TEGRA_PIN_PULL_UP>;
443 nvidia,tristate = <TEGRA_PIN_DISABLE>;
444 };
445 /* Apalis SD1_CD# */
446 clk2-req-pcc5 {
447 nvidia,pins = "clk2_req_pcc5";
448 nvidia,function = "rsvd2";
449 nvidia,pull = <TEGRA_PIN_PULL_UP>;
450 nvidia,tristate = <TEGRA_PIN_DISABLE>;
451 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
452 };
453
454 /* Apalis SPDIF1 */
455 spdif-out-pk5 {
456 nvidia,pins = "spdif_out_pk5",
457 "spdif_in_pk6";
458 nvidia,function = "spdif";
459 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
460 nvidia,tristate = <TEGRA_PIN_DISABLE>;
461 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
462 };
463
464 /* Apalis SPI1 */
465 spi1-sck-px5 {
466 nvidia,pins = "spi1_sck_px5",
467 "spi1_mosi_px4",
468 "spi1_miso_px7",
469 "spi1_cs0_n_px6";
470 nvidia,function = "spi1";
471 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
472 nvidia,tristate = <TEGRA_PIN_DISABLE>;
473 };
474
475 /* Apalis SPI2 */
476 lcd-sck-pz4 {
477 nvidia,pins = "lcd_sck_pz4",
478 "lcd_sdout_pn5",
479 "lcd_sdin_pz2",
480 "lcd_cs0_n_pn4";
481 nvidia,function = "spi5";
482 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
483 nvidia,tristate = <TEGRA_PIN_DISABLE>;
484 };
485
486 /*
487 * Apalis TS (Low-speed type specific)
488 * pins may be used as GPIOs
489 */
490 kb-col5-pq5 {
491 nvidia,pins = "kb_col5_pq5";
492 nvidia,function = "rsvd4";
493 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
494 nvidia,tristate = <TEGRA_PIN_DISABLE>;
495 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
496 };
497 kb-col6-pq6 {
498 nvidia,pins = "kb_col6_pq6",
499 "kb_col7_pq7",
500 "kb_row8_ps0",
501 "kb_row9_ps1";
502 nvidia,function = "kbc";
503 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
504 nvidia,tristate = <TEGRA_PIN_DISABLE>;
505 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
506 };
507
508 /* Apalis UART1 */
509 ulpi-data0 {
510 nvidia,pins = "ulpi_data0_po1",
511 "ulpi_data1_po2",
512 "ulpi_data2_po3",
513 "ulpi_data3_po4",
514 "ulpi_data4_po5",
515 "ulpi_data5_po6",
516 "ulpi_data6_po7",
517 "ulpi_data7_po0";
518 nvidia,function = "uarta";
519 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
520 nvidia,tristate = <TEGRA_PIN_DISABLE>;
521 };
522
523 /* Apalis UART2 */
524 ulpi-clk-py0 {
525 nvidia,pins = "ulpi_clk_py0",
526 "ulpi_dir_py1",
527 "ulpi_nxt_py2",
528 "ulpi_stp_py3";
529 nvidia,function = "uartd";
530 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
531 nvidia,tristate = <TEGRA_PIN_DISABLE>;
532 };
533
534 /* Apalis UART3 */
535 uart2-rxd-pc3 {
536 nvidia,pins = "uart2_rxd_pc3",
537 "uart2_txd_pc2";
538 nvidia,function = "uartb";
539 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
540 nvidia,tristate = <TEGRA_PIN_DISABLE>;
541 };
542
543 /* Apalis UART4 */
544 uart3-rxd-pw7 {
545 nvidia,pins = "uart3_rxd_pw7",
546 "uart3_txd_pw6";
547 nvidia,function = "uartc";
548 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
549 nvidia,tristate = <TEGRA_PIN_DISABLE>;
550 };
551
552 /* Apalis USBH_EN */
553 pex-l0-rst-n-pdd1 {
554 nvidia,pins = "pex_l0_rst_n_pdd1";
555 nvidia,function = "rsvd3";
556 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
557 nvidia,tristate = <TEGRA_PIN_DISABLE>;
558 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
559 };
560
561 /* Apalis USBH_OC# */
562 pex-l0-clkreq-n-pdd2 {
563 nvidia,pins = "pex_l0_clkreq_n_pdd2";
564 nvidia,function = "rsvd3";
565 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
566 nvidia,tristate = <TEGRA_PIN_DISABLE>;
567 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
568 };
569
570 /* Apalis USBO1_EN */
571 gen2-i2c-scl-pt5 {
572 nvidia,pins = "gen2_i2c_scl_pt5";
573 nvidia,function = "rsvd4";
574 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
575 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
576 nvidia,tristate = <TEGRA_PIN_DISABLE>;
577 };
578
579 /* Apalis USBO1_OC# */
580 gen2-i2c-sda-pt6 {
581 nvidia,pins = "gen2_i2c_sda_pt6";
582 nvidia,function = "rsvd4";
583 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
584 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
585 nvidia,tristate = <TEGRA_PIN_DISABLE>;
586 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
587 };
588
589 /* Apalis VGA1 not supported and therefore disabled */
590 crt-hsync-pv6 {
591 nvidia,pins = "crt_hsync_pv6",
592 "crt_vsync_pv7";
593 nvidia,function = "rsvd2";
594 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
595 nvidia,tristate = <TEGRA_PIN_ENABLE>;
596 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
597 };
598
599 /* Apalis WAKE1_MICO */
600 pv1 {
601 nvidia,pins = "pv1";
602 nvidia,function = "rsvd1";
603 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
604 nvidia,tristate = <TEGRA_PIN_DISABLE>;
605 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
606 };
607
608 /* eMMC (On-module) */
609 sdmmc4-clk-pcc4 {
610 nvidia,pins = "sdmmc4_clk_pcc4",
611 "sdmmc4_cmd_pt7",
612 "sdmmc4_rst_n_pcc3";
613 nvidia,function = "sdmmc4";
614 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
615 nvidia,tristate = <TEGRA_PIN_DISABLE>;
616 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
617 };
618 sdmmc4-dat0-paa0 {
619 nvidia,pins = "sdmmc4_dat0_paa0",
620 "sdmmc4_dat1_paa1",
621 "sdmmc4_dat2_paa2",
622 "sdmmc4_dat3_paa3",
623 "sdmmc4_dat4_paa4",
624 "sdmmc4_dat5_paa5",
625 "sdmmc4_dat6_paa6",
626 "sdmmc4_dat7_paa7";
627 nvidia,function = "sdmmc4";
628 nvidia,pull = <TEGRA_PIN_PULL_UP>;
629 nvidia,tristate = <TEGRA_PIN_DISABLE>;
630 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
631 };
632
633 /* EN_+3.3_SDMMC3 */
634 uart2-cts-n-pj5 {
635 nvidia,pins = "uart2_cts_n_pj5";
636 nvidia,function = "gmi";
637 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
638 nvidia,tristate = <TEGRA_PIN_DISABLE>;
639 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
640 };
641
642 /* LAN i210/i211 DEV_OFF_N, PE_RST_N (On-module) */
643 pex-l2-prsnt-n-pdd7 {
644 nvidia,pins = "pex_l2_prsnt_n_pdd7",
645 "pex_l2_rst_n_pcc6";
646 nvidia,function = "pcie";
647 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
648 nvidia,tristate = <TEGRA_PIN_DISABLE>;
649 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
650 };
651 /* LAN i210/i211 PE_WAKE_N, SDP3 (On-module) */
652 pex-wake-n-pdd3 {
653 nvidia,pins = "pex_wake_n_pdd3",
654 "pex_l2_clkreq_n_pcc7";
655 nvidia,function = "pcie";
656 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
657 nvidia,tristate = <TEGRA_PIN_DISABLE>;
658 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
659 };
660 /* LAN i210/i211 SMB_ALERT_N (On-module) */
661 sys-clk-req-pz5 {
662 nvidia,pins = "sys_clk_req_pz5";
663 nvidia,function = "rsvd2";
664 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
665 nvidia,tristate = <TEGRA_PIN_DISABLE>;
666 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
667 };
668
669 /* LVDS Transceiver Configuration */
670 pbb0 {
671 nvidia,pins = "pbb0",
672 "pbb7",
673 "pcc1",
674 "pcc2";
675 nvidia,function = "rsvd2";
676 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
677 nvidia,tristate = <TEGRA_PIN_DISABLE>;
678 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
679 };
680 pbb3 {
681 nvidia,pins = "pbb3",
682 "pbb4",
683 "pbb5",
684 "pbb6";
685 nvidia,function = "displayb";
686 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
687 nvidia,tristate = <TEGRA_PIN_DISABLE>;
688 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
689 };
690
691 /* Not connected and therefore disabled */
692 clk-32k-out-pa0 {
693 nvidia,pins = "clk3_out_pee0",
694 "clk3_req_pee1",
695 "clk_32k_out_pa0",
696 "dap4_din_pp5",
697 "dap4_dout_pp6",
698 "dap4_fs_pp4",
699 "dap4_sclk_pp7";
700 nvidia,function = "rsvd2";
701 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
702 nvidia,tristate = <TEGRA_PIN_ENABLE>;
703 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
704 };
705 dap2-fs-pa2 {
706 nvidia,pins = "dap2_fs_pa2",
707 "dap2_sclk_pa3",
708 "dap2_din_pa4",
709 "dap2_dout_pa5",
710 "lcd_dc0_pn6",
711 "lcd_m1_pw1",
712 "lcd_pwr1_pc1",
713 "pex_l1_clkreq_n_pdd6",
714 "pex_l1_prsnt_n_pdd4",
715 "pex_l1_rst_n_pdd5";
716 nvidia,function = "rsvd3";
717 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
718 nvidia,tristate = <TEGRA_PIN_ENABLE>;
719 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
720 };
721 gmi-ad0-pg0 {
722 nvidia,pins = "gmi_ad0_pg0",
723 "gmi_ad2_pg2",
724 "gmi_ad3_pg3",
725 "gmi_ad4_pg4",
726 "gmi_ad5_pg5",
727 "gmi_ad6_pg6",
728 "gmi_ad7_pg7",
729 "gmi_ad8_ph0",
730 "gmi_ad9_ph1",
731 "gmi_ad10_ph2",
732 "gmi_ad11_ph3",
733 "gmi_ad12_ph4",
734 "gmi_ad13_ph5",
735 "gmi_ad14_ph6",
736 "gmi_ad15_ph7",
737 "gmi_adv_n_pk0",
738 "gmi_clk_pk1",
739 "gmi_cs4_n_pk2",
740 "gmi_cs2_n_pk3",
741 "gmi_dqs_pi2",
742 "gmi_iordy_pi5",
743 "gmi_oe_n_pi1",
744 "gmi_wait_pi7",
745 "gmi_wr_n_pi0",
746 "lcd_cs1_n_pw0",
747 "pu0",
748 "pu1",
749 "pu2";
750 nvidia,function = "rsvd4";
751 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
752 nvidia,tristate = <TEGRA_PIN_ENABLE>;
753 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
754 };
755 gmi-cs0-n-pj0 {
756 nvidia,pins = "gmi_cs0_n_pj0",
757 "gmi_cs1_n_pj2",
758 "gmi_cs3_n_pk4";
759 nvidia,function = "rsvd1";
760 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
761 nvidia,tristate = <TEGRA_PIN_ENABLE>;
762 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
763 };
764 gmi-cs6-n-pi3 {
765 nvidia,pins = "gmi_cs6_n_pi3";
766 nvidia,function = "sata";
767 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
768 nvidia,tristate = <TEGRA_PIN_ENABLE>;
769 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
770 };
771 gmi-cs7-n-pi6 {
772 nvidia,pins = "gmi_cs7_n_pi6";
773 nvidia,function = "gmi_alt";
774 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
775 nvidia,tristate = <TEGRA_PIN_ENABLE>;
776 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
777 };
778 lcd-pwr0-pb2 {
779 nvidia,pins = "lcd_pwr0_pb2",
780 "lcd_pwr2_pc6",
781 "lcd_wr_n_pz3";
782 nvidia,function = "hdcp";
783 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
784 nvidia,tristate = <TEGRA_PIN_ENABLE>;
785 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
786 };
787 uart2-rts-n-pj6 {
788 nvidia,pins = "uart2_rts_n_pj6";
789 nvidia,function = "gmi";
790 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
791 nvidia,tristate = <TEGRA_PIN_ENABLE>;
792 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
793 };
794
795 /* Power I2C (On-module) */
796 pwr-i2c-scl-pz6 {
797 nvidia,pins = "pwr_i2c_scl_pz6",
798 "pwr_i2c_sda_pz7";
799 nvidia,function = "i2cpwr";
800 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
801 nvidia,tristate = <TEGRA_PIN_DISABLE>;
802 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
803 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
804 };
805
806 /*
807 * THERMD_ALERT#, unlatched I2C address pin of LM95245
808 * temperature sensor therefore requires disabling for
809 * now
810 */
811 lcd-dc1-pd2 {
812 nvidia,pins = "lcd_dc1_pd2";
813 nvidia,function = "rsvd3";
814 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
815 nvidia,tristate = <TEGRA_PIN_ENABLE>;
816 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
817 };
818
819 /* TOUCH_PEN_INT# (On-module) */
820 pv0 {
821 nvidia,pins = "pv0";
822 nvidia,function = "rsvd1";
823 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
824 nvidia,tristate = <TEGRA_PIN_DISABLE>;
825 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
826 };
827 };
828 };
829
830 serial@70006040 {
831 compatible = "nvidia,tegra30-hsuart";
832 };
833
834 serial@70006200 {
835 compatible = "nvidia,tegra30-hsuart";
836 };
837
838 serial@70006300 {
839 compatible = "nvidia,tegra30-hsuart";
840 };
841
842 hdmi_ddc: i2c@7000c700 {
843 clock-frequency = <10000>;
844 };
845
846 /*
847 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
848 * touch screen controller
849 */
850 i2c@7000d000 {
851 status = "okay";
852 clock-frequency = <100000>;
853
854 /* SGTL5000 audio codec */
855 sgtl5000: codec@a {
856 compatible = "fsl,sgtl5000";
857 reg = <0x0a>;
858 VDDA-supply = <&reg_module_3v3_audio>;
859 VDDD-supply = <&reg_1v8_vio>;
860 VDDIO-supply = <&reg_module_3v3>;
861 clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
862 };
863
864 pmic: pmic@2d {
865 compatible = "ti,tps65911";
866 reg = <0x2d>;
867
868 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
869 #interrupt-cells = <2>;
870 interrupt-controller;
871
872 ti,system-power-controller;
873
874 #gpio-cells = <2>;
875 gpio-controller;
876
877 vcc1-supply = <&reg_module_3v3>;
878 vcc2-supply = <&reg_module_3v3>;
879 vcc3-supply = <&reg_1v8_vio>;
880 vcc4-supply = <&reg_module_3v3>;
881 vcc5-supply = <&reg_module_3v3>;
882 vcc6-supply = <&reg_1v8_vio>;
883 vcc7-supply = <&reg_5v0_charge_pump>;
884 vccio-supply = <&reg_module_3v3>;
885
886 regulators {
887 vdd1_reg: vdd1 {
888 regulator-name = "+V1.35_VDDIO_DDR";
889 regulator-min-microvolt = <1350000>;
890 regulator-max-microvolt = <1350000>;
891 regulator-always-on;
892 };
893
894 vdd2_reg: vdd2 {
895 regulator-name = "+V1.05";
896 regulator-min-microvolt = <1050000>;
897 regulator-max-microvolt = <1050000>;
898 };
899
900 vddctrl_reg: vddctrl {
901 regulator-name = "+V1.0_VDD_CPU";
902 regulator-min-microvolt = <1150000>;
903 regulator-max-microvolt = <1150000>;
904 regulator-always-on;
905 };
906
907 reg_1v8_vio: vio {
908 regulator-name = "+V1.8";
909 regulator-min-microvolt = <1800000>;
910 regulator-max-microvolt = <1800000>;
911 regulator-always-on;
912 };
913
914 /*
915 * 1.8 volt +VDDIO_SDMMC3 in case EN_+3.3_SDMMC3
916 * is off
917 */
918 vddio_sdmmc_1v8_reg: ldo1 {
919 regulator-name = "+VDDIO_SDMMC3_1V8";
920 regulator-min-microvolt = <1800000>;
921 regulator-max-microvolt = <1800000>;
922 regulator-always-on;
923 };
924
925 /*
926 * EN_+V3.3 switching via FET:
927 * +V3.3_AUDIO_AVDD_S, +V3.3
928 * see also +V3.3 fixed supply
929 */
930 ldo2_reg: ldo2 {
931 regulator-name = "EN_+V3.3";
932 regulator-min-microvolt = <3300000>;
933 regulator-max-microvolt = <3300000>;
934 regulator-always-on;
935 };
936
937 ldo3_reg: ldo3 {
938 regulator-name = "+V1.2_CSI";
939 regulator-min-microvolt = <1200000>;
940 regulator-max-microvolt = <1200000>;
941 };
942
943 ldo4_reg: ldo4 {
944 regulator-name = "+V1.2_VDD_RTC";
945 regulator-min-microvolt = <1200000>;
946 regulator-max-microvolt = <1200000>;
947 regulator-always-on;
948 };
949
950 /*
951 * +V2.8_AVDD_VDAC:
952 * only required for (unsupported) analog RGB
953 */
954 ldo5_reg: ldo5 {
955 regulator-name = "+V2.8_AVDD_VDAC";
956 regulator-min-microvolt = <2800000>;
957 regulator-max-microvolt = <2800000>;
958 regulator-always-on;
959 };
960
961 /*
962 * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
963 * but LDO6 can't set voltage in 50mV
964 * granularity
965 */
966 ldo6_reg: ldo6 {
967 regulator-name = "+V1.05_AVDD_PLLE";
968 regulator-min-microvolt = <1100000>;
969 regulator-max-microvolt = <1100000>;
970 };
971
972 ldo7_reg: ldo7 {
973 regulator-name = "+V1.2_AVDD_PLL";
974 regulator-min-microvolt = <1200000>;
975 regulator-max-microvolt = <1200000>;
976 regulator-always-on;
977 };
978
979 ldo8_reg: ldo8 {
980 regulator-name = "+V1.0_VDD_DDR_HS";
981 regulator-min-microvolt = <1000000>;
982 regulator-max-microvolt = <1000000>;
983 regulator-always-on;
984 };
985 };
986 };
987
988 /* STMPE811 touch screen controller */
989 touchscreen@41 {
990 compatible = "st,stmpe811";
991 reg = <0x41>;
992 irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
993 interrupt-controller;
994 id = <0>;
995 blocks = <0x5>;
996 irq-trigger = <0x1>;
997
998 stmpe_touchscreen {
999 compatible = "st,stmpe-ts";
1000 /* 3.25 MHz ADC clock speed */
1001 st,adc-freq = <1>;
1002 /* 8 sample average control */
1003 st,ave-ctrl = <3>;
1004 /* 7 length fractional part in z */
1005 st,fraction-z = <7>;
1006 /*
1007 * 50 mA typical 80 mA max touchscreen drivers
1008 * current limit value
1009 */
1010 st,i-drive = <1>;
1011 /* 12-bit ADC */
1012 st,mod-12b = <1>;
1013 /* internal ADC reference */
1014 st,ref-sel = <0>;
1015 /* ADC converstion time: 80 clocks */
1016 st,sample-time = <4>;
1017 /* 1 ms panel driver settling time */
1018 st,settling = <3>;
1019 /* 5 ms touch detect interrupt delay */
1020 st,touch-det-delay = <5>;
1021 };
1022 };
1023
1024 /*
1025 * LM95245 temperature sensor
1026 * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
1027 */
1028 temp-sensor@4c {
1029 compatible = "national,lm95245";
1030 reg = <0x4c>;
1031 };
1032
1033 /* SW: +V1.2_VDD_CORE */
1034 regulator@60 {
1035 compatible = "ti,tps62362";
1036 reg = <0x60>;
1037
1038 regulator-name = "tps62362-vout";
1039 regulator-min-microvolt = <900000>;
1040 regulator-max-microvolt = <1400000>;
1041 regulator-boot-on;
1042 regulator-always-on;
1043 ti,vsel0-state-low;
1044 /* VSEL1: EN_CORE_DVFS_N low for DVFS */
1045 ti,vsel1-state-low;
1046 };
1047 };
1048
1049 /* SPI4: CAN2 */
1050 spi@7000da00 {
1051 status = "okay";
1052 spi-max-frequency = <10000000>;
1053
1054 can@1 {
1055 compatible = "microchip,mcp2515";
1056 reg = <1>;
1057 clocks = <&clk16m>;
1058 interrupt-parent = <&gpio>;
1059 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
1060 spi-max-frequency = <10000000>;
1061 };
1062 };
1063
1064 /* SPI6: CAN1 */
1065 spi@7000de00 {
1066 status = "okay";
1067 spi-max-frequency = <10000000>;
1068
1069 can@0 {
1070 compatible = "microchip,mcp2515";
1071 reg = <0>;
1072 clocks = <&clk16m>;
1073 interrupt-parent = <&gpio>;
1074 interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_FALLING>;
1075 spi-max-frequency = <10000000>;
1076 };
1077 };
1078
1079 pmc@7000e400 {
1080 nvidia,invert-interrupt;
1081 nvidia,suspend-mode = <1>;
1082 nvidia,cpu-pwr-good-time = <5000>;
1083 nvidia,cpu-pwr-off-time = <5000>;
1084 nvidia,core-pwr-good-time = <3845 3845>;
1085 nvidia,core-pwr-off-time = <0>;
1086 nvidia,core-power-req-active-high;
1087 nvidia,sys-clock-req-active-high;
1088
1089 /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
1090 i2c-thermtrip {
1091 nvidia,i2c-controller-id = <4>;
1092 nvidia,bus-addr = <0x2d>;
1093 nvidia,reg-addr = <0x3f>;
1094 nvidia,reg-data = <0x1>;
1095 };
1096 };
1097
1098 hda@70030000 {
1099 status = "okay";
1100 };
1101
1102 ahub@70080000 {
1103 i2s@70080500 {
1104 status = "okay";
1105 };
1106 };
1107
1108 /* eMMC */
1109 sdhci@78000600 {
1110 status = "okay";
1111 bus-width = <8>;
1112 non-removable;
1113 vmmc-supply = <&reg_module_3v3>; /* VCC */
1114 vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
1115 mmc-ddr-1_8v;
1116 };
1117
1118 clk32k_in: xtal1 {
1119 compatible = "fixed-clock";
1120 #clock-cells = <0>;
1121 clock-frequency = <32768>;
1122 };
1123
1124 clk16m: osc4 {
1125 compatible = "fixed-clock";
1126 #clock-cells = <0>;
1127 clock-frequency = <16000000>;
1128 };
1129
1130 reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
1131 compatible = "regulator-fixed";
1132 regulator-name = "+V1.8_AVDD_HDMI_PLL";
1133 regulator-min-microvolt = <1800000>;
1134 regulator-max-microvolt = <1800000>;
1135 enable-active-high;
1136 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
1137 vin-supply = <&reg_1v8_vio>;
1138 };
1139
1140 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
1141 compatible = "regulator-fixed";
1142 regulator-name = "+V3.3_AVDD_HDMI";
1143 regulator-min-microvolt = <3300000>;
1144 regulator-max-microvolt = <3300000>;
1145 enable-active-high;
1146 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
1147 vin-supply = <&reg_module_3v3>;
1148 };
1149
1150 reg_5v0_charge_pump: regulator-5v0-charge-pump {
1151 compatible = "regulator-fixed";
1152 regulator-name = "+V5.0";
1153 regulator-min-microvolt = <5000000>;
1154 regulator-max-microvolt = <5000000>;
1155 regulator-always-on;
1156 };
1157
1158 reg_module_3v3: regulator-module-3v3 {
1159 compatible = "regulator-fixed";
1160 regulator-name = "+V3.3";
1161 regulator-min-microvolt = <3300000>;
1162 regulator-max-microvolt = <3300000>;
1163 regulator-always-on;
1164 };
1165
1166 reg_module_3v3_audio: regulator-module-3v3-audio {
1167 compatible = "regulator-fixed";
1168 regulator-name = "+V3.3_AUDIO_AVDD_S";
1169 regulator-min-microvolt = <3300000>;
1170 regulator-max-microvolt = <3300000>;
1171 regulator-always-on;
1172 };
1173
1174 sound {
1175 compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
1176 "nvidia,tegra-audio-sgtl5000";
1177 nvidia,model = "Toradex Apalis T30";
1178 nvidia,audio-routing =
1179 "Headphone Jack", "HP_OUT",
1180 "LINE_IN", "Line In Jack",
1181 "MIC_IN", "Mic Jack";
1182 nvidia,i2s-controller = <&tegra_i2s2>;
1183 nvidia,audio-codec = <&sgtl5000>;
1184 clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
1185 <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
1186 <&tegra_car TEGRA30_CLK_EXTERN1>;
1187 clock-names = "pll_a", "pll_a_out0", "mclk";
1188 };
1189};
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 2f807d40c1b7..7f112f192fe9 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -3,48 +3,53 @@
3 3
4/* 4/*
5 * Toradex Apalis T30 Module Device Tree 5 * Toradex Apalis T30 Module Device Tree
6 * Compatible for Revisions 1GB: V1.0A, V1.1A; 1GB IT: V1.1A; 6 * Compatible for Revisions 1GB: V1.0A; 2GB: V1.0B, V1.0C, V1.0E
7 * 2GB: V1.0B, V1.0C, V1.0E, V1.1A
8 */ 7 */
9/ { 8/ {
10 model = "Toradex Apalis T30";
11 compatible = "toradex,apalis_t30", "nvidia,tegra30";
12
13 memory@80000000 { 9 memory@80000000 {
14 reg = <0x80000000 0x40000000>; 10 reg = <0x80000000 0x40000000>;
15 }; 11 };
16 12
17 pcie@3000 { 13 pcie@3000 {
14 status = "okay";
18 avdd-pexa-supply = <&vdd2_reg>; 15 avdd-pexa-supply = <&vdd2_reg>;
19 vdd-pexa-supply = <&vdd2_reg>;
20 avdd-pexb-supply = <&vdd2_reg>; 16 avdd-pexb-supply = <&vdd2_reg>;
21 vdd-pexb-supply = <&vdd2_reg>;
22 avdd-pex-pll-supply = <&vdd2_reg>; 17 avdd-pex-pll-supply = <&vdd2_reg>;
23 avdd-plle-supply = <&ldo6_reg>; 18 avdd-plle-supply = <&ldo6_reg>;
24 vddio-pex-ctl-supply = <&sys_3v3_reg>; 19 hvdd-pex-supply = <&reg_module_3v3>;
25 hvdd-pex-supply = <&sys_3v3_reg>; 20 vddio-pex-ctl-supply = <&reg_module_3v3>;
21 vdd-pexa-supply = <&vdd2_reg>;
22 vdd-pexb-supply = <&vdd2_reg>;
26 23
24 /* Apalis type specific */
27 pci@1,0 { 25 pci@1,0 {
28 nvidia,num-lanes = <4>; 26 nvidia,num-lanes = <4>;
29 }; 27 };
30 28
29 /* Apalis PCIe */
31 pci@2,0 { 30 pci@2,0 {
32 nvidia,num-lanes = <1>; 31 nvidia,num-lanes = <1>;
33 }; 32 };
34 33
34 /* I210/I211 Gigabit Ethernet Controller (on-module) */
35 pci@3,0 { 35 pci@3,0 {
36 status = "okay";
36 nvidia,num-lanes = <1>; 37 nvidia,num-lanes = <1>;
38
39 pcie@0 {
40 reg = <0 0 0 0 0>;
41 local-mac-address = [00 00 00 00 00 00];
42 };
37 }; 43 };
38 }; 44 };
39 45
40 host1x@50000000 { 46 host1x@50000000 {
41 hdmi@54280000 { 47 hdmi@54280000 {
42 vdd-supply = <&avdd_hdmi_3v3_reg>; 48 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
43 pll-supply = <&avdd_hdmi_pll_1v8_reg>;
44
45 nvidia,hpd-gpio = 49 nvidia,hpd-gpio =
46 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; 50 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
47 nvidia,ddc-i2c-bus = <&hdmiddc>; 51 pll-supply = <&reg_1v8_avdd_hdmi_pll>;
52 vdd-supply = <&reg_3v3_avdd_hdmi>;
48 }; 53 };
49 }; 54 };
50 55
@@ -54,18 +59,18 @@
54 59
55 state_default: pinmux { 60 state_default: pinmux {
56 /* Analogue Audio (On-module) */ 61 /* Analogue Audio (On-module) */
57 clk1_out_pw4 { 62 clk1-out-pw4 {
58 nvidia,pins = "clk1_out_pw4"; 63 nvidia,pins = "clk1_out_pw4";
59 nvidia,function = "extperiph1"; 64 nvidia,function = "extperiph1";
60 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 65 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
61 nvidia,tristate = <TEGRA_PIN_DISABLE>; 66 nvidia,tristate = <TEGRA_PIN_DISABLE>;
62 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 67 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
63 }; 68 };
64 dap3_fs_pp0 { 69 dap3-fs-pp0 {
65 nvidia,pins = "dap3_fs_pp0", 70 nvidia,pins = "dap3_fs_pp0",
66 "dap3_sclk_pp3", 71 "dap3_sclk_pp3",
67 "dap3_din_pp1", 72 "dap3_din_pp1",
68 "dap3_dout_pp2"; 73 "dap3_dout_pp2";
69 nvidia,function = "i2s2"; 74 nvidia,function = "i2s2";
70 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 75 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
71 nvidia,tristate = <TEGRA_PIN_DISABLE>; 76 nvidia,tristate = <TEGRA_PIN_DISABLE>;
@@ -77,25 +82,28 @@
77 nvidia,function = "rsvd4"; 82 nvidia,function = "rsvd4";
78 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 83 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
79 nvidia,tristate = <TEGRA_PIN_DISABLE>; 84 nvidia,tristate = <TEGRA_PIN_DISABLE>;
85 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
80 }; 86 };
81 87
82 /* Apalis BKL1_PWM */ 88 /* Apalis BKL1_PWM */
83 uart3_rts_n_pc0 { 89 uart3-rts-n-pc0 {
84 nvidia,pins = "uart3_rts_n_pc0"; 90 nvidia,pins = "uart3_rts_n_pc0";
85 nvidia,function = "pwm0"; 91 nvidia,function = "pwm0";
86 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 92 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
87 nvidia,tristate = <TEGRA_PIN_DISABLE>; 93 nvidia,tristate = <TEGRA_PIN_DISABLE>;
94 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
88 }; 95 };
89 /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */ 96 /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
90 uart3_cts_n_pa1 { 97 uart3-cts-n-pa1 {
91 nvidia,pins = "uart3_cts_n_pa1"; 98 nvidia,pins = "uart3_cts_n_pa1";
92 nvidia,function = "rsvd2"; 99 nvidia,function = "rsvd2";
93 nvidia,pull = <TEGRA_PIN_PULL_UP>; 100 nvidia,pull = <TEGRA_PIN_PULL_UP>;
94 nvidia,tristate = <TEGRA_PIN_DISABLE>; 101 nvidia,tristate = <TEGRA_PIN_DISABLE>;
102 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
95 }; 103 };
96 104
97 /* Apalis CAN1 on SPI6 */ 105 /* Apalis CAN1 on SPI6 */
98 spi2_cs0_n_px3 { 106 spi2-cs0-n-px3 {
99 nvidia,pins = "spi2_cs0_n_px3", 107 nvidia,pins = "spi2_cs0_n_px3",
100 "spi2_miso_px1", 108 "spi2_miso_px1",
101 "spi2_mosi_px0", 109 "spi2_mosi_px0",
@@ -105,7 +113,7 @@
105 nvidia,tristate = <TEGRA_PIN_DISABLE>; 113 nvidia,tristate = <TEGRA_PIN_DISABLE>;
106 }; 114 };
107 /* CAN_INT1 */ 115 /* CAN_INT1 */
108 spi2_cs1_n_pw2 { 116 spi2-cs1-n-pw2 {
109 nvidia,pins = "spi2_cs1_n_pw2"; 117 nvidia,pins = "spi2_cs1_n_pw2";
110 nvidia,function = "spi3"; 118 nvidia,function = "spi3";
111 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 119 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -114,7 +122,7 @@
114 }; 122 };
115 123
116 /* Apalis CAN2 on SPI4 */ 124 /* Apalis CAN2 on SPI4 */
117 gmi_a16_pj7 { 125 gmi-a16-pj7 {
118 nvidia,pins = "gmi_a16_pj7", 126 nvidia,pins = "gmi_a16_pj7",
119 "gmi_a17_pb0", 127 "gmi_a17_pb0",
120 "gmi_a18_pb1", 128 "gmi_a18_pb1",
@@ -125,7 +133,7 @@
125 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 133 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
126 }; 134 };
127 /* CAN_INT2 */ 135 /* CAN_INT2 */
128 spi2_cs2_n_pw3 { 136 spi2-cs2-n-pw3 {
129 nvidia,pins = "spi2_cs2_n_pw3"; 137 nvidia,pins = "spi2_cs2_n_pw3";
130 nvidia,function = "spi3"; 138 nvidia,function = "spi3";
131 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 139 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -134,20 +142,20 @@
134 }; 142 };
135 143
136 /* Apalis Digital Audio */ 144 /* Apalis Digital Audio */
137 clk1_req_pee2 { 145 clk1-req-pee2 {
138 nvidia,pins = "clk1_req_pee2"; 146 nvidia,pins = "clk1_req_pee2";
139 nvidia,function = "hda"; 147 nvidia,function = "hda";
140 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 148 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
141 nvidia,tristate = <TEGRA_PIN_DISABLE>; 149 nvidia,tristate = <TEGRA_PIN_DISABLE>;
142 }; 150 };
143 clk2_out_pw5 { 151 clk2-out-pw5 {
144 nvidia,pins = "clk2_out_pw5"; 152 nvidia,pins = "clk2_out_pw5";
145 nvidia,function = "extperiph2"; 153 nvidia,function = "extperiph2";
146 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 154 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
147 nvidia,tristate = <TEGRA_PIN_DISABLE>; 155 nvidia,tristate = <TEGRA_PIN_DISABLE>;
148 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 156 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
149 }; 157 };
150 dap1_fs_pn0 { 158 dap1-fs-pn0 {
151 nvidia,pins = "dap1_fs_pn0", 159 nvidia,pins = "dap1_fs_pn0",
152 "dap1_din_pn1", 160 "dap1_din_pn1",
153 "dap1_dout_pn2", 161 "dap1_dout_pn2",
@@ -157,28 +165,125 @@
157 nvidia,tristate = <TEGRA_PIN_DISABLE>; 165 nvidia,tristate = <TEGRA_PIN_DISABLE>;
158 }; 166 };
159 167
160 /* Apalis I2C3 */ 168 /* Apalis GPIO */
161 cam_i2c_scl_pbb1 { 169 kb-col0-pq0 {
170 nvidia,pins = "kb_col0_pq0",
171 "kb_col1_pq1",
172 "kb_row10_ps2",
173 "kb_row11_ps3",
174 "kb_row12_ps4",
175 "kb_row13_ps5",
176 "kb_row14_ps6",
177 "kb_row15_ps7";
178 nvidia,function = "kbc";
179 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
180 nvidia,tristate = <TEGRA_PIN_DISABLE>;
181 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
182 };
183 /* Multiplexed and therefore disabled */
184 owr {
185 nvidia,pins = "owr";
186 nvidia,function = "rsvd3";
187 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
188 nvidia,tristate = <TEGRA_PIN_ENABLE>;
189 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
190 };
191
192 /* Apalis HDMI1 */
193 hdmi-cec-pee3 {
194 nvidia,pins = "hdmi_cec_pee3";
195 nvidia,function = "cec";
196 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
197 nvidia,tristate = <TEGRA_PIN_DISABLE>;
198 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
199 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
200 };
201 hdmi-int-pn7 {
202 nvidia,pins = "hdmi_int_pn7";
203 nvidia,function = "hdmi";
204 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
205 nvidia,tristate = <TEGRA_PIN_ENABLE>;
206 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
207 };
208
209 /* Apalis I2C1 */
210 gen1-i2c-scl-pc4 {
211 nvidia,pins = "gen1_i2c_scl_pc4",
212 "gen1_i2c_sda_pc5";
213 nvidia,function = "i2c1";
214 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
215 nvidia,tristate = <TEGRA_PIN_DISABLE>;
216 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
217 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
218 };
219
220 /* Apalis I2C2 (DDC) */
221 ddc-scl-pv4 {
222 nvidia,pins = "ddc_scl_pv4",
223 "ddc_sda_pv5";
224 nvidia,function = "i2c4";
225 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
226 nvidia,tristate = <TEGRA_PIN_DISABLE>;
227 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
228 };
229
230 /* Apalis I2C3 (CAM) */
231 cam-i2c-scl-pbb1 {
162 nvidia,pins = "cam_i2c_scl_pbb1", 232 nvidia,pins = "cam_i2c_scl_pbb1",
163 "cam_i2c_sda_pbb2"; 233 "cam_i2c_sda_pbb2";
164 nvidia,function = "i2c3"; 234 nvidia,function = "i2c3";
165 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 235 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
166 nvidia,tristate = <TEGRA_PIN_DISABLE>; 236 nvidia,tristate = <TEGRA_PIN_DISABLE>;
167 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 237 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
168 nvidia,lock = <TEGRA_PIN_DISABLE>;
169 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 238 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
170 }; 239 };
171 240
241 /* Apalis LCD1 */
242 lcd-d0-pe0 {
243 nvidia,pins = "lcd_d0_pe0",
244 "lcd_d1_pe1",
245 "lcd_d2_pe2",
246 "lcd_d3_pe3",
247 "lcd_d4_pe4",
248 "lcd_d5_pe5",
249 "lcd_d6_pe6",
250 "lcd_d7_pe7",
251 "lcd_d8_pf0",
252 "lcd_d9_pf1",
253 "lcd_d10_pf2",
254 "lcd_d11_pf3",
255 "lcd_d12_pf4",
256 "lcd_d13_pf5",
257 "lcd_d14_pf6",
258 "lcd_d15_pf7",
259 "lcd_d16_pm0",
260 "lcd_d17_pm1",
261 "lcd_d18_pm2",
262 "lcd_d19_pm3",
263 "lcd_d20_pm4",
264 "lcd_d21_pm5",
265 "lcd_d22_pm6",
266 "lcd_d23_pm7",
267 "lcd_de_pj1",
268 "lcd_hsync_pj3",
269 "lcd_pclk_pb3",
270 "lcd_vsync_pj4";
271 nvidia,function = "displaya";
272 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
273 nvidia,tristate = <TEGRA_PIN_DISABLE>;
274 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
275 };
276
172 /* Apalis MMC1 */ 277 /* Apalis MMC1 */
173 sdmmc3_clk_pa6 { 278 sdmmc3-clk-pa6 {
174 nvidia,pins = "sdmmc3_clk_pa6", 279 nvidia,pins = "sdmmc3_clk_pa6";
175 "sdmmc3_cmd_pa7";
176 nvidia,function = "sdmmc3"; 280 nvidia,function = "sdmmc3";
177 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 281 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
178 nvidia,tristate = <TEGRA_PIN_DISABLE>; 282 nvidia,tristate = <TEGRA_PIN_DISABLE>;
179 }; 283 };
180 sdmmc3_dat0_pb7 { 284 sdmmc3-dat0-pb7 {
181 nvidia,pins = "sdmmc3_dat0_pb7", 285 nvidia,pins = "sdmmc3_cmd_pa7",
286 "sdmmc3_dat0_pb7",
182 "sdmmc3_dat1_pb6", 287 "sdmmc3_dat1_pb6",
183 "sdmmc3_dat2_pb5", 288 "sdmmc3_dat2_pb5",
184 "sdmmc3_dat3_pb4", 289 "sdmmc3_dat3_pb4",
@@ -194,10 +299,81 @@
194 pv3 { 299 pv3 {
195 nvidia,pins = "pv3"; 300 nvidia,pins = "pv3";
196 nvidia,function = "rsvd2"; 301 nvidia,function = "rsvd2";
302 nvidia,pull = <TEGRA_PIN_PULL_UP>;
303 nvidia,tristate = <TEGRA_PIN_DISABLE>;
304 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
305 };
306
307 /* Apalis Parallel Camera */
308 cam-mclk-pcc0 {
309 nvidia,pins = "cam_mclk_pcc0";
310 nvidia,function = "vi_alt3";
311 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
312 nvidia,tristate = <TEGRA_PIN_DISABLE>;
313 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
314 };
315 vi-vsync-pd6 {
316 nvidia,pins = "vi_d0_pt4",
317 "vi_d1_pd5",
318 "vi_d2_pl0",
319 "vi_d3_pl1",
320 "vi_d4_pl2",
321 "vi_d5_pl3",
322 "vi_d6_pl4",
323 "vi_d7_pl5",
324 "vi_d8_pl6",
325 "vi_d9_pl7",
326 "vi_d10_pt2",
327 "vi_d11_pt3",
328 "vi_hsync_pd7",
329 "vi_pclk_pt0",
330 "vi_vsync_pd6";
331 nvidia,function = "vi";
197 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 332 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
198 nvidia,tristate = <TEGRA_PIN_DISABLE>; 333 nvidia,tristate = <TEGRA_PIN_DISABLE>;
199 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 334 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
200 }; 335 };
336 /* Multiplexed and therefore disabled */
337 kb-col2-pq2 {
338 nvidia,pins = "kb_col2_pq2",
339 "kb_col3_pq3",
340 "kb_col4_pq4",
341 "kb_row4_pr4";
342 nvidia,function = "rsvd4";
343 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
344 nvidia,tristate = <TEGRA_PIN_ENABLE>;
345 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
346 };
347 kb-row0-pr0 {
348 nvidia,pins = "kb_row0_pr0",
349 "kb_row1_pr1",
350 "kb_row2_pr2",
351 "kb_row3_pr3";
352 nvidia,function = "rsvd3";
353 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
354 nvidia,tristate = <TEGRA_PIN_ENABLE>;
355 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
356 };
357 kb-row5-pr5 {
358 nvidia,pins = "kb_row5_pr5",
359 "kb_row6_pr6",
360 "kb_row7_pr7";
361 nvidia,function = "kbc";
362 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
363 nvidia,tristate = <TEGRA_PIN_ENABLE>;
364 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
365 };
366 /*
367 * VI level-shifter direction
368 * (pull-down => default direction input)
369 */
370 vi-mclk-pt1 {
371 nvidia,pins = "vi_mclk_pt1";
372 nvidia,function = "vi_alt3";
373 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
374 nvidia,tristate = <TEGRA_PIN_ENABLE>;
375 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
376 };
201 377
202 /* Apalis PWM1 */ 378 /* Apalis PWM1 */
203 pu6 { 379 pu6 {
@@ -232,21 +408,30 @@
232 }; 408 };
233 409
234 /* Apalis RESET_MOCI# */ 410 /* Apalis RESET_MOCI# */
235 gmi_rst_n_pi4 { 411 gmi-rst-n-pi4 {
236 nvidia,pins = "gmi_rst_n_pi4"; 412 nvidia,pins = "gmi_rst_n_pi4";
237 nvidia,function = "gmi"; 413 nvidia,function = "gmi";
238 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 414 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
239 nvidia,tristate = <TEGRA_PIN_DISABLE>; 415 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 }; 416 };
241 417
418 /* Apalis SATA1_ACT# */
419 pex-l0-prsnt-n-pdd0 {
420 nvidia,pins = "pex_l0_prsnt_n_pdd0";
421 nvidia,function = "rsvd3";
422 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
423 nvidia,tristate = <TEGRA_PIN_DISABLE>;
424 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
425 };
426
242 /* Apalis SD1 */ 427 /* Apalis SD1 */
243 sdmmc1_clk_pz0 { 428 sdmmc1-clk-pz0 {
244 nvidia,pins = "sdmmc1_clk_pz0"; 429 nvidia,pins = "sdmmc1_clk_pz0";
245 nvidia,function = "sdmmc1"; 430 nvidia,function = "sdmmc1";
246 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 431 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
247 nvidia,tristate = <TEGRA_PIN_DISABLE>; 432 nvidia,tristate = <TEGRA_PIN_DISABLE>;
248 }; 433 };
249 sdmmc1_cmd_pz1 { 434 sdmmc1-cmd-pz1 {
250 nvidia,pins = "sdmmc1_cmd_pz1", 435 nvidia,pins = "sdmmc1_cmd_pz1",
251 "sdmmc1_dat0_py7", 436 "sdmmc1_dat0_py7",
252 "sdmmc1_dat1_py6", 437 "sdmmc1_dat1_py6",
@@ -257,16 +442,26 @@
257 nvidia,tristate = <TEGRA_PIN_DISABLE>; 442 nvidia,tristate = <TEGRA_PIN_DISABLE>;
258 }; 443 };
259 /* Apalis SD1_CD# */ 444 /* Apalis SD1_CD# */
260 clk2_req_pcc5 { 445 clk2-req-pcc5 {
261 nvidia,pins = "clk2_req_pcc5"; 446 nvidia,pins = "clk2_req_pcc5";
262 nvidia,function = "rsvd2"; 447 nvidia,function = "rsvd2";
448 nvidia,pull = <TEGRA_PIN_PULL_UP>;
449 nvidia,tristate = <TEGRA_PIN_DISABLE>;
450 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
451 };
452
453 /* Apalis SPDIF1 */
454 spdif-out-pk5 {
455 nvidia,pins = "spdif_out_pk5",
456 "spdif_in_pk6";
457 nvidia,function = "spdif";
263 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 458 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
264 nvidia,tristate = <TEGRA_PIN_DISABLE>; 459 nvidia,tristate = <TEGRA_PIN_DISABLE>;
265 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 460 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
266 }; 461 };
267 462
268 /* Apalis SPI1 */ 463 /* Apalis SPI1 */
269 spi1_sck_px5 { 464 spi1-sck-px5 {
270 nvidia,pins = "spi1_sck_px5", 465 nvidia,pins = "spi1_sck_px5",
271 "spi1_mosi_px4", 466 "spi1_mosi_px4",
272 "spi1_miso_px7", 467 "spi1_miso_px7",
@@ -277,7 +472,7 @@
277 }; 472 };
278 473
279 /* Apalis SPI2 */ 474 /* Apalis SPI2 */
280 lcd_sck_pz4 { 475 lcd-sck-pz4 {
281 nvidia,pins = "lcd_sck_pz4", 476 nvidia,pins = "lcd_sck_pz4",
282 "lcd_sdout_pn5", 477 "lcd_sdout_pn5",
283 "lcd_sdin_pz2", 478 "lcd_sdin_pz2",
@@ -287,8 +482,30 @@
287 nvidia,tristate = <TEGRA_PIN_DISABLE>; 482 nvidia,tristate = <TEGRA_PIN_DISABLE>;
288 }; 483 };
289 484
485 /*
486 * Apalis TS (Low-speed type specific)
487 * pins may be used as GPIOs
488 */
489 kb-col5-pq5 {
490 nvidia,pins = "kb_col5_pq5";
491 nvidia,function = "rsvd4";
492 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
493 nvidia,tristate = <TEGRA_PIN_DISABLE>;
494 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
495 };
496 kb-col6-pq6 {
497 nvidia,pins = "kb_col6_pq6",
498 "kb_col7_pq7",
499 "kb_row8_ps0",
500 "kb_row9_ps1";
501 nvidia,function = "kbc";
502 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
503 nvidia,tristate = <TEGRA_PIN_DISABLE>;
504 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
505 };
506
290 /* Apalis UART1 */ 507 /* Apalis UART1 */
291 ulpi_data0 { 508 ulpi-data0 {
292 nvidia,pins = "ulpi_data0_po1", 509 nvidia,pins = "ulpi_data0_po1",
293 "ulpi_data1_po2", 510 "ulpi_data1_po2",
294 "ulpi_data2_po3", 511 "ulpi_data2_po3",
@@ -303,7 +520,7 @@
303 }; 520 };
304 521
305 /* Apalis UART2 */ 522 /* Apalis UART2 */
306 ulpi_clk_py0 { 523 ulpi-clk-py0 {
307 nvidia,pins = "ulpi_clk_py0", 524 nvidia,pins = "ulpi_clk_py0",
308 "ulpi_dir_py1", 525 "ulpi_dir_py1",
309 "ulpi_nxt_py2", 526 "ulpi_nxt_py2",
@@ -314,7 +531,7 @@
314 }; 531 };
315 532
316 /* Apalis UART3 */ 533 /* Apalis UART3 */
317 uart2_rxd_pc3 { 534 uart2-rxd-pc3 {
318 nvidia,pins = "uart2_rxd_pc3", 535 nvidia,pins = "uart2_rxd_pc3",
319 "uart2_txd_pc2"; 536 "uart2_txd_pc2";
320 nvidia,function = "uartb"; 537 nvidia,function = "uartb";
@@ -323,7 +540,7 @@
323 }; 540 };
324 541
325 /* Apalis UART4 */ 542 /* Apalis UART4 */
326 uart3_rxd_pw7 { 543 uart3-rxd-pw7 {
327 nvidia,pins = "uart3_rxd_pw7", 544 nvidia,pins = "uart3_rxd_pw7",
328 "uart3_txd_pw6"; 545 "uart3_txd_pw6";
329 nvidia,function = "uartc"; 546 nvidia,function = "uartc";
@@ -331,8 +548,26 @@
331 nvidia,tristate = <TEGRA_PIN_DISABLE>; 548 nvidia,tristate = <TEGRA_PIN_DISABLE>;
332 }; 549 };
333 550
551 /* Apalis USBH_EN */
552 pex-l0-rst-n-pdd1 {
553 nvidia,pins = "pex_l0_rst_n_pdd1";
554 nvidia,function = "rsvd3";
555 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
556 nvidia,tristate = <TEGRA_PIN_DISABLE>;
557 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
558 };
559
560 /* Apalis USBH_OC# */
561 pex-l0-clkreq-n-pdd2 {
562 nvidia,pins = "pex_l0_clkreq_n_pdd2";
563 nvidia,function = "rsvd3";
564 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
565 nvidia,tristate = <TEGRA_PIN_DISABLE>;
566 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
567 };
568
334 /* Apalis USBO1_EN */ 569 /* Apalis USBO1_EN */
335 gen2_i2c_scl_pt5 { 570 gen2-i2c-scl-pt5 {
336 nvidia,pins = "gen2_i2c_scl_pt5"; 571 nvidia,pins = "gen2_i2c_scl_pt5";
337 nvidia,function = "rsvd4"; 572 nvidia,function = "rsvd4";
338 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 573 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
@@ -341,7 +576,7 @@
341 }; 576 };
342 577
343 /* Apalis USBO1_OC# */ 578 /* Apalis USBO1_OC# */
344 gen2_i2c_sda_pt6 { 579 gen2-i2c-sda-pt6 {
345 nvidia,pins = "gen2_i2c_sda_pt6"; 580 nvidia,pins = "gen2_i2c_sda_pt6";
346 nvidia,function = "rsvd4"; 581 nvidia,function = "rsvd4";
347 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 582 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
@@ -350,6 +585,16 @@
350 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 585 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
351 }; 586 };
352 587
588 /* Apalis VGA1 not supported and therefore disabled */
589 crt-hsync-pv6 {
590 nvidia,pins = "crt_hsync_pv6",
591 "crt_vsync_pv7";
592 nvidia,function = "rsvd2";
593 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
594 nvidia,tristate = <TEGRA_PIN_ENABLE>;
595 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
596 };
597
353 /* Apalis WAKE1_MICO */ 598 /* Apalis WAKE1_MICO */
354 pv1 { 599 pv1 {
355 nvidia,pins = "pv1"; 600 nvidia,pins = "pv1";
@@ -360,14 +605,16 @@
360 }; 605 };
361 606
362 /* eMMC (On-module) */ 607 /* eMMC (On-module) */
363 sdmmc4_clk_pcc4 { 608 sdmmc4-clk-pcc4 {
364 nvidia,pins = "sdmmc4_clk_pcc4", 609 nvidia,pins = "sdmmc4_clk_pcc4",
610 "sdmmc4_cmd_pt7",
365 "sdmmc4_rst_n_pcc3"; 611 "sdmmc4_rst_n_pcc3";
366 nvidia,function = "sdmmc4"; 612 nvidia,function = "sdmmc4";
367 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 613 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
368 nvidia,tristate = <TEGRA_PIN_DISABLE>; 614 nvidia,tristate = <TEGRA_PIN_DISABLE>;
615 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
369 }; 616 };
370 sdmmc4_dat0_paa0 { 617 sdmmc4-dat0-paa0 {
371 nvidia,pins = "sdmmc4_dat0_paa0", 618 nvidia,pins = "sdmmc4_dat0_paa0",
372 "sdmmc4_dat1_paa1", 619 "sdmmc4_dat1_paa1",
373 "sdmmc4_dat2_paa2", 620 "sdmmc4_dat2_paa2",
@@ -379,6 +626,34 @@
379 nvidia,function = "sdmmc4"; 626 nvidia,function = "sdmmc4";
380 nvidia,pull = <TEGRA_PIN_PULL_UP>; 627 nvidia,pull = <TEGRA_PIN_PULL_UP>;
381 nvidia,tristate = <TEGRA_PIN_DISABLE>; 628 nvidia,tristate = <TEGRA_PIN_DISABLE>;
629 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
630 };
631
632 /* LAN i210/i211 DEV_OFF_N, PE_RST_N (On-module) */
633 pex-l2-prsnt-n-pdd7 {
634 nvidia,pins = "pex_l2_prsnt_n_pdd7",
635 "pex_l2_rst_n_pcc6";
636 nvidia,function = "pcie";
637 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
638 nvidia,tristate = <TEGRA_PIN_DISABLE>;
639 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
640 };
641 /* LAN i210/i211 PE_WAKE_N, SDP3 (On-module) */
642 pex-wake-n-pdd3 {
643 nvidia,pins = "pex_wake_n_pdd3",
644 "pex_l2_clkreq_n_pcc7";
645 nvidia,function = "pcie";
646 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
647 nvidia,tristate = <TEGRA_PIN_DISABLE>;
648 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
649 };
650 /* LAN i210/i211 SMB_ALERT_N (On-module) */
651 sys-clk-req-pz5 {
652 nvidia,pins = "sys_clk_req_pz5";
653 nvidia,function = "rsvd2";
654 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
655 nvidia,tristate = <TEGRA_PIN_DISABLE>;
656 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
382 }; 657 };
383 658
384 /* LVDS Transceiver Configuration */ 659 /* LVDS Transceiver Configuration */
@@ -391,7 +666,6 @@
391 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 666 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
392 nvidia,tristate = <TEGRA_PIN_DISABLE>; 667 nvidia,tristate = <TEGRA_PIN_DISABLE>;
393 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 668 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
394 nvidia,lock = <TEGRA_PIN_DISABLE>;
395 }; 669 };
396 pbb3 { 670 pbb3 {
397 nvidia,pins = "pbb3", 671 nvidia,pins = "pbb3",
@@ -402,18 +676,121 @@
402 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 676 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
403 nvidia,tristate = <TEGRA_PIN_DISABLE>; 677 nvidia,tristate = <TEGRA_PIN_DISABLE>;
404 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 678 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
405 nvidia,lock = <TEGRA_PIN_DISABLE>; 679 };
680
681 /* Not connected and therefore disabled */
682 clk-32k-out-pa0 {
683 nvidia,pins = "clk3_out_pee0",
684 "clk3_req_pee1",
685 "clk_32k_out_pa0",
686 "dap4_din_pp5",
687 "dap4_dout_pp6",
688 "dap4_fs_pp4",
689 "dap4_sclk_pp7";
690 nvidia,function = "rsvd2";
691 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
692 nvidia,tristate = <TEGRA_PIN_ENABLE>;
693 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
694 };
695 dap2-fs-pa2 {
696 nvidia,pins = "dap2_fs_pa2",
697 "dap2_sclk_pa3",
698 "dap2_din_pa4",
699 "dap2_dout_pa5",
700 "lcd_dc0_pn6",
701 "lcd_m1_pw1",
702 "lcd_pwr1_pc1",
703 "pex_l1_clkreq_n_pdd6",
704 "pex_l1_prsnt_n_pdd4",
705 "pex_l1_rst_n_pdd5";
706 nvidia,function = "rsvd3";
707 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
708 nvidia,tristate = <TEGRA_PIN_ENABLE>;
709 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
710 };
711 gmi-ad0-pg0 {
712 nvidia,pins = "gmi_ad0_pg0",
713 "gmi_ad2_pg2",
714 "gmi_ad3_pg3",
715 "gmi_ad4_pg4",
716 "gmi_ad5_pg5",
717 "gmi_ad6_pg6",
718 "gmi_ad7_pg7",
719 "gmi_ad8_ph0",
720 "gmi_ad9_ph1",
721 "gmi_ad10_ph2",
722 "gmi_ad11_ph3",
723 "gmi_ad12_ph4",
724 "gmi_ad13_ph5",
725 "gmi_ad14_ph6",
726 "gmi_ad15_ph7",
727 "gmi_adv_n_pk0",
728 "gmi_clk_pk1",
729 "gmi_cs4_n_pk2",
730 "gmi_cs2_n_pk3",
731 "gmi_dqs_pi2",
732 "gmi_iordy_pi5",
733 "gmi_oe_n_pi1",
734 "gmi_wait_pi7",
735 "gmi_wr_n_pi0",
736 "lcd_cs1_n_pw0",
737 "pu0",
738 "pu1",
739 "pu2";
740 nvidia,function = "rsvd4";
741 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
742 nvidia,tristate = <TEGRA_PIN_ENABLE>;
743 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
744 };
745 gmi-cs0-n-pj0 {
746 nvidia,pins = "gmi_cs0_n_pj0",
747 "gmi_cs1_n_pj2",
748 "gmi_cs3_n_pk4";
749 nvidia,function = "rsvd1";
750 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
751 nvidia,tristate = <TEGRA_PIN_ENABLE>;
752 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
753 };
754 gmi-cs6-n-pi3 {
755 nvidia,pins = "gmi_cs6_n_pi3";
756 nvidia,function = "sata";
757 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
758 nvidia,tristate = <TEGRA_PIN_ENABLE>;
759 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
760 };
761 gmi-cs7-n-pi6 {
762 nvidia,pins = "gmi_cs7_n_pi6";
763 nvidia,function = "gmi_alt";
764 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
765 nvidia,tristate = <TEGRA_PIN_ENABLE>;
766 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
767 };
768 lcd-pwr0-pb2 {
769 nvidia,pins = "lcd_pwr0_pb2",
770 "lcd_pwr2_pc6",
771 "lcd_wr_n_pz3";
772 nvidia,function = "hdcp";
773 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
774 nvidia,tristate = <TEGRA_PIN_ENABLE>;
775 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
776 };
777 uart2-cts-n-pj5 {
778 nvidia,pins = "uart2_cts_n_pj5",
779 "uart2_rts_n_pj6";
780 nvidia,function = "gmi";
781 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
782 nvidia,tristate = <TEGRA_PIN_ENABLE>;
783 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
406 }; 784 };
407 785
408 /* Power I2C (On-module) */ 786 /* Power I2C (On-module) */
409 pwr_i2c_scl_pz6 { 787 pwr-i2c-scl-pz6 {
410 nvidia,pins = "pwr_i2c_scl_pz6", 788 nvidia,pins = "pwr_i2c_scl_pz6",
411 "pwr_i2c_sda_pz7"; 789 "pwr_i2c_sda_pz7";
412 nvidia,function = "i2cpwr"; 790 nvidia,function = "i2cpwr";
413 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 791 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
414 nvidia,tristate = <TEGRA_PIN_DISABLE>; 792 nvidia,tristate = <TEGRA_PIN_DISABLE>;
415 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 793 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
416 nvidia,lock = <TEGRA_PIN_DISABLE>;
417 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 794 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
418 }; 795 };
419 796
@@ -422,15 +799,15 @@
422 * temperature sensor therefore requires disabling for 799 * temperature sensor therefore requires disabling for
423 * now 800 * now
424 */ 801 */
425 lcd_dc1_pd2 { 802 lcd-dc1-pd2 {
426 nvidia,pins = "lcd_dc1_pd2"; 803 nvidia,pins = "lcd_dc1_pd2";
427 nvidia,function = "rsvd3"; 804 nvidia,function = "rsvd3";
428 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 805 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
429 nvidia,tristate = <TEGRA_PIN_DISABLE>; 806 nvidia,tristate = <TEGRA_PIN_ENABLE>;
430 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 807 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
431 }; 808 };
432 809
433 /* TOUCH_PEN_INT# */ 810 /* TOUCH_PEN_INT# (On-module) */
434 pv0 { 811 pv0 {
435 nvidia,pins = "pv0"; 812 nvidia,pins = "pv0";
436 nvidia,function = "rsvd1"; 813 nvidia,function = "rsvd1";
@@ -441,7 +818,19 @@
441 }; 818 };
442 }; 819 };
443 820
444 hdmiddc: i2c@7000c700 { 821 serial@70006040 {
822 compatible = "nvidia,tegra30-hsuart";
823 };
824
825 serial@70006200 {
826 compatible = "nvidia,tegra30-hsuart";
827 };
828
829 serial@70006300 {
830 compatible = "nvidia,tegra30-hsuart";
831 };
832
833 hdmi_ddc: i2c@7000c700 {
445 clock-frequency = <10000>; 834 clock-frequency = <10000>;
446 }; 835 };
447 836
@@ -457,12 +846,13 @@
457 sgtl5000: codec@a { 846 sgtl5000: codec@a {
458 compatible = "fsl,sgtl5000"; 847 compatible = "fsl,sgtl5000";
459 reg = <0x0a>; 848 reg = <0x0a>;
460 VDDA-supply = <&sys_3v3_reg>; 849 VDDA-supply = <&reg_module_3v3_audio>;
461 VDDIO-supply = <&sys_3v3_reg>; 850 VDDD-supply = <&reg_1v8_vio>;
851 VDDIO-supply = <&reg_module_3v3>;
462 clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; 852 clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
463 }; 853 };
464 854
465 pmic: tps65911@2d { 855 pmic: pmic@2d {
466 compatible = "ti,tps65911"; 856 compatible = "ti,tps65911";
467 reg = <0x2d>; 857 reg = <0x2d>;
468 858
@@ -475,43 +865,38 @@
475 #gpio-cells = <2>; 865 #gpio-cells = <2>;
476 gpio-controller; 866 gpio-controller;
477 867
478 vcc1-supply = <&sys_3v3_reg>; 868 vcc1-supply = <&reg_module_3v3>;
479 vcc2-supply = <&sys_3v3_reg>; 869 vcc2-supply = <&reg_module_3v3>;
480 vcc3-supply = <&vio_reg>; 870 vcc3-supply = <&reg_1v8_vio>;
481 vcc4-supply = <&sys_3v3_reg>; 871 vcc4-supply = <&reg_module_3v3>;
482 vcc5-supply = <&sys_3v3_reg>; 872 vcc5-supply = <&reg_module_3v3>;
483 vcc6-supply = <&vio_reg>; 873 vcc6-supply = <&reg_1v8_vio>;
484 vcc7-supply = <&charge_pump_5v0_reg>; 874 vcc7-supply = <&reg_5v0_charge_pump>;
485 vccio-supply = <&sys_3v3_reg>; 875 vccio-supply = <&reg_module_3v3>;
486 876
487 regulators { 877 regulators {
488 /* SW1: +V1.35_VDDIO_DDR */
489 vdd1_reg: vdd1 { 878 vdd1_reg: vdd1 {
490 regulator-name = "vddio_ddr_1v35"; 879 regulator-name = "+V1.35_VDDIO_DDR";
491 regulator-min-microvolt = <1350000>; 880 regulator-min-microvolt = <1350000>;
492 regulator-max-microvolt = <1350000>; 881 regulator-max-microvolt = <1350000>;
493 regulator-always-on; 882 regulator-always-on;
494 }; 883 };
495 884
496 /* SW2: +V1.05 */
497 vdd2_reg: vdd2 { 885 vdd2_reg: vdd2 {
498 regulator-name = 886 regulator-name = "+V1.05";
499 "vdd_pexa,vdd_pexb,vdd_sata";
500 regulator-min-microvolt = <1050000>; 887 regulator-min-microvolt = <1050000>;
501 regulator-max-microvolt = <1050000>; 888 regulator-max-microvolt = <1050000>;
502 }; 889 };
503 890
504 /* SW CTRL: +V1.0_VDD_CPU */
505 vddctrl_reg: vddctrl { 891 vddctrl_reg: vddctrl {
506 regulator-name = "vdd_cpu,vdd_sys"; 892 regulator-name = "+V1.0_VDD_CPU";
507 regulator-min-microvolt = <1150000>; 893 regulator-min-microvolt = <1150000>;
508 regulator-max-microvolt = <1150000>; 894 regulator-max-microvolt = <1150000>;
509 regulator-always-on; 895 regulator-always-on;
510 }; 896 };
511 897
512 /* SWIO: +V1.8 */ 898 reg_1v8_vio: vio {
513 vio_reg: vio { 899 regulator-name = "+V1.8";
514 regulator-name = "vdd_1v8_gen";
515 regulator-min-microvolt = <1800000>; 900 regulator-min-microvolt = <1800000>;
516 regulator-max-microvolt = <1800000>; 901 regulator-max-microvolt = <1800000>;
517 regulator-always-on; 902 regulator-always-on;
@@ -521,27 +906,24 @@
521 906
522 /* 907 /*
523 * EN_+V3.3 switching via FET: 908 * EN_+V3.3 switching via FET:
524 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN 909 * +V3.3_AUDIO_AVDD_S, +V3.3
525 * see also v3_3 fixed supply 910 * see also +V3.3 fixed supply
526 */ 911 */
527 ldo2_reg: ldo2 { 912 ldo2_reg: ldo2 {
528 regulator-name = "en_3v3"; 913 regulator-name = "EN_+V3.3";
529 regulator-min-microvolt = <3300000>; 914 regulator-min-microvolt = <3300000>;
530 regulator-max-microvolt = <3300000>; 915 regulator-max-microvolt = <3300000>;
531 regulator-always-on; 916 regulator-always-on;
532 }; 917 };
533 918
534 /* +V1.2_CSI */
535 ldo3_reg: ldo3 { 919 ldo3_reg: ldo3 {
536 regulator-name = 920 regulator-name = "+V1.2_CSI";
537 "avdd_dsi_csi,pwrdet_mipi";
538 regulator-min-microvolt = <1200000>; 921 regulator-min-microvolt = <1200000>;
539 regulator-max-microvolt = <1200000>; 922 regulator-max-microvolt = <1200000>;
540 }; 923 };
541 924
542 /* +V1.2_VDD_RTC */
543 ldo4_reg: ldo4 { 925 ldo4_reg: ldo4 {
544 regulator-name = "vdd_rtc"; 926 regulator-name = "+V1.2_VDD_RTC";
545 regulator-min-microvolt = <1200000>; 927 regulator-min-microvolt = <1200000>;
546 regulator-max-microvolt = <1200000>; 928 regulator-max-microvolt = <1200000>;
547 regulator-always-on; 929 regulator-always-on;
@@ -549,10 +931,10 @@
549 931
550 /* 932 /*
551 * +V2.8_AVDD_VDAC: 933 * +V2.8_AVDD_VDAC:
552 * only required for analog RGB 934 * only required for (unsupported) analog RGB
553 */ 935 */
554 ldo5_reg: ldo5 { 936 ldo5_reg: ldo5 {
555 regulator-name = "avdd_vdac"; 937 regulator-name = "+V2.8_AVDD_VDAC";
556 regulator-min-microvolt = <2800000>; 938 regulator-min-microvolt = <2800000>;
557 regulator-max-microvolt = <2800000>; 939 regulator-max-microvolt = <2800000>;
558 regulator-always-on; 940 regulator-always-on;
@@ -564,22 +946,20 @@
564 * granularity 946 * granularity
565 */ 947 */
566 ldo6_reg: ldo6 { 948 ldo6_reg: ldo6 {
567 regulator-name = "avdd_plle"; 949 regulator-name = "+V1.05_AVDD_PLLE";
568 regulator-min-microvolt = <1100000>; 950 regulator-min-microvolt = <1100000>;
569 regulator-max-microvolt = <1100000>; 951 regulator-max-microvolt = <1100000>;
570 }; 952 };
571 953
572 /* +V1.2_AVDD_PLL */
573 ldo7_reg: ldo7 { 954 ldo7_reg: ldo7 {
574 regulator-name = "avdd_pll"; 955 regulator-name = "+V1.2_AVDD_PLL";
575 regulator-min-microvolt = <1200000>; 956 regulator-min-microvolt = <1200000>;
576 regulator-max-microvolt = <1200000>; 957 regulator-max-microvolt = <1200000>;
577 regulator-always-on; 958 regulator-always-on;
578 }; 959 };
579 960
580 /* +V1.0_VDD_DDR_HS */
581 ldo8_reg: ldo8 { 961 ldo8_reg: ldo8 {
582 regulator-name = "vdd_ddr_hs"; 962 regulator-name = "+V1.0_VDD_DDR_HS";
583 regulator-min-microvolt = <1000000>; 963 regulator-min-microvolt = <1000000>;
584 regulator-max-microvolt = <1000000>; 964 regulator-max-microvolt = <1000000>;
585 regulator-always-on; 965 regulator-always-on;
@@ -588,11 +968,10 @@
588 }; 968 };
589 969
590 /* STMPE811 touch screen controller */ 970 /* STMPE811 touch screen controller */
591 stmpe811@41 { 971 touchscreen@41 {
592 compatible = "st,stmpe811"; 972 compatible = "st,stmpe811";
593 reg = <0x41>; 973 reg = <0x41>;
594 interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>; 974 irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
595 interrupt-parent = <&gpio>;
596 interrupt-controller; 975 interrupt-controller;
597 id = <0>; 976 id = <0>;
598 blocks = <0x5>; 977 blocks = <0x5>;
@@ -626,7 +1005,7 @@
626 1005
627 /* 1006 /*
628 * LM95245 temperature sensor 1007 * LM95245 temperature sensor
629 * Note: OVERT_N directly connected to PMIC PWRDN 1008 * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
630 */ 1009 */
631 temp-sensor@4c { 1010 temp-sensor@4c {
632 compatible = "national,lm95245"; 1011 compatible = "national,lm95245";
@@ -634,7 +1013,7 @@
634 }; 1013 };
635 1014
636 /* SW: +V1.2_VDD_CORE */ 1015 /* SW: +V1.2_VDD_CORE */
637 tps62362@60 { 1016 regulator@60 {
638 compatible = "ti,tps62362"; 1017 compatible = "ti,tps62362";
639 reg = <0x60>; 1018 reg = <0x60>;
640 1019
@@ -659,7 +1038,7 @@
659 reg = <1>; 1038 reg = <1>;
660 clocks = <&clk16m>; 1039 clocks = <&clk16m>;
661 interrupt-parent = <&gpio>; 1040 interrupt-parent = <&gpio>;
662 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_RISING>; 1041 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
663 spi-max-frequency = <10000000>; 1042 spi-max-frequency = <10000000>;
664 }; 1043 };
665 }; 1044 };
@@ -674,7 +1053,7 @@
674 reg = <0>; 1053 reg = <0>;
675 clocks = <&clk16m>; 1054 clocks = <&clk16m>;
676 interrupt-parent = <&gpio>; 1055 interrupt-parent = <&gpio>;
677 interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_RISING>; 1056 interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_FALLING>;
678 spi-max-frequency = <10000000>; 1057 spi-max-frequency = <10000000>;
679 }; 1058 };
680 }; 1059 };
@@ -688,6 +1067,18 @@
688 nvidia,core-pwr-off-time = <0>; 1067 nvidia,core-pwr-off-time = <0>;
689 nvidia,core-power-req-active-high; 1068 nvidia,core-power-req-active-high;
690 nvidia,sys-clock-req-active-high; 1069 nvidia,sys-clock-req-active-high;
1070
1071 /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
1072 i2c-thermtrip {
1073 nvidia,i2c-controller-id = <4>;
1074 nvidia,bus-addr = <0x2d>;
1075 nvidia,reg-addr = <0x3f>;
1076 nvidia,reg-data = <0x1>;
1077 };
1078 };
1079
1080 hda@70030000 {
1081 status = "okay";
691 }; 1082 };
692 1083
693 ahub@70080000 { 1084 ahub@70080000 {
@@ -701,73 +1092,65 @@
701 status = "okay"; 1092 status = "okay";
702 bus-width = <8>; 1093 bus-width = <8>;
703 non-removable; 1094 non-removable;
1095 vmmc-supply = <&reg_module_3v3>; /* VCC */
1096 vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
1097 mmc-ddr-1_8v;
704 }; 1098 };
705 1099
706 clocks { 1100 clk32k_in: xtal1 {
707 compatible = "simple-bus"; 1101 compatible = "fixed-clock";
708 #address-cells = <1>; 1102 #clock-cells = <0>;
709 #size-cells = <0>; 1103 clock-frequency = <32768>;
1104 };
710 1105
711 clk32k_in: clk@0 { 1106 clk16m: osc4 {
712 compatible = "fixed-clock"; 1107 compatible = "fixed-clock";
713 reg = <0>; 1108 #clock-cells = <0>;
714 #clock-cells = <0>; 1109 clock-frequency = <16000000>;
715 clock-frequency = <32768>; 1110 };
716 };
717 1111
718 clk16m: clk@1 { 1112 reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
719 compatible = "fixed-clock"; 1113 compatible = "regulator-fixed";
720 reg = <1>; 1114 regulator-name = "+V1.8_AVDD_HDMI_PLL";
721 #clock-cells = <0>; 1115 regulator-min-microvolt = <1800000>;
722 clock-frequency = <16000000>; 1116 regulator-max-microvolt = <1800000>;
723 clock-output-names = "clk16m"; 1117 enable-active-high;
724 }; 1118 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
1119 vin-supply = <&reg_1v8_vio>;
725 }; 1120 };
726 1121
727 regulators { 1122 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
728 compatible = "simple-bus"; 1123 compatible = "regulator-fixed";
729 #address-cells = <1>; 1124 regulator-name = "+V3.3_AVDD_HDMI";
730 #size-cells = <0>; 1125 regulator-min-microvolt = <3300000>;
731 1126 regulator-max-microvolt = <3300000>;
732 avdd_hdmi_pll_1v8_reg: regulator@100 { 1127 enable-active-high;
733 compatible = "regulator-fixed"; 1128 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
734 reg = <100>; 1129 vin-supply = <&reg_module_3v3>;
735 regulator-name = "+V1.8_AVDD_HDMI_PLL"; 1130 };
736 regulator-min-microvolt = <1800000>;
737 regulator-max-microvolt = <1800000>;
738 enable-active-high;
739 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
740 vin-supply = <&vio_reg>;
741 };
742 1131
743 sys_3v3_reg: regulator@101 { 1132 reg_5v0_charge_pump: regulator-5v0-charge-pump {
744 compatible = "regulator-fixed"; 1133 compatible = "regulator-fixed";
745 reg = <101>; 1134 regulator-name = "+V5.0";
746 regulator-name = "3v3"; 1135 regulator-min-microvolt = <5000000>;
747 regulator-min-microvolt = <3300000>; 1136 regulator-max-microvolt = <5000000>;
748 regulator-max-microvolt = <3300000>; 1137 regulator-always-on;
749 regulator-always-on; 1138 };
750 };
751 1139
752 avdd_hdmi_3v3_reg: regulator@102 { 1140 reg_module_3v3: regulator-module-3v3 {
753 compatible = "regulator-fixed"; 1141 compatible = "regulator-fixed";
754 reg = <102>; 1142 regulator-name = "+V3.3";
755 regulator-name = "+V3.3_AVDD_HDMI"; 1143 regulator-min-microvolt = <3300000>;
756 regulator-min-microvolt = <3300000>; 1144 regulator-max-microvolt = <3300000>;
757 regulator-max-microvolt = <3300000>; 1145 regulator-always-on;
758 enable-active-high; 1146 };
759 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
760 vin-supply = <&sys_3v3_reg>;
761 };
762 1147
763 charge_pump_5v0_reg: regulator@103 { 1148 reg_module_3v3_audio: regulator-module-3v3-audio {
764 compatible = "regulator-fixed"; 1149 compatible = "regulator-fixed";
765 reg = <103>; 1150 regulator-name = "+V3.3_AUDIO_AVDD_S";
766 regulator-name = "5v0"; 1151 regulator-min-microvolt = <3300000>;
767 regulator-min-microvolt = <5000000>; 1152 regulator-max-microvolt = <3300000>;
768 regulator-max-microvolt = <5000000>; 1153 regulator-always-on;
769 regulator-always-on;
770 };
771 }; 1154 };
772 1155
773 sound { 1156 sound {
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
index 16e1f387aa6d..5965150ecdd2 100644
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -1,15 +1,17 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/; 2/dts-v1/;
3 3
4#include <dt-bindings/input/input.h>
4#include "tegra30-colibri.dtsi" 5#include "tegra30-colibri.dtsi"
5 6
6/ { 7/ {
7 model = "Toradex Colibri T30 on Colibri Evaluation Board"; 8 model = "Toradex Colibri T30 on Colibri Evaluation Board";
8 compatible = "toradex,colibri_t30-eval-v3", "toradex,colibri_t30", "nvidia,tegra30"; 9 compatible = "toradex,colibri_t30-eval-v3", "toradex,colibri_t30",
10 "nvidia,tegra30";
9 11
10 aliases { 12 aliases {
11 rtc0 = "/i2c@7000c000/rtc@68"; 13 rtc0 = "/i2c@7000c000/rtc@68";
12 rtc1 = "/i2c@7000d000/tps65911@2d"; 14 rtc1 = "/i2c@7000d000/pmic@2d";
13 rtc2 = "/rtc@7000e000"; 15 rtc2 = "/rtc@7000e000";
14 serial0 = &uarta; 16 serial0 = &uarta;
15 serial1 = &uartb; 17 serial1 = &uartb;
@@ -27,22 +29,25 @@
27 nvidia,panel = <&panel>; 29 nvidia,panel = <&panel>;
28 }; 30 };
29 }; 31 };
32
30 hdmi@54280000 { 33 hdmi@54280000 {
31 status = "okay"; 34 status = "okay";
35 hdmi-supply = <&reg_5v0>;
32 }; 36 };
33 }; 37 };
34 38
39 /* Colibri UART-A */
35 serial@70006000 { 40 serial@70006000 {
36 status = "okay"; 41 status = "okay";
37 }; 42 };
38 43
44 /* Colibri UART-C */
39 serial@70006040 { 45 serial@70006040 {
40 compatible = "nvidia,tegra30-hsuart";
41 status = "okay"; 46 status = "okay";
42 }; 47 };
43 48
49 /* Colibri UART-B */
44 serial@70006300 { 50 serial@70006300 {
45 compatible = "nvidia,tegra30-hsuart";
46 status = "okay"; 51 status = "okay";
47 }; 52 };
48 53
@@ -65,8 +70,12 @@
65 }; 70 };
66 }; 71 };
67 72
73 /* GEN2_I2C: unused */
74
75 /* CAM_I2C (I2C3): unused */
76
68 /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */ 77 /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
69 hdmiddc: i2c@7000c700 { 78 i2c@7000c700 {
70 status = "okay"; 79 status = "okay";
71 }; 80 };
72 81
@@ -74,18 +83,17 @@
74 spi@7000d400 { 83 spi@7000d400 {
75 status = "okay"; 84 status = "okay";
76 spi-max-frequency = <25000000>; 85 spi-max-frequency = <25000000>;
77 can0: can@0 { 86
87 can@0 {
78 compatible = "microchip,mcp2515"; 88 compatible = "microchip,mcp2515";
79 reg = <0>; 89 reg = <0>;
80 clocks = <&clk16m>; 90 clocks = <&clk16m>;
81 interrupt-parent = <&gpio>; 91 interrupt-parent = <&gpio>;
82 interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_RISING>; 92 /* CAN_INT */
93 interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_FALLING>;
83 spi-max-frequency = <10000000>; 94 spi-max-frequency = <10000000>;
84 }; 95 vdd-supply = <&reg_3v3>;
85 spidev0: spi@1 { 96 xceiver-supply = <&reg_5v0>;
86 compatible = "spidev";
87 reg = <1>;
88 spi-max-frequency = <25000000>;
89 }; 97 };
90 }; 98 };
91 99
@@ -93,19 +101,19 @@
93 sdhci@78000200 { 101 sdhci@78000200 {
94 status = "okay"; 102 status = "okay";
95 bus-width = <4>; 103 bus-width = <4>;
96 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; 104 cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
97 no-1-8-v; 105 no-1-8-v;
98 }; 106 };
99 107
100 /* EHCI instance 0: USB1_DP/N -> USBC_P/N */ 108 /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
101 usb@7d000000 { 109 usb@7d000000 {
102 status = "okay"; 110 status = "okay";
111 dr_mode = "otg";
103 }; 112 };
104 113
105 usb-phy@7d000000 { 114 usb-phy@7d000000 {
106 status = "okay"; 115 status = "okay";
107 dr_mode = "otg"; 116 vbus-supply = <&reg_usbc_vbus>;
108 vbus-supply = <&usbc_vbus_reg>;
109 }; 117 };
110 118
111 /* EHCI instance 2: USB3_DP/N -> USBH_P/N */ 119 /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
@@ -115,28 +123,23 @@
115 123
116 usb-phy@7d008000 { 124 usb-phy@7d008000 {
117 status = "okay"; 125 status = "okay";
118 vbus-supply = <&usbh_vbus_reg>; 126 vbus-supply = <&reg_usbh_vbus>;
119 }; 127 };
120 128
121 backlight: backlight { 129 backlight: backlight {
122 compatible = "pwm-backlight"; 130 compatible = "pwm-backlight";
123
124 /* PWM<A> */
125 pwms = <&pwm 0 5000000>;
126 brightness-levels = <255 128 64 32 16 8 4 0>; 131 brightness-levels = <255 128 64 32 16 8 4 0>;
127 default-brightness-level = <6>; 132 default-brightness-level = <6>;
128 /* BL_ON */ 133 /* BL_ON */
129 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; 134 enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
135 power-supply = <&reg_3v3>;
136 pwms = <&pwm 0 5000000>; /* PWM<A> */
130 }; 137 };
131 138
132 clocks { 139 clk16m: osc3 {
133 clk16m: clk@1 { 140 compatible = "fixed-clock";
134 compatible = "fixed-clock"; 141 #clock-cells = <0>;
135 reg = <1>; 142 clock-frequency = <16000000>;
136 #clock-cells = <0>;
137 clock-frequency = <16000000>;
138 clock-output-names = "clk16m";
139 };
140 }; 143 };
141 144
142 gpio-keys { 145 gpio-keys {
@@ -157,58 +160,39 @@
157 * edt,et070080dh6: EDT 7.0" LCD TFT 160 * edt,et070080dh6: EDT 7.0" LCD TFT
158 */ 161 */
159 compatible = "edt,et057090dhu", "simple-panel"; 162 compatible = "edt,et057090dhu", "simple-panel";
160
161 backlight = <&backlight>; 163 backlight = <&backlight>;
164 power-supply = <&reg_3v3>;
162 }; 165 };
163 166
164 pwmleds { 167 reg_3v3: regulator-3v3 {
165 compatible = "pwm-leds"; 168 compatible = "regulator-fixed";
166 169 regulator-name = "3.3V_SW";
167 pwmb { 170 regulator-min-microvolt = <3300000>;
168 label = "PWM<B>"; 171 regulator-max-microvolt = <3300000>;
169 pwms = <&pwm 1 19600>;
170 max-brightness = <255>;
171 };
172 pwmc {
173 label = "PWM<C>";
174 pwms = <&pwm 2 19600>;
175 max-brightness = <255>;
176 };
177 pwmd {
178 label = "PWM<D>";
179 pwms = <&pwm 3 19600>;
180 max-brightness = <255>;
181 };
182 }; 172 };
183 173
184 regulators { 174 reg_5v0: regulator-5v0 {
185 sys_5v0_reg: regulator@1 { 175 compatible = "regulator-fixed";
186 compatible = "regulator-fixed"; 176 regulator-name = "5V_SW";
187 reg = <1>; 177 regulator-min-microvolt = <5000000>;
188 regulator-name = "5v0"; 178 regulator-max-microvolt = <5000000>;
189 regulator-min-microvolt = <5000000>; 179 };
190 regulator-max-microvolt = <5000000>;
191 regulator-always-on;
192 };
193 180
194 usbc_vbus_reg: regulator@2 { 181 reg_usbc_vbus: regulator-usbc-vbus {
195 compatible = "regulator-fixed"; 182 compatible = "regulator-fixed";
196 reg = <2>; 183 regulator-name = "VCC_USB5";
197 regulator-name = "usbc_vbus"; 184 regulator-min-microvolt = <5000000>;
198 regulator-min-microvolt = <5000000>; 185 regulator-max-microvolt = <5000000>;
199 regulator-max-microvolt = <5000000>; 186 vin-supply = <&reg_5v0>;
200 vin-supply = <&sys_5v0_reg>; 187 };
201 };
202 188
203 /* USBH_PEN */ 189 /* USBH_PEN resp. USB_P_EN */
204 usbh_vbus_reg: regulator@3 { 190 reg_usbh_vbus: regulator-usbh-vbus {
205 compatible = "regulator-fixed"; 191 compatible = "regulator-fixed";
206 reg = <3>; 192 regulator-name = "VCC_USB[1-4]";
207 regulator-name = "usbh_vbus"; 193 regulator-min-microvolt = <5000000>;
208 regulator-min-microvolt = <5000000>; 194 regulator-max-microvolt = <5000000>;
209 regulator-max-microvolt = <5000000>; 195 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
210 gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; 196 vin-supply = <&reg_5v0>;
211 vin-supply = <&sys_5v0_reg>;
212 };
213 }; 197 };
214}; 198};
diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi
index 526ed71cf7a3..35af03ca9e90 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -1,27 +1,22 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include <dt-bindings/input/input.h>
3#include "tegra30.dtsi" 2#include "tegra30.dtsi"
4 3
5/* 4/*
6 * Toradex Colibri T30 Module Device Tree 5 * Toradex Colibri T30 Module Device Tree
7 * Compatible for Revisions V1.1B, V1.1C, V1.1D, V1.1E; IT: V1.1A 6 * Compatible for Revisions V1.1B, V1.1C, V1.1D, V1.1E, V1.1F; IT: V1.1A, V1.1B
8 */ 7 */
9/ { 8/ {
10 model = "Toradex Colibri T30";
11 compatible = "toradex,colibri_t30", "nvidia,tegra30";
12
13 memory@80000000 { 9 memory@80000000 {
14 reg = <0x80000000 0x40000000>; 10 reg = <0x80000000 0x40000000>;
15 }; 11 };
16 12
17 host1x@50000000 { 13 host1x@50000000 {
18 hdmi@54280000 { 14 hdmi@54280000 {
19 vdd-supply = <&avdd_hdmi_3v3_reg>; 15 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
20 pll-supply = <&avdd_hdmi_pll_1v8_reg>;
21
22 nvidia,hpd-gpio = 16 nvidia,hpd-gpio =
23 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; 17 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
24 nvidia,ddc-i2c-bus = <&hdmiddc>; 18 pll-supply = <&reg_1v8_avdd_hdmi_pll>;
19 vdd-supply = <&reg_3v3_avdd_hdmi>;
25 }; 20 };
26 }; 21 };
27 22
@@ -31,23 +26,173 @@
31 26
32 state_default: pinmux { 27 state_default: pinmux {
33 /* Analogue Audio (On-module) */ 28 /* Analogue Audio (On-module) */
34 clk1_out_pw4 { 29 clk1-out-pw4 {
35 nvidia,pins = "clk1_out_pw4"; 30 nvidia,pins = "clk1_out_pw4";
36 nvidia,function = "extperiph1"; 31 nvidia,function = "extperiph1";
37 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 32 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
38 nvidia,tristate = <TEGRA_PIN_DISABLE>; 33 nvidia,tristate = <TEGRA_PIN_DISABLE>;
39 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 34 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
40 }; 35 };
41 dap3_fs_pp0 { 36 dap3-fs-pp0 {
42 nvidia,pins = "dap3_fs_pp0", 37 nvidia,pins = "dap3_fs_pp0",
43 "dap3_sclk_pp3", 38 "dap3_sclk_pp3",
44 "dap3_din_pp1", 39 "dap3_din_pp1",
45 "dap3_dout_pp2"; 40 "dap3_dout_pp2";
46 nvidia,function = "i2s2"; 41 nvidia,function = "i2s2";
47 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 42 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
48 nvidia,tristate = <TEGRA_PIN_DISABLE>; 43 nvidia,tristate = <TEGRA_PIN_DISABLE>;
49 }; 44 };
50 45
46 /* Colibri Address/Data Bus (GMI) */
47 gmi-ad0-pg0 {
48 nvidia,pins = "gmi_ad0_pg0",
49 "gmi_ad2_pg2",
50 "gmi_ad3_pg3",
51 "gmi_ad4_pg4",
52 "gmi_ad5_pg5",
53 "gmi_ad6_pg6",
54 "gmi_ad7_pg7",
55 "gmi_ad8_ph0",
56 "gmi_ad9_ph1",
57 "gmi_ad10_ph2",
58 "gmi_ad11_ph3",
59 "gmi_ad12_ph4",
60 "gmi_ad13_ph5",
61 "gmi_ad14_ph6",
62 "gmi_ad15_ph7",
63 "gmi_adv_n_pk0",
64 "gmi_clk_pk1",
65 "gmi_cs4_n_pk2",
66 "gmi_cs2_n_pk3",
67 "gmi_iordy_pi5",
68 "gmi_oe_n_pi1",
69 "gmi_wait_pi7",
70 "gmi_wr_n_pi0",
71 "dap1_fs_pn0",
72 "dap1_din_pn1",
73 "dap1_dout_pn2",
74 "dap1_sclk_pn3",
75 "dap2_fs_pa2",
76 "dap2_sclk_pa3",
77 "dap2_din_pa4",
78 "dap2_dout_pa5",
79 "spi1_sck_px5",
80 "spi1_mosi_px4",
81 "spi1_cs0_n_px6",
82 "spi2_cs0_n_px3",
83 "spi2_miso_px1",
84 "spi2_mosi_px0",
85 "spi2_sck_px2",
86 "uart2_cts_n_pj5",
87 "uart2_rts_n_pj6";
88 nvidia,function = "gmi";
89 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
90 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
92 };
93 /* Further pins may be used as GPIOs */
94 dap4-din-pp5 {
95 nvidia,pins = "dap4_din_pp5",
96 "dap4_dout_pp6",
97 "dap4_fs_pp4",
98 "dap4_sclk_pp7",
99 "pbb7",
100 "sdmmc1_clk_pz0",
101 "sdmmc1_cmd_pz1",
102 "sdmmc1_dat0_py7",
103 "sdmmc1_dat1_py6",
104 "sdmmc1_dat3_py4",
105 "uart3_cts_n_pa1",
106 "uart3_txd_pw6",
107 "uart3_rxd_pw7";
108 nvidia,function = "rsvd2";
109 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
110 nvidia,tristate = <TEGRA_PIN_DISABLE>;
111 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
112 };
113 lcd-d18-pm2 {
114 nvidia,pins = "lcd_d18_pm2",
115 "lcd_d19_pm3",
116 "lcd_d20_pm4",
117 "lcd_d21_pm5",
118 "lcd_d22_pm6",
119 "lcd_d23_pm7",
120 "lcd_dc0_pn6",
121 "pex_l2_clkreq_n_pcc7";
122 nvidia,function = "rsvd3";
123 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
124 nvidia,tristate = <TEGRA_PIN_DISABLE>;
125 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
126 };
127 lcd-cs0-n-pn4 {
128 nvidia,pins = "lcd_cs0_n_pn4",
129 "lcd_sdin_pz2",
130 "pu0",
131 "pu1",
132 "pu2",
133 "pu3",
134 "pu4",
135 "pu5",
136 "pu6",
137 "spi1_miso_px7",
138 "uart3_rts_n_pc0";
139 nvidia,function = "rsvd4";
140 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
141 nvidia,tristate = <TEGRA_PIN_DISABLE>;
142 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
143 };
144 lcd-pwr0-pb2 {
145 nvidia,pins = "lcd_pwr0_pb2",
146 "lcd_sck_pz4",
147 "lcd_sdout_pn5",
148 "lcd_wr_n_pz3";
149 nvidia,function = "hdcp";
150 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
151 nvidia,tristate = <TEGRA_PIN_DISABLE>;
152 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
153 };
154 pbb4 {
155 nvidia,pins = "pbb4",
156 "pbb5",
157 "pbb6";
158 nvidia,function = "displayb";
159 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
160 nvidia,tristate = <TEGRA_PIN_DISABLE>;
161 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
162 };
163 /* Multiplexed RDnWR and therefore disabled */
164 lcd-cs1-n-pw0 {
165 nvidia,pins = "lcd_cs1_n_pw0";
166 nvidia,function = "rsvd4";
167 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
168 nvidia,tristate = <TEGRA_PIN_ENABLE>;
169 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
170 };
171 /* Multiplexed GMI_CLK and therefore disabled */
172 owr {
173 nvidia,pins = "owr";
174 nvidia,function = "rsvd3";
175 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
176 nvidia,tristate = <TEGRA_PIN_ENABLE>;
177 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
178 };
179 /* Tri-stating GMI_WR_N on nPWE SODIMM pin 99 */
180 sdmmc3-dat4-pd1 {
181 nvidia,pins = "sdmmc3_dat4_pd1";
182 nvidia,function = "sdmmc3";
183 nvidia,pull = <TEGRA_PIN_PULL_UP>;
184 nvidia,tristate = <TEGRA_PIN_ENABLE>;
185 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
186 };
187 /* Not tri-stating GMI_WR_N on RDnWR SODIMM pin 93 */
188 sdmmc3-dat5-pd0 {
189 nvidia,pins = "sdmmc3_dat5_pd0";
190 nvidia,function = "sdmmc3";
191 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
192 nvidia,tristate = <TEGRA_PIN_ENABLE>;
193 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
194 };
195
51 /* Colibri BL_ON */ 196 /* Colibri BL_ON */
52 pv2 { 197 pv2 {
53 nvidia,pins = "pv2"; 198 nvidia,pins = "pv2";
@@ -57,7 +202,7 @@
57 }; 202 };
58 203
59 /* Colibri Backlight PWM<A> */ 204 /* Colibri Backlight PWM<A> */
60 sdmmc3_dat3_pb4 { 205 sdmmc3-dat3-pb4 {
61 nvidia,pins = "sdmmc3_dat3_pb4"; 206 nvidia,pins = "sdmmc3_dat3_pb4";
62 nvidia,function = "pwm0"; 207 nvidia,function = "pwm0";
63 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 208 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -65,7 +210,7 @@
65 }; 210 };
66 211
67 /* Colibri CAN_INT */ 212 /* Colibri CAN_INT */
68 kb_row8_ps0 { 213 kb-row8-ps0 {
69 nvidia,pins = "kb_row8_ps0"; 214 nvidia,pins = "kb_row8_ps0";
70 nvidia,function = "kbc"; 215 nvidia,function = "kbc";
71 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 216 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -73,26 +218,133 @@
73 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 218 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
74 }; 219 };
75 220
221 /* Colibri DDC */
222 ddc-scl-pv4 {
223 nvidia,pins = "ddc_scl_pv4",
224 "ddc_sda_pv5";
225 nvidia,function = "i2c4";
226 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
227 nvidia,tristate = <TEGRA_PIN_DISABLE>;
228 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
229 };
230
231 /* Colibri EXT_IO* */
232 gen2-i2c-scl-pt5 {
233 nvidia,pins = "gen2_i2c_scl_pt5",
234 "gen2_i2c_sda_pt6";
235 nvidia,function = "rsvd4";
236 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
237 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
238 nvidia,tristate = <TEGRA_PIN_DISABLE>;
239 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
240 };
241 spdif-in-pk6 {
242 nvidia,pins = "spdif_in_pk6";
243 nvidia,function = "hda";
244 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
245 nvidia,tristate = <TEGRA_PIN_DISABLE>;
246 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
247 };
248
249 /* Colibri GPIO */
250 clk2-out-pw5 {
251 nvidia,pins = "clk2_out_pw5",
252 "pcc2",
253 "pv3",
254 "sdmmc1_dat2_py5";
255 nvidia,function = "rsvd2";
256 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
257 nvidia,tristate = <TEGRA_PIN_DISABLE>;
258 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
259 };
260 lcd-pwr1-pc1 {
261 nvidia,pins = "lcd_pwr1_pc1",
262 "pex_l1_clkreq_n_pdd6",
263 "pex_l1_rst_n_pdd5";
264 nvidia,function = "rsvd3";
265 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
266 nvidia,tristate = <TEGRA_PIN_DISABLE>;
267 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
268 };
269 pv1 {
270 nvidia,pins = "pv1",
271 "sdmmc3_dat0_pb7",
272 "sdmmc3_dat1_pb6";
273 nvidia,function = "rsvd1";
274 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
275 nvidia,tristate = <TEGRA_PIN_DISABLE>;
276 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
277 };
278
279 /* Colibri HOTPLUG_DETECT (HDMI) */
280 hdmi-int-pn7 {
281 nvidia,pins = "hdmi_int_pn7";
282 nvidia,function = "hdmi";
283 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
284 nvidia,tristate = <TEGRA_PIN_ENABLE>;
285 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
286 };
287
288 /* Colibri I2C */
289 gen1-i2c-scl-pc4 {
290 nvidia,pins = "gen1_i2c_scl_pc4",
291 "gen1_i2c_sda_pc5";
292 nvidia,function = "i2c1";
293 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
294 nvidia,tristate = <TEGRA_PIN_DISABLE>;
295 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
296 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
297 };
298
299 /* Colibri LCD (L_* resp. LDD<*>) */
300 lcd-d0-pe0 {
301 nvidia,pins = "lcd_d0_pe0",
302 "lcd_d1_pe1",
303 "lcd_d2_pe2",
304 "lcd_d3_pe3",
305 "lcd_d4_pe4",
306 "lcd_d5_pe5",
307 "lcd_d6_pe6",
308 "lcd_d7_pe7",
309 "lcd_d8_pf0",
310 "lcd_d9_pf1",
311 "lcd_d10_pf2",
312 "lcd_d11_pf3",
313 "lcd_d12_pf4",
314 "lcd_d13_pf5",
315 "lcd_d14_pf6",
316 "lcd_d15_pf7",
317 "lcd_d16_pm0",
318 "lcd_d17_pm1",
319 "lcd_de_pj1",
320 "lcd_hsync_pj3",
321 "lcd_pclk_pb3",
322 "lcd_vsync_pj4";
323 nvidia,function = "displaya";
324 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
325 nvidia,tristate = <TEGRA_PIN_DISABLE>;
326 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
327 };
76 /* 328 /*
77 * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE 329 * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE
78 * todays display need DE, disable LCD_M1 330 * today's display need DE, disable LCD_M1
79 */ 331 */
80 lcd_m1_pw1 { 332 lcd-m1-pw1 {
81 nvidia,pins = "lcd_m1_pw1"; 333 nvidia,pins = "lcd_m1_pw1";
82 nvidia,function = "rsvd3"; 334 nvidia,function = "rsvd3";
83 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 335 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
84 nvidia,tristate = <TEGRA_PIN_DISABLE>; 336 nvidia,tristate = <TEGRA_PIN_ENABLE>;
85 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 337 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
86 }; 338 };
87 339
88 /* Colibri MMC */ 340 /* Colibri MMC */
89 kb_row10_ps2 { 341 kb-row10-ps2 {
90 nvidia,pins = "kb_row10_ps2"; 342 nvidia,pins = "kb_row10_ps2";
91 nvidia,function = "sdmmc2"; 343 nvidia,function = "sdmmc2";
92 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 344 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
93 nvidia,tristate = <TEGRA_PIN_DISABLE>; 345 nvidia,tristate = <TEGRA_PIN_DISABLE>;
94 }; 346 };
95 kb_row11_ps3 { 347 kb-row11-ps3 {
96 nvidia,pins = "kb_row11_ps3", 348 nvidia,pins = "kb_row11_ps3",
97 "kb_row12_ps4", 349 "kb_row12_ps4",
98 "kb_row13_ps5", 350 "kb_row13_ps5",
@@ -102,9 +354,108 @@
102 nvidia,pull = <TEGRA_PIN_PULL_UP>; 354 nvidia,pull = <TEGRA_PIN_PULL_UP>;
103 nvidia,tristate = <TEGRA_PIN_DISABLE>; 355 nvidia,tristate = <TEGRA_PIN_DISABLE>;
104 }; 356 };
357 /* Colibri MMC_CD */
358 gmi-wp-n-pc7 {
359 nvidia,pins = "gmi_wp_n_pc7";
360 nvidia,function = "rsvd1";
361 nvidia,pull = <TEGRA_PIN_PULL_UP>;
362 nvidia,tristate = <TEGRA_PIN_DISABLE>;
363 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
364 };
365 /* Multiplexed and therefore disabled */
366 cam-mclk-pcc0 {
367 nvidia,pins = "cam_mclk_pcc0";
368 nvidia,function = "vi_alt3";
369 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
370 nvidia,tristate = <TEGRA_PIN_ENABLE>;
371 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
372 };
373 cam-i2c-scl-pbb1 {
374 nvidia,pins = "cam_i2c_scl_pbb1",
375 "cam_i2c_sda_pbb2";
376 nvidia,function = "rsvd3";
377 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
378 nvidia,tristate = <TEGRA_PIN_ENABLE>;
379 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
380 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
381 };
382 pbb0 {
383 nvidia,pins = "pbb0",
384 "pcc1";
385 nvidia,function = "rsvd2";
386 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
387 nvidia,tristate = <TEGRA_PIN_ENABLE>;
388 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
389 };
390 pbb3 {
391 nvidia,pins = "pbb3";
392 nvidia,function = "displayb";
393 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
394 nvidia,tristate = <TEGRA_PIN_ENABLE>;
395 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
396 };
397
398 /* Colibri nRESET_OUT */
399 gmi-rst-n-pi4 {
400 nvidia,pins = "gmi_rst_n_pi4";
401 nvidia,function = "gmi";
402 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
403 nvidia,tristate = <TEGRA_PIN_DISABLE>;
404 };
405
406 /*
407 * Colibri Parallel Camera (Optional)
408 * pins multiplexed with others and therefore disabled
409 */
410 vi-vsync-pd6 {
411 nvidia,pins = "vi_d0_pt4",
412 "vi_d1_pd5",
413 "vi_d2_pl0",
414 "vi_d3_pl1",
415 "vi_d4_pl2",
416 "vi_d5_pl3",
417 "vi_d6_pl4",
418 "vi_d7_pl5",
419 "vi_d8_pl6",
420 "vi_d9_pl7",
421 "vi_d10_pt2",
422 "vi_d11_pt3",
423 "vi_hsync_pd7",
424 "vi_mclk_pt1",
425 "vi_pclk_pt0",
426 "vi_vsync_pd6";
427 nvidia,function = "vi";
428 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
429 nvidia,tristate = <TEGRA_PIN_ENABLE>;
430 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
431 };
432
433 /* Colibri PWM<B> */
434 sdmmc3-dat2-pb5 {
435 nvidia,pins = "sdmmc3_dat2_pb5";
436 nvidia,function = "pwm1";
437 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
438 nvidia,tristate = <TEGRA_PIN_DISABLE>;
439 };
440
441 /* Colibri PWM<C> */
442 sdmmc3-clk-pa6 {
443 nvidia,pins = "sdmmc3_clk_pa6";
444 nvidia,function = "pwm2";
445 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
446 nvidia,tristate = <TEGRA_PIN_DISABLE>;
447 };
448
449 /* Colibri PWM<D> */
450 sdmmc3-cmd-pa7 {
451 nvidia,pins = "sdmmc3_cmd_pa7";
452 nvidia,function = "pwm3";
453 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
454 nvidia,tristate = <TEGRA_PIN_DISABLE>;
455 };
105 456
106 /* Colibri SSP */ 457 /* Colibri SSP */
107 ulpi_clk_py0 { 458 ulpi-clk-py0 {
108 nvidia,pins = "ulpi_clk_py0", 459 nvidia,pins = "ulpi_clk_py0",
109 "ulpi_dir_py1", 460 "ulpi_dir_py1",
110 "ulpi_nxt_py2", 461 "ulpi_nxt_py2",
@@ -113,16 +464,18 @@
113 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 464 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
114 nvidia,tristate = <TEGRA_PIN_DISABLE>; 465 nvidia,tristate = <TEGRA_PIN_DISABLE>;
115 }; 466 };
116 sdmmc3_dat6_pd3 { 467 /* Multiplexed SSPFRM, SSPTXD and therefore disabled */
468 sdmmc3-dat6-pd3 {
117 nvidia,pins = "sdmmc3_dat6_pd3", 469 nvidia,pins = "sdmmc3_dat6_pd3",
118 "sdmmc3_dat7_pd4"; 470 "sdmmc3_dat7_pd4";
119 nvidia,function = "spdif"; 471 nvidia,function = "spdif";
120 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 472 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
121 nvidia,tristate = <TEGRA_PIN_ENABLE>; 473 nvidia,tristate = <TEGRA_PIN_ENABLE>;
474 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
122 }; 475 };
123 476
124 /* Colibri UART_A */ 477 /* Colibri UART-A */
125 ulpi_data0 { 478 ulpi-data0 {
126 nvidia,pins = "ulpi_data0_po1", 479 nvidia,pins = "ulpi_data0_po1",
127 "ulpi_data1_po2", 480 "ulpi_data1_po2",
128 "ulpi_data2_po3", 481 "ulpi_data2_po3",
@@ -136,8 +489,8 @@
136 nvidia,tristate = <TEGRA_PIN_DISABLE>; 489 nvidia,tristate = <TEGRA_PIN_DISABLE>;
137 }; 490 };
138 491
139 /* Colibri UART_B */ 492 /* Colibri UART-B */
140 gmi_a16_pj7 { 493 gmi-a16-pj7 {
141 nvidia,pins = "gmi_a16_pj7", 494 nvidia,pins = "gmi_a16_pj7",
142 "gmi_a17_pb0", 495 "gmi_a17_pb0",
143 "gmi_a18_pb1", 496 "gmi_a18_pb1",
@@ -147,8 +500,8 @@
147 nvidia,tristate = <TEGRA_PIN_DISABLE>; 500 nvidia,tristate = <TEGRA_PIN_DISABLE>;
148 }; 501 };
149 502
150 /* Colibri UART_C */ 503 /* Colibri UART-C */
151 uart2_rxd { 504 uart2-rxd {
152 nvidia,pins = "uart2_rxd_pc3", 505 nvidia,pins = "uart2_rxd_pc3",
153 "uart2_txd_pc2"; 506 "uart2_txd_pc2";
154 nvidia,function = "uartb"; 507 nvidia,function = "uartb";
@@ -156,15 +509,53 @@
156 nvidia,tristate = <TEGRA_PIN_DISABLE>; 509 nvidia,tristate = <TEGRA_PIN_DISABLE>;
157 }; 510 };
158 511
159 /* eMMC */ 512 /* Colibri USBC_DET */
160 sdmmc4_clk_pcc4 { 513 spdif-out-pk5 {
514 nvidia,pins = "spdif_out_pk5";
515 nvidia,function = "rsvd2";
516 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
517 nvidia,tristate = <TEGRA_PIN_DISABLE>;
518 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
519 };
520
521 /* Colibri USBH_PEN */
522 spi2-cs1-n-pw2 {
523 nvidia,pins = "spi2_cs1_n_pw2";
524 nvidia,function = "spi2_alt";
525 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
526 nvidia,tristate = <TEGRA_PIN_DISABLE>;
527 };
528
529 /* Colibri USBH_OC */
530 spi2-cs2-n-pw3, {
531 nvidia,pins = "spi2_cs2_n_pw3";
532 nvidia,function = "spi2_alt";
533 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
534 nvidia,tristate = <TEGRA_PIN_DISABLE>;
535 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
536 };
537
538 /* Colibri VGA not supported and therefore disabled */
539 crt-hsync-pv6 {
540 nvidia,pins = "crt_hsync_pv6",
541 "crt_vsync_pv7";
542 nvidia,function = "rsvd2";
543 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
544 nvidia,tristate = <TEGRA_PIN_ENABLE>;
545 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
546 };
547
548 /* eMMC (On-module) */
549 sdmmc4-clk-pcc4 {
161 nvidia,pins = "sdmmc4_clk_pcc4", 550 nvidia,pins = "sdmmc4_clk_pcc4",
551 "sdmmc4_cmd_pt7",
162 "sdmmc4_rst_n_pcc3"; 552 "sdmmc4_rst_n_pcc3";
163 nvidia,function = "sdmmc4"; 553 nvidia,function = "sdmmc4";
164 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 554 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
165 nvidia,tristate = <TEGRA_PIN_DISABLE>; 555 nvidia,tristate = <TEGRA_PIN_DISABLE>;
556 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
166 }; 557 };
167 sdmmc4_dat0_paa0 { 558 sdmmc4-dat0-paa0 {
168 nvidia,pins = "sdmmc4_dat0_paa0", 559 nvidia,pins = "sdmmc4_dat0_paa0",
169 "sdmmc4_dat1_paa1", 560 "sdmmc4_dat1_paa1",
170 "sdmmc4_dat2_paa2", 561 "sdmmc4_dat2_paa2",
@@ -176,17 +567,111 @@
176 nvidia,function = "sdmmc4"; 567 nvidia,function = "sdmmc4";
177 nvidia,pull = <TEGRA_PIN_PULL_UP>; 568 nvidia,pull = <TEGRA_PIN_PULL_UP>;
178 nvidia,tristate = <TEGRA_PIN_DISABLE>; 569 nvidia,tristate = <TEGRA_PIN_DISABLE>;
570 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
571 };
572
573 /* LAN_EXT_WAKEUP#, LAN_PME (On-module) */
574 pex-l0-rst-n-pdd1 {
575 nvidia,pins = "pex_l0_rst_n_pdd1",
576 "pex_wake_n_pdd3";
577 nvidia,function = "rsvd3";
578 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
579 nvidia,tristate = <TEGRA_PIN_DISABLE>;
580 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
581 };
582 /* LAN_V_BUS, LAN_RESET# (On-module) */
583 pex-l0-clkreq-n-pdd2 {
584 nvidia,pins = "pex_l0_clkreq_n_pdd2",
585 "pex_l0_prsnt_n_pdd0";
586 nvidia,function = "rsvd3";
587 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
588 nvidia,tristate = <TEGRA_PIN_DISABLE>;
589 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
590 };
591
592 /* nBATT_FAULT(SENSE), nVDD_FAULT(SENSE) */
593 pex-l2-rst-n-pcc6 {
594 nvidia,pins = "pex_l2_rst_n_pcc6",
595 "pex_l2_prsnt_n_pdd7";
596 nvidia,function = "rsvd3";
597 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
598 nvidia,tristate = <TEGRA_PIN_DISABLE>;
599 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
600 };
601
602 /* Not connected and therefore disabled */
603 clk1-req-pee2 {
604 nvidia,pins = "clk1_req_pee2",
605 "pex_l1_prsnt_n_pdd4";
606 nvidia,function = "rsvd3";
607 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
608 nvidia,tristate = <TEGRA_PIN_ENABLE>;
609 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
610 };
611 clk2-req-pcc5 {
612 nvidia,pins = "clk2_req_pcc5",
613 "clk3_out_pee0",
614 "clk3_req_pee1",
615 "clk_32k_out_pa0",
616 "hdmi_cec_pee3",
617 "sys_clk_req_pz5";
618 nvidia,function = "rsvd2";
619 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
620 nvidia,tristate = <TEGRA_PIN_ENABLE>;
621 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
622 };
623 gmi-dqs-pi2 {
624 nvidia,pins = "gmi_dqs_pi2",
625 "kb_col2_pq2",
626 "kb_col3_pq3",
627 "kb_col4_pq4",
628 "kb_col5_pq5",
629 "kb_row4_pr4";
630 nvidia,function = "rsvd4";
631 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
632 nvidia,tristate = <TEGRA_PIN_ENABLE>;
633 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
634 };
635 kb-col0-pq0 {
636 nvidia,pins = "kb_col0_pq0",
637 "kb_col1_pq1",
638 "kb_col6_pq6",
639 "kb_col7_pq7",
640 "kb_row5_pr5",
641 "kb_row6_pr6",
642 "kb_row7_pr7",
643 "kb_row9_ps1";
644 nvidia,function = "kbc";
645 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
646 nvidia,tristate = <TEGRA_PIN_ENABLE>;
647 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
648 };
649 kb-row0-pr0 {
650 nvidia,pins = "kb_row0_pr0",
651 "kb_row1_pr1",
652 "kb_row2_pr2",
653 "kb_row3_pr3";
654 nvidia,function = "rsvd3";
655 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
656 nvidia,tristate = <TEGRA_PIN_ENABLE>;
657 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
658 };
659 lcd-pwr2-pc6 {
660 nvidia,pins = "lcd_pwr2_pc6";
661 nvidia,function = "hdcp";
662 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
663 nvidia,tristate = <TEGRA_PIN_ENABLE>;
664 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
179 }; 665 };
180 666
181 /* Power I2C (On-module) */ 667 /* Power I2C (On-module) */
182 pwr_i2c_scl_pz6 { 668 pwr-i2c-scl-pz6 {
183 nvidia,pins = "pwr_i2c_scl_pz6", 669 nvidia,pins = "pwr_i2c_scl_pz6",
184 "pwr_i2c_sda_pz7"; 670 "pwr_i2c_sda_pz7";
185 nvidia,function = "i2cpwr"; 671 nvidia,function = "i2cpwr";
186 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 672 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
187 nvidia,tristate = <TEGRA_PIN_DISABLE>; 673 nvidia,tristate = <TEGRA_PIN_DISABLE>;
188 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 674 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
189 nvidia,lock = <TEGRA_PIN_DISABLE>;
190 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 675 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
191 }; 676 };
192 677
@@ -195,15 +680,15 @@
195 * temperature sensor therefore requires disabling for 680 * temperature sensor therefore requires disabling for
196 * now 681 * now
197 */ 682 */
198 lcd_dc1_pd2 { 683 lcd-dc1-pd2 {
199 nvidia,pins = "lcd_dc1_pd2"; 684 nvidia,pins = "lcd_dc1_pd2";
200 nvidia,function = "rsvd3"; 685 nvidia,function = "rsvd3";
201 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 686 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
202 nvidia,tristate = <TEGRA_PIN_DISABLE>; 687 nvidia,tristate = <TEGRA_PIN_ENABLE>;
203 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 688 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
204 }; 689 };
205 690
206 /* TOUCH_PEN_INT# */ 691 /* TOUCH_PEN_INT# (On-module) */
207 pv0 { 692 pv0 {
208 nvidia,pins = "pv0"; 693 nvidia,pins = "pv0";
209 nvidia,function = "rsvd1"; 694 nvidia,function = "rsvd1";
@@ -214,13 +699,21 @@
214 }; 699 };
215 }; 700 };
216 701
217 hdmiddc: i2c@7000c700 { 702 serial@70006040 {
703 compatible = "nvidia,tegra30-hsuart";
704 };
705
706 serial@70006300 {
707 compatible = "nvidia,tegra30-hsuart";
708 };
709
710 hdmi_ddc: i2c@7000c700 {
218 clock-frequency = <10000>; 711 clock-frequency = <10000>;
219 }; 712 };
220 713
221 /* 714 /*
222 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and 715 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
223 * touch screen controller 716 * touch screen controller (On-module)
224 */ 717 */
225 i2c@7000d000 { 718 i2c@7000d000 {
226 status = "okay"; 719 status = "okay";
@@ -230,12 +723,13 @@
230 sgtl5000: codec@a { 723 sgtl5000: codec@a {
231 compatible = "fsl,sgtl5000"; 724 compatible = "fsl,sgtl5000";
232 reg = <0x0a>; 725 reg = <0x0a>;
233 VDDA-supply = <&sys_3v3_reg>; 726 VDDA-supply = <&reg_module_3v3_audio>;
234 VDDIO-supply = <&sys_3v3_reg>; 727 VDDD-supply = <&reg_1v8_vio>;
728 VDDIO-supply = <&reg_module_3v3>;
235 clocks = <&tegra_car TEGRA30_CLK_EXTERN1>; 729 clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
236 }; 730 };
237 731
238 pmic: tps65911@2d { 732 pmic: pmic@2d {
239 compatible = "ti,tps65911"; 733 compatible = "ti,tps65911";
240 reg = <0x2d>; 734 reg = <0x2d>;
241 735
@@ -248,19 +742,18 @@
248 #gpio-cells = <2>; 742 #gpio-cells = <2>;
249 gpio-controller; 743 gpio-controller;
250 744
251 vcc1-supply = <&sys_3v3_reg>; 745 vcc1-supply = <&reg_module_3v3>;
252 vcc2-supply = <&sys_3v3_reg>; 746 vcc2-supply = <&reg_module_3v3>;
253 vcc3-supply = <&vio_reg>; 747 vcc3-supply = <&reg_1v8_vio>;
254 vcc4-supply = <&sys_3v3_reg>; 748 vcc4-supply = <&reg_module_3v3>;
255 vcc5-supply = <&sys_3v3_reg>; 749 vcc5-supply = <&reg_module_3v3>;
256 vcc6-supply = <&vio_reg>; 750 vcc6-supply = <&reg_1v8_vio>;
257 vcc7-supply = <&charge_pump_5v0_reg>; 751 vcc7-supply = <&reg_5v0_charge_pump>;
258 vccio-supply = <&sys_3v3_reg>; 752 vccio-supply = <&reg_module_3v3>;
259 753
260 regulators { 754 regulators {
261 /* SW1: +V1.35_VDDIO_DDR */
262 vdd1_reg: vdd1 { 755 vdd1_reg: vdd1 {
263 regulator-name = "vddio_ddr_1v35"; 756 regulator-name = "+V1.35_VDDIO_DDR";
264 regulator-min-microvolt = <1350000>; 757 regulator-min-microvolt = <1350000>;
265 regulator-max-microvolt = <1350000>; 758 regulator-max-microvolt = <1350000>;
266 regulator-always-on; 759 regulator-always-on;
@@ -268,17 +761,15 @@
268 761
269 /* SW2: unused */ 762 /* SW2: unused */
270 763
271 /* SW CTRL: +V1.0_VDD_CPU */
272 vddctrl_reg: vddctrl { 764 vddctrl_reg: vddctrl {
273 regulator-name = "vdd_cpu,vdd_sys"; 765 regulator-name = "+V1.0_VDD_CPU";
274 regulator-min-microvolt = <1150000>; 766 regulator-min-microvolt = <1150000>;
275 regulator-max-microvolt = <1150000>; 767 regulator-max-microvolt = <1150000>;
276 regulator-always-on; 768 regulator-always-on;
277 }; 769 };
278 770
279 /* SWIO: +V1.8 */ 771 reg_1v8_vio: vio {
280 vio_reg: vio { 772 regulator-name = "+V1.8";
281 regulator-name = "vdd_1v8_gen";
282 regulator-min-microvolt = <1800000>; 773 regulator-min-microvolt = <1800000>;
283 regulator-max-microvolt = <1800000>; 774 regulator-max-microvolt = <1800000>;
284 regulator-always-on; 775 regulator-always-on;
@@ -289,10 +780,10 @@
289 /* 780 /*
290 * EN_+V3.3 switching via FET: 781 * EN_+V3.3 switching via FET:
291 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN 782 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
292 * see also 3v3 fixed supply 783 * see also +V3.3 fixed supply
293 */ 784 */
294 ldo2_reg: ldo2 { 785 ldo2_reg: ldo2 {
295 regulator-name = "en_3v3"; 786 regulator-name = "EN_+V3.3";
296 regulator-min-microvolt = <3300000>; 787 regulator-min-microvolt = <3300000>;
297 regulator-max-microvolt = <3300000>; 788 regulator-max-microvolt = <3300000>;
298 regulator-always-on; 789 regulator-always-on;
@@ -300,9 +791,8 @@
300 791
301 /* LDO3: unused */ 792 /* LDO3: unused */
302 793
303 /* +V1.2_VDD_RTC */
304 ldo4_reg: ldo4 { 794 ldo4_reg: ldo4 {
305 regulator-name = "vdd_rtc"; 795 regulator-name = "+V1.2_VDD_RTC";
306 regulator-min-microvolt = <1200000>; 796 regulator-min-microvolt = <1200000>;
307 regulator-max-microvolt = <1200000>; 797 regulator-max-microvolt = <1200000>;
308 regulator-always-on; 798 regulator-always-on;
@@ -310,10 +800,10 @@
310 800
311 /* 801 /*
312 * +V2.8_AVDD_VDAC: 802 * +V2.8_AVDD_VDAC:
313 * only required for analog RGB 803 * only required for (unsupported) analog RGB
314 */ 804 */
315 ldo5_reg: ldo5 { 805 ldo5_reg: ldo5 {
316 regulator-name = "avdd_vdac"; 806 regulator-name = "+V2.8_AVDD_VDAC";
317 regulator-min-microvolt = <2800000>; 807 regulator-min-microvolt = <2800000>;
318 regulator-max-microvolt = <2800000>; 808 regulator-max-microvolt = <2800000>;
319 regulator-always-on; 809 regulator-always-on;
@@ -325,22 +815,20 @@
325 * granularity 815 * granularity
326 */ 816 */
327 ldo6_reg: ldo6 { 817 ldo6_reg: ldo6 {
328 regulator-name = "avdd_plle"; 818 regulator-name = "+V1.05_AVDD_PLLE";
329 regulator-min-microvolt = <1100000>; 819 regulator-min-microvolt = <1100000>;
330 regulator-max-microvolt = <1100000>; 820 regulator-max-microvolt = <1100000>;
331 }; 821 };
332 822
333 /* +V1.2_AVDD_PLL */
334 ldo7_reg: ldo7 { 823 ldo7_reg: ldo7 {
335 regulator-name = "avdd_pll"; 824 regulator-name = "+V1.2_AVDD_PLL";
336 regulator-min-microvolt = <1200000>; 825 regulator-min-microvolt = <1200000>;
337 regulator-max-microvolt = <1200000>; 826 regulator-max-microvolt = <1200000>;
338 regulator-always-on; 827 regulator-always-on;
339 }; 828 };
340 829
341 /* +V1.0_VDD_DDR_HS */
342 ldo8_reg: ldo8 { 830 ldo8_reg: ldo8 {
343 regulator-name = "vdd_ddr_hs"; 831 regulator-name = "+V1.0_VDD_DDR_HS";
344 regulator-min-microvolt = <1000000>; 832 regulator-min-microvolt = <1000000>;
345 regulator-max-microvolt = <1000000>; 833 regulator-max-microvolt = <1000000>;
346 regulator-always-on; 834 regulator-always-on;
@@ -349,11 +837,10 @@
349 }; 837 };
350 838
351 /* STMPE811 touch screen controller */ 839 /* STMPE811 touch screen controller */
352 stmpe811@41 { 840 touchscreen@41 {
353 compatible = "st,stmpe811"; 841 compatible = "st,stmpe811";
354 reg = <0x41>; 842 reg = <0x41>;
355 interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>; 843 irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
356 interrupt-parent = <&gpio>;
357 interrupt-controller; 844 interrupt-controller;
358 id = <0>; 845 id = <0>;
359 blocks = <0x5>; 846 blocks = <0x5>;
@@ -387,7 +874,7 @@
387 874
388 /* 875 /*
389 * LM95245 temperature sensor 876 * LM95245 temperature sensor
390 * Note: OVERT_N directly connected to PMIC PWRDN 877 * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
391 */ 878 */
392 temp-sensor@4c { 879 temp-sensor@4c {
393 compatible = "national,lm95245"; 880 compatible = "national,lm95245";
@@ -395,7 +882,7 @@
395 }; 882 };
396 883
397 /* SW: +V1.2_VDD_CORE */ 884 /* SW: +V1.2_VDD_CORE */
398 tps62362@60 { 885 regulator@60 {
399 compatible = "ti,tps62362"; 886 compatible = "ti,tps62362";
400 reg = <0x60>; 887 reg = <0x60>;
401 888
@@ -419,6 +906,18 @@
419 nvidia,core-pwr-off-time = <0>; 906 nvidia,core-pwr-off-time = <0>;
420 nvidia,core-power-req-active-high; 907 nvidia,core-power-req-active-high;
421 nvidia,sys-clock-req-active-high; 908 nvidia,sys-clock-req-active-high;
909
910 /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
911 i2c-thermtrip {
912 nvidia,i2c-controller-id = <4>;
913 nvidia,bus-addr = <0x2d>;
914 nvidia,reg-addr = <0x3f>;
915 nvidia,reg-data = <0x1>;
916 };
917 };
918
919 hda@70030000 {
920 status = "okay";
422 }; 921 };
423 922
424 ahub@70080000 { 923 ahub@70080000 {
@@ -432,75 +931,85 @@
432 status = "okay"; 931 status = "okay";
433 bus-width = <8>; 932 bus-width = <8>;
434 non-removable; 933 non-removable;
934 vmmc-supply = <&reg_module_3v3>; /* VCC */
935 vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
936 mmc-ddr-1_8v;
435 }; 937 };
436 938
437 /* EHCI instance 1: USB2_DP/N -> AX88772B */ 939 /* EHCI instance 1: USB2_DP/N -> AX88772B (On-module) */
438 usb@7d004000 { 940 usb@7d004000 {
439 status = "okay"; 941 status = "okay";
942 #address-cells = <1>;
943 #size-cells = <0>;
944
945 asix@1 {
946 reg = <1>;
947 local-mac-address = [00 00 00 00 00 00];
948 };
440 }; 949 };
441 950
442 usb-phy@7d004000 { 951 usb-phy@7d004000 {
443 status = "okay"; 952 status = "okay";
444 nvidia,is-wired = <1>; 953 vbus-supply = <&reg_lan_v_bus>;
445 }; 954 };
446 955
447 clocks { 956 clk32k_in: xtal1 {
448 compatible = "simple-bus"; 957 compatible = "fixed-clock";
449 #address-cells = <1>; 958 #clock-cells = <0>;
450 #size-cells = <0>; 959 clock-frequency = <32768>;
960 };
451 961
452 clk32k_in: clk@0 { 962 reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
453 compatible = "fixed-clock"; 963 compatible = "regulator-fixed";
454 reg = <0>; 964 regulator-name = "+V1.8_AVDD_HDMI_PLL";
455 #clock-cells = <0>; 965 regulator-min-microvolt = <1800000>;
456 clock-frequency = <32768>; 966 regulator-max-microvolt = <1800000>;
457 }; 967 enable-active-high;
968 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
969 vin-supply = <&reg_1v8_vio>;
458 }; 970 };
459 971
460 regulators { 972 reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
461 compatible = "simple-bus"; 973 compatible = "regulator-fixed";
462 #address-cells = <1>; 974 regulator-name = "+V3.3_AVDD_HDMI";
463 #size-cells = <0>; 975 regulator-min-microvolt = <3300000>;
976 regulator-max-microvolt = <3300000>;
977 enable-active-high;
978 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
979 vin-supply = <&reg_module_3v3>;
980 };
464 981
465 avdd_hdmi_pll_1v8_reg: regulator@100 { 982 reg_5v0_charge_pump: regulator-5v0-charge-pump {
466 compatible = "regulator-fixed"; 983 compatible = "regulator-fixed";
467 reg = <100>; 984 regulator-name = "+V5.0";
468 regulator-name = "+V1.8_AVDD_HDMI_PLL"; 985 regulator-min-microvolt = <5000000>;
469 regulator-min-microvolt = <1800000>; 986 regulator-max-microvolt = <5000000>;
470 regulator-max-microvolt = <1800000>; 987 regulator-always-on;
471 enable-active-high; 988 };
472 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
473 vin-supply = <&vio_reg>;
474 };
475 989
476 sys_3v3_reg: regulator@101 { 990 reg_lan_v_bus: regulator-lan-v-bus {
477 compatible = "regulator-fixed"; 991 compatible = "regulator-fixed";
478 reg = <101>; 992 regulator-name = "LAN_V_BUS";
479 regulator-name = "3v3"; 993 regulator-min-microvolt = <5000000>;
480 regulator-min-microvolt = <3300000>; 994 regulator-max-microvolt = <5000000>;
481 regulator-max-microvolt = <3300000>; 995 enable-active-high;
482 regulator-always-on; 996 gpio = <&gpio TEGRA_GPIO(DD, 2) GPIO_ACTIVE_HIGH>;
483 }; 997 };
484 998
485 avdd_hdmi_3v3_reg: regulator@102 { 999 reg_module_3v3: regulator-module-3v3 {
486 compatible = "regulator-fixed"; 1000 compatible = "regulator-fixed";
487 reg = <102>; 1001 regulator-name = "+V3.3";
488 regulator-name = "+V3.3_AVDD_HDMI"; 1002 regulator-min-microvolt = <3300000>;
489 regulator-min-microvolt = <3300000>; 1003 regulator-max-microvolt = <3300000>;
490 regulator-max-microvolt = <3300000>; 1004 regulator-always-on;
491 enable-active-high; 1005 };
492 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
493 vin-supply = <&sys_3v3_reg>;
494 };
495 1006
496 charge_pump_5v0_reg: regulator@103 { 1007 reg_module_3v3_audio: regulator-module-3v3-audio {
497 compatible = "regulator-fixed"; 1008 compatible = "regulator-fixed";
498 reg = <103>; 1009 regulator-name = "+V3.3_AUDIO_AVDD_S";
499 regulator-name = "5v0"; 1010 regulator-min-microvolt = <3300000>;
500 regulator-min-microvolt = <5000000>; 1011 regulator-max-microvolt = <3300000>;
501 regulator-max-microvolt = <5000000>; 1012 regulator-always-on;
502 regulator-always-on;
503 };
504 }; 1013 };
505 1014
506 sound { 1015 sound {
@@ -519,3 +1028,12 @@
519 clock-names = "pll_a", "pll_a_out0", "mclk"; 1028 clock-names = "pll_a", "pll_a_out0", "mclk";
520 }; 1029 };
521}; 1030};
1031
1032&gpio {
1033 lan-reset-n {
1034 gpio-hog;
1035 gpios = <TEGRA_GPIO(DD, 0) GPIO_ACTIVE_HIGH>;
1036 output-high;
1037 line-name = "LAN_RESET#";
1038 };
1039};
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index a6781f653310..d2b553f76719 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -896,7 +896,7 @@
896 nvidia,elastic-limit = <16>; 896 nvidia,elastic-limit = <16>;
897 nvidia,term-range-adj = <6>; 897 nvidia,term-range-adj = <6>;
898 nvidia,xcvr-setup = <51>; 898 nvidia,xcvr-setup = <51>;
899 nvidia.xcvr-setup-use-fuses; 899 nvidia,xcvr-setup-use-fuses;
900 nvidia,xcvr-lsfslew = <1>; 900 nvidia,xcvr-lsfslew = <1>;
901 nvidia,xcvr-lsrslew = <1>; 901 nvidia,xcvr-lsrslew = <1>;
902 nvidia,xcvr-hsslew = <32>; 902 nvidia,xcvr-hsslew = <32>;
@@ -933,7 +933,7 @@
933 nvidia,elastic-limit = <16>; 933 nvidia,elastic-limit = <16>;
934 nvidia,term-range-adj = <6>; 934 nvidia,term-range-adj = <6>;
935 nvidia,xcvr-setup = <51>; 935 nvidia,xcvr-setup = <51>;
936 nvidia.xcvr-setup-use-fuses; 936 nvidia,xcvr-setup-use-fuses;
937 nvidia,xcvr-lsfslew = <2>; 937 nvidia,xcvr-lsfslew = <2>;
938 nvidia,xcvr-lsrslew = <2>; 938 nvidia,xcvr-lsrslew = <2>;
939 nvidia,xcvr-hsslew = <32>; 939 nvidia,xcvr-hsslew = <32>;
@@ -969,7 +969,7 @@
969 nvidia,elastic-limit = <16>; 969 nvidia,elastic-limit = <16>;
970 nvidia,term-range-adj = <6>; 970 nvidia,term-range-adj = <6>;
971 nvidia,xcvr-setup = <51>; 971 nvidia,xcvr-setup = <51>;
972 nvidia.xcvr-setup-use-fuses; 972 nvidia,xcvr-setup-use-fuses;
973 nvidia,xcvr-lsfslew = <2>; 973 nvidia,xcvr-lsfslew = <2>;
974 nvidia,xcvr-lsrslew = <2>; 974 nvidia,xcvr-lsrslew = <2>;
975 nvidia,xcvr-hsslew = <32>; 975 nvidia,xcvr-hsslew = <32>;
@@ -1013,5 +1013,9 @@
1013 <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>, 1013 <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
1014 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>, 1014 <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
1015 <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; 1015 <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
1016 interrupt-affinity = <&{/cpus/cpu@0}>,
1017 <&{/cpus/cpu@1}>,
1018 <&{/cpus/cpu@2}>,
1019 <&{/cpus/cpu@3}>;
1016 }; 1020 };
1017}; 1021};
diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
index 5f61d3609027..6f4f60ba5429 100644
--- a/arch/arm/boot/dts/versatile-ab.dts
+++ b/arch/arm/boot/dts/versatile-ab.dts
@@ -373,7 +373,7 @@
373 clock-names = "apb_pclk"; 373 clock-names = "apb_pclk";
374 }; 374 };
375 375
376 ssp@101f4000 { 376 spi@101f4000 {
377 compatible = "arm,pl022", "arm,primecell"; 377 compatible = "arm,pl022", "arm,primecell";
378 reg = <0x101f4000 0x1000>; 378 reg = <0x101f4000 0x1000>;
379 interrupts = <11>; 379 interrupts = <11>;
diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts
index cc5a3dc2b4a0..27cd6cb52f1b 100644
--- a/arch/arm/boot/dts/zynq-zc702.dts
+++ b/arch/arm/boot/dts/zynq-zc702.dts
@@ -174,17 +174,17 @@
174 #address-cells = <1>; 174 #address-cells = <1>;
175 #size-cells = <0>; 175 #size-cells = <0>;
176 reg = <7>; 176 reg = <7>;
177 hwmon@52 { 177 hwmon@34 {
178 compatible = "ti,ucd9248"; 178 compatible = "ti,ucd9248";
179 reg = <52>; 179 reg = <0x34>;
180 }; 180 };
181 hwmon@53 { 181 hwmon@35 {
182 compatible = "ti,ucd9248"; 182 compatible = "ti,ucd9248";
183 reg = <53>; 183 reg = <0x35>;
184 }; 184 };
185 hwmon@54 { 185 hwmon@36 {
186 compatible = "ti,ucd9248"; 186 compatible = "ti,ucd9248";
187 reg = <54>; 187 reg = <0x36>;
188 }; 188 };
189 }; 189 };
190 }; 190 };
diff --git a/arch/arm/boot/dts/zynq-zc770-xm010.dts b/arch/arm/boot/dts/zynq-zc770-xm010.dts
index 0e1bfdd3421f..0dd352289a45 100644
--- a/arch/arm/boot/dts/zynq-zc770-xm010.dts
+++ b/arch/arm/boot/dts/zynq-zc770-xm010.dts
@@ -68,7 +68,7 @@
68 status = "okay"; 68 status = "okay";
69 num-cs = <4>; 69 num-cs = <4>;
70 is-decoded-cs = <0>; 70 is-decoded-cs = <0>;
71 flash@0 { 71 flash@1 {
72 compatible = "sst25wf080", "jedec,spi-nor"; 72 compatible = "sst25wf080", "jedec,spi-nor";
73 reg = <1>; 73 reg = <1>;
74 spi-max-frequency = <1000000>; 74 spi-max-frequency = <1000000>;
diff --git a/arch/arm/boot/dts/zynq-zc770-xm013.dts b/arch/arm/boot/dts/zynq-zc770-xm013.dts
index 651913f1afa2..4ae2c85df3a0 100644
--- a/arch/arm/boot/dts/zynq-zc770-xm013.dts
+++ b/arch/arm/boot/dts/zynq-zc770-xm013.dts
@@ -62,7 +62,7 @@
62 status = "okay"; 62 status = "okay";
63 num-cs = <4>; 63 num-cs = <4>;
64 is-decoded-cs = <0>; 64 is-decoded-cs = <0>;
65 eeprom: eeprom@0 { 65 eeprom: eeprom@2 {
66 at25,byte-len = <8192>; 66 at25,byte-len = <8192>;
67 at25,addr-mode = <2>; 67 at25,addr-mode = <2>;
68 at25,page-size = <32>; 68 at25,page-size = <32>;
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index e2c127608bcc..7eca43ff69bb 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -257,6 +257,7 @@ CONFIG_IMX_IPUV3_CORE=y
257CONFIG_DRM=y 257CONFIG_DRM=y
258CONFIG_DRM_PANEL_LVDS=y 258CONFIG_DRM_PANEL_LVDS=y
259CONFIG_DRM_PANEL_SIMPLE=y 259CONFIG_DRM_PANEL_SIMPLE=y
260CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
260CONFIG_DRM_DW_HDMI_AHB_AUDIO=m 261CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
261CONFIG_DRM_DW_HDMI_CEC=y 262CONFIG_DRM_DW_HDMI_CEC=y
262CONFIG_DRM_IMX=y 263CONFIG_DRM_IMX=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index 148226e36152..7b8212857535 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -95,6 +95,7 @@ CONFIG_MFD_MXS_LRADC=y
95CONFIG_REGULATOR=y 95CONFIG_REGULATOR=y
96CONFIG_REGULATOR_FIXED_VOLTAGE=y 96CONFIG_REGULATOR_FIXED_VOLTAGE=y
97CONFIG_DRM=y 97CONFIG_DRM=y
98CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
98CONFIG_DRM_MXSFB=y 99CONFIG_DRM_MXSFB=y
99CONFIG_FB_MODE_HELPERS=y 100CONFIG_FB_MODE_HELPERS=y
100CONFIG_BACKLIGHT_LCD_SUPPORT=y 101CONFIG_BACKLIGHT_LCD_SUPPORT=y
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index df68dc4056e5..5282324c7cef 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -5,19 +5,19 @@ CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y 6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SLAB=y 7CONFIG_SLAB=y
8CONFIG_MODULES=y
9CONFIG_MODULE_UNLOAD=y
10CONFIG_PARTITION_ADVANCED=y
11# CONFIG_ARCH_MULTI_V7 is not set 8# CONFIG_ARCH_MULTI_V7 is not set
12CONFIG_ARCH_VERSATILE=y 9CONFIG_ARCH_VERSATILE=y
13CONFIG_AEABI=y 10CONFIG_AEABI=y
14CONFIG_OABI_COMPAT=y 11CONFIG_OABI_COMPAT=y
15CONFIG_CMA=y
16CONFIG_ZBOOT_ROM_TEXT=0x0 12CONFIG_ZBOOT_ROM_TEXT=0x0
17CONFIG_ZBOOT_ROM_BSS=0x0 13CONFIG_ZBOOT_ROM_BSS=0x0
18CONFIG_CMDLINE="root=1f03 mem=32M" 14CONFIG_CMDLINE="root=1f03 mem=32M"
19CONFIG_FPE_NWFPE=y 15CONFIG_FPE_NWFPE=y
20CONFIG_VFP=y 16CONFIG_VFP=y
17CONFIG_MODULES=y
18CONFIG_MODULE_UNLOAD=y
19CONFIG_PARTITION_ADVANCED=y
20CONFIG_CMA=y
21CONFIG_NET=y 21CONFIG_NET=y
22CONFIG_PACKET=y 22CONFIG_PACKET=y
23CONFIG_UNIX=y 23CONFIG_UNIX=y
@@ -59,6 +59,7 @@ CONFIG_GPIO_PL061=y
59CONFIG_DRM=y 59CONFIG_DRM=y
60CONFIG_DRM_PANEL_ARM_VERSATILE=y 60CONFIG_DRM_PANEL_ARM_VERSATILE=y
61CONFIG_DRM_PANEL_SIMPLE=y 61CONFIG_DRM_PANEL_SIMPLE=y
62CONFIG_DRM_DUMB_VGA_DAC=y
62CONFIG_DRM_PL111=y 63CONFIG_DRM_PL111=y
63CONFIG_FB_MODE_HELPERS=y 64CONFIG_FB_MODE_HELPERS=y
64CONFIG_BACKLIGHT_LCD_SUPPORT=y 65CONFIG_BACKLIGHT_LCD_SUPPORT=y
@@ -89,9 +90,10 @@ CONFIG_NFSD=y
89CONFIG_NFSD_V3=y 90CONFIG_NFSD_V3=y
90CONFIG_NLS_CODEPAGE_850=m 91CONFIG_NLS_CODEPAGE_850=m
91CONFIG_NLS_ISO8859_1=m 92CONFIG_NLS_ISO8859_1=m
93CONFIG_FONTS=y
94CONFIG_FONT_ACORN_8x8=y
95CONFIG_DEBUG_FS=y
92CONFIG_MAGIC_SYSRQ=y 96CONFIG_MAGIC_SYSRQ=y
93CONFIG_DEBUG_KERNEL=y 97CONFIG_DEBUG_KERNEL=y
94CONFIG_DEBUG_USER=y 98CONFIG_DEBUG_USER=y
95CONFIG_DEBUG_LL=y 99CONFIG_DEBUG_LL=y
96CONFIG_FONTS=y
97CONFIG_FONT_ACORN_8x8=y
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index dcd21bb95e3b..f96730cce6e8 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -110,6 +110,7 @@ void exynos_firmware_init(void);
110#define EXYNOS_SLEEP_MAGIC 0x00000bad 110#define EXYNOS_SLEEP_MAGIC 0x00000bad
111#define EXYNOS_AFTR_MAGIC 0xfcba0d10 111#define EXYNOS_AFTR_MAGIC 0xfcba0d10
112 112
113bool __init exynos_secure_firmware_available(void);
113void exynos_set_boot_flag(unsigned int cpu, unsigned int mode); 114void exynos_set_boot_flag(unsigned int cpu, unsigned int mode);
114void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode); 115void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode);
115 116
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index be1f20fe28f4..d602e3bf3f96 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -185,7 +185,7 @@ static void exynos_l2_configure(const struct l2x0_regs *regs)
185 exynos_smc(SMC_CMD_L2X0SETUP2, regs->pwr_ctrl, regs->aux_ctrl, 0); 185 exynos_smc(SMC_CMD_L2X0SETUP2, regs->pwr_ctrl, regs->aux_ctrl, 0);
186} 186}
187 187
188void __init exynos_firmware_init(void) 188bool __init exynos_secure_firmware_available(void)
189{ 189{
190 struct device_node *nd; 190 struct device_node *nd;
191 const __be32 *addr; 191 const __be32 *addr;
@@ -193,14 +193,22 @@ void __init exynos_firmware_init(void)
193 nd = of_find_compatible_node(NULL, NULL, 193 nd = of_find_compatible_node(NULL, NULL,
194 "samsung,secure-firmware"); 194 "samsung,secure-firmware");
195 if (!nd) 195 if (!nd)
196 return; 196 return false;
197 197
198 addr = of_get_address(nd, 0, NULL, NULL); 198 addr = of_get_address(nd, 0, NULL, NULL);
199 if (!addr) { 199 if (!addr) {
200 pr_err("%s: No address specified.\n", __func__); 200 pr_err("%s: No address specified.\n", __func__);
201 return; 201 return false;
202 } 202 }
203 203
204 return true;
205}
206
207void __init exynos_firmware_init(void)
208{
209 if (!exynos_secure_firmware_available())
210 return;
211
204 pr_info("Running under secure firmware.\n"); 212 pr_info("Running under secure firmware.\n");
205 213
206 register_firmware_ops(&exynos_firmware_ops); 214 register_firmware_ops(&exynos_firmware_ops);
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 7ead3acd6fa4..bb8e3985acdb 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -59,10 +59,15 @@ struct exynos_pm_data {
59 int (*cpu_suspend)(unsigned long); 59 int (*cpu_suspend)(unsigned long);
60}; 60};
61 61
62static const struct exynos_pm_data *pm_data __ro_after_init; 62/* Used only on Exynos542x/5800 */
63struct exynos_pm_state {
64 int cpu_state;
65 unsigned int pmu_spare3;
66 void __iomem *sysram_base;
67};
63 68
64static int exynos5420_cpu_state; 69static const struct exynos_pm_data *pm_data __ro_after_init;
65static unsigned int exynos_pmu_spare3; 70static struct exynos_pm_state pm_state;
66 71
67/* 72/*
68 * GIC wake-up support 73 * GIC wake-up support
@@ -257,7 +262,7 @@ static int exynos5420_cpu_suspend(unsigned long arg)
257 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 262 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
258 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); 263 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
259 264
260 writel_relaxed(0x0, sysram_base_addr + EXYNOS5420_CPU_STATE); 265 writel_relaxed(0x0, pm_state.sysram_base + EXYNOS5420_CPU_STATE);
261 266
262 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { 267 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
263 mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); 268 mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
@@ -321,7 +326,7 @@ static void exynos5420_pm_prepare(void)
321 /* Set wake-up mask registers */ 326 /* Set wake-up mask registers */
322 exynos_pm_set_wakeup_mask(); 327 exynos_pm_set_wakeup_mask();
323 328
324 exynos_pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3); 329 pm_state.pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3);
325 /* 330 /*
326 * The cpu state needs to be saved and restored so that the 331 * The cpu state needs to be saved and restored so that the
327 * secondary CPUs will enter low power start. Though the U-Boot 332 * secondary CPUs will enter low power start. Though the U-Boot
@@ -329,8 +334,8 @@ static void exynos5420_pm_prepare(void)
329 * needs to restore it back in case, the primary cpu fails to 334 * needs to restore it back in case, the primary cpu fails to
330 * suspend for any reason. 335 * suspend for any reason.
331 */ 336 */
332 exynos5420_cpu_state = readl_relaxed(sysram_base_addr + 337 pm_state.cpu_state = readl_relaxed(pm_state.sysram_base +
333 EXYNOS5420_CPU_STATE); 338 EXYNOS5420_CPU_STATE);
334 339
335 exynos_pm_enter_sleep_mode(); 340 exynos_pm_enter_sleep_mode();
336 341
@@ -448,8 +453,8 @@ static void exynos5420_pm_resume(void)
448 EXYNOS5_ARM_CORE0_SYS_PWR_REG); 453 EXYNOS5_ARM_CORE0_SYS_PWR_REG);
449 454
450 /* Restore the sysram cpu state register */ 455 /* Restore the sysram cpu state register */
451 writel_relaxed(exynos5420_cpu_state, 456 writel_relaxed(pm_state.cpu_state,
452 sysram_base_addr + EXYNOS5420_CPU_STATE); 457 pm_state.sysram_base + EXYNOS5420_CPU_STATE);
453 458
454 pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL, 459 pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL,
455 S5P_CENTRAL_SEQ_OPTION); 460 S5P_CENTRAL_SEQ_OPTION);
@@ -457,7 +462,7 @@ static void exynos5420_pm_resume(void)
457 if (exynos_pm_central_resume()) 462 if (exynos_pm_central_resume())
458 goto early_wakeup; 463 goto early_wakeup;
459 464
460 pmu_raw_writel(exynos_pmu_spare3, S5P_PMU_SPARE3); 465 pmu_raw_writel(pm_state.pmu_spare3, S5P_PMU_SPARE3);
461 466
462early_wakeup: 467early_wakeup:
463 468
@@ -654,4 +659,13 @@ void __init exynos_pm_init(void)
654 659
655 register_syscore_ops(&exynos_pm_syscore_ops); 660 register_syscore_ops(&exynos_pm_syscore_ops);
656 suspend_set_ops(&exynos_suspend_ops); 661 suspend_set_ops(&exynos_suspend_ops);
662
663 /*
664 * Applicable as of now only to Exynos542x. If booted under secure
665 * firmware, the non-secure region of sysram should be used.
666 */
667 if (exynos_secure_firmware_available())
668 pm_state.sysram_base = sysram_ns_base_addr;
669 else
670 pm_state.sysram_base = sysram_base_addr;
657} 671}
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 2ceffd85dd3d..cd65ea4e9c54 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2161,6 +2161,37 @@ static int of_dev_hwmod_lookup(struct device_node *np,
2161} 2161}
2162 2162
2163/** 2163/**
2164 * omap_hwmod_fix_mpu_rt_idx - fix up mpu_rt_idx register offsets
2165 *
2166 * @oh: struct omap_hwmod *
2167 * @np: struct device_node *
2168 *
2169 * Fix up module register offsets for modules with mpu_rt_idx.
2170 * Only needed for cpsw with interconnect target module defined
2171 * in device tree while still using legacy hwmod platform data
2172 * for rev, sysc and syss registers.
2173 *
2174 * Can be removed when all cpsw hwmod platform data has been
2175 * dropped.
2176 */
2177static void omap_hwmod_fix_mpu_rt_idx(struct omap_hwmod *oh,
2178 struct device_node *np,
2179 struct resource *res)
2180{
2181 struct device_node *child = NULL;
2182 int error;
2183
2184 child = of_get_next_child(np, child);
2185 if (!child)
2186 return;
2187
2188 error = of_address_to_resource(child, oh->mpu_rt_idx, res);
2189 if (error)
2190 pr_err("%s: error mapping mpu_rt_idx: %i\n",
2191 __func__, error);
2192}
2193
2194/**
2164 * omap_hwmod_parse_module_range - map module IO range from device tree 2195 * omap_hwmod_parse_module_range - map module IO range from device tree
2165 * @oh: struct omap_hwmod * 2196 * @oh: struct omap_hwmod *
2166 * @np: struct device_node * 2197 * @np: struct device_node *
@@ -2220,7 +2251,13 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh,
2220 size = be32_to_cpup(ranges); 2251 size = be32_to_cpup(ranges);
2221 2252
2222 pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n", 2253 pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n",
2223 oh->name, np->name, base, size); 2254 oh ? oh->name : "", np->name, base, size);
2255
2256 if (oh && oh->mpu_rt_idx) {
2257 omap_hwmod_fix_mpu_rt_idx(oh, np, res);
2258
2259 return 0;
2260 }
2224 2261
2225 res->start = base; 2262 res->start = base;
2226 res->end = base + size - 1; 2263 res->end = base + size - 1;
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 9d5595c4ad99..594901f3b8e5 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -219,17 +219,6 @@ static void gta02_udc_vbus_draw(unsigned int ma)
219#define gta02_udc_vbus_draw NULL 219#define gta02_udc_vbus_draw NULL
220#endif 220#endif
221 221
222/*
223 * This is called when pc50633 is probed, unfortunately quite late in the
224 * day since it is an I2C bus device. Here we can belatedly define some
225 * platform devices with the advantage that we can mark the pcf50633 as the
226 * parent. This makes them get suspended and resumed with their parent
227 * the pcf50633 still around.
228 */
229
230static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf);
231
232
233static char *gta02_batteries[] = { 222static char *gta02_batteries[] = {
234 "battery", 223 "battery",
235}; 224};
@@ -355,7 +344,6 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
355 }, 344 },
356 345
357 }, 346 },
358 .probe_done = gta02_pmu_attach_child_devices,
359 .mbc_event_callback = gta02_pmu_event_callback, 347 .mbc_event_callback = gta02_pmu_event_callback,
360}; 348};
361 349
@@ -512,36 +500,6 @@ static struct platform_device *gta02_devices[] __initdata = {
512 &s3c_device_ts, 500 &s3c_device_ts,
513}; 501};
514 502
515/* These guys DO need to be children of PMU. */
516
517static struct platform_device *gta02_devices_pmu_children[] = {
518};
519
520
521/*
522 * This is called when pc50633 is probed, quite late in the day since it is an
523 * I2C bus device. Here we can define platform devices with the advantage that
524 * we can mark the pcf50633 as the parent. This makes them get suspended and
525 * resumed with their parent the pcf50633 still around. All devices whose
526 * operation depends on something from pcf50633 must have this relationship
527 * made explicit like this, or suspend and resume will become an unreliable
528 * hellworld.
529 */
530
531static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf)
532{
533 int n;
534
535 /* Grab a copy of the now probed PMU pointer. */
536 gta02_pcf = pcf;
537
538 for (n = 0; n < ARRAY_SIZE(gta02_devices_pmu_children); n++)
539 gta02_devices_pmu_children[n]->dev.parent = pcf->dev;
540
541 platform_add_devices(gta02_devices_pmu_children,
542 ARRAY_SIZE(gta02_devices_pmu_children));
543}
544
545static void gta02_poweroff(void) 503static void gta02_poweroff(void)
546{ 504{
547 pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1); 505 pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1);
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index f9fc1f8d2b28..50d67d760efd 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -64,31 +64,31 @@ static struct map_desc mini2440_iodesc[] __initdata = {
64}; 64};
65 65
66#define UCON S3C2410_UCON_DEFAULT 66#define UCON S3C2410_UCON_DEFAULT
67#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB 67#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
68#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE 68#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
69 69
70 70
71static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = { 71static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = {
72 [0] = { 72 [0] = {
73 .hwport = 0, 73 .hwport = 0,
74 .flags = 0, 74 .flags = 0,
75 .ucon = UCON, 75 .ucon = UCON,
76 .ulcon = ULCON, 76 .ulcon = ULCON,
77 .ufcon = UFCON, 77 .ufcon = UFCON,
78 }, 78 },
79 [1] = { 79 [1] = {
80 .hwport = 1, 80 .hwport = 1,
81 .flags = 0, 81 .flags = 0,
82 .ucon = UCON, 82 .ucon = UCON,
83 .ulcon = ULCON, 83 .ulcon = ULCON,
84 .ufcon = UFCON, 84 .ufcon = UFCON,
85 }, 85 },
86 [2] = { 86 [2] = {
87 .hwport = 2, 87 .hwport = 2,
88 .flags = 0, 88 .flags = 0,
89 .ucon = UCON, 89 .ucon = UCON,
90 .ulcon = ULCON, 90 .ulcon = ULCON,
91 .ufcon = UFCON, 91 .ufcon = UFCON,
92 }, 92 },
93}; 93};
94 94
@@ -104,8 +104,8 @@ static struct s3c2410_udc_mach_info mini2440_udc_cfg __initdata = {
104/* 104/*
105 * This macro simplifies the table bellow 105 * This macro simplifies the table bellow
106 */ 106 */
107#define _LCD_DECLARE(_clock,_xres,margin_left,margin_right,hsync, \ 107#define _LCD_DECLARE(_clock, _xres, margin_left, margin_right, hsync, \
108 _yres,margin_top,margin_bottom,vsync, refresh) \ 108 _yres, margin_top, margin_bottom, vsync, refresh) \
109 .width = _xres, \ 109 .width = _xres, \
110 .xres = _xres, \ 110 .xres = _xres, \
111 .height = _yres, \ 111 .height = _yres, \
@@ -128,7 +128,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
128 [0] = { /* mini2440 + 3.5" TFT + touchscreen */ 128 [0] = { /* mini2440 + 3.5" TFT + touchscreen */
129 _LCD_DECLARE( 129 _LCD_DECLARE(
130 7, /* The 3.5 is quite fast */ 130 7, /* The 3.5 is quite fast */
131 240, 21, 38, 6, /* x timing */ 131 240, 21, 38, 6, /* x timing */
132 320, 4, 4, 2, /* y timing */ 132 320, 4, 4, 2, /* y timing */
133 60), /* refresh rate */ 133 60), /* refresh rate */
134 .lcdcon5 = (S3C2410_LCDCON5_FRM565 | 134 .lcdcon5 = (S3C2410_LCDCON5_FRM565 |
@@ -140,7 +140,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
140 [1] = { /* mini2440 + 7" TFT + touchscreen */ 140 [1] = { /* mini2440 + 7" TFT + touchscreen */
141 _LCD_DECLARE( 141 _LCD_DECLARE(
142 10, /* the 7" runs slower */ 142 10, /* the 7" runs slower */
143 800, 40, 40, 48, /* x timing */ 143 800, 40, 40, 48, /* x timing */
144 480, 29, 3, 3, /* y timing */ 144 480, 29, 3, 3, /* y timing */
145 50), /* refresh rate */ 145 50), /* refresh rate */
146 .lcdcon5 = (S3C2410_LCDCON5_FRM565 | 146 .lcdcon5 = (S3C2410_LCDCON5_FRM565 |
@@ -148,7 +148,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
148 S3C2410_LCDCON5_INVVFRAME | 148 S3C2410_LCDCON5_INVVFRAME |
149 S3C2410_LCDCON5_PWREN), 149 S3C2410_LCDCON5_PWREN),
150 }, 150 },
151 /* The VGA shield can outout at several resolutions. All share 151 /* The VGA shield can outout at several resolutions. All share
152 * the same timings, however, anything smaller than 1024x768 152 * the same timings, however, anything smaller than 1024x768
153 * will only be displayed in the top left corner of a 1024x768 153 * will only be displayed in the top left corner of a 1024x768
154 * XGA output unless you add optional dip switches to the shield. 154 * XGA output unless you add optional dip switches to the shield.
@@ -158,9 +158,10 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
158 _LCD_DECLARE( 158 _LCD_DECLARE(
159 10, 159 10,
160 1024, 1, 2, 2, /* y timing */ 160 1024, 1, 2, 2, /* y timing */
161 768, 200, 16, 16, /* x timing */ 161 768, 200, 16, 16, /* x timing */
162 24), /* refresh rate, maximum stable, 162 24), /* refresh rate, maximum stable,
163 tested with the FPGA shield */ 163 * tested with the FPGA shield
164 */
164 .lcdcon5 = (S3C2410_LCDCON5_FRM565 | 165 .lcdcon5 = (S3C2410_LCDCON5_FRM565 |
165 S3C2410_LCDCON5_HWSWP), 166 S3C2410_LCDCON5_HWSWP),
166 }, 167 },
@@ -196,7 +197,8 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
196 197
197 /* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN 198 /* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN
198 * and disable the pull down resistors on pins we are using for LCD 199 * and disable the pull down resistors on pins we are using for LCD
199 * data. */ 200 * data.
201 */
200 202
201 .gpcup = (0xf << 1) | (0x3f << 10), 203 .gpcup = (0xf << 1) | (0x3f << 10),
202 204
@@ -232,10 +234,11 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
232/* MMC/SD */ 234/* MMC/SD */
233 235
234static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = { 236static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
235 .gpio_detect = S3C2410_GPG(8), 237 .gpio_detect = S3C2410_GPG(8),
236 .gpio_wprotect = S3C2410_GPH(8), 238 .gpio_wprotect = S3C2410_GPH(8),
237 .set_power = NULL, 239 .wprotect_invert = 1,
238 .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34, 240 .set_power = NULL,
241 .ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34,
239}; 242};
240 243
241/* NAND Flash on MINI2440 board */ 244/* NAND Flash on MINI2440 board */
@@ -254,7 +257,8 @@ static struct mtd_partition mini2440_default_nand_part[] __initdata = {
254 [2] = { 257 [2] = {
255 .name = "kernel", 258 .name = "kernel",
256 /* 5 megabytes, for a kernel with no modules 259 /* 5 megabytes, for a kernel with no modules
257 * or a uImage with a ramdisk attached */ 260 * or a uImage with a ramdisk attached
261 */
258 .size = 0x00500000, 262 .size = 0x00500000,
259 .offset = SZ_256K + SZ_128K, 263 .offset = SZ_256K + SZ_128K,
260 }, 264 },
@@ -271,7 +275,7 @@ static struct s3c2410_nand_set mini2440_nand_sets[] __initdata = {
271 .nr_chips = 1, 275 .nr_chips = 1,
272 .nr_partitions = ARRAY_SIZE(mini2440_default_nand_part), 276 .nr_partitions = ARRAY_SIZE(mini2440_default_nand_part),
273 .partitions = mini2440_default_nand_part, 277 .partitions = mini2440_default_nand_part,
274 .flash_bbt = 1, /* we use u-boot to create a BBT */ 278 .flash_bbt = 1, /* we use u-boot to create a BBT */
275 }, 279 },
276}; 280};
277 281
@@ -282,7 +286,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
282 .nr_sets = ARRAY_SIZE(mini2440_nand_sets), 286 .nr_sets = ARRAY_SIZE(mini2440_nand_sets),
283 .sets = mini2440_nand_sets, 287 .sets = mini2440_nand_sets,
284 .ignore_unset_ecc = 1, 288 .ignore_unset_ecc = 1,
285 .ecc_mode = NAND_ECC_HW, 289 .ecc_mode = NAND_ECC_HW,
286}; 290};
287 291
288/* DM9000AEP 10/100 ethernet controller */ 292/* DM9000AEP 10/100 ethernet controller */
@@ -290,7 +294,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
290static struct resource mini2440_dm9k_resource[] = { 294static struct resource mini2440_dm9k_resource[] = {
291 [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4), 295 [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4),
292 [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4), 296 [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4),
293 [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \ 297 [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ
294 | IORESOURCE_IRQ_HIGHEDGE), 298 | IORESOURCE_IRQ_HIGHEDGE),
295}; 299};
296 300
@@ -362,7 +366,8 @@ static struct gpio_keys_button mini2440_buttons[] = {
362 }, 366 },
363#if 0 367#if 0
364 /* this pin is also known as TCLK1 and seems to already 368 /* this pin is also known as TCLK1 and seems to already
365 * marked as "in use" somehow in the kernel -- possibly wrongly */ 369 * marked as "in use" somehow in the kernel -- possibly wrongly
370 */
366 { 371 {
367 .gpio = S3C2410_GPG(11), /* K6 */ 372 .gpio = S3C2410_GPG(11), /* K6 */
368 .code = KEY_F6, 373 .code = KEY_F6,
@@ -564,7 +569,8 @@ static char mini2440_features_str[12] __initdata = "0tb";
564static int __init mini2440_features_setup(char *str) 569static int __init mini2440_features_setup(char *str)
565{ 570{
566 if (str) 571 if (str)
567 strlcpy(mini2440_features_str, str, sizeof(mini2440_features_str)); 572 strlcpy(mini2440_features_str, str,
573 sizeof(mini2440_features_str));
568 return 1; 574 return 1;
569} 575}
570 576
@@ -583,10 +589,10 @@ struct mini2440_features_t {
583}; 589};
584 590
585static void __init mini2440_parse_features( 591static void __init mini2440_parse_features(
586 struct mini2440_features_t * features, 592 struct mini2440_features_t *features,
587 const char * features_str ) 593 const char *features_str)
588{ 594{
589 const char * fp = features_str; 595 const char *fp = features_str;
590 596
591 features->count = 0; 597 features->count = 0;
592 features->done = 0; 598 features->done = 0;
@@ -598,13 +604,14 @@ static void __init mini2440_parse_features(
598 switch (f) { 604 switch (f) {
599 case '0'...'9': /* tft screen */ 605 case '0'...'9': /* tft screen */
600 if (features->done & FEATURE_SCREEN) { 606 if (features->done & FEATURE_SCREEN) {
601 printk(KERN_INFO "MINI2440: '%c' ignored, " 607 pr_info("MINI2440: '%c' ignored, screen type already set\n",
602 "screen type already set\n", f); 608 f);
603 } else { 609 } else {
604 int li = f - '0'; 610 int li = f - '0';
611
605 if (li >= ARRAY_SIZE(mini2440_lcd_cfg)) 612 if (li >= ARRAY_SIZE(mini2440_lcd_cfg))
606 printk(KERN_INFO "MINI2440: " 613 pr_info("MINI2440: '%c' out of range LCD mode\n",
607 "'%c' out of range LCD mode\n", f); 614 f);
608 else { 615 else {
609 features->optional[features->count++] = 616 features->optional[features->count++] =
610 &s3c_device_lcd; 617 &s3c_device_lcd;
@@ -615,8 +622,8 @@ static void __init mini2440_parse_features(
615 break; 622 break;
616 case 'b': 623 case 'b':
617 if (features->done & FEATURE_BACKLIGHT) 624 if (features->done & FEATURE_BACKLIGHT)
618 printk(KERN_INFO "MINI2440: '%c' ignored, " 625 pr_info("MINI2440: '%c' ignored, backlight already set\n",
619 "backlight already set\n", f); 626 f);
620 else { 627 else {
621 features->optional[features->count++] = 628 features->optional[features->count++] =
622 &mini2440_led_backlight; 629 &mini2440_led_backlight;
@@ -624,13 +631,13 @@ static void __init mini2440_parse_features(
624 features->done |= FEATURE_BACKLIGHT; 631 features->done |= FEATURE_BACKLIGHT;
625 break; 632 break;
626 case 't': 633 case 't':
627 printk(KERN_INFO "MINI2440: '%c' ignored, " 634 pr_info("MINI2440: '%c' ignored, touchscreen not compiled in\n",
628 "touchscreen not compiled in\n", f); 635 f);
629 break; 636 break;
630 case 'c': 637 case 'c':
631 if (features->done & FEATURE_CAMERA) 638 if (features->done & FEATURE_CAMERA)
632 printk(KERN_INFO "MINI2440: '%c' ignored, " 639 pr_info("MINI2440: '%c' ignored, camera already registered\n",
633 "camera already registered\n", f); 640 f);
634 else 641 else
635 features->optional[features->count++] = 642 features->optional[features->count++] =
636 &s3c_device_camif; 643 &s3c_device_camif;
@@ -645,7 +652,7 @@ static void __init mini2440_init(void)
645 struct mini2440_features_t features = { 0 }; 652 struct mini2440_features_t features = { 0 };
646 int i; 653 int i;
647 654
648 printk(KERN_INFO "MINI2440: Option string mini2440=%s\n", 655 pr_info("MINI2440: Option string mini2440=%s\n",
649 mini2440_features_str); 656 mini2440_features_str);
650 657
651 /* Parse the feature string */ 658 /* Parse the feature string */
@@ -674,17 +681,17 @@ static void __init mini2440_init(void)
674 mini2440_fb_info.displays = 681 mini2440_fb_info.displays =
675 &mini2440_lcd_cfg[features.lcd_index]; 682 &mini2440_lcd_cfg[features.lcd_index];
676 683
677 printk(KERN_INFO "MINI2440: LCD"); 684 pr_info("MINI2440: LCD");
678 for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++) 685 for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
679 if (li == features.lcd_index) 686 if (li == features.lcd_index)
680 printk(" [%d:%dx%d]", li, 687 pr_cont(" [%d:%dx%d]", li,
681 mini2440_lcd_cfg[li].width, 688 mini2440_lcd_cfg[li].width,
682 mini2440_lcd_cfg[li].height); 689 mini2440_lcd_cfg[li].height);
683 else 690 else
684 printk(" %d:%dx%d", li, 691 pr_cont(" %d:%dx%d", li,
685 mini2440_lcd_cfg[li].width, 692 mini2440_lcd_cfg[li].width,
686 mini2440_lcd_cfg[li].height); 693 mini2440_lcd_cfg[li].height);
687 printk("\n"); 694 pr_cont("\n");
688 s3c24xx_fb_set_platdata(&mini2440_fb_info); 695 s3c24xx_fb_set_platdata(&mini2440_fb_info);
689 } 696 }
690 697
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 29e75b47becd..1b1a0e95c751 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -763,7 +763,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
763 763
764config HOLES_IN_ZONE 764config HOLES_IN_ZONE
765 def_bool y 765 def_bool y
766 depends on NUMA
767 766
768source kernel/Kconfig.hz 767source kernel/Kconfig.hz
769 768
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 9ffa7a038791..8d4f97f279e0 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -4,10 +4,13 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-bananapi-m64.dtb
4dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb 4dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb
5dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb 5dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb
6dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb 6dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb
7dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-lts.dtb
7dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb 8dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
8dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb 9dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
9dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb 10dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
10dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb 11dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
12dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb
13dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus-v1.2.dtb
11dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-cc.dtb 14dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-cc.dtb
12dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb 15dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
13dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb 16dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
@@ -15,4 +18,5 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb
15dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb 18dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb
16dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb 19dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus.dtb
17dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb 20dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-zero-plus2.dtb
21dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
18dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb 22dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
index eac4793c8502..6cb2b7f0c817 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-amarula-relic.dts
@@ -203,7 +203,7 @@
203 203
204&uart0 { 204&uart0 {
205 pinctrl-names = "default"; 205 pinctrl-names = "default";
206 pinctrl-0 = <&uart0_pins_a>; 206 pinctrl-0 = <&uart0_pb_pins>;
207 status = "okay"; 207 status = "okay";
208}; 208};
209 209
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 094cfed13df9..ef1c90401bb2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -60,6 +60,17 @@
60 stdout-path = "serial0:115200n8"; 60 stdout-path = "serial0:115200n8";
61 }; 61 };
62 62
63 hdmi-connector {
64 compatible = "hdmi-connector";
65 type = "a";
66
67 port {
68 hdmi_con_in: endpoint {
69 remote-endpoint = <&hdmi_out_con>;
70 };
71 };
72 };
73
63 leds { 74 leds {
64 compatible = "gpio-leds"; 75 compatible = "gpio-leds";
65 76
@@ -86,6 +97,10 @@
86 }; 97 };
87}; 98};
88 99
100&de {
101 status = "okay";
102};
103
89&ehci0 { 104&ehci0 {
90 status = "okay"; 105 status = "okay";
91}; 106};
@@ -103,6 +118,17 @@
103 status = "okay"; 118 status = "okay";
104}; 119};
105 120
121&hdmi {
122 hvcc-supply = <&reg_dldo1>;
123 status = "okay";
124};
125
126&hdmi_out {
127 hdmi_out_con: endpoint {
128 remote-endpoint = <&hdmi_con_in>;
129 };
130};
131
106&i2c1 { 132&i2c1 {
107 pinctrl-names = "default"; 133 pinctrl-names = "default";
108 pinctrl-0 = <&i2c1_pins>; 134 pinctrl-0 = <&i2c1_pins>;
@@ -151,7 +177,7 @@
151 177
152&mmc2 { 178&mmc2 {
153 pinctrl-names = "default"; 179 pinctrl-names = "default";
154 pinctrl-0 = <&mmc2_pins>; 180 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
155 vmmc-supply = <&reg_dcdc1>; 181 vmmc-supply = <&reg_dcdc1>;
156 bus-width = <8>; 182 bus-width = <8>;
157 non-removable; 183 non-removable;
@@ -302,7 +328,7 @@
302 328
303&uart0 { 329&uart0 {
304 pinctrl-names = "default"; 330 pinctrl-names = "default";
305 pinctrl-0 = <&uart0_pins_a>; 331 pinctrl-0 = <&uart0_pb_pins>;
306 status = "okay"; 332 status = "okay";
307}; 333};
308 334
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
index 98dbff19f5cc..31884dbc8838 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-nanopi-a64.dts
@@ -51,12 +51,44 @@
51 compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64"; 51 compatible = "friendlyarm,nanopi-a64", "allwinner,sun50i-a64";
52 52
53 aliases { 53 aliases {
54 ethernet0 = &emac;
54 serial0 = &uart0; 55 serial0 = &uart0;
55 }; 56 };
56 57
57 chosen { 58 chosen {
58 stdout-path = "serial0:115200n8"; 59 stdout-path = "serial0:115200n8";
59 }; 60 };
61
62 hdmi-connector {
63 compatible = "hdmi-connector";
64 type = "a";
65
66 port {
67 hdmi_con_in: endpoint {
68 remote-endpoint = <&hdmi_out_con>;
69 };
70 };
71 };
72
73 leds {
74 compatible = "gpio-leds";
75
76 blue {
77 label = "nanopi-a64:blue:status";
78 gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
79 };
80 };
81
82 wifi_pwrseq: wifi_pwrseq {
83 compatible = "mmc-pwrseq-simple";
84 clocks = <&rtc 1>;
85 clock-names = "ext_clock";
86 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
87 };
88};
89
90&de {
91 status = "okay";
60}; 92};
61 93
62&ehci0 { 94&ehci0 {
@@ -67,6 +99,26 @@
67 status = "okay"; 99 status = "okay";
68}; 100};
69 101
102&emac {
103 pinctrl-names = "default";
104 pinctrl-0 = <&rgmii_pins>;
105 phy-mode = "rgmii";
106 phy-handle = <&ext_rgmii_phy>;
107 phy-supply = <&reg_dcdc1>;
108 status = "okay";
109};
110
111&hdmi {
112 hvcc-supply = <&reg_dldo1>;
113 status = "okay";
114};
115
116&hdmi_out {
117 hdmi_out_con: endpoint {
118 remote-endpoint = <&hdmi_con_in>;
119 };
120};
121
70/* i2c1 connected with gpio headers like pine64, bananapi */ 122/* i2c1 connected with gpio headers like pine64, bananapi */
71&i2c1 { 123&i2c1 {
72 pinctrl-names = "default"; 124 pinctrl-names = "default";
@@ -78,6 +130,13 @@
78 bias-pull-up; 130 bias-pull-up;
79}; 131};
80 132
133&mdio {
134 ext_rgmii_phy: ethernet-phy@1 {
135 compatible = "ethernet-phy-ieee802.3-c22";
136 reg = <7>;
137 };
138};
139
81&mmc0 { 140&mmc0 {
82 pinctrl-names = "default"; 141 pinctrl-names = "default";
83 pinctrl-0 = <&mmc0_pins>; 142 pinctrl-0 = <&mmc0_pins>;
@@ -88,6 +147,24 @@
88 status = "okay"; 147 status = "okay";
89}; 148};
90 149
150&mmc1 {
151 pinctrl-names = "default";
152 pinctrl-0 = <&mmc1_pins>;
153 vmmc-supply = <&reg_dcdc1>;
154 vqmmc-supply = <&reg_dldo4>;
155 mmc-pwrseq = <&wifi_pwrseq>;
156 bus-width = <4>;
157 non-removable;
158 status = "okay";
159
160 rtl8189etv: wifi@1 {
161 reg = <1>;
162 interrupt-parent = <&r_pio>;
163 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
164 interrupt-names = "host-wake";
165 };
166};
167
91&ohci0 { 168&ohci0 {
92 status = "okay"; 169 status = "okay";
93}; 170};
@@ -125,9 +202,9 @@
125 202
126&reg_dcdc1 { 203&reg_dcdc1 {
127 regulator-always-on; 204 regulator-always-on;
128 regulator-min-microvolt = <3000000>; 205 regulator-min-microvolt = <3300000>;
129 regulator-max-microvolt = <3000000>; 206 regulator-max-microvolt = <3300000>;
130 regulator-name = "vcc-3v"; 207 regulator-name = "vcc-3v3";
131}; 208};
132 209
133&reg_dcdc2 { 210&reg_dcdc2 {
@@ -201,7 +278,7 @@
201 278
202&uart0 { 279&uart0 {
203 pinctrl-names = "default"; 280 pinctrl-names = "default";
204 pinctrl-0 = <&uart0_pins_a>; 281 pinctrl-0 = <&uart0_pb_pins>;
205 status = "okay"; 282 status = "okay";
206}; 283};
207 284
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index 3f531393eaee..f7a4bccaa5d4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -51,6 +51,7 @@
51 compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64"; 51 compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
52 52
53 aliases { 53 aliases {
54 ethernet0 = &emac;
54 serial0 = &uart0; 55 serial0 = &uart0;
55 }; 56 };
56 57
@@ -58,12 +59,74 @@
58 stdout-path = "serial0:115200n8"; 59 stdout-path = "serial0:115200n8";
59 }; 60 };
60 61
62 hdmi-connector {
63 compatible = "hdmi-connector";
64 type = "a";
65
66 port {
67 hdmi_con_in: endpoint {
68 remote-endpoint = <&hdmi_out_con>;
69 };
70 };
71 };
72
73 reg_usb1_vbus: usb1-vbus {
74 compatible = "regulator-fixed";
75 regulator-name = "usb1-vbus";
76 regulator-min-microvolt = <5000000>;
77 regulator-max-microvolt = <5000000>;
78 regulator-boot-on;
79 enable-active-high;
80 gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
81 status = "okay";
82 };
83
61 wifi_pwrseq: wifi_pwrseq { 84 wifi_pwrseq: wifi_pwrseq {
62 compatible = "mmc-pwrseq-simple"; 85 compatible = "mmc-pwrseq-simple";
63 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 86 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
64 }; 87 };
65}; 88};
66 89
90&de {
91 status = "okay";
92};
93
94&ehci0 {
95 status = "okay";
96};
97
98&ehci1 {
99 status = "okay";
100};
101
102&emac {
103 pinctrl-names = "default";
104 pinctrl-0 = <&rgmii_pins>;
105 phy-mode = "rgmii";
106 phy-handle = <&ext_rgmii_phy>;
107 phy-supply = <&reg_dcdc1>;
108 allwinner,tx-delay-ps = <600>;
109 status = "okay";
110};
111
112&hdmi {
113 hvcc-supply = <&reg_dldo1>;
114 status = "okay";
115};
116
117&hdmi_out {
118 hdmi_out_con: endpoint {
119 remote-endpoint = <&hdmi_con_in>;
120 };
121};
122
123&mdio {
124 ext_rgmii_phy: ethernet-phy@1 {
125 compatible = "ethernet-phy-ieee802.3-c22";
126 reg = <1>;
127 };
128};
129
67&mmc0 { 130&mmc0 {
68 pinctrl-names = "default"; 131 pinctrl-names = "default";
69 pinctrl-0 = <&mmc0_pins>; 132 pinctrl-0 = <&mmc0_pins>;
@@ -92,6 +155,14 @@
92 }; 155 };
93}; 156};
94 157
158&ohci0 {
159 status = "okay";
160};
161
162&ohci1 {
163 status = "okay";
164};
165
95&r_rsb { 166&r_rsb {
96 status = "okay"; 167 status = "okay";
97 168
@@ -100,6 +171,7 @@
100 reg = <0x3a3>; 171 reg = <0x3a3>;
101 interrupt-parent = <&r_intc>; 172 interrupt-parent = <&r_intc>;
102 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 173 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
174 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
103 }; 175 };
104}; 176};
105 177
@@ -142,10 +214,14 @@
142 214
143/* DCDC3 is polyphased with DCDC2 */ 215/* DCDC3 is polyphased with DCDC2 */
144 216
217/*
218 * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
219 * 1.35V that the PMIC can drive.
220 */
145&reg_dcdc5 { 221&reg_dcdc5 {
146 regulator-always-on; 222 regulator-always-on;
147 regulator-min-microvolt = <1500000>; 223 regulator-min-microvolt = <1360000>;
148 regulator-max-microvolt = <1500000>; 224 regulator-max-microvolt = <1360000>;
149 regulator-name = "vcc-ddr3"; 225 regulator-name = "vcc-ddr3";
150}; 226};
151 227
@@ -180,6 +256,11 @@
180 regulator-name = "vcc-wifi-io"; 256 regulator-name = "vcc-wifi-io";
181}; 257};
182 258
259&reg_drivevbus {
260 regulator-name = "usb0-vbus";
261 status = "okay";
262};
263
183&reg_eldo1 { 264&reg_eldo1 {
184 regulator-min-microvolt = <1800000>; 265 regulator-min-microvolt = <1800000>;
185 regulator-max-microvolt = <1800000>; 266 regulator-max-microvolt = <1800000>;
@@ -220,6 +301,18 @@
220 301
221&uart0 { 302&uart0 {
222 pinctrl-names = "default"; 303 pinctrl-names = "default";
223 pinctrl-0 = <&uart0_pins_a>; 304 pinctrl-0 = <&uart0_pb_pins>;
305 status = "okay";
306};
307
308&usb_otg {
309 dr_mode = "otg";
310 status = "okay";
311};
312
313&usbphy {
224 status = "okay"; 314 status = "okay";
315 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
316 usb0_vbus-supply = <&reg_drivevbus>;
317 usb1_vbus-supply = <&reg_usb1_vbus>;
225}; 318};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
index 1221764f5719..b0c64f75792c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com> 2 * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
3 * Copyright (C) 2017-2018 Samuel Holland <samuel@sholland.org>
3 * 4 *
4 * This file is dual-licensed: you can use it either under the terms 5 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual 6 * of the GPL or the X11 license, at your option. Note that this dual
@@ -51,23 +52,127 @@
51 compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64"; 52 compatible = "xunlong,orangepi-win", "allwinner,sun50i-a64";
52 53
53 aliases { 54 aliases {
55 ethernet0 = &emac;
54 serial0 = &uart0; 56 serial0 = &uart0;
57 serial1 = &uart1;
58 serial2 = &uart2;
59 serial3 = &uart3;
60 serial4 = &uart4;
55 }; 61 };
56 62
57 chosen { 63 chosen {
58 stdout-path = "serial0:115200n8"; 64 stdout-path = "serial0:115200n8";
59 }; 65 };
66
67 hdmi-connector {
68 compatible = "hdmi-connector";
69 type = "a";
70
71 port {
72 hdmi_con_in: endpoint {
73 remote-endpoint = <&hdmi_out_con>;
74 };
75 };
76 };
77
78 leds {
79 compatible = "gpio-leds";
80
81 status {
82 label = "orangepi:green:status";
83 gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
84 };
85 };
86
87 reg_gmac_3v3: gmac-3v3 {
88 compatible = "regulator-fixed";
89 regulator-name = "gmac-3v3";
90 regulator-min-microvolt = <3300000>;
91 regulator-max-microvolt = <3300000>;
92 regulator-boot-on;
93 enable-active-high;
94 gpio = <&pio 3 14 GPIO_ACTIVE_HIGH>; /* PD14 */
95 status = "okay";
96 };
97
98 reg_usb1_vbus: usb1-vbus {
99 compatible = "regulator-fixed";
100 regulator-name = "usb1-vbus";
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103 regulator-boot-on;
104 enable-active-high;
105 gpio = <&pio 3 7 GPIO_ACTIVE_HIGH>; /* PD7 */
106 status = "okay";
107 };
108
109 wifi_pwrseq: wifi_pwrseq {
110 compatible = "mmc-pwrseq-simple";
111 reset-gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
112 };
113};
114
115&de {
116 status = "okay";
117};
118
119&ehci0 {
120 status = "okay";
60}; 121};
61 122
62&ehci1 { 123&ehci1 {
63 status = "okay"; 124 status = "okay";
64}; 125};
65 126
127&emac {
128 pinctrl-names = "default";
129 pinctrl-0 = <&rgmii_pins>;
130 phy-mode = "rgmii";
131 phy-handle = <&ext_rgmii_phy>;
132 phy-supply = <&reg_gmac_3v3>;
133 status = "okay";
134};
135
136&hdmi {
137 hvcc-supply = <&reg_dldo1>;
138 status = "okay";
139};
140
141&hdmi_out {
142 hdmi_out_con: endpoint {
143 remote-endpoint = <&hdmi_con_in>;
144 };
145};
146
147&mdio {
148 ext_rgmii_phy: ethernet-phy@1 {
149 compatible = "ethernet-phy-ieee802.3-c22";
150 reg = <1>;
151 };
152};
153
66&mmc0 { 154&mmc0 {
67 pinctrl-names = "default"; 155 pinctrl-names = "default";
68 pinctrl-0 = <&mmc0_pins>; 156 pinctrl-0 = <&mmc0_pins>;
69 vmmc-supply = <&reg_dcdc1>; 157 vmmc-supply = <&reg_dcdc1>;
70 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 158 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
159 disable-wp;
160 bus-width = <4>;
161 status = "okay";
162};
163
164&mmc1 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&mmc1_pins>;
167 vmmc-supply = <&reg_dldo2>;
168 vqmmc-supply = <&reg_dldo4>;
169 mmc-pwrseq = <&wifi_pwrseq>;
170 bus-width = <4>;
171 non-removable;
172 status = "okay";
173};
174
175&ohci0 {
71 status = "okay"; 176 status = "okay";
72}; 177};
73 178
@@ -89,9 +194,8 @@
89#include "axp803.dtsi" 194#include "axp803.dtsi"
90 195
91&reg_aldo1 { 196&reg_aldo1 {
92 regulator-always-on; 197 regulator-min-microvolt = <2800000>;
93 regulator-min-microvolt = <1800000>; 198 regulator-max-microvolt = <2800000>;
94 regulator-max-microvolt = <3300000>;
95 regulator-name = "afvcc-csi"; 199 regulator-name = "afvcc-csi";
96}; 200};
97 201
@@ -163,12 +267,23 @@
163 regulator-name = "vcc-wifi-io"; 267 regulator-name = "vcc-wifi-io";
164}; 268};
165 269
270&reg_drivevbus {
271 regulator-name = "usb0-vbus";
272 status = "okay";
273};
274
166&reg_eldo1 { 275&reg_eldo1 {
167 regulator-min-microvolt = <1800000>; 276 regulator-min-microvolt = <1800000>;
168 regulator-max-microvolt = <1800000>; 277 regulator-max-microvolt = <1800000>;
169 regulator-name = "cpvdd"; 278 regulator-name = "cpvdd";
170}; 279};
171 280
281&reg_eldo3 {
282 regulator-min-microvolt = <1500000>;
283 regulator-max-microvolt = <1800000>;
284 regulator-name = "dvdd-csi";
285};
286
172&reg_fldo1 { 287&reg_fldo1 {
173 regulator-min-microvolt = <1200000>; 288 regulator-min-microvolt = <1200000>;
174 regulator-max-microvolt = <1200000>; 289 regulator-max-microvolt = <1200000>;
@@ -195,13 +310,61 @@
195 vcc-hdmi-supply = <&reg_dldo1>; 310 vcc-hdmi-supply = <&reg_dldo1>;
196}; 311};
197 312
313&spi0 {
314 status = "okay";
315
316 spi-flash@0 {
317 compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
318 reg = <0>;
319 spi-max-frequency = <80000000>;
320 m25p,fast-read;
321 status = "okay";
322 };
323};
324
325/* On debug connector */
198&uart0 { 326&uart0 {
199 pinctrl-names = "default"; 327 pinctrl-names = "default";
200 pinctrl-0 = <&uart0_pins_a>; 328 pinctrl-0 = <&uart0_pb_pins>;
201 status = "okay"; 329 status = "okay";
202}; 330};
203 331
204&usbphy { 332/* Bluetooth */
333&uart1 {
334 pinctrl-names = "default";
335 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
205 status = "okay"; 336 status = "okay";
206}; 337};
207 338
339/* On Pi-2 connector, RTS/CTS optional */
340&uart2 {
341 pinctrl-names = "default";
342 pinctrl-0 = <&uart2_pins>;
343 status = "disabled";
344};
345
346/* On Pi-2 connector, RTS/CTS optional */
347&uart3 {
348 pinctrl-names = "default";
349 pinctrl-0 = <&uart3_pins>;
350 status = "disabled";
351};
352
353/* On Pi-2 connector (labeled for SPI1), RTS/CTS optional */
354&uart4 {
355 pinctrl-names = "default";
356 pinctrl-0 = <&uart4_pins>;
357 status = "disabled";
358};
359
360&usb_otg {
361 dr_mode = "otg";
362 status = "okay";
363};
364
365&usbphy {
366 usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
367 usb0_vbus-supply = <&reg_drivevbus>;
368 usb1_vbus-supply = <&reg_usb1_vbus>;
369 status = "okay";
370};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
new file mode 100644
index 000000000000..72d6961dc312
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts
@@ -0,0 +1,13 @@
1/*
2 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 *
4 * Copyright (c) 2018 ARM Ltd.
5 */
6
7#include "sun50i-a64-sopine-baseboard.dts"
8
9/ {
10 model = "Pine64 LTS";
11 compatible = "pine64,pine64-lts", "allwinner,sun50i-r18",
12 "allwinner,sun50i-a64";
13};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 1b9b92e541d2..c077b6c1f458 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -62,6 +62,21 @@
62 chosen { 62 chosen {
63 stdout-path = "serial0:115200n8"; 63 stdout-path = "serial0:115200n8";
64 }; 64 };
65
66 hdmi-connector {
67 compatible = "hdmi-connector";
68 type = "a";
69
70 port {
71 hdmi_con_in: endpoint {
72 remote-endpoint = <&hdmi_out_con>;
73 };
74 };
75 };
76};
77
78&de {
79 status = "okay";
65}; 80};
66 81
67&ehci0 { 82&ehci0 {
@@ -82,6 +97,17 @@
82 97
83}; 98};
84 99
100&hdmi {
101 hvcc-supply = <&reg_dldo1>;
102 status = "okay";
103};
104
105&hdmi_out {
106 hdmi_out_con: endpoint {
107 remote-endpoint = <&hdmi_con_in>;
108 };
109};
110
85&i2c1 { 111&i2c1 {
86 pinctrl-names = "default"; 112 pinctrl-names = "default";
87 pinctrl-0 = <&i2c1_pins>; 113 pinctrl-0 = <&i2c1_pins>;
@@ -241,7 +267,7 @@
241/* On Exp and Euler connectors */ 267/* On Exp and Euler connectors */
242&uart0 { 268&uart0 {
243 pinctrl-names = "default"; 269 pinctrl-names = "default";
244 pinctrl-0 = <&uart0_pins_a>; 270 pinctrl-0 = <&uart0_pb_pins>;
245 status = "okay"; 271 status = "okay";
246}; 272};
247 273
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 897e60cbe38d..77fac84797e9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -80,8 +80,7 @@
80 pinctrl-names = "default"; 80 pinctrl-names = "default";
81 pinctrl-0 = <&mmc0_pins>; 81 pinctrl-0 = <&mmc0_pins>;
82 vmmc-supply = <&reg_dcdc1>; 82 vmmc-supply = <&reg_dcdc1>;
83 cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; 83 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
84 cd-inverted;
85 disable-wp; 84 disable-wp;
86 bus-width = <4>; 85 bus-width = <4>;
87 status = "okay"; 86 status = "okay";
@@ -104,7 +103,7 @@
104 103
105&mmc2 { 104&mmc2 {
106 pinctrl-names = "default"; 105 pinctrl-names = "default";
107 pinctrl-0 = <&mmc2_pins>; 106 pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
108 vmmc-supply = <&reg_dcdc1>; 107 vmmc-supply = <&reg_dcdc1>;
109 vqmmc-supply = <&reg_eldo1>; 108 vqmmc-supply = <&reg_eldo1>;
110 bus-width = <8>; 109 bus-width = <8>;
@@ -143,7 +142,7 @@
143&r_i2c { 142&r_i2c {
144 clock-frequency = <100000>; 143 clock-frequency = <100000>;
145 pinctrl-names = "default"; 144 pinctrl-names = "default";
146 pinctrl-0 = <&r_i2c_pins_a>; 145 pinctrl-0 = <&r_i2c_pl89_pins>;
147 status = "okay"; 146 status = "okay";
148}; 147};
149 148
@@ -270,7 +269,7 @@
270 269
271&uart0 { 270&uart0 {
272 pinctrl-names = "default"; 271 pinctrl-names = "default";
273 pinctrl-0 = <&uart0_pins_a>; 272 pinctrl-0 = <&uart0_pb_pins>;
274 status = "okay"; 273 status = "okay";
275}; 274};
276 275
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index c21f2331add6..53fcc9098df3 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -61,6 +61,17 @@
61 stdout-path = "serial0:115200n8"; 61 stdout-path = "serial0:115200n8";
62 }; 62 };
63 63
64 hdmi-connector {
65 compatible = "hdmi-connector";
66 type = "a";
67
68 port {
69 hdmi_con_in: endpoint {
70 remote-endpoint = <&hdmi_out_con>;
71 };
72 };
73 };
74
64 reg_vcc1v8: vcc1v8 { 75 reg_vcc1v8: vcc1v8 {
65 compatible = "regulator-fixed"; 76 compatible = "regulator-fixed";
66 regulator-name = "vcc1v8"; 77 regulator-name = "vcc1v8";
@@ -69,6 +80,10 @@
69 }; 80 };
70}; 81};
71 82
83&de {
84 status = "okay";
85};
86
72&ehci0 { 87&ehci0 {
73 status = "okay"; 88 status = "okay";
74}; 89};
@@ -86,6 +101,17 @@
86 status = "okay"; 101 status = "okay";
87}; 102};
88 103
104&hdmi {
105 hvcc-supply = <&reg_dldo1>;
106 status = "okay";
107};
108
109&hdmi_out {
110 hdmi_out_con: endpoint {
111 remote-endpoint = <&hdmi_con_in>;
112 };
113};
114
89&mdio { 115&mdio {
90 ext_rgmii_phy: ethernet-phy@1 { 116 ext_rgmii_phy: ethernet-phy@1 {
91 compatible = "ethernet-phy-ieee802.3-c22"; 117 compatible = "ethernet-phy-ieee802.3-c22";
@@ -140,7 +166,7 @@
140 166
141&uart0 { 167&uart0 {
142 pinctrl-names = "default"; 168 pinctrl-names = "default";
143 pinctrl-0 = <&uart0_pins_a>; 169 pinctrl-0 = <&uart0_pb_pins>;
144 status = "okay"; 170 status = "okay";
145}; 171};
146 172
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
index 81f8e0098699..c455b24dd079 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts
@@ -260,7 +260,7 @@
260 260
261&uart0 { 261&uart0 {
262 pinctrl-names = "default"; 262 pinctrl-names = "default";
263 pinctrl-0 = <&uart0_pins_a>; 263 pinctrl-0 = <&uart0_pb_pins>;
264 status = "okay"; 264 status = "okay";
265}; 265};
266 266
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index d3daf90a8715..f3a66f888205 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -88,6 +88,7 @@
88 device_type = "cpu"; 88 device_type = "cpu";
89 reg = <0>; 89 reg = <0>;
90 enable-method = "psci"; 90 enable-method = "psci";
91 next-level-cache = <&L2>;
91 }; 92 };
92 93
93 cpu1: cpu@1 { 94 cpu1: cpu@1 {
@@ -95,6 +96,7 @@
95 device_type = "cpu"; 96 device_type = "cpu";
96 reg = <1>; 97 reg = <1>;
97 enable-method = "psci"; 98 enable-method = "psci";
99 next-level-cache = <&L2>;
98 }; 100 };
99 101
100 cpu2: cpu@2 { 102 cpu2: cpu@2 {
@@ -102,6 +104,7 @@
102 device_type = "cpu"; 104 device_type = "cpu";
103 reg = <2>; 105 reg = <2>;
104 enable-method = "psci"; 106 enable-method = "psci";
107 next-level-cache = <&L2>;
105 }; 108 };
106 109
107 cpu3: cpu@3 { 110 cpu3: cpu@3 {
@@ -109,7 +112,20 @@
109 device_type = "cpu"; 112 device_type = "cpu";
110 reg = <3>; 113 reg = <3>;
111 enable-method = "psci"; 114 enable-method = "psci";
115 next-level-cache = <&L2>;
112 }; 116 };
117
118 L2: l2-cache {
119 compatible = "cache";
120 cache-level = <2>;
121 };
122 };
123
124 de: display-engine {
125 compatible = "allwinner,sun50i-a64-display-engine";
126 allwinner,pipelines = <&mixer0>,
127 <&mixer1>;
128 status = "disabled";
113 }; 129 };
114 130
115 osc24M: osc24M_clk { 131 osc24M: osc24M_clk {
@@ -194,6 +210,52 @@
194 #clock-cells = <1>; 210 #clock-cells = <1>;
195 #reset-cells = <1>; 211 #reset-cells = <1>;
196 }; 212 };
213
214 mixer0: mixer@100000 {
215 compatible = "allwinner,sun50i-a64-de2-mixer-0";
216 reg = <0x100000 0x100000>;
217 clocks = <&display_clocks CLK_BUS_MIXER0>,
218 <&display_clocks CLK_MIXER0>;
219 clock-names = "bus",
220 "mod";
221 resets = <&display_clocks RST_MIXER0>;
222
223 ports {
224 #address-cells = <1>;
225 #size-cells = <0>;
226
227 mixer0_out: port@1 {
228 reg = <1>;
229
230 mixer0_out_tcon0: endpoint {
231 remote-endpoint = <&tcon0_in_mixer0>;
232 };
233 };
234 };
235 };
236
237 mixer1: mixer@200000 {
238 compatible = "allwinner,sun50i-a64-de2-mixer-1";
239 reg = <0x200000 0x100000>;
240 clocks = <&display_clocks CLK_BUS_MIXER1>,
241 <&display_clocks CLK_MIXER1>;
242 clock-names = "bus",
243 "mod";
244 resets = <&display_clocks RST_MIXER1>;
245
246 ports {
247 #address-cells = <1>;
248 #size-cells = <0>;
249
250 mixer1_out: port@1 {
251 reg = <1>;
252
253 mixer1_out_tcon1: endpoint {
254 remote-endpoint = <&tcon1_in_mixer1>;
255 };
256 };
257 };
258 };
197 }; 259 };
198 260
199 syscon: syscon@1c00000 { 261 syscon: syscon@1c00000 {
@@ -228,6 +290,75 @@
228 #dma-cells = <1>; 290 #dma-cells = <1>;
229 }; 291 };
230 292
293 tcon0: lcd-controller@1c0c000 {
294 compatible = "allwinner,sun50i-a64-tcon-lcd",
295 "allwinner,sun8i-a83t-tcon-lcd";
296 reg = <0x01c0c000 0x1000>;
297 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
298 clocks = <&ccu CLK_BUS_TCON0>, <&ccu CLK_TCON0>;
299 clock-names = "ahb", "tcon-ch0";
300 clock-output-names = "tcon-pixel-clock";
301 resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>;
302 reset-names = "lcd", "lvds";
303
304 ports {
305 #address-cells = <1>;
306 #size-cells = <0>;
307
308 tcon0_in: port@0 {
309 #address-cells = <1>;
310 #size-cells = <0>;
311 reg = <0>;
312
313 tcon0_in_mixer0: endpoint@0 {
314 reg = <0>;
315 remote-endpoint = <&mixer0_out_tcon0>;
316 };
317 };
318
319 tcon0_out: port@1 {
320 #address-cells = <1>;
321 #size-cells = <0>;
322 reg = <1>;
323 };
324 };
325 };
326
327 tcon1: lcd-controller@1c0d000 {
328 compatible = "allwinner,sun50i-a64-tcon-tv",
329 "allwinner,sun8i-a83t-tcon-tv";
330 reg = <0x01c0d000 0x1000>;
331 interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
332 clocks = <&ccu CLK_BUS_TCON1>, <&ccu CLK_TCON1>;
333 clock-names = "ahb", "tcon-ch1";
334 resets = <&ccu RST_BUS_TCON1>;
335 reset-names = "lcd";
336
337 ports {
338 #address-cells = <1>;
339 #size-cells = <0>;
340
341 tcon1_in: port@0 {
342 reg = <0>;
343
344 tcon1_in_mixer1: endpoint {
345 remote-endpoint = <&mixer1_out_tcon1>;
346 };
347 };
348
349 tcon1_out: port@1 {
350 #address-cells = <1>;
351 #size-cells = <0>;
352 reg = <1>;
353
354 tcon1_out_hdmi: endpoint@1 {
355 reg = <1>;
356 remote-endpoint = <&hdmi_in_tcon1>;
357 };
358 };
359 };
360 };
361
231 mmc0: mmc@1c0f000 { 362 mmc0: mmc@1c0f000 {
232 compatible = "allwinner,sun50i-a64-mmc"; 363 compatible = "allwinner,sun50i-a64-mmc";
233 reg = <0x01c0f000 0x1000>; 364 reg = <0x01c0f000 0x1000>;
@@ -270,6 +401,11 @@
270 #size-cells = <0>; 401 #size-cells = <0>;
271 }; 402 };
272 403
404 sid: eeprom@1c14000 {
405 compatible = "allwinner,sun50i-a64-sid";
406 reg = <0x1c14000 0x400>;
407 };
408
273 usb_otg: usb@1c19000 { 409 usb_otg: usb@1c19000 {
274 compatible = "allwinner,sun8i-a33-musb"; 410 compatible = "allwinner,sun8i-a33-musb";
275 reg = <0x01c19000 0x0400>; 411 reg = <0x01c19000 0x0400>;
@@ -399,7 +535,7 @@
399 }; 535 };
400 536
401 mmc2_pins: mmc2-pins { 537 mmc2_pins: mmc2-pins {
402 pins = "PC1", "PC5", "PC6", "PC8", "PC9", 538 pins = "PC5", "PC6", "PC8", "PC9",
403 "PC10","PC11", "PC12", "PC13", 539 "PC10","PC11", "PC12", "PC13",
404 "PC14", "PC15", "PC16"; 540 "PC14", "PC15", "PC16";
405 function = "mmc2"; 541 function = "mmc2";
@@ -407,6 +543,13 @@
407 bias-pull-up; 543 bias-pull-up;
408 }; 544 };
409 545
546 mmc2_ds_pin: mmc2-ds-pin {
547 pins = "PC1";
548 function = "mmc2";
549 drive-strength = <30>;
550 bias-pull-up;
551 };
552
410 pwm_pin: pwm_pin { 553 pwm_pin: pwm_pin {
411 pins = "PD22"; 554 pins = "PD22";
412 function = "pwm"; 555 function = "pwm";
@@ -442,7 +585,7 @@
442 function = "spi1"; 585 function = "spi1";
443 }; 586 };
444 587
445 uart0_pins_a: uart0 { 588 uart0_pb_pins: uart0-pb-pins {
446 pins = "PB8", "PB9"; 589 pins = "PB8", "PB9";
447 function = "uart0"; 590 function = "uart0";
448 }; 591 };
@@ -686,6 +829,50 @@
686 status = "disabled"; 829 status = "disabled";
687 }; 830 };
688 831
832 hdmi: hdmi@1ee0000 {
833 compatible = "allwinner,sun50i-a64-dw-hdmi",
834 "allwinner,sun8i-a83t-dw-hdmi";
835 reg = <0x01ee0000 0x10000>;
836 reg-io-width = <1>;
837 interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
838 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
839 <&ccu CLK_HDMI>;
840 clock-names = "iahb", "isfr", "tmds";
841 resets = <&ccu RST_BUS_HDMI1>;
842 reset-names = "ctrl";
843 phys = <&hdmi_phy>;
844 phy-names = "hdmi-phy";
845 status = "disabled";
846
847 ports {
848 #address-cells = <1>;
849 #size-cells = <0>;
850
851 hdmi_in: port@0 {
852 reg = <0>;
853
854 hdmi_in_tcon1: endpoint {
855 remote-endpoint = <&tcon1_out_hdmi>;
856 };
857 };
858
859 hdmi_out: port@1 {
860 reg = <1>;
861 };
862 };
863 };
864
865 hdmi_phy: hdmi-phy@1ef0000 {
866 compatible = "allwinner,sun50i-a64-hdmi-phy";
867 reg = <0x01ef0000 0x10000>;
868 clocks = <&ccu CLK_BUS_HDMI>, <&ccu CLK_HDMI_DDC>,
869 <&ccu 7>;
870 clock-names = "bus", "mod", "pll-0";
871 resets = <&ccu RST_BUS_HDMI0>;
872 reset-names = "phy";
873 #phy-cells = <0>;
874 };
875
689 rtc: rtc@1f00000 { 876 rtc: rtc@1f00000 {
690 compatible = "allwinner,sun6i-a31-rtc"; 877 compatible = "allwinner,sun6i-a31-rtc";
691 reg = <0x01f00000 0x54>; 878 reg = <0x01f00000 0x54>;
@@ -749,7 +936,7 @@
749 interrupt-controller; 936 interrupt-controller;
750 #interrupt-cells = <3>; 937 #interrupt-cells = <3>;
751 938
752 r_i2c_pins_a: i2c-a { 939 r_i2c_pl89_pins: r-i2c-pl89-pins {
753 pins = "PL8", "PL9"; 940 pins = "PL8", "PL9";
754 function = "s_i2c"; 941 function = "s_i2c";
755 }; 942 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts
new file mode 100644
index 000000000000..2e2b14c0ae75
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts
@@ -0,0 +1,11 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
3
4/dts-v1/;
5#include "sun50i-h5.dtsi"
6#include <arm/sunxi-bananapi-m2-plus-v1.2.dtsi>
7
8/ {
9 model = "Banana Pi BPI-M2-Plus v1.2 H5";
10 compatible = "bananapi,bpi-m2-plus-v1.2", "allwinner,sun50i-h5";
11};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus.dts
new file mode 100644
index 000000000000..77661006dfba
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus.dts
@@ -0,0 +1,11 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2// Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
3
4/dts-v1/;
5#include "sun50i-h5.dtsi"
6#include <arm/sunxi-bananapi-m2-plus.dtsi>
7
8/ {
9 model = "Banana Pi BPI-M2-Plus H5";
10 compatible = "sinovoip,bpi-m2-plus", "allwinner,sun50i-h5";
11};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index 62d646baac3c..b41dc1aab67d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -92,6 +92,49 @@
92 <GIC_PPI 10 92 <GIC_PPI 10
93 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 93 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
94 }; 94 };
95
96 soc {
97 mali: gpu@1e80000 {
98 compatible = "allwinner,sun50i-h5-mali", "arm,mali-450";
99 reg = <0x01e80000 0x30000>;
100 /*
101 * While the datasheet lists an interrupt for the
102 * PMU, the actual silicon does not have the PMU
103 * block. Reads all return zero, and writes are
104 * ignored.
105 */
106 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
107 <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
108 <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
109 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
110 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
111 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
112 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
113 <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
114 <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
115 <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
116 <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
117 <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
118 interrupt-names = "gp",
119 "gpmmu",
120 "pp",
121 "pp0",
122 "ppmmu0",
123 "pp1",
124 "ppmmu1",
125 "pp2",
126 "ppmmu2",
127 "pp3",
128 "ppmmu3",
129 "pmu";
130 clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
131 clock-names = "bus", "core";
132 resets = <&ccu RST_BUS_GPU>;
133
134 assigned-clocks = <&ccu CLK_GPU>;
135 assigned-clock-rates = <384000000>;
136 };
137 };
95}; 138};
96 139
97&ccu { 140&ccu {
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
new file mode 100644
index 000000000000..0612c19cd994
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
@@ -0,0 +1,150 @@
1// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2/*
3 * Copyright (C) 2018 Amarula Solutions
4 * Author: Jagan Teki <jagan@amarulasolutions.com>
5 */
6
7/dts-v1/;
8
9#include "sun50i-h6.dtsi"
10
11#include <dt-bindings/gpio/gpio.h>
12
13/ {
14 model = "OrangePi One Plus";
15 compatible = "xunlong,orangepi-one-plus", "allwinner,sun50i-h6";
16
17 aliases {
18 serial0 = &uart0;
19 };
20
21 chosen {
22 stdout-path = "serial0:115200n8";
23 };
24};
25
26&mmc0 {
27 pinctrl-names = "default";
28 pinctrl-0 = <&mmc0_pins>;
29 vmmc-supply = <&reg_cldo1>;
30 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
31 bus-width = <4>;
32 status = "okay";
33};
34
35&r_i2c {
36 status = "okay";
37
38 axp805: pmic@36 {
39 compatible = "x-powers,axp805", "x-powers,axp806";
40 reg = <0x36>;
41 interrupt-parent = <&r_intc>;
42 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
43 interrupt-controller;
44 #interrupt-cells = <1>;
45 x-powers,self-working-mode;
46
47 regulators {
48 reg_aldo1: aldo1 {
49 regulator-always-on;
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52 regulator-name = "vcc-pl";
53 };
54
55 reg_aldo2: aldo2 {
56 regulator-min-microvolt = <3300000>;
57 regulator-max-microvolt = <3300000>;
58 regulator-name = "vcc-ac200";
59 };
60
61 reg_aldo3: aldo3 {
62 regulator-always-on;
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-name = "vcc25-dram";
66 };
67
68 reg_bldo1: bldo1 {
69 regulator-always-on;
70 regulator-min-microvolt = <1800000>;
71 regulator-max-microvolt = <1800000>;
72 regulator-name = "vcc-bias-pll";
73 };
74
75 reg_bldo2: bldo2 {
76 regulator-always-on;
77 regulator-min-microvolt = <1800000>;
78 regulator-max-microvolt = <1800000>;
79 regulator-name = "vcc-efuse-pcie-hdmi-io";
80 };
81
82 reg_bldo3: bldo3 {
83 regulator-always-on;
84 regulator-min-microvolt = <1800000>;
85 regulator-max-microvolt = <1800000>;
86 regulator-name = "vcc-dcxoio";
87 };
88
89 bldo4 {
90 /* unused */
91 };
92
93 reg_cldo1: cldo1 {
94 regulator-always-on;
95 regulator-min-microvolt = <3300000>;
96 regulator-max-microvolt = <3300000>;
97 regulator-name = "vcc-3v3";
98 };
99
100 reg_cldo2: cldo2 {
101 regulator-min-microvolt = <3300000>;
102 regulator-max-microvolt = <3300000>;
103 regulator-name = "vcc-wifi-1";
104 };
105
106 reg_cldo3: cldo3 {
107 regulator-min-microvolt = <3300000>;
108 regulator-max-microvolt = <3300000>;
109 regulator-name = "vcc-wifi-2";
110 };
111
112 reg_dcdca: dcdca {
113 regulator-always-on;
114 regulator-min-microvolt = <810000>;
115 regulator-max-microvolt = <1080000>;
116 regulator-name = "vdd-cpu";
117 };
118
119 reg_dcdcc: dcdcc {
120 regulator-min-microvolt = <810000>;
121 regulator-max-microvolt = <1080000>;
122 regulator-name = "vdd-gpu";
123 };
124
125 reg_dcdcd: dcdcd {
126 regulator-always-on;
127 regulator-min-microvolt = <960000>;
128 regulator-max-microvolt = <960000>;
129 regulator-name = "vdd-sys";
130 };
131
132 reg_dcdce: dcdce {
133 regulator-always-on;
134 regulator-min-microvolt = <1200000>;
135 regulator-max-microvolt = <1200000>;
136 regulator-name = "vcc-dram";
137 };
138
139 sw {
140 /* unused */
141 };
142 };
143 };
144};
145
146&uart0 {
147 pinctrl-names = "default";
148 pinctrl-0 = <&uart0_ph_pins>;
149 status = "okay";
150};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index cfa5fffcf62b..040828d2e2c0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -92,6 +92,29 @@
92 #size-cells = <1>; 92 #size-cells = <1>;
93 ranges; 93 ranges;
94 94
95 syscon: syscon@3000000 {
96 compatible = "allwinner,sun50i-h6-system-control",
97 "allwinner,sun50i-a64-system-control";
98 reg = <0x03000000 0x1000>;
99 #address-cells = <1>;
100 #size-cells = <1>;
101 ranges;
102
103 sram_c: sram@28000 {
104 compatible = "mmio-sram";
105 reg = <0x00028000 0x1e000>;
106 #address-cells = <1>;
107 #size-cells = <1>;
108 ranges = <0 0x00028000 0x1e000>;
109
110 de2_sram: sram-section@0 {
111 compatible = "allwinner,sun50i-h6-sram-c",
112 "allwinner,sun50i-a64-sram-c";
113 reg = <0x0000 0x1e000>;
114 };
115 };
116 };
117
95 ccu: clock@3001000 { 118 ccu: clock@3001000 {
96 compatible = "allwinner,sun50i-h6-ccu"; 119 compatible = "allwinner,sun50i-h6-ccu";
97 reg = <0x03001000 0x1000>; 120 reg = <0x03001000 0x1000>;
diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
index 6edc4fa9fd42..53cf195c2ada 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
@@ -124,6 +124,8 @@
124&i2c1 { 124&i2c1 {
125 status = "okay"; 125 status = "okay";
126 clock-frequency = <100000>; 126 clock-frequency = <100000>;
127 i2c-sda-falling-time-ns = <890>; /* hcnt */
128 i2c-sdl-falling-time-ns = <890>; /* lcnt */
127 129
128 adc@14 { 130 adc@14 {
129 compatible = "lltc,ltc2497"; 131 compatible = "lltc,ltc2497";
diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
index 125f4deb52fe..b664e7af74eb 100644
--- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
+++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
@@ -107,7 +107,7 @@
107 clock-names = "uartclk", "apb_pclk"; 107 clock-names = "uartclk", "apb_pclk";
108 }; 108 };
109 109
110 spi0: ssp@e1020000 { 110 spi0: spi@e1020000 {
111 status = "disabled"; 111 status = "disabled";
112 compatible = "arm,pl022", "arm,primecell"; 112 compatible = "arm,pl022", "arm,primecell";
113 reg = <0 0xe1020000 0 0x1000>; 113 reg = <0 0xe1020000 0 0x1000>;
@@ -117,7 +117,7 @@
117 clock-names = "apb_pclk"; 117 clock-names = "apb_pclk";
118 }; 118 };
119 119
120 spi1: ssp@e1030000 { 120 spi1: spi@e1030000 {
121 status = "disabled"; 121 status = "disabled";
122 compatible = "arm,pl022", "arm,primecell"; 122 compatible = "arm,pl022", "arm,primecell";
123 reg = <0 0xe1030000 0 0x1000>; 123 reg = <0 0xe1030000 0 0x1000>;
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index a97c0e2d7bc6..c31f29d660de 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -1,5 +1,6 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb 2dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
3dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
3dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb 4dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
4dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb 5dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
5dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb 6dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
index d5c01427a5ca..d4961dc8356b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
@@ -60,6 +60,55 @@
60 serial1 = &uart_A; 60 serial1 = &uart_A;
61 }; 61 };
62 62
63 linein: audio-codec@0 {
64 #sound-dai-cells = <0>;
65 compatible = "everest,es7241";
66 VDDA-supply = <&vcc_3v3>;
67 VDDP-supply = <&vcc_3v3>;
68 VDDD-supply = <&vcc_3v3>;
69 status = "okay";
70 sound-name-prefix = "Linein";
71 };
72
73 lineout: audio-codec@1 {
74 #sound-dai-cells = <0>;
75 compatible = "everest,es7154";
76 VDD-supply = <&vcc_3v3>;
77 PVDD-supply = <&vcc_5v>;
78 status = "okay";
79 sound-name-prefix = "Lineout";
80 };
81
82 spdif_dit: audio-codec@2 {
83 #sound-dai-cells = <0>;
84 compatible = "linux,spdif-dit";
85 status = "okay";
86 sound-name-prefix = "DIT";
87 };
88
89 dmics: audio-codec@3 {
90 #sound-dai-cells = <0>;
91 compatible = "dmic-codec";
92 num-channels = <7>;
93 wakeup-delay-ms = <50>;
94 status = "okay";
95 sound-name-prefix = "MIC";
96 };
97
98 emmc_pwrseq: emmc-pwrseq {
99 compatible = "mmc-pwrseq-emmc";
100 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
101 };
102
103 chosen {
104 stdout-path = "serial0:115200n8";
105 };
106
107 memory@0 {
108 device_type = "memory";
109 reg = <0x0 0x0 0x0 0x40000000>;
110 };
111
63 main_12v: regulator-main_12v { 112 main_12v: regulator-main_12v {
64 compatible = "regulator-fixed"; 113 compatible = "regulator-fixed";
65 regulator-name = "12V"; 114 regulator-name = "12V";
@@ -68,15 +117,26 @@
68 regulator-always-on; 117 regulator-always-on;
69 }; 118 };
70 119
71 vddio_boot: regulator-vddio_boot { 120 vcc_3v3: regulator-vcc_3v3 {
72 compatible = "regulator-fixed"; 121 compatible = "regulator-fixed";
73 regulator-name = "VDDIO_BOOT"; 122 regulator-name = "VCC_3V3";
74 regulator-min-microvolt = <1800000>; 123 regulator-min-microvolt = <3300000>;
75 regulator-max-microvolt = <1800000>; 124 regulator-max-microvolt = <3300000>;
76 vin-supply = <&vddao_3v3>; 125 vin-supply = <&vddao_3v3>;
77 regulator-always-on; 126 regulator-always-on;
78 }; 127 };
79 128
129 vcc_5v: regulator-vcc_5v {
130 compatible = "regulator-fixed";
131 regulator-name = "VCC5V";
132 regulator-min-microvolt = <5000000>;
133 regulator-max-microvolt = <5000000>;
134 vin-supply = <&main_12v>;
135
136 gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
137 enable-active-high;
138 };
139
80 vddao_3v3: regulator-vddao_3v3 { 140 vddao_3v3: regulator-vddao_3v3 {
81 compatible = "regulator-fixed"; 141 compatible = "regulator-fixed";
82 regulator-name = "VDDAO_3V3"; 142 regulator-name = "VDDAO_3V3";
@@ -95,26 +155,15 @@
95 regulator-always-on; 155 regulator-always-on;
96 }; 156 };
97 157
98 vcc_3v3: regulator-vcc_3v3 { 158 vddio_boot: regulator-vddio_boot {
99 compatible = "regulator-fixed"; 159 compatible = "regulator-fixed";
100 regulator-name = "VCC_3V3"; 160 regulator-name = "VDDIO_BOOT";
101 regulator-min-microvolt = <3300000>; 161 regulator-min-microvolt = <1800000>;
102 regulator-max-microvolt = <3300000>; 162 regulator-max-microvolt = <1800000>;
103 vin-supply = <&vddao_3v3>; 163 vin-supply = <&vddao_3v3>;
104 regulator-always-on; 164 regulator-always-on;
105 }; 165 };
106 166
107 vcc_5v: regulator-vcc_5v {
108 compatible = "regulator-fixed";
109 regulator-name = "VCC5V";
110 regulator-min-microvolt = <5000000>;
111 regulator-max-microvolt = <5000000>;
112 vin-supply = <&main_12v>;
113
114 gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
115 enable-active-high;
116 };
117
118 usb_pwr: regulator-usb_pwr { 167 usb_pwr: regulator-usb_pwr {
119 compatible = "regulator-fixed"; 168 compatible = "regulator-fixed";
120 regulator-name = "USB_PWR"; 169 regulator-name = "USB_PWR";
@@ -126,11 +175,6 @@
126 enable-active-high; 175 enable-active-high;
127 }; 176 };
128 177
129 emmc_pwrseq: emmc-pwrseq {
130 compatible = "mmc-pwrseq-emmc";
131 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
132 };
133
134 sdio_pwrseq: sdio-pwrseq { 178 sdio_pwrseq: sdio-pwrseq {
135 compatible = "mmc-pwrseq-simple"; 179 compatible = "mmc-pwrseq-simple";
136 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>; 180 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
@@ -138,13 +182,6 @@
138 clock-names = "ext_clock"; 182 clock-names = "ext_clock";
139 }; 183 };
140 184
141 wifi32k: wifi32k {
142 compatible = "pwm-clock";
143 #clock-cells = <0>;
144 clock-frequency = <32768>;
145 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
146 };
147
148 speaker-leds { 185 speaker-leds {
149 compatible = "gpio-leds"; 186 compatible = "gpio-leds";
150 187
@@ -179,30 +216,129 @@
179 }; 216 };
180 }; 217 };
181 218
182 linein: audio-codec@0 { 219 sound {
183 #sound-dai-cells = <0>; 220 compatible = "amlogic,axg-sound-card";
184 compatible = "everest,es7241"; 221 model = "AXG-S400";
185 VDDA-supply = <&vcc_3v3>; 222 audio-aux-devs = <&tdmin_a>, <&tdmin_b>, <&tdmin_c>,
186 VDDP-supply = <&vcc_3v3>; 223 <&tdmin_lb>, <&tdmout_c>;
187 VDDD-supply = <&vcc_3v3>; 224 audio-widgets = "Line", "Lineout",
225 "Line", "Linein",
226 "Speaker", "Speaker1 Left",
227 "Speaker", "Speaker1 Right";
228 audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
229 "SPDIFOUT IN 0", "FRDDR_A OUT 3",
230 "TDMOUT_C IN 1", "FRDDR_B OUT 2",
231 "SPDIFOUT IN 1", "FRDDR_B OUT 3",
232 "TDMOUT_C IN 2", "FRDDR_C OUT 2",
233 "SPDIFOUT IN 2", "FRDDR_C OUT 3",
234 "TDM_C Playback", "TDMOUT_C OUT",
235 "TDMIN_A IN 2", "TDM_C Capture",
236 "TDMIN_A IN 5", "TDM_C Loopback",
237 "TDMIN_B IN 2", "TDM_C Capture",
238 "TDMIN_B IN 5", "TDM_C Loopback",
239 "TDMIN_C IN 2", "TDM_C Capture",
240 "TDMIN_C IN 5", "TDM_C Loopback",
241 "TDMIN_LB IN 2", "TDM_C Loopback",
242 "TDMIN_LB IN 5", "TDM_C Capture",
243 "TODDR_A IN 0", "TDMIN_A OUT",
244 "TODDR_B IN 0", "TDMIN_A OUT",
245 "TODDR_C IN 0", "TDMIN_A OUT",
246 "TODDR_A IN 1", "TDMIN_B OUT",
247 "TODDR_B IN 1", "TDMIN_B OUT",
248 "TODDR_C IN 1", "TDMIN_B OUT",
249 "TODDR_A IN 2", "TDMIN_C OUT",
250 "TODDR_B IN 2", "TDMIN_C OUT",
251 "TODDR_C IN 2", "TDMIN_C OUT",
252 "TODDR_A IN 4", "PDM Capture",
253 "TODDR_B IN 4", "PDM Capture",
254 "TODDR_C IN 4", "PDM Capture",
255 "TODDR_A IN 6", "TDMIN_LB OUT",
256 "TODDR_B IN 6", "TDMIN_LB OUT",
257 "TODDR_C IN 6", "TDMIN_LB OUT",
258 "Lineout", "Lineout AOUTL",
259 "Lineout", "Lineout AOUTR",
260 "Speaker1 Left", "SPK1 OUT_A",
261 "Speaker1 Left", "SPK1 OUT_B",
262 "Speaker1 Right", "SPK1 OUT_C",
263 "Speaker1 Right", "SPK1 OUT_D",
264 "Linein AINL", "Linein",
265 "Linein AINR", "Linein";
266 assigned-clocks = <&clkc CLKID_HIFI_PLL>,
267 <&clkc CLKID_MPLL0>,
268 <&clkc CLKID_MPLL1>;
269 assigned-clock-parents = <0>, <0>, <0>;
270 assigned-clock-rates = <589824000>,
271 <270950400>,
272 <393216000>;
188 status = "okay"; 273 status = "okay";
189 sound-name-prefix = "Linein";
190 };
191 274
192 lineout: audio-codec@1 { 275 dai-link@0 {
193 #sound-dai-cells = <0>; 276 sound-dai = <&frddr_a>;
194 compatible = "everest,es7154"; 277 };
195 VDD-supply = <&vcc_3v3>; 278
196 PVDD-supply = <&vcc_5v>; 279 dai-link@1 {
197 status = "okay"; 280 sound-dai = <&frddr_b>;
198 sound-name-prefix = "Lineout"; 281 };
282
283 dai-link@2 {
284 sound-dai = <&frddr_c>;
285 };
286
287 dai-link@3 {
288 sound-dai = <&toddr_a>;
289 };
290
291 dai-link@4 {
292 sound-dai = <&toddr_b>;
293 };
294
295 dai-link@5 {
296 sound-dai = <&toddr_c>;
297 };
298
299 dai-link@6 {
300 sound-dai = <&tdmif_c>;
301 dai-format = "i2s";
302 dai-tdm-slot-tx-mask-2 = <1 1>;
303 dai-tdm-slot-rx-mask-1 = <1 1>;
304 mclk-fs = <256>;
305
306 codec@0 {
307 sound-dai = <&lineout>;
308 };
309
310 codec@1 {
311 sound-dai = <&speaker_amp1>;
312 };
313
314 codec@2 {
315 sound-dai = <&linein>;
316 };
317
318 };
319
320 dai-link@7 {
321 sound-dai = <&spdifout>;
322
323 codec {
324 sound-dai = <&spdif_dit>;
325 };
326 };
327
328 dai-link@8 {
329 sound-dai = <&pdm>;
330
331 codec {
332 sound-dai = <&dmics>;
333 };
334 };
199 }; 335 };
200 336
201 spdif_dit: audio-codec@2 { 337 wifi32k: wifi32k {
202 #sound-dai-cells = <0>; 338 compatible = "pwm-clock";
203 compatible = "linux,spdif-dit"; 339 #clock-cells = <0>;
204 status = "okay"; 340 clock-frequency = <32768>;
205 sound-name-prefix = "DIT"; 341 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
206 }; 342 };
207}; 343};
208 344
@@ -226,16 +362,16 @@
226 }; 362 };
227}; 363};
228 364
229&uart_A { 365&frddr_a {
230 status = "okay"; 366 status = "okay";
231 pinctrl-0 = <&uart_a_pins>;
232 pinctrl-names = "default";
233}; 367};
234 368
235&uart_AO { 369&frddr_b {
370 status = "okay";
371};
372
373&frddr_c {
236 status = "okay"; 374 status = "okay";
237 pinctrl-0 = <&uart_ao_a_pins>;
238 pinctrl-names = "default";
239}; 375};
240 376
241&ir { 377&ir {
@@ -260,6 +396,7 @@
260 PVDD_B-supply = <&main_12v>; 396 PVDD_B-supply = <&main_12v>;
261 PVDD_C-supply = <&main_12v>; 397 PVDD_C-supply = <&main_12v>;
262 PVDD_D-supply = <&main_12v>; 398 PVDD_D-supply = <&main_12v>;
399 sound-name-prefix = "SPK1";
263 }; 400 };
264}; 401};
265 402
@@ -277,30 +414,22 @@
277 }; 414 };
278}; 415};
279 416
417&pdm {
418 pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>,
419 <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>;
420 pinctrl-names = "default";
421 status = "okay";
422};
423
280&pwm_ab { 424&pwm_ab {
281 status = "okay"; 425 status = "okay";
282 pinctrl-0 = <&pwm_a_x20_pins>; 426 pinctrl-0 = <&pwm_a_x20_pins>;
283 pinctrl-names = "default"; 427 pinctrl-names = "default";
284}; 428};
285 429
286/* emmc storage */ 430&saradc {
287&sd_emmc_c {
288 status = "okay"; 431 status = "okay";
289 pinctrl-0 = <&emmc_pins>; 432 vref-supply = <&vddio_ao18>;
290 pinctrl-1 = <&emmc_clk_gate_pins>;
291 pinctrl-names = "default", "clk-gate";
292
293 bus-width = <8>;
294 cap-sd-highspeed;
295 cap-mmc-highspeed;
296 max-frequency = <180000000>;
297 non-removable;
298 disable-wp;
299 mmc-ddr-1_8v;
300 mmc-hs200-1_8v;
301
302 vmmc-supply = <&vcc_3v3>;
303 vqmmc-supply = <&vddio_boot>;
304}; 433};
305 434
306/* wifi module */ 435/* wifi module */
@@ -330,7 +459,94 @@
330 }; 459 };
331}; 460};
332 461
333&saradc { 462/* emmc storage */
463&sd_emmc_c {
334 status = "okay"; 464 status = "okay";
335 vref-supply = <&vddio_ao18>; 465 pinctrl-0 = <&emmc_pins>;
466 pinctrl-1 = <&emmc_clk_gate_pins>;
467 pinctrl-names = "default", "clk-gate";
468
469 bus-width = <8>;
470 cap-sd-highspeed;
471 cap-mmc-highspeed;
472 max-frequency = <180000000>;
473 non-removable;
474 disable-wp;
475 mmc-ddr-1_8v;
476 mmc-hs200-1_8v;
477
478 vmmc-supply = <&vcc_3v3>;
479 vqmmc-supply = <&vddio_boot>;
480};
481
482&spdifout {
483 pinctrl-0 = <&spdif_out_a20_pins>;
484 pinctrl-names = "default";
485 status = "okay";
486};
487
488&tdmif_a {
489 pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>,
490 <&tdma_din0_pins>, <&tdma_dout0_x15_pins>;
491 pinctrl-names = "default";
492 status = "okay";
493};
494
495&tdmif_b {
496 pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>,
497 <&tdmb_din3_pins>, <&mclk_b_pins>;
498 pinctrl-names = "default";
499 status = "okay";
500};
501
502&tdmif_c {
503 pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>,
504 <&tdmc_din1_pins>, <&tdmc_dout2_pins>,
505 <&mclk_c_pins>;
506 pinctrl-names = "default";
507 status = "okay";
508};
509
510&tdmin_a {
511 status = "okay";
512};
513
514&tdmin_b {
515 status = "okay";
516};
517
518&tdmin_c {
519 status = "okay";
520};
521
522&tdmin_lb {
523 status = "okay";
524};
525
526&tdmout_c {
527 status = "okay";
528};
529
530&toddr_a {
531 status = "okay";
532};
533
534&toddr_b {
535 status = "okay";
536};
537
538&toddr_c {
539 status = "okay";
540};
541
542&uart_A {
543 status = "okay";
544 pinctrl-0 = <&uart_a_pins>;
545 pinctrl-names = "default";
546};
547
548&uart_AO {
549 status = "okay";
550 pinctrl-0 = <&uart_ao_a_pins>;
551 pinctrl-names = "default";
336}; 552};
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
index c518130e5ce7..df017dbd2e57 100644
--- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi
@@ -3,13 +3,14 @@
3 * Copyright (c) 2017 Amlogic, Inc. All rights reserved. 3 * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
4 */ 4 */
5 5
6#include <dt-bindings/gpio/gpio.h> 6#include <dt-bindings/clock/axg-aoclkc.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/clock/axg-audio-clkc.h> 7#include <dt-bindings/clock/axg-audio-clkc.h>
10#include <dt-bindings/clock/axg-clkc.h> 8#include <dt-bindings/clock/axg-clkc.h>
11#include <dt-bindings/clock/axg-aoclkc.h> 9#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/gpio/meson-axg-gpio.h> 10#include <dt-bindings/gpio/meson-axg-gpio.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/interrupt-controller/arm-gic.h>
13#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
13#include <dt-bindings/reset/amlogic,meson-axg-reset.h> 14#include <dt-bindings/reset/amlogic,meson-axg-reset.h>
14 15
15/ { 16/ {
@@ -19,22 +20,53 @@
19 #address-cells = <2>; 20 #address-cells = <2>;
20 #size-cells = <2>; 21 #size-cells = <2>;
21 22
22 reserved-memory { 23 tdmif_a: audio-controller@0 {
23 #address-cells = <2>; 24 compatible = "amlogic,axg-tdm-iface";
24 #size-cells = <2>; 25 #sound-dai-cells = <0>;
25 ranges; 26 sound-name-prefix = "TDM_A";
27 clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
28 <&clkc_audio AUD_CLKID_MST_A_SCLK>,
29 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
30 clock-names = "mclk", "sclk", "lrclk";
31 status = "disabled";
32 };
26 33
27 /* 16 MiB reserved for Hardware ROM Firmware */ 34 tdmif_b: audio-controller@1 {
28 hwrom_reserved: hwrom@0 { 35 compatible = "amlogic,axg-tdm-iface";
29 reg = <0x0 0x0 0x0 0x1000000>; 36 #sound-dai-cells = <0>;
30 no-map; 37 sound-name-prefix = "TDM_B";
31 }; 38 clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
39 <&clkc_audio AUD_CLKID_MST_B_SCLK>,
40 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
41 clock-names = "mclk", "sclk", "lrclk";
42 status = "disabled";
43 };
32 44
33 /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */ 45 tdmif_c: audio-controller@2 {
34 secmon_reserved: secmon@5000000 { 46 compatible = "amlogic,axg-tdm-iface";
35 reg = <0x0 0x05000000 0x0 0x300000>; 47 #sound-dai-cells = <0>;
36 no-map; 48 sound-name-prefix = "TDM_C";
37 }; 49 clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
50 <&clkc_audio AUD_CLKID_MST_C_SCLK>,
51 <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
52 clock-names = "mclk", "sclk", "lrclk";
53 status = "disabled";
54 };
55
56 ao_alt_xtal: ao_alt_xtal-clk {
57 compatible = "fixed-clock";
58 clock-frequency = <32000000>;
59 clock-output-names = "ao_alt_xtal";
60 #clock-cells = <0>;
61 };
62
63 arm-pmu {
64 compatible = "arm,cortex-a53-pmu";
65 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
66 <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
67 <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
68 <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
69 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
38 }; 70 };
39 71
40 cpus { 72 cpus {
@@ -78,77 +110,27 @@
78 }; 110 };
79 }; 111 };
80 112
81 arm-pmu {
82 compatible = "arm,cortex-a53-pmu";
83 interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
84 <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
85 <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
86 <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
87 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
88 };
89
90 psci { 113 psci {
91 compatible = "arm,psci-1.0"; 114 compatible = "arm,psci-1.0";
92 method = "smc"; 115 method = "smc";
93 }; 116 };
94 117
95 tdmif_a: audio-controller@0 { 118 reserved-memory {
96 compatible = "amlogic,axg-tdm-iface"; 119 #address-cells = <2>;
97 #sound-dai-cells = <0>; 120 #size-cells = <2>;
98 sound-name-prefix = "TDM_A"; 121 ranges;
99 clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
100 <&clkc_audio AUD_CLKID_MST_A_SCLK>,
101 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
102 clock-names = "mclk", "sclk", "lrclk";
103 status = "disabled";
104 };
105
106 tdmif_b: audio-controller@1 {
107 compatible = "amlogic,axg-tdm-iface";
108 #sound-dai-cells = <0>;
109 sound-name-prefix = "TDM_B";
110 clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
111 <&clkc_audio AUD_CLKID_MST_B_SCLK>,
112 <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
113 clock-names = "mclk", "sclk", "lrclk";
114 status = "disabled";
115 };
116
117 tdmif_c: audio-controller@2 {
118 compatible = "amlogic,axg-tdm-iface";
119 #sound-dai-cells = <0>;
120 sound-name-prefix = "TDM_C";
121 clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
122 <&clkc_audio AUD_CLKID_MST_C_SCLK>,
123 <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
124 clock-names = "mclk", "sclk", "lrclk";
125 status = "disabled";
126 };
127
128 timer {
129 compatible = "arm,armv8-timer";
130 interrupts = <GIC_PPI 13
131 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
132 <GIC_PPI 14
133 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
134 <GIC_PPI 11
135 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
136 <GIC_PPI 10
137 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
138 };
139 122
140 xtal: xtal-clk { 123 /* 16 MiB reserved for Hardware ROM Firmware */
141 compatible = "fixed-clock"; 124 hwrom_reserved: hwrom@0 {
142 clock-frequency = <24000000>; 125 reg = <0x0 0x0 0x0 0x1000000>;
143 clock-output-names = "xtal"; 126 no-map;
144 #clock-cells = <0>; 127 };
145 };
146 128
147 ao_alt_xtal: ao_alt_xtal-clk { 129 /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
148 compatible = "fixed-clock"; 130 secmon_reserved: secmon@5000000 {
149 clock-frequency = <32000000>; 131 reg = <0x0 0x05000000 0x0 0x300000>;
150 clock-output-names = "ao_alt_xtal"; 132 no-map;
151 #clock-cells = <0>; 133 };
152 }; 134 };
153 135
154 soc { 136 soc {
@@ -157,310 +139,10 @@
157 #size-cells = <2>; 139 #size-cells = <2>;
158 ranges; 140 ranges;
159 141
160 apb: apb@ffe00000 {
161 compatible = "simple-bus";
162 reg = <0x0 0xffe00000 0x0 0x200000>;
163 #address-cells = <2>;
164 #size-cells = <2>;
165 ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
166
167 sd_emmc_b: sd@5000 {
168 compatible = "amlogic,meson-axg-mmc";
169 reg = <0x0 0x5000 0x0 0x800>;
170 interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
171 status = "disabled";
172 clocks = <&clkc CLKID_SD_EMMC_B>,
173 <&clkc CLKID_SD_EMMC_B_CLK0>,
174 <&clkc CLKID_FCLK_DIV2>;
175 clock-names = "core", "clkin0", "clkin1";
176 resets = <&reset RESET_SD_EMMC_B>;
177 };
178
179 sd_emmc_c: mmc@7000 {
180 compatible = "amlogic,meson-axg-mmc";
181 reg = <0x0 0x7000 0x0 0x800>;
182 interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
183 status = "disabled";
184 clocks = <&clkc CLKID_SD_EMMC_C>,
185 <&clkc CLKID_SD_EMMC_C_CLK0>,
186 <&clkc CLKID_FCLK_DIV2>;
187 clock-names = "core", "clkin0", "clkin1";
188 resets = <&reset RESET_SD_EMMC_C>;
189 };
190 };
191
192 audio: bus@ff642000 {
193 compatible = "simple-bus";
194 reg = <0x0 0xff642000 0x0 0x2000>;
195 #address-cells = <2>;
196 #size-cells = <2>;
197 ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
198
199 clkc_audio: clock-controller@0 {
200 compatible = "amlogic,axg-audio-clkc";
201 reg = <0x0 0x0 0x0 0xb4>;
202 #clock-cells = <1>;
203
204 clocks = <&clkc CLKID_AUDIO>,
205 <&clkc CLKID_MPLL0>,
206 <&clkc CLKID_MPLL1>,
207 <&clkc CLKID_MPLL2>,
208 <&clkc CLKID_MPLL3>,
209 <&clkc CLKID_HIFI_PLL>,
210 <&clkc CLKID_FCLK_DIV3>,
211 <&clkc CLKID_FCLK_DIV4>,
212 <&clkc CLKID_GP0_PLL>;
213 clock-names = "pclk",
214 "mst_in0",
215 "mst_in1",
216 "mst_in2",
217 "mst_in3",
218 "mst_in4",
219 "mst_in5",
220 "mst_in6",
221 "mst_in7";
222
223 resets = <&reset RESET_AUDIO>;
224 };
225
226 arb: reset-controller@280 {
227 compatible = "amlogic,meson-axg-audio-arb";
228 reg = <0x0 0x280 0x0 0x4>;
229 #reset-cells = <1>;
230 clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
231 };
232
233 tdmin_a: audio-controller@300 {
234 compatible = "amlogic,axg-tdmin";
235 reg = <0x0 0x300 0x0 0x40>;
236 sound-name-prefix = "TDMIN_A";
237 clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
238 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
239 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
240 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
241 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
242 clock-names = "pclk", "sclk", "sclk_sel",
243 "lrclk", "lrclk_sel";
244 status = "disabled";
245 };
246
247 tdmin_b: audio-controller@340 {
248 compatible = "amlogic,axg-tdmin";
249 reg = <0x0 0x340 0x0 0x40>;
250 sound-name-prefix = "TDMIN_B";
251 clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
252 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
253 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
254 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
255 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
256 clock-names = "pclk", "sclk", "sclk_sel",
257 "lrclk", "lrclk_sel";
258 status = "disabled";
259 };
260
261 tdmin_c: audio-controller@380 {
262 compatible = "amlogic,axg-tdmin";
263 reg = <0x0 0x380 0x0 0x40>;
264 sound-name-prefix = "TDMIN_C";
265 clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
266 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
267 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
268 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
269 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
270 clock-names = "pclk", "sclk", "sclk_sel",
271 "lrclk", "lrclk_sel";
272 status = "disabled";
273 };
274
275 tdmin_lb: audio-controller@3c0 {
276 compatible = "amlogic,axg-tdmin";
277 reg = <0x0 0x3c0 0x0 0x40>;
278 sound-name-prefix = "TDMIN_LB";
279 clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
280 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
281 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
282 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
283 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
284 clock-names = "pclk", "sclk", "sclk_sel",
285 "lrclk", "lrclk_sel";
286 status = "disabled";
287 };
288
289 spdifout: audio-controller@480 {
290 compatible = "amlogic,axg-spdifout";
291 reg = <0x0 0x480 0x0 0x50>;
292 #sound-dai-cells = <0>;
293 sound-name-prefix = "SPDIFOUT";
294 clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
295 <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
296 clock-names = "pclk", "mclk";
297 status = "disabled";
298 };
299
300 tdmout_a: audio-controller@500 {
301 compatible = "amlogic,axg-tdmout";
302 reg = <0x0 0x500 0x0 0x40>;
303 sound-name-prefix = "TDMOUT_A";
304 clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
305 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
306 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
307 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
308 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
309 clock-names = "pclk", "sclk", "sclk_sel",
310 "lrclk", "lrclk_sel";
311 status = "disabled";
312 };
313
314 tdmout_b: audio-controller@540 {
315 compatible = "amlogic,axg-tdmout";
316 reg = <0x0 0x540 0x0 0x40>;
317 sound-name-prefix = "TDMOUT_B";
318 clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
319 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
320 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
321 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
322 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
323 clock-names = "pclk", "sclk", "sclk_sel",
324 "lrclk", "lrclk_sel";
325 status = "disabled";
326 };
327
328 tdmout_c: audio-controller@580 {
329 compatible = "amlogic,axg-tdmout";
330 reg = <0x0 0x580 0x0 0x40>;
331 sound-name-prefix = "TDMOUT_C";
332 clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
333 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
334 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
335 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
336 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
337 clock-names = "pclk", "sclk", "sclk_sel",
338 "lrclk", "lrclk_sel";
339 status = "disabled";
340 };
341 };
342
343 cbus: bus@ffd00000 {
344 compatible = "simple-bus";
345 reg = <0x0 0xffd00000 0x0 0x25000>;
346 #address-cells = <2>;
347 #size-cells = <2>;
348 ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
349
350 gpio_intc: interrupt-controller@f080 {
351 compatible = "amlogic,meson-gpio-intc";
352 reg = <0x0 0xf080 0x0 0x10>;
353 interrupt-controller;
354 #interrupt-cells = <2>;
355 amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
356 status = "disabled";
357 };
358
359 pwm_ab: pwm@1b000 {
360 compatible = "amlogic,meson-axg-ee-pwm";
361 reg = <0x0 0x1b000 0x0 0x20>;
362 #pwm-cells = <3>;
363 status = "disabled";
364 };
365
366 pwm_cd: pwm@1a000 {
367 compatible = "amlogic,meson-axg-ee-pwm";
368 reg = <0x0 0x1a000 0x0 0x20>;
369 #pwm-cells = <3>;
370 status = "disabled";
371 };
372
373 reset: reset-controller@1004 {
374 compatible = "amlogic,meson-axg-reset";
375 reg = <0x0 0x01004 0x0 0x9c>;
376 #reset-cells = <1>;
377 };
378
379 spicc0: spi@13000 {
380 compatible = "amlogic,meson-axg-spicc";
381 reg = <0x0 0x13000 0x0 0x3c>;
382 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
383 clocks = <&clkc CLKID_SPICC0>;
384 clock-names = "core";
385 #address-cells = <1>;
386 #size-cells = <0>;
387 status = "disabled";
388 };
389
390 spicc1: spi@15000 {
391 compatible = "amlogic,meson-axg-spicc";
392 reg = <0x0 0x15000 0x0 0x3c>;
393 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
394 clocks = <&clkc CLKID_SPICC1>;
395 clock-names = "core";
396 #address-cells = <1>;
397 #size-cells = <0>;
398 status = "disabled";
399 };
400
401 i2c0: i2c@1f000 {
402 compatible = "amlogic,meson-axg-i2c";
403 reg = <0x0 0x1f000 0x0 0x20>;
404 interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
405 clocks = <&clkc CLKID_I2C>;
406 #address-cells = <1>;
407 #size-cells = <0>;
408 status = "disabled";
409 };
410
411 i2c1: i2c@1e000 {
412 compatible = "amlogic,meson-axg-i2c";
413 reg = <0x0 0x1e000 0x0 0x20>;
414 interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
415 clocks = <&clkc CLKID_I2C>;
416 #address-cells = <1>;
417 #size-cells = <0>;
418 status = "disabled";
419 };
420
421 i2c2: i2c@1d000 {
422 compatible = "amlogic,meson-axg-i2c";
423 reg = <0x0 0x1d000 0x0 0x20>;
424 interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
425 clocks = <&clkc CLKID_I2C>;
426 #address-cells = <1>;
427 #size-cells = <0>;
428 status = "disabled";
429 };
430
431 i2c3: i2c@1c000 {
432 compatible = "amlogic,meson-axg-i2c";
433 reg = <0x0 0x1c000 0x0 0x20>;
434 interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>;
435 clocks = <&clkc CLKID_I2C>;
436 #address-cells = <1>;
437 #size-cells = <0>;
438 status = "disabled";
439 };
440
441 uart_A: serial@24000 {
442 compatible = "amlogic,meson-gx-uart";
443 reg = <0x0 0x24000 0x0 0x18>;
444 interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
445 status = "disabled";
446 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
447 clock-names = "xtal", "pclk", "baud";
448 };
449
450 uart_B: serial@23000 {
451 compatible = "amlogic,meson-gx-uart";
452 reg = <0x0 0x23000 0x0 0x18>;
453 interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
454 status = "disabled";
455 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
456 clock-names = "xtal", "pclk", "baud";
457 };
458 };
459
460 ethmac: ethernet@ff3f0000 { 142 ethmac: ethernet@ff3f0000 {
461 compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac"; 143 compatible = "amlogic,meson-axg-dwmac", "snps,dwmac";
462 reg = <0x0 0xff3f0000 0x0 0x10000 144 reg = <0x0 0xff3f0000 0x0 0x10000
463 0x0 0xff634540 0x0 0x8>; 145 0x0 0xff634540 0x0 0x8>;
464 interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>; 146 interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
465 interrupt-names = "macirq"; 147 interrupt-names = "macirq";
466 clocks = <&clkc CLKID_ETH>, 148 clocks = <&clkc CLKID_ETH>,
@@ -470,54 +152,26 @@
470 status = "disabled"; 152 status = "disabled";
471 }; 153 };
472 154
473 gic: interrupt-controller@ffc01000 { 155 pdm: audio-controller@ff632000 {
474 compatible = "arm,gic-400"; 156 compatible = "amlogic,axg-pdm";
475 reg = <0x0 0xffc01000 0 0x1000>, 157 reg = <0x0 0xff632000 0x0 0x34>;
476 <0x0 0xffc02000 0 0x2000>, 158 #sound-dai-cells = <0>;
477 <0x0 0xffc04000 0 0x2000>, 159 sound-name-prefix = "PDM";
478 <0x0 0xffc06000 0 0x2000>; 160 clocks = <&clkc_audio AUD_CLKID_PDM>,
479 interrupt-controller; 161 <&clkc_audio AUD_CLKID_PDM_DCLK>,
480 interrupts = <GIC_PPI 9 162 <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
481 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; 163 clock-names = "pclk", "dclk", "sysclk";
482 #interrupt-cells = <3>; 164 status = "disabled";
483 #address-cells = <0>;
484 };
485
486 hiubus: bus@ff63c000 {
487 compatible = "simple-bus";
488 reg = <0x0 0xff63c000 0x0 0x1c00>;
489 #address-cells = <2>;
490 #size-cells = <2>;
491 ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
492
493 sysctrl: system-controller@0 {
494 compatible = "amlogic,meson-axg-hhi-sysctrl", "syscon", "simple-mfd";
495 reg = <0 0 0 0x400>;
496
497 clkc: clock-controller {
498 compatible = "amlogic,axg-clkc";
499 #clock-cells = <1>;
500 };
501 };
502 };
503
504 mailbox: mailbox@ff63dc00 {
505 compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
506 reg = <0 0xff63dc00 0 0x400>;
507 interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
508 <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
509 <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
510 #mbox-cells = <1>;
511 }; 165 };
512 166
513 periphs: periphs@ff634000 { 167 periphs: bus@ff634000 {
514 compatible = "simple-bus"; 168 compatible = "simple-bus";
515 reg = <0x0 0xff634000 0x0 0x2000>; 169 reg = <0x0 0xff634000 0x0 0x2000>;
516 #address-cells = <2>; 170 #address-cells = <2>;
517 #size-cells = <2>; 171 #size-cells = <2>;
518 ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>; 172 ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
519 173
520 hwrng: rng { 174 hwrng: rng@18 {
521 compatible = "amlogic,meson-rng"; 175 compatible = "amlogic,meson-rng";
522 reg = <0x0 0x18 0x0 0x4>; 176 reg = <0x0 0x18 0x0 0x4>;
523 clocks = <&clkc CLKID_RNG0>; 177 clocks = <&clkc CLKID_RNG0>;
@@ -532,28 +186,92 @@
532 186
533 gpio: bank@480 { 187 gpio: bank@480 {
534 reg = <0x0 0x00480 0x0 0x40>, 188 reg = <0x0 0x00480 0x0 0x40>,
535 <0x0 0x004e8 0x0 0x14>, 189 <0x0 0x004e8 0x0 0x14>,
536 <0x0 0x00520 0x0 0x14>, 190 <0x0 0x00520 0x0 0x14>,
537 <0x0 0x00430 0x0 0x3c>; 191 <0x0 0x00430 0x0 0x3c>;
538 reg-names = "mux", "pull", "pull-enable", "gpio"; 192 reg-names = "mux", "pull", "pull-enable", "gpio";
539 gpio-controller; 193 gpio-controller;
540 #gpio-cells = <2>; 194 #gpio-cells = <2>;
541 gpio-ranges = <&pinctrl_periphs 0 0 86>; 195 gpio-ranges = <&pinctrl_periphs 0 0 86>;
542 }; 196 };
543 197
198 i2c0_pins: i2c0 {
199 mux {
200 groups = "i2c0_sck",
201 "i2c0_sda";
202 function = "i2c0";
203 };
204 };
205
206 i2c1_x_pins: i2c1_x {
207 mux {
208 groups = "i2c1_sck_x",
209 "i2c1_sda_x";
210 function = "i2c1";
211 };
212 };
213
214 i2c1_z_pins: i2c1_z {
215 mux {
216 groups = "i2c1_sck_z",
217 "i2c1_sda_z";
218 function = "i2c1";
219 };
220 };
221
222 i2c2_a_pins: i2c2_a {
223 mux {
224 groups = "i2c2_sck_a",
225 "i2c2_sda_a";
226 function = "i2c2";
227 };
228 };
229
230 i2c2_x_pins: i2c2_x {
231 mux {
232 groups = "i2c2_sck_x",
233 "i2c2_sda_x";
234 function = "i2c2";
235 };
236 };
237
238 i2c3_a6_pins: i2c3_a6 {
239 mux {
240 groups = "i2c3_sda_a6",
241 "i2c3_sck_a7";
242 function = "i2c3";
243 };
244 };
245
246 i2c3_a12_pins: i2c3_a12 {
247 mux {
248 groups = "i2c3_sda_a12",
249 "i2c3_sck_a13";
250 function = "i2c3";
251 };
252 };
253
254 i2c3_a19_pins: i2c3_a19 {
255 mux {
256 groups = "i2c3_sda_a19",
257 "i2c3_sck_a20";
258 function = "i2c3";
259 };
260 };
261
544 emmc_pins: emmc { 262 emmc_pins: emmc {
545 mux { 263 mux {
546 groups = "emmc_nand_d0", 264 groups = "emmc_nand_d0",
547 "emmc_nand_d1", 265 "emmc_nand_d1",
548 "emmc_nand_d2", 266 "emmc_nand_d2",
549 "emmc_nand_d3", 267 "emmc_nand_d3",
550 "emmc_nand_d4", 268 "emmc_nand_d4",
551 "emmc_nand_d5", 269 "emmc_nand_d5",
552 "emmc_nand_d6", 270 "emmc_nand_d6",
553 "emmc_nand_d7", 271 "emmc_nand_d7",
554 "emmc_clk", 272 "emmc_clk",
555 "emmc_cmd", 273 "emmc_cmd",
556 "emmc_ds"; 274 "emmc_ds";
557 function = "emmc"; 275 function = "emmc";
558 }; 276 };
559 }; 277 };
@@ -569,40 +287,57 @@
569 }; 287 };
570 }; 288 };
571 289
572 sdio_pins: sdio { 290 eth_rgmii_x_pins: eth-x-rgmii {
573 mux { 291 mux {
574 groups = "sdio_d0", 292 groups = "eth_mdio_x",
575 "sdio_d1", 293 "eth_mdc_x",
576 "sdio_d2", 294 "eth_rgmii_rx_clk_x",
577 "sdio_d3", 295 "eth_rx_dv_x",
578 "sdio_cmd", 296 "eth_rxd0_x",
579 "sdio_clk"; 297 "eth_rxd1_x",
580 function = "sdio"; 298 "eth_rxd2_rgmii",
299 "eth_rxd3_rgmii",
300 "eth_rgmii_tx_clk",
301 "eth_txen_x",
302 "eth_txd0_x",
303 "eth_txd1_x",
304 "eth_txd2_rgmii",
305 "eth_txd3_rgmii";
306 function = "eth";
581 }; 307 };
582 }; 308 };
583 309
584 sdio_clk_gate_pins: sdio_clk_gate { 310 eth_rgmii_y_pins: eth-y-rgmii {
585 mux { 311 mux {
586 groups = "GPIOX_4"; 312 groups = "eth_mdio_y",
587 function = "gpio_periphs"; 313 "eth_mdc_y",
588 }; 314 "eth_rgmii_rx_clk_y",
589 cfg-pull-down { 315 "eth_rx_dv_y",
590 pins = "GPIOX_4"; 316 "eth_rxd0_y",
591 bias-pull-down; 317 "eth_rxd1_y",
318 "eth_rxd2_rgmii",
319 "eth_rxd3_rgmii",
320 "eth_rgmii_tx_clk",
321 "eth_txen_y",
322 "eth_txd0_y",
323 "eth_txd1_y",
324 "eth_txd2_rgmii",
325 "eth_txd3_rgmii";
326 function = "eth";
592 }; 327 };
593 }; 328 };
594 329
595 eth_rmii_x_pins: eth-x-rmii { 330 eth_rmii_x_pins: eth-x-rmii {
596 mux { 331 mux {
597 groups = "eth_mdio_x", 332 groups = "eth_mdio_x",
598 "eth_mdc_x", 333 "eth_mdc_x",
599 "eth_rgmii_rx_clk_x", 334 "eth_rgmii_rx_clk_x",
600 "eth_rx_dv_x", 335 "eth_rx_dv_x",
601 "eth_rxd0_x", 336 "eth_rxd0_x",
602 "eth_rxd1_x", 337 "eth_rxd1_x",
603 "eth_txen_x", 338 "eth_txen_x",
604 "eth_txd0_x", 339 "eth_txd0_x",
605 "eth_txd1_x"; 340 "eth_txd1_x";
606 function = "eth"; 341 function = "eth";
607 }; 342 };
608 }; 343 };
@@ -610,55 +345,29 @@
610 eth_rmii_y_pins: eth-y-rmii { 345 eth_rmii_y_pins: eth-y-rmii {
611 mux { 346 mux {
612 groups = "eth_mdio_y", 347 groups = "eth_mdio_y",
613 "eth_mdc_y", 348 "eth_mdc_y",
614 "eth_rgmii_rx_clk_y", 349 "eth_rgmii_rx_clk_y",
615 "eth_rx_dv_y", 350 "eth_rx_dv_y",
616 "eth_rxd0_y", 351 "eth_rxd0_y",
617 "eth_rxd1_y", 352 "eth_rxd1_y",
618 "eth_txen_y", 353 "eth_txen_y",
619 "eth_txd0_y", 354 "eth_txd0_y",
620 "eth_txd1_y"; 355 "eth_txd1_y";
621 function = "eth"; 356 function = "eth";
622 }; 357 };
623 }; 358 };
624 359
625 eth_rgmii_x_pins: eth-x-rgmii { 360 mclk_b_pins: mclk_b {
626 mux { 361 mux {
627 groups = "eth_mdio_x", 362 groups = "mclk_b";
628 "eth_mdc_x", 363 function = "mclk_b";
629 "eth_rgmii_rx_clk_x",
630 "eth_rx_dv_x",
631 "eth_rxd0_x",
632 "eth_rxd1_x",
633 "eth_rxd2_rgmii",
634 "eth_rxd3_rgmii",
635 "eth_rgmii_tx_clk",
636 "eth_txen_x",
637 "eth_txd0_x",
638 "eth_txd1_x",
639 "eth_txd2_rgmii",
640 "eth_txd3_rgmii";
641 function = "eth";
642 }; 364 };
643 }; 365 };
644 366
645 eth_rgmii_y_pins: eth-y-rgmii { 367 mclk_c_pins: mclk_c {
646 mux { 368 mux {
647 groups = "eth_mdio_y", 369 groups = "mclk_c";
648 "eth_mdc_y", 370 function = "mclk_c";
649 "eth_rgmii_rx_clk_y",
650 "eth_rx_dv_y",
651 "eth_rxd0_y",
652 "eth_rxd1_y",
653 "eth_rxd2_rgmii",
654 "eth_rxd3_rgmii",
655 "eth_rgmii_tx_clk",
656 "eth_txen_y",
657 "eth_txd0_y",
658 "eth_txd1_y",
659 "eth_txd2_rgmii",
660 "eth_txd3_rgmii";
661 function = "eth";
662 }; 371 };
663 }; 372 };
664 373
@@ -788,6 +497,29 @@
788 }; 497 };
789 }; 498 };
790 499
500 sdio_pins: sdio {
501 mux {
502 groups = "sdio_d0",
503 "sdio_d1",
504 "sdio_d2",
505 "sdio_d3",
506 "sdio_cmd",
507 "sdio_clk";
508 function = "sdio";
509 };
510 };
511
512 sdio_clk_gate_pins: sdio_clk_gate {
513 mux {
514 groups = "GPIOX_4";
515 function = "gpio_periphs";
516 };
517 cfg-pull-down {
518 pins = "GPIOX_4";
519 bias-pull-down;
520 };
521 };
522
791 spdif_in_z_pins: spdif_in_z { 523 spdif_in_z_pins: spdif_in_z {
792 mux { 524 mux {
793 groups = "spdif_in_z"; 525 groups = "spdif_in_z";
@@ -823,13 +555,6 @@
823 }; 555 };
824 }; 556 };
825 557
826 spdif_out_z_pins: spdif_out_z {
827 mux {
828 groups = "spdif_out_z";
829 function = "spdif_out";
830 };
831 };
832
833 spdif_out_a1_pins: spdif_out_a1 { 558 spdif_out_a1_pins: spdif_out_a1 {
834 mux { 559 mux {
835 groups = "spdif_out_a1"; 560 groups = "spdif_out_a1";
@@ -858,11 +583,18 @@
858 }; 583 };
859 }; 584 };
860 585
586 spdif_out_z_pins: spdif_out_z {
587 mux {
588 groups = "spdif_out_z";
589 function = "spdif_out";
590 };
591 };
592
861 spi0_pins: spi0 { 593 spi0_pins: spi0 {
862 mux { 594 mux {
863 groups = "spi0_miso", 595 groups = "spi0_miso",
864 "spi0_mosi", 596 "spi0_mosi",
865 "spi0_clk"; 597 "spi0_clk";
866 function = "spi0"; 598 function = "spi0";
867 }; 599 };
868 }; 600 };
@@ -888,12 +620,11 @@
888 }; 620 };
889 }; 621 };
890 622
891
892 spi1_a_pins: spi1_a { 623 spi1_a_pins: spi1_a {
893 mux { 624 mux {
894 groups = "spi1_miso_a", 625 groups = "spi1_miso_a",
895 "spi1_mosi_a", 626 "spi1_mosi_a",
896 "spi1_clk_a"; 627 "spi1_clk_a";
897 function = "spi1"; 628 function = "spi1";
898 }; 629 };
899 }; 630 };
@@ -915,8 +646,8 @@
915 spi1_x_pins: spi1_x { 646 spi1_x_pins: spi1_x {
916 mux { 647 mux {
917 groups = "spi1_miso_x", 648 groups = "spi1_miso_x",
918 "spi1_mosi_x", 649 "spi1_mosi_x",
919 "spi1_clk_x"; 650 "spi1_clk_x";
920 function = "spi1"; 651 function = "spi1";
921 }; 652 };
922 }; 653 };
@@ -928,145 +659,52 @@
928 }; 659 };
929 }; 660 };
930 661
931 i2c0_pins: i2c0 { 662 tdma_din0_pins: tdma_din0 {
932 mux {
933 groups = "i2c0_sck",
934 "i2c0_sda";
935 function = "i2c0";
936 };
937 };
938
939 i2c1_z_pins: i2c1_z {
940 mux {
941 groups = "i2c1_sck_z",
942 "i2c1_sda_z";
943 function = "i2c1";
944 };
945 };
946
947 i2c1_x_pins: i2c1_x {
948 mux {
949 groups = "i2c1_sck_x",
950 "i2c1_sda_x";
951 function = "i2c1";
952 };
953 };
954
955 i2c2_x_pins: i2c2_x {
956 mux {
957 groups = "i2c2_sck_x",
958 "i2c2_sda_x";
959 function = "i2c2";
960 };
961 };
962
963 i2c2_a_pins: i2c2_a {
964 mux {
965 groups = "i2c2_sck_a",
966 "i2c2_sda_a";
967 function = "i2c2";
968 };
969 };
970
971 i2c3_a6_pins: i2c3_a6 {
972 mux {
973 groups = "i2c3_sda_a6",
974 "i2c3_sck_a7";
975 function = "i2c3";
976 };
977 };
978
979 i2c3_a12_pins: i2c3_a12 {
980 mux {
981 groups = "i2c3_sda_a12",
982 "i2c3_sck_a13";
983 function = "i2c3";
984 };
985 };
986
987 i2c3_a19_pins: i2c3_a19 {
988 mux {
989 groups = "i2c3_sda_a19",
990 "i2c3_sck_a20";
991 function = "i2c3";
992 };
993 };
994
995 uart_a_pins: uart_a {
996 mux {
997 groups = "uart_tx_a",
998 "uart_rx_a";
999 function = "uart_a";
1000 };
1001 };
1002
1003 uart_a_cts_rts_pins: uart_a_cts_rts {
1004 mux {
1005 groups = "uart_cts_a",
1006 "uart_rts_a";
1007 function = "uart_a";
1008 };
1009 };
1010
1011 uart_b_x_pins: uart_b_x {
1012 mux {
1013 groups = "uart_tx_b_x",
1014 "uart_rx_b_x";
1015 function = "uart_b";
1016 };
1017 };
1018
1019 uart_b_x_cts_rts_pins: uart_b_x_cts_rts {
1020 mux { 663 mux {
1021 groups = "uart_cts_b_x", 664 groups = "tdma_din0";
1022 "uart_rts_b_x"; 665 function = "tdma";
1023 function = "uart_b";
1024 }; 666 };
1025 }; 667 };
1026 668
1027 uart_b_z_pins: uart_b_z { 669 tdma_dout0_x14_pins: tdma_dout0_x14 {
1028 mux { 670 mux {
1029 groups = "uart_tx_b_z", 671 groups = "tdma_dout0_x14";
1030 "uart_rx_b_z"; 672 function = "tdma";
1031 function = "uart_b";
1032 }; 673 };
1033 }; 674 };
1034 675
1035 uart_b_z_cts_rts_pins: uart_b_z_cts_rts { 676 tdma_dout0_x15_pins: tdma_dout0_x15 {
1036 mux { 677 mux {
1037 groups = "uart_cts_b_z", 678 groups = "tdma_dout0_x15";
1038 "uart_rts_b_z"; 679 function = "tdma";
1039 function = "uart_b";
1040 }; 680 };
1041 }; 681 };
1042 682
1043 uart_ao_b_z_pins: uart_ao_b_z { 683 tdma_dout1_pins: tdma_dout1 {
1044 mux { 684 mux {
1045 groups = "uart_ao_tx_b_z", 685 groups = "tdma_dout1";
1046 "uart_ao_rx_b_z"; 686 function = "tdma";
1047 function = "uart_ao_b_z";
1048 }; 687 };
1049 }; 688 };
1050 689
1051 uart_ao_b_z_cts_rts_pins: uart_ao_b_z_cts_rts { 690 tdma_din1_pins: tdma_din1 {
1052 mux { 691 mux {
1053 groups = "uart_ao_cts_b_z", 692 groups = "tdma_din1";
1054 "uart_ao_rts_b_z"; 693 function = "tdma";
1055 function = "uart_ao_b_z";
1056 }; 694 };
1057 }; 695 };
1058 696
1059 mclk_b_pins: mclk_b { 697 tdma_fs_pins: tdma_fs {
1060 mux { 698 mux {
1061 groups = "mclk_b"; 699 groups = "tdma_fs";
1062 function = "mclk_b"; 700 function = "tdma";
1063 }; 701 };
1064 }; 702 };
1065 703
1066 mclk_c_pins: mclk_c { 704 tdma_fs_slv_pins: tdma_fs_slv {
1067 mux { 705 mux {
1068 groups = "mclk_c"; 706 groups = "tdma_fs_slv";
1069 function = "mclk_c"; 707 function = "tdma";
1070 }; 708 };
1071 }; 709 };
1072 710
@@ -1084,65 +722,58 @@
1084 }; 722 };
1085 }; 723 };
1086 724
1087 tdma_fs_pins: tdma_fs { 725 tdmb_din0_pins: tdmb_din0 {
1088 mux {
1089 groups = "tdma_fs";
1090 function = "tdma";
1091 };
1092 };
1093
1094 tdma_fs_slv_pins: tdma_fs_slv {
1095 mux { 726 mux {
1096 groups = "tdma_fs_slv"; 727 groups = "tdmb_din0";
1097 function = "tdma"; 728 function = "tdmb";
1098 }; 729 };
1099 }; 730 };
1100 731
1101 tdma_din0_pins: tdma_din0 { 732 tdmb_din1_pins: tdmb_din1 {
1102 mux { 733 mux {
1103 groups = "tdma_din0"; 734 groups = "tdmb_din1";
1104 function = "tdma"; 735 function = "tdmb";
1105 }; 736 };
1106 }; 737 };
1107 738
1108 tdma_dout0_x14_pins: tdma_dout0_x14 { 739 tdmb_din2_pins: tdmb_din2 {
1109 mux { 740 mux {
1110 groups = "tdma_dout0_x14"; 741 groups = "tdmb_din2";
1111 function = "tdma"; 742 function = "tdmb";
1112 }; 743 };
1113 }; 744 };
1114 745
1115 tdma_dout0_x15_pins: tdma_dout0_x15 { 746 tdmb_din3_pins: tdmb_din3 {
1116 mux { 747 mux {
1117 groups = "tdma_dout0_x15"; 748 groups = "tdmb_din3";
1118 function = "tdma"; 749 function = "tdmb";
1119 }; 750 };
1120 }; 751 };
1121 752
1122 tdma_dout1_pins: tdma_dout1 { 753 tdmb_dout0_pins: tdmb_dout0 {
1123 mux { 754 mux {
1124 groups = "tdma_dout1"; 755 groups = "tdmb_dout0";
1125 function = "tdma"; 756 function = "tdmb";
1126 }; 757 };
1127 }; 758 };
1128 759
1129 tdma_din1_pins: tdma_din1 { 760 tdmb_dout1_pins: tdmb_dout1 {
1130 mux { 761 mux {
1131 groups = "tdma_din1"; 762 groups = "tdmb_dout1";
1132 function = "tdma"; 763 function = "tdmb";
1133 }; 764 };
1134 }; 765 };
1135 766
1136 tdmb_sclk_pins: tdmb_sclk { 767 tdmb_dout2_pins: tdmb_dout2 {
1137 mux { 768 mux {
1138 groups = "tdmb_sclk"; 769 groups = "tdmb_dout2";
1139 function = "tdmb"; 770 function = "tdmb";
1140 }; 771 };
1141 }; 772 };
1142 773
1143 tdmb_sclk_slv_pins: tdmb_sclk_slv { 774 tdmb_dout3_pins: tdmb_dout3 {
1144 mux { 775 mux {
1145 groups = "tdmb_sclk_slv"; 776 groups = "tdmb_dout3";
1146 function = "tdmb"; 777 function = "tdmb";
1147 }; 778 };
1148 }; 779 };
@@ -1161,163 +792,412 @@
1161 }; 792 };
1162 }; 793 };
1163 794
1164 tdmb_din0_pins: tdmb_din0 { 795 tdmb_sclk_pins: tdmb_sclk {
1165 mux { 796 mux {
1166 groups = "tdmb_din0"; 797 groups = "tdmb_sclk";
1167 function = "tdmb"; 798 function = "tdmb";
1168 }; 799 };
1169 }; 800 };
1170 801
1171 tdmb_dout0_pins: tdmb_dout0 { 802 tdmb_sclk_slv_pins: tdmb_sclk_slv {
1172 mux { 803 mux {
1173 groups = "tdmb_dout0"; 804 groups = "tdmb_sclk_slv";
1174 function = "tdmb"; 805 function = "tdmb";
1175 }; 806 };
1176 }; 807 };
1177 808
1178 tdmb_din1_pins: tdmb_din1 { 809 tdmc_fs_pins: tdmc_fs {
1179 mux { 810 mux {
1180 groups = "tdmb_din1"; 811 groups = "tdmc_fs";
1181 function = "tdmb"; 812 function = "tdmc";
1182 }; 813 };
1183 }; 814 };
1184 815
1185 tdmb_dout1_pins: tdmb_dout1 { 816 tdmc_fs_slv_pins: tdmc_fs_slv {
1186 mux { 817 mux {
1187 groups = "tdmb_dout1"; 818 groups = "tdmc_fs_slv";
1188 function = "tdmb"; 819 function = "tdmc";
1189 }; 820 };
1190 }; 821 };
1191 822
1192 tdmb_din2_pins: tdmb_din2 { 823 tdmc_sclk_pins: tdmc_sclk {
1193 mux { 824 mux {
1194 groups = "tdmb_din2"; 825 groups = "tdmc_sclk";
1195 function = "tdmb"; 826 function = "tdmc";
1196 }; 827 };
1197 }; 828 };
1198 829
1199 tdmb_dout2_pins: tdmb_dout2 { 830 tdmc_sclk_slv_pins: tdmc_sclk_slv {
1200 mux { 831 mux {
1201 groups = "tdmb_dout2"; 832 groups = "tdmc_sclk_slv";
1202 function = "tdmb"; 833 function = "tdmc";
1203 }; 834 };
1204 }; 835 };
1205 836
1206 tdmb_din3_pins: tdmb_din3 { 837 tdmc_din0_pins: tdmc_din0 {
1207 mux { 838 mux {
1208 groups = "tdmb_din3"; 839 groups = "tdmc_din0";
1209 function = "tdmb"; 840 function = "tdmc";
1210 }; 841 };
1211 }; 842 };
1212 843
1213 tdmb_dout3_pins: tdmb_dout3 { 844 tdmc_din1_pins: tdmc_din1 {
1214 mux { 845 mux {
1215 groups = "tdmb_dout3"; 846 groups = "tdmc_din1";
1216 function = "tdmb"; 847 function = "tdmc";
1217 }; 848 };
1218 }; 849 };
1219 850
1220 tdmc_sclk_pins: tdmc_sclk { 851 tdmc_din2_pins: tdmc_din2 {
1221 mux { 852 mux {
1222 groups = "tdmc_sclk"; 853 groups = "tdmc_din2";
1223 function = "tdmc"; 854 function = "tdmc";
1224 }; 855 };
1225 }; 856 };
1226 857
1227 tdmc_sclk_slv_pins: tdmc_sclk_slv { 858 tdmc_din3_pins: tdmc_din3 {
1228 mux { 859 mux {
1229 groups = "tdmc_sclk_slv"; 860 groups = "tdmc_din3";
1230 function = "tdmc"; 861 function = "tdmc";
1231 }; 862 };
1232 }; 863 };
1233 864
1234 tdmc_fs_pins: tdmc_fs { 865 tdmc_dout0_pins: tdmc_dout0 {
1235 mux { 866 mux {
1236 groups = "tdmc_fs"; 867 groups = "tdmc_dout0";
1237 function = "tdmc"; 868 function = "tdmc";
1238 }; 869 };
1239 }; 870 };
1240 871
1241 tdmc_fs_slv_pins: tdmc_fs_slv { 872 tdmc_dout1_pins: tdmc_dout1 {
1242 mux { 873 mux {
1243 groups = "tdmc_fs_slv"; 874 groups = "tdmc_dout1";
1244 function = "tdmc"; 875 function = "tdmc";
1245 }; 876 };
1246 }; 877 };
1247 878
1248 tdmc_din0_pins: tdmc_din0 { 879 tdmc_dout2_pins: tdmc_dout2 {
1249 mux { 880 mux {
1250 groups = "tdmc_din0"; 881 groups = "tdmc_dout2";
1251 function = "tdmc"; 882 function = "tdmc";
1252 }; 883 };
1253 }; 884 };
1254 885
1255 tdmc_dout0_pins: tdmc_dout0 { 886 tdmc_dout3_pins: tdmc_dout3 {
1256 mux { 887 mux {
1257 groups = "tdmc_dout0"; 888 groups = "tdmc_dout3";
1258 function = "tdmc"; 889 function = "tdmc";
1259 }; 890 };
1260 }; 891 };
1261 892
1262 tdmc_din1_pins: tdmc_din1 { 893 uart_a_pins: uart_a {
1263 mux { 894 mux {
1264 groups = "tdmc_din1"; 895 groups = "uart_tx_a",
1265 function = "tdmc"; 896 "uart_rx_a";
897 function = "uart_a";
1266 }; 898 };
1267 }; 899 };
1268 900
1269 tdmc_dout1_pins: tdmc_dout1 { 901 uart_a_cts_rts_pins: uart_a_cts_rts {
1270 mux { 902 mux {
1271 groups = "tdmc_dout1"; 903 groups = "uart_cts_a",
1272 function = "tdmc"; 904 "uart_rts_a";
905 function = "uart_a";
1273 }; 906 };
1274 }; 907 };
1275 908
1276 tdmc_din2_pins: tdmc_din2 { 909 uart_b_x_pins: uart_b_x {
1277 mux { 910 mux {
1278 groups = "tdmc_din2"; 911 groups = "uart_tx_b_x",
1279 function = "tdmc"; 912 "uart_rx_b_x";
913 function = "uart_b";
1280 }; 914 };
1281 }; 915 };
1282 916
1283 tdmc_dout2_pins: tdmc_dout2 { 917 uart_b_x_cts_rts_pins: uart_b_x_cts_rts {
1284 mux { 918 mux {
1285 groups = "tdmc_dout2"; 919 groups = "uart_cts_b_x",
1286 function = "tdmc"; 920 "uart_rts_b_x";
921 function = "uart_b";
1287 }; 922 };
1288 }; 923 };
1289 924
1290 tdmc_din3_pins: tdmc_din3 { 925 uart_b_z_pins: uart_b_z {
1291 mux { 926 mux {
1292 groups = "tdmc_din3"; 927 groups = "uart_tx_b_z",
1293 function = "tdmc"; 928 "uart_rx_b_z";
929 function = "uart_b";
1294 }; 930 };
1295 }; 931 };
1296 932
1297 tdmc_dout3_pins: tdmc_dout3 { 933 uart_b_z_cts_rts_pins: uart_b_z_cts_rts {
1298 mux { 934 mux {
1299 groups = "tdmc_dout3"; 935 groups = "uart_cts_b_z",
1300 function = "tdmc"; 936 "uart_rts_b_z";
937 function = "uart_b";
938 };
939 };
940
941 uart_ao_b_z_pins: uart_ao_b_z {
942 mux {
943 groups = "uart_ao_tx_b_z",
944 "uart_ao_rx_b_z";
945 function = "uart_ao_b_z";
946 };
947 };
948
949 uart_ao_b_z_cts_rts_pins: uart_ao_b_z_cts_rts {
950 mux {
951 groups = "uart_ao_cts_b_z",
952 "uart_ao_rts_b_z";
953 function = "uart_ao_b_z";
1301 }; 954 };
1302 }; 955 };
1303 }; 956 };
1304 }; 957 };
1305 958
1306 sram: sram@fffc0000 { 959 hiubus: bus@ff63c000 {
1307 compatible = "amlogic,meson-axg-sram", "mmio-sram"; 960 compatible = "simple-bus";
1308 reg = <0x0 0xfffc0000 0x0 0x20000>; 961 reg = <0x0 0xff63c000 0x0 0x1c00>;
1309 #address-cells = <1>; 962 #address-cells = <2>;
1310 #size-cells = <1>; 963 #size-cells = <2>;
1311 ranges = <0 0x0 0xfffc0000 0x20000>; 964 ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
1312 965
1313 cpu_scp_lpri: scp-shmem@0 { 966 sysctrl: system-controller@0 {
1314 compatible = "amlogic,meson-axg-scp-shmem"; 967 compatible = "amlogic,meson-axg-hhi-sysctrl",
1315 reg = <0x13000 0x400>; 968 "simple-mfd", "syscon";
969 reg = <0 0 0 0x400>;
970
971 clkc: clock-controller {
972 compatible = "amlogic,axg-clkc";
973 #clock-cells = <1>;
974 };
1316 }; 975 };
976 };
1317 977
1318 cpu_scp_hpri: scp-shmem@200 { 978 mailbox: mailbox@ff63dc00 {
1319 compatible = "amlogic,meson-axg-scp-shmem"; 979 compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
1320 reg = <0x13400 0x400>; 980 reg = <0 0xff63dc00 0 0x400>;
981 interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
982 <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
983 <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
984 #mbox-cells = <1>;
985 };
986
987 audio: bus@ff642000 {
988 compatible = "simple-bus";
989 reg = <0x0 0xff642000 0x0 0x2000>;
990 #address-cells = <2>;
991 #size-cells = <2>;
992 ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
993
994 clkc_audio: clock-controller@0 {
995 compatible = "amlogic,axg-audio-clkc";
996 reg = <0x0 0x0 0x0 0xb4>;
997 #clock-cells = <1>;
998
999 clocks = <&clkc CLKID_AUDIO>,
1000 <&clkc CLKID_MPLL0>,
1001 <&clkc CLKID_MPLL1>,
1002 <&clkc CLKID_MPLL2>,
1003 <&clkc CLKID_MPLL3>,
1004 <&clkc CLKID_HIFI_PLL>,
1005 <&clkc CLKID_FCLK_DIV3>,
1006 <&clkc CLKID_FCLK_DIV4>,
1007 <&clkc CLKID_GP0_PLL>;
1008 clock-names = "pclk",
1009 "mst_in0",
1010 "mst_in1",
1011 "mst_in2",
1012 "mst_in3",
1013 "mst_in4",
1014 "mst_in5",
1015 "mst_in6",
1016 "mst_in7";
1017
1018 resets = <&reset RESET_AUDIO>;
1019 };
1020
1021 toddr_a: audio-controller@100 {
1022 compatible = "amlogic,axg-toddr";
1023 reg = <0x0 0x100 0x0 0x1c>;
1024 #sound-dai-cells = <0>;
1025 sound-name-prefix = "TODDR_A";
1026 interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
1027 clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
1028 resets = <&arb AXG_ARB_TODDR_A>;
1029 status = "disabled";
1030 };
1031
1032 toddr_b: audio-controller@140 {
1033 compatible = "amlogic,axg-toddr";
1034 reg = <0x0 0x140 0x0 0x1c>;
1035 #sound-dai-cells = <0>;
1036 sound-name-prefix = "TODDR_B";
1037 interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
1038 clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
1039 resets = <&arb AXG_ARB_TODDR_B>;
1040 status = "disabled";
1041 };
1042
1043 toddr_c: audio-controller@180 {
1044 compatible = "amlogic,axg-toddr";
1045 reg = <0x0 0x180 0x0 0x1c>;
1046 #sound-dai-cells = <0>;
1047 sound-name-prefix = "TODDR_C";
1048 interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
1049 clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
1050 resets = <&arb AXG_ARB_TODDR_C>;
1051 status = "disabled";
1052 };
1053
1054 frddr_a: audio-controller@1c0 {
1055 compatible = "amlogic,axg-frddr";
1056 reg = <0x0 0x1c0 0x0 0x1c>;
1057 #sound-dai-cells = <0>;
1058 sound-name-prefix = "FRDDR_A";
1059 interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
1060 clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
1061 resets = <&arb AXG_ARB_FRDDR_A>;
1062 status = "disabled";
1063 };
1064
1065 frddr_b: audio-controller@200 {
1066 compatible = "amlogic,axg-frddr";
1067 reg = <0x0 0x200 0x0 0x1c>;
1068 #sound-dai-cells = <0>;
1069 sound-name-prefix = "FRDDR_B";
1070 interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
1071 clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
1072 resets = <&arb AXG_ARB_FRDDR_B>;
1073 status = "disabled";
1074 };
1075
1076 frddr_c: audio-controller@240 {
1077 compatible = "amlogic,axg-frddr";
1078 reg = <0x0 0x240 0x0 0x1c>;
1079 #sound-dai-cells = <0>;
1080 sound-name-prefix = "FRDDR_C";
1081 interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
1082 clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
1083 resets = <&arb AXG_ARB_FRDDR_C>;
1084 status = "disabled";
1085 };
1086
1087 arb: reset-controller@280 {
1088 compatible = "amlogic,meson-axg-audio-arb";
1089 reg = <0x0 0x280 0x0 0x4>;
1090 #reset-cells = <1>;
1091 clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
1092 };
1093
1094 tdmin_a: audio-controller@300 {
1095 compatible = "amlogic,axg-tdmin";
1096 reg = <0x0 0x300 0x0 0x40>;
1097 sound-name-prefix = "TDMIN_A";
1098 clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
1099 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
1100 <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
1101 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
1102 <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
1103 clock-names = "pclk", "sclk", "sclk_sel",
1104 "lrclk", "lrclk_sel";
1105 status = "disabled";
1106 };
1107
1108 tdmin_b: audio-controller@340 {
1109 compatible = "amlogic,axg-tdmin";
1110 reg = <0x0 0x340 0x0 0x40>;
1111 sound-name-prefix = "TDMIN_B";
1112 clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
1113 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
1114 <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
1115 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
1116 <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
1117 clock-names = "pclk", "sclk", "sclk_sel",
1118 "lrclk", "lrclk_sel";
1119 status = "disabled";
1120 };
1121
1122 tdmin_c: audio-controller@380 {
1123 compatible = "amlogic,axg-tdmin";
1124 reg = <0x0 0x380 0x0 0x40>;
1125 sound-name-prefix = "TDMIN_C";
1126 clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
1127 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
1128 <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
1129 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
1130 <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
1131 clock-names = "pclk", "sclk", "sclk_sel",
1132 "lrclk", "lrclk_sel";
1133 status = "disabled";
1134 };
1135
1136 tdmin_lb: audio-controller@3c0 {
1137 compatible = "amlogic,axg-tdmin";
1138 reg = <0x0 0x3c0 0x0 0x40>;
1139 sound-name-prefix = "TDMIN_LB";
1140 clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
1141 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
1142 <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
1143 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
1144 <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
1145 clock-names = "pclk", "sclk", "sclk_sel",
1146 "lrclk", "lrclk_sel";
1147 status = "disabled";
1148 };
1149
1150 spdifout: audio-controller@480 {
1151 compatible = "amlogic,axg-spdifout";
1152 reg = <0x0 0x480 0x0 0x50>;
1153 #sound-dai-cells = <0>;
1154 sound-name-prefix = "SPDIFOUT";
1155 clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
1156 <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
1157 clock-names = "pclk", "mclk";
1158 status = "disabled";
1159 };
1160
1161 tdmout_a: audio-controller@500 {
1162 compatible = "amlogic,axg-tdmout";
1163 reg = <0x0 0x500 0x0 0x40>;
1164 sound-name-prefix = "TDMOUT_A";
1165 clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
1166 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
1167 <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
1168 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
1169 <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
1170 clock-names = "pclk", "sclk", "sclk_sel",
1171 "lrclk", "lrclk_sel";
1172 status = "disabled";
1173 };
1174
1175 tdmout_b: audio-controller@540 {
1176 compatible = "amlogic,axg-tdmout";
1177 reg = <0x0 0x540 0x0 0x40>;
1178 sound-name-prefix = "TDMOUT_B";
1179 clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
1180 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
1181 <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
1182 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
1183 <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
1184 clock-names = "pclk", "sclk", "sclk_sel",
1185 "lrclk", "lrclk_sel";
1186 status = "disabled";
1187 };
1188
1189 tdmout_c: audio-controller@580 {
1190 compatible = "amlogic,axg-tdmout";
1191 reg = <0x0 0x580 0x0 0x40>;
1192 sound-name-prefix = "TDMOUT_C";
1193 clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
1194 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
1195 <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
1196 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
1197 <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
1198 clock-names = "pclk", "sclk", "sclk_sel",
1199 "lrclk", "lrclk_sel";
1200 status = "disabled";
1321 }; 1201 };
1322 }; 1202 };
1323 1203
@@ -1329,7 +1209,7 @@
1329 ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>; 1209 ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
1330 1210
1331 sysctrl_AO: sys-ctrl@0 { 1211 sysctrl_AO: sys-ctrl@0 {
1332 compatible = "amlogic,meson-axg-ao-sysctrl", "syscon", "simple-mfd"; 1212 compatible = "amlogic,meson-axg-ao-sysctrl", "simple-mfd", "syscon";
1333 reg = <0x0 0x0 0x0 0x100>; 1213 reg = <0x0 0x0 0x0 0x100>;
1334 1214
1335 clkc_AO: clock-controller { 1215 clkc_AO: clock-controller {
@@ -1347,8 +1227,8 @@
1347 1227
1348 gpio_ao: bank@14 { 1228 gpio_ao: bank@14 {
1349 reg = <0x0 0x00014 0x0 0x8>, 1229 reg = <0x0 0x00014 0x0 0x8>,
1350 <0x0 0x0002c 0x0 0x4>, 1230 <0x0 0x0002c 0x0 0x4>,
1351 <0x0 0x00024 0x0 0x8>; 1231 <0x0 0x00024 0x0 0x8>;
1352 reg-names = "mux", "pull", "gpio"; 1232 reg-names = "mux", "pull", "gpio";
1353 gpio-controller; 1233 gpio-controller;
1354 #gpio-cells = <2>; 1234 #gpio-cells = <2>;
@@ -1407,7 +1287,7 @@
1407 uart_ao_a_pins: uart_ao_a { 1287 uart_ao_a_pins: uart_ao_a {
1408 mux { 1288 mux {
1409 groups = "uart_ao_tx_a", 1289 groups = "uart_ao_tx_a",
1410 "uart_ao_rx_a"; 1290 "uart_ao_rx_a";
1411 function = "uart_ao_a"; 1291 function = "uart_ao_a";
1412 }; 1292 };
1413 }; 1293 };
@@ -1415,7 +1295,7 @@
1415 uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts { 1295 uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
1416 mux { 1296 mux {
1417 groups = "uart_ao_cts_a", 1297 groups = "uart_ao_cts_a",
1418 "uart_ao_rts_a"; 1298 "uart_ao_rts_a";
1419 function = "uart_ao_a"; 1299 function = "uart_ao_a";
1420 }; 1300 };
1421 }; 1301 };
@@ -1423,7 +1303,7 @@
1423 uart_ao_b_pins: uart_ao_b { 1303 uart_ao_b_pins: uart_ao_b {
1424 mux { 1304 mux {
1425 groups = "uart_ao_tx_b", 1305 groups = "uart_ao_tx_b",
1426 "uart_ao_rx_b"; 1306 "uart_ao_rx_b";
1427 function = "uart_ao_b"; 1307 function = "uart_ao_b";
1428 }; 1308 };
1429 }; 1309 };
@@ -1431,7 +1311,7 @@
1431 uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts { 1311 uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
1432 mux { 1312 mux {
1433 groups = "uart_ao_cts_b", 1313 groups = "uart_ao_cts_b",
1434 "uart_ao_rts_b"; 1314 "uart_ao_rts_b";
1435 function = "uart_ao_b"; 1315 function = "uart_ao_b";
1436 }; 1316 };
1437 }; 1317 };
@@ -1443,13 +1323,6 @@
1443 amlogic,has-chip-id; 1323 amlogic,has-chip-id;
1444 }; 1324 };
1445 1325
1446 pwm_AO_ab: pwm@7000 {
1447 compatible = "amlogic,meson-axg-ao-pwm";
1448 reg = <0x0 0x07000 0x0 0x20>;
1449 #pwm-cells = <3>;
1450 status = "disabled";
1451 };
1452
1453 pwm_AO_cd: pwm@2000 { 1326 pwm_AO_cd: pwm@2000 {
1454 compatible = "amlogic,meson-axg-ao-pwm"; 1327 compatible = "amlogic,meson-axg-ao-pwm";
1455 reg = <0x0 0x02000 0x0 0x20>; 1328 reg = <0x0 0x02000 0x0 0x20>;
@@ -1457,16 +1330,6 @@
1457 status = "disabled"; 1330 status = "disabled";
1458 }; 1331 };
1459 1332
1460 i2c_AO: i2c@5000 {
1461 compatible = "amlogic,meson-axg-i2c";
1462 reg = <0x0 0x05000 0x0 0x20>;
1463 interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
1464 clocks = <&clkc CLKID_AO_I2C>;
1465 #address-cells = <1>;
1466 #size-cells = <0>;
1467 status = "disabled";
1468 };
1469
1470 uart_AO: serial@3000 { 1333 uart_AO: serial@3000 {
1471 compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart"; 1334 compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
1472 reg = <0x0 0x3000 0x0 0x18>; 1335 reg = <0x0 0x3000 0x0 0x18>;
@@ -1485,6 +1348,23 @@
1485 status = "disabled"; 1348 status = "disabled";
1486 }; 1349 };
1487 1350
1351 i2c_AO: i2c@5000 {
1352 compatible = "amlogic,meson-axg-i2c";
1353 reg = <0x0 0x05000 0x0 0x20>;
1354 interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
1355 clocks = <&clkc CLKID_AO_I2C>;
1356 #address-cells = <1>;
1357 #size-cells = <0>;
1358 status = "disabled";
1359 };
1360
1361 pwm_AO_ab: pwm@7000 {
1362 compatible = "amlogic,meson-axg-ao-pwm";
1363 reg = <0x0 0x07000 0x0 0x20>;
1364 #pwm-cells = <3>;
1365 status = "disabled";
1366 };
1367
1488 ir: ir@8000 { 1368 ir: ir@8000 {
1489 compatible = "amlogic,meson-gxbb-ir"; 1369 compatible = "amlogic,meson-gxbb-ir";
1490 reg = <0x0 0x8000 0x0 0x20>; 1370 reg = <0x0 0x8000 0x0 0x20>;
@@ -1499,12 +1379,211 @@
1499 #io-channel-cells = <1>; 1379 #io-channel-cells = <1>;
1500 interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>; 1380 interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
1501 clocks = <&xtal>, 1381 clocks = <&xtal>,
1502 <&clkc_AO CLKID_AO_SAR_ADC>, 1382 <&clkc_AO CLKID_AO_SAR_ADC>,
1503 <&clkc_AO CLKID_AO_SAR_ADC_CLK>, 1383 <&clkc_AO CLKID_AO_SAR_ADC_CLK>,
1504 <&clkc_AO CLKID_AO_SAR_ADC_SEL>; 1384 <&clkc_AO CLKID_AO_SAR_ADC_SEL>;
1505 clock-names = "clkin", "core", "adc_clk", "adc_sel"; 1385 clock-names = "clkin", "core", "adc_clk", "adc_sel";
1506 status = "disabled"; 1386 status = "disabled";
1507 }; 1387 };
1508 }; 1388 };
1389
1390 gic: interrupt-controller@ffc01000 {
1391 compatible = "arm,gic-400";
1392 reg = <0x0 0xffc01000 0 0x1000>,
1393 <0x0 0xffc02000 0 0x2000>,
1394 <0x0 0xffc04000 0 0x2000>,
1395 <0x0 0xffc06000 0 0x2000>;
1396 interrupt-controller;
1397 interrupts = <GIC_PPI 9
1398 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
1399 #interrupt-cells = <3>;
1400 #address-cells = <0>;
1401 };
1402
1403 cbus: bus@ffd00000 {
1404 compatible = "simple-bus";
1405 reg = <0x0 0xffd00000 0x0 0x25000>;
1406 #address-cells = <2>;
1407 #size-cells = <2>;
1408 ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
1409
1410 reset: reset-controller@1004 {
1411 compatible = "amlogic,meson-axg-reset";
1412 reg = <0x0 0x01004 0x0 0x9c>;
1413 #reset-cells = <1>;
1414 };
1415
1416 gpio_intc: interrupt-controller@f080 {
1417 compatible = "amlogic,meson-gpio-intc";
1418 reg = <0x0 0xf080 0x0 0x10>;
1419 interrupt-controller;
1420 #interrupt-cells = <2>;
1421 amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
1422 status = "disabled";
1423 };
1424
1425 pwm_ab: pwm@1b000 {
1426 compatible = "amlogic,meson-axg-ee-pwm";
1427 reg = <0x0 0x1b000 0x0 0x20>;
1428 #pwm-cells = <3>;
1429 status = "disabled";
1430 };
1431
1432 pwm_cd: pwm@1a000 {
1433 compatible = "amlogic,meson-axg-ee-pwm";
1434 reg = <0x0 0x1a000 0x0 0x20>;
1435 #pwm-cells = <3>;
1436 status = "disabled";
1437 };
1438
1439 spicc0: spi@13000 {
1440 compatible = "amlogic,meson-axg-spicc";
1441 reg = <0x0 0x13000 0x0 0x3c>;
1442 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
1443 clocks = <&clkc CLKID_SPICC0>;
1444 clock-names = "core";
1445 #address-cells = <1>;
1446 #size-cells = <0>;
1447 status = "disabled";
1448 };
1449
1450 spicc1: spi@15000 {
1451 compatible = "amlogic,meson-axg-spicc";
1452 reg = <0x0 0x15000 0x0 0x3c>;
1453 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
1454 clocks = <&clkc CLKID_SPICC1>;
1455 clock-names = "core";
1456 #address-cells = <1>;
1457 #size-cells = <0>;
1458 status = "disabled";
1459 };
1460
1461 i2c3: i2c@1c000 {
1462 compatible = "amlogic,meson-axg-i2c";
1463 reg = <0x0 0x1c000 0x0 0x20>;
1464 interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>;
1465 clocks = <&clkc CLKID_I2C>;
1466 #address-cells = <1>;
1467 #size-cells = <0>;
1468 status = "disabled";
1469 };
1470
1471 i2c2: i2c@1d000 {
1472 compatible = "amlogic,meson-axg-i2c";
1473 reg = <0x0 0x1d000 0x0 0x20>;
1474 interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
1475 clocks = <&clkc CLKID_I2C>;
1476 #address-cells = <1>;
1477 #size-cells = <0>;
1478 status = "disabled";
1479 };
1480
1481 i2c1: i2c@1e000 {
1482 compatible = "amlogic,meson-axg-i2c";
1483 reg = <0x0 0x1e000 0x0 0x20>;
1484 interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
1485 clocks = <&clkc CLKID_I2C>;
1486 #address-cells = <1>;
1487 #size-cells = <0>;
1488 status = "disabled";
1489 };
1490
1491 i2c0: i2c@1f000 {
1492 compatible = "amlogic,meson-axg-i2c";
1493 reg = <0x0 0x1f000 0x0 0x20>;
1494 interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
1495 clocks = <&clkc CLKID_I2C>;
1496 #address-cells = <1>;
1497 #size-cells = <0>;
1498 status = "disabled";
1499 };
1500
1501 uart_B: serial@23000 {
1502 compatible = "amlogic,meson-gx-uart";
1503 reg = <0x0 0x23000 0x0 0x18>;
1504 interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
1505 status = "disabled";
1506 clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
1507 clock-names = "xtal", "pclk", "baud";
1508 };
1509
1510 uart_A: serial@24000 {
1511 compatible = "amlogic,meson-gx-uart";
1512 reg = <0x0 0x24000 0x0 0x18>;
1513 interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
1514 status = "disabled";
1515 clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
1516 clock-names = "xtal", "pclk", "baud";
1517 };
1518 };
1519
1520 apb: bus@ffe00000 {
1521 compatible = "simple-bus";
1522 reg = <0x0 0xffe00000 0x0 0x200000>;
1523 #address-cells = <2>;
1524 #size-cells = <2>;
1525 ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
1526
1527 sd_emmc_b: sd@5000 {
1528 compatible = "amlogic,meson-axg-mmc";
1529 reg = <0x0 0x5000 0x0 0x800>;
1530 interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
1531 status = "disabled";
1532 clocks = <&clkc CLKID_SD_EMMC_B>,
1533 <&clkc CLKID_SD_EMMC_B_CLK0>,
1534 <&clkc CLKID_FCLK_DIV2>;
1535 clock-names = "core", "clkin0", "clkin1";
1536 resets = <&reset RESET_SD_EMMC_B>;
1537 };
1538
1539 sd_emmc_c: mmc@7000 {
1540 compatible = "amlogic,meson-axg-mmc";
1541 reg = <0x0 0x7000 0x0 0x800>;
1542 interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
1543 status = "disabled";
1544 clocks = <&clkc CLKID_SD_EMMC_C>,
1545 <&clkc CLKID_SD_EMMC_C_CLK0>,
1546 <&clkc CLKID_FCLK_DIV2>;
1547 clock-names = "core", "clkin0", "clkin1";
1548 resets = <&reset RESET_SD_EMMC_C>;
1549 };
1550 };
1551
1552 sram: sram@fffc0000 {
1553 compatible = "amlogic,meson-axg-sram", "mmio-sram";
1554 reg = <0x0 0xfffc0000 0x0 0x20000>;
1555 #address-cells = <1>;
1556 #size-cells = <1>;
1557 ranges = <0 0x0 0xfffc0000 0x20000>;
1558
1559 cpu_scp_lpri: scp-shmem@0 {
1560 compatible = "amlogic,meson-axg-scp-shmem";
1561 reg = <0x13000 0x400>;
1562 };
1563
1564 cpu_scp_hpri: scp-shmem@200 {
1565 compatible = "amlogic,meson-axg-scp-shmem";
1566 reg = <0x13400 0x400>;
1567 };
1568 };
1569 };
1570
1571 timer {
1572 compatible = "arm,armv8-timer";
1573 interrupts = <GIC_PPI 13
1574 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
1575 <GIC_PPI 14
1576 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
1577 <GIC_PPI 11
1578 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
1579 <GIC_PPI 10
1580 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
1581 };
1582
1583 xtal: xtal-clk {
1584 compatible = "fixed-clock";
1585 clock-frequency = <24000000>;
1586 clock-output-names = "xtal";
1587 #clock-cells = <0>;
1509 }; 1588 };
1510}; 1589};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
new file mode 100644
index 000000000000..c44dbdddf2cf
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -0,0 +1,29 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
4 */
5
6/dts-v1/;
7
8#include "meson-g12a.dtsi"
9
10/ {
11 compatible = "amlogic,u200", "amlogic,g12a";
12 model = "Amlogic Meson G12A U200 Development Board";
13
14 aliases {
15 serial0 = &uart_AO;
16 };
17 chosen {
18 stdout-path = "serial0:115200n8";
19 };
20 memory@0 {
21 device_type = "memory";
22 reg = <0x0 0x0 0x0 0x40000000>;
23 };
24};
25
26&uart_AO {
27 status = "okay";
28};
29
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
new file mode 100644
index 000000000000..3b82a975c663
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
@@ -0,0 +1,172 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9
10/ {
11 compatible = "amlogic,g12a";
12
13 interrupt-parent = <&gic>;
14 #address-cells = <2>;
15 #size-cells = <2>;
16
17 cpus {
18 #address-cells = <0x2>;
19 #size-cells = <0x0>;
20
21 cpu0: cpu@0 {
22 device_type = "cpu";
23 compatible = "arm,cortex-a53", "arm,armv8";
24 reg = <0x0 0x0>;
25 enable-method = "psci";
26 next-level-cache = <&l2>;
27 };
28
29 cpu1: cpu@1 {
30 device_type = "cpu";
31 compatible = "arm,cortex-a53", "arm,armv8";
32 reg = <0x0 0x1>;
33 enable-method = "psci";
34 next-level-cache = <&l2>;
35 };
36
37 cpu2: cpu@2 {
38 device_type = "cpu";
39 compatible = "arm,cortex-a53", "arm,armv8";
40 reg = <0x0 0x2>;
41 enable-method = "psci";
42 next-level-cache = <&l2>;
43 };
44
45 cpu3: cpu@3 {
46 device_type = "cpu";
47 compatible = "arm,cortex-a53", "arm,armv8";
48 reg = <0x0 0x3>;
49 enable-method = "psci";
50 next-level-cache = <&l2>;
51 };
52
53 l2: l2-cache0 {
54 compatible = "cache";
55 };
56 };
57
58 psci {
59 compatible = "arm,psci-1.0";
60 method = "smc";
61 };
62
63 reserved-memory {
64 #address-cells = <2>;
65 #size-cells = <2>;
66 ranges;
67
68 /* 3 MiB reserved for ARM Trusted Firmware (BL31) */
69 secmon_reserved: secmon@5000000 {
70 reg = <0x0 0x05000000 0x0 0x300000>;
71 no-map;
72 };
73 };
74
75 soc {
76 compatible = "simple-bus";
77 #address-cells = <2>;
78 #size-cells = <2>;
79 ranges;
80
81 periphs: periphs@ff634000 {
82 compatible = "simple-bus";
83 reg = <0x0 0xff634000 0x0 0x2000>;
84 #address-cells = <2>;
85 #size-cells = <2>;
86 ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
87 };
88
89 hiubus: bus@ff63c000 {
90 compatible = "simple-bus";
91 reg = <0x0 0xff63c000 0x0 0x1c00>;
92 #address-cells = <2>;
93 #size-cells = <2>;
94 ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
95 };
96
97 aobus: bus@ff800000 {
98 compatible = "simple-bus";
99 reg = <0x0 0xff800000 0x0 0x100000>;
100 #address-cells = <2>;
101 #size-cells = <2>;
102 ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
103
104 uart_AO: serial@3000 {
105 compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
106 reg = <0x0 0x3000 0x0 0x18>;
107 interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
108 clocks = <&xtal>, <&xtal>, <&xtal>;
109 clock-names = "xtal", "pclk", "baud";
110 status = "disabled";
111 };
112
113 uart_AO_B: serial@4000 {
114 compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
115 reg = <0x0 0x4000 0x0 0x18>;
116 interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
117 clocks = <&xtal>, <&xtal>, <&xtal>;
118 clock-names = "xtal", "pclk", "baud";
119 status = "disabled";
120 };
121 };
122
123 gic: interrupt-controller@ffc01000 {
124 compatible = "arm,gic-400";
125 reg = <0x0 0xffc01000 0 0x1000>,
126 <0x0 0xffc02000 0 0x2000>,
127 <0x0 0xffc04000 0 0x2000>,
128 <0x0 0xffc06000 0 0x2000>;
129 interrupt-controller;
130 interrupts = <GIC_PPI 9
131 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
132 #interrupt-cells = <3>;
133 #address-cells = <0>;
134 };
135
136 cbus: bus@ffd00000 {
137 compatible = "simple-bus";
138 reg = <0x0 0xffd00000 0x0 0x25000>;
139 #address-cells = <2>;
140 #size-cells = <2>;
141 ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
142 };
143
144 apb: apb@ffe00000 {
145 compatible = "simple-bus";
146 reg = <0x0 0xffe00000 0x0 0x200000>;
147 #address-cells = <2>;
148 #size-cells = <2>;
149 ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
150 };
151 };
152
153 timer {
154 compatible = "arm,armv8-timer";
155 interrupts = <GIC_PPI 13
156 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
157 <GIC_PPI 14
158 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
159 <GIC_PPI 11
160 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
161 <GIC_PPI 10
162 (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
163 };
164
165 xtal: xtal-clk {
166 compatible = "fixed-clock";
167 clock-frequency = <24000000>;
168 clock-output-names = "xtal";
169 #clock-cells = <0>;
170 };
171
172};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index b8dc4dbb391b..f1e5cdbade5e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -44,7 +44,7 @@
44 linux,cma { 44 linux,cma {
45 compatible = "shared-dma-pool"; 45 compatible = "shared-dma-pool";
46 reusable; 46 reusable;
47 size = <0x0 0xbc00000>; 47 size = <0x0 0x10000000>;
48 alignment = <0x0 0x400000>; 48 alignment = <0x0 0x400000>;
49 linux,cma-default; 49 linux,cma-default;
50 }; 50 };
@@ -344,7 +344,7 @@
344 ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>; 344 ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
345 345
346 sysctrl_AO: sys-ctrl@0 { 346 sysctrl_AO: sys-ctrl@0 {
347 compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"; 347 compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
348 reg = <0x0 0x0 0x0 0x100>; 348 reg = <0x0 0x0 0x0 0x100>;
349 349
350 pwrc_vpu: power-controller-vpu { 350 pwrc_vpu: power-controller-vpu {
@@ -423,6 +423,19 @@
423 }; 423 };
424 }; 424 };
425 425
426 dmcbus: bus@c8838000 {
427 compatible = "simple-bus";
428 reg = <0x0 0xc8838000 0x0 0x400>;
429 #address-cells = <2>;
430 #size-cells = <2>;
431 ranges = <0x0 0x0 0x0 0xc8838000 0x0 0x400>;
432
433 canvas: video-lut@48 {
434 compatible = "amlogic,canvas";
435 reg = <0x0 0x48 0x0 0x14>;
436 };
437 };
438
426 hiubus: bus@c883c000 { 439 hiubus: bus@c883c000 {
427 compatible = "simple-bus"; 440 compatible = "simple-bus";
428 reg = <0x0 0xc883c000 0x0 0x2000>; 441 reg = <0x0 0xc883c000 0x0 0x2000>;
@@ -431,7 +444,7 @@
431 ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>; 444 ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
432 445
433 sysctrl: system-controller@0 { 446 sysctrl: system-controller@0 {
434 compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd"; 447 compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
435 reg = <0 0 0 0x400>; 448 reg = <0 0 0 0x400>;
436 }; 449 };
437 450
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 98cbba6809ca..1ade7e486828 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -390,7 +390,7 @@
390 }; 390 };
391 }; 391 };
392 392
393 spi_pins: spi { 393 spi_pins: spi-pins {
394 mux { 394 mux {
395 groups = "spi_miso", 395 groups = "spi_miso",
396 "spi_mosi", 396 "spi_mosi",
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index f63bceb88caa..90a56af967a7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -13,7 +13,7 @@
13 13
14/ { 14/ {
15 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl"; 15 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
16 model = "Libre Technology CC"; 16 model = "Libre Computer Board AML-S905X-CC";
17 17
18 aliases { 18 aliases {
19 serial0 = &uart_AO; 19 serial0 = &uart_AO;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index c87a80e9bcc6..8f0bb3c44bd6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -337,7 +337,7 @@
337 }; 337 };
338 }; 338 };
339 339
340 spi_pins: spi { 340 spi_pins: spi-pins {
341 mux { 341 mux {
342 groups = "spi_miso", 342 groups = "spi_miso",
343 "spi_mosi", 343 "spi_mosi",
diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi b/arch/arm64/boot/dts/arm/juno-base.dtsi
index ce56a4acda4f..ed774ee8f659 100644
--- a/arch/arm64/boot/dts/arm/juno-base.dtsi
+++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
@@ -115,22 +115,17 @@
115 clocks = <&soc_smc50mhz>; 115 clocks = <&soc_smc50mhz>;
116 clock-names = "apb_pclk"; 116 clock-names = "apb_pclk";
117 power-domains = <&scpi_devpd 0>; 117 power-domains = <&scpi_devpd 0>;
118 ports {
119 #address-cells = <1>;
120 #size-cells = <0>;
121 118
122 /* input port */ 119 in-ports {
123 port@0 { 120 port {
124 reg = <0>;
125 etf0_in_port: endpoint { 121 etf0_in_port: endpoint {
126 slave-mode;
127 remote-endpoint = <&main_funnel_out_port>; 122 remote-endpoint = <&main_funnel_out_port>;
128 }; 123 };
129 }; 124 };
125 };
130 126
131 /* output port */ 127 out-ports {
132 port@1 { 128 port {
133 reg = <0>;
134 etf0_out_port: endpoint { 129 etf0_out_port: endpoint {
135 }; 130 };
136 }; 131 };
@@ -144,10 +139,11 @@
144 clocks = <&soc_smc50mhz>; 139 clocks = <&soc_smc50mhz>;
145 clock-names = "apb_pclk"; 140 clock-names = "apb_pclk";
146 power-domains = <&scpi_devpd 0>; 141 power-domains = <&scpi_devpd 0>;
147 port { 142 in-ports {
148 tpiu_in_port: endpoint { 143 port {
149 slave-mode; 144 tpiu_in_port: endpoint {
150 remote-endpoint = <&replicator_out_port0>; 145 remote-endpoint = <&replicator_out_port0>;
146 };
151 }; 147 };
152 }; 148 };
153 }; 149 };
@@ -160,31 +156,29 @@
160 clocks = <&soc_smc50mhz>; 156 clocks = <&soc_smc50mhz>;
161 clock-names = "apb_pclk"; 157 clock-names = "apb_pclk";
162 power-domains = <&scpi_devpd 0>; 158 power-domains = <&scpi_devpd 0>;
163 ports {
164 #address-cells = <1>;
165 #size-cells = <0>;
166 159
167 /* output port */ 160 out-ports {
168 port@0 { 161 port {
169 reg = <0>;
170 main_funnel_out_port: endpoint { 162 main_funnel_out_port: endpoint {
171 remote-endpoint = <&etf0_in_port>; 163 remote-endpoint = <&etf0_in_port>;
172 }; 164 };
173 }; 165 };
166 };
174 167
175 /* input ports */ 168 main_funnel_in_ports: in-ports {
176 port@1 { 169 #address-cells = <1>;
170 #size-cells = <0>;
171
172 port@0 {
177 reg = <0>; 173 reg = <0>;
178 main_funnel_in_port0: endpoint { 174 main_funnel_in_port0: endpoint {
179 slave-mode;
180 remote-endpoint = <&cluster0_funnel_out_port>; 175 remote-endpoint = <&cluster0_funnel_out_port>;
181 }; 176 };
182 }; 177 };
183 178
184 port@2 { 179 port@1 {
185 reg = <1>; 180 reg = <1>;
186 main_funnel_in_port1: endpoint { 181 main_funnel_in_port1: endpoint {
187 slave-mode;
188 remote-endpoint = <&cluster1_funnel_out_port>; 182 remote-endpoint = <&cluster1_funnel_out_port>;
189 }; 183 };
190 }; 184 };
@@ -199,10 +193,12 @@
199 clocks = <&soc_smc50mhz>; 193 clocks = <&soc_smc50mhz>;
200 clock-names = "apb_pclk"; 194 clock-names = "apb_pclk";
201 power-domains = <&scpi_devpd 0>; 195 power-domains = <&scpi_devpd 0>;
202 port { 196 arm,scatter-gather;
203 etr_in_port: endpoint { 197 in-ports {
204 slave-mode; 198 port {
205 remote-endpoint = <&replicator_out_port1>; 199 etr_in_port: endpoint {
200 remote-endpoint = <&replicator_out_port1>;
201 };
206 }; 202 };
207 }; 203 };
208 }; 204 };
@@ -216,8 +212,10 @@
216 clocks = <&soc_smc50mhz>; 212 clocks = <&soc_smc50mhz>;
217 clock-names = "apb_pclk"; 213 clock-names = "apb_pclk";
218 power-domains = <&scpi_devpd 0>; 214 power-domains = <&scpi_devpd 0>;
219 port { 215 out-ports {
220 stm_out_port: endpoint { 216 port {
217 stm_out_port: endpoint {
218 };
221 }; 219 };
222 }; 220 };
223 }; 221 };
@@ -238,9 +236,11 @@
238 clocks = <&soc_smc50mhz>; 236 clocks = <&soc_smc50mhz>;
239 clock-names = "apb_pclk"; 237 clock-names = "apb_pclk";
240 power-domains = <&scpi_devpd 0>; 238 power-domains = <&scpi_devpd 0>;
241 port { 239 out-ports {
242 cluster0_etm0_out_port: endpoint { 240 port {
243 remote-endpoint = <&cluster0_funnel_in_port0>; 241 cluster0_etm0_out_port: endpoint {
242 remote-endpoint = <&cluster0_funnel_in_port0>;
243 };
244 }; 244 };
245 }; 245 };
246 }; 246 };
@@ -252,29 +252,28 @@
252 clocks = <&soc_smc50mhz>; 252 clocks = <&soc_smc50mhz>;
253 clock-names = "apb_pclk"; 253 clock-names = "apb_pclk";
254 power-domains = <&scpi_devpd 0>; 254 power-domains = <&scpi_devpd 0>;
255 ports { 255 out-ports {
256 #address-cells = <1>; 256 port {
257 #size-cells = <0>;
258
259 port@0 {
260 reg = <0>;
261 cluster0_funnel_out_port: endpoint { 257 cluster0_funnel_out_port: endpoint {
262 remote-endpoint = <&main_funnel_in_port0>; 258 remote-endpoint = <&main_funnel_in_port0>;
263 }; 259 };
264 }; 260 };
261 };
265 262
266 port@1 { 263 in-ports {
264 #address-cells = <1>;
265 #size-cells = <0>;
266
267 port@0 {
267 reg = <0>; 268 reg = <0>;
268 cluster0_funnel_in_port0: endpoint { 269 cluster0_funnel_in_port0: endpoint {
269 slave-mode;
270 remote-endpoint = <&cluster0_etm0_out_port>; 270 remote-endpoint = <&cluster0_etm0_out_port>;
271 }; 271 };
272 }; 272 };
273 273
274 port@2 { 274 port@1 {
275 reg = <1>; 275 reg = <1>;
276 cluster0_funnel_in_port1: endpoint { 276 cluster0_funnel_in_port1: endpoint {
277 slave-mode;
278 remote-endpoint = <&cluster0_etm1_out_port>; 277 remote-endpoint = <&cluster0_etm1_out_port>;
279 }; 278 };
280 }; 279 };
@@ -297,9 +296,11 @@
297 clocks = <&soc_smc50mhz>; 296 clocks = <&soc_smc50mhz>;
298 clock-names = "apb_pclk"; 297 clock-names = "apb_pclk";
299 power-domains = <&scpi_devpd 0>; 298 power-domains = <&scpi_devpd 0>;
300 port { 299 out-ports {
301 cluster0_etm1_out_port: endpoint { 300 port {
302 remote-endpoint = <&cluster0_funnel_in_port1>; 301 cluster0_etm1_out_port: endpoint {
302 remote-endpoint = <&cluster0_funnel_in_port1>;
303 };
303 }; 304 };
304 }; 305 };
305 }; 306 };
@@ -320,9 +321,11 @@
320 clocks = <&soc_smc50mhz>; 321 clocks = <&soc_smc50mhz>;
321 clock-names = "apb_pclk"; 322 clock-names = "apb_pclk";
322 power-domains = <&scpi_devpd 0>; 323 power-domains = <&scpi_devpd 0>;
323 port { 324 out-ports {
324 cluster1_etm0_out_port: endpoint { 325 port {
325 remote-endpoint = <&cluster1_funnel_in_port0>; 326 cluster1_etm0_out_port: endpoint {
327 remote-endpoint = <&cluster1_funnel_in_port0>;
328 };
326 }; 329 };
327 }; 330 };
328 }; 331 };
@@ -334,43 +337,40 @@
334 clocks = <&soc_smc50mhz>; 337 clocks = <&soc_smc50mhz>;
335 clock-names = "apb_pclk"; 338 clock-names = "apb_pclk";
336 power-domains = <&scpi_devpd 0>; 339 power-domains = <&scpi_devpd 0>;
337 ports { 340 out-ports {
338 #address-cells = <1>; 341 port {
339 #size-cells = <0>;
340
341 port@0 {
342 reg = <0>;
343 cluster1_funnel_out_port: endpoint { 342 cluster1_funnel_out_port: endpoint {
344 remote-endpoint = <&main_funnel_in_port1>; 343 remote-endpoint = <&main_funnel_in_port1>;
345 }; 344 };
346 }; 345 };
346 };
347 347
348 port@1 { 348 in-ports {
349 #address-cells = <1>;
350 #size-cells = <0>;
351
352 port@0 {
349 reg = <0>; 353 reg = <0>;
350 cluster1_funnel_in_port0: endpoint { 354 cluster1_funnel_in_port0: endpoint {
351 slave-mode;
352 remote-endpoint = <&cluster1_etm0_out_port>; 355 remote-endpoint = <&cluster1_etm0_out_port>;
353 }; 356 };
354 }; 357 };
355 358
356 port@2 { 359 port@1 {
357 reg = <1>; 360 reg = <1>;
358 cluster1_funnel_in_port1: endpoint { 361 cluster1_funnel_in_port1: endpoint {
359 slave-mode;
360 remote-endpoint = <&cluster1_etm1_out_port>; 362 remote-endpoint = <&cluster1_etm1_out_port>;
361 }; 363 };
362 }; 364 };
363 port@3 { 365 port@2 {
364 reg = <2>; 366 reg = <2>;
365 cluster1_funnel_in_port2: endpoint { 367 cluster1_funnel_in_port2: endpoint {
366 slave-mode;
367 remote-endpoint = <&cluster1_etm2_out_port>; 368 remote-endpoint = <&cluster1_etm2_out_port>;
368 }; 369 };
369 }; 370 };
370 port@4 { 371 port@3 {
371 reg = <3>; 372 reg = <3>;
372 cluster1_funnel_in_port3: endpoint { 373 cluster1_funnel_in_port3: endpoint {
373 slave-mode;
374 remote-endpoint = <&cluster1_etm3_out_port>; 374 remote-endpoint = <&cluster1_etm3_out_port>;
375 }; 375 };
376 }; 376 };
@@ -393,9 +393,11 @@
393 clocks = <&soc_smc50mhz>; 393 clocks = <&soc_smc50mhz>;
394 clock-names = "apb_pclk"; 394 clock-names = "apb_pclk";
395 power-domains = <&scpi_devpd 0>; 395 power-domains = <&scpi_devpd 0>;
396 port { 396 out-ports {
397 cluster1_etm1_out_port: endpoint { 397 port {
398 remote-endpoint = <&cluster1_funnel_in_port1>; 398 cluster1_etm1_out_port: endpoint {
399 remote-endpoint = <&cluster1_funnel_in_port1>;
400 };
399 }; 401 };
400 }; 402 };
401 }; 403 };
@@ -416,9 +418,11 @@
416 clocks = <&soc_smc50mhz>; 418 clocks = <&soc_smc50mhz>;
417 clock-names = "apb_pclk"; 419 clock-names = "apb_pclk";
418 power-domains = <&scpi_devpd 0>; 420 power-domains = <&scpi_devpd 0>;
419 port { 421 out-ports {
420 cluster1_etm2_out_port: endpoint { 422 port {
421 remote-endpoint = <&cluster1_funnel_in_port2>; 423 cluster1_etm2_out_port: endpoint {
424 remote-endpoint = <&cluster1_funnel_in_port2>;
425 };
422 }; 426 };
423 }; 427 };
424 }; 428 };
@@ -439,9 +443,11 @@
439 clocks = <&soc_smc50mhz>; 443 clocks = <&soc_smc50mhz>;
440 clock-names = "apb_pclk"; 444 clock-names = "apb_pclk";
441 power-domains = <&scpi_devpd 0>; 445 power-domains = <&scpi_devpd 0>;
442 port { 446 out-ports {
443 cluster1_etm3_out_port: endpoint { 447 port {
444 remote-endpoint = <&cluster1_funnel_in_port3>; 448 cluster1_etm3_out_port: endpoint {
449 remote-endpoint = <&cluster1_funnel_in_port3>;
450 };
445 }; 451 };
446 }; 452 };
447 }; 453 };
@@ -454,7 +460,7 @@
454 clock-names = "apb_pclk"; 460 clock-names = "apb_pclk";
455 power-domains = <&scpi_devpd 0>; 461 power-domains = <&scpi_devpd 0>;
456 462
457 ports { 463 out-ports {
458 #address-cells = <1>; 464 #address-cells = <1>;
459 #size-cells = <0>; 465 #size-cells = <0>;
460 466
@@ -472,12 +478,10 @@
472 remote-endpoint = <&etr_in_port>; 478 remote-endpoint = <&etr_in_port>;
473 }; 479 };
474 }; 480 };
475 481 };
476 /* replicator input port */ 482 in-ports {
477 port@2 { 483 port {
478 reg = <0>;
479 replicator_in_port0: endpoint { 484 replicator_in_port0: endpoint {
480 slave-mode;
481 }; 485 };
482 }; 486 };
483 }; 487 };
diff --git a/arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi b/arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi
index 0c43fb3525eb..cf285152deab 100644
--- a/arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi
+++ b/arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi
@@ -7,23 +7,16 @@
7 clocks = <&soc_smc50mhz>; 7 clocks = <&soc_smc50mhz>;
8 clock-names = "apb_pclk"; 8 clock-names = "apb_pclk";
9 power-domains = <&scpi_devpd 0>; 9 power-domains = <&scpi_devpd 0>;
10 ports { 10 out-ports {
11 #address-cells = <1>; 11 port {
12 #size-cells = <0>;
13
14 /* output port */
15 port@0 {
16 reg = <0>;
17 csys1_funnel_out_port: endpoint { 12 csys1_funnel_out_port: endpoint {
18 remote-endpoint = <&etf1_in_port>; 13 remote-endpoint = <&etf1_in_port>;
19 }; 14 };
20 }; 15 };
21 16 };
22 /* input port */ 17 in-ports {
23 port@1 { 18 port {
24 reg = <0>;
25 csys1_funnel_in_port0: endpoint { 19 csys1_funnel_in_port0: endpoint {
26 slave-mode;
27 }; 20 };
28 }; 21 };
29 22
@@ -37,22 +30,15 @@
37 clocks = <&soc_smc50mhz>; 30 clocks = <&soc_smc50mhz>;
38 clock-names = "apb_pclk"; 31 clock-names = "apb_pclk";
39 power-domains = <&scpi_devpd 0>; 32 power-domains = <&scpi_devpd 0>;
40 ports { 33 in-ports {
41 #address-cells = <1>; 34 port {
42 #size-cells = <0>;
43
44 /* input port */
45 port@0 {
46 reg = <0>;
47 etf1_in_port: endpoint { 35 etf1_in_port: endpoint {
48 slave-mode;
49 remote-endpoint = <&csys1_funnel_out_port>; 36 remote-endpoint = <&csys1_funnel_out_port>;
50 }; 37 };
51 }; 38 };
52 39 };
53 /* output port */ 40 out-ports {
54 port@1 { 41 port {
55 reg = <0>;
56 etf1_out_port: endpoint { 42 etf1_out_port: endpoint {
57 remote-endpoint = <&csys2_funnel_in_port1>; 43 remote-endpoint = <&csys2_funnel_in_port1>;
58 }; 44 };
@@ -67,20 +53,18 @@
67 clocks = <&soc_smc50mhz>; 53 clocks = <&soc_smc50mhz>;
68 clock-names = "apb_pclk"; 54 clock-names = "apb_pclk";
69 power-domains = <&scpi_devpd 0>; 55 power-domains = <&scpi_devpd 0>;
70 ports { 56 out-ports {
71 #address-cells = <1>; 57 port {
72 #size-cells = <0>;
73
74 /* output port */
75 port@0 {
76 reg = <0>;
77 csys2_funnel_out_port: endpoint { 58 csys2_funnel_out_port: endpoint {
78 remote-endpoint = <&replicator_in_port0>; 59 remote-endpoint = <&replicator_in_port0>;
79 }; 60 };
80 }; 61 };
62 };
81 63
82 /* input ports */ 64 in-ports {
83 port@1 { 65 #address-cells = <1>;
66 #size-cells = <0>;
67 port@0 {
84 reg = <0>; 68 reg = <0>;
85 csys2_funnel_in_port0: endpoint { 69 csys2_funnel_in_port0: endpoint {
86 slave-mode; 70 slave-mode;
@@ -88,7 +72,7 @@
88 }; 72 };
89 }; 73 };
90 74
91 port@2 { 75 port@1 {
92 reg = <1>; 76 reg = <1>;
93 csys2_funnel_in_port1: endpoint { 77 csys2_funnel_in_port1: endpoint {
94 slave-mode; 78 slave-mode;
diff --git a/arch/arm64/boot/dts/arm/juno.dts b/arch/arm64/boot/dts/arm/juno.dts
index 1fb5c5a0f32e..08d4ba1716c3 100644
--- a/arch/arm64/boot/dts/arm/juno.dts
+++ b/arch/arm64/boot/dts/arm/juno.dts
@@ -257,14 +257,11 @@
257 remote-endpoint = <&main_funnel_in_port2>; 257 remote-endpoint = <&main_funnel_in_port2>;
258}; 258};
259 259
260&main_funnel { 260&main_funnel_in_ports {
261 ports { 261 port@2 {
262 port@3 { 262 reg = <2>;
263 reg = <2>; 263 main_funnel_in_port2: endpoint {
264 main_funnel_in_port2: endpoint { 264 remote-endpoint = <&stm_out_port>;
265 slave-mode;
266 remote-endpoint = <&stm_out_port>;
267 };
268 }; 265 };
269 }; 266 };
270}; 267};
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 1193a9e34bbb..667ca989c11b 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,6 +1,7 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \ 2dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \
3 bcm2837-rpi-3-b-plus.dtb 3 bcm2837-rpi-3-b-plus.dtb \
4 bcm2837-rpi-cm3-io3.dtb
4 5
5subdir-y += northstar2 6subdir-y += northstar2
6subdir-y += stingray 7subdir-y += stingray
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts
new file mode 100644
index 000000000000..b1c4ab212c64
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts
@@ -0,0 +1,2 @@
1// SPDX-License-Identifier: GPL-2.0
2#include "arm/bcm2837-rpi-cm3-io3.dts"
diff --git a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
index 1a406a76c86a..ea854f689fda 100644
--- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
+++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
@@ -639,7 +639,7 @@
639 status = "disabled"; 639 status = "disabled";
640 }; 640 };
641 641
642 ssp0: ssp@66180000 { 642 ssp0: spi@66180000 {
643 compatible = "arm,pl022", "arm,primecell"; 643 compatible = "arm,pl022", "arm,primecell";
644 reg = <0x66180000 0x1000>; 644 reg = <0x66180000 0x1000>;
645 interrupts = <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>; 645 interrupts = <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>;
@@ -650,7 +650,7 @@
650 status = "disabled"; 650 status = "disabled";
651 }; 651 };
652 652
653 ssp1: ssp@66190000 { 653 ssp1: spi@66190000 {
654 compatible = "arm,pl022", "arm,primecell"; 654 compatible = "arm,pl022", "arm,primecell";
655 reg = <0x66190000 0x1000>; 655 reg = <0x66190000 0x1000>;
656 interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>; 656 interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi b/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi
index bc299c3d9068..a9b92e52d50e 100644
--- a/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi
+++ b/arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi
@@ -138,7 +138,7 @@
138&i2c1 { 138&i2c1 {
139 status = "okay"; 139 status = "okay";
140 140
141 pcf8574: pcf8574@20 { 141 pcf8574: pcf8574@27 {
142 compatible = "nxp,pcf8574a"; 142 compatible = "nxp,pcf8574a";
143 gpio-controller; 143 gpio-controller;
144 #gpio-cells = <2>; 144 #gpio-cells = <2>;
diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
index e283480bfc7e..cfeaa855bd05 100644
--- a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
+++ b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
@@ -521,7 +521,7 @@
521 status = "disabled"; 521 status = "disabled";
522 }; 522 };
523 523
524 ssp0: ssp@180000 { 524 ssp0: spi@180000 {
525 compatible = "arm,pl022", "arm,primecell"; 525 compatible = "arm,pl022", "arm,primecell";
526 reg = <0x00180000 0x1000>; 526 reg = <0x00180000 0x1000>;
527 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>; 527 interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
@@ -533,7 +533,7 @@
533 status = "disabled"; 533 status = "disabled";
534 }; 534 };
535 535
536 ssp1: ssp@190000 { 536 ssp1: spi@190000 {
537 compatible = "arm,pl022", "arm,primecell"; 537 compatible = "arm,pl022", "arm,primecell";
538 reg = <0x00190000 0x1000>; 538 reg = <0x00190000 0x1000>;
539 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>; 539 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/hisilicon/Makefile b/arch/arm64/boot/dts/hisilicon/Makefile
index 03d93f8ef8a9..f4d68caeba83 100644
--- a/arch/arm64/boot/dts/hisilicon/Makefile
+++ b/arch/arm64/boot/dts/hisilicon/Makefile
@@ -1,5 +1,6 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2dtb-$(CONFIG_ARCH_HISI) += hi3660-hikey960.dtb 2dtb-$(CONFIG_ARCH_HISI) += hi3660-hikey960.dtb
3dtb-$(CONFIG_ARCH_HISI) += hi3670-hikey970.dtb
3dtb-$(CONFIG_ARCH_HISI) += hi3798cv200-poplar.dtb 4dtb-$(CONFIG_ARCH_HISI) += hi3798cv200-poplar.dtb
4dtb-$(CONFIG_ARCH_HISI) += hi6220-hikey.dtb 5dtb-$(CONFIG_ARCH_HISI) += hi6220-hikey.dtb
5dtb-$(CONFIG_ARCH_HISI) += hip05-d02.dtb 6dtb-$(CONFIG_ARCH_HISI) += hip05-d02.dtb
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
new file mode 100644
index 000000000000..4f5118642024
--- /dev/null
+++ b/arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts
@@ -0,0 +1,35 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * dts file for Hisilicon HiKey970 Development Board
4 *
5 * Copyright (C) 2016, Hisilicon Ltd.
6 * Copyright (C) 2018, Linaro Ltd.
7 *
8 */
9
10/dts-v1/;
11
12#include "hi3670.dtsi"
13
14/ {
15 model = "HiKey970";
16 compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
17
18 aliases {
19 serial6 = &uart6; /* console UART */
20 };
21
22 chosen {
23 stdout-path = "serial6:115200n8";
24 };
25
26 memory@0 {
27 device_type = "memory";
28 /* expect bootloader to fill in this region */
29 reg = <0x0 0x0 0x0 0x0>;
30 };
31};
32
33&uart6 {
34 status = "okay";
35};
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
new file mode 100644
index 000000000000..c90e6f6a34ec
--- /dev/null
+++ b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
@@ -0,0 +1,162 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * dts file for Hisilicon Hi3670 SoC
4 *
5 * Copyright (C) 2016, Hisilicon Ltd.
6 * Copyright (C) 2018, Linaro Ltd.
7 */
8
9#include <dt-bindings/interrupt-controller/arm-gic.h>
10
11/ {
12 compatible = "hisilicon,hi3670";
13 interrupt-parent = <&gic>;
14 #address-cells = <2>;
15 #size-cells = <2>;
16
17 psci {
18 compatible = "arm,psci-0.2";
19 method = "smc";
20 };
21
22 cpus {
23 #address-cells = <2>;
24 #size-cells = <0>;
25
26 cpu-map {
27 cluster0 {
28 core0 {
29 cpu = <&cpu0>;
30 };
31 core1 {
32 cpu = <&cpu1>;
33 };
34 core2 {
35 cpu = <&cpu2>;
36 };
37 core3 {
38 cpu = <&cpu3>;
39 };
40 };
41 cluster1 {
42 core0 {
43 cpu = <&cpu4>;
44 };
45 core1 {
46 cpu = <&cpu5>;
47 };
48 core2 {
49 cpu = <&cpu6>;
50 };
51 core3 {
52 cpu = <&cpu7>;
53 };
54 };
55 };
56
57 cpu0: cpu@0 {
58 compatible = "arm,cortex-a53", "arm,armv8";
59 device_type = "cpu";
60 reg = <0x0 0x0>;
61 enable-method = "psci";
62 };
63
64 cpu1: cpu@1 {
65 compatible = "arm,cortex-a53", "arm,armv8";
66 device_type = "cpu";
67 reg = <0x0 0x1>;
68 enable-method = "psci";
69 };
70
71 cpu2: cpu@2 {
72 compatible = "arm,cortex-a53", "arm,armv8";
73 device_type = "cpu";
74 reg = <0x0 0x2>;
75 enable-method = "psci";
76 };
77
78 cpu3: cpu@3 {
79 compatible = "arm,cortex-a53", "arm,armv8";
80 device_type = "cpu";
81 reg = <0x0 0x3>;
82 enable-method = "psci";
83 };
84
85 cpu4: cpu@100 {
86 compatible = "arm,cortex-a73", "arm,armv8";
87 device_type = "cpu";
88 reg = <0x0 0x100>;
89 enable-method = "psci";
90 };
91
92 cpu5: cpu@101 {
93 compatible = "arm,cortex-a73", "arm,armv8";
94 device_type = "cpu";
95 reg = <0x0 0x101>;
96 enable-method = "psci";
97 };
98
99 cpu6: cpu@102 {
100 compatible = "arm,cortex-a73", "arm,armv8";
101 device_type = "cpu";
102 reg = <0x0 0x102>;
103 enable-method = "psci";
104 };
105
106 cpu7: cpu@103 {
107 compatible = "arm,cortex-a73", "arm,armv8";
108 device_type = "cpu";
109 reg = <0x0 0x103>;
110 enable-method = "psci";
111 };
112 };
113
114 gic: interrupt-controller@e82b0000 {
115 compatible = "arm,gic-400";
116 reg = <0x0 0xe82b1000 0 0x1000>, /* GICD */
117 <0x0 0xe82b2000 0 0x2000>, /* GICC */
118 <0x0 0xe82b4000 0 0x2000>, /* GICH */
119 <0x0 0xe82b6000 0 0x2000>; /* GICV */
120 #interrupt-cells = <3>;
121 #address-cells = <0>;
122 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) |
123 IRQ_TYPE_LEVEL_HIGH)>;
124 interrupt-controller;
125 };
126
127 timer {
128 compatible = "arm,armv8-timer";
129 interrupt-parent = <&gic>;
130 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) |
131 IRQ_TYPE_LEVEL_LOW)>,
132 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) |
133 IRQ_TYPE_LEVEL_LOW)>,
134 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) |
135 IRQ_TYPE_LEVEL_LOW)>,
136 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) |
137 IRQ_TYPE_LEVEL_LOW)>;
138 clock-frequency = <1920000>;
139 };
140
141 soc {
142 compatible = "simple-bus";
143 #address-cells = <2>;
144 #size-cells = <2>;
145 ranges;
146
147 uart6_clk: clk_19_2M {
148 compatible = "fixed-clock";
149 #clock-cells = <0>;
150 clock-frequency = <19200000>;
151 };
152
153 uart6: serial@fff32000 {
154 compatible = "arm,pl011", "arm,primecell";
155 reg = <0x0 0xfff32000 0x0 0x1000>;
156 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
157 clocks = <&uart6_clk &uart6_clk>;
158 clock-names = "uartclk", "apb_pclk";
159 status = "disabled";
160 };
161 };
162};
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi
index 7afee5d5087b..68c52f1149be 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi
@@ -20,22 +20,18 @@
20 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 20 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
21 clock-names = "apb_pclk"; 21 clock-names = "apb_pclk";
22 22
23 ports { 23 out-ports {
24 #address-cells = <1>; 24 port {
25 #size-cells = <0>;
26
27 port@0 {
28 reg = <0>;
29 soc_funnel_out: endpoint { 25 soc_funnel_out: endpoint {
30 remote-endpoint = 26 remote-endpoint =
31 <&etf_in>; 27 <&etf_in>;
32 }; 28 };
33 }; 29 };
30 };
34 31
35 port@1 { 32 in-ports {
36 reg = <0>; 33 port {
37 soc_funnel_in: endpoint { 34 soc_funnel_in: endpoint {
38 slave-mode;
39 remote-endpoint = 35 remote-endpoint =
40 <&acpu_funnel_out>; 36 <&acpu_funnel_out>;
41 }; 37 };
@@ -49,21 +45,17 @@
49 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 45 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
50 clock-names = "apb_pclk"; 46 clock-names = "apb_pclk";
51 47
52 ports { 48 in-ports {
53 #address-cells = <1>; 49 port {
54 #size-cells = <0>;
55
56 port@0 {
57 reg = <0>;
58 etf_in: endpoint { 50 etf_in: endpoint {
59 slave-mode;
60 remote-endpoint = 51 remote-endpoint =
61 <&soc_funnel_out>; 52 <&soc_funnel_out>;
62 }; 53 };
63 }; 54 };
55 };
64 56
65 port@1 { 57 out-ports {
66 reg = <0>; 58 port {
67 etf_out: endpoint { 59 etf_out: endpoint {
68 remote-endpoint = 60 remote-endpoint =
69 <&replicator_in>; 61 <&replicator_in>;
@@ -77,20 +69,20 @@
77 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 69 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
78 clock-names = "apb_pclk"; 70 clock-names = "apb_pclk";
79 71
80 ports { 72 in-ports {
81 #address-cells = <1>; 73 port {
82 #size-cells = <0>;
83
84 port@0 {
85 reg = <0>;
86 replicator_in: endpoint { 74 replicator_in: endpoint {
87 slave-mode;
88 remote-endpoint = 75 remote-endpoint =
89 <&etf_out>; 76 <&etf_out>;
90 }; 77 };
91 }; 78 };
79 };
92 80
93 port@1 { 81 out-ports {
82 #address-cells = <1>;
83 #size-cells = <0>;
84
85 port@0 {
94 reg = <0>; 86 reg = <0>;
95 replicator_out0: endpoint { 87 replicator_out0: endpoint {
96 remote-endpoint = 88 remote-endpoint =
@@ -98,7 +90,7 @@
98 }; 90 };
99 }; 91 };
100 92
101 port@2 { 93 port@1 {
102 reg = <1>; 94 reg = <1>;
103 replicator_out1: endpoint { 95 replicator_out1: endpoint {
104 remote-endpoint = 96 remote-endpoint =
@@ -114,14 +106,9 @@
114 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 106 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
115 clock-names = "apb_pclk"; 107 clock-names = "apb_pclk";
116 108
117 ports { 109 in-ports {
118 #address-cells = <1>; 110 port {
119 #size-cells = <0>;
120
121 port@0 {
122 reg = <0>;
123 etr_in: endpoint { 111 etr_in: endpoint {
124 slave-mode;
125 remote-endpoint = 112 remote-endpoint =
126 <&replicator_out0>; 113 <&replicator_out0>;
127 }; 114 };
@@ -135,14 +122,9 @@
135 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 122 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
136 clock-names = "apb_pclk"; 123 clock-names = "apb_pclk";
137 124
138 ports { 125 in-ports {
139 #address-cells = <1>; 126 port {
140 #size-cells = <0>;
141
142 port@0 {
143 reg = <0>;
144 tpiu_in: endpoint { 127 tpiu_in: endpoint {
145 slave-mode;
146 remote-endpoint = 128 remote-endpoint =
147 <&replicator_out1>; 129 <&replicator_out1>;
148 }; 130 };
@@ -156,85 +138,78 @@
156 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>; 138 clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
157 clock-names = "apb_pclk"; 139 clock-names = "apb_pclk";
158 140
159 ports { 141 out-ports {
160 #address-cells = <1>; 142 port {
161 #size-cells = <0>;
162
163 port@0 {
164 reg = <0>;
165 acpu_funnel_out: endpoint { 143 acpu_funnel_out: endpoint {
166 remote-endpoint = 144 remote-endpoint =
167 <&soc_funnel_in>; 145 <&soc_funnel_in>;
168 }; 146 };
169 }; 147 };
148 };
170 149
171 port@1 { 150 in-ports {
151 #address-cells = <1>;
152 #size-cells = <0>;
153
154 port@0 {
172 reg = <0>; 155 reg = <0>;
173 acpu_funnel_in0: endpoint { 156 acpu_funnel_in0: endpoint {
174 slave-mode;
175 remote-endpoint = 157 remote-endpoint =
176 <&etm0_out>; 158 <&etm0_out>;
177 }; 159 };
178 }; 160 };
179 161
180 port@2 { 162 port@1 {
181 reg = <1>; 163 reg = <1>;
182 acpu_funnel_in1: endpoint { 164 acpu_funnel_in1: endpoint {
183 slave-mode;
184 remote-endpoint = 165 remote-endpoint =
185 <&etm1_out>; 166 <&etm1_out>;
186 }; 167 };
187 }; 168 };
188 169
189 port@3 { 170 port@2 {
190 reg = <2>; 171 reg = <2>;
191 acpu_funnel_in2: endpoint { 172 acpu_funnel_in2: endpoint {
192 slave-mode;
193 remote-endpoint = 173 remote-endpoint =
194 <&etm2_out>; 174 <&etm2_out>;
195 }; 175 };
196 }; 176 };
197 177
198 port@4 { 178 port@3 {
199 reg = <3>; 179 reg = <3>;
200 acpu_funnel_in3: endpoint { 180 acpu_funnel_in3: endpoint {
201 slave-mode;
202 remote-endpoint = 181 remote-endpoint =
203 <&etm3_out>; 182 <&etm3_out>;
204 }; 183 };
205 }; 184 };
206 185
207 port@5 { 186 port@4 {
208 reg = <4>; 187 reg = <4>;
209 acpu_funnel_in4: endpoint { 188 acpu_funnel_in4: endpoint {
210 slave-mode;
211 remote-endpoint = 189 remote-endpoint =
212 <&etm4_out>; 190 <&etm4_out>;
213 }; 191 };
214 }; 192 };
215 193
216 port@6 { 194 port@5 {
217 reg = <5>; 195 reg = <5>;
218 acpu_funnel_in5: endpoint { 196 acpu_funnel_in5: endpoint {
219 slave-mode;
220 remote-endpoint = 197 remote-endpoint =
221 <&etm5_out>; 198 <&etm5_out>;
222 }; 199 };
223 }; 200 };
224 201
225 port@7 { 202 port@6 {
226 reg = <6>; 203 reg = <6>;
227 acpu_funnel_in6: endpoint { 204 acpu_funnel_in6: endpoint {
228 slave-mode;
229 remote-endpoint = 205 remote-endpoint =
230 <&etm6_out>; 206 <&etm6_out>;
231 }; 207 };
232 }; 208 };
233 209
234 port@8 { 210 port@7 {
235 reg = <7>; 211 reg = <7>;
236 acpu_funnel_in7: endpoint { 212 acpu_funnel_in7: endpoint {
237 slave-mode;
238 remote-endpoint = 213 remote-endpoint =
239 <&etm7_out>; 214 <&etm7_out>;
240 }; 215 };
@@ -251,10 +226,12 @@
251 226
252 cpu = <&cpu0>; 227 cpu = <&cpu0>;
253 228
254 port { 229 out-ports {
255 etm0_out: endpoint { 230 port {
256 remote-endpoint = 231 etm0_out: endpoint {
257 <&acpu_funnel_in0>; 232 remote-endpoint =
233 <&acpu_funnel_in0>;
234 };
258 }; 235 };
259 }; 236 };
260 }; 237 };
@@ -268,10 +245,12 @@
268 245
269 cpu = <&cpu1>; 246 cpu = <&cpu1>;
270 247
271 port { 248 out-ports {
272 etm1_out: endpoint { 249 port {
273 remote-endpoint = 250 etm1_out: endpoint {
274 <&acpu_funnel_in1>; 251 remote-endpoint =
252 <&acpu_funnel_in1>;
253 };
275 }; 254 };
276 }; 255 };
277 }; 256 };
@@ -285,10 +264,12 @@
285 264
286 cpu = <&cpu2>; 265 cpu = <&cpu2>;
287 266
288 port { 267 out-ports {
289 etm2_out: endpoint { 268 port {
290 remote-endpoint = 269 etm2_out: endpoint {
291 <&acpu_funnel_in2>; 270 remote-endpoint =
271 <&acpu_funnel_in2>;
272 };
292 }; 273 };
293 }; 274 };
294 }; 275 };
@@ -302,10 +283,12 @@
302 283
303 cpu = <&cpu3>; 284 cpu = <&cpu3>;
304 285
305 port { 286 out-ports {
306 etm3_out: endpoint { 287 port {
307 remote-endpoint = 288 etm3_out: endpoint {
308 <&acpu_funnel_in3>; 289 remote-endpoint =
290 <&acpu_funnel_in3>;
291 };
309 }; 292 };
310 }; 293 };
311 }; 294 };
@@ -319,10 +302,12 @@
319 302
320 cpu = <&cpu4>; 303 cpu = <&cpu4>;
321 304
322 port { 305 out-ports {
323 etm4_out: endpoint { 306 port {
324 remote-endpoint = 307 etm4_out: endpoint {
325 <&acpu_funnel_in4>; 308 remote-endpoint =
309 <&acpu_funnel_in4>;
310 };
326 }; 311 };
327 }; 312 };
328 }; 313 };
@@ -336,10 +321,12 @@
336 321
337 cpu = <&cpu5>; 322 cpu = <&cpu5>;
338 323
339 port { 324 out-ports {
340 etm5_out: endpoint { 325 port {
341 remote-endpoint = 326 etm5_out: endpoint {
342 <&acpu_funnel_in5>; 327 remote-endpoint =
328 <&acpu_funnel_in5>;
329 };
343 }; 330 };
344 }; 331 };
345 }; 332 };
@@ -353,10 +340,12 @@
353 340
354 cpu = <&cpu6>; 341 cpu = <&cpu6>;
355 342
356 port { 343 out-ports {
357 etm6_out: endpoint { 344 port {
358 remote-endpoint = 345 etm6_out: endpoint {
359 <&acpu_funnel_in6>; 346 remote-endpoint =
347 <&acpu_funnel_in6>;
348 };
360 }; 349 };
361 }; 350 };
362 }; 351 };
@@ -370,10 +359,12 @@
370 359
371 cpu = <&cpu7>; 360 cpu = <&cpu7>;
372 361
373 port { 362 out-ports {
374 etm7_out: endpoint { 363 port {
375 remote-endpoint = 364 etm7_out: endpoint {
376 <&acpu_funnel_in7>; 365 remote-endpoint =
366 <&acpu_funnel_in7>;
367 };
377 }; 368 };
378 }; 369 };
379 }; 370 };
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 247024df714f..97d5bf2c6ec5 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -99,6 +99,7 @@
99 reg = <0x0 0x1>; 99 reg = <0x0 0x1>;
100 enable-method = "psci"; 100 enable-method = "psci";
101 next-level-cache = <&CLUSTER0_L2>; 101 next-level-cache = <&CLUSTER0_L2>;
102 clocks = <&stub_clock 0>;
102 operating-points-v2 = <&cpu_opp_table>; 103 operating-points-v2 = <&cpu_opp_table>;
103 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 104 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
104 #cooling-cells = <2>; /* min followed by max */ 105 #cooling-cells = <2>; /* min followed by max */
@@ -111,6 +112,7 @@
111 reg = <0x0 0x2>; 112 reg = <0x0 0x2>;
112 enable-method = "psci"; 113 enable-method = "psci";
113 next-level-cache = <&CLUSTER0_L2>; 114 next-level-cache = <&CLUSTER0_L2>;
115 clocks = <&stub_clock 0>;
114 operating-points-v2 = <&cpu_opp_table>; 116 operating-points-v2 = <&cpu_opp_table>;
115 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 117 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
116 #cooling-cells = <2>; /* min followed by max */ 118 #cooling-cells = <2>; /* min followed by max */
@@ -123,6 +125,7 @@
123 reg = <0x0 0x3>; 125 reg = <0x0 0x3>;
124 enable-method = "psci"; 126 enable-method = "psci";
125 next-level-cache = <&CLUSTER0_L2>; 127 next-level-cache = <&CLUSTER0_L2>;
128 clocks = <&stub_clock 0>;
126 operating-points-v2 = <&cpu_opp_table>; 129 operating-points-v2 = <&cpu_opp_table>;
127 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 130 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
128 #cooling-cells = <2>; /* min followed by max */ 131 #cooling-cells = <2>; /* min followed by max */
@@ -135,6 +138,7 @@
135 reg = <0x0 0x100>; 138 reg = <0x0 0x100>;
136 enable-method = "psci"; 139 enable-method = "psci";
137 next-level-cache = <&CLUSTER1_L2>; 140 next-level-cache = <&CLUSTER1_L2>;
141 clocks = <&stub_clock 0>;
138 operating-points-v2 = <&cpu_opp_table>; 142 operating-points-v2 = <&cpu_opp_table>;
139 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 143 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
140 #cooling-cells = <2>; /* min followed by max */ 144 #cooling-cells = <2>; /* min followed by max */
@@ -147,6 +151,7 @@
147 reg = <0x0 0x101>; 151 reg = <0x0 0x101>;
148 enable-method = "psci"; 152 enable-method = "psci";
149 next-level-cache = <&CLUSTER1_L2>; 153 next-level-cache = <&CLUSTER1_L2>;
154 clocks = <&stub_clock 0>;
150 operating-points-v2 = <&cpu_opp_table>; 155 operating-points-v2 = <&cpu_opp_table>;
151 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 156 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
152 #cooling-cells = <2>; /* min followed by max */ 157 #cooling-cells = <2>; /* min followed by max */
@@ -159,6 +164,7 @@
159 reg = <0x0 0x102>; 164 reg = <0x0 0x102>;
160 enable-method = "psci"; 165 enable-method = "psci";
161 next-level-cache = <&CLUSTER1_L2>; 166 next-level-cache = <&CLUSTER1_L2>;
167 clocks = <&stub_clock 0>;
162 operating-points-v2 = <&cpu_opp_table>; 168 operating-points-v2 = <&cpu_opp_table>;
163 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 169 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
164 #cooling-cells = <2>; /* min followed by max */ 170 #cooling-cells = <2>; /* min followed by max */
@@ -171,6 +177,7 @@
171 reg = <0x0 0x103>; 177 reg = <0x0 0x103>;
172 enable-method = "psci"; 178 enable-method = "psci";
173 next-level-cache = <&CLUSTER1_L2>; 179 next-level-cache = <&CLUSTER1_L2>;
180 clocks = <&stub_clock 0>;
174 operating-points-v2 = <&cpu_opp_table>; 181 operating-points-v2 = <&cpu_opp_table>;
175 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; 182 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
176 #cooling-cells = <2>; /* min followed by max */ 183 #cooling-cells = <2>; /* min followed by max */
diff --git a/arch/arm64/boot/dts/lg/lg1312.dtsi b/arch/arm64/boot/dts/lg/lg1312.dtsi
index 860c8fb10795..4bde7b6f2b11 100644
--- a/arch/arm64/boot/dts/lg/lg1312.dtsi
+++ b/arch/arm64/boot/dts/lg/lg1312.dtsi
@@ -168,14 +168,14 @@
168 clock-names = "apb_pclk"; 168 clock-names = "apb_pclk";
169 status="disabled"; 169 status="disabled";
170 }; 170 };
171 spi0: ssp@fe800000 { 171 spi0: spi@fe800000 {
172 compatible = "arm,pl022", "arm,primecell"; 172 compatible = "arm,pl022", "arm,primecell";
173 reg = <0x0 0xfe800000 0x1000>; 173 reg = <0x0 0xfe800000 0x1000>;
174 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 174 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
175 clocks = <&clk_bus>; 175 clocks = <&clk_bus>;
176 clock-names = "apb_pclk"; 176 clock-names = "apb_pclk";
177 }; 177 };
178 spi1: ssp@fe900000 { 178 spi1: spi@fe900000 {
179 compatible = "arm,pl022", "arm,primecell"; 179 compatible = "arm,pl022", "arm,primecell";
180 reg = <0x0 0xfe900000 0x1000>; 180 reg = <0x0 0xfe900000 0x1000>;
181 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 181 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/lg/lg1313.dtsi b/arch/arm64/boot/dts/lg/lg1313.dtsi
index 1887af654a7d..16ced1ff1ad3 100644
--- a/arch/arm64/boot/dts/lg/lg1313.dtsi
+++ b/arch/arm64/boot/dts/lg/lg1313.dtsi
@@ -168,14 +168,14 @@
168 clock-names = "apb_pclk"; 168 clock-names = "apb_pclk";
169 status="disabled"; 169 status="disabled";
170 }; 170 };
171 spi0: ssp@fe800000 { 171 spi0: spi@fe800000 {
172 compatible = "arm,pl022", "arm,primecell"; 172 compatible = "arm,pl022", "arm,primecell";
173 reg = <0x0 0xfe800000 0x1000>; 173 reg = <0x0 0xfe800000 0x1000>;
174 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 174 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
175 clocks = <&clk_bus>; 175 clocks = <&clk_bus>;
176 clock-names = "apb_pclk"; 176 clock-names = "apb_pclk";
177 }; 177 };
178 spi1: ssp@fe900000 { 178 spi1: spi@fe900000 {
179 compatible = "arm,pl022", "arm,primecell"; 179 compatible = "arm,pl022", "arm,primecell";
180 reg = <0x0 0xfe900000 0x1000>; 180 reg = <0x0 0xfe900000 0x1000>;
181 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 181 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
index b762227f6aa1..2f3c8e29520d 100644
--- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi
@@ -4,6 +4,7 @@
4#include <dt-bindings/interrupt-controller/arm-gic.h> 4#include <dt-bindings/interrupt-controller/arm-gic.h>
5#include <dt-bindings/mailbox/tegra186-hsp.h> 5#include <dt-bindings/mailbox/tegra186-hsp.h>
6#include <dt-bindings/memory/tegra186-mc.h> 6#include <dt-bindings/memory/tegra186-mc.h>
7#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
7#include <dt-bindings/power/tegra186-powergate.h> 8#include <dt-bindings/power/tegra186-powergate.h>
8#include <dt-bindings/reset/tegra186-reset.h> 9#include <dt-bindings/reset/tegra186-reset.h>
9#include <dt-bindings/thermal/tegra186-bpmp-thermal.h> 10#include <dt-bindings/thermal/tegra186-bpmp-thermal.h>
@@ -236,6 +237,20 @@
236 clock-names = "sdhci"; 237 clock-names = "sdhci";
237 resets = <&bpmp TEGRA186_RESET_SDMMC1>; 238 resets = <&bpmp TEGRA186_RESET_SDMMC1>;
238 reset-names = "sdhci"; 239 reset-names = "sdhci";
240 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
241 pinctrl-0 = <&sdmmc1_3v3>;
242 pinctrl-1 = <&sdmmc1_1v8>;
243 nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
244 nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
245 nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
246 nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
247 nvidia,pad-autocal-pull-up-offset-sdr104 = <0x03>;
248 nvidia,pad-autocal-pull-down-offset-sdr104 = <0x05>;
249 nvidia,default-tap = <0x5>;
250 nvidia,default-trim = <0xb>;
251 assigned-clocks = <&bpmp TEGRA186_CLK_SDMMC1>,
252 <&bpmp TEGRA186_CLK_PLLP_OUT0>;
253 assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLP_OUT0>;
239 status = "disabled"; 254 status = "disabled";
240 }; 255 };
241 256
@@ -247,6 +262,15 @@
247 clock-names = "sdhci"; 262 clock-names = "sdhci";
248 resets = <&bpmp TEGRA186_RESET_SDMMC2>; 263 resets = <&bpmp TEGRA186_RESET_SDMMC2>;
249 reset-names = "sdhci"; 264 reset-names = "sdhci";
265 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
266 pinctrl-0 = <&sdmmc2_3v3>;
267 pinctrl-1 = <&sdmmc2_1v8>;
268 nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
269 nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
270 nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
271 nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
272 nvidia,default-tap = <0x5>;
273 nvidia,default-trim = <0xb>;
250 status = "disabled"; 274 status = "disabled";
251 }; 275 };
252 276
@@ -258,6 +282,17 @@
258 clock-names = "sdhci"; 282 clock-names = "sdhci";
259 resets = <&bpmp TEGRA186_RESET_SDMMC3>; 283 resets = <&bpmp TEGRA186_RESET_SDMMC3>;
260 reset-names = "sdhci"; 284 reset-names = "sdhci";
285 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
286 pinctrl-0 = <&sdmmc3_3v3>;
287 pinctrl-1 = <&sdmmc3_1v8>;
288 nvidia,pad-autocal-pull-up-offset-1v8 = <0x00>;
289 nvidia,pad-autocal-pull-down-offset-1v8 = <0x7a>;
290 nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
291 nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
292 nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
293 nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
294 nvidia,default-tap = <0x5>;
295 nvidia,default-trim = <0xb>;
261 status = "disabled"; 296 status = "disabled";
262 }; 297 };
263 298
@@ -267,8 +302,19 @@
267 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 302 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
268 clocks = <&bpmp TEGRA186_CLK_SDMMC4>; 303 clocks = <&bpmp TEGRA186_CLK_SDMMC4>;
269 clock-names = "sdhci"; 304 clock-names = "sdhci";
305 assigned-clocks = <&bpmp TEGRA186_CLK_SDMMC4>,
306 <&bpmp TEGRA186_CLK_PLLC4_VCO>;
307 assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLC4_VCO>;
270 resets = <&bpmp TEGRA186_RESET_SDMMC4>; 308 resets = <&bpmp TEGRA186_RESET_SDMMC4>;
271 reset-names = "sdhci"; 309 reset-names = "sdhci";
310 nvidia,pad-autocal-pull-up-offset-hs400 = <0x05>;
311 nvidia,pad-autocal-pull-down-offset-hs400 = <0x05>;
312 nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x0a>;
313 nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x0a>;
314 nvidia,default-tap = <0x5>;
315 nvidia,default-trim = <0x9>;
316 nvidia,dqs-trim = <63>;
317 mmc-hs400-1_8v;
272 status = "disabled"; 318 status = "disabled";
273 }; 319 };
274 320
@@ -368,6 +414,36 @@
368 <0 0x0c380000 0 0x10000>, 414 <0 0x0c380000 0 0x10000>,
369 <0 0x0c390000 0 0x10000>; 415 <0 0x0c390000 0 0x10000>;
370 reg-names = "pmc", "wake", "aotag", "scratch"; 416 reg-names = "pmc", "wake", "aotag", "scratch";
417
418 sdmmc1_3v3: sdmmc1-3v3 {
419 pins = "sdmmc1-hv";
420 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
421 };
422
423 sdmmc1_1v8: sdmmc1-1v8 {
424 pins = "sdmmc1-hv";
425 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
426 };
427
428 sdmmc2_3v3: sdmmc2-3v3 {
429 pins = "sdmmc2-hv";
430 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
431 };
432
433 sdmmc2_1v8: sdmmc2-1v8 {
434 pins = "sdmmc2-hv";
435 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
436 };
437
438 sdmmc3_3v3: sdmmc3-3v3 {
439 pins = "sdmmc3-hv";
440 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
441 };
442
443 sdmmc3_1v8: sdmmc3-1v8 {
444 pins = "sdmmc3-hv";
445 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
446 };
371 }; 447 };
372 448
373 ccplex@e000000 { 449 ccplex@e000000 {
diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
index a4dfcd19b9e8..9fc14bb9a0af 100644
--- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
@@ -118,7 +118,7 @@
118 }; 118 };
119 119
120 gen1_i2c: i2c@3160000 { 120 gen1_i2c: i2c@3160000 {
121 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 121 compatible = "nvidia,tegra194-i2c";
122 reg = <0x03160000 0x10000>; 122 reg = <0x03160000 0x10000>;
123 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 123 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
124 #address-cells = <1>; 124 #address-cells = <1>;
@@ -143,7 +143,7 @@
143 }; 143 };
144 144
145 cam_i2c: i2c@3180000 { 145 cam_i2c: i2c@3180000 {
146 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 146 compatible = "nvidia,tegra194-i2c";
147 reg = <0x03180000 0x10000>; 147 reg = <0x03180000 0x10000>;
148 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>; 148 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
149 #address-cells = <1>; 149 #address-cells = <1>;
@@ -157,7 +157,7 @@
157 157
158 /* shares pads with dpaux1 */ 158 /* shares pads with dpaux1 */
159 dp_aux_ch1_i2c: i2c@3190000 { 159 dp_aux_ch1_i2c: i2c@3190000 {
160 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 160 compatible = "nvidia,tegra194-i2c";
161 reg = <0x03190000 0x10000>; 161 reg = <0x03190000 0x10000>;
162 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; 162 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
163 #address-cells = <1>; 163 #address-cells = <1>;
@@ -171,7 +171,7 @@
171 171
172 /* shares pads with dpaux0 */ 172 /* shares pads with dpaux0 */
173 dp_aux_ch0_i2c: i2c@31b0000 { 173 dp_aux_ch0_i2c: i2c@31b0000 {
174 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 174 compatible = "nvidia,tegra194-i2c";
175 reg = <0x031b0000 0x10000>; 175 reg = <0x031b0000 0x10000>;
176 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; 176 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
177 #address-cells = <1>; 177 #address-cells = <1>;
@@ -184,7 +184,7 @@
184 }; 184 };
185 185
186 gen7_i2c: i2c@31c0000 { 186 gen7_i2c: i2c@31c0000 {
187 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 187 compatible = "nvidia,tegra194-i2c";
188 reg = <0x031c0000 0x10000>; 188 reg = <0x031c0000 0x10000>;
189 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 189 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
190 #address-cells = <1>; 190 #address-cells = <1>;
@@ -197,7 +197,7 @@
197 }; 197 };
198 198
199 gen9_i2c: i2c@31e0000 { 199 gen9_i2c: i2c@31e0000 {
200 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 200 compatible = "nvidia,tegra194-i2c";
201 reg = <0x031e0000 0x10000>; 201 reg = <0x031e0000 0x10000>;
202 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; 202 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
203 #address-cells = <1>; 203 #address-cells = <1>;
@@ -264,7 +264,7 @@
264 }; 264 };
265 265
266 gen2_i2c: i2c@c240000 { 266 gen2_i2c: i2c@c240000 {
267 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 267 compatible = "nvidia,tegra194-i2c";
268 reg = <0x0c240000 0x10000>; 268 reg = <0x0c240000 0x10000>;
269 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; 269 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
270 #address-cells = <1>; 270 #address-cells = <1>;
@@ -277,7 +277,7 @@
277 }; 277 };
278 278
279 gen8_i2c: i2c@c250000 { 279 gen8_i2c: i2c@c250000 {
280 compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c"; 280 compatible = "nvidia,tegra194-i2c";
281 reg = <0x0c250000 0x10000>; 281 reg = <0x0c250000 0x10000>;
282 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 282 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
283 #address-cells = <1>; 283 #address-cells = <1>;
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
index 212e6634c9ba..053458a5db55 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
@@ -178,16 +178,7 @@
178 178
179 vddio_sdmmc: ldo2 { 179 vddio_sdmmc: ldo2 {
180 regulator-name = "VDDIO_SDMMC"; 180 regulator-name = "VDDIO_SDMMC";
181 /* 181 regulator-min-microvolt = <1800000>;
182 * Technically this supply should have
183 * a supported range from 1.8 - 3.3 V.
184 * However, that would cause the SDHCI
185 * driver to request 2.7 V upon access
186 * and that in turn will cause traffic
187 * to be broken. Leave it at 3.3 V for
188 * now.
189 */
190 regulator-min-microvolt = <3300000>;
191 regulator-max-microvolt = <3300000>; 182 regulator-max-microvolt = <3300000>;
192 regulator-always-on; 183 regulator-always-on;
193 regulator-boot-on; 184 regulator-boot-on;
@@ -282,6 +273,7 @@
282 status = "okay"; 273 status = "okay";
283 bus-width = <8>; 274 bus-width = <8>;
284 non-removable; 275 non-removable;
276 vqmmc-supply = <&vdd_1v8>;
285 }; 277 };
286 278
287 clocks { 279 clocks {
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index 9d5a0e6b2ca4..365726ddd418 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1452,7 +1452,6 @@
1452 sdhci@700b0000 { 1452 sdhci@700b0000 {
1453 status = "okay"; 1453 status = "okay";
1454 bus-width = <4>; 1454 bus-width = <4>;
1455 no-1-8-v;
1456 1455
1457 cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>; 1456 cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
1458 1457
diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index 3be920efee82..8fe47d6445a5 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -3,6 +3,7 @@
3#include <dt-bindings/gpio/tegra-gpio.h> 3#include <dt-bindings/gpio/tegra-gpio.h>
4#include <dt-bindings/memory/tegra210-mc.h> 4#include <dt-bindings/memory/tegra210-mc.h>
5#include <dt-bindings/pinctrl/pinctrl-tegra.h> 5#include <dt-bindings/pinctrl/pinctrl-tegra.h>
6#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
6#include <dt-bindings/interrupt-controller/arm-gic.h> 7#include <dt-bindings/interrupt-controller/arm-gic.h>
7#include <dt-bindings/thermal/tegra124-soctherm.h> 8#include <dt-bindings/thermal/tegra124-soctherm.h>
8 9
@@ -776,6 +777,26 @@
776 #power-domain-cells = <0>; 777 #power-domain-cells = <0>;
777 }; 778 };
778 }; 779 };
780
781 sdmmc1_3v3: sdmmc1-3v3 {
782 pins = "sdmmc1";
783 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
784 };
785
786 sdmmc1_1v8: sdmmc1-1v8 {
787 pins = "sdmmc1";
788 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
789 };
790
791 sdmmc3_3v3: sdmmc3-3v3 {
792 pins = "sdmmc3";
793 power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
794 };
795
796 sdmmc3_1v8: sdmmc3-1v8 {
797 pins = "sdmmc3";
798 power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
799 };
779 }; 800 };
780 801
781 fuse@7000f800 { 802 fuse@7000f800 {
@@ -1027,6 +1048,20 @@
1027 clock-names = "sdhci"; 1048 clock-names = "sdhci";
1028 resets = <&tegra_car 14>; 1049 resets = <&tegra_car 14>;
1029 reset-names = "sdhci"; 1050 reset-names = "sdhci";
1051 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
1052 pinctrl-0 = <&sdmmc1_3v3>;
1053 pinctrl-1 = <&sdmmc1_1v8>;
1054 nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
1055 nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
1056 nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
1057 nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
1058 nvidia,default-tap = <0x2>;
1059 nvidia,default-trim = <0x4>;
1060 assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
1061 <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>,
1062 <&tegra_car TEGRA210_CLK_PLL_C4>;
1063 assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
1064 assigned-clock-rates = <200000000>, <1000000000>, <1000000000>;
1030 status = "disabled"; 1065 status = "disabled";
1031 }; 1066 };
1032 1067
@@ -1038,6 +1073,10 @@
1038 clock-names = "sdhci"; 1073 clock-names = "sdhci";
1039 resets = <&tegra_car 9>; 1074 resets = <&tegra_car 9>;
1040 reset-names = "sdhci"; 1075 reset-names = "sdhci";
1076 nvidia,pad-autocal-pull-up-offset-1v8 = <0x05>;
1077 nvidia,pad-autocal-pull-down-offset-1v8 = <0x05>;
1078 nvidia,default-tap = <0x8>;
1079 nvidia,default-trim = <0x0>;
1041 status = "disabled"; 1080 status = "disabled";
1042 }; 1081 };
1043 1082
@@ -1049,6 +1088,15 @@
1049 clock-names = "sdhci"; 1088 clock-names = "sdhci";
1050 resets = <&tegra_car 69>; 1089 resets = <&tegra_car 69>;
1051 reset-names = "sdhci"; 1090 reset-names = "sdhci";
1091 pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
1092 pinctrl-0 = <&sdmmc3_3v3>;
1093 pinctrl-1 = <&sdmmc3_1v8>;
1094 nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
1095 nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
1096 nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
1097 nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
1098 nvidia,default-tap = <0x3>;
1099 nvidia,default-trim = <0x3>;
1052 status = "disabled"; 1100 status = "disabled";
1053 }; 1101 };
1054 1102
@@ -1060,6 +1108,15 @@
1060 clock-names = "sdhci"; 1108 clock-names = "sdhci";
1061 resets = <&tegra_car 15>; 1109 resets = <&tegra_car 15>;
1062 reset-names = "sdhci"; 1110 reset-names = "sdhci";
1111 nvidia,pad-autocal-pull-up-offset-1v8 = <0x05>;
1112 nvidia,pad-autocal-pull-down-offset-1v8 = <0x05>;
1113 nvidia,default-tap = <0x8>;
1114 nvidia,default-trim = <0x0>;
1115 assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
1116 <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
1117 assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
1118 nvidia,dqs-trim = <40>;
1119 mmc-hs400-1_8v;
1063 status = "disabled"; 1120 status = "disabled";
1064 }; 1121 };
1065 1122
diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 9e2394bc3c62..a8ce6594342d 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
8dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb 8dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb
9dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-xs.dtb 9dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-xs.dtb
10dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb r8a77965-salvator-xs.dtb 10dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb r8a77965-salvator-xs.dtb
11dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb.dtb
12dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb-kf.dtb
11dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb r8a77970-v3msk.dtb 13dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb r8a77970-v3msk.dtb
12dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-condor.dtb r8a77980-v3hsk.dtb 14dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-condor.dtb r8a77980-v3hsk.dtb
13dtb-$(CONFIG_ARCH_R8A77990) += r8a77990-ebisu.dtb 15dtb-$(CONFIG_ARCH_R8A77990) += r8a77990-ebisu.dtb
diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
new file mode 100644
index 000000000000..012cbb64246e
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -0,0 +1,1663 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the r8a774a1 SoC
4 *
5 * Copyright (C) 2018 Renesas Electronics Corp.
6 */
7
8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/interrupt-controller/arm-gic.h>
10#include <dt-bindings/clock/renesas-cpg-mssr.h>
11
12/ {
13 compatible = "renesas,r8a774a1";
14 #address-cells = <2>;
15 #size-cells = <2>;
16
17 aliases {
18 i2c0 = &i2c0;
19 i2c1 = &i2c1;
20 i2c2 = &i2c2;
21 i2c3 = &i2c3;
22 i2c4 = &i2c4;
23 i2c5 = &i2c5;
24 i2c6 = &i2c6;
25 i2c7 = &i2c_dvfs;
26 };
27
28 /*
29 * The external audio clocks are configured as 0 Hz fixed frequency
30 * clocks by default.
31 * Boards that provide audio clocks should override them.
32 */
33 audio_clk_a: audio_clk_a {
34 compatible = "fixed-clock";
35 #clock-cells = <0>;
36 clock-frequency = <0>;
37 };
38
39 audio_clk_b: audio_clk_b {
40 compatible = "fixed-clock";
41 #clock-cells = <0>;
42 clock-frequency = <0>;
43 };
44
45 audio_clk_c: audio_clk_c {
46 compatible = "fixed-clock";
47 #clock-cells = <0>;
48 clock-frequency = <0>;
49 };
50
51 /* External CAN clock - to be overridden by boards that provide it */
52 can_clk: can {
53 compatible = "fixed-clock";
54 #clock-cells = <0>;
55 clock-frequency = <0>;
56 };
57
58 cpus {
59 #address-cells = <1>;
60 #size-cells = <0>;
61
62 a57_0: cpu@0 {
63 compatible = "arm,cortex-a57", "arm,armv8";
64 reg = <0x0>;
65 device_type = "cpu";
66 power-domains = <&sysc 0>;
67 next-level-cache = <&L2_CA57>;
68 enable-method = "psci";
69 clocks = <&cpg CPG_CORE 0>;
70 };
71
72 a57_1: cpu@1 {
73 compatible = "arm,cortex-a57", "arm,armv8";
74 reg = <0x1>;
75 device_type = "cpu";
76 power-domains = <&sysc 1>;
77 next-level-cache = <&L2_CA57>;
78 enable-method = "psci";
79 clocks = <&cpg CPG_CORE 0>;
80 };
81
82 a53_0: cpu@100 {
83 compatible = "arm,cortex-a53", "arm,armv8";
84 reg = <0x100>;
85 device_type = "cpu";
86 power-domains = <&sysc 5>;
87 next-level-cache = <&L2_CA53>;
88 enable-method = "psci";
89 clocks =<&cpg CPG_CORE 1>;
90 };
91
92 a53_1: cpu@101 {
93 compatible = "arm,cortex-a53", "arm,armv8";
94 reg = <0x101>;
95 device_type = "cpu";
96 power-domains = <&sysc 6>;
97 next-level-cache = <&L2_CA53>;
98 enable-method = "psci";
99 clocks =<&cpg CPG_CORE 1>;
100 };
101
102 a53_2: cpu@102 {
103 compatible = "arm,cortex-a53", "arm,armv8";
104 reg = <0x102>;
105 device_type = "cpu";
106 power-domains = <&sysc 7>;
107 next-level-cache = <&L2_CA53>;
108 enable-method = "psci";
109 clocks =<&cpg CPG_CORE 1>;
110 };
111
112 a53_3: cpu@103 {
113 compatible = "arm,cortex-a53", "arm,armv8";
114 reg = <0x103>;
115 device_type = "cpu";
116 power-domains = <&sysc 8>;
117 next-level-cache = <&L2_CA53>;
118 enable-method = "psci";
119 clocks =<&cpg CPG_CORE 1>;
120 };
121
122 L2_CA57: cache-controller-0 {
123 compatible = "cache";
124 power-domains = <&sysc 12>;
125 cache-unified;
126 cache-level = <2>;
127 };
128
129 L2_CA53: cache-controller-1 {
130 compatible = "cache";
131 power-domains = <&sysc 21>;
132 cache-unified;
133 cache-level = <2>;
134 };
135 };
136
137 extal_clk: extal {
138 compatible = "fixed-clock";
139 #clock-cells = <0>;
140 /* This value must be overridden by the board */
141 clock-frequency = <0>;
142 };
143
144 extalr_clk: extalr {
145 compatible = "fixed-clock";
146 #clock-cells = <0>;
147 /* This value must be overridden by the board */
148 clock-frequency = <0>;
149 };
150
151 /* External PCIe clock - can be overridden by the board */
152 pcie_bus_clk: pcie_bus {
153 compatible = "fixed-clock";
154 #clock-cells = <0>;
155 clock-frequency = <0>;
156 };
157
158 pmu_a53 {
159 compatible = "arm,cortex-a53-pmu";
160 interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
161 <&gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
162 <&gic GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
163 <&gic GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
164 interrupt-affinity = <&a53_0>, <&a53_1>, <&a53_2>, <&a53_3>;
165 };
166
167 pmu_a57 {
168 compatible = "arm,cortex-a57-pmu";
169 interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
170 <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
171 interrupt-affinity = <&a57_0>, <&a57_1>;
172 };
173
174 psci {
175 compatible = "arm,psci-1.0", "arm,psci-0.2";
176 method = "smc";
177 };
178
179 /* External SCIF clock - to be overridden by boards that provide it */
180 scif_clk: scif {
181 compatible = "fixed-clock";
182 #clock-cells = <0>;
183 clock-frequency = <0>;
184 };
185
186 soc {
187 compatible = "simple-bus";
188 interrupt-parent = <&gic>;
189 #address-cells = <2>;
190 #size-cells = <2>;
191 ranges;
192
193 rwdt: watchdog@e6020000 {
194 compatible = "renesas,r8a774a1-wdt",
195 "renesas,rcar-gen3-wdt";
196 reg = <0 0xe6020000 0 0x0c>;
197 clocks = <&cpg CPG_MOD 402>;
198 power-domains = <&sysc 32>;
199 resets = <&cpg 402>;
200 status = "disabled";
201 };
202
203 gpio0: gpio@e6050000 {
204 compatible = "renesas,gpio-r8a774a1",
205 "renesas,rcar-gen3-gpio";
206 reg = <0 0xe6050000 0 0x50>;
207 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
208 #gpio-cells = <2>;
209 gpio-controller;
210 gpio-ranges = <&pfc 0 0 16>;
211 #interrupt-cells = <2>;
212 interrupt-controller;
213 clocks = <&cpg CPG_MOD 912>;
214 power-domains = <&sysc 32>;
215 resets = <&cpg 912>;
216 };
217
218 gpio1: gpio@e6051000 {
219 compatible = "renesas,gpio-r8a774a1",
220 "renesas,rcar-gen3-gpio";
221 reg = <0 0xe6051000 0 0x50>;
222 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
223 #gpio-cells = <2>;
224 gpio-controller;
225 gpio-ranges = <&pfc 0 32 29>;
226 #interrupt-cells = <2>;
227 interrupt-controller;
228 clocks = <&cpg CPG_MOD 911>;
229 power-domains = <&sysc 32>;
230 resets = <&cpg 911>;
231 };
232
233 gpio2: gpio@e6052000 {
234 compatible = "renesas,gpio-r8a774a1",
235 "renesas,rcar-gen3-gpio";
236 reg = <0 0xe6052000 0 0x50>;
237 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
238 #gpio-cells = <2>;
239 gpio-controller;
240 gpio-ranges = <&pfc 0 64 15>;
241 #interrupt-cells = <2>;
242 interrupt-controller;
243 clocks = <&cpg CPG_MOD 910>;
244 power-domains = <&sysc 32>;
245 resets = <&cpg 910>;
246 };
247
248 gpio3: gpio@e6053000 {
249 compatible = "renesas,gpio-r8a774a1",
250 "renesas,rcar-gen3-gpio";
251 reg = <0 0xe6053000 0 0x50>;
252 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
253 #gpio-cells = <2>;
254 gpio-controller;
255 gpio-ranges = <&pfc 0 96 16>;
256 #interrupt-cells = <2>;
257 interrupt-controller;
258 clocks = <&cpg CPG_MOD 909>;
259 power-domains = <&sysc 32>;
260 resets = <&cpg 909>;
261 };
262
263 gpio4: gpio@e6054000 {
264 compatible = "renesas,gpio-r8a774a1",
265 "renesas,rcar-gen3-gpio";
266 reg = <0 0xe6054000 0 0x50>;
267 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
268 #gpio-cells = <2>;
269 gpio-controller;
270 gpio-ranges = <&pfc 0 128 18>;
271 #interrupt-cells = <2>;
272 interrupt-controller;
273 clocks = <&cpg CPG_MOD 908>;
274 power-domains = <&sysc 32>;
275 resets = <&cpg 908>;
276 };
277
278 gpio5: gpio@e6055000 {
279 compatible = "renesas,gpio-r8a774a1",
280 "renesas,rcar-gen3-gpio";
281 reg = <0 0xe6055000 0 0x50>;
282 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
283 #gpio-cells = <2>;
284 gpio-controller;
285 gpio-ranges = <&pfc 0 160 26>;
286 #interrupt-cells = <2>;
287 interrupt-controller;
288 clocks = <&cpg CPG_MOD 907>;
289 power-domains = <&sysc 32>;
290 resets = <&cpg 907>;
291 };
292
293 gpio6: gpio@e6055400 {
294 compatible = "renesas,gpio-r8a774a1",
295 "renesas,rcar-gen3-gpio";
296 reg = <0 0xe6055400 0 0x50>;
297 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
298 #gpio-cells = <2>;
299 gpio-controller;
300 gpio-ranges = <&pfc 0 192 32>;
301 #interrupt-cells = <2>;
302 interrupt-controller;
303 clocks = <&cpg CPG_MOD 906>;
304 power-domains = <&sysc 32>;
305 resets = <&cpg 906>;
306 };
307
308 gpio7: gpio@e6055800 {
309 compatible = "renesas,gpio-r8a774a1",
310 "renesas,rcar-gen3-gpio";
311 reg = <0 0xe6055800 0 0x50>;
312 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
313 #gpio-cells = <2>;
314 gpio-controller;
315 gpio-ranges = <&pfc 0 224 4>;
316 #interrupt-cells = <2>;
317 interrupt-controller;
318 clocks = <&cpg CPG_MOD 905>;
319 power-domains = <&sysc 32>;
320 resets = <&cpg 905>;
321 };
322
323 pfc: pin-controller@e6060000 {
324 compatible = "renesas,pfc-r8a774a1";
325 reg = <0 0xe6060000 0 0x50c>;
326 };
327
328 cpg: clock-controller@e6150000 {
329 compatible = "renesas,r8a774a1-cpg-mssr";
330 reg = <0 0xe6150000 0 0x0bb0>;
331 clocks = <&extal_clk>, <&extalr_clk>;
332 clock-names = "extal", "extalr";
333 #clock-cells = <2>;
334 #power-domain-cells = <0>;
335 #reset-cells = <1>;
336 };
337
338 rst: reset-controller@e6160000 {
339 compatible = "renesas,r8a774a1-rst";
340 reg = <0 0xe6160000 0 0x018c>;
341 };
342
343 sysc: system-controller@e6180000 {
344 compatible = "renesas,r8a774a1-sysc";
345 reg = <0 0xe6180000 0 0x0400>;
346 #power-domain-cells = <1>;
347 };
348
349 tsc: thermal@e6198000 {
350 compatible = "renesas,r8a774a1-thermal";
351 reg = <0 0xe6198000 0 0x100>,
352 <0 0xe61a0000 0 0x100>,
353 <0 0xe61a8000 0 0x100>;
354 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
355 <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
356 <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
357 clocks = <&cpg CPG_MOD 522>;
358 power-domains = <&sysc 32>;
359 resets = <&cpg 522>;
360 #thermal-sensor-cells = <1>;
361 };
362
363 intc_ex: interrupt-controller@e61c0000 {
364 compatible = "renesas,intc-ex-r8a774a1", "renesas,irqc";
365 #interrupt-cells = <2>;
366 interrupt-controller;
367 reg = <0 0xe61c0000 0 0x200>;
368 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
369 GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
370 GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
371 GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH
372 GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH
373 GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
374 clocks = <&cpg CPG_MOD 407>;
375 power-domains = <&sysc 32>;
376 resets = <&cpg 407>;
377 };
378
379 i2c0: i2c@e6500000 {
380 #address-cells = <1>;
381 #size-cells = <0>;
382 compatible = "renesas,i2c-r8a774a1",
383 "renesas,rcar-gen3-i2c";
384 reg = <0 0xe6500000 0 0x40>;
385 interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
386 clocks = <&cpg CPG_MOD 931>;
387 power-domains = <&sysc 32>;
388 resets = <&cpg 931>;
389 dmas = <&dmac1 0x91>, <&dmac1 0x90>,
390 <&dmac2 0x91>, <&dmac2 0x90>;
391 dma-names = "tx", "rx", "tx", "rx";
392 i2c-scl-internal-delay-ns = <110>;
393 status = "disabled";
394 };
395
396 i2c1: i2c@e6508000 {
397 #address-cells = <1>;
398 #size-cells = <0>;
399 compatible = "renesas,i2c-r8a774a1",
400 "renesas,rcar-gen3-i2c";
401 reg = <0 0xe6508000 0 0x40>;
402 interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
403 clocks = <&cpg CPG_MOD 930>;
404 power-domains = <&sysc 32>;
405 resets = <&cpg 930>;
406 dmas = <&dmac1 0x93>, <&dmac1 0x92>,
407 <&dmac2 0x93>, <&dmac2 0x92>;
408 dma-names = "tx", "rx", "tx", "rx";
409 i2c-scl-internal-delay-ns = <6>;
410 status = "disabled";
411 };
412
413 i2c2: i2c@e6510000 {
414 #address-cells = <1>;
415 #size-cells = <0>;
416 compatible = "renesas,i2c-r8a774a1",
417 "renesas,rcar-gen3-i2c";
418 reg = <0 0xe6510000 0 0x40>;
419 interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
420 clocks = <&cpg CPG_MOD 929>;
421 power-domains = <&sysc 32>;
422 resets = <&cpg 929>;
423 dmas = <&dmac1 0x95>, <&dmac1 0x94>,
424 <&dmac2 0x95>, <&dmac2 0x94>;
425 dma-names = "tx", "rx", "tx", "rx";
426 i2c-scl-internal-delay-ns = <6>;
427 status = "disabled";
428 };
429
430 i2c3: i2c@e66d0000 {
431 #address-cells = <1>;
432 #size-cells = <0>;
433 compatible = "renesas,i2c-r8a774a1",
434 "renesas,rcar-gen3-i2c";
435 reg = <0 0xe66d0000 0 0x40>;
436 interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
437 clocks = <&cpg CPG_MOD 928>;
438 power-domains = <&sysc 32>;
439 resets = <&cpg 928>;
440 dmas = <&dmac0 0x97>, <&dmac0 0x96>;
441 dma-names = "tx", "rx";
442 i2c-scl-internal-delay-ns = <110>;
443 status = "disabled";
444 };
445
446 i2c4: i2c@e66d8000 {
447 #address-cells = <1>;
448 #size-cells = <0>;
449 compatible = "renesas,i2c-r8a774a1",
450 "renesas,rcar-gen3-i2c";
451 reg = <0 0xe66d8000 0 0x40>;
452 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
453 clocks = <&cpg CPG_MOD 927>;
454 power-domains = <&sysc 32>;
455 resets = <&cpg 927>;
456 dmas = <&dmac0 0x99>, <&dmac0 0x98>;
457 dma-names = "tx", "rx";
458 i2c-scl-internal-delay-ns = <110>;
459 status = "disabled";
460 };
461
462 i2c5: i2c@e66e0000 {
463 #address-cells = <1>;
464 #size-cells = <0>;
465 compatible = "renesas,i2c-r8a774a1",
466 "renesas,rcar-gen3-i2c";
467 reg = <0 0xe66e0000 0 0x40>;
468 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
469 clocks = <&cpg CPG_MOD 919>;
470 power-domains = <&sysc 32>;
471 resets = <&cpg 919>;
472 dmas = <&dmac0 0x9b>, <&dmac0 0x9a>;
473 dma-names = "tx", "rx";
474 i2c-scl-internal-delay-ns = <110>;
475 status = "disabled";
476 };
477
478 i2c6: i2c@e66e8000 {
479 #address-cells = <1>;
480 #size-cells = <0>;
481 compatible = "renesas,i2c-r8a774a1",
482 "renesas,rcar-gen3-i2c";
483 reg = <0 0xe66e8000 0 0x40>;
484 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
485 clocks = <&cpg CPG_MOD 918>;
486 power-domains = <&sysc 32>;
487 resets = <&cpg 918>;
488 dmas = <&dmac0 0x9d>, <&dmac0 0x9c>;
489 dma-names = "tx", "rx";
490 i2c-scl-internal-delay-ns = <6>;
491 status = "disabled";
492 };
493
494 i2c_dvfs: i2c@e60b0000 {
495 #address-cells = <1>;
496 #size-cells = <0>;
497 compatible = "renesas,iic-r8a774a1",
498 "renesas,rcar-gen3-iic",
499 "renesas,rmobile-iic";
500 reg = <0 0xe60b0000 0 0x425>;
501 interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
502 clocks = <&cpg CPG_MOD 926>;
503 power-domains = <&sysc 32>;
504 resets = <&cpg 926>;
505 dmas = <&dmac0 0x11>, <&dmac0 0x10>;
506 dma-names = "tx", "rx";
507 status = "disabled";
508 };
509
510 hscif0: serial@e6540000 {
511 compatible = "renesas,hscif-r8a774a1",
512 "renesas,rcar-gen3-hscif",
513 "renesas,hscif";
514 reg = <0 0xe6540000 0 0x60>;
515 interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
516 clocks = <&cpg CPG_MOD 520>,
517 <&cpg CPG_CORE 19>,
518 <&scif_clk>;
519 clock-names = "fck", "brg_int", "scif_clk";
520 dmas = <&dmac1 0x31>, <&dmac1 0x30>,
521 <&dmac2 0x31>, <&dmac2 0x30>;
522 dma-names = "tx", "rx", "tx", "rx";
523 power-domains = <&sysc 32>;
524 resets = <&cpg 520>;
525 status = "disabled";
526 };
527
528 hscif1: serial@e6550000 {
529 compatible = "renesas,hscif-r8a774a1",
530 "renesas,rcar-gen3-hscif",
531 "renesas,hscif";
532 reg = <0 0xe6550000 0 0x60>;
533 interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
534 clocks = <&cpg CPG_MOD 519>,
535 <&cpg CPG_CORE 19>,
536 <&scif_clk>;
537 clock-names = "fck", "brg_int", "scif_clk";
538 dmas = <&dmac1 0x33>, <&dmac1 0x32>,
539 <&dmac2 0x33>, <&dmac2 0x32>;
540 dma-names = "tx", "rx", "tx", "rx";
541 power-domains = <&sysc 32>;
542 resets = <&cpg 519>;
543 status = "disabled";
544 };
545
546 hscif2: serial@e6560000 {
547 compatible = "renesas,hscif-r8a774a1",
548 "renesas,rcar-gen3-hscif",
549 "renesas,hscif";
550 reg = <0 0xe6560000 0 0x60>;
551 interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
552 clocks = <&cpg CPG_MOD 518>,
553 <&cpg CPG_CORE 19>,
554 <&scif_clk>;
555 clock-names = "fck", "brg_int", "scif_clk";
556 dmas = <&dmac1 0x35>, <&dmac1 0x34>,
557 <&dmac2 0x35>, <&dmac2 0x34>;
558 dma-names = "tx", "rx", "tx", "rx";
559 power-domains = <&sysc 32>;
560 resets = <&cpg 518>;
561 status = "disabled";
562 };
563
564 hscif3: serial@e66a0000 {
565 compatible = "renesas,hscif-r8a774a1",
566 "renesas,rcar-gen3-hscif",
567 "renesas,hscif";
568 reg = <0 0xe66a0000 0 0x60>;
569 interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
570 clocks = <&cpg CPG_MOD 517>,
571 <&cpg CPG_CORE 19>,
572 <&scif_clk>;
573 clock-names = "fck", "brg_int", "scif_clk";
574 dmas = <&dmac0 0x37>, <&dmac0 0x36>;
575 dma-names = "tx", "rx";
576 power-domains = <&sysc 32>;
577 resets = <&cpg 517>;
578 status = "disabled";
579 };
580
581 hscif4: serial@e66b0000 {
582 compatible = "renesas,hscif-r8a774a1",
583 "renesas,rcar-gen3-hscif",
584 "renesas,hscif";
585 reg = <0 0xe66b0000 0 0x60>;
586 interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
587 clocks = <&cpg CPG_MOD 516>,
588 <&cpg CPG_CORE 19>,
589 <&scif_clk>;
590 clock-names = "fck", "brg_int", "scif_clk";
591 dmas = <&dmac0 0x39>, <&dmac0 0x38>;
592 dma-names = "tx", "rx";
593 power-domains = <&sysc 32>;
594 resets = <&cpg 516>;
595 status = "disabled";
596 };
597
598 hsusb: usb@e6590000 {
599 compatible = "renesas,usbhs-r8a774a1",
600 "renesas,rcar-gen3-usbhs";
601 reg = <0 0xe6590000 0 0x100>;
602 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
603 clocks = <&cpg CPG_MOD 704>;
604 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
605 <&usb_dmac1 0>, <&usb_dmac1 1>;
606 dma-names = "ch0", "ch1", "ch2", "ch3";
607 renesas,buswait = <11>;
608 phys = <&usb2_phy0>;
609 phy-names = "usb";
610 power-domains = <&sysc 32>;
611 resets = <&cpg 704>;
612 status = "disabled";
613 };
614
615 usb_dmac0: dma-controller@e65a0000 {
616 compatible = "renesas,r8a774a1-usb-dmac",
617 "renesas,usb-dmac";
618 reg = <0 0xe65a0000 0 0x100>;
619 interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
620 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
621 interrupt-names = "ch0", "ch1";
622 clocks = <&cpg CPG_MOD 330>;
623 power-domains = <&sysc 32>;
624 resets = <&cpg 330>;
625 #dma-cells = <1>;
626 dma-channels = <2>;
627 };
628
629 usb_dmac1: dma-controller@e65b0000 {
630 compatible = "renesas,r8a774a1-usb-dmac",
631 "renesas,usb-dmac";
632 reg = <0 0xe65b0000 0 0x100>;
633 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
634 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
635 interrupt-names = "ch0", "ch1";
636 clocks = <&cpg CPG_MOD 331>;
637 power-domains = <&sysc 32>;
638 resets = <&cpg 331>;
639 #dma-cells = <1>;
640 dma-channels = <2>;
641 };
642
643 usb3_phy0: usb-phy@e65ee000 {
644 compatible = "renesas,r8a774a1-usb3-phy",
645 "renesas,rcar-gen3-usb3-phy";
646 reg = <0 0xe65ee000 0 0x90>;
647 clocks = <&cpg CPG_MOD 328>, <&usb3s0_clk>,
648 <&usb_extal_clk>;
649 clock-names = "usb3-if", "usb3s_clk", "usb_extal";
650 power-domains = <&sysc 32>;
651 resets = <&cpg 328>;
652 #phy-cells = <0>;
653 status = "disabled";
654 };
655
656 dmac0: dma-controller@e6700000 {
657 compatible = "renesas,dmac-r8a774a1",
658 "renesas,rcar-dmac";
659 reg = <0 0xe6700000 0 0x10000>;
660 interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
661 GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
662 GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
663 GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
664 GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
665 GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
666 GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
667 GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
668 GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
669 GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
670 GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
671 GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
672 GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
673 GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
674 GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
675 GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
676 GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
677 interrupt-names = "error",
678 "ch0", "ch1", "ch2", "ch3",
679 "ch4", "ch5", "ch6", "ch7",
680 "ch8", "ch9", "ch10", "ch11",
681 "ch12", "ch13", "ch14", "ch15";
682 clocks = <&cpg CPG_MOD 219>;
683 clock-names = "fck";
684 power-domains = <&sysc 32>;
685 resets = <&cpg 219>;
686 #dma-cells = <1>;
687 dma-channels = <16>;
688 };
689
690 dmac1: dma-controller@e7300000 {
691 compatible = "renesas,dmac-r8a774a1",
692 "renesas,rcar-dmac";
693 reg = <0 0xe7300000 0 0x10000>;
694 interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
695 GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
696 GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
697 GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
698 GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
699 GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
700 GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
701 GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
702 GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
703 GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
704 GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
705 GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
706 GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
707 GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
708 GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
709 GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
710 GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
711 interrupt-names = "error",
712 "ch0", "ch1", "ch2", "ch3",
713 "ch4", "ch5", "ch6", "ch7",
714 "ch8", "ch9", "ch10", "ch11",
715 "ch12", "ch13", "ch14", "ch15";
716 clocks = <&cpg CPG_MOD 218>;
717 clock-names = "fck";
718 power-domains = <&sysc 32>;
719 resets = <&cpg 218>;
720 #dma-cells = <1>;
721 dma-channels = <16>;
722 };
723
724 dmac2: dma-controller@e7310000 {
725 compatible = "renesas,dmac-r8a774a1",
726 "renesas,rcar-dmac";
727 reg = <0 0xe7310000 0 0x10000>;
728 interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
729 GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
730 GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
731 GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
732 GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
733 GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
734 GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
735 GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
736 GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
737 GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
738 GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
739 GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
740 GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
741 GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
742 GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
743 GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
744 GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
745 interrupt-names = "error",
746 "ch0", "ch1", "ch2", "ch3",
747 "ch4", "ch5", "ch6", "ch7",
748 "ch8", "ch9", "ch10", "ch11",
749 "ch12", "ch13", "ch14", "ch15";
750 clocks = <&cpg CPG_MOD 217>;
751 clock-names = "fck";
752 power-domains = <&sysc 32>;
753 resets = <&cpg 217>;
754 #dma-cells = <1>;
755 dma-channels = <16>;
756 };
757
758 ipmmu_ds0: mmu@e6740000 {
759 compatible = "renesas,ipmmu-r8a774a1";
760 reg = <0 0xe6740000 0 0x1000>;
761 renesas,ipmmu-main = <&ipmmu_mm 0>;
762 power-domains = <&sysc 32>;
763 #iommu-cells = <1>;
764 };
765
766 ipmmu_ds1: mmu@e7740000 {
767 compatible = "renesas,ipmmu-r8a774a1";
768 reg = <0 0xe7740000 0 0x1000>;
769 renesas,ipmmu-main = <&ipmmu_mm 1>;
770 power-domains = <&sysc 32>;
771 #iommu-cells = <1>;
772 };
773
774 ipmmu_hc: mmu@e6570000 {
775 compatible = "renesas,ipmmu-r8a774a1";
776 reg = <0 0xe6570000 0 0x1000>;
777 renesas,ipmmu-main = <&ipmmu_mm 2>;
778 power-domains = <&sysc 32>;
779 #iommu-cells = <1>;
780 };
781
782 ipmmu_mm: mmu@e67b0000 {
783 compatible = "renesas,ipmmu-r8a774a1";
784 reg = <0 0xe67b0000 0 0x1000>;
785 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
786 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
787 power-domains = <&sysc 32>;
788 #iommu-cells = <1>;
789 };
790
791 ipmmu_mp: mmu@ec670000 {
792 compatible = "renesas,ipmmu-r8a774a1";
793 reg = <0 0xec670000 0 0x1000>;
794 renesas,ipmmu-main = <&ipmmu_mm 4>;
795 power-domains = <&sysc 32>;
796 #iommu-cells = <1>;
797 };
798
799 ipmmu_pv0: mmu@fd800000 {
800 compatible = "renesas,ipmmu-r8a774a1";
801 reg = <0 0xfd800000 0 0x1000>;
802 renesas,ipmmu-main = <&ipmmu_mm 5>;
803 power-domains = <&sysc 32>;
804 #iommu-cells = <1>;
805 };
806
807 ipmmu_pv1: mmu@fd950000 {
808 compatible = "renesas,ipmmu-r8a774a1";
809 reg = <0 0xfd950000 0 0x1000>;
810 renesas,ipmmu-main = <&ipmmu_mm 6>;
811 power-domains = <&sysc 32>;
812 #iommu-cells = <1>;
813 };
814
815 ipmmu_vc0: mmu@fe6b0000 {
816 compatible = "renesas,ipmmu-r8a774a1";
817 reg = <0 0xfe6b0000 0 0x1000>;
818 renesas,ipmmu-main = <&ipmmu_mm 8>;
819 power-domains = <&sysc 14>;
820 #iommu-cells = <1>;
821 };
822
823 ipmmu_vi0: mmu@febd0000 {
824 compatible = "renesas,ipmmu-r8a774a1";
825 reg = <0 0xfebd0000 0 0x1000>;
826 renesas,ipmmu-main = <&ipmmu_mm 9>;
827 power-domains = <&sysc 32>;
828 #iommu-cells = <1>;
829 };
830
831 avb: ethernet@e6800000 {
832 compatible = "renesas,etheravb-r8a774a1",
833 "renesas,etheravb-rcar-gen3";
834 reg = <0 0xe6800000 0 0x800>;
835 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
836 <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
837 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
838 <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
839 <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
840 <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
841 <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
842 <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
843 <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
844 <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
845 <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
846 <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
847 <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
848 <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
849 <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
850 <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
851 <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
852 <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
853 <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
854 <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
855 <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
856 <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
857 <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
858 <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
859 <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
860 interrupt-names = "ch0", "ch1", "ch2", "ch3",
861 "ch4", "ch5", "ch6", "ch7",
862 "ch8", "ch9", "ch10", "ch11",
863 "ch12", "ch13", "ch14", "ch15",
864 "ch16", "ch17", "ch18", "ch19",
865 "ch20", "ch21", "ch22", "ch23",
866 "ch24";
867 clocks = <&cpg CPG_MOD 812>;
868 power-domains = <&sysc 32>;
869 resets = <&cpg 812>;
870 phy-mode = "rgmii";
871 #address-cells = <1>;
872 #size-cells = <0>;
873 status = "disabled";
874 };
875
876 pwm0: pwm@e6e30000 {
877 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
878 reg = <0 0xe6e30000 0 0x8>;
879 #pwm-cells = <2>;
880 clocks = <&cpg CPG_MOD 523>;
881 resets = <&cpg 523>;
882 power-domains = <&sysc 32>;
883 status = "disabled";
884 };
885
886 pwm1: pwm@e6e31000 {
887 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
888 reg = <0 0xe6e31000 0 0x8>;
889 #pwm-cells = <2>;
890 clocks = <&cpg CPG_MOD 523>;
891 resets = <&cpg 523>;
892 power-domains = <&sysc 32>;
893 status = "disabled";
894 };
895
896 pwm2: pwm@e6e32000 {
897 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
898 reg = <0 0xe6e32000 0 0x8>;
899 #pwm-cells = <2>;
900 clocks = <&cpg CPG_MOD 523>;
901 resets = <&cpg 523>;
902 power-domains = <&sysc 32>;
903 status = "disabled";
904 };
905
906 pwm3: pwm@e6e33000 {
907 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
908 reg = <0 0xe6e33000 0 0x8>;
909 #pwm-cells = <2>;
910 clocks = <&cpg CPG_MOD 523>;
911 resets = <&cpg 523>;
912 power-domains = <&sysc 32>;
913 status = "disabled";
914 };
915
916 pwm4: pwm@e6e34000 {
917 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
918 reg = <0 0xe6e34000 0 0x8>;
919 #pwm-cells = <2>;
920 clocks = <&cpg CPG_MOD 523>;
921 resets = <&cpg 523>;
922 power-domains = <&sysc 32>;
923 status = "disabled";
924 };
925
926 pwm5: pwm@e6e35000 {
927 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
928 reg = <0 0xe6e35000 0 0x8>;
929 #pwm-cells = <2>;
930 clocks = <&cpg CPG_MOD 523>;
931 resets = <&cpg 523>;
932 power-domains = <&sysc 32>;
933 status = "disabled";
934 };
935
936 pwm6: pwm@e6e36000 {
937 compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
938 reg = <0 0xe6e36000 0 0x8>;
939 #pwm-cells = <2>;
940 clocks = <&cpg CPG_MOD 523>;
941 resets = <&cpg 523>;
942 power-domains = <&sysc 32>;
943 status = "disabled";
944 };
945
946 scif0: serial@e6e60000 {
947 compatible = "renesas,scif-r8a774a1",
948 "renesas,rcar-gen3-scif", "renesas,scif";
949 reg = <0 0xe6e60000 0 0x40>;
950 interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
951 clocks = <&cpg CPG_MOD 207>,
952 <&cpg CPG_CORE 19>,
953 <&scif_clk>;
954 clock-names = "fck", "brg_int", "scif_clk";
955 dmas = <&dmac1 0x51>, <&dmac1 0x50>,
956 <&dmac2 0x51>, <&dmac2 0x50>;
957 dma-names = "tx", "rx", "tx", "rx";
958 power-domains = <&sysc 32>;
959 resets = <&cpg 207>;
960 status = "disabled";
961 };
962
963 scif1: serial@e6e68000 {
964 compatible = "renesas,scif-r8a774a1",
965 "renesas,rcar-gen3-scif", "renesas,scif";
966 reg = <0 0xe6e68000 0 0x40>;
967 interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
968 clocks = <&cpg CPG_MOD 206>,
969 <&cpg CPG_CORE 19>,
970 <&scif_clk>;
971 clock-names = "fck", "brg_int", "scif_clk";
972 dmas = <&dmac1 0x53>, <&dmac1 0x52>,
973 <&dmac2 0x53>, <&dmac2 0x52>;
974 dma-names = "tx", "rx", "tx", "rx";
975 power-domains = <&sysc 32>;
976 resets = <&cpg 206>;
977 status = "disabled";
978 };
979
980 scif2: serial@e6e88000 {
981 compatible = "renesas,scif-r8a774a1",
982 "renesas,rcar-gen3-scif", "renesas,scif";
983 reg = <0 0xe6e88000 0 0x40>;
984 interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
985 clocks = <&cpg CPG_MOD 310>,
986 <&cpg CPG_CORE 19>,
987 <&scif_clk>;
988 clock-names = "fck", "brg_int", "scif_clk";
989 power-domains = <&sysc 32>;
990 resets = <&cpg 310>;
991 status = "disabled";
992 };
993
994 scif3: serial@e6c50000 {
995 compatible = "renesas,scif-r8a774a1",
996 "renesas,rcar-gen3-scif", "renesas,scif";
997 reg = <0 0xe6c50000 0 0x40>;
998 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
999 clocks = <&cpg CPG_MOD 204>,
1000 <&cpg CPG_CORE 19>,
1001 <&scif_clk>;
1002 clock-names = "fck", "brg_int", "scif_clk";
1003 dmas = <&dmac0 0x57>, <&dmac0 0x56>;
1004 dma-names = "tx", "rx";
1005 power-domains = <&sysc 32>;
1006 resets = <&cpg 204>;
1007 status = "disabled";
1008 };
1009
1010 scif4: serial@e6c40000 {
1011 compatible = "renesas,scif-r8a774a1",
1012 "renesas,rcar-gen3-scif", "renesas,scif";
1013 reg = <0 0xe6c40000 0 0x40>;
1014 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
1015 clocks = <&cpg CPG_MOD 203>,
1016 <&cpg CPG_CORE 19>,
1017 <&scif_clk>;
1018 clock-names = "fck", "brg_int", "scif_clk";
1019 dmas = <&dmac0 0x59>, <&dmac0 0x58>;
1020 dma-names = "tx", "rx";
1021 power-domains = <&sysc 32>;
1022 resets = <&cpg 203>;
1023 status = "disabled";
1024 };
1025
1026 scif5: serial@e6f30000 {
1027 compatible = "renesas,scif-r8a774a1",
1028 "renesas,rcar-gen3-scif", "renesas,scif";
1029 reg = <0 0xe6f30000 0 0x40>;
1030 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
1031 clocks = <&cpg CPG_MOD 202>,
1032 <&cpg CPG_CORE 19>,
1033 <&scif_clk>;
1034 clock-names = "fck", "brg_int", "scif_clk";
1035 dmas = <&dmac1 0x5b>, <&dmac1 0x5a>,
1036 <&dmac2 0x5b>, <&dmac2 0x5a>;
1037 dma-names = "tx", "rx", "tx", "rx";
1038 power-domains = <&sysc 32>;
1039 resets = <&cpg 202>;
1040 status = "disabled";
1041 };
1042
1043 msiof0: spi@e6e90000 {
1044 compatible = "renesas,msiof-r8a774a1",
1045 "renesas,rcar-gen3-msiof";
1046 reg = <0 0xe6e90000 0 0x0064>;
1047 interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
1048 clocks = <&cpg CPG_MOD 211>;
1049 dmas = <&dmac1 0x41>, <&dmac1 0x40>,
1050 <&dmac2 0x41>, <&dmac2 0x40>;
1051 dma-names = "tx", "rx", "tx", "rx";
1052 power-domains = <&sysc 32>;
1053 resets = <&cpg 211>;
1054 #address-cells = <1>;
1055 #size-cells = <0>;
1056 status = "disabled";
1057 };
1058
1059 msiof1: spi@e6ea0000 {
1060 compatible = "renesas,msiof-r8a774a1",
1061 "renesas,rcar-gen3-msiof";
1062 reg = <0 0xe6ea0000 0 0x0064>;
1063 interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
1064 clocks = <&cpg CPG_MOD 210>;
1065 dmas = <&dmac1 0x43>, <&dmac1 0x42>,
1066 <&dmac2 0x43>, <&dmac2 0x42>;
1067 dma-names = "tx", "rx", "tx", "rx";
1068 power-domains = <&sysc 32>;
1069 resets = <&cpg 210>;
1070 #address-cells = <1>;
1071 #size-cells = <0>;
1072 status = "disabled";
1073 };
1074
1075 msiof2: spi@e6c00000 {
1076 compatible = "renesas,msiof-r8a774a1",
1077 "renesas,rcar-gen3-msiof";
1078 reg = <0 0xe6c00000 0 0x0064>;
1079 interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
1080 clocks = <&cpg CPG_MOD 209>;
1081 dmas = <&dmac0 0x45>, <&dmac0 0x44>;
1082 dma-names = "tx", "rx";
1083 power-domains = <&sysc 32>;
1084 resets = <&cpg 209>;
1085 #address-cells = <1>;
1086 #size-cells = <0>;
1087 status = "disabled";
1088 };
1089
1090 msiof3: spi@e6c10000 {
1091 compatible = "renesas,msiof-r8a774a1",
1092 "renesas,rcar-gen3-msiof";
1093 reg = <0 0xe6c10000 0 0x0064>;
1094 interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
1095 clocks = <&cpg CPG_MOD 208>;
1096 dmas = <&dmac0 0x47>, <&dmac0 0x46>;
1097 dma-names = "tx", "rx";
1098 power-domains = <&sysc 32>;
1099 resets = <&cpg 208>;
1100 #address-cells = <1>;
1101 #size-cells = <0>;
1102 status = "disabled";
1103 };
1104
1105 rcar_sound: sound@ec500000 {
1106 /*
1107 * #sound-dai-cells is required
1108 *
1109 * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
1110 * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
1111 */
1112 /*
1113 * #clock-cells is required for audio_clkout0/1/2/3
1114 *
1115 * clkout : #clock-cells = <0>; <&rcar_sound>;
1116 * clkout0/1/2/3: #clock-cells = <1>; <&rcar_sound N>;
1117 */
1118 compatible = "renesas,rcar_sound-r8a774a1", "renesas,rcar_sound-gen3";
1119 reg = <0 0xec500000 0 0x1000>, /* SCU */
1120 <0 0xec5a0000 0 0x100>, /* ADG */
1121 <0 0xec540000 0 0x1000>, /* SSIU */
1122 <0 0xec541000 0 0x280>, /* SSI */
1123 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
1124 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
1125
1126 clocks = <&cpg CPG_MOD 1005>,
1127 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
1128 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
1129 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
1130 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
1131 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
1132 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
1133 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
1134 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
1135 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
1136 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
1137 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
1138 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
1139 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
1140 <&audio_clk_a>, <&audio_clk_b>,
1141 <&audio_clk_c>,
1142 <&cpg CPG_CORE 10>;
1143 clock-names = "ssi-all",
1144 "ssi.9", "ssi.8", "ssi.7", "ssi.6",
1145 "ssi.5", "ssi.4", "ssi.3", "ssi.2",
1146 "ssi.1", "ssi.0",
1147 "src.9", "src.8", "src.7", "src.6",
1148 "src.5", "src.4", "src.3", "src.2",
1149 "src.1", "src.0",
1150 "mix.1", "mix.0",
1151 "ctu.1", "ctu.0",
1152 "dvc.0", "dvc.1",
1153 "clk_a", "clk_b", "clk_c", "clk_i";
1154 power-domains = <&sysc 32>;
1155 resets = <&cpg 1005>,
1156 <&cpg 1006>, <&cpg 1007>,
1157 <&cpg 1008>, <&cpg 1009>,
1158 <&cpg 1010>, <&cpg 1011>,
1159 <&cpg 1012>, <&cpg 1013>,
1160 <&cpg 1014>, <&cpg 1015>;
1161 reset-names = "ssi-all",
1162 "ssi.9", "ssi.8", "ssi.7", "ssi.6",
1163 "ssi.5", "ssi.4", "ssi.3", "ssi.2",
1164 "ssi.1", "ssi.0";
1165 status = "disabled";
1166
1167 rcar_sound,dvc {
1168 dvc0: dvc-0 {
1169 dmas = <&audma1 0xbc>;
1170 dma-names = "tx";
1171 };
1172 dvc1: dvc-1 {
1173 dmas = <&audma1 0xbe>;
1174 dma-names = "tx";
1175 };
1176 };
1177
1178 rcar_sound,mix {
1179 mix0: mix-0 { };
1180 mix1: mix-1 { };
1181 };
1182
1183 rcar_sound,ctu {
1184 ctu00: ctu-0 { };
1185 ctu01: ctu-1 { };
1186 ctu02: ctu-2 { };
1187 ctu03: ctu-3 { };
1188 ctu10: ctu-4 { };
1189 ctu11: ctu-5 { };
1190 ctu12: ctu-6 { };
1191 ctu13: ctu-7 { };
1192 };
1193
1194 rcar_sound,src {
1195 src0: src-0 {
1196 interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
1197 dmas = <&audma0 0x85>, <&audma1 0x9a>;
1198 dma-names = "rx", "tx";
1199 };
1200 src1: src-1 {
1201 interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
1202 dmas = <&audma0 0x87>, <&audma1 0x9c>;
1203 dma-names = "rx", "tx";
1204 };
1205 src2: src-2 {
1206 interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
1207 dmas = <&audma0 0x89>, <&audma1 0x9e>;
1208 dma-names = "rx", "tx";
1209 };
1210 src3: src-3 {
1211 interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
1212 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
1213 dma-names = "rx", "tx";
1214 };
1215 src4: src-4 {
1216 interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
1217 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
1218 dma-names = "rx", "tx";
1219 };
1220 src5: src-5 {
1221 interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
1222 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
1223 dma-names = "rx", "tx";
1224 };
1225 src6: src-6 {
1226 interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
1227 dmas = <&audma0 0x91>, <&audma1 0xb4>;
1228 dma-names = "rx", "tx";
1229 };
1230 src7: src-7 {
1231 interrupts = <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;
1232 dmas = <&audma0 0x93>, <&audma1 0xb6>;
1233 dma-names = "rx", "tx";
1234 };
1235 src8: src-8 {
1236 interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
1237 dmas = <&audma0 0x95>, <&audma1 0xb8>;
1238 dma-names = "rx", "tx";
1239 };
1240 src9: src-9 {
1241 interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>;
1242 dmas = <&audma0 0x97>, <&audma1 0xba>;
1243 dma-names = "rx", "tx";
1244 };
1245 };
1246
1247 rcar_sound,ssi {
1248 ssi0: ssi-0 {
1249 interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
1250 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
1251 dma-names = "rx", "tx", "rxu", "txu";
1252 };
1253 ssi1: ssi-1 {
1254 interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
1255 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
1256 dma-names = "rx", "tx", "rxu", "txu";
1257 };
1258 ssi2: ssi-2 {
1259 interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
1260 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
1261 dma-names = "rx", "tx", "rxu", "txu";
1262 };
1263 ssi3: ssi-3 {
1264 interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
1265 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
1266 dma-names = "rx", "tx", "rxu", "txu";
1267 };
1268 ssi4: ssi-4 {
1269 interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
1270 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
1271 dma-names = "rx", "tx", "rxu", "txu";
1272 };
1273 ssi5: ssi-5 {
1274 interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
1275 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
1276 dma-names = "rx", "tx", "rxu", "txu";
1277 };
1278 ssi6: ssi-6 {
1279 interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
1280 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
1281 dma-names = "rx", "tx", "rxu", "txu";
1282 };
1283 ssi7: ssi-7 {
1284 interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
1285 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
1286 dma-names = "rx", "tx", "rxu", "txu";
1287 };
1288 ssi8: ssi-8 {
1289 interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
1290 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
1291 dma-names = "rx", "tx", "rxu", "txu";
1292 };
1293 ssi9: ssi-9 {
1294 interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
1295 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
1296 dma-names = "rx", "tx", "rxu", "txu";
1297 };
1298 };
1299
1300 ports {
1301 #address-cells = <1>;
1302 #size-cells = <0>;
1303 port@0 {
1304 reg = <0>;
1305 };
1306 port@1 {
1307 reg = <1>;
1308 };
1309 };
1310 };
1311
1312 audma0: dma-controller@ec700000 {
1313 compatible = "renesas,dmac-r8a774a1",
1314 "renesas,rcar-dmac";
1315 reg = <0 0xec700000 0 0x10000>;
1316 interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
1317 GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
1318 GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
1319 GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
1320 GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
1321 GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
1322 GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
1323 GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
1324 GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
1325 GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
1326 GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
1327 GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
1328 GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
1329 GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
1330 GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
1331 GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
1332 GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
1333 interrupt-names = "error",
1334 "ch0", "ch1", "ch2", "ch3",
1335 "ch4", "ch5", "ch6", "ch7",
1336 "ch8", "ch9", "ch10", "ch11",
1337 "ch12", "ch13", "ch14", "ch15";
1338 clocks = <&cpg CPG_MOD 502>;
1339 clock-names = "fck";
1340 power-domains = <&sysc 32>;
1341 resets = <&cpg 502>;
1342 #dma-cells = <1>;
1343 dma-channels = <16>;
1344 };
1345
1346 audma1: dma-controller@ec720000 {
1347 compatible = "renesas,dmac-r8a774a1",
1348 "renesas,rcar-dmac";
1349 reg = <0 0xec720000 0 0x10000>;
1350 interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
1351 GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
1352 GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
1353 GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
1354 GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
1355 GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
1356 GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
1357 GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
1358 GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
1359 GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
1360 GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
1361 GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
1362 GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
1363 GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
1364 GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
1365 GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
1366 GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
1367 interrupt-names = "error",
1368 "ch0", "ch1", "ch2", "ch3",
1369 "ch4", "ch5", "ch6", "ch7",
1370 "ch8", "ch9", "ch10", "ch11",
1371 "ch12", "ch13", "ch14", "ch15";
1372 clocks = <&cpg CPG_MOD 501>;
1373 clock-names = "fck";
1374 power-domains = <&sysc 32>;
1375 resets = <&cpg 501>;
1376 #dma-cells = <1>;
1377 dma-channels = <16>;
1378 };
1379
1380 xhci0: usb@ee000000 {
1381 compatible = "renesas,xhci-r8a774a1",
1382 "renesas,rcar-gen3-xhci";
1383 reg = <0 0xee000000 0 0xc00>;
1384 interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
1385 clocks = <&cpg CPG_MOD 328>;
1386 power-domains = <&sysc 32>;
1387 resets = <&cpg 328>;
1388 status = "disabled";
1389 };
1390
1391 usb3_peri0: usb@ee020000 {
1392 compatible = "renesas,r8a774a1-usb3-peri",
1393 "renesas,rcar-gen3-usb3-peri";
1394 reg = <0 0xee020000 0 0x400>;
1395 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
1396 clocks = <&cpg CPG_MOD 328>;
1397 power-domains = <&sysc 32>;
1398 resets = <&cpg 328>;
1399 status = "disabled";
1400 };
1401
1402 ohci0: usb@ee080000 {
1403 compatible = "generic-ohci";
1404 reg = <0 0xee080000 0 0x100>;
1405 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1406 clocks = <&cpg CPG_MOD 703>;
1407 phys = <&usb2_phy0>;
1408 phy-names = "usb";
1409 power-domains = <&sysc 32>;
1410 resets = <&cpg 703>;
1411 status = "disabled";
1412 };
1413
1414 ohci1: usb@ee0a0000 {
1415 compatible = "generic-ohci";
1416 reg = <0 0xee0a0000 0 0x100>;
1417 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
1418 clocks = <&cpg CPG_MOD 702>;
1419 phys = <&usb2_phy1>;
1420 phy-names = "usb";
1421 power-domains = <&sysc 32>;
1422 resets = <&cpg 702>;
1423 status = "disabled";
1424 };
1425
1426 ehci0: usb@ee080100 {
1427 compatible = "generic-ehci";
1428 reg = <0 0xee080100 0 0x100>;
1429 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1430 clocks = <&cpg CPG_MOD 703>;
1431 phys = <&usb2_phy0>;
1432 phy-names = "usb";
1433 companion = <&ohci0>;
1434 power-domains = <&sysc 32>;
1435 resets = <&cpg 703>;
1436 status = "disabled";
1437 };
1438
1439 ehci1: usb@ee0a0100 {
1440 compatible = "generic-ehci";
1441 reg = <0 0xee0a0100 0 0x100>;
1442 interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
1443 clocks = <&cpg CPG_MOD 702>;
1444 phys = <&usb2_phy1>;
1445 phy-names = "usb";
1446 companion = <&ohci1>;
1447 power-domains = <&sysc 32>;
1448 resets = <&cpg 702>;
1449 status = "disabled";
1450 };
1451
1452 usb2_phy0: usb-phy@ee080200 {
1453 compatible = "renesas,usb2-phy-r8a774a1",
1454 "renesas,rcar-gen3-usb2-phy";
1455 reg = <0 0xee080200 0 0x700>;
1456 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1457 clocks = <&cpg CPG_MOD 703>;
1458 power-domains = <&sysc 32>;
1459 resets = <&cpg 703>;
1460 #phy-cells = <0>;
1461 status = "disabled";
1462 };
1463
1464 usb2_phy1: usb-phy@ee0a0200 {
1465 compatible = "renesas,usb2-phy-r8a774a1",
1466 "renesas,rcar-gen3-usb2-phy";
1467 reg = <0 0xee0a0200 0 0x700>;
1468 clocks = <&cpg CPG_MOD 702>;
1469 power-domains = <&sysc 32>;
1470 resets = <&cpg 702>;
1471 #phy-cells = <0>;
1472 status = "disabled";
1473 };
1474
1475 sdhi0: sd@ee100000 {
1476 compatible = "renesas,sdhi-r8a774a1",
1477 "renesas,rcar-gen3-sdhi";
1478 reg = <0 0xee100000 0 0x2000>;
1479 interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
1480 clocks = <&cpg CPG_MOD 314>;
1481 max-frequency = <200000000>;
1482 power-domains = <&sysc 32>;
1483 resets = <&cpg 314>;
1484 status = "disabled";
1485 };
1486
1487 sdhi1: sd@ee120000 {
1488 compatible = "renesas,sdhi-r8a774a1",
1489 "renesas,rcar-gen3-sdhi";
1490 reg = <0 0xee120000 0 0x2000>;
1491 interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
1492 clocks = <&cpg CPG_MOD 313>;
1493 max-frequency = <200000000>;
1494 power-domains = <&sysc 32>;
1495 resets = <&cpg 313>;
1496 status = "disabled";
1497 };
1498
1499 sdhi2: sd@ee140000 {
1500 compatible = "renesas,sdhi-r8a774a1",
1501 "renesas,rcar-gen3-sdhi";
1502 reg = <0 0xee140000 0 0x2000>;
1503 interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
1504 clocks = <&cpg CPG_MOD 312>;
1505 max-frequency = <200000000>;
1506 power-domains = <&sysc 32>;
1507 resets = <&cpg 312>;
1508 status = "disabled";
1509 };
1510
1511 sdhi3: sd@ee160000 {
1512 compatible = "renesas,sdhi-r8a774a1",
1513 "renesas,rcar-gen3-sdhi";
1514 reg = <0 0xee160000 0 0x2000>;
1515 interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
1516 clocks = <&cpg CPG_MOD 311>;
1517 max-frequency = <200000000>;
1518 power-domains = <&sysc 32>;
1519 resets = <&cpg 311>;
1520 status = "disabled";
1521 };
1522
1523 gic: interrupt-controller@f1010000 {
1524 compatible = "arm,gic-400";
1525 #interrupt-cells = <3>;
1526 #address-cells = <0>;
1527 interrupt-controller;
1528 reg = <0x0 0xf1010000 0 0x1000>,
1529 <0x0 0xf1020000 0 0x20000>,
1530 <0x0 0xf1040000 0 0x20000>,
1531 <0x0 0xf1060000 0 0x20000>;
1532 interrupts = <GIC_PPI 9
1533 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_HIGH)>;
1534 clocks = <&cpg CPG_MOD 408>;
1535 clock-names = "clk";
1536 power-domains = <&sysc 32>;
1537 resets = <&cpg 408>;
1538 };
1539
1540 fcpf0: fcp@fe950000 {
1541 compatible = "renesas,fcpf";
1542 reg = <0 0xfe950000 0 0x200>;
1543 clocks = <&cpg CPG_MOD 615>;
1544 power-domains = <&sysc 14>;
1545 resets = <&cpg 615>;
1546 };
1547
1548 fcpvb0: fcp@fe96f000 {
1549 compatible = "renesas,fcpv";
1550 reg = <0 0xfe96f000 0 0x200>;
1551 clocks = <&cpg CPG_MOD 607>;
1552 power-domains = <&sysc 14>;
1553 resets = <&cpg 607>;
1554 };
1555
1556 fcpvd0: fcp@fea27000 {
1557 compatible = "renesas,fcpv";
1558 reg = <0 0xfea27000 0 0x200>;
1559 clocks = <&cpg CPG_MOD 603>;
1560 power-domains = <&sysc 32>;
1561 resets = <&cpg 603>;
1562 iommus = <&ipmmu_vi0 8>;
1563 };
1564
1565 fcpvd1: fcp@fea2f000 {
1566 compatible = "renesas,fcpv";
1567 reg = <0 0xfea2f000 0 0x200>;
1568 clocks = <&cpg CPG_MOD 602>;
1569 power-domains = <&sysc 32>;
1570 resets = <&cpg 602>;
1571 iommus = <&ipmmu_vi0 9>;
1572 };
1573
1574 fcpvd2: fcp@fea37000 {
1575 compatible = "renesas,fcpv";
1576 reg = <0 0xfea37000 0 0x200>;
1577 clocks = <&cpg CPG_MOD 601>;
1578 power-domains = <&sysc 32>;
1579 resets = <&cpg 601>;
1580 iommus = <&ipmmu_vi0 10>;
1581 };
1582
1583 fcpvi0: fcp@fe9af000 {
1584 compatible = "renesas,fcpv";
1585 reg = <0 0xfe9af000 0 0x200>;
1586 clocks = <&cpg CPG_MOD 611>;
1587 power-domains = <&sysc 14>;
1588 resets = <&cpg 611>;
1589 iommus = <&ipmmu_vc0 19>;
1590 };
1591
1592 prr: chipid@fff00044 {
1593 compatible = "renesas,prr";
1594 reg = <0 0xfff00044 0 4>;
1595 };
1596 };
1597
1598 thermal-zones {
1599 sensor_thermal1: sensor-thermal1 {
1600 polling-delay-passive = <250>;
1601 polling-delay = <1000>;
1602 thermal-sensors = <&tsc 0>;
1603
1604 trips {
1605 sensor1_crit: sensor1-crit {
1606 temperature = <120000>;
1607 hysteresis = <1000>;
1608 type = "critical";
1609 };
1610 };
1611 };
1612
1613 sensor_thermal2: sensor-thermal2 {
1614 polling-delay-passive = <250>;
1615 polling-delay = <1000>;
1616 thermal-sensors = <&tsc 1>;
1617
1618 trips {
1619 sensor2_crit: sensor2-crit {
1620 temperature = <120000>;
1621 hysteresis = <1000>;
1622 type = "critical";
1623 };
1624 };
1625
1626 };
1627
1628 sensor_thermal3: sensor-thermal3 {
1629 polling-delay-passive = <250>;
1630 polling-delay = <1000>;
1631 thermal-sensors = <&tsc 2>;
1632
1633 trips {
1634 sensor3_crit: sensor3-crit {
1635 temperature = <120000>;
1636 hysteresis = <1000>;
1637 type = "critical";
1638 };
1639 };
1640 };
1641 };
1642
1643 timer {
1644 compatible = "arm,armv8-timer";
1645 interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
1646 <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
1647 <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
1648 <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>;
1649 };
1650
1651 /* External USB clocks - can be overridden by the board */
1652 usb3s0_clk: usb3s0 {
1653 compatible = "fixed-clock";
1654 #clock-cells = <0>;
1655 clock-frequency = <0>;
1656 };
1657
1658 usb_extal_clk: usb_extal {
1659 compatible = "fixed-clock";
1660 #clock-cells = <0>;
1661 clock-frequency = <0>;
1662 };
1663};
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
index 6b5fa91f1d5d..0895503b69d0 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
@@ -40,12 +40,11 @@
40 <&cpg CPG_MOD 723>, 40 <&cpg CPG_MOD 723>,
41 <&cpg CPG_MOD 722>, 41 <&cpg CPG_MOD 722>,
42 <&cpg CPG_MOD 721>, 42 <&cpg CPG_MOD 721>,
43 <&cpg CPG_MOD 727>,
44 <&versaclock5 1>, 43 <&versaclock5 1>,
45 <&x21_clk>, 44 <&x21_clk>,
46 <&x22_clk>, 45 <&x22_clk>,
47 <&versaclock5 2>; 46 <&versaclock5 2>;
48 clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0", 47 clock-names = "du.0", "du.1", "du.2", "du.3",
49 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; 48 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
50}; 49};
51 50
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
index 7b2fbaec9aef..0fb84c219b2f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7795 ES1.x SoC 3 * Device Tree Source for the R-Car H3 (R8A77950) ES1.x SoC
4 * 4 *
5 * Copyright (C) 2015 Renesas Electronics Corp. 5 * Copyright (C) 2015 Renesas Electronics Corp.
6 */ 6 */
@@ -232,7 +232,7 @@
232 port@1 { 232 port@1 {
233 vin0csi21: endpoint@1 { 233 vin0csi21: endpoint@1 {
234 reg = <1>; 234 reg = <1>;
235 remote-endpoint= <&csi21vin0>; 235 remote-endpoint = <&csi21vin0>;
236 }; 236 };
237 }; 237 };
238 }; 238 };
@@ -243,7 +243,7 @@
243 port@1 { 243 port@1 {
244 vin1csi21: endpoint@1 { 244 vin1csi21: endpoint@1 {
245 reg = <1>; 245 reg = <1>;
246 remote-endpoint= <&csi21vin1>; 246 remote-endpoint = <&csi21vin1>;
247 }; 247 };
248 }; 248 };
249 }; 249 };
@@ -254,7 +254,7 @@
254 port@1 { 254 port@1 {
255 vin2csi21: endpoint@1 { 255 vin2csi21: endpoint@1 {
256 reg = <1>; 256 reg = <1>;
257 remote-endpoint= <&csi21vin2>; 257 remote-endpoint = <&csi21vin2>;
258 }; 258 };
259 }; 259 };
260 }; 260 };
@@ -265,7 +265,7 @@
265 port@1 { 265 port@1 {
266 vin3csi21: endpoint@1 { 266 vin3csi21: endpoint@1 {
267 reg = <1>; 267 reg = <1>;
268 remote-endpoint= <&csi21vin3>; 268 remote-endpoint = <&csi21vin3>;
269 }; 269 };
270 }; 270 };
271 }; 271 };
@@ -276,7 +276,7 @@
276 port@1 { 276 port@1 {
277 vin4csi21: endpoint@1 { 277 vin4csi21: endpoint@1 {
278 reg = <1>; 278 reg = <1>;
279 remote-endpoint= <&csi21vin4>; 279 remote-endpoint = <&csi21vin4>;
280 }; 280 };
281 }; 281 };
282 }; 282 };
@@ -287,7 +287,7 @@
287 port@1 { 287 port@1 {
288 vin5csi21: endpoint@1 { 288 vin5csi21: endpoint@1 {
289 reg = <1>; 289 reg = <1>;
290 remote-endpoint= <&csi21vin5>; 290 remote-endpoint = <&csi21vin5>;
291 }; 291 };
292 }; 292 };
293 }; 293 };
@@ -298,7 +298,7 @@
298 port@1 { 298 port@1 {
299 vin6csi21: endpoint@1 { 299 vin6csi21: endpoint@1 {
300 reg = <1>; 300 reg = <1>;
301 remote-endpoint= <&csi21vin6>; 301 remote-endpoint = <&csi21vin6>;
302 }; 302 };
303 }; 303 };
304 }; 304 };
@@ -309,7 +309,7 @@
309 port@1 { 309 port@1 {
310 vin7csi21: endpoint@1 { 310 vin7csi21: endpoint@1 {
311 reg = <1>; 311 reg = <1>;
312 remote-endpoint= <&csi21vin7>; 312 remote-endpoint = <&csi21vin7>;
313 }; 313 };
314 }; 314 };
315 }; 315 };
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
index df50bf46406e..54515eaf0310 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
@@ -41,11 +41,10 @@
41 <&cpg CPG_MOD 723>, 41 <&cpg CPG_MOD 723>,
42 <&cpg CPG_MOD 722>, 42 <&cpg CPG_MOD 722>,
43 <&cpg CPG_MOD 721>, 43 <&cpg CPG_MOD 721>,
44 <&cpg CPG_MOD 727>,
45 <&versaclock5 1>, 44 <&versaclock5 1>,
46 <&versaclock5 3>, 45 <&versaclock5 3>,
47 <&versaclock5 4>, 46 <&versaclock5 4>,
48 <&versaclock5 2>; 47 <&versaclock5 2>;
49 clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0", 48 clock-names = "du.0", "du.1", "du.2", "du.3",
50 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; 49 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
51}; 50};
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 446822f5751c..1620e8d8dacc 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -40,12 +40,11 @@
40 <&cpg CPG_MOD 723>, 40 <&cpg CPG_MOD 723>,
41 <&cpg CPG_MOD 722>, 41 <&cpg CPG_MOD 722>,
42 <&cpg CPG_MOD 721>, 42 <&cpg CPG_MOD 721>,
43 <&cpg CPG_MOD 727>,
44 <&versaclock5 1>, 43 <&versaclock5 1>,
45 <&x21_clk>, 44 <&x21_clk>,
46 <&x22_clk>, 45 <&x22_clk>,
47 <&versaclock5 2>; 46 <&versaclock5 2>;
48 clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0", 47 clock-names = "du.0", "du.1", "du.2", "du.3",
49 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; 48 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
50}; 49};
51 50
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
index 8ded64d0a4d5..cf08a119eec0 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
@@ -40,12 +40,11 @@
40 <&cpg CPG_MOD 723>, 40 <&cpg CPG_MOD 723>,
41 <&cpg CPG_MOD 722>, 41 <&cpg CPG_MOD 722>,
42 <&cpg CPG_MOD 721>, 42 <&cpg CPG_MOD 721>,
43 <&cpg CPG_MOD 727>,
44 <&versaclock6 1>, 43 <&versaclock6 1>,
45 <&x21_clk>, 44 <&x21_clk>,
46 <&x22_clk>, 45 <&x22_clk>,
47 <&versaclock6 2>; 46 <&versaclock6 2>;
48 clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0", 47 clock-names = "du.0", "du.1", "du.2", "du.3",
49 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; 48 "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
50}; 49};
51 50
@@ -152,6 +151,15 @@
152 }; 151 };
153}; 152};
154 153
154&pca9654 {
155 pcie_sata_switch {
156 gpio-hog;
157 gpios = <7 GPIO_ACTIVE_HIGH>;
158 output-low; /* enable SATA by default */
159 line-name = "PCIE/SATA switch";
160 };
161};
162
155&pfc { 163&pfc {
156 usb2_pins: usb2 { 164 usb2_pins: usb2 {
157 groups = "usb2"; 165 groups = "usb2";
@@ -176,6 +184,11 @@
176 }; 184 };
177}; 185};
178 186
187/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
188&sata {
189 status = "okay";
190};
191
179&usb2_phy2 { 192&usb2_phy2 {
180 pinctrl-0 = <&usb2_pins>; 193 pinctrl-0 = <&usb2_pins>;
181 pinctrl-names = "default"; 194 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index fb9d08ad7659..b5f2273caca4 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7795 SoC 3 * Device Tree Source for the R-Car H3 (R8A77950) SoC
4 * 4 *
5 * Copyright (C) 2015 Renesas Electronics Corp. 5 * Copyright (C) 2015 Renesas Electronics Corp.
6 */ 6 */
@@ -123,7 +123,7 @@
123 power-domains = <&sysc R8A7795_PD_CA57_CPU0>; 123 power-domains = <&sysc R8A7795_PD_CA57_CPU0>;
124 next-level-cache = <&L2_CA57>; 124 next-level-cache = <&L2_CA57>;
125 enable-method = "psci"; 125 enable-method = "psci";
126 clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; 126 clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
127 operating-points-v2 = <&cluster0_opp>; 127 operating-points-v2 = <&cluster0_opp>;
128 #cooling-cells = <2>; 128 #cooling-cells = <2>;
129 }; 129 };
@@ -135,7 +135,7 @@
135 power-domains = <&sysc R8A7795_PD_CA57_CPU1>; 135 power-domains = <&sysc R8A7795_PD_CA57_CPU1>;
136 next-level-cache = <&L2_CA57>; 136 next-level-cache = <&L2_CA57>;
137 enable-method = "psci"; 137 enable-method = "psci";
138 clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; 138 clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
139 operating-points-v2 = <&cluster0_opp>; 139 operating-points-v2 = <&cluster0_opp>;
140 #cooling-cells = <2>; 140 #cooling-cells = <2>;
141 }; 141 };
@@ -147,7 +147,7 @@
147 power-domains = <&sysc R8A7795_PD_CA57_CPU2>; 147 power-domains = <&sysc R8A7795_PD_CA57_CPU2>;
148 next-level-cache = <&L2_CA57>; 148 next-level-cache = <&L2_CA57>;
149 enable-method = "psci"; 149 enable-method = "psci";
150 clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; 150 clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
151 operating-points-v2 = <&cluster0_opp>; 151 operating-points-v2 = <&cluster0_opp>;
152 #cooling-cells = <2>; 152 #cooling-cells = <2>;
153 }; 153 };
@@ -159,7 +159,7 @@
159 power-domains = <&sysc R8A7795_PD_CA57_CPU3>; 159 power-domains = <&sysc R8A7795_PD_CA57_CPU3>;
160 next-level-cache = <&L2_CA57>; 160 next-level-cache = <&L2_CA57>;
161 enable-method = "psci"; 161 enable-method = "psci";
162 clocks =<&cpg CPG_CORE R8A7795_CLK_Z>; 162 clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
163 operating-points-v2 = <&cluster0_opp>; 163 operating-points-v2 = <&cluster0_opp>;
164 #cooling-cells = <2>; 164 #cooling-cells = <2>;
165 }; 165 };
@@ -171,7 +171,7 @@
171 power-domains = <&sysc R8A7795_PD_CA53_CPU0>; 171 power-domains = <&sysc R8A7795_PD_CA53_CPU0>;
172 next-level-cache = <&L2_CA53>; 172 next-level-cache = <&L2_CA53>;
173 enable-method = "psci"; 173 enable-method = "psci";
174 clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; 174 clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
175 operating-points-v2 = <&cluster1_opp>; 175 operating-points-v2 = <&cluster1_opp>;
176 }; 176 };
177 177
@@ -182,7 +182,7 @@
182 power-domains = <&sysc R8A7795_PD_CA53_CPU1>; 182 power-domains = <&sysc R8A7795_PD_CA53_CPU1>;
183 next-level-cache = <&L2_CA53>; 183 next-level-cache = <&L2_CA53>;
184 enable-method = "psci"; 184 enable-method = "psci";
185 clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; 185 clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
186 operating-points-v2 = <&cluster1_opp>; 186 operating-points-v2 = <&cluster1_opp>;
187 }; 187 };
188 188
@@ -193,7 +193,7 @@
193 power-domains = <&sysc R8A7795_PD_CA53_CPU2>; 193 power-domains = <&sysc R8A7795_PD_CA53_CPU2>;
194 next-level-cache = <&L2_CA53>; 194 next-level-cache = <&L2_CA53>;
195 enable-method = "psci"; 195 enable-method = "psci";
196 clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; 196 clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
197 operating-points-v2 = <&cluster1_opp>; 197 operating-points-v2 = <&cluster1_opp>;
198 }; 198 };
199 199
@@ -204,7 +204,7 @@
204 power-domains = <&sysc R8A7795_PD_CA53_CPU3>; 204 power-domains = <&sysc R8A7795_PD_CA53_CPU3>;
205 next-level-cache = <&L2_CA53>; 205 next-level-cache = <&L2_CA53>;
206 enable-method = "psci"; 206 enable-method = "psci";
207 clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>; 207 clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
208 operating-points-v2 = <&cluster1_opp>; 208 operating-points-v2 = <&cluster1_opp>;
209 }; 209 };
210 210
@@ -455,7 +455,6 @@
455 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 455 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
456 resets = <&cpg 522>; 456 resets = <&cpg 522>;
457 #thermal-sensor-cells = <1>; 457 #thermal-sensor-cells = <1>;
458 status = "okay";
459 }; 458 };
460 459
461 intc_ex: interrupt-controller@e61c0000 { 460 intc_ex: interrupt-controller@e61c0000 {
@@ -525,15 +524,6 @@
525 status = "disabled"; 524 status = "disabled";
526 }; 525 };
527 526
528 arm_cc630p: crypto@e6601000 {
529 compatible = "arm,cryptocell-630p-ree";
530 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
531 reg = <0x0 0xe6601000 0 0x1000>;
532 clocks = <&cpg CPG_MOD 229>;
533 resets = <&cpg 229>;
534 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
535 };
536
537 i2c3: i2c@e66d0000 { 527 i2c3: i2c@e66d0000 {
538 #address-cells = <1>; 528 #address-cells = <1>;
539 #size-cells = <0>; 529 #size-cells = <0>;
@@ -707,7 +697,7 @@
707 "renesas,rcar-gen3-usbhs"; 697 "renesas,rcar-gen3-usbhs";
708 reg = <0 0xe6590000 0 0x100>; 698 reg = <0 0xe6590000 0 0x100>;
709 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 699 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
710 clocks = <&cpg CPG_MOD 704>; 700 clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
711 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, 701 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
712 <&usb_dmac1 0>, <&usb_dmac1 1>; 702 <&usb_dmac1 0>, <&usb_dmac1 1>;
713 dma-names = "ch0", "ch1", "ch2", "ch3"; 703 dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -715,7 +705,7 @@
715 phys = <&usb2_phy0>; 705 phys = <&usb2_phy0>;
716 phy-names = "usb"; 706 phy-names = "usb";
717 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 707 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
718 resets = <&cpg 704>; 708 resets = <&cpg 704>, <&cpg 703>;
719 status = "disabled"; 709 status = "disabled";
720 }; 710 };
721 711
@@ -724,7 +714,7 @@
724 "renesas,rcar-gen3-usbhs"; 714 "renesas,rcar-gen3-usbhs";
725 reg = <0 0xe659c000 0 0x100>; 715 reg = <0 0xe659c000 0 0x100>;
726 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 716 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
727 clocks = <&cpg CPG_MOD 705>; 717 clocks = <&cpg CPG_MOD 705>, <&cpg CPG_MOD 700>;
728 dmas = <&usb_dmac2 0>, <&usb_dmac2 1>, 718 dmas = <&usb_dmac2 0>, <&usb_dmac2 1>,
729 <&usb_dmac3 0>, <&usb_dmac3 1>; 719 <&usb_dmac3 0>, <&usb_dmac3 1>;
730 dma-names = "ch0", "ch1", "ch2", "ch3"; 720 dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -732,7 +722,7 @@
732 phys = <&usb2_phy3>; 722 phys = <&usb2_phy3>;
733 phy-names = "usb"; 723 phy-names = "usb";
734 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 724 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
735 resets = <&cpg 705>; 725 resets = <&cpg 705>, <&cpg 700>;
736 status = "disabled"; 726 status = "disabled";
737 }; 727 };
738 728
@@ -805,6 +795,15 @@
805 status = "disabled"; 795 status = "disabled";
806 }; 796 };
807 797
798 arm_cc630p: crypto@e6601000 {
799 compatible = "arm,cryptocell-630p-ree";
800 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
801 reg = <0x0 0xe6601000 0 0x1000>;
802 clocks = <&cpg CPG_MOD 229>;
803 resets = <&cpg 229>;
804 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
805 };
806
808 dmac0: dma-controller@e6700000 { 807 dmac0: dma-controller@e6700000 {
809 compatible = "renesas,dmac-r8a7795", 808 compatible = "renesas,dmac-r8a7795",
810 "renesas,rcar-dmac"; 809 "renesas,rcar-dmac";
@@ -1425,11 +1424,11 @@
1425 1424
1426 vin0csi20: endpoint@0 { 1425 vin0csi20: endpoint@0 {
1427 reg = <0>; 1426 reg = <0>;
1428 remote-endpoint= <&csi20vin0>; 1427 remote-endpoint = <&csi20vin0>;
1429 }; 1428 };
1430 vin0csi40: endpoint@2 { 1429 vin0csi40: endpoint@2 {
1431 reg = <2>; 1430 reg = <2>;
1432 remote-endpoint= <&csi40vin0>; 1431 remote-endpoint = <&csi40vin0>;
1433 }; 1432 };
1434 }; 1433 };
1435 }; 1434 };
@@ -1457,11 +1456,11 @@
1457 1456
1458 vin1csi20: endpoint@0 { 1457 vin1csi20: endpoint@0 {
1459 reg = <0>; 1458 reg = <0>;
1460 remote-endpoint= <&csi20vin1>; 1459 remote-endpoint = <&csi20vin1>;
1461 }; 1460 };
1462 vin1csi40: endpoint@2 { 1461 vin1csi40: endpoint@2 {
1463 reg = <2>; 1462 reg = <2>;
1464 remote-endpoint= <&csi40vin1>; 1463 remote-endpoint = <&csi40vin1>;
1465 }; 1464 };
1466 }; 1465 };
1467 }; 1466 };
@@ -1489,11 +1488,11 @@
1489 1488
1490 vin2csi20: endpoint@0 { 1489 vin2csi20: endpoint@0 {
1491 reg = <0>; 1490 reg = <0>;
1492 remote-endpoint= <&csi20vin2>; 1491 remote-endpoint = <&csi20vin2>;
1493 }; 1492 };
1494 vin2csi40: endpoint@2 { 1493 vin2csi40: endpoint@2 {
1495 reg = <2>; 1494 reg = <2>;
1496 remote-endpoint= <&csi40vin2>; 1495 remote-endpoint = <&csi40vin2>;
1497 }; 1496 };
1498 }; 1497 };
1499 }; 1498 };
@@ -1521,11 +1520,11 @@
1521 1520
1522 vin3csi20: endpoint@0 { 1521 vin3csi20: endpoint@0 {
1523 reg = <0>; 1522 reg = <0>;
1524 remote-endpoint= <&csi20vin3>; 1523 remote-endpoint = <&csi20vin3>;
1525 }; 1524 };
1526 vin3csi40: endpoint@2 { 1525 vin3csi40: endpoint@2 {
1527 reg = <2>; 1526 reg = <2>;
1528 remote-endpoint= <&csi40vin3>; 1527 remote-endpoint = <&csi40vin3>;
1529 }; 1528 };
1530 }; 1529 };
1531 }; 1530 };
@@ -1553,11 +1552,11 @@
1553 1552
1554 vin4csi20: endpoint@0 { 1553 vin4csi20: endpoint@0 {
1555 reg = <0>; 1554 reg = <0>;
1556 remote-endpoint= <&csi20vin4>; 1555 remote-endpoint = <&csi20vin4>;
1557 }; 1556 };
1558 vin4csi41: endpoint@3 { 1557 vin4csi41: endpoint@3 {
1559 reg = <3>; 1558 reg = <3>;
1560 remote-endpoint= <&csi41vin4>; 1559 remote-endpoint = <&csi41vin4>;
1561 }; 1560 };
1562 }; 1561 };
1563 }; 1562 };
@@ -1585,11 +1584,11 @@
1585 1584
1586 vin5csi20: endpoint@0 { 1585 vin5csi20: endpoint@0 {
1587 reg = <0>; 1586 reg = <0>;
1588 remote-endpoint= <&csi20vin5>; 1587 remote-endpoint = <&csi20vin5>;
1589 }; 1588 };
1590 vin5csi41: endpoint@3 { 1589 vin5csi41: endpoint@3 {
1591 reg = <3>; 1590 reg = <3>;
1592 remote-endpoint= <&csi41vin5>; 1591 remote-endpoint = <&csi41vin5>;
1593 }; 1592 };
1594 }; 1593 };
1595 }; 1594 };
@@ -1617,11 +1616,11 @@
1617 1616
1618 vin6csi20: endpoint@0 { 1617 vin6csi20: endpoint@0 {
1619 reg = <0>; 1618 reg = <0>;
1620 remote-endpoint= <&csi20vin6>; 1619 remote-endpoint = <&csi20vin6>;
1621 }; 1620 };
1622 vin6csi41: endpoint@3 { 1621 vin6csi41: endpoint@3 {
1623 reg = <3>; 1622 reg = <3>;
1624 remote-endpoint= <&csi41vin6>; 1623 remote-endpoint = <&csi41vin6>;
1625 }; 1624 };
1626 }; 1625 };
1627 }; 1626 };
@@ -1649,11 +1648,11 @@
1649 1648
1650 vin7csi20: endpoint@0 { 1649 vin7csi20: endpoint@0 {
1651 reg = <0>; 1650 reg = <0>;
1652 remote-endpoint= <&csi20vin7>; 1651 remote-endpoint = <&csi20vin7>;
1653 }; 1652 };
1654 vin7csi41: endpoint@3 { 1653 vin7csi41: endpoint@3 {
1655 reg = <3>; 1654 reg = <3>;
1656 remote-endpoint= <&csi41vin7>; 1655 remote-endpoint = <&csi41vin7>;
1657 }; 1656 };
1658 }; 1657 };
1659 }; 1658 };
@@ -2098,11 +2097,11 @@
2098 compatible = "generic-ohci"; 2097 compatible = "generic-ohci";
2099 reg = <0 0xee080000 0 0x100>; 2098 reg = <0 0xee080000 0 0x100>;
2100 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 2099 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
2101 clocks = <&cpg CPG_MOD 703>; 2100 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
2102 phys = <&usb2_phy0>; 2101 phys = <&usb2_phy0>;
2103 phy-names = "usb"; 2102 phy-names = "usb";
2104 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2103 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2105 resets = <&cpg 703>; 2104 resets = <&cpg 703>, <&cpg 704>;
2106 status = "disabled"; 2105 status = "disabled";
2107 }; 2106 };
2108 2107
@@ -2134,11 +2133,11 @@
2134 compatible = "generic-ohci"; 2133 compatible = "generic-ohci";
2135 reg = <0 0xee0e0000 0 0x100>; 2134 reg = <0 0xee0e0000 0 0x100>;
2136 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 2135 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
2137 clocks = <&cpg CPG_MOD 700>; 2136 clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
2138 phys = <&usb2_phy3>; 2137 phys = <&usb2_phy3>;
2139 phy-names = "usb"; 2138 phy-names = "usb";
2140 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2139 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2141 resets = <&cpg 700>; 2140 resets = <&cpg 700>, <&cpg 705>;
2142 status = "disabled"; 2141 status = "disabled";
2143 }; 2142 };
2144 2143
@@ -2146,12 +2145,12 @@
2146 compatible = "generic-ehci"; 2145 compatible = "generic-ehci";
2147 reg = <0 0xee080100 0 0x100>; 2146 reg = <0 0xee080100 0 0x100>;
2148 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 2147 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
2149 clocks = <&cpg CPG_MOD 703>; 2148 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
2150 phys = <&usb2_phy0>; 2149 phys = <&usb2_phy0>;
2151 phy-names = "usb"; 2150 phy-names = "usb";
2152 companion = <&ohci0>; 2151 companion = <&ohci0>;
2153 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2152 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2154 resets = <&cpg 703>; 2153 resets = <&cpg 703>, <&cpg 704>;
2155 status = "disabled"; 2154 status = "disabled";
2156 }; 2155 };
2157 2156
@@ -2185,12 +2184,12 @@
2185 compatible = "generic-ehci"; 2184 compatible = "generic-ehci";
2186 reg = <0 0xee0e0100 0 0x100>; 2185 reg = <0 0xee0e0100 0 0x100>;
2187 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 2186 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
2188 clocks = <&cpg CPG_MOD 700>; 2187 clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
2189 phys = <&usb2_phy3>; 2188 phys = <&usb2_phy3>;
2190 phy-names = "usb"; 2189 phy-names = "usb";
2191 companion = <&ohci3>; 2190 companion = <&ohci3>;
2192 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2191 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2193 resets = <&cpg 700>; 2192 resets = <&cpg 700>, <&cpg 705>;
2194 status = "disabled"; 2193 status = "disabled";
2195 }; 2194 };
2196 2195
@@ -2199,9 +2198,9 @@
2199 "renesas,rcar-gen3-usb2-phy"; 2198 "renesas,rcar-gen3-usb2-phy";
2200 reg = <0 0xee080200 0 0x700>; 2199 reg = <0 0xee080200 0 0x700>;
2201 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 2200 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
2202 clocks = <&cpg CPG_MOD 703>; 2201 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
2203 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2202 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2204 resets = <&cpg 703>; 2203 resets = <&cpg 703>, <&cpg 704>;
2205 #phy-cells = <0>; 2204 #phy-cells = <0>;
2206 status = "disabled"; 2205 status = "disabled";
2207 }; 2206 };
@@ -2233,9 +2232,9 @@
2233 "renesas,rcar-gen3-usb2-phy"; 2232 "renesas,rcar-gen3-usb2-phy";
2234 reg = <0 0xee0e0200 0 0x700>; 2233 reg = <0 0xee0e0200 0 0x700>;
2235 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 2234 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
2236 clocks = <&cpg CPG_MOD 700>; 2235 clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
2237 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>; 2236 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2238 resets = <&cpg 700>; 2237 resets = <&cpg 700>, <&cpg 705>;
2239 #phy-cells = <0>; 2238 #phy-cells = <0>;
2240 status = "disabled"; 2239 status = "disabled";
2241 }; 2240 };
@@ -2782,9 +2781,7 @@
2782 2781
2783 du: display@feb00000 { 2782 du: display@feb00000 {
2784 compatible = "renesas,du-r8a7795"; 2783 compatible = "renesas,du-r8a7795";
2785 reg = <0 0xfeb00000 0 0x80000>, 2784 reg = <0 0xfeb00000 0 0x80000>;
2786 <0 0xfeb90000 0 0x14>;
2787 reg-names = "du", "lvds.0";
2788 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, 2785 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
2789 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>, 2786 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
2790 <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>, 2787 <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>,
@@ -2792,9 +2789,8 @@
2792 clocks = <&cpg CPG_MOD 724>, 2789 clocks = <&cpg CPG_MOD 724>,
2793 <&cpg CPG_MOD 723>, 2790 <&cpg CPG_MOD 723>,
2794 <&cpg CPG_MOD 722>, 2791 <&cpg CPG_MOD 722>,
2795 <&cpg CPG_MOD 721>, 2792 <&cpg CPG_MOD 721>;
2796 <&cpg CPG_MOD 727>; 2793 clock-names = "du.0", "du.1", "du.2", "du.3";
2797 clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0";
2798 vsps = <&vspd0 0 &vspd1 0 &vspd2 0 &vspd0 1>; 2794 vsps = <&vspd0 0 &vspd1 0 &vspd2 0 &vspd0 1>;
2799 status = "disabled"; 2795 status = "disabled";
2800 2796
@@ -2822,6 +2818,33 @@
2822 port@3 { 2818 port@3 {
2823 reg = <3>; 2819 reg = <3>;
2824 du_out_lvds0: endpoint { 2820 du_out_lvds0: endpoint {
2821 remote-endpoint = <&lvds0_in>;
2822 };
2823 };
2824 };
2825 };
2826
2827 lvds0: lvds@feb90000 {
2828 compatible = "renesas,r8a7795-lvds";
2829 reg = <0 0xfeb90000 0 0x14>;
2830 clocks = <&cpg CPG_MOD 727>;
2831 power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
2832 resets = <&cpg 727>;
2833 status = "disabled";
2834
2835 ports {
2836 #address-cells = <1>;
2837 #size-cells = <0>;
2838
2839 port@0 {
2840 reg = <0>;
2841 lvds0_in: endpoint {
2842 remote-endpoint = <&du_out_lvds0>;
2843 };
2844 };
2845 port@1 {
2846 reg = <1>;
2847 lvds0_out: endpoint {
2825 }; 2848 };
2826 }; 2849 };
2827 }; 2850 };
diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
index cbd8acbf537e..9e4594c27fa6 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
@@ -30,10 +30,9 @@
30 clocks = <&cpg CPG_MOD 724>, 30 clocks = <&cpg CPG_MOD 724>,
31 <&cpg CPG_MOD 723>, 31 <&cpg CPG_MOD 723>,
32 <&cpg CPG_MOD 722>, 32 <&cpg CPG_MOD 722>,
33 <&cpg CPG_MOD 727>,
34 <&versaclock5 1>, 33 <&versaclock5 1>,
35 <&versaclock5 3>, 34 <&versaclock5 3>,
36 <&versaclock5 2>; 35 <&versaclock5 2>;
37 clock-names = "du.0", "du.1", "du.2", "lvds.0", 36 clock-names = "du.0", "du.1", "du.2",
38 "dclkin.0", "dclkin.1", "dclkin.2"; 37 "dclkin.0", "dclkin.1", "dclkin.2";
39}; 38};
diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
index 052d72acc862..b4f9567cb9f8 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
@@ -29,11 +29,10 @@
29 clocks = <&cpg CPG_MOD 724>, 29 clocks = <&cpg CPG_MOD 724>,
30 <&cpg CPG_MOD 723>, 30 <&cpg CPG_MOD 723>,
31 <&cpg CPG_MOD 722>, 31 <&cpg CPG_MOD 722>,
32 <&cpg CPG_MOD 727>,
33 <&versaclock5 1>, 32 <&versaclock5 1>,
34 <&x21_clk>, 33 <&x21_clk>,
35 <&versaclock5 2>; 34 <&versaclock5 2>;
36 clock-names = "du.0", "du.1", "du.2", "lvds.0", 35 clock-names = "du.0", "du.1", "du.2",
37 "dclkin.0", "dclkin.1", "dclkin.2"; 36 "dclkin.0", "dclkin.1", "dclkin.2";
38}; 37};
39 38
diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index cbd35c00b4af..1ec6aaa520c1 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a7796 SoC 3 * Device Tree Source for the R-Car M3-W (R8A77960) SoC
4 * 4 *
5 * Copyright (C) 2016-2017 Renesas Electronics Corp. 5 * Copyright (C) 2016-2017 Renesas Electronics Corp.
6 */ 6 */
@@ -134,7 +134,7 @@
134 power-domains = <&sysc R8A7796_PD_CA57_CPU0>; 134 power-domains = <&sysc R8A7796_PD_CA57_CPU0>;
135 next-level-cache = <&L2_CA57>; 135 next-level-cache = <&L2_CA57>;
136 enable-method = "psci"; 136 enable-method = "psci";
137 clocks =<&cpg CPG_CORE R8A7796_CLK_Z>; 137 clocks = <&cpg CPG_CORE R8A7796_CLK_Z>;
138 operating-points-v2 = <&cluster0_opp>; 138 operating-points-v2 = <&cluster0_opp>;
139 #cooling-cells = <2>; 139 #cooling-cells = <2>;
140 }; 140 };
@@ -146,7 +146,7 @@
146 power-domains = <&sysc R8A7796_PD_CA57_CPU1>; 146 power-domains = <&sysc R8A7796_PD_CA57_CPU1>;
147 next-level-cache = <&L2_CA57>; 147 next-level-cache = <&L2_CA57>;
148 enable-method = "psci"; 148 enable-method = "psci";
149 clocks =<&cpg CPG_CORE R8A7796_CLK_Z>; 149 clocks = <&cpg CPG_CORE R8A7796_CLK_Z>;
150 operating-points-v2 = <&cluster0_opp>; 150 operating-points-v2 = <&cluster0_opp>;
151 #cooling-cells = <2>; 151 #cooling-cells = <2>;
152 }; 152 };
@@ -158,7 +158,7 @@
158 power-domains = <&sysc R8A7796_PD_CA53_CPU0>; 158 power-domains = <&sysc R8A7796_PD_CA53_CPU0>;
159 next-level-cache = <&L2_CA53>; 159 next-level-cache = <&L2_CA53>;
160 enable-method = "psci"; 160 enable-method = "psci";
161 clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; 161 clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
162 operating-points-v2 = <&cluster1_opp>; 162 operating-points-v2 = <&cluster1_opp>;
163 }; 163 };
164 164
@@ -169,7 +169,7 @@
169 power-domains = <&sysc R8A7796_PD_CA53_CPU1>; 169 power-domains = <&sysc R8A7796_PD_CA53_CPU1>;
170 next-level-cache = <&L2_CA53>; 170 next-level-cache = <&L2_CA53>;
171 enable-method = "psci"; 171 enable-method = "psci";
172 clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; 172 clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
173 operating-points-v2 = <&cluster1_opp>; 173 operating-points-v2 = <&cluster1_opp>;
174 }; 174 };
175 175
@@ -180,7 +180,7 @@
180 power-domains = <&sysc R8A7796_PD_CA53_CPU2>; 180 power-domains = <&sysc R8A7796_PD_CA53_CPU2>;
181 next-level-cache = <&L2_CA53>; 181 next-level-cache = <&L2_CA53>;
182 enable-method = "psci"; 182 enable-method = "psci";
183 clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; 183 clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
184 operating-points-v2 = <&cluster1_opp>; 184 operating-points-v2 = <&cluster1_opp>;
185 }; 185 };
186 186
@@ -191,7 +191,7 @@
191 power-domains = <&sysc R8A7796_PD_CA53_CPU3>; 191 power-domains = <&sysc R8A7796_PD_CA53_CPU3>;
192 next-level-cache = <&L2_CA53>; 192 next-level-cache = <&L2_CA53>;
193 enable-method = "psci"; 193 enable-method = "psci";
194 clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>; 194 clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
195 operating-points-v2 = <&cluster1_opp>; 195 operating-points-v2 = <&cluster1_opp>;
196 }; 196 };
197 197
@@ -434,7 +434,6 @@
434 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 434 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
435 resets = <&cpg 522>; 435 resets = <&cpg 522>;
436 #thermal-sensor-cells = <1>; 436 #thermal-sensor-cells = <1>;
437 status = "okay";
438 }; 437 };
439 438
440 intc_ex: interrupt-controller@e61c0000 { 439 intc_ex: interrupt-controller@e61c0000 {
@@ -677,7 +676,7 @@
677 "renesas,rcar-gen3-usbhs"; 676 "renesas,rcar-gen3-usbhs";
678 reg = <0 0xe6590000 0 0x100>; 677 reg = <0 0xe6590000 0 0x100>;
679 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 678 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
680 clocks = <&cpg CPG_MOD 704>; 679 clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
681 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, 680 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
682 <&usb_dmac1 0>, <&usb_dmac1 1>; 681 <&usb_dmac1 0>, <&usb_dmac1 1>;
683 dma-names = "ch0", "ch1", "ch2", "ch3"; 682 dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -685,7 +684,7 @@
685 phys = <&usb2_phy0>; 684 phys = <&usb2_phy0>;
686 phy-names = "usb"; 685 phy-names = "usb";
687 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 686 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
688 resets = <&cpg 704>; 687 resets = <&cpg 704>, <&cpg 703>;
689 status = "disabled"; 688 status = "disabled";
690 }; 689 };
691 690
@@ -1299,11 +1298,11 @@
1299 1298
1300 vin0csi20: endpoint@0 { 1299 vin0csi20: endpoint@0 {
1301 reg = <0>; 1300 reg = <0>;
1302 remote-endpoint= <&csi20vin0>; 1301 remote-endpoint = <&csi20vin0>;
1303 }; 1302 };
1304 vin0csi40: endpoint@2 { 1303 vin0csi40: endpoint@2 {
1305 reg = <2>; 1304 reg = <2>;
1306 remote-endpoint= <&csi40vin0>; 1305 remote-endpoint = <&csi40vin0>;
1307 }; 1306 };
1308 }; 1307 };
1309 }; 1308 };
@@ -1331,11 +1330,11 @@
1331 1330
1332 vin1csi20: endpoint@0 { 1331 vin1csi20: endpoint@0 {
1333 reg = <0>; 1332 reg = <0>;
1334 remote-endpoint= <&csi20vin1>; 1333 remote-endpoint = <&csi20vin1>;
1335 }; 1334 };
1336 vin1csi40: endpoint@2 { 1335 vin1csi40: endpoint@2 {
1337 reg = <2>; 1336 reg = <2>;
1338 remote-endpoint= <&csi40vin1>; 1337 remote-endpoint = <&csi40vin1>;
1339 }; 1338 };
1340 }; 1339 };
1341 }; 1340 };
@@ -1363,11 +1362,11 @@
1363 1362
1364 vin2csi20: endpoint@0 { 1363 vin2csi20: endpoint@0 {
1365 reg = <0>; 1364 reg = <0>;
1366 remote-endpoint= <&csi20vin2>; 1365 remote-endpoint = <&csi20vin2>;
1367 }; 1366 };
1368 vin2csi40: endpoint@2 { 1367 vin2csi40: endpoint@2 {
1369 reg = <2>; 1368 reg = <2>;
1370 remote-endpoint= <&csi40vin2>; 1369 remote-endpoint = <&csi40vin2>;
1371 }; 1370 };
1372 }; 1371 };
1373 }; 1372 };
@@ -1395,11 +1394,11 @@
1395 1394
1396 vin3csi20: endpoint@0 { 1395 vin3csi20: endpoint@0 {
1397 reg = <0>; 1396 reg = <0>;
1398 remote-endpoint= <&csi20vin3>; 1397 remote-endpoint = <&csi20vin3>;
1399 }; 1398 };
1400 vin3csi40: endpoint@2 { 1399 vin3csi40: endpoint@2 {
1401 reg = <2>; 1400 reg = <2>;
1402 remote-endpoint= <&csi40vin3>; 1401 remote-endpoint = <&csi40vin3>;
1403 }; 1402 };
1404 }; 1403 };
1405 }; 1404 };
@@ -1427,11 +1426,11 @@
1427 1426
1428 vin4csi20: endpoint@0 { 1427 vin4csi20: endpoint@0 {
1429 reg = <0>; 1428 reg = <0>;
1430 remote-endpoint= <&csi20vin4>; 1429 remote-endpoint = <&csi20vin4>;
1431 }; 1430 };
1432 vin4csi40: endpoint@2 { 1431 vin4csi40: endpoint@2 {
1433 reg = <2>; 1432 reg = <2>;
1434 remote-endpoint= <&csi40vin4>; 1433 remote-endpoint = <&csi40vin4>;
1435 }; 1434 };
1436 }; 1435 };
1437 }; 1436 };
@@ -1459,11 +1458,11 @@
1459 1458
1460 vin5csi20: endpoint@0 { 1459 vin5csi20: endpoint@0 {
1461 reg = <0>; 1460 reg = <0>;
1462 remote-endpoint= <&csi20vin5>; 1461 remote-endpoint = <&csi20vin5>;
1463 }; 1462 };
1464 vin5csi40: endpoint@2 { 1463 vin5csi40: endpoint@2 {
1465 reg = <2>; 1464 reg = <2>;
1466 remote-endpoint= <&csi40vin5>; 1465 remote-endpoint = <&csi40vin5>;
1467 }; 1466 };
1468 }; 1467 };
1469 }; 1468 };
@@ -1491,11 +1490,11 @@
1491 1490
1492 vin6csi20: endpoint@0 { 1491 vin6csi20: endpoint@0 {
1493 reg = <0>; 1492 reg = <0>;
1494 remote-endpoint= <&csi20vin6>; 1493 remote-endpoint = <&csi20vin6>;
1495 }; 1494 };
1496 vin6csi40: endpoint@2 { 1495 vin6csi40: endpoint@2 {
1497 reg = <2>; 1496 reg = <2>;
1498 remote-endpoint= <&csi40vin6>; 1497 remote-endpoint = <&csi40vin6>;
1499 }; 1498 };
1500 }; 1499 };
1501 }; 1500 };
@@ -1523,11 +1522,11 @@
1523 1522
1524 vin7csi20: endpoint@0 { 1523 vin7csi20: endpoint@0 {
1525 reg = <0>; 1524 reg = <0>;
1526 remote-endpoint= <&csi20vin7>; 1525 remote-endpoint = <&csi20vin7>;
1527 }; 1526 };
1528 vin7csi40: endpoint@2 { 1527 vin7csi40: endpoint@2 {
1529 reg = <2>; 1528 reg = <2>;
1530 remote-endpoint= <&csi40vin7>; 1529 remote-endpoint = <&csi40vin7>;
1531 }; 1530 };
1532 }; 1531 };
1533 }; 1532 };
@@ -1970,11 +1969,11 @@
1970 compatible = "generic-ohci"; 1969 compatible = "generic-ohci";
1971 reg = <0 0xee080000 0 0x100>; 1970 reg = <0 0xee080000 0 0x100>;
1972 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 1971 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1973 clocks = <&cpg CPG_MOD 703>; 1972 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
1974 phys = <&usb2_phy0>; 1973 phys = <&usb2_phy0>;
1975 phy-names = "usb"; 1974 phy-names = "usb";
1976 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 1975 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
1977 resets = <&cpg 703>; 1976 resets = <&cpg 703>, <&cpg 704>;
1978 status = "disabled"; 1977 status = "disabled";
1979 }; 1978 };
1980 1979
@@ -1994,12 +1993,12 @@
1994 compatible = "generic-ehci"; 1993 compatible = "generic-ehci";
1995 reg = <0 0xee080100 0 0x100>; 1994 reg = <0 0xee080100 0 0x100>;
1996 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 1995 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1997 clocks = <&cpg CPG_MOD 703>; 1996 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
1998 phys = <&usb2_phy0>; 1997 phys = <&usb2_phy0>;
1999 phy-names = "usb"; 1998 phy-names = "usb";
2000 companion= <&ohci0>; 1999 companion = <&ohci0>;
2001 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 2000 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
2002 resets = <&cpg 703>; 2001 resets = <&cpg 703>, <&cpg 704>;
2003 status = "disabled"; 2002 status = "disabled";
2004 }; 2003 };
2005 2004
@@ -2010,7 +2009,7 @@
2010 clocks = <&cpg CPG_MOD 702>; 2009 clocks = <&cpg CPG_MOD 702>;
2011 phys = <&usb2_phy1>; 2010 phys = <&usb2_phy1>;
2012 phy-names = "usb"; 2011 phy-names = "usb";
2013 companion= <&ohci1>; 2012 companion = <&ohci1>;
2014 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 2013 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
2015 resets = <&cpg 702>; 2014 resets = <&cpg 702>;
2016 status = "disabled"; 2015 status = "disabled";
@@ -2021,9 +2020,9 @@
2021 "renesas,rcar-gen3-usb2-phy"; 2020 "renesas,rcar-gen3-usb2-phy";
2022 reg = <0 0xee080200 0 0x700>; 2021 reg = <0 0xee080200 0 0x700>;
2023 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 2022 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
2024 clocks = <&cpg CPG_MOD 703>; 2023 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
2025 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>; 2024 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
2026 resets = <&cpg 703>; 2025 resets = <&cpg 703>, <&cpg 704>;
2027 #phy-cells = <0>; 2026 #phy-cells = <0>;
2028 status = "disabled"; 2027 status = "disabled";
2029 }; 2028 };
@@ -2437,17 +2436,14 @@
2437 2436
2438 du: display@feb00000 { 2437 du: display@feb00000 {
2439 compatible = "renesas,du-r8a7796"; 2438 compatible = "renesas,du-r8a7796";
2440 reg = <0 0xfeb00000 0 0x70000>, 2439 reg = <0 0xfeb00000 0 0x70000>;
2441 <0 0xfeb90000 0 0x14>;
2442 reg-names = "du", "lvds.0";
2443 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>, 2440 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
2444 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>, 2441 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
2445 <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>; 2442 <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
2446 clocks = <&cpg CPG_MOD 724>, 2443 clocks = <&cpg CPG_MOD 724>,
2447 <&cpg CPG_MOD 723>, 2444 <&cpg CPG_MOD 723>,
2448 <&cpg CPG_MOD 722>, 2445 <&cpg CPG_MOD 722>;
2449 <&cpg CPG_MOD 727>; 2446 clock-names = "du.0", "du.1", "du.2";
2450 clock-names = "du.0", "du.1", "du.2", "lvds.0";
2451 status = "disabled"; 2447 status = "disabled";
2452 2448
2453 vsps = <&vspd0 &vspd1 &vspd2>; 2449 vsps = <&vspd0 &vspd1 &vspd2>;
@@ -2470,6 +2466,33 @@
2470 port@2 { 2466 port@2 {
2471 reg = <2>; 2467 reg = <2>;
2472 du_out_lvds0: endpoint { 2468 du_out_lvds0: endpoint {
2469 remote-endpoint = <&lvds0_in>;
2470 };
2471 };
2472 };
2473 };
2474
2475 lvds0: lvds@feb90000 {
2476 compatible = "renesas,r8a7796-lvds";
2477 reg = <0 0xfeb90000 0 0x14>;
2478 clocks = <&cpg CPG_MOD 727>;
2479 power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
2480 resets = <&cpg 727>;
2481 status = "disabled";
2482
2483 ports {
2484 #address-cells = <1>;
2485 #size-cells = <0>;
2486
2487 port@0 {
2488 reg = <0>;
2489 lvds0_in: endpoint {
2490 remote-endpoint = <&du_out_lvds0>;
2491 };
2492 };
2493 port@1 {
2494 reg = <1>;
2495 lvds0_out: endpoint {
2473 }; 2496 };
2474 }; 2497 };
2475 }; 2498 };
diff --git a/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts b/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts
new file mode 100644
index 000000000000..dadad97051b9
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts
@@ -0,0 +1,16 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the M3NULCB Kingfisher board
4 *
5 * Copyright (C) 2018 Renesas Electronics Corp.
6 * Copyright (C) 2018 Cogent Embedded, Inc.
7 */
8
9#include "r8a77965-m3nulcb.dts"
10#include "ulcb-kf.dtsi"
11
12/ {
13 model = "Renesas M3NULCB Kingfisher board based on r8a77965";
14 compatible = "shimafuji,kingfisher", "renesas,m3nulcb",
15 "renesas,r8a77965";
16};
diff --git a/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts b/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts
new file mode 100644
index 000000000000..964078b6cc49
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts
@@ -0,0 +1,33 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the M3NULCB (R-Car Starter Kit Pro) board
4 *
5 * Copyright (C) 2018 Renesas Electronics Corp.
6 * Copyright (C) 2018 Cogent Embedded, Inc.
7 */
8
9/dts-v1/;
10#include "r8a77965.dtsi"
11#include "ulcb.dtsi"
12
13/ {
14 model = "Renesas M3NULCB board based on r8a77965";
15 compatible = "renesas,m3nulcb", "renesas,r8a77965";
16
17 memory@48000000 {
18 device_type = "memory";
19 /* first 128MB is reserved for secure area. */
20 reg = <0x0 0x48000000 0x0 0x78000000>;
21 };
22};
23
24&du {
25 clocks = <&cpg CPG_MOD 724>,
26 <&cpg CPG_MOD 723>,
27 <&cpg CPG_MOD 721>,
28 <&versaclock5 1>,
29 <&versaclock5 3>,
30 <&versaclock5 2>;
31 clock-names = "du.0", "du.1", "du.3",
32 "dclkin.0", "dclkin.1", "dclkin.3";
33};
diff --git a/arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts
index 9de4e3db1621..f03a5e9e0c42 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts
@@ -47,3 +47,17 @@
47&hdmi0_con { 47&hdmi0_con {
48 remote-endpoint = <&rcar_dw_hdmi0_out>; 48 remote-endpoint = <&rcar_dw_hdmi0_out>;
49}; 49};
50
51&pca9654 {
52 pcie_sata_switch {
53 gpio-hog;
54 gpios = <7 GPIO_ACTIVE_HIGH>;
55 output-low; /* enable SATA by default */
56 line-name = "PCIE/SATA switch";
57 };
58};
59
60/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
61&sata {
62 status = "okay";
63};
diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index 0cd44461a0bd..83946ca2eba5 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a77965 SoC 3 * Device Tree Source for the R-Car M3-N (R8A77965) SoC
4 * 4 *
5 * Copyright (C) 2018 Jacopo Mondi <jacopo+renesas@jmondi.org> 5 * Copyright (C) 2018 Jacopo Mondi <jacopo+renesas@jmondi.org>
6 * 6 *
@@ -12,7 +12,7 @@
12#include <dt-bindings/interrupt-controller/arm-gic.h> 12#include <dt-bindings/interrupt-controller/arm-gic.h>
13#include <dt-bindings/power/r8a77965-sysc.h> 13#include <dt-bindings/power/r8a77965-sysc.h>
14 14
15#define CPG_AUDIO_CLK_I 10 15#define CPG_AUDIO_CLK_I R8A77965_CLK_S0D4
16 16
17/ { 17/ {
18 compatible = "renesas,r8a77965"; 18 compatible = "renesas,r8a77965";
@@ -60,6 +60,46 @@
60 clock-frequency = <0>; 60 clock-frequency = <0>;
61 }; 61 };
62 62
63 cluster0_opp: opp_table0 {
64 compatible = "operating-points-v2";
65 opp-shared;
66
67 opp-500000000 {
68 opp-hz = /bits/ 64 <500000000>;
69 opp-microvolt = <830000>;
70 clock-latency-ns = <300000>;
71 };
72 opp-1000000000 {
73 opp-hz = /bits/ 64 <1000000000>;
74 opp-microvolt = <830000>;
75 clock-latency-ns = <300000>;
76 };
77 opp-1500000000 {
78 opp-hz = /bits/ 64 <1500000000>;
79 opp-microvolt = <830000>;
80 clock-latency-ns = <300000>;
81 opp-suspend;
82 };
83 opp-1600000000 {
84 opp-hz = /bits/ 64 <1600000000>;
85 opp-microvolt = <900000>;
86 clock-latency-ns = <300000>;
87 turbo-mode;
88 };
89 opp-1700000000 {
90 opp-hz = /bits/ 64 <1700000000>;
91 opp-microvolt = <900000>;
92 clock-latency-ns = <300000>;
93 turbo-mode;
94 };
95 opp-1800000000 {
96 opp-hz = /bits/ 64 <1800000000>;
97 opp-microvolt = <960000>;
98 clock-latency-ns = <300000>;
99 turbo-mode;
100 };
101 };
102
63 cpus { 103 cpus {
64 #address-cells = <1>; 104 #address-cells = <1>;
65 #size-cells = <0>; 105 #size-cells = <0>;
@@ -71,6 +111,8 @@
71 power-domains = <&sysc R8A77965_PD_CA57_CPU0>; 111 power-domains = <&sysc R8A77965_PD_CA57_CPU0>;
72 next-level-cache = <&L2_CA57>; 112 next-level-cache = <&L2_CA57>;
73 enable-method = "psci"; 113 enable-method = "psci";
114 clocks = <&cpg CPG_CORE R8A77965_CLK_Z>;
115 operating-points-v2 = <&cluster0_opp>;
74 }; 116 };
75 117
76 a57_1: cpu@1 { 118 a57_1: cpu@1 {
@@ -80,6 +122,8 @@
80 power-domains = <&sysc R8A77965_PD_CA57_CPU1>; 122 power-domains = <&sysc R8A77965_PD_CA57_CPU1>;
81 next-level-cache = <&L2_CA57>; 123 next-level-cache = <&L2_CA57>;
82 enable-method = "psci"; 124 enable-method = "psci";
125 clocks = <&cpg CPG_CORE R8A77965_CLK_Z>;
126 operating-points-v2 = <&cluster0_opp>;
83 }; 127 };
84 128
85 L2_CA57: cache-controller-0 { 129 L2_CA57: cache-controller-0 {
@@ -306,7 +350,6 @@
306 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 350 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
307 resets = <&cpg 522>; 351 resets = <&cpg 522>;
308 #thermal-sensor-cells = <1>; 352 #thermal-sensor-cells = <1>;
309 status = "okay";
310 }; 353 };
311 354
312 intc_ex: interrupt-controller@e61c0000 { 355 intc_ex: interrupt-controller@e61c0000 {
@@ -545,11 +588,11 @@
545 }; 588 };
546 589
547 hsusb: usb@e6590000 { 590 hsusb: usb@e6590000 {
548 compatible = "renesas,usbhs-r8a7796", 591 compatible = "renesas,usbhs-r8a77965",
549 "renesas,rcar-gen3-usbhs"; 592 "renesas,rcar-gen3-usbhs";
550 reg = <0 0xe6590000 0 0x100>; 593 reg = <0 0xe6590000 0 0x100>;
551 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; 594 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
552 clocks = <&cpg CPG_MOD 704>; 595 clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
553 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>, 596 dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
554 <&usb_dmac1 0>, <&usb_dmac1 1>; 597 <&usb_dmac1 0>, <&usb_dmac1 1>;
555 dma-names = "ch0", "ch1", "ch2", "ch3"; 598 dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -557,7 +600,7 @@
557 phys = <&usb2_phy0>; 600 phys = <&usb2_phy0>;
558 phy-names = "usb"; 601 phy-names = "usb";
559 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 602 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
560 resets = <&cpg 704>; 603 resets = <&cpg 704>, <&cpg 703>;
561 status = "disabled"; 604 status = "disabled";
562 }; 605 };
563 606
@@ -634,6 +677,14 @@
634 resets = <&cpg 219>; 677 resets = <&cpg 219>;
635 #dma-cells = <1>; 678 #dma-cells = <1>;
636 dma-channels = <16>; 679 dma-channels = <16>;
680 iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
681 <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
682 <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
683 <&ipmmu_ds0 6>, <&ipmmu_ds0 7>,
684 <&ipmmu_ds0 8>, <&ipmmu_ds0 9>,
685 <&ipmmu_ds0 10>, <&ipmmu_ds0 11>,
686 <&ipmmu_ds0 12>, <&ipmmu_ds0 13>,
687 <&ipmmu_ds0 14>, <&ipmmu_ds0 15>;
637 }; 688 };
638 689
639 dmac1: dma-controller@e7300000 { 690 dmac1: dma-controller@e7300000 {
@@ -668,6 +719,14 @@
668 resets = <&cpg 218>; 719 resets = <&cpg 218>;
669 #dma-cells = <1>; 720 #dma-cells = <1>;
670 dma-channels = <16>; 721 dma-channels = <16>;
722 iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
723 <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
724 <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
725 <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
726 <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
727 <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
728 <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
729 <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
671 }; 730 };
672 731
673 dmac2: dma-controller@e7310000 { 732 dmac2: dma-controller@e7310000 {
@@ -702,6 +761,14 @@
702 resets = <&cpg 217>; 761 resets = <&cpg 217>;
703 #dma-cells = <1>; 762 #dma-cells = <1>;
704 dma-channels = <16>; 763 dma-channels = <16>;
764 iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
765 <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
766 <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
767 <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
768 <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
769 <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
770 <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
771 <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
705 }; 772 };
706 773
707 ipmmu_ds0: mmu@e6740000 { 774 ipmmu_ds0: mmu@e6740000 {
@@ -838,6 +905,16 @@
838 status = "disabled"; 905 status = "disabled";
839 }; 906 };
840 907
908 can0: can@e6c30000 {
909 reg = <0 0xe6c30000 0 0x1000>;
910 /* placeholder */
911 };
912
913 can1: can@e6c38000 {
914 reg = <0 0xe6c38000 0 0x1000>;
915 /* placeholder */
916 };
917
841 pwm0: pwm@e6e30000 { 918 pwm0: pwm@e6e30000 {
842 compatible = "renesas,pwm-r8a77965", "renesas,pwm-rcar"; 919 compatible = "renesas,pwm-r8a77965", "renesas,pwm-rcar";
843 reg = <0 0xe6e30000 0 8>; 920 reg = <0 0xe6e30000 0 8>;
@@ -1089,11 +1166,11 @@
1089 1166
1090 vin0csi20: endpoint@0 { 1167 vin0csi20: endpoint@0 {
1091 reg = <0>; 1168 reg = <0>;
1092 remote-endpoint= <&csi20vin0>; 1169 remote-endpoint = <&csi20vin0>;
1093 }; 1170 };
1094 vin0csi40: endpoint@2 { 1171 vin0csi40: endpoint@2 {
1095 reg = <2>; 1172 reg = <2>;
1096 remote-endpoint= <&csi40vin0>; 1173 remote-endpoint = <&csi40vin0>;
1097 }; 1174 };
1098 }; 1175 };
1099 }; 1176 };
@@ -1121,11 +1198,11 @@
1121 1198
1122 vin1csi20: endpoint@0 { 1199 vin1csi20: endpoint@0 {
1123 reg = <0>; 1200 reg = <0>;
1124 remote-endpoint= <&csi20vin1>; 1201 remote-endpoint = <&csi20vin1>;
1125 }; 1202 };
1126 vin1csi40: endpoint@2 { 1203 vin1csi40: endpoint@2 {
1127 reg = <2>; 1204 reg = <2>;
1128 remote-endpoint= <&csi40vin1>; 1205 remote-endpoint = <&csi40vin1>;
1129 }; 1206 };
1130 }; 1207 };
1131 }; 1208 };
@@ -1153,11 +1230,11 @@
1153 1230
1154 vin2csi20: endpoint@0 { 1231 vin2csi20: endpoint@0 {
1155 reg = <0>; 1232 reg = <0>;
1156 remote-endpoint= <&csi20vin2>; 1233 remote-endpoint = <&csi20vin2>;
1157 }; 1234 };
1158 vin2csi40: endpoint@2 { 1235 vin2csi40: endpoint@2 {
1159 reg = <2>; 1236 reg = <2>;
1160 remote-endpoint= <&csi40vin2>; 1237 remote-endpoint = <&csi40vin2>;
1161 }; 1238 };
1162 }; 1239 };
1163 }; 1240 };
@@ -1185,11 +1262,11 @@
1185 1262
1186 vin3csi20: endpoint@0 { 1263 vin3csi20: endpoint@0 {
1187 reg = <0>; 1264 reg = <0>;
1188 remote-endpoint= <&csi20vin3>; 1265 remote-endpoint = <&csi20vin3>;
1189 }; 1266 };
1190 vin3csi40: endpoint@2 { 1267 vin3csi40: endpoint@2 {
1191 reg = <2>; 1268 reg = <2>;
1192 remote-endpoint= <&csi40vin3>; 1269 remote-endpoint = <&csi40vin3>;
1193 }; 1270 };
1194 }; 1271 };
1195 }; 1272 };
@@ -1217,11 +1294,11 @@
1217 1294
1218 vin4csi20: endpoint@0 { 1295 vin4csi20: endpoint@0 {
1219 reg = <0>; 1296 reg = <0>;
1220 remote-endpoint= <&csi20vin4>; 1297 remote-endpoint = <&csi20vin4>;
1221 }; 1298 };
1222 vin4csi40: endpoint@2 { 1299 vin4csi40: endpoint@2 {
1223 reg = <2>; 1300 reg = <2>;
1224 remote-endpoint= <&csi40vin4>; 1301 remote-endpoint = <&csi40vin4>;
1225 }; 1302 };
1226 }; 1303 };
1227 }; 1304 };
@@ -1249,11 +1326,11 @@
1249 1326
1250 vin5csi20: endpoint@0 { 1327 vin5csi20: endpoint@0 {
1251 reg = <0>; 1328 reg = <0>;
1252 remote-endpoint= <&csi20vin5>; 1329 remote-endpoint = <&csi20vin5>;
1253 }; 1330 };
1254 vin5csi40: endpoint@2 { 1331 vin5csi40: endpoint@2 {
1255 reg = <2>; 1332 reg = <2>;
1256 remote-endpoint= <&csi40vin5>; 1333 remote-endpoint = <&csi40vin5>;
1257 }; 1334 };
1258 }; 1335 };
1259 }; 1336 };
@@ -1281,11 +1358,11 @@
1281 1358
1282 vin6csi20: endpoint@0 { 1359 vin6csi20: endpoint@0 {
1283 reg = <0>; 1360 reg = <0>;
1284 remote-endpoint= <&csi20vin6>; 1361 remote-endpoint = <&csi20vin6>;
1285 }; 1362 };
1286 vin6csi40: endpoint@2 { 1363 vin6csi40: endpoint@2 {
1287 reg = <2>; 1364 reg = <2>;
1288 remote-endpoint= <&csi40vin6>; 1365 remote-endpoint = <&csi40vin6>;
1289 }; 1366 };
1290 }; 1367 };
1291 }; 1368 };
@@ -1313,57 +1390,280 @@
1313 1390
1314 vin7csi20: endpoint@0 { 1391 vin7csi20: endpoint@0 {
1315 reg = <0>; 1392 reg = <0>;
1316 remote-endpoint= <&csi20vin7>; 1393 remote-endpoint = <&csi20vin7>;
1317 }; 1394 };
1318 vin7csi40: endpoint@2 { 1395 vin7csi40: endpoint@2 {
1319 reg = <2>; 1396 reg = <2>;
1320 remote-endpoint= <&csi40vin7>; 1397 remote-endpoint = <&csi40vin7>;
1321 }; 1398 };
1322 }; 1399 };
1323 }; 1400 };
1324 }; 1401 };
1325 1402
1326 rcar_sound: sound@ec500000 { 1403 rcar_sound: sound@ec500000 {
1404 /*
1405 * #sound-dai-cells is required
1406 *
1407 * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
1408 * Multi DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
1409 */
1410 /*
1411 * #clock-cells is required for audio_clkout0/1/2/3
1412 *
1413 * clkout : #clock-cells = <0>; <&rcar_sound>;
1414 * clkout0/1/2/3: #clock-cells = <1>; <&rcar_sound N>;
1415 */
1416 compatible = "renesas,rcar_sound-r8a77965", "renesas,rcar_sound-gen3";
1327 reg = <0 0xec500000 0 0x1000>, /* SCU */ 1417 reg = <0 0xec500000 0 0x1000>, /* SCU */
1328 <0 0xec5a0000 0 0x100>, /* ADG */ 1418 <0 0xec5a0000 0 0x100>, /* ADG */
1329 <0 0xec540000 0 0x1000>, /* SSIU */ 1419 <0 0xec540000 0 0x1000>, /* SSIU */
1330 <0 0xec541000 0 0x280>, /* SSI */ 1420 <0 0xec541000 0 0x280>, /* SSI */
1331 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ 1421 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
1332 /* placeholder */ 1422 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
1423
1424 clocks = <&cpg CPG_MOD 1005>,
1425 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
1426 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
1427 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
1428 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
1429 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
1430 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
1431 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
1432 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
1433 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
1434 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
1435 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
1436 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
1437 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
1438 <&audio_clk_a>, <&audio_clk_b>,
1439 <&audio_clk_c>,
1440 <&cpg CPG_CORE R8A77965_CLK_S0D4>;
1441 clock-names = "ssi-all",
1442 "ssi.9", "ssi.8", "ssi.7", "ssi.6",
1443 "ssi.5", "ssi.4", "ssi.3", "ssi.2",
1444 "ssi.1", "ssi.0",
1445 "src.9", "src.8", "src.7", "src.6",
1446 "src.5", "src.4", "src.3", "src.2",
1447 "src.1", "src.0",
1448 "mix.1", "mix.0",
1449 "ctu.1", "ctu.0",
1450 "dvc.0", "dvc.1",
1451 "clk_a", "clk_b", "clk_c", "clk_i";
1452 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1453 resets = <&cpg 1005>,
1454 <&cpg 1006>, <&cpg 1007>,
1455 <&cpg 1008>, <&cpg 1009>,
1456 <&cpg 1010>, <&cpg 1011>,
1457 <&cpg 1012>, <&cpg 1013>,
1458 <&cpg 1014>, <&cpg 1015>;
1459 reset-names = "ssi-all",
1460 "ssi.9", "ssi.8", "ssi.7", "ssi.6",
1461 "ssi.5", "ssi.4", "ssi.3", "ssi.2",
1462 "ssi.1", "ssi.0";
1463 status = "disabled";
1333 1464
1334 rcar_sound,dvc { 1465 rcar_sound,dvc {
1335 dvc0: dvc-0 { 1466 dvc0: dvc-0 {
1467 dmas = <&audma1 0xbc>;
1468 dma-names = "tx";
1336 }; 1469 };
1337 dvc1: dvc-1 { 1470 dvc1: dvc-1 {
1471 dmas = <&audma1 0xbe>;
1472 dma-names = "tx";
1338 }; 1473 };
1339 }; 1474 };
1340 1475
1476 rcar_sound,mix {
1477 mix0: mix-0 { };
1478 mix1: mix-1 { };
1479 };
1480
1481 rcar_sound,ctu {
1482 ctu00: ctu-0 { };
1483 ctu01: ctu-1 { };
1484 ctu02: ctu-2 { };
1485 ctu03: ctu-3 { };
1486 ctu10: ctu-4 { };
1487 ctu11: ctu-5 { };
1488 ctu12: ctu-6 { };
1489 ctu13: ctu-7 { };
1490 };
1491
1341 rcar_sound,src { 1492 rcar_sound,src {
1342 src0: src-0 { 1493 src0: src-0 {
1494 interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
1495 dmas = <&audma0 0x85>, <&audma1 0x9a>;
1496 dma-names = "rx", "tx";
1343 }; 1497 };
1344 src1: src-1 { 1498 src1: src-1 {
1499 interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
1500 dmas = <&audma0 0x87>, <&audma1 0x9c>;
1501 dma-names = "rx", "tx";
1502 };
1503 src2: src-2 {
1504 interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
1505 dmas = <&audma0 0x89>, <&audma1 0x9e>;
1506 dma-names = "rx", "tx";
1507 };
1508 src3: src-3 {
1509 interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
1510 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
1511 dma-names = "rx", "tx";
1512 };
1513 src4: src-4 {
1514 interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
1515 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
1516 dma-names = "rx", "tx";
1517 };
1518 src5: src-5 {
1519 interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
1520 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
1521 dma-names = "rx", "tx";
1522 };
1523 src6: src-6 {
1524 interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
1525 dmas = <&audma0 0x91>, <&audma1 0xb4>;
1526 dma-names = "rx", "tx";
1527 };
1528 src7: src-7 {
1529 interrupts = <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;
1530 dmas = <&audma0 0x93>, <&audma1 0xb6>;
1531 dma-names = "rx", "tx";
1532 };
1533 src8: src-8 {
1534 interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
1535 dmas = <&audma0 0x95>, <&audma1 0xb8>;
1536 dma-names = "rx", "tx";
1537 };
1538 src9: src-9 {
1539 interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>;
1540 dmas = <&audma0 0x97>, <&audma1 0xba>;
1541 dma-names = "rx", "tx";
1345 }; 1542 };
1346 }; 1543 };
1347 1544
1348 rcar_sound,ssi { 1545 rcar_sound,ssi {
1349 ssi0: ssi-0 { 1546 ssi0: ssi-0 {
1547 interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
1548 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
1549 dma-names = "rx", "tx", "rxu", "txu";
1350 }; 1550 };
1351 ssi1: ssi-1 { 1551 ssi1: ssi-1 {
1552 interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
1553 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
1554 dma-names = "rx", "tx", "rxu", "txu";
1352 }; 1555 };
1353 }; 1556 ssi2: ssi-2 {
1354 1557 interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
1355 ports { 1558 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
1356 #address-cells = <1>; 1559 dma-names = "rx", "tx", "rxu", "txu";
1357 #size-cells = <0>;
1358 port@0 {
1359 reg = <0>;
1360 }; 1560 };
1361 port@1 { 1561 ssi3: ssi-3 {
1362 reg = <1>; 1562 interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
1563 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
1564 dma-names = "rx", "tx", "rxu", "txu";
1565 };
1566 ssi4: ssi-4 {
1567 interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
1568 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
1569 dma-names = "rx", "tx", "rxu", "txu";
1570 };
1571 ssi5: ssi-5 {
1572 interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
1573 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
1574 dma-names = "rx", "tx", "rxu", "txu";
1575 };
1576 ssi6: ssi-6 {
1577 interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
1578 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
1579 dma-names = "rx", "tx", "rxu", "txu";
1580 };
1581 ssi7: ssi-7 {
1582 interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
1583 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
1584 dma-names = "rx", "tx", "rxu", "txu";
1585 };
1586 ssi8: ssi-8 {
1587 interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
1588 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
1589 dma-names = "rx", "tx", "rxu", "txu";
1590 };
1591 ssi9: ssi-9 {
1592 interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
1593 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
1594 dma-names = "rx", "tx", "rxu", "txu";
1363 }; 1595 };
1364 }; 1596 };
1365 }; 1597 };
1366 1598
1599 audma0: dma-controller@ec700000 {
1600 compatible = "renesas,dmac-r8a77965",
1601 "renesas,rcar-dmac";
1602 reg = <0 0xec700000 0 0x10000>;
1603 interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
1604 GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
1605 GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
1606 GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
1607 GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
1608 GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
1609 GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
1610 GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
1611 GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
1612 GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
1613 GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
1614 GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
1615 GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
1616 GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
1617 GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
1618 GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
1619 GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
1620 interrupt-names = "error",
1621 "ch0", "ch1", "ch2", "ch3",
1622 "ch4", "ch5", "ch6", "ch7",
1623 "ch8", "ch9", "ch10", "ch11",
1624 "ch12", "ch13", "ch14", "ch15";
1625 clocks = <&cpg CPG_MOD 502>;
1626 clock-names = "fck";
1627 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1628 resets = <&cpg 502>;
1629 #dma-cells = <1>;
1630 dma-channels = <16>;
1631 };
1632
1633 audma1: dma-controller@ec720000 {
1634 compatible = "renesas,dmac-r8a77965",
1635 "renesas,rcar-dmac";
1636 reg = <0 0xec720000 0 0x10000>;
1637 interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
1638 GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
1639 GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
1640 GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
1641 GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
1642 GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
1643 GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
1644 GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
1645 GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
1646 GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
1647 GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
1648 GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
1649 GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
1650 GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
1651 GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
1652 GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
1653 GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
1654 interrupt-names = "error",
1655 "ch0", "ch1", "ch2", "ch3",
1656 "ch4", "ch5", "ch6", "ch7",
1657 "ch8", "ch9", "ch10", "ch11",
1658 "ch12", "ch13", "ch14", "ch15";
1659 clocks = <&cpg CPG_MOD 501>;
1660 clock-names = "fck";
1661 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1662 resets = <&cpg 501>;
1663 #dma-cells = <1>;
1664 dma-channels = <16>;
1665 };
1666
1367 xhci0: usb@ee000000 { 1667 xhci0: usb@ee000000 {
1368 compatible = "renesas,xhci-r8a77965", 1668 compatible = "renesas,xhci-r8a77965",
1369 "renesas,rcar-gen3-xhci"; 1669 "renesas,rcar-gen3-xhci";
@@ -1390,11 +1690,11 @@
1390 compatible = "generic-ohci"; 1690 compatible = "generic-ohci";
1391 reg = <0 0xee080000 0 0x100>; 1691 reg = <0 0xee080000 0 0x100>;
1392 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 1692 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1393 clocks = <&cpg CPG_MOD 703>; 1693 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
1394 phys = <&usb2_phy0>; 1694 phys = <&usb2_phy0>;
1395 phy-names = "usb"; 1695 phy-names = "usb";
1396 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 1696 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1397 resets = <&cpg 703>; 1697 resets = <&cpg 703>, <&cpg 704>;
1398 status = "disabled"; 1698 status = "disabled";
1399 }; 1699 };
1400 1700
@@ -1414,12 +1714,12 @@
1414 compatible = "generic-ehci"; 1714 compatible = "generic-ehci";
1415 reg = <0 0xee080100 0 0x100>; 1715 reg = <0 0xee080100 0 0x100>;
1416 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 1716 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1417 clocks = <&cpg CPG_MOD 703>; 1717 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
1418 phys = <&usb2_phy0>; 1718 phys = <&usb2_phy0>;
1419 phy-names = "usb"; 1719 phy-names = "usb";
1420 companion = <&ohci0>; 1720 companion = <&ohci0>;
1421 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 1721 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1422 resets = <&cpg 703>; 1722 resets = <&cpg 703>, <&cpg 704>;
1423 status = "disabled"; 1723 status = "disabled";
1424 }; 1724 };
1425 1725
@@ -1441,9 +1741,9 @@
1441 "renesas,rcar-gen3-usb2-phy"; 1741 "renesas,rcar-gen3-usb2-phy";
1442 reg = <0 0xee080200 0 0x700>; 1742 reg = <0 0xee080200 0 0x700>;
1443 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 1743 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
1444 clocks = <&cpg CPG_MOD 703>; 1744 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
1445 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 1745 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1446 resets = <&cpg 703>; 1746 resets = <&cpg 703>, <&cpg 704>;
1447 #phy-cells = <0>; 1747 #phy-cells = <0>;
1448 status = "disabled"; 1748 status = "disabled";
1449 }; 1749 };
@@ -1452,9 +1752,9 @@
1452 compatible = "renesas,usb2-phy-r8a77965", 1752 compatible = "renesas,usb2-phy-r8a77965",
1453 "renesas,rcar-gen3-usb2-phy"; 1753 "renesas,rcar-gen3-usb2-phy";
1454 reg = <0 0xee0a0200 0 0x700>; 1754 reg = <0 0xee0a0200 0 0x700>;
1455 clocks = <&cpg CPG_MOD 703>; 1755 clocks = <&cpg CPG_MOD 702>;
1456 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>; 1756 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1457 resets = <&cpg 703>; 1757 resets = <&cpg 702>;
1458 #phy-cells = <0>; 1758 #phy-cells = <0>;
1459 status = "disabled"; 1759 status = "disabled";
1460 }; 1760 };
@@ -1507,6 +1807,17 @@
1507 status = "disabled"; 1807 status = "disabled";
1508 }; 1808 };
1509 1809
1810 sata: sata@ee300000 {
1811 compatible = "renesas,sata-r8a77965",
1812 "renesas,rcar-gen3-sata";
1813 reg = <0 0xee300000 0 0x200000>;
1814 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
1815 clocks = <&cpg CPG_MOD 815>;
1816 power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
1817 resets = <&cpg 815>;
1818 status = "disabled";
1819 };
1820
1510 gic: interrupt-controller@f1010000 { 1821 gic: interrupt-controller@f1010000 {
1511 compatible = "arm,gic-400"; 1822 compatible = "arm,gic-400";
1512 #interrupt-cells = <3>; 1823 #interrupt-cells = <3>;
@@ -1578,6 +1889,16 @@
1578 status = "disabled"; 1889 status = "disabled";
1579 }; 1890 };
1580 1891
1892 fdp1@fe940000 {
1893 compatible = "renesas,fdp1";
1894 reg = <0 0xfe940000 0 0x2400>;
1895 interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
1896 clocks = <&cpg CPG_MOD 119>;
1897 power-domains = <&sysc R8A77965_PD_A3VP>;
1898 resets = <&cpg 119>;
1899 renesas,fcp = <&fcpf0>;
1900 };
1901
1581 fcpf0: fcp@fe950000 { 1902 fcpf0: fcp@fe950000 {
1582 compatible = "renesas,fcpf"; 1903 compatible = "renesas,fcpf";
1583 reg = <0 0xfe950000 0 0x200>; 1904 reg = <0 0xfe950000 0 0x200>;
@@ -1843,14 +2164,6 @@
1843 }; 2164 };
1844 }; 2165 };
1845 2166
1846 timer {
1847 compatible = "arm,armv8-timer";
1848 interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
1849 <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
1850 <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
1851 <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
1852 };
1853
1854 thermal-zones { 2167 thermal-zones {
1855 sensor_thermal1: sensor-thermal1 { 2168 sensor_thermal1: sensor-thermal1 {
1856 polling-delay-passive = <250>; 2169 polling-delay-passive = <250>;
@@ -1895,6 +2208,14 @@
1895 }; 2208 };
1896 }; 2209 };
1897 2210
2211 timer {
2212 compatible = "arm,armv8-timer";
2213 interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
2214 <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
2215 <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
2216 <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
2217 };
2218
1898 /* External USB clocks - can be overridden by the board */ 2219 /* External USB clocks - can be overridden by the board */
1899 usb3s0_clk: usb3s0 { 2220 usb3s0_clk: usb3s0 {
1900 compatible = "fixed-clock"; 2221 compatible = "fixed-clock";
diff --git a/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts b/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
index 8eac8ca6550b..0dbcb4cccc18 100644
--- a/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
@@ -51,6 +51,15 @@
51 regulator-always-on; 51 regulator-always-on;
52 }; 52 };
53 53
54 vcc_vddq_vin0: regulator-2 {
55 compatible = "regulator-fixed";
56 regulator-name = "VCC_VDDQ_VIN0";
57 regulator-min-microvolt = <3300000>;
58 regulator-max-microvolt = <3300000>;
59 regulator-boot-on;
60 regulator-always-on;
61 };
62
54 lvds-decoder { 63 lvds-decoder {
55 compatible = "thine,thc63lvd1024"; 64 compatible = "thine,thc63lvd1024";
56 vcc-supply = <&vcc_d3_3v>; 65 vcc-supply = <&vcc_d3_3v>;
@@ -128,6 +137,12 @@
128 function = "i2c0"; 137 function = "i2c0";
129 }; 138 };
130 139
140 mmc_pins: mmc_3_3v {
141 groups = "mmc_data8", "mmc_ctrl";
142 function = "mmc";
143 power-source = <3300>;
144 };
145
131 scif0_pins: scif0 { 146 scif0_pins: scif0 {
132 groups = "scif0_data"; 147 groups = "scif0_data";
133 function = "scif0"; 148 function = "scif0";
@@ -192,6 +207,17 @@
192 }; 207 };
193}; 208};
194 209
210&mmc0 {
211 pinctrl-0 = <&mmc_pins>;
212 pinctrl-names = "default";
213
214 vmmc-supply = <&vcc_d3_3v>;
215 vqmmc-supply = <&vcc_vddq_vin0>;
216 bus-width = <8>;
217 non-removable;
218 status = "okay";
219};
220
195&scif0 { 221&scif0 {
196 pinctrl-0 = <&scif0_pins>; 222 pinctrl-0 = <&scif0_pins>;
197 pinctrl-names = "default"; 223 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
index 954168858fed..cba7885cf7c3 100644
--- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a77970 SoC 3 * Device Tree Source for the R-Car V3M (R8A77970) SoC
4 * 4 *
5 * Copyright (C) 2016-2017 Renesas Electronics Corp. 5 * Copyright (C) 2016-2017 Renesas Electronics Corp.
6 * Copyright (C) 2017 Cogent Embedded, Inc. 6 * Copyright (C) 2017 Cogent Embedded, Inc.
@@ -24,6 +24,13 @@
24 i2c4 = &i2c4; 24 i2c4 = &i2c4;
25 }; 25 };
26 26
27 /* External CAN clock - to be overridden by boards that provide it */
28 can_clk: can {
29 compatible = "fixed-clock";
30 #clock-cells = <0>;
31 clock-frequency = <0>;
32 };
33
27 cpus { 34 cpus {
28 #address-cells = <1>; 35 #address-cells = <1>;
29 #size-cells = <0>; 36 #size-cells = <0>;
@@ -82,13 +89,6 @@
82 method = "smc"; 89 method = "smc";
83 }; 90 };
84 91
85 /* External CAN clock - to be overridden by boards that provide it */
86 can_clk: can {
87 compatible = "fixed-clock";
88 #clock-cells = <0>;
89 clock-frequency = <0>;
90 };
91
92 /* External SCIF clock - to be overridden by boards that provide it */ 92 /* External SCIF clock - to be overridden by boards that provide it */
93 scif_clk: scif { 93 scif_clk: scif {
94 compatible = "fixed-clock"; 94 compatible = "fixed-clock";
@@ -209,6 +209,76 @@
209 reg = <0 0xe6060000 0 0x504>; 209 reg = <0 0xe6060000 0 0x504>;
210 }; 210 };
211 211
212 cmt0: timer@e60f0000 {
213 compatible = "renesas,r8a77970-cmt0",
214 "renesas,rcar-gen3-cmt0";
215 reg = <0 0xe60f0000 0 0x1004>;
216 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
217 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
218 clocks = <&cpg CPG_MOD 303>;
219 clock-names = "fck";
220 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
221 resets = <&cpg 303>;
222 status = "disabled";
223 };
224
225 cmt1: timer@e6130000 {
226 compatible = "renesas,r8a77970-cmt1",
227 "renesas,rcar-gen3-cmt1";
228 reg = <0 0xe6130000 0 0x1004>;
229 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
230 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
231 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
232 <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
233 <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
234 <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
235 <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
236 <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
237 clocks = <&cpg CPG_MOD 302>;
238 clock-names = "fck";
239 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
240 resets = <&cpg 302>;
241 status = "disabled";
242 };
243
244 cmt2: timer@e6140000 {
245 compatible = "renesas,r8a77970-cmt1",
246 "renesas,rcar-gen3-cmt1";
247 reg = <0 0xe6140000 0 0x1004>;
248 interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
249 <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
250 <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
251 <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
252 <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
253 <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
254 <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
255 <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
256 clocks = <&cpg CPG_MOD 301>;
257 clock-names = "fck";
258 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
259 resets = <&cpg 301>;
260 status = "disabled";
261 };
262
263 cmt3: timer@e6148000 {
264 compatible = "renesas,r8a77970-cmt1",
265 "renesas,rcar-gen3-cmt1";
266 reg = <0 0xe6148000 0 0x1004>;
267 interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
268 <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
269 <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
270 <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>,
271 <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>,
272 <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
273 <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
274 <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
275 clocks = <&cpg CPG_MOD 300>;
276 clock-names = "fck";
277 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
278 resets = <&cpg 300>;
279 status = "disabled";
280 };
281
212 cpg: clock-controller@e6150000 { 282 cpg: clock-controller@e6150000 {
213 compatible = "renesas,r8a77970-cpg-mssr"; 283 compatible = "renesas,r8a77970-cpg-mssr";
214 reg = <0 0xe6150000 0 0x1000>; 284 reg = <0 0xe6150000 0 0x1000>;
@@ -544,6 +614,16 @@
544 status = "disabled"; 614 status = "disabled";
545 }; 615 };
546 616
617 tpu: pwm@e6e80000 {
618 compatible = "renesas,tpu-r8a77970", "renesas,tpu";
619 reg = <0 0xe6e80000 0 0x148>;
620 interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
621 clocks = <&cpg CPG_MOD 304>;
622 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
623 resets = <&cpg 304>;
624 #pwm-cells = <3>;
625 status = "disabled";
626 };
547 627
548 vin0: video@e6ef0000 { 628 vin0: video@e6ef0000 {
549 compatible = "renesas,vin-r8a77970"; 629 compatible = "renesas,vin-r8a77970";
@@ -567,7 +647,7 @@
567 647
568 vin0csi40: endpoint@2 { 648 vin0csi40: endpoint@2 {
569 reg = <2>; 649 reg = <2>;
570 remote-endpoint= <&csi40vin0>; 650 remote-endpoint = <&csi40vin0>;
571 }; 651 };
572 }; 652 };
573 }; 653 };
@@ -595,7 +675,7 @@
595 675
596 vin1csi40: endpoint@2 { 676 vin1csi40: endpoint@2 {
597 reg = <2>; 677 reg = <2>;
598 remote-endpoint= <&csi40vin1>; 678 remote-endpoint = <&csi40vin1>;
599 }; 679 };
600 }; 680 };
601 }; 681 };
@@ -623,7 +703,7 @@
623 703
624 vin2csi40: endpoint@2 { 704 vin2csi40: endpoint@2 {
625 reg = <2>; 705 reg = <2>;
626 remote-endpoint= <&csi40vin2>; 706 remote-endpoint = <&csi40vin2>;
627 }; 707 };
628 }; 708 };
629 }; 709 };
@@ -651,7 +731,7 @@
651 731
652 vin3csi40: endpoint@2 { 732 vin3csi40: endpoint@2 {
653 reg = <2>; 733 reg = <2>;
654 remote-endpoint= <&csi40vin3>; 734 remote-endpoint = <&csi40vin3>;
655 }; 735 };
656 }; 736 };
657 }; 737 };
@@ -754,6 +834,18 @@
754 #iommu-cells = <1>; 834 #iommu-cells = <1>;
755 }; 835 };
756 836
837 mmc0: mmc@ee140000 {
838 compatible = "renesas,sdhi-r8a77970",
839 "renesas,rcar-gen3-sdhi";
840 reg = <0 0xee140000 0 0x2000>;
841 interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
842 clocks = <&cpg CPG_MOD 314>;
843 power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
844 resets = <&cpg 314>;
845 max-frequency = <200000000>;
846 status = "disabled";
847 };
848
757 gic: interrupt-controller@f1010000 { 849 gic: interrupt-controller@f1010000 {
758 compatible = "arm,gic-400"; 850 compatible = "arm,gic-400";
759 #interrupt-cells = <3>; 851 #interrupt-cells = <3>;
diff --git a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts
index 9f25c407dfd7..fe2e2c051cc9 100644
--- a/arch/arm64/boot/dts/renesas/r8a77980-condor.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77980-condor.dts
@@ -45,6 +45,56 @@
45 regulator-boot-on; 45 regulator-boot-on;
46 regulator-always-on; 46 regulator-always-on;
47 }; 47 };
48
49 d1_8v: regulator-2 {
50 compatible = "regulator-fixed";
51 regulator-name = "D1.8V";
52 regulator-min-microvolt = <1800000>;
53 regulator-max-microvolt = <1800000>;
54 regulator-boot-on;
55 regulator-always-on;
56 };
57
58 hdmi-out {
59 compatible = "hdmi-connector";
60 type = "a";
61
62 port {
63 hdmi_con: endpoint {
64 remote-endpoint = <&adv7511_out>;
65 };
66 };
67 };
68
69 lvds-decoder {
70 compatible = "thine,thc63lvd1024";
71 vcc-supply = <&d3_3v>;
72
73 ports {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 port@0 {
78 reg = <0>;
79 thc63lvd1024_in: endpoint {
80 remote-endpoint = <&lvds0_out>;
81 };
82 };
83
84 port@2 {
85 reg = <2>;
86 thc63lvd1024_out: endpoint {
87 remote-endpoint = <&adv7511_in>;
88 };
89 };
90 };
91 };
92
93 x1_clk: x1-clock {
94 compatible = "fixed-clock";
95 #clock-cells = <0>;
96 clock-frequency = <148500000>;
97 };
48}; 98};
49 99
50&avb { 100&avb {
@@ -74,6 +124,13 @@
74 }; 124 };
75}; 125};
76 126
127&du {
128 clocks = <&cpg CPG_MOD 724>,
129 <&x1_clk>;
130 clock-names = "du.0", "dclkin.0";
131 status = "okay";
132};
133
77&extal_clk { 134&extal_clk {
78 clock-frequency = <16666666>; 135 clock-frequency = <16666666>;
79}; 136};
@@ -102,6 +159,55 @@
102 gpio-controller; 159 gpio-controller;
103 #gpio-cells = <2>; 160 #gpio-cells = <2>;
104 }; 161 };
162
163 hdmi@39 {
164 compatible = "adi,adv7511w";
165 reg = <0x39>;
166 interrupt-parent = <&gpio1>;
167 interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
168 avdd-supply = <&d1_8v>;
169 dvdd-supply = <&d1_8v>;
170 pvdd-supply = <&d1_8v>;
171 bgvdd-supply = <&d1_8v>;
172 dvdd-3v-supply = <&d3_3v>;
173
174 adi,input-depth = <8>;
175 adi,input-colorspace = "rgb";
176 adi,input-clock = "1x";
177 adi,input-style = <1>;
178 adi,input-justification = "evenly";
179
180 ports {
181 #address-cells = <1>;
182 #size-cells = <0>;
183
184 port@0 {
185 reg = <0>;
186 adv7511_in: endpoint {
187 remote-endpoint = <&thc63lvd1024_out>;
188 };
189 };
190
191 port@1 {
192 reg = <1>;
193 adv7511_out: endpoint {
194 remote-endpoint = <&hdmi_con>;
195 };
196 };
197 };
198 };
199};
200
201&lvds0 {
202 status = "okay";
203
204 ports {
205 port@1 {
206 lvds0_out: endpoint {
207 remote-endpoint = <&thc63lvd1024_in>;
208 };
209 };
210 };
105}; 211};
106 212
107&mmc0 { 213&mmc0 {
@@ -117,6 +223,18 @@
117 status = "okay"; 223 status = "okay";
118}; 224};
119 225
226&pciec {
227 status = "okay";
228};
229
230&pcie_bus_clk {
231 clock-frequency = <100000000>;
232};
233
234&pcie_phy {
235 status = "okay";
236};
237
120&pfc { 238&pfc {
121 avb_pins: avb { 239 avb_pins: avb {
122 groups = "avb_mdio", "avb_rgmii"; 240 groups = "avb_mdio", "avb_rgmii";
@@ -156,6 +274,11 @@
156 }; 274 };
157}; 275};
158 276
277&rwdt {
278 timeout-sec = <60>;
279 status = "okay";
280};
281
159&scif0 { 282&scif0 {
160 pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>; 283 pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>;
161 pinctrl-names = "default"; 284 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts
index 9dac42f8f804..dd14a41b32cd 100644
--- a/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts
@@ -27,6 +27,72 @@
27 /* first 128MB is reserved for secure area. */ 27 /* first 128MB is reserved for secure area. */
28 reg = <0 0x48000000 0 0x78000000>; 28 reg = <0 0x48000000 0 0x78000000>;
29 }; 29 };
30
31 hdmi-out {
32 compatible = "hdmi-connector";
33 type = "a";
34
35 port {
36 hdmi_con: endpoint {
37 remote-endpoint = <&adv7511_out>;
38 };
39 };
40 };
41
42 lvds-decoder {
43 compatible = "thine,thc63lvd1024";
44 vcc-supply = <&vcc3v3_d5>;
45
46 ports {
47 #address-cells = <1>;
48 #size-cells = <0>;
49
50 port@0 {
51 reg = <0>;
52 thc63lvd1024_in: endpoint {
53 remote-endpoint = <&lvds0_out>;
54 };
55 };
56
57 port@2 {
58 reg = <2>;
59 thc63lvd1024_out: endpoint {
60 remote-endpoint = <&adv7511_in>;
61 };
62 };
63 };
64 };
65
66 osc1_clk: osc1-clock {
67 compatible = "fixed-clock";
68 #clock-cells = <0>;
69 clock-frequency = <148500000>;
70 };
71
72 vcc1v8_d4: regulator-0 {
73 compatible = "regulator-fixed";
74 regulator-name = "VCC1V8_D4";
75 regulator-min-microvolt = <1800000>;
76 regulator-max-microvolt = <1800000>;
77 regulator-boot-on;
78 regulator-always-on;
79 };
80
81 vcc3v3_d5: regulator-1 {
82 compatible = "regulator-fixed";
83 regulator-name = "VCC3V3_D5";
84 regulator-min-microvolt = <3300000>;
85 regulator-max-microvolt = <3300000>;
86 regulator-boot-on;
87 regulator-always-on;
88 };
89};
90
91&du {
92 clocks = <&cpg CPG_MOD 724>,
93 <&osc1_clk>;
94 clock-names = "du.0", "dclkin.0";
95 status = "okay";
30}; 96};
31 97
32&extal_clk { 98&extal_clk {
@@ -53,6 +119,64 @@
53 }; 119 };
54}; 120};
55 121
122&i2c0 {
123 pinctrl-0 = <&i2c0_pins>;
124 pinctrl-names = "default";
125
126 status = "okay";
127 clock-frequency = <400000>;
128
129 hdmi@39 {
130 compatible = "adi,adv7511w";
131 #sound-dai-cells = <0>;
132 reg = <0x39>;
133 interrupt-parent = <&gpio1>;
134 interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
135 avdd-supply = <&vcc1v8_d4>;
136 dvdd-supply = <&vcc1v8_d4>;
137 pvdd-supply = <&vcc1v8_d4>;
138 bgvdd-supply = <&vcc1v8_d4>;
139 dvdd-3v-supply = <&vcc3v3_d5>;
140
141 adi,input-depth = <8>;
142 adi,input-colorspace = "rgb";
143 adi,input-clock = "1x";
144 adi,input-style = <1>;
145 adi,input-justification = "evenly";
146
147 ports {
148 #address-cells = <1>;
149 #size-cells = <0>;
150
151 port@0 {
152 reg = <0>;
153 adv7511_in: endpoint {
154 remote-endpoint = <&thc63lvd1024_out>;
155 };
156 };
157
158 port@1 {
159 reg = <1>;
160 adv7511_out: endpoint {
161 remote-endpoint = <&hdmi_con>;
162 };
163 };
164 };
165 };
166};
167
168&lvds0 {
169 status = "okay";
170
171 ports {
172 port@1 {
173 lvds0_out: endpoint {
174 remote-endpoint = <&thc63lvd1024_in>;
175 };
176 };
177 };
178};
179
56&pfc { 180&pfc {
57 gether_pins: gether { 181 gether_pins: gether {
58 groups = "gether_mdio_a", "gether_rgmii", 182 groups = "gether_mdio_a", "gether_rgmii",
@@ -60,6 +184,11 @@
60 function = "gether"; 184 function = "gether";
61 }; 185 };
62 186
187 i2c0_pins: i2c0 {
188 groups = "i2c0";
189 function = "i2c0";
190 };
191
63 scif0_pins: scif0 { 192 scif0_pins: scif0 {
64 groups = "scif0_data"; 193 groups = "scif0_data";
65 function = "scif0"; 194 function = "scif0";
@@ -71,6 +200,11 @@
71 }; 200 };
72}; 201};
73 202
203&rwdt {
204 timeout-sec = <60>;
205 status = "okay";
206};
207
74&scif0 { 208&scif0 {
75 pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>; 209 pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>;
76 pinctrl-names = "default"; 210 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
index b8c9a56562f2..d4952b527d14 100644
--- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a77980 SoC 3 * Device Tree Source for the R-Car V3H (R8A77980) SoC
4 * 4 *
5 * Copyright (C) 2018 Renesas Electronics Corp. 5 * Copyright (C) 2018 Renesas Electronics Corp.
6 * Copyright (C) 2018 Cogent Embedded, Inc. 6 * Copyright (C) 2018 Cogent Embedded, Inc.
@@ -25,6 +25,13 @@
25 i2c5 = &i2c5; 25 i2c5 = &i2c5;
26 }; 26 };
27 27
28 /* External CAN clock - to be overridden by boards that provide it */
29 can_clk: can {
30 compatible = "fixed-clock";
31 #clock-cells = <0>;
32 clock-frequency = <0>;
33 };
34
28 cpus { 35 cpus {
29 #address-cells = <1>; 36 #address-cells = <1>;
30 #size-cells = <0>; 37 #size-cells = <0>;
@@ -77,27 +84,36 @@
77 }; 84 };
78 }; 85 };
79 86
80 /* External CAN clock - to be overridden by boards that provide it */ 87 extal_clk: extal {
81 can_clk: can {
82 compatible = "fixed-clock"; 88 compatible = "fixed-clock";
83 #clock-cells = <0>; 89 #clock-cells = <0>;
90 /* This value must be overridden by the board */
84 clock-frequency = <0>; 91 clock-frequency = <0>;
85 }; 92 };
86 93
87 extal_clk: extal { 94 extalr_clk: extalr {
88 compatible = "fixed-clock"; 95 compatible = "fixed-clock";
89 #clock-cells = <0>; 96 #clock-cells = <0>;
90 /* This value must be overridden by the board */ 97 /* This value must be overridden by the board */
91 clock-frequency = <0>; 98 clock-frequency = <0>;
92 }; 99 };
93 100
94 extalr_clk: extalr { 101 /* External PCIe clock - can be overridden by the board */
102 pcie_bus_clk: pcie_bus {
95 compatible = "fixed-clock"; 103 compatible = "fixed-clock";
96 #clock-cells = <0>; 104 #clock-cells = <0>;
97 /* This value must be overridden by the board */
98 clock-frequency = <0>; 105 clock-frequency = <0>;
99 }; 106 };
100 107
108 pmu_a53 {
109 compatible = "arm,cortex-a53-pmu";
110 interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
111 <&gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
112 <&gic GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
113 <&gic GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
114 interrupt-affinity = <&a53_0>, <&a53_1>, <&a53_2>, <&a53_3>;
115 };
116
101 psci { 117 psci {
102 compatible = "arm,psci-1.0", "arm,psci-0.2"; 118 compatible = "arm,psci-1.0", "arm,psci-0.2";
103 method = "smc"; 119 method = "smc";
@@ -118,6 +134,16 @@
118 #size-cells = <2>; 134 #size-cells = <2>;
119 ranges; 135 ranges;
120 136
137 rwdt: watchdog@e6020000 {
138 compatible = "renesas,r8a77980-wdt",
139 "renesas,rcar-gen3-wdt";
140 reg = <0 0xe6020000 0 0x0c>;
141 clocks = <&cpg CPG_MOD 402>;
142 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
143 resets = <&cpg 402>;
144 status = "disabled";
145 };
146
121 gpio0: gpio@e6050000 { 147 gpio0: gpio@e6050000 {
122 compatible = "renesas,gpio-r8a77980", 148 compatible = "renesas,gpio-r8a77980",
123 "renesas,rcar-gen3-gpio"; 149 "renesas,rcar-gen3-gpio";
@@ -213,6 +239,76 @@
213 reg = <0 0xe6060000 0 0x50c>; 239 reg = <0 0xe6060000 0 0x50c>;
214 }; 240 };
215 241
242 cmt0: timer@e60f0000 {
243 compatible = "renesas,r8a77980-cmt0",
244 "renesas,rcar-gen3-cmt0";
245 reg = <0 0xe60f0000 0 0x1004>;
246 interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
247 <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
248 clocks = <&cpg CPG_MOD 303>;
249 clock-names = "fck";
250 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
251 resets = <&cpg 303>;
252 status = "disabled";
253 };
254
255 cmt1: timer@e6130000 {
256 compatible = "renesas,r8a77980-cmt1",
257 "renesas,rcar-gen3-cmt1";
258 reg = <0 0xe6130000 0 0x1004>;
259 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
260 <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
261 <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
262 <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
263 <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
264 <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
265 <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
266 <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
267 clocks = <&cpg CPG_MOD 302>;
268 clock-names = "fck";
269 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
270 resets = <&cpg 302>;
271 status = "disabled";
272 };
273
274 cmt2: timer@e6140000 {
275 compatible = "renesas,r8a77980-cmt1",
276 "renesas,rcar-gen3-cmt1";
277 reg = <0 0xe6140000 0 0x1004>;
278 interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
279 <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
280 <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
281 <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
282 <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
283 <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
284 <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
285 <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
286 clocks = <&cpg CPG_MOD 301>;
287 clock-names = "fck";
288 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
289 resets = <&cpg 301>;
290 status = "disabled";
291 };
292
293 cmt3: timer@e6148000 {
294 compatible = "renesas,r8a77980-cmt1",
295 "renesas,rcar-gen3-cmt1";
296 reg = <0 0xe6148000 0 0x1004>;
297 interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
298 <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
299 <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
300 <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>,
301 <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>,
302 <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
303 <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
304 <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
305 clocks = <&cpg CPG_MOD 300>;
306 clock-names = "fck";
307 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
308 resets = <&cpg 300>;
309 status = "disabled";
310 };
311
216 cpg: clock-controller@e6150000 { 312 cpg: clock-controller@e6150000 {
217 compatible = "renesas,r8a77980-cpg-mssr"; 313 compatible = "renesas,r8a77980-cpg-mssr";
218 reg = <0 0xe6150000 0 0x1000>; 314 reg = <0 0xe6150000 0 0x1000>;
@@ -418,6 +514,16 @@
418 status = "disabled"; 514 status = "disabled";
419 }; 515 };
420 516
517 pcie_phy: pcie-phy@e65d0000 {
518 compatible = "renesas,r8a77980-pcie-phy";
519 reg = <0 0xe65d0000 0 0x8000>;
520 #phy-cells = <0>;
521 clocks = <&cpg CPG_MOD 319>;
522 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
523 resets = <&cpg 319>;
524 status = "disabled";
525 };
526
421 canfd: can@e66c0000 { 527 canfd: can@e66c0000 {
422 compatible = "renesas,r8a77980-canfd", 528 compatible = "renesas,r8a77980-canfd",
423 "renesas,rcar-gen3-canfd"; 529 "renesas,rcar-gen3-canfd";
@@ -443,69 +549,6 @@
443 }; 549 };
444 }; 550 };
445 551
446 ipmmu_ds1: mmu@e7740000 {
447 compatible = "renesas,ipmmu-r8a77980";
448 reg = <0 0xe7740000 0 0x1000>;
449 renesas,ipmmu-main = <&ipmmu_mm 0>;
450 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
451 #iommu-cells = <1>;
452 };
453
454 ipmmu_vip0: mmu@e7b00000 {
455 compatible = "renesas,ipmmu-r8a77980";
456 reg = <0 0xe7b00000 0 0x1000>;
457 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
458 #iommu-cells = <1>;
459 };
460
461 ipmmu_vip1: mmu@e7960000 {
462 compatible = "renesas,ipmmu-r8a77980";
463 reg = <0 0xe7960000 0 0x1000>;
464 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
465 #iommu-cells = <1>;
466 };
467
468 ipmmu_ir: mmu@ff8b0000 {
469 compatible = "renesas,ipmmu-r8a77980";
470 reg = <0 0xff8b0000 0 0x1000>;
471 renesas,ipmmu-main = <&ipmmu_mm 3>;
472 power-domains = <&sysc R8A77980_PD_A3IR>;
473 #iommu-cells = <1>;
474 };
475
476 ipmmu_mm: mmu@e67b0000 {
477 compatible = "renesas,ipmmu-r8a77980";
478 reg = <0 0xe67b0000 0 0x1000>;
479 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
480 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
481 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
482 #iommu-cells = <1>;
483 };
484
485 ipmmu_rt: mmu@ffc80000 {
486 compatible = "renesas,ipmmu-r8a77980";
487 reg = <0 0xffc80000 0 0x1000>;
488 renesas,ipmmu-main = <&ipmmu_mm 10>;
489 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
490 #iommu-cells = <1>;
491 };
492
493 ipmmu_vc0: mmu@fe6b0000 {
494 compatible = "renesas,ipmmu-r8a77980";
495 reg = <0 0xfe6b0000 0 0x1000>;
496 renesas,ipmmu-main = <&ipmmu_mm 12>;
497 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
498 #iommu-cells = <1>;
499 };
500
501 ipmmu_vi0: mmu@febd0000 {
502 compatible = "renesas,ipmmu-r8a77980";
503 reg = <0 0xfebd0000 0 0x1000>;
504 renesas,ipmmu-main = <&ipmmu_mm 14>;
505 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
506 #iommu-cells = <1>;
507 };
508
509 avb: ethernet@e6800000 { 552 avb: ethernet@e6800000 {
510 compatible = "renesas,etheravb-r8a77980", 553 compatible = "renesas,etheravb-r8a77980",
511 "renesas,etheravb-rcar-gen3"; 554 "renesas,etheravb-rcar-gen3";
@@ -623,6 +666,313 @@
623 status = "disabled"; 666 status = "disabled";
624 }; 667 };
625 668
669 tpu: pwm@e6e80000 {
670 compatible = "renesas,tpu-r8a77980", "renesas,tpu";
671 reg = <0 0xe6e80000 0 0x148>;
672 interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
673 clocks = <&cpg CPG_MOD 304>;
674 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
675 resets = <&cpg 304>;
676 #pwm-cells = <3>;
677 status = "disabled";
678 };
679
680 vin0: video@e6ef0000 {
681 compatible = "renesas,vin-r8a77980";
682 reg = <0 0xe6ef0000 0 0x1000>;
683 interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
684 clocks = <&cpg CPG_MOD 811>;
685 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
686 resets = <&cpg 811>;
687 status = "disabled";
688
689 ports {
690 #address-cells = <1>;
691 #size-cells = <0>;
692
693 port@1 {
694 #address-cells = <1>;
695 #size-cells = <0>;
696
697 reg = <1>;
698
699 vin0csi40: endpoint@2 {
700 reg = <2>;
701 remote-endpoint = <&csi40vin0>;
702 };
703 };
704 };
705 };
706
707 vin1: video@e6ef1000 {
708 compatible = "renesas,vin-r8a77980";
709 reg = <0 0xe6ef1000 0 0x1000>;
710 interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
711 clocks = <&cpg CPG_MOD 810>;
712 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
713 status = "disabled";
714 resets = <&cpg 810>;
715
716 ports {
717 #address-cells = <1>;
718 #size-cells = <0>;
719
720 port@1 {
721 #address-cells = <1>;
722 #size-cells = <0>;
723
724 reg = <1>;
725
726 vin1csi40: endpoint@2 {
727 reg = <2>;
728 remote-endpoint = <&csi40vin1>;
729 };
730 };
731 };
732 };
733
734 vin2: video@e6ef2000 {
735 compatible = "renesas,vin-r8a77980";
736 reg = <0 0xe6ef2000 0 0x1000>;
737 interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
738 clocks = <&cpg CPG_MOD 809>;
739 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
740 resets = <&cpg 809>;
741 status = "disabled";
742
743 ports {
744 #address-cells = <1>;
745 #size-cells = <0>;
746
747 port@1 {
748 #address-cells = <1>;
749 #size-cells = <0>;
750
751 reg = <1>;
752
753 vin2csi40: endpoint@2 {
754 reg = <2>;
755 remote-endpoint = <&csi40vin2>;
756 };
757 };
758 };
759 };
760
761 vin3: video@e6ef3000 {
762 compatible = "renesas,vin-r8a77980";
763 reg = <0 0xe6ef3000 0 0x1000>;
764 interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
765 clocks = <&cpg CPG_MOD 808>;
766 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
767 resets = <&cpg 808>;
768 status = "disabled";
769
770 ports {
771 #address-cells = <1>;
772 #size-cells = <0>;
773
774 port@1 {
775 #address-cells = <1>;
776 #size-cells = <0>;
777
778 reg = <1>;
779
780 vin3csi40: endpoint@2 {
781 reg = <2>;
782 remote-endpoint = <&csi40vin3>;
783 };
784 };
785 };
786 };
787
788 vin4: video@e6ef4000 {
789 compatible = "renesas,vin-r8a77980";
790 reg = <0 0xe6ef4000 0 0x1000>;
791 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
792 clocks = <&cpg CPG_MOD 807>;
793 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
794 resets = <&cpg 807>;
795 status = "disabled";
796
797 ports {
798 #address-cells = <1>;
799 #size-cells = <0>;
800
801 port@1 {
802 #address-cells = <1>;
803 #size-cells = <0>;
804
805 reg = <1>;
806
807 vin4csi41: endpoint@2 {
808 reg = <2>;
809 remote-endpoint = <&csi41vin4>;
810 };
811 };
812 };
813 };
814
815 vin5: video@e6ef5000 {
816 compatible = "renesas,vin-r8a77980";
817 reg = <0 0xe6ef5000 0 0x1000>;
818 interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
819 clocks = <&cpg CPG_MOD 806>;
820 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
821 resets = <&cpg 806>;
822 status = "disabled";
823
824 ports {
825 #address-cells = <1>;
826 #size-cells = <0>;
827
828 port@1 {
829 #address-cells = <1>;
830 #size-cells = <0>;
831
832 reg = <1>;
833
834 vin5csi41: endpoint@2 {
835 reg = <2>;
836 remote-endpoint = <&csi41vin5>;
837 };
838 };
839 };
840 };
841
842 vin6: video@e6ef6000 {
843 compatible = "renesas,vin-r8a77980";
844 reg = <0 0xe6ef6000 0 0x1000>;
845 interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
846 clocks = <&cpg CPG_MOD 805>;
847 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
848 resets = <&cpg 805>;
849 status = "disabled";
850
851 ports {
852 #address-cells = <1>;
853 #size-cells = <0>;
854
855 port@1 {
856 #address-cells = <1>;
857 #size-cells = <0>;
858
859 reg = <1>;
860
861 vin6csi41: endpoint@2 {
862 reg = <2>;
863 remote-endpoint = <&csi41vin6>;
864 };
865 };
866 };
867 };
868
869 vin7: video@e6ef7000 {
870 compatible = "renesas,vin-r8a77980";
871 reg = <0 0xe6ef7000 0 0x1000>;
872 interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
873 clocks = <&cpg CPG_MOD 804>;
874 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
875 resets = <&cpg 804>;
876 status = "disabled";
877
878 ports {
879 #address-cells = <1>;
880 #size-cells = <0>;
881
882 port@1 {
883 #address-cells = <1>;
884 #size-cells = <0>;
885
886 reg = <1>;
887
888 vin7csi41: endpoint@2 {
889 reg = <2>;
890 remote-endpoint = <&csi41vin7>;
891 };
892 };
893 };
894 };
895
896 vin8: video@e6ef8000 {
897 compatible = "renesas,vin-r8a77980";
898 reg = <0 0xe6ef8000 0 0x1000>;
899 interrupts = <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
900 clocks = <&cpg CPG_MOD 628>;
901 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
902 resets = <&cpg 628>;
903 status = "disabled";
904 };
905
906 vin9: video@e6ef9000 {
907 compatible = "renesas,vin-r8a77980";
908 reg = <0 0xe6ef9000 0 0x1000>;
909 interrupts = <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
910 clocks = <&cpg CPG_MOD 627>;
911 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
912 resets = <&cpg 627>;
913 status = "disabled";
914 };
915
916 vin10: video@e6efa000 {
917 compatible = "renesas,vin-r8a77980";
918 reg = <0 0xe6efa000 0 0x1000>;
919 interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>;
920 clocks = <&cpg CPG_MOD 625>;
921 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
922 resets = <&cpg 625>;
923 status = "disabled";
924 };
925
926 vin11: video@e6efb000 {
927 compatible = "renesas,vin-r8a77980";
928 reg = <0 0xe6efb000 0 0x1000>;
929 interrupts = <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>;
930 clocks = <&cpg CPG_MOD 618>;
931 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
932 resets = <&cpg 618>;
933 status = "disabled";
934 };
935
936 vin12: video@e6efc000 {
937 compatible = "renesas,vin-r8a77980";
938 reg = <0 0xe6efc000 0 0x1000>;
939 interrupts = <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
940 clocks = <&cpg CPG_MOD 612>;
941 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
942 resets = <&cpg 612>;
943 status = "disabled";
944 };
945
946 vin13: video@e6efd000 {
947 compatible = "renesas,vin-r8a77980";
948 reg = <0 0xe6efd000 0 0x1000>;
949 interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
950 clocks = <&cpg CPG_MOD 608>;
951 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
952 resets = <&cpg 608>;
953 status = "disabled";
954 };
955
956 vin14: video@e6efe000 {
957 compatible = "renesas,vin-r8a77980";
958 reg = <0 0xe6efe000 0 0x1000>;
959 interrupts = <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>;
960 clocks = <&cpg CPG_MOD 605>;
961 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
962 resets = <&cpg 605>;
963 status = "disabled";
964 };
965
966 vin15: video@e6eff000 {
967 compatible = "renesas,vin-r8a77980";
968 reg = <0 0xe6eff000 0 0x1000>;
969 interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>;
970 clocks = <&cpg CPG_MOD 604>;
971 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
972 resets = <&cpg 604>;
973 status = "disabled";
974 };
975
626 dmac1: dma-controller@e7300000 { 976 dmac1: dma-controller@e7300000 {
627 compatible = "renesas,dmac-r8a77980", 977 compatible = "renesas,dmac-r8a77980",
628 "renesas,rcar-dmac"; 978 "renesas,rcar-dmac";
@@ -655,6 +1005,14 @@
655 resets = <&cpg 218>; 1005 resets = <&cpg 218>;
656 #dma-cells = <1>; 1006 #dma-cells = <1>;
657 dma-channels = <16>; 1007 dma-channels = <16>;
1008 iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
1009 <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
1010 <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
1011 <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
1012 <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
1013 <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
1014 <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
1015 <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
658 }; 1016 };
659 1017
660 dmac2: dma-controller@e7310000 { 1018 dmac2: dma-controller@e7310000 {
@@ -689,6 +1047,14 @@
689 resets = <&cpg 217>; 1047 resets = <&cpg 217>;
690 #dma-cells = <1>; 1048 #dma-cells = <1>;
691 dma-channels = <16>; 1049 dma-channels = <16>;
1050 iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
1051 <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
1052 <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
1053 <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
1054 <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
1055 <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
1056 <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
1057 <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
692 }; 1058 };
693 1059
694 gether: ethernet@e7400000 { 1060 gether: ethernet@e7400000 {
@@ -703,6 +1069,69 @@
703 status = "disabled"; 1069 status = "disabled";
704 }; 1070 };
705 1071
1072 ipmmu_ds1: mmu@e7740000 {
1073 compatible = "renesas,ipmmu-r8a77980";
1074 reg = <0 0xe7740000 0 0x1000>;
1075 renesas,ipmmu-main = <&ipmmu_mm 0>;
1076 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1077 #iommu-cells = <1>;
1078 };
1079
1080 ipmmu_ir: mmu@ff8b0000 {
1081 compatible = "renesas,ipmmu-r8a77980";
1082 reg = <0 0xff8b0000 0 0x1000>;
1083 renesas,ipmmu-main = <&ipmmu_mm 3>;
1084 power-domains = <&sysc R8A77980_PD_A3IR>;
1085 #iommu-cells = <1>;
1086 };
1087
1088 ipmmu_mm: mmu@e67b0000 {
1089 compatible = "renesas,ipmmu-r8a77980";
1090 reg = <0 0xe67b0000 0 0x1000>;
1091 interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
1092 <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
1093 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1094 #iommu-cells = <1>;
1095 };
1096
1097 ipmmu_rt: mmu@ffc80000 {
1098 compatible = "renesas,ipmmu-r8a77980";
1099 reg = <0 0xffc80000 0 0x1000>;
1100 renesas,ipmmu-main = <&ipmmu_mm 10>;
1101 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1102 #iommu-cells = <1>;
1103 };
1104
1105 ipmmu_vc0: mmu@fe6b0000 {
1106 compatible = "renesas,ipmmu-r8a77980";
1107 reg = <0 0xfe6b0000 0 0x1000>;
1108 renesas,ipmmu-main = <&ipmmu_mm 12>;
1109 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1110 #iommu-cells = <1>;
1111 };
1112
1113 ipmmu_vi0: mmu@febd0000 {
1114 compatible = "renesas,ipmmu-r8a77980";
1115 reg = <0 0xfebd0000 0 0x1000>;
1116 renesas,ipmmu-main = <&ipmmu_mm 14>;
1117 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1118 #iommu-cells = <1>;
1119 };
1120
1121 ipmmu_vip0: mmu@e7b00000 {
1122 compatible = "renesas,ipmmu-r8a77980";
1123 reg = <0 0xe7b00000 0 0x1000>;
1124 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1125 #iommu-cells = <1>;
1126 };
1127
1128 ipmmu_vip1: mmu@e7960000 {
1129 compatible = "renesas,ipmmu-r8a77980";
1130 reg = <0 0xe7960000 0 0x1000>;
1131 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1132 #iommu-cells = <1>;
1133 };
1134
706 mmc0: mmc@ee140000 { 1135 mmc0: mmc@ee140000 {
707 compatible = "renesas,sdhi-r8a77980", 1136 compatible = "renesas,sdhi-r8a77980",
708 "renesas,rcar-gen3-sdhi"; 1137 "renesas,rcar-gen3-sdhi";
@@ -732,6 +1161,38 @@
732 resets = <&cpg 408>; 1161 resets = <&cpg 408>;
733 }; 1162 };
734 1163
1164 pciec: pcie@fe000000 {
1165 compatible = "renesas,pcie-r8a77980",
1166 "renesas,pcie-rcar-gen3";
1167 reg = <0 0xfe000000 0 0x80000>;
1168 #address-cells = <3>;
1169 #size-cells = <2>;
1170 bus-range = <0x00 0xff>;
1171 device_type = "pci";
1172 ranges = <
1173 0x01000000 0 0x00000000 0 0xfe100000 0 0x0100000
1174 0x02000000 0 0xfe200000 0 0xfe200000 0 0x0200000
1175 0x02000000 0 0x30000000 0 0x30000000 0 0x8000000
1176 0x42000000 0 0x38000000 0 0x38000000 0 0x8000000
1177 >;
1178 dma-ranges = <0x42000000 0 0x40000000 0 0x40000000
1179 0 0x80000000>;
1180 interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
1181 <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
1182 <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
1183 #interrupt-cells = <1>;
1184 interrupt-map-mask = <0 0 0 0>;
1185 interrupt-map = <0 0 0 0 &gic GIC_SPI 148
1186 IRQ_TYPE_LEVEL_HIGH>;
1187 clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
1188 clock-names = "pcie", "pcie_bus";
1189 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1190 resets = <&cpg 319>;
1191 phys = <&pcie_phy>;
1192 phy-names = "pcie";
1193 status = "disabled";
1194 };
1195
735 vspd0: vsp@fea20000 { 1196 vspd0: vsp@fea20000 {
736 compatible = "renesas,vsp2"; 1197 compatible = "renesas,vsp2";
737 reg = <0 0xfea20000 0 0x5000>; 1198 reg = <0 0xfea20000 0 0x5000>;
@@ -750,6 +1211,84 @@
750 resets = <&cpg 603>; 1211 resets = <&cpg 603>;
751 }; 1212 };
752 1213
1214 csi40: csi2@feaa0000 {
1215 compatible = "renesas,r8a77980-csi2";
1216 reg = <0 0xfeaa0000 0 0x10000>;
1217 interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
1218 clocks = <&cpg CPG_MOD 716>;
1219 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1220 resets = <&cpg 716>;
1221 status = "disabled";
1222
1223 ports {
1224 #address-cells = <1>;
1225 #size-cells = <0>;
1226
1227 port@1 {
1228 #address-cells = <1>;
1229 #size-cells = <0>;
1230
1231 reg = <1>;
1232
1233 csi40vin0: endpoint@0 {
1234 reg = <0>;
1235 remote-endpoint = <&vin0csi40>;
1236 };
1237 csi40vin1: endpoint@1 {
1238 reg = <1>;
1239 remote-endpoint = <&vin1csi40>;
1240 };
1241 csi40vin2: endpoint@2 {
1242 reg = <2>;
1243 remote-endpoint = <&vin2csi40>;
1244 };
1245 csi40vin3: endpoint@3 {
1246 reg = <3>;
1247 remote-endpoint = <&vin3csi40>;
1248 };
1249 };
1250 };
1251 };
1252
1253 csi41: csi2@feab0000 {
1254 compatible = "renesas,r8a77980-csi2";
1255 reg = <0 0xfeab0000 0 0x10000>;
1256 interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
1257 clocks = <&cpg CPG_MOD 715>;
1258 power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
1259 resets = <&cpg 715>;
1260 status = "disabled";
1261
1262 ports {
1263 #address-cells = <1>;
1264 #size-cells = <0>;
1265
1266 port@1 {
1267 #address-cells = <1>;
1268 #size-cells = <0>;
1269
1270 reg = <1>;
1271
1272 csi41vin4: endpoint@0 {
1273 reg = <0>;
1274 remote-endpoint = <&vin4csi41>;
1275 };
1276 csi41vin5: endpoint@1 {
1277 reg = <1>;
1278 remote-endpoint = <&vin5csi41>;
1279 };
1280 csi41vin6: endpoint@2 {
1281 reg = <2>;
1282 remote-endpoint = <&vin6csi41>;
1283 };
1284 csi41vin7: endpoint@3 {
1285 reg = <3>;
1286 remote-endpoint = <&vin7csi41>;
1287 };
1288 };
1289 };
1290 };
1291
753 du: display@feb00000 { 1292 du: display@feb00000 {
754 compatible = "renesas,du-r8a77980", 1293 compatible = "renesas,du-r8a77980",
755 "renesas,du-r8a77970"; 1294 "renesas,du-r8a77970";
diff --git a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
index 2bc3a4884b00..f342dd85b152 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
@@ -28,6 +28,111 @@
28 /* first 128MB is reserved for secure area. */ 28 /* first 128MB is reserved for secure area. */
29 reg = <0x0 0x48000000 0x0 0x38000000>; 29 reg = <0x0 0x48000000 0x0 0x38000000>;
30 }; 30 };
31
32 cvbs-in {
33 compatible = "composite-video-connector";
34 label = "CVBS IN";
35
36 port {
37 cvbs_con: endpoint {
38 remote-endpoint = <&adv7482_ain7>;
39 };
40 };
41 };
42
43 hdmi-in {
44 compatible = "hdmi-connector";
45 label = "HDMI IN";
46 type = "a";
47
48 port {
49 hdmi_in_con: endpoint {
50 remote-endpoint = <&adv7482_hdmi>;
51 };
52 };
53 };
54
55 hdmi-out {
56 compatible = "hdmi-connector";
57 type = "a";
58
59 port {
60 hdmi_con_out: endpoint {
61 remote-endpoint = <&adv7511_out>;
62 };
63 };
64 };
65
66 lvds-decoder {
67 compatible = "thine,thc63lvd1024";
68 vcc-supply = <&reg_3p3v>;
69
70 ports {
71 #address-cells = <1>;
72 #size-cells = <0>;
73
74 port@0 {
75 reg = <0>;
76 thc63lvd1024_in: endpoint {
77 remote-endpoint = <&lvds0_out>;
78 };
79 };
80
81 port@2 {
82 reg = <2>;
83 thc63lvd1024_out: endpoint {
84 remote-endpoint = <&adv7511_in>;
85 };
86 };
87 };
88 };
89
90 vga {
91 compatible = "vga-connector";
92
93 port {
94 vga_in: endpoint {
95 remote-endpoint = <&adv7123_out>;
96 };
97 };
98 };
99
100 vga-encoder {
101 compatible = "adi,adv7123";
102
103 ports {
104 #address-cells = <1>;
105 #size-cells = <0>;
106
107 port@0 {
108 reg = <0>;
109 adv7123_in: endpoint {
110 remote-endpoint = <&du_out_rgb>;
111 };
112 };
113 port@1 {
114 reg = <1>;
115 adv7123_out: endpoint {
116 remote-endpoint = <&vga_in>;
117 };
118 };
119 };
120 };
121
122 reg_3p3v: regulator1 {
123 compatible = "regulator-fixed";
124 regulator-name = "fixed-3.3V";
125 regulator-min-microvolt = <3300000>;
126 regulator-max-microvolt = <3300000>;
127 regulator-boot-on;
128 regulator-always-on;
129 };
130
131 x13_clk: x13 {
132 compatible = "fixed-clock";
133 #clock-cells = <0>;
134 clock-frequency = <74250000>;
135 };
31}; 136};
32 137
33&avb { 138&avb {
@@ -47,6 +152,41 @@
47 }; 152 };
48}; 153};
49 154
155&csi40 {
156 status = "okay";
157
158 ports {
159 port@0 {
160 reg = <0>;
161
162 csi40_in: endpoint {
163 clock-lanes = <0>;
164 data-lanes = <1 2>;
165 remote-endpoint = <&adv7482_txa>;
166 };
167 };
168 };
169};
170
171&du {
172 pinctrl-0 = <&du_pins>;
173 pinctrl-names = "default";
174 status = "okay";
175
176 clocks = <&cpg CPG_MOD 724>,
177 <&cpg CPG_MOD 723>,
178 <&x13_clk>;
179 clock-names = "du.0", "du.1", "dclkin.0";
180
181 ports {
182 port@0 {
183 endpoint {
184 remote-endpoint = <&adv7123_in>;
185 };
186 };
187 };
188};
189
50&ehci0 { 190&ehci0 {
51 status = "okay"; 191 status = "okay";
52}; 192};
@@ -55,6 +195,105 @@
55 clock-frequency = <48000000>; 195 clock-frequency = <48000000>;
56}; 196};
57 197
198&i2c0 {
199 status = "okay";
200
201 hdmi-encoder@39 {
202 compatible = "adi,adv7511w";
203 reg = <0x39>;
204 interrupt-parent = <&gpio1>;
205 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
206
207 adi,input-depth = <8>;
208 adi,input-colorspace = "rgb";
209 adi,input-clock = "1x";
210 adi,input-style = <1>;
211 adi,input-justification = "evenly";
212
213 ports {
214 #address-cells = <1>;
215 #size-cells = <0>;
216
217 port@0 {
218 reg = <0>;
219 adv7511_in: endpoint {
220 remote-endpoint = <&thc63lvd1024_out>;
221 };
222 };
223
224 port@1 {
225 reg = <1>;
226 adv7511_out: endpoint {
227 remote-endpoint = <&hdmi_con_out>;
228 };
229 };
230 };
231 };
232
233 video-receiver@70 {
234 compatible = "adi,adv7482";
235 reg = <0x70>;
236
237 #address-cells = <1>;
238 #size-cells = <0>;
239
240 interrupt-parent = <&gpio0>;
241 interrupt-names = "intrq1", "intrq2";
242 interrupts = <7 IRQ_TYPE_LEVEL_LOW>,
243 <17 IRQ_TYPE_LEVEL_LOW>;
244
245 port@7 {
246 reg = <7>;
247
248 adv7482_ain7: endpoint {
249 remote-endpoint = <&cvbs_con>;
250 };
251 };
252
253 port@8 {
254 reg = <8>;
255
256 adv7482_hdmi: endpoint {
257 remote-endpoint = <&hdmi_in_con>;
258 };
259 };
260
261 port@a {
262 reg = <0xa>;
263
264 adv7482_txa: endpoint {
265 clock-lanes = <0>;
266 data-lanes = <1 2>;
267 remote-endpoint = <&csi40_in>;
268 };
269 };
270 };
271};
272
273&lvds0 {
274 status = "okay";
275
276 clocks = <&cpg CPG_MOD 727>,
277 <&x13_clk>,
278 <&extal_clk>;
279 clock-names = "fck", "dclkin.0", "extal";
280
281 ports {
282 port@1 {
283 lvds0_out: endpoint {
284 remote-endpoint = <&thc63lvd1024_in>;
285 };
286 };
287 };
288};
289
290&lvds1 {
291 clocks = <&cpg CPG_MOD 727>,
292 <&x13_clk>,
293 <&extal_clk>;
294 clock-names = "fck", "dclkin.0", "extal";
295};
296
58&ohci0 { 297&ohci0 {
59 status = "okay"; 298 status = "okay";
60}; 299};
@@ -67,6 +306,21 @@
67 }; 306 };
68 }; 307 };
69 308
309 du_pins: du {
310 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
311 function = "du";
312 };
313
314 pwm3_pins: pwm3 {
315 groups = "pwm3_b";
316 function = "pwm3";
317 };
318
319 pwm5_pins: pwm5 {
320 groups = "pwm5_a";
321 function = "pwm5";
322 };
323
70 usb0_pins: usb { 324 usb0_pins: usb {
71 groups = "usb0_b"; 325 groups = "usb0_b";
72 function = "usb0"; 326 function = "usb0";
@@ -78,6 +332,20 @@
78 }; 332 };
79}; 333};
80 334
335&pwm3 {
336 pinctrl-0 = <&pwm3_pins>;
337 pinctrl-names = "default";
338
339 status = "okay";
340};
341
342&pwm5 {
343 pinctrl-0 = <&pwm5_pins>;
344 pinctrl-names = "default";
345
346 status = "okay";
347};
348
81&rwdt { 349&rwdt {
82 timeout-sec = <60>; 350 timeout-sec = <60>;
83 status = "okay"; 351 status = "okay";
@@ -94,6 +362,10 @@
94 status = "okay"; 362 status = "okay";
95}; 363};
96 364
365&vin4 {
366 status = "okay";
367};
368
97&xhci0 { 369&xhci0 {
98 pinctrl-0 = <&usb30_pins>; 370 pinctrl-0 = <&usb30_pins>;
99 pinctrl-names = "default"; 371 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index ae89260baad9..9509dc05665f 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -1,11 +1,11 @@
1/* SPDX-License-Identifier: GPL-2.0 */ 1/* SPDX-License-Identifier: GPL-2.0 */
2/* 2/*
3 * Device Tree Source for the r8a77990 SoC 3 * Device Tree Source for the R-Car E3 (R8A77990) SoC
4 * 4 *
5 * Copyright (C) 2018 Renesas Electronics Corp. 5 * Copyright (C) 2018 Renesas Electronics Corp.
6 */ 6 */
7 7
8#include <dt-bindings/clock/renesas-cpg-mssr.h> 8#include <dt-bindings/clock/r8a77990-cpg-mssr.h>
9#include <dt-bindings/interrupt-controller/arm-gic.h> 9#include <dt-bindings/interrupt-controller/arm-gic.h>
10#include <dt-bindings/power/r8a77990-sysc.h> 10#include <dt-bindings/power/r8a77990-sysc.h>
11 11
@@ -14,6 +14,17 @@
14 #address-cells = <2>; 14 #address-cells = <2>;
15 #size-cells = <2>; 15 #size-cells = <2>;
16 16
17 aliases {
18 i2c0 = &i2c0;
19 i2c1 = &i2c1;
20 i2c2 = &i2c2;
21 i2c3 = &i2c3;
22 i2c4 = &i2c4;
23 i2c5 = &i2c5;
24 i2c6 = &i2c6;
25 i2c7 = &i2c7;
26 };
27
17 cpus { 28 cpus {
18 #address-cells = <1>; 29 #address-cells = <1>;
19 #size-cells = <0>; 30 #size-cells = <0>;
@@ -22,7 +33,7 @@
22 compatible = "arm,cortex-a53", "arm,armv8"; 33 compatible = "arm,cortex-a53", "arm,armv8";
23 reg = <0>; 34 reg = <0>;
24 device_type = "cpu"; 35 device_type = "cpu";
25 power-domains = <&sysc 5>; 36 power-domains = <&sysc R8A77990_PD_CA53_CPU0>;
26 next-level-cache = <&L2_CA53>; 37 next-level-cache = <&L2_CA53>;
27 enable-method = "psci"; 38 enable-method = "psci";
28 }; 39 };
@@ -31,14 +42,14 @@
31 compatible = "arm,cortex-a53", "arm,armv8"; 42 compatible = "arm,cortex-a53", "arm,armv8";
32 reg = <1>; 43 reg = <1>;
33 device_type = "cpu"; 44 device_type = "cpu";
34 power-domains = <&sysc 6>; 45 power-domains = <&sysc R8A77990_PD_CA53_CPU1>;
35 next-level-cache = <&L2_CA53>; 46 next-level-cache = <&L2_CA53>;
36 enable-method = "psci"; 47 enable-method = "psci";
37 }; 48 };
38 49
39 L2_CA53: cache-controller-0 { 50 L2_CA53: cache-controller-0 {
40 compatible = "cache"; 51 compatible = "cache";
41 power-domains = <&sysc 21>; 52 power-domains = <&sysc R8A77990_PD_CA53_SCU>;
42 cache-unified; 53 cache-unified;
43 cache-level = <2>; 54 cache-level = <2>;
44 }; 55 };
@@ -63,6 +74,13 @@
63 method = "smc"; 74 method = "smc";
64 }; 75 };
65 76
77 /* External SCIF clock - to be overridden by boards that provide it */
78 scif_clk: scif {
79 compatible = "fixed-clock";
80 #clock-cells = <0>;
81 clock-frequency = <0>;
82 };
83
66 soc: soc { 84 soc: soc {
67 compatible = "simple-bus"; 85 compatible = "simple-bus";
68 interrupt-parent = <&gic>; 86 interrupt-parent = <&gic>;
@@ -75,7 +93,7 @@
75 "renesas,rcar-gen3-wdt"; 93 "renesas,rcar-gen3-wdt";
76 reg = <0 0xe6020000 0 0x0c>; 94 reg = <0 0xe6020000 0 0x0c>;
77 clocks = <&cpg CPG_MOD 402>; 95 clocks = <&cpg CPG_MOD 402>;
78 power-domains = <&sysc 32>; 96 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
79 resets = <&cpg 402>; 97 resets = <&cpg 402>;
80 status = "disabled"; 98 status = "disabled";
81 }; 99 };
@@ -91,7 +109,7 @@
91 #interrupt-cells = <2>; 109 #interrupt-cells = <2>;
92 interrupt-controller; 110 interrupt-controller;
93 clocks = <&cpg CPG_MOD 912>; 111 clocks = <&cpg CPG_MOD 912>;
94 power-domains = <&sysc 32>; 112 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
95 resets = <&cpg 912>; 113 resets = <&cpg 912>;
96 }; 114 };
97 115
@@ -106,7 +124,7 @@
106 #interrupt-cells = <2>; 124 #interrupt-cells = <2>;
107 interrupt-controller; 125 interrupt-controller;
108 clocks = <&cpg CPG_MOD 911>; 126 clocks = <&cpg CPG_MOD 911>;
109 power-domains = <&sysc 32>; 127 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
110 resets = <&cpg 911>; 128 resets = <&cpg 911>;
111 }; 129 };
112 130
@@ -121,7 +139,7 @@
121 #interrupt-cells = <2>; 139 #interrupt-cells = <2>;
122 interrupt-controller; 140 interrupt-controller;
123 clocks = <&cpg CPG_MOD 910>; 141 clocks = <&cpg CPG_MOD 910>;
124 power-domains = <&sysc 32>; 142 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
125 resets = <&cpg 910>; 143 resets = <&cpg 910>;
126 }; 144 };
127 145
@@ -136,7 +154,7 @@
136 #interrupt-cells = <2>; 154 #interrupt-cells = <2>;
137 interrupt-controller; 155 interrupt-controller;
138 clocks = <&cpg CPG_MOD 909>; 156 clocks = <&cpg CPG_MOD 909>;
139 power-domains = <&sysc 32>; 157 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
140 resets = <&cpg 909>; 158 resets = <&cpg 909>;
141 }; 159 };
142 160
@@ -151,7 +169,7 @@
151 #interrupt-cells = <2>; 169 #interrupt-cells = <2>;
152 interrupt-controller; 170 interrupt-controller;
153 clocks = <&cpg CPG_MOD 908>; 171 clocks = <&cpg CPG_MOD 908>;
154 power-domains = <&sysc 32>; 172 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
155 resets = <&cpg 908>; 173 resets = <&cpg 908>;
156 }; 174 };
157 175
@@ -166,7 +184,7 @@
166 #interrupt-cells = <2>; 184 #interrupt-cells = <2>;
167 interrupt-controller; 185 interrupt-controller;
168 clocks = <&cpg CPG_MOD 907>; 186 clocks = <&cpg CPG_MOD 907>;
169 power-domains = <&sysc 32>; 187 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
170 resets = <&cpg 907>; 188 resets = <&cpg 907>;
171 }; 189 };
172 190
@@ -181,10 +199,122 @@
181 #interrupt-cells = <2>; 199 #interrupt-cells = <2>;
182 interrupt-controller; 200 interrupt-controller;
183 clocks = <&cpg CPG_MOD 906>; 201 clocks = <&cpg CPG_MOD 906>;
184 power-domains = <&sysc 32>; 202 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
185 resets = <&cpg 906>; 203 resets = <&cpg 906>;
186 }; 204 };
187 205
206 i2c0: i2c@e6500000 {
207 #address-cells = <1>;
208 #size-cells = <0>;
209 compatible = "renesas,i2c-r8a77990",
210 "renesas,rcar-gen3-i2c";
211 reg = <0 0xe6500000 0 0x40>;
212 interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
213 clocks = <&cpg CPG_MOD 931>;
214 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
215 resets = <&cpg 931>;
216 i2c-scl-internal-delay-ns = <110>;
217 status = "disabled";
218 };
219
220 i2c1: i2c@e6508000 {
221 #address-cells = <1>;
222 #size-cells = <0>;
223 compatible = "renesas,i2c-r8a77990",
224 "renesas,rcar-gen3-i2c";
225 reg = <0 0xe6508000 0 0x40>;
226 interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
227 clocks = <&cpg CPG_MOD 930>;
228 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
229 resets = <&cpg 930>;
230 i2c-scl-internal-delay-ns = <6>;
231 status = "disabled";
232 };
233
234 i2c2: i2c@e6510000 {
235 #address-cells = <1>;
236 #size-cells = <0>;
237 compatible = "renesas,i2c-r8a77990",
238 "renesas,rcar-gen3-i2c";
239 reg = <0 0xe6510000 0 0x40>;
240 interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
241 clocks = <&cpg CPG_MOD 929>;
242 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
243 resets = <&cpg 929>;
244 i2c-scl-internal-delay-ns = <6>;
245 status = "disabled";
246 };
247
248 i2c3: i2c@e66d0000 {
249 #address-cells = <1>;
250 #size-cells = <0>;
251 compatible = "renesas,i2c-r8a77990",
252 "renesas,rcar-gen3-i2c";
253 reg = <0 0xe66d0000 0 0x40>;
254 interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
255 clocks = <&cpg CPG_MOD 928>;
256 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
257 resets = <&cpg 928>;
258 i2c-scl-internal-delay-ns = <110>;
259 status = "disabled";
260 };
261
262 i2c4: i2c@e66d8000 {
263 #address-cells = <1>;
264 #size-cells = <0>;
265 compatible = "renesas,i2c-r8a77990",
266 "renesas,rcar-gen3-i2c";
267 reg = <0 0xe66d8000 0 0x40>;
268 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
269 clocks = <&cpg CPG_MOD 927>;
270 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
271 resets = <&cpg 927>;
272 i2c-scl-internal-delay-ns = <6>;
273 status = "disabled";
274 };
275
276 i2c5: i2c@e66e0000 {
277 #address-cells = <1>;
278 #size-cells = <0>;
279 compatible = "renesas,i2c-r8a77990",
280 "renesas,rcar-gen3-i2c";
281 reg = <0 0xe66e0000 0 0x40>;
282 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
283 clocks = <&cpg CPG_MOD 919>;
284 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
285 resets = <&cpg 919>;
286 i2c-scl-internal-delay-ns = <6>;
287 status = "disabled";
288 };
289
290 i2c6: i2c@e66e8000 {
291 #address-cells = <1>;
292 #size-cells = <0>;
293 compatible = "renesas,i2c-r8a77990",
294 "renesas,rcar-gen3-i2c";
295 reg = <0 0xe66e8000 0 0x40>;
296 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
297 clocks = <&cpg CPG_MOD 918>;
298 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
299 resets = <&cpg 918>;
300 i2c-scl-internal-delay-ns = <6>;
301 status = "disabled";
302 };
303
304 i2c7: i2c@e6690000 {
305 #address-cells = <1>;
306 #size-cells = <0>;
307 compatible = "renesas,i2c-r8a77990",
308 "renesas,rcar-gen3-i2c";
309 reg = <0 0xe6690000 0 0x40>;
310 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
311 clocks = <&cpg CPG_MOD 1003>;
312 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
313 resets = <&cpg 1003>;
314 i2c-scl-internal-delay-ns = <6>;
315 status = "disabled";
316 };
317
188 pfc: pin-controller@e6060000 { 318 pfc: pin-controller@e6060000 {
189 compatible = "renesas,pfc-r8a77990"; 319 compatible = "renesas,pfc-r8a77990";
190 reg = <0 0xe6060000 0 0x508>; 320 reg = <0 0xe6060000 0 0x508>;
@@ -211,6 +341,132 @@
211 #power-domain-cells = <1>; 341 #power-domain-cells = <1>;
212 }; 342 };
213 343
344 dmac0: dma-controller@e6700000 {
345 compatible = "renesas,dmac-r8a77990",
346 "renesas,rcar-dmac";
347 reg = <0 0xe6700000 0 0x10000>;
348 interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
349 GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
350 GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
351 GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
352 GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
353 GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
354 GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
355 GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
356 GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
357 GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
358 GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
359 GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
360 GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
361 GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
362 GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
363 GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
364 GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
365 interrupt-names = "error",
366 "ch0", "ch1", "ch2", "ch3",
367 "ch4", "ch5", "ch6", "ch7",
368 "ch8", "ch9", "ch10", "ch11",
369 "ch12", "ch13", "ch14", "ch15";
370 clocks = <&cpg CPG_MOD 219>;
371 clock-names = "fck";
372 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
373 resets = <&cpg 219>;
374 #dma-cells = <1>;
375 dma-channels = <16>;
376 iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
377 <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
378 <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
379 <&ipmmu_ds0 6>, <&ipmmu_ds0 7>,
380 <&ipmmu_ds0 8>, <&ipmmu_ds0 9>,
381 <&ipmmu_ds0 10>, <&ipmmu_ds0 11>,
382 <&ipmmu_ds0 12>, <&ipmmu_ds0 13>,
383 <&ipmmu_ds0 14>, <&ipmmu_ds0 15>;
384 };
385
386 dmac1: dma-controller@e7300000 {
387 compatible = "renesas,dmac-r8a77990",
388 "renesas,rcar-dmac";
389 reg = <0 0xe7300000 0 0x10000>;
390 interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
391 GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
392 GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
393 GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
394 GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
395 GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
396 GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
397 GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
398 GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
399 GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
400 GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
401 GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
402 GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
403 GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
404 GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
405 GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
406 GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
407 interrupt-names = "error",
408 "ch0", "ch1", "ch2", "ch3",
409 "ch4", "ch5", "ch6", "ch7",
410 "ch8", "ch9", "ch10", "ch11",
411 "ch12", "ch13", "ch14", "ch15";
412 clocks = <&cpg CPG_MOD 218>;
413 clock-names = "fck";
414 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
415 resets = <&cpg 218>;
416 #dma-cells = <1>;
417 dma-channels = <16>;
418 iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
419 <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
420 <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
421 <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
422 <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
423 <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
424 <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
425 <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
426 };
427
428 dmac2: dma-controller@e7310000 {
429 compatible = "renesas,dmac-r8a77990",
430 "renesas,rcar-dmac";
431 reg = <0 0xe7310000 0 0x10000>;
432 interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
433 GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
434 GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
435 GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
436 GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
437 GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
438 GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
439 GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
440 GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
441 GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
442 GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
443 GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
444 GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
445 GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
446 GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
447 GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
448 GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
449 interrupt-names = "error",
450 "ch0", "ch1", "ch2", "ch3",
451 "ch4", "ch5", "ch6", "ch7",
452 "ch8", "ch9", "ch10", "ch11",
453 "ch12", "ch13", "ch14", "ch15";
454 clocks = <&cpg CPG_MOD 217>;
455 clock-names = "fck";
456 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
457 resets = <&cpg 217>;
458 #dma-cells = <1>;
459 dma-channels = <16>;
460 iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
461 <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
462 <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
463 <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
464 <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
465 <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
466 <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
467 <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
468 };
469
214 ipmmu_ds0: mmu@e6740000 { 470 ipmmu_ds0: mmu@e6740000 {
215 compatible = "renesas,ipmmu-r8a77990"; 471 compatible = "renesas,ipmmu-r8a77990";
216 reg = <0 0xe6740000 0 0x1000>; 472 reg = <0 0xe6740000 0 0x1000>;
@@ -329,7 +585,7 @@
329 "ch20", "ch21", "ch22", "ch23", 585 "ch20", "ch21", "ch22", "ch23",
330 "ch24"; 586 "ch24";
331 clocks = <&cpg CPG_MOD 812>; 587 clocks = <&cpg CPG_MOD 812>;
332 power-domains = <&sysc 32>; 588 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
333 resets = <&cpg 812>; 589 resets = <&cpg 812>;
334 phy-mode = "rgmii"; 590 phy-mode = "rgmii";
335 #address-cells = <1>; 591 #address-cells = <1>;
@@ -337,18 +593,191 @@
337 status = "disabled"; 593 status = "disabled";
338 }; 594 };
339 595
596 pwm0: pwm@e6e30000 {
597 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
598 reg = <0 0xe6e30000 0 0x8>;
599 clocks = <&cpg CPG_MOD 523>;
600 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
601 resets = <&cpg 523>;
602 #pwm-cells = <2>;
603 status = "disabled";
604 };
605
606 pwm1: pwm@e6e31000 {
607 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
608 reg = <0 0xe6e31000 0 0x8>;
609 clocks = <&cpg CPG_MOD 523>;
610 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
611 resets = <&cpg 523>;
612 #pwm-cells = <2>;
613 status = "disabled";
614 };
615
616 pwm2: pwm@e6e32000 {
617 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
618 reg = <0 0xe6e32000 0 0x8>;
619 clocks = <&cpg CPG_MOD 523>;
620 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
621 resets = <&cpg 523>;
622 #pwm-cells = <2>;
623 status = "disabled";
624 };
625
626 pwm3: pwm@e6e33000 {
627 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
628 reg = <0 0xe6e33000 0 0x8>;
629 clocks = <&cpg CPG_MOD 523>;
630 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
631 resets = <&cpg 523>;
632 #pwm-cells = <2>;
633 status = "disabled";
634 };
635
636 pwm4: pwm@e6e34000 {
637 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
638 reg = <0 0xe6e34000 0 0x8>;
639 clocks = <&cpg CPG_MOD 523>;
640 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
641 resets = <&cpg 523>;
642 #pwm-cells = <2>;
643 status = "disabled";
644 };
645
646 pwm5: pwm@e6e35000 {
647 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
648 reg = <0 0xe6e35000 0 0x8>;
649 clocks = <&cpg CPG_MOD 523>;
650 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
651 resets = <&cpg 523>;
652 #pwm-cells = <2>;
653 status = "disabled";
654 };
655
656 pwm6: pwm@e6e36000 {
657 compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
658 reg = <0 0xe6e36000 0 0x8>;
659 clocks = <&cpg CPG_MOD 523>;
660 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
661 resets = <&cpg 523>;
662 #pwm-cells = <2>;
663 status = "disabled";
664 };
665
340 scif2: serial@e6e88000 { 666 scif2: serial@e6e88000 {
341 compatible = "renesas,scif-r8a77990", 667 compatible = "renesas,scif-r8a77990",
342 "renesas,rcar-gen3-scif", "renesas,scif"; 668 "renesas,rcar-gen3-scif", "renesas,scif";
343 reg = <0 0xe6e88000 0 64>; 669 reg = <0 0xe6e88000 0 64>;
344 interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; 670 interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
345 clocks = <&cpg CPG_MOD 310>; 671 clocks = <&cpg CPG_MOD 310>,
346 clock-names = "fck"; 672 <&cpg CPG_CORE R8A77990_CLK_S3D1C>,
347 power-domains = <&sysc 32>; 673 <&scif_clk>;
674 clock-names = "fck", "brg_int", "scif_clk";
675
676 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
348 resets = <&cpg 310>; 677 resets = <&cpg 310>;
349 status = "disabled"; 678 status = "disabled";
350 }; 679 };
351 680
681 msiof0: spi@e6e90000 {
682 compatible = "renesas,msiof-r8a77990",
683 "renesas,rcar-gen3-msiof";
684 reg = <0 0xe6e90000 0 0x0064>;
685 interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
686 clocks = <&cpg CPG_MOD 211>;
687 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
688 resets = <&cpg 211>;
689 #address-cells = <1>;
690 #size-cells = <0>;
691 status = "disabled";
692 };
693
694 msiof1: spi@e6ea0000 {
695 compatible = "renesas,msiof-r8a77990",
696 "renesas,rcar-gen3-msiof";
697 reg = <0 0xe6ea0000 0 0x0064>;
698 interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
699 clocks = <&cpg CPG_MOD 210>;
700 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
701 resets = <&cpg 210>;
702 #address-cells = <1>;
703 #size-cells = <0>;
704 status = "disabled";
705 };
706
707 msiof2: spi@e6c00000 {
708 compatible = "renesas,msiof-r8a77990",
709 "renesas,rcar-gen3-msiof";
710 reg = <0 0xe6c00000 0 0x0064>;
711 interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
712 clocks = <&cpg CPG_MOD 209>;
713 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
714 resets = <&cpg 209>;
715 #address-cells = <1>;
716 #size-cells = <0>;
717 status = "disabled";
718 };
719
720 msiof3: spi@e6c10000 {
721 compatible = "renesas,msiof-r8a77990",
722 "renesas,rcar-gen3-msiof";
723 reg = <0 0xe6c10000 0 0x0064>;
724 interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
725 clocks = <&cpg CPG_MOD 208>;
726 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
727 resets = <&cpg 208>;
728 #address-cells = <1>;
729 #size-cells = <0>;
730 status = "disabled";
731 };
732
733 vin4: video@e6ef4000 {
734 compatible = "renesas,vin-r8a77990";
735 reg = <0 0xe6ef4000 0 0x1000>;
736 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
737 clocks = <&cpg CPG_MOD 807>;
738 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
739 resets = <&cpg 807>;
740 renesas,id = <4>;
741 status = "disabled";
742
743 ports {
744 #address-cells = <1>;
745 #size-cells = <0>;
746
747 port@1 {
748 reg = <1>;
749
750 vin4csi40: endpoint {
751 remote-endpoint= <&csi40vin4>;
752 };
753 };
754 };
755 };
756
757 vin5: video@e6ef5000 {
758 compatible = "renesas,vin-r8a77990";
759 reg = <0 0xe6ef5000 0 0x1000>;
760 interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
761 clocks = <&cpg CPG_MOD 806>;
762 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
763 resets = <&cpg 806>;
764 renesas,id = <5>;
765 status = "disabled";
766
767 ports {
768 #address-cells = <1>;
769 #size-cells = <0>;
770
771 port@1 {
772 reg = <1>;
773
774 vin5csi40: endpoint {
775 remote-endpoint= <&csi40vin5>;
776 };
777 };
778 };
779 };
780
352 xhci0: usb@ee000000 { 781 xhci0: usb@ee000000 {
353 compatible = "renesas,xhci-r8a77990", 782 compatible = "renesas,xhci-r8a77990",
354 "renesas,rcar-gen3-xhci"; 783 "renesas,rcar-gen3-xhci";
@@ -364,11 +793,11 @@
364 compatible = "generic-ohci"; 793 compatible = "generic-ohci";
365 reg = <0 0xee080000 0 0x100>; 794 reg = <0 0xee080000 0 0x100>;
366 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 795 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
367 clocks = <&cpg CPG_MOD 703>; 796 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
368 phys = <&usb2_phy0>; 797 phys = <&usb2_phy0>;
369 phy-names = "usb"; 798 phy-names = "usb";
370 power-domains = <&sysc 32>; 799 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
371 resets = <&cpg 703>; 800 resets = <&cpg 703>, <&cpg 704>;
372 status = "disabled"; 801 status = "disabled";
373 }; 802 };
374 803
@@ -376,12 +805,12 @@
376 compatible = "generic-ehci"; 805 compatible = "generic-ehci";
377 reg = <0 0xee080100 0 0x100>; 806 reg = <0 0xee080100 0 0x100>;
378 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 807 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
379 clocks = <&cpg CPG_MOD 703>; 808 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
380 phys = <&usb2_phy0>; 809 phys = <&usb2_phy0>;
381 phy-names = "usb"; 810 phy-names = "usb";
382 companion = <&ohci0>; 811 companion = <&ohci0>;
383 power-domains = <&sysc 32>; 812 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
384 resets = <&cpg 703>; 813 resets = <&cpg 703>, <&cpg 704>;
385 status = "disabled"; 814 status = "disabled";
386 }; 815 };
387 816
@@ -390,9 +819,9 @@
390 "renesas,rcar-gen3-usb2-phy"; 819 "renesas,rcar-gen3-usb2-phy";
391 reg = <0 0xee080200 0 0x700>; 820 reg = <0 0xee080200 0 0x700>;
392 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 821 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
393 clocks = <&cpg CPG_MOD 703>; 822 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
394 power-domains = <&sysc 32>; 823 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
395 resets = <&cpg 703>; 824 resets = <&cpg 703>, <&cpg 704>;
396 #phy-cells = <0>; 825 #phy-cells = <0>;
397 status = "disabled"; 826 status = "disabled";
398 }; 827 };
@@ -410,10 +839,208 @@
410 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>; 839 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
411 clocks = <&cpg CPG_MOD 408>; 840 clocks = <&cpg CPG_MOD 408>;
412 clock-names = "clk"; 841 clock-names = "clk";
413 power-domains = <&sysc 32>; 842 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
414 resets = <&cpg 408>; 843 resets = <&cpg 408>;
415 }; 844 };
416 845
846 vspb0: vsp@fe960000 {
847 compatible = "renesas,vsp2";
848 reg = <0 0xfe960000 0 0x8000>;
849 interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
850 clocks = <&cpg CPG_MOD 626>;
851 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
852 resets = <&cpg 626>;
853 renesas,fcp = <&fcpvb0>;
854 };
855
856 fcpvb0: fcp@fe96f000 {
857 compatible = "renesas,fcpv";
858 reg = <0 0xfe96f000 0 0x200>;
859 clocks = <&cpg CPG_MOD 607>;
860 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
861 resets = <&cpg 607>;
862 iommus = <&ipmmu_vp0 5>;
863 };
864
865 vspi0: vsp@fe9a0000 {
866 compatible = "renesas,vsp2";
867 reg = <0 0xfe9a0000 0 0x8000>;
868 interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
869 clocks = <&cpg CPG_MOD 631>;
870 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
871 resets = <&cpg 631>;
872 renesas,fcp = <&fcpvi0>;
873 };
874
875 fcpvi0: fcp@fe9af000 {
876 compatible = "renesas,fcpv";
877 reg = <0 0xfe9af000 0 0x200>;
878 clocks = <&cpg CPG_MOD 611>;
879 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
880 resets = <&cpg 611>;
881 iommus = <&ipmmu_vp0 8>;
882 };
883
884 vspd0: vsp@fea20000 {
885 compatible = "renesas,vsp2";
886 reg = <0 0xfea20000 0 0x7000>;
887 interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>;
888 clocks = <&cpg CPG_MOD 623>;
889 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
890 resets = <&cpg 623>;
891 renesas,fcp = <&fcpvd0>;
892 };
893
894 fcpvd0: fcp@fea27000 {
895 compatible = "renesas,fcpv";
896 reg = <0 0xfea27000 0 0x200>;
897 clocks = <&cpg CPG_MOD 603>;
898 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
899 resets = <&cpg 603>;
900 iommus = <&ipmmu_vi0 8>;
901 };
902
903 vspd1: vsp@fea28000 {
904 compatible = "renesas,vsp2";
905 reg = <0 0xfea28000 0 0x7000>;
906 interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>;
907 clocks = <&cpg CPG_MOD 622>;
908 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
909 resets = <&cpg 622>;
910 renesas,fcp = <&fcpvd1>;
911 };
912
913 fcpvd1: fcp@fea2f000 {
914 compatible = "renesas,fcpv";
915 reg = <0 0xfea2f000 0 0x200>;
916 clocks = <&cpg CPG_MOD 602>;
917 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
918 resets = <&cpg 602>;
919 iommus = <&ipmmu_vi0 9>;
920 };
921
922 csi40: csi2@feaa0000 {
923 compatible = "renesas,r8a77990-csi2", "renesas,rcar-gen3-csi2";
924 reg = <0 0xfeaa0000 0 0x10000>;
925 interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
926 clocks = <&cpg CPG_MOD 716>;
927 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
928 resets = <&cpg 716>;
929 status = "disabled";
930
931 ports {
932 #address-cells = <1>;
933 #size-cells = <0>;
934
935 port@1 {
936 #address-cells = <1>;
937 #size-cells = <0>;
938
939 reg = <1>;
940
941 csi40vin4: endpoint@0 {
942 reg = <0>;
943 remote-endpoint = <&vin4csi40>;
944 };
945 csi40vin5: endpoint@1 {
946 reg = <1>;
947 remote-endpoint = <&vin5csi40>;
948 };
949 };
950 };
951 };
952
953 du: display@feb00000 {
954 compatible = "renesas,du-r8a77990";
955 reg = <0 0xfeb00000 0 0x80000>;
956 interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
957 <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
958 clocks = <&cpg CPG_MOD 724>,
959 <&cpg CPG_MOD 723>;
960 clock-names = "du.0", "du.1";
961 vsps = <&vspd0 0 &vspd1 0>;
962 status = "disabled";
963
964 ports {
965 #address-cells = <1>;
966 #size-cells = <0>;
967
968 port@0 {
969 reg = <0>;
970 du_out_rgb: endpoint {
971 };
972 };
973
974 port@1 {
975 reg = <1>;
976 du_out_lvds0: endpoint {
977 remote-endpoint = <&lvds0_in>;
978 };
979 };
980
981 port@2 {
982 reg = <2>;
983 du_out_lvds1: endpoint {
984 remote-endpoint = <&lvds1_in>;
985 };
986 };
987 };
988 };
989
990 lvds0: lvds-encoder@feb90000 {
991 compatible = "renesas,r8a77990-lvds";
992 reg = <0 0xfeb90000 0 0x20>;
993 clocks = <&cpg CPG_MOD 727>;
994 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
995 resets = <&cpg 727>;
996 status = "disabled";
997
998 ports {
999 #address-cells = <1>;
1000 #size-cells = <0>;
1001
1002 port@0 {
1003 reg = <0>;
1004 lvds0_in: endpoint {
1005 remote-endpoint = <&du_out_lvds0>;
1006 };
1007 };
1008
1009 port@1 {
1010 reg = <1>;
1011 lvds0_out: endpoint {
1012 };
1013 };
1014 };
1015 };
1016
1017 lvds1: lvds-encoder@feb90100 {
1018 compatible = "renesas,r8a77990-lvds";
1019 reg = <0 0xfeb90100 0 0x20>;
1020 clocks = <&cpg CPG_MOD 727>;
1021 power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
1022 resets = <&cpg 726>;
1023 status = "disabled";
1024
1025 ports {
1026 #address-cells = <1>;
1027 #size-cells = <0>;
1028
1029 port@0 {
1030 reg = <0>;
1031 lvds1_in: endpoint {
1032 remote-endpoint = <&du_out_lvds1>;
1033 };
1034 };
1035
1036 port@1 {
1037 reg = <1>;
1038 lvds1_out: endpoint {
1039 };
1040 };
1041 };
1042 };
1043
417 prr: chipid@fff00044 { 1044 prr: chipid@fff00044 {
418 compatible = "renesas,prr"; 1045 compatible = "renesas,prr";
419 reg = <0 0xfff00044 0 4>; 1046 reg = <0 0xfff00044 0 4>;
diff --git a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
index a8e8f2669d4c..2405eaad0296 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77995-draak.dts
@@ -2,7 +2,7 @@
2/* 2/*
3 * Device Tree Source for the Draak board 3 * Device Tree Source for the Draak board
4 * 4 *
5 * Copyright (C) 2016 Renesas Electronics Corp. 5 * Copyright (C) 2016-2018 Renesas Electronics Corp.
6 * Copyright (C) 2017 Glider bvba 6 * Copyright (C) 2017 Glider bvba
7 */ 7 */
8 8
@@ -24,55 +24,58 @@
24 stdout-path = "serial0:115200n8"; 24 stdout-path = "serial0:115200n8";
25 }; 25 };
26 26
27 vga { 27 composite-in {
28 compatible = "vga-connector"; 28 compatible = "composite-video-connector";
29 29
30 port { 30 port {
31 vga_in: endpoint { 31 composite_con_in: endpoint {
32 remote-endpoint = <&adv7123_out>; 32 remote-endpoint = <&adv7180_in>;
33 }; 33 };
34 }; 34 };
35 }; 35 };
36 36
37 vga-encoder { 37 hdmi-in {
38 compatible = "adi,adv7123"; 38 compatible = "hdmi-connector";
39 39 type = "a";
40 ports {
41 #address-cells = <1>;
42 #size-cells = <0>;
43 40
44 port@0 { 41 port {
45 reg = <0>; 42 hdmi_con_in: endpoint {
46 adv7123_in: endpoint { 43 remote-endpoint = <&adv7612_in>;
47 remote-endpoint = <&du_out_rgb>;
48 };
49 };
50 port@1 {
51 reg = <1>;
52 adv7123_out: endpoint {
53 remote-endpoint = <&vga_in>;
54 };
55 }; 44 };
56 }; 45 };
57 }; 46 };
58 47
59 composite-in { 48 hdmi-out {
60 compatible = "composite-video-connector"; 49 compatible = "hdmi-connector";
50 type = "a";
61 51
62 port { 52 port {
63 composite_con_in: endpoint { 53 hdmi_con_out: endpoint {
64 remote-endpoint = <&adv7180_in>; 54 remote-endpoint = <&adv7511_out>;
65 }; 55 };
66 }; 56 };
67 }; 57 };
68 58
69 hdmi-in { 59 lvds-decoder {
70 compatible = "hdmi-connector"; 60 compatible = "thine,thc63lvd1024";
71 type = "a"; 61 vcc-supply = <&reg_3p3v>;
72 62
73 port { 63 ports {
74 hdmi_con_in: endpoint { 64 #address-cells = <1>;
75 remote-endpoint = <&adv7612_in>; 65 #size-cells = <0>;
66
67 port@0 {
68 reg = <0>;
69 thc63lvd1024_in: endpoint {
70 remote-endpoint = <&lvds0_out>;
71 };
72 };
73
74 port@2 {
75 reg = <2>;
76 thc63lvd1024_out: endpoint {
77 remote-endpoint = <&adv7511_in>;
78 };
76 }; 79 };
77 }; 80 };
78 }; 81 };
@@ -101,76 +104,86 @@
101 regulator-always-on; 104 regulator-always-on;
102 }; 105 };
103 106
104 x12_clk: x12 { 107 vga {
105 compatible = "fixed-clock"; 108 compatible = "vga-connector";
106 #clock-cells = <0>;
107 clock-frequency = <74250000>;
108 };
109};
110
111&extal_clk {
112 clock-frequency = <48000000>;
113};
114 109
115&pfc { 110 port {
116 avb0_pins: avb { 111 vga_in: endpoint {
117 mux { 112 remote-endpoint = <&adv7123_out>;
118 groups = "avb0_link", "avb0_mdio", "avb0_mii"; 113 };
119 function = "avb0";
120 }; 114 };
121 }; 115 };
122 116
123 du_pins: du { 117 vga-encoder {
124 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; 118 compatible = "adi,adv7123";
125 function = "du";
126 };
127 119
128 i2c0_pins: i2c0 { 120 ports {
129 groups = "i2c0"; 121 #address-cells = <1>;
130 function = "i2c0"; 122 #size-cells = <0>;
131 };
132 123
133 i2c1_pins: i2c1 { 124 port@0 {
134 groups = "i2c1"; 125 reg = <0>;
135 function = "i2c1"; 126 adv7123_in: endpoint {
127 remote-endpoint = <&du_out_rgb>;
128 };
129 };
130 port@1 {
131 reg = <1>;
132 adv7123_out: endpoint {
133 remote-endpoint = <&vga_in>;
134 };
135 };
136 };
136 }; 137 };
137 138
138 pwm0_pins: pwm0 { 139 x12_clk: x12 {
139 groups = "pwm0_c"; 140 compatible = "fixed-clock";
140 function = "pwm0"; 141 #clock-cells = <0>;
142 clock-frequency = <74250000>;
141 }; 143 };
144};
142 145
143 pwm1_pins: pwm1 { 146&avb {
144 groups = "pwm1_c"; 147 pinctrl-0 = <&avb0_pins>;
145 function = "pwm1"; 148 pinctrl-names = "default";
146 }; 149 renesas,no-ether-link;
150 phy-handle = <&phy0>;
151 phy-mode = "rgmii-txid";
152 status = "okay";
147 153
148 scif2_pins: scif2 { 154 phy0: ethernet-phy@0 {
149 groups = "scif2_data"; 155 rxc-skew-ps = <1500>;
150 function = "scif2"; 156 reg = <0>;
157 interrupt-parent = <&gpio5>;
158 interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
151 }; 159 };
160};
152 161
153 sdhi2_pins: sd2 { 162&du {
154 groups = "mmc_data8", "mmc_ctrl"; 163 pinctrl-0 = <&du_pins>;
155 function = "mmc"; 164 pinctrl-names = "default";
156 power-source = <1800>; 165 status = "okay";
157 };
158 166
159 sdhi2_pins_uhs: sd2_uhs { 167 clocks = <&cpg CPG_MOD 724>,
160 groups = "mmc_data8", "mmc_ctrl"; 168 <&cpg CPG_MOD 723>,
161 function = "mmc"; 169 <&x12_clk>;
162 power-source = <1800>; 170 clock-names = "du.0", "du.1", "dclkin.0";
163 };
164 171
165 usb0_pins: usb0 { 172 ports {
166 groups = "usb0"; 173 port@0 {
167 function = "usb0"; 174 endpoint {
175 remote-endpoint = <&adv7123_in>;
176 };
177 };
168 }; 178 };
179};
169 180
170 vin4_pins_cvbs: vin4 { 181&ehci0 {
171 groups = "vin4_data8", "vin4_sync", "vin4_clk"; 182 status = "okay";
172 function = "vin4"; 183};
173 }; 184
185&extal_clk {
186 clock-frequency = <48000000>;
174}; 187};
175 188
176&i2c0 { 189&i2c0 {
@@ -178,12 +191,6 @@
178 pinctrl-names = "default"; 191 pinctrl-names = "default";
179 status = "okay"; 192 status = "okay";
180 193
181 eeprom@50 {
182 compatible = "rohm,br24t01", "atmel,24c01";
183 reg = <0x50>;
184 pagesize = <8>;
185 };
186
187 composite-in@20 { 194 composite-in@20 {
188 compatible = "adi,adv7180cp"; 195 compatible = "adi,adv7180cp";
189 reg = <0x20>; 196 reg = <0x20>;
@@ -218,6 +225,43 @@
218 225
219 }; 226 };
220 227
228 hdmi-encoder@39 {
229 compatible = "adi,adv7511w";
230 reg = <0x39>, <0x3f>, <0x38>, <0x3c>;
231 reg-names = "main", "edid", "packet", "cec";
232 interrupt-parent = <&gpio1>;
233 interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
234
235 /* Depends on LVDS */
236 max-clock = <135000000>;
237 min-vrefresh = <50>;
238
239 adi,input-depth = <8>;
240 adi,input-colorspace = "rgb";
241 adi,input-clock = "1x";
242 adi,input-style = <1>;
243 adi,input-justification = "evenly";
244
245 ports {
246 #address-cells = <1>;
247 #size-cells = <0>;
248
249 port@0 {
250 reg = <0>;
251 adv7511_in: endpoint {
252 remote-endpoint = <&thc63lvd1024_out>;
253 };
254 };
255
256 port@1 {
257 reg = <1>;
258 adv7511_out: endpoint {
259 remote-endpoint = <&hdmi_con_out>;
260 };
261 };
262 };
263 };
264
221 hdmi-decoder@4c { 265 hdmi-decoder@4c {
222 compatible = "adi,adv7612"; 266 compatible = "adi,adv7612";
223 reg = <0x4c>; 267 reg = <0x4c>;
@@ -254,6 +298,12 @@
254 }; 298 };
255 }; 299 };
256 }; 300 };
301
302 eeprom@50 {
303 compatible = "rohm,br24t01", "atmel,24c01";
304 reg = <0x50>;
305 pagesize = <8>;
306 };
257}; 307};
258 308
259&i2c1 { 309&i2c1 {
@@ -262,47 +312,112 @@
262 status = "okay"; 312 status = "okay";
263}; 313};
264 314
265&du { 315&lvds0 {
266 pinctrl-0 = <&du_pins>;
267 pinctrl-names = "default";
268 status = "okay"; 316 status = "okay";
269 317
270 clocks = <&cpg CPG_MOD 724>, 318 clocks = <&cpg CPG_MOD 727>,
271 <&cpg CPG_MOD 723>, 319 <&x12_clk>,
272 <&x12_clk>; 320 <&extal_clk>;
273 clock-names = "du.0", "du.1", "dclkin.0"; 321 clock-names = "fck", "dclkin.0", "extal";
274 322
275 ports { 323 ports {
276 port@0 { 324 port@1 {
277 endpoint { 325 lvds0_out: endpoint {
278 remote-endpoint = <&adv7123_in>; 326 remote-endpoint = <&thc63lvd1024_in>;
279 }; 327 };
280 }; 328 };
281 }; 329 };
282}; 330};
283 331
284&ehci0 { 332&lvds1 {
285 status = "okay"; 333 clocks = <&cpg CPG_MOD 727>,
334 <&x12_clk>,
335 <&extal_clk>;
336 clock-names = "fck", "dclkin.0", "extal";
286}; 337};
287 338
288&ohci0 { 339&ohci0 {
289 status = "okay"; 340 status = "okay";
290}; 341};
291 342
292&avb { 343&pfc {
293 pinctrl-0 = <&avb0_pins>; 344 avb0_pins: avb {
345 mux {
346 groups = "avb0_link", "avb0_mdio", "avb0_mii";
347 function = "avb0";
348 };
349 };
350
351 du_pins: du {
352 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
353 function = "du";
354 };
355
356 i2c0_pins: i2c0 {
357 groups = "i2c0";
358 function = "i2c0";
359 };
360
361 i2c1_pins: i2c1 {
362 groups = "i2c1";
363 function = "i2c1";
364 };
365
366 pwm0_pins: pwm0 {
367 groups = "pwm0_c";
368 function = "pwm0";
369 };
370
371 pwm1_pins: pwm1 {
372 groups = "pwm1_c";
373 function = "pwm1";
374 };
375
376 scif2_pins: scif2 {
377 groups = "scif2_data";
378 function = "scif2";
379 };
380
381 sdhi2_pins: sd2 {
382 groups = "mmc_data8", "mmc_ctrl";
383 function = "mmc";
384 power-source = <1800>;
385 };
386
387 sdhi2_pins_uhs: sd2_uhs {
388 groups = "mmc_data8", "mmc_ctrl";
389 function = "mmc";
390 power-source = <1800>;
391 };
392
393 usb0_pins: usb0 {
394 groups = "usb0";
395 function = "usb0";
396 };
397
398 vin4_pins_cvbs: vin4 {
399 groups = "vin4_data8", "vin4_sync", "vin4_clk";
400 function = "vin4";
401 };
402};
403
404&pwm0 {
405 pinctrl-0 = <&pwm0_pins>;
294 pinctrl-names = "default"; 406 pinctrl-names = "default";
295 renesas,no-ether-link; 407
296 phy-handle = <&phy0>;
297 phy-mode = "rgmii-txid";
298 status = "okay"; 408 status = "okay";
409};
299 410
300 phy0: ethernet-phy@0 { 411&pwm1 {
301 rxc-skew-ps = <1500>; 412 pinctrl-0 = <&pwm1_pins>;
302 reg = <0>; 413 pinctrl-names = "default";
303 interrupt-parent = <&gpio5>; 414
304 interrupts = <19 IRQ_TYPE_LEVEL_LOW>; 415 status = "okay";
305 }; 416};
417
418&rwdt {
419 timeout-sec = <60>;
420 status = "okay";
306}; 421};
307 422
308&scif2 { 423&scif2 {
@@ -333,25 +448,6 @@
333 status = "okay"; 448 status = "okay";
334}; 449};
335 450
336&pwm0 {
337 pinctrl-0 = <&pwm0_pins>;
338 pinctrl-names = "default";
339
340 status = "okay";
341};
342
343&pwm1 {
344 pinctrl-0 = <&pwm1_pins>;
345 pinctrl-names = "default";
346
347 status = "okay";
348};
349
350&rwdt {
351 timeout-sec = <60>;
352 status = "okay";
353};
354
355&vin4 { 451&vin4 {
356 pinctrl-0 = <&vin4_pins_cvbs>; 452 pinctrl-0 = <&vin4_pins_cvbs>;
357 pinctrl-names = "default"; 453 pinctrl-names = "default";
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index fe77bc43c447..214f4954b321 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -1,6 +1,6 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2/* 2/*
3 * Device Tree Source for the r8a77995 SoC 3 * Device Tree Source for the R-Car D3 (R8A77995) SoC
4 * 4 *
5 * Copyright (C) 2016 Renesas Electronics Corp. 5 * Copyright (C) 2016 Renesas Electronics Corp.
6 * Copyright (C) 2017 Glider bvba 6 * Copyright (C) 2017 Glider bvba
@@ -391,6 +391,10 @@
391 resets = <&cpg 219>; 391 resets = <&cpg 219>;
392 #dma-cells = <1>; 392 #dma-cells = <1>;
393 dma-channels = <8>; 393 dma-channels = <8>;
394 iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
395 <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
396 <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
397 <&ipmmu_ds0 6>, <&ipmmu_ds0 7>;
394 }; 398 };
395 399
396 dmac1: dma-controller@e7300000 { 400 dmac1: dma-controller@e7300000 {
@@ -415,6 +419,10 @@
415 resets = <&cpg 218>; 419 resets = <&cpg 218>;
416 #dma-cells = <1>; 420 #dma-cells = <1>;
417 dma-channels = <8>; 421 dma-channels = <8>;
422 iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
423 <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
424 <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
425 <&ipmmu_ds1 6>, <&ipmmu_ds1 7>;
418 }; 426 };
419 427
420 dmac2: dma-controller@e7310000 { 428 dmac2: dma-controller@e7310000 {
@@ -439,6 +447,10 @@
439 resets = <&cpg 217>; 447 resets = <&cpg 217>;
440 #dma-cells = <1>; 448 #dma-cells = <1>;
441 dma-channels = <8>; 449 dma-channels = <8>;
450 iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
451 <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
452 <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
453 <&ipmmu_ds1 22>, <&ipmmu_ds1 23>;
442 }; 454 };
443 455
444 ipmmu_ds0: mmu@e6740000 { 456 ipmmu_ds0: mmu@e6740000 {
@@ -817,11 +829,11 @@
817 compatible = "generic-ohci"; 829 compatible = "generic-ohci";
818 reg = <0 0xee080000 0 0x100>; 830 reg = <0 0xee080000 0 0x100>;
819 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 831 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
820 clocks = <&cpg CPG_MOD 703>; 832 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
821 phys = <&usb2_phy0>; 833 phys = <&usb2_phy0>;
822 phy-names = "usb"; 834 phy-names = "usb";
823 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; 835 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
824 resets = <&cpg 703>; 836 resets = <&cpg 703>, <&cpg 704>;
825 status = "disabled"; 837 status = "disabled";
826 }; 838 };
827 839
@@ -829,12 +841,12 @@
829 compatible = "generic-ehci"; 841 compatible = "generic-ehci";
830 reg = <0 0xee080100 0 0x100>; 842 reg = <0 0xee080100 0 0x100>;
831 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 843 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
832 clocks = <&cpg CPG_MOD 703>; 844 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
833 phys = <&usb2_phy0>; 845 phys = <&usb2_phy0>;
834 phy-names = "usb"; 846 phy-names = "usb";
835 companion = <&ohci0>; 847 companion = <&ohci0>;
836 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; 848 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
837 resets = <&cpg 703>; 849 resets = <&cpg 703>, <&cpg 704>;
838 status = "disabled"; 850 status = "disabled";
839 }; 851 };
840 852
@@ -843,9 +855,9 @@
843 "renesas,rcar-gen3-usb2-phy"; 855 "renesas,rcar-gen3-usb2-phy";
844 reg = <0 0xee080200 0 0x700>; 856 reg = <0 0xee080200 0 0x700>;
845 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; 857 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
846 clocks = <&cpg CPG_MOD 703>; 858 clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
847 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>; 859 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
848 resets = <&cpg 703>; 860 resets = <&cpg 703>, <&cpg 704>;
849 #phy-cells = <0>; 861 #phy-cells = <0>;
850 status = "disabled"; 862 status = "disabled";
851 }; 863 };
@@ -960,12 +972,68 @@
960 port@1 { 972 port@1 {
961 reg = <1>; 973 reg = <1>;
962 du_out_lvds0: endpoint { 974 du_out_lvds0: endpoint {
975 remote-endpoint = <&lvds0_in>;
963 }; 976 };
964 }; 977 };
965 978
966 port@2 { 979 port@2 {
967 reg = <2>; 980 reg = <2>;
968 du_out_lvds1: endpoint { 981 du_out_lvds1: endpoint {
982 remote-endpoint = <&lvds1_in>;
983 };
984 };
985 };
986 };
987
988 lvds0: lvds-encoder@feb90000 {
989 compatible = "renesas,r8a77995-lvds";
990 reg = <0 0xfeb90000 0 0x20>;
991 clocks = <&cpg CPG_MOD 727>;
992 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
993 resets = <&cpg 727>;
994 status = "disabled";
995
996 ports {
997 #address-cells = <1>;
998 #size-cells = <0>;
999
1000 port@0 {
1001 reg = <0>;
1002 lvds0_in: endpoint {
1003 remote-endpoint = <&du_out_lvds0>;
1004 };
1005 };
1006
1007 port@1 {
1008 reg = <1>;
1009 lvds0_out: endpoint {
1010 };
1011 };
1012 };
1013 };
1014
1015 lvds1: lvds-encoder@feb90100 {
1016 compatible = "renesas,r8a77995-lvds";
1017 reg = <0 0xfeb90100 0 0x20>;
1018 clocks = <&cpg CPG_MOD 727>;
1019 power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
1020 resets = <&cpg 726>;
1021 status = "disabled";
1022
1023 ports {
1024 #address-cells = <1>;
1025 #size-cells = <0>;
1026
1027 port@0 {
1028 reg = <0>;
1029 lvds1_in: endpoint {
1030 remote-endpoint = <&du_out_lvds1>;
1031 };
1032 };
1033
1034 port@1 {
1035 reg = <1>;
1036 lvds1_out: endpoint {
969 }; 1037 };
970 }; 1038 };
971 }; 1039 };
diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
index 7d3d866a0063..7f91ff524109 100644
--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
@@ -420,7 +420,10 @@
420 420
421 video-receiver@70 { 421 video-receiver@70 {
422 compatible = "adi,adv7482"; 422 compatible = "adi,adv7482";
423 reg = <0x70>; 423 reg = <0x70 0x71 0x72 0x73 0x74 0x75
424 0x60 0x61 0x62 0x63 0x64 0x65>;
425 reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
426 "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
424 427
425 #address-cells = <1>; 428 #address-cells = <1>;
426 #size-cells = <0>; 429 #size-cells = <0>;
@@ -471,6 +474,8 @@
471&i2c_dvfs { 474&i2c_dvfs {
472 status = "okay"; 475 status = "okay";
473 476
477 clock-frequency = <400000>;
478
474 pmic: pmic@30 { 479 pmic: pmic@30 {
475 pinctrl-0 = <&irq0_pins>; 480 pinctrl-0 = <&irq0_pins>;
476 pinctrl-names = "default"; 481 pinctrl-names = "default";
@@ -748,6 +753,7 @@
748 wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; 753 wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
749 bus-width = <4>; 754 bus-width = <4>;
750 sd-uhs-sdr50; 755 sd-uhs-sdr50;
756 sd-uhs-sdr104;
751 status = "okay"; 757 status = "okay";
752}; 758};
753 759
@@ -777,6 +783,7 @@
777 wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; 783 wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
778 bus-width = <4>; 784 bus-width = <4>;
779 sd-uhs-sdr50; 785 sd-uhs-sdr50;
786 sd-uhs-sdr104;
780 status = "okay"; 787 status = "okay";
781}; 788};
782 789
diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
index 8bf3091a899c..1b316d79df88 100644
--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
@@ -127,7 +127,7 @@
127 #address-cells = <1>; 127 #address-cells = <1>;
128 #size-cells = <0>; 128 #size-cells = <0>;
129 reg = <0x71>; 129 reg = <0x71>;
130 reset-gpios= <&gpio3 15 GPIO_ACTIVE_LOW>; 130 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
131 }; 131 };
132}; 132};
133 133
diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
index 0ead552d7eae..89daca7356df 100644
--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
@@ -18,6 +18,7 @@
18 }; 18 };
19 19
20 chosen { 20 chosen {
21 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
21 stdout-path = "serial0:115200n8"; 22 stdout-path = "serial0:115200n8";
22 }; 23 };
23 24
@@ -241,6 +242,8 @@
241&i2c_dvfs { 242&i2c_dvfs {
242 status = "okay"; 243 status = "okay";
243 244
245 clock-frequency = <400000>;
246
244 pmic: pmic@30 { 247 pmic: pmic@30 {
245 pinctrl-0 = <&irq0_pins>; 248 pinctrl-0 = <&irq0_pins>;
246 pinctrl-names = "default"; 249 pinctrl-names = "default";
@@ -416,6 +419,7 @@
416 cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; 419 cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
417 bus-width = <4>; 420 bus-width = <4>;
418 sd-uhs-sdr50; 421 sd-uhs-sdr50;
422 sd-uhs-sdr104;
419 status = "okay"; 423 status = "okay";
420}; 424};
421 425
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index b0092d95b574..d08b7eda28d2 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -1,4 +1,5 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-evb.dtb
2dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb 3dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
3dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb 4dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
4dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb 5dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
@@ -14,5 +15,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
14dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb 15dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
15dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb 16dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
16dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb 17dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
18dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
17dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb 19dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
18dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb 20dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
diff --git a/arch/arm64/boot/dts/rockchip/px30-evb.dts b/arch/arm64/boot/dts/rockchip/px30-evb.dts
new file mode 100644
index 000000000000..c74aa910a631
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/px30-evb.dts
@@ -0,0 +1,231 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include "px30.dtsi"
11
12/ {
13 model = "Rockchip PX30 EVB";
14 compatible = "rockchip,px30-evb", "rockchip,px30";
15
16 chosen {
17 stdout-path = "serial2:1500000n8";
18 };
19
20 adc-keys {
21 compatible = "adc-keys";
22 io-channels = <&saradc 2>;
23 io-channel-names = "buttons";
24 keyup-threshold-microvolt = <1800000>;
25 poll-interval = <100>;
26
27 esc-key {
28 label = "esc";
29 linux,code = <KEY_ESC>;
30 press-threshold-microvolt = <1310000>;
31 };
32
33 home-key {
34 label = "home";
35 linux,code = <KEY_HOME>;
36 press-threshold-microvolt = <624000>;
37 };
38
39 menu-key {
40 label = "menu";
41 linux,code = <KEY_MENU>;
42 press-threshold-microvolt = <987000>;
43 };
44
45 vol-down-key {
46 label = "volume down";
47 linux,code = <KEY_VOLUMEDOWN>;
48 press-threshold-microvolt = <300000>;
49 };
50
51 vol-up-key {
52 label = "volume up";
53 linux,code = <KEY_VOLUMEUP>;
54 press-threshold-microvolt = <17000>;
55 };
56 };
57
58 backlight: backlight {
59 compatible = "pwm-backlight";
60 pwms = <&pwm1 0 25000 0>;
61 };
62
63 sdio_pwrseq: sdio-pwrseq {
64 compatible = "mmc-pwrseq-simple";
65 pinctrl-names = "default";
66 pinctrl-0 = <&wifi_enable_h>;
67
68 /*
69 * On the module itself this is one of these (depending
70 * on the actual card populated):
71 * - SDIO_RESET_L_WL_REG_ON
72 * - PDN (power down when low)
73 */
74 reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
75 };
76
77 vcc_phy: vcc-phy-regulator {
78 compatible = "regulator-fixed";
79 regulator-name = "vcc_phy";
80 regulator-always-on;
81 regulator-boot-on;
82 };
83
84 vcc5v0_sys: vccsys {
85 compatible = "regulator-fixed";
86 regulator-name = "vcc5v0_sys";
87 regulator-always-on;
88 regulator-boot-on;
89 regulator-min-microvolt = <5000000>;
90 regulator-max-microvolt = <5000000>;
91 };
92};
93
94&display_subsystem {
95 status = "okay";
96};
97
98&emmc {
99 bus-width = <8>;
100 cap-mmc-highspeed;
101 mmc-hs200-1_8v;
102 non-removable;
103 status = "okay";
104};
105
106&gmac {
107 clock_in_out = "output";
108 phy-supply = <&vcc_phy>;
109 snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
110 snps,reset-active-low;
111 snps,reset-delays-us = <0 50000 50000>;
112 status = "okay";
113};
114
115&i2c0 {
116 status = "okay";
117};
118
119&i2s1_2ch {
120 status = "okay";
121};
122
123&io_domains {
124 status = "okay";
125};
126
127&pinctrl {
128 headphone {
129 hp_det: hp-det {
130 rockchip,pins =
131 <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
132 };
133 };
134
135 pmic {
136 pmic_int: pmic_int {
137 rockchip,pins =
138 <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
139 };
140
141 soc_slppin_gpio: soc_slppin_gpio {
142 rockchip,pins =
143 <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
144 };
145
146 soc_slppin_slp: soc_slppin_slp {
147 rockchip,pins =
148 <0 RK_PA4 RK_FUNC_1 &pcfg_pull_none>;
149 };
150
151 soc_slppin_rst: soc_slppin_rst {
152 rockchip,pins =
153 <0 RK_PA4 RK_FUNC_2 &pcfg_pull_none>;
154 };
155 };
156
157 sdio-pwrseq {
158 wifi_enable_h: wifi-enable-h {
159 rockchip,pins =
160 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
161 };
162 };
163};
164
165&pmu_io_domains {
166 status = "okay";
167};
168
169&pwm1 {
170 status = "okay";
171};
172
173&saradc {
174 status = "okay";
175};
176
177&sdmmc {
178 bus-width = <4>;
179 cap-mmc-highspeed;
180 cap-sd-highspeed;
181 card-detect-delay = <800>;
182 sd-uhs-sdr12;
183 sd-uhs-sdr25;
184 sd-uhs-sdr50;
185 sd-uhs-sdr104;
186 status = "okay";
187};
188
189&sdio {
190 bus-width = <4>;
191 cap-sd-highspeed;
192 keep-power-in-suspend;
193 non-removable;
194 mmc-pwrseq = <&sdio_pwrseq>;
195 sd-uhs-sdr104;
196 status = "okay";
197};
198
199&uart1 {
200 pinctrl-names = "default";
201 pinctrl-0 = <&uart1_xfer &uart1_cts>;
202 status = "okay";
203};
204
205&uart2 {
206 status = "okay";
207};
208
209&usb_host0_ehci {
210 status = "okay";
211};
212
213&usb_host0_ohci {
214 status = "okay";
215};
216
217&vopb {
218 status = "okay";
219};
220
221&vopb_mmu {
222 status = "okay";
223};
224
225&vopl {
226 status = "okay";
227};
228
229&vopl_mmu {
230 status = "okay";
231};
diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
new file mode 100644
index 000000000000..fa82dd80c801
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
@@ -0,0 +1,2031 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6#include <dt-bindings/clock/px30-cru.h>
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9#include <dt-bindings/interrupt-controller/irq.h>
10#include <dt-bindings/pinctrl/rockchip.h>
11#include <dt-bindings/power/px30-power.h>
12#include <dt-bindings/soc/rockchip,boot-mode.h>
13
14/ {
15 compatible = "rockchip,px30";
16
17 interrupt-parent = <&gic>;
18 #address-cells = <2>;
19 #size-cells = <2>;
20
21 aliases {
22 ethernet0 = &gmac;
23 i2c0 = &i2c0;
24 i2c1 = &i2c1;
25 i2c2 = &i2c2;
26 i2c3 = &i2c3;
27 serial0 = &uart0;
28 serial1 = &uart1;
29 serial2 = &uart2;
30 serial3 = &uart3;
31 serial4 = &uart4;
32 serial5 = &uart5;
33 spi0 = &spi0;
34 spi1 = &spi1;
35 };
36
37 cpus {
38 #address-cells = <2>;
39 #size-cells = <0>;
40
41 cpu0: cpu@0 {
42 device_type = "cpu";
43 compatible = "arm,cortex-a35", "arm,armv8";
44 reg = <0x0 0x0>;
45 enable-method = "psci";
46 clocks = <&cru ARMCLK>;
47 #cooling-cells = <2>;
48 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
49 dynamic-power-coefficient = <90>;
50 operating-points-v2 = <&cpu0_opp_table>;
51 };
52
53 cpu1: cpu@1 {
54 device_type = "cpu";
55 compatible = "arm,cortex-a35", "arm,armv8";
56 reg = <0x0 0x1>;
57 enable-method = "psci";
58 clocks = <&cru ARMCLK>;
59 #cooling-cells = <2>;
60 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
61 dynamic-power-coefficient = <90>;
62 operating-points-v2 = <&cpu0_opp_table>;
63 };
64
65 cpu2: cpu@2 {
66 device_type = "cpu";
67 compatible = "arm,cortex-a35", "arm,armv8";
68 reg = <0x0 0x2>;
69 enable-method = "psci";
70 clocks = <&cru ARMCLK>;
71 #cooling-cells = <2>;
72 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
73 dynamic-power-coefficient = <90>;
74 operating-points-v2 = <&cpu0_opp_table>;
75 };
76
77 cpu3: cpu@3 {
78 device_type = "cpu";
79 compatible = "arm,cortex-a35", "arm,armv8";
80 reg = <0x0 0x3>;
81 enable-method = "psci";
82 clocks = <&cru ARMCLK>;
83 #cooling-cells = <2>;
84 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
85 dynamic-power-coefficient = <90>;
86 operating-points-v2 = <&cpu0_opp_table>;
87 };
88
89 idle-states {
90 entry-method = "psci";
91
92 CPU_SLEEP: cpu-sleep {
93 compatible = "arm,idle-state";
94 local-timer-stop;
95 arm,psci-suspend-param = <0x0010000>;
96 entry-latency-us = <120>;
97 exit-latency-us = <250>;
98 min-residency-us = <900>;
99 };
100
101 CLUSTER_SLEEP: cluster-sleep {
102 compatible = "arm,idle-state";
103 local-timer-stop;
104 arm,psci-suspend-param = <0x1010000>;
105 entry-latency-us = <400>;
106 exit-latency-us = <500>;
107 min-residency-us = <2000>;
108 };
109 };
110 };
111
112 cpu0_opp_table: cpu0-opp-table {
113 compatible = "operating-points-v2";
114 opp-shared;
115
116 opp-408000000 {
117 opp-hz = /bits/ 64 <408000000>;
118 opp-microvolt = <950000 950000 1350000>;
119 clock-latency-ns = <40000>;
120 opp-suspend;
121 };
122 opp-600000000 {
123 opp-hz = /bits/ 64 <600000000>;
124 opp-microvolt = <950000 950000 1350000>;
125 clock-latency-ns = <40000>;
126 };
127 opp-816000000 {
128 opp-hz = /bits/ 64 <816000000>;
129 opp-microvolt = <1050000 1050000 1350000>;
130 clock-latency-ns = <40000>;
131 };
132 opp-1008000000 {
133 opp-hz = /bits/ 64 <1008000000>;
134 opp-microvolt = <1175000 1175000 1350000>;
135 clock-latency-ns = <40000>;
136 };
137 opp-1200000000 {
138 opp-hz = /bits/ 64 <1200000000>;
139 opp-microvolt = <1300000 1300000 1350000>;
140 clock-latency-ns = <40000>;
141 };
142 opp-1296000000 {
143 opp-hz = /bits/ 64 <1296000000>;
144 opp-microvolt = <1350000 1350000 1350000>;
145 clock-latency-ns = <40000>;
146 };
147 };
148
149 arm-pmu {
150 compatible = "arm,cortex-a53-pmu";
151 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
152 <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
153 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
154 <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
155 interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
156 };
157
158 display_subsystem: display-subsystem {
159 compatible = "rockchip,display-subsystem";
160 ports = <&vopb_out>, <&vopl_out>;
161 status = "disabled";
162 };
163
164 firmware {
165 optee {
166 compatible = "linaro,optee-tz";
167 method = "smc";
168 };
169 };
170
171 gmac_clkin: external-gmac-clock {
172 compatible = "fixed-clock";
173 clock-frequency = <50000000>;
174 clock-output-names = "gmac_clkin";
175 #clock-cells = <0>;
176 };
177
178 psci {
179 compatible = "arm,psci-1.0";
180 method = "smc";
181 };
182
183 timer {
184 compatible = "arm,armv8-timer";
185 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
186 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
187 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
188 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
189 };
190
191 xin24m: xin24m {
192 compatible = "fixed-clock";
193 #clock-cells = <0>;
194 clock-frequency = <24000000>;
195 clock-output-names = "xin24m";
196 };
197
198 xin32k: xin32k {
199 compatible = "fixed-clock";
200 #clock-cells = <0>;
201 clock-frequency = <32768>;
202 clock-output-names = "xin32k";
203 };
204
205 pmu: power-management@ff000000 {
206 compatible = "rockchip,px30-pmu", "syscon", "simple-mfd";
207 reg = <0x0 0xff000000 0x0 0x1000>;
208
209 power: power-controller {
210 compatible = "rockchip,px30-power-controller";
211 #power-domain-cells = <1>;
212 #address-cells = <1>;
213 #size-cells = <0>;
214
215 /* These power domains are grouped by VD_LOGIC */
216 pd_usb@PX30_PD_USB {
217 reg = <PX30_PD_USB>;
218 clocks = <&cru HCLK_HOST>,
219 <&cru HCLK_OTG>,
220 <&cru SCLK_OTG_ADP>;
221 pm_qos = <&qos_usb_host>, <&qos_usb_otg>;
222 };
223 pd_sdcard@PX30_PD_SDCARD {
224 reg = <PX30_PD_SDCARD>;
225 clocks = <&cru HCLK_SDMMC>,
226 <&cru SCLK_SDMMC>;
227 pm_qos = <&qos_sdmmc>;
228 };
229 pd_gmac@PX30_PD_GMAC {
230 reg = <PX30_PD_GMAC>;
231 clocks = <&cru ACLK_GMAC>,
232 <&cru PCLK_GMAC>,
233 <&cru SCLK_MAC_REF>,
234 <&cru SCLK_GMAC_RX_TX>;
235 pm_qos = <&qos_gmac>;
236 };
237 pd_mmc_nand@PX30_PD_MMC_NAND {
238 reg = <PX30_PD_MMC_NAND>;
239 clocks = <&cru HCLK_NANDC>,
240 <&cru HCLK_EMMC>,
241 <&cru HCLK_SDIO>,
242 <&cru HCLK_SFC>,
243 <&cru SCLK_EMMC>,
244 <&cru SCLK_NANDC>,
245 <&cru SCLK_SDIO>,
246 <&cru SCLK_SFC>;
247 pm_qos = <&qos_emmc>, <&qos_nand>,
248 <&qos_sdio>, <&qos_sfc>;
249 };
250 pd_vpu@PX30_PD_VPU {
251 reg = <PX30_PD_VPU>;
252 clocks = <&cru ACLK_VPU>,
253 <&cru HCLK_VPU>,
254 <&cru SCLK_CORE_VPU>;
255 pm_qos = <&qos_vpu>, <&qos_vpu_r128>;
256 };
257 pd_vo@PX30_PD_VO {
258 reg = <PX30_PD_VO>;
259 clocks = <&cru ACLK_RGA>,
260 <&cru ACLK_VOPB>,
261 <&cru ACLK_VOPL>,
262 <&cru DCLK_VOPB>,
263 <&cru DCLK_VOPL>,
264 <&cru HCLK_RGA>,
265 <&cru HCLK_VOPB>,
266 <&cru HCLK_VOPL>,
267 <&cru PCLK_MIPI_DSI>,
268 <&cru SCLK_RGA_CORE>,
269 <&cru SCLK_VOPB_PWM>;
270 pm_qos = <&qos_rga_rd>, <&qos_rga_wr>,
271 <&qos_vop_m0>, <&qos_vop_m1>;
272 };
273 pd_vi@PX30_PD_VI {
274 reg = <PX30_PD_VI>;
275 clocks = <&cru ACLK_CIF>,
276 <&cru ACLK_ISP>,
277 <&cru HCLK_CIF>,
278 <&cru HCLK_ISP>,
279 <&cru SCLK_ISP>;
280 pm_qos = <&qos_isp_128>, <&qos_isp_rd>,
281 <&qos_isp_wr>, <&qos_isp_m1>,
282 <&qos_vip>;
283 };
284 pd_gpu@PX30_PD_GPU {
285 reg = <PX30_PD_GPU>;
286 clocks = <&cru SCLK_GPU>;
287 pm_qos = <&qos_gpu>;
288 };
289 };
290 };
291
292 pmugrf: syscon@ff010000 {
293 compatible = "rockchip,px30-pmugrf", "syscon", "simple-mfd";
294 reg = <0x0 0xff010000 0x0 0x1000>;
295 #address-cells = <1>;
296 #size-cells = <1>;
297
298 pmu_io_domains: io-domains {
299 compatible = "rockchip,px30-pmu-io-voltage-domain";
300 status = "disabled";
301 };
302
303 reboot-mode {
304 compatible = "syscon-reboot-mode";
305 offset = <0x200>;
306 mode-bootloader = <BOOT_BL_DOWNLOAD>;
307 mode-fastboot = <BOOT_FASTBOOT>;
308 mode-loader = <BOOT_BL_DOWNLOAD>;
309 mode-normal = <BOOT_NORMAL>;
310 mode-recovery = <BOOT_RECOVERY>;
311 };
312 };
313
314 uart0: serial@ff030000 {
315 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
316 reg = <0x0 0xff030000 0x0 0x100>;
317 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
318 clocks = <&pmucru SCLK_UART0_PMU>, <&pmucru PCLK_UART0_PMU>;
319 clock-names = "baudclk", "apb_pclk";
320 dmas = <&dmac 0>, <&dmac 1>;
321 dma-names = "tx", "rx";
322 reg-shift = <2>;
323 reg-io-width = <4>;
324 pinctrl-names = "default";
325 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
326 status = "disabled";
327 };
328
329 i2s1_2ch: i2s@ff070000 {
330 compatible = "rockchip,px30-i2s", "rockchip,rk3066-i2s";
331 reg = <0x0 0xff070000 0x0 0x1000>;
332 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
333 clocks = <&cru SCLK_I2S1>, <&cru HCLK_I2S1>;
334 clock-names = "i2s_clk", "i2s_hclk";
335 dmas = <&dmac 18>, <&dmac 19>;
336 dma-names = "tx", "rx";
337 pinctrl-names = "default";
338 pinctrl-0 = <&i2s1_2ch_sclk &i2s1_2ch_lrck
339 &i2s1_2ch_sdi &i2s1_2ch_sdo>;
340 #sound-dai-cells = <0>;
341 status = "disabled";
342 };
343
344 i2s2_2ch: i2s@ff080000 {
345 compatible = "rockchip,px30-i2s", "rockchip,rk3066-i2s";
346 reg = <0x0 0xff080000 0x0 0x1000>;
347 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
348 clocks = <&cru SCLK_I2S2>, <&cru HCLK_I2S2>;
349 clock-names = "i2s_clk", "i2s_hclk";
350 dmas = <&dmac 20>, <&dmac 21>;
351 dma-names = "tx", "rx";
352 pinctrl-names = "default";
353 pinctrl-0 = <&i2s2_2ch_sclk &i2s2_2ch_lrck
354 &i2s2_2ch_sdi &i2s2_2ch_sdo>;
355 #sound-dai-cells = <0>;
356 status = "disabled";
357 };
358
359 gic: interrupt-controller@ff131000 {
360 compatible = "arm,gic-400";
361 #interrupt-cells = <3>;
362 #address-cells = <0>;
363 interrupt-controller;
364 reg = <0x0 0xff131000 0 0x1000>,
365 <0x0 0xff132000 0 0x2000>,
366 <0x0 0xff134000 0 0x2000>,
367 <0x0 0xff136000 0 0x2000>;
368 interrupts = <GIC_PPI 9
369 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
370 };
371
372 grf: syscon@ff140000 {
373 compatible = "rockchip,px30-grf", "syscon", "simple-mfd";
374 reg = <0x0 0xff140000 0x0 0x1000>;
375 #address-cells = <1>;
376 #size-cells = <1>;
377
378 io_domains: io-domains {
379 compatible = "rockchip,px30-io-voltage-domain";
380 status = "disabled";
381 };
382 };
383
384 uart1: serial@ff158000 {
385 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
386 reg = <0x0 0xff158000 0x0 0x100>;
387 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
388 clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
389 clock-names = "baudclk", "apb_pclk";
390 dmas = <&dmac 2>, <&dmac 3>;
391 dma-names = "tx", "rx";
392 reg-shift = <2>;
393 reg-io-width = <4>;
394 pinctrl-names = "default";
395 pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
396 status = "disabled";
397 };
398
399 uart2: serial@ff160000 {
400 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
401 reg = <0x0 0xff160000 0x0 0x100>;
402 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
403 clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
404 clock-names = "baudclk", "apb_pclk";
405 dmas = <&dmac 4>, <&dmac 5>;
406 dma-names = "tx", "rx";
407 reg-shift = <2>;
408 reg-io-width = <4>;
409 pinctrl-names = "default";
410 pinctrl-0 = <&uart2m0_xfer>;
411 status = "disabled";
412 };
413
414 uart3: serial@ff168000 {
415 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
416 reg = <0x0 0xff168000 0x0 0x100>;
417 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
418 clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
419 clock-names = "baudclk", "apb_pclk";
420 dmas = <&dmac 6>, <&dmac 7>;
421 dma-names = "tx", "rx";
422 reg-shift = <2>;
423 reg-io-width = <4>;
424 pinctrl-names = "default";
425 pinctrl-0 = <&uart3m1_xfer &uart3m1_cts &uart3m1_rts>;
426 status = "disabled";
427 };
428
429 uart4: serial@ff170000 {
430 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
431 reg = <0x0 0xff170000 0x0 0x100>;
432 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
433 clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
434 clock-names = "baudclk", "apb_pclk";
435 dmas = <&dmac 8>, <&dmac 9>;
436 dma-names = "tx", "rx";
437 reg-shift = <2>;
438 reg-io-width = <4>;
439 pinctrl-names = "default";
440 pinctrl-0 = <&uart4_xfer &uart4_cts &uart4_rts>;
441 status = "disabled";
442 };
443
444 uart5: serial@ff178000 {
445 compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
446 reg = <0x0 0xff178000 0x0 0x100>;
447 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
448 clocks = <&cru SCLK_UART5>, <&cru PCLK_UART5>;
449 clock-names = "baudclk", "apb_pclk";
450 dmas = <&dmac 10>, <&dmac 11>;
451 dma-names = "tx", "rx";
452 reg-shift = <2>;
453 reg-io-width = <4>;
454 pinctrl-names = "default";
455 pinctrl-0 = <&uart5_xfer &uart5_cts &uart5_rts>;
456 status = "disabled";
457 };
458
459 i2c0: i2c@ff180000 {
460 compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
461 reg = <0x0 0xff180000 0x0 0x1000>;
462 clocks = <&cru SCLK_I2C0>, <&cru PCLK_I2C0>;
463 clock-names = "i2c", "pclk";
464 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
465 pinctrl-names = "default";
466 pinctrl-0 = <&i2c0_xfer>;
467 #address-cells = <1>;
468 #size-cells = <0>;
469 status = "disabled";
470 };
471
472 i2c1: i2c@ff190000 {
473 compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
474 reg = <0x0 0xff190000 0x0 0x1000>;
475 clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
476 clock-names = "i2c", "pclk";
477 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
478 pinctrl-names = "default";
479 pinctrl-0 = <&i2c1_xfer>;
480 #address-cells = <1>;
481 #size-cells = <0>;
482 status = "disabled";
483 };
484
485 i2c2: i2c@ff1a0000 {
486 compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
487 reg = <0x0 0xff1a0000 0x0 0x1000>;
488 clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
489 clock-names = "i2c", "pclk";
490 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
491 pinctrl-names = "default";
492 pinctrl-0 = <&i2c2_xfer>;
493 #address-cells = <1>;
494 #size-cells = <0>;
495 status = "disabled";
496 };
497
498 i2c3: i2c@ff1b0000 {
499 compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
500 reg = <0x0 0xff1b0000 0x0 0x1000>;
501 clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
502 clock-names = "i2c", "pclk";
503 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
504 pinctrl-names = "default";
505 pinctrl-0 = <&i2c3_xfer>;
506 #address-cells = <1>;
507 #size-cells = <0>;
508 status = "disabled";
509 };
510
511 spi0: spi@ff1d0000 {
512 compatible = "rockchip,px30-spi", "rockchip,rk3066-spi";
513 reg = <0x0 0xff1d0000 0x0 0x1000>;
514 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
515 clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
516 clock-names = "spiclk", "apb_pclk";
517 dmas = <&dmac 12>, <&dmac 13>;
518 dma-names = "tx", "rx";
519 pinctrl-names = "default";
520 pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>;
521 #address-cells = <1>;
522 #size-cells = <0>;
523 status = "disabled";
524 };
525
526 spi1: spi@ff1d8000 {
527 compatible = "rockchip,px30-spi", "rockchip,rk3066-spi";
528 reg = <0x0 0xff1d8000 0x0 0x1000>;
529 interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
530 clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
531 clock-names = "spiclk", "apb_pclk";
532 dmas = <&dmac 14>, <&dmac 15>;
533 dma-names = "tx", "rx";
534 pinctrl-names = "default";
535 pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>;
536 #address-cells = <1>;
537 #size-cells = <0>;
538 status = "disabled";
539 };
540
541 wdt: watchdog@ff1e0000 {
542 compatible = "snps,dw-wdt";
543 reg = <0x0 0xff1e0000 0x0 0x100>;
544 clocks = <&cru PCLK_WDT_NS>;
545 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
546 status = "disabled";
547 };
548
549 pwm0: pwm@ff200000 {
550 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
551 reg = <0x0 0xff200000 0x0 0x10>;
552 clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
553 clock-names = "pwm", "pclk";
554 pinctrl-names = "default";
555 pinctrl-0 = <&pwm0_pin>;
556 #pwm-cells = <3>;
557 status = "disabled";
558 };
559
560 pwm1: pwm@ff200010 {
561 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
562 reg = <0x0 0xff200010 0x0 0x10>;
563 clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
564 clock-names = "pwm", "pclk";
565 pinctrl-names = "default";
566 pinctrl-0 = <&pwm1_pin>;
567 #pwm-cells = <3>;
568 status = "disabled";
569 };
570
571 pwm2: pwm@ff200020 {
572 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
573 reg = <0x0 0xff200020 0x0 0x10>;
574 clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
575 clock-names = "pwm", "pclk";
576 pinctrl-names = "default";
577 pinctrl-0 = <&pwm2_pin>;
578 #pwm-cells = <3>;
579 status = "disabled";
580 };
581
582 pwm3: pwm@ff200030 {
583 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
584 reg = <0x0 0xff200030 0x0 0x10>;
585 clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
586 clock-names = "pwm", "pclk";
587 pinctrl-names = "default";
588 pinctrl-0 = <&pwm3_pin>;
589 #pwm-cells = <3>;
590 status = "disabled";
591 };
592
593 pwm4: pwm@ff208000 {
594 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
595 reg = <0x0 0xff208000 0x0 0x10>;
596 clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
597 clock-names = "pwm", "pclk";
598 pinctrl-names = "default";
599 pinctrl-0 = <&pwm4_pin>;
600 #pwm-cells = <3>;
601 status = "disabled";
602 };
603
604 pwm5: pwm@ff208010 {
605 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
606 reg = <0x0 0xff208010 0x0 0x10>;
607 clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
608 clock-names = "pwm", "pclk";
609 pinctrl-names = "default";
610 pinctrl-0 = <&pwm5_pin>;
611 #pwm-cells = <3>;
612 status = "disabled";
613 };
614
615 pwm6: pwm@ff208020 {
616 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
617 reg = <0x0 0xff208020 0x0 0x10>;
618 clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
619 clock-names = "pwm", "pclk";
620 pinctrl-names = "default";
621 pinctrl-0 = <&pwm6_pin>;
622 #pwm-cells = <3>;
623 status = "disabled";
624 };
625
626 pwm7: pwm@ff208030 {
627 compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
628 reg = <0x0 0xff208030 0x0 0x10>;
629 clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
630 clock-names = "pwm", "pclk";
631 pinctrl-names = "default";
632 pinctrl-0 = <&pwm7_pin>;
633 #pwm-cells = <3>;
634 status = "disabled";
635 };
636
637 rktimer: timer@ff210000 {
638 compatible = "rockchip,px30-timer", "rockchip,rk3288-timer";
639 reg = <0x0 0xff210000 0x0 0x1000>;
640 interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
641 clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER0>;
642 clock-names = "pclk", "timer";
643 };
644
645 amba {
646 compatible = "simple-bus";
647 #address-cells = <2>;
648 #size-cells = <2>;
649 ranges;
650
651 dmac: dmac@ff240000 {
652 compatible = "arm,pl330", "arm,primecell";
653 reg = <0x0 0xff240000 0x0 0x4000>;
654 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
655 <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
656 clocks = <&cru ACLK_DMAC>;
657 clock-names = "apb_pclk";
658 #dma-cells = <1>;
659 };
660 };
661
662 saradc: saradc@ff288000 {
663 compatible = "rockchip,px30-saradc", "rockchip,rk3399-saradc";
664 reg = <0x0 0xff288000 0x0 0x100>;
665 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
666 #io-channel-cells = <1>;
667 clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
668 clock-names = "saradc", "apb_pclk";
669 resets = <&cru SRST_SARADC_P>;
670 reset-names = "saradc-apb";
671 status = "disabled";
672 };
673
674 cru: clock-controller@ff2b0000 {
675 compatible = "rockchip,px30-cru";
676 reg = <0x0 0xff2b0000 0x0 0x1000>;
677 rockchip,grf = <&grf>;
678 #clock-cells = <1>;
679 #reset-cells = <1>;
680
681 assigned-clocks = <&cru PLL_NPLL>;
682 assigned-clock-rates = <1188000000>;
683 };
684
685 pmucru: clock-controller@ff2bc000 {
686 compatible = "rockchip,px30-pmucru";
687 reg = <0x0 0xff2bc000 0x0 0x1000>;
688 rockchip,grf = <&grf>;
689 #clock-cells = <1>;
690 #reset-cells = <1>;
691
692 assigned-clocks =
693 <&pmucru PLL_GPLL>, <&pmucru PCLK_PMU_PRE>,
694 <&pmucru SCLK_WIFI_PMU>, <&cru ARMCLK>,
695 <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
696 <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
697 <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>;
698 assigned-clock-rates =
699 <1200000000>, <100000000>,
700 <26000000>, <600000000>,
701 <200000000>, <200000000>,
702 <150000000>, <150000000>,
703 <100000000>, <200000000>;
704 };
705
706 usb_host0_ehci: usb@ff340000 {
707 compatible = "generic-ehci";
708 reg = <0x0 0xff340000 0x0 0x10000>;
709 interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
710 clocks = <&cru HCLK_HOST>;
711 clock-names = "usbhost";
712 power-domains = <&power PX30_PD_USB>;
713 status = "disabled";
714 };
715
716 usb_host0_ohci: usb@ff350000 {
717 compatible = "generic-ohci";
718 reg = <0x0 0xff350000 0x0 0x10000>;
719 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
720 clocks = <&cru HCLK_HOST>;
721 clock-names = "usbhost";
722 power-domains = <&power PX30_PD_USB>;
723 status = "disabled";
724 };
725
726 gmac: ethernet@ff360000 {
727 compatible = "rockchip,px30-gmac";
728 reg = <0x0 0xff360000 0x0 0x10000>;
729 interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
730 interrupt-names = "macirq";
731 clocks = <&cru SCLK_GMAC>, <&cru SCLK_GMAC_RX_TX>,
732 <&cru SCLK_GMAC_RX_TX>, <&cru SCLK_MAC_REF>,
733 <&cru SCLK_MAC_REFOUT>, <&cru ACLK_GMAC>,
734 <&cru PCLK_GMAC>, <&cru SCLK_GMAC_RMII>;
735 clock-names = "stmmaceth", "mac_clk_rx",
736 "mac_clk_tx", "clk_mac_ref",
737 "clk_mac_refout", "aclk_mac",
738 "pclk_mac", "clk_mac_speed";
739 rockchip,grf = <&grf>;
740 phy-mode = "rmii";
741 pinctrl-names = "default";
742 pinctrl-0 = <&rmii_pins &mac_refclk_12ma>;
743 power-domains = <&power PX30_PD_GMAC>;
744 resets = <&cru SRST_GMAC_A>;
745 reset-names = "stmmaceth";
746 status = "disabled";
747 };
748
749 sdmmc: dwmmc@ff370000 {
750 compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
751 reg = <0x0 0xff370000 0x0 0x4000>;
752 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
753 clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
754 <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
755 clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
756 fifo-depth = <0x100>;
757 max-frequency = <150000000>;
758 pinctrl-names = "default";
759 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
760 power-domains = <&power PX30_PD_SDCARD>;
761 status = "disabled";
762 };
763
764 sdio: dwmmc@ff380000 {
765 compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
766 reg = <0x0 0xff380000 0x0 0x4000>;
767 interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
768 clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
769 <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
770 clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
771 fifo-depth = <0x100>;
772 max-frequency = <150000000>;
773 pinctrl-names = "default";
774 pinctrl-0 = <&sdio_bus4 &sdio_cmd &sdio_clk>;
775 power-domains = <&power PX30_PD_MMC_NAND>;
776 status = "disabled";
777 };
778
779 emmc: dwmmc@ff390000 {
780 compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
781 reg = <0x0 0xff390000 0x0 0x4000>;
782 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
783 clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
784 <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
785 clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
786 fifo-depth = <0x100>;
787 max-frequency = <150000000>;
788 power-domains = <&power PX30_PD_MMC_NAND>;
789 status = "disabled";
790 };
791
792 vopb: vop@ff460000 {
793 compatible = "rockchip,px30-vop-big";
794 reg = <0x0 0xff460000 0x0 0xefc>;
795 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
796 clocks = <&cru ACLK_VOPB>, <&cru DCLK_VOPB>,
797 <&cru HCLK_VOPB>;
798 clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
799 resets = <&cru SRST_VOPB_A>, <&cru SRST_VOPB_H>, <&cru SRST_VOPB>;
800 reset-names = "axi", "ahb", "dclk";
801 iommus = <&vopb_mmu>;
802 power-domains = <&power PX30_PD_VO>;
803 rockchip,grf = <&grf>;
804 status = "disabled";
805
806 vopb_out: port {
807 #address-cells = <1>;
808 #size-cells = <0>;
809 };
810 };
811
812 vopb_mmu: iommu@ff460f00 {
813 compatible = "rockchip,iommu";
814 reg = <0x0 0xff460f00 0x0 0x100>;
815 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
816 interrupt-names = "vopb_mmu";
817 clocks = <&cru ACLK_VOPB>, <&cru HCLK_VOPB>;
818 clock-names = "aclk", "hclk";
819 power-domains = <&power PX30_PD_VO>;
820 #iommu-cells = <0>;
821 status = "disabled";
822 };
823
824 vopl: vop@ff470000 {
825 compatible = "rockchip,px30-vop-lit";
826 reg = <0x0 0xff470000 0x0 0xefc>;
827 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
828 clocks = <&cru ACLK_VOPL>, <&cru DCLK_VOPL>,
829 <&cru HCLK_VOPL>;
830 clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
831 resets = <&cru SRST_VOPL_A>, <&cru SRST_VOPL_H>, <&cru SRST_VOPL>;
832 reset-names = "axi", "ahb", "dclk";
833 iommus = <&vopl_mmu>;
834 power-domains = <&power PX30_PD_VO>;
835 rockchip,grf = <&grf>;
836 status = "disabled";
837
838 vopl_out: port {
839 #address-cells = <1>;
840 #size-cells = <0>;
841 };
842 };
843
844 vopl_mmu: iommu@ff470f00 {
845 compatible = "rockchip,iommu";
846 reg = <0x0 0xff470f00 0x0 0x100>;
847 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
848 interrupt-names = "vopl_mmu";
849 clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
850 clock-names = "aclk", "hclk";
851 power-domains = <&power PX30_PD_VO>;
852 #iommu-cells = <0>;
853 status = "disabled";
854 };
855
856 qos_gmac: qos@ff518000 {
857 compatible = "syscon";
858 reg = <0x0 0xff518000 0x0 0x20>;
859 };
860
861 qos_gpu: qos@ff520000 {
862 compatible = "syscon";
863 reg = <0x0 0xff520000 0x0 0x20>;
864 };
865
866 qos_sdmmc: qos@ff52c000 {
867 compatible = "syscon";
868 reg = <0x0 0xff52c000 0x0 0x20>;
869 };
870
871 qos_emmc: qos@ff538000 {
872 compatible = "syscon";
873 reg = <0x0 0xff538000 0x0 0x20>;
874 };
875
876 qos_nand: qos@ff538080 {
877 compatible = "syscon";
878 reg = <0x0 0xff538080 0x0 0x20>;
879 };
880
881 qos_sdio: qos@ff538100 {
882 compatible = "syscon";
883 reg = <0x0 0xff538100 0x0 0x20>;
884 };
885
886 qos_sfc: qos@ff538180 {
887 compatible = "syscon";
888 reg = <0x0 0xff538180 0x0 0x20>;
889 };
890
891 qos_usb_host: qos@ff540000 {
892 compatible = "syscon";
893 reg = <0x0 0xff540000 0x0 0x20>;
894 };
895
896 qos_usb_otg: qos@ff540080 {
897 compatible = "syscon";
898 reg = <0x0 0xff540080 0x0 0x20>;
899 };
900
901 qos_isp_128: qos@ff548000 {
902 compatible = "syscon";
903 reg = <0x0 0xff548000 0x0 0x20>;
904 };
905
906 qos_isp_rd: qos@ff548080 {
907 compatible = "syscon";
908 reg = <0x0 0xff548080 0x0 0x20>;
909 };
910
911 qos_isp_wr: qos@ff548100 {
912 compatible = "syscon";
913 reg = <0x0 0xff548100 0x0 0x20>;
914 };
915
916 qos_isp_m1: qos@ff548180 {
917 compatible = "syscon";
918 reg = <0x0 0xff548180 0x0 0x20>;
919 };
920
921 qos_vip: qos@ff548200 {
922 compatible = "syscon";
923 reg = <0x0 0xff548200 0x0 0x20>;
924 };
925
926 qos_rga_rd: qos@ff550000 {
927 compatible = "syscon";
928 reg = <0x0 0xff550000 0x0 0x20>;
929 };
930
931 qos_rga_wr: qos@ff550080 {
932 compatible = "syscon";
933 reg = <0x0 0xff550080 0x0 0x20>;
934 };
935
936 qos_vop_m0: qos@ff550100 {
937 compatible = "syscon";
938 reg = <0x0 0xff550100 0x0 0x20>;
939 };
940
941 qos_vop_m1: qos@ff550180 {
942 compatible = "syscon";
943 reg = <0x0 0xff550180 0x0 0x20>;
944 };
945
946 qos_vpu: qos@ff558000 {
947 compatible = "syscon";
948 reg = <0x0 0xff558000 0x0 0x20>;
949 };
950
951 qos_vpu_r128: qos@ff558080 {
952 compatible = "syscon";
953 reg = <0x0 0xff558080 0x0 0x20>;
954 };
955
956 pinctrl: pinctrl {
957 compatible = "rockchip,px30-pinctrl";
958 rockchip,grf = <&grf>;
959 rockchip,pmu = <&pmugrf>;
960 #address-cells = <2>;
961 #size-cells = <2>;
962 ranges;
963
964 gpio0: gpio0@ff040000 {
965 compatible = "rockchip,gpio-bank";
966 reg = <0x0 0xff040000 0x0 0x100>;
967 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
968 clocks = <&pmucru PCLK_GPIO0_PMU>;
969 gpio-controller;
970 #gpio-cells = <2>;
971
972 interrupt-controller;
973 #interrupt-cells = <2>;
974 };
975
976 gpio1: gpio1@ff250000 {
977 compatible = "rockchip,gpio-bank";
978 reg = <0x0 0xff250000 0x0 0x100>;
979 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
980 clocks = <&cru PCLK_GPIO1>;
981 gpio-controller;
982 #gpio-cells = <2>;
983
984 interrupt-controller;
985 #interrupt-cells = <2>;
986 };
987
988 gpio2: gpio2@ff260000 {
989 compatible = "rockchip,gpio-bank";
990 reg = <0x0 0xff260000 0x0 0x100>;
991 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
992 clocks = <&cru PCLK_GPIO2>;
993 gpio-controller;
994 #gpio-cells = <2>;
995
996 interrupt-controller;
997 #interrupt-cells = <2>;
998 };
999
1000 gpio3: gpio3@ff270000 {
1001 compatible = "rockchip,gpio-bank";
1002 reg = <0x0 0xff270000 0x0 0x100>;
1003 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
1004 clocks = <&cru PCLK_GPIO3>;
1005 gpio-controller;
1006 #gpio-cells = <2>;
1007
1008 interrupt-controller;
1009 #interrupt-cells = <2>;
1010 };
1011
1012 pcfg_pull_up: pcfg-pull-up {
1013 bias-pull-up;
1014 };
1015
1016 pcfg_pull_down: pcfg-pull-down {
1017 bias-pull-down;
1018 };
1019
1020 pcfg_pull_none: pcfg-pull-none {
1021 bias-disable;
1022 };
1023
1024 pcfg_pull_none_2ma: pcfg-pull-none-2ma {
1025 bias-disable;
1026 drive-strength = <2>;
1027 };
1028
1029 pcfg_pull_up_2ma: pcfg-pull-up-2ma {
1030 bias-pull-up;
1031 drive-strength = <2>;
1032 };
1033
1034 pcfg_pull_up_4ma: pcfg-pull-up-4ma {
1035 bias-pull-up;
1036 drive-strength = <4>;
1037 };
1038
1039 pcfg_pull_none_4ma: pcfg-pull-none-4ma {
1040 bias-disable;
1041 drive-strength = <4>;
1042 };
1043
1044 pcfg_pull_down_4ma: pcfg-pull-down-4ma {
1045 bias-pull-down;
1046 drive-strength = <4>;
1047 };
1048
1049 pcfg_pull_none_8ma: pcfg-pull-none-8ma {
1050 bias-disable;
1051 drive-strength = <8>;
1052 };
1053
1054 pcfg_pull_up_8ma: pcfg-pull-up-8ma {
1055 bias-pull-up;
1056 drive-strength = <8>;
1057 };
1058
1059 pcfg_pull_none_12ma: pcfg-pull-none-12ma {
1060 bias-disable;
1061 drive-strength = <12>;
1062 };
1063
1064 pcfg_pull_up_12ma: pcfg-pull-up-12ma {
1065 bias-pull-up;
1066 drive-strength = <12>;
1067 };
1068
1069 pcfg_pull_none_smt: pcfg-pull-none-smt {
1070 bias-disable;
1071 input-schmitt-enable;
1072 };
1073
1074 pcfg_output_high: pcfg-output-high {
1075 output-high;
1076 };
1077
1078 pcfg_output_low: pcfg-output-low {
1079 output-low;
1080 };
1081
1082 pcfg_input_high: pcfg-input-high {
1083 bias-pull-up;
1084 input-enable;
1085 };
1086
1087 pcfg_input: pcfg-input {
1088 input-enable;
1089 };
1090
1091 i2c0 {
1092 i2c0_xfer: i2c0-xfer {
1093 rockchip,pins =
1094 <0 RK_PB0 1 &pcfg_pull_none_smt>,
1095 <0 RK_PB1 1 &pcfg_pull_none_smt>;
1096 };
1097 };
1098
1099 i2c1 {
1100 i2c1_xfer: i2c1-xfer {
1101 rockchip,pins =
1102 <0 RK_PC2 1 &pcfg_pull_none_smt>,
1103 <0 RK_PC3 1 &pcfg_pull_none_smt>;
1104 };
1105 };
1106
1107 i2c2 {
1108 i2c2_xfer: i2c2-xfer {
1109 rockchip,pins =
1110 <2 RK_PB7 2 &pcfg_pull_none_smt>,
1111 <2 RK_PC0 2 &pcfg_pull_none_smt>;
1112 };
1113 };
1114
1115 i2c3 {
1116 i2c3_xfer: i2c3-xfer {
1117 rockchip,pins =
1118 <1 RK_PB4 4 &pcfg_pull_none_smt>,
1119 <1 RK_PB5 4 &pcfg_pull_none_smt>;
1120 };
1121 };
1122
1123 tsadc {
1124 tsadc_otp_gpio: tsadc-otp-gpio {
1125 rockchip,pins =
1126 <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
1127 };
1128
1129 tsadc_otp_out: tsadc-otp-out {
1130 rockchip,pins =
1131 <0 RK_PA6 1 &pcfg_pull_none>;
1132 };
1133 };
1134
1135 uart0 {
1136 uart0_xfer: uart0-xfer {
1137 rockchip,pins =
1138 <0 RK_PB2 1 &pcfg_pull_up>,
1139 <0 RK_PB3 1 &pcfg_pull_up>;
1140 };
1141
1142 uart0_cts: uart0-cts {
1143 rockchip,pins =
1144 <0 RK_PB4 1 &pcfg_pull_none>;
1145 };
1146
1147 uart0_rts: uart0-rts {
1148 rockchip,pins =
1149 <0 RK_PB5 1 &pcfg_pull_none>;
1150 };
1151
1152 uart0_rts_gpio: uart0-rts-gpio {
1153 rockchip,pins =
1154 <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
1155 };
1156 };
1157
1158 uart1 {
1159 uart1_xfer: uart1-xfer {
1160 rockchip,pins =
1161 <1 RK_PC1 1 &pcfg_pull_up>,
1162 <1 RK_PC0 1 &pcfg_pull_up>;
1163 };
1164
1165 uart1_cts: uart1-cts {
1166 rockchip,pins =
1167 <1 RK_PC2 1 &pcfg_pull_none>;
1168 };
1169
1170 uart1_rts: uart1-rts {
1171 rockchip,pins =
1172 <1 RK_PC3 1 &pcfg_pull_none>;
1173 };
1174
1175 uart1_rts_gpio: uart1-rts-gpio {
1176 rockchip,pins =
1177 <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
1178 };
1179 };
1180
1181 uart2-m0 {
1182 uart2m0_xfer: uart2m0-xfer {
1183 rockchip,pins =
1184 <1 RK_PD2 2 &pcfg_pull_up>,
1185 <1 RK_PD3 2 &pcfg_pull_up>;
1186 };
1187 };
1188
1189 uart2-m1 {
1190 uart2m1_xfer: uart2m1-xfer {
1191 rockchip,pins =
1192 <2 RK_PB4 2 &pcfg_pull_up>,
1193 <2 RK_PB6 2 &pcfg_pull_up>;
1194 };
1195 };
1196
1197 uart3-m0 {
1198 uart3m0_xfer: uart3m0-xfer {
1199 rockchip,pins =
1200 <0 RK_PC0 2 &pcfg_pull_up>,
1201 <0 RK_PC1 2 &pcfg_pull_up>;
1202 };
1203
1204 uart3m0_cts: uart3m0-cts {
1205 rockchip,pins =
1206 <0 RK_PC2 2 &pcfg_pull_none>;
1207 };
1208
1209 uart3m0_rts: uart3m0-rts {
1210 rockchip,pins =
1211 <0 RK_PC3 2 &pcfg_pull_none>;
1212 };
1213
1214 uart3m0_rts_gpio: uart3m0-rts-gpio {
1215 rockchip,pins =
1216 <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
1217 };
1218 };
1219
1220 uart3-m1 {
1221 uart3m1_xfer: uart3m1-xfer {
1222 rockchip,pins =
1223 <1 RK_PB6 2 &pcfg_pull_up>,
1224 <1 RK_PB7 2 &pcfg_pull_up>;
1225 };
1226
1227 uart3m1_cts: uart3m1-cts {
1228 rockchip,pins =
1229 <1 RK_PB4 2 &pcfg_pull_none>;
1230 };
1231
1232 uart3m1_rts: uart3m1-rts {
1233 rockchip,pins =
1234 <1 RK_PB5 2 &pcfg_pull_none>;
1235 };
1236
1237 uart3m1_rts_gpio: uart3m1-rts-gpio {
1238 rockchip,pins =
1239 <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
1240 };
1241 };
1242
1243 uart4 {
1244 uart4_xfer: uart4-xfer {
1245 rockchip,pins =
1246 <1 RK_PD4 2 &pcfg_pull_up>,
1247 <1 RK_PD5 2 &pcfg_pull_up>;
1248 };
1249
1250 uart4_cts: uart4-cts {
1251 rockchip,pins =
1252 <1 RK_PD6 2 &pcfg_pull_none>;
1253 };
1254
1255 uart4_rts: uart4-rts {
1256 rockchip,pins =
1257 <1 RK_PD7 2 &pcfg_pull_none>;
1258 };
1259 };
1260
1261 uart5 {
1262 uart5_xfer: uart5-xfer {
1263 rockchip,pins =
1264 <3 RK_PA2 4 &pcfg_pull_up>,
1265 <3 RK_PA1 4 &pcfg_pull_up>;
1266 };
1267
1268 uart5_cts: uart5-cts {
1269 rockchip,pins =
1270 <3 RK_PA3 4 &pcfg_pull_none>;
1271 };
1272
1273 uart5_rts: uart5-rts {
1274 rockchip,pins =
1275 <3 RK_PA5 4 &pcfg_pull_none>;
1276 };
1277 };
1278
1279 spi0 {
1280 spi0_clk: spi0-clk {
1281 rockchip,pins =
1282 <1 RK_PB7 3 &pcfg_pull_up_4ma>;
1283 };
1284
1285 spi0_csn: spi0-csn {
1286 rockchip,pins =
1287 <1 RK_PB6 3 &pcfg_pull_up_4ma>;
1288 };
1289
1290 spi0_miso: spi0-miso {
1291 rockchip,pins =
1292 <1 RK_PB5 3 &pcfg_pull_up_4ma>;
1293 };
1294
1295 spi0_mosi: spi0-mosi {
1296 rockchip,pins =
1297 <1 RK_PB4 3 &pcfg_pull_up_4ma>;
1298 };
1299
1300 spi0_clk_hs: spi0-clk-hs {
1301 rockchip,pins =
1302 <1 RK_PB7 3 &pcfg_pull_up_8ma>;
1303 };
1304
1305 spi0_miso_hs: spi0-miso-hs {
1306 rockchip,pins =
1307 <1 RK_PB5 3 &pcfg_pull_up_8ma>;
1308 };
1309
1310 spi0_mosi_hs: spi0-mosi-hs {
1311 rockchip,pins =
1312 <1 RK_PB4 3 &pcfg_pull_up_8ma>;
1313 };
1314 };
1315
1316 spi1 {
1317 spi1_clk: spi1-clk {
1318 rockchip,pins =
1319 <3 RK_PB7 4 &pcfg_pull_up_4ma>;
1320 };
1321
1322 spi1_csn0: spi1-csn0 {
1323 rockchip,pins =
1324 <3 RK_PB1 4 &pcfg_pull_up_4ma>;
1325 };
1326
1327 spi1_csn1: spi1-csn1 {
1328 rockchip,pins =
1329 <3 RK_PB2 2 &pcfg_pull_up_4ma>;
1330 };
1331
1332 spi1_miso: spi1-miso {
1333 rockchip,pins =
1334 <3 RK_PB6 4 &pcfg_pull_up_4ma>;
1335 };
1336
1337 spi1_mosi: spi1-mosi {
1338 rockchip,pins =
1339 <3 RK_PB4 4 &pcfg_pull_up_4ma>;
1340 };
1341
1342 spi1_clk_hs: spi1-clk-hs {
1343 rockchip,pins =
1344 <3 RK_PB7 4 &pcfg_pull_up_8ma>;
1345 };
1346
1347 spi1_miso_hs: spi1-miso-hs {
1348 rockchip,pins =
1349 <3 RK_PB6 4 &pcfg_pull_up_8ma>;
1350 };
1351
1352 spi1_mosi_hs: spi1-mosi-hs {
1353 rockchip,pins =
1354 <3 RK_PB4 4 &pcfg_pull_up_8ma>;
1355 };
1356 };
1357
1358 pdm {
1359 pdm_clk0m0: pdm-clk0m0 {
1360 rockchip,pins =
1361 <3 RK_PC6 2 &pcfg_pull_none>;
1362 };
1363
1364 pdm_clk0m1: pdm-clk0m1 {
1365 rockchip,pins =
1366 <2 RK_PC6 1 &pcfg_pull_none>;
1367 };
1368
1369 pdm_clk1: pdm-clk1 {
1370 rockchip,pins =
1371 <3 RK_PC7 2 &pcfg_pull_none>;
1372 };
1373
1374 pdm_sdi0m0: pdm-sdi0m0 {
1375 rockchip,pins =
1376 <3 RK_PD3 2 &pcfg_pull_none>;
1377 };
1378
1379 pdm_sdi0m1: pdm-sdi0m1 {
1380 rockchip,pins =
1381 <2 RK_PC5 2 &pcfg_pull_none>;
1382 };
1383
1384 pdm_sdi1: pdm-sdi1 {
1385 rockchip,pins =
1386 <3 RK_PD0 2 &pcfg_pull_none>;
1387 };
1388
1389 pdm_sdi2: pdm-sdi2 {
1390 rockchip,pins =
1391 <3 RK_PD1 2 &pcfg_pull_none>;
1392 };
1393
1394 pdm_sdi3: pdm-sdi3 {
1395 rockchip,pins =
1396 <3 RK_PD2 2 &pcfg_pull_none>;
1397 };
1398
1399 pdm_clk0m0_sleep: pdm-clk0m0-sleep {
1400 rockchip,pins =
1401 <3 RK_PC6 RK_FUNC_GPIO &pcfg_input_high>;
1402 };
1403
1404 pdm_clk0m_sleep1: pdm-clk0m1-sleep {
1405 rockchip,pins =
1406 <2 RK_PC6 RK_FUNC_GPIO &pcfg_input_high>;
1407 };
1408
1409 pdm_clk1_sleep: pdm-clk1-sleep {
1410 rockchip,pins =
1411 <3 RK_PC7 RK_FUNC_GPIO &pcfg_input_high>;
1412 };
1413
1414 pdm_sdi0m0_sleep: pdm-sdi0m0-sleep {
1415 rockchip,pins =
1416 <3 RK_PD3 RK_FUNC_GPIO &pcfg_input_high>;
1417 };
1418
1419 pdm_sdi0m1_sleep: pdm-sdi0m1-sleep {
1420 rockchip,pins =
1421 <2 RK_PC5 RK_FUNC_GPIO &pcfg_input_high>;
1422 };
1423
1424 pdm_sdi1_sleep: pdm-sdi1-sleep {
1425 rockchip,pins =
1426 <3 RK_PD0 RK_FUNC_GPIO &pcfg_input_high>;
1427 };
1428
1429 pdm_sdi2_sleep: pdm-sdi2-sleep {
1430 rockchip,pins =
1431 <3 RK_PD1 RK_FUNC_GPIO &pcfg_input_high>;
1432 };
1433
1434 pdm_sdi3_sleep: pdm-sdi3-sleep {
1435 rockchip,pins =
1436 <3 RK_PD2 RK_FUNC_GPIO &pcfg_input_high>;
1437 };
1438 };
1439
1440 i2s0 {
1441 i2s0_8ch_mclk: i2s0-8ch-mclk {
1442 rockchip,pins =
1443 <3 RK_PC1 2 &pcfg_pull_none>;
1444 };
1445
1446 i2s0_8ch_sclktx: i2s0-8ch-sclktx {
1447 rockchip,pins =
1448 <3 RK_PC3 2 &pcfg_pull_none>;
1449 };
1450
1451 i2s0_8ch_sclkrx: i2s0-8ch-sclkrx {
1452 rockchip,pins =
1453 <3 RK_PB4 2 &pcfg_pull_none>;
1454 };
1455
1456 i2s0_8ch_lrcktx: i2s0-8ch-lrcktx {
1457 rockchip,pins =
1458 <3 RK_PC2 2 &pcfg_pull_none>;
1459 };
1460
1461 i2s0_8ch_lrckrx: i2s0-8ch-lrckrx {
1462 rockchip,pins =
1463 <3 RK_PB5 2 &pcfg_pull_none>;
1464 };
1465
1466 i2s0_8ch_sdo0: i2s0-8ch-sdo0 {
1467 rockchip,pins =
1468 <3 RK_PC4 2 &pcfg_pull_none>;
1469 };
1470
1471 i2s0_8ch_sdo1: i2s0-8ch-sdo1 {
1472 rockchip,pins =
1473 <3 RK_PC0 2 &pcfg_pull_none>;
1474 };
1475
1476 i2s0_8ch_sdo2: i2s0-8ch-sdo2 {
1477 rockchip,pins =
1478 <3 RK_PB7 2 &pcfg_pull_none>;
1479 };
1480
1481 i2s0_8ch_sdo3: i2s0-8ch-sdo3 {
1482 rockchip,pins =
1483 <3 RK_PB6 2 &pcfg_pull_none>;
1484 };
1485
1486 i2s0_8ch_sdi0: i2s0-8ch-sdi0 {
1487 rockchip,pins =
1488 <3 RK_PC5 2 &pcfg_pull_none>;
1489 };
1490
1491 i2s0_8ch_sdi1: i2s0-8ch-sdi1 {
1492 rockchip,pins =
1493 <3 RK_PB3 2 &pcfg_pull_none>;
1494 };
1495
1496 i2s0_8ch_sdi2: i2s0-8ch-sdi2 {
1497 rockchip,pins =
1498 <3 RK_PB1 2 &pcfg_pull_none>;
1499 };
1500
1501 i2s0_8ch_sdi3: i2s0-8ch-sdi3 {
1502 rockchip,pins =
1503 <3 RK_PB0 2 &pcfg_pull_none>;
1504 };
1505 };
1506
1507 i2s1 {
1508 i2s1_2ch_mclk: i2s1-2ch-mclk {
1509 rockchip,pins =
1510 <2 RK_PC3 1 &pcfg_pull_none>;
1511 };
1512
1513 i2s1_2ch_sclk: i2s1-2ch-sclk {
1514 rockchip,pins =
1515 <2 RK_PC2 1 &pcfg_pull_none>;
1516 };
1517
1518 i2s1_2ch_lrck: i2s1-2ch-lrck {
1519 rockchip,pins =
1520 <2 RK_PC1 1 &pcfg_pull_none>;
1521 };
1522
1523 i2s1_2ch_sdi: i2s1-2ch-sdi {
1524 rockchip,pins =
1525 <2 RK_PC5 1 &pcfg_pull_none>;
1526 };
1527
1528 i2s1_2ch_sdo: i2s1-2ch-sdo {
1529 rockchip,pins =
1530 <2 RK_PC4 1 &pcfg_pull_none>;
1531 };
1532 };
1533
1534 i2s2 {
1535 i2s2_2ch_mclk: i2s2-2ch-mclk {
1536 rockchip,pins =
1537 <3 RK_PA1 2 &pcfg_pull_none>;
1538 };
1539
1540 i2s2_2ch_sclk: i2s2-2ch-sclk {
1541 rockchip,pins =
1542 <3 RK_PA2 2 &pcfg_pull_none>;
1543 };
1544
1545 i2s2_2ch_lrck: i2s2-2ch-lrck {
1546 rockchip,pins =
1547 <3 RK_PA3 2 &pcfg_pull_none>;
1548 };
1549
1550 i2s2_2ch_sdi: i2s2-2ch-sdi {
1551 rockchip,pins =
1552 <3 RK_PA5 2 &pcfg_pull_none>;
1553 };
1554
1555 i2s2_2ch_sdo: i2s2-2ch-sdo {
1556 rockchip,pins =
1557 <3 RK_PA7 2 &pcfg_pull_none>;
1558 };
1559 };
1560
1561 sdmmc {
1562 sdmmc_clk: sdmmc-clk {
1563 rockchip,pins =
1564 <1 RK_PD6 1 &pcfg_pull_none_8ma>;
1565 };
1566
1567 sdmmc_cmd: sdmmc-cmd {
1568 rockchip,pins =
1569 <1 RK_PD7 1 &pcfg_pull_up_8ma>;
1570 };
1571
1572 sdmmc_det: sdmmc-det {
1573 rockchip,pins =
1574 <0 RK_PA3 1 &pcfg_pull_up_8ma>;
1575 };
1576
1577 sdmmc_bus1: sdmmc-bus1 {
1578 rockchip,pins =
1579 <1 RK_PD2 1 &pcfg_pull_up_8ma>;
1580 };
1581
1582 sdmmc_bus4: sdmmc-bus4 {
1583 rockchip,pins =
1584 <1 RK_PD2 1 &pcfg_pull_up_8ma>,
1585 <1 RK_PD3 1 &pcfg_pull_up_8ma>,
1586 <1 RK_PD4 1 &pcfg_pull_up_8ma>,
1587 <1 RK_PD5 1 &pcfg_pull_up_8ma>;
1588 };
1589
1590 sdmmc_gpio: sdmmc-gpio {
1591 rockchip,pins =
1592 <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
1593 <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
1594 <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
1595 <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
1596 <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
1597 <1 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up_4ma>;
1598 };
1599 };
1600
1601 sdio {
1602 sdio_clk: sdio-clk {
1603 rockchip,pins =
1604 <1 RK_PC5 1 &pcfg_pull_none>;
1605 };
1606
1607 sdio_cmd: sdio-cmd {
1608 rockchip,pins =
1609 <1 RK_PC4 1 &pcfg_pull_up>;
1610 };
1611
1612 sdio_bus4: sdio-bus4 {
1613 rockchip,pins =
1614 <1 RK_PC6 1 &pcfg_pull_up>,
1615 <1 RK_PC7 1 &pcfg_pull_up>,
1616 <1 RK_PD0 1 &pcfg_pull_up>,
1617 <1 RK_PD1 1 &pcfg_pull_up>;
1618 };
1619
1620 sdio_gpio: sdio-gpio {
1621 rockchip,pins =
1622 <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
1623 <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>,
1624 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
1625 <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>,
1626 <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>,
1627 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
1628 };
1629 };
1630
1631 emmc {
1632 emmc_clk: emmc-clk {
1633 rockchip,pins =
1634 <1 RK_PB1 2 &pcfg_pull_none_8ma>;
1635 };
1636
1637 emmc_cmd: emmc-cmd {
1638 rockchip,pins =
1639 <1 RK_PB2 2 &pcfg_pull_up_8ma>;
1640 };
1641
1642 emmc_pwren: emmc-pwren {
1643 rockchip,pins =
1644 <1 RK_PB0 2 &pcfg_pull_none>;
1645 };
1646
1647 emmc_rstnout: emmc-rstnout {
1648 rockchip,pins =
1649 <1 RK_PB3 2 &pcfg_pull_none>;
1650 };
1651
1652 emmc_bus1: emmc-bus1 {
1653 rockchip,pins =
1654 <1 RK_PA0 2 &pcfg_pull_up_8ma>;
1655 };
1656
1657 emmc_bus4: emmc-bus4 {
1658 rockchip,pins =
1659 <1 RK_PA0 2 &pcfg_pull_up_8ma>,
1660 <1 RK_PA1 2 &pcfg_pull_up_8ma>,
1661 <1 RK_PA2 2 &pcfg_pull_up_8ma>,
1662 <1 RK_PA3 2 &pcfg_pull_up_8ma>;
1663 };
1664
1665 emmc_bus8: emmc-bus8 {
1666 rockchip,pins =
1667 <1 RK_PA0 2 &pcfg_pull_up_8ma>,
1668 <1 RK_PA1 2 &pcfg_pull_up_8ma>,
1669 <1 RK_PA2 2 &pcfg_pull_up_8ma>,
1670 <1 RK_PA3 2 &pcfg_pull_up_8ma>,
1671 <1 RK_PA4 2 &pcfg_pull_up_8ma>,
1672 <1 RK_PA5 2 &pcfg_pull_up_8ma>,
1673 <1 RK_PA6 2 &pcfg_pull_up_8ma>,
1674 <1 RK_PA7 2 &pcfg_pull_up_8ma>;
1675 };
1676 };
1677
1678 flash {
1679 flash_cs0: flash-cs0 {
1680 rockchip,pins =
1681 <1 RK_PB0 1 &pcfg_pull_none>;
1682 };
1683
1684 flash_rdy: flash-rdy {
1685 rockchip,pins =
1686 <1 RK_PB1 1 &pcfg_pull_none>;
1687 };
1688
1689 flash_dqs: flash-dqs {
1690 rockchip,pins =
1691 <1 RK_PB2 1 &pcfg_pull_none>;
1692 };
1693
1694 flash_ale: flash-ale {
1695 rockchip,pins =
1696 <1 RK_PB3 1 &pcfg_pull_none>;
1697 };
1698
1699 flash_cle: flash-cle {
1700 rockchip,pins =
1701 <1 RK_PB4 1 &pcfg_pull_none>;
1702 };
1703
1704 flash_wrn: flash-wrn {
1705 rockchip,pins =
1706 <1 RK_PB5 1 &pcfg_pull_none>;
1707 };
1708
1709 flash_csl: flash-csl {
1710 rockchip,pins =
1711 <1 RK_PB6 1 &pcfg_pull_none>;
1712 };
1713
1714 flash_rdn: flash-rdn {
1715 rockchip,pins =
1716 <1 RK_PB7 1 &pcfg_pull_none>;
1717 };
1718
1719 flash_bus8: flash-bus8 {
1720 rockchip,pins =
1721 <1 RK_PA0 1 &pcfg_pull_up_12ma>,
1722 <1 RK_PA1 1 &pcfg_pull_up_12ma>,
1723 <1 RK_PA2 1 &pcfg_pull_up_12ma>,
1724 <1 RK_PA3 1 &pcfg_pull_up_12ma>,
1725 <1 RK_PA4 1 &pcfg_pull_up_12ma>,
1726 <1 RK_PA5 1 &pcfg_pull_up_12ma>,
1727 <1 RK_PA6 1 &pcfg_pull_up_12ma>,
1728 <1 RK_PA7 1 &pcfg_pull_up_12ma>;
1729 };
1730 };
1731
1732 lcdc {
1733 lcdc_rgb_dclk_pin: lcdc-rgb-dclk-pin {
1734 rockchip,pins =
1735 <3 RK_PA0 1 &pcfg_pull_none_12ma>;
1736 };
1737
1738 lcdc_rgb_m0_hsync_pin: lcdc-rgb-m0-hsync-pin {
1739 rockchip,pins =
1740 <3 RK_PA1 1 &pcfg_pull_none_12ma>;
1741 };
1742
1743 lcdc_rgb_m0_vsync_pin: lcdc-rgb-m0-vsync-pin {
1744 rockchip,pins =
1745 <3 RK_PA2 1 &pcfg_pull_none_12ma>;
1746 };
1747
1748 lcdc_rgb_m0_den_pin: lcdc-rgb-m0-den-pin {
1749 rockchip,pins =
1750 <3 RK_PA3 1 &pcfg_pull_none_12ma>;
1751 };
1752
1753 lcdc_rgb888_m0_data_pins: lcdc-rgb888-m0-data-pins {
1754 rockchip,pins =
1755 <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
1756 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1757 <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
1758 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1759 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1760 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1761 <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
1762 <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
1763 <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
1764 <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
1765 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1766 <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
1767 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1768 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1769 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1770 <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
1771 <3 RK_PC7 1 &pcfg_pull_none_8ma>, /* lcdc_d19 */
1772 <3 RK_PC6 1 &pcfg_pull_none_8ma>, /* lcdc_d18 */
1773 <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
1774 <3 RK_PC4 1 &pcfg_pull_none_8ma>, /* lcdc_d16 */
1775 <3 RK_PD3 1 &pcfg_pull_none_8ma>, /* lcdc_d23 */
1776 <3 RK_PD2 1 &pcfg_pull_none_8ma>, /* lcdc_d22 */
1777 <3 RK_PD1 1 &pcfg_pull_none_8ma>, /* lcdc_d21 */
1778 <3 RK_PD0 1 &pcfg_pull_none_8ma>; /* lcdc_d20 */
1779 };
1780
1781 lcdc_rgb666_m0_data_pins: lcdc-rgb666-m0-data-pins {
1782 rockchip,pins =
1783 <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
1784 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1785 <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
1786 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1787 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1788 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1789 <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
1790 <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
1791 <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
1792 <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
1793 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1794 <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
1795 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1796 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1797 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1798 <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
1799 <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
1800 <3 RK_PC4 1 &pcfg_pull_none_8ma>; /* lcdc_d16 */
1801 };
1802
1803 lcdc_rgb565_m0_data_pins: lcdc-rgb565-m0-data-pins {
1804 rockchip,pins =
1805 <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
1806 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1807 <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
1808 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1809 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1810 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1811 <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
1812 <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
1813 <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
1814 <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
1815 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1816 <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
1817 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1818 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1819 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1820 <3 RK_PC0 1 &pcfg_pull_none_8ma>; /* lcdc_d12 */
1821 };
1822
1823 lcdc_rgb888_m1_data_pins: lcdc-rgb888-m1-data-pins {
1824 rockchip,pins =
1825 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1826 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1827 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1828 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1829 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1830 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1831 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1832 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1833 <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
1834 <3 RK_PC7 1 &pcfg_pull_none_8ma>, /* lcdc_d19 */
1835 <3 RK_PC6 1 &pcfg_pull_none_8ma>, /* lcdc_d18 */
1836 <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
1837 <3 RK_PC4 1 &pcfg_pull_none_8ma>, /* lcdc_d16 */
1838 <3 RK_PD3 1 &pcfg_pull_none_8ma>, /* lcdc_d23 */
1839 <3 RK_PD2 1 &pcfg_pull_none_8ma>, /* lcdc_d22 */
1840 <3 RK_PD1 1 &pcfg_pull_none_8ma>, /* lcdc_d21 */
1841 <3 RK_PD0 1 &pcfg_pull_none_8ma>; /* lcdc_d20 */
1842 };
1843
1844 lcdc_rgb666_m1_data_pins: lcdc-rgb666-m1-data-pins {
1845 rockchip,pins =
1846 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1847 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1848 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1849 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1850 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1851 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1852 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1853 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1854 <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
1855 <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
1856 <3 RK_PC4 1 &pcfg_pull_none_8ma>; /* lcdc_d16 */
1857 };
1858
1859 lcdc_rgb565_m1_data_pins: lcdc-rgb565-m1-data-pins {
1860 rockchip,pins =
1861 <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
1862 <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
1863 <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
1864 <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
1865 <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
1866 <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
1867 <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
1868 <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
1869 <3 RK_PC0 1 &pcfg_pull_none_8ma>; /* lcdc_d12 */
1870 };
1871 };
1872
1873 pwm0 {
1874 pwm0_pin: pwm0-pin {
1875 rockchip,pins =
1876 <0 RK_PB7 1 &pcfg_pull_none>;
1877 };
1878 };
1879
1880 pwm1 {
1881 pwm1_pin: pwm1-pin {
1882 rockchip,pins =
1883 <0 RK_PC0 1 &pcfg_pull_none>;
1884 };
1885 };
1886
1887 pwm2 {
1888 pwm2_pin: pwm2-pin {
1889 rockchip,pins =
1890 <2 RK_PB5 1 &pcfg_pull_none>;
1891 };
1892 };
1893
1894 pwm3 {
1895 pwm3_pin: pwm3-pin {
1896 rockchip,pins =
1897 <0 RK_PC1 1 &pcfg_pull_none>;
1898 };
1899 };
1900
1901 pwm4 {
1902 pwm4_pin: pwm4-pin {
1903 rockchip,pins =
1904 <3 RK_PC2 3 &pcfg_pull_none>;
1905 };
1906 };
1907
1908 pwm5 {
1909 pwm5_pin: pwm5-pin {
1910 rockchip,pins =
1911 <3 RK_PC3 3 &pcfg_pull_none>;
1912 };
1913 };
1914
1915 pwm6 {
1916 pwm6_pin: pwm6-pin {
1917 rockchip,pins =
1918 <3 RK_PC4 3 &pcfg_pull_none>;
1919 };
1920 };
1921
1922 pwm7 {
1923 pwm7_pin: pwm7-pin {
1924 rockchip,pins =
1925 <3 RK_PC5 3 &pcfg_pull_none>;
1926 };
1927 };
1928
1929 gmac {
1930 rmii_pins: rmii-pins {
1931 rockchip,pins =
1932 <2 RK_PA0 2 &pcfg_pull_none_12ma>, /* mac_txen */
1933 <2 RK_PA1 2 &pcfg_pull_none_12ma>, /* mac_txd1 */
1934 <2 RK_PA2 2 &pcfg_pull_none_12ma>, /* mac_txd0 */
1935 <2 RK_PA3 2 &pcfg_pull_none>, /* mac_rxd0 */
1936 <2 RK_PA4 2 &pcfg_pull_none>, /* mac_rxd1 */
1937 <2 RK_PA5 2 &pcfg_pull_none>, /* mac_rxer */
1938 <2 RK_PA6 2 &pcfg_pull_none>, /* mac_rxdv */
1939 <2 RK_PA7 2 &pcfg_pull_none>, /* mac_mdio */
1940 <2 RK_PB1 2 &pcfg_pull_none>; /* mac_mdc */
1941 };
1942
1943 mac_refclk_12ma: mac-refclk-12ma {
1944 rockchip,pins =
1945 <2 RK_PB2 2 &pcfg_pull_none_12ma>;
1946 };
1947
1948 mac_refclk: mac-refclk {
1949 rockchip,pins =
1950 <2 RK_PB2 2 &pcfg_pull_none>;
1951 };
1952 };
1953
1954 cif-m0 {
1955 cif_clkout_m0: cif-clkout-m0 {
1956 rockchip,pins =
1957 <2 RK_PB3 1 &pcfg_pull_none>;
1958 };
1959
1960 dvp_d2d9_m0: dvp-d2d9-m0 {
1961 rockchip,pins =
1962 <2 RK_PA0 1 &pcfg_pull_none>, /* cif_data2 */
1963 <2 RK_PA1 1 &pcfg_pull_none>, /* cif_data3 */
1964 <2 RK_PA2 1 &pcfg_pull_none>, /* cif_data4 */
1965 <2 RK_PA3 1 &pcfg_pull_none>, /* cif_data5 */
1966 <2 RK_PA4 1 &pcfg_pull_none>, /* cif_data6 */
1967 <2 RK_PA5 1 &pcfg_pull_none>, /* cif_data7 */
1968 <2 RK_PA6 1 &pcfg_pull_none>, /* cif_data8 */
1969 <2 RK_PA7 1 &pcfg_pull_none>, /* cif_data9 */
1970 <2 RK_PB0 1 &pcfg_pull_none>, /* cif_sync */
1971 <2 RK_PB1 1 &pcfg_pull_none>, /* cif_href */
1972 <2 RK_PB2 1 &pcfg_pull_none>, /* cif_clkin */
1973 <2 RK_PB3 1 &pcfg_pull_none>; /* cif_clkout */
1974 };
1975
1976 dvp_d0d1_m0: dvp-d0d1-m0 {
1977 rockchip,pins =
1978 <2 RK_PB4 1 &pcfg_pull_none>, /* cif_data0 */
1979 <2 RK_PB6 1 &pcfg_pull_none>; /* cif_data1 */
1980 };
1981
1982 dvp_d10d11_m0:d10-d11-m0 {
1983 rockchip,pins =
1984 <2 RK_PB7 1 &pcfg_pull_none>, /* cif_data10 */
1985 <2 RK_PC0 1 &pcfg_pull_none>; /* cif_data11 */
1986 };
1987 };
1988
1989 cif-m1 {
1990 cif_clkout_m1: cif-clkout-m1 {
1991 rockchip,pins =
1992 <3 RK_PD0 3 &pcfg_pull_none>;
1993 };
1994
1995 dvp_d2d9_m1: dvp-d2d9-m1 {
1996 rockchip,pins =
1997 <3 RK_PA3 3 &pcfg_pull_none>, /* cif_data2 */
1998 <3 RK_PA5 3 &pcfg_pull_none>, /* cif_data3 */
1999 <3 RK_PA7 3 &pcfg_pull_none>, /* cif_data4 */
2000 <3 RK_PB0 3 &pcfg_pull_none>, /* cif_data5 */
2001 <3 RK_PB1 3 &pcfg_pull_none>, /* cif_data6 */
2002 <3 RK_PB4 3 &pcfg_pull_none>, /* cif_data7 */
2003 <3 RK_PB6 3 &pcfg_pull_none>, /* cif_data8 */
2004 <3 RK_PB7 3 &pcfg_pull_none>, /* cif_data9 */
2005 <3 RK_PD1 3 &pcfg_pull_none>, /* cif_sync */
2006 <3 RK_PD2 3 &pcfg_pull_none>, /* cif_href */
2007 <3 RK_PD3 3 &pcfg_pull_none>, /* cif_clkin */
2008 <3 RK_PD0 3 &pcfg_pull_none>; /* cif_clkout */
2009 };
2010
2011 dvp_d0d1_m1: dvp-d0d1-m1 {
2012 rockchip,pins =
2013 <3 RK_PA1 3 &pcfg_pull_none>, /* cif_data0 */
2014 <3 RK_PA2 3 &pcfg_pull_none>; /* cif_data1 */
2015 };
2016
2017 dvp_d10d11_m1:d10-d11-m1 {
2018 rockchip,pins =
2019 <3 RK_PC6 3 &pcfg_pull_none>, /* cif_data10 */
2020 <3 RK_PC7 3 &pcfg_pull_none>; /* cif_data11 */
2021 };
2022 };
2023
2024 isp {
2025 isp_prelight: isp-prelight {
2026 rockchip,pins =
2027 <3 RK_PD1 4 &pcfg_pull_none>;
2028 };
2029 };
2030 };
2031};
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index 246c317f6a68..99d0d9912950 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -41,6 +41,19 @@
41 vin-supply = <&vcc_io>; 41 vin-supply = <&vcc_io>;
42 }; 42 };
43 43
44 vcc_sdio: sdmmcio-regulator {
45 compatible = "regulator-gpio";
46 gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
47 states = <1800000 0x1
48 3300000 0x0>;
49 regulator-name = "vcc_sdio";
50 regulator-type = "voltage";
51 regulator-min-microvolt = <1800000>;
52 regulator-max-microvolt = <3300000>;
53 regulator-always-on;
54 vin-supply = <&vcc_sys>;
55 };
56
44 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { 57 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
45 compatible = "regulator-fixed"; 58 compatible = "regulator-fixed";
46 enable-active-high; 59 enable-active-high;
@@ -208,6 +221,18 @@
208 }; 221 };
209}; 222};
210 223
224&io_domains {
225 status = "okay";
226
227 vccio1-supply = <&vcc_io>;
228 vccio2-supply = <&vcc18_emmc>;
229 vccio3-supply = <&vcc_sdio>;
230 vccio4-supply = <&vcc_18>;
231 vccio5-supply = <&vcc_io>;
232 vccio6-supply = <&vcc_io>;
233 pmuio-supply = <&vcc_io>;
234};
235
211&pinctrl { 236&pinctrl {
212 pmic { 237 pmic {
213 pmic_int_l: pmic-int-l { 238 pmic_int_l: pmic-int-l {
@@ -230,7 +255,12 @@
230 max-frequency = <150000000>; 255 max-frequency = <150000000>;
231 pinctrl-names = "default"; 256 pinctrl-names = "default";
232 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>; 257 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
258 sd-uhs-sdr12;
259 sd-uhs-sdr25;
260 sd-uhs-sdr50;
261 sd-uhs-sdr104;
233 vmmc-supply = <&vcc_sd>; 262 vmmc-supply = <&vcc_sd>;
263 vqmmc-supply = <&vcc_sdio>;
234 status = "okay"; 264 status = "okay";
235}; 265};
236 266
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
index 5272e887a434..5852061e497b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
@@ -46,7 +46,7 @@
46 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { 46 vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
47 compatible = "regulator-fixed"; 47 compatible = "regulator-fixed";
48 enable-active-high; 48 enable-active-high;
49 gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; 49 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
50 pinctrl-names = "default"; 50 pinctrl-names = "default";
51 pinctrl-0 = <&usb20_host_drv>; 51 pinctrl-0 = <&usb20_host_drv>;
52 regulator-name = "vcc_host1_5v"; 52 regulator-name = "vcc_host1_5v";
@@ -238,7 +238,7 @@
238 238
239 usb2 { 239 usb2 {
240 usb20_host_drv: usb20-host-drv { 240 usb20_host_drv: usb20-host-drv {
241 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 241 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
242 }; 242 };
243 }; 243 };
244 244
diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 3f5a2944300f..d3ef6566325e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -249,6 +249,12 @@
249 status = "disabled"; 249 status = "disabled";
250 }; 250 };
251 251
252 grf_gpio: grf-gpio {
253 compatible = "rockchip,rk3328-grf-gpio";
254 gpio-controller;
255 #gpio-cells = <2>;
256 };
257
252 power: power-controller { 258 power: power-controller {
253 compatible = "rockchip,rk3328-power-controller"; 259 compatible = "rockchip,rk3328-power-controller";
254 #power-domain-cells = <1>; 260 #power-domain-cells = <1>;
@@ -274,7 +280,6 @@
274 mode-bootloader = <BOOT_FASTBOOT>; 280 mode-bootloader = <BOOT_FASTBOOT>;
275 mode-loader = <BOOT_BL_DOWNLOAD>; 281 mode-loader = <BOOT_BL_DOWNLOAD>;
276 }; 282 };
277
278 }; 283 };
279 284
280 uart0: serial@ff110000 { 285 uart0: serial@ff110000 {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index 38336ab57cc4..c706db0ee9ec 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -622,6 +622,12 @@
622 }; 622 };
623 }; 623 };
624 624
625 wifi {
626 wifi_host_wake_l: wifi-host-wake-l {
627 rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
628 };
629 };
630
625 leds { 631 leds {
626 work_led_gpio: work_led-gpio { 632 work_led_gpio: work_led-gpio {
627 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; 633 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -646,6 +652,36 @@
646 status = "okay"; 652 status = "okay";
647}; 653};
648 654
655&sdio0 {
656 /* WiFi & BT combo module Ampak AP6356S */
657 bus-width = <4>;
658 cap-sdio-irq;
659 cap-sd-highspeed;
660 keep-power-in-suspend;
661 mmc-pwrseq = <&sdio_pwrseq>;
662 non-removable;
663 num-slots = <1>;
664 pinctrl-names = "default";
665 pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
666 sd-uhs-sdr104;
667
668 /* Power supply */
669 vqmmc-supply = &vcc1v8_s3; /* IO line */
670 vmmc-supply = &vcc_sdio; /* card's power */
671
672 status = "okay";
673
674 brcmf: wifi@1 {
675 compatible = "brcm,bcm4329-fmac";
676 interrupt-parent = <&gpio0>;
677 interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
678 interrupt-names = "host-wake";
679 brcm,drive-strength = <5>;
680 pinctrl-names = "default";
681 pinctrl-0 = <&wifi_host_wake_l>;
682 };
683};
684
649&sdmmc { 685&sdmmc {
650 bus-width = <4>; 686 bus-width = <4>;
651 cap-mmc-highspeed; 687 cap-mmc-highspeed;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts
new file mode 100644
index 000000000000..19f7732d728c
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts
@@ -0,0 +1,680 @@
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
4 */
5
6/dts-v1/;
7#include <dt-bindings/pwm/pwm.h>
8#include "rk3399.dtsi"
9#include "rk3399-opp.dtsi"
10
11/ {
12 model = "Firefly ROC-RK3399-PC Board";
13 compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
14
15 chosen {
16 stdout-path = "serial2:1500000n8";
17 };
18
19 backlight: backlight {
20 compatible = "pwm-backlight";
21 pwms = <&pwm0 0 25000 0>;
22 };
23
24 clkin_gmac: external-gmac-clock {
25 compatible = "fixed-clock";
26 clock-frequency = <125000000>;
27 clock-output-names = "clkin_gmac";
28 #clock-cells = <0>;
29 };
30
31 sdio_pwrseq: sdio-pwrseq {
32 compatible = "mmc-pwrseq-simple";
33 clocks = <&rk808 1>;
34 clock-names = "ext_clock";
35 pinctrl-names = "default";
36 pinctrl-0 = <&wifi_enable_h>;
37
38 /*
39 * On the module itself this is one of these (depending
40 * on the actual card populated):
41 * - SDIO_RESET_L_WL_REG_ON
42 * - PDN (power down when low)
43 */
44 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
45 };
46
47 vcc_vbus_typec0: vcc-vbus-typec0 {
48 compatible = "regulator-fixed";
49 regulator-name = "vcc_vbus_typec0";
50 regulator-always-on;
51 regulator-boot-on;
52 regulator-min-microvolt = <5000000>;
53 regulator-max-microvolt = <5000000>;
54 };
55
56 /*
57 * should be placed inside mp8859, but not until mp8859 has
58 * its own dt-binding.
59 */
60 vcc12v_sys: mp8859-dcdc1 {
61 compatible = "regulator-fixed";
62 regulator-name = "vcc12v_sys";
63 regulator-always-on;
64 regulator-boot-on;
65 regulator-min-microvolt = <12000000>;
66 regulator-max-microvolt = <12000000>;
67 vin-supply = <&vcc_vbus_typec0>;
68 };
69
70 /* switched by pmic_sleep */
71 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
72 compatible = "regulator-fixed";
73 regulator-name = "vcc1v8_s3";
74 regulator-always-on;
75 regulator-boot-on;
76 regulator-min-microvolt = <1800000>;
77 regulator-max-microvolt = <1800000>;
78 vin-supply = <&vcc_1v8>;
79 };
80
81 vcc3v3_sys: vcc3v3-sys {
82 compatible = "regulator-fixed";
83 regulator-name = "vcc3v3_sys";
84 regulator-always-on;
85 regulator-boot-on;
86 regulator-min-microvolt = <3300000>;
87 regulator-max-microvolt = <3300000>;
88 vin-supply = <&vcc12v_sys>;
89 };
90
91 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
92 vcc5v0_host: vcc5v0-host-regulator {
93 compatible = "regulator-fixed";
94 enable-active-high;
95 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
96 pinctrl-names = "default";
97 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
98 regulator-name = "vcc5v0_host";
99 regulator-always-on;
100 vin-supply = <&vcc_sys>;
101 };
102
103 vcc_vbus_typec1: vcc-vbus-typec1 {
104 compatible = "regulator-fixed";
105 enable-active-high;
106 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
107 pinctrl-names = "default";
108 pinctrl-0 = <&vcc_vbus_typec1_en>;
109 regulator-name = "vcc_vbus_typec1";
110 regulator-always-on;
111 vin-supply = <&vcc_sys>;
112 };
113
114 vcc_sys: vcc-sys {
115 compatible = "regulator-fixed";
116 regulator-name = "vcc_sys";
117 regulator-always-on;
118 regulator-boot-on;
119 regulator-min-microvolt = <5000000>;
120 regulator-max-microvolt = <5000000>;
121 vin-supply = <&vcc12v_sys>;
122 };
123
124 vdd_log: vdd-log {
125 compatible = "pwm-regulator";
126 pwms = <&pwm2 0 25000 1>;
127 regulator-name = "vdd_log";
128 regulator-always-on;
129 regulator-boot-on;
130 regulator-min-microvolt = <800000>;
131 regulator-max-microvolt = <1400000>;
132 vin-supply = <&vcc3v3_sys>;
133 };
134};
135
136&cpu_l0 {
137 cpu-supply = <&vdd_cpu_l>;
138};
139
140&cpu_l1 {
141 cpu-supply = <&vdd_cpu_l>;
142};
143
144&cpu_l2 {
145 cpu-supply = <&vdd_cpu_l>;
146};
147
148&cpu_l3 {
149 cpu-supply = <&vdd_cpu_l>;
150};
151
152&cpu_b0 {
153 cpu-supply = <&vdd_cpu_b>;
154};
155
156&cpu_b1 {
157 cpu-supply = <&vdd_cpu_b>;
158};
159
160&emmc_phy {
161 status = "okay";
162};
163
164&gmac {
165 assigned-clocks = <&cru SCLK_RMII_SRC>;
166 assigned-clock-parents = <&clkin_gmac>;
167 clock_in_out = "input";
168 phy-supply = <&vcc_lan>;
169 phy-mode = "rgmii";
170 pinctrl-names = "default";
171 pinctrl-0 = <&rgmii_pins>;
172 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
173 snps,reset-active-low;
174 snps,reset-delays-us = <0 10000 50000>;
175 tx_delay = <0x28>;
176 rx_delay = <0x11>;
177 status = "okay";
178};
179
180&hdmi {
181 ddc-i2c-bus = <&i2c3>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&hdmi_cec>;
184 status = "okay";
185};
186
187&i2c0 {
188 clock-frequency = <400000>;
189 i2c-scl-rising-time-ns = <168>;
190 i2c-scl-falling-time-ns = <4>;
191 status = "okay";
192
193 rk808: pmic@1b {
194 compatible = "rockchip,rk808";
195 reg = <0x1b>;
196 interrupt-parent = <&gpio1>;
197 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
198 #clock-cells = <1>;
199 clock-output-names = "xin32k", "rk808-clkout2";
200 pinctrl-names = "default";
201 pinctrl-0 = <&pmic_int_l>;
202 rockchip,system-power-controller;
203 wakeup-source;
204
205 vcc1-supply = <&vcc3v3_sys>;
206 vcc2-supply = <&vcc3v3_sys>;
207 vcc3-supply = <&vcc3v3_sys>;
208 vcc4-supply = <&vcc3v3_sys>;
209 vcc6-supply = <&vcc3v3_sys>;
210 vcc7-supply = <&vcc3v3_sys>;
211 vcc8-supply = <&vcc3v3_sys>;
212 vcc9-supply = <&vcc3v3_sys>;
213 vcc10-supply = <&vcc3v3_sys>;
214 vcc11-supply = <&vcc3v3_sys>;
215 vcc12-supply = <&vcc3v3_sys>;
216 vddio-supply = <&vcc1v8_pmu>;
217
218 regulators {
219 vdd_center: DCDC_REG1 {
220 regulator-name = "vdd_center";
221 regulator-always-on;
222 regulator-boot-on;
223 regulator-min-microvolt = <750000>;
224 regulator-max-microvolt = <1350000>;
225 regulator-ramp-delay = <6001>;
226 regulator-state-mem {
227 regulator-off-in-suspend;
228 };
229 };
230
231 vdd_cpu_l: DCDC_REG2 {
232 regulator-name = "vdd_cpu_l";
233 regulator-always-on;
234 regulator-boot-on;
235 regulator-min-microvolt = <750000>;
236 regulator-max-microvolt = <1350000>;
237 regulator-ramp-delay = <6001>;
238 regulator-state-mem {
239 regulator-off-in-suspend;
240 };
241 };
242
243 vcc_ddr: DCDC_REG3 {
244 regulator-name = "vcc_ddr";
245 regulator-always-on;
246 regulator-boot-on;
247 regulator-state-mem {
248 regulator-on-in-suspend;
249 };
250 };
251
252 vcc_1v8: DCDC_REG4 {
253 regulator-name = "vcc_1v8";
254 regulator-always-on;
255 regulator-boot-on;
256 regulator-min-microvolt = <1800000>;
257 regulator-max-microvolt = <1800000>;
258 regulator-state-mem {
259 regulator-on-in-suspend;
260 regulator-suspend-microvolt = <1800000>;
261 };
262 };
263
264 vcca1v8_codec: LDO_REG1 {
265 regulator-name = "vcca1v8_codec";
266 regulator-always-on;
267 regulator-boot-on;
268 regulator-min-microvolt = <1800000>;
269 regulator-max-microvolt = <1800000>;
270 regulator-state-mem {
271 regulator-off-in-suspend;
272 };
273 };
274
275 vcc1v8_hdmi: LDO_REG2 {
276 regulator-name = "vcc1v8_hdmi";
277 regulator-always-on;
278 regulator-boot-on;
279 regulator-min-microvolt = <1800000>;
280 regulator-max-microvolt = <1800000>;
281 regulator-state-mem {
282 regulator-off-in-suspend;
283 };
284 };
285
286 vcc1v8_pmu: LDO_REG3 {
287 regulator-name = "vcc1v8_pmu";
288 regulator-always-on;
289 regulator-boot-on;
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <1800000>;
292 regulator-state-mem {
293 regulator-on-in-suspend;
294 regulator-suspend-microvolt = <1800000>;
295 };
296 };
297
298 vcc_sdio: LDO_REG4 {
299 regulator-name = "vcc_sdio";
300 regulator-always-on;
301 regulator-boot-on;
302 regulator-min-microvolt = <1800000>;
303 regulator-max-microvolt = <3000000>;
304 regulator-state-mem {
305 regulator-on-in-suspend;
306 regulator-suspend-microvolt = <3000000>;
307 };
308 };
309
310 vcca3v0_codec: LDO_REG5 {
311 regulator-name = "vcca3v0_codec";
312 regulator-always-on;
313 regulator-boot-on;
314 regulator-min-microvolt = <3000000>;
315 regulator-max-microvolt = <3000000>;
316 regulator-state-mem {
317 regulator-off-in-suspend;
318 };
319 };
320
321 vcc_1v5: LDO_REG6 {
322 regulator-name = "vcc_1v5";
323 regulator-always-on;
324 regulator-boot-on;
325 regulator-min-microvolt = <1500000>;
326 regulator-max-microvolt = <1500000>;
327 regulator-state-mem {
328 regulator-on-in-suspend;
329 regulator-suspend-microvolt = <1500000>;
330 };
331 };
332
333 vcca0v9_hdmi: LDO_REG7 {
334 regulator-name = "vcca0v9_hdmi";
335 regulator-always-on;
336 regulator-boot-on;
337 regulator-min-microvolt = <900000>;
338 regulator-max-microvolt = <900000>;
339 regulator-state-mem {
340 regulator-off-in-suspend;
341 };
342 };
343
344 vcc_3v0: LDO_REG8 {
345 regulator-name = "vcc_3v0";
346 regulator-always-on;
347 regulator-boot-on;
348 regulator-min-microvolt = <3000000>;
349 regulator-max-microvolt = <3000000>;
350 regulator-state-mem {
351 regulator-on-in-suspend;
352 regulator-suspend-microvolt = <3000000>;
353 };
354 };
355
356 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
357 regulator-name = "vcc3v3_s3";
358 regulator-always-on;
359 regulator-boot-on;
360 regulator-state-mem {
361 regulator-off-in-suspend;
362 };
363 };
364
365 vcc3v3_s0: SWITCH_REG2 {
366 regulator-name = "vcc3v3_s0";
367 regulator-always-on;
368 regulator-boot-on;
369 regulator-state-mem {
370 regulator-off-in-suspend;
371 };
372 };
373 };
374 };
375
376 vdd_cpu_b: regulator@40 {
377 compatible = "silergy,syr827";
378 reg = <0x40>;
379 fcs,suspend-voltage-selector = <1>;
380 pinctrl-names = "default";
381 pinctrl-0 = <&vsel1_gpio>;
382 regulator-name = "vdd_cpu_b";
383 regulator-min-microvolt = <712500>;
384 regulator-max-microvolt = <1500000>;
385 regulator-ramp-delay = <1000>;
386 regulator-always-on;
387 regulator-boot-on;
388 vin-supply = <&vcc3v3_sys>;
389
390 regulator-state-mem {
391 regulator-off-in-suspend;
392 };
393 };
394
395 vdd_gpu: regulator@41 {
396 compatible = "silergy,syr828";
397 reg = <0x41>;
398 fcs,suspend-voltage-selector = <1>;
399 pinctrl-names = "default";
400 pinctrl-0 = <&vsel2_gpio>;
401 regulator-name = "vdd_gpu";
402 regulator-min-microvolt = <712500>;
403 regulator-max-microvolt = <1500000>;
404 regulator-ramp-delay = <1000>;
405 regulator-always-on;
406 regulator-boot-on;
407 vin-supply = <&vcc3v3_sys>;
408
409 regulator-state-mem {
410 regulator-off-in-suspend;
411 };
412 };
413};
414
415&i2c1 {
416 i2c-scl-rising-time-ns = <300>;
417 i2c-scl-falling-time-ns = <15>;
418 status = "okay";
419};
420
421&i2c3 {
422 i2c-scl-rising-time-ns = <450>;
423 i2c-scl-falling-time-ns = <15>;
424 status = "okay";
425};
426
427&i2c4 {
428 i2c-scl-rising-time-ns = <600>;
429 i2c-scl-falling-time-ns = <20>;
430 status = "okay";
431
432 fusb1: usb-typec@22 {
433 compatible = "fcs,fusb302";
434 reg = <0x22>;
435 interrupt-parent = <&gpio1>;
436 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
437 pinctrl-names = "default";
438 pinctrl-0 = <&fusb1_int>;
439 vbus-supply = <&vcc_vbus_typec1>;
440 status = "okay";
441 };
442};
443
444&i2c7 {
445 i2c-scl-rising-time-ns = <600>;
446 i2c-scl-falling-time-ns = <20>;
447 status = "okay";
448
449 fusb0: usb-typec@22 {
450 compatible = "fcs,fusb302";
451 reg = <0x22>;
452 interrupt-parent = <&gpio1>;
453 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
454 pinctrl-names = "default";
455 pinctrl-0 = <&fusb0_int>;
456 vbus-supply = <&vcc_vbus_typec0>;
457 status = "okay";
458 };
459};
460
461&i2s0 {
462 rockchip,playback-channels = <8>;
463 rockchip,capture-channels = <8>;
464 status = "okay";
465};
466
467&i2s1 {
468 rockchip,playback-channels = <2>;
469 rockchip,capture-channels = <2>;
470 status = "okay";
471};
472
473&i2s2 {
474 status = "okay";
475};
476
477&io_domains {
478 audio-supply = <&vcca1v8_codec>;
479 bt656-supply = <&vcc_3v0>;
480 gpio1830-supply = <&vcc_3v0>;
481 sdmmc-supply = <&vcc_sdio>;
482 status = "okay";
483};
484
485&pmu_io_domains {
486 pmu1830-supply = <&vcc_3v0>;
487 status = "okay";
488};
489
490&pinctrl {
491 lcd-panel {
492 lcd_panel_reset: lcd-panel-reset {
493 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
494 };
495 };
496
497 pmic {
498 vsel1_gpio: vsel1-gpio {
499 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
500 };
501
502 vsel2_gpio: vsel2-gpio {
503 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
504 };
505 };
506
507 sdio-pwrseq {
508 wifi_enable_h: wifi-enable-h {
509 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
510 };
511 };
512
513 pmic {
514 pmic_int_l: pmic-int-l {
515 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
516 };
517 };
518
519 usb2 {
520 vcc5v0_host_en: vcc5v0-host-en {
521 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
522 };
523
524 hub_rst: hub-rst {
525 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
526 };
527 };
528
529 usb-typec {
530 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
531 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
532 };
533 };
534
535 fusb30x {
536 fusb0_int: fusb0-int {
537 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
538 };
539
540 fusb1_int: fusb1-int {
541 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
542 };
543 };
544};
545
546&pwm0 {
547 status = "okay";
548};
549
550&pwm2 {
551 status = "okay";
552};
553
554&saradc {
555 vref-supply = <&vcca1v8_s3>;
556 status = "okay";
557};
558
559&sdmmc {
560 bus-width = <4>;
561 cap-mmc-highspeed;
562 cap-sd-highspeed;
563 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
564 disable-wp;
565 max-frequency = <150000000>;
566 pinctrl-names = "default";
567 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
568 status = "okay";
569};
570
571&sdhci {
572 bus-width = <8>;
573 mmc-hs400-1_8v;
574 mmc-hs400-enhanced-strobe;
575 non-removable;
576 status = "okay";
577};
578
579&tcphy0 {
580 status = "okay";
581};
582
583&tcphy1 {
584 status = "okay";
585};
586
587&tsadc {
588 /* tshut mode 0:CRU 1:GPIO */
589 rockchip,hw-tshut-mode = <1>;
590 /* tshut polarity 0:LOW 1:HIGH */
591 rockchip,hw-tshut-polarity = <1>;
592 status = "okay";
593};
594
595&u2phy0 {
596 status = "okay";
597
598 u2phy0_otg: otg-port {
599 phy-supply = <&vcc_vbus_typec0>;
600 status = "okay";
601 };
602
603 u2phy0_host: host-port {
604 phy-supply = <&vcc5v0_host>;
605 status = "okay";
606 };
607};
608
609&u2phy1 {
610 status = "okay";
611
612 u2phy1_otg: otg-port {
613 phy-supply = <&vcc_vbus_typec1>;
614 status = "okay";
615 };
616
617 u2phy1_host: host-port {
618 phy-supply = <&vcc5v0_host>;
619 status = "okay";
620 };
621};
622
623&uart0 {
624 pinctrl-names = "default";
625 pinctrl-0 = <&uart0_xfer &uart0_cts>;
626 status = "okay";
627};
628
629&uart2 {
630 status = "okay";
631};
632
633&usb_host0_ehci {
634 status = "okay";
635};
636
637&usb_host0_ohci {
638 status = "okay";
639};
640
641&usb_host1_ehci {
642 status = "okay";
643};
644
645&usb_host1_ohci {
646 status = "okay";
647};
648
649&usbdrd3_0 {
650 status = "okay";
651};
652
653&usbdrd_dwc3_0 {
654 status = "okay";
655};
656
657&usbdrd3_1 {
658 status = "okay";
659};
660
661&usbdrd_dwc3_1 {
662 status = "okay";
663 dr_mode = "host";
664};
665
666&vopb {
667 status = "okay";
668};
669
670&vopb_mmu {
671 status = "okay";
672};
673
674&vopl {
675 status = "okay";
676};
677
678&vopl_mmu {
679 status = "okay";
680};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 36b60791c156..a531cd6c2e83 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -103,20 +103,10 @@
103 vin-supply = <&vcc_sys>; 103 vin-supply = <&vcc_sys>;
104 }; 104 };
105 105
106 vcc_sys: vcc-sys {
107 compatible = "regulator-fixed";
108 regulator-name = "vcc_sys";
109 regulator-always-on;
110 regulator-boot-on;
111 regulator-min-microvolt = <5000000>;
112 regulator-max-microvolt = <5000000>;
113 vin-supply = <&dc_12v>;
114 };
115
116 vcc5v0_host: vcc5v0-host-regulator { 106 vcc5v0_host: vcc5v0-host-regulator {
117 compatible = "regulator-fixed"; 107 compatible = "regulator-fixed";
118 enable-active-high; 108 enable-active-high;
119 gpio = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>; 109 gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
120 pinctrl-names = "default"; 110 pinctrl-names = "default";
121 pinctrl-0 = <&vcc5v0_host_en>; 111 pinctrl-0 = <&vcc5v0_host_en>;
122 regulator-name = "vcc5v0_host"; 112 regulator-name = "vcc5v0_host";
@@ -124,6 +114,26 @@
124 vin-supply = <&vcc_sys>; 114 vin-supply = <&vcc_sys>;
125 }; 115 };
126 116
117 vcc5v0_typec0: vcc5v0-typec0-regulator {
118 compatible = "regulator-fixed";
119 enable-active-high;
120 gpio = <&gpio2 RK_PA0 GPIO_ACTIVE_HIGH>;
121 pinctrl-names = "default";
122 pinctrl-0 = <&vcc5v0_typec0_en>;
123 regulator-name = "vcc5v0_typec0";
124 vin-supply = <&vcc_sys>;
125 };
126
127 vcc_sys: vcc-sys {
128 compatible = "regulator-fixed";
129 regulator-name = "vcc_sys";
130 regulator-always-on;
131 regulator-boot-on;
132 regulator-min-microvolt = <5000000>;
133 regulator-max-microvolt = <5000000>;
134 vin-supply = <&dc_12v>;
135 };
136
127 vdd_log: vdd-log { 137 vdd_log: vdd-log {
128 compatible = "pwm-regulator"; 138 compatible = "pwm-regulator";
129 pwms = <&pwm2 0 25000 1>; 139 pwms = <&pwm2 0 25000 1>;
@@ -208,7 +218,7 @@
208 #clock-cells = <1>; 218 #clock-cells = <1>;
209 clock-output-names = "xin32k", "rk808-clkout2"; 219 clock-output-names = "xin32k", "rk808-clkout2";
210 pinctrl-names = "default"; 220 pinctrl-names = "default";
211 pinctrl-0 = <&pmic_int_l &pmic_dvs2>; 221 pinctrl-0 = <&pmic_int_l>;
212 rockchip,system-power-controller; 222 rockchip,system-power-controller;
213 wakeup-source; 223 wakeup-source;
214 224
@@ -455,11 +465,6 @@
455 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>; 465 <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
456 }; 466 };
457 467
458 pmic_dvs2: pmic-dvs2 {
459 rockchip,pins =
460 <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
461 };
462
463 vsel1_gpio: vsel1-gpio { 468 vsel1_gpio: vsel1-gpio {
464 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>; 469 rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
465 }; 470 };
@@ -474,6 +479,10 @@
474 rockchip,pins = 479 rockchip,pins =
475 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; 480 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
476 }; 481 };
482 vcc5v0_typec0_en: vcc5v0-typec0-en {
483 rockchip,pins =
484 <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
485 };
477 }; 486 };
478}; 487};
479 488
@@ -531,6 +540,7 @@
531 status = "okay"; 540 status = "okay";
532 541
533 u2phy0_otg: otg-port { 542 u2phy0_otg: otg-port {
543 phy-supply = <&vcc5v0_typec0>;
534 status = "okay"; 544 status = "okay";
535 }; 545 };
536 546
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index c88e603396f6..b426902189c0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -74,6 +74,7 @@
74 clocks = <&cru ARMCLKL>; 74 clocks = <&cru ARMCLKL>;
75 #cooling-cells = <2>; /* min followed by max */ 75 #cooling-cells = <2>; /* min followed by max */
76 dynamic-power-coefficient = <100>; 76 dynamic-power-coefficient = <100>;
77 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
77 }; 78 };
78 79
79 cpu_l1: cpu@1 { 80 cpu_l1: cpu@1 {
@@ -84,6 +85,7 @@
84 clocks = <&cru ARMCLKL>; 85 clocks = <&cru ARMCLKL>;
85 #cooling-cells = <2>; /* min followed by max */ 86 #cooling-cells = <2>; /* min followed by max */
86 dynamic-power-coefficient = <100>; 87 dynamic-power-coefficient = <100>;
88 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
87 }; 89 };
88 90
89 cpu_l2: cpu@2 { 91 cpu_l2: cpu@2 {
@@ -94,6 +96,7 @@
94 clocks = <&cru ARMCLKL>; 96 clocks = <&cru ARMCLKL>;
95 #cooling-cells = <2>; /* min followed by max */ 97 #cooling-cells = <2>; /* min followed by max */
96 dynamic-power-coefficient = <100>; 98 dynamic-power-coefficient = <100>;
99 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
97 }; 100 };
98 101
99 cpu_l3: cpu@3 { 102 cpu_l3: cpu@3 {
@@ -104,6 +107,7 @@
104 clocks = <&cru ARMCLKL>; 107 clocks = <&cru ARMCLKL>;
105 #cooling-cells = <2>; /* min followed by max */ 108 #cooling-cells = <2>; /* min followed by max */
106 dynamic-power-coefficient = <100>; 109 dynamic-power-coefficient = <100>;
110 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
107 }; 111 };
108 112
109 cpu_b0: cpu@100 { 113 cpu_b0: cpu@100 {
@@ -114,6 +118,7 @@
114 clocks = <&cru ARMCLKB>; 118 clocks = <&cru ARMCLKB>;
115 #cooling-cells = <2>; /* min followed by max */ 119 #cooling-cells = <2>; /* min followed by max */
116 dynamic-power-coefficient = <436>; 120 dynamic-power-coefficient = <436>;
121 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
117 }; 122 };
118 123
119 cpu_b1: cpu@101 { 124 cpu_b1: cpu@101 {
@@ -124,6 +129,29 @@
124 clocks = <&cru ARMCLKB>; 129 clocks = <&cru ARMCLKB>;
125 #cooling-cells = <2>; /* min followed by max */ 130 #cooling-cells = <2>; /* min followed by max */
126 dynamic-power-coefficient = <436>; 131 dynamic-power-coefficient = <436>;
132 cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
133 };
134
135 idle-states {
136 entry-method = "psci";
137
138 CPU_SLEEP: cpu-sleep {
139 compatible = "arm,idle-state";
140 local-timer-stop;
141 arm,psci-suspend-param = <0x0010000>;
142 entry-latency-us = <120>;
143 exit-latency-us = <250>;
144 min-residency-us = <900>;
145 };
146
147 CLUSTER_SLEEP: cluster-sleep {
148 compatible = "arm,idle-state";
149 local-timer-stop;
150 arm,psci-suspend-param = <0x1010000>;
151 entry-latency-us = <400>;
152 exit-latency-us = <500>;
153 min-residency-us = <2000>;
154 };
127 }; 155 };
128 }; 156 };
129 157
diff --git a/arch/arm64/boot/dts/synaptics/as370.dtsi b/arch/arm64/boot/dts/synaptics/as370.dtsi
new file mode 100644
index 000000000000..7331acf3874e
--- /dev/null
+++ b/arch/arm64/boot/dts/synaptics/as370.dtsi
@@ -0,0 +1,173 @@
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2018 Synaptics Incorporated
4 *
5 * Author: Jisheng Zhang <jszhang@kernel.org>
6 */
7
8#include <dt-bindings/interrupt-controller/arm-gic.h>
9
10/ {
11 compatible = "syna,as370";
12 interrupt-parent = <&gic>;
13 #address-cells = <2>;
14 #size-cells = <2>;
15
16 psci {
17 compatible = "arm,psci-1.0";
18 method = "smc";
19 };
20
21 cpus {
22 #address-cells = <1>;
23 #size-cells = <0>;
24
25 cpu0: cpu@0 {
26 compatible = "arm,cortex-a53", "arm,armv8";
27 device_type = "cpu";
28 reg = <0x0>;
29 enable-method = "psci";
30 next-level-cache = <&l2>;
31 cpu-idle-states = <&CPU_SLEEP_0>;
32 };
33
34 cpu1: cpu@1 {
35 compatible = "arm,cortex-a53", "arm,armv8";
36 device_type = "cpu";
37 reg = <0x1>;
38 enable-method = "psci";
39 next-level-cache = <&l2>;
40 cpu-idle-states = <&CPU_SLEEP_0>;
41 };
42
43 cpu2: cpu@2 {
44 compatible = "arm,cortex-a53", "arm,armv8";
45 device_type = "cpu";
46 reg = <0x2>;
47 enable-method = "psci";
48 next-level-cache = <&l2>;
49 cpu-idle-states = <&CPU_SLEEP_0>;
50 };
51
52 cpu3: cpu@3 {
53 compatible = "arm,cortex-a53", "arm,armv8";
54 device_type = "cpu";
55 reg = <0x3>;
56 enable-method = "psci";
57 next-level-cache = <&l2>;
58 cpu-idle-states = <&CPU_SLEEP_0>;
59 };
60
61 l2: cache {
62 compatible = "cache";
63 };
64
65 idle-states {
66 entry-method = "psci";
67 CPU_SLEEP_0: cpu-sleep-0 {
68 compatible = "arm,idle-state";
69 local-timer-stop;
70 arm,psci-suspend-param = <0x0010000>;
71 entry-latency-us = <75>;
72 exit-latency-us = <155>;
73 min-residency-us = <1000>;
74 };
75 };
76 };
77
78 osc: osc {
79 compatible = "fixed-clock";
80 #clock-cells = <0>;
81 clock-frequency = <25000000>;
82 };
83
84 pmu {
85 compatible = "arm,cortex-a53-pmu";
86 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
87 <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
88 <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
89 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
90 interrupt-affinity = <&cpu0>,
91 <&cpu1>,
92 <&cpu2>,
93 <&cpu3>;
94 };
95
96 timer {
97 compatible = "arm,armv8-timer";
98 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
99 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
100 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
101 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
102 };
103
104 soc@f7000000 {
105 compatible = "simple-bus";
106 #address-cells = <1>;
107 #size-cells = <1>;
108 ranges = <0 0 0xf7000000 0x1000000>;
109
110 gic: interrupt-controller@901000 {
111 compatible = "arm,gic-400";
112 #interrupt-cells = <3>;
113 interrupt-controller;
114 reg = <0x901000 0x1000>,
115 <0x902000 0x2000>,
116 <0x904000 0x2000>,
117 <0x906000 0x2000>;
118 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
119 };
120
121 apb@e80000 {
122 compatible = "simple-bus";
123 #address-cells = <1>;
124 #size-cells = <1>;
125 ranges = <0 0xe80000 0x10000>;
126
127 uart0: serial@c00 {
128 compatible = "snps,dw-apb-uart";
129 reg = <0xc00 0x100>;
130 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
131 clocks = <&osc>;
132 reg-shift = <2>;
133 status = "disabled";
134 };
135
136 gpio0: gpio@1800 {
137 compatible = "snps,dw-apb-gpio";
138 reg = <0x1800 0x400>;
139 #address-cells = <1>;
140 #size-cells = <0>;
141
142 porta: gpio-port@0 {
143 compatible = "snps,dw-apb-gpio-port";
144 gpio-controller;
145 #gpio-cells = <2>;
146 snps,nr-gpios = <32>;
147 reg = <0>;
148 interrupt-controller;
149 #interrupt-cells = <2>;
150 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
151 };
152 };
153
154 gpio1: gpio@2000 {
155 compatible = "snps,dw-apb-gpio";
156 reg = <0x2000 0x400>;
157 #address-cells = <1>;
158 #size-cells = <0>;
159
160 portb: gpio-port@1 {
161 compatible = "snps,dw-apb-gpio-port";
162 gpio-controller;
163 #gpio-cells = <2>;
164 snps,nr-gpios = <32>;
165 reg = <0>;
166 interrupt-controller;
167 #interrupt-cells = <2>;
168 interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
169 };
170 };
171 };
172 };
173};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 2409344df4fa..adcd6341e40c 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -8,13 +8,13 @@
8&cbass_main { 8&cbass_main {
9 gic500: interrupt-controller@1800000 { 9 gic500: interrupt-controller@1800000 {
10 compatible = "arm,gic-v3"; 10 compatible = "arm,gic-v3";
11 #address-cells = <1>; 11 #address-cells = <2>;
12 #size-cells = <1>; 12 #size-cells = <2>;
13 ranges; 13 ranges;
14 #interrupt-cells = <3>; 14 #interrupt-cells = <3>;
15 interrupt-controller; 15 interrupt-controller;
16 reg = <0x01800000 0x10000>, /* GICD */ 16 reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */
17 <0x01880000 0x90000>; /* GICR */ 17 <0x00 0x01880000 0x00 0x90000>; /* GICR */
18 /* 18 /*
19 * vcpumntirq: 19 * vcpumntirq:
20 * virtual CPU interface maintenance interrupt 20 * virtual CPU interface maintenance interrupt
@@ -23,9 +23,50 @@
23 23
24 gic_its: gic-its@18200000 { 24 gic_its: gic-its@18200000 {
25 compatible = "arm,gic-v3-its"; 25 compatible = "arm,gic-v3-its";
26 reg = <0x01820000 0x10000>; 26 reg = <0x00 0x01820000 0x00 0x10000>;
27 msi-controller; 27 msi-controller;
28 #msi-cells = <1>; 28 #msi-cells = <1>;
29 }; 29 };
30 }; 30 };
31
32 secure_proxy_main: mailbox@32c00000 {
33 compatible = "ti,am654-secure-proxy";
34 #mbox-cells = <1>;
35 reg-names = "target_data", "rt", "scfg";
36 reg = <0x00 0x32c00000 0x00 0x100000>,
37 <0x00 0x32400000 0x00 0x100000>,
38 <0x00 0x32800000 0x00 0x100000>;
39 interrupt-names = "rx_011";
40 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
41 };
42
43 main_uart0: serial@2800000 {
44 compatible = "ti,am654-uart";
45 reg = <0x00 0x02800000 0x00 0x100>;
46 reg-shift = <2>;
47 reg-io-width = <4>;
48 interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
49 clock-frequency = <48000000>;
50 current-speed = <115200>;
51 };
52
53 main_uart1: serial@2810000 {
54 compatible = "ti,am654-uart";
55 reg = <0x00 0x02810000 0x00 0x100>;
56 reg-shift = <2>;
57 reg-io-width = <4>;
58 interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
59 clock-frequency = <48000000>;
60 current-speed = <115200>;
61 };
62
63 main_uart2: serial@2820000 {
64 compatible = "ti,am654-uart";
65 reg = <0x00 0x02820000 0x00 0x100>;
66 reg-shift = <2>;
67 reg-io-width = <4>;
68 interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
69 clock-frequency = <48000000>;
70 current-speed = <115200>;
71 };
31}; 72};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
new file mode 100644
index 000000000000..8c611d16df44
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi
@@ -0,0 +1,18 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for AM6 SoC Family MCU Domain peripherals
4 *
5 * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
6 */
7
8&cbass_mcu {
9 mcu_uart0: serial@40a00000 {
10 compatible = "ti,am654-uart";
11 reg = <0x00 0x40a00000 0x00 0x100>;
12 reg-shift = <2>;
13 reg-io-width = <4>;
14 interrupts = <GIC_SPI 565 IRQ_TYPE_LEVEL_HIGH>;
15 clock-frequency = <96000000>;
16 current-speed = <115200>;
17 };
18};
diff --git a/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi
new file mode 100644
index 000000000000..affc3c309353
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi
@@ -0,0 +1,46 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for AM6 SoC Family Wakeup Domain peripherals
4 *
5 * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
6 */
7
8&cbass_wakeup {
9 dmsc: dmsc {
10 compatible = "ti,k2g-sci";
11 ti,host-id = <12>;
12 #address-cells = <1>;
13 #size-cells = <1>;
14 ranges;
15
16 mbox-names = "rx", "tx";
17
18 mboxes= <&secure_proxy_main 11>,
19 <&secure_proxy_main 13>;
20
21 k3_pds: power-controller {
22 compatible = "ti,sci-pm-domain";
23 #power-domain-cells = <1>;
24 };
25
26 k3_clks: clocks {
27 compatible = "ti,k2g-sci-clk";
28 #clock-cells = <2>;
29 };
30
31 k3_reset: reset-controller {
32 compatible = "ti,sci-reset";
33 #reset-cells = <2>;
34 };
35 };
36
37 wkup_uart0: serial@42300000 {
38 compatible = "ti,am654-uart";
39 reg = <0x00 0x42300000 0x00 0x100>;
40 reg-shift = <2>;
41 reg-io-width = <4>;
42 interrupts = <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
43 clock-frequency = <48000000>;
44 current-speed = <115200>;
45 };
46};
diff --git a/arch/arm64/boot/dts/ti/k3-am65.dtsi b/arch/arm64/boot/dts/ti/k3-am65.dtsi
index cede1fa0983c..3d4bf369d030 100644
--- a/arch/arm64/boot/dts/ti/k3-am65.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65.dtsi
@@ -16,6 +16,14 @@
16 #address-cells = <2>; 16 #address-cells = <2>;
17 #size-cells = <2>; 17 #size-cells = <2>;
18 18
19 aliases {
20 serial0 = &wkup_uart0;
21 serial1 = &mcu_uart0;
22 serial2 = &main_uart0;
23 serial3 = &main_uart1;
24 serial4 = &main_uart2;
25 };
26
19 chosen { }; 27 chosen { };
20 28
21 firmware { 29 firmware {
@@ -46,38 +54,38 @@
46 54
47 cbass_main: interconnect@100000 { 55 cbass_main: interconnect@100000 {
48 compatible = "simple-bus"; 56 compatible = "simple-bus";
49 #address-cells = <1>; 57 #address-cells = <2>;
50 #size-cells = <1>; 58 #size-cells = <2>;
51 ranges = <0x00100000 0x00 0x00100000 0x00020000>, /* ctrl mmr */ 59 ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
52 <0x00600000 0x00 0x00600000 0x00001100>, /* GPIO */ 60 <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */
53 <0x00900000 0x00 0x00900000 0x00012000>, /* serdes */ 61 <0x00 0x00900000 0x00 0x00900000 0x00 0x00012000>, /* serdes */
54 <0x01000000 0x00 0x01000000 0x0af02400>, /* Most peripherals */ 62 <0x00 0x01000000 0x00 0x01000000 0x00 0x0af02400>, /* Most peripherals */
55 <0x30800000 0x00 0x30800000 0x0bc00000>, /* MAIN NAVSS */ 63 <0x00 0x30800000 0x00 0x30800000 0x00 0x0bc00000>, /* MAIN NAVSS */
56 /* MCUSS Range */ 64 /* MCUSS Range */
57 <0x28380000 0x00 0x28380000 0x03880000>, 65 <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
58 <0x40200000 0x00 0x40200000 0x00900100>, 66 <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>,
59 <0x42040000 0x00 0x42040000 0x03ac2400>, 67 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
60 <0x45100000 0x00 0x45100000 0x00c24000>, 68 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
61 <0x46000000 0x00 0x46000000 0x00200000>, 69 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
62 <0x47000000 0x00 0x47000000 0x00068400>; 70 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>;
63 71
64 cbass_mcu: interconnect@28380000 { 72 cbass_mcu: interconnect@28380000 {
65 compatible = "simple-bus"; 73 compatible = "simple-bus";
66 #address-cells = <1>; 74 #address-cells = <2>;
67 #size-cells = <1>; 75 #size-cells = <2>;
68 ranges = <0x28380000 0x28380000 0x03880000>, /* MCU NAVSS*/ 76 ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
69 <0x40200000 0x40200000 0x00900100>, /* First peripheral window */ 77 <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>, /* First peripheral window */
70 <0x42040000 0x42040000 0x03ac2400>, /* WKUP */ 78 <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP */
71 <0x45100000 0x45100000 0x00c24000>, /* MMRs, remaining NAVSS */ 79 <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
72 <0x46000000 0x46000000 0x00200000>, /* CPSW */ 80 <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
73 <0x47000000 0x47000000 0x00068400>; /* OSPI space 1 */ 81 <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>; /* OSPI space 1 */
74 82
75 cbass_wakeup: interconnect@42040000 { 83 cbass_wakeup: interconnect@42040000 {
76 compatible = "simple-bus"; 84 compatible = "simple-bus";
77 #address-cells = <1>; 85 #address-cells = <1>;
78 #size-cells = <1>; 86 #size-cells = <1>;
79 /* WKUP Basic peripherals */ 87 /* WKUP Basic peripherals */
80 ranges = <0x42040000 0x42040000 0x03ac2400>; 88 ranges = <0x42040000 0x00 0x42040000 0x03ac2400>;
81 }; 89 };
82 }; 90 };
83 }; 91 };
@@ -85,3 +93,5 @@
85 93
86/* Now include the peripherals for each bus segments */ 94/* Now include the peripherals for each bus segments */
87#include "k3-am65-main.dtsi" 95#include "k3-am65-main.dtsi"
96#include "k3-am65-mcu.dtsi"
97#include "k3-am65-wakeup.dtsi"
diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
index af6956fdc13f..e146ac2ad781 100644
--- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts
@@ -34,3 +34,8 @@
34 }; 34 };
35 }; 35 };
36}; 36};
37
38&wkup_uart0 {
39 /* Wakeup UART is used by System firmware */
40 status = "disabled";
41};
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index f67e8d5e93ad..db8d364f8476 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -38,6 +38,7 @@ CONFIG_ARCH_BCM_IPROC=y
38CONFIG_ARCH_BERLIN=y 38CONFIG_ARCH_BERLIN=y
39CONFIG_ARCH_BRCMSTB=y 39CONFIG_ARCH_BRCMSTB=y
40CONFIG_ARCH_EXYNOS=y 40CONFIG_ARCH_EXYNOS=y
41CONFIG_ARCH_K3=y
41CONFIG_ARCH_LAYERSCAPE=y 42CONFIG_ARCH_LAYERSCAPE=y
42CONFIG_ARCH_LG1K=y 43CONFIG_ARCH_LG1K=y
43CONFIG_ARCH_HISI=y 44CONFIG_ARCH_HISI=y
@@ -605,6 +606,8 @@ CONFIG_ARCH_TEGRA_132_SOC=y
605CONFIG_ARCH_TEGRA_210_SOC=y 606CONFIG_ARCH_TEGRA_210_SOC=y
606CONFIG_ARCH_TEGRA_186_SOC=y 607CONFIG_ARCH_TEGRA_186_SOC=y
607CONFIG_ARCH_TEGRA_194_SOC=y 608CONFIG_ARCH_TEGRA_194_SOC=y
609CONFIG_ARCH_K3_AM6_SOC=y
610CONFIG_SOC_TI=y
608CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y 611CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
609CONFIG_EXTCON_USB_GPIO=y 612CONFIG_EXTCON_USB_GPIO=y
610CONFIG_EXTCON_USBC_CROS_EC=y 613CONFIG_EXTCON_USBC_CROS_EC=y
diff --git a/arch/arm64/crypto/ghash-ce-glue.c b/arch/arm64/crypto/ghash-ce-glue.c
index 6e9f33d14930..067d8937d5af 100644
--- a/arch/arm64/crypto/ghash-ce-glue.c
+++ b/arch/arm64/crypto/ghash-ce-glue.c
@@ -417,7 +417,7 @@ static int gcm_encrypt(struct aead_request *req)
417 __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds); 417 __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds);
418 put_unaligned_be32(2, iv + GCM_IV_SIZE); 418 put_unaligned_be32(2, iv + GCM_IV_SIZE);
419 419
420 while (walk.nbytes >= AES_BLOCK_SIZE) { 420 while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
421 int blocks = walk.nbytes / AES_BLOCK_SIZE; 421 int blocks = walk.nbytes / AES_BLOCK_SIZE;
422 u8 *dst = walk.dst.virt.addr; 422 u8 *dst = walk.dst.virt.addr;
423 u8 *src = walk.src.virt.addr; 423 u8 *src = walk.src.virt.addr;
@@ -437,11 +437,18 @@ static int gcm_encrypt(struct aead_request *req)
437 NULL); 437 NULL);
438 438
439 err = skcipher_walk_done(&walk, 439 err = skcipher_walk_done(&walk,
440 walk.nbytes % AES_BLOCK_SIZE); 440 walk.nbytes % (2 * AES_BLOCK_SIZE));
441 } 441 }
442 if (walk.nbytes) 442 if (walk.nbytes) {
443 __aes_arm64_encrypt(ctx->aes_key.key_enc, ks, iv, 443 __aes_arm64_encrypt(ctx->aes_key.key_enc, ks, iv,
444 nrounds); 444 nrounds);
445 if (walk.nbytes > AES_BLOCK_SIZE) {
446 crypto_inc(iv, AES_BLOCK_SIZE);
447 __aes_arm64_encrypt(ctx->aes_key.key_enc,
448 ks + AES_BLOCK_SIZE, iv,
449 nrounds);
450 }
451 }
445 } 452 }
446 453
447 /* handle the tail */ 454 /* handle the tail */
@@ -545,7 +552,7 @@ static int gcm_decrypt(struct aead_request *req)
545 __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds); 552 __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds);
546 put_unaligned_be32(2, iv + GCM_IV_SIZE); 553 put_unaligned_be32(2, iv + GCM_IV_SIZE);
547 554
548 while (walk.nbytes >= AES_BLOCK_SIZE) { 555 while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
549 int blocks = walk.nbytes / AES_BLOCK_SIZE; 556 int blocks = walk.nbytes / AES_BLOCK_SIZE;
550 u8 *dst = walk.dst.virt.addr; 557 u8 *dst = walk.dst.virt.addr;
551 u8 *src = walk.src.virt.addr; 558 u8 *src = walk.src.virt.addr;
@@ -564,11 +571,21 @@ static int gcm_decrypt(struct aead_request *req)
564 } while (--blocks > 0); 571 } while (--blocks > 0);
565 572
566 err = skcipher_walk_done(&walk, 573 err = skcipher_walk_done(&walk,
567 walk.nbytes % AES_BLOCK_SIZE); 574 walk.nbytes % (2 * AES_BLOCK_SIZE));
568 } 575 }
569 if (walk.nbytes) 576 if (walk.nbytes) {
577 if (walk.nbytes > AES_BLOCK_SIZE) {
578 u8 *iv2 = iv + AES_BLOCK_SIZE;
579
580 memcpy(iv2, iv, AES_BLOCK_SIZE);
581 crypto_inc(iv2, AES_BLOCK_SIZE);
582
583 __aes_arm64_encrypt(ctx->aes_key.key_enc, iv2,
584 iv2, nrounds);
585 }
570 __aes_arm64_encrypt(ctx->aes_key.key_enc, iv, iv, 586 __aes_arm64_encrypt(ctx->aes_key.key_enc, iv, iv,
571 nrounds); 587 nrounds);
588 }
572 } 589 }
573 590
574 /* handle the tail */ 591 /* handle the tail */
diff --git a/arch/arm64/crypto/sm4-ce-glue.c b/arch/arm64/crypto/sm4-ce-glue.c
index b7fb5274b250..0c4fc223f225 100644
--- a/arch/arm64/crypto/sm4-ce-glue.c
+++ b/arch/arm64/crypto/sm4-ce-glue.c
@@ -69,5 +69,5 @@ static void __exit sm4_ce_mod_fini(void)
69 crypto_unregister_alg(&sm4_ce_alg); 69 crypto_unregister_alg(&sm4_ce_alg);
70} 70}
71 71
72module_cpu_feature_match(SM3, sm4_ce_mod_init); 72module_cpu_feature_match(SM4, sm4_ce_mod_init);
73module_exit(sm4_ce_mod_fini); 73module_exit(sm4_ce_mod_fini);
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
index 3534aa6a4dc2..1b083c500b9a 100644
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -98,11 +98,10 @@ static time64_t pmu_read_time(void)
98 98
99 if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0) 99 if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0)
100 return 0; 100 return 0;
101 while (!req.complete) 101 pmu_wait_complete(&req);
102 pmu_poll();
103 102
104 time = (u32)((req.reply[1] << 24) | (req.reply[2] << 16) | 103 time = (u32)((req.reply[0] << 24) | (req.reply[1] << 16) |
105 (req.reply[3] << 8) | req.reply[4]); 104 (req.reply[2] << 8) | req.reply[3]);
106 105
107 return time - RTC_OFFSET; 106 return time - RTC_OFFSET;
108} 107}
@@ -116,8 +115,7 @@ static void pmu_write_time(time64_t time)
116 (data >> 24) & 0xFF, (data >> 16) & 0xFF, 115 (data >> 24) & 0xFF, (data >> 16) & 0xFF,
117 (data >> 8) & 0xFF, data & 0xFF) < 0) 116 (data >> 8) & 0xFF, data & 0xFF) < 0)
118 return; 117 return;
119 while (!req.complete) 118 pmu_wait_complete(&req);
120 pmu_poll();
121} 119}
122 120
123static __u8 pmu_read_pram(int offset) 121static __u8 pmu_read_pram(int offset)
diff --git a/arch/nios2/Kconfig.debug b/arch/nios2/Kconfig.debug
index 7a49f0d28d14..f1da8a7b17ff 100644
--- a/arch/nios2/Kconfig.debug
+++ b/arch/nios2/Kconfig.debug
@@ -3,15 +3,6 @@
3config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
4 def_bool y 4 def_bool y
5 5
6config DEBUG_STACK_USAGE
7 bool "Enable stack utilization instrumentation"
8 depends on DEBUG_KERNEL
9 help
10 Enables the display of the minimum amount of free stack which each
11 task has ever had available in the sysrq-T and sysrq-P debug output.
12
13 This option will slow down process creation somewhat.
14
15config EARLY_PRINTK 6config EARLY_PRINTK
16 bool "Activate early kernel debugging" 7 bool "Activate early kernel debugging"
17 default y 8 default y
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index db0b6eebbfa5..a80669209155 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -177,7 +177,6 @@ config PPC
177 select HAVE_ARCH_KGDB 177 select HAVE_ARCH_KGDB
178 select HAVE_ARCH_MMAP_RND_BITS 178 select HAVE_ARCH_MMAP_RND_BITS
179 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT 179 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
180 select HAVE_ARCH_PREL32_RELOCATIONS
181 select HAVE_ARCH_SECCOMP_FILTER 180 select HAVE_ARCH_SECCOMP_FILTER
182 select HAVE_ARCH_TRACEHOOK 181 select HAVE_ARCH_TRACEHOOK
183 select HAVE_CBPF_JIT if !PPC64 182 select HAVE_CBPF_JIT if !PPC64
diff --git a/arch/riscv/include/asm/tlb.h b/arch/riscv/include/asm/tlb.h
index c229509288ea..439dc7072e05 100644
--- a/arch/riscv/include/asm/tlb.h
+++ b/arch/riscv/include/asm/tlb.h
@@ -14,6 +14,10 @@
14#ifndef _ASM_RISCV_TLB_H 14#ifndef _ASM_RISCV_TLB_H
15#define _ASM_RISCV_TLB_H 15#define _ASM_RISCV_TLB_H
16 16
17struct mmu_gather;
18
19static void tlb_flush(struct mmu_gather *tlb);
20
17#include <asm-generic/tlb.h> 21#include <asm-generic/tlb.h>
18 22
19static inline void tlb_flush(struct mmu_gather *tlb) 23static inline void tlb_flush(struct mmu_gather *tlb)
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index 568026ccf6e8..fb03a4482ad6 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -65,24 +65,11 @@ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
65SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end, 65SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end,
66 uintptr_t, flags) 66 uintptr_t, flags)
67{ 67{
68#ifdef CONFIG_SMP
69 struct mm_struct *mm = current->mm;
70 bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;
71#endif
72
73 /* Check the reserved flags. */ 68 /* Check the reserved flags. */
74 if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL)) 69 if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL))
75 return -EINVAL; 70 return -EINVAL;
76 71
77 /* 72 flush_icache_mm(current->mm, flags & SYS_RISCV_FLUSH_ICACHE_LOCAL);
78 * Without CONFIG_SMP flush_icache_mm is a just a flush_icache_all(),
79 * which generates unused variable warnings all over this function.
80 */
81#ifdef CONFIG_SMP
82 flush_icache_mm(mm, local);
83#else
84 flush_icache_all();
85#endif
86 73
87 return 0; 74 return 0;
88} 75}
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c5ff296bc5d1..1a0be022f91d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2843,7 +2843,7 @@ config X86_SYSFB
2843 This option, if enabled, marks VGA/VBE/EFI framebuffers as generic 2843 This option, if enabled, marks VGA/VBE/EFI framebuffers as generic
2844 framebuffers so the new generic system-framebuffer drivers can be 2844 framebuffers so the new generic system-framebuffer drivers can be
2845 used on x86. If the framebuffer is not compatible with the generic 2845 used on x86. If the framebuffer is not compatible with the generic
2846 modes, it is adverticed as fallback platform framebuffer so legacy 2846 modes, it is advertised as fallback platform framebuffer so legacy
2847 drivers like efifb, vesafb and uvesafb can pick it up. 2847 drivers like efifb, vesafb and uvesafb can pick it up.
2848 If this option is not selected, all system framebuffers are always 2848 If this option is not selected, all system framebuffers are always
2849 marked as fallback platform framebuffers as usual. 2849 marked as fallback platform framebuffers as usual.
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 94859241bc3e..8f6e7eb8ae9f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -175,22 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
175 endif 175 endif
176endif 176endif
177 177
178ifndef CC_HAVE_ASM_GOTO
179 $(error Compiler lacks asm-goto support.)
180endif
181
182#
183# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
184# GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226). There's no way
185# to test for this bug at compile-time because the test case needs to execute,
186# which is a no-go for cross compilers. So check the GCC version instead.
187#
188ifdef CONFIG_JUMP_LABEL
189 ifneq ($(ACCUMULATE_OUTGOING_ARGS), 1)
190 ACCUMULATE_OUTGOING_ARGS = $(call cc-if-fullversion, -lt, 040502, 1)
191 endif
192endif
193
194ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) 178ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
195 # This compiler flag is not supported by Clang: 179 # This compiler flag is not supported by Clang:
196 KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) 180 KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -312,6 +296,13 @@ PHONY += vdso_install
312vdso_install: 296vdso_install:
313 $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ 297 $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
314 298
299archprepare: checkbin
300checkbin:
301ifndef CC_HAVE_ASM_GOTO
302 @echo Compiler lacks asm-goto support.
303 @exit 1
304endif
305
315archclean: 306archclean:
316 $(Q)rm -rf $(objtree)/arch/i386 307 $(Q)rm -rf $(objtree)/arch/i386
317 $(Q)rm -rf $(objtree)/arch/x86_64 308 $(Q)rm -rf $(objtree)/arch/x86_64
diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S
index 9bd139569b41..cb2deb61c5d9 100644
--- a/arch/x86/crypto/aesni-intel_asm.S
+++ b/arch/x86/crypto/aesni-intel_asm.S
@@ -223,34 +223,34 @@ ALL_F: .octa 0xffffffffffffffffffffffffffffffff
223 pcmpeqd TWOONE(%rip), \TMP2 223 pcmpeqd TWOONE(%rip), \TMP2
224 pand POLY(%rip), \TMP2 224 pand POLY(%rip), \TMP2
225 pxor \TMP2, \TMP3 225 pxor \TMP2, \TMP3
226 movdqa \TMP3, HashKey(%arg2) 226 movdqu \TMP3, HashKey(%arg2)
227 227
228 movdqa \TMP3, \TMP5 228 movdqa \TMP3, \TMP5
229 pshufd $78, \TMP3, \TMP1 229 pshufd $78, \TMP3, \TMP1
230 pxor \TMP3, \TMP1 230 pxor \TMP3, \TMP1
231 movdqa \TMP1, HashKey_k(%arg2) 231 movdqu \TMP1, HashKey_k(%arg2)
232 232
233 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7 233 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
234# TMP5 = HashKey^2<<1 (mod poly) 234# TMP5 = HashKey^2<<1 (mod poly)
235 movdqa \TMP5, HashKey_2(%arg2) 235 movdqu \TMP5, HashKey_2(%arg2)
236# HashKey_2 = HashKey^2<<1 (mod poly) 236# HashKey_2 = HashKey^2<<1 (mod poly)
237 pshufd $78, \TMP5, \TMP1 237 pshufd $78, \TMP5, \TMP1
238 pxor \TMP5, \TMP1 238 pxor \TMP5, \TMP1
239 movdqa \TMP1, HashKey_2_k(%arg2) 239 movdqu \TMP1, HashKey_2_k(%arg2)
240 240
241 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7 241 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
242# TMP5 = HashKey^3<<1 (mod poly) 242# TMP5 = HashKey^3<<1 (mod poly)
243 movdqa \TMP5, HashKey_3(%arg2) 243 movdqu \TMP5, HashKey_3(%arg2)
244 pshufd $78, \TMP5, \TMP1 244 pshufd $78, \TMP5, \TMP1
245 pxor \TMP5, \TMP1 245 pxor \TMP5, \TMP1
246 movdqa \TMP1, HashKey_3_k(%arg2) 246 movdqu \TMP1, HashKey_3_k(%arg2)
247 247
248 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7 248 GHASH_MUL \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
249# TMP5 = HashKey^3<<1 (mod poly) 249# TMP5 = HashKey^3<<1 (mod poly)
250 movdqa \TMP5, HashKey_4(%arg2) 250 movdqu \TMP5, HashKey_4(%arg2)
251 pshufd $78, \TMP5, \TMP1 251 pshufd $78, \TMP5, \TMP1
252 pxor \TMP5, \TMP1 252 pxor \TMP5, \TMP1
253 movdqa \TMP1, HashKey_4_k(%arg2) 253 movdqu \TMP1, HashKey_4_k(%arg2)
254.endm 254.endm
255 255
256# GCM_INIT initializes a gcm_context struct to prepare for encoding/decoding. 256# GCM_INIT initializes a gcm_context struct to prepare for encoding/decoding.
@@ -271,7 +271,7 @@ ALL_F: .octa 0xffffffffffffffffffffffffffffffff
271 movdqu %xmm0, CurCount(%arg2) # ctx_data.current_counter = iv 271 movdqu %xmm0, CurCount(%arg2) # ctx_data.current_counter = iv
272 272
273 PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, 273 PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7,
274 movdqa HashKey(%arg2), %xmm13 274 movdqu HashKey(%arg2), %xmm13
275 275
276 CALC_AAD_HASH %xmm13, \AAD, \AADLEN, %xmm0, %xmm1, %xmm2, %xmm3, \ 276 CALC_AAD_HASH %xmm13, \AAD, \AADLEN, %xmm0, %xmm1, %xmm2, %xmm3, \
277 %xmm4, %xmm5, %xmm6 277 %xmm4, %xmm5, %xmm6
@@ -997,7 +997,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
997 pshufd $78, \XMM5, \TMP6 997 pshufd $78, \XMM5, \TMP6
998 pxor \XMM5, \TMP6 998 pxor \XMM5, \TMP6
999 paddd ONE(%rip), \XMM0 # INCR CNT 999 paddd ONE(%rip), \XMM0 # INCR CNT
1000 movdqa HashKey_4(%arg2), \TMP5 1000 movdqu HashKey_4(%arg2), \TMP5
1001 PCLMULQDQ 0x11, \TMP5, \TMP4 # TMP4 = a1*b1 1001 PCLMULQDQ 0x11, \TMP5, \TMP4 # TMP4 = a1*b1
1002 movdqa \XMM0, \XMM1 1002 movdqa \XMM0, \XMM1
1003 paddd ONE(%rip), \XMM0 # INCR CNT 1003 paddd ONE(%rip), \XMM0 # INCR CNT
@@ -1016,7 +1016,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1016 pxor (%arg1), \XMM2 1016 pxor (%arg1), \XMM2
1017 pxor (%arg1), \XMM3 1017 pxor (%arg1), \XMM3
1018 pxor (%arg1), \XMM4 1018 pxor (%arg1), \XMM4
1019 movdqa HashKey_4_k(%arg2), \TMP5 1019 movdqu HashKey_4_k(%arg2), \TMP5
1020 PCLMULQDQ 0x00, \TMP5, \TMP6 # TMP6 = (a1+a0)*(b1+b0) 1020 PCLMULQDQ 0x00, \TMP5, \TMP6 # TMP6 = (a1+a0)*(b1+b0)
1021 movaps 0x10(%arg1), \TMP1 1021 movaps 0x10(%arg1), \TMP1
1022 AESENC \TMP1, \XMM1 # Round 1 1022 AESENC \TMP1, \XMM1 # Round 1
@@ -1031,7 +1031,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1031 movdqa \XMM6, \TMP1 1031 movdqa \XMM6, \TMP1
1032 pshufd $78, \XMM6, \TMP2 1032 pshufd $78, \XMM6, \TMP2
1033 pxor \XMM6, \TMP2 1033 pxor \XMM6, \TMP2
1034 movdqa HashKey_3(%arg2), \TMP5 1034 movdqu HashKey_3(%arg2), \TMP5
1035 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1 * b1 1035 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1 * b1
1036 movaps 0x30(%arg1), \TMP3 1036 movaps 0x30(%arg1), \TMP3
1037 AESENC \TMP3, \XMM1 # Round 3 1037 AESENC \TMP3, \XMM1 # Round 3
@@ -1044,7 +1044,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1044 AESENC \TMP3, \XMM2 1044 AESENC \TMP3, \XMM2
1045 AESENC \TMP3, \XMM3 1045 AESENC \TMP3, \XMM3
1046 AESENC \TMP3, \XMM4 1046 AESENC \TMP3, \XMM4
1047 movdqa HashKey_3_k(%arg2), \TMP5 1047 movdqu HashKey_3_k(%arg2), \TMP5
1048 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1048 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1049 movaps 0x50(%arg1), \TMP3 1049 movaps 0x50(%arg1), \TMP3
1050 AESENC \TMP3, \XMM1 # Round 5 1050 AESENC \TMP3, \XMM1 # Round 5
@@ -1058,7 +1058,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1058 movdqa \XMM7, \TMP1 1058 movdqa \XMM7, \TMP1
1059 pshufd $78, \XMM7, \TMP2 1059 pshufd $78, \XMM7, \TMP2
1060 pxor \XMM7, \TMP2 1060 pxor \XMM7, \TMP2
1061 movdqa HashKey_2(%arg2), \TMP5 1061 movdqu HashKey_2(%arg2), \TMP5
1062 1062
1063 # Multiply TMP5 * HashKey using karatsuba 1063 # Multiply TMP5 * HashKey using karatsuba
1064 1064
@@ -1074,7 +1074,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1074 AESENC \TMP3, \XMM2 1074 AESENC \TMP3, \XMM2
1075 AESENC \TMP3, \XMM3 1075 AESENC \TMP3, \XMM3
1076 AESENC \TMP3, \XMM4 1076 AESENC \TMP3, \XMM4
1077 movdqa HashKey_2_k(%arg2), \TMP5 1077 movdqu HashKey_2_k(%arg2), \TMP5
1078 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1078 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1079 movaps 0x80(%arg1), \TMP3 1079 movaps 0x80(%arg1), \TMP3
1080 AESENC \TMP3, \XMM1 # Round 8 1080 AESENC \TMP3, \XMM1 # Round 8
@@ -1092,7 +1092,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1092 movdqa \XMM8, \TMP1 1092 movdqa \XMM8, \TMP1
1093 pshufd $78, \XMM8, \TMP2 1093 pshufd $78, \XMM8, \TMP2
1094 pxor \XMM8, \TMP2 1094 pxor \XMM8, \TMP2
1095 movdqa HashKey(%arg2), \TMP5 1095 movdqu HashKey(%arg2), \TMP5
1096 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1 1096 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1
1097 movaps 0x90(%arg1), \TMP3 1097 movaps 0x90(%arg1), \TMP3
1098 AESENC \TMP3, \XMM1 # Round 9 1098 AESENC \TMP3, \XMM1 # Round 9
@@ -1121,7 +1121,7 @@ aes_loop_par_enc_done\@:
1121 AESENCLAST \TMP3, \XMM2 1121 AESENCLAST \TMP3, \XMM2
1122 AESENCLAST \TMP3, \XMM3 1122 AESENCLAST \TMP3, \XMM3
1123 AESENCLAST \TMP3, \XMM4 1123 AESENCLAST \TMP3, \XMM4
1124 movdqa HashKey_k(%arg2), \TMP5 1124 movdqu HashKey_k(%arg2), \TMP5
1125 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1125 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1126 movdqu (%arg4,%r11,1), \TMP3 1126 movdqu (%arg4,%r11,1), \TMP3
1127 pxor \TMP3, \XMM1 # Ciphertext/Plaintext XOR EK 1127 pxor \TMP3, \XMM1 # Ciphertext/Plaintext XOR EK
@@ -1205,7 +1205,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1205 pshufd $78, \XMM5, \TMP6 1205 pshufd $78, \XMM5, \TMP6
1206 pxor \XMM5, \TMP6 1206 pxor \XMM5, \TMP6
1207 paddd ONE(%rip), \XMM0 # INCR CNT 1207 paddd ONE(%rip), \XMM0 # INCR CNT
1208 movdqa HashKey_4(%arg2), \TMP5 1208 movdqu HashKey_4(%arg2), \TMP5
1209 PCLMULQDQ 0x11, \TMP5, \TMP4 # TMP4 = a1*b1 1209 PCLMULQDQ 0x11, \TMP5, \TMP4 # TMP4 = a1*b1
1210 movdqa \XMM0, \XMM1 1210 movdqa \XMM0, \XMM1
1211 paddd ONE(%rip), \XMM0 # INCR CNT 1211 paddd ONE(%rip), \XMM0 # INCR CNT
@@ -1224,7 +1224,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1224 pxor (%arg1), \XMM2 1224 pxor (%arg1), \XMM2
1225 pxor (%arg1), \XMM3 1225 pxor (%arg1), \XMM3
1226 pxor (%arg1), \XMM4 1226 pxor (%arg1), \XMM4
1227 movdqa HashKey_4_k(%arg2), \TMP5 1227 movdqu HashKey_4_k(%arg2), \TMP5
1228 PCLMULQDQ 0x00, \TMP5, \TMP6 # TMP6 = (a1+a0)*(b1+b0) 1228 PCLMULQDQ 0x00, \TMP5, \TMP6 # TMP6 = (a1+a0)*(b1+b0)
1229 movaps 0x10(%arg1), \TMP1 1229 movaps 0x10(%arg1), \TMP1
1230 AESENC \TMP1, \XMM1 # Round 1 1230 AESENC \TMP1, \XMM1 # Round 1
@@ -1239,7 +1239,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1239 movdqa \XMM6, \TMP1 1239 movdqa \XMM6, \TMP1
1240 pshufd $78, \XMM6, \TMP2 1240 pshufd $78, \XMM6, \TMP2
1241 pxor \XMM6, \TMP2 1241 pxor \XMM6, \TMP2
1242 movdqa HashKey_3(%arg2), \TMP5 1242 movdqu HashKey_3(%arg2), \TMP5
1243 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1 * b1 1243 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1 * b1
1244 movaps 0x30(%arg1), \TMP3 1244 movaps 0x30(%arg1), \TMP3
1245 AESENC \TMP3, \XMM1 # Round 3 1245 AESENC \TMP3, \XMM1 # Round 3
@@ -1252,7 +1252,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1252 AESENC \TMP3, \XMM2 1252 AESENC \TMP3, \XMM2
1253 AESENC \TMP3, \XMM3 1253 AESENC \TMP3, \XMM3
1254 AESENC \TMP3, \XMM4 1254 AESENC \TMP3, \XMM4
1255 movdqa HashKey_3_k(%arg2), \TMP5 1255 movdqu HashKey_3_k(%arg2), \TMP5
1256 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1256 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1257 movaps 0x50(%arg1), \TMP3 1257 movaps 0x50(%arg1), \TMP3
1258 AESENC \TMP3, \XMM1 # Round 5 1258 AESENC \TMP3, \XMM1 # Round 5
@@ -1266,7 +1266,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1266 movdqa \XMM7, \TMP1 1266 movdqa \XMM7, \TMP1
1267 pshufd $78, \XMM7, \TMP2 1267 pshufd $78, \XMM7, \TMP2
1268 pxor \XMM7, \TMP2 1268 pxor \XMM7, \TMP2
1269 movdqa HashKey_2(%arg2), \TMP5 1269 movdqu HashKey_2(%arg2), \TMP5
1270 1270
1271 # Multiply TMP5 * HashKey using karatsuba 1271 # Multiply TMP5 * HashKey using karatsuba
1272 1272
@@ -1282,7 +1282,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1282 AESENC \TMP3, \XMM2 1282 AESENC \TMP3, \XMM2
1283 AESENC \TMP3, \XMM3 1283 AESENC \TMP3, \XMM3
1284 AESENC \TMP3, \XMM4 1284 AESENC \TMP3, \XMM4
1285 movdqa HashKey_2_k(%arg2), \TMP5 1285 movdqu HashKey_2_k(%arg2), \TMP5
1286 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1286 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1287 movaps 0x80(%arg1), \TMP3 1287 movaps 0x80(%arg1), \TMP3
1288 AESENC \TMP3, \XMM1 # Round 8 1288 AESENC \TMP3, \XMM1 # Round 8
@@ -1300,7 +1300,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
1300 movdqa \XMM8, \TMP1 1300 movdqa \XMM8, \TMP1
1301 pshufd $78, \XMM8, \TMP2 1301 pshufd $78, \XMM8, \TMP2
1302 pxor \XMM8, \TMP2 1302 pxor \XMM8, \TMP2
1303 movdqa HashKey(%arg2), \TMP5 1303 movdqu HashKey(%arg2), \TMP5
1304 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1 1304 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1
1305 movaps 0x90(%arg1), \TMP3 1305 movaps 0x90(%arg1), \TMP3
1306 AESENC \TMP3, \XMM1 # Round 9 1306 AESENC \TMP3, \XMM1 # Round 9
@@ -1329,7 +1329,7 @@ aes_loop_par_dec_done\@:
1329 AESENCLAST \TMP3, \XMM2 1329 AESENCLAST \TMP3, \XMM2
1330 AESENCLAST \TMP3, \XMM3 1330 AESENCLAST \TMP3, \XMM3
1331 AESENCLAST \TMP3, \XMM4 1331 AESENCLAST \TMP3, \XMM4
1332 movdqa HashKey_k(%arg2), \TMP5 1332 movdqu HashKey_k(%arg2), \TMP5
1333 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1333 PCLMULQDQ 0x00, \TMP5, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1334 movdqu (%arg4,%r11,1), \TMP3 1334 movdqu (%arg4,%r11,1), \TMP3
1335 pxor \TMP3, \XMM1 # Ciphertext/Plaintext XOR EK 1335 pxor \TMP3, \XMM1 # Ciphertext/Plaintext XOR EK
@@ -1405,10 +1405,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
1405 movdqa \XMM1, \TMP6 1405 movdqa \XMM1, \TMP6
1406 pshufd $78, \XMM1, \TMP2 1406 pshufd $78, \XMM1, \TMP2
1407 pxor \XMM1, \TMP2 1407 pxor \XMM1, \TMP2
1408 movdqa HashKey_4(%arg2), \TMP5 1408 movdqu HashKey_4(%arg2), \TMP5
1409 PCLMULQDQ 0x11, \TMP5, \TMP6 # TMP6 = a1*b1 1409 PCLMULQDQ 0x11, \TMP5, \TMP6 # TMP6 = a1*b1
1410 PCLMULQDQ 0x00, \TMP5, \XMM1 # XMM1 = a0*b0 1410 PCLMULQDQ 0x00, \TMP5, \XMM1 # XMM1 = a0*b0
1411 movdqa HashKey_4_k(%arg2), \TMP4 1411 movdqu HashKey_4_k(%arg2), \TMP4
1412 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1412 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1413 movdqa \XMM1, \XMMDst 1413 movdqa \XMM1, \XMMDst
1414 movdqa \TMP2, \XMM1 # result in TMP6, XMMDst, XMM1 1414 movdqa \TMP2, \XMM1 # result in TMP6, XMMDst, XMM1
@@ -1418,10 +1418,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
1418 movdqa \XMM2, \TMP1 1418 movdqa \XMM2, \TMP1
1419 pshufd $78, \XMM2, \TMP2 1419 pshufd $78, \XMM2, \TMP2
1420 pxor \XMM2, \TMP2 1420 pxor \XMM2, \TMP2
1421 movdqa HashKey_3(%arg2), \TMP5 1421 movdqu HashKey_3(%arg2), \TMP5
1422 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1 1422 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1
1423 PCLMULQDQ 0x00, \TMP5, \XMM2 # XMM2 = a0*b0 1423 PCLMULQDQ 0x00, \TMP5, \XMM2 # XMM2 = a0*b0
1424 movdqa HashKey_3_k(%arg2), \TMP4 1424 movdqu HashKey_3_k(%arg2), \TMP4
1425 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1425 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1426 pxor \TMP1, \TMP6 1426 pxor \TMP1, \TMP6
1427 pxor \XMM2, \XMMDst 1427 pxor \XMM2, \XMMDst
@@ -1433,10 +1433,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
1433 movdqa \XMM3, \TMP1 1433 movdqa \XMM3, \TMP1
1434 pshufd $78, \XMM3, \TMP2 1434 pshufd $78, \XMM3, \TMP2
1435 pxor \XMM3, \TMP2 1435 pxor \XMM3, \TMP2
1436 movdqa HashKey_2(%arg2), \TMP5 1436 movdqu HashKey_2(%arg2), \TMP5
1437 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1 1437 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1
1438 PCLMULQDQ 0x00, \TMP5, \XMM3 # XMM3 = a0*b0 1438 PCLMULQDQ 0x00, \TMP5, \XMM3 # XMM3 = a0*b0
1439 movdqa HashKey_2_k(%arg2), \TMP4 1439 movdqu HashKey_2_k(%arg2), \TMP4
1440 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1440 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1441 pxor \TMP1, \TMP6 1441 pxor \TMP1, \TMP6
1442 pxor \XMM3, \XMMDst 1442 pxor \XMM3, \XMMDst
@@ -1446,10 +1446,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
1446 movdqa \XMM4, \TMP1 1446 movdqa \XMM4, \TMP1
1447 pshufd $78, \XMM4, \TMP2 1447 pshufd $78, \XMM4, \TMP2
1448 pxor \XMM4, \TMP2 1448 pxor \XMM4, \TMP2
1449 movdqa HashKey(%arg2), \TMP5 1449 movdqu HashKey(%arg2), \TMP5
1450 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1 1450 PCLMULQDQ 0x11, \TMP5, \TMP1 # TMP1 = a1*b1
1451 PCLMULQDQ 0x00, \TMP5, \XMM4 # XMM4 = a0*b0 1451 PCLMULQDQ 0x00, \TMP5, \XMM4 # XMM4 = a0*b0
1452 movdqa HashKey_k(%arg2), \TMP4 1452 movdqu HashKey_k(%arg2), \TMP4
1453 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0) 1453 PCLMULQDQ 0x00, \TMP4, \TMP2 # TMP2 = (a1+a0)*(b1+b0)
1454 pxor \TMP1, \TMP6 1454 pxor \TMP1, \TMP6
1455 pxor \XMM4, \XMMDst 1455 pxor \XMM4, \XMMDst
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 5f4829f10129..dfb2f7c0d019 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -2465,7 +2465,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs
2465 2465
2466 perf_callchain_store(entry, regs->ip); 2466 perf_callchain_store(entry, regs->ip);
2467 2467
2468 if (!current->mm) 2468 if (!nmi_uaccess_okay())
2469 return; 2469 return;
2470 2470
2471 if (perf_callchain_user32(regs, entry)) 2471 if (perf_callchain_user32(regs, entry))
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index c14f2a74b2be..15450a675031 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -33,7 +33,8 @@ extern inline unsigned long native_save_fl(void)
33 return flags; 33 return flags;
34} 34}
35 35
36static inline void native_restore_fl(unsigned long flags) 36extern inline void native_restore_fl(unsigned long flags);
37extern inline void native_restore_fl(unsigned long flags)
37{ 38{
38 asm volatile("push %0 ; popf" 39 asm volatile("push %0 ; popf"
39 : /* no output */ 40 : /* no output */
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index a564084c6141..f8b1ad2c3828 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -2,6 +2,8 @@
2#ifndef _ASM_X86_PGTABLE_3LEVEL_H 2#ifndef _ASM_X86_PGTABLE_3LEVEL_H
3#define _ASM_X86_PGTABLE_3LEVEL_H 3#define _ASM_X86_PGTABLE_3LEVEL_H
4 4
5#include <asm/atomic64_32.h>
6
5/* 7/*
6 * Intel Physical Address Extension (PAE) Mode - three-level page 8 * Intel Physical Address Extension (PAE) Mode - three-level page
7 * tables on PPro+ CPUs. 9 * tables on PPro+ CPUs.
@@ -150,10 +152,7 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
150{ 152{
151 pte_t res; 153 pte_t res;
152 154
153 /* xchg acts as a barrier before the setting of the high bits */ 155 res.pte = (pteval_t)arch_atomic64_xchg((atomic64_t *)ptep, 0);
154 res.pte_low = xchg(&ptep->pte_low, 0);
155 res.pte_high = ptep->pte_high;
156 ptep->pte_high = 0;
157 156
158 return res; 157 return res;
159} 158}
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index c24297268ebc..d53c54b842da 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -132,6 +132,8 @@ struct cpuinfo_x86 {
132 /* Index into per_cpu list: */ 132 /* Index into per_cpu list: */
133 u16 cpu_index; 133 u16 cpu_index;
134 u32 microcode; 134 u32 microcode;
135 /* Address space bits used by the cache internally */
136 u8 x86_cache_bits;
135 unsigned initialized : 1; 137 unsigned initialized : 1;
136} __randomize_layout; 138} __randomize_layout;
137 139
@@ -183,7 +185,7 @@ extern void cpu_detect(struct cpuinfo_x86 *c);
183 185
184static inline unsigned long long l1tf_pfn_limit(void) 186static inline unsigned long long l1tf_pfn_limit(void)
185{ 187{
186 return BIT_ULL(boot_cpu_data.x86_phys_bits - 1 - PAGE_SHIFT); 188 return BIT_ULL(boot_cpu_data.x86_cache_bits - 1 - PAGE_SHIFT);
187} 189}
188 190
189extern void early_cpu_init(void); 191extern void early_cpu_init(void);
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 5f9012ff52ed..33d3c88a7225 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -39,6 +39,7 @@ extern void do_signal(struct pt_regs *regs);
39 39
40#define __ARCH_HAS_SA_RESTORER 40#define __ARCH_HAS_SA_RESTORER
41 41
42#include <asm/asm.h>
42#include <uapi/asm/sigcontext.h> 43#include <uapi/asm/sigcontext.h>
43 44
44#ifdef __i386__ 45#ifdef __i386__
@@ -86,9 +87,9 @@ static inline int __const_sigismember(sigset_t *set, int _sig)
86 87
87static inline int __gen_sigismember(sigset_t *set, int _sig) 88static inline int __gen_sigismember(sigset_t *set, int _sig)
88{ 89{
89 unsigned char ret; 90 bool ret;
90 asm("btl %2,%1\n\tsetc %0" 91 asm("btl %2,%1" CC_SET(c)
91 : "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc"); 92 : CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
92 return ret; 93 return ret;
93} 94}
94 95
diff --git a/arch/x86/include/asm/stacktrace.h b/arch/x86/include/asm/stacktrace.h
index b6dc698f992a..f335aad404a4 100644
--- a/arch/x86/include/asm/stacktrace.h
+++ b/arch/x86/include/asm/stacktrace.h
@@ -111,6 +111,6 @@ static inline unsigned long caller_frame_pointer(void)
111 return (unsigned long)frame; 111 return (unsigned long)frame;
112} 112}
113 113
114void show_opcodes(u8 *rip, const char *loglvl); 114void show_opcodes(struct pt_regs *regs, const char *loglvl);
115void show_ip(struct pt_regs *regs, const char *loglvl); 115void show_ip(struct pt_regs *regs, const char *loglvl);
116#endif /* _ASM_X86_STACKTRACE_H */ 116#endif /* _ASM_X86_STACKTRACE_H */
diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 29c9da6c62fc..58ce5288878e 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -175,8 +175,16 @@ struct tlb_state {
175 * are on. This means that it may not match current->active_mm, 175 * are on. This means that it may not match current->active_mm,
176 * which will contain the previous user mm when we're in lazy TLB 176 * which will contain the previous user mm when we're in lazy TLB
177 * mode even if we've already switched back to swapper_pg_dir. 177 * mode even if we've already switched back to swapper_pg_dir.
178 *
179 * During switch_mm_irqs_off(), loaded_mm will be set to
180 * LOADED_MM_SWITCHING during the brief interrupts-off window
181 * when CR3 and loaded_mm would otherwise be inconsistent. This
182 * is for nmi_uaccess_okay()'s benefit.
178 */ 183 */
179 struct mm_struct *loaded_mm; 184 struct mm_struct *loaded_mm;
185
186#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
187
180 u16 loaded_mm_asid; 188 u16 loaded_mm_asid;
181 u16 next_asid; 189 u16 next_asid;
182 /* last user mm's ctx id */ 190 /* last user mm's ctx id */
@@ -246,6 +254,38 @@ struct tlb_state {
246}; 254};
247DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate); 255DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate);
248 256
257/*
258 * Blindly accessing user memory from NMI context can be dangerous
259 * if we're in the middle of switching the current user task or
260 * switching the loaded mm. It can also be dangerous if we
261 * interrupted some kernel code that was temporarily using a
262 * different mm.
263 */
264static inline bool nmi_uaccess_okay(void)
265{
266 struct mm_struct *loaded_mm = this_cpu_read(cpu_tlbstate.loaded_mm);
267 struct mm_struct *current_mm = current->mm;
268
269 VM_WARN_ON_ONCE(!loaded_mm);
270
271 /*
272 * The condition we want to check is
273 * current_mm->pgd == __va(read_cr3_pa()). This may be slow, though,
274 * if we're running in a VM with shadow paging, and nmi_uaccess_okay()
275 * is supposed to be reasonably fast.
276 *
277 * Instead, we check the almost equivalent but somewhat conservative
278 * condition below, and we rely on the fact that switch_mm_irqs_off()
279 * sets loaded_mm to LOADED_MM_SWITCHING before writing to CR3.
280 */
281 if (loaded_mm != current_mm)
282 return false;
283
284 VM_WARN_ON_ONCE(current_mm->pgd != __va(read_cr3_pa()));
285
286 return true;
287}
288
249/* Initialize cr4 shadow for this CPU. */ 289/* Initialize cr4 shadow for this CPU. */
250static inline void cr4_init_shadow(void) 290static inline void cr4_init_shadow(void)
251{ 291{
diff --git a/arch/x86/include/asm/vgtod.h b/arch/x86/include/asm/vgtod.h
index fb856c9f0449..53748541c487 100644
--- a/arch/x86/include/asm/vgtod.h
+++ b/arch/x86/include/asm/vgtod.h
@@ -93,7 +93,7 @@ static inline unsigned int __getcpu(void)
93 * 93 *
94 * If RDPID is available, use it. 94 * If RDPID is available, use it.
95 */ 95 */
96 alternative_io ("lsl %[p],%[seg]", 96 alternative_io ("lsl %[seg],%[p]",
97 ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */ 97 ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */
98 X86_FEATURE_RDPID, 98 X86_FEATURE_RDPID,
99 [p] "=a" (p), [seg] "r" (__PER_CPU_SEG)); 99 [p] "=a" (p), [seg] "r" (__PER_CPU_SEG));
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 014f214da581..b9d5e7c9ef43 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -684,8 +684,6 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode,
684 * It means the size must be writable atomically and the address must be aligned 684 * It means the size must be writable atomically and the address must be aligned
685 * in a way that permits an atomic write. It also makes sure we fit on a single 685 * in a way that permits an atomic write. It also makes sure we fit on a single
686 * page. 686 * page.
687 *
688 * Note: Must be called under text_mutex.
689 */ 687 */
690void *text_poke(void *addr, const void *opcode, size_t len) 688void *text_poke(void *addr, const void *opcode, size_t len)
691{ 689{
@@ -700,6 +698,8 @@ void *text_poke(void *addr, const void *opcode, size_t len)
700 */ 698 */
701 BUG_ON(!after_bootmem); 699 BUG_ON(!after_bootmem);
702 700
701 lockdep_assert_held(&text_mutex);
702
703 if (!core_kernel_text((unsigned long)addr)) { 703 if (!core_kernel_text((unsigned long)addr)) {
704 pages[0] = vmalloc_to_page(addr); 704 pages[0] = vmalloc_to_page(addr);
705 pages[1] = vmalloc_to_page(addr + PAGE_SIZE); 705 pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
@@ -782,8 +782,6 @@ int poke_int3_handler(struct pt_regs *regs)
782 * - replace the first byte (int3) by the first byte of 782 * - replace the first byte (int3) by the first byte of
783 * replacing opcode 783 * replacing opcode
784 * - sync cores 784 * - sync cores
785 *
786 * Note: must be called under text_mutex.
787 */ 785 */
788void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler) 786void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler)
789{ 787{
@@ -792,6 +790,9 @@ void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler)
792 bp_int3_handler = handler; 790 bp_int3_handler = handler;
793 bp_int3_addr = (u8 *)addr + sizeof(int3); 791 bp_int3_addr = (u8 *)addr + sizeof(int3);
794 bp_patching_in_progress = true; 792 bp_patching_in_progress = true;
793
794 lockdep_assert_held(&text_mutex);
795
795 /* 796 /*
796 * Corresponding read barrier in int3 notifier for making sure the 797 * Corresponding read barrier in int3 notifier for making sure the
797 * in_progress and handler are correctly ordered wrt. patching. 798 * in_progress and handler are correctly ordered wrt. patching.
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 4c2313d0b9ca..40bdaea97fe7 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -668,6 +668,45 @@ EXPORT_SYMBOL_GPL(l1tf_mitigation);
668enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO; 668enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO;
669EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation); 669EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation);
670 670
671/*
672 * These CPUs all support 44bits physical address space internally in the
673 * cache but CPUID can report a smaller number of physical address bits.
674 *
675 * The L1TF mitigation uses the top most address bit for the inversion of
676 * non present PTEs. When the installed memory reaches into the top most
677 * address bit due to memory holes, which has been observed on machines
678 * which report 36bits physical address bits and have 32G RAM installed,
679 * then the mitigation range check in l1tf_select_mitigation() triggers.
680 * This is a false positive because the mitigation is still possible due to
681 * the fact that the cache uses 44bit internally. Use the cache bits
682 * instead of the reported physical bits and adjust them on the affected
683 * machines to 44bit if the reported bits are less than 44.
684 */
685static void override_cache_bits(struct cpuinfo_x86 *c)
686{
687 if (c->x86 != 6)
688 return;
689
690 switch (c->x86_model) {
691 case INTEL_FAM6_NEHALEM:
692 case INTEL_FAM6_WESTMERE:
693 case INTEL_FAM6_SANDYBRIDGE:
694 case INTEL_FAM6_IVYBRIDGE:
695 case INTEL_FAM6_HASWELL_CORE:
696 case INTEL_FAM6_HASWELL_ULT:
697 case INTEL_FAM6_HASWELL_GT3E:
698 case INTEL_FAM6_BROADWELL_CORE:
699 case INTEL_FAM6_BROADWELL_GT3E:
700 case INTEL_FAM6_SKYLAKE_MOBILE:
701 case INTEL_FAM6_SKYLAKE_DESKTOP:
702 case INTEL_FAM6_KABYLAKE_MOBILE:
703 case INTEL_FAM6_KABYLAKE_DESKTOP:
704 if (c->x86_cache_bits < 44)
705 c->x86_cache_bits = 44;
706 break;
707 }
708}
709
671static void __init l1tf_select_mitigation(void) 710static void __init l1tf_select_mitigation(void)
672{ 711{
673 u64 half_pa; 712 u64 half_pa;
@@ -675,6 +714,8 @@ static void __init l1tf_select_mitigation(void)
675 if (!boot_cpu_has_bug(X86_BUG_L1TF)) 714 if (!boot_cpu_has_bug(X86_BUG_L1TF))
676 return; 715 return;
677 716
717 override_cache_bits(&boot_cpu_data);
718
678 switch (l1tf_mitigation) { 719 switch (l1tf_mitigation) {
679 case L1TF_MITIGATION_OFF: 720 case L1TF_MITIGATION_OFF:
680 case L1TF_MITIGATION_FLUSH_NOWARN: 721 case L1TF_MITIGATION_FLUSH_NOWARN:
@@ -694,11 +735,6 @@ static void __init l1tf_select_mitigation(void)
694 return; 735 return;
695#endif 736#endif
696 737
697 /*
698 * This is extremely unlikely to happen because almost all
699 * systems have far more MAX_PA/2 than RAM can be fit into
700 * DIMM slots.
701 */
702 half_pa = (u64)l1tf_pfn_limit() << PAGE_SHIFT; 738 half_pa = (u64)l1tf_pfn_limit() << PAGE_SHIFT;
703 if (e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_RAM)) { 739 if (e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_RAM)) {
704 pr_warn("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n"); 740 pr_warn("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n");
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 84dee5ab745a..44c4ef3d989b 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -919,6 +919,7 @@ void get_cpu_address_sizes(struct cpuinfo_x86 *c)
919 else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36)) 919 else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
920 c->x86_phys_bits = 36; 920 c->x86_phys_bits = 36;
921#endif 921#endif
922 c->x86_cache_bits = c->x86_phys_bits;
922} 923}
923 924
924static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c) 925static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 401e8c133108..fc3c07fe7df5 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -150,6 +150,9 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)
150 if (cpu_has(c, X86_FEATURE_HYPERVISOR)) 150 if (cpu_has(c, X86_FEATURE_HYPERVISOR))
151 return false; 151 return false;
152 152
153 if (c->x86 != 6)
154 return false;
155
153 for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) { 156 for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) {
154 if (c->x86_model == spectre_bad_microcodes[i].model && 157 if (c->x86_model == spectre_bad_microcodes[i].model &&
155 c->x86_stepping == spectre_bad_microcodes[i].stepping) 158 c->x86_stepping == spectre_bad_microcodes[i].stepping)
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index 9c8652974f8e..f56895106ccf 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -17,6 +17,7 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/nmi.h> 18#include <linux/nmi.h>
19#include <linux/sysfs.h> 19#include <linux/sysfs.h>
20#include <linux/kasan.h>
20 21
21#include <asm/cpu_entry_area.h> 22#include <asm/cpu_entry_area.h>
22#include <asm/stacktrace.h> 23#include <asm/stacktrace.h>
@@ -89,14 +90,24 @@ static void printk_stack_address(unsigned long address, int reliable,
89 * Thus, the 2/3rds prologue and 64 byte OPCODE_BUFSIZE is just a random 90 * Thus, the 2/3rds prologue and 64 byte OPCODE_BUFSIZE is just a random
90 * guesstimate in attempt to achieve all of the above. 91 * guesstimate in attempt to achieve all of the above.
91 */ 92 */
92void show_opcodes(u8 *rip, const char *loglvl) 93void show_opcodes(struct pt_regs *regs, const char *loglvl)
93{ 94{
94#define PROLOGUE_SIZE 42 95#define PROLOGUE_SIZE 42
95#define EPILOGUE_SIZE 21 96#define EPILOGUE_SIZE 21
96#define OPCODE_BUFSIZE (PROLOGUE_SIZE + 1 + EPILOGUE_SIZE) 97#define OPCODE_BUFSIZE (PROLOGUE_SIZE + 1 + EPILOGUE_SIZE)
97 u8 opcodes[OPCODE_BUFSIZE]; 98 u8 opcodes[OPCODE_BUFSIZE];
99 unsigned long prologue = regs->ip - PROLOGUE_SIZE;
100 bool bad_ip;
98 101
99 if (probe_kernel_read(opcodes, rip - PROLOGUE_SIZE, OPCODE_BUFSIZE)) { 102 /*
103 * Make sure userspace isn't trying to trick us into dumping kernel
104 * memory by pointing the userspace instruction pointer at it.
105 */
106 bad_ip = user_mode(regs) &&
107 __chk_range_not_ok(prologue, OPCODE_BUFSIZE, TASK_SIZE_MAX);
108
109 if (bad_ip || probe_kernel_read(opcodes, (u8 *)prologue,
110 OPCODE_BUFSIZE)) {
100 printk("%sCode: Bad RIP value.\n", loglvl); 111 printk("%sCode: Bad RIP value.\n", loglvl);
101 } else { 112 } else {
102 printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %" 113 printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %"
@@ -112,7 +123,7 @@ void show_ip(struct pt_regs *regs, const char *loglvl)
112#else 123#else
113 printk("%sRIP: %04x:%pS\n", loglvl, (int)regs->cs, (void *)regs->ip); 124 printk("%sRIP: %04x:%pS\n", loglvl, (int)regs->cs, (void *)regs->ip);
114#endif 125#endif
115 show_opcodes((u8 *)regs->ip, loglvl); 126 show_opcodes(regs, loglvl);
116} 127}
117 128
118void show_iret_regs(struct pt_regs *regs) 129void show_iret_regs(struct pt_regs *regs)
@@ -346,7 +357,10 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
346 * We're not going to return, but we might be on an IST stack or 357 * We're not going to return, but we might be on an IST stack or
347 * have very little stack space left. Rewind the stack and kill 358 * have very little stack space left. Rewind the stack and kill
348 * the task. 359 * the task.
360 * Before we rewind the stack, we have to tell KASAN that we're going to
361 * reuse the task stack and that existing poisons are invalid.
349 */ 362 */
363 kasan_unpoison_task_stack(current);
350 rewind_stack_do_exit(signr); 364 rewind_stack_do_exit(signr);
351} 365}
352NOKPROBE_SYMBOL(oops_end); 366NOKPROBE_SYMBOL(oops_end);
diff --git a/arch/x86/lib/usercopy.c b/arch/x86/lib/usercopy.c
index c8c6ad0d58b8..3f435d7fca5e 100644
--- a/arch/x86/lib/usercopy.c
+++ b/arch/x86/lib/usercopy.c
@@ -7,6 +7,8 @@
7#include <linux/uaccess.h> 7#include <linux/uaccess.h>
8#include <linux/export.h> 8#include <linux/export.h>
9 9
10#include <asm/tlbflush.h>
11
10/* 12/*
11 * We rely on the nested NMI work to allow atomic faults from the NMI path; the 13 * We rely on the nested NMI work to allow atomic faults from the NMI path; the
12 * nested NMI paths are careful to preserve CR2. 14 * nested NMI paths are careful to preserve CR2.
@@ -19,6 +21,9 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
19 if (__range_not_ok(from, n, TASK_SIZE)) 21 if (__range_not_ok(from, n, TASK_SIZE))
20 return n; 22 return n;
21 23
24 if (!nmi_uaccess_okay())
25 return n;
26
22 /* 27 /*
23 * Even though this function is typically called from NMI/IRQ context 28 * Even though this function is typically called from NMI/IRQ context
24 * disable pagefaults so that its behaviour is consistent even when 29 * disable pagefaults so that its behaviour is consistent even when
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index b9123c497e0a..47bebfe6efa7 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -837,7 +837,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
837 837
838 printk(KERN_CONT "\n"); 838 printk(KERN_CONT "\n");
839 839
840 show_opcodes((u8 *)regs->ip, loglvl); 840 show_opcodes(regs, loglvl);
841} 841}
842 842
843static void 843static void
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 8d6c34fe49be..51a5a69ecac9 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1420,6 +1420,29 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
1420 return 0; 1420 return 0;
1421} 1421}
1422 1422
1423/*
1424 * Machine check recovery code needs to change cache mode of poisoned
1425 * pages to UC to avoid speculative access logging another error. But
1426 * passing the address of the 1:1 mapping to set_memory_uc() is a fine
1427 * way to encourage a speculative access. So we cheat and flip the top
1428 * bit of the address. This works fine for the code that updates the
1429 * page tables. But at the end of the process we need to flush the cache
1430 * and the non-canonical address causes a #GP fault when used by the
1431 * CLFLUSH instruction.
1432 *
1433 * But in the common case we already have a canonical address. This code
1434 * will fix the top bit if needed and is a no-op otherwise.
1435 */
1436static inline unsigned long make_addr_canonical_again(unsigned long addr)
1437{
1438#ifdef CONFIG_X86_64
1439 return (long)(addr << 1) >> 1;
1440#else
1441 return addr;
1442#endif
1443}
1444
1445
1423static int change_page_attr_set_clr(unsigned long *addr, int numpages, 1446static int change_page_attr_set_clr(unsigned long *addr, int numpages,
1424 pgprot_t mask_set, pgprot_t mask_clr, 1447 pgprot_t mask_set, pgprot_t mask_clr,
1425 int force_split, int in_flag, 1448 int force_split, int in_flag,
@@ -1465,7 +1488,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
1465 * Save address for cache flush. *addr is modified in the call 1488 * Save address for cache flush. *addr is modified in the call
1466 * to __change_page_attr_set_clr() below. 1489 * to __change_page_attr_set_clr() below.
1467 */ 1490 */
1468 baddr = *addr; 1491 baddr = make_addr_canonical_again(*addr);
1469 } 1492 }
1470 1493
1471 /* Must avoid aliasing mappings in the highmem code */ 1494 /* Must avoid aliasing mappings in the highmem code */
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 31341ae7309f..c1fc1ae6b429 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -248,7 +248,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long address)
248 * 248 *
249 * Returns a pointer to a PTE on success, or NULL on failure. 249 * Returns a pointer to a PTE on success, or NULL on failure.
250 */ 250 */
251static __init pte_t *pti_user_pagetable_walk_pte(unsigned long address) 251static pte_t *pti_user_pagetable_walk_pte(unsigned long address)
252{ 252{
253 gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO); 253 gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
254 pmd_t *pmd; 254 pmd_t *pmd;
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 9517d1b2a281..e96b99eb800c 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -305,6 +305,10 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
305 305
306 choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush); 306 choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush);
307 307
308 /* Let nmi_uaccess_okay() know that we're changing CR3. */
309 this_cpu_write(cpu_tlbstate.loaded_mm, LOADED_MM_SWITCHING);
310 barrier();
311
308 if (need_flush) { 312 if (need_flush) {
309 this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id); 313 this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id);
310 this_cpu_write(cpu_tlbstate.ctxs[new_asid].tlb_gen, next_tlb_gen); 314 this_cpu_write(cpu_tlbstate.ctxs[new_asid].tlb_gen, next_tlb_gen);
@@ -335,6 +339,9 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
335 if (next != &init_mm) 339 if (next != &init_mm)
336 this_cpu_write(cpu_tlbstate.last_ctx_id, next->context.ctx_id); 340 this_cpu_write(cpu_tlbstate.last_ctx_id, next->context.ctx_id);
337 341
342 /* Make sure we write CR3 before loaded_mm. */
343 barrier();
344
338 this_cpu_write(cpu_tlbstate.loaded_mm, next); 345 this_cpu_write(cpu_tlbstate.loaded_mm, next);
339 this_cpu_write(cpu_tlbstate.loaded_mm_asid, new_asid); 346 this_cpu_write(cpu_tlbstate.loaded_mm_asid, new_asid);
340 } 347 }
diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c
index 324b93328b37..05ca14222463 100644
--- a/arch/x86/platform/efi/efi_32.c
+++ b/arch/x86/platform/efi/efi_32.c
@@ -85,14 +85,10 @@ pgd_t * __init efi_call_phys_prolog(void)
85 85
86void __init efi_call_phys_epilog(pgd_t *save_pgd) 86void __init efi_call_phys_epilog(pgd_t *save_pgd)
87{ 87{
88 struct desc_ptr gdt_descr;
89
90 gdt_descr.address = (unsigned long)get_cpu_gdt_rw(0);
91 gdt_descr.size = GDT_SIZE - 1;
92 load_gdt(&gdt_descr);
93
94 load_cr3(save_pgd); 88 load_cr3(save_pgd);
95 __flush_tlb_all(); 89 __flush_tlb_all();
90
91 load_fixmap_gdt(0);
96} 92}
97 93
98void __init efi_runtime_update_mappings(void) 94void __init efi_runtime_update_mappings(void)
diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c
index 45b700ac5fe7..2fe5c9b1816b 100644
--- a/arch/x86/xen/mmu_pv.c
+++ b/arch/x86/xen/mmu_pv.c
@@ -435,14 +435,13 @@ static void xen_set_pud(pud_t *ptr, pud_t val)
435static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) 435static void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
436{ 436{
437 trace_xen_mmu_set_pte_atomic(ptep, pte); 437 trace_xen_mmu_set_pte_atomic(ptep, pte);
438 set_64bit((u64 *)ptep, native_pte_val(pte)); 438 __xen_set_pte(ptep, pte);
439} 439}
440 440
441static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 441static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
442{ 442{
443 trace_xen_mmu_pte_clear(mm, addr, ptep); 443 trace_xen_mmu_pte_clear(mm, addr, ptep);
444 if (!xen_batched_set_pte(ptep, native_make_pte(0))) 444 __xen_set_pte(ptep, native_make_pte(0));
445 native_pte_clear(mm, addr, ptep);
446} 445}
447 446
448static void xen_pmd_clear(pmd_t *pmdp) 447static void xen_pmd_clear(pmd_t *pmdp)
@@ -1570,7 +1569,7 @@ static void __init xen_set_pte_init(pte_t *ptep, pte_t pte)
1570 pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & 1569 pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
1571 pte_val_ma(pte)); 1570 pte_val_ma(pte));
1572#endif 1571#endif
1573 native_set_pte(ptep, pte); 1572 __xen_set_pte(ptep, pte);
1574} 1573}
1575 1574
1576/* Early in boot, while setting up the initial pagetable, assume 1575/* Early in boot, while setting up the initial pagetable, assume
@@ -2061,7 +2060,6 @@ void __init xen_relocate_p2m(void)
2061 pud_t *pud; 2060 pud_t *pud;
2062 pgd_t *pgd; 2061 pgd_t *pgd;
2063 unsigned long *new_p2m; 2062 unsigned long *new_p2m;
2064 int save_pud;
2065 2063
2066 size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); 2064 size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long));
2067 n_pte = roundup(size, PAGE_SIZE) >> PAGE_SHIFT; 2065 n_pte = roundup(size, PAGE_SIZE) >> PAGE_SHIFT;
@@ -2091,7 +2089,6 @@ void __init xen_relocate_p2m(void)
2091 2089
2092 pgd = __va(read_cr3_pa()); 2090 pgd = __va(read_cr3_pa());
2093 new_p2m = (unsigned long *)(2 * PGDIR_SIZE); 2091 new_p2m = (unsigned long *)(2 * PGDIR_SIZE);
2094 save_pud = n_pud;
2095 for (idx_pud = 0; idx_pud < n_pud; idx_pud++) { 2092 for (idx_pud = 0; idx_pud < n_pud; idx_pud++) {
2096 pud = early_memremap(pud_phys, PAGE_SIZE); 2093 pud = early_memremap(pud_phys, PAGE_SIZE);
2097 clear_page(pud); 2094 clear_page(pud);
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 84507d3e9a98..8e20a0677dcf 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -123,16 +123,11 @@ static void rwb_wake_all(struct rq_wb *rwb)
123 } 123 }
124} 124}
125 125
126static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct) 126static void wbt_rqw_done(struct rq_wb *rwb, struct rq_wait *rqw,
127 enum wbt_flags wb_acct)
127{ 128{
128 struct rq_wb *rwb = RQWB(rqos);
129 struct rq_wait *rqw;
130 int inflight, limit; 129 int inflight, limit;
131 130
132 if (!(wb_acct & WBT_TRACKED))
133 return;
134
135 rqw = get_rq_wait(rwb, wb_acct);
136 inflight = atomic_dec_return(&rqw->inflight); 131 inflight = atomic_dec_return(&rqw->inflight);
137 132
138 /* 133 /*
@@ -166,10 +161,22 @@ static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct)
166 int diff = limit - inflight; 161 int diff = limit - inflight;
167 162
168 if (!inflight || diff >= rwb->wb_background / 2) 163 if (!inflight || diff >= rwb->wb_background / 2)
169 wake_up(&rqw->wait); 164 wake_up_all(&rqw->wait);
170 } 165 }
171} 166}
172 167
168static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct)
169{
170 struct rq_wb *rwb = RQWB(rqos);
171 struct rq_wait *rqw;
172
173 if (!(wb_acct & WBT_TRACKED))
174 return;
175
176 rqw = get_rq_wait(rwb, wb_acct);
177 wbt_rqw_done(rwb, rqw, wb_acct);
178}
179
173/* 180/*
174 * Called on completion of a request. Note that it's also called when 181 * Called on completion of a request. Note that it's also called when
175 * a request is merged, when the request gets freed. 182 * a request is merged, when the request gets freed.
@@ -481,6 +488,34 @@ static inline unsigned int get_limit(struct rq_wb *rwb, unsigned long rw)
481 return limit; 488 return limit;
482} 489}
483 490
491struct wbt_wait_data {
492 struct wait_queue_entry wq;
493 struct task_struct *task;
494 struct rq_wb *rwb;
495 struct rq_wait *rqw;
496 unsigned long rw;
497 bool got_token;
498};
499
500static int wbt_wake_function(struct wait_queue_entry *curr, unsigned int mode,
501 int wake_flags, void *key)
502{
503 struct wbt_wait_data *data = container_of(curr, struct wbt_wait_data,
504 wq);
505
506 /*
507 * If we fail to get a budget, return -1 to interrupt the wake up
508 * loop in __wake_up_common.
509 */
510 if (!rq_wait_inc_below(data->rqw, get_limit(data->rwb, data->rw)))
511 return -1;
512
513 data->got_token = true;
514 list_del_init(&curr->entry);
515 wake_up_process(data->task);
516 return 1;
517}
518
484/* 519/*
485 * Block if we will exceed our limit, or if we are currently waiting for 520 * Block if we will exceed our limit, or if we are currently waiting for
486 * the timer to kick off queuing again. 521 * the timer to kick off queuing again.
@@ -491,19 +526,40 @@ static void __wbt_wait(struct rq_wb *rwb, enum wbt_flags wb_acct,
491 __acquires(lock) 526 __acquires(lock)
492{ 527{
493 struct rq_wait *rqw = get_rq_wait(rwb, wb_acct); 528 struct rq_wait *rqw = get_rq_wait(rwb, wb_acct);
494 DECLARE_WAITQUEUE(wait, current); 529 struct wbt_wait_data data = {
530 .wq = {
531 .func = wbt_wake_function,
532 .entry = LIST_HEAD_INIT(data.wq.entry),
533 },
534 .task = current,
535 .rwb = rwb,
536 .rqw = rqw,
537 .rw = rw,
538 };
495 bool has_sleeper; 539 bool has_sleeper;
496 540
497 has_sleeper = wq_has_sleeper(&rqw->wait); 541 has_sleeper = wq_has_sleeper(&rqw->wait);
498 if (!has_sleeper && rq_wait_inc_below(rqw, get_limit(rwb, rw))) 542 if (!has_sleeper && rq_wait_inc_below(rqw, get_limit(rwb, rw)))
499 return; 543 return;
500 544
501 add_wait_queue_exclusive(&rqw->wait, &wait); 545 prepare_to_wait_exclusive(&rqw->wait, &data.wq, TASK_UNINTERRUPTIBLE);
502 do { 546 do {
503 set_current_state(TASK_UNINTERRUPTIBLE); 547 if (data.got_token)
548 break;
504 549
505 if (!has_sleeper && rq_wait_inc_below(rqw, get_limit(rwb, rw))) 550 if (!has_sleeper &&
551 rq_wait_inc_below(rqw, get_limit(rwb, rw))) {
552 finish_wait(&rqw->wait, &data.wq);
553
554 /*
555 * We raced with wbt_wake_function() getting a token,
556 * which means we now have two. Put our local token
557 * and wake anyone else potentially waiting for one.
558 */
559 if (data.got_token)
560 wbt_rqw_done(rwb, rqw, wb_acct);
506 break; 561 break;
562 }
507 563
508 if (lock) { 564 if (lock) {
509 spin_unlock_irq(lock); 565 spin_unlock_irq(lock);
@@ -511,11 +567,11 @@ static void __wbt_wait(struct rq_wb *rwb, enum wbt_flags wb_acct,
511 spin_lock_irq(lock); 567 spin_lock_irq(lock);
512 } else 568 } else
513 io_schedule(); 569 io_schedule();
570
514 has_sleeper = false; 571 has_sleeper = false;
515 } while (1); 572 } while (1);
516 573
517 __set_current_state(TASK_RUNNING); 574 finish_wait(&rqw->wait, &data.wq);
518 remove_wait_queue(&rqw->wait, &wait);
519} 575}
520 576
521static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio) 577static inline bool wbt_should_throttle(struct rq_wb *rwb, struct bio *bio)
@@ -580,11 +636,6 @@ static void wbt_wait(struct rq_qos *rqos, struct bio *bio, spinlock_t *lock)
580 return; 636 return;
581 } 637 }
582 638
583 if (current_is_kswapd())
584 flags |= WBT_KSWAPD;
585 if (bio_op(bio) == REQ_OP_DISCARD)
586 flags |= WBT_DISCARD;
587
588 __wbt_wait(rwb, flags, bio->bi_opf, lock); 639 __wbt_wait(rwb, flags, bio->bi_opf, lock);
589 640
590 if (!blk_stat_is_active(rwb->cb)) 641 if (!blk_stat_is_active(rwb->cb))
diff --git a/block/bsg.c b/block/bsg.c
index db588add6ba6..9a442c23a715 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -37,7 +37,7 @@ struct bsg_device {
37 struct request_queue *queue; 37 struct request_queue *queue;
38 spinlock_t lock; 38 spinlock_t lock;
39 struct hlist_node dev_list; 39 struct hlist_node dev_list;
40 atomic_t ref_count; 40 refcount_t ref_count;
41 char name[20]; 41 char name[20];
42 int max_queue; 42 int max_queue;
43}; 43};
@@ -252,7 +252,7 @@ static int bsg_put_device(struct bsg_device *bd)
252 252
253 mutex_lock(&bsg_mutex); 253 mutex_lock(&bsg_mutex);
254 254
255 if (!atomic_dec_and_test(&bd->ref_count)) { 255 if (!refcount_dec_and_test(&bd->ref_count)) {
256 mutex_unlock(&bsg_mutex); 256 mutex_unlock(&bsg_mutex);
257 return 0; 257 return 0;
258 } 258 }
@@ -290,7 +290,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
290 290
291 bd->queue = rq; 291 bd->queue = rq;
292 292
293 atomic_set(&bd->ref_count, 1); 293 refcount_set(&bd->ref_count, 1);
294 hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode))); 294 hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));
295 295
296 strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1); 296 strncpy(bd->name, dev_name(rq->bsg_dev.class_dev), sizeof(bd->name) - 1);
@@ -308,7 +308,7 @@ static struct bsg_device *__bsg_get_device(int minor, struct request_queue *q)
308 308
309 hlist_for_each_entry(bd, bsg_dev_idx_hash(minor), dev_list) { 309 hlist_for_each_entry(bd, bsg_dev_idx_hash(minor), dev_list) {
310 if (bd->queue == q) { 310 if (bd->queue == q) {
311 atomic_inc(&bd->ref_count); 311 refcount_inc(&bd->ref_count);
312 goto found; 312 goto found;
313 } 313 }
314 } 314 }
diff --git a/block/elevator.c b/block/elevator.c
index 5ea6e7d600e4..6a06b5d040e5 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -895,8 +895,7 @@ int elv_register(struct elevator_type *e)
895 spin_lock(&elv_list_lock); 895 spin_lock(&elv_list_lock);
896 if (elevator_find(e->elevator_name, e->uses_mq)) { 896 if (elevator_find(e->elevator_name, e->uses_mq)) {
897 spin_unlock(&elv_list_lock); 897 spin_unlock(&elv_list_lock);
898 if (e->icq_cache) 898 kmem_cache_destroy(e->icq_cache);
899 kmem_cache_destroy(e->icq_cache);
900 return -EBUSY; 899 return -EBUSY;
901 } 900 }
902 list_add_tail(&e->list, &elv_list); 901 list_add_tail(&e->list, &elv_list);
diff --git a/drivers/ata/pata_ftide010.c b/drivers/ata/pata_ftide010.c
index 5d4b72e21161..569a4a662dcd 100644
--- a/drivers/ata/pata_ftide010.c
+++ b/drivers/ata/pata_ftide010.c
@@ -256,14 +256,12 @@ static struct ata_port_operations pata_ftide010_port_ops = {
256 .qc_issue = ftide010_qc_issue, 256 .qc_issue = ftide010_qc_issue,
257}; 257};
258 258
259static struct ata_port_info ftide010_port_info[] = { 259static struct ata_port_info ftide010_port_info = {
260 { 260 .flags = ATA_FLAG_SLAVE_POSS,
261 .flags = ATA_FLAG_SLAVE_POSS, 261 .mwdma_mask = ATA_MWDMA2,
262 .mwdma_mask = ATA_MWDMA2, 262 .udma_mask = ATA_UDMA6,
263 .udma_mask = ATA_UDMA6, 263 .pio_mask = ATA_PIO4,
264 .pio_mask = ATA_PIO4, 264 .port_ops = &pata_ftide010_port_ops,
265 .port_ops = &pata_ftide010_port_ops,
266 },
267}; 265};
268 266
269#if IS_ENABLED(CONFIG_SATA_GEMINI) 267#if IS_ENABLED(CONFIG_SATA_GEMINI)
@@ -349,6 +347,7 @@ static int pata_ftide010_gemini_cable_detect(struct ata_port *ap)
349} 347}
350 348
351static int pata_ftide010_gemini_init(struct ftide010 *ftide, 349static int pata_ftide010_gemini_init(struct ftide010 *ftide,
350 struct ata_port_info *pi,
352 bool is_ata1) 351 bool is_ata1)
353{ 352{
354 struct device *dev = ftide->dev; 353 struct device *dev = ftide->dev;
@@ -373,7 +372,13 @@ static int pata_ftide010_gemini_init(struct ftide010 *ftide,
373 372
374 /* Flag port as SATA-capable */ 373 /* Flag port as SATA-capable */
375 if (gemini_sata_bridge_enabled(sg, is_ata1)) 374 if (gemini_sata_bridge_enabled(sg, is_ata1))
376 ftide010_port_info[0].flags |= ATA_FLAG_SATA; 375 pi->flags |= ATA_FLAG_SATA;
376
377 /* This device has broken DMA, only PIO works */
378 if (of_machine_is_compatible("itian,sq201")) {
379 pi->mwdma_mask = 0;
380 pi->udma_mask = 0;
381 }
377 382
378 /* 383 /*
379 * We assume that a simple 40-wire cable is used in the PATA mode. 384 * We assume that a simple 40-wire cable is used in the PATA mode.
@@ -435,6 +440,7 @@ static int pata_ftide010_gemini_init(struct ftide010 *ftide,
435} 440}
436#else 441#else
437static int pata_ftide010_gemini_init(struct ftide010 *ftide, 442static int pata_ftide010_gemini_init(struct ftide010 *ftide,
443 struct ata_port_info *pi,
438 bool is_ata1) 444 bool is_ata1)
439{ 445{
440 return -ENOTSUPP; 446 return -ENOTSUPP;
@@ -446,7 +452,7 @@ static int pata_ftide010_probe(struct platform_device *pdev)
446{ 452{
447 struct device *dev = &pdev->dev; 453 struct device *dev = &pdev->dev;
448 struct device_node *np = dev->of_node; 454 struct device_node *np = dev->of_node;
449 const struct ata_port_info pi = ftide010_port_info[0]; 455 struct ata_port_info pi = ftide010_port_info;
450 const struct ata_port_info *ppi[] = { &pi, NULL }; 456 const struct ata_port_info *ppi[] = { &pi, NULL };
451 struct ftide010 *ftide; 457 struct ftide010 *ftide;
452 struct resource *res; 458 struct resource *res;
@@ -490,6 +496,7 @@ static int pata_ftide010_probe(struct platform_device *pdev)
490 * are ATA0. This will also set up the cable types. 496 * are ATA0. This will also set up the cable types.
491 */ 497 */
492 ret = pata_ftide010_gemini_init(ftide, 498 ret = pata_ftide010_gemini_init(ftide,
499 &pi,
493 (res->start == 0x63400000)); 500 (res->start == 0x63400000));
494 if (ret) 501 if (ret)
495 goto err_dis_clk; 502 goto err_dis_clk;
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index 8e2e4757adcb..5a42ae4078c2 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -185,7 +185,7 @@ EXPORT_SYMBOL_GPL(of_pm_clk_add_clk);
185int of_pm_clk_add_clks(struct device *dev) 185int of_pm_clk_add_clks(struct device *dev)
186{ 186{
187 struct clk **clks; 187 struct clk **clks;
188 unsigned int i, count; 188 int i, count;
189 int ret; 189 int ret;
190 190
191 if (!dev || !dev->of_node) 191 if (!dev || !dev->of_node)
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index b55b245e8052..fd1e19f1a49f 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -84,6 +84,18 @@ MODULE_PARM_DESC(max_persistent_grants,
84 "Maximum number of grants to map persistently"); 84 "Maximum number of grants to map persistently");
85 85
86/* 86/*
87 * How long a persistent grant is allowed to remain allocated without being in
88 * use. The time is in seconds, 0 means indefinitely long.
89 */
90
91static unsigned int xen_blkif_pgrant_timeout = 60;
92module_param_named(persistent_grant_unused_seconds, xen_blkif_pgrant_timeout,
93 uint, 0644);
94MODULE_PARM_DESC(persistent_grant_unused_seconds,
95 "Time in seconds an unused persistent grant is allowed to "
96 "remain allocated. Default is 60, 0 means unlimited.");
97
98/*
87 * Maximum number of rings/queues blkback supports, allow as many queues as there 99 * Maximum number of rings/queues blkback supports, allow as many queues as there
88 * are CPUs if user has not specified a value. 100 * are CPUs if user has not specified a value.
89 */ 101 */
@@ -123,6 +135,13 @@ module_param(log_stats, int, 0644);
123/* Number of free pages to remove on each call to gnttab_free_pages */ 135/* Number of free pages to remove on each call to gnttab_free_pages */
124#define NUM_BATCH_FREE_PAGES 10 136#define NUM_BATCH_FREE_PAGES 10
125 137
138static inline bool persistent_gnt_timeout(struct persistent_gnt *persistent_gnt)
139{
140 return xen_blkif_pgrant_timeout &&
141 (jiffies - persistent_gnt->last_used >=
142 HZ * xen_blkif_pgrant_timeout);
143}
144
126static inline int get_free_page(struct xen_blkif_ring *ring, struct page **page) 145static inline int get_free_page(struct xen_blkif_ring *ring, struct page **page)
127{ 146{
128 unsigned long flags; 147 unsigned long flags;
@@ -236,8 +255,7 @@ static int add_persistent_gnt(struct xen_blkif_ring *ring,
236 } 255 }
237 } 256 }
238 257
239 bitmap_zero(persistent_gnt->flags, PERSISTENT_GNT_FLAGS_SIZE); 258 persistent_gnt->active = true;
240 set_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags);
241 /* Add new node and rebalance tree. */ 259 /* Add new node and rebalance tree. */
242 rb_link_node(&(persistent_gnt->node), parent, new); 260 rb_link_node(&(persistent_gnt->node), parent, new);
243 rb_insert_color(&(persistent_gnt->node), &ring->persistent_gnts); 261 rb_insert_color(&(persistent_gnt->node), &ring->persistent_gnts);
@@ -261,11 +279,11 @@ static struct persistent_gnt *get_persistent_gnt(struct xen_blkif_ring *ring,
261 else if (gref > data->gnt) 279 else if (gref > data->gnt)
262 node = node->rb_right; 280 node = node->rb_right;
263 else { 281 else {
264 if(test_bit(PERSISTENT_GNT_ACTIVE, data->flags)) { 282 if (data->active) {
265 pr_alert_ratelimited("requesting a grant already in use\n"); 283 pr_alert_ratelimited("requesting a grant already in use\n");
266 return NULL; 284 return NULL;
267 } 285 }
268 set_bit(PERSISTENT_GNT_ACTIVE, data->flags); 286 data->active = true;
269 atomic_inc(&ring->persistent_gnt_in_use); 287 atomic_inc(&ring->persistent_gnt_in_use);
270 return data; 288 return data;
271 } 289 }
@@ -276,10 +294,10 @@ static struct persistent_gnt *get_persistent_gnt(struct xen_blkif_ring *ring,
276static void put_persistent_gnt(struct xen_blkif_ring *ring, 294static void put_persistent_gnt(struct xen_blkif_ring *ring,
277 struct persistent_gnt *persistent_gnt) 295 struct persistent_gnt *persistent_gnt)
278{ 296{
279 if(!test_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags)) 297 if (!persistent_gnt->active)
280 pr_alert_ratelimited("freeing a grant already unused\n"); 298 pr_alert_ratelimited("freeing a grant already unused\n");
281 set_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags); 299 persistent_gnt->last_used = jiffies;
282 clear_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags); 300 persistent_gnt->active = false;
283 atomic_dec(&ring->persistent_gnt_in_use); 301 atomic_dec(&ring->persistent_gnt_in_use);
284} 302}
285 303
@@ -371,26 +389,26 @@ static void purge_persistent_gnt(struct xen_blkif_ring *ring)
371 struct persistent_gnt *persistent_gnt; 389 struct persistent_gnt *persistent_gnt;
372 struct rb_node *n; 390 struct rb_node *n;
373 unsigned int num_clean, total; 391 unsigned int num_clean, total;
374 bool scan_used = false, clean_used = false; 392 bool scan_used = false;
375 struct rb_root *root; 393 struct rb_root *root;
376 394
377 if (ring->persistent_gnt_c < xen_blkif_max_pgrants ||
378 (ring->persistent_gnt_c == xen_blkif_max_pgrants &&
379 !ring->blkif->vbd.overflow_max_grants)) {
380 goto out;
381 }
382
383 if (work_busy(&ring->persistent_purge_work)) { 395 if (work_busy(&ring->persistent_purge_work)) {
384 pr_alert_ratelimited("Scheduled work from previous purge is still busy, cannot purge list\n"); 396 pr_alert_ratelimited("Scheduled work from previous purge is still busy, cannot purge list\n");
385 goto out; 397 goto out;
386 } 398 }
387 399
388 num_clean = (xen_blkif_max_pgrants / 100) * LRU_PERCENT_CLEAN; 400 if (ring->persistent_gnt_c < xen_blkif_max_pgrants ||
389 num_clean = ring->persistent_gnt_c - xen_blkif_max_pgrants + num_clean; 401 (ring->persistent_gnt_c == xen_blkif_max_pgrants &&
390 num_clean = min(ring->persistent_gnt_c, num_clean); 402 !ring->blkif->vbd.overflow_max_grants)) {
391 if ((num_clean == 0) || 403 num_clean = 0;
392 (num_clean > (ring->persistent_gnt_c - atomic_read(&ring->persistent_gnt_in_use)))) 404 } else {
393 goto out; 405 num_clean = (xen_blkif_max_pgrants / 100) * LRU_PERCENT_CLEAN;
406 num_clean = ring->persistent_gnt_c - xen_blkif_max_pgrants +
407 num_clean;
408 num_clean = min(ring->persistent_gnt_c, num_clean);
409 pr_debug("Going to purge at least %u persistent grants\n",
410 num_clean);
411 }
394 412
395 /* 413 /*
396 * At this point, we can assure that there will be no calls 414 * At this point, we can assure that there will be no calls
@@ -401,9 +419,7 @@ static void purge_persistent_gnt(struct xen_blkif_ring *ring)
401 * number of grants. 419 * number of grants.
402 */ 420 */
403 421
404 total = num_clean; 422 total = 0;
405
406 pr_debug("Going to purge %u persistent grants\n", num_clean);
407 423
408 BUG_ON(!list_empty(&ring->persistent_purge_list)); 424 BUG_ON(!list_empty(&ring->persistent_purge_list));
409 root = &ring->persistent_gnts; 425 root = &ring->persistent_gnts;
@@ -412,46 +428,37 @@ purge_list:
412 BUG_ON(persistent_gnt->handle == 428 BUG_ON(persistent_gnt->handle ==
413 BLKBACK_INVALID_HANDLE); 429 BLKBACK_INVALID_HANDLE);
414 430
415 if (clean_used) { 431 if (persistent_gnt->active)
416 clear_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags);
417 continue; 432 continue;
418 } 433 if (!scan_used && !persistent_gnt_timeout(persistent_gnt))
419
420 if (test_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags))
421 continue; 434 continue;
422 if (!scan_used && 435 if (scan_used && total >= num_clean)
423 (test_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags)))
424 continue; 436 continue;
425 437
426 rb_erase(&persistent_gnt->node, root); 438 rb_erase(&persistent_gnt->node, root);
427 list_add(&persistent_gnt->remove_node, 439 list_add(&persistent_gnt->remove_node,
428 &ring->persistent_purge_list); 440 &ring->persistent_purge_list);
429 if (--num_clean == 0) 441 total++;
430 goto finished;
431 } 442 }
432 /* 443 /*
433 * If we get here it means we also need to start cleaning 444 * Check whether we also need to start cleaning
434 * grants that were used since last purge in order to cope 445 * grants that were used since last purge in order to cope
435 * with the requested num 446 * with the requested num
436 */ 447 */
437 if (!scan_used && !clean_used) { 448 if (!scan_used && total < num_clean) {
438 pr_debug("Still missing %u purged frames\n", num_clean); 449 pr_debug("Still missing %u purged frames\n", num_clean - total);
439 scan_used = true; 450 scan_used = true;
440 goto purge_list; 451 goto purge_list;
441 } 452 }
442finished:
443 if (!clean_used) {
444 pr_debug("Finished scanning for grants to clean, removing used flag\n");
445 clean_used = true;
446 goto purge_list;
447 }
448 453
449 ring->persistent_gnt_c -= (total - num_clean); 454 if (total) {
450 ring->blkif->vbd.overflow_max_grants = 0; 455 ring->persistent_gnt_c -= total;
456 ring->blkif->vbd.overflow_max_grants = 0;
451 457
452 /* We can defer this work */ 458 /* We can defer this work */
453 schedule_work(&ring->persistent_purge_work); 459 schedule_work(&ring->persistent_purge_work);
454 pr_debug("Purged %u/%u\n", (total - num_clean), total); 460 pr_debug("Purged %u/%u\n", num_clean, total);
461 }
455 462
456out: 463out:
457 return; 464 return;
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index ecb35fe8ca8d..1d3002d773f7 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -233,16 +233,6 @@ struct xen_vbd {
233 233
234struct backend_info; 234struct backend_info;
235 235
236/* Number of available flags */
237#define PERSISTENT_GNT_FLAGS_SIZE 2
238/* This persistent grant is currently in use */
239#define PERSISTENT_GNT_ACTIVE 0
240/*
241 * This persistent grant has been used, this flag is set when we remove the
242 * PERSISTENT_GNT_ACTIVE, to know that this grant has been used recently.
243 */
244#define PERSISTENT_GNT_WAS_ACTIVE 1
245
246/* Number of requests that we can fit in a ring */ 236/* Number of requests that we can fit in a ring */
247#define XEN_BLKIF_REQS_PER_PAGE 32 237#define XEN_BLKIF_REQS_PER_PAGE 32
248 238
@@ -250,7 +240,8 @@ struct persistent_gnt {
250 struct page *page; 240 struct page *page;
251 grant_ref_t gnt; 241 grant_ref_t gnt;
252 grant_handle_t handle; 242 grant_handle_t handle;
253 DECLARE_BITMAP(flags, PERSISTENT_GNT_FLAGS_SIZE); 243 unsigned long last_used;
244 bool active;
254 struct rb_node node; 245 struct rb_node node;
255 struct list_head remove_node; 246 struct list_head remove_node;
256}; 247};
@@ -278,7 +269,6 @@ struct xen_blkif_ring {
278 wait_queue_head_t pending_free_wq; 269 wait_queue_head_t pending_free_wq;
279 270
280 /* Tree to store persistent grants. */ 271 /* Tree to store persistent grants. */
281 spinlock_t pers_gnts_lock;
282 struct rb_root persistent_gnts; 272 struct rb_root persistent_gnts;
283 unsigned int persistent_gnt_c; 273 unsigned int persistent_gnt_c;
284 atomic_t persistent_gnt_in_use; 274 atomic_t persistent_gnt_in_use;
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 8986adab9bf5..a71d817e900d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -46,6 +46,7 @@
46#include <linux/scatterlist.h> 46#include <linux/scatterlist.h>
47#include <linux/bitmap.h> 47#include <linux/bitmap.h>
48#include <linux/list.h> 48#include <linux/list.h>
49#include <linux/workqueue.h>
49 50
50#include <xen/xen.h> 51#include <xen/xen.h>
51#include <xen/xenbus.h> 52#include <xen/xenbus.h>
@@ -121,6 +122,8 @@ static inline struct blkif_req *blkif_req(struct request *rq)
121 122
122static DEFINE_MUTEX(blkfront_mutex); 123static DEFINE_MUTEX(blkfront_mutex);
123static const struct block_device_operations xlvbd_block_fops; 124static const struct block_device_operations xlvbd_block_fops;
125static struct delayed_work blkfront_work;
126static LIST_HEAD(info_list);
124 127
125/* 128/*
126 * Maximum number of segments in indirect requests, the actual value used by 129 * Maximum number of segments in indirect requests, the actual value used by
@@ -216,6 +219,7 @@ struct blkfront_info
216 /* Save uncomplete reqs and bios for migration. */ 219 /* Save uncomplete reqs and bios for migration. */
217 struct list_head requests; 220 struct list_head requests;
218 struct bio_list bio_list; 221 struct bio_list bio_list;
222 struct list_head info_list;
219}; 223};
220 224
221static unsigned int nr_minors; 225static unsigned int nr_minors;
@@ -1759,6 +1763,12 @@ abort_transaction:
1759 return err; 1763 return err;
1760} 1764}
1761 1765
1766static void free_info(struct blkfront_info *info)
1767{
1768 list_del(&info->info_list);
1769 kfree(info);
1770}
1771
1762/* Common code used when first setting up, and when resuming. */ 1772/* Common code used when first setting up, and when resuming. */
1763static int talk_to_blkback(struct xenbus_device *dev, 1773static int talk_to_blkback(struct xenbus_device *dev,
1764 struct blkfront_info *info) 1774 struct blkfront_info *info)
@@ -1880,7 +1890,10 @@ again:
1880 destroy_blkring: 1890 destroy_blkring:
1881 blkif_free(info, 0); 1891 blkif_free(info, 0);
1882 1892
1883 kfree(info); 1893 mutex_lock(&blkfront_mutex);
1894 free_info(info);
1895 mutex_unlock(&blkfront_mutex);
1896
1884 dev_set_drvdata(&dev->dev, NULL); 1897 dev_set_drvdata(&dev->dev, NULL);
1885 1898
1886 return err; 1899 return err;
@@ -1991,6 +2004,10 @@ static int blkfront_probe(struct xenbus_device *dev,
1991 info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0); 2004 info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0);
1992 dev_set_drvdata(&dev->dev, info); 2005 dev_set_drvdata(&dev->dev, info);
1993 2006
2007 mutex_lock(&blkfront_mutex);
2008 list_add(&info->info_list, &info_list);
2009 mutex_unlock(&blkfront_mutex);
2010
1994 return 0; 2011 return 0;
1995} 2012}
1996 2013
@@ -2301,6 +2318,12 @@ static void blkfront_gather_backend_features(struct blkfront_info *info)
2301 if (indirect_segments <= BLKIF_MAX_SEGMENTS_PER_REQUEST) 2318 if (indirect_segments <= BLKIF_MAX_SEGMENTS_PER_REQUEST)
2302 indirect_segments = 0; 2319 indirect_segments = 0;
2303 info->max_indirect_segments = indirect_segments; 2320 info->max_indirect_segments = indirect_segments;
2321
2322 if (info->feature_persistent) {
2323 mutex_lock(&blkfront_mutex);
2324 schedule_delayed_work(&blkfront_work, HZ * 10);
2325 mutex_unlock(&blkfront_mutex);
2326 }
2304} 2327}
2305 2328
2306/* 2329/*
@@ -2482,7 +2505,9 @@ static int blkfront_remove(struct xenbus_device *xbdev)
2482 mutex_unlock(&info->mutex); 2505 mutex_unlock(&info->mutex);
2483 2506
2484 if (!bdev) { 2507 if (!bdev) {
2485 kfree(info); 2508 mutex_lock(&blkfront_mutex);
2509 free_info(info);
2510 mutex_unlock(&blkfront_mutex);
2486 return 0; 2511 return 0;
2487 } 2512 }
2488 2513
@@ -2502,7 +2527,9 @@ static int blkfront_remove(struct xenbus_device *xbdev)
2502 if (info && !bdev->bd_openers) { 2527 if (info && !bdev->bd_openers) {
2503 xlvbd_release_gendisk(info); 2528 xlvbd_release_gendisk(info);
2504 disk->private_data = NULL; 2529 disk->private_data = NULL;
2505 kfree(info); 2530 mutex_lock(&blkfront_mutex);
2531 free_info(info);
2532 mutex_unlock(&blkfront_mutex);
2506 } 2533 }
2507 2534
2508 mutex_unlock(&bdev->bd_mutex); 2535 mutex_unlock(&bdev->bd_mutex);
@@ -2585,7 +2612,7 @@ static void blkif_release(struct gendisk *disk, fmode_t mode)
2585 dev_info(disk_to_dev(bdev->bd_disk), "releasing disk\n"); 2612 dev_info(disk_to_dev(bdev->bd_disk), "releasing disk\n");
2586 xlvbd_release_gendisk(info); 2613 xlvbd_release_gendisk(info);
2587 disk->private_data = NULL; 2614 disk->private_data = NULL;
2588 kfree(info); 2615 free_info(info);
2589 } 2616 }
2590 2617
2591out: 2618out:
@@ -2618,6 +2645,61 @@ static struct xenbus_driver blkfront_driver = {
2618 .is_ready = blkfront_is_ready, 2645 .is_ready = blkfront_is_ready,
2619}; 2646};
2620 2647
2648static void purge_persistent_grants(struct blkfront_info *info)
2649{
2650 unsigned int i;
2651 unsigned long flags;
2652
2653 for (i = 0; i < info->nr_rings; i++) {
2654 struct blkfront_ring_info *rinfo = &info->rinfo[i];
2655 struct grant *gnt_list_entry, *tmp;
2656
2657 spin_lock_irqsave(&rinfo->ring_lock, flags);
2658
2659 if (rinfo->persistent_gnts_c == 0) {
2660 spin_unlock_irqrestore(&rinfo->ring_lock, flags);
2661 continue;
2662 }
2663
2664 list_for_each_entry_safe(gnt_list_entry, tmp, &rinfo->grants,
2665 node) {
2666 if (gnt_list_entry->gref == GRANT_INVALID_REF ||
2667 gnttab_query_foreign_access(gnt_list_entry->gref))
2668 continue;
2669
2670 list_del(&gnt_list_entry->node);
2671 gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
2672 rinfo->persistent_gnts_c--;
2673 __free_page(gnt_list_entry->page);
2674 kfree(gnt_list_entry);
2675 }
2676
2677 spin_unlock_irqrestore(&rinfo->ring_lock, flags);
2678 }
2679}
2680
2681static void blkfront_delay_work(struct work_struct *work)
2682{
2683 struct blkfront_info *info;
2684 bool need_schedule_work = false;
2685
2686 mutex_lock(&blkfront_mutex);
2687
2688 list_for_each_entry(info, &info_list, info_list) {
2689 if (info->feature_persistent) {
2690 need_schedule_work = true;
2691 mutex_lock(&info->mutex);
2692 purge_persistent_grants(info);
2693 mutex_unlock(&info->mutex);
2694 }
2695 }
2696
2697 if (need_schedule_work)
2698 schedule_delayed_work(&blkfront_work, HZ * 10);
2699
2700 mutex_unlock(&blkfront_mutex);
2701}
2702
2621static int __init xlblk_init(void) 2703static int __init xlblk_init(void)
2622{ 2704{
2623 int ret; 2705 int ret;
@@ -2626,6 +2708,15 @@ static int __init xlblk_init(void)
2626 if (!xen_domain()) 2708 if (!xen_domain())
2627 return -ENODEV; 2709 return -ENODEV;
2628 2710
2711 if (!xen_has_pv_disk_devices())
2712 return -ENODEV;
2713
2714 if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
2715 pr_warn("xen_blk: can't get major %d with name %s\n",
2716 XENVBD_MAJOR, DEV_NAME);
2717 return -ENODEV;
2718 }
2719
2629 if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST) 2720 if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST)
2630 xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST; 2721 xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST;
2631 2722
@@ -2641,14 +2732,7 @@ static int __init xlblk_init(void)
2641 xen_blkif_max_queues = nr_cpus; 2732 xen_blkif_max_queues = nr_cpus;
2642 } 2733 }
2643 2734
2644 if (!xen_has_pv_disk_devices()) 2735 INIT_DELAYED_WORK(&blkfront_work, blkfront_delay_work);
2645 return -ENODEV;
2646
2647 if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
2648 printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n",
2649 XENVBD_MAJOR, DEV_NAME);
2650 return -ENODEV;
2651 }
2652 2736
2653 ret = xenbus_register_frontend(&blkfront_driver); 2737 ret = xenbus_register_frontend(&blkfront_driver);
2654 if (ret) { 2738 if (ret) {
@@ -2663,6 +2747,8 @@ module_init(xlblk_init);
2663 2747
2664static void __exit xlblk_exit(void) 2748static void __exit xlblk_exit(void)
2665{ 2749{
2750 cancel_delayed_work_sync(&blkfront_work);
2751
2666 xenbus_unregister_driver(&blkfront_driver); 2752 xenbus_unregister_driver(&blkfront_driver);
2667 unregister_blkdev(XENVBD_MAJOR, DEV_NAME); 2753 unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
2668 kfree(minors); 2754 kfree(minors);
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 2df11cc08a46..845b0314ce3a 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -200,6 +200,7 @@ config BT_HCIUART_RTL
200 depends on BT_HCIUART 200 depends on BT_HCIUART
201 depends on BT_HCIUART_SERDEV 201 depends on BT_HCIUART_SERDEV
202 depends on GPIOLIB 202 depends on GPIOLIB
203 depends on ACPI
203 select BT_HCIUART_3WIRE 204 select BT_HCIUART_3WIRE
204 select BT_RTL 205 select BT_RTL
205 help 206 help
diff --git a/drivers/bluetooth/btmtkuart.c b/drivers/bluetooth/btmtkuart.c
index ed2a5c7cb77f..4593baff2bc9 100644
--- a/drivers/bluetooth/btmtkuart.c
+++ b/drivers/bluetooth/btmtkuart.c
@@ -144,8 +144,10 @@ static int mtk_setup_fw(struct hci_dev *hdev)
144 fw_size = fw->size; 144 fw_size = fw->size;
145 145
146 /* The size of patch header is 30 bytes, should be skip */ 146 /* The size of patch header is 30 bytes, should be skip */
147 if (fw_size < 30) 147 if (fw_size < 30) {
148 return -EINVAL; 148 err = -EINVAL;
149 goto free_fw;
150 }
149 151
150 fw_size -= 30; 152 fw_size -= 30;
151 fw_ptr += 30; 153 fw_ptr += 30;
@@ -172,8 +174,8 @@ static int mtk_setup_fw(struct hci_dev *hdev)
172 fw_ptr += dlen; 174 fw_ptr += dlen;
173 } 175 }
174 176
177free_fw:
175 release_firmware(fw); 178 release_firmware(fw);
176
177 return err; 179 return err;
178} 180}
179 181
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index c9bac9dc4637..e4fe954e63a9 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -498,32 +498,29 @@ static int sysc_check_registers(struct sysc *ddata)
498 498
499/** 499/**
500 * syc_ioremap - ioremap register space for the interconnect target module 500 * syc_ioremap - ioremap register space for the interconnect target module
501 * @ddata: deviec driver data 501 * @ddata: device driver data
502 * 502 *
503 * Note that the interconnect target module registers can be anywhere 503 * Note that the interconnect target module registers can be anywhere
504 * within the first child device address space. For example, SGX has 504 * within the interconnect target module range. For example, SGX has
505 * them at offset 0x1fc00 in the 32MB module address space. We just 505 * them at offset 0x1fc00 in the 32MB module address space. And cpsw
506 * what we need around the interconnect target module registers. 506 * has them at offset 0x1200 in the CPSW_WR child. Usually the
507 * the interconnect target module registers are at the beginning of
508 * the module range though.
507 */ 509 */
508static int sysc_ioremap(struct sysc *ddata) 510static int sysc_ioremap(struct sysc *ddata)
509{ 511{
510 u32 size = 0; 512 int size;
511
512 if (ddata->offsets[SYSC_SYSSTATUS] >= 0)
513 size = ddata->offsets[SYSC_SYSSTATUS];
514 else if (ddata->offsets[SYSC_SYSCONFIG] >= 0)
515 size = ddata->offsets[SYSC_SYSCONFIG];
516 else if (ddata->offsets[SYSC_REVISION] >= 0)
517 size = ddata->offsets[SYSC_REVISION];
518 else
519 return -EINVAL;
520 513
521 size &= 0xfff00; 514 size = max3(ddata->offsets[SYSC_REVISION],
522 size += SZ_256; 515 ddata->offsets[SYSC_SYSCONFIG],
516 ddata->offsets[SYSC_SYSSTATUS]);
517
518 if (size < 0 || (size + sizeof(u32)) > ddata->module_size)
519 return -EINVAL;
523 520
524 ddata->module_va = devm_ioremap(ddata->dev, 521 ddata->module_va = devm_ioremap(ddata->dev,
525 ddata->module_pa, 522 ddata->module_pa,
526 size); 523 size + sizeof(u32));
527 if (!ddata->module_va) 524 if (!ddata->module_va)
528 return -EIO; 525 return -EIO;
529 526
@@ -1224,10 +1221,10 @@ static int sysc_child_suspend_noirq(struct device *dev)
1224 if (!pm_runtime_status_suspended(dev)) { 1221 if (!pm_runtime_status_suspended(dev)) {
1225 error = pm_generic_runtime_suspend(dev); 1222 error = pm_generic_runtime_suspend(dev);
1226 if (error) { 1223 if (error) {
1227 dev_err(dev, "%s error at %i: %i\n", 1224 dev_warn(dev, "%s busy at %i: %i\n",
1228 __func__, __LINE__, error); 1225 __func__, __LINE__, error);
1229 1226
1230 return error; 1227 return 0;
1231 } 1228 }
1232 1229
1233 error = sysc_runtime_suspend(ddata->dev); 1230 error = sysc_runtime_suspend(ddata->dev);
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 113fc6edb2b0..a5d5a96479bf 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2546,7 +2546,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
2546 if (!CDROM_CAN(CDC_SELECT_DISC) || 2546 if (!CDROM_CAN(CDC_SELECT_DISC) ||
2547 (arg == CDSL_CURRENT || arg == CDSL_NONE)) 2547 (arg == CDSL_CURRENT || arg == CDSL_NONE))
2548 return cdi->ops->drive_status(cdi, CDSL_CURRENT); 2548 return cdi->ops->drive_status(cdi, CDSL_CURRENT);
2549 if (((int)arg >= cdi->capacity)) 2549 if (arg >= cdi->capacity)
2550 return -EINVAL; 2550 return -EINVAL;
2551 return cdrom_slot_status(cdi, arg); 2551 return cdrom_slot_status(cdi, arg);
2552} 2552}
diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c
index 740af90a9508..c5edf8f2fd19 100644
--- a/drivers/clk/clk-npcm7xx.c
+++ b/drivers/clk/clk-npcm7xx.c
@@ -558,8 +558,8 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
558 if (!clk_base) 558 if (!clk_base)
559 goto npcm7xx_init_error; 559 goto npcm7xx_init_error;
560 560
561 npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) * 561 npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws,
562 NPCM7XX_NUM_CLOCKS + sizeof(npcm7xx_clk_data), GFP_KERNEL); 562 NPCM7XX_NUM_CLOCKS), GFP_KERNEL);
563 if (!npcm7xx_clk_data) 563 if (!npcm7xx_clk_data)
564 goto npcm7xx_init_np_err; 564 goto npcm7xx_init_np_err;
565 565
diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c
index fb62f3938008..3a0996f2d556 100644
--- a/drivers/clk/x86/clk-st.c
+++ b/drivers/clk/x86/clk-st.c
@@ -46,7 +46,7 @@ static int st_clk_probe(struct platform_device *pdev)
46 clk_oscout1_parents, ARRAY_SIZE(clk_oscout1_parents), 46 clk_oscout1_parents, ARRAY_SIZE(clk_oscout1_parents),
47 0, st_data->base + CLKDRVSTR2, OSCOUT1CLK25MHZ, 3, 0, NULL); 47 0, st_data->base + CLKDRVSTR2, OSCOUT1CLK25MHZ, 3, 0, NULL);
48 48
49 clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_25M]->clk); 49 clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_48M]->clk);
50 50
51 hws[ST_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1", "oscout1_mux", 51 hws[ST_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1", "oscout1_mux",
52 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, 52 0, st_data->base + MISCCLKCNTL1, OSCCLKENB,
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 110483f0e3fb..e26a40971b26 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -379,9 +379,20 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
379 if (idx == -1) 379 if (idx == -1)
380 idx = i; /* first enabled state */ 380 idx = i; /* first enabled state */
381 if (s->target_residency > data->predicted_us) { 381 if (s->target_residency > data->predicted_us) {
382 if (!tick_nohz_tick_stopped()) 382 if (data->predicted_us < TICK_USEC)
383 break; 383 break;
384 384
385 if (!tick_nohz_tick_stopped()) {
386 /*
387 * If the state selected so far is shallow,
388 * waking up early won't hurt, so retain the
389 * tick in that case and let the governor run
390 * again in the next iteration of the loop.
391 */
392 expected_interval = drv->states[idx].target_residency;
393 break;
394 }
395
385 /* 396 /*
386 * If the state selected so far is shallow and this 397 * If the state selected so far is shallow and this
387 * state's target residency matches the time till the 398 * state's target residency matches the time till the
diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c
index 6e61cc93c2b0..d7aa7d7ff102 100644
--- a/drivers/crypto/caam/caamalg_qi.c
+++ b/drivers/crypto/caam/caamalg_qi.c
@@ -679,10 +679,8 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher,
679 int ret = 0; 679 int ret = 0;
680 680
681 if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) { 681 if (keylen != 2 * AES_MIN_KEY_SIZE && keylen != 2 * AES_MAX_KEY_SIZE) {
682 crypto_ablkcipher_set_flags(ablkcipher,
683 CRYPTO_TFM_RES_BAD_KEY_LEN);
684 dev_err(jrdev, "key size mismatch\n"); 682 dev_err(jrdev, "key size mismatch\n");
685 return -EINVAL; 683 goto badkey;
686 } 684 }
687 685
688 ctx->cdata.keylen = keylen; 686 ctx->cdata.keylen = keylen;
@@ -715,7 +713,7 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher,
715 return ret; 713 return ret;
716badkey: 714badkey:
717 crypto_ablkcipher_set_flags(ablkcipher, CRYPTO_TFM_RES_BAD_KEY_LEN); 715 crypto_ablkcipher_set_flags(ablkcipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
718 return 0; 716 return -EINVAL;
719} 717}
720 718
721/* 719/*
diff --git a/drivers/crypto/caam/caampkc.c b/drivers/crypto/caam/caampkc.c
index 578ea63a3109..f26d62e5533a 100644
--- a/drivers/crypto/caam/caampkc.c
+++ b/drivers/crypto/caam/caampkc.c
@@ -71,8 +71,8 @@ static void rsa_priv_f2_unmap(struct device *dev, struct rsa_edesc *edesc,
71 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); 71 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE);
72 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); 72 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE);
73 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); 73 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE);
74 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE); 74 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
75 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_TO_DEVICE); 75 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL);
76} 76}
77 77
78static void rsa_priv_f3_unmap(struct device *dev, struct rsa_edesc *edesc, 78static void rsa_priv_f3_unmap(struct device *dev, struct rsa_edesc *edesc,
@@ -90,8 +90,8 @@ static void rsa_priv_f3_unmap(struct device *dev, struct rsa_edesc *edesc,
90 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE); 90 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE);
91 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE); 91 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE);
92 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); 92 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE);
93 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE); 93 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
94 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_TO_DEVICE); 94 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL);
95} 95}
96 96
97/* RSA Job Completion handler */ 97/* RSA Job Completion handler */
@@ -417,13 +417,13 @@ static int set_rsa_priv_f2_pdb(struct akcipher_request *req,
417 goto unmap_p; 417 goto unmap_p;
418 } 418 }
419 419
420 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_TO_DEVICE); 420 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL);
421 if (dma_mapping_error(dev, pdb->tmp1_dma)) { 421 if (dma_mapping_error(dev, pdb->tmp1_dma)) {
422 dev_err(dev, "Unable to map RSA tmp1 memory\n"); 422 dev_err(dev, "Unable to map RSA tmp1 memory\n");
423 goto unmap_q; 423 goto unmap_q;
424 } 424 }
425 425
426 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_TO_DEVICE); 426 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL);
427 if (dma_mapping_error(dev, pdb->tmp2_dma)) { 427 if (dma_mapping_error(dev, pdb->tmp2_dma)) {
428 dev_err(dev, "Unable to map RSA tmp2 memory\n"); 428 dev_err(dev, "Unable to map RSA tmp2 memory\n");
429 goto unmap_tmp1; 429 goto unmap_tmp1;
@@ -451,7 +451,7 @@ static int set_rsa_priv_f2_pdb(struct akcipher_request *req,
451 return 0; 451 return 0;
452 452
453unmap_tmp1: 453unmap_tmp1:
454 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE); 454 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
455unmap_q: 455unmap_q:
456 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); 456 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE);
457unmap_p: 457unmap_p:
@@ -504,13 +504,13 @@ static int set_rsa_priv_f3_pdb(struct akcipher_request *req,
504 goto unmap_dq; 504 goto unmap_dq;
505 } 505 }
506 506
507 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_TO_DEVICE); 507 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL);
508 if (dma_mapping_error(dev, pdb->tmp1_dma)) { 508 if (dma_mapping_error(dev, pdb->tmp1_dma)) {
509 dev_err(dev, "Unable to map RSA tmp1 memory\n"); 509 dev_err(dev, "Unable to map RSA tmp1 memory\n");
510 goto unmap_qinv; 510 goto unmap_qinv;
511 } 511 }
512 512
513 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_TO_DEVICE); 513 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL);
514 if (dma_mapping_error(dev, pdb->tmp2_dma)) { 514 if (dma_mapping_error(dev, pdb->tmp2_dma)) {
515 dev_err(dev, "Unable to map RSA tmp2 memory\n"); 515 dev_err(dev, "Unable to map RSA tmp2 memory\n");
516 goto unmap_tmp1; 516 goto unmap_tmp1;
@@ -538,7 +538,7 @@ static int set_rsa_priv_f3_pdb(struct akcipher_request *req,
538 return 0; 538 return 0;
539 539
540unmap_tmp1: 540unmap_tmp1:
541 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE); 541 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
542unmap_qinv: 542unmap_qinv:
543 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); 543 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE);
544unmap_dq: 544unmap_dq:
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index f4f258075b89..acdd72016ffe 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -190,7 +190,8 @@ static void caam_jr_dequeue(unsigned long devarg)
190 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0); 190 BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
191 191
192 /* Unmap just-run descriptor so we can post-process */ 192 /* Unmap just-run descriptor so we can post-process */
193 dma_unmap_single(dev, jrp->outring[hw_idx].desc, 193 dma_unmap_single(dev,
194 caam_dma_to_cpu(jrp->outring[hw_idx].desc),
194 jrp->entinfo[sw_idx].desc_size, 195 jrp->entinfo[sw_idx].desc_size,
195 DMA_TO_DEVICE); 196 DMA_TO_DEVICE);
196 197
diff --git a/drivers/crypto/cavium/nitrox/nitrox_dev.h b/drivers/crypto/cavium/nitrox/nitrox_dev.h
index 9a476bb6d4c7..af596455b420 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_dev.h
+++ b/drivers/crypto/cavium/nitrox/nitrox_dev.h
@@ -35,6 +35,7 @@ struct nitrox_cmdq {
35 /* requests in backlog queues */ 35 /* requests in backlog queues */
36 atomic_t backlog_count; 36 atomic_t backlog_count;
37 37
38 int write_idx;
38 /* command size 32B/64B */ 39 /* command size 32B/64B */
39 u8 instr_size; 40 u8 instr_size;
40 u8 qno; 41 u8 qno;
@@ -87,7 +88,7 @@ struct nitrox_bh {
87 struct bh_data *slc; 88 struct bh_data *slc;
88}; 89};
89 90
90/* NITROX-5 driver state */ 91/* NITROX-V driver state */
91#define NITROX_UCODE_LOADED 0 92#define NITROX_UCODE_LOADED 0
92#define NITROX_READY 1 93#define NITROX_READY 1
93 94
diff --git a/drivers/crypto/cavium/nitrox/nitrox_lib.c b/drivers/crypto/cavium/nitrox/nitrox_lib.c
index ebe267379ac9..4d31df07777f 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_lib.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_lib.c
@@ -36,6 +36,7 @@ static int cmdq_common_init(struct nitrox_cmdq *cmdq)
36 cmdq->head = PTR_ALIGN(cmdq->head_unaligned, PKT_IN_ALIGN); 36 cmdq->head = PTR_ALIGN(cmdq->head_unaligned, PKT_IN_ALIGN);
37 cmdq->dma = PTR_ALIGN(cmdq->dma_unaligned, PKT_IN_ALIGN); 37 cmdq->dma = PTR_ALIGN(cmdq->dma_unaligned, PKT_IN_ALIGN);
38 cmdq->qsize = (qsize + PKT_IN_ALIGN); 38 cmdq->qsize = (qsize + PKT_IN_ALIGN);
39 cmdq->write_idx = 0;
39 40
40 spin_lock_init(&cmdq->response_lock); 41 spin_lock_init(&cmdq->response_lock);
41 spin_lock_init(&cmdq->cmdq_lock); 42 spin_lock_init(&cmdq->cmdq_lock);
diff --git a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
index deaefd532aaa..4a362fc22f62 100644
--- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
+++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
@@ -42,6 +42,16 @@
42 * Invalid flag options in AES-CCM IV. 42 * Invalid flag options in AES-CCM IV.
43 */ 43 */
44 44
45static inline int incr_index(int index, int count, int max)
46{
47 if ((index + count) >= max)
48 index = index + count - max;
49 else
50 index += count;
51
52 return index;
53}
54
45/** 55/**
46 * dma_free_sglist - unmap and free the sg lists. 56 * dma_free_sglist - unmap and free the sg lists.
47 * @ndev: N5 device 57 * @ndev: N5 device
@@ -426,30 +436,29 @@ static void post_se_instr(struct nitrox_softreq *sr,
426 struct nitrox_cmdq *cmdq) 436 struct nitrox_cmdq *cmdq)
427{ 437{
428 struct nitrox_device *ndev = sr->ndev; 438 struct nitrox_device *ndev = sr->ndev;
429 union nps_pkt_in_instr_baoff_dbell pkt_in_baoff_dbell; 439 int idx;
430 u64 offset;
431 u8 *ent; 440 u8 *ent;
432 441
433 spin_lock_bh(&cmdq->cmdq_lock); 442 spin_lock_bh(&cmdq->cmdq_lock);
434 443
435 /* get the next write offset */ 444 idx = cmdq->write_idx;
436 offset = NPS_PKT_IN_INSTR_BAOFF_DBELLX(cmdq->qno);
437 pkt_in_baoff_dbell.value = nitrox_read_csr(ndev, offset);
438 /* copy the instruction */ 445 /* copy the instruction */
439 ent = cmdq->head + pkt_in_baoff_dbell.s.aoff; 446 ent = cmdq->head + (idx * cmdq->instr_size);
440 memcpy(ent, &sr->instr, cmdq->instr_size); 447 memcpy(ent, &sr->instr, cmdq->instr_size);
441 /* flush the command queue updates */
442 dma_wmb();
443 448
444 sr->tstamp = jiffies;
445 atomic_set(&sr->status, REQ_POSTED); 449 atomic_set(&sr->status, REQ_POSTED);
446 response_list_add(sr, cmdq); 450 response_list_add(sr, cmdq);
451 sr->tstamp = jiffies;
452 /* flush the command queue updates */
453 dma_wmb();
447 454
448 /* Ring doorbell with count 1 */ 455 /* Ring doorbell with count 1 */
449 writeq(1, cmdq->dbell_csr_addr); 456 writeq(1, cmdq->dbell_csr_addr);
450 /* orders the doorbell rings */ 457 /* orders the doorbell rings */
451 mmiowb(); 458 mmiowb();
452 459
460 cmdq->write_idx = incr_index(idx, 1, ndev->qlen);
461
453 spin_unlock_bh(&cmdq->cmdq_lock); 462 spin_unlock_bh(&cmdq->cmdq_lock);
454} 463}
455 464
@@ -459,6 +468,9 @@ static int post_backlog_cmds(struct nitrox_cmdq *cmdq)
459 struct nitrox_softreq *sr, *tmp; 468 struct nitrox_softreq *sr, *tmp;
460 int ret = 0; 469 int ret = 0;
461 470
471 if (!atomic_read(&cmdq->backlog_count))
472 return 0;
473
462 spin_lock_bh(&cmdq->backlog_lock); 474 spin_lock_bh(&cmdq->backlog_lock);
463 475
464 list_for_each_entry_safe(sr, tmp, &cmdq->backlog_head, backlog) { 476 list_for_each_entry_safe(sr, tmp, &cmdq->backlog_head, backlog) {
@@ -466,7 +478,7 @@ static int post_backlog_cmds(struct nitrox_cmdq *cmdq)
466 478
467 /* submit until space available */ 479 /* submit until space available */
468 if (unlikely(cmdq_full(cmdq, ndev->qlen))) { 480 if (unlikely(cmdq_full(cmdq, ndev->qlen))) {
469 ret = -EBUSY; 481 ret = -ENOSPC;
470 break; 482 break;
471 } 483 }
472 /* delete from backlog list */ 484 /* delete from backlog list */
@@ -491,23 +503,20 @@ static int nitrox_enqueue_request(struct nitrox_softreq *sr)
491{ 503{
492 struct nitrox_cmdq *cmdq = sr->cmdq; 504 struct nitrox_cmdq *cmdq = sr->cmdq;
493 struct nitrox_device *ndev = sr->ndev; 505 struct nitrox_device *ndev = sr->ndev;
494 int ret = -EBUSY; 506
507 /* try to post backlog requests */
508 post_backlog_cmds(cmdq);
495 509
496 if (unlikely(cmdq_full(cmdq, ndev->qlen))) { 510 if (unlikely(cmdq_full(cmdq, ndev->qlen))) {
497 if (!(sr->flags & CRYPTO_TFM_REQ_MAY_BACKLOG)) 511 if (!(sr->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
498 return -EAGAIN; 512 return -ENOSPC;
499 513 /* add to backlog list */
500 backlog_list_add(sr, cmdq); 514 backlog_list_add(sr, cmdq);
501 } else { 515 return -EBUSY;
502 ret = post_backlog_cmds(cmdq);
503 if (ret) {
504 backlog_list_add(sr, cmdq);
505 return ret;
506 }
507 post_se_instr(sr, cmdq);
508 ret = -EINPROGRESS;
509 } 516 }
510 return ret; 517 post_se_instr(sr, cmdq);
518
519 return -EINPROGRESS;
511} 520}
512 521
513/** 522/**
@@ -624,11 +633,9 @@ int nitrox_process_se_request(struct nitrox_device *ndev,
624 */ 633 */
625 sr->instr.fdata[0] = *((u64 *)&req->gph); 634 sr->instr.fdata[0] = *((u64 *)&req->gph);
626 sr->instr.fdata[1] = 0; 635 sr->instr.fdata[1] = 0;
627 /* flush the soft_req changes before posting the cmd */
628 wmb();
629 636
630 ret = nitrox_enqueue_request(sr); 637 ret = nitrox_enqueue_request(sr);
631 if (ret == -EAGAIN) 638 if (ret == -ENOSPC)
632 goto send_fail; 639 goto send_fail;
633 640
634 return ret; 641 return ret;
diff --git a/drivers/crypto/chelsio/chtls/chtls.h b/drivers/crypto/chelsio/chtls/chtls.h
index a53a0e6ba024..7725b6ee14ef 100644
--- a/drivers/crypto/chelsio/chtls/chtls.h
+++ b/drivers/crypto/chelsio/chtls/chtls.h
@@ -96,6 +96,10 @@ enum csk_flags {
96 CSK_CONN_INLINE, /* Connection on HW */ 96 CSK_CONN_INLINE, /* Connection on HW */
97}; 97};
98 98
99enum chtls_cdev_state {
100 CHTLS_CDEV_STATE_UP = 1
101};
102
99struct listen_ctx { 103struct listen_ctx {
100 struct sock *lsk; 104 struct sock *lsk;
101 struct chtls_dev *cdev; 105 struct chtls_dev *cdev;
@@ -146,6 +150,7 @@ struct chtls_dev {
146 unsigned int send_page_order; 150 unsigned int send_page_order;
147 int max_host_sndbuf; 151 int max_host_sndbuf;
148 struct key_map kmap; 152 struct key_map kmap;
153 unsigned int cdev_state;
149}; 154};
150 155
151struct chtls_hws { 156struct chtls_hws {
diff --git a/drivers/crypto/chelsio/chtls/chtls_main.c b/drivers/crypto/chelsio/chtls/chtls_main.c
index 9b07f9165658..f59b044ebd25 100644
--- a/drivers/crypto/chelsio/chtls/chtls_main.c
+++ b/drivers/crypto/chelsio/chtls/chtls_main.c
@@ -160,6 +160,7 @@ static void chtls_register_dev(struct chtls_dev *cdev)
160 tlsdev->hash = chtls_create_hash; 160 tlsdev->hash = chtls_create_hash;
161 tlsdev->unhash = chtls_destroy_hash; 161 tlsdev->unhash = chtls_destroy_hash;
162 tls_register_device(&cdev->tlsdev); 162 tls_register_device(&cdev->tlsdev);
163 cdev->cdev_state = CHTLS_CDEV_STATE_UP;
163} 164}
164 165
165static void chtls_unregister_dev(struct chtls_dev *cdev) 166static void chtls_unregister_dev(struct chtls_dev *cdev)
@@ -281,8 +282,10 @@ static void chtls_free_all_uld(void)
281 struct chtls_dev *cdev, *tmp; 282 struct chtls_dev *cdev, *tmp;
282 283
283 mutex_lock(&cdev_mutex); 284 mutex_lock(&cdev_mutex);
284 list_for_each_entry_safe(cdev, tmp, &cdev_list, list) 285 list_for_each_entry_safe(cdev, tmp, &cdev_list, list) {
285 chtls_free_uld(cdev); 286 if (cdev->cdev_state == CHTLS_CDEV_STATE_UP)
287 chtls_free_uld(cdev);
288 }
286 mutex_unlock(&cdev_mutex); 289 mutex_unlock(&cdev_mutex);
287} 290}
288 291
diff --git a/drivers/crypto/vmx/aes_cbc.c b/drivers/crypto/vmx/aes_cbc.c
index 5285ece4f33a..b71895871be3 100644
--- a/drivers/crypto/vmx/aes_cbc.c
+++ b/drivers/crypto/vmx/aes_cbc.c
@@ -107,24 +107,23 @@ static int p8_aes_cbc_encrypt(struct blkcipher_desc *desc,
107 ret = crypto_skcipher_encrypt(req); 107 ret = crypto_skcipher_encrypt(req);
108 skcipher_request_zero(req); 108 skcipher_request_zero(req);
109 } else { 109 } else {
110 preempt_disable();
111 pagefault_disable();
112 enable_kernel_vsx();
113
114 blkcipher_walk_init(&walk, dst, src, nbytes); 110 blkcipher_walk_init(&walk, dst, src, nbytes);
115 ret = blkcipher_walk_virt(desc, &walk); 111 ret = blkcipher_walk_virt(desc, &walk);
116 while ((nbytes = walk.nbytes)) { 112 while ((nbytes = walk.nbytes)) {
113 preempt_disable();
114 pagefault_disable();
115 enable_kernel_vsx();
117 aes_p8_cbc_encrypt(walk.src.virt.addr, 116 aes_p8_cbc_encrypt(walk.src.virt.addr,
118 walk.dst.virt.addr, 117 walk.dst.virt.addr,
119 nbytes & AES_BLOCK_MASK, 118 nbytes & AES_BLOCK_MASK,
120 &ctx->enc_key, walk.iv, 1); 119 &ctx->enc_key, walk.iv, 1);
120 disable_kernel_vsx();
121 pagefault_enable();
122 preempt_enable();
123
121 nbytes &= AES_BLOCK_SIZE - 1; 124 nbytes &= AES_BLOCK_SIZE - 1;
122 ret = blkcipher_walk_done(desc, &walk, nbytes); 125 ret = blkcipher_walk_done(desc, &walk, nbytes);
123 } 126 }
124
125 disable_kernel_vsx();
126 pagefault_enable();
127 preempt_enable();
128 } 127 }
129 128
130 return ret; 129 return ret;
@@ -147,24 +146,23 @@ static int p8_aes_cbc_decrypt(struct blkcipher_desc *desc,
147 ret = crypto_skcipher_decrypt(req); 146 ret = crypto_skcipher_decrypt(req);
148 skcipher_request_zero(req); 147 skcipher_request_zero(req);
149 } else { 148 } else {
150 preempt_disable();
151 pagefault_disable();
152 enable_kernel_vsx();
153
154 blkcipher_walk_init(&walk, dst, src, nbytes); 149 blkcipher_walk_init(&walk, dst, src, nbytes);
155 ret = blkcipher_walk_virt(desc, &walk); 150 ret = blkcipher_walk_virt(desc, &walk);
156 while ((nbytes = walk.nbytes)) { 151 while ((nbytes = walk.nbytes)) {
152 preempt_disable();
153 pagefault_disable();
154 enable_kernel_vsx();
157 aes_p8_cbc_encrypt(walk.src.virt.addr, 155 aes_p8_cbc_encrypt(walk.src.virt.addr,
158 walk.dst.virt.addr, 156 walk.dst.virt.addr,
159 nbytes & AES_BLOCK_MASK, 157 nbytes & AES_BLOCK_MASK,
160 &ctx->dec_key, walk.iv, 0); 158 &ctx->dec_key, walk.iv, 0);
159 disable_kernel_vsx();
160 pagefault_enable();
161 preempt_enable();
162
161 nbytes &= AES_BLOCK_SIZE - 1; 163 nbytes &= AES_BLOCK_SIZE - 1;
162 ret = blkcipher_walk_done(desc, &walk, nbytes); 164 ret = blkcipher_walk_done(desc, &walk, nbytes);
163 } 165 }
164
165 disable_kernel_vsx();
166 pagefault_enable();
167 preempt_enable();
168 } 166 }
169 167
170 return ret; 168 return ret;
diff --git a/drivers/crypto/vmx/aes_xts.c b/drivers/crypto/vmx/aes_xts.c
index 8bd9aff0f55f..e9954a7d4694 100644
--- a/drivers/crypto/vmx/aes_xts.c
+++ b/drivers/crypto/vmx/aes_xts.c
@@ -116,32 +116,39 @@ static int p8_aes_xts_crypt(struct blkcipher_desc *desc,
116 ret = enc? crypto_skcipher_encrypt(req) : crypto_skcipher_decrypt(req); 116 ret = enc? crypto_skcipher_encrypt(req) : crypto_skcipher_decrypt(req);
117 skcipher_request_zero(req); 117 skcipher_request_zero(req);
118 } else { 118 } else {
119 blkcipher_walk_init(&walk, dst, src, nbytes);
120
121 ret = blkcipher_walk_virt(desc, &walk);
122
119 preempt_disable(); 123 preempt_disable();
120 pagefault_disable(); 124 pagefault_disable();
121 enable_kernel_vsx(); 125 enable_kernel_vsx();
122 126
123 blkcipher_walk_init(&walk, dst, src, nbytes);
124
125 ret = blkcipher_walk_virt(desc, &walk);
126 iv = walk.iv; 127 iv = walk.iv;
127 memset(tweak, 0, AES_BLOCK_SIZE); 128 memset(tweak, 0, AES_BLOCK_SIZE);
128 aes_p8_encrypt(iv, tweak, &ctx->tweak_key); 129 aes_p8_encrypt(iv, tweak, &ctx->tweak_key);
129 130
131 disable_kernel_vsx();
132 pagefault_enable();
133 preempt_enable();
134
130 while ((nbytes = walk.nbytes)) { 135 while ((nbytes = walk.nbytes)) {
136 preempt_disable();
137 pagefault_disable();
138 enable_kernel_vsx();
131 if (enc) 139 if (enc)
132 aes_p8_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr, 140 aes_p8_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
133 nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak); 141 nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak);
134 else 142 else
135 aes_p8_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr, 143 aes_p8_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr,
136 nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak); 144 nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak);
145 disable_kernel_vsx();
146 pagefault_enable();
147 preempt_enable();
137 148
138 nbytes &= AES_BLOCK_SIZE - 1; 149 nbytes &= AES_BLOCK_SIZE - 1;
139 ret = blkcipher_walk_done(desc, &walk, nbytes); 150 ret = blkcipher_walk_done(desc, &walk, nbytes);
140 } 151 }
141
142 disable_kernel_vsx();
143 pagefault_enable();
144 preempt_enable();
145 } 152 }
146 return ret; 153 return ret;
147} 154}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 502b94fb116a..b6e9df11115d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1012,13 +1012,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
1012 if (r) 1012 if (r)
1013 return r; 1013 return r;
1014 1014
1015 if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE) { 1015 if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE)
1016 parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT; 1016 parser->job->preamble_status |=
1017 if (!parser->ctx->preamble_presented) { 1017 AMDGPU_PREAMBLE_IB_PRESENT;
1018 parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
1019 parser->ctx->preamble_presented = true;
1020 }
1021 }
1022 1018
1023 if (parser->ring && parser->ring != ring) 1019 if (parser->ring && parser->ring != ring)
1024 return -EINVAL; 1020 return -EINVAL;
@@ -1207,26 +1203,24 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1207 1203
1208 int r; 1204 int r;
1209 1205
1206 job = p->job;
1207 p->job = NULL;
1208
1209 r = drm_sched_job_init(&job->base, entity, p->filp);
1210 if (r)
1211 goto error_unlock;
1212
1213 /* No memory allocation is allowed while holding the mn lock */
1210 amdgpu_mn_lock(p->mn); 1214 amdgpu_mn_lock(p->mn);
1211 amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { 1215 amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
1212 struct amdgpu_bo *bo = e->robj; 1216 struct amdgpu_bo *bo = e->robj;
1213 1217
1214 if (amdgpu_ttm_tt_userptr_needs_pages(bo->tbo.ttm)) { 1218 if (amdgpu_ttm_tt_userptr_needs_pages(bo->tbo.ttm)) {
1215 amdgpu_mn_unlock(p->mn); 1219 r = -ERESTARTSYS;
1216 return -ERESTARTSYS; 1220 goto error_abort;
1217 } 1221 }
1218 } 1222 }
1219 1223
1220 job = p->job;
1221 p->job = NULL;
1222
1223 r = drm_sched_job_init(&job->base, entity, p->filp);
1224 if (r) {
1225 amdgpu_job_free(job);
1226 amdgpu_mn_unlock(p->mn);
1227 return r;
1228 }
1229
1230 job->owner = p->filp; 1224 job->owner = p->filp;
1231 p->fence = dma_fence_get(&job->base.s_fence->finished); 1225 p->fence = dma_fence_get(&job->base.s_fence->finished);
1232 1226
@@ -1241,6 +1235,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1241 1235
1242 amdgpu_cs_post_dependencies(p); 1236 amdgpu_cs_post_dependencies(p);
1243 1237
1238 if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) &&
1239 !p->ctx->preamble_presented) {
1240 job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
1241 p->ctx->preamble_presented = true;
1242 }
1243
1244 cs->out.handle = seq; 1244 cs->out.handle = seq;
1245 job->uf_sequence = seq; 1245 job->uf_sequence = seq;
1246 1246
@@ -1258,6 +1258,15 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
1258 amdgpu_mn_unlock(p->mn); 1258 amdgpu_mn_unlock(p->mn);
1259 1259
1260 return 0; 1260 return 0;
1261
1262error_abort:
1263 dma_fence_put(&job->base.s_fence->finished);
1264 job->base.s_fence = NULL;
1265
1266error_unlock:
1267 amdgpu_job_free(job);
1268 amdgpu_mn_unlock(p->mn);
1269 return r;
1261} 1270}
1262 1271
1263int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) 1272int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 5518e623fed2..51b5e977ca88 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -164,8 +164,10 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
164 return r; 164 return r;
165 } 165 }
166 166
167 need_ctx_switch = ring->current_ctx != fence_ctx;
167 if (ring->funcs->emit_pipeline_sync && job && 168 if (ring->funcs->emit_pipeline_sync && job &&
168 ((tmp = amdgpu_sync_get_fence(&job->sched_sync, NULL)) || 169 ((tmp = amdgpu_sync_get_fence(&job->sched_sync, NULL)) ||
170 (amdgpu_sriov_vf(adev) && need_ctx_switch) ||
169 amdgpu_vm_need_pipeline_sync(ring, job))) { 171 amdgpu_vm_need_pipeline_sync(ring, job))) {
170 need_pipe_sync = true; 172 need_pipe_sync = true;
171 dma_fence_put(tmp); 173 dma_fence_put(tmp);
@@ -196,7 +198,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
196 } 198 }
197 199
198 skip_preamble = ring->current_ctx == fence_ctx; 200 skip_preamble = ring->current_ctx == fence_ctx;
199 need_ctx_switch = ring->current_ctx != fence_ctx;
200 if (job && ring->funcs->emit_cntxcntl) { 201 if (job && ring->funcs->emit_cntxcntl) {
201 if (need_ctx_switch) 202 if (need_ctx_switch)
202 status |= AMDGPU_HAVE_CTX_SWITCH; 203 status |= AMDGPU_HAVE_CTX_SWITCH;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 8f98629fbe59..7b4e657a95c7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1932,14 +1932,6 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
1932 amdgpu_fence_wait_empty(ring); 1932 amdgpu_fence_wait_empty(ring);
1933 } 1933 }
1934 1934
1935 mutex_lock(&adev->pm.mutex);
1936 /* update battery/ac status */
1937 if (power_supply_is_system_supplied() > 0)
1938 adev->pm.ac_power = true;
1939 else
1940 adev->pm.ac_power = false;
1941 mutex_unlock(&adev->pm.mutex);
1942
1943 if (adev->powerplay.pp_funcs->dispatch_tasks) { 1935 if (adev->powerplay.pp_funcs->dispatch_tasks) {
1944 if (!amdgpu_device_has_dc_support(adev)) { 1936 if (!amdgpu_device_has_dc_support(adev)) {
1945 mutex_lock(&adev->pm.mutex); 1937 mutex_lock(&adev->pm.mutex);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index ece0ac703e27..b17771dd5ce7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -172,6 +172,7 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
172 * is validated on next vm use to avoid fault. 172 * is validated on next vm use to avoid fault.
173 * */ 173 * */
174 list_move_tail(&base->vm_status, &vm->evicted); 174 list_move_tail(&base->vm_status, &vm->evicted);
175 base->moved = true;
175} 176}
176 177
177/** 178/**
@@ -369,7 +370,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
369 uint64_t addr; 370 uint64_t addr;
370 int r; 371 int r;
371 372
372 addr = amdgpu_bo_gpu_offset(bo);
373 entries = amdgpu_bo_size(bo) / 8; 373 entries = amdgpu_bo_size(bo) / 8;
374 374
375 if (pte_support_ats) { 375 if (pte_support_ats) {
@@ -401,6 +401,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
401 if (r) 401 if (r)
402 goto error; 402 goto error;
403 403
404 addr = amdgpu_bo_gpu_offset(bo);
404 if (ats_entries) { 405 if (ats_entries) {
405 uint64_t ats_value; 406 uint64_t ats_value;
406 407
@@ -2483,28 +2484,52 @@ static uint32_t amdgpu_vm_get_block_size(uint64_t vm_size)
2483 * amdgpu_vm_adjust_size - adjust vm size, block size and fragment size 2484 * amdgpu_vm_adjust_size - adjust vm size, block size and fragment size
2484 * 2485 *
2485 * @adev: amdgpu_device pointer 2486 * @adev: amdgpu_device pointer
2486 * @vm_size: the default vm size if it's set auto 2487 * @min_vm_size: the minimum vm size in GB if it's set auto
2487 * @fragment_size_default: Default PTE fragment size 2488 * @fragment_size_default: Default PTE fragment size
2488 * @max_level: max VMPT level 2489 * @max_level: max VMPT level
2489 * @max_bits: max address space size in bits 2490 * @max_bits: max address space size in bits
2490 * 2491 *
2491 */ 2492 */
2492void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t vm_size, 2493void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
2493 uint32_t fragment_size_default, unsigned max_level, 2494 uint32_t fragment_size_default, unsigned max_level,
2494 unsigned max_bits) 2495 unsigned max_bits)
2495{ 2496{
2497 unsigned int max_size = 1 << (max_bits - 30);
2498 unsigned int vm_size;
2496 uint64_t tmp; 2499 uint64_t tmp;
2497 2500
2498 /* adjust vm size first */ 2501 /* adjust vm size first */
2499 if (amdgpu_vm_size != -1) { 2502 if (amdgpu_vm_size != -1) {
2500 unsigned max_size = 1 << (max_bits - 30);
2501
2502 vm_size = amdgpu_vm_size; 2503 vm_size = amdgpu_vm_size;
2503 if (vm_size > max_size) { 2504 if (vm_size > max_size) {
2504 dev_warn(adev->dev, "VM size (%d) too large, max is %u GB\n", 2505 dev_warn(adev->dev, "VM size (%d) too large, max is %u GB\n",
2505 amdgpu_vm_size, max_size); 2506 amdgpu_vm_size, max_size);
2506 vm_size = max_size; 2507 vm_size = max_size;
2507 } 2508 }
2509 } else {
2510 struct sysinfo si;
2511 unsigned int phys_ram_gb;
2512
2513 /* Optimal VM size depends on the amount of physical
2514 * RAM available. Underlying requirements and
2515 * assumptions:
2516 *
2517 * - Need to map system memory and VRAM from all GPUs
2518 * - VRAM from other GPUs not known here
2519 * - Assume VRAM <= system memory
2520 * - On GFX8 and older, VM space can be segmented for
2521 * different MTYPEs
2522 * - Need to allow room for fragmentation, guard pages etc.
2523 *
2524 * This adds up to a rough guess of system memory x3.
2525 * Round up to power of two to maximize the available
2526 * VM size with the given page table size.
2527 */
2528 si_meminfo(&si);
2529 phys_ram_gb = ((uint64_t)si.totalram * si.mem_unit +
2530 (1 << 30) - 1) >> 30;
2531 vm_size = roundup_pow_of_two(
2532 min(max(phys_ram_gb * 3, min_vm_size), max_size));
2508 } 2533 }
2509 2534
2510 adev->vm_manager.max_pfn = (uint64_t)vm_size << 18; 2535 adev->vm_manager.max_pfn = (uint64_t)vm_size << 18;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 67a15d439ac0..9fa9df0c5e7f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -321,7 +321,7 @@ struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm *vm,
321void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket); 321void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket);
322void amdgpu_vm_bo_rmv(struct amdgpu_device *adev, 322void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
323 struct amdgpu_bo_va *bo_va); 323 struct amdgpu_bo_va *bo_va);
324void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t vm_size, 324void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
325 uint32_t fragment_size_default, unsigned max_level, 325 uint32_t fragment_size_default, unsigned max_level,
326 unsigned max_bits); 326 unsigned max_bits);
327int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp); 327int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 5cd45210113f..5a9534a82d40 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -5664,6 +5664,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
5664 if (amdgpu_sriov_vf(adev)) 5664 if (amdgpu_sriov_vf(adev))
5665 return 0; 5665 return 0;
5666 5666
5667 if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
5668 AMD_PG_SUPPORT_RLC_SMU_HS |
5669 AMD_PG_SUPPORT_CP |
5670 AMD_PG_SUPPORT_GFX_DMG))
5671 adev->gfx.rlc.funcs->enter_safe_mode(adev);
5667 switch (adev->asic_type) { 5672 switch (adev->asic_type) {
5668 case CHIP_CARRIZO: 5673 case CHIP_CARRIZO:
5669 case CHIP_STONEY: 5674 case CHIP_STONEY:
@@ -5713,7 +5718,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
5713 default: 5718 default:
5714 break; 5719 break;
5715 } 5720 }
5716 5721 if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
5722 AMD_PG_SUPPORT_RLC_SMU_HS |
5723 AMD_PG_SUPPORT_CP |
5724 AMD_PG_SUPPORT_GFX_DMG))
5725 adev->gfx.rlc.funcs->exit_safe_mode(adev);
5717 return 0; 5726 return 0;
5718} 5727}
5719 5728
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 75317f283c69..ad151fefa41f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -632,12 +632,6 @@ static void gmc_v6_0_gart_disable(struct amdgpu_device *adev)
632 amdgpu_gart_table_vram_unpin(adev); 632 amdgpu_gart_table_vram_unpin(adev);
633} 633}
634 634
635static void gmc_v6_0_gart_fini(struct amdgpu_device *adev)
636{
637 amdgpu_gart_table_vram_free(adev);
638 amdgpu_gart_fini(adev);
639}
640
641static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev, 635static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev,
642 u32 status, u32 addr, u32 mc_client) 636 u32 status, u32 addr, u32 mc_client)
643{ 637{
@@ -935,8 +929,9 @@ static int gmc_v6_0_sw_fini(void *handle)
935 929
936 amdgpu_gem_force_release(adev); 930 amdgpu_gem_force_release(adev);
937 amdgpu_vm_manager_fini(adev); 931 amdgpu_vm_manager_fini(adev);
938 gmc_v6_0_gart_fini(adev); 932 amdgpu_gart_table_vram_free(adev);
939 amdgpu_bo_fini(adev); 933 amdgpu_bo_fini(adev);
934 amdgpu_gart_fini(adev);
940 release_firmware(adev->gmc.fw); 935 release_firmware(adev->gmc.fw);
941 adev->gmc.fw = NULL; 936 adev->gmc.fw = NULL;
942 937
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 36dc367c4b45..f8d8a3a73e42 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -747,19 +747,6 @@ static void gmc_v7_0_gart_disable(struct amdgpu_device *adev)
747} 747}
748 748
749/** 749/**
750 * gmc_v7_0_gart_fini - vm fini callback
751 *
752 * @adev: amdgpu_device pointer
753 *
754 * Tears down the driver GART/VM setup (CIK).
755 */
756static void gmc_v7_0_gart_fini(struct amdgpu_device *adev)
757{
758 amdgpu_gart_table_vram_free(adev);
759 amdgpu_gart_fini(adev);
760}
761
762/**
763 * gmc_v7_0_vm_decode_fault - print human readable fault info 750 * gmc_v7_0_vm_decode_fault - print human readable fault info
764 * 751 *
765 * @adev: amdgpu_device pointer 752 * @adev: amdgpu_device pointer
@@ -1095,8 +1082,9 @@ static int gmc_v7_0_sw_fini(void *handle)
1095 amdgpu_gem_force_release(adev); 1082 amdgpu_gem_force_release(adev);
1096 amdgpu_vm_manager_fini(adev); 1083 amdgpu_vm_manager_fini(adev);
1097 kfree(adev->gmc.vm_fault_info); 1084 kfree(adev->gmc.vm_fault_info);
1098 gmc_v7_0_gart_fini(adev); 1085 amdgpu_gart_table_vram_free(adev);
1099 amdgpu_bo_fini(adev); 1086 amdgpu_bo_fini(adev);
1087 amdgpu_gart_fini(adev);
1100 release_firmware(adev->gmc.fw); 1088 release_firmware(adev->gmc.fw);
1101 adev->gmc.fw = NULL; 1089 adev->gmc.fw = NULL;
1102 1090
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 70fc97b59b4f..9333109b210d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -969,19 +969,6 @@ static void gmc_v8_0_gart_disable(struct amdgpu_device *adev)
969} 969}
970 970
971/** 971/**
972 * gmc_v8_0_gart_fini - vm fini callback
973 *
974 * @adev: amdgpu_device pointer
975 *
976 * Tears down the driver GART/VM setup (CIK).
977 */
978static void gmc_v8_0_gart_fini(struct amdgpu_device *adev)
979{
980 amdgpu_gart_table_vram_free(adev);
981 amdgpu_gart_fini(adev);
982}
983
984/**
985 * gmc_v8_0_vm_decode_fault - print human readable fault info 972 * gmc_v8_0_vm_decode_fault - print human readable fault info
986 * 973 *
987 * @adev: amdgpu_device pointer 974 * @adev: amdgpu_device pointer
@@ -1199,8 +1186,9 @@ static int gmc_v8_0_sw_fini(void *handle)
1199 amdgpu_gem_force_release(adev); 1186 amdgpu_gem_force_release(adev);
1200 amdgpu_vm_manager_fini(adev); 1187 amdgpu_vm_manager_fini(adev);
1201 kfree(adev->gmc.vm_fault_info); 1188 kfree(adev->gmc.vm_fault_info);
1202 gmc_v8_0_gart_fini(adev); 1189 amdgpu_gart_table_vram_free(adev);
1203 amdgpu_bo_fini(adev); 1190 amdgpu_bo_fini(adev);
1191 amdgpu_gart_fini(adev);
1204 release_firmware(adev->gmc.fw); 1192 release_firmware(adev->gmc.fw);
1205 adev->gmc.fw = NULL; 1193 adev->gmc.fw = NULL;
1206 1194
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 399a5db27649..72f8018fa2a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -942,26 +942,12 @@ static int gmc_v9_0_sw_init(void *handle)
942 return 0; 942 return 0;
943} 943}
944 944
945/**
946 * gmc_v9_0_gart_fini - vm fini callback
947 *
948 * @adev: amdgpu_device pointer
949 *
950 * Tears down the driver GART/VM setup (CIK).
951 */
952static void gmc_v9_0_gart_fini(struct amdgpu_device *adev)
953{
954 amdgpu_gart_table_vram_free(adev);
955 amdgpu_gart_fini(adev);
956}
957
958static int gmc_v9_0_sw_fini(void *handle) 945static int gmc_v9_0_sw_fini(void *handle)
959{ 946{
960 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 947 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
961 948
962 amdgpu_gem_force_release(adev); 949 amdgpu_gem_force_release(adev);
963 amdgpu_vm_manager_fini(adev); 950 amdgpu_vm_manager_fini(adev);
964 gmc_v9_0_gart_fini(adev);
965 951
966 /* 952 /*
967 * TODO: 953 * TODO:
@@ -974,7 +960,9 @@ static int gmc_v9_0_sw_fini(void *handle)
974 */ 960 */
975 amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, NULL); 961 amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, NULL);
976 962
963 amdgpu_gart_table_vram_free(adev);
977 amdgpu_bo_fini(adev); 964 amdgpu_bo_fini(adev);
965 amdgpu_gart_fini(adev);
978 966
979 return 0; 967 return 0;
980} 968}
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
index 3f57f6463dc8..cb79a93c2eb7 100644
--- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
@@ -65,8 +65,6 @@ static int kv_set_thermal_temperature_range(struct amdgpu_device *adev,
65 int min_temp, int max_temp); 65 int min_temp, int max_temp);
66static int kv_init_fps_limits(struct amdgpu_device *adev); 66static int kv_init_fps_limits(struct amdgpu_device *adev);
67 67
68static void kv_dpm_powergate_uvd(void *handle, bool gate);
69static void kv_dpm_powergate_vce(struct amdgpu_device *adev, bool gate);
70static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate); 68static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate);
71static void kv_dpm_powergate_acp(struct amdgpu_device *adev, bool gate); 69static void kv_dpm_powergate_acp(struct amdgpu_device *adev, bool gate);
72 70
@@ -1354,8 +1352,6 @@ static int kv_dpm_enable(struct amdgpu_device *adev)
1354 return ret; 1352 return ret;
1355 } 1353 }
1356 1354
1357 kv_update_current_ps(adev, adev->pm.dpm.boot_ps);
1358
1359 if (adev->irq.installed && 1355 if (adev->irq.installed &&
1360 amdgpu_is_internal_thermal_sensor(adev->pm.int_thermal_type)) { 1356 amdgpu_is_internal_thermal_sensor(adev->pm.int_thermal_type)) {
1361 ret = kv_set_thermal_temperature_range(adev, KV_TEMP_RANGE_MIN, KV_TEMP_RANGE_MAX); 1357 ret = kv_set_thermal_temperature_range(adev, KV_TEMP_RANGE_MIN, KV_TEMP_RANGE_MAX);
@@ -1374,6 +1370,8 @@ static int kv_dpm_enable(struct amdgpu_device *adev)
1374 1370
1375static void kv_dpm_disable(struct amdgpu_device *adev) 1371static void kv_dpm_disable(struct amdgpu_device *adev)
1376{ 1372{
1373 struct kv_power_info *pi = kv_get_pi(adev);
1374
1377 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq, 1375 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
1378 AMDGPU_THERMAL_IRQ_LOW_TO_HIGH); 1376 AMDGPU_THERMAL_IRQ_LOW_TO_HIGH);
1379 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq, 1377 amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
@@ -1387,8 +1385,10 @@ static void kv_dpm_disable(struct amdgpu_device *adev)
1387 /* powerup blocks */ 1385 /* powerup blocks */
1388 kv_dpm_powergate_acp(adev, false); 1386 kv_dpm_powergate_acp(adev, false);
1389 kv_dpm_powergate_samu(adev, false); 1387 kv_dpm_powergate_samu(adev, false);
1390 kv_dpm_powergate_vce(adev, false); 1388 if (pi->caps_vce_pg) /* power on the VCE block */
1391 kv_dpm_powergate_uvd(adev, false); 1389 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
1390 if (pi->caps_uvd_pg) /* power on the UVD block */
1391 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_UVDPowerON);
1392 1392
1393 kv_enable_smc_cac(adev, false); 1393 kv_enable_smc_cac(adev, false);
1394 kv_enable_didt(adev, false); 1394 kv_enable_didt(adev, false);
@@ -1551,7 +1551,6 @@ static int kv_update_vce_dpm(struct amdgpu_device *adev,
1551 int ret; 1551 int ret;
1552 1552
1553 if (amdgpu_new_state->evclk > 0 && amdgpu_current_state->evclk == 0) { 1553 if (amdgpu_new_state->evclk > 0 && amdgpu_current_state->evclk == 0) {
1554 kv_dpm_powergate_vce(adev, false);
1555 if (pi->caps_stable_p_state) 1554 if (pi->caps_stable_p_state)
1556 pi->vce_boot_level = table->count - 1; 1555 pi->vce_boot_level = table->count - 1;
1557 else 1556 else
@@ -1573,7 +1572,6 @@ static int kv_update_vce_dpm(struct amdgpu_device *adev,
1573 kv_enable_vce_dpm(adev, true); 1572 kv_enable_vce_dpm(adev, true);
1574 } else if (amdgpu_new_state->evclk == 0 && amdgpu_current_state->evclk > 0) { 1573 } else if (amdgpu_new_state->evclk == 0 && amdgpu_current_state->evclk > 0) {
1575 kv_enable_vce_dpm(adev, false); 1574 kv_enable_vce_dpm(adev, false);
1576 kv_dpm_powergate_vce(adev, true);
1577 } 1575 }
1578 1576
1579 return 0; 1577 return 0;
@@ -1702,24 +1700,32 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
1702 } 1700 }
1703} 1701}
1704 1702
1705static void kv_dpm_powergate_vce(struct amdgpu_device *adev, bool gate) 1703static void kv_dpm_powergate_vce(void *handle, bool gate)
1706{ 1704{
1705 struct amdgpu_device *adev = (struct amdgpu_device *)handle;
1707 struct kv_power_info *pi = kv_get_pi(adev); 1706 struct kv_power_info *pi = kv_get_pi(adev);
1708 1707 int ret;
1709 if (pi->vce_power_gated == gate)
1710 return;
1711 1708
1712 pi->vce_power_gated = gate; 1709 pi->vce_power_gated = gate;
1713 1710
1714 if (!pi->caps_vce_pg) 1711 if (gate) {
1715 return; 1712 /* stop the VCE block */
1716 1713 ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
1717 if (gate) 1714 AMD_PG_STATE_GATE);
1718 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF); 1715 kv_enable_vce_dpm(adev, false);
1719 else 1716 if (pi->caps_vce_pg) /* power off the VCE block */
1720 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON); 1717 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF);
1718 } else {
1719 if (pi->caps_vce_pg) /* power on the VCE block */
1720 amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
1721 kv_enable_vce_dpm(adev, true);
1722 /* re-init the VCE block */
1723 ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
1724 AMD_PG_STATE_UNGATE);
1725 }
1721} 1726}
1722 1727
1728
1723static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate) 1729static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate)
1724{ 1730{
1725 struct kv_power_info *pi = kv_get_pi(adev); 1731 struct kv_power_info *pi = kv_get_pi(adev);
@@ -3061,7 +3067,7 @@ static int kv_dpm_hw_init(void *handle)
3061 else 3067 else
3062 adev->pm.dpm_enabled = true; 3068 adev->pm.dpm_enabled = true;
3063 mutex_unlock(&adev->pm.mutex); 3069 mutex_unlock(&adev->pm.mutex);
3064 3070 amdgpu_pm_compute_clocks(adev);
3065 return ret; 3071 return ret;
3066} 3072}
3067 3073
@@ -3313,6 +3319,9 @@ static int kv_set_powergating_by_smu(void *handle,
3313 case AMD_IP_BLOCK_TYPE_UVD: 3319 case AMD_IP_BLOCK_TYPE_UVD:
3314 kv_dpm_powergate_uvd(handle, gate); 3320 kv_dpm_powergate_uvd(handle, gate);
3315 break; 3321 break;
3322 case AMD_IP_BLOCK_TYPE_VCE:
3323 kv_dpm_powergate_vce(handle, gate);
3324 break;
3316 default: 3325 default:
3317 break; 3326 break;
3318 } 3327 }
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index db327b412562..1de96995e690 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -6887,7 +6887,6 @@ static int si_dpm_enable(struct amdgpu_device *adev)
6887 6887
6888 si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true); 6888 si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
6889 si_thermal_start_thermal_controller(adev); 6889 si_thermal_start_thermal_controller(adev);
6890 ni_update_current_ps(adev, boot_ps);
6891 6890
6892 return 0; 6891 return 0;
6893} 6892}
@@ -7763,7 +7762,7 @@ static int si_dpm_hw_init(void *handle)
7763 else 7762 else
7764 adev->pm.dpm_enabled = true; 7763 adev->pm.dpm_enabled = true;
7765 mutex_unlock(&adev->pm.mutex); 7764 mutex_unlock(&adev->pm.mutex);
7766 7765 amdgpu_pm_compute_clocks(adev);
7767 return ret; 7766 return ret;
7768} 7767}
7769 7768
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
index fbe878ae1e8c..4ba0003a9d32 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
@@ -480,12 +480,20 @@ void pp_rv_set_display_requirement(struct pp_smu *pp,
480{ 480{
481 struct dc_context *ctx = pp->ctx; 481 struct dc_context *ctx = pp->ctx;
482 struct amdgpu_device *adev = ctx->driver_context; 482 struct amdgpu_device *adev = ctx->driver_context;
483 void *pp_handle = adev->powerplay.pp_handle;
483 const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; 484 const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
485 struct pp_display_clock_request clock = {0};
484 486
485 if (!pp_funcs || !pp_funcs->display_configuration_changed) 487 if (!pp_funcs || !pp_funcs->display_clock_voltage_request)
486 return; 488 return;
487 489
488 amdgpu_dpm_display_configuration_changed(adev); 490 clock.clock_type = amd_pp_dcf_clock;
491 clock.clock_freq_in_khz = req->hard_min_dcefclk_khz;
492 pp_funcs->display_clock_voltage_request(pp_handle, &clock);
493
494 clock.clock_type = amd_pp_f_clock;
495 clock.clock_freq_in_khz = req->hard_min_fclk_khz;
496 pp_funcs->display_clock_voltage_request(pp_handle, &clock);
489} 497}
490 498
491void pp_rv_set_wm_ranges(struct pp_smu *pp, 499void pp_rv_set_wm_ranges(struct pp_smu *pp,
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 567867915d32..37eaf72ace54 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -754,8 +754,12 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
754 * fail-safe mode 754 * fail-safe mode
755 */ 755 */
756 if (dc_is_hdmi_signal(link->connector_signal) || 756 if (dc_is_hdmi_signal(link->connector_signal) ||
757 dc_is_dvi_signal(link->connector_signal)) 757 dc_is_dvi_signal(link->connector_signal)) {
758 if (prev_sink != NULL)
759 dc_sink_release(prev_sink);
760
758 return false; 761 return false;
762 }
759 default: 763 default:
760 break; 764 break;
761 } 765 }
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 11d834f94220..98358b4b36de 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -199,7 +199,6 @@ vma_create(struct drm_i915_gem_object *obj,
199 vma->flags |= I915_VMA_GGTT; 199 vma->flags |= I915_VMA_GGTT;
200 list_add(&vma->obj_link, &obj->vma_list); 200 list_add(&vma->obj_link, &obj->vma_list);
201 } else { 201 } else {
202 i915_ppgtt_get(i915_vm_to_ppgtt(vm));
203 list_add_tail(&vma->obj_link, &obj->vma_list); 202 list_add_tail(&vma->obj_link, &obj->vma_list);
204 } 203 }
205 204
@@ -807,9 +806,6 @@ static void __i915_vma_destroy(struct i915_vma *vma)
807 if (vma->obj) 806 if (vma->obj)
808 rb_erase(&vma->obj_node, &vma->obj->vma_tree); 807 rb_erase(&vma->obj_node, &vma->obj->vma_tree);
809 808
810 if (!i915_vma_is_ggtt(vma))
811 i915_ppgtt_put(i915_vm_to_ppgtt(vma->vm));
812
813 rbtree_postorder_for_each_entry_safe(iter, n, &vma->active, node) { 809 rbtree_postorder_for_each_entry_safe(iter, n, &vma->active, node) {
814 GEM_BUG_ON(i915_gem_active_isset(&iter->base)); 810 GEM_BUG_ON(i915_gem_active_isset(&iter->base));
815 kfree(iter); 811 kfree(iter);
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index b725835b47ef..769f3f586661 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -962,9 +962,6 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv)
962{ 962{
963 int ret; 963 int ret;
964 964
965 if (INTEL_INFO(dev_priv)->num_pipes == 0)
966 return;
967
968 ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops); 965 ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops);
969 if (ret < 0) { 966 if (ret < 0) {
970 DRM_ERROR("failed to add audio component (%d)\n", ret); 967 DRM_ERROR("failed to add audio component (%d)\n", ret);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ed3fa1c8a983..4a3c8ee9a973 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2988,6 +2988,7 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
2988 int w = drm_rect_width(&plane_state->base.src) >> 16; 2988 int w = drm_rect_width(&plane_state->base.src) >> 16;
2989 int h = drm_rect_height(&plane_state->base.src) >> 16; 2989 int h = drm_rect_height(&plane_state->base.src) >> 16;
2990 int dst_x = plane_state->base.dst.x1; 2990 int dst_x = plane_state->base.dst.x1;
2991 int dst_w = drm_rect_width(&plane_state->base.dst);
2991 int pipe_src_w = crtc_state->pipe_src_w; 2992 int pipe_src_w = crtc_state->pipe_src_w;
2992 int max_width = skl_max_plane_width(fb, 0, rotation); 2993 int max_width = skl_max_plane_width(fb, 0, rotation);
2993 int max_height = 4096; 2994 int max_height = 4096;
@@ -3009,10 +3010,10 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
3009 * screen may cause FIFO underflow and display corruption. 3010 * screen may cause FIFO underflow and display corruption.
3010 */ 3011 */
3011 if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && 3012 if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
3012 (dst_x + w < 4 || dst_x > pipe_src_w - 4)) { 3013 (dst_x + dst_w < 4 || dst_x > pipe_src_w - 4)) {
3013 DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n", 3014 DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n",
3014 dst_x + w < 4 ? "end" : "start", 3015 dst_x + dst_w < 4 ? "end" : "start",
3015 dst_x + w < 4 ? dst_x + w : dst_x, 3016 dst_x + dst_w < 4 ? dst_x + dst_w : dst_x,
3016 4, pipe_src_w - 4); 3017 4, pipe_src_w - 4);
3017 return -ERANGE; 3018 return -ERANGE;
3018 } 3019 }
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index a9076402dcb0..192972a7d287 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -943,8 +943,12 @@ static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port,
943 943
944 ret = i2c_transfer(adapter, &msg, 1); 944 ret = i2c_transfer(adapter, &msg, 1);
945 if (ret == 1) 945 if (ret == 1)
946 return 0; 946 ret = 0;
947 return ret >= 0 ? -EIO : ret; 947 else if (ret >= 0)
948 ret = -EIO;
949
950 kfree(write_buf);
951 return ret;
948} 952}
949 953
950static 954static
diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c
index 5dae16ccd9f1..3e085c5f2b81 100644
--- a/drivers/gpu/drm/i915/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/intel_lspcon.c
@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
74 DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n", 74 DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n",
75 lspcon_mode_name(mode)); 75 lspcon_mode_name(mode));
76 76
77 wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); 77 wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400);
78 if (current_mode != mode) 78 if (current_mode != mode)
79 DRM_ERROR("LSPCON mode hasn't settled\n"); 79 DRM_ERROR("LSPCON mode hasn't settled\n");
80 80
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index 978782a77629..28d191192945 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -132,6 +132,11 @@ static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w,
132 writel(0x0, comp->regs + DISP_REG_OVL_RST); 132 writel(0x0, comp->regs + DISP_REG_OVL_RST);
133} 133}
134 134
135static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
136{
137 return 4;
138}
139
135static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx) 140static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
136{ 141{
137 unsigned int reg; 142 unsigned int reg;
@@ -157,6 +162,11 @@ static void mtk_ovl_layer_off(struct mtk_ddp_comp *comp, unsigned int idx)
157 162
158static unsigned int ovl_fmt_convert(struct mtk_disp_ovl *ovl, unsigned int fmt) 163static unsigned int ovl_fmt_convert(struct mtk_disp_ovl *ovl, unsigned int fmt)
159{ 164{
165 /* The return value in switch "MEM_MODE_INPUT_FORMAT_XXX"
166 * is defined in mediatek HW data sheet.
167 * The alphabet order in XXX is no relation to data
168 * arrangement in memory.
169 */
160 switch (fmt) { 170 switch (fmt) {
161 default: 171 default:
162 case DRM_FORMAT_RGB565: 172 case DRM_FORMAT_RGB565:
@@ -221,6 +231,7 @@ static const struct mtk_ddp_comp_funcs mtk_disp_ovl_funcs = {
221 .stop = mtk_ovl_stop, 231 .stop = mtk_ovl_stop,
222 .enable_vblank = mtk_ovl_enable_vblank, 232 .enable_vblank = mtk_ovl_enable_vblank,
223 .disable_vblank = mtk_ovl_disable_vblank, 233 .disable_vblank = mtk_ovl_disable_vblank,
234 .layer_nr = mtk_ovl_layer_nr,
224 .layer_on = mtk_ovl_layer_on, 235 .layer_on = mtk_ovl_layer_on,
225 .layer_off = mtk_ovl_layer_off, 236 .layer_off = mtk_ovl_layer_off,
226 .layer_config = mtk_ovl_layer_config, 237 .layer_config = mtk_ovl_layer_config,
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
index 585943c81e1f..b0a5cffe345a 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
@@ -31,14 +31,31 @@
31#define RDMA_REG_UPDATE_INT BIT(0) 31#define RDMA_REG_UPDATE_INT BIT(0)
32#define DISP_REG_RDMA_GLOBAL_CON 0x0010 32#define DISP_REG_RDMA_GLOBAL_CON 0x0010
33#define RDMA_ENGINE_EN BIT(0) 33#define RDMA_ENGINE_EN BIT(0)
34#define RDMA_MODE_MEMORY BIT(1)
34#define DISP_REG_RDMA_SIZE_CON_0 0x0014 35#define DISP_REG_RDMA_SIZE_CON_0 0x0014
36#define RDMA_MATRIX_ENABLE BIT(17)
37#define RDMA_MATRIX_INT_MTX_SEL GENMASK(23, 20)
38#define RDMA_MATRIX_INT_MTX_BT601_to_RGB (6 << 20)
35#define DISP_REG_RDMA_SIZE_CON_1 0x0018 39#define DISP_REG_RDMA_SIZE_CON_1 0x0018
36#define DISP_REG_RDMA_TARGET_LINE 0x001c 40#define DISP_REG_RDMA_TARGET_LINE 0x001c
41#define DISP_RDMA_MEM_CON 0x0024
42#define MEM_MODE_INPUT_FORMAT_RGB565 (0x000 << 4)
43#define MEM_MODE_INPUT_FORMAT_RGB888 (0x001 << 4)
44#define MEM_MODE_INPUT_FORMAT_RGBA8888 (0x002 << 4)
45#define MEM_MODE_INPUT_FORMAT_ARGB8888 (0x003 << 4)
46#define MEM_MODE_INPUT_FORMAT_UYVY (0x004 << 4)
47#define MEM_MODE_INPUT_FORMAT_YUYV (0x005 << 4)
48#define MEM_MODE_INPUT_SWAP BIT(8)
49#define DISP_RDMA_MEM_SRC_PITCH 0x002c
50#define DISP_RDMA_MEM_GMC_SETTING_0 0x0030
37#define DISP_REG_RDMA_FIFO_CON 0x0040 51#define DISP_REG_RDMA_FIFO_CON 0x0040
38#define RDMA_FIFO_UNDERFLOW_EN BIT(31) 52#define RDMA_FIFO_UNDERFLOW_EN BIT(31)
39#define RDMA_FIFO_PSEUDO_SIZE(bytes) (((bytes) / 16) << 16) 53#define RDMA_FIFO_PSEUDO_SIZE(bytes) (((bytes) / 16) << 16)
40#define RDMA_OUTPUT_VALID_FIFO_THRESHOLD(bytes) ((bytes) / 16) 54#define RDMA_OUTPUT_VALID_FIFO_THRESHOLD(bytes) ((bytes) / 16)
41#define RDMA_FIFO_SIZE(rdma) ((rdma)->data->fifo_size) 55#define RDMA_FIFO_SIZE(rdma) ((rdma)->data->fifo_size)
56#define DISP_RDMA_MEM_START_ADDR 0x0f00
57
58#define RDMA_MEM_GMC 0x40402020
42 59
43struct mtk_disp_rdma_data { 60struct mtk_disp_rdma_data {
44 unsigned int fifo_size; 61 unsigned int fifo_size;
@@ -138,12 +155,87 @@ static void mtk_rdma_config(struct mtk_ddp_comp *comp, unsigned int width,
138 writel(reg, comp->regs + DISP_REG_RDMA_FIFO_CON); 155 writel(reg, comp->regs + DISP_REG_RDMA_FIFO_CON);
139} 156}
140 157
158static unsigned int rdma_fmt_convert(struct mtk_disp_rdma *rdma,
159 unsigned int fmt)
160{
161 /* The return value in switch "MEM_MODE_INPUT_FORMAT_XXX"
162 * is defined in mediatek HW data sheet.
163 * The alphabet order in XXX is no relation to data
164 * arrangement in memory.
165 */
166 switch (fmt) {
167 default:
168 case DRM_FORMAT_RGB565:
169 return MEM_MODE_INPUT_FORMAT_RGB565;
170 case DRM_FORMAT_BGR565:
171 return MEM_MODE_INPUT_FORMAT_RGB565 | MEM_MODE_INPUT_SWAP;
172 case DRM_FORMAT_RGB888:
173 return MEM_MODE_INPUT_FORMAT_RGB888;
174 case DRM_FORMAT_BGR888:
175 return MEM_MODE_INPUT_FORMAT_RGB888 | MEM_MODE_INPUT_SWAP;
176 case DRM_FORMAT_RGBX8888:
177 case DRM_FORMAT_RGBA8888:
178 return MEM_MODE_INPUT_FORMAT_ARGB8888;
179 case DRM_FORMAT_BGRX8888:
180 case DRM_FORMAT_BGRA8888:
181 return MEM_MODE_INPUT_FORMAT_ARGB8888 | MEM_MODE_INPUT_SWAP;
182 case DRM_FORMAT_XRGB8888:
183 case DRM_FORMAT_ARGB8888:
184 return MEM_MODE_INPUT_FORMAT_RGBA8888;
185 case DRM_FORMAT_XBGR8888:
186 case DRM_FORMAT_ABGR8888:
187 return MEM_MODE_INPUT_FORMAT_RGBA8888 | MEM_MODE_INPUT_SWAP;
188 case DRM_FORMAT_UYVY:
189 return MEM_MODE_INPUT_FORMAT_UYVY;
190 case DRM_FORMAT_YUYV:
191 return MEM_MODE_INPUT_FORMAT_YUYV;
192 }
193}
194
195static unsigned int mtk_rdma_layer_nr(struct mtk_ddp_comp *comp)
196{
197 return 1;
198}
199
200static void mtk_rdma_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
201 struct mtk_plane_state *state)
202{
203 struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
204 struct mtk_plane_pending_state *pending = &state->pending;
205 unsigned int addr = pending->addr;
206 unsigned int pitch = pending->pitch & 0xffff;
207 unsigned int fmt = pending->format;
208 unsigned int con;
209
210 con = rdma_fmt_convert(rdma, fmt);
211 writel_relaxed(con, comp->regs + DISP_RDMA_MEM_CON);
212
213 if (fmt == DRM_FORMAT_UYVY || fmt == DRM_FORMAT_YUYV) {
214 rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
215 RDMA_MATRIX_ENABLE, RDMA_MATRIX_ENABLE);
216 rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
217 RDMA_MATRIX_INT_MTX_SEL,
218 RDMA_MATRIX_INT_MTX_BT601_to_RGB);
219 } else {
220 rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
221 RDMA_MATRIX_ENABLE, 0);
222 }
223
224 writel_relaxed(addr, comp->regs + DISP_RDMA_MEM_START_ADDR);
225 writel_relaxed(pitch, comp->regs + DISP_RDMA_MEM_SRC_PITCH);
226 writel(RDMA_MEM_GMC, comp->regs + DISP_RDMA_MEM_GMC_SETTING_0);
227 rdma_update_bits(comp, DISP_REG_RDMA_GLOBAL_CON,
228 RDMA_MODE_MEMORY, RDMA_MODE_MEMORY);
229}
230
141static const struct mtk_ddp_comp_funcs mtk_disp_rdma_funcs = { 231static const struct mtk_ddp_comp_funcs mtk_disp_rdma_funcs = {
142 .config = mtk_rdma_config, 232 .config = mtk_rdma_config,
143 .start = mtk_rdma_start, 233 .start = mtk_rdma_start,
144 .stop = mtk_rdma_stop, 234 .stop = mtk_rdma_stop,
145 .enable_vblank = mtk_rdma_enable_vblank, 235 .enable_vblank = mtk_rdma_enable_vblank,
146 .disable_vblank = mtk_rdma_disable_vblank, 236 .disable_vblank = mtk_rdma_disable_vblank,
237 .layer_nr = mtk_rdma_layer_nr,
238 .layer_config = mtk_rdma_layer_config,
147}; 239};
148 240
149static int mtk_disp_rdma_bind(struct device *dev, struct device *master, 241static int mtk_disp_rdma_bind(struct device *dev, struct device *master,
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 2d6aa150a9ff..0b976dfd04df 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
@@ -45,7 +45,8 @@ struct mtk_drm_crtc {
45 bool pending_needs_vblank; 45 bool pending_needs_vblank;
46 struct drm_pending_vblank_event *event; 46 struct drm_pending_vblank_event *event;
47 47
48 struct drm_plane planes[OVL_LAYER_NR]; 48 struct drm_plane *planes;
49 unsigned int layer_nr;
49 bool pending_planes; 50 bool pending_planes;
50 51
51 void __iomem *config_regs; 52 void __iomem *config_regs;
@@ -171,9 +172,9 @@ static void mtk_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
171static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc) 172static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc)
172{ 173{
173 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 174 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
174 struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0]; 175 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
175 176
176 mtk_ddp_comp_enable_vblank(ovl, &mtk_crtc->base); 177 mtk_ddp_comp_enable_vblank(comp, &mtk_crtc->base);
177 178
178 return 0; 179 return 0;
179} 180}
@@ -181,9 +182,9 @@ static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc)
181static void mtk_drm_crtc_disable_vblank(struct drm_crtc *crtc) 182static void mtk_drm_crtc_disable_vblank(struct drm_crtc *crtc)
182{ 183{
183 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 184 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
184 struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0]; 185 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
185 186
186 mtk_ddp_comp_disable_vblank(ovl); 187 mtk_ddp_comp_disable_vblank(comp);
187} 188}
188 189
189static int mtk_crtc_ddp_clk_enable(struct mtk_drm_crtc *mtk_crtc) 190static int mtk_crtc_ddp_clk_enable(struct mtk_drm_crtc *mtk_crtc)
@@ -286,7 +287,7 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
286 } 287 }
287 288
288 /* Initially configure all planes */ 289 /* Initially configure all planes */
289 for (i = 0; i < OVL_LAYER_NR; i++) { 290 for (i = 0; i < mtk_crtc->layer_nr; i++) {
290 struct drm_plane *plane = &mtk_crtc->planes[i]; 291 struct drm_plane *plane = &mtk_crtc->planes[i];
291 struct mtk_plane_state *plane_state; 292 struct mtk_plane_state *plane_state;
292 293
@@ -334,7 +335,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
334{ 335{
335 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 336 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
336 struct mtk_crtc_state *state = to_mtk_crtc_state(mtk_crtc->base.state); 337 struct mtk_crtc_state *state = to_mtk_crtc_state(mtk_crtc->base.state);
337 struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0]; 338 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
338 unsigned int i; 339 unsigned int i;
339 340
340 /* 341 /*
@@ -343,7 +344,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
343 * queue update module registers on vblank. 344 * queue update module registers on vblank.
344 */ 345 */
345 if (state->pending_config) { 346 if (state->pending_config) {
346 mtk_ddp_comp_config(ovl, state->pending_width, 347 mtk_ddp_comp_config(comp, state->pending_width,
347 state->pending_height, 348 state->pending_height,
348 state->pending_vrefresh, 0); 349 state->pending_vrefresh, 0);
349 350
@@ -351,14 +352,14 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
351 } 352 }
352 353
353 if (mtk_crtc->pending_planes) { 354 if (mtk_crtc->pending_planes) {
354 for (i = 0; i < OVL_LAYER_NR; i++) { 355 for (i = 0; i < mtk_crtc->layer_nr; i++) {
355 struct drm_plane *plane = &mtk_crtc->planes[i]; 356 struct drm_plane *plane = &mtk_crtc->planes[i];
356 struct mtk_plane_state *plane_state; 357 struct mtk_plane_state *plane_state;
357 358
358 plane_state = to_mtk_plane_state(plane->state); 359 plane_state = to_mtk_plane_state(plane->state);
359 360
360 if (plane_state->pending.config) { 361 if (plane_state->pending.config) {
361 mtk_ddp_comp_layer_config(ovl, i, plane_state); 362 mtk_ddp_comp_layer_config(comp, i, plane_state);
362 plane_state->pending.config = false; 363 plane_state->pending.config = false;
363 } 364 }
364 } 365 }
@@ -370,12 +371,12 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
370 struct drm_crtc_state *old_state) 371 struct drm_crtc_state *old_state)
371{ 372{
372 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 373 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
373 struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0]; 374 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
374 int ret; 375 int ret;
375 376
376 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id); 377 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id);
377 378
378 ret = mtk_smi_larb_get(ovl->larb_dev); 379 ret = mtk_smi_larb_get(comp->larb_dev);
379 if (ret) { 380 if (ret) {
380 DRM_ERROR("Failed to get larb: %d\n", ret); 381 DRM_ERROR("Failed to get larb: %d\n", ret);
381 return; 382 return;
@@ -383,7 +384,7 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
383 384
384 ret = mtk_crtc_ddp_hw_init(mtk_crtc); 385 ret = mtk_crtc_ddp_hw_init(mtk_crtc);
385 if (ret) { 386 if (ret) {
386 mtk_smi_larb_put(ovl->larb_dev); 387 mtk_smi_larb_put(comp->larb_dev);
387 return; 388 return;
388 } 389 }
389 390
@@ -395,7 +396,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
395 struct drm_crtc_state *old_state) 396 struct drm_crtc_state *old_state)
396{ 397{
397 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 398 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
398 struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0]; 399 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
399 int i; 400 int i;
400 401
401 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id); 402 DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id);
@@ -403,7 +404,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
403 return; 404 return;
404 405
405 /* Set all pending plane state to disabled */ 406 /* Set all pending plane state to disabled */
406 for (i = 0; i < OVL_LAYER_NR; i++) { 407 for (i = 0; i < mtk_crtc->layer_nr; i++) {
407 struct drm_plane *plane = &mtk_crtc->planes[i]; 408 struct drm_plane *plane = &mtk_crtc->planes[i];
408 struct mtk_plane_state *plane_state; 409 struct mtk_plane_state *plane_state;
409 410
@@ -418,7 +419,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
418 419
419 drm_crtc_vblank_off(crtc); 420 drm_crtc_vblank_off(crtc);
420 mtk_crtc_ddp_hw_fini(mtk_crtc); 421 mtk_crtc_ddp_hw_fini(mtk_crtc);
421 mtk_smi_larb_put(ovl->larb_dev); 422 mtk_smi_larb_put(comp->larb_dev);
422 423
423 mtk_crtc->enabled = false; 424 mtk_crtc->enabled = false;
424} 425}
@@ -450,7 +451,7 @@ static void mtk_drm_crtc_atomic_flush(struct drm_crtc *crtc,
450 451
451 if (mtk_crtc->event) 452 if (mtk_crtc->event)
452 mtk_crtc->pending_needs_vblank = true; 453 mtk_crtc->pending_needs_vblank = true;
453 for (i = 0; i < OVL_LAYER_NR; i++) { 454 for (i = 0; i < mtk_crtc->layer_nr; i++) {
454 struct drm_plane *plane = &mtk_crtc->planes[i]; 455 struct drm_plane *plane = &mtk_crtc->planes[i];
455 struct mtk_plane_state *plane_state; 456 struct mtk_plane_state *plane_state;
456 457
@@ -516,7 +517,7 @@ err_cleanup_crtc:
516 return ret; 517 return ret;
517} 518}
518 519
519void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *ovl) 520void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *comp)
520{ 521{
521 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc); 522 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
522 struct mtk_drm_private *priv = crtc->dev->dev_private; 523 struct mtk_drm_private *priv = crtc->dev->dev_private;
@@ -598,7 +599,12 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
598 mtk_crtc->ddp_comp[i] = comp; 599 mtk_crtc->ddp_comp[i] = comp;
599 } 600 }
600 601
601 for (zpos = 0; zpos < OVL_LAYER_NR; zpos++) { 602 mtk_crtc->layer_nr = mtk_ddp_comp_layer_nr(mtk_crtc->ddp_comp[0]);
603 mtk_crtc->planes = devm_kzalloc(dev, mtk_crtc->layer_nr *
604 sizeof(struct drm_plane),
605 GFP_KERNEL);
606
607 for (zpos = 0; zpos < mtk_crtc->layer_nr; zpos++) {
602 type = (zpos == 0) ? DRM_PLANE_TYPE_PRIMARY : 608 type = (zpos == 0) ? DRM_PLANE_TYPE_PRIMARY :
603 (zpos == 1) ? DRM_PLANE_TYPE_CURSOR : 609 (zpos == 1) ? DRM_PLANE_TYPE_CURSOR :
604 DRM_PLANE_TYPE_OVERLAY; 610 DRM_PLANE_TYPE_OVERLAY;
@@ -609,7 +615,8 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
609 } 615 }
610 616
611 ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0], 617 ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
612 &mtk_crtc->planes[1], pipe); 618 mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
619 NULL, pipe);
613 if (ret < 0) 620 if (ret < 0)
614 goto unprepare; 621 goto unprepare;
615 drm_mode_crtc_set_gamma_size(&mtk_crtc->base, MTK_LUT_SIZE); 622 drm_mode_crtc_set_gamma_size(&mtk_crtc->base, MTK_LUT_SIZE);
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.h b/drivers/gpu/drm/mediatek/mtk_drm_crtc.h
index 9d9410c67ae9..091adb2087eb 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.h
+++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.h
@@ -18,13 +18,12 @@
18#include "mtk_drm_ddp_comp.h" 18#include "mtk_drm_ddp_comp.h"
19#include "mtk_drm_plane.h" 19#include "mtk_drm_plane.h"
20 20
21#define OVL_LAYER_NR 4
22#define MTK_LUT_SIZE 512 21#define MTK_LUT_SIZE 512
23#define MTK_MAX_BPC 10 22#define MTK_MAX_BPC 10
24#define MTK_MIN_BPC 3 23#define MTK_MIN_BPC 3
25 24
26void mtk_drm_crtc_commit(struct drm_crtc *crtc); 25void mtk_drm_crtc_commit(struct drm_crtc *crtc);
27void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *ovl); 26void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *comp);
28int mtk_drm_crtc_create(struct drm_device *drm_dev, 27int mtk_drm_crtc_create(struct drm_device *drm_dev,
29 const enum mtk_ddp_comp_id *path, 28 const enum mtk_ddp_comp_id *path,
30 unsigned int path_len); 29 unsigned int path_len);
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
index 87e4191c250e..546b3e3b300b 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
@@ -106,6 +106,8 @@
106#define OVL1_MOUT_EN_COLOR1 0x1 106#define OVL1_MOUT_EN_COLOR1 0x1
107#define GAMMA_MOUT_EN_RDMA1 0x1 107#define GAMMA_MOUT_EN_RDMA1 0x1
108#define RDMA0_SOUT_DPI0 0x2 108#define RDMA0_SOUT_DPI0 0x2
109#define RDMA0_SOUT_DPI1 0x3
110#define RDMA0_SOUT_DSI1 0x1
109#define RDMA0_SOUT_DSI2 0x4 111#define RDMA0_SOUT_DSI2 0x4
110#define RDMA0_SOUT_DSI3 0x5 112#define RDMA0_SOUT_DSI3 0x5
111#define RDMA1_SOUT_DPI0 0x2 113#define RDMA1_SOUT_DPI0 0x2
@@ -122,6 +124,8 @@
122#define DPI0_SEL_IN_RDMA2 0x3 124#define DPI0_SEL_IN_RDMA2 0x3
123#define DPI1_SEL_IN_RDMA1 (0x1 << 8) 125#define DPI1_SEL_IN_RDMA1 (0x1 << 8)
124#define DPI1_SEL_IN_RDMA2 (0x3 << 8) 126#define DPI1_SEL_IN_RDMA2 (0x3 << 8)
127#define DSI0_SEL_IN_RDMA1 0x1
128#define DSI0_SEL_IN_RDMA2 0x4
125#define DSI1_SEL_IN_RDMA1 0x1 129#define DSI1_SEL_IN_RDMA1 0x1
126#define DSI1_SEL_IN_RDMA2 0x4 130#define DSI1_SEL_IN_RDMA2 0x4
127#define DSI2_SEL_IN_RDMA1 (0x1 << 16) 131#define DSI2_SEL_IN_RDMA1 (0x1 << 16)
@@ -224,6 +228,12 @@ static unsigned int mtk_ddp_mout_en(enum mtk_ddp_comp_id cur,
224 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI0) { 228 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI0) {
225 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN; 229 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
226 value = RDMA0_SOUT_DPI0; 230 value = RDMA0_SOUT_DPI0;
231 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI1) {
232 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
233 value = RDMA0_SOUT_DPI1;
234 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI1) {
235 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
236 value = RDMA0_SOUT_DSI1;
227 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) { 237 } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) {
228 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN; 238 *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
229 value = RDMA0_SOUT_DSI2; 239 value = RDMA0_SOUT_DSI2;
@@ -282,6 +292,9 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur,
282 } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI1) { 292 } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI1) {
283 *addr = DISP_REG_CONFIG_DPI_SEL_IN; 293 *addr = DISP_REG_CONFIG_DPI_SEL_IN;
284 value = DPI1_SEL_IN_RDMA1; 294 value = DPI1_SEL_IN_RDMA1;
295 } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI0) {
296 *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
297 value = DSI0_SEL_IN_RDMA1;
285 } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI1) { 298 } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI1) {
286 *addr = DISP_REG_CONFIG_DSIO_SEL_IN; 299 *addr = DISP_REG_CONFIG_DSIO_SEL_IN;
287 value = DSI1_SEL_IN_RDMA1; 300 value = DSI1_SEL_IN_RDMA1;
@@ -297,8 +310,11 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur,
297 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI1) { 310 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI1) {
298 *addr = DISP_REG_CONFIG_DPI_SEL_IN; 311 *addr = DISP_REG_CONFIG_DPI_SEL_IN;
299 value = DPI1_SEL_IN_RDMA2; 312 value = DPI1_SEL_IN_RDMA2;
300 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) { 313 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI0) {
301 *addr = DISP_REG_CONFIG_DSIE_SEL_IN; 314 *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
315 value = DSI0_SEL_IN_RDMA2;
316 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) {
317 *addr = DISP_REG_CONFIG_DSIO_SEL_IN;
302 value = DSI1_SEL_IN_RDMA2; 318 value = DSI1_SEL_IN_RDMA2;
303 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI2) { 319 } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI2) {
304 *addr = DISP_REG_CONFIG_DSIE_SEL_IN; 320 *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
index 7413ffeb3c9d..8399229e6ad2 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
@@ -78,6 +78,7 @@ struct mtk_ddp_comp_funcs {
78 void (*stop)(struct mtk_ddp_comp *comp); 78 void (*stop)(struct mtk_ddp_comp *comp);
79 void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc); 79 void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc);
80 void (*disable_vblank)(struct mtk_ddp_comp *comp); 80 void (*disable_vblank)(struct mtk_ddp_comp *comp);
81 unsigned int (*layer_nr)(struct mtk_ddp_comp *comp);
81 void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx); 82 void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx);
82 void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx); 83 void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx);
83 void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx, 84 void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx,
@@ -128,6 +129,14 @@ static inline void mtk_ddp_comp_disable_vblank(struct mtk_ddp_comp *comp)
128 comp->funcs->disable_vblank(comp); 129 comp->funcs->disable_vblank(comp);
129} 130}
130 131
132static inline unsigned int mtk_ddp_comp_layer_nr(struct mtk_ddp_comp *comp)
133{
134 if (comp->funcs && comp->funcs->layer_nr)
135 return comp->funcs->layer_nr(comp);
136
137 return 0;
138}
139
131static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp, 140static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp,
132 unsigned int idx) 141 unsigned int idx)
133{ 142{
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index 39721119713b..47ec604289b7 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@ -381,7 +381,7 @@ static int mtk_drm_bind(struct device *dev)
381err_deinit: 381err_deinit:
382 mtk_drm_kms_deinit(drm); 382 mtk_drm_kms_deinit(drm);
383err_free: 383err_free:
384 drm_dev_unref(drm); 384 drm_dev_put(drm);
385 return ret; 385 return ret;
386} 386}
387 387
@@ -390,7 +390,7 @@ static void mtk_drm_unbind(struct device *dev)
390 struct mtk_drm_private *private = dev_get_drvdata(dev); 390 struct mtk_drm_private *private = dev_get_drvdata(dev);
391 391
392 drm_dev_unregister(private->drm); 392 drm_dev_unregister(private->drm);
393 drm_dev_unref(private->drm); 393 drm_dev_put(private->drm);
394 private->drm = NULL; 394 private->drm = NULL;
395} 395}
396 396
@@ -564,7 +564,7 @@ static int mtk_drm_remove(struct platform_device *pdev)
564 564
565 drm_dev_unregister(drm); 565 drm_dev_unregister(drm);
566 mtk_drm_kms_deinit(drm); 566 mtk_drm_kms_deinit(drm);
567 drm_dev_unref(drm); 567 drm_dev_put(drm);
568 568
569 component_master_del(&pdev->dev, &mtk_drm_ops); 569 component_master_del(&pdev->dev, &mtk_drm_ops);
570 pm_runtime_disable(&pdev->dev); 570 pm_runtime_disable(&pdev->dev);
@@ -580,29 +580,24 @@ static int mtk_drm_sys_suspend(struct device *dev)
580{ 580{
581 struct mtk_drm_private *private = dev_get_drvdata(dev); 581 struct mtk_drm_private *private = dev_get_drvdata(dev);
582 struct drm_device *drm = private->drm; 582 struct drm_device *drm = private->drm;
583 int ret;
583 584
584 drm_kms_helper_poll_disable(drm); 585 ret = drm_mode_config_helper_suspend(drm);
585
586 private->suspend_state = drm_atomic_helper_suspend(drm);
587 if (IS_ERR(private->suspend_state)) {
588 drm_kms_helper_poll_enable(drm);
589 return PTR_ERR(private->suspend_state);
590 }
591
592 DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n"); 586 DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n");
593 return 0; 587
588 return ret;
594} 589}
595 590
596static int mtk_drm_sys_resume(struct device *dev) 591static int mtk_drm_sys_resume(struct device *dev)
597{ 592{
598 struct mtk_drm_private *private = dev_get_drvdata(dev); 593 struct mtk_drm_private *private = dev_get_drvdata(dev);
599 struct drm_device *drm = private->drm; 594 struct drm_device *drm = private->drm;
595 int ret;
600 596
601 drm_atomic_helper_resume(drm, private->suspend_state); 597 ret = drm_mode_config_helper_resume(drm);
602 drm_kms_helper_poll_enable(drm);
603
604 DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n"); 598 DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n");
605 return 0; 599
600 return ret;
606} 601}
607#endif 602#endif
608 603
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c
index 90837f7c7d0f..f4c7516eb989 100644
--- a/drivers/hwmon/adt7475.c
+++ b/drivers/hwmon/adt7475.c
@@ -302,14 +302,18 @@ static inline u16 volt2reg(int channel, long volt, u8 bypass_attn)
302 return clamp_val(reg, 0, 1023) & (0xff << 2); 302 return clamp_val(reg, 0, 1023) & (0xff << 2);
303} 303}
304 304
305static u16 adt7475_read_word(struct i2c_client *client, int reg) 305static int adt7475_read_word(struct i2c_client *client, int reg)
306{ 306{
307 u16 val; 307 int val1, val2;
308 308
309 val = i2c_smbus_read_byte_data(client, reg); 309 val1 = i2c_smbus_read_byte_data(client, reg);
310 val |= (i2c_smbus_read_byte_data(client, reg + 1) << 8); 310 if (val1 < 0)
311 return val1;
312 val2 = i2c_smbus_read_byte_data(client, reg + 1);
313 if (val2 < 0)
314 return val2;
311 315
312 return val; 316 return val1 | (val2 << 8);
313} 317}
314 318
315static void adt7475_write_word(struct i2c_client *client, int reg, u16 val) 319static void adt7475_write_word(struct i2c_client *client, int reg, u16 val)
@@ -962,13 +966,14 @@ static ssize_t show_pwmfreq(struct device *dev, struct device_attribute *attr,
962{ 966{
963 struct adt7475_data *data = adt7475_update_device(dev); 967 struct adt7475_data *data = adt7475_update_device(dev);
964 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr); 968 struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
965 int i = clamp_val(data->range[sattr->index] & 0xf, 0, 969 int idx;
966 ARRAY_SIZE(pwmfreq_table) - 1);
967 970
968 if (IS_ERR(data)) 971 if (IS_ERR(data))
969 return PTR_ERR(data); 972 return PTR_ERR(data);
973 idx = clamp_val(data->range[sattr->index] & 0xf, 0,
974 ARRAY_SIZE(pwmfreq_table) - 1);
970 975
971 return sprintf(buf, "%d\n", pwmfreq_table[i]); 976 return sprintf(buf, "%d\n", pwmfreq_table[idx]);
972} 977}
973 978
974static ssize_t set_pwmfreq(struct device *dev, struct device_attribute *attr, 979static ssize_t set_pwmfreq(struct device *dev, struct device_attribute *attr,
@@ -1004,6 +1009,10 @@ static ssize_t pwm_use_point2_pwm_at_crit_show(struct device *dev,
1004 char *buf) 1009 char *buf)
1005{ 1010{
1006 struct adt7475_data *data = adt7475_update_device(dev); 1011 struct adt7475_data *data = adt7475_update_device(dev);
1012
1013 if (IS_ERR(data))
1014 return PTR_ERR(data);
1015
1007 return sprintf(buf, "%d\n", !!(data->config4 & CONFIG4_MAXDUTY)); 1016 return sprintf(buf, "%d\n", !!(data->config4 & CONFIG4_MAXDUTY));
1008} 1017}
1009 1018
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index e9e6aeabbf84..71d3445ba869 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -17,7 +17,7 @@
17 * Bi-directional Current/Power Monitor with I2C Interface 17 * Bi-directional Current/Power Monitor with I2C Interface
18 * Datasheet: http://www.ti.com/product/ina230 18 * Datasheet: http://www.ti.com/product/ina230
19 * 19 *
20 * Copyright (C) 2012 Lothar Felten <l-felten@ti.com> 20 * Copyright (C) 2012 Lothar Felten <lothar.felten@gmail.com>
21 * Thanks to Jan Volkering 21 * Thanks to Jan Volkering
22 * 22 *
23 * This program is free software; you can redistribute it and/or modify 23 * This program is free software; you can redistribute it and/or modify
@@ -329,6 +329,15 @@ static int ina2xx_set_shunt(struct ina2xx_data *data, long val)
329 return 0; 329 return 0;
330} 330}
331 331
332static ssize_t ina2xx_show_shunt(struct device *dev,
333 struct device_attribute *da,
334 char *buf)
335{
336 struct ina2xx_data *data = dev_get_drvdata(dev);
337
338 return snprintf(buf, PAGE_SIZE, "%li\n", data->rshunt);
339}
340
332static ssize_t ina2xx_store_shunt(struct device *dev, 341static ssize_t ina2xx_store_shunt(struct device *dev,
333 struct device_attribute *da, 342 struct device_attribute *da,
334 const char *buf, size_t count) 343 const char *buf, size_t count)
@@ -403,7 +412,7 @@ static SENSOR_DEVICE_ATTR(power1_input, S_IRUGO, ina2xx_show_value, NULL,
403 412
404/* shunt resistance */ 413/* shunt resistance */
405static SENSOR_DEVICE_ATTR(shunt_resistor, S_IRUGO | S_IWUSR, 414static SENSOR_DEVICE_ATTR(shunt_resistor, S_IRUGO | S_IWUSR,
406 ina2xx_show_value, ina2xx_store_shunt, 415 ina2xx_show_shunt, ina2xx_store_shunt,
407 INA2XX_CALIBRATION); 416 INA2XX_CALIBRATION);
408 417
409/* update interval (ina226 only) */ 418/* update interval (ina226 only) */
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index c6bd61e4695a..944f5b63aecd 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -63,6 +63,7 @@
63#include <linux/bitops.h> 63#include <linux/bitops.h>
64#include <linux/dmi.h> 64#include <linux/dmi.h>
65#include <linux/io.h> 65#include <linux/io.h>
66#include <linux/nospec.h>
66#include "lm75.h" 67#include "lm75.h"
67 68
68#define USE_ALTERNATE 69#define USE_ALTERNATE
@@ -2689,6 +2690,7 @@ store_pwm_weight_temp_sel(struct device *dev, struct device_attribute *attr,
2689 return err; 2690 return err;
2690 if (val > NUM_TEMP) 2691 if (val > NUM_TEMP)
2691 return -EINVAL; 2692 return -EINVAL;
2693 val = array_index_nospec(val, NUM_TEMP + 1);
2692 if (val && (!(data->have_temp & BIT(val - 1)) || 2694 if (val && (!(data->have_temp & BIT(val - 1)) ||
2693 !data->temp_src[val - 1])) 2695 !data->temp_src[val - 1]))
2694 return -EINVAL; 2696 return -EINVAL;
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index 6ec65adaba49..c33dcfb87993 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -110,8 +110,8 @@ static int sclhi(struct i2c_algo_bit_data *adap)
110 } 110 }
111#ifdef DEBUG 111#ifdef DEBUG
112 if (jiffies != start && i2c_debug >= 3) 112 if (jiffies != start && i2c_debug >= 3)
113 pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go " 113 pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go high\n",
114 "high\n", jiffies - start); 114 jiffies - start);
115#endif 115#endif
116 116
117done: 117done:
@@ -171,8 +171,9 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
171 setsda(adap, sb); 171 setsda(adap, sb);
172 udelay((adap->udelay + 1) / 2); 172 udelay((adap->udelay + 1) / 2);
173 if (sclhi(adap) < 0) { /* timed out */ 173 if (sclhi(adap) < 0) { /* timed out */
174 bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, " 174 bit_dbg(1, &i2c_adap->dev,
175 "timeout at bit #%d\n", (int)c, i); 175 "i2c_outb: 0x%02x, timeout at bit #%d\n",
176 (int)c, i);
176 return -ETIMEDOUT; 177 return -ETIMEDOUT;
177 } 178 }
178 /* FIXME do arbitration here: 179 /* FIXME do arbitration here:
@@ -185,8 +186,8 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
185 } 186 }
186 sdahi(adap); 187 sdahi(adap);
187 if (sclhi(adap) < 0) { /* timeout */ 188 if (sclhi(adap) < 0) { /* timeout */
188 bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, " 189 bit_dbg(1, &i2c_adap->dev,
189 "timeout at ack\n", (int)c); 190 "i2c_outb: 0x%02x, timeout at ack\n", (int)c);
190 return -ETIMEDOUT; 191 return -ETIMEDOUT;
191 } 192 }
192 193
@@ -215,8 +216,9 @@ static int i2c_inb(struct i2c_adapter *i2c_adap)
215 sdahi(adap); 216 sdahi(adap);
216 for (i = 0; i < 8; i++) { 217 for (i = 0; i < 8; i++) {
217 if (sclhi(adap) < 0) { /* timeout */ 218 if (sclhi(adap) < 0) { /* timeout */
218 bit_dbg(1, &i2c_adap->dev, "i2c_inb: timeout at bit " 219 bit_dbg(1, &i2c_adap->dev,
219 "#%d\n", 7 - i); 220 "i2c_inb: timeout at bit #%d\n",
221 7 - i);
220 return -ETIMEDOUT; 222 return -ETIMEDOUT;
221 } 223 }
222 indata *= 2; 224 indata *= 2;
@@ -265,8 +267,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
265 goto bailout; 267 goto bailout;
266 } 268 }
267 if (!scl) { 269 if (!scl) {
268 printk(KERN_WARNING "%s: SCL unexpected low " 270 printk(KERN_WARNING
269 "while pulling SDA low!\n", name); 271 "%s: SCL unexpected low while pulling SDA low!\n",
272 name);
270 goto bailout; 273 goto bailout;
271 } 274 }
272 275
@@ -278,8 +281,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
278 goto bailout; 281 goto bailout;
279 } 282 }
280 if (!scl) { 283 if (!scl) {
281 printk(KERN_WARNING "%s: SCL unexpected low " 284 printk(KERN_WARNING
282 "while pulling SDA high!\n", name); 285 "%s: SCL unexpected low while pulling SDA high!\n",
286 name);
283 goto bailout; 287 goto bailout;
284 } 288 }
285 289
@@ -291,8 +295,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
291 goto bailout; 295 goto bailout;
292 } 296 }
293 if (!sda) { 297 if (!sda) {
294 printk(KERN_WARNING "%s: SDA unexpected low " 298 printk(KERN_WARNING
295 "while pulling SCL low!\n", name); 299 "%s: SDA unexpected low while pulling SCL low!\n",
300 name);
296 goto bailout; 301 goto bailout;
297 } 302 }
298 303
@@ -304,8 +309,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
304 goto bailout; 309 goto bailout;
305 } 310 }
306 if (!sda) { 311 if (!sda) {
307 printk(KERN_WARNING "%s: SDA unexpected low " 312 printk(KERN_WARNING
308 "while pulling SCL high!\n", name); 313 "%s: SDA unexpected low while pulling SCL high!\n",
314 name);
309 goto bailout; 315 goto bailout;
310 } 316 }
311 317
@@ -352,8 +358,8 @@ static int try_address(struct i2c_adapter *i2c_adap,
352 i2c_start(adap); 358 i2c_start(adap);
353 } 359 }
354 if (i && ret) 360 if (i && ret)
355 bit_dbg(1, &i2c_adap->dev, "Used %d tries to %s client at " 361 bit_dbg(1, &i2c_adap->dev,
356 "0x%02x: %s\n", i + 1, 362 "Used %d tries to %s client at 0x%02x: %s\n", i + 1,
357 addr & 1 ? "read from" : "write to", addr >> 1, 363 addr & 1 ? "read from" : "write to", addr >> 1,
358 ret == 1 ? "success" : "failed, timeout?"); 364 ret == 1 ? "success" : "failed, timeout?");
359 return ret; 365 return ret;
@@ -442,8 +448,9 @@ static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
442 if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) { 448 if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) {
443 if (!(flags & I2C_M_NO_RD_ACK)) 449 if (!(flags & I2C_M_NO_RD_ACK))
444 acknak(i2c_adap, 0); 450 acknak(i2c_adap, 0);
445 dev_err(&i2c_adap->dev, "readbytes: invalid " 451 dev_err(&i2c_adap->dev,
446 "block length (%d)\n", inval); 452 "readbytes: invalid block length (%d)\n",
453 inval);
447 return -EPROTO; 454 return -EPROTO;
448 } 455 }
449 /* The original count value accounts for the extra 456 /* The original count value accounts for the extra
@@ -506,8 +513,8 @@ static int bit_doAddress(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
506 return -ENXIO; 513 return -ENXIO;
507 } 514 }
508 if (flags & I2C_M_RD) { 515 if (flags & I2C_M_RD) {
509 bit_dbg(3, &i2c_adap->dev, "emitting repeated " 516 bit_dbg(3, &i2c_adap->dev,
510 "start condition\n"); 517 "emitting repeated start condition\n");
511 i2c_repstart(adap); 518 i2c_repstart(adap);
512 /* okay, now switch into reading mode */ 519 /* okay, now switch into reading mode */
513 addr |= 0x01; 520 addr |= 0x01;
@@ -564,8 +571,8 @@ static int bit_xfer(struct i2c_adapter *i2c_adap,
564 } 571 }
565 ret = bit_doAddress(i2c_adap, pmsg); 572 ret = bit_doAddress(i2c_adap, pmsg);
566 if ((ret != 0) && !nak_ok) { 573 if ((ret != 0) && !nak_ok) {
567 bit_dbg(1, &i2c_adap->dev, "NAK from " 574 bit_dbg(1, &i2c_adap->dev,
568 "device addr 0x%02x msg #%d\n", 575 "NAK from device addr 0x%02x msg #%d\n",
569 msgs[i].addr, i); 576 msgs[i].addr, i);
570 goto bailout; 577 goto bailout;
571 } 578 }
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index e18442b9973a..94d94b4a9a0d 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -708,7 +708,6 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
708 i2c_set_adapdata(adap, dev); 708 i2c_set_adapdata(adap, dev);
709 709
710 if (dev->pm_disabled) { 710 if (dev->pm_disabled) {
711 dev_pm_syscore_device(dev->dev, true);
712 irq_flags = IRQF_NO_SUSPEND; 711 irq_flags = IRQF_NO_SUSPEND;
713 } else { 712 } else {
714 irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND; 713 irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND;
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 1a8d2da5b000..b5750fd85125 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -434,6 +434,9 @@ static int dw_i2c_plat_suspend(struct device *dev)
434{ 434{
435 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev); 435 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
436 436
437 if (i_dev->pm_disabled)
438 return 0;
439
437 i_dev->disable(i_dev); 440 i_dev->disable(i_dev);
438 i2c_dw_prepare_clk(i_dev, false); 441 i2c_dw_prepare_clk(i_dev, false);
439 442
@@ -444,7 +447,9 @@ static int dw_i2c_plat_resume(struct device *dev)
444{ 447{
445 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev); 448 struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
446 449
447 i2c_dw_prepare_clk(i_dev, true); 450 if (!i_dev->pm_disabled)
451 i2c_dw_prepare_clk(i_dev, true);
452
448 i_dev->init(i_dev); 453 i_dev->init(i_dev);
449 454
450 return 0; 455 return 0;
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 941c223f6491..04b60a349d7e 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1415,6 +1415,13 @@ static void i801_add_tco(struct i801_priv *priv)
1415} 1415}
1416 1416
1417#ifdef CONFIG_ACPI 1417#ifdef CONFIG_ACPI
1418static bool i801_acpi_is_smbus_ioport(const struct i801_priv *priv,
1419 acpi_physical_address address)
1420{
1421 return address >= priv->smba &&
1422 address <= pci_resource_end(priv->pci_dev, SMBBAR);
1423}
1424
1418static acpi_status 1425static acpi_status
1419i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits, 1426i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits,
1420 u64 *value, void *handler_context, void *region_context) 1427 u64 *value, void *handler_context, void *region_context)
@@ -1430,7 +1437,7 @@ i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits,
1430 */ 1437 */
1431 mutex_lock(&priv->acpi_lock); 1438 mutex_lock(&priv->acpi_lock);
1432 1439
1433 if (!priv->acpi_reserved) { 1440 if (!priv->acpi_reserved && i801_acpi_is_smbus_ioport(priv, address)) {
1434 priv->acpi_reserved = true; 1441 priv->acpi_reserved = true;
1435 1442
1436 dev_warn(&pdev->dev, "BIOS is accessing SMBus registers\n"); 1443 dev_warn(&pdev->dev, "BIOS is accessing SMBus registers\n");
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 439e8778f849..818cab14e87c 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -507,8 +507,6 @@ static void sh_mobile_i2c_dma_callback(void *data)
507 pd->pos = pd->msg->len; 507 pd->pos = pd->msg->len;
508 pd->stop_after_dma = true; 508 pd->stop_after_dma = true;
509 509
510 i2c_release_dma_safe_msg_buf(pd->msg, pd->dma_buf);
511
512 iic_set_clr(pd, ICIC, 0, ICIC_TDMAE | ICIC_RDMAE); 510 iic_set_clr(pd, ICIC, 0, ICIC_TDMAE | ICIC_RDMAE);
513} 511}
514 512
@@ -602,8 +600,8 @@ static void sh_mobile_i2c_xfer_dma(struct sh_mobile_i2c_data *pd)
602 dma_async_issue_pending(chan); 600 dma_async_issue_pending(chan);
603} 601}
604 602
605static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg, 603static void start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
606 bool do_init) 604 bool do_init)
607{ 605{
608 if (do_init) { 606 if (do_init) {
609 /* Initialize channel registers */ 607 /* Initialize channel registers */
@@ -627,7 +625,6 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
627 625
628 /* Enable all interrupts to begin with */ 626 /* Enable all interrupts to begin with */
629 iic_wr(pd, ICIC, ICIC_DTEE | ICIC_WAITE | ICIC_ALE | ICIC_TACKE); 627 iic_wr(pd, ICIC, ICIC_DTEE | ICIC_WAITE | ICIC_ALE | ICIC_TACKE);
630 return 0;
631} 628}
632 629
633static int poll_dte(struct sh_mobile_i2c_data *pd) 630static int poll_dte(struct sh_mobile_i2c_data *pd)
@@ -698,9 +695,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
698 pd->send_stop = i == num - 1 || msg->flags & I2C_M_STOP; 695 pd->send_stop = i == num - 1 || msg->flags & I2C_M_STOP;
699 pd->stop_after_dma = false; 696 pd->stop_after_dma = false;
700 697
701 err = start_ch(pd, msg, do_start); 698 start_ch(pd, msg, do_start);
702 if (err)
703 break;
704 699
705 if (do_start) 700 if (do_start)
706 i2c_op(pd, OP_START, 0); 701 i2c_op(pd, OP_START, 0);
@@ -709,6 +704,10 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
709 timeout = wait_event_timeout(pd->wait, 704 timeout = wait_event_timeout(pd->wait,
710 pd->sr & (ICSR_TACK | SW_DONE), 705 pd->sr & (ICSR_TACK | SW_DONE),
711 adapter->timeout); 706 adapter->timeout);
707
708 /* 'stop_after_dma' tells if DMA transfer was complete */
709 i2c_put_dma_safe_msg_buf(pd->dma_buf, pd->msg, pd->stop_after_dma);
710
712 if (!timeout) { 711 if (!timeout) {
713 dev_err(pd->dev, "Transfer request timed out\n"); 712 dev_err(pd->dev, "Transfer request timed out\n");
714 if (pd->dma_direction != DMA_NONE) 713 if (pd->dma_direction != DMA_NONE)
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index f15737763608..9ee9a15e7134 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -2293,21 +2293,22 @@ u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold)
2293EXPORT_SYMBOL_GPL(i2c_get_dma_safe_msg_buf); 2293EXPORT_SYMBOL_GPL(i2c_get_dma_safe_msg_buf);
2294 2294
2295/** 2295/**
2296 * i2c_release_dma_safe_msg_buf - release DMA safe buffer and sync with i2c_msg 2296 * i2c_put_dma_safe_msg_buf - release DMA safe buffer and sync with i2c_msg
2297 * @msg: the message to be synced with
2298 * @buf: the buffer obtained from i2c_get_dma_safe_msg_buf(). May be NULL. 2297 * @buf: the buffer obtained from i2c_get_dma_safe_msg_buf(). May be NULL.
2298 * @msg: the message which the buffer corresponds to
2299 * @xferred: bool saying if the message was transferred
2299 */ 2300 */
2300void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf) 2301void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred)
2301{ 2302{
2302 if (!buf || buf == msg->buf) 2303 if (!buf || buf == msg->buf)
2303 return; 2304 return;
2304 2305
2305 if (msg->flags & I2C_M_RD) 2306 if (xferred && msg->flags & I2C_M_RD)
2306 memcpy(msg->buf, buf, msg->len); 2307 memcpy(msg->buf, buf, msg->len);
2307 2308
2308 kfree(buf); 2309 kfree(buf);
2309} 2310}
2310EXPORT_SYMBOL_GPL(i2c_release_dma_safe_msg_buf); 2311EXPORT_SYMBOL_GPL(i2c_put_dma_safe_msg_buf);
2311 2312
2312MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); 2313MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
2313MODULE_DESCRIPTION("I2C-Bus main module"); 2314MODULE_DESCRIPTION("I2C-Bus main module");
diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index 648eb6743ed5..6edffeed9953 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -238,10 +238,6 @@ static void mmc_mq_exit_request(struct blk_mq_tag_set *set, struct request *req,
238 mmc_exit_request(mq->queue, req); 238 mmc_exit_request(mq->queue, req);
239} 239}
240 240
241/*
242 * We use BLK_MQ_F_BLOCKING and have only 1 hardware queue, which means requests
243 * will not be dispatched in parallel.
244 */
245static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx, 241static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
246 const struct blk_mq_queue_data *bd) 242 const struct blk_mq_queue_data *bd)
247{ 243{
@@ -264,7 +260,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
264 260
265 spin_lock_irq(q->queue_lock); 261 spin_lock_irq(q->queue_lock);
266 262
267 if (mq->recovery_needed) { 263 if (mq->recovery_needed || mq->busy) {
268 spin_unlock_irq(q->queue_lock); 264 spin_unlock_irq(q->queue_lock);
269 return BLK_STS_RESOURCE; 265 return BLK_STS_RESOURCE;
270 } 266 }
@@ -291,6 +287,9 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
291 break; 287 break;
292 } 288 }
293 289
290 /* Parallel dispatch of requests is not supported at the moment */
291 mq->busy = true;
292
294 mq->in_flight[issue_type] += 1; 293 mq->in_flight[issue_type] += 1;
295 get_card = (mmc_tot_in_flight(mq) == 1); 294 get_card = (mmc_tot_in_flight(mq) == 1);
296 cqe_retune_ok = (mmc_cqe_qcnt(mq) == 1); 295 cqe_retune_ok = (mmc_cqe_qcnt(mq) == 1);
@@ -333,9 +332,12 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
333 mq->in_flight[issue_type] -= 1; 332 mq->in_flight[issue_type] -= 1;
334 if (mmc_tot_in_flight(mq) == 0) 333 if (mmc_tot_in_flight(mq) == 0)
335 put_card = true; 334 put_card = true;
335 mq->busy = false;
336 spin_unlock_irq(q->queue_lock); 336 spin_unlock_irq(q->queue_lock);
337 if (put_card) 337 if (put_card)
338 mmc_put_card(card, &mq->ctx); 338 mmc_put_card(card, &mq->ctx);
339 } else {
340 WRITE_ONCE(mq->busy, false);
339 } 341 }
340 342
341 return ret; 343 return ret;
diff --git a/drivers/mmc/core/queue.h b/drivers/mmc/core/queue.h
index 17e59d50b496..9bf3c9245075 100644
--- a/drivers/mmc/core/queue.h
+++ b/drivers/mmc/core/queue.h
@@ -81,6 +81,7 @@ struct mmc_queue {
81 unsigned int cqe_busy; 81 unsigned int cqe_busy;
82#define MMC_CQE_DCMD_BUSY BIT(0) 82#define MMC_CQE_DCMD_BUSY BIT(0)
83#define MMC_CQE_QUEUE_FULL BIT(1) 83#define MMC_CQE_QUEUE_FULL BIT(1)
84 bool busy;
84 bool use_cqe; 85 bool use_cqe;
85 bool recovery_needed; 86 bool recovery_needed;
86 bool in_recovery; 87 bool in_recovery;
diff --git a/drivers/mmc/host/android-goldfish.c b/drivers/mmc/host/android-goldfish.c
index 294de177632c..61e4e2a213c9 100644
--- a/drivers/mmc/host/android-goldfish.c
+++ b/drivers/mmc/host/android-goldfish.c
@@ -217,7 +217,7 @@ static void goldfish_mmc_xfer_done(struct goldfish_mmc_host *host,
217 * We don't really have DMA, so we need 217 * We don't really have DMA, so we need
218 * to copy from our platform driver buffer 218 * to copy from our platform driver buffer
219 */ 219 */
220 sg_copy_to_buffer(data->sg, 1, host->virt_base, 220 sg_copy_from_buffer(data->sg, 1, host->virt_base,
221 data->sg->length); 221 data->sg->length);
222 } 222 }
223 host->data->bytes_xfered += data->sg->length; 223 host->data->bytes_xfered += data->sg->length;
@@ -393,7 +393,7 @@ static void goldfish_mmc_prepare_data(struct goldfish_mmc_host *host,
393 * We don't really have DMA, so we need to copy to our 393 * We don't really have DMA, so we need to copy to our
394 * platform driver buffer 394 * platform driver buffer
395 */ 395 */
396 sg_copy_from_buffer(data->sg, 1, host->virt_base, 396 sg_copy_to_buffer(data->sg, 1, host->virt_base,
397 data->sg->length); 397 data->sg->length);
398 } 398 }
399} 399}
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 5aa2c9404e92..be53044086c7 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1976,7 +1976,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
1976 do { 1976 do {
1977 value = atmci_readl(host, ATMCI_RDR); 1977 value = atmci_readl(host, ATMCI_RDR);
1978 if (likely(offset + 4 <= sg->length)) { 1978 if (likely(offset + 4 <= sg->length)) {
1979 sg_pcopy_to_buffer(sg, 1, &value, sizeof(u32), offset); 1979 sg_pcopy_from_buffer(sg, 1, &value, sizeof(u32), offset);
1980 1980
1981 offset += 4; 1981 offset += 4;
1982 nbytes += 4; 1982 nbytes += 4;
@@ -1993,7 +1993,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
1993 } else { 1993 } else {
1994 unsigned int remaining = sg->length - offset; 1994 unsigned int remaining = sg->length - offset;
1995 1995
1996 sg_pcopy_to_buffer(sg, 1, &value, remaining, offset); 1996 sg_pcopy_from_buffer(sg, 1, &value, remaining, offset);
1997 nbytes += remaining; 1997 nbytes += remaining;
1998 1998
1999 flush_dcache_page(sg_page(sg)); 1999 flush_dcache_page(sg_page(sg));
@@ -2003,7 +2003,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
2003 goto done; 2003 goto done;
2004 2004
2005 offset = 4 - remaining; 2005 offset = 4 - remaining;
2006 sg_pcopy_to_buffer(sg, 1, (u8 *)&value + remaining, 2006 sg_pcopy_from_buffer(sg, 1, (u8 *)&value + remaining,
2007 offset, 0); 2007 offset, 0);
2008 nbytes += offset; 2008 nbytes += offset;
2009 } 2009 }
@@ -2042,7 +2042,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
2042 2042
2043 do { 2043 do {
2044 if (likely(offset + 4 <= sg->length)) { 2044 if (likely(offset + 4 <= sg->length)) {
2045 sg_pcopy_from_buffer(sg, 1, &value, sizeof(u32), offset); 2045 sg_pcopy_to_buffer(sg, 1, &value, sizeof(u32), offset);
2046 atmci_writel(host, ATMCI_TDR, value); 2046 atmci_writel(host, ATMCI_TDR, value);
2047 2047
2048 offset += 4; 2048 offset += 4;
@@ -2059,7 +2059,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
2059 unsigned int remaining = sg->length - offset; 2059 unsigned int remaining = sg->length - offset;
2060 2060
2061 value = 0; 2061 value = 0;
2062 sg_pcopy_from_buffer(sg, 1, &value, remaining, offset); 2062 sg_pcopy_to_buffer(sg, 1, &value, remaining, offset);
2063 nbytes += remaining; 2063 nbytes += remaining;
2064 2064
2065 host->sg = sg = sg_next(sg); 2065 host->sg = sg = sg_next(sg);
@@ -2070,7 +2070,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
2070 } 2070 }
2071 2071
2072 offset = 4 - remaining; 2072 offset = 4 - remaining;
2073 sg_pcopy_from_buffer(sg, 1, (u8 *)&value + remaining, 2073 sg_pcopy_to_buffer(sg, 1, (u8 *)&value + remaining,
2074 offset, 0); 2074 offset, 0);
2075 atmci_writel(host, ATMCI_TDR, value); 2075 atmci_writel(host, ATMCI_TDR, value);
2076 nbytes += offset; 2076 nbytes += offset;
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index 35cc0de6be67..ca0b43973769 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -45,14 +45,16 @@
45/* DM_CM_RST */ 45/* DM_CM_RST */
46#define RST_DTRANRST1 BIT(9) 46#define RST_DTRANRST1 BIT(9)
47#define RST_DTRANRST0 BIT(8) 47#define RST_DTRANRST0 BIT(8)
48#define RST_RESERVED_BITS GENMASK_ULL(32, 0) 48#define RST_RESERVED_BITS GENMASK_ULL(31, 0)
49 49
50/* DM_CM_INFO1 and DM_CM_INFO1_MASK */ 50/* DM_CM_INFO1 and DM_CM_INFO1_MASK */
51#define INFO1_CLEAR 0 51#define INFO1_CLEAR 0
52#define INFO1_MASK_CLEAR GENMASK_ULL(31, 0)
52#define INFO1_DTRANEND1 BIT(17) 53#define INFO1_DTRANEND1 BIT(17)
53#define INFO1_DTRANEND0 BIT(16) 54#define INFO1_DTRANEND0 BIT(16)
54 55
55/* DM_CM_INFO2 and DM_CM_INFO2_MASK */ 56/* DM_CM_INFO2 and DM_CM_INFO2_MASK */
57#define INFO2_MASK_CLEAR GENMASK_ULL(31, 0)
56#define INFO2_DTRANERR1 BIT(17) 58#define INFO2_DTRANERR1 BIT(17)
57#define INFO2_DTRANERR0 BIT(16) 59#define INFO2_DTRANERR0 BIT(16)
58 60
@@ -252,6 +254,12 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host,
252{ 254{
253 struct renesas_sdhi *priv = host_to_priv(host); 255 struct renesas_sdhi *priv = host_to_priv(host);
254 256
257 /* Disable DMAC interrupts, we don't use them */
258 renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1_MASK,
259 INFO1_MASK_CLEAR);
260 renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO2_MASK,
261 INFO2_MASK_CLEAR);
262
255 /* Each value is set to non-zero to assume "enabling" each DMA */ 263 /* Each value is set to non-zero to assume "enabling" each DMA */
256 host->chan_rx = host->chan_tx = (void *)0xdeadbeaf; 264 host->chan_rx = host->chan_tx = (void *)0xdeadbeaf;
257 265
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index ca18612c4201..67b2065e7a19 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -1338,6 +1338,11 @@ int denali_init(struct denali_nand_info *denali)
1338 1338
1339 denali_enable_irq(denali); 1339 denali_enable_irq(denali);
1340 denali_reset_banks(denali); 1340 denali_reset_banks(denali);
1341 if (!denali->max_banks) {
1342 /* Error out earlier if no chip is found for some reasons. */
1343 ret = -ENODEV;
1344 goto disable_irq;
1345 }
1341 1346
1342 denali->active_bank = DENALI_INVALID_BANK; 1347 denali->active_bank = DENALI_INVALID_BANK;
1343 1348
diff --git a/drivers/mtd/nand/raw/docg4.c b/drivers/mtd/nand/raw/docg4.c
index a3f04315c05c..427fcbc1b71c 100644
--- a/drivers/mtd/nand/raw/docg4.c
+++ b/drivers/mtd/nand/raw/docg4.c
@@ -1218,7 +1218,7 @@ static int docg4_resume(struct platform_device *pdev)
1218 return 0; 1218 return 0;
1219} 1219}
1220 1220
1221static void __init init_mtd_structs(struct mtd_info *mtd) 1221static void init_mtd_structs(struct mtd_info *mtd)
1222{ 1222{
1223 /* initialize mtd and nand data structures */ 1223 /* initialize mtd and nand data structures */
1224 1224
@@ -1290,7 +1290,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
1290 1290
1291} 1291}
1292 1292
1293static int __init read_id_reg(struct mtd_info *mtd) 1293static int read_id_reg(struct mtd_info *mtd)
1294{ 1294{
1295 struct nand_chip *nand = mtd_to_nand(mtd); 1295 struct nand_chip *nand = mtd_to_nand(mtd);
1296 struct docg4_priv *doc = nand_get_controller_data(nand); 1296 struct docg4_priv *doc = nand_get_controller_data(nand);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 139d96c5a023..092c817f8f11 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -110,16 +110,14 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
110 struct tcf_exts *tc_exts) 110 struct tcf_exts *tc_exts)
111{ 111{
112 const struct tc_action *tc_act; 112 const struct tc_action *tc_act;
113 LIST_HEAD(tc_actions); 113 int i, rc;
114 int rc;
115 114
116 if (!tcf_exts_has_actions(tc_exts)) { 115 if (!tcf_exts_has_actions(tc_exts)) {
117 netdev_info(bp->dev, "no actions"); 116 netdev_info(bp->dev, "no actions");
118 return -EINVAL; 117 return -EINVAL;
119 } 118 }
120 119
121 tcf_exts_to_list(tc_exts, &tc_actions); 120 tcf_exts_for_each_action(i, tc_act, tc_exts) {
122 list_for_each_entry(tc_act, &tc_actions, list) {
123 /* Drop action */ 121 /* Drop action */
124 if (is_tcf_gact_shot(tc_act)) { 122 if (is_tcf_gact_shot(tc_act)) {
125 actions->flags |= BNXT_TC_ACTION_FLAG_DROP; 123 actions->flags |= BNXT_TC_ACTION_FLAG_DROP;
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index dc09f9a8a49b..c6707ea2d751 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -482,11 +482,6 @@ static int macb_mii_probe(struct net_device *dev)
482 482
483 if (np) { 483 if (np) {
484 if (of_phy_is_fixed_link(np)) { 484 if (of_phy_is_fixed_link(np)) {
485 if (of_phy_register_fixed_link(np) < 0) {
486 dev_err(&bp->pdev->dev,
487 "broken fixed-link specification\n");
488 return -ENODEV;
489 }
490 bp->phy_node = of_node_get(np); 485 bp->phy_node = of_node_get(np);
491 } else { 486 } else {
492 bp->phy_node = of_parse_phandle(np, "phy-handle", 0); 487 bp->phy_node = of_parse_phandle(np, "phy-handle", 0);
@@ -569,7 +564,7 @@ static int macb_mii_init(struct macb *bp)
569{ 564{
570 struct macb_platform_data *pdata; 565 struct macb_platform_data *pdata;
571 struct device_node *np; 566 struct device_node *np;
572 int err; 567 int err = -ENXIO;
573 568
574 /* Enable management port */ 569 /* Enable management port */
575 macb_writel(bp, NCR, MACB_BIT(MPE)); 570 macb_writel(bp, NCR, MACB_BIT(MPE));
@@ -592,12 +587,23 @@ static int macb_mii_init(struct macb *bp)
592 dev_set_drvdata(&bp->dev->dev, bp->mii_bus); 587 dev_set_drvdata(&bp->dev->dev, bp->mii_bus);
593 588
594 np = bp->pdev->dev.of_node; 589 np = bp->pdev->dev.of_node;
595 if (pdata) 590 if (np && of_phy_is_fixed_link(np)) {
596 bp->mii_bus->phy_mask = pdata->phy_mask; 591 if (of_phy_register_fixed_link(np) < 0) {
592 dev_err(&bp->pdev->dev,
593 "broken fixed-link specification %pOF\n", np);
594 goto err_out_free_mdiobus;
595 }
596
597 err = mdiobus_register(bp->mii_bus);
598 } else {
599 if (pdata)
600 bp->mii_bus->phy_mask = pdata->phy_mask;
601
602 err = of_mdiobus_register(bp->mii_bus, np);
603 }
597 604
598 err = of_mdiobus_register(bp->mii_bus, np);
599 if (err) 605 if (err)
600 goto err_out_free_mdiobus; 606 goto err_out_free_fixed_link;
601 607
602 err = macb_mii_probe(bp->dev); 608 err = macb_mii_probe(bp->dev);
603 if (err) 609 if (err)
@@ -607,6 +613,7 @@ static int macb_mii_init(struct macb *bp)
607 613
608err_out_unregister_bus: 614err_out_unregister_bus:
609 mdiobus_unregister(bp->mii_bus); 615 mdiobus_unregister(bp->mii_bus);
616err_out_free_fixed_link:
610 if (np && of_phy_is_fixed_link(np)) 617 if (np && of_phy_is_fixed_link(np))
611 of_phy_deregister_fixed_link(np); 618 of_phy_deregister_fixed_link(np);
612err_out_free_mdiobus: 619err_out_free_mdiobus:
@@ -2028,14 +2035,17 @@ static void macb_reset_hw(struct macb *bp)
2028{ 2035{
2029 struct macb_queue *queue; 2036 struct macb_queue *queue;
2030 unsigned int q; 2037 unsigned int q;
2038 u32 ctrl = macb_readl(bp, NCR);
2031 2039
2032 /* Disable RX and TX (XXX: Should we halt the transmission 2040 /* Disable RX and TX (XXX: Should we halt the transmission
2033 * more gracefully?) 2041 * more gracefully?)
2034 */ 2042 */
2035 macb_writel(bp, NCR, 0); 2043 ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE));
2036 2044
2037 /* Clear the stats registers (XXX: Update stats first?) */ 2045 /* Clear the stats registers (XXX: Update stats first?) */
2038 macb_writel(bp, NCR, MACB_BIT(CLRSTAT)); 2046 ctrl |= MACB_BIT(CLRSTAT);
2047
2048 macb_writel(bp, NCR, ctrl);
2039 2049
2040 /* Clear all status flags */ 2050 /* Clear all status flags */
2041 macb_writel(bp, TSR, -1); 2051 macb_writel(bp, TSR, -1);
@@ -2223,7 +2233,7 @@ static void macb_init_hw(struct macb *bp)
2223 } 2233 }
2224 2234
2225 /* Enable TX and RX */ 2235 /* Enable TX and RX */
2226 macb_writel(bp, NCR, MACB_BIT(RE) | MACB_BIT(TE) | MACB_BIT(MPE)); 2236 macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE));
2227} 2237}
2228 2238
2229/* The hash address register is 64 bits long and takes up two 2239/* The hash address register is 64 bits long and takes up two
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
index 623f73dd7738..c116f96956fe 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
@@ -417,10 +417,9 @@ static void cxgb4_process_flow_actions(struct net_device *in,
417 struct ch_filter_specification *fs) 417 struct ch_filter_specification *fs)
418{ 418{
419 const struct tc_action *a; 419 const struct tc_action *a;
420 LIST_HEAD(actions); 420 int i;
421 421
422 tcf_exts_to_list(cls->exts, &actions); 422 tcf_exts_for_each_action(i, a, cls->exts) {
423 list_for_each_entry(a, &actions, list) {
424 if (is_tcf_gact_ok(a)) { 423 if (is_tcf_gact_ok(a)) {
425 fs->action = FILTER_PASS; 424 fs->action = FILTER_PASS;
426 } else if (is_tcf_gact_shot(a)) { 425 } else if (is_tcf_gact_shot(a)) {
@@ -591,10 +590,9 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,
591 bool act_redir = false; 590 bool act_redir = false;
592 bool act_pedit = false; 591 bool act_pedit = false;
593 bool act_vlan = false; 592 bool act_vlan = false;
594 LIST_HEAD(actions); 593 int i;
595 594
596 tcf_exts_to_list(cls->exts, &actions); 595 tcf_exts_for_each_action(i, a, cls->exts) {
597 list_for_each_entry(a, &actions, list) {
598 if (is_tcf_gact_ok(a)) { 596 if (is_tcf_gact_ok(a)) {
599 /* Do nothing */ 597 /* Do nothing */
600 } else if (is_tcf_gact_shot(a)) { 598 } else if (is_tcf_gact_shot(a)) {
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
index 18eb2aedd4cb..c7d2b4dc7568 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
@@ -93,14 +93,13 @@ static int fill_action_fields(struct adapter *adap,
93 unsigned int num_actions = 0; 93 unsigned int num_actions = 0;
94 const struct tc_action *a; 94 const struct tc_action *a;
95 struct tcf_exts *exts; 95 struct tcf_exts *exts;
96 LIST_HEAD(actions); 96 int i;
97 97
98 exts = cls->knode.exts; 98 exts = cls->knode.exts;
99 if (!tcf_exts_has_actions(exts)) 99 if (!tcf_exts_has_actions(exts))
100 return -EINVAL; 100 return -EINVAL;
101 101
102 tcf_exts_to_list(exts, &actions); 102 tcf_exts_for_each_action(i, a, exts) {
103 list_for_each_entry(a, &actions, list) {
104 /* Don't allow more than one action per rule. */ 103 /* Don't allow more than one action per rule. */
105 if (num_actions) 104 if (num_actions)
106 return -EINVAL; 105 return -EINVAL;
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.h b/drivers/net/ethernet/hisilicon/hns/hnae.h
index fa5b30f547f6..cad52bd331f7 100644
--- a/drivers/net/ethernet/hisilicon/hns/hnae.h
+++ b/drivers/net/ethernet/hisilicon/hns/hnae.h
@@ -220,10 +220,10 @@ struct hnae_desc_cb {
220 220
221 /* priv data for the desc, e.g. skb when use with ip stack*/ 221 /* priv data for the desc, e.g. skb when use with ip stack*/
222 void *priv; 222 void *priv;
223 u16 page_offset; 223 u32 page_offset;
224 u16 reuse_flag; 224 u32 length; /* length of the buffer */
225 225
226 u16 length; /* length of the buffer */ 226 u16 reuse_flag;
227 227
228 /* desc type, used by the ring user to mark the type of the priv data */ 228 /* desc type, used by the ring user to mark the type of the priv data */
229 u16 type; 229 u16 type;
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 9f2b552aee33..02a0ba20fad5 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -406,113 +406,13 @@ out_net_tx_busy:
406 return NETDEV_TX_BUSY; 406 return NETDEV_TX_BUSY;
407} 407}
408 408
409/**
410 * hns_nic_get_headlen - determine size of header for RSC/LRO/GRO/FCOE
411 * @data: pointer to the start of the headers
412 * @max: total length of section to find headers in
413 *
414 * This function is meant to determine the length of headers that will
415 * be recognized by hardware for LRO, GRO, and RSC offloads. The main
416 * motivation of doing this is to only perform one pull for IPv4 TCP
417 * packets so that we can do basic things like calculating the gso_size
418 * based on the average data per packet.
419 **/
420static unsigned int hns_nic_get_headlen(unsigned char *data, u32 flag,
421 unsigned int max_size)
422{
423 unsigned char *network;
424 u8 hlen;
425
426 /* this should never happen, but better safe than sorry */
427 if (max_size < ETH_HLEN)
428 return max_size;
429
430 /* initialize network frame pointer */
431 network = data;
432
433 /* set first protocol and move network header forward */
434 network += ETH_HLEN;
435
436 /* handle any vlan tag if present */
437 if (hnae_get_field(flag, HNS_RXD_VLAN_M, HNS_RXD_VLAN_S)
438 == HNS_RX_FLAG_VLAN_PRESENT) {
439 if ((typeof(max_size))(network - data) > (max_size - VLAN_HLEN))
440 return max_size;
441
442 network += VLAN_HLEN;
443 }
444
445 /* handle L3 protocols */
446 if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
447 == HNS_RX_FLAG_L3ID_IPV4) {
448 if ((typeof(max_size))(network - data) >
449 (max_size - sizeof(struct iphdr)))
450 return max_size;
451
452 /* access ihl as a u8 to avoid unaligned access on ia64 */
453 hlen = (network[0] & 0x0F) << 2;
454
455 /* verify hlen meets minimum size requirements */
456 if (hlen < sizeof(struct iphdr))
457 return network - data;
458
459 /* record next protocol if header is present */
460 } else if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
461 == HNS_RX_FLAG_L3ID_IPV6) {
462 if ((typeof(max_size))(network - data) >
463 (max_size - sizeof(struct ipv6hdr)))
464 return max_size;
465
466 /* record next protocol */
467 hlen = sizeof(struct ipv6hdr);
468 } else {
469 return network - data;
470 }
471
472 /* relocate pointer to start of L4 header */
473 network += hlen;
474
475 /* finally sort out TCP/UDP */
476 if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
477 == HNS_RX_FLAG_L4ID_TCP) {
478 if ((typeof(max_size))(network - data) >
479 (max_size - sizeof(struct tcphdr)))
480 return max_size;
481
482 /* access doff as a u8 to avoid unaligned access on ia64 */
483 hlen = (network[12] & 0xF0) >> 2;
484
485 /* verify hlen meets minimum size requirements */
486 if (hlen < sizeof(struct tcphdr))
487 return network - data;
488
489 network += hlen;
490 } else if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
491 == HNS_RX_FLAG_L4ID_UDP) {
492 if ((typeof(max_size))(network - data) >
493 (max_size - sizeof(struct udphdr)))
494 return max_size;
495
496 network += sizeof(struct udphdr);
497 }
498
499 /* If everything has gone correctly network should be the
500 * data section of the packet and will be the end of the header.
501 * If not then it probably represents the end of the last recognized
502 * header.
503 */
504 if ((typeof(max_size))(network - data) < max_size)
505 return network - data;
506 else
507 return max_size;
508}
509
510static void hns_nic_reuse_page(struct sk_buff *skb, int i, 409static void hns_nic_reuse_page(struct sk_buff *skb, int i,
511 struct hnae_ring *ring, int pull_len, 410 struct hnae_ring *ring, int pull_len,
512 struct hnae_desc_cb *desc_cb) 411 struct hnae_desc_cb *desc_cb)
513{ 412{
514 struct hnae_desc *desc; 413 struct hnae_desc *desc;
515 int truesize, size; 414 u32 truesize;
415 int size;
516 int last_offset; 416 int last_offset;
517 bool twobufs; 417 bool twobufs;
518 418
@@ -530,7 +430,7 @@ static void hns_nic_reuse_page(struct sk_buff *skb, int i,
530 } 430 }
531 431
532 skb_add_rx_frag(skb, i, desc_cb->priv, desc_cb->page_offset + pull_len, 432 skb_add_rx_frag(skb, i, desc_cb->priv, desc_cb->page_offset + pull_len,
533 size - pull_len, truesize - pull_len); 433 size - pull_len, truesize);
534 434
535 /* avoid re-using remote pages,flag default unreuse */ 435 /* avoid re-using remote pages,flag default unreuse */
536 if (unlikely(page_to_nid(desc_cb->priv) != numa_node_id())) 436 if (unlikely(page_to_nid(desc_cb->priv) != numa_node_id()))
@@ -695,7 +595,7 @@ static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
695 } else { 595 } else {
696 ring->stats.seg_pkt_cnt++; 596 ring->stats.seg_pkt_cnt++;
697 597
698 pull_len = hns_nic_get_headlen(va, bnum_flag, HNS_RX_HEAD_SIZE); 598 pull_len = eth_get_headlen(va, HNS_RX_HEAD_SIZE);
699 memcpy(__skb_put(skb, pull_len), va, 599 memcpy(__skb_put(skb, pull_len), va,
700 ALIGN(pull_len, sizeof(long))); 600 ALIGN(pull_len, sizeof(long)));
701 601
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 3554dca7a680..955c4ab18b03 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2019,7 +2019,8 @@ static void hns3_nic_reuse_page(struct sk_buff *skb, int i,
2019 struct hns3_desc_cb *desc_cb) 2019 struct hns3_desc_cb *desc_cb)
2020{ 2020{
2021 struct hns3_desc *desc; 2021 struct hns3_desc *desc;
2022 int truesize, size; 2022 u32 truesize;
2023 int size;
2023 int last_offset; 2024 int last_offset;
2024 bool twobufs; 2025 bool twobufs;
2025 2026
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
index a02a96aee2a2..cb450d7ec8c1 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
@@ -284,11 +284,11 @@ struct hns3_desc_cb {
284 284
285 /* priv data for the desc, e.g. skb when use with ip stack*/ 285 /* priv data for the desc, e.g. skb when use with ip stack*/
286 void *priv; 286 void *priv;
287 u16 page_offset; 287 u32 page_offset;
288 u16 reuse_flag;
289
290 u32 length; /* length of the buffer */ 288 u32 length; /* length of the buffer */
291 289
290 u16 reuse_flag;
291
292 /* desc type, used by the ring user to mark the type of the priv data */ 292 /* desc type, used by the ring user to mark the type of the priv data */
293 u16 type; 293 u16 type;
294}; 294};
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index bdb3f8e65ed4..2569a168334c 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -624,14 +624,14 @@ static int e1000_set_ringparam(struct net_device *netdev,
624 adapter->tx_ring = tx_old; 624 adapter->tx_ring = tx_old;
625 e1000_free_all_rx_resources(adapter); 625 e1000_free_all_rx_resources(adapter);
626 e1000_free_all_tx_resources(adapter); 626 e1000_free_all_tx_resources(adapter);
627 kfree(tx_old);
628 kfree(rx_old);
629 adapter->rx_ring = rxdr; 627 adapter->rx_ring = rxdr;
630 adapter->tx_ring = txdr; 628 adapter->tx_ring = txdr;
631 err = e1000_up(adapter); 629 err = e1000_up(adapter);
632 if (err) 630 if (err)
633 goto err_setup; 631 goto err_setup;
634 } 632 }
633 kfree(tx_old);
634 kfree(rx_old);
635 635
636 clear_bit(__E1000_RESETTING, &adapter->flags); 636 clear_bit(__E1000_RESETTING, &adapter->flags);
637 return 0; 637 return 0;
@@ -644,7 +644,8 @@ err_setup_rx:
644err_alloc_rx: 644err_alloc_rx:
645 kfree(txdr); 645 kfree(txdr);
646err_alloc_tx: 646err_alloc_tx:
647 e1000_up(adapter); 647 if (netif_running(adapter->netdev))
648 e1000_up(adapter);
648err_setup: 649err_setup:
649 clear_bit(__E1000_RESETTING, &adapter->flags); 650 clear_bit(__E1000_RESETTING, &adapter->flags);
650 return err; 651 return err;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index abcd096ede14..5ff6caa83948 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2013,7 +2013,7 @@ static void i40e_get_stat_strings(struct net_device *netdev, u8 *data)
2013 for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) 2013 for (i = 0; i < I40E_MAX_USER_PRIORITY; i++)
2014 i40e_add_stat_strings(&data, i40e_gstrings_pfc_stats, i); 2014 i40e_add_stat_strings(&data, i40e_gstrings_pfc_stats, i);
2015 2015
2016 WARN_ONCE(p - data != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN, 2016 WARN_ONCE(data - p != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN,
2017 "stat strings count mismatch!"); 2017 "stat strings count mismatch!");
2018} 2018}
2019 2019
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index f2c622e78802..ac685ad4d877 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -5122,15 +5122,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
5122 u8 *bw_share) 5122 u8 *bw_share)
5123{ 5123{
5124 struct i40e_aqc_configure_vsi_tc_bw_data bw_data; 5124 struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
5125 struct i40e_pf *pf = vsi->back;
5125 i40e_status ret; 5126 i40e_status ret;
5126 int i; 5127 int i;
5127 5128
5128 if (vsi->back->flags & I40E_FLAG_TC_MQPRIO) 5129 /* There is no need to reset BW when mqprio mode is on. */
5130 if (pf->flags & I40E_FLAG_TC_MQPRIO)
5129 return 0; 5131 return 0;
5130 if (!vsi->mqprio_qopt.qopt.hw) { 5132 if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
5131 ret = i40e_set_bw_limit(vsi, vsi->seid, 0); 5133 ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
5132 if (ret) 5134 if (ret)
5133 dev_info(&vsi->back->pdev->dev, 5135 dev_info(&pf->pdev->dev,
5134 "Failed to reset tx rate for vsi->seid %u\n", 5136 "Failed to reset tx rate for vsi->seid %u\n",
5135 vsi->seid); 5137 vsi->seid);
5136 return ret; 5138 return ret;
@@ -5139,12 +5141,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
5139 for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) 5141 for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
5140 bw_data.tc_bw_credits[i] = bw_share[i]; 5142 bw_data.tc_bw_credits[i] = bw_share[i];
5141 5143
5142 ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data, 5144 ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL);
5143 NULL);
5144 if (ret) { 5145 if (ret) {
5145 dev_info(&vsi->back->pdev->dev, 5146 dev_info(&pf->pdev->dev,
5146 "AQ command Config VSI BW allocation per TC failed = %d\n", 5147 "AQ command Config VSI BW allocation per TC failed = %d\n",
5147 vsi->back->hw.aq.asq_last_status); 5148 pf->hw.aq.asq_last_status);
5148 return -EINVAL; 5149 return -EINVAL;
5149 } 5150 }
5150 5151
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index d8b5fff581e7..868f4a1d0f72 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -89,6 +89,13 @@ extern const char ice_drv_ver[];
89#define ice_for_each_rxq(vsi, i) \ 89#define ice_for_each_rxq(vsi, i) \
90 for ((i) = 0; (i) < (vsi)->num_rxq; (i)++) 90 for ((i) = 0; (i) < (vsi)->num_rxq; (i)++)
91 91
92/* Macros for each allocated tx/rx ring whether used or not in a VSI */
93#define ice_for_each_alloc_txq(vsi, i) \
94 for ((i) = 0; (i) < (vsi)->alloc_txq; (i)++)
95
96#define ice_for_each_alloc_rxq(vsi, i) \
97 for ((i) = 0; (i) < (vsi)->alloc_rxq; (i)++)
98
92struct ice_tc_info { 99struct ice_tc_info {
93 u16 qoffset; 100 u16 qoffset;
94 u16 qcount; 101 u16 qcount;
@@ -189,9 +196,9 @@ struct ice_vsi {
189 struct list_head tmp_sync_list; /* MAC filters to be synced */ 196 struct list_head tmp_sync_list; /* MAC filters to be synced */
190 struct list_head tmp_unsync_list; /* MAC filters to be unsynced */ 197 struct list_head tmp_unsync_list; /* MAC filters to be unsynced */
191 198
192 bool irqs_ready; 199 u8 irqs_ready;
193 bool current_isup; /* Sync 'link up' logging */ 200 u8 current_isup; /* Sync 'link up' logging */
194 bool stat_offsets_loaded; 201 u8 stat_offsets_loaded;
195 202
196 /* queue information */ 203 /* queue information */
197 u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */ 204 u8 tx_mapping_mode; /* ICE_MAP_MODE_[CONTIG|SCATTER] */
@@ -262,7 +269,7 @@ struct ice_pf {
262 struct ice_hw_port_stats stats; 269 struct ice_hw_port_stats stats;
263 struct ice_hw_port_stats stats_prev; 270 struct ice_hw_port_stats stats_prev;
264 struct ice_hw hw; 271 struct ice_hw hw;
265 bool stat_prev_loaded; /* has previous stats been loaded */ 272 u8 stat_prev_loaded; /* has previous stats been loaded */
266 char int_name[ICE_INT_NAME_STR_LEN]; 273 char int_name[ICE_INT_NAME_STR_LEN];
267}; 274};
268 275
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 7541ec2270b3..a0614f472658 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -329,19 +329,19 @@ struct ice_aqc_vsi_props {
329 /* VLAN section */ 329 /* VLAN section */
330 __le16 pvid; /* VLANS include priority bits */ 330 __le16 pvid; /* VLANS include priority bits */
331 u8 pvlan_reserved[2]; 331 u8 pvlan_reserved[2];
332 u8 port_vlan_flags; 332 u8 vlan_flags;
333#define ICE_AQ_VSI_PVLAN_MODE_S 0 333#define ICE_AQ_VSI_VLAN_MODE_S 0
334#define ICE_AQ_VSI_PVLAN_MODE_M (0x3 << ICE_AQ_VSI_PVLAN_MODE_S) 334#define ICE_AQ_VSI_VLAN_MODE_M (0x3 << ICE_AQ_VSI_VLAN_MODE_S)
335#define ICE_AQ_VSI_PVLAN_MODE_UNTAGGED 0x1 335#define ICE_AQ_VSI_VLAN_MODE_UNTAGGED 0x1
336#define ICE_AQ_VSI_PVLAN_MODE_TAGGED 0x2 336#define ICE_AQ_VSI_VLAN_MODE_TAGGED 0x2
337#define ICE_AQ_VSI_PVLAN_MODE_ALL 0x3 337#define ICE_AQ_VSI_VLAN_MODE_ALL 0x3
338#define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2) 338#define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2)
339#define ICE_AQ_VSI_PVLAN_EMOD_S 3 339#define ICE_AQ_VSI_VLAN_EMOD_S 3
340#define ICE_AQ_VSI_PVLAN_EMOD_M (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S) 340#define ICE_AQ_VSI_VLAN_EMOD_M (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
341#define ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_PVLAN_EMOD_S) 341#define ICE_AQ_VSI_VLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_VLAN_EMOD_S)
342#define ICE_AQ_VSI_PVLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_PVLAN_EMOD_S) 342#define ICE_AQ_VSI_VLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_VLAN_EMOD_S)
343#define ICE_AQ_VSI_PVLAN_EMOD_STR (0x2 << ICE_AQ_VSI_PVLAN_EMOD_S) 343#define ICE_AQ_VSI_VLAN_EMOD_STR (0x2 << ICE_AQ_VSI_VLAN_EMOD_S)
344#define ICE_AQ_VSI_PVLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S) 344#define ICE_AQ_VSI_VLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
345 u8 pvlan_reserved2[3]; 345 u8 pvlan_reserved2[3];
346 /* ingress egress up sections */ 346 /* ingress egress up sections */
347 __le32 ingress_table; /* bitmap, 3 bits per up */ 347 __le32 ingress_table; /* bitmap, 3 bits per up */
@@ -594,6 +594,7 @@ struct ice_sw_rule_lg_act {
594#define ICE_LG_ACT_GENERIC_OFFSET_M (0x7 << ICE_LG_ACT_GENERIC_OFFSET_S) 594#define ICE_LG_ACT_GENERIC_OFFSET_M (0x7 << ICE_LG_ACT_GENERIC_OFFSET_S)
595#define ICE_LG_ACT_GENERIC_PRIORITY_S 22 595#define ICE_LG_ACT_GENERIC_PRIORITY_S 22
596#define ICE_LG_ACT_GENERIC_PRIORITY_M (0x7 << ICE_LG_ACT_GENERIC_PRIORITY_S) 596#define ICE_LG_ACT_GENERIC_PRIORITY_M (0x7 << ICE_LG_ACT_GENERIC_PRIORITY_S)
597#define ICE_LG_ACT_GENERIC_OFF_RX_DESC_PROF_IDX 7
597 598
598 /* Action = 7 - Set Stat count */ 599 /* Action = 7 - Set Stat count */
599#define ICE_LG_ACT_STAT_COUNT 0x7 600#define ICE_LG_ACT_STAT_COUNT 0x7
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 71d032cc5fa7..661beea6af79 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -45,6 +45,9 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw)
45/** 45/**
46 * ice_clear_pf_cfg - Clear PF configuration 46 * ice_clear_pf_cfg - Clear PF configuration
47 * @hw: pointer to the hardware structure 47 * @hw: pointer to the hardware structure
48 *
49 * Clears any existing PF configuration (VSIs, VSI lists, switch rules, port
50 * configuration, flow director filters, etc.).
48 */ 51 */
49enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) 52enum ice_status ice_clear_pf_cfg(struct ice_hw *hw)
50{ 53{
@@ -1483,7 +1486,7 @@ enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up)
1483 struct ice_phy_info *phy_info; 1486 struct ice_phy_info *phy_info;
1484 enum ice_status status = 0; 1487 enum ice_status status = 0;
1485 1488
1486 if (!pi) 1489 if (!pi || !link_up)
1487 return ICE_ERR_PARAM; 1490 return ICE_ERR_PARAM;
1488 1491
1489 phy_info = &pi->phy; 1492 phy_info = &pi->phy;
@@ -1619,20 +1622,23 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, u16 vsi_id, u8 lut_type, u8 *lut,
1619 } 1622 }
1620 1623
1621 /* LUT size is only valid for Global and PF table types */ 1624 /* LUT size is only valid for Global and PF table types */
1622 if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128) { 1625 switch (lut_size) {
1623 flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG << 1626 case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128:
1624 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & 1627 break;
1625 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; 1628 case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512:
1626 } else if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512) {
1627 flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << 1629 flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG <<
1628 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & 1630 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
1629 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; 1631 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
1630 } else if ((lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K) && 1632 break;
1631 (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF)) { 1633 case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K:
1632 flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << 1634 if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) {
1633 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & 1635 flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG <<
1634 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; 1636 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
1635 } else { 1637 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
1638 break;
1639 }
1640 /* fall-through */
1641 default:
1636 status = ICE_ERR_PARAM; 1642 status = ICE_ERR_PARAM;
1637 goto ice_aq_get_set_rss_lut_exit; 1643 goto ice_aq_get_set_rss_lut_exit;
1638 } 1644 }
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
index 7c511f144ed6..62be72fdc8f3 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.c
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
@@ -597,10 +597,14 @@ static enum ice_status ice_init_check_adminq(struct ice_hw *hw)
597 return 0; 597 return 0;
598 598
599init_ctrlq_free_rq: 599init_ctrlq_free_rq:
600 ice_shutdown_rq(hw, cq); 600 if (cq->rq.head) {
601 ice_shutdown_sq(hw, cq); 601 ice_shutdown_rq(hw, cq);
602 mutex_destroy(&cq->sq_lock); 602 mutex_destroy(&cq->rq_lock);
603 mutex_destroy(&cq->rq_lock); 603 }
604 if (cq->sq.head) {
605 ice_shutdown_sq(hw, cq);
606 mutex_destroy(&cq->sq_lock);
607 }
604 return status; 608 return status;
605} 609}
606 610
@@ -706,10 +710,14 @@ static void ice_shutdown_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type)
706 return; 710 return;
707 } 711 }
708 712
709 ice_shutdown_sq(hw, cq); 713 if (cq->sq.head) {
710 ice_shutdown_rq(hw, cq); 714 ice_shutdown_sq(hw, cq);
711 mutex_destroy(&cq->sq_lock); 715 mutex_destroy(&cq->sq_lock);
712 mutex_destroy(&cq->rq_lock); 716 }
717 if (cq->rq.head) {
718 ice_shutdown_rq(hw, cq);
719 mutex_destroy(&cq->rq_lock);
720 }
713} 721}
714 722
715/** 723/**
@@ -1057,8 +1065,11 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
1057 1065
1058clean_rq_elem_out: 1066clean_rq_elem_out:
1059 /* Set pending if needed, unlock and return */ 1067 /* Set pending if needed, unlock and return */
1060 if (pending) 1068 if (pending) {
1069 /* re-read HW head to calculate actual pending messages */
1070 ntu = (u16)(rd32(hw, cq->rq.head) & cq->rq.head_mask);
1061 *pending = (u16)((ntc > ntu ? cq->rq.count : 0) + (ntu - ntc)); 1071 *pending = (u16)((ntc > ntu ? cq->rq.count : 0) + (ntu - ntc));
1072 }
1062clean_rq_elem_err: 1073clean_rq_elem_err:
1063 mutex_unlock(&cq->rq_lock); 1074 mutex_unlock(&cq->rq_lock);
1064 1075
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index 1db304c01d10..c71a9b528d6d 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -26,7 +26,7 @@ static int ice_q_stats_len(struct net_device *netdev)
26{ 26{
27 struct ice_netdev_priv *np = netdev_priv(netdev); 27 struct ice_netdev_priv *np = netdev_priv(netdev);
28 28
29 return ((np->vsi->num_txq + np->vsi->num_rxq) * 29 return ((np->vsi->alloc_txq + np->vsi->alloc_rxq) *
30 (sizeof(struct ice_q_stats) / sizeof(u64))); 30 (sizeof(struct ice_q_stats) / sizeof(u64)));
31} 31}
32 32
@@ -218,7 +218,7 @@ static void ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
218 p += ETH_GSTRING_LEN; 218 p += ETH_GSTRING_LEN;
219 } 219 }
220 220
221 ice_for_each_txq(vsi, i) { 221 ice_for_each_alloc_txq(vsi, i) {
222 snprintf(p, ETH_GSTRING_LEN, 222 snprintf(p, ETH_GSTRING_LEN,
223 "tx-queue-%u.tx_packets", i); 223 "tx-queue-%u.tx_packets", i);
224 p += ETH_GSTRING_LEN; 224 p += ETH_GSTRING_LEN;
@@ -226,7 +226,7 @@ static void ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
226 p += ETH_GSTRING_LEN; 226 p += ETH_GSTRING_LEN;
227 } 227 }
228 228
229 ice_for_each_rxq(vsi, i) { 229 ice_for_each_alloc_rxq(vsi, i) {
230 snprintf(p, ETH_GSTRING_LEN, 230 snprintf(p, ETH_GSTRING_LEN,
231 "rx-queue-%u.rx_packets", i); 231 "rx-queue-%u.rx_packets", i);
232 p += ETH_GSTRING_LEN; 232 p += ETH_GSTRING_LEN;
@@ -253,6 +253,24 @@ static int ice_get_sset_count(struct net_device *netdev, int sset)
253{ 253{
254 switch (sset) { 254 switch (sset) {
255 case ETH_SS_STATS: 255 case ETH_SS_STATS:
256 /* The number (and order) of strings reported *must* remain
257 * constant for a given netdevice. This function must not
258 * report a different number based on run time parameters
259 * (such as the number of queues in use, or the setting of
260 * a private ethtool flag). This is due to the nature of the
261 * ethtool stats API.
262 *
263 * User space programs such as ethtool must make 3 separate
264 * ioctl requests, one for size, one for the strings, and
265 * finally one for the stats. Since these cross into
266 * user space, changes to the number or size could result in
267 * undefined memory access or incorrect string<->value
268 * correlations for statistics.
269 *
270 * Even if it appears to be safe, changes to the size or
271 * order of strings will suffer from race conditions and are
272 * not safe.
273 */
256 return ICE_ALL_STATS_LEN(netdev); 274 return ICE_ALL_STATS_LEN(netdev);
257 default: 275 default:
258 return -EOPNOTSUPP; 276 return -EOPNOTSUPP;
@@ -280,18 +298,26 @@ ice_get_ethtool_stats(struct net_device *netdev,
280 /* populate per queue stats */ 298 /* populate per queue stats */
281 rcu_read_lock(); 299 rcu_read_lock();
282 300
283 ice_for_each_txq(vsi, j) { 301 ice_for_each_alloc_txq(vsi, j) {
284 ring = READ_ONCE(vsi->tx_rings[j]); 302 ring = READ_ONCE(vsi->tx_rings[j]);
285 if (!ring) 303 if (ring) {
286 continue; 304 data[i++] = ring->stats.pkts;
287 data[i++] = ring->stats.pkts; 305 data[i++] = ring->stats.bytes;
288 data[i++] = ring->stats.bytes; 306 } else {
307 data[i++] = 0;
308 data[i++] = 0;
309 }
289 } 310 }
290 311
291 ice_for_each_rxq(vsi, j) { 312 ice_for_each_alloc_rxq(vsi, j) {
292 ring = READ_ONCE(vsi->rx_rings[j]); 313 ring = READ_ONCE(vsi->rx_rings[j]);
293 data[i++] = ring->stats.pkts; 314 if (ring) {
294 data[i++] = ring->stats.bytes; 315 data[i++] = ring->stats.pkts;
316 data[i++] = ring->stats.bytes;
317 } else {
318 data[i++] = 0;
319 data[i++] = 0;
320 }
295 } 321 }
296 322
297 rcu_read_unlock(); 323 rcu_read_unlock();
@@ -519,7 +545,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
519 goto done; 545 goto done;
520 } 546 }
521 547
522 for (i = 0; i < vsi->num_txq; i++) { 548 for (i = 0; i < vsi->alloc_txq; i++) {
523 /* clone ring and setup updated count */ 549 /* clone ring and setup updated count */
524 tx_rings[i] = *vsi->tx_rings[i]; 550 tx_rings[i] = *vsi->tx_rings[i];
525 tx_rings[i].count = new_tx_cnt; 551 tx_rings[i].count = new_tx_cnt;
@@ -551,7 +577,7 @@ process_rx:
551 goto done; 577 goto done;
552 } 578 }
553 579
554 for (i = 0; i < vsi->num_rxq; i++) { 580 for (i = 0; i < vsi->alloc_rxq; i++) {
555 /* clone ring and setup updated count */ 581 /* clone ring and setup updated count */
556 rx_rings[i] = *vsi->rx_rings[i]; 582 rx_rings[i] = *vsi->rx_rings[i];
557 rx_rings[i].count = new_rx_cnt; 583 rx_rings[i].count = new_rx_cnt;
diff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
index 499904874b3f..6076fc87df9d 100644
--- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
+++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h
@@ -121,10 +121,6 @@
121#define PFINT_FW_CTL_CAUSE_ENA_S 30 121#define PFINT_FW_CTL_CAUSE_ENA_S 30
122#define PFINT_FW_CTL_CAUSE_ENA_M BIT(PFINT_FW_CTL_CAUSE_ENA_S) 122#define PFINT_FW_CTL_CAUSE_ENA_M BIT(PFINT_FW_CTL_CAUSE_ENA_S)
123#define PFINT_OICR 0x0016CA00 123#define PFINT_OICR 0x0016CA00
124#define PFINT_OICR_HLP_RDY_S 14
125#define PFINT_OICR_HLP_RDY_M BIT(PFINT_OICR_HLP_RDY_S)
126#define PFINT_OICR_CPM_RDY_S 15
127#define PFINT_OICR_CPM_RDY_M BIT(PFINT_OICR_CPM_RDY_S)
128#define PFINT_OICR_ECC_ERR_S 16 124#define PFINT_OICR_ECC_ERR_S 16
129#define PFINT_OICR_ECC_ERR_M BIT(PFINT_OICR_ECC_ERR_S) 125#define PFINT_OICR_ECC_ERR_M BIT(PFINT_OICR_ECC_ERR_S)
130#define PFINT_OICR_MAL_DETECT_S 19 126#define PFINT_OICR_MAL_DETECT_S 19
@@ -133,10 +129,6 @@
133#define PFINT_OICR_GRST_M BIT(PFINT_OICR_GRST_S) 129#define PFINT_OICR_GRST_M BIT(PFINT_OICR_GRST_S)
134#define PFINT_OICR_PCI_EXCEPTION_S 21 130#define PFINT_OICR_PCI_EXCEPTION_S 21
135#define PFINT_OICR_PCI_EXCEPTION_M BIT(PFINT_OICR_PCI_EXCEPTION_S) 131#define PFINT_OICR_PCI_EXCEPTION_M BIT(PFINT_OICR_PCI_EXCEPTION_S)
136#define PFINT_OICR_GPIO_S 22
137#define PFINT_OICR_GPIO_M BIT(PFINT_OICR_GPIO_S)
138#define PFINT_OICR_STORM_DETECT_S 24
139#define PFINT_OICR_STORM_DETECT_M BIT(PFINT_OICR_STORM_DETECT_S)
140#define PFINT_OICR_HMC_ERR_S 26 132#define PFINT_OICR_HMC_ERR_S 26
141#define PFINT_OICR_HMC_ERR_M BIT(PFINT_OICR_HMC_ERR_S) 133#define PFINT_OICR_HMC_ERR_M BIT(PFINT_OICR_HMC_ERR_S)
142#define PFINT_OICR_PE_CRITERR_S 28 134#define PFINT_OICR_PE_CRITERR_S 28
diff --git a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
index d23a91665b46..068dbc740b76 100644
--- a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
+++ b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
@@ -265,6 +265,7 @@ enum ice_rx_flex_desc_status_error_0_bits {
265struct ice_rlan_ctx { 265struct ice_rlan_ctx {
266 u16 head; 266 u16 head;
267 u16 cpuid; /* bigger than needed, see above for reason */ 267 u16 cpuid; /* bigger than needed, see above for reason */
268#define ICE_RLAN_BASE_S 7
268 u64 base; 269 u64 base;
269 u16 qlen; 270 u16 qlen;
270#define ICE_RLAN_CTX_DBUF_S 7 271#define ICE_RLAN_CTX_DBUF_S 7
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 5299caf55a7f..f1e80eed2fd6 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -901,7 +901,7 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
901 case ice_aqc_opc_get_link_status: 901 case ice_aqc_opc_get_link_status:
902 if (ice_handle_link_event(pf)) 902 if (ice_handle_link_event(pf))
903 dev_err(&pf->pdev->dev, 903 dev_err(&pf->pdev->dev,
904 "Could not handle link event"); 904 "Could not handle link event\n");
905 break; 905 break;
906 default: 906 default:
907 dev_dbg(&pf->pdev->dev, 907 dev_dbg(&pf->pdev->dev,
@@ -917,13 +917,27 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
917} 917}
918 918
919/** 919/**
920 * ice_ctrlq_pending - check if there is a difference between ntc and ntu
921 * @hw: pointer to hardware info
922 * @cq: control queue information
923 *
924 * returns true if there are pending messages in a queue, false if there aren't
925 */
926static bool ice_ctrlq_pending(struct ice_hw *hw, struct ice_ctl_q_info *cq)
927{
928 u16 ntu;
929
930 ntu = (u16)(rd32(hw, cq->rq.head) & cq->rq.head_mask);
931 return cq->rq.next_to_clean != ntu;
932}
933
934/**
920 * ice_clean_adminq_subtask - clean the AdminQ rings 935 * ice_clean_adminq_subtask - clean the AdminQ rings
921 * @pf: board private structure 936 * @pf: board private structure
922 */ 937 */
923static void ice_clean_adminq_subtask(struct ice_pf *pf) 938static void ice_clean_adminq_subtask(struct ice_pf *pf)
924{ 939{
925 struct ice_hw *hw = &pf->hw; 940 struct ice_hw *hw = &pf->hw;
926 u32 val;
927 941
928 if (!test_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state)) 942 if (!test_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state))
929 return; 943 return;
@@ -933,9 +947,13 @@ static void ice_clean_adminq_subtask(struct ice_pf *pf)
933 947
934 clear_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state); 948 clear_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state);
935 949
936 /* re-enable Admin queue interrupt causes */ 950 /* There might be a situation where new messages arrive to a control
937 val = rd32(hw, PFINT_FW_CTL); 951 * queue between processing the last message and clearing the
938 wr32(hw, PFINT_FW_CTL, (val | PFINT_FW_CTL_CAUSE_ENA_M)); 952 * EVENT_PENDING bit. So before exiting, check queue head again (using
953 * ice_ctrlq_pending) and process new messages if any.
954 */
955 if (ice_ctrlq_pending(hw, &hw->adminq))
956 __ice_clean_ctrlq(pf, ICE_CTL_Q_ADMIN);
939 957
940 ice_flush(hw); 958 ice_flush(hw);
941} 959}
@@ -1295,11 +1313,8 @@ static void ice_vsi_setup_q_map(struct ice_vsi *vsi, struct ice_vsi_ctx *ctxt)
1295 qcount = numq_tc; 1313 qcount = numq_tc;
1296 } 1314 }
1297 1315
1298 /* find higher power-of-2 of qcount */ 1316 /* find the (rounded up) power-of-2 of qcount */
1299 pow = ilog2(qcount); 1317 pow = order_base_2(qcount);
1300
1301 if (!is_power_of_2(qcount))
1302 pow++;
1303 1318
1304 for (i = 0; i < ICE_MAX_TRAFFIC_CLASS; i++) { 1319 for (i = 0; i < ICE_MAX_TRAFFIC_CLASS; i++) {
1305 if (!(vsi->tc_cfg.ena_tc & BIT(i))) { 1320 if (!(vsi->tc_cfg.ena_tc & BIT(i))) {
@@ -1352,14 +1367,15 @@ static void ice_set_dflt_vsi_ctx(struct ice_vsi_ctx *ctxt)
1352 ctxt->info.sw_flags = ICE_AQ_VSI_SW_FLAG_SRC_PRUNE; 1367 ctxt->info.sw_flags = ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
1353 /* Traffic from VSI can be sent to LAN */ 1368 /* Traffic from VSI can be sent to LAN */
1354 ctxt->info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA; 1369 ctxt->info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
1355 /* Allow all packets untagged/tagged */ 1370
1356 ctxt->info.port_vlan_flags = ((ICE_AQ_VSI_PVLAN_MODE_ALL & 1371 /* By default bits 3 and 4 in vlan_flags are 0's which results in legacy
1357 ICE_AQ_VSI_PVLAN_MODE_M) >> 1372 * behavior (show VLAN, DEI, and UP) in descriptor. Also, allow all
1358 ICE_AQ_VSI_PVLAN_MODE_S); 1373 * packets untagged/tagged.
1359 /* Show VLAN/UP from packets in Rx descriptors */ 1374 */
1360 ctxt->info.port_vlan_flags |= ((ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH & 1375 ctxt->info.vlan_flags = ((ICE_AQ_VSI_VLAN_MODE_ALL &
1361 ICE_AQ_VSI_PVLAN_EMOD_M) >> 1376 ICE_AQ_VSI_VLAN_MODE_M) >>
1362 ICE_AQ_VSI_PVLAN_EMOD_S); 1377 ICE_AQ_VSI_VLAN_MODE_S);
1378
1363 /* Have 1:1 UP mapping for both ingress/egress tables */ 1379 /* Have 1:1 UP mapping for both ingress/egress tables */
1364 table |= ICE_UP_TABLE_TRANSLATE(0, 0); 1380 table |= ICE_UP_TABLE_TRANSLATE(0, 0);
1365 table |= ICE_UP_TABLE_TRANSLATE(1, 1); 1381 table |= ICE_UP_TABLE_TRANSLATE(1, 1);
@@ -1688,15 +1704,12 @@ static void ice_ena_misc_vector(struct ice_pf *pf)
1688 wr32(hw, PFINT_OICR_ENA, 0); /* disable all */ 1704 wr32(hw, PFINT_OICR_ENA, 0); /* disable all */
1689 rd32(hw, PFINT_OICR); /* read to clear */ 1705 rd32(hw, PFINT_OICR); /* read to clear */
1690 1706
1691 val = (PFINT_OICR_HLP_RDY_M | 1707 val = (PFINT_OICR_ECC_ERR_M |
1692 PFINT_OICR_CPM_RDY_M |
1693 PFINT_OICR_ECC_ERR_M |
1694 PFINT_OICR_MAL_DETECT_M | 1708 PFINT_OICR_MAL_DETECT_M |
1695 PFINT_OICR_GRST_M | 1709 PFINT_OICR_GRST_M |
1696 PFINT_OICR_PCI_EXCEPTION_M | 1710 PFINT_OICR_PCI_EXCEPTION_M |
1697 PFINT_OICR_GPIO_M | 1711 PFINT_OICR_HMC_ERR_M |
1698 PFINT_OICR_STORM_DETECT_M | 1712 PFINT_OICR_PE_CRITERR_M);
1699 PFINT_OICR_HMC_ERR_M);
1700 1713
1701 wr32(hw, PFINT_OICR_ENA, val); 1714 wr32(hw, PFINT_OICR_ENA, val);
1702 1715
@@ -2058,15 +2071,13 @@ static int ice_req_irq_msix_misc(struct ice_pf *pf)
2058skip_req_irq: 2071skip_req_irq:
2059 ice_ena_misc_vector(pf); 2072 ice_ena_misc_vector(pf);
2060 2073
2061 val = (pf->oicr_idx & PFINT_OICR_CTL_MSIX_INDX_M) | 2074 val = ((pf->oicr_idx & PFINT_OICR_CTL_MSIX_INDX_M) |
2062 (ICE_RX_ITR & PFINT_OICR_CTL_ITR_INDX_M) | 2075 PFINT_OICR_CTL_CAUSE_ENA_M);
2063 PFINT_OICR_CTL_CAUSE_ENA_M;
2064 wr32(hw, PFINT_OICR_CTL, val); 2076 wr32(hw, PFINT_OICR_CTL, val);
2065 2077
2066 /* This enables Admin queue Interrupt causes */ 2078 /* This enables Admin queue Interrupt causes */
2067 val = (pf->oicr_idx & PFINT_FW_CTL_MSIX_INDX_M) | 2079 val = ((pf->oicr_idx & PFINT_FW_CTL_MSIX_INDX_M) |
2068 (ICE_RX_ITR & PFINT_FW_CTL_ITR_INDX_M) | 2080 PFINT_FW_CTL_CAUSE_ENA_M);
2069 PFINT_FW_CTL_CAUSE_ENA_M;
2070 wr32(hw, PFINT_FW_CTL, val); 2081 wr32(hw, PFINT_FW_CTL, val);
2071 2082
2072 itr_gran = hw->itr_gran_200; 2083 itr_gran = hw->itr_gran_200;
@@ -3246,8 +3257,10 @@ static void ice_clear_interrupt_scheme(struct ice_pf *pf)
3246 if (test_bit(ICE_FLAG_MSIX_ENA, pf->flags)) 3257 if (test_bit(ICE_FLAG_MSIX_ENA, pf->flags))
3247 ice_dis_msix(pf); 3258 ice_dis_msix(pf);
3248 3259
3249 devm_kfree(&pf->pdev->dev, pf->irq_tracker); 3260 if (pf->irq_tracker) {
3250 pf->irq_tracker = NULL; 3261 devm_kfree(&pf->pdev->dev, pf->irq_tracker);
3262 pf->irq_tracker = NULL;
3263 }
3251} 3264}
3252 3265
3253/** 3266/**
@@ -3271,7 +3284,7 @@ static int ice_probe(struct pci_dev *pdev,
3271 3284
3272 err = pcim_iomap_regions(pdev, BIT(ICE_BAR0), pci_name(pdev)); 3285 err = pcim_iomap_regions(pdev, BIT(ICE_BAR0), pci_name(pdev));
3273 if (err) { 3286 if (err) {
3274 dev_err(&pdev->dev, "I/O map error %d\n", err); 3287 dev_err(&pdev->dev, "BAR0 I/O map error %d\n", err);
3275 return err; 3288 return err;
3276 } 3289 }
3277 3290
@@ -3720,10 +3733,10 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi)
3720 enum ice_status status; 3733 enum ice_status status;
3721 3734
3722 /* Here we are configuring the VSI to let the driver add VLAN tags by 3735 /* Here we are configuring the VSI to let the driver add VLAN tags by
3723 * setting port_vlan_flags to ICE_AQ_VSI_PVLAN_MODE_ALL. The actual VLAN 3736 * setting vlan_flags to ICE_AQ_VSI_VLAN_MODE_ALL. The actual VLAN tag
3724 * tag insertion happens in the Tx hot path, in ice_tx_map. 3737 * insertion happens in the Tx hot path, in ice_tx_map.
3725 */ 3738 */
3726 ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_MODE_ALL; 3739 ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_MODE_ALL;
3727 3740
3728 ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID); 3741 ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID);
3729 ctxt.vsi_num = vsi->vsi_num; 3742 ctxt.vsi_num = vsi->vsi_num;
@@ -3735,7 +3748,7 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi)
3735 return -EIO; 3748 return -EIO;
3736 } 3749 }
3737 3750
3738 vsi->info.port_vlan_flags = ctxt.info.port_vlan_flags; 3751 vsi->info.vlan_flags = ctxt.info.vlan_flags;
3739 return 0; 3752 return 0;
3740} 3753}
3741 3754
@@ -3757,12 +3770,15 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena)
3757 */ 3770 */
3758 if (ena) { 3771 if (ena) {
3759 /* Strip VLAN tag from Rx packet and put it in the desc */ 3772 /* Strip VLAN tag from Rx packet and put it in the desc */
3760 ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH; 3773 ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_EMOD_STR_BOTH;
3761 } else { 3774 } else {
3762 /* Disable stripping. Leave tag in packet */ 3775 /* Disable stripping. Leave tag in packet */
3763 ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_EMOD_NOTHING; 3776 ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_EMOD_NOTHING;
3764 } 3777 }
3765 3778
3779 /* Allow all packets untagged/tagged */
3780 ctxt.info.vlan_flags |= ICE_AQ_VSI_VLAN_MODE_ALL;
3781
3766 ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID); 3782 ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID);
3767 ctxt.vsi_num = vsi->vsi_num; 3783 ctxt.vsi_num = vsi->vsi_num;
3768 3784
@@ -3773,7 +3789,7 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena)
3773 return -EIO; 3789 return -EIO;
3774 } 3790 }
3775 3791
3776 vsi->info.port_vlan_flags = ctxt.info.port_vlan_flags; 3792 vsi->info.vlan_flags = ctxt.info.vlan_flags;
3777 return 0; 3793 return 0;
3778} 3794}
3779 3795
@@ -3986,7 +4002,7 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)
3986 /* clear the context structure first */ 4002 /* clear the context structure first */
3987 memset(&rlan_ctx, 0, sizeof(rlan_ctx)); 4003 memset(&rlan_ctx, 0, sizeof(rlan_ctx));
3988 4004
3989 rlan_ctx.base = ring->dma >> 7; 4005 rlan_ctx.base = ring->dma >> ICE_RLAN_BASE_S;
3990 4006
3991 rlan_ctx.qlen = ring->count; 4007 rlan_ctx.qlen = ring->count;
3992 4008
@@ -4098,11 +4114,12 @@ static int ice_vsi_cfg(struct ice_vsi *vsi)
4098{ 4114{
4099 int err; 4115 int err;
4100 4116
4101 ice_set_rx_mode(vsi->netdev); 4117 if (vsi->netdev) {
4102 4118 ice_set_rx_mode(vsi->netdev);
4103 err = ice_restore_vlan(vsi); 4119 err = ice_restore_vlan(vsi);
4104 if (err) 4120 if (err)
4105 return err; 4121 return err;
4122 }
4106 4123
4107 err = ice_vsi_cfg_txqs(vsi); 4124 err = ice_vsi_cfg_txqs(vsi);
4108 if (!err) 4125 if (!err)
@@ -4868,7 +4885,7 @@ int ice_down(struct ice_vsi *vsi)
4868 */ 4885 */
4869static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi) 4886static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
4870{ 4887{
4871 int i, err; 4888 int i, err = 0;
4872 4889
4873 if (!vsi->num_txq) { 4890 if (!vsi->num_txq) {
4874 dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Tx queues\n", 4891 dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Tx queues\n",
@@ -4893,7 +4910,7 @@ static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
4893 */ 4910 */
4894static int ice_vsi_setup_rx_rings(struct ice_vsi *vsi) 4911static int ice_vsi_setup_rx_rings(struct ice_vsi *vsi)
4895{ 4912{
4896 int i, err; 4913 int i, err = 0;
4897 4914
4898 if (!vsi->num_rxq) { 4915 if (!vsi->num_rxq) {
4899 dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Rx queues\n", 4916 dev_err(&vsi->back->pdev->dev, "VSI %d has 0 Rx queues\n",
@@ -5235,7 +5252,7 @@ static int ice_change_mtu(struct net_device *netdev, int new_mtu)
5235 u8 count = 0; 5252 u8 count = 0;
5236 5253
5237 if (new_mtu == netdev->mtu) { 5254 if (new_mtu == netdev->mtu) {
5238 netdev_warn(netdev, "mtu is already %d\n", netdev->mtu); 5255 netdev_warn(netdev, "mtu is already %u\n", netdev->mtu);
5239 return 0; 5256 return 0;
5240 } 5257 }
5241 5258
diff --git a/drivers/net/ethernet/intel/ice/ice_nvm.c b/drivers/net/ethernet/intel/ice/ice_nvm.c
index 92da0a626ce0..295a8cd87fc1 100644
--- a/drivers/net/ethernet/intel/ice/ice_nvm.c
+++ b/drivers/net/ethernet/intel/ice/ice_nvm.c
@@ -131,9 +131,8 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
131 * 131 *
132 * This function will request NVM ownership. 132 * This function will request NVM ownership.
133 */ 133 */
134static enum 134static enum ice_status
135ice_status ice_acquire_nvm(struct ice_hw *hw, 135ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access)
136 enum ice_aq_res_access_type access)
137{ 136{
138 if (hw->nvm.blank_nvm_mode) 137 if (hw->nvm.blank_nvm_mode)
139 return 0; 138 return 0;
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index 2e6c1d92cc88..eeae199469b6 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -1576,8 +1576,7 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_id, u8 tc,
1576 return status; 1576 return status;
1577 } 1577 }
1578 1578
1579 if (owner == ICE_SCHED_NODE_OWNER_LAN) 1579 vsi->max_lanq[tc] = new_numqs;
1580 vsi->max_lanq[tc] = new_numqs;
1581 1580
1582 return status; 1581 return status;
1583} 1582}
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 723d15f1e90b..6b7ec2ae5ad6 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -645,14 +645,14 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
645 act |= (1 << ICE_LG_ACT_GENERIC_VALUE_S) & ICE_LG_ACT_GENERIC_VALUE_M; 645 act |= (1 << ICE_LG_ACT_GENERIC_VALUE_S) & ICE_LG_ACT_GENERIC_VALUE_M;
646 lg_act->pdata.lg_act.act[1] = cpu_to_le32(act); 646 lg_act->pdata.lg_act.act[1] = cpu_to_le32(act);
647 647
648 act = (7 << ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_VALUE_M; 648 act = (ICE_LG_ACT_GENERIC_OFF_RX_DESC_PROF_IDX <<
649 ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_OFFSET_M;
649 650
650 /* Third action Marker value */ 651 /* Third action Marker value */
651 act |= ICE_LG_ACT_GENERIC; 652 act |= ICE_LG_ACT_GENERIC;
652 act |= (sw_marker << ICE_LG_ACT_GENERIC_VALUE_S) & 653 act |= (sw_marker << ICE_LG_ACT_GENERIC_VALUE_S) &
653 ICE_LG_ACT_GENERIC_VALUE_M; 654 ICE_LG_ACT_GENERIC_VALUE_M;
654 655
655 act |= (0 << ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_VALUE_M;
656 lg_act->pdata.lg_act.act[2] = cpu_to_le32(act); 656 lg_act->pdata.lg_act.act[2] = cpu_to_le32(act);
657 657
658 /* call the fill switch rule to fill the lookup tx rx structure */ 658 /* call the fill switch rule to fill the lookup tx rx structure */
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index 6f4a0d159dbf..9b8ec128ee31 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -17,7 +17,7 @@ struct ice_vsi_ctx {
17 u16 vsis_unallocated; 17 u16 vsis_unallocated;
18 u16 flags; 18 u16 flags;
19 struct ice_aqc_vsi_props info; 19 struct ice_aqc_vsi_props info;
20 bool alloc_from_pool; 20 u8 alloc_from_pool;
21}; 21};
22 22
23enum ice_sw_fwd_act_type { 23enum ice_sw_fwd_act_type {
@@ -94,8 +94,8 @@ struct ice_fltr_info {
94 u8 qgrp_size; 94 u8 qgrp_size;
95 95
96 /* Rule creations populate these indicators basing on the switch type */ 96 /* Rule creations populate these indicators basing on the switch type */
97 bool lb_en; /* Indicate if packet can be looped back */ 97 u8 lb_en; /* Indicate if packet can be looped back */
98 bool lan_en; /* Indicate if packet can be forwarded to the uplink */ 98 u8 lan_en; /* Indicate if packet can be forwarded to the uplink */
99}; 99};
100 100
101/* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */ 101/* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h
index 567067b650c4..31bc998fe200 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.h
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h
@@ -143,7 +143,7 @@ struct ice_ring {
143 u16 next_to_use; 143 u16 next_to_use;
144 u16 next_to_clean; 144 u16 next_to_clean;
145 145
146 bool ring_active; /* is ring online or not */ 146 u8 ring_active; /* is ring online or not */
147 147
148 /* stats structs */ 148 /* stats structs */
149 struct ice_q_stats stats; 149 struct ice_q_stats stats;
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h
index 99c8a9a71b5e..97c366e0ca59 100644
--- a/drivers/net/ethernet/intel/ice/ice_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_type.h
@@ -83,7 +83,7 @@ struct ice_link_status {
83 u64 phy_type_low; 83 u64 phy_type_low;
84 u16 max_frame_size; 84 u16 max_frame_size;
85 u16 link_speed; 85 u16 link_speed;
86 bool lse_ena; /* Link Status Event notification */ 86 u8 lse_ena; /* Link Status Event notification */
87 u8 link_info; 87 u8 link_info;
88 u8 an_info; 88 u8 an_info;
89 u8 ext_info; 89 u8 ext_info;
@@ -101,7 +101,7 @@ struct ice_phy_info {
101 struct ice_link_status link_info_old; 101 struct ice_link_status link_info_old;
102 u64 phy_type_low; 102 u64 phy_type_low;
103 enum ice_media_type media_type; 103 enum ice_media_type media_type;
104 bool get_link_info; 104 u8 get_link_info;
105}; 105};
106 106
107/* Common HW capabilities for SW use */ 107/* Common HW capabilities for SW use */
@@ -167,7 +167,7 @@ struct ice_nvm_info {
167 u32 oem_ver; /* OEM version info */ 167 u32 oem_ver; /* OEM version info */
168 u16 sr_words; /* Shadow RAM size in words */ 168 u16 sr_words; /* Shadow RAM size in words */
169 u16 ver; /* NVM package version */ 169 u16 ver; /* NVM package version */
170 bool blank_nvm_mode; /* is NVM empty (no FW present) */ 170 u8 blank_nvm_mode; /* is NVM empty (no FW present) */
171}; 171};
172 172
173/* Max number of port to queue branches w.r.t topology */ 173/* Max number of port to queue branches w.r.t topology */
@@ -181,7 +181,7 @@ struct ice_sched_node {
181 struct ice_aqc_txsched_elem_data info; 181 struct ice_aqc_txsched_elem_data info;
182 u32 agg_id; /* aggregator group id */ 182 u32 agg_id; /* aggregator group id */
183 u16 vsi_id; 183 u16 vsi_id;
184 bool in_use; /* suspended or in use */ 184 u8 in_use; /* suspended or in use */
185 u8 tx_sched_layer; /* Logical Layer (1-9) */ 185 u8 tx_sched_layer; /* Logical Layer (1-9) */
186 u8 num_children; 186 u8 num_children;
187 u8 tc_num; 187 u8 tc_num;
@@ -218,7 +218,7 @@ struct ice_sched_vsi_info {
218struct ice_sched_tx_policy { 218struct ice_sched_tx_policy {
219 u16 max_num_vsis; 219 u16 max_num_vsis;
220 u8 max_num_lan_qs_per_tc[ICE_MAX_TRAFFIC_CLASS]; 220 u8 max_num_lan_qs_per_tc[ICE_MAX_TRAFFIC_CLASS];
221 bool rdma_ena; 221 u8 rdma_ena;
222}; 222};
223 223
224struct ice_port_info { 224struct ice_port_info {
@@ -243,7 +243,7 @@ struct ice_port_info {
243 struct list_head agg_list; /* lists all aggregator */ 243 struct list_head agg_list; /* lists all aggregator */
244 u8 lport; 244 u8 lport;
245#define ICE_LPORT_MASK 0xff 245#define ICE_LPORT_MASK 0xff
246 bool is_vf; 246 u8 is_vf;
247}; 247};
248 248
249struct ice_switch_info { 249struct ice_switch_info {
@@ -287,7 +287,7 @@ struct ice_hw {
287 u8 max_cgds; 287 u8 max_cgds;
288 u8 sw_entry_point_layer; 288 u8 sw_entry_point_layer;
289 289
290 bool evb_veb; /* true for VEB, false for VEPA */ 290 u8 evb_veb; /* true for VEB, false for VEPA */
291 struct ice_bus_info bus; 291 struct ice_bus_info bus;
292 struct ice_nvm_info nvm; 292 struct ice_nvm_info nvm;
293 struct ice_hw_dev_caps dev_caps; /* device capabilities */ 293 struct ice_hw_dev_caps dev_caps; /* device capabilities */
@@ -318,7 +318,7 @@ struct ice_hw {
318 u8 itr_gran_100; 318 u8 itr_gran_100;
319 u8 itr_gran_50; 319 u8 itr_gran_50;
320 u8 itr_gran_25; 320 u8 itr_gran_25;
321 bool ucast_shared; /* true if VSIs can share unicast addr */ 321 u8 ucast_shared; /* true if VSIs can share unicast addr */
322 322
323}; 323};
324 324
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index f92f7918112d..5acf3b743876 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1649,7 +1649,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter)
1649 if (hw->phy.type == e1000_phy_m88) 1649 if (hw->phy.type == e1000_phy_m88)
1650 igb_phy_disable_receiver(adapter); 1650 igb_phy_disable_receiver(adapter);
1651 1651
1652 mdelay(500); 1652 msleep(500);
1653 return 0; 1653 return 0;
1654} 1654}
1655 1655
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index d03c2f0d7592..a32c576c1e65 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3873,7 +3873,7 @@ static int igb_sw_init(struct igb_adapter *adapter)
3873 3873
3874 adapter->mac_table = kcalloc(hw->mac.rar_entry_count, 3874 adapter->mac_table = kcalloc(hw->mac.rar_entry_count,
3875 sizeof(struct igb_mac_addr), 3875 sizeof(struct igb_mac_addr),
3876 GFP_ATOMIC); 3876 GFP_KERNEL);
3877 if (!adapter->mac_table) 3877 if (!adapter->mac_table)
3878 return -ENOMEM; 3878 return -ENOMEM;
3879 3879
@@ -3883,7 +3883,7 @@ static int igb_sw_init(struct igb_adapter *adapter)
3883 3883
3884 /* Setup and initialize a copy of the hw vlan table array */ 3884 /* Setup and initialize a copy of the hw vlan table array */
3885 adapter->shadow_vfta = kcalloc(E1000_VLAN_FILTER_TBL_SIZE, sizeof(u32), 3885 adapter->shadow_vfta = kcalloc(E1000_VLAN_FILTER_TBL_SIZE, sizeof(u32),
3886 GFP_ATOMIC); 3886 GFP_KERNEL);
3887 if (!adapter->shadow_vfta) 3887 if (!adapter->shadow_vfta)
3888 return -ENOMEM; 3888 return -ENOMEM;
3889 3889
@@ -5816,7 +5816,8 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
5816 5816
5817 if (skb->ip_summed != CHECKSUM_PARTIAL) { 5817 if (skb->ip_summed != CHECKSUM_PARTIAL) {
5818csum_failed: 5818csum_failed:
5819 if (!(first->tx_flags & IGB_TX_FLAGS_VLAN)) 5819 if (!(first->tx_flags & IGB_TX_FLAGS_VLAN) &&
5820 !tx_ring->launchtime_enable)
5820 return; 5821 return;
5821 goto no_csum; 5822 goto no_csum;
5822 } 5823 }
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index 43664adf7a3c..d3e72d0f66ef 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -771,14 +771,13 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter)
771 rxdr->size = rxdr->count * sizeof(struct ixgb_rx_desc); 771 rxdr->size = rxdr->count * sizeof(struct ixgb_rx_desc);
772 rxdr->size = ALIGN(rxdr->size, 4096); 772 rxdr->size = ALIGN(rxdr->size, 4096);
773 773
774 rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, 774 rxdr->desc = dma_zalloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
775 GFP_KERNEL); 775 GFP_KERNEL);
776 776
777 if (!rxdr->desc) { 777 if (!rxdr->desc) {
778 vfree(rxdr->buffer_info); 778 vfree(rxdr->buffer_info);
779 return -ENOMEM; 779 return -ENOMEM;
780 } 780 }
781 memset(rxdr->desc, 0, rxdr->size);
782 781
783 rxdr->next_to_clean = 0; 782 rxdr->next_to_clean = 0;
784 rxdr->next_to_use = 0; 783 rxdr->next_to_use = 0;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index 94b3165ff543..ccd852ad62a4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -192,7 +192,7 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid,
192 } 192 }
193 193
194 /* alloc the udl from per cpu ddp pool */ 194 /* alloc the udl from per cpu ddp pool */
195 ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_ATOMIC, &ddp->udp); 195 ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_KERNEL, &ddp->udp);
196 if (!ddp->udl) { 196 if (!ddp->udl) {
197 e_err(drv, "failed allocated ddp context\n"); 197 e_err(drv, "failed allocated ddp context\n");
198 goto out_noddp_unmap; 198 goto out_noddp_unmap;
@@ -760,7 +760,7 @@ int ixgbe_setup_fcoe_ddp_resources(struct ixgbe_adapter *adapter)
760 return 0; 760 return 0;
761 761
762 /* Extra buffer to be shared by all DDPs for HW work around */ 762 /* Extra buffer to be shared by all DDPs for HW work around */
763 buffer = kmalloc(IXGBE_FCBUFF_MIN, GFP_ATOMIC); 763 buffer = kmalloc(IXGBE_FCBUFF_MIN, GFP_KERNEL);
764 if (!buffer) 764 if (!buffer)
765 return -ENOMEM; 765 return -ENOMEM;
766 766
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 447098005490..9a23d33a47ed 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6201,7 +6201,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
6201 6201
6202 adapter->mac_table = kcalloc(hw->mac.num_rar_entries, 6202 adapter->mac_table = kcalloc(hw->mac.num_rar_entries,
6203 sizeof(struct ixgbe_mac_addr), 6203 sizeof(struct ixgbe_mac_addr),
6204 GFP_ATOMIC); 6204 GFP_KERNEL);
6205 if (!adapter->mac_table) 6205 if (!adapter->mac_table)
6206 return -ENOMEM; 6206 return -ENOMEM;
6207 6207
@@ -6620,8 +6620,18 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
6620 struct ixgbe_adapter *adapter = netdev_priv(netdev); 6620 struct ixgbe_adapter *adapter = netdev_priv(netdev);
6621 6621
6622 if (adapter->xdp_prog) { 6622 if (adapter->xdp_prog) {
6623 e_warn(probe, "MTU cannot be changed while XDP program is loaded\n"); 6623 int new_frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN +
6624 return -EPERM; 6624 VLAN_HLEN;
6625 int i;
6626
6627 for (i = 0; i < adapter->num_rx_queues; i++) {
6628 struct ixgbe_ring *ring = adapter->rx_ring[i];
6629
6630 if (new_frame_size > ixgbe_rx_bufsz(ring)) {
6631 e_warn(probe, "Requested MTU size is not supported with XDP\n");
6632 return -EINVAL;
6633 }
6634 }
6625 } 6635 }
6626 6636
6627 /* 6637 /*
@@ -8983,6 +8993,15 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)
8983 8993
8984#ifdef CONFIG_IXGBE_DCB 8994#ifdef CONFIG_IXGBE_DCB
8985 if (tc) { 8995 if (tc) {
8996 if (adapter->xdp_prog) {
8997 e_warn(probe, "DCB is not supported with XDP\n");
8998
8999 ixgbe_init_interrupt_scheme(adapter);
9000 if (netif_running(dev))
9001 ixgbe_open(dev);
9002 return -EINVAL;
9003 }
9004
8986 netdev_set_num_tc(dev, tc); 9005 netdev_set_num_tc(dev, tc);
8987 ixgbe_set_prio_tc_map(adapter); 9006 ixgbe_set_prio_tc_map(adapter);
8988 9007
@@ -9171,14 +9190,12 @@ static int parse_tc_actions(struct ixgbe_adapter *adapter,
9171 struct tcf_exts *exts, u64 *action, u8 *queue) 9190 struct tcf_exts *exts, u64 *action, u8 *queue)
9172{ 9191{
9173 const struct tc_action *a; 9192 const struct tc_action *a;
9174 LIST_HEAD(actions); 9193 int i;
9175 9194
9176 if (!tcf_exts_has_actions(exts)) 9195 if (!tcf_exts_has_actions(exts))
9177 return -EINVAL; 9196 return -EINVAL;
9178 9197
9179 tcf_exts_to_list(exts, &actions); 9198 tcf_exts_for_each_action(i, a, exts) {
9180 list_for_each_entry(a, &actions, list) {
9181
9182 /* Drop action */ 9199 /* Drop action */
9183 if (is_tcf_gact_shot(a)) { 9200 if (is_tcf_gact_shot(a)) {
9184 *action = IXGBE_FDIR_DROP_QUEUE; 9201 *action = IXGBE_FDIR_DROP_QUEUE;
@@ -9936,6 +9953,11 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
9936 int tcs = adapter->hw_tcs ? : 1; 9953 int tcs = adapter->hw_tcs ? : 1;
9937 int pool, err; 9954 int pool, err;
9938 9955
9956 if (adapter->xdp_prog) {
9957 e_warn(probe, "L2FW offload is not supported with XDP\n");
9958 return ERR_PTR(-EINVAL);
9959 }
9960
9939 /* The hardware supported by ixgbe only filters on the destination MAC 9961 /* The hardware supported by ixgbe only filters on the destination MAC
9940 * address. In order to avoid issues we only support offloading modes 9962 * address. In order to avoid issues we only support offloading modes
9941 * where the hardware can actually provide the functionality. 9963 * where the hardware can actually provide the functionality.
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 6f59933cdff7..3c6f01c41b78 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -53,6 +53,11 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
53 struct ixgbe_hw *hw = &adapter->hw; 53 struct ixgbe_hw *hw = &adapter->hw;
54 int i; 54 int i;
55 55
56 if (adapter->xdp_prog) {
57 e_warn(probe, "SRIOV is not supported with XDP\n");
58 return -EINVAL;
59 }
60
56 /* Enable VMDq flag so device will be set in VM mode */ 61 /* Enable VMDq flag so device will be set in VM mode */
57 adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED | 62 adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED |
58 IXGBE_FLAG_VMDQ_ENABLED; 63 IXGBE_FLAG_VMDQ_ENABLED;
@@ -688,8 +693,13 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,
688static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf) 693static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
689{ 694{
690 struct ixgbe_hw *hw = &adapter->hw; 695 struct ixgbe_hw *hw = &adapter->hw;
696 struct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];
691 struct vf_data_storage *vfinfo = &adapter->vfinfo[vf]; 697 struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];
698 u32 q_per_pool = __ALIGN_MASK(1, ~vmdq->mask);
692 u8 num_tcs = adapter->hw_tcs; 699 u8 num_tcs = adapter->hw_tcs;
700 u32 reg_val;
701 u32 queue;
702 u32 word;
693 703
694 /* remove VLAN filters beloning to this VF */ 704 /* remove VLAN filters beloning to this VF */
695 ixgbe_clear_vf_vlans(adapter, vf); 705 ixgbe_clear_vf_vlans(adapter, vf);
@@ -726,6 +736,27 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
726 736
727 /* reset VF api back to unknown */ 737 /* reset VF api back to unknown */
728 adapter->vfinfo[vf].vf_api = ixgbe_mbox_api_10; 738 adapter->vfinfo[vf].vf_api = ixgbe_mbox_api_10;
739
740 /* Restart each queue for given VF */
741 for (queue = 0; queue < q_per_pool; queue++) {
742 unsigned int reg_idx = (vf * q_per_pool) + queue;
743
744 reg_val = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(reg_idx));
745
746 /* Re-enabling only configured queues */
747 if (reg_val) {
748 reg_val |= IXGBE_TXDCTL_ENABLE;
749 IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);
750 reg_val &= ~IXGBE_TXDCTL_ENABLE;
751 IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);
752 }
753 }
754
755 /* Clear VF's mailbox memory */
756 for (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)
757 IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);
758
759 IXGBE_WRITE_FLUSH(hw);
729} 760}
730 761
731static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter, 762static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 44cfb2021145..41bcbb337e83 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -2518,6 +2518,7 @@ enum {
2518/* Translated register #defines */ 2518/* Translated register #defines */
2519#define IXGBE_PVFTDH(P) (0x06010 + (0x40 * (P))) 2519#define IXGBE_PVFTDH(P) (0x06010 + (0x40 * (P)))
2520#define IXGBE_PVFTDT(P) (0x06018 + (0x40 * (P))) 2520#define IXGBE_PVFTDT(P) (0x06018 + (0x40 * (P)))
2521#define IXGBE_PVFTXDCTL(P) (0x06028 + (0x40 * (P)))
2521#define IXGBE_PVFTDWBAL(P) (0x06038 + (0x40 * (P))) 2522#define IXGBE_PVFTDWBAL(P) (0x06038 + (0x40 * (P)))
2522#define IXGBE_PVFTDWBAH(P) (0x0603C + (0x40 * (P))) 2523#define IXGBE_PVFTDWBAH(P) (0x0603C + (0x40 * (P)))
2523 2524
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 9131a1376e7d..9fed54017659 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -1982,14 +1982,15 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
1982 goto out_ok; 1982 goto out_ok;
1983 1983
1984 modify_ip_header = false; 1984 modify_ip_header = false;
1985 tcf_exts_to_list(exts, &actions); 1985 tcf_exts_for_each_action(i, a, exts) {
1986 list_for_each_entry(a, &actions, list) { 1986 int k;
1987
1987 if (!is_tcf_pedit(a)) 1988 if (!is_tcf_pedit(a))
1988 continue; 1989 continue;
1989 1990
1990 nkeys = tcf_pedit_nkeys(a); 1991 nkeys = tcf_pedit_nkeys(a);
1991 for (i = 0; i < nkeys; i++) { 1992 for (k = 0; k < nkeys; k++) {
1992 htype = tcf_pedit_htype(a, i); 1993 htype = tcf_pedit_htype(a, k);
1993 if (htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 || 1994 if (htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 ||
1994 htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP6) { 1995 htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP6) {
1995 modify_ip_header = true; 1996 modify_ip_header = true;
@@ -2053,15 +2054,14 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
2053 const struct tc_action *a; 2054 const struct tc_action *a;
2054 LIST_HEAD(actions); 2055 LIST_HEAD(actions);
2055 u32 action = 0; 2056 u32 action = 0;
2056 int err; 2057 int err, i;
2057 2058
2058 if (!tcf_exts_has_actions(exts)) 2059 if (!tcf_exts_has_actions(exts))
2059 return -EINVAL; 2060 return -EINVAL;
2060 2061
2061 attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG; 2062 attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
2062 2063
2063 tcf_exts_to_list(exts, &actions); 2064 tcf_exts_for_each_action(i, a, exts) {
2064 list_for_each_entry(a, &actions, list) {
2065 if (is_tcf_gact_shot(a)) { 2065 if (is_tcf_gact_shot(a)) {
2066 action |= MLX5_FLOW_CONTEXT_ACTION_DROP; 2066 action |= MLX5_FLOW_CONTEXT_ACTION_DROP;
2067 if (MLX5_CAP_FLOWTABLE(priv->mdev, 2067 if (MLX5_CAP_FLOWTABLE(priv->mdev,
@@ -2666,7 +2666,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
2666 LIST_HEAD(actions); 2666 LIST_HEAD(actions);
2667 bool encap = false; 2667 bool encap = false;
2668 u32 action = 0; 2668 u32 action = 0;
2669 int err; 2669 int err, i;
2670 2670
2671 if (!tcf_exts_has_actions(exts)) 2671 if (!tcf_exts_has_actions(exts))
2672 return -EINVAL; 2672 return -EINVAL;
@@ -2674,8 +2674,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
2674 attr->in_rep = rpriv->rep; 2674 attr->in_rep = rpriv->rep;
2675 attr->in_mdev = priv->mdev; 2675 attr->in_mdev = priv->mdev;
2676 2676
2677 tcf_exts_to_list(exts, &actions); 2677 tcf_exts_for_each_action(i, a, exts) {
2678 list_for_each_entry(a, &actions, list) {
2679 if (is_tcf_gact_shot(a)) { 2678 if (is_tcf_gact_shot(a)) {
2680 action |= MLX5_FLOW_CONTEXT_ACTION_DROP | 2679 action |= MLX5_FLOW_CONTEXT_ACTION_DROP |
2681 MLX5_FLOW_CONTEXT_ACTION_COUNT; 2680 MLX5_FLOW_CONTEXT_ACTION_COUNT;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 6070d1591d1e..930700413b1d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -1346,8 +1346,7 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
1346 return -ENOMEM; 1346 return -ENOMEM;
1347 mall_tc_entry->cookie = f->cookie; 1347 mall_tc_entry->cookie = f->cookie;
1348 1348
1349 tcf_exts_to_list(f->exts, &actions); 1349 a = tcf_exts_first_action(f->exts);
1350 a = list_first_entry(&actions, struct tc_action, list);
1351 1350
1352 if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) { 1351 if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) {
1353 struct mlxsw_sp_port_mall_mirror_tc_entry *mirror; 1352 struct mlxsw_sp_port_mall_mirror_tc_entry *mirror;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 3ae930196741..3cdb7aca90b7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -414,6 +414,8 @@ mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,
414void 414void
415mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan); 415mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);
416void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif); 416void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif);
417void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
418 struct net_device *dev);
417 419
418/* spectrum_kvdl.c */ 420/* spectrum_kvdl.c */
419enum mlxsw_sp_kvdl_entry_type { 421enum mlxsw_sp_kvdl_entry_type {
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index ebd1b24ebaa5..8d211972c5e9 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -21,8 +21,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
21 struct netlink_ext_ack *extack) 21 struct netlink_ext_ack *extack)
22{ 22{
23 const struct tc_action *a; 23 const struct tc_action *a;
24 LIST_HEAD(actions); 24 int err, i;
25 int err;
26 25
27 if (!tcf_exts_has_actions(exts)) 26 if (!tcf_exts_has_actions(exts))
28 return 0; 27 return 0;
@@ -32,8 +31,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
32 if (err) 31 if (err)
33 return err; 32 return err;
34 33
35 tcf_exts_to_list(exts, &actions); 34 tcf_exts_for_each_action(i, a, exts) {
36 list_for_each_entry(a, &actions, list) {
37 if (is_tcf_gact_ok(a)) { 35 if (is_tcf_gact_ok(a)) {
38 err = mlxsw_sp_acl_rulei_act_terminate(rulei); 36 err = mlxsw_sp_acl_rulei_act_terminate(rulei);
39 if (err) { 37 if (err) {
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 3a96307f51b0..2ab9cf25a08a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -6234,6 +6234,17 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)
6234 mlxsw_sp_vr_put(mlxsw_sp, vr); 6234 mlxsw_sp_vr_put(mlxsw_sp, vr);
6235} 6235}
6236 6236
6237void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
6238 struct net_device *dev)
6239{
6240 struct mlxsw_sp_rif *rif;
6241
6242 rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
6243 if (!rif)
6244 return;
6245 mlxsw_sp_rif_destroy(rif);
6246}
6247
6237static void 6248static void
6238mlxsw_sp_rif_subport_params_init(struct mlxsw_sp_rif_params *params, 6249mlxsw_sp_rif_subport_params_init(struct mlxsw_sp_rif_params *params,
6239 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan) 6250 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 0d8444aaba01..db715da7bab7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -127,6 +127,24 @@ bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
127 return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev); 127 return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
128} 128}
129 129
130static int mlxsw_sp_bridge_device_upper_rif_destroy(struct net_device *dev,
131 void *data)
132{
133 struct mlxsw_sp *mlxsw_sp = data;
134
135 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
136 return 0;
137}
138
139static void mlxsw_sp_bridge_device_rifs_destroy(struct mlxsw_sp *mlxsw_sp,
140 struct net_device *dev)
141{
142 mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
143 netdev_walk_all_upper_dev_rcu(dev,
144 mlxsw_sp_bridge_device_upper_rif_destroy,
145 mlxsw_sp);
146}
147
130static struct mlxsw_sp_bridge_device * 148static struct mlxsw_sp_bridge_device *
131mlxsw_sp_bridge_device_create(struct mlxsw_sp_bridge *bridge, 149mlxsw_sp_bridge_device_create(struct mlxsw_sp_bridge *bridge,
132 struct net_device *br_dev) 150 struct net_device *br_dev)
@@ -165,6 +183,8 @@ static void
165mlxsw_sp_bridge_device_destroy(struct mlxsw_sp_bridge *bridge, 183mlxsw_sp_bridge_device_destroy(struct mlxsw_sp_bridge *bridge,
166 struct mlxsw_sp_bridge_device *bridge_device) 184 struct mlxsw_sp_bridge_device *bridge_device)
167{ 185{
186 mlxsw_sp_bridge_device_rifs_destroy(bridge->mlxsw_sp,
187 bridge_device->dev);
168 list_del(&bridge_device->list); 188 list_del(&bridge_device->list);
169 if (bridge_device->vlan_enabled) 189 if (bridge_device->vlan_enabled)
170 bridge->vlan_enabled_exists = false; 190 bridge->vlan_enabled_exists = false;
diff --git a/drivers/net/ethernet/netronome/nfp/flower/action.c b/drivers/net/ethernet/netronome/nfp/flower/action.c
index 0ba0356ec4e6..9044496803e6 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/action.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/action.c
@@ -796,11 +796,10 @@ int nfp_flower_compile_action(struct nfp_app *app,
796 struct net_device *netdev, 796 struct net_device *netdev,
797 struct nfp_fl_payload *nfp_flow) 797 struct nfp_fl_payload *nfp_flow)
798{ 798{
799 int act_len, act_cnt, err, tun_out_cnt, out_cnt; 799 int act_len, act_cnt, err, tun_out_cnt, out_cnt, i;
800 enum nfp_flower_tun_type tun_type; 800 enum nfp_flower_tun_type tun_type;
801 const struct tc_action *a; 801 const struct tc_action *a;
802 u32 csum_updated = 0; 802 u32 csum_updated = 0;
803 LIST_HEAD(actions);
804 803
805 memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ); 804 memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ);
806 nfp_flow->meta.act_len = 0; 805 nfp_flow->meta.act_len = 0;
@@ -810,8 +809,7 @@ int nfp_flower_compile_action(struct nfp_app *app,
810 tun_out_cnt = 0; 809 tun_out_cnt = 0;
811 out_cnt = 0; 810 out_cnt = 0;
812 811
813 tcf_exts_to_list(flow->exts, &actions); 812 tcf_exts_for_each_action(i, a, flow->exts) {
814 list_for_each_entry(a, &actions, list) {
815 err = nfp_flower_loop_action(app, a, flow, nfp_flow, &act_len, 813 err = nfp_flower_loop_action(app, a, flow, nfp_flow, &act_len,
816 netdev, &tun_type, &tun_out_cnt, 814 netdev, &tun_type, &tun_out_cnt,
817 &out_cnt, &csum_updated); 815 &out_cnt, &csum_updated);
diff --git a/drivers/net/ethernet/qlogic/qed/qed_init_ops.c b/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
index d9ab5add27a8..34193c2f1699 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_init_ops.c
@@ -407,7 +407,7 @@ static void qed_init_cmd_rd(struct qed_hwfn *p_hwfn,
407 407
408 if (i == QED_INIT_MAX_POLL_COUNT) { 408 if (i == QED_INIT_MAX_POLL_COUNT) {
409 DP_ERR(p_hwfn, 409 DP_ERR(p_hwfn,
410 "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparsion %08x)]\n", 410 "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparison %08x)]\n",
411 addr, le32_to_cpu(cmd->expected_val), 411 addr, le32_to_cpu(cmd->expected_val),
412 val, le32_to_cpu(cmd->op_data)); 412 val, le32_to_cpu(cmd->op_data));
413 } 413 }
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index d89a0e22f6e4..5d37ec7e9b0b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -48,7 +48,7 @@
48#include "qed_reg_addr.h" 48#include "qed_reg_addr.h"
49#include "qed_sriov.h" 49#include "qed_sriov.h"
50 50
51#define CHIP_MCP_RESP_ITER_US 10 51#define QED_MCP_RESP_ITER_US 10
52 52
53#define QED_DRV_MB_MAX_RETRIES (500 * 1000) /* Account for 5 sec */ 53#define QED_DRV_MB_MAX_RETRIES (500 * 1000) /* Account for 5 sec */
54#define QED_MCP_RESET_RETRIES (50 * 1000) /* Account for 500 msec */ 54#define QED_MCP_RESET_RETRIES (50 * 1000) /* Account for 500 msec */
@@ -183,18 +183,57 @@ int qed_mcp_free(struct qed_hwfn *p_hwfn)
183 return 0; 183 return 0;
184} 184}
185 185
186/* Maximum of 1 sec to wait for the SHMEM ready indication */
187#define QED_MCP_SHMEM_RDY_MAX_RETRIES 20
188#define QED_MCP_SHMEM_RDY_ITER_MS 50
189
186static int qed_load_mcp_offsets(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 190static int qed_load_mcp_offsets(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
187{ 191{
188 struct qed_mcp_info *p_info = p_hwfn->mcp_info; 192 struct qed_mcp_info *p_info = p_hwfn->mcp_info;
193 u8 cnt = QED_MCP_SHMEM_RDY_MAX_RETRIES;
194 u8 msec = QED_MCP_SHMEM_RDY_ITER_MS;
189 u32 drv_mb_offsize, mfw_mb_offsize; 195 u32 drv_mb_offsize, mfw_mb_offsize;
190 u32 mcp_pf_id = MCP_PF_ID(p_hwfn); 196 u32 mcp_pf_id = MCP_PF_ID(p_hwfn);
191 197
192 p_info->public_base = qed_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR); 198 p_info->public_base = qed_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR);
193 if (!p_info->public_base) 199 if (!p_info->public_base) {
194 return 0; 200 DP_NOTICE(p_hwfn,
201 "The address of the MCP scratch-pad is not configured\n");
202 return -EINVAL;
203 }
195 204
196 p_info->public_base |= GRCBASE_MCP; 205 p_info->public_base |= GRCBASE_MCP;
197 206
207 /* Get the MFW MB address and number of supported messages */
208 mfw_mb_offsize = qed_rd(p_hwfn, p_ptt,
209 SECTION_OFFSIZE_ADDR(p_info->public_base,
210 PUBLIC_MFW_MB));
211 p_info->mfw_mb_addr = SECTION_ADDR(mfw_mb_offsize, mcp_pf_id);
212 p_info->mfw_mb_length = (u16)qed_rd(p_hwfn, p_ptt,
213 p_info->mfw_mb_addr +
214 offsetof(struct public_mfw_mb,
215 sup_msgs));
216
217 /* The driver can notify that there was an MCP reset, and might read the
218 * SHMEM values before the MFW has completed initializing them.
219 * To avoid this, the "sup_msgs" field in the MFW mailbox is used as a
220 * data ready indication.
221 */
222 while (!p_info->mfw_mb_length && --cnt) {
223 msleep(msec);
224 p_info->mfw_mb_length =
225 (u16)qed_rd(p_hwfn, p_ptt,
226 p_info->mfw_mb_addr +
227 offsetof(struct public_mfw_mb, sup_msgs));
228 }
229
230 if (!cnt) {
231 DP_NOTICE(p_hwfn,
232 "Failed to get the SHMEM ready notification after %d msec\n",
233 QED_MCP_SHMEM_RDY_MAX_RETRIES * msec);
234 return -EBUSY;
235 }
236
198 /* Calculate the driver and MFW mailbox address */ 237 /* Calculate the driver and MFW mailbox address */
199 drv_mb_offsize = qed_rd(p_hwfn, p_ptt, 238 drv_mb_offsize = qed_rd(p_hwfn, p_ptt,
200 SECTION_OFFSIZE_ADDR(p_info->public_base, 239 SECTION_OFFSIZE_ADDR(p_info->public_base,
@@ -204,13 +243,6 @@ static int qed_load_mcp_offsets(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
204 "drv_mb_offsiz = 0x%x, drv_mb_addr = 0x%x mcp_pf_id = 0x%x\n", 243 "drv_mb_offsiz = 0x%x, drv_mb_addr = 0x%x mcp_pf_id = 0x%x\n",
205 drv_mb_offsize, p_info->drv_mb_addr, mcp_pf_id); 244 drv_mb_offsize, p_info->drv_mb_addr, mcp_pf_id);
206 245
207 /* Set the MFW MB address */
208 mfw_mb_offsize = qed_rd(p_hwfn, p_ptt,
209 SECTION_OFFSIZE_ADDR(p_info->public_base,
210 PUBLIC_MFW_MB));
211 p_info->mfw_mb_addr = SECTION_ADDR(mfw_mb_offsize, mcp_pf_id);
212 p_info->mfw_mb_length = (u16)qed_rd(p_hwfn, p_ptt, p_info->mfw_mb_addr);
213
214 /* Get the current driver mailbox sequence before sending 246 /* Get the current driver mailbox sequence before sending
215 * the first command 247 * the first command
216 */ 248 */
@@ -285,9 +317,15 @@ static void qed_mcp_reread_offsets(struct qed_hwfn *p_hwfn,
285 317
286int qed_mcp_reset(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 318int qed_mcp_reset(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
287{ 319{
288 u32 org_mcp_reset_seq, seq, delay = CHIP_MCP_RESP_ITER_US, cnt = 0; 320 u32 org_mcp_reset_seq, seq, delay = QED_MCP_RESP_ITER_US, cnt = 0;
289 int rc = 0; 321 int rc = 0;
290 322
323 if (p_hwfn->mcp_info->b_block_cmd) {
324 DP_NOTICE(p_hwfn,
325 "The MFW is not responsive. Avoid sending MCP_RESET mailbox command.\n");
326 return -EBUSY;
327 }
328
291 /* Ensure that only a single thread is accessing the mailbox */ 329 /* Ensure that only a single thread is accessing the mailbox */
292 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock); 330 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
293 331
@@ -413,14 +451,41 @@ static void __qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
413 (p_mb_params->cmd | seq_num), p_mb_params->param); 451 (p_mb_params->cmd | seq_num), p_mb_params->param);
414} 452}
415 453
454static void qed_mcp_cmd_set_blocking(struct qed_hwfn *p_hwfn, bool block_cmd)
455{
456 p_hwfn->mcp_info->b_block_cmd = block_cmd;
457
458 DP_INFO(p_hwfn, "%s sending of mailbox commands to the MFW\n",
459 block_cmd ? "Block" : "Unblock");
460}
461
462static void qed_mcp_print_cpu_info(struct qed_hwfn *p_hwfn,
463 struct qed_ptt *p_ptt)
464{
465 u32 cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2;
466 u32 delay = QED_MCP_RESP_ITER_US;
467
468 cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
469 cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
470 cpu_pc_0 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
471 udelay(delay);
472 cpu_pc_1 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
473 udelay(delay);
474 cpu_pc_2 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
475
476 DP_NOTICE(p_hwfn,
477 "MCP CPU info: mode 0x%08x, state 0x%08x, pc {0x%08x, 0x%08x, 0x%08x}\n",
478 cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2);
479}
480
416static int 481static int
417_qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn, 482_qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
418 struct qed_ptt *p_ptt, 483 struct qed_ptt *p_ptt,
419 struct qed_mcp_mb_params *p_mb_params, 484 struct qed_mcp_mb_params *p_mb_params,
420 u32 max_retries, u32 delay) 485 u32 max_retries, u32 usecs)
421{ 486{
487 u32 cnt = 0, msecs = DIV_ROUND_UP(usecs, 1000);
422 struct qed_mcp_cmd_elem *p_cmd_elem; 488 struct qed_mcp_cmd_elem *p_cmd_elem;
423 u32 cnt = 0;
424 u16 seq_num; 489 u16 seq_num;
425 int rc = 0; 490 int rc = 0;
426 491
@@ -443,7 +508,11 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
443 goto err; 508 goto err;
444 509
445 spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock); 510 spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
446 udelay(delay); 511
512 if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP))
513 msleep(msecs);
514 else
515 udelay(usecs);
447 } while (++cnt < max_retries); 516 } while (++cnt < max_retries);
448 517
449 if (cnt >= max_retries) { 518 if (cnt >= max_retries) {
@@ -472,7 +541,11 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
472 * The spinlock stays locked until the list element is removed. 541 * The spinlock stays locked until the list element is removed.
473 */ 542 */
474 543
475 udelay(delay); 544 if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP))
545 msleep(msecs);
546 else
547 udelay(usecs);
548
476 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock); 549 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
477 550
478 if (p_cmd_elem->b_is_completed) 551 if (p_cmd_elem->b_is_completed)
@@ -491,11 +564,15 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
491 DP_NOTICE(p_hwfn, 564 DP_NOTICE(p_hwfn,
492 "The MFW failed to respond to command 0x%08x [param 0x%08x].\n", 565 "The MFW failed to respond to command 0x%08x [param 0x%08x].\n",
493 p_mb_params->cmd, p_mb_params->param); 566 p_mb_params->cmd, p_mb_params->param);
567 qed_mcp_print_cpu_info(p_hwfn, p_ptt);
494 568
495 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock); 569 spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
496 qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem); 570 qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
497 spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock); 571 spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
498 572
573 if (!QED_MB_FLAGS_IS_SET(p_mb_params, AVOID_BLOCK))
574 qed_mcp_cmd_set_blocking(p_hwfn, true);
575
499 return -EAGAIN; 576 return -EAGAIN;
500 } 577 }
501 578
@@ -507,7 +584,7 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
507 "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n", 584 "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n",
508 p_mb_params->mcp_resp, 585 p_mb_params->mcp_resp,
509 p_mb_params->mcp_param, 586 p_mb_params->mcp_param,
510 (cnt * delay) / 1000, (cnt * delay) % 1000); 587 (cnt * usecs) / 1000, (cnt * usecs) % 1000);
511 588
512 /* Clear the sequence number from the MFW response */ 589 /* Clear the sequence number from the MFW response */
513 p_mb_params->mcp_resp &= FW_MSG_CODE_MASK; 590 p_mb_params->mcp_resp &= FW_MSG_CODE_MASK;
@@ -525,7 +602,7 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
525{ 602{
526 size_t union_data_size = sizeof(union drv_union_data); 603 size_t union_data_size = sizeof(union drv_union_data);
527 u32 max_retries = QED_DRV_MB_MAX_RETRIES; 604 u32 max_retries = QED_DRV_MB_MAX_RETRIES;
528 u32 delay = CHIP_MCP_RESP_ITER_US; 605 u32 usecs = QED_MCP_RESP_ITER_US;
529 606
530 /* MCP not initialized */ 607 /* MCP not initialized */
531 if (!qed_mcp_is_init(p_hwfn)) { 608 if (!qed_mcp_is_init(p_hwfn)) {
@@ -533,6 +610,13 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
533 return -EBUSY; 610 return -EBUSY;
534 } 611 }
535 612
613 if (p_hwfn->mcp_info->b_block_cmd) {
614 DP_NOTICE(p_hwfn,
615 "The MFW is not responsive. Avoid sending mailbox command 0x%08x [param 0x%08x].\n",
616 p_mb_params->cmd, p_mb_params->param);
617 return -EBUSY;
618 }
619
536 if (p_mb_params->data_src_size > union_data_size || 620 if (p_mb_params->data_src_size > union_data_size ||
537 p_mb_params->data_dst_size > union_data_size) { 621 p_mb_params->data_dst_size > union_data_size) {
538 DP_ERR(p_hwfn, 622 DP_ERR(p_hwfn,
@@ -542,8 +626,13 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
542 return -EINVAL; 626 return -EINVAL;
543 } 627 }
544 628
629 if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP)) {
630 max_retries = DIV_ROUND_UP(max_retries, 1000);
631 usecs *= 1000;
632 }
633
545 return _qed_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, max_retries, 634 return _qed_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, max_retries,
546 delay); 635 usecs);
547} 636}
548 637
549int qed_mcp_cmd(struct qed_hwfn *p_hwfn, 638int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
@@ -761,6 +850,7 @@ __qed_mcp_load_req(struct qed_hwfn *p_hwfn,
761 mb_params.data_src_size = sizeof(load_req); 850 mb_params.data_src_size = sizeof(load_req);
762 mb_params.p_data_dst = &load_rsp; 851 mb_params.p_data_dst = &load_rsp;
763 mb_params.data_dst_size = sizeof(load_rsp); 852 mb_params.data_dst_size = sizeof(load_rsp);
853 mb_params.flags = QED_MB_FLAG_CAN_SLEEP | QED_MB_FLAG_AVOID_BLOCK;
764 854
765 DP_VERBOSE(p_hwfn, QED_MSG_SP, 855 DP_VERBOSE(p_hwfn, QED_MSG_SP,
766 "Load Request: param 0x%08x [init_hw %d, drv_type %d, hsi_ver %d, pda 0x%04x]\n", 856 "Load Request: param 0x%08x [init_hw %d, drv_type %d, hsi_ver %d, pda 0x%04x]\n",
@@ -982,7 +1072,8 @@ int qed_mcp_load_req(struct qed_hwfn *p_hwfn,
982 1072
983int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 1073int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
984{ 1074{
985 u32 wol_param, mcp_resp, mcp_param; 1075 struct qed_mcp_mb_params mb_params;
1076 u32 wol_param;
986 1077
987 switch (p_hwfn->cdev->wol_config) { 1078 switch (p_hwfn->cdev->wol_config) {
988 case QED_OV_WOL_DISABLED: 1079 case QED_OV_WOL_DISABLED:
@@ -1000,8 +1091,12 @@ int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
1000 wol_param = DRV_MB_PARAM_UNLOAD_WOL_MCP; 1091 wol_param = DRV_MB_PARAM_UNLOAD_WOL_MCP;
1001 } 1092 }
1002 1093
1003 return qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_UNLOAD_REQ, wol_param, 1094 memset(&mb_params, 0, sizeof(mb_params));
1004 &mcp_resp, &mcp_param); 1095 mb_params.cmd = DRV_MSG_CODE_UNLOAD_REQ;
1096 mb_params.param = wol_param;
1097 mb_params.flags = QED_MB_FLAG_CAN_SLEEP | QED_MB_FLAG_AVOID_BLOCK;
1098
1099 return qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
1005} 1100}
1006 1101
1007int qed_mcp_unload_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 1102int qed_mcp_unload_done(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
@@ -2077,31 +2172,65 @@ qed_mcp_send_drv_version(struct qed_hwfn *p_hwfn,
2077 return rc; 2172 return rc;
2078} 2173}
2079 2174
2175/* A maximal 100 msec waiting time for the MCP to halt */
2176#define QED_MCP_HALT_SLEEP_MS 10
2177#define QED_MCP_HALT_MAX_RETRIES 10
2178
2080int qed_mcp_halt(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 2179int qed_mcp_halt(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
2081{ 2180{
2082 u32 resp = 0, param = 0; 2181 u32 resp = 0, param = 0, cpu_state, cnt = 0;
2083 int rc; 2182 int rc;
2084 2183
2085 rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MCP_HALT, 0, &resp, 2184 rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MCP_HALT, 0, &resp,
2086 &param); 2185 &param);
2087 if (rc) 2186 if (rc) {
2088 DP_ERR(p_hwfn, "MCP response failure, aborting\n"); 2187 DP_ERR(p_hwfn, "MCP response failure, aborting\n");
2188 return rc;
2189 }
2089 2190
2090 return rc; 2191 do {
2192 msleep(QED_MCP_HALT_SLEEP_MS);
2193 cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
2194 if (cpu_state & MCP_REG_CPU_STATE_SOFT_HALTED)
2195 break;
2196 } while (++cnt < QED_MCP_HALT_MAX_RETRIES);
2197
2198 if (cnt == QED_MCP_HALT_MAX_RETRIES) {
2199 DP_NOTICE(p_hwfn,
2200 "Failed to halt the MCP [CPU_MODE = 0x%08x, CPU_STATE = 0x%08x]\n",
2201 qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE), cpu_state);
2202 return -EBUSY;
2203 }
2204
2205 qed_mcp_cmd_set_blocking(p_hwfn, true);
2206
2207 return 0;
2091} 2208}
2092 2209
2210#define QED_MCP_RESUME_SLEEP_MS 10
2211
2093int qed_mcp_resume(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) 2212int qed_mcp_resume(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
2094{ 2213{
2095 u32 value, cpu_mode; 2214 u32 cpu_mode, cpu_state;
2096 2215
2097 qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_STATE, 0xffffffff); 2216 qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_STATE, 0xffffffff);
2098 2217
2099 value = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
2100 value &= ~MCP_REG_CPU_MODE_SOFT_HALT;
2101 qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, value);
2102 cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE); 2218 cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
2219 cpu_mode &= ~MCP_REG_CPU_MODE_SOFT_HALT;
2220 qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, cpu_mode);
2221 msleep(QED_MCP_RESUME_SLEEP_MS);
2222 cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
2103 2223
2104 return (cpu_mode & MCP_REG_CPU_MODE_SOFT_HALT) ? -EAGAIN : 0; 2224 if (cpu_state & MCP_REG_CPU_STATE_SOFT_HALTED) {
2225 DP_NOTICE(p_hwfn,
2226 "Failed to resume the MCP [CPU_MODE = 0x%08x, CPU_STATE = 0x%08x]\n",
2227 cpu_mode, cpu_state);
2228 return -EBUSY;
2229 }
2230
2231 qed_mcp_cmd_set_blocking(p_hwfn, false);
2232
2233 return 0;
2105} 2234}
2106 2235
2107int qed_mcp_ov_update_current_config(struct qed_hwfn *p_hwfn, 2236int qed_mcp_ov_update_current_config(struct qed_hwfn *p_hwfn,
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.h b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
index 047976d5c6e9..85e6b3989e7a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
@@ -635,11 +635,14 @@ struct qed_mcp_info {
635 */ 635 */
636 spinlock_t cmd_lock; 636 spinlock_t cmd_lock;
637 637
638 /* Flag to indicate whether sending a MFW mailbox command is blocked */
639 bool b_block_cmd;
640
638 /* Spinlock used for syncing SW link-changes and link-changes 641 /* Spinlock used for syncing SW link-changes and link-changes
639 * originating from attention context. 642 * originating from attention context.
640 */ 643 */
641 spinlock_t link_lock; 644 spinlock_t link_lock;
642 bool block_mb_sending; 645
643 u32 public_base; 646 u32 public_base;
644 u32 drv_mb_addr; 647 u32 drv_mb_addr;
645 u32 mfw_mb_addr; 648 u32 mfw_mb_addr;
@@ -660,14 +663,20 @@ struct qed_mcp_info {
660}; 663};
661 664
662struct qed_mcp_mb_params { 665struct qed_mcp_mb_params {
663 u32 cmd; 666 u32 cmd;
664 u32 param; 667 u32 param;
665 void *p_data_src; 668 void *p_data_src;
666 u8 data_src_size; 669 void *p_data_dst;
667 void *p_data_dst; 670 u8 data_src_size;
668 u8 data_dst_size; 671 u8 data_dst_size;
669 u32 mcp_resp; 672 u32 mcp_resp;
670 u32 mcp_param; 673 u32 mcp_param;
674 u32 flags;
675#define QED_MB_FLAG_CAN_SLEEP (0x1 << 0)
676#define QED_MB_FLAG_AVOID_BLOCK (0x1 << 1)
677#define QED_MB_FLAGS_IS_SET(params, flag) \
678 ({ typeof(params) __params = (params); \
679 (__params && (__params->flags & QED_MB_FLAG_ ## flag)); })
671}; 680};
672 681
673struct qed_drv_tlv_hdr { 682struct qed_drv_tlv_hdr {
diff --git a/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h b/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
index d8ad2dcad8d5..f736f70956fd 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
@@ -562,8 +562,10 @@
562 0 562 0
563#define MCP_REG_CPU_STATE \ 563#define MCP_REG_CPU_STATE \
564 0xe05004UL 564 0xe05004UL
565#define MCP_REG_CPU_STATE_SOFT_HALTED (0x1UL << 10)
565#define MCP_REG_CPU_EVENT_MASK \ 566#define MCP_REG_CPU_EVENT_MASK \
566 0xe05008UL 567 0xe05008UL
568#define MCP_REG_CPU_PROGRAM_COUNTER 0xe0501cUL
567#define PGLUE_B_REG_PF_BAR0_SIZE \ 569#define PGLUE_B_REG_PF_BAR0_SIZE \
568 0x2aae60UL 570 0x2aae60UL
569#define PGLUE_B_REG_PF_BAR1_SIZE \ 571#define PGLUE_B_REG_PF_BAR1_SIZE \
diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c
index 9673d19308e6..b16ce7d93caf 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_filter.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c
@@ -2006,18 +2006,16 @@ unlock:
2006static int qede_parse_actions(struct qede_dev *edev, 2006static int qede_parse_actions(struct qede_dev *edev,
2007 struct tcf_exts *exts) 2007 struct tcf_exts *exts)
2008{ 2008{
2009 int rc = -EINVAL, num_act = 0; 2009 int rc = -EINVAL, num_act = 0, i;
2010 const struct tc_action *a; 2010 const struct tc_action *a;
2011 bool is_drop = false; 2011 bool is_drop = false;
2012 LIST_HEAD(actions);
2013 2012
2014 if (!tcf_exts_has_actions(exts)) { 2013 if (!tcf_exts_has_actions(exts)) {
2015 DP_NOTICE(edev, "No tc actions received\n"); 2014 DP_NOTICE(edev, "No tc actions received\n");
2016 return rc; 2015 return rc;
2017 } 2016 }
2018 2017
2019 tcf_exts_to_list(exts, &actions); 2018 tcf_exts_for_each_action(i, a, exts) {
2020 list_for_each_entry(a, &actions, list) {
2021 num_act++; 2019 num_act++;
2022 2020
2023 if (is_tcf_gact_shot(a)) 2021 if (is_tcf_gact_shot(a))
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 353f1c129af1..059ba9429e51 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2384,26 +2384,20 @@ static int qlge_update_hw_vlan_features(struct net_device *ndev,
2384 return status; 2384 return status;
2385} 2385}
2386 2386
2387static netdev_features_t qlge_fix_features(struct net_device *ndev,
2388 netdev_features_t features)
2389{
2390 int err;
2391
2392 /* Update the behavior of vlan accel in the adapter */
2393 err = qlge_update_hw_vlan_features(ndev, features);
2394 if (err)
2395 return err;
2396
2397 return features;
2398}
2399
2400static int qlge_set_features(struct net_device *ndev, 2387static int qlge_set_features(struct net_device *ndev,
2401 netdev_features_t features) 2388 netdev_features_t features)
2402{ 2389{
2403 netdev_features_t changed = ndev->features ^ features; 2390 netdev_features_t changed = ndev->features ^ features;
2391 int err;
2392
2393 if (changed & NETIF_F_HW_VLAN_CTAG_RX) {
2394 /* Update the behavior of vlan accel in the adapter */
2395 err = qlge_update_hw_vlan_features(ndev, features);
2396 if (err)
2397 return err;
2404 2398
2405 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
2406 qlge_vlan_mode(ndev, features); 2399 qlge_vlan_mode(ndev, features);
2400 }
2407 2401
2408 return 0; 2402 return 0;
2409} 2403}
@@ -4719,7 +4713,6 @@ static const struct net_device_ops qlge_netdev_ops = {
4719 .ndo_set_mac_address = qlge_set_mac_address, 4713 .ndo_set_mac_address = qlge_set_mac_address,
4720 .ndo_validate_addr = eth_validate_addr, 4714 .ndo_validate_addr = eth_validate_addr,
4721 .ndo_tx_timeout = qlge_tx_timeout, 4715 .ndo_tx_timeout = qlge_tx_timeout,
4722 .ndo_fix_features = qlge_fix_features,
4723 .ndo_set_features = qlge_set_features, 4716 .ndo_set_features = qlge_set_features,
4724 .ndo_vlan_rx_add_vid = qlge_vlan_rx_add_vid, 4717 .ndo_vlan_rx_add_vid = qlge_vlan_rx_add_vid,
4725 .ndo_vlan_rx_kill_vid = qlge_vlan_rx_kill_vid, 4718 .ndo_vlan_rx_kill_vid = qlge_vlan_rx_kill_vid,
diff --git a/drivers/net/ethernet/renesas/ravb.h b/drivers/net/ethernet/renesas/ravb.h
index b81f4faf7b10..1470fc12282b 100644
--- a/drivers/net/ethernet/renesas/ravb.h
+++ b/drivers/net/ethernet/renesas/ravb.h
@@ -1,3 +1,4 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* Renesas Ethernet AVB device driver 2/* Renesas Ethernet AVB device driver
2 * 3 *
3 * Copyright (C) 2014-2015 Renesas Electronics Corporation 4 * Copyright (C) 2014-2015 Renesas Electronics Corporation
@@ -5,10 +6,6 @@
5 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com> 6 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
6 * 7 *
7 * Based on the SuperH Ethernet driver 8 * Based on the SuperH Ethernet driver
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License version 2,
11 * as published by the Free Software Foundation.
12 */ 9 */
13 10
14#ifndef __RAVB_H__ 11#ifndef __RAVB_H__
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index c06f2df895c2..aff5516b781e 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* Renesas Ethernet AVB device driver 2/* Renesas Ethernet AVB device driver
2 * 3 *
3 * Copyright (C) 2014-2015 Renesas Electronics Corporation 4 * Copyright (C) 2014-2015 Renesas Electronics Corporation
@@ -5,10 +6,6 @@
5 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com> 6 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
6 * 7 *
7 * Based on the SuperH Ethernet driver 8 * Based on the SuperH Ethernet driver
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License version 2,
11 * as published by the Free Software Foundation.
12 */ 9 */
13 10
14#include <linux/cache.h> 11#include <linux/cache.h>
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 5573199c4536..ad4433d59237 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1/* SuperH Ethernet device driver 2/* SuperH Ethernet device driver
2 * 3 *
3 * Copyright (C) 2014 Renesas Electronics Corporation 4 * Copyright (C) 2014 Renesas Electronics Corporation
@@ -5,18 +6,6 @@
5 * Copyright (C) 2008-2014 Renesas Solutions Corp. 6 * Copyright (C) 2008-2014 Renesas Solutions Corp.
6 * Copyright (C) 2013-2017 Cogent Embedded, Inc. 7 * Copyright (C) 2013-2017 Cogent Embedded, Inc.
7 * Copyright (C) 2014 Codethink Limited 8 * Copyright (C) 2014 Codethink Limited
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
20 */ 9 */
21 10
22#include <linux/module.h> 11#include <linux/module.h>
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index f94be99cf400..0c18650bbfe6 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -1,19 +1,8 @@
1/* SPDX-License-Identifier: GPL-2.0 */
1/* SuperH Ethernet device driver 2/* SuperH Ethernet device driver
2 * 3 *
3 * Copyright (C) 2006-2012 Nobuhiro Iwamatsu 4 * Copyright (C) 2006-2012 Nobuhiro Iwamatsu
4 * Copyright (C) 2008-2012 Renesas Solutions Corp. 5 * Copyright (C) 2008-2012 Renesas Solutions Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * The full GNU General Public License is included in this distribution in
16 * the file called "COPYING".
17 */ 6 */
18 7
19#ifndef __SH_ETH_H__ 8#ifndef __SH_ETH_H__
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index edf20361ea5f..bf4acebb6bcd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -33,7 +33,7 @@ config DWMAC_DWC_QOS_ETH
33 select PHYLIB 33 select PHYLIB
34 select CRC32 34 select CRC32
35 select MII 35 select MII
36 depends on OF && COMMON_CLK && HAS_DMA 36 depends on OF && HAS_DMA
37 help 37 help
38 Support for chips using the snps,dwc-qos-ethernet.txt DT binding. 38 Support for chips using the snps,dwc-qos-ethernet.txt DT binding.
39 39
@@ -57,7 +57,7 @@ config DWMAC_ANARION
57config DWMAC_IPQ806X 57config DWMAC_IPQ806X
58 tristate "QCA IPQ806x DWMAC support" 58 tristate "QCA IPQ806x DWMAC support"
59 default ARCH_QCOM 59 default ARCH_QCOM
60 depends on OF && COMMON_CLK && (ARCH_QCOM || COMPILE_TEST) 60 depends on OF && (ARCH_QCOM || COMPILE_TEST)
61 select MFD_SYSCON 61 select MFD_SYSCON
62 help 62 help
63 Support for QCA IPQ806X DWMAC Ethernet. 63 Support for QCA IPQ806X DWMAC Ethernet.
@@ -100,7 +100,7 @@ config DWMAC_OXNAS
100config DWMAC_ROCKCHIP 100config DWMAC_ROCKCHIP
101 tristate "Rockchip dwmac support" 101 tristate "Rockchip dwmac support"
102 default ARCH_ROCKCHIP 102 default ARCH_ROCKCHIP
103 depends on OF && COMMON_CLK && (ARCH_ROCKCHIP || COMPILE_TEST) 103 depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
104 select MFD_SYSCON 104 select MFD_SYSCON
105 help 105 help
106 Support for Ethernet controller on Rockchip RK3288 SoC. 106 Support for Ethernet controller on Rockchip RK3288 SoC.
@@ -123,7 +123,7 @@ config DWMAC_SOCFPGA
123config DWMAC_STI 123config DWMAC_STI
124 tristate "STi GMAC support" 124 tristate "STi GMAC support"
125 default ARCH_STI 125 default ARCH_STI
126 depends on OF && COMMON_CLK && (ARCH_STI || COMPILE_TEST) 126 depends on OF && (ARCH_STI || COMPILE_TEST)
127 select MFD_SYSCON 127 select MFD_SYSCON
128 ---help--- 128 ---help---
129 Support for ethernet controller on STi SOCs. 129 Support for ethernet controller on STi SOCs.
@@ -147,7 +147,7 @@ config DWMAC_STM32
147config DWMAC_SUNXI 147config DWMAC_SUNXI
148 tristate "Allwinner GMAC support" 148 tristate "Allwinner GMAC support"
149 default ARCH_SUNXI 149 default ARCH_SUNXI
150 depends on OF && COMMON_CLK && (ARCH_SUNXI || COMPILE_TEST) 150 depends on OF && (ARCH_SUNXI || COMPILE_TEST)
151 ---help--- 151 ---help---
152 Support for Allwinner A20/A31 GMAC ethernet controllers. 152 Support for Allwinner A20/A31 GMAC ethernet controllers.
153 153
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
index 1a96dd9c1091..531294f4978b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
@@ -61,7 +61,7 @@ static int tc_fill_actions(struct stmmac_tc_entry *entry,
61 struct stmmac_tc_entry *action_entry = entry; 61 struct stmmac_tc_entry *action_entry = entry;
62 const struct tc_action *act; 62 const struct tc_action *act;
63 struct tcf_exts *exts; 63 struct tcf_exts *exts;
64 LIST_HEAD(actions); 64 int i;
65 65
66 exts = cls->knode.exts; 66 exts = cls->knode.exts;
67 if (!tcf_exts_has_actions(exts)) 67 if (!tcf_exts_has_actions(exts))
@@ -69,8 +69,7 @@ static int tc_fill_actions(struct stmmac_tc_entry *entry,
69 if (frag) 69 if (frag)
70 action_entry = frag; 70 action_entry = frag;
71 71
72 tcf_exts_to_list(exts, &actions); 72 tcf_exts_for_each_action(i, act, exts) {
73 list_for_each_entry(act, &actions, list) {
74 /* Accept */ 73 /* Accept */
75 if (is_tcf_gact_ok(act)) { 74 if (is_tcf_gact_ok(act)) {
76 action_entry->val.af = 1; 75 action_entry->val.af = 1;
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 507f68190cb1..1121a1ec407c 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -29,6 +29,7 @@
29#include <linux/netdevice.h> 29#include <linux/netdevice.h>
30#include <linux/inetdevice.h> 30#include <linux/inetdevice.h>
31#include <linux/etherdevice.h> 31#include <linux/etherdevice.h>
32#include <linux/pci.h>
32#include <linux/skbuff.h> 33#include <linux/skbuff.h>
33#include <linux/if_vlan.h> 34#include <linux/if_vlan.h>
34#include <linux/in.h> 35#include <linux/in.h>
@@ -2039,12 +2040,16 @@ static int netvsc_register_vf(struct net_device *vf_netdev)
2039{ 2040{
2040 struct net_device *ndev; 2041 struct net_device *ndev;
2041 struct net_device_context *net_device_ctx; 2042 struct net_device_context *net_device_ctx;
2043 struct device *pdev = vf_netdev->dev.parent;
2042 struct netvsc_device *netvsc_dev; 2044 struct netvsc_device *netvsc_dev;
2043 int ret; 2045 int ret;
2044 2046
2045 if (vf_netdev->addr_len != ETH_ALEN) 2047 if (vf_netdev->addr_len != ETH_ALEN)
2046 return NOTIFY_DONE; 2048 return NOTIFY_DONE;
2047 2049
2050 if (!pdev || !dev_is_pci(pdev) || dev_is_pf(pdev))
2051 return NOTIFY_DONE;
2052
2048 /* 2053 /*
2049 * We will use the MAC address to locate the synthetic interface to 2054 * We will use the MAC address to locate the synthetic interface to
2050 * associate with the VF interface. If we don't find a matching 2055 * associate with the VF interface. If we don't find a matching
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 97742708460b..2cd71bdb6484 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -5217,8 +5217,8 @@ static int rtl8152_probe(struct usb_interface *intf,
5217 netdev->hw_features &= ~NETIF_F_RXCSUM; 5217 netdev->hw_features &= ~NETIF_F_RXCSUM;
5218 } 5218 }
5219 5219
5220 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && 5220 if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
5221 udev->serial && !strcmp(udev->serial, "000001000000")) { 5221 (!strcmp(udev->serial, "000001000000") || !strcmp(udev->serial, "000002000000"))) {
5222 dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation"); 5222 dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation");
5223 set_bit(DELL_TB_RX_AGG_BUG, &tp->flags); 5223 set_bit(DELL_TB_RX_AGG_BUG, &tp->flags);
5224 } 5224 }
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 1b9951d2067e..d668682f91df 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -316,6 +316,14 @@ static bool nvme_dbbuf_update_and_check_event(u16 value, u32 *dbbuf_db,
316 old_value = *dbbuf_db; 316 old_value = *dbbuf_db;
317 *dbbuf_db = value; 317 *dbbuf_db = value;
318 318
319 /*
320 * Ensure that the doorbell is updated before reading the event
321 * index from memory. The controller needs to provide similar
322 * ordering to ensure the envent index is updated before reading
323 * the doorbell.
324 */
325 mb();
326
319 if (!nvme_dbbuf_need_event(*dbbuf_ei, value, old_value)) 327 if (!nvme_dbbuf_need_event(*dbbuf_ei, value, old_value))
320 return false; 328 return false;
321 } 329 }
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index ebf3e7a6c49e..b5ec96abd048 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1210,7 +1210,7 @@ static int __init nvmet_init(void)
1210 1210
1211 error = nvmet_init_discovery(); 1211 error = nvmet_init_discovery();
1212 if (error) 1212 if (error)
1213 goto out; 1213 goto out_free_work_queue;
1214 1214
1215 error = nvmet_init_configfs(); 1215 error = nvmet_init_configfs();
1216 if (error) 1216 if (error)
@@ -1219,6 +1219,8 @@ static int __init nvmet_init(void)
1219 1219
1220out_exit_discovery: 1220out_exit_discovery:
1221 nvmet_exit_discovery(); 1221 nvmet_exit_discovery();
1222out_free_work_queue:
1223 destroy_workqueue(buffered_io_wq);
1222out: 1224out:
1223 return error; 1225 return error;
1224} 1226}
diff --git a/drivers/nvme/target/fcloop.c b/drivers/nvme/target/fcloop.c
index 34712def81b1..5251689a1d9a 100644
--- a/drivers/nvme/target/fcloop.c
+++ b/drivers/nvme/target/fcloop.c
@@ -311,7 +311,7 @@ fcloop_tgt_lsrqst_done_work(struct work_struct *work)
311 struct fcloop_tport *tport = tls_req->tport; 311 struct fcloop_tport *tport = tls_req->tport;
312 struct nvmefc_ls_req *lsreq = tls_req->lsreq; 312 struct nvmefc_ls_req *lsreq = tls_req->lsreq;
313 313
314 if (tport->remoteport) 314 if (!tport || tport->remoteport)
315 lsreq->done(lsreq, tls_req->status); 315 lsreq->done(lsreq, tls_req->status);
316} 316}
317 317
@@ -329,6 +329,7 @@ fcloop_ls_req(struct nvme_fc_local_port *localport,
329 329
330 if (!rport->targetport) { 330 if (!rport->targetport) {
331 tls_req->status = -ECONNREFUSED; 331 tls_req->status = -ECONNREFUSED;
332 tls_req->tport = NULL;
332 schedule_work(&tls_req->work); 333 schedule_work(&tls_req->work);
333 return ret; 334 return ret;
334 } 335 }
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 466e3c8582f0..9095b8290150 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -54,6 +54,28 @@ DEFINE_MUTEX(of_mutex);
54 */ 54 */
55DEFINE_RAW_SPINLOCK(devtree_lock); 55DEFINE_RAW_SPINLOCK(devtree_lock);
56 56
57bool of_node_name_eq(const struct device_node *np, const char *name)
58{
59 const char *node_name;
60 size_t len;
61
62 if (!np)
63 return false;
64
65 node_name = kbasename(np->full_name);
66 len = strchrnul(node_name, '@') - node_name;
67
68 return (strlen(name) == len) && (strncmp(node_name, name, len) == 0);
69}
70
71bool of_node_name_prefix(const struct device_node *np, const char *prefix)
72{
73 if (!np)
74 return false;
75
76 return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0;
77}
78
57int of_n_addr_cells(struct device_node *np) 79int of_n_addr_cells(struct device_node *np)
58{ 80{
59 u32 cells; 81 u32 cells;
@@ -720,6 +742,31 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
720EXPORT_SYMBOL(of_get_next_available_child); 742EXPORT_SYMBOL(of_get_next_available_child);
721 743
722/** 744/**
745 * of_get_compatible_child - Find compatible child node
746 * @parent: parent node
747 * @compatible: compatible string
748 *
749 * Lookup child node whose compatible property contains the given compatible
750 * string.
751 *
752 * Returns a node pointer with refcount incremented, use of_node_put() on it
753 * when done; or NULL if not found.
754 */
755struct device_node *of_get_compatible_child(const struct device_node *parent,
756 const char *compatible)
757{
758 struct device_node *child;
759
760 for_each_child_of_node(parent, child) {
761 if (of_device_is_compatible(child, compatible))
762 break;
763 }
764
765 return child;
766}
767EXPORT_SYMBOL(of_get_compatible_child);
768
769/**
723 * of_get_child_by_name - Find the child node by name for a given parent 770 * of_get_child_by_name - Find the child node by name for a given parent
724 * @node: parent node 771 * @node: parent node
725 * @name: child name to look for. 772 * @name: child name to look for.
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 977a8307fbb1..4f2816559205 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -260,10 +260,13 @@ static int of_thermal_set_mode(struct thermal_zone_device *tz,
260 260
261 mutex_lock(&tz->lock); 261 mutex_lock(&tz->lock);
262 262
263 if (mode == THERMAL_DEVICE_ENABLED) 263 if (mode == THERMAL_DEVICE_ENABLED) {
264 tz->polling_delay = data->polling_delay; 264 tz->polling_delay = data->polling_delay;
265 else 265 tz->passive_delay = data->passive_delay;
266 } else {
266 tz->polling_delay = 0; 267 tz->polling_delay = 0;
268 tz->passive_delay = 0;
269 }
267 270
268 mutex_unlock(&tz->lock); 271 mutex_unlock(&tz->lock);
269 272
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index c866cc165960..450ed66edf58 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -1,16 +1,6 @@
1/* 1// SPDX-License-Identifier: GPL-2.0
2 * Copyright 2016 Freescale Semiconductor, Inc. 2//
3 * 3// Copyright 2016 Freescale Semiconductor, Inc.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 */
14 4
15#include <linux/module.h> 5#include <linux/module.h>
16#include <linux/platform_device.h> 6#include <linux/platform_device.h>
@@ -197,7 +187,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
197 int ret; 187 int ret;
198 struct qoriq_tmu_data *data; 188 struct qoriq_tmu_data *data;
199 struct device_node *np = pdev->dev.of_node; 189 struct device_node *np = pdev->dev.of_node;
200 u32 site = 0; 190 u32 site;
201 191
202 if (!np) { 192 if (!np) {
203 dev_err(&pdev->dev, "Device OF-Node is NULL"); 193 dev_err(&pdev->dev, "Device OF-Node is NULL");
@@ -233,8 +223,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
233 if (ret < 0) 223 if (ret < 0)
234 goto err_tmu; 224 goto err_tmu;
235 225
236 data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id, 226 data->tz = devm_thermal_zone_of_sensor_register(&pdev->dev,
237 data, &tmu_tz_ops); 227 data->sensor_id,
228 data, &tmu_tz_ops);
238 if (IS_ERR(data->tz)) { 229 if (IS_ERR(data->tz)) {
239 ret = PTR_ERR(data->tz); 230 ret = PTR_ERR(data->tz);
240 dev_err(&pdev->dev, 231 dev_err(&pdev->dev,
@@ -243,7 +234,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
243 } 234 }
244 235
245 /* Enable monitoring */ 236 /* Enable monitoring */
246 site |= 0x1 << (15 - data->sensor_id); 237 site = 0x1 << (15 - data->sensor_id);
247 tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); 238 tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
248 239
249 return 0; 240 return 0;
@@ -261,8 +252,6 @@ static int qoriq_tmu_remove(struct platform_device *pdev)
261{ 252{
262 struct qoriq_tmu_data *data = platform_get_drvdata(pdev); 253 struct qoriq_tmu_data *data = platform_get_drvdata(pdev);
263 254
264 thermal_zone_of_sensor_unregister(&pdev->dev, data->tz);
265
266 /* Disable monitoring */ 255 /* Disable monitoring */
267 tmu_write(data, TMR_DISABLE, &data->regs->tmr); 256 tmu_write(data, TMR_DISABLE, &data->regs->tmr);
268 257
diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 766521eb7071..7aed5337bdd3 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -1,19 +1,10 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * R-Car Gen3 THS thermal sensor driver 3 * R-Car Gen3 THS thermal sensor driver
3 * Based on rcar_thermal.c and work from Hien Dang and Khiem Nguyen. 4 * Based on rcar_thermal.c and work from Hien Dang and Khiem Nguyen.
4 * 5 *
5 * Copyright (C) 2016 Renesas Electronics Corporation. 6 * Copyright (C) 2016 Renesas Electronics Corporation.
6 * Copyright (C) 2016 Sang Engineering 7 * Copyright (C) 2016 Sang Engineering
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 */ 8 */
18#include <linux/delay.h> 9#include <linux/delay.h>
19#include <linux/err.h> 10#include <linux/err.h>
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index e77e63070e99..78f932822d38 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -1,21 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * R-Car THS/TSC thermal sensor driver 3 * R-Car THS/TSC thermal sensor driver
3 * 4 *
4 * Copyright (C) 2012 Renesas Solutions Corp. 5 * Copyright (C) 2012 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 6 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
19 */ 7 */
20#include <linux/delay.h> 8#include <linux/delay.h>
21#include <linux/err.h> 9#include <linux/err.h>
@@ -660,6 +648,6 @@ static struct platform_driver rcar_thermal_driver = {
660}; 648};
661module_platform_driver(rcar_thermal_driver); 649module_platform_driver(rcar_thermal_driver);
662 650
663MODULE_LICENSE("GPL"); 651MODULE_LICENSE("GPL v2");
664MODULE_DESCRIPTION("R-Car THS/TSC thermal sensor driver"); 652MODULE_DESCRIPTION("R-Car THS/TSC thermal sensor driver");
665MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"); 653MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 96c1d8400822..b13c6b4b2c66 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -952,7 +952,7 @@ static void vhost_iotlb_notify_vq(struct vhost_dev *d,
952 list_for_each_entry_safe(node, n, &d->pending_list, node) { 952 list_for_each_entry_safe(node, n, &d->pending_list, node) {
953 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; 953 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb;
954 if (msg->iova <= vq_msg->iova && 954 if (msg->iova <= vq_msg->iova &&
955 msg->iova + msg->size - 1 > vq_msg->iova && 955 msg->iova + msg->size - 1 >= vq_msg->iova &&
956 vq_msg->type == VHOST_IOTLB_MISS) { 956 vq_msg->type == VHOST_IOTLB_MISS) {
957 vhost_poll_queue(&node->vq->poll); 957 vhost_poll_queue(&node->vq->poll);
958 list_del(&node->node); 958 list_del(&node->node);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index f2088838f690..5b471889d723 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -402,10 +402,19 @@ static ssize_t modalias_show(struct device *dev,
402} 402}
403static DEVICE_ATTR_RO(modalias); 403static DEVICE_ATTR_RO(modalias);
404 404
405static ssize_t state_show(struct device *dev,
406 struct device_attribute *attr, char *buf)
407{
408 return sprintf(buf, "%s\n",
409 xenbus_strstate(to_xenbus_device(dev)->state));
410}
411static DEVICE_ATTR_RO(state);
412
405static struct attribute *xenbus_dev_attrs[] = { 413static struct attribute *xenbus_dev_attrs[] = {
406 &dev_attr_nodename.attr, 414 &dev_attr_nodename.attr,
407 &dev_attr_devtype.attr, 415 &dev_attr_devtype.attr,
408 &dev_attr_modalias.attr, 416 &dev_attr_modalias.attr,
417 &dev_attr_state.attr,
409 NULL, 418 NULL,
410}; 419};
411 420
diff --git a/fs/buffer.c b/fs/buffer.c
index 4cc679d5bf58..6f1ae3ac9789 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -39,7 +39,6 @@
39#include <linux/buffer_head.h> 39#include <linux/buffer_head.h>
40#include <linux/task_io_accounting_ops.h> 40#include <linux/task_io_accounting_ops.h>
41#include <linux/bio.h> 41#include <linux/bio.h>
42#include <linux/notifier.h>
43#include <linux/cpu.h> 42#include <linux/cpu.h>
44#include <linux/bitops.h> 43#include <linux/bitops.h>
45#include <linux/mpage.h> 44#include <linux/mpage.h>
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index ec3fba7d492f..488a9e7f8f66 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -24,6 +24,7 @@
24#include <linux/mpage.h> 24#include <linux/mpage.h>
25#include <linux/user_namespace.h> 25#include <linux/user_namespace.h>
26#include <linux/seq_file.h> 26#include <linux/seq_file.h>
27#include <linux/blkdev.h>
27 28
28#include "isofs.h" 29#include "isofs.h"
29#include "zisofs.h" 30#include "zisofs.h"
@@ -653,6 +654,12 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
653 /* 654 /*
654 * What if bugger tells us to go beyond page size? 655 * What if bugger tells us to go beyond page size?
655 */ 656 */
657 if (bdev_logical_block_size(s->s_bdev) > 2048) {
658 printk(KERN_WARNING
659 "ISOFS: unsupported/invalid hardware sector size %d\n",
660 bdev_logical_block_size(s->s_bdev));
661 goto out_freesbi;
662 }
656 opt.blocksize = sb_min_blocksize(s, opt.blocksize); 663 opt.blocksize = sb_min_blocksize(s, opt.blocksize);
657 664
658 sbi->s_high_sierra = 0; /* default is iso9660 */ 665 sbi->s_high_sierra = 0; /* default is iso9660 */
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index 05506d60131c..59cdb27826de 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -132,13 +132,13 @@ static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
132 struct fsnotify_mark *mark; 132 struct fsnotify_mark *mark;
133 133
134 assert_spin_locked(&conn->lock); 134 assert_spin_locked(&conn->lock);
135 /* We can get detached connector here when inode is getting unlinked. */
136 if (!fsnotify_valid_obj_type(conn->type))
137 return;
135 hlist_for_each_entry(mark, &conn->list, obj_list) { 138 hlist_for_each_entry(mark, &conn->list, obj_list) {
136 if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED) 139 if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED)
137 new_mask |= mark->mask; 140 new_mask |= mark->mask;
138 } 141 }
139 if (WARN_ON(!fsnotify_valid_obj_type(conn->type)))
140 return;
141
142 *fsnotify_conn_mask_p(conn) = new_mask; 142 *fsnotify_conn_mask_p(conn) = new_mask;
143} 143}
144 144
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 860bfbe7a07a..f0cbf58ad4da 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -18,6 +18,7 @@
18#include <linux/quotaops.h> 18#include <linux/quotaops.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/writeback.h> 20#include <linux/writeback.h>
21#include <linux/nospec.h>
21 22
22static int check_quotactl_permission(struct super_block *sb, int type, int cmd, 23static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
23 qid_t id) 24 qid_t id)
@@ -120,8 +121,6 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
120 struct if_dqinfo uinfo; 121 struct if_dqinfo uinfo;
121 int ret; 122 int ret;
122 123
123 /* This checks whether qc_state has enough entries... */
124 BUILD_BUG_ON(MAXQUOTAS > XQM_MAXQUOTAS);
125 if (!sb->s_qcop->get_state) 124 if (!sb->s_qcop->get_state)
126 return -ENOSYS; 125 return -ENOSYS;
127 ret = sb->s_qcop->get_state(sb, &state); 126 ret = sb->s_qcop->get_state(sb, &state);
@@ -354,10 +353,10 @@ static int quota_getstate(struct super_block *sb, struct fs_quota_stat *fqs)
354 * GETXSTATE quotactl has space for just one set of time limits so 353 * GETXSTATE quotactl has space for just one set of time limits so
355 * report them for the first enabled quota type 354 * report them for the first enabled quota type
356 */ 355 */
357 for (type = 0; type < XQM_MAXQUOTAS; type++) 356 for (type = 0; type < MAXQUOTAS; type++)
358 if (state.s_state[type].flags & QCI_ACCT_ENABLED) 357 if (state.s_state[type].flags & QCI_ACCT_ENABLED)
359 break; 358 break;
360 BUG_ON(type == XQM_MAXQUOTAS); 359 BUG_ON(type == MAXQUOTAS);
361 fqs->qs_btimelimit = state.s_state[type].spc_timelimit; 360 fqs->qs_btimelimit = state.s_state[type].spc_timelimit;
362 fqs->qs_itimelimit = state.s_state[type].ino_timelimit; 361 fqs->qs_itimelimit = state.s_state[type].ino_timelimit;
363 fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit; 362 fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
@@ -427,10 +426,10 @@ static int quota_getstatev(struct super_block *sb, struct fs_quota_statv *fqs)
427 * GETXSTATV quotactl has space for just one set of time limits so 426 * GETXSTATV quotactl has space for just one set of time limits so
428 * report them for the first enabled quota type 427 * report them for the first enabled quota type
429 */ 428 */
430 for (type = 0; type < XQM_MAXQUOTAS; type++) 429 for (type = 0; type < MAXQUOTAS; type++)
431 if (state.s_state[type].flags & QCI_ACCT_ENABLED) 430 if (state.s_state[type].flags & QCI_ACCT_ENABLED)
432 break; 431 break;
433 BUG_ON(type == XQM_MAXQUOTAS); 432 BUG_ON(type == MAXQUOTAS);
434 fqs->qs_btimelimit = state.s_state[type].spc_timelimit; 433 fqs->qs_btimelimit = state.s_state[type].spc_timelimit;
435 fqs->qs_itimelimit = state.s_state[type].ino_timelimit; 434 fqs->qs_itimelimit = state.s_state[type].ino_timelimit;
436 fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit; 435 fqs->qs_rtbtimelimit = state.s_state[type].rt_spc_timelimit;
@@ -701,8 +700,9 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
701{ 700{
702 int ret; 701 int ret;
703 702
704 if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS)) 703 if (type >= MAXQUOTAS)
705 return -EINVAL; 704 return -EINVAL;
705 type = array_index_nospec(type, MAXQUOTAS);
706 /* 706 /*
707 * Quota not supported on this fs? Check this before s_quota_types 707 * Quota not supported on this fs? Check this before s_quota_types
708 * since they needn't be set if quota is not supported at all. 708 * since they needn't be set if quota is not supported at all.
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 3040dc2a32f6..6f515651a2c2 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -764,9 +764,7 @@ static int udf_find_fileset(struct super_block *sb,
764 struct kernel_lb_addr *root) 764 struct kernel_lb_addr *root)
765{ 765{
766 struct buffer_head *bh = NULL; 766 struct buffer_head *bh = NULL;
767 long lastblock;
768 uint16_t ident; 767 uint16_t ident;
769 struct udf_sb_info *sbi;
770 768
771 if (fileset->logicalBlockNum != 0xFFFFFFFF || 769 if (fileset->logicalBlockNum != 0xFFFFFFFF ||
772 fileset->partitionReferenceNum != 0xFFFF) { 770 fileset->partitionReferenceNum != 0xFFFF) {
@@ -779,69 +777,11 @@ static int udf_find_fileset(struct super_block *sb,
779 return 1; 777 return 1;
780 } 778 }
781 779
782 }
783
784 sbi = UDF_SB(sb);
785 if (!bh) {
786 /* Search backwards through the partitions */
787 struct kernel_lb_addr newfileset;
788
789/* --> cvg: FIXME - is it reasonable? */
790 return 1;
791
792 for (newfileset.partitionReferenceNum = sbi->s_partitions - 1;
793 (newfileset.partitionReferenceNum != 0xFFFF &&
794 fileset->logicalBlockNum == 0xFFFFFFFF &&
795 fileset->partitionReferenceNum == 0xFFFF);
796 newfileset.partitionReferenceNum--) {
797 lastblock = sbi->s_partmaps
798 [newfileset.partitionReferenceNum]
799 .s_partition_len;
800 newfileset.logicalBlockNum = 0;
801
802 do {
803 bh = udf_read_ptagged(sb, &newfileset, 0,
804 &ident);
805 if (!bh) {
806 newfileset.logicalBlockNum++;
807 continue;
808 }
809
810 switch (ident) {
811 case TAG_IDENT_SBD:
812 {
813 struct spaceBitmapDesc *sp;
814 sp = (struct spaceBitmapDesc *)
815 bh->b_data;
816 newfileset.logicalBlockNum += 1 +
817 ((le32_to_cpu(sp->numOfBytes) +
818 sizeof(struct spaceBitmapDesc)
819 - 1) >> sb->s_blocksize_bits);
820 brelse(bh);
821 break;
822 }
823 case TAG_IDENT_FSD:
824 *fileset = newfileset;
825 break;
826 default:
827 newfileset.logicalBlockNum++;
828 brelse(bh);
829 bh = NULL;
830 break;
831 }
832 } while (newfileset.logicalBlockNum < lastblock &&
833 fileset->logicalBlockNum == 0xFFFFFFFF &&
834 fileset->partitionReferenceNum == 0xFFFF);
835 }
836 }
837
838 if ((fileset->logicalBlockNum != 0xFFFFFFFF ||
839 fileset->partitionReferenceNum != 0xFFFF) && bh) {
840 udf_debug("Fileset at block=%u, partition=%u\n", 780 udf_debug("Fileset at block=%u, partition=%u\n",
841 fileset->logicalBlockNum, 781 fileset->logicalBlockNum,
842 fileset->partitionReferenceNum); 782 fileset->partitionReferenceNum);
843 783
844 sbi->s_partition = fileset->partitionReferenceNum; 784 UDF_SB(sb)->s_partition = fileset->partitionReferenceNum;
845 udf_load_fileset(sb, bh, root); 785 udf_load_fileset(sb, bh, root);
846 brelse(bh); 786 brelse(bh);
847 return 0; 787 return 0;
@@ -1570,10 +1510,16 @@ static void udf_load_logicalvolint(struct super_block *sb, struct kernel_extent_
1570 */ 1510 */
1571#define PART_DESC_ALLOC_STEP 32 1511#define PART_DESC_ALLOC_STEP 32
1572 1512
1513struct part_desc_seq_scan_data {
1514 struct udf_vds_record rec;
1515 u32 partnum;
1516};
1517
1573struct desc_seq_scan_data { 1518struct desc_seq_scan_data {
1574 struct udf_vds_record vds[VDS_POS_LENGTH]; 1519 struct udf_vds_record vds[VDS_POS_LENGTH];
1575 unsigned int size_part_descs; 1520 unsigned int size_part_descs;
1576 struct udf_vds_record *part_descs_loc; 1521 unsigned int num_part_descs;
1522 struct part_desc_seq_scan_data *part_descs_loc;
1577}; 1523};
1578 1524
1579static struct udf_vds_record *handle_partition_descriptor( 1525static struct udf_vds_record *handle_partition_descriptor(
@@ -1582,10 +1528,14 @@ static struct udf_vds_record *handle_partition_descriptor(
1582{ 1528{
1583 struct partitionDesc *desc = (struct partitionDesc *)bh->b_data; 1529 struct partitionDesc *desc = (struct partitionDesc *)bh->b_data;
1584 int partnum; 1530 int partnum;
1531 int i;
1585 1532
1586 partnum = le16_to_cpu(desc->partitionNumber); 1533 partnum = le16_to_cpu(desc->partitionNumber);
1587 if (partnum >= data->size_part_descs) { 1534 for (i = 0; i < data->num_part_descs; i++)
1588 struct udf_vds_record *new_loc; 1535 if (partnum == data->part_descs_loc[i].partnum)
1536 return &(data->part_descs_loc[i].rec);
1537 if (data->num_part_descs >= data->size_part_descs) {
1538 struct part_desc_seq_scan_data *new_loc;
1589 unsigned int new_size = ALIGN(partnum, PART_DESC_ALLOC_STEP); 1539 unsigned int new_size = ALIGN(partnum, PART_DESC_ALLOC_STEP);
1590 1540
1591 new_loc = kcalloc(new_size, sizeof(*new_loc), GFP_KERNEL); 1541 new_loc = kcalloc(new_size, sizeof(*new_loc), GFP_KERNEL);
@@ -1597,7 +1547,7 @@ static struct udf_vds_record *handle_partition_descriptor(
1597 data->part_descs_loc = new_loc; 1547 data->part_descs_loc = new_loc;
1598 data->size_part_descs = new_size; 1548 data->size_part_descs = new_size;
1599 } 1549 }
1600 return &(data->part_descs_loc[partnum]); 1550 return &(data->part_descs_loc[data->num_part_descs++].rec);
1601} 1551}
1602 1552
1603 1553
@@ -1647,6 +1597,7 @@ static noinline int udf_process_sequence(
1647 1597
1648 memset(data.vds, 0, sizeof(struct udf_vds_record) * VDS_POS_LENGTH); 1598 memset(data.vds, 0, sizeof(struct udf_vds_record) * VDS_POS_LENGTH);
1649 data.size_part_descs = PART_DESC_ALLOC_STEP; 1599 data.size_part_descs = PART_DESC_ALLOC_STEP;
1600 data.num_part_descs = 0;
1650 data.part_descs_loc = kcalloc(data.size_part_descs, 1601 data.part_descs_loc = kcalloc(data.size_part_descs,
1651 sizeof(*data.part_descs_loc), 1602 sizeof(*data.part_descs_loc),
1652 GFP_KERNEL); 1603 GFP_KERNEL);
@@ -1658,7 +1609,6 @@ static noinline int udf_process_sequence(
1658 * are in it. 1609 * are in it.
1659 */ 1610 */
1660 for (; (!done && block <= lastblock); block++) { 1611 for (; (!done && block <= lastblock); block++) {
1661
1662 bh = udf_read_tagged(sb, block, block, &ident); 1612 bh = udf_read_tagged(sb, block, block, &ident);
1663 if (!bh) 1613 if (!bh)
1664 break; 1614 break;
@@ -1730,13 +1680,10 @@ static noinline int udf_process_sequence(
1730 } 1680 }
1731 1681
1732 /* Now handle prevailing Partition Descriptors */ 1682 /* Now handle prevailing Partition Descriptors */
1733 for (i = 0; i < data.size_part_descs; i++) { 1683 for (i = 0; i < data.num_part_descs; i++) {
1734 if (data.part_descs_loc[i].block) { 1684 ret = udf_load_partdesc(sb, data.part_descs_loc[i].rec.block);
1735 ret = udf_load_partdesc(sb, 1685 if (ret < 0)
1736 data.part_descs_loc[i].block); 1686 return ret;
1737 if (ret < 0)
1738 return ret;
1739 }
1740 } 1687 }
1741 1688
1742 return 0; 1689 return 0;
diff --git a/include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h b/include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h
new file mode 100644
index 000000000000..20f43404cac0
--- /dev/null
+++ b/include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h
@@ -0,0 +1,18 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * pinctrl-tegra-io-pad.h: Tegra I/O pad source voltage configuration constants
4 * pinctrl bindings.
5 *
6 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
7 *
8 * Author: Aapo Vienamo <avienamo@nvidia.com>
9 */
10
11#ifndef _DT_BINDINGS_PINCTRL_TEGRA_IO_PAD_H
12#define _DT_BINDINGS_PINCTRL_TEGRA_IO_PAD_H
13
14/* Voltage levels of the I/O pad's source rail */
15#define TEGRA_IO_PAD_VOLTAGE_1V8 0
16#define TEGRA_IO_PAD_VOLTAGE_3V3 1
17
18#endif
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index ca1d2cc2cdfa..18863d56273c 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -199,47 +199,57 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
199 199
200#define __declare_arg_0(a0, res) \ 200#define __declare_arg_0(a0, res) \
201 struct arm_smccc_res *___res = res; \ 201 struct arm_smccc_res *___res = res; \
202 register u32 r0 asm("r0") = a0; \ 202 register unsigned long r0 asm("r0") = (u32)a0; \
203 register unsigned long r1 asm("r1"); \ 203 register unsigned long r1 asm("r1"); \
204 register unsigned long r2 asm("r2"); \ 204 register unsigned long r2 asm("r2"); \
205 register unsigned long r3 asm("r3") 205 register unsigned long r3 asm("r3")
206 206
207#define __declare_arg_1(a0, a1, res) \ 207#define __declare_arg_1(a0, a1, res) \
208 typeof(a1) __a1 = a1; \
208 struct arm_smccc_res *___res = res; \ 209 struct arm_smccc_res *___res = res; \
209 register u32 r0 asm("r0") = a0; \ 210 register unsigned long r0 asm("r0") = (u32)a0; \
210 register typeof(a1) r1 asm("r1") = a1; \ 211 register unsigned long r1 asm("r1") = __a1; \
211 register unsigned long r2 asm("r2"); \ 212 register unsigned long r2 asm("r2"); \
212 register unsigned long r3 asm("r3") 213 register unsigned long r3 asm("r3")
213 214
214#define __declare_arg_2(a0, a1, a2, res) \ 215#define __declare_arg_2(a0, a1, a2, res) \
216 typeof(a1) __a1 = a1; \
217 typeof(a2) __a2 = a2; \
215 struct arm_smccc_res *___res = res; \ 218 struct arm_smccc_res *___res = res; \
216 register u32 r0 asm("r0") = a0; \ 219 register unsigned long r0 asm("r0") = (u32)a0; \
217 register typeof(a1) r1 asm("r1") = a1; \ 220 register unsigned long r1 asm("r1") = __a1; \
218 register typeof(a2) r2 asm("r2") = a2; \ 221 register unsigned long r2 asm("r2") = __a2; \
219 register unsigned long r3 asm("r3") 222 register unsigned long r3 asm("r3")
220 223
221#define __declare_arg_3(a0, a1, a2, a3, res) \ 224#define __declare_arg_3(a0, a1, a2, a3, res) \
225 typeof(a1) __a1 = a1; \
226 typeof(a2) __a2 = a2; \
227 typeof(a3) __a3 = a3; \
222 struct arm_smccc_res *___res = res; \ 228 struct arm_smccc_res *___res = res; \
223 register u32 r0 asm("r0") = a0; \ 229 register unsigned long r0 asm("r0") = (u32)a0; \
224 register typeof(a1) r1 asm("r1") = a1; \ 230 register unsigned long r1 asm("r1") = __a1; \
225 register typeof(a2) r2 asm("r2") = a2; \ 231 register unsigned long r2 asm("r2") = __a2; \
226 register typeof(a3) r3 asm("r3") = a3 232 register unsigned long r3 asm("r3") = __a3
227 233
228#define __declare_arg_4(a0, a1, a2, a3, a4, res) \ 234#define __declare_arg_4(a0, a1, a2, a3, a4, res) \
235 typeof(a4) __a4 = a4; \
229 __declare_arg_3(a0, a1, a2, a3, res); \ 236 __declare_arg_3(a0, a1, a2, a3, res); \
230 register typeof(a4) r4 asm("r4") = a4 237 register unsigned long r4 asm("r4") = __a4
231 238
232#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res) \ 239#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res) \
240 typeof(a5) __a5 = a5; \
233 __declare_arg_4(a0, a1, a2, a3, a4, res); \ 241 __declare_arg_4(a0, a1, a2, a3, a4, res); \
234 register typeof(a5) r5 asm("r5") = a5 242 register unsigned long r5 asm("r5") = __a5
235 243
236#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res) \ 244#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res) \
245 typeof(a6) __a6 = a6; \
237 __declare_arg_5(a0, a1, a2, a3, a4, a5, res); \ 246 __declare_arg_5(a0, a1, a2, a3, a4, a5, res); \
238 register typeof(a6) r6 asm("r6") = a6 247 register unsigned long r6 asm("r6") = __a6
239 248
240#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res) \ 249#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res) \
250 typeof(a7) __a7 = a7; \
241 __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \ 251 __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \
242 register typeof(a7) r7 asm("r7") = a7 252 register unsigned long r7 asm("r7") = __a7
243 253
244#define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__) 254#define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
245#define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__) 255#define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index b79387fd57da..65b4eaed1d96 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -855,7 +855,7 @@ static inline u8 i2c_8bit_addr_from_msg(const struct i2c_msg *msg)
855} 855}
856 856
857u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold); 857u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold);
858void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf); 858void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred);
859 859
860int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr); 860int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr);
861/** 861/**
diff --git a/include/linux/of.h b/include/linux/of.h
index 4d25e4f952d9..99b0ebf49632 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -256,6 +256,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
256#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) 256#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
257#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) 257#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
258 258
259extern bool of_node_name_eq(const struct device_node *np, const char *name);
260extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
261
259static inline const char *of_node_full_name(const struct device_node *np) 262static inline const char *of_node_full_name(const struct device_node *np)
260{ 263{
261 return np ? np->full_name : "<no-node>"; 264 return np ? np->full_name : "<no-node>";
@@ -290,6 +293,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
290extern struct device_node *of_get_next_available_child( 293extern struct device_node *of_get_next_available_child(
291 const struct device_node *node, struct device_node *prev); 294 const struct device_node *node, struct device_node *prev);
292 295
296extern struct device_node *of_get_compatible_child(const struct device_node *parent,
297 const char *compatible);
293extern struct device_node *of_get_child_by_name(const struct device_node *node, 298extern struct device_node *of_get_child_by_name(const struct device_node *node,
294 const char *name); 299 const char *name);
295 300
@@ -561,6 +566,16 @@ static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)
561 return NULL; 566 return NULL;
562} 567}
563 568
569static inline bool of_node_name_eq(const struct device_node *np, const char *name)
570{
571 return false;
572}
573
574static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix)
575{
576 return false;
577}
578
564static inline const char* of_node_full_name(const struct device_node *np) 579static inline const char* of_node_full_name(const struct device_node *np)
565{ 580{
566 return "<no-node>"; 581 return "<no-node>";
@@ -632,6 +647,12 @@ static inline bool of_have_populated_dt(void)
632 return false; 647 return false;
633} 648}
634 649
650static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
651 const char *compatible)
652{
653 return NULL;
654}
655
635static inline struct device_node *of_get_child_by_name( 656static inline struct device_node *of_get_child_by_name(
636 const struct device_node *node, 657 const struct device_node *node,
637 const char *name) 658 const char *name)
@@ -967,6 +988,18 @@ static inline struct device_node *of_find_matching_node(
967 return of_find_matching_node_and_match(from, matches, NULL); 988 return of_find_matching_node_and_match(from, matches, NULL);
968} 989}
969 990
991static inline const char *of_node_get_device_type(const struct device_node *np)
992{
993 return of_get_property(np, "type", NULL);
994}
995
996static inline bool of_node_is_type(const struct device_node *np, const char *type)
997{
998 const char *match = of_node_get_device_type(np);
999
1000 return np && match && type && !strcmp(match, type);
1001}
1002
970/** 1003/**
971 * of_property_count_u8_elems - Count the number of u8 elements in a property 1004 * of_property_count_u8_elems - Count the number of u8 elements in a property
972 * 1005 *
diff --git a/include/linux/platform_data/ina2xx.h b/include/linux/platform_data/ina2xx.h
index 9abc0ca7259b..9f0aa1b48c78 100644
--- a/include/linux/platform_data/ina2xx.h
+++ b/include/linux/platform_data/ina2xx.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * Driver for Texas Instruments INA219, INA226 power monitor chips 2 * Driver for Texas Instruments INA219, INA226 power monitor chips
3 * 3 *
4 * Copyright (C) 2012 Lothar Felten <l-felten@ti.com> 4 * Copyright (C) 2012 Lothar Felten <lothar.felten@gmail.com>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
diff --git a/include/linux/quota.h b/include/linux/quota.h
index ca9772c8e48b..f32dd270b8e3 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -408,13 +408,7 @@ struct qc_type_state {
408 408
409struct qc_state { 409struct qc_state {
410 unsigned int s_incoredqs; /* Number of dquots in core */ 410 unsigned int s_incoredqs; /* Number of dquots in core */
411 /* 411 struct qc_type_state s_state[MAXQUOTAS]; /* Per quota type information */
412 * Per quota type information. The array should really have
413 * max(MAXQUOTAS, XQM_MAXQUOTAS) entries. BUILD_BUG_ON in
414 * quota_getinfo() makes sure XQM_MAXQUOTAS is large enough. Once VFS
415 * supports project quotas, this can be changed to MAXQUOTAS
416 */
417 struct qc_type_state s_state[XQM_MAXQUOTAS];
418}; 412};
419 413
420/* Structure for communicating via ->set_info */ 414/* Structure for communicating via ->set_info */
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 1ad5b19e83a9..970303448c90 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -23,13 +23,11 @@ struct tc_action {
23 const struct tc_action_ops *ops; 23 const struct tc_action_ops *ops;
24 __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ 24 __u32 type; /* for backward compat(TCA_OLD_COMPAT) */
25 __u32 order; 25 __u32 order;
26 struct list_head list;
27 struct tcf_idrinfo *idrinfo; 26 struct tcf_idrinfo *idrinfo;
28 27
29 u32 tcfa_index; 28 u32 tcfa_index;
30 refcount_t tcfa_refcnt; 29 refcount_t tcfa_refcnt;
31 atomic_t tcfa_bindcnt; 30 atomic_t tcfa_bindcnt;
32 u32 tcfa_capab;
33 int tcfa_action; 31 int tcfa_action;
34 struct tcf_t tcfa_tm; 32 struct tcf_t tcfa_tm;
35 struct gnet_stats_basic_packed tcfa_bstats; 33 struct gnet_stats_basic_packed tcfa_bstats;
@@ -44,7 +42,6 @@ struct tc_action {
44#define tcf_index common.tcfa_index 42#define tcf_index common.tcfa_index
45#define tcf_refcnt common.tcfa_refcnt 43#define tcf_refcnt common.tcfa_refcnt
46#define tcf_bindcnt common.tcfa_bindcnt 44#define tcf_bindcnt common.tcfa_bindcnt
47#define tcf_capab common.tcfa_capab
48#define tcf_action common.tcfa_action 45#define tcf_action common.tcfa_action
49#define tcf_tm common.tcfa_tm 46#define tcf_tm common.tcfa_tm
50#define tcf_bstats common.tcfa_bstats 47#define tcf_bstats common.tcfa_bstats
@@ -102,7 +99,6 @@ struct tc_action_ops {
102 size_t (*get_fill_size)(const struct tc_action *act); 99 size_t (*get_fill_size)(const struct tc_action *act);
103 struct net_device *(*get_dev)(const struct tc_action *a); 100 struct net_device *(*get_dev)(const struct tc_action *a);
104 void (*put_dev)(struct net_device *dev); 101 void (*put_dev)(struct net_device *dev);
105 int (*delete)(struct net *net, u32 index);
106}; 102};
107 103
108struct tc_action_net { 104struct tc_action_net {
@@ -148,8 +144,6 @@ int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
148 const struct tc_action_ops *ops, 144 const struct tc_action_ops *ops,
149 struct netlink_ext_ack *extack); 145 struct netlink_ext_ack *extack);
150int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index); 146int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index);
151bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a,
152 int bind);
153int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, 147int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
154 struct tc_action **a, const struct tc_action_ops *ops, 148 struct tc_action **a, const struct tc_action_ops *ops,
155 int bind, bool cpustats); 149 int bind, bool cpustats);
@@ -158,7 +152,6 @@ void tcf_idr_insert(struct tc_action_net *tn, struct tc_action *a);
158void tcf_idr_cleanup(struct tc_action_net *tn, u32 index); 152void tcf_idr_cleanup(struct tc_action_net *tn, u32 index);
159int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index, 153int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
160 struct tc_action **a, int bind); 154 struct tc_action **a, int bind);
161int tcf_idr_delete_index(struct tc_action_net *tn, u32 index);
162int __tcf_idr_release(struct tc_action *a, bool bind, bool strict); 155int __tcf_idr_release(struct tc_action *a, bool bind, bool strict);
163 156
164static inline int tcf_idr_release(struct tc_action *a, bool bind) 157static inline int tcf_idr_release(struct tc_action *a, bool bind)
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index ef727f71336e..75a3f3fdb359 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -298,19 +298,13 @@ static inline void tcf_exts_put_net(struct tcf_exts *exts)
298#endif 298#endif
299} 299}
300 300
301static inline void tcf_exts_to_list(const struct tcf_exts *exts,
302 struct list_head *actions)
303{
304#ifdef CONFIG_NET_CLS_ACT 301#ifdef CONFIG_NET_CLS_ACT
305 int i; 302#define tcf_exts_for_each_action(i, a, exts) \
306 303 for (i = 0; i < TCA_ACT_MAX_PRIO && ((a) = (exts)->actions[i]); i++)
307 for (i = 0; i < exts->nr_actions; i++) { 304#else
308 struct tc_action *a = exts->actions[i]; 305#define tcf_exts_for_each_action(i, a, exts) \
309 306 for (; 0; (void)(i), (void)(a), (void)(exts))
310 list_add_tail(&a->list, actions);
311 }
312#endif 307#endif
313}
314 308
315static inline void 309static inline void
316tcf_exts_stats_update(const struct tcf_exts *exts, 310tcf_exts_stats_update(const struct tcf_exts *exts,
@@ -361,6 +355,15 @@ static inline bool tcf_exts_has_one_action(struct tcf_exts *exts)
361#endif 355#endif
362} 356}
363 357
358static inline struct tc_action *tcf_exts_first_action(struct tcf_exts *exts)
359{
360#ifdef CONFIG_NET_CLS_ACT
361 return exts->actions[0];
362#else
363 return NULL;
364#endif
365}
366
364/** 367/**
365 * tcf_exts_exec - execute tc filter extensions 368 * tcf_exts_exec - execute tc filter extensions
366 * @skb: socket buffer 369 * @skb: socket buffer
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index 04b8eda94e7d..03cc59ee9c95 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -15,6 +15,7 @@
15#include <linux/jhash.h> 15#include <linux/jhash.h>
16#include <linux/filter.h> 16#include <linux/filter.h>
17#include <linux/rculist_nulls.h> 17#include <linux/rculist_nulls.h>
18#include <linux/random.h>
18#include <uapi/linux/btf.h> 19#include <uapi/linux/btf.h>
19#include "percpu_freelist.h" 20#include "percpu_freelist.h"
20#include "bpf_lru_list.h" 21#include "bpf_lru_list.h"
@@ -41,6 +42,7 @@ struct bpf_htab {
41 atomic_t count; /* number of elements in this hashtable */ 42 atomic_t count; /* number of elements in this hashtable */
42 u32 n_buckets; /* number of hash buckets */ 43 u32 n_buckets; /* number of hash buckets */
43 u32 elem_size; /* size of each element in bytes */ 44 u32 elem_size; /* size of each element in bytes */
45 u32 hashrnd;
44}; 46};
45 47
46/* each htab element is struct htab_elem + key + value */ 48/* each htab element is struct htab_elem + key + value */
@@ -371,6 +373,7 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
371 if (!htab->buckets) 373 if (!htab->buckets)
372 goto free_htab; 374 goto free_htab;
373 375
376 htab->hashrnd = get_random_int();
374 for (i = 0; i < htab->n_buckets; i++) { 377 for (i = 0; i < htab->n_buckets; i++) {
375 INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i); 378 INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i);
376 raw_spin_lock_init(&htab->buckets[i].lock); 379 raw_spin_lock_init(&htab->buckets[i].lock);
@@ -402,9 +405,9 @@ free_htab:
402 return ERR_PTR(err); 405 return ERR_PTR(err);
403} 406}
404 407
405static inline u32 htab_map_hash(const void *key, u32 key_len) 408static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd)
406{ 409{
407 return jhash(key, key_len, 0); 410 return jhash(key, key_len, hashrnd);
408} 411}
409 412
410static inline struct bucket *__select_bucket(struct bpf_htab *htab, u32 hash) 413static inline struct bucket *__select_bucket(struct bpf_htab *htab, u32 hash)
@@ -470,7 +473,7 @@ static void *__htab_map_lookup_elem(struct bpf_map *map, void *key)
470 473
471 key_size = map->key_size; 474 key_size = map->key_size;
472 475
473 hash = htab_map_hash(key, key_size); 476 hash = htab_map_hash(key, key_size, htab->hashrnd);
474 477
475 head = select_bucket(htab, hash); 478 head = select_bucket(htab, hash);
476 479
@@ -597,7 +600,7 @@ static int htab_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
597 if (!key) 600 if (!key)
598 goto find_first_elem; 601 goto find_first_elem;
599 602
600 hash = htab_map_hash(key, key_size); 603 hash = htab_map_hash(key, key_size, htab->hashrnd);
601 604
602 head = select_bucket(htab, hash); 605 head = select_bucket(htab, hash);
603 606
@@ -824,7 +827,7 @@ static int htab_map_update_elem(struct bpf_map *map, void *key, void *value,
824 827
825 key_size = map->key_size; 828 key_size = map->key_size;
826 829
827 hash = htab_map_hash(key, key_size); 830 hash = htab_map_hash(key, key_size, htab->hashrnd);
828 831
829 b = __select_bucket(htab, hash); 832 b = __select_bucket(htab, hash);
830 head = &b->head; 833 head = &b->head;
@@ -880,7 +883,7 @@ static int htab_lru_map_update_elem(struct bpf_map *map, void *key, void *value,
880 883
881 key_size = map->key_size; 884 key_size = map->key_size;
882 885
883 hash = htab_map_hash(key, key_size); 886 hash = htab_map_hash(key, key_size, htab->hashrnd);
884 887
885 b = __select_bucket(htab, hash); 888 b = __select_bucket(htab, hash);
886 head = &b->head; 889 head = &b->head;
@@ -945,7 +948,7 @@ static int __htab_percpu_map_update_elem(struct bpf_map *map, void *key,
945 948
946 key_size = map->key_size; 949 key_size = map->key_size;
947 950
948 hash = htab_map_hash(key, key_size); 951 hash = htab_map_hash(key, key_size, htab->hashrnd);
949 952
950 b = __select_bucket(htab, hash); 953 b = __select_bucket(htab, hash);
951 head = &b->head; 954 head = &b->head;
@@ -998,7 +1001,7 @@ static int __htab_lru_percpu_map_update_elem(struct bpf_map *map, void *key,
998 1001
999 key_size = map->key_size; 1002 key_size = map->key_size;
1000 1003
1001 hash = htab_map_hash(key, key_size); 1004 hash = htab_map_hash(key, key_size, htab->hashrnd);
1002 1005
1003 b = __select_bucket(htab, hash); 1006 b = __select_bucket(htab, hash);
1004 head = &b->head; 1007 head = &b->head;
@@ -1071,7 +1074,7 @@ static int htab_map_delete_elem(struct bpf_map *map, void *key)
1071 1074
1072 key_size = map->key_size; 1075 key_size = map->key_size;
1073 1076
1074 hash = htab_map_hash(key, key_size); 1077 hash = htab_map_hash(key, key_size, htab->hashrnd);
1075 b = __select_bucket(htab, hash); 1078 b = __select_bucket(htab, hash);
1076 head = &b->head; 1079 head = &b->head;
1077 1080
@@ -1103,7 +1106,7 @@ static int htab_lru_map_delete_elem(struct bpf_map *map, void *key)
1103 1106
1104 key_size = map->key_size; 1107 key_size = map->key_size;
1105 1108
1106 hash = htab_map_hash(key, key_size); 1109 hash = htab_map_hash(key, key_size, htab->hashrnd);
1107 b = __select_bucket(htab, hash); 1110 b = __select_bucket(htab, hash);
1108 head = &b->head; 1111 head = &b->head;
1109 1112
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 98e621a29e8e..cf5195c7c331 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -1427,12 +1427,15 @@ out:
1427static void smap_write_space(struct sock *sk) 1427static void smap_write_space(struct sock *sk)
1428{ 1428{
1429 struct smap_psock *psock; 1429 struct smap_psock *psock;
1430 void (*write_space)(struct sock *sk);
1430 1431
1431 rcu_read_lock(); 1432 rcu_read_lock();
1432 psock = smap_psock_sk(sk); 1433 psock = smap_psock_sk(sk);
1433 if (likely(psock && test_bit(SMAP_TX_RUNNING, &psock->state))) 1434 if (likely(psock && test_bit(SMAP_TX_RUNNING, &psock->state)))
1434 schedule_work(&psock->tx_work); 1435 schedule_work(&psock->tx_work);
1436 write_space = psock->save_write_space;
1435 rcu_read_unlock(); 1437 rcu_read_unlock();
1438 write_space(sk);
1436} 1439}
1437 1440
1438static void smap_stop_sock(struct smap_psock *psock, struct sock *sk) 1441static void smap_stop_sock(struct smap_psock *psock, struct sock *sk)
@@ -2140,7 +2143,9 @@ static struct bpf_map *sock_hash_alloc(union bpf_attr *attr)
2140 return ERR_PTR(-EPERM); 2143 return ERR_PTR(-EPERM);
2141 2144
2142 /* check sanity of attributes */ 2145 /* check sanity of attributes */
2143 if (attr->max_entries == 0 || attr->value_size != 4 || 2146 if (attr->max_entries == 0 ||
2147 attr->key_size == 0 ||
2148 attr->value_size != 4 ||
2144 attr->map_flags & ~SOCK_CREATE_FLAG_MASK) 2149 attr->map_flags & ~SOCK_CREATE_FLAG_MASK)
2145 return ERR_PTR(-EINVAL); 2150 return ERR_PTR(-EINVAL);
2146 2151
@@ -2267,8 +2272,10 @@ static struct htab_elem *alloc_sock_hash_elem(struct bpf_htab *htab,
2267 } 2272 }
2268 l_new = kmalloc_node(htab->elem_size, GFP_ATOMIC | __GFP_NOWARN, 2273 l_new = kmalloc_node(htab->elem_size, GFP_ATOMIC | __GFP_NOWARN,
2269 htab->map.numa_node); 2274 htab->map.numa_node);
2270 if (!l_new) 2275 if (!l_new) {
2276 atomic_dec(&htab->count);
2271 return ERR_PTR(-ENOMEM); 2277 return ERR_PTR(-ENOMEM);
2278 }
2272 2279
2273 memcpy(l_new->key, key, key_size); 2280 memcpy(l_new->key, key, key_size);
2274 l_new->sk = sk; 2281 l_new->sk = sk;
diff --git a/kernel/cpu.c b/kernel/cpu.c
index ed44d7d34c2d..aa7fe85ad62e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -102,8 +102,6 @@ static inline void cpuhp_lock_release(bool bringup) { }
102 * @name: Name of the step 102 * @name: Name of the step
103 * @startup: Startup function of the step 103 * @startup: Startup function of the step
104 * @teardown: Teardown function of the step 104 * @teardown: Teardown function of the step
105 * @skip_onerr: Do not invoke the functions on error rollback
106 * Will go away once the notifiers are gone
107 * @cant_stop: Bringup/teardown can't be stopped at this step 105 * @cant_stop: Bringup/teardown can't be stopped at this step
108 */ 106 */
109struct cpuhp_step { 107struct cpuhp_step {
@@ -119,7 +117,6 @@ struct cpuhp_step {
119 struct hlist_node *node); 117 struct hlist_node *node);
120 } teardown; 118 } teardown;
121 struct hlist_head list; 119 struct hlist_head list;
122 bool skip_onerr;
123 bool cant_stop; 120 bool cant_stop;
124 bool multi_instance; 121 bool multi_instance;
125}; 122};
@@ -550,12 +547,8 @@ static int bringup_cpu(unsigned int cpu)
550 547
551static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st) 548static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st)
552{ 549{
553 for (st->state--; st->state > st->target; st->state--) { 550 for (st->state--; st->state > st->target; st->state--)
554 struct cpuhp_step *step = cpuhp_get_step(st->state); 551 cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
555
556 if (!step->skip_onerr)
557 cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
558 }
559} 552}
560 553
561static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, 554static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
@@ -644,12 +637,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
644 637
645 WARN_ON_ONCE(!cpuhp_is_ap_state(state)); 638 WARN_ON_ONCE(!cpuhp_is_ap_state(state));
646 639
647 if (st->rollback) {
648 struct cpuhp_step *step = cpuhp_get_step(state);
649 if (step->skip_onerr)
650 goto next;
651 }
652
653 if (cpuhp_is_atomic_state(state)) { 640 if (cpuhp_is_atomic_state(state)) {
654 local_irq_disable(); 641 local_irq_disable();
655 st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last); 642 st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
@@ -673,7 +660,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
673 st->should_run = false; 660 st->should_run = false;
674 } 661 }
675 662
676next:
677 cpuhp_lock_release(bringup); 663 cpuhp_lock_release(bringup);
678 664
679 if (!st->should_run) 665 if (!st->should_run)
@@ -916,12 +902,8 @@ void cpuhp_report_idle_dead(void)
916 902
917static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st) 903static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st)
918{ 904{
919 for (st->state++; st->state < st->target; st->state++) { 905 for (st->state++; st->state < st->target; st->state++)
920 struct cpuhp_step *step = cpuhp_get_step(st->state); 906 cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
921
922 if (!step->skip_onerr)
923 cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
924 }
925} 907}
926 908
927static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, 909static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 924e37fb1620..fd6f8ed28e01 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -38,7 +38,6 @@
38#include <linux/kmsg_dump.h> 38#include <linux/kmsg_dump.h>
39#include <linux/syslog.h> 39#include <linux/syslog.h>
40#include <linux/cpu.h> 40#include <linux/cpu.h>
41#include <linux/notifier.h>
42#include <linux/rculist.h> 41#include <linux/rculist.h>
43#include <linux/poll.h> 42#include <linux/poll.h>
44#include <linux/irq_work.h> 43#include <linux/irq_work.h>
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 5470dce212c0..977918d5d350 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -261,7 +261,7 @@ static void __touch_watchdog(void)
261 * entering idle state. This should only be used for scheduler events. 261 * entering idle state. This should only be used for scheduler events.
262 * Use touch_softlockup_watchdog() for everything else. 262 * Use touch_softlockup_watchdog() for everything else.
263 */ 263 */
264void touch_softlockup_watchdog_sched(void) 264notrace void touch_softlockup_watchdog_sched(void)
265{ 265{
266 /* 266 /*
267 * Preemption can be enabled. It doesn't matter which CPU's timestamp 267 * Preemption can be enabled. It doesn't matter which CPU's timestamp
@@ -270,7 +270,7 @@ void touch_softlockup_watchdog_sched(void)
270 raw_cpu_write(watchdog_touch_ts, 0); 270 raw_cpu_write(watchdog_touch_ts, 0);
271} 271}
272 272
273void touch_softlockup_watchdog(void) 273notrace void touch_softlockup_watchdog(void)
274{ 274{
275 touch_softlockup_watchdog_sched(); 275 touch_softlockup_watchdog_sched();
276 wq_watchdog_touch(raw_smp_processor_id()); 276 wq_watchdog_touch(raw_smp_processor_id());
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c
index 1f7020d65d0a..71381168dede 100644
--- a/kernel/watchdog_hld.c
+++ b/kernel/watchdog_hld.c
@@ -29,7 +29,7 @@ static struct cpumask dead_events_mask;
29static unsigned long hardlockup_allcpu_dumped; 29static unsigned long hardlockup_allcpu_dumped;
30static atomic_t watchdog_cpus = ATOMIC_INIT(0); 30static atomic_t watchdog_cpus = ATOMIC_INIT(0);
31 31
32void arch_touch_nmi_watchdog(void) 32notrace void arch_touch_nmi_watchdog(void)
33{ 33{
34 /* 34 /*
35 * Using __raw here because some code paths have 35 * Using __raw here because some code paths have
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 60e80198c3df..0280deac392e 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5574,7 +5574,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
5574 mod_timer(&wq_watchdog_timer, jiffies + thresh); 5574 mod_timer(&wq_watchdog_timer, jiffies + thresh);
5575} 5575}
5576 5576
5577void wq_watchdog_touch(int cpu) 5577notrace void wq_watchdog_touch(int cpu)
5578{ 5578{
5579 if (cpu >= 0) 5579 if (cpu >= 0)
5580 per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies; 5580 per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies;
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index c72577e472f2..a66595ba5543 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -4,7 +4,6 @@
4 */ 4 */
5 5
6#include <linux/percpu_counter.h> 6#include <linux/percpu_counter.h>
7#include <linux/notifier.h>
8#include <linux/mutex.h> 7#include <linux/mutex.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/cpu.h> 9#include <linux/cpu.h>
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 310e29b51507..30526afa8343 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -28,7 +28,6 @@
28#include <linux/rhashtable.h> 28#include <linux/rhashtable.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/export.h> 30#include <linux/export.h>
31#include <linux/rhashtable.h>
32 31
33#define HASH_DEFAULT_SIZE 64UL 32#define HASH_DEFAULT_SIZE 64UL
34#define HASH_MIN_SIZE 4U 33#define HASH_MIN_SIZE 4U
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 6551d3b0dc30..84ae9bf5858a 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -27,7 +27,6 @@
27#include <linux/mpage.h> 27#include <linux/mpage.h>
28#include <linux/rmap.h> 28#include <linux/rmap.h>
29#include <linux/percpu.h> 29#include <linux/percpu.h>
30#include <linux/notifier.h>
31#include <linux/smp.h> 30#include <linux/smp.h>
32#include <linux/sysctl.h> 31#include <linux/sysctl.h>
33#include <linux/cpu.h> 32#include <linux/cpu.h>
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index e75865d58ba7..05e983f42316 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -32,7 +32,6 @@
32#include <linux/slab.h> 32#include <linux/slab.h>
33#include <linux/ratelimit.h> 33#include <linux/ratelimit.h>
34#include <linux/oom.h> 34#include <linux/oom.h>
35#include <linux/notifier.h>
36#include <linux/topology.h> 35#include <linux/topology.h>
37#include <linux/sysctl.h> 36#include <linux/sysctl.h>
38#include <linux/cpu.h> 37#include <linux/cpu.h>
diff --git a/mm/slub.c b/mm/slub.c
index ce2b9e5cea77..8da34a8af53d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -19,7 +19,6 @@
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include "slab.h" 20#include "slab.h"
21#include <linux/proc_fs.h> 21#include <linux/proc_fs.h>
22#include <linux/notifier.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
24#include <linux/kasan.h> 23#include <linux/kasan.h>
25#include <linux/cpu.h> 24#include <linux/cpu.h>
diff --git a/net/core/dev.c b/net/core/dev.c
index 325fc5088370..82114e1111e6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -93,7 +93,6 @@
93#include <linux/netdevice.h> 93#include <linux/netdevice.h>
94#include <linux/etherdevice.h> 94#include <linux/etherdevice.h>
95#include <linux/ethtool.h> 95#include <linux/ethtool.h>
96#include <linux/notifier.h>
97#include <linux/skbuff.h> 96#include <linux/skbuff.h>
98#include <linux/bpf.h> 97#include <linux/bpf.h>
99#include <linux/bpf_trace.h> 98#include <linux/bpf_trace.h>
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 962c4fd338ba..1c45c1d6d241 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -767,7 +767,6 @@ static int dsa_slave_add_cls_matchall(struct net_device *dev,
767 const struct tc_action *a; 767 const struct tc_action *a;
768 struct dsa_port *to_dp; 768 struct dsa_port *to_dp;
769 int err = -EOPNOTSUPP; 769 int err = -EOPNOTSUPP;
770 LIST_HEAD(actions);
771 770
772 if (!ds->ops->port_mirror_add) 771 if (!ds->ops->port_mirror_add)
773 return err; 772 return err;
@@ -775,8 +774,7 @@ static int dsa_slave_add_cls_matchall(struct net_device *dev,
775 if (!tcf_exts_has_one_action(cls->exts)) 774 if (!tcf_exts_has_one_action(cls->exts))
776 return err; 775 return err;
777 776
778 tcf_exts_to_list(cls->exts, &actions); 777 a = tcf_exts_first_action(cls->exts);
779 a = list_first_entry(&actions, struct tc_action, list);
780 778
781 if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) { 779 if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) {
782 struct dsa_mall_mirror_tc_entry *mirror; 780 struct dsa_mall_mirror_tc_entry *mirror;
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
index 13d34427ca3d..02ff2dde9609 100644
--- a/net/ipv4/tcp_bbr.c
+++ b/net/ipv4/tcp_bbr.c
@@ -95,11 +95,10 @@ struct bbr {
95 u32 mode:3, /* current bbr_mode in state machine */ 95 u32 mode:3, /* current bbr_mode in state machine */
96 prev_ca_state:3, /* CA state on previous ACK */ 96 prev_ca_state:3, /* CA state on previous ACK */
97 packet_conservation:1, /* use packet conservation? */ 97 packet_conservation:1, /* use packet conservation? */
98 restore_cwnd:1, /* decided to revert cwnd to old value */
99 round_start:1, /* start of packet-timed tx->ack round? */ 98 round_start:1, /* start of packet-timed tx->ack round? */
100 idle_restart:1, /* restarting after idle? */ 99 idle_restart:1, /* restarting after idle? */
101 probe_rtt_round_done:1, /* a BBR_PROBE_RTT round at 4 pkts? */ 100 probe_rtt_round_done:1, /* a BBR_PROBE_RTT round at 4 pkts? */
102 unused:12, 101 unused:13,
103 lt_is_sampling:1, /* taking long-term ("LT") samples now? */ 102 lt_is_sampling:1, /* taking long-term ("LT") samples now? */
104 lt_rtt_cnt:7, /* round trips in long-term interval */ 103 lt_rtt_cnt:7, /* round trips in long-term interval */
105 lt_use_bw:1; /* use lt_bw as our bw estimate? */ 104 lt_use_bw:1; /* use lt_bw as our bw estimate? */
@@ -175,6 +174,8 @@ static const u32 bbr_lt_bw_diff = 4000 / 8;
175/* If we estimate we're policed, use lt_bw for this many round trips: */ 174/* If we estimate we're policed, use lt_bw for this many round trips: */
176static const u32 bbr_lt_bw_max_rtts = 48; 175static const u32 bbr_lt_bw_max_rtts = 48;
177 176
177static void bbr_check_probe_rtt_done(struct sock *sk);
178
178/* Do we estimate that STARTUP filled the pipe? */ 179/* Do we estimate that STARTUP filled the pipe? */
179static bool bbr_full_bw_reached(const struct sock *sk) 180static bool bbr_full_bw_reached(const struct sock *sk)
180{ 181{
@@ -309,6 +310,8 @@ static void bbr_cwnd_event(struct sock *sk, enum tcp_ca_event event)
309 */ 310 */
310 if (bbr->mode == BBR_PROBE_BW) 311 if (bbr->mode == BBR_PROBE_BW)
311 bbr_set_pacing_rate(sk, bbr_bw(sk), BBR_UNIT); 312 bbr_set_pacing_rate(sk, bbr_bw(sk), BBR_UNIT);
313 else if (bbr->mode == BBR_PROBE_RTT)
314 bbr_check_probe_rtt_done(sk);
312 } 315 }
313} 316}
314 317
@@ -396,17 +399,11 @@ static bool bbr_set_cwnd_to_recover_or_restore(
396 cwnd = tcp_packets_in_flight(tp) + acked; 399 cwnd = tcp_packets_in_flight(tp) + acked;
397 } else if (prev_state >= TCP_CA_Recovery && state < TCP_CA_Recovery) { 400 } else if (prev_state >= TCP_CA_Recovery && state < TCP_CA_Recovery) {
398 /* Exiting loss recovery; restore cwnd saved before recovery. */ 401 /* Exiting loss recovery; restore cwnd saved before recovery. */
399 bbr->restore_cwnd = 1; 402 cwnd = max(cwnd, bbr->prior_cwnd);
400 bbr->packet_conservation = 0; 403 bbr->packet_conservation = 0;
401 } 404 }
402 bbr->prev_ca_state = state; 405 bbr->prev_ca_state = state;
403 406
404 if (bbr->restore_cwnd) {
405 /* Restore cwnd after exiting loss recovery or PROBE_RTT. */
406 cwnd = max(cwnd, bbr->prior_cwnd);
407 bbr->restore_cwnd = 0;
408 }
409
410 if (bbr->packet_conservation) { 407 if (bbr->packet_conservation) {
411 *new_cwnd = max(cwnd, tcp_packets_in_flight(tp) + acked); 408 *new_cwnd = max(cwnd, tcp_packets_in_flight(tp) + acked);
412 return true; /* yes, using packet conservation */ 409 return true; /* yes, using packet conservation */
@@ -423,10 +420,10 @@ static void bbr_set_cwnd(struct sock *sk, const struct rate_sample *rs,
423{ 420{
424 struct tcp_sock *tp = tcp_sk(sk); 421 struct tcp_sock *tp = tcp_sk(sk);
425 struct bbr *bbr = inet_csk_ca(sk); 422 struct bbr *bbr = inet_csk_ca(sk);
426 u32 cwnd = 0, target_cwnd = 0; 423 u32 cwnd = tp->snd_cwnd, target_cwnd = 0;
427 424
428 if (!acked) 425 if (!acked)
429 return; 426 goto done; /* no packet fully ACKed; just apply caps */
430 427
431 if (bbr_set_cwnd_to_recover_or_restore(sk, rs, acked, &cwnd)) 428 if (bbr_set_cwnd_to_recover_or_restore(sk, rs, acked, &cwnd))
432 goto done; 429 goto done;
@@ -748,6 +745,20 @@ static void bbr_check_drain(struct sock *sk, const struct rate_sample *rs)
748 bbr_reset_probe_bw_mode(sk); /* we estimate queue is drained */ 745 bbr_reset_probe_bw_mode(sk); /* we estimate queue is drained */
749} 746}
750 747
748static void bbr_check_probe_rtt_done(struct sock *sk)
749{
750 struct tcp_sock *tp = tcp_sk(sk);
751 struct bbr *bbr = inet_csk_ca(sk);
752
753 if (!(bbr->probe_rtt_done_stamp &&
754 after(tcp_jiffies32, bbr->probe_rtt_done_stamp)))
755 return;
756
757 bbr->min_rtt_stamp = tcp_jiffies32; /* wait a while until PROBE_RTT */
758 tp->snd_cwnd = max(tp->snd_cwnd, bbr->prior_cwnd);
759 bbr_reset_mode(sk);
760}
761
751/* The goal of PROBE_RTT mode is to have BBR flows cooperatively and 762/* The goal of PROBE_RTT mode is to have BBR flows cooperatively and
752 * periodically drain the bottleneck queue, to converge to measure the true 763 * periodically drain the bottleneck queue, to converge to measure the true
753 * min_rtt (unloaded propagation delay). This allows the flows to keep queues 764 * min_rtt (unloaded propagation delay). This allows the flows to keep queues
@@ -806,12 +817,8 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
806 } else if (bbr->probe_rtt_done_stamp) { 817 } else if (bbr->probe_rtt_done_stamp) {
807 if (bbr->round_start) 818 if (bbr->round_start)
808 bbr->probe_rtt_round_done = 1; 819 bbr->probe_rtt_round_done = 1;
809 if (bbr->probe_rtt_round_done && 820 if (bbr->probe_rtt_round_done)
810 after(tcp_jiffies32, bbr->probe_rtt_done_stamp)) { 821 bbr_check_probe_rtt_done(sk);
811 bbr->min_rtt_stamp = tcp_jiffies32;
812 bbr->restore_cwnd = 1; /* snap to prior_cwnd */
813 bbr_reset_mode(sk);
814 }
815 } 822 }
816 } 823 }
817 /* Restart after idle ends only once we process a new S/ACK for data */ 824 /* Restart after idle ends only once we process a new S/ACK for data */
@@ -862,7 +869,6 @@ static void bbr_init(struct sock *sk)
862 bbr->has_seen_rtt = 0; 869 bbr->has_seen_rtt = 0;
863 bbr_init_pacing_rate_from_rtt(sk); 870 bbr_init_pacing_rate_from_rtt(sk);
864 871
865 bbr->restore_cwnd = 0;
866 bbr->round_start = 0; 872 bbr->round_start = 0;
867 bbr->idle_restart = 0; 873 bbr->idle_restart = 0;
868 bbr->full_bw_reached = 0; 874 bbr->full_bw_reached = 0;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 9e041fa5c545..44c09eddbb78 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2517,6 +2517,12 @@ static int __net_init tcp_sk_init(struct net *net)
2517 if (res) 2517 if (res)
2518 goto fail; 2518 goto fail;
2519 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE); 2519 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE);
2520
2521 /* Please enforce IP_DF and IPID==0 for RST and
2522 * ACK sent in SYN-RECV and TIME-WAIT state.
2523 */
2524 inet_sk(sk)->pmtudisc = IP_PMTUDISC_DO;
2525
2520 *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk; 2526 *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk;
2521 } 2527 }
2522 2528
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2fac4ad74867..d51a8c0b3372 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2398,7 +2398,7 @@ static void addrconf_add_mroute(struct net_device *dev)
2398 2398
2399 ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0); 2399 ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0);
2400 2400
2401 ip6_route_add(&cfg, GFP_ATOMIC, NULL); 2401 ip6_route_add(&cfg, GFP_KERNEL, NULL);
2402} 2402}
2403 2403
2404static struct inet6_dev *addrconf_add_dev(struct net_device *dev) 2404static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
@@ -3062,7 +3062,7 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
3062 if (addr.s6_addr32[3]) { 3062 if (addr.s6_addr32[3]) {
3063 add_addr(idev, &addr, plen, scope); 3063 add_addr(idev, &addr, plen, scope);
3064 addrconf_prefix_route(&addr, plen, 0, idev->dev, 0, pflags, 3064 addrconf_prefix_route(&addr, plen, 0, idev->dev, 0, pflags,
3065 GFP_ATOMIC); 3065 GFP_KERNEL);
3066 return; 3066 return;
3067 } 3067 }
3068 3068
@@ -3087,7 +3087,7 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
3087 3087
3088 add_addr(idev, &addr, plen, flag); 3088 add_addr(idev, &addr, plen, flag);
3089 addrconf_prefix_route(&addr, plen, 0, idev->dev, 3089 addrconf_prefix_route(&addr, plen, 0, idev->dev,
3090 0, pflags, GFP_ATOMIC); 3090 0, pflags, GFP_KERNEL);
3091 } 3091 }
3092 } 3092 }
3093 } 3093 }
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index d212738e9d10..c861a6d4671d 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -198,6 +198,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
198 } 198 }
199 } 199 }
200 200
201 lwtstate_put(f6i->fib6_nh.nh_lwtstate);
202
201 if (f6i->fib6_nh.nh_dev) 203 if (f6i->fib6_nh.nh_dev)
202 dev_put(f6i->fib6_nh.nh_dev); 204 dev_put(f6i->fib6_nh.nh_dev);
203 205
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 38dec9da90d3..5095367c7204 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -1094,7 +1094,8 @@ static void __net_exit vti6_destroy_tunnels(struct vti6_net *ip6n,
1094 } 1094 }
1095 1095
1096 t = rtnl_dereference(ip6n->tnls_wc[0]); 1096 t = rtnl_dereference(ip6n->tnls_wc[0]);
1097 unregister_netdevice_queue(t->dev, list); 1097 if (t)
1098 unregister_netdevice_queue(t->dev, list);
1098} 1099}
1099 1100
1100static int __net_init vti6_init_net(struct net *net) 1101static int __net_init vti6_init_net(struct net *net)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 7208c16302f6..c4ea13e8360b 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -956,7 +956,7 @@ static void ip6_rt_init_dst(struct rt6_info *rt, struct fib6_info *ort)
956 rt->dst.error = 0; 956 rt->dst.error = 0;
957 rt->dst.output = ip6_output; 957 rt->dst.output = ip6_output;
958 958
959 if (ort->fib6_type == RTN_LOCAL) { 959 if (ort->fib6_type == RTN_LOCAL || ort->fib6_type == RTN_ANYCAST) {
960 rt->dst.input = ip6_input; 960 rt->dst.input = ip6_input;
961 } else if (ipv6_addr_type(&ort->fib6_dst.addr) & IPV6_ADDR_MULTICAST) { 961 } else if (ipv6_addr_type(&ort->fib6_dst.addr) & IPV6_ADDR_MULTICAST) {
962 rt->dst.input = ip6_mc_input; 962 rt->dst.input = ip6_mc_input;
diff --git a/net/ncsi/ncsi-netlink.c b/net/ncsi/ncsi-netlink.c
index 82e6edf9c5d9..45f33d6dedf7 100644
--- a/net/ncsi/ncsi-netlink.c
+++ b/net/ncsi/ncsi-netlink.c
@@ -100,7 +100,7 @@ static int ncsi_write_package_info(struct sk_buff *skb,
100 bool found; 100 bool found;
101 int rc; 101 int rc;
102 102
103 if (id > ndp->package_num) { 103 if (id > ndp->package_num - 1) {
104 netdev_info(ndp->ndev.dev, "NCSI: No package with id %u\n", id); 104 netdev_info(ndp->ndev.dev, "NCSI: No package with id %u\n", id);
105 return -ENODEV; 105 return -ENODEV;
106 } 106 }
@@ -240,7 +240,7 @@ static int ncsi_pkg_info_all_nl(struct sk_buff *skb,
240 return 0; /* done */ 240 return 0; /* done */
241 241
242 hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, 242 hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
243 &ncsi_genl_family, 0, NCSI_CMD_PKG_INFO); 243 &ncsi_genl_family, NLM_F_MULTI, NCSI_CMD_PKG_INFO);
244 if (!hdr) { 244 if (!hdr) {
245 rc = -EMSGSIZE; 245 rc = -EMSGSIZE;
246 goto err; 246 goto err;
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 2c7b7c352d3e..b9bbcf3d6c63 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -37,7 +37,6 @@
37#include <net/tcp.h> 37#include <net/tcp.h>
38#include <net/net_namespace.h> 38#include <net/net_namespace.h>
39#include <net/netns/generic.h> 39#include <net/netns/generic.h>
40#include <net/tcp.h>
41#include <net/addrconf.h> 40#include <net/addrconf.h>
42 41
43#include "rds.h" 42#include "rds.h"
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 229d63c99be2..db83dac1e7f4 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -300,21 +300,17 @@ int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
300} 300}
301EXPORT_SYMBOL(tcf_generic_walker); 301EXPORT_SYMBOL(tcf_generic_walker);
302 302
303static bool __tcf_idr_check(struct tc_action_net *tn, u32 index, 303int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index)
304 struct tc_action **a, int bind)
305{ 304{
306 struct tcf_idrinfo *idrinfo = tn->idrinfo; 305 struct tcf_idrinfo *idrinfo = tn->idrinfo;
307 struct tc_action *p; 306 struct tc_action *p;
308 307
309 spin_lock(&idrinfo->lock); 308 spin_lock(&idrinfo->lock);
310 p = idr_find(&idrinfo->action_idr, index); 309 p = idr_find(&idrinfo->action_idr, index);
311 if (IS_ERR(p)) { 310 if (IS_ERR(p))
312 p = NULL; 311 p = NULL;
313 } else if (p) { 312 else if (p)
314 refcount_inc(&p->tcfa_refcnt); 313 refcount_inc(&p->tcfa_refcnt);
315 if (bind)
316 atomic_inc(&p->tcfa_bindcnt);
317 }
318 spin_unlock(&idrinfo->lock); 314 spin_unlock(&idrinfo->lock);
319 315
320 if (p) { 316 if (p) {
@@ -323,23 +319,10 @@ static bool __tcf_idr_check(struct tc_action_net *tn, u32 index,
323 } 319 }
324 return false; 320 return false;
325} 321}
326
327int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index)
328{
329 return __tcf_idr_check(tn, index, a, 0);
330}
331EXPORT_SYMBOL(tcf_idr_search); 322EXPORT_SYMBOL(tcf_idr_search);
332 323
333bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a, 324static int tcf_idr_delete_index(struct tcf_idrinfo *idrinfo, u32 index)
334 int bind)
335{ 325{
336 return __tcf_idr_check(tn, index, a, bind);
337}
338EXPORT_SYMBOL(tcf_idr_check);
339
340int tcf_idr_delete_index(struct tc_action_net *tn, u32 index)
341{
342 struct tcf_idrinfo *idrinfo = tn->idrinfo;
343 struct tc_action *p; 326 struct tc_action *p;
344 int ret = 0; 327 int ret = 0;
345 328
@@ -370,7 +353,6 @@ int tcf_idr_delete_index(struct tc_action_net *tn, u32 index)
370 spin_unlock(&idrinfo->lock); 353 spin_unlock(&idrinfo->lock);
371 return ret; 354 return ret;
372} 355}
373EXPORT_SYMBOL(tcf_idr_delete_index);
374 356
375int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, 357int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
376 struct tc_action **a, const struct tc_action_ops *ops, 358 struct tc_action **a, const struct tc_action_ops *ops,
@@ -409,7 +391,6 @@ int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
409 391
410 p->idrinfo = idrinfo; 392 p->idrinfo = idrinfo;
411 p->ops = ops; 393 p->ops = ops;
412 INIT_LIST_HEAD(&p->list);
413 *a = p; 394 *a = p;
414 return 0; 395 return 0;
415err3: 396err3:
@@ -686,14 +667,18 @@ static int tcf_action_put(struct tc_action *p)
686 return __tcf_action_put(p, false); 667 return __tcf_action_put(p, false);
687} 668}
688 669
670/* Put all actions in this array, skip those NULL's. */
689static void tcf_action_put_many(struct tc_action *actions[]) 671static void tcf_action_put_many(struct tc_action *actions[])
690{ 672{
691 int i; 673 int i;
692 674
693 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) { 675 for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
694 struct tc_action *a = actions[i]; 676 struct tc_action *a = actions[i];
695 const struct tc_action_ops *ops = a->ops; 677 const struct tc_action_ops *ops;
696 678
679 if (!a)
680 continue;
681 ops = a->ops;
697 if (tcf_action_put(a)) 682 if (tcf_action_put(a))
698 module_put(ops->owner); 683 module_put(ops->owner);
699 } 684 }
@@ -1175,41 +1160,38 @@ err_out:
1175 return err; 1160 return err;
1176} 1161}
1177 1162
1178static int tcf_action_delete(struct net *net, struct tc_action *actions[], 1163static int tcf_action_delete(struct net *net, struct tc_action *actions[])
1179 int *acts_deleted, struct netlink_ext_ack *extack)
1180{ 1164{
1181 u32 act_index; 1165 int i;
1182 int ret, i;
1183 1166
1184 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) { 1167 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
1185 struct tc_action *a = actions[i]; 1168 struct tc_action *a = actions[i];
1186 const struct tc_action_ops *ops = a->ops; 1169 const struct tc_action_ops *ops = a->ops;
1187
1188 /* Actions can be deleted concurrently so we must save their 1170 /* Actions can be deleted concurrently so we must save their
1189 * type and id to search again after reference is released. 1171 * type and id to search again after reference is released.
1190 */ 1172 */
1191 act_index = a->tcfa_index; 1173 struct tcf_idrinfo *idrinfo = a->idrinfo;
1174 u32 act_index = a->tcfa_index;
1192 1175
1193 if (tcf_action_put(a)) { 1176 if (tcf_action_put(a)) {
1194 /* last reference, action was deleted concurrently */ 1177 /* last reference, action was deleted concurrently */
1195 module_put(ops->owner); 1178 module_put(ops->owner);
1196 } else { 1179 } else {
1180 int ret;
1181
1197 /* now do the delete */ 1182 /* now do the delete */
1198 ret = ops->delete(net, act_index); 1183 ret = tcf_idr_delete_index(idrinfo, act_index);
1199 if (ret < 0) { 1184 if (ret < 0)
1200 *acts_deleted = i + 1;
1201 return ret; 1185 return ret;
1202 }
1203 } 1186 }
1187 actions[i] = NULL;
1204 } 1188 }
1205 *acts_deleted = i;
1206 return 0; 1189 return 0;
1207} 1190}
1208 1191
1209static int 1192static int
1210tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[], 1193tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
1211 int *acts_deleted, u32 portid, size_t attr_size, 1194 u32 portid, size_t attr_size, struct netlink_ext_ack *extack)
1212 struct netlink_ext_ack *extack)
1213{ 1195{
1214 int ret; 1196 int ret;
1215 struct sk_buff *skb; 1197 struct sk_buff *skb;
@@ -1227,7 +1209,7 @@ tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
1227 } 1209 }
1228 1210
1229 /* now do the delete */ 1211 /* now do the delete */
1230 ret = tcf_action_delete(net, actions, acts_deleted, extack); 1212 ret = tcf_action_delete(net, actions);
1231 if (ret < 0) { 1213 if (ret < 0) {
1232 NL_SET_ERR_MSG(extack, "Failed to delete TC action"); 1214 NL_SET_ERR_MSG(extack, "Failed to delete TC action");
1233 kfree_skb(skb); 1215 kfree_skb(skb);
@@ -1249,8 +1231,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
1249 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; 1231 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
1250 struct tc_action *act; 1232 struct tc_action *act;
1251 size_t attr_size = 0; 1233 size_t attr_size = 0;
1252 struct tc_action *actions[TCA_ACT_MAX_PRIO + 1] = {}; 1234 struct tc_action *actions[TCA_ACT_MAX_PRIO] = {};
1253 int acts_deleted = 0;
1254 1235
1255 ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, extack); 1236 ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, extack);
1256 if (ret < 0) 1237 if (ret < 0)
@@ -1280,14 +1261,13 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
1280 if (event == RTM_GETACTION) 1261 if (event == RTM_GETACTION)
1281 ret = tcf_get_notify(net, portid, n, actions, event, extack); 1262 ret = tcf_get_notify(net, portid, n, actions, event, extack);
1282 else { /* delete */ 1263 else { /* delete */
1283 ret = tcf_del_notify(net, n, actions, &acts_deleted, portid, 1264 ret = tcf_del_notify(net, n, actions, portid, attr_size, extack);
1284 attr_size, extack);
1285 if (ret) 1265 if (ret)
1286 goto err; 1266 goto err;
1287 return ret; 1267 return 0;
1288 } 1268 }
1289err: 1269err:
1290 tcf_action_put_many(&actions[acts_deleted]); 1270 tcf_action_put_many(actions);
1291 return ret; 1271 return ret;
1292} 1272}
1293 1273
diff --git a/net/sched/act_bpf.c b/net/sched/act_bpf.c
index d30b23e42436..0c68bc9cf0b4 100644
--- a/net/sched/act_bpf.c
+++ b/net/sched/act_bpf.c
@@ -395,13 +395,6 @@ static int tcf_bpf_search(struct net *net, struct tc_action **a, u32 index,
395 return tcf_idr_search(tn, a, index); 395 return tcf_idr_search(tn, a, index);
396} 396}
397 397
398static int tcf_bpf_delete(struct net *net, u32 index)
399{
400 struct tc_action_net *tn = net_generic(net, bpf_net_id);
401
402 return tcf_idr_delete_index(tn, index);
403}
404
405static struct tc_action_ops act_bpf_ops __read_mostly = { 398static struct tc_action_ops act_bpf_ops __read_mostly = {
406 .kind = "bpf", 399 .kind = "bpf",
407 .type = TCA_ACT_BPF, 400 .type = TCA_ACT_BPF,
@@ -412,7 +405,6 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
412 .init = tcf_bpf_init, 405 .init = tcf_bpf_init,
413 .walk = tcf_bpf_walker, 406 .walk = tcf_bpf_walker,
414 .lookup = tcf_bpf_search, 407 .lookup = tcf_bpf_search,
415 .delete = tcf_bpf_delete,
416 .size = sizeof(struct tcf_bpf), 408 .size = sizeof(struct tcf_bpf),
417}; 409};
418 410
diff --git a/net/sched/act_connmark.c b/net/sched/act_connmark.c
index 54c0bf54f2ac..6f0f273f1139 100644
--- a/net/sched/act_connmark.c
+++ b/net/sched/act_connmark.c
@@ -198,13 +198,6 @@ static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index,
198 return tcf_idr_search(tn, a, index); 198 return tcf_idr_search(tn, a, index);
199} 199}
200 200
201static int tcf_connmark_delete(struct net *net, u32 index)
202{
203 struct tc_action_net *tn = net_generic(net, connmark_net_id);
204
205 return tcf_idr_delete_index(tn, index);
206}
207
208static struct tc_action_ops act_connmark_ops = { 201static struct tc_action_ops act_connmark_ops = {
209 .kind = "connmark", 202 .kind = "connmark",
210 .type = TCA_ACT_CONNMARK, 203 .type = TCA_ACT_CONNMARK,
@@ -214,7 +207,6 @@ static struct tc_action_ops act_connmark_ops = {
214 .init = tcf_connmark_init, 207 .init = tcf_connmark_init,
215 .walk = tcf_connmark_walker, 208 .walk = tcf_connmark_walker,
216 .lookup = tcf_connmark_search, 209 .lookup = tcf_connmark_search,
217 .delete = tcf_connmark_delete,
218 .size = sizeof(struct tcf_connmark_info), 210 .size = sizeof(struct tcf_connmark_info),
219}; 211};
220 212
diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c
index e698d3fe2080..b8a67ae3105a 100644
--- a/net/sched/act_csum.c
+++ b/net/sched/act_csum.c
@@ -659,13 +659,6 @@ static size_t tcf_csum_get_fill_size(const struct tc_action *act)
659 return nla_total_size(sizeof(struct tc_csum)); 659 return nla_total_size(sizeof(struct tc_csum));
660} 660}
661 661
662static int tcf_csum_delete(struct net *net, u32 index)
663{
664 struct tc_action_net *tn = net_generic(net, csum_net_id);
665
666 return tcf_idr_delete_index(tn, index);
667}
668
669static struct tc_action_ops act_csum_ops = { 662static struct tc_action_ops act_csum_ops = {
670 .kind = "csum", 663 .kind = "csum",
671 .type = TCA_ACT_CSUM, 664 .type = TCA_ACT_CSUM,
@@ -677,7 +670,6 @@ static struct tc_action_ops act_csum_ops = {
677 .walk = tcf_csum_walker, 670 .walk = tcf_csum_walker,
678 .lookup = tcf_csum_search, 671 .lookup = tcf_csum_search,
679 .get_fill_size = tcf_csum_get_fill_size, 672 .get_fill_size = tcf_csum_get_fill_size,
680 .delete = tcf_csum_delete,
681 .size = sizeof(struct tcf_csum), 673 .size = sizeof(struct tcf_csum),
682}; 674};
683 675
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index 6a3f25a8ffb3..cd1d9bd32ef9 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -243,13 +243,6 @@ static size_t tcf_gact_get_fill_size(const struct tc_action *act)
243 return sz; 243 return sz;
244} 244}
245 245
246static int tcf_gact_delete(struct net *net, u32 index)
247{
248 struct tc_action_net *tn = net_generic(net, gact_net_id);
249
250 return tcf_idr_delete_index(tn, index);
251}
252
253static struct tc_action_ops act_gact_ops = { 246static struct tc_action_ops act_gact_ops = {
254 .kind = "gact", 247 .kind = "gact",
255 .type = TCA_ACT_GACT, 248 .type = TCA_ACT_GACT,
@@ -261,7 +254,6 @@ static struct tc_action_ops act_gact_ops = {
261 .walk = tcf_gact_walker, 254 .walk = tcf_gact_walker,
262 .lookup = tcf_gact_search, 255 .lookup = tcf_gact_search,
263 .get_fill_size = tcf_gact_get_fill_size, 256 .get_fill_size = tcf_gact_get_fill_size,
264 .delete = tcf_gact_delete,
265 .size = sizeof(struct tcf_gact), 257 .size = sizeof(struct tcf_gact),
266}; 258};
267 259
diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
index d1081bdf1bdb..196430aefe87 100644
--- a/net/sched/act_ife.c
+++ b/net/sched/act_ife.c
@@ -167,16 +167,16 @@ static struct tcf_meta_ops *find_ife_oplist(u16 metaid)
167{ 167{
168 struct tcf_meta_ops *o; 168 struct tcf_meta_ops *o;
169 169
170 read_lock_bh(&ife_mod_lock); 170 read_lock(&ife_mod_lock);
171 list_for_each_entry(o, &ifeoplist, list) { 171 list_for_each_entry(o, &ifeoplist, list) {
172 if (o->metaid == metaid) { 172 if (o->metaid == metaid) {
173 if (!try_module_get(o->owner)) 173 if (!try_module_get(o->owner))
174 o = NULL; 174 o = NULL;
175 read_unlock_bh(&ife_mod_lock); 175 read_unlock(&ife_mod_lock);
176 return o; 176 return o;
177 } 177 }
178 } 178 }
179 read_unlock_bh(&ife_mod_lock); 179 read_unlock(&ife_mod_lock);
180 180
181 return NULL; 181 return NULL;
182} 182}
@@ -190,12 +190,12 @@ int register_ife_op(struct tcf_meta_ops *mops)
190 !mops->get || !mops->alloc) 190 !mops->get || !mops->alloc)
191 return -EINVAL; 191 return -EINVAL;
192 192
193 write_lock_bh(&ife_mod_lock); 193 write_lock(&ife_mod_lock);
194 194
195 list_for_each_entry(m, &ifeoplist, list) { 195 list_for_each_entry(m, &ifeoplist, list) {
196 if (m->metaid == mops->metaid || 196 if (m->metaid == mops->metaid ||
197 (strcmp(mops->name, m->name) == 0)) { 197 (strcmp(mops->name, m->name) == 0)) {
198 write_unlock_bh(&ife_mod_lock); 198 write_unlock(&ife_mod_lock);
199 return -EEXIST; 199 return -EEXIST;
200 } 200 }
201 } 201 }
@@ -204,7 +204,7 @@ int register_ife_op(struct tcf_meta_ops *mops)
204 mops->release = ife_release_meta_gen; 204 mops->release = ife_release_meta_gen;
205 205
206 list_add_tail(&mops->list, &ifeoplist); 206 list_add_tail(&mops->list, &ifeoplist);
207 write_unlock_bh(&ife_mod_lock); 207 write_unlock(&ife_mod_lock);
208 return 0; 208 return 0;
209} 209}
210EXPORT_SYMBOL_GPL(unregister_ife_op); 210EXPORT_SYMBOL_GPL(unregister_ife_op);
@@ -214,7 +214,7 @@ int unregister_ife_op(struct tcf_meta_ops *mops)
214 struct tcf_meta_ops *m; 214 struct tcf_meta_ops *m;
215 int err = -ENOENT; 215 int err = -ENOENT;
216 216
217 write_lock_bh(&ife_mod_lock); 217 write_lock(&ife_mod_lock);
218 list_for_each_entry(m, &ifeoplist, list) { 218 list_for_each_entry(m, &ifeoplist, list) {
219 if (m->metaid == mops->metaid) { 219 if (m->metaid == mops->metaid) {
220 list_del(&mops->list); 220 list_del(&mops->list);
@@ -222,7 +222,7 @@ int unregister_ife_op(struct tcf_meta_ops *mops)
222 break; 222 break;
223 } 223 }
224 } 224 }
225 write_unlock_bh(&ife_mod_lock); 225 write_unlock(&ife_mod_lock);
226 226
227 return err; 227 return err;
228} 228}
@@ -265,11 +265,8 @@ static const char *ife_meta_id2name(u32 metaid)
265#endif 265#endif
266 266
267/* called when adding new meta information 267/* called when adding new meta information
268 * under ife->tcf_lock for existing action
269*/ 268*/
270static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid, 269static int load_metaops_and_vet(u32 metaid, void *val, int len, bool rtnl_held)
271 void *val, int len, bool exists,
272 bool rtnl_held)
273{ 270{
274 struct tcf_meta_ops *ops = find_ife_oplist(metaid); 271 struct tcf_meta_ops *ops = find_ife_oplist(metaid);
275 int ret = 0; 272 int ret = 0;
@@ -277,15 +274,11 @@ static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid,
277 if (!ops) { 274 if (!ops) {
278 ret = -ENOENT; 275 ret = -ENOENT;
279#ifdef CONFIG_MODULES 276#ifdef CONFIG_MODULES
280 if (exists)
281 spin_unlock_bh(&ife->tcf_lock);
282 if (rtnl_held) 277 if (rtnl_held)
283 rtnl_unlock(); 278 rtnl_unlock();
284 request_module("ife-meta-%s", ife_meta_id2name(metaid)); 279 request_module("ife-meta-%s", ife_meta_id2name(metaid));
285 if (rtnl_held) 280 if (rtnl_held)
286 rtnl_lock(); 281 rtnl_lock();
287 if (exists)
288 spin_lock_bh(&ife->tcf_lock);
289 ops = find_ife_oplist(metaid); 282 ops = find_ife_oplist(metaid);
290#endif 283#endif
291 } 284 }
@@ -302,24 +295,17 @@ static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid,
302} 295}
303 296
304/* called when adding new meta information 297/* called when adding new meta information
305 * under ife->tcf_lock for existing action
306*/ 298*/
307static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval, 299static int __add_metainfo(const struct tcf_meta_ops *ops,
308 int len, bool atomic) 300 struct tcf_ife_info *ife, u32 metaid, void *metaval,
301 int len, bool atomic, bool exists)
309{ 302{
310 struct tcf_meta_info *mi = NULL; 303 struct tcf_meta_info *mi = NULL;
311 struct tcf_meta_ops *ops = find_ife_oplist(metaid);
312 int ret = 0; 304 int ret = 0;
313 305
314 if (!ops)
315 return -ENOENT;
316
317 mi = kzalloc(sizeof(*mi), atomic ? GFP_ATOMIC : GFP_KERNEL); 306 mi = kzalloc(sizeof(*mi), atomic ? GFP_ATOMIC : GFP_KERNEL);
318 if (!mi) { 307 if (!mi)
319 /*put back what find_ife_oplist took */
320 module_put(ops->owner);
321 return -ENOMEM; 308 return -ENOMEM;
322 }
323 309
324 mi->metaid = metaid; 310 mi->metaid = metaid;
325 mi->ops = ops; 311 mi->ops = ops;
@@ -327,29 +313,47 @@ static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
327 ret = ops->alloc(mi, metaval, atomic ? GFP_ATOMIC : GFP_KERNEL); 313 ret = ops->alloc(mi, metaval, atomic ? GFP_ATOMIC : GFP_KERNEL);
328 if (ret != 0) { 314 if (ret != 0) {
329 kfree(mi); 315 kfree(mi);
330 module_put(ops->owner);
331 return ret; 316 return ret;
332 } 317 }
333 } 318 }
334 319
320 if (exists)
321 spin_lock_bh(&ife->tcf_lock);
335 list_add_tail(&mi->metalist, &ife->metalist); 322 list_add_tail(&mi->metalist, &ife->metalist);
323 if (exists)
324 spin_unlock_bh(&ife->tcf_lock);
325
326 return ret;
327}
328
329static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
330 int len, bool exists)
331{
332 const struct tcf_meta_ops *ops = find_ife_oplist(metaid);
333 int ret;
336 334
335 if (!ops)
336 return -ENOENT;
337 ret = __add_metainfo(ops, ife, metaid, metaval, len, false, exists);
338 if (ret)
339 /*put back what find_ife_oplist took */
340 module_put(ops->owner);
337 return ret; 341 return ret;
338} 342}
339 343
340static int use_all_metadata(struct tcf_ife_info *ife) 344static int use_all_metadata(struct tcf_ife_info *ife, bool exists)
341{ 345{
342 struct tcf_meta_ops *o; 346 struct tcf_meta_ops *o;
343 int rc = 0; 347 int rc = 0;
344 int installed = 0; 348 int installed = 0;
345 349
346 read_lock_bh(&ife_mod_lock); 350 read_lock(&ife_mod_lock);
347 list_for_each_entry(o, &ifeoplist, list) { 351 list_for_each_entry(o, &ifeoplist, list) {
348 rc = add_metainfo(ife, o->metaid, NULL, 0, true); 352 rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
349 if (rc == 0) 353 if (rc == 0)
350 installed += 1; 354 installed += 1;
351 } 355 }
352 read_unlock_bh(&ife_mod_lock); 356 read_unlock(&ife_mod_lock);
353 357
354 if (installed) 358 if (installed)
355 return 0; 359 return 0;
@@ -422,7 +426,6 @@ static void tcf_ife_cleanup(struct tc_action *a)
422 kfree_rcu(p, rcu); 426 kfree_rcu(p, rcu);
423} 427}
424 428
425/* under ife->tcf_lock for existing action */
426static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb, 429static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb,
427 bool exists, bool rtnl_held) 430 bool exists, bool rtnl_held)
428{ 431{
@@ -436,8 +439,7 @@ static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb,
436 val = nla_data(tb[i]); 439 val = nla_data(tb[i]);
437 len = nla_len(tb[i]); 440 len = nla_len(tb[i]);
438 441
439 rc = load_metaops_and_vet(ife, i, val, len, exists, 442 rc = load_metaops_and_vet(i, val, len, rtnl_held);
440 rtnl_held);
441 if (rc != 0) 443 if (rc != 0)
442 return rc; 444 return rc;
443 445
@@ -540,8 +542,6 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
540 p->eth_type = ife_type; 542 p->eth_type = ife_type;
541 } 543 }
542 544
543 if (exists)
544 spin_lock_bh(&ife->tcf_lock);
545 545
546 if (ret == ACT_P_CREATED) 546 if (ret == ACT_P_CREATED)
547 INIT_LIST_HEAD(&ife->metalist); 547 INIT_LIST_HEAD(&ife->metalist);
@@ -551,10 +551,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
551 NULL, NULL); 551 NULL, NULL);
552 if (err) { 552 if (err) {
553metadata_parse_err: 553metadata_parse_err:
554 if (exists)
555 spin_unlock_bh(&ife->tcf_lock);
556 tcf_idr_release(*a, bind); 554 tcf_idr_release(*a, bind);
557
558 kfree(p); 555 kfree(p);
559 return err; 556 return err;
560 } 557 }
@@ -569,17 +566,16 @@ metadata_parse_err:
569 * as we can. You better have at least one else we are 566 * as we can. You better have at least one else we are
570 * going to bail out 567 * going to bail out
571 */ 568 */
572 err = use_all_metadata(ife); 569 err = use_all_metadata(ife, exists);
573 if (err) { 570 if (err) {
574 if (exists)
575 spin_unlock_bh(&ife->tcf_lock);
576 tcf_idr_release(*a, bind); 571 tcf_idr_release(*a, bind);
577
578 kfree(p); 572 kfree(p);
579 return err; 573 return err;
580 } 574 }
581 } 575 }
582 576
577 if (exists)
578 spin_lock_bh(&ife->tcf_lock);
583 ife->tcf_action = parm->action; 579 ife->tcf_action = parm->action;
584 /* protected by tcf_lock when modifying existing action */ 580 /* protected by tcf_lock when modifying existing action */
585 rcu_swap_protected(ife->params, p, 1); 581 rcu_swap_protected(ife->params, p, 1);
@@ -853,13 +849,6 @@ static int tcf_ife_search(struct net *net, struct tc_action **a, u32 index,
853 return tcf_idr_search(tn, a, index); 849 return tcf_idr_search(tn, a, index);
854} 850}
855 851
856static int tcf_ife_delete(struct net *net, u32 index)
857{
858 struct tc_action_net *tn = net_generic(net, ife_net_id);
859
860 return tcf_idr_delete_index(tn, index);
861}
862
863static struct tc_action_ops act_ife_ops = { 852static struct tc_action_ops act_ife_ops = {
864 .kind = "ife", 853 .kind = "ife",
865 .type = TCA_ACT_IFE, 854 .type = TCA_ACT_IFE,
@@ -870,7 +859,6 @@ static struct tc_action_ops act_ife_ops = {
870 .init = tcf_ife_init, 859 .init = tcf_ife_init,
871 .walk = tcf_ife_walker, 860 .walk = tcf_ife_walker,
872 .lookup = tcf_ife_search, 861 .lookup = tcf_ife_search,
873 .delete = tcf_ife_delete,
874 .size = sizeof(struct tcf_ife_info), 862 .size = sizeof(struct tcf_ife_info),
875}; 863};
876 864
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 51f235bbeb5b..23273b5303fd 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -337,13 +337,6 @@ static int tcf_ipt_search(struct net *net, struct tc_action **a, u32 index,
337 return tcf_idr_search(tn, a, index); 337 return tcf_idr_search(tn, a, index);
338} 338}
339 339
340static int tcf_ipt_delete(struct net *net, u32 index)
341{
342 struct tc_action_net *tn = net_generic(net, ipt_net_id);
343
344 return tcf_idr_delete_index(tn, index);
345}
346
347static struct tc_action_ops act_ipt_ops = { 340static struct tc_action_ops act_ipt_ops = {
348 .kind = "ipt", 341 .kind = "ipt",
349 .type = TCA_ACT_IPT, 342 .type = TCA_ACT_IPT,
@@ -354,7 +347,6 @@ static struct tc_action_ops act_ipt_ops = {
354 .init = tcf_ipt_init, 347 .init = tcf_ipt_init,
355 .walk = tcf_ipt_walker, 348 .walk = tcf_ipt_walker,
356 .lookup = tcf_ipt_search, 349 .lookup = tcf_ipt_search,
357 .delete = tcf_ipt_delete,
358 .size = sizeof(struct tcf_ipt), 350 .size = sizeof(struct tcf_ipt),
359}; 351};
360 352
@@ -395,13 +387,6 @@ static int tcf_xt_search(struct net *net, struct tc_action **a, u32 index,
395 return tcf_idr_search(tn, a, index); 387 return tcf_idr_search(tn, a, index);
396} 388}
397 389
398static int tcf_xt_delete(struct net *net, u32 index)
399{
400 struct tc_action_net *tn = net_generic(net, xt_net_id);
401
402 return tcf_idr_delete_index(tn, index);
403}
404
405static struct tc_action_ops act_xt_ops = { 390static struct tc_action_ops act_xt_ops = {
406 .kind = "xt", 391 .kind = "xt",
407 .type = TCA_ACT_XT, 392 .type = TCA_ACT_XT,
@@ -412,7 +397,6 @@ static struct tc_action_ops act_xt_ops = {
412 .init = tcf_xt_init, 397 .init = tcf_xt_init,
413 .walk = tcf_xt_walker, 398 .walk = tcf_xt_walker,
414 .lookup = tcf_xt_search, 399 .lookup = tcf_xt_search,
415 .delete = tcf_xt_delete,
416 .size = sizeof(struct tcf_ipt), 400 .size = sizeof(struct tcf_ipt),
417}; 401};
418 402
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 38fd20f10f67..8bf66d0a6800 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -395,13 +395,6 @@ static void tcf_mirred_put_dev(struct net_device *dev)
395 dev_put(dev); 395 dev_put(dev);
396} 396}
397 397
398static int tcf_mirred_delete(struct net *net, u32 index)
399{
400 struct tc_action_net *tn = net_generic(net, mirred_net_id);
401
402 return tcf_idr_delete_index(tn, index);
403}
404
405static struct tc_action_ops act_mirred_ops = { 398static struct tc_action_ops act_mirred_ops = {
406 .kind = "mirred", 399 .kind = "mirred",
407 .type = TCA_ACT_MIRRED, 400 .type = TCA_ACT_MIRRED,
@@ -416,7 +409,6 @@ static struct tc_action_ops act_mirred_ops = {
416 .size = sizeof(struct tcf_mirred), 409 .size = sizeof(struct tcf_mirred),
417 .get_dev = tcf_mirred_get_dev, 410 .get_dev = tcf_mirred_get_dev,
418 .put_dev = tcf_mirred_put_dev, 411 .put_dev = tcf_mirred_put_dev,
419 .delete = tcf_mirred_delete,
420}; 412};
421 413
422static __net_init int mirred_init_net(struct net *net) 414static __net_init int mirred_init_net(struct net *net)
diff --git a/net/sched/act_nat.c b/net/sched/act_nat.c
index 822e903bfc25..4313aa102440 100644
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -300,13 +300,6 @@ static int tcf_nat_search(struct net *net, struct tc_action **a, u32 index,
300 return tcf_idr_search(tn, a, index); 300 return tcf_idr_search(tn, a, index);
301} 301}
302 302
303static int tcf_nat_delete(struct net *net, u32 index)
304{
305 struct tc_action_net *tn = net_generic(net, nat_net_id);
306
307 return tcf_idr_delete_index(tn, index);
308}
309
310static struct tc_action_ops act_nat_ops = { 303static struct tc_action_ops act_nat_ops = {
311 .kind = "nat", 304 .kind = "nat",
312 .type = TCA_ACT_NAT, 305 .type = TCA_ACT_NAT,
@@ -316,7 +309,6 @@ static struct tc_action_ops act_nat_ops = {
316 .init = tcf_nat_init, 309 .init = tcf_nat_init,
317 .walk = tcf_nat_walker, 310 .walk = tcf_nat_walker,
318 .lookup = tcf_nat_search, 311 .lookup = tcf_nat_search,
319 .delete = tcf_nat_delete,
320 .size = sizeof(struct tcf_nat), 312 .size = sizeof(struct tcf_nat),
321}; 313};
322 314
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 8a7a7cb94e83..107034070019 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -460,13 +460,6 @@ static int tcf_pedit_search(struct net *net, struct tc_action **a, u32 index,
460 return tcf_idr_search(tn, a, index); 460 return tcf_idr_search(tn, a, index);
461} 461}
462 462
463static int tcf_pedit_delete(struct net *net, u32 index)
464{
465 struct tc_action_net *tn = net_generic(net, pedit_net_id);
466
467 return tcf_idr_delete_index(tn, index);
468}
469
470static struct tc_action_ops act_pedit_ops = { 463static struct tc_action_ops act_pedit_ops = {
471 .kind = "pedit", 464 .kind = "pedit",
472 .type = TCA_ACT_PEDIT, 465 .type = TCA_ACT_PEDIT,
@@ -477,7 +470,6 @@ static struct tc_action_ops act_pedit_ops = {
477 .init = tcf_pedit_init, 470 .init = tcf_pedit_init,
478 .walk = tcf_pedit_walker, 471 .walk = tcf_pedit_walker,
479 .lookup = tcf_pedit_search, 472 .lookup = tcf_pedit_search,
480 .delete = tcf_pedit_delete,
481 .size = sizeof(struct tcf_pedit), 473 .size = sizeof(struct tcf_pedit),
482}; 474};
483 475
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 06f0742db593..5d8bfa878477 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -320,13 +320,6 @@ static int tcf_police_search(struct net *net, struct tc_action **a, u32 index,
320 return tcf_idr_search(tn, a, index); 320 return tcf_idr_search(tn, a, index);
321} 321}
322 322
323static int tcf_police_delete(struct net *net, u32 index)
324{
325 struct tc_action_net *tn = net_generic(net, police_net_id);
326
327 return tcf_idr_delete_index(tn, index);
328}
329
330MODULE_AUTHOR("Alexey Kuznetsov"); 323MODULE_AUTHOR("Alexey Kuznetsov");
331MODULE_DESCRIPTION("Policing actions"); 324MODULE_DESCRIPTION("Policing actions");
332MODULE_LICENSE("GPL"); 325MODULE_LICENSE("GPL");
@@ -340,7 +333,6 @@ static struct tc_action_ops act_police_ops = {
340 .init = tcf_police_init, 333 .init = tcf_police_init,
341 .walk = tcf_police_walker, 334 .walk = tcf_police_walker,
342 .lookup = tcf_police_search, 335 .lookup = tcf_police_search,
343 .delete = tcf_police_delete,
344 .size = sizeof(struct tcf_police), 336 .size = sizeof(struct tcf_police),
345}; 337};
346 338
diff --git a/net/sched/act_sample.c b/net/sched/act_sample.c
index 207b4132d1b0..44e9c00657bc 100644
--- a/net/sched/act_sample.c
+++ b/net/sched/act_sample.c
@@ -232,13 +232,6 @@ static int tcf_sample_search(struct net *net, struct tc_action **a, u32 index,
232 return tcf_idr_search(tn, a, index); 232 return tcf_idr_search(tn, a, index);
233} 233}
234 234
235static int tcf_sample_delete(struct net *net, u32 index)
236{
237 struct tc_action_net *tn = net_generic(net, sample_net_id);
238
239 return tcf_idr_delete_index(tn, index);
240}
241
242static struct tc_action_ops act_sample_ops = { 235static struct tc_action_ops act_sample_ops = {
243 .kind = "sample", 236 .kind = "sample",
244 .type = TCA_ACT_SAMPLE, 237 .type = TCA_ACT_SAMPLE,
@@ -249,7 +242,6 @@ static struct tc_action_ops act_sample_ops = {
249 .cleanup = tcf_sample_cleanup, 242 .cleanup = tcf_sample_cleanup,
250 .walk = tcf_sample_walker, 243 .walk = tcf_sample_walker,
251 .lookup = tcf_sample_search, 244 .lookup = tcf_sample_search,
252 .delete = tcf_sample_delete,
253 .size = sizeof(struct tcf_sample), 245 .size = sizeof(struct tcf_sample),
254}; 246};
255 247
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index e616523ba3c1..52400d49f81f 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -196,13 +196,6 @@ static int tcf_simp_search(struct net *net, struct tc_action **a, u32 index,
196 return tcf_idr_search(tn, a, index); 196 return tcf_idr_search(tn, a, index);
197} 197}
198 198
199static int tcf_simp_delete(struct net *net, u32 index)
200{
201 struct tc_action_net *tn = net_generic(net, simp_net_id);
202
203 return tcf_idr_delete_index(tn, index);
204}
205
206static struct tc_action_ops act_simp_ops = { 199static struct tc_action_ops act_simp_ops = {
207 .kind = "simple", 200 .kind = "simple",
208 .type = TCA_ACT_SIMP, 201 .type = TCA_ACT_SIMP,
@@ -213,7 +206,6 @@ static struct tc_action_ops act_simp_ops = {
213 .init = tcf_simp_init, 206 .init = tcf_simp_init,
214 .walk = tcf_simp_walker, 207 .walk = tcf_simp_walker,
215 .lookup = tcf_simp_search, 208 .lookup = tcf_simp_search,
216 .delete = tcf_simp_delete,
217 .size = sizeof(struct tcf_defact), 209 .size = sizeof(struct tcf_defact),
218}; 210};
219 211
diff --git a/net/sched/act_skbedit.c b/net/sched/act_skbedit.c
index 926d7bc4a89d..73e44ce2a883 100644
--- a/net/sched/act_skbedit.c
+++ b/net/sched/act_skbedit.c
@@ -299,13 +299,6 @@ static int tcf_skbedit_search(struct net *net, struct tc_action **a, u32 index,
299 return tcf_idr_search(tn, a, index); 299 return tcf_idr_search(tn, a, index);
300} 300}
301 301
302static int tcf_skbedit_delete(struct net *net, u32 index)
303{
304 struct tc_action_net *tn = net_generic(net, skbedit_net_id);
305
306 return tcf_idr_delete_index(tn, index);
307}
308
309static struct tc_action_ops act_skbedit_ops = { 302static struct tc_action_ops act_skbedit_ops = {
310 .kind = "skbedit", 303 .kind = "skbedit",
311 .type = TCA_ACT_SKBEDIT, 304 .type = TCA_ACT_SKBEDIT,
@@ -316,7 +309,6 @@ static struct tc_action_ops act_skbedit_ops = {
316 .cleanup = tcf_skbedit_cleanup, 309 .cleanup = tcf_skbedit_cleanup,
317 .walk = tcf_skbedit_walker, 310 .walk = tcf_skbedit_walker,
318 .lookup = tcf_skbedit_search, 311 .lookup = tcf_skbedit_search,
319 .delete = tcf_skbedit_delete,
320 .size = sizeof(struct tcf_skbedit), 312 .size = sizeof(struct tcf_skbedit),
321}; 313};
322 314
diff --git a/net/sched/act_skbmod.c b/net/sched/act_skbmod.c
index d6a1af0c4171..588077fafd6c 100644
--- a/net/sched/act_skbmod.c
+++ b/net/sched/act_skbmod.c
@@ -259,13 +259,6 @@ static int tcf_skbmod_search(struct net *net, struct tc_action **a, u32 index,
259 return tcf_idr_search(tn, a, index); 259 return tcf_idr_search(tn, a, index);
260} 260}
261 261
262static int tcf_skbmod_delete(struct net *net, u32 index)
263{
264 struct tc_action_net *tn = net_generic(net, skbmod_net_id);
265
266 return tcf_idr_delete_index(tn, index);
267}
268
269static struct tc_action_ops act_skbmod_ops = { 262static struct tc_action_ops act_skbmod_ops = {
270 .kind = "skbmod", 263 .kind = "skbmod",
271 .type = TCA_ACT_SKBMOD, 264 .type = TCA_ACT_SKBMOD,
@@ -276,7 +269,6 @@ static struct tc_action_ops act_skbmod_ops = {
276 .cleanup = tcf_skbmod_cleanup, 269 .cleanup = tcf_skbmod_cleanup,
277 .walk = tcf_skbmod_walker, 270 .walk = tcf_skbmod_walker,
278 .lookup = tcf_skbmod_search, 271 .lookup = tcf_skbmod_search,
279 .delete = tcf_skbmod_delete,
280 .size = sizeof(struct tcf_skbmod), 272 .size = sizeof(struct tcf_skbmod),
281}; 273};
282 274
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c
index 8f09cf08d8fe..420759153d5f 100644
--- a/net/sched/act_tunnel_key.c
+++ b/net/sched/act_tunnel_key.c
@@ -548,13 +548,6 @@ static int tunnel_key_search(struct net *net, struct tc_action **a, u32 index,
548 return tcf_idr_search(tn, a, index); 548 return tcf_idr_search(tn, a, index);
549} 549}
550 550
551static int tunnel_key_delete(struct net *net, u32 index)
552{
553 struct tc_action_net *tn = net_generic(net, tunnel_key_net_id);
554
555 return tcf_idr_delete_index(tn, index);
556}
557
558static struct tc_action_ops act_tunnel_key_ops = { 551static struct tc_action_ops act_tunnel_key_ops = {
559 .kind = "tunnel_key", 552 .kind = "tunnel_key",
560 .type = TCA_ACT_TUNNEL_KEY, 553 .type = TCA_ACT_TUNNEL_KEY,
@@ -565,7 +558,6 @@ static struct tc_action_ops act_tunnel_key_ops = {
565 .cleanup = tunnel_key_release, 558 .cleanup = tunnel_key_release,
566 .walk = tunnel_key_walker, 559 .walk = tunnel_key_walker,
567 .lookup = tunnel_key_search, 560 .lookup = tunnel_key_search,
568 .delete = tunnel_key_delete,
569 .size = sizeof(struct tcf_tunnel_key), 561 .size = sizeof(struct tcf_tunnel_key),
570}; 562};
571 563
diff --git a/net/sched/act_vlan.c b/net/sched/act_vlan.c
index 209e70ad2c09..033d273afe50 100644
--- a/net/sched/act_vlan.c
+++ b/net/sched/act_vlan.c
@@ -296,13 +296,6 @@ static int tcf_vlan_search(struct net *net, struct tc_action **a, u32 index,
296 return tcf_idr_search(tn, a, index); 296 return tcf_idr_search(tn, a, index);
297} 297}
298 298
299static int tcf_vlan_delete(struct net *net, u32 index)
300{
301 struct tc_action_net *tn = net_generic(net, vlan_net_id);
302
303 return tcf_idr_delete_index(tn, index);
304}
305
306static struct tc_action_ops act_vlan_ops = { 299static struct tc_action_ops act_vlan_ops = {
307 .kind = "vlan", 300 .kind = "vlan",
308 .type = TCA_ACT_VLAN, 301 .type = TCA_ACT_VLAN,
@@ -313,7 +306,6 @@ static struct tc_action_ops act_vlan_ops = {
313 .cleanup = tcf_vlan_cleanup, 306 .cleanup = tcf_vlan_cleanup,
314 .walk = tcf_vlan_walker, 307 .walk = tcf_vlan_walker,
315 .lookup = tcf_vlan_search, 308 .lookup = tcf_vlan_search,
316 .delete = tcf_vlan_delete,
317 .size = sizeof(struct tcf_vlan), 309 .size = sizeof(struct tcf_vlan),
318}; 310};
319 311
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index d5d2a6dc3921..f218ccf1e2d9 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -914,6 +914,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
914 struct nlattr *opt = tca[TCA_OPTIONS]; 914 struct nlattr *opt = tca[TCA_OPTIONS];
915 struct nlattr *tb[TCA_U32_MAX + 1]; 915 struct nlattr *tb[TCA_U32_MAX + 1];
916 u32 htid, flags = 0; 916 u32 htid, flags = 0;
917 size_t sel_size;
917 int err; 918 int err;
918#ifdef CONFIG_CLS_U32_PERF 919#ifdef CONFIG_CLS_U32_PERF
919 size_t size; 920 size_t size;
@@ -1076,8 +1077,13 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
1076 } 1077 }
1077 1078
1078 s = nla_data(tb[TCA_U32_SEL]); 1079 s = nla_data(tb[TCA_U32_SEL]);
1080 sel_size = struct_size(s, keys, s->nkeys);
1081 if (nla_len(tb[TCA_U32_SEL]) < sel_size) {
1082 err = -EINVAL;
1083 goto erridr;
1084 }
1079 1085
1080 n = kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL); 1086 n = kzalloc(offsetof(typeof(*n), sel) + sel_size, GFP_KERNEL);
1081 if (n == NULL) { 1087 if (n == NULL) {
1082 err = -ENOBUFS; 1088 err = -ENOBUFS;
1083 goto erridr; 1089 goto erridr;
@@ -1092,7 +1098,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
1092 } 1098 }
1093#endif 1099#endif
1094 1100
1095 memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key)); 1101 memcpy(&n->sel, s, sel_size);
1096 RCU_INIT_POINTER(n->ht_up, ht); 1102 RCU_INIT_POINTER(n->ht_up, ht);
1097 n->handle = handle; 1103 n->handle = handle;
1098 n->fshift = s->hmask ? ffs(ntohl(s->hmask)) - 1 : 0; 1104 n->fshift = s->hmask ? ffs(ntohl(s->hmask)) - 1 : 0;
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index 35fc7252187c..c07c30b916d5 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -64,7 +64,6 @@
64#include <linux/vmalloc.h> 64#include <linux/vmalloc.h>
65#include <linux/reciprocal_div.h> 65#include <linux/reciprocal_div.h>
66#include <net/netlink.h> 66#include <net/netlink.h>
67#include <linux/version.h>
68#include <linux/if_vlan.h> 67#include <linux/if_vlan.h>
69#include <net/pkt_sched.h> 68#include <net/pkt_sched.h>
70#include <net/pkt_cls.h> 69#include <net/pkt_cls.h>
@@ -621,15 +620,20 @@ static bool cake_ddst(int flow_mode)
621} 620}
622 621
623static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb, 622static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
624 int flow_mode) 623 int flow_mode, u16 flow_override, u16 host_override)
625{ 624{
626 u32 flow_hash = 0, srchost_hash, dsthost_hash; 625 u32 flow_hash = 0, srchost_hash = 0, dsthost_hash = 0;
627 u16 reduced_hash, srchost_idx, dsthost_idx; 626 u16 reduced_hash, srchost_idx, dsthost_idx;
628 struct flow_keys keys, host_keys; 627 struct flow_keys keys, host_keys;
629 628
630 if (unlikely(flow_mode == CAKE_FLOW_NONE)) 629 if (unlikely(flow_mode == CAKE_FLOW_NONE))
631 return 0; 630 return 0;
632 631
632 /* If both overrides are set we can skip packet dissection entirely */
633 if ((flow_override || !(flow_mode & CAKE_FLOW_FLOWS)) &&
634 (host_override || !(flow_mode & CAKE_FLOW_HOSTS)))
635 goto skip_hash;
636
633 skb_flow_dissect_flow_keys(skb, &keys, 637 skb_flow_dissect_flow_keys(skb, &keys,
634 FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL); 638 FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL);
635 639
@@ -676,6 +680,14 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
676 if (flow_mode & CAKE_FLOW_FLOWS) 680 if (flow_mode & CAKE_FLOW_FLOWS)
677 flow_hash = flow_hash_from_keys(&keys); 681 flow_hash = flow_hash_from_keys(&keys);
678 682
683skip_hash:
684 if (flow_override)
685 flow_hash = flow_override - 1;
686 if (host_override) {
687 dsthost_hash = host_override - 1;
688 srchost_hash = host_override - 1;
689 }
690
679 if (!(flow_mode & CAKE_FLOW_FLOWS)) { 691 if (!(flow_mode & CAKE_FLOW_FLOWS)) {
680 if (flow_mode & CAKE_FLOW_SRC_IP) 692 if (flow_mode & CAKE_FLOW_SRC_IP)
681 flow_hash ^= srchost_hash; 693 flow_hash ^= srchost_hash;
@@ -1571,7 +1583,7 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
1571 struct cake_sched_data *q = qdisc_priv(sch); 1583 struct cake_sched_data *q = qdisc_priv(sch);
1572 struct tcf_proto *filter; 1584 struct tcf_proto *filter;
1573 struct tcf_result res; 1585 struct tcf_result res;
1574 u32 flow = 0; 1586 u16 flow = 0, host = 0;
1575 int result; 1587 int result;
1576 1588
1577 filter = rcu_dereference_bh(q->filter_list); 1589 filter = rcu_dereference_bh(q->filter_list);
@@ -1595,10 +1607,12 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
1595#endif 1607#endif
1596 if (TC_H_MIN(res.classid) <= CAKE_QUEUES) 1608 if (TC_H_MIN(res.classid) <= CAKE_QUEUES)
1597 flow = TC_H_MIN(res.classid); 1609 flow = TC_H_MIN(res.classid);
1610 if (TC_H_MAJ(res.classid) <= (CAKE_QUEUES << 16))
1611 host = TC_H_MAJ(res.classid) >> 16;
1598 } 1612 }
1599hash: 1613hash:
1600 *t = cake_select_tin(sch, skb); 1614 *t = cake_select_tin(sch, skb);
1601 return flow ?: cake_hash(*t, skb, flow_mode) + 1; 1615 return cake_hash(*t, skb, flow_mode, flow, host) + 1;
1602} 1616}
1603 1617
1604static void cake_reconfigure(struct Qdisc *sch); 1618static void cake_reconfigure(struct Qdisc *sch);
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index 93c0c225ab34..180b6640e531 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -213,9 +213,14 @@ static void tls_write_space(struct sock *sk)
213{ 213{
214 struct tls_context *ctx = tls_get_ctx(sk); 214 struct tls_context *ctx = tls_get_ctx(sk);
215 215
216 /* We are already sending pages, ignore notification */ 216 /* If in_tcp_sendpages call lower protocol write space handler
217 if (ctx->in_tcp_sendpages) 217 * to ensure we wake up any waiting operations there. For example
218 * if do_tcp_sendpages where to call sk_wait_event.
219 */
220 if (ctx->in_tcp_sendpages) {
221 ctx->sk_write_space(sk);
218 return; 222 return;
223 }
219 224
220 if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) { 225 if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) {
221 gfp_t sk_allocation = sk->sk_allocation; 226 gfp_t sk_allocation = sk->sk_allocation;
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 911ca6d3cb5a..bfe2dbea480b 100644
--- a/net/xdp/xdp_umem.c
+++ b/net/xdp/xdp_umem.c
@@ -74,14 +74,14 @@ int xdp_umem_assign_dev(struct xdp_umem *umem, struct net_device *dev,
74 return 0; 74 return 0;
75 75
76 if (!dev->netdev_ops->ndo_bpf || !dev->netdev_ops->ndo_xsk_async_xmit) 76 if (!dev->netdev_ops->ndo_bpf || !dev->netdev_ops->ndo_xsk_async_xmit)
77 return force_zc ? -ENOTSUPP : 0; /* fail or fallback */ 77 return force_zc ? -EOPNOTSUPP : 0; /* fail or fallback */
78 78
79 bpf.command = XDP_QUERY_XSK_UMEM; 79 bpf.command = XDP_QUERY_XSK_UMEM;
80 80
81 rtnl_lock(); 81 rtnl_lock();
82 err = xdp_umem_query(dev, queue_id); 82 err = xdp_umem_query(dev, queue_id);
83 if (err) { 83 if (err) {
84 err = err < 0 ? -ENOTSUPP : -EBUSY; 84 err = err < 0 ? -EOPNOTSUPP : -EBUSY;
85 goto err_rtnl_unlock; 85 goto err_rtnl_unlock;
86 } 86 }
87 87
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index c75413d05a63..ce53639a864a 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -153,10 +153,6 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
153# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 153# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
154cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) 154cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4))
155 155
156# cc-if-fullversion
157# Usage: EXTRA_CFLAGS += $(call cc-if-fullversion, -lt, 040502, -O1)
158cc-if-fullversion = $(shell [ $(cc-fullversion) $(1) $(2) ] && echo $(3) || echo $(4))
159
160# cc-ldoption 156# cc-ldoption
161# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) 157# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
162cc-ldoption = $(call try-run,\ 158cc-ldoption = $(call try-run,\
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 1c48572223d1..5a2d1c9578a0 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -246,8 +246,6 @@ objtool_args += --no-fp
246endif 246endif
247ifdef CONFIG_GCOV_KERNEL 247ifdef CONFIG_GCOV_KERNEL
248objtool_args += --no-unreachable 248objtool_args += --no-unreachable
249else
250objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
251endif 249endif
252ifdef CONFIG_RETPOLINE 250ifdef CONFIG_RETPOLINE
253ifneq ($(RETPOLINE_CFLAGS),) 251ifneq ($(RETPOLINE_CFLAGS),)
diff --git a/tools/bpf/bpftool/map_perf_ring.c b/tools/bpf/bpftool/map_perf_ring.c
index 1832100d1b27..6d41323be291 100644
--- a/tools/bpf/bpftool/map_perf_ring.c
+++ b/tools/bpf/bpftool/map_perf_ring.c
@@ -194,8 +194,10 @@ int do_event_pipe(int argc, char **argv)
194 } 194 }
195 195
196 while (argc) { 196 while (argc) {
197 if (argc < 2) 197 if (argc < 2) {
198 BAD_ARG(); 198 BAD_ARG();
199 goto err_close_map;
200 }
199 201
200 if (is_prefix(*argv, "cpu")) { 202 if (is_prefix(*argv, "cpu")) {
201 char *endptr; 203 char *endptr;
@@ -221,6 +223,7 @@ int do_event_pipe(int argc, char **argv)
221 NEXT_ARG(); 223 NEXT_ARG();
222 } else { 224 } else {
223 BAD_ARG(); 225 BAD_ARG();
226 goto err_close_map;
224 } 227 }
225 228
226 do_all = false; 229 do_all = false;