]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 08:28:14 +0000 (10:28 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 2 Oct 2018 08:28:23 +0000 (10:28 +0200)
Allwinner arm64 DT changes for 4.20

Our usual set of DT changes for the arm64 Allwinner SoCs.

The most notable things are:
  - HDMI support on the A64
  - New boards: OrangePi One Plus

* tag 'sunxi-dt64-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (28 commits)
  arm64: dts: allwinner: a64: a64-olinuxino: set the PHY TX delay
  arm64: dts: allwinner: a64: Enable HDMI output on A64 boards w/ HDMI
  arm64: dts: allwinner: a64: Add display pipeline
  arm64: dts: allwinner: h6: add system controller device tree node
  arm64: dts: allwinner: h6: Add OrangePi One Plus initial support
  arm64: dts: allwinner: a64: Rename r_i2c_pins_a label to r_i2c_pl89_pins
  arm64: dts: allwinner: a64: Rename uart0_pins_a label to uart0_pb_pins
  arm64: dts: allwinner: a64: Split out data strobe pin from mmc2 pinmux
  arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED
  arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi chip
  arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet
  arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage
  arm64: dts: allwinner: a64: Olinuxino: enable USB
  arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes
  arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage
  arm64: dts: allwinner: a64: Orange Pi Win: Adjust CSI power rails
  arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node
  arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node
  arm64: dts: allwinner: a64: Orange Pi Win: Add LED node
  arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
475 files changed:
Documentation/ABI/stable/sysfs-bus-xen-backend
Documentation/ABI/testing/sysfs-driver-xen-blkback
Documentation/arm/Samsung/Bootloader-interface.txt
Documentation/arm64/sve.txt
Documentation/devicetree/bindings/arm/amlogic.txt
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
Documentation/devicetree/bindings/arm/rockchip.txt
Documentation/devicetree/bindings/arm/scu.txt
Documentation/devicetree/bindings/arm/shmobile.txt
Documentation/devicetree/bindings/arm/syna.txt [moved from Documentation/devicetree/bindings/arm/marvell/marvell,berlin.txt with 89% similarity]
Documentation/devicetree/bindings/arm/tegra.txt
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra186-pmc.txt
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-pmc.txt
Documentation/devicetree/bindings/arm/ux500/boards.txt
Documentation/devicetree/bindings/interrupt-controller/riscv,cpu-intc.txt
Documentation/devicetree/bindings/net/dsa/b53.txt
Documentation/devicetree/bindings/nvmem/allwinner,sunxi-sid.txt
Documentation/devicetree/bindings/soc/rockchip/grf.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/devicetree/bindings/watchdog/renesas-wdt.txt
Documentation/hwmon/ina2xx
Documentation/i2c/DMA-considerations
MAINTAINERS
Makefile
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-osd3358-sm-red.dts [changed mode: 0755->0644]
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/arm-realview-eb.dtsi
arch/arm/boot/dts/arm-realview-pb1176.dts
arch/arm/boot/dts/arm-realview-pb11mp.dts
arch/arm/boot/dts/arm-realview-pbx.dtsi
arch/arm/boot/dts/aspeed-bmc-arm-stardragon4800-rep2.dts [new file with mode: 0644]
arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts [new file with mode: 0644]
arch/arm/boot/dts/aspeed-bmc-quanta-q71l.dts
arch/arm/boot/dts/aspeed-g4.dtsi
arch/arm/boot/dts/aspeed-g5.dtsi
arch/arm/boot/dts/at91-dvk_su60_somc.dtsi
arch/arm/boot/dts/at91-dvk_su60_somc_lcm.dtsi
arch/arm/boot/dts/at91-nattis-2-natte-2.dts
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
arch/arm/boot/dts/at91-sama5d2_xplained.dts
arch/arm/boot/dts/at91-tse850-3.dts
arch/arm/boot/dts/at91-vinco.dts
arch/arm/boot/dts/at91sam9260ek.dts
arch/arm/boot/dts/at91sam9261ek.dts
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/bcm-hr2.dtsi
arch/arm/boot/dts/bcm-nsp.dtsi
arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi [new file with mode: 0644]
arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
arch/arm/boot/dts/bcm4709-asus-rt-ac87u.dts
arch/arm/boot/dts/bcm4709-tplink-archer-c9-v1.dts
arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
arch/arm/boot/dts/bcm5301x.dtsi
arch/arm/boot/dts/bcm958625hr.dts
arch/arm/boot/dts/exynos3250-artik5.dtsi
arch/arm/boot/dts/exynos4210-origen.dts
arch/arm/boot/dts/exynos4210-trats.dts
arch/arm/boot/dts/exynos4210-universal_c210.dts
arch/arm/boot/dts/exynos4412-midas.dtsi
arch/arm/boot/dts/exynos4412-odroid-common.dtsi
arch/arm/boot/dts/exynos5250-arndale.dts
arch/arm/boot/dts/exynos5250-pinctrl.dtsi
arch/arm/boot/dts/exynos5250-snow-rev5.dts
arch/arm/boot/dts/exynos5250.dtsi
arch/arm/boot/dts/exynos5420-peach-pit.dts
arch/arm/boot/dts/exynos5422-odroid-core.dtsi
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
arch/arm/boot/dts/exynos5422-odroidxu3.dts
arch/arm/boot/dts/exynos5800-peach-pi.dts
arch/arm/boot/dts/hip04.dtsi
arch/arm/boot/dts/imx23-evk.dts
arch/arm/boot/dts/imx28-evk.dts
arch/arm/boot/dts/imx7d.dtsi
arch/arm/boot/dts/iwg20d-q7-common.dtsi
arch/arm/boot/dts/lpc32xx.dtsi
arch/arm/boot/dts/meson8.dtsi
arch/arm/boot/dts/meson8b-ec100.dts [new file with mode: 0644]
arch/arm/boot/dts/meson8b-odroidc1.dts
arch/arm/boot/dts/meson8b.dtsi
arch/arm/boot/dts/omap4-droid4-xt894.dts
arch/arm/boot/dts/pxa25x.dtsi
arch/arm/boot/dts/pxa27x.dtsi
arch/arm/boot/dts/pxa2xx.dtsi
arch/arm/boot/dts/r8a7743-iwg20d-q7-dbcm-ca.dts
arch/arm/boot/dts/r8a7743-iwg20d-q7.dts
arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts
arch/arm/boot/dts/r8a77470.dtsi
arch/arm/boot/dts/r8a7778-bockw.dts
arch/arm/boot/dts/r8a7778.dtsi
arch/arm/boot/dts/r8a7779-marzen.dts
arch/arm/boot/dts/r8a7779.dtsi
arch/arm/boot/dts/r8a7790-stout.dts
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791.dtsi
arch/arm/boot/dts/r8a7792.dtsi
arch/arm/boot/dts/r8a7793-gose.dts
arch/arm/boot/dts/r8a7793.dtsi
arch/arm/boot/dts/r8a7794-silk.dts
arch/arm/boot/dts/r8a7794.dtsi
arch/arm/boot/dts/r9a06g032.dtsi
arch/arm/boot/dts/s5pv210.dtsi
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/sama5d4.dtsi
arch/arm/boot/dts/socfpga.dtsi
arch/arm/boot/dts/socfpga_arria10.dtsi
arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts [moved from arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts with 98% similarity]
arch/arm/boot/dts/socfpga_cyclone5_socrates.dts
arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-href-family-pinctrl.dtsi
arch/arm/boot/dts/ste-href.dtsi
arch/arm/boot/dts/ste-hrefprev60.dtsi
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/ste-u300.dts
arch/arm/boot/dts/stih410-b2260.dts
arch/arm/boot/dts/stihxxx-b2120.dtsi
arch/arm/boot/dts/stm32429i-eval.dts
arch/arm/boot/dts/stm32f429.dtsi
arch/arm/boot/dts/stm32f469-disco.dts
arch/arm/boot/dts/stm32f746-disco.dts
arch/arm/boot/dts/stm32f769-disco.dts
arch/arm/boot/dts/stm32h743.dtsi
arch/arm/boot/dts/stm32mp157c-ev1.dts
arch/arm/boot/dts/stm32mp157c.dtsi
arch/arm/boot/dts/sun5i-reference-design-tablet.dtsi
arch/arm/boot/dts/sun5i.dtsi
arch/arm/boot/dts/sun7i-a20.dtsi
arch/arm/boot/dts/sun8i-a33.dtsi
arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
arch/arm/boot/dts/sun8i-a83t.dtsi
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus-v1.2.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3-bananapi-m2-plus.dts
arch/arm/boot/dts/sun8i-h3-orangepi-zero-plus2.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3.dtsi
arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
arch/arm/boot/dts/sun8i-r40.dtsi
arch/arm/boot/dts/sun8i-reference-design-tablet.dtsi
arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts
arch/arm/boot/dts/sun9i-a80.dtsi
arch/arm/boot/dts/sunxi-bananapi-m2-plus-v1.2.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sunxi-h3-h5.dtsi
arch/arm/boot/dts/tegra124-apalis-eval.dts
arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
arch/arm/boot/dts/tegra124-apalis.dtsi
arch/arm/boot/dts/tegra20-colibri-eval-v3.dts [new file with mode: 0644]
arch/arm/boot/dts/tegra20-colibri-iris.dts
arch/arm/boot/dts/tegra20-colibri.dtsi
arch/arm/boot/dts/tegra20-paz00.dts
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30-apalis-eval.dts
arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts [new file with mode: 0644]
arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tegra30-apalis.dtsi
arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
arch/arm/boot/dts/tegra30-colibri.dtsi
arch/arm/boot/dts/tegra30.dtsi
arch/arm/boot/dts/versatile-ab.dts
arch/arm/boot/dts/zynq-zc702.dts
arch/arm/boot/dts/zynq-zc770-xm010.dts
arch/arm/boot/dts/zynq-zc770-xm013.dts
arch/arm/configs/imx_v6_v7_defconfig
arch/arm/configs/mxs_defconfig
arch/arm/configs/versatile_defconfig
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/firmware.c
arch/arm/mach-exynos/suspend.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-s3c24xx/mach-gta02.c
arch/arm/mach-s3c24xx/mach-mini2440.c
arch/arm64/Kconfig
arch/arm64/boot/dts/allwinner/Makefile
arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus-v1.2.dts [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h5-bananapi-m2-plus.dts [new file with mode: 0644]
arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dts
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
arch/arm64/boot/dts/amlogic/Makefile
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts
arch/arm64/boot/dts/amlogic/meson-axg.dtsi
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts [new file with mode: 0644]
arch/arm64/boot/dts/amlogic/meson-g12a.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/amlogic/meson-gx.dtsi
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
arch/arm64/boot/dts/arm/juno-base.dtsi
arch/arm64/boot/dts/arm/juno-cs-r1r2.dtsi
arch/arm64/boot/dts/arm/juno.dts
arch/arm64/boot/dts/broadcom/Makefile
arch/arm64/boot/dts/broadcom/bcm2837-rpi-cm3-io3.dts [new file with mode: 0644]
arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
arch/arm64/boot/dts/broadcom/stingray/bcm958742-base.dtsi
arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
arch/arm64/boot/dts/hisilicon/Makefile
arch/arm64/boot/dts/hisilicon/hi3670-hikey970.dts [new file with mode: 0644]
arch/arm64/boot/dts/hisilicon/hi3670.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/hisilicon/hi6220-coresight.dtsi
arch/arm64/boot/dts/hisilicon/hi6220.dtsi
arch/arm64/boot/dts/lg/lg1312.dtsi
arch/arm64/boot/dts/lg/lg1313.dtsi
arch/arm64/boot/dts/nvidia/tegra186.dtsi
arch/arm64/boot/dts/nvidia/tegra194.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
arch/arm64/boot/dts/nvidia/tegra210.dtsi
arch/arm64/boot/dts/renesas/Makefile
arch/arm64/boot/dts/renesas/r8a774a1.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
arch/arm64/boot/dts/renesas/r8a7795-h3ulcb.dts
arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
arch/arm64/boot/dts/renesas/r8a7795.dtsi
arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts
arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts
arch/arm64/boot/dts/renesas/r8a7796.dtsi
arch/arm64/boot/dts/renesas/r8a77965-m3nulcb-kf.dts [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts [new file with mode: 0644]
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts
arch/arm64/boot/dts/renesas/r8a77965.dtsi
arch/arm64/boot/dts/renesas/r8a77970-v3msk.dts
arch/arm64/boot/dts/renesas/r8a77970.dtsi
arch/arm64/boot/dts/renesas/r8a77980-condor.dts
arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dts
arch/arm64/boot/dts/renesas/r8a77980.dtsi
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts
arch/arm64/boot/dts/renesas/r8a77990.dtsi
arch/arm64/boot/dts/renesas/r8a77995-draak.dts
arch/arm64/boot/dts/renesas/r8a77995.dtsi
arch/arm64/boot/dts/renesas/salvator-common.dtsi
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
arch/arm64/boot/dts/renesas/ulcb.dtsi
arch/arm64/boot/dts/rockchip/Makefile
arch/arm64/boot/dts/rockchip/px30-evb.dts [new file with mode: 0644]
arch/arm64/boot/dts/rockchip/px30.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts
arch/arm64/boot/dts/rockchip/rk3328.dtsi
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts [new file with mode: 0644]
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
arch/arm64/boot/dts/rockchip/rk3399.dtsi
arch/arm64/boot/dts/synaptics/as370.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-am65-main.dtsi
arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-am65-wakeup.dtsi [new file with mode: 0644]
arch/arm64/boot/dts/ti/k3-am65.dtsi
arch/arm64/boot/dts/ti/k3-am654-base-board.dts
arch/arm64/configs/defconfig
arch/arm64/crypto/ghash-ce-glue.c
arch/arm64/crypto/sm4-ce-glue.c
arch/m68k/mac/misc.c
arch/nios2/Kconfig.debug
arch/powerpc/Kconfig
arch/riscv/include/asm/tlb.h
arch/riscv/kernel/sys_riscv.c
arch/x86/Kconfig
arch/x86/Makefile
arch/x86/crypto/aesni-intel_asm.S
arch/x86/events/core.c
arch/x86/include/asm/irqflags.h
arch/x86/include/asm/pgtable-3level.h
arch/x86/include/asm/processor.h
arch/x86/include/asm/signal.h
arch/x86/include/asm/stacktrace.h
arch/x86/include/asm/tlbflush.h
arch/x86/include/asm/vgtod.h
arch/x86/kernel/alternative.c
arch/x86/kernel/cpu/bugs.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/intel.c
arch/x86/kernel/dumpstack.c
arch/x86/lib/usercopy.c
arch/x86/mm/fault.c
arch/x86/mm/pageattr.c
arch/x86/mm/pti.c
arch/x86/mm/tlb.c
arch/x86/platform/efi/efi_32.c
arch/x86/xen/mmu_pv.c
block/blk-wbt.c
block/bsg.c
block/elevator.c
drivers/ata/pata_ftide010.c
drivers/base/power/clock_ops.c
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h
drivers/block/xen-blkfront.c
drivers/bluetooth/Kconfig
drivers/bluetooth/btmtkuart.c
drivers/bus/ti-sysc.c
drivers/cdrom/cdrom.c
drivers/clk/clk-npcm7xx.c
drivers/clk/x86/clk-st.c
drivers/cpuidle/governors/menu.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caampkc.c
drivers/crypto/caam/jr.c
drivers/crypto/cavium/nitrox/nitrox_dev.h
drivers/crypto/cavium/nitrox/nitrox_lib.c
drivers/crypto/cavium/nitrox/nitrox_reqmgr.c
drivers/crypto/chelsio/chtls/chtls.h
drivers/crypto/chelsio/chtls/chtls_main.c
drivers/crypto/vmx/aes_cbc.c
drivers/crypto/vmx/aes_xts.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/amdgpu/kv_dpm.c
drivers/gpu/drm/amd/amdgpu/si_dpm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/intel_audio.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_hdmi.c
drivers/gpu/drm/i915/intel_lspcon.c
drivers/gpu/drm/mediatek/mtk_disp_ovl.c
drivers/gpu/drm/mediatek/mtk_disp_rdma.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.h
drivers/gpu/drm/mediatek/mtk_drm_ddp.c
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
drivers/gpu/drm/mediatek/mtk_drm_drv.c
drivers/hwmon/adt7475.c
drivers/hwmon/ina2xx.c
drivers/hwmon/nct6775.c
drivers/i2c/algos/i2c-algo-bit.c
drivers/i2c/busses/i2c-designware-master.c
drivers/i2c/busses/i2c-designware-platdrv.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-sh_mobile.c
drivers/i2c/i2c-core-base.c
drivers/mmc/core/queue.c
drivers/mmc/core/queue.h
drivers/mmc/host/android-goldfish.c
drivers/mmc/host/atmel-mci.c
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mtd/nand/raw/denali.c
drivers/mtd/nand/raw/docg4.c
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
drivers/net/ethernet/cadence/macb_main.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
drivers/net/ethernet/hisilicon/hns/hnae.h
drivers/net/ethernet/hisilicon/hns/hns_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/intel/e1000/e1000_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_controlq.c
drivers/net/ethernet/intel/ice/ice_ethtool.c
drivers/net/ethernet/intel/ice/ice_hw_autogen.h
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_nvm.c
drivers/net/ethernet/intel/ice/ice_sched.c
drivers/net/ethernet/intel/ice/ice_switch.c
drivers/net/ethernet/intel/ice/ice_switch.h
drivers/net/ethernet/intel/ice/ice_txrx.h
drivers/net/ethernet/intel/ice/ice_type.h
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/ixgb/ixgb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
drivers/net/ethernet/netronome/nfp/flower/action.c
drivers/net/ethernet/qlogic/qed/qed_init_ops.c
drivers/net/ethernet/qlogic/qed/qed_mcp.c
drivers/net/ethernet/qlogic/qed/qed_mcp.h
drivers/net/ethernet/qlogic/qed/qed_reg_addr.h
drivers/net/ethernet/qlogic/qede/qede_filter.c
drivers/net/ethernet/qlogic/qlge/qlge_main.c
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h
drivers/net/ethernet/stmicro/stmmac/Kconfig
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/usb/r8152.c
drivers/nvme/host/pci.c
drivers/nvme/target/core.c
drivers/nvme/target/fcloop.c
drivers/of/base.c
drivers/thermal/of-thermal.c
drivers/thermal/qoriq_thermal.c
drivers/thermal/rcar_gen3_thermal.c
drivers/thermal/rcar_thermal.c
drivers/vhost/vhost.c
drivers/xen/xenbus/xenbus_probe.c
fs/buffer.c
fs/isofs/inode.c
fs/notify/mark.c
fs/quota/quota.c
fs/udf/super.c
include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h [new file with mode: 0644]
include/linux/arm-smccc.h
include/linux/i2c.h
include/linux/of.h
include/linux/platform_data/ina2xx.h
include/linux/quota.h
include/net/act_api.h
include/net/pkt_cls.h
kernel/bpf/hashtab.c
kernel/bpf/sockmap.c
kernel/cpu.c
kernel/printk/printk.c
kernel/watchdog.c
kernel/watchdog_hld.c
kernel/workqueue.c
lib/percpu_counter.c
lib/rhashtable.c
mm/page-writeback.c
mm/page_alloc.c
mm/slub.c
net/core/dev.c
net/dsa/slave.c
net/ipv4/tcp_bbr.c
net/ipv4/tcp_ipv4.c
net/ipv6/addrconf.c
net/ipv6/ip6_fib.c
net/ipv6/ip6_vti.c
net/ipv6/route.c
net/ncsi/ncsi-netlink.c
net/rds/tcp.c
net/sched/act_api.c
net/sched/act_bpf.c
net/sched/act_connmark.c
net/sched/act_csum.c
net/sched/act_gact.c
net/sched/act_ife.c
net/sched/act_ipt.c
net/sched/act_mirred.c
net/sched/act_nat.c
net/sched/act_pedit.c
net/sched/act_police.c
net/sched/act_sample.c
net/sched/act_simple.c
net/sched/act_skbedit.c
net/sched/act_skbmod.c
net/sched/act_tunnel_key.c
net/sched/act_vlan.c
net/sched/cls_u32.c
net/sched/sch_cake.c
net/tls/tls_main.c
net/xdp/xdp_umem.c
scripts/Kbuild.include
scripts/Makefile.build
tools/bpf/bpftool/map_perf_ring.c

index 3d5951c8bf5fe8b27f47b016289c910f90af97e6..e8b60bd766f7649a430a877628e73d8936d66cbb 100644 (file)
@@ -73,3 +73,12 @@ KernelVersion:       3.0
 Contact:       Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 Description:
                 Number of sectors written by the frontend.
+
+What:          /sys/bus/xen-backend/devices/*/state
+Date:          August 2018
+KernelVersion: 4.19
+Contact:       Joe Jin <joe.jin@oracle.com>
+Description:
+                The state of the device. One of: 'Unknown',
+                'Initialising', 'Initialised', 'Connected', 'Closing',
+                'Closed', 'Reconfiguring', 'Reconfigured'.
index 8bb43b66eb55a1f8c0cbac1917301b2e96a55bbc..4e7babb3ba1fecc673018253d4adbb860e0cb8a4 100644 (file)
@@ -15,3 +15,13 @@ Description:
                 blkback. If the frontend tries to use more than
                 max_persistent_grants, the LRU kicks in and starts
                 removing 5% of max_persistent_grants every 100ms.
+
+What:           /sys/module/xen_blkback/parameters/persistent_grant_unused_seconds
+Date:           August 2018
+KernelVersion:  4.19
+Contact:        Roger Pau Monné <roger.pau@citrix.com>
+Description:
+                How long a persistent grant is allowed to remain
+                allocated without being in use. The time is in
+                seconds, 0 means indefinitely long.
+                The default is 60 seconds.
index ed494ac0beb2acc0a7a102224cda6e1055c15a3a..d17ed518a7ea416177a778cb30a3f0f2e0f53dc6 100644 (file)
@@ -26,6 +26,7 @@ Offset        Value                                        Purpose
 0x20          0xfcba0d10 (Magic cookie)                    AFTR
 0x24          exynos_cpu_resume_ns                         AFTR
 0x28 + 4*cpu  0x8 (Magic cookie, Exynos3250)               AFTR
+0x28          0x0 or last value during resume (Exynos542x) System suspend
 
 
 2. Secure mode
index f128f736b4a5025f6c1964253b05472d6c76dc8b..7169a0ec41d86911ad4a9c7fc34488841dc7c1e6 100644 (file)
@@ -200,7 +200,7 @@ prctl(PR_SVE_SET_VL, unsigned long arg)
       thread.
 
     * Changing the vector length causes all of P0..P15, FFR and all bits of
-      Z0..V31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
+      Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
       unspecified.  Calling PR_SVE_SET_VL with vl equal to the thread's current
       vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC
       flag, does not constitute a change to the vector length for this purpose.
@@ -500,7 +500,7 @@ References
 [2] arch/arm64/include/uapi/asm/ptrace.h
     AArch64 Linux ptrace ABI definitions
 
-[3] linux/Documentation/arm64/cpu-feature-registers.txt
+[3] Documentation/arm64/cpu-feature-registers.txt
 
 [4] ARM IHI0055C
     http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf
index b5c2b5c35766f8db4fb8a3dd66d9cf9b4a395209..4498292b833d0c63b42b9eef486f2467649e0ae4 100644 (file)
@@ -57,12 +57,17 @@ Boards with the Amlogic Meson AXG A113D SoC shall have the following properties:
   Required root node property:
     compatible: "amlogic,a113d", "amlogic,meson-axg";
 
+Boards with the Amlogic Meson G12A S905D2 SoC shall have the following properties:
+  Required root node property:
+    compatible: "amlogic,g12a";
+
 Board compatible values (alphabetically, grouped by SoC):
 
   - "geniatech,atv1200" (Meson6)
 
   - "minix,neo-x8" (Meson8)
 
+  - "endless,ec100" (Meson8b)
   - "hardkernel,odroid-c1" (Meson8b)
   - "tronfy,mxq" (Meson8b)
 
@@ -101,6 +106,8 @@ Board compatible values (alphabetically, grouped by SoC):
 
   - "amlogic,s400" (Meson axg a113d)
 
+  - "amlogic,u200" (Meson g12a s905d2)
+
 Amlogic Meson Firmware registers Interface
 ------------------------------------------
 
index 1e3e29a545e263470fff686f036361ddaf48abfa..0dcc3ea5adff4d5aea7402bc3f3d235a1744f298 100644 (file)
@@ -42,6 +42,14 @@ Raspberry Pi Compute Module
 Required root node properties:
 compatible = "raspberrypi,compute-module", "brcm,bcm2835";
 
+Raspberry Pi Compute Module 3
+Required root node properties:
+compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
+
+Raspberry Pi Compute Module 3 Lite
+Required root node properties:
+compatible = "raspberrypi,3-compute-module-lite", "brcm,bcm2837";
+
 Raspberry Pi Zero
 Required root node properties:
 compatible = "raspberrypi,model-zero", "brcm,bcm2835";
index 199cd36fe1ba44b4efe750aa72d179d0e1bbc666..a97f643e7d1c760240d918ffe5682e82dc3bdda9 100644 (file)
@@ -8,6 +8,14 @@ HiKey960 Board
 Required root node properties:
        - compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
 
+Hi3670 SoC
+Required root node properties:
+       - compatible = "hisilicon,hi3670";
+
+HiKey970 Board
+Required root node properties:
+       - compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
+
 Hi3798cv200 SoC
 Required root node properties:
        - compatible = "hisilicon,hi3798cv200";
index acfd3c773dd0e40e6ec22ec7566fb433fe90c995..5fc9c236ca872c315140ec2c53116d407e9f4350 100644 (file)
@@ -59,6 +59,10 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
 
+- Firefly ROC-RK3399-PC board:
+    Required root node properties:
+      - compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
+
 - ChipSPARK PopMetal-RK3288 board:
     Required root node properties:
       - compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
@@ -168,6 +172,10 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "rockchip,px5-evb", "rockchip,px5", "rockchip,rk3368";
 
+- Rockchip PX30 Evaluation board:
+    Required root node properties:
+      - compatible = "rockchip,px30-evb", "rockchip,px30";
+
 - Rockchip RV1108 Evaluation board
     Required root node properties:
       - compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
index 08a587875996b47cf25dd20f7bd7cde81f61d5ff..74d0a780ce511998914fd0efe1ba82adf7a20867 100644 (file)
@@ -22,7 +22,7 @@ References:
 
 Example:
 
-scu@a04100000 {
+scu@a0410000 {
        compatible = "arm,cortex-a9-scu";
        reg = <0xa0410000 0x100>;
 };
index 89b4a389fbc7cb3e886a7ecab2ac240adb3592f7..f5e0f82fd5031efb1570361eabf2d096769ef7f5 100644 (file)
@@ -7,6 +7,8 @@ SoCs:
     compatible = "renesas,emev2"
   - RZ/A1H (R7S72100)
     compatible = "renesas,r7s72100"
+  - RZ/A2 (R7S9210)
+    compatible = "renesas,r7s9210"
   - SH-Mobile AG5 (R8A73A00/SH73A0)
     compatible = "renesas,sh73a0"
   - R-Mobile APE6 (R8A73A40)
@@ -23,6 +25,10 @@ SoCs:
     compatible = "renesas,r8a7745"
   - RZ/G1C (R8A77470)
     compatible = "renesas,r8a77470"
+  - RZ/G2M (R8A774A1)
+    compatible = "renesas,r8a774a1"
+  - RZ/G2E (RA8774C0)
+    compatible = "renesas,r8a774c0"
   - R-Car M1A (R8A77781)
     compatible = "renesas,r8a7778"
   - R-Car H1 (R8A77790)
@@ -107,6 +113,8 @@ Boards:
     compatible = "renesas,lager", "renesas,r8a7790"
   - M3ULCB (R-Car Starter Kit Pro, RTP0RC7796SKBX0010SA09 (M3 ES1.0))
     compatible = "renesas,m3ulcb", "renesas,r8a7796"
+  - M3NULCB (R-Car Starter Kit Pro, RTP0RC77965SKBX010SA00 (M3-N ES1.1))
+    compatible = "renesas,m3nulcb", "renesas,r8a77965"
   - Marzen (R0P7779A00010S)
     compatible = "renesas,marzen", "renesas,r8a7779"
   - Porter (M2-LCDP)
@@ -143,12 +151,12 @@ Boards:
     compatible = "renesas,wheat", "renesas,r8a7792"
 
 
-Most Renesas ARM SoCs have a Product Register that allows to retrieve SoC
-product and revision information.  If present, a device node for this register
-should be added.
+Most Renesas ARM SoCs have a Product Register or Boundary Scan ID Register that
+allows to retrieve SoC product and revision information.  If present, a device
+node for this register should be added.
 
 Required properties:
-  - compatible: Must be "renesas,prr".
+  - compatible: Must be "renesas,prr" or "renesas,bsid"
   - reg: Base address and length of the register block.
 
 
similarity index 89%
rename from Documentation/devicetree/bindings/arm/marvell/marvell,berlin.txt
rename to Documentation/devicetree/bindings/arm/syna.txt
index 3bab18409b7acabfdfda8bba05b9da53436773b9..2face46a5f64de58e7464f3c93591807bd0f3396 100644 (file)
@@ -1,4 +1,9 @@
-Marvell Berlin SoC Family Device Tree Bindings
+Synaptics SoC Device Tree Bindings
+
+According to https://www.synaptics.com/company/news/conexant-marvell
+Synaptics has acquired the Multimedia Solutions Business of Marvell, so
+berlin SoCs are now Synaptics' SoCs now.
+
 ---------------------------------------------------------------
 
 Work in progress statement:
@@ -13,6 +18,10 @@ stable binding/ABI.
 
 ---------------------------------------------------------------
 
+Boards with the Synaptics AS370 SoC shall have the following properties:
+  Required root node property:
+    compatible: "syna,as370"
+
 Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500
 shall have the following properties:
 
index 32f62bb7006d4480a5ba22de62619b319eab3a3d..c59b15f64346ffbccece72040482d52f2f3ba83e 100644 (file)
@@ -47,12 +47,17 @@ board-specific compatible values:
   nvidia,ventana
   toradex,apalis_t30
   toradex,apalis_t30-eval
+  toradex,apalis_t30-v1.1
+  toradex,apalis_t30-v1.1-eval
   toradex,apalis-tk1
   toradex,apalis-tk1-eval
-  toradex,colibri_t20-512
+  toradex,apalis-tk1-v1.2
+  toradex,apalis-tk1-v1.2-eval
+  toradex,colibri_t20
+  toradex,colibri_t20-eval-v3
+  toradex,colibri_t20-iris
   toradex,colibri_t30
   toradex,colibri_t30-eval-v3
-  toradex,iris
 
 Trusted Foundations
 -------------------------------------------
index 5a3bf7c5a7a01ea5325c3b803d5f5d9f5bbc48ae..c9fd6d1de57ee198dbb024bbfe09e73abd10b265 100644 (file)
@@ -34,3 +34,96 @@ Board DTS:
        pmc@c360000 {
                nvidia,invert-interrupt;
        };
+
+== Pad Control ==
+
+On Tegra SoCs a pad is a set of pins which are configured as a group.
+The pin grouping is a fixed attribute of the hardware. The PMC can be
+used to set pad power state and signaling voltage. A pad can be either
+in active or power down mode. The support for power state and signaling
+voltage configuration varies depending on the pad in question. 3.3 V and
+1.8 V signaling voltages are supported on pins where software
+controllable signaling voltage switching is available.
+
+Pad configurations are described with pin configuration nodes which
+are placed under the pmc node and they are referred to by the pinctrl
+client properties. For more information see
+Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt.
+
+The following pads are present on Tegra186:
+csia           csib            dsi             mipi-bias
+pex-clk-bias   pex-clk3        pex-clk2        pex-clk1
+usb0           usb1            usb2            usb-bias
+uart           audio           hsic            dbg
+hdmi-dp0       hdmi-dp1        pex-cntrl       sdmmc2-hv
+sdmmc4         cam             dsib            dsic
+dsid           csic            csid            csie
+dsif           spi             ufs             dmic-hv
+edp            sdmmc1-hv       sdmmc3-hv       conn
+audio-hv       ao-hv
+
+Required pin configuration properties:
+  - pins: A list of strings, each of which contains the name of a pad
+         to be configured.
+
+Optional pin configuration properties:
+  - low-power-enable: Configure the pad into power down mode
+  - low-power-disable: Configure the pad into active mode
+  - power-source: Must contain either TEGRA_IO_PAD_VOLTAGE_1V8 or
+    TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages.
+    The values are defined in
+    include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h.
+
+Note: The power state can be configured on all of the above pads except
+      for ao-hv. Following pads have software configurable signaling
+      voltages: sdmmc2-hv, dmic-hv, sdmmc1-hv, sdmmc3-hv, audio-hv,
+      ao-hv.
+
+Pad configuration state example:
+       pmc: pmc@7000e400 {
+               compatible = "nvidia,tegra186-pmc";
+               reg = <0 0x0c360000 0 0x10000>,
+                     <0 0x0c370000 0 0x10000>,
+                     <0 0x0c380000 0 0x10000>,
+                     <0 0x0c390000 0 0x10000>;
+               reg-names = "pmc", "wake", "aotag", "scratch";
+
+               ...
+
+               sdmmc1_3v3: sdmmc1-3v3 {
+                       pins = "sdmmc1-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc1_1v8: sdmmc1-1v8 {
+                       pins = "sdmmc1-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
+
+               hdmi_off: hdmi-off {
+                       pins = "hdmi";
+                       low-power-enable;
+               }
+
+               hdmi_on: hdmi-on {
+                       pins = "hdmi";
+                       low-power-disable;
+               }
+       };
+
+Pinctrl client example:
+       sdmmc1: sdhci@3400000 {
+               ...
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc1_3v3>;
+               pinctrl-1 = <&sdmmc1_1v8>;
+       };
+
+       ...
+
+       sor0: sor@15540000 {
+               ...
+               pinctrl-0 = <&hdmi_off>;
+               pinctrl-1 = <&hdmi_on>;
+               pinctrl-names = "hdmi-on", "hdmi-off";
+       };
index a74b37b07e5c1576492245a9d70ed89f5cf89234..cb12f33a247f5463befb24c6541b4c513de90b6a 100644 (file)
@@ -195,3 +195,106 @@ Example:
                power-domains = <&pd_audio>;
                ...
        };
+
+== Pad Control ==
+
+On Tegra SoCs a pad is a set of pins which are configured as a group.
+The pin grouping is a fixed attribute of the hardware. The PMC can be
+used to set pad power state and signaling voltage. A pad can be either
+in active or power down mode. The support for power state and signaling
+voltage configuration varies depending on the pad in question. 3.3 V and
+1.8 V signaling voltages are supported on pins where software
+controllable signaling voltage switching is available.
+
+The pad configuration state nodes are placed under the pmc node and they
+are referred to by the pinctrl client properties. For more information
+see Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt.
+The pad name should be used as the value of the pins property in pin
+configuration nodes.
+
+The following pads are present on Tegra124 and Tegra132:
+audio          bb              cam             comp
+csia           csb             cse             dsi
+dsib           dsic            dsid            hdmi
+hsic           hv              lvds            mipi-bias
+nand           pex-bias        pex-clk1        pex-clk2
+pex-cntrl      sdmmc1          sdmmc3          sdmmc4
+sys_ddc                uart            usb0            usb1
+usb2           usb_bias
+
+The following pads are present on Tegra210:
+audio          audio-hv        cam             csia
+csib           csic            csid            csie
+csif           dbg             debug-nonao     dmic
+dp             dsi             dsib            dsic
+dsid           emmc            emmc2           gpio
+hdmi           hsic            lvds            mipi-bias
+pex-bias       pex-clk1        pex-clk2        pex-cntrl
+sdmmc1         sdmmc3          spi             spi-hv
+uart           usb0            usb1            usb2
+usb3           usb-bias
+
+Required pin configuration properties:
+  - pins: Must contain name of the pad(s) to be configured.
+
+Optional pin configuration properties:
+  - low-power-enable: Configure the pad into power down mode
+  - low-power-disable: Configure the pad into active mode
+  - power-source: Must contain either TEGRA_IO_PAD_VOLTAGE_1V8
+    or TEGRA_IO_PAD_VOLTAGE_3V3 to select between signaling voltages.
+    The values are defined in
+    include/dt-bindings/pinctrl/pinctrl-tegra-io-pad.h.
+
+Note: The power state can be configured on all of the Tegra124 and
+      Tegra132 pads. None of the Tegra124 or Tegra132 pads support
+      signaling voltage switching.
+
+Note: All of the listed Tegra210 pads except pex-cntrl support power
+      state configuration. Signaling voltage switching is supported on
+      following Tegra210 pads: audio, audio-hv, cam, dbg, dmic, gpio,
+      pex-cntrl, sdmmc1, sdmmc3, spi, spi-hv, and uart.
+
+Pad configuration state example:
+       pmc: pmc@7000e400 {
+               compatible = "nvidia,tegra210-pmc";
+               reg = <0x0 0x7000e400 0x0 0x400>;
+               clocks = <&tegra_car TEGRA210_CLK_PCLK>, <&clk32k_in>;
+               clock-names = "pclk", "clk32k_in";
+
+               ...
+
+               sdmmc1_3v3: sdmmc1-3v3 {
+                       pins = "sdmmc1";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc1_1v8: sdmmc1-1v8 {
+                       pins = "sdmmc1";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
+
+               hdmi_off: hdmi-off {
+                       pins = "hdmi";
+                       low-power-enable;
+               }
+
+               hdmi_on: hdmi-on {
+                       pins = "hdmi";
+                       low-power-disable;
+               }
+       };
+
+Pinctrl client example:
+       sdmmc1: sdhci@700b0000 {
+               ...
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc1_3v3>;
+               pinctrl-1 = <&sdmmc1_1v8>;
+       };
+       ...
+       sor@54540000 {
+               ...
+               pinctrl-0 = <&hdmi_off>;
+               pinctrl-1 = <&hdmi_on>;
+               pinctrl-names = "hdmi-on", "hdmi-off";
+       };
index 0fa429534f4910f79193ed177d8da974ee9caf24..89408de55bfd2a6253000e5f7ff8b5d776bba99f 100644 (file)
@@ -60,7 +60,7 @@ Example:
                              <0xa0410100 0x100>;
                };
 
-               scu@a04100000 {
+               scu@a0410000 {
                        compatible = "arm,cortex-a9-scu";
                        reg = <0xa0410000 0x100>;
                };
index b0a8af51c388c51f544b4b4cc391563a08e82ca9..265b223cd9780158a8415e96ce7dfb16c192237a 100644 (file)
@@ -11,7 +11,7 @@ The RISC-V supervisor ISA manual specifies three interrupt sources that are
 attached to every HLIC: software interrupts, the timer interrupt, and external
 interrupts.  Software interrupts are used to send IPIs between cores.  The
 timer interrupt comes from an architecturally mandated real-time timer that is
-controller via Supervisor Binary Interface (SBI) calls and CSR reads.  External
+controlled via Supervisor Binary Interface (SBI) calls and CSR reads.  External
 interrupts connect all other device interrupts to the HLIC, which are routed
 via the platform-level interrupt controller (PLIC).
 
@@ -25,7 +25,15 @@ in the system.
 
 Required properties:
 - compatible : "riscv,cpu-intc"
-- #interrupt-cells : should be <1>
+- #interrupt-cells : should be <1>.  The interrupt sources are defined by the
+  RISC-V supervisor ISA manual, with only the following three interrupts being
+  defined for supervisor mode:
+    - Source 1 is the supervisor software interrupt, which can be sent by an SBI
+      call and is reserved for use by software.
+    - Source 5 is the supervisor timer interrupt, which can be configured by
+      SBI calls and implements a one-shot timer.
+    - Source 9 is the supervisor external interrupt, which chains to all other
+      device interrupts.
 - interrupt-controller : Identifies the node as an interrupt controller
 
 Furthermore, this interrupt-controller MUST be embedded inside the cpu
@@ -38,7 +46,7 @@ An example device tree entry for a HLIC is show below.
                ...
                cpu1-intc: interrupt-controller {
                        #interrupt-cells = <1>;
-                       compatible = "riscv,cpu-intc", "sifive,fu540-c000-cpu-intc";
+                       compatible = "sifive,fu540-c000-cpu-intc", "riscv,cpu-intc";
                        interrupt-controller;
                };
        };
index 1811e1972a7a1c9a162d51b5997bf36279a8a3ac..5201bc15fdd67c1df1ba1b49715d4563cc14dbbd 100644 (file)
@@ -46,6 +46,42 @@ Required properties:
       "brcm,bcm6328-switch"
       "brcm,bcm6368-switch" and the mandatory "brcm,bcm63xx-switch"
 
+Required properties for BCM585xx/586xx/88312 SoCs:
+
+ - reg: a total of 3 register base addresses, the first one must be the
+   Switch Register Access block base, the second is the port 5/4 mux
+   configuration register and the third one is the SGMII configuration
+   and status register base address.
+
+ - interrupts: a total of 13 interrupts must be specified, in the following
+   order: port 0-5, 7-8 link status change, then the integrated PHY interrupt,
+   then the timestamping interrupt and the sleep timer interrupts for ports
+   5,7,8.
+
+Optional properties for BCM585xx/586xx/88312 SoCs:
+
+  - reg-names: a total of 3 names matching the 3 base register address, must
+    be in the following order:
+       "srab"
+       "mux_config"
+       "sgmii_config"
+
+  - interrupt-names: a total of 13 names matching the 13 interrupts specified
+    must be in the following order:
+       "link_state_p0"
+       "link_state_p1"
+       "link_state_p2"
+       "link_state_p3"
+       "link_state_p4"
+       "link_state_p5"
+       "link_state_p7"
+       "link_state_p8"
+       "phy"
+       "ts"
+       "imp_sleep_timer_p5"
+       "imp_sleep_timer_p7"
+       "imp_sleep_timer_p8"
+
 See Documentation/devicetree/bindings/net/dsa/dsa.txt for a list of additional
 required and optional properties.
 
index e319fe5e205ac5d32af9726285afe942848f934c..99c4ba6a3f61d4e7a8a0701033a50489a47d91c4 100644 (file)
@@ -7,6 +7,7 @@ Required properties:
   "allwinner,sun8i-a83t-sid"
   "allwinner,sun8i-h3-sid"
   "allwinner,sun50i-a64-sid"
+  "allwinner,sun50i-h5-sid"
 
 - reg: Should contain registers location and length
 
index 7dc5ce858a0ee3a6659cc0be7a0d3194f7a6fa3e..46e27cd69f18faac4015ecf3a151bda89aed8ed3 100644 (file)
@@ -13,6 +13,7 @@ On RK3328 SoCs, the GRF adds a section for USB2PHYGRF,
 Required Properties:
 
 - compatible: GRF should be one of the following:
+   - "rockchip,px30-grf", "syscon": for px30
    - "rockchip,rk3036-grf", "syscon": for rk3036
    - "rockchip,rk3066-grf", "syscon": for rk3066
    - "rockchip,rk3188-grf", "syscon": for rk3188
@@ -23,6 +24,7 @@ Required Properties:
    - "rockchip,rk3399-grf", "syscon": for rk3399
    - "rockchip,rv1108-grf", "syscon": for rv1108
 - compatible: PMUGRF should be one of the following:
+   - "rockchip,px30-pmugrf", "syscon": for px30
    - "rockchip,rk3368-pmugrf", "syscon": for rk3368
    - "rockchip,rk3399-pmugrf", "syscon": for rk3399
 - compatible: SGRF should be one of the following
index 2c3fc512e7466fe0d7577db7d7c74b803739585c..b84a705c5c1429a1f172f033578b9bd791f1bc39 100644 (file)
@@ -114,6 +114,7 @@ elan        Elan Microelectronic Corp.
 embest Shenzhen Embest Technology Co., Ltd.
 emmicro        EM Microelectronic
 emtrion        emtrion GmbH
+endless        Endless Mobile, Inc.
 energymicro    Silicon Laboratories (formerly Energy Micro AS)
 engicam        Engicam S.r.l.
 epcos  EPCOS AG
@@ -297,6 +298,7 @@ pine64      Pine64
 pixcir  PIXCIR MICROELECTRONICS Co., Ltd
 plathome       Plat'Home Co., Ltd.
 plda   PLDA
+plx    Broadcom Corporation (formerly PLX Technology)
 portwell       Portwell Inc.
 poslab Poslab Technology Co., Ltd.
 powervr        PowerVR (deprecated, use img)
index 5d47a262474cfe0e4b32d1d814c6ac8bd3a20d45..9407212a85a8cac6918c56a27380bdb101e7af31 100644 (file)
@@ -7,6 +7,7 @@ Required properties:
               Examples with soctypes are:
                 - "renesas,r8a7743-wdt" (RZ/G1M)
                 - "renesas,r8a7745-wdt" (RZ/G1E)
+                - "renesas,r8a774a1-wdt" (RZ/G2M)
                 - "renesas,r8a7790-wdt" (R-Car H2)
                 - "renesas,r8a7791-wdt" (R-Car M2-W)
                 - "renesas,r8a7792-wdt" (R-Car V2H)
@@ -21,8 +22,8 @@ Required properties:
                 - "renesas,r7s72100-wdt" (RZ/A1)
                The generic compatible string must be:
                 - "renesas,rza-wdt" for RZ/A
-                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G
-                - "renesas,rcar-gen3-wdt" for R-Car Gen3
+                - "renesas,rcar-gen2-wdt" for R-Car Gen2 and RZ/G1
+                - "renesas,rcar-gen3-wdt" for R-Car Gen3 and RZ/G2
 
 - reg : Should contain WDT registers location and length
 - clocks : the clock feeding the watchdog timer.
index 72d16f08e431c674c62738641d7c28926d6331cb..b8df81f6d6bcf995e098ebb4dce0a57a483bba66 100644 (file)
@@ -32,7 +32,7 @@ Supported chips:
     Datasheet: Publicly available at the Texas Instruments website
                http://www.ti.com/
 
-Author: Lothar Felten <l-felten@ti.com>
+Author: Lothar Felten <lothar.felten@gmail.com>
 
 Description
 -----------
index 966610aa4620fa8ce19e52fffd2d44c5a2128367..203002054120568135a01f7e4ab343a5223279bd 100644 (file)
@@ -50,10 +50,14 @@ bounce buffer. But you don't need to care about that detail, just use the
 returned buffer. If NULL is returned, the threshold was not met or a bounce
 buffer could not be allocated. Fall back to PIO in that case.
 
-In any case, a buffer obtained from above needs to be released. It ensures data
-is copied back to the message and a potentially used bounce buffer is freed::
+In any case, a buffer obtained from above needs to be released. Another helper
+function ensures a potentially used bounce buffer is freed::
 
-       i2c_release_dma_safe_msg_buf(msg, dma_buf);
+       i2c_put_dma_safe_msg_buf(dma_buf, msg, xferred);
+
+The last argument 'xferred' controls if the buffer is synced back to the
+message or not. No syncing is needed in cases setting up DMA had an error and
+there was no data transferred.
 
 The bounce buffer handling from the core is generic and simple. It will always
 allocate a new bounce buffer. If you want a more sophisticated handling (e.g.
index a5b256b259057c564f76c508e0fcf648e47938d7..9ad052aeac39be98b3cb1d390e043f2c7583fd67 100644 (file)
@@ -8255,9 +8255,9 @@ F:        drivers/ata/pata_arasan_cf.c
 
 LIBATA PATA DRIVERS
 M:     Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-M:     Jens Axboe <kernel.dk>
+M:     Jens Axboe <axboe@kernel.dk>
 L:     linux-ide@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
 S:     Maintained
 F:     drivers/ata/pata_*.c
 F:     drivers/ata/ata_generic.c
@@ -8275,7 +8275,7 @@ LIBATA SATA AHCI PLATFORM devices support
 M:     Hans de Goede <hdegoede@redhat.com>
 M:     Jens Axboe <axboe@kernel.dk>
 L:     linux-ide@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
 S:     Maintained
 F:     drivers/ata/ahci_platform.c
 F:     drivers/ata/libahci_platform.c
@@ -8291,7 +8291,7 @@ F:        drivers/ata/sata_promise.*
 LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
 M:     Jens Axboe <axboe@kernel.dk>
 L:     linux-ide@vger.kernel.org
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
+T:     git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
 S:     Maintained
 F:     drivers/ata/
 F:     include/linux/ata.h
index 2b458801ba7418a9897bce84a116105f2f87a18c..19948e55694138bae4cfdc49775bb72486e12eb8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 VERSION = 4
 PATCHLEVEL = 19
 SUBLEVEL = 0
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME = Merciless Moray
 
 # *DOCUMENTATION*
@@ -807,6 +807,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 # disable pointer signed / unsigned warnings in gcc 4.0
 KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
 
+# disable stringop warnings in gcc 8+
+KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
+
 # disable invalid "can't wrap" optimizations for signed / pointers
 KBUILD_CFLAGS  += $(call cc-option,-fno-strict-overflow)
 
index b5bd3de87c331ed9f7e85d43767c46c3831dfbcc..7edf93d1ba738578ae5e0a75b9c5d135cc092580 100644 (file)
@@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
        bcm2836-rpi-2-b.dtb \
        bcm2837-rpi-3-b.dtb \
        bcm2837-rpi-3-b-plus.dtb \
+       bcm2837-rpi-cm3-io3.dtb \
        bcm2835-rpi-zero.dtb \
        bcm2835-rpi-zero-w.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
@@ -321,6 +322,7 @@ dtb-$(CONFIG_MACH_MESON6) += \
        meson6-atv1200.dtb
 dtb-$(CONFIG_MACH_MESON8) += \
        meson8-minix-neo-x8.dtb \
+       meson8b-ec100.dtb \
        meson8b-mxq.dtb \
        meson8b-odroidc1.dtb \
        meson8m2-mxiii-plus.dtb
@@ -892,7 +894,7 @@ dtb-$(CONFIG_ARCH_SOCFPGA) += \
        socfpga_arria10_socdk_sdmmc.dtb \
        socfpga_cyclone5_mcvevk.dtb \
        socfpga_cyclone5_socdk.dtb \
-       socfpga_cyclone5_de0_sockit.dtb \
+       socfpga_cyclone5_de0_nano_soc.dtb \
        socfpga_cyclone5_sockit.dtb \
        socfpga_cyclone5_socrates.dtb \
        socfpga_cyclone5_sodia.dtb \
@@ -1033,6 +1035,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
        sun8i-h2-plus-orangepi-r1.dtb \
        sun8i-h2-plus-orangepi-zero.dtb \
        sun8i-h3-bananapi-m2-plus.dtb \
+       sun8i-h3-bananapi-m2-plus-v1.2.dtb \
        sun8i-h3-beelink-x2.dtb \
        sun8i-h3-libretech-all-h3-cc.dtb \
        sun8i-h3-nanopi-m1.dtb  \
@@ -1046,6 +1049,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
        sun8i-h3-orangepi-pc-plus.dtb \
        sun8i-h3-orangepi-plus.dtb \
        sun8i-h3-orangepi-plus2e.dtb \
+       sun8i-h3-orangepi-zero-plus2.dtb \
        sun8i-r16-bananapi-m2m.dtb \
        sun8i-r16-nintendo-nes-classic.dtb \
        sun8i-r16-nintendo-super-nes-classic.dtb \
@@ -1061,6 +1065,7 @@ dtb-$(CONFIG_ARCH_TANGO) += \
        tango4-vantage-1172.dtb
 dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
        tegra20-harmony.dtb \
+       tegra20-colibri-eval-v3.dtb \
        tegra20-colibri-iris.dtb \
        tegra20-medcom-wide.dtb \
        tegra20-paz00.dtb \
@@ -1071,6 +1076,7 @@ dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
        tegra20-ventana.dtb
 dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += \
        tegra30-apalis-eval.dtb \
+       tegra30-apalis-v1.1-eval.dtb \
        tegra30-beaver.dtb \
        tegra30-cardhu-a02.dtb \
        tegra30-cardhu-a04.dtb \
@@ -1199,6 +1205,8 @@ dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 dtb-$(CONFIG_ARCH_ASPEED) += \
        aspeed-ast2500-evb.dtb \
        aspeed-bmc-arm-centriq2400-rep.dtb \
+       aspeed-bmc-arm-stardragon4800-rep2.dtb \
+       aspeed-bmc-facebook-tiogapass.dtb \
        aspeed-bmc-intel-s2600wf.dtb \
        aspeed-bmc-opp-lanyang.dtb \
        aspeed-bmc-opp-palmetto.dtb \
old mode 100755 (executable)
new mode 100644 (file)
index f0cbd86312dce5ddc1867d9eb2dc54059450a090..d4b7c59eec6853f2f836b5b3ffd686988ad0f6b1 100644 (file)
@@ -469,6 +469,7 @@ rtc: rtc@44e3e000 {
                        ti,hwmods = "rtc";
                        clocks = <&clk_32768_ck>;
                        clock-names = "int-clk";
+                       system-power-controller;
                        status = "disabled";
                };
 
index a917cf8825ca8b43bc3cd02a5395d6fbe77a2721..0e4c7c4c8c0930c81a6e8f1925a9cf0343a4b76e 100644 (file)
@@ -371,7 +371,7 @@ serial3: serial@1000c000 {
                        clock-names = "uartclk", "apb_pclk";
                };
 
-               ssp: ssp@1000d000 {
+               ssp: spi@1000d000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x1000d000 0x1000>;
                        clocks = <&sspclk>, <&pclk>;
index f935b72d3d96458a99f1a101d98ec7d620f60c4e..f2a1d25eb6cf3f1249bcc2166bee7f86a75b2a6d 100644 (file)
@@ -380,7 +380,7 @@ pb1176_gpio0: gpio@1010a000 {
                        clock-names = "apb_pclk";
                };
 
-               pb1176_ssp: ssp@1010b000 {
+               pb1176_ssp: spi@1010b000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x1010b000 0x1000>;
                        interrupt-parent = <&intc_dc1176>;
index 36203288de4267d6b41d01375027da7d099b473e..7f9cbdf33a51009ffea23fa488ec8f1e6abe7914 100644 (file)
@@ -523,7 +523,7 @@ pb11mp_serial3: serial@1000c000 {
                        clock-names = "uartclk", "apb_pclk";
                };
 
-               ssp@1000d000 {
+               spi@1000d000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x1000d000 0x1000>;
                        interrupt-parent = <&intc_pb11mp>;
index 10868ba3277f52d1eef2be37df09b101187d9fcf..a5676697ff3b7dee101d3f56e92379bc6c6b3e64 100644 (file)
@@ -362,7 +362,7 @@ serial2: serial@1000b000 {
                        clock-names = "uartclk", "apb_pclk";
                };
 
-               ssp: ssp@1000d000 {
+               ssp: spi@1000d000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x1000d000 0x1000>;
                        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 (file)
index 0000000..bdfd8c9
--- /dev/null
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: GPL-2.0+
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {
+       model = "HXT StarDragon 4800 REP2 AST2520";
+       compatible = "hxt,stardragon4800-rep2-bmc", "aspeed,ast2500";
+
+       chosen {
+               stdout-path = &uart5;
+               bootargs = "console=ttyS4,115200 earlyprintk";
+       };
+
+       memory@80000000 {
+               reg = <0x80000000 0x40000000>;
+       };
+
+       iio-hwmon {
+               compatible = "iio-hwmon";
+               io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
+                                               <&adc 4>, <&adc 5>, <&adc 6>, <&adc 8>;
+       };
+
+       iio-hwmon-battery {
+               compatible = "iio-hwmon";
+               io-channels = <&adc 7>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               system_fault1 {
+                       label = "System_fault1";
+                       gpios = <&gpio ASPEED_GPIO(I, 3) GPIO_ACTIVE_LOW>;
+               };
+
+               system_fault2 {
+                       label = "System_fault2";
+                       gpios = <&gpio ASPEED_GPIO(I, 2) GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&fmc {
+       status = "okay";
+       flash@0 {
+               status = "okay";
+               m25p,fast-read;
+               label = "bmc";
+#include "openbmc-flash-layout.dtsi"
+       };
+};
+
+&spi1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_spi1_default>;
+       flash@0 {
+               status = "okay";
+       };
+};
+
+&spi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_spi2ck_default
+                       &pinctrl_spi2miso_default
+                       &pinctrl_spi2mosi_default
+                       &pinctrl_spi2cs0_default>;
+};
+
+&uart3 {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_txd3_default &pinctrl_rxd3_default>;
+       current-speed = <115200>;
+};
+
+&uart5 {
+       status = "okay";
+};
+
+&mac0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
+};
+
+&mac1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_rmii2_default>;
+       use-ncsi;
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+&i2c1 {
+       status = "okay";
+
+       tmp421@1e {
+               compatible = "ti,tmp421";
+               reg = <0x1e>;
+       };
+       tmp421@2a {
+               compatible = "ti,tmp421";
+               reg = <0x2a>;
+       };
+       tmp421@1c {
+               compatible = "ti,tmp421";
+               reg = <0x1c>;
+       };
+};
+
+&i2c2 {
+       status = "okay";
+};
+
+&i2c3 {
+       status = "okay";
+};
+
+&i2c4 {
+       status = "okay";
+};
+
+&i2c5 {
+       status = "okay";
+};
+
+&i2c6 {
+       status = "okay";
+
+       tmp421@1f {
+               compatible = "ti,tmp421";
+               reg = <0x1f>;
+       };
+       nvt210@4c {
+               compatible = "nvt210";
+               reg = <0x4c>;
+       };
+       eeprom@50 {
+               compatible = "atmel,24c128";
+               reg = <0x50>;
+               pagesize = <128>;
+       };
+};
+
+&i2c7 {
+       status = "okay";
+};
+
+&i2c8 {
+       status = "okay";
+
+       pca9641@70 {
+               compatible = "nxp,pca9641";
+               reg = <0x70>;
+               i2c-arb {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       eeprom@50 {
+                               compatible = "atmel,24c02";
+                               reg = <0x50>;
+                       };
+                       dps650ab@58 {
+                               compatible = "dps650ab";
+                               reg = <0x58>;
+                       };
+               };
+       };
+};
+
+&i2c9 {
+       status = "okay";
+};
+
+&vuart {
+       status = "okay";
+};
+
+&gfx {
+       status = "okay";
+};
+
+&pinctrl {
+       aspeed,external-nodes = <&gfx &lhc>;
+};
+
+&gpio {
+       pin_gpio_c7 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(C, 7) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "BIOS_SPI_MUX_S";
+       };
+       pin_gpio_d1 {
+               gpio-hog;
+               gpios = <ASPEED_GPIO(D, 1) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "PHY2_RESET_N";
+       };
+};
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 (file)
index 0000000..f8e7b71
--- /dev/null
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright (c) 2018 Facebook Inc.
+// Author: Vijay Khemka <vijaykhemka@fb.com>
+/dts-v1/;
+
+#include "aspeed-g5.dtsi"
+#include <dt-bindings/gpio/aspeed-gpio.h>
+
+/ {
+       model = "Facebook TiogaPass BMC";
+       compatible = "facebook,tiogapass-bmc", "aspeed,ast2500";
+       aliases {
+               serial0 = &uart1;
+               serial4 = &uart5;
+       };
+       chosen {
+               stdout-path = &uart5;
+               bootargs = "console=ttyS4,115200 earlyprintk";
+       };
+
+       memory@80000000 {
+               reg = <0x80000000 0x20000000>;
+       };
+};
+
+&fmc {
+       status = "okay";
+       flash@0 {
+               status = "okay";
+               m25p,fast-read;
+#include "openbmc-flash-layout.dtsi"
+       };
+};
+
+&spi1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_spi1_default>;
+       flash@0 {
+               status = "okay";
+               m25p,fast-read;
+               label = "pnor";
+       };
+};
+
+&uart1 {
+       // Host Console
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_txd1_default
+                    &pinctrl_rxd1_default>;
+};
+
+&uart5 {
+       // BMC Console
+       status = "okay";
+};
+
+&mac0 {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_rmii1_default>;
+       use-ncsi;
+};
+
+&i2c0 {
+       status = "okay";
+       //Airmax Conn B, CPU0 PIROM, CPU1 PIROM
+};
+
+&i2c1 {
+       status = "okay";
+       //X24 Riser
+};
+
+&i2c2 {
+       status = "okay";
+       // Mezz Management SMBus
+};
+
+&i2c3 {
+       status = "okay";
+       // SMBus to Board ID EEPROM
+};
+
+&i2c4 {
+       status = "okay";
+       // BMC Debug Header
+};
+
+&i2c5 {
+       status = "okay";
+       // CPU Voltage regulators
+};
+
+&i2c6 {
+       status = "okay";
+       tpm@20 {
+               compatible = "infineon,slb9645tt";
+               reg = <0x20>;
+       };
+       tmp421@4e {
+               compatible = "ti,tmp421";
+               reg = <0x4e>;
+       };
+       tmp421@4f {
+               compatible = "ti,tmp421";
+               reg = <0x4f>;
+       };
+       eeprom@54 {
+               compatible = "atmel,24c64";
+               reg = <0x54>;
+               pagesize = <32>;
+       };
+};
+
+&i2c7 {
+       status = "okay";
+       //HSC, AirMax Conn A
+};
+
+&i2c8 {
+       status = "okay";
+       //Mezz Sensor SMBus
+};
+
+&i2c9 {
+       status = "okay";
+       //USB Debug Connector
+};
+
+&pwm_tacho {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default>;
+       fan@0 {
+               reg = <0x00>;
+               aspeed,fan-tach-ch = /bits/ 8 <0x00>;
+       };
+
+       fan@1 {
+               reg = <0x00>;
+               aspeed,fan-tach-ch = /bits/ 8 <0x01>;
+       };
+};
index 76aa6ea1f9883460f3a311addc6ba09b09a8fb6a..385c0f4b69ee40551d5370acd0eb0321cf754dbb 100644 (file)
@@ -7,6 +7,25 @@ / {
        model = "Quanta Q71L BMC";
        compatible = "quanta,q71l-bmc", "aspeed,ast2400";
 
+       aliases {
+               i2c14 = &i2c_pcie2;
+               i2c15 = &i2c_pcie3;
+               i2c16 = &i2c_pcie6;
+               i2c17 = &i2c_pcie7;
+               i2c18 = &i2c_pcie1;
+               i2c19 = &i2c_pcie4;
+               i2c20 = &i2c_pcie5;
+               i2c21 = &i2c_pcie8;
+               i2c22 = &i2c_pcie9;
+               i2c23 = &i2c_pcie10;
+               i2c24 = &i2c_ssd1;
+               i2c25 = &i2c_ssd2;
+               i2c26 = &i2c_psu4;
+               i2c27 = &i2c_psu1;
+               i2c28 = &i2c_psu3;
+               i2c29 = &i2c_psu2;
+       };
+
        chosen {
                stdout-path = &uart5;
                bootargs = "console=ttyS4,115200 earlyprintk";
@@ -93,6 +112,10 @@ &pinctrl {
                        &pinctrl_ddcclk_default &pinctrl_ddcdat_default>;
 };
 
+&ibt {
+       status = "okay";
+};
+
 &lpc_snoop {
        status = "okay";
        snoop-ports = <0x80>;
@@ -299,24 +322,44 @@ i2c_psu4: i2c@0 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0>;
+
+                       psu@59 {
+                               compatible = "pmbus";
+                               reg = <0x59>;
+                       };
                };
 
                i2c_psu1: i2c@1 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <1>;
+
+                       psu@58 {
+                               compatible = "pmbus";
+                               reg = <0x58>;
+                       };
                };
 
                i2c_psu3: i2c@2 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <2>;
+
+                       psu@58 {
+                               compatible = "pmbus";
+                               reg = <0x58>;
+                       };
                };
 
                i2c_psu2: i2c@3 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <3>;
+
+                       psu@59 {
+                               compatible = "pmbus";
+                               reg = <0x59>;
+                       };
                };
        };
 
@@ -345,6 +388,10 @@ &wdt2 {
        status = "okay";
 };
 
+&adc {
+       status = "okay";
+};
+
 &pwm_tacho {
        status = "okay";
 
index b23a983f95a5379f9224d3dd602a1e2ee0df094d..69f6b9d2e7e7de67ad887ff844bd6d315a87e7a6 100644 (file)
@@ -350,7 +350,7 @@ uart4: serial@1e78f000 {
                                status = "disabled";
                        };
 
-                       i2c: i2c@1e78a000 {
+                       i2c: bus@1e78a000 {
                                compatible = "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
index 87fdc146ff525af94c8db648f8f46b8c3c1084d4..d107459fc0f89417f7d7adde30d0155da86dc929 100644 (file)
@@ -410,7 +410,7 @@ uart4: serial@1e78f000 {
                                status = "disabled";
                        };
 
-                       i2c: i2c@1e78a000 {
+                       i2c: bus@1e78a000 {
                                compatible = "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
index bb86f17ed5ed1ba476056c434039ebf142f2bc6b..21876da7c44250c752c28983e894fa2f536352cc 100644 (file)
@@ -70,9 +70,9 @@ wm8904: wm8904@1a {
 &i2c1 {
        status = "okay";
 
-       eeprom@87 {
+       eeprom@57 {
                compatible = "giantec,gt24c32a", "atmel,24c32";
-               reg = <87>;
+               reg = <0x57>;
                pagesize = <32>;
        };
 };
index 4b9176dc5d029ff025f400b434e89868da7b1191..df0f0cc575c181006936cba2a78f03a61d3f5e9a 100644 (file)
@@ -59,9 +59,9 @@ pinctrl_lcd_ctp_int: lcd_ctp_int {
 &i2c1 {
        status = "okay";
 
-       ft5426@56 {
+       ft5426@38 {
                compatible = "focaltech,ft5426", "edt,edt-ft5406";
-               reg = <56>;
+               reg = <0x38>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_lcd_ctp_int>;
 
index af9f38456d04e7a41964f400504f799140c6c760..911d2c7c1500ff831bc98ae6f9730de4f2638ad1 100644 (file)
@@ -16,46 +16,6 @@ / {
        compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
                     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
 
-       ahb {
-               apb {
-                       pinctrl@fffff200 {
-                               nattis {
-                                       pinctrl_usba_vbus: usba_vbus {
-                                               atmel,pins =
-                                                       <AT91_PIOD 28
-                                                        AT91_PERIPH_GPIO
-                                                        AT91_PINCTRL_DEGLITCH>;
-                                       };
-
-                                       pinctrl_mmc0_cd: mmc0_cd {
-                                               atmel,pins =
-                                                       <AT91_PIOD 5
-                                                        AT91_PERIPH_GPIO
-                                                        AT91_PINCTRL_PULL_UP_DEGLITCH>;
-                                       };
-
-                                       pinctrl_lcd_prlud0: lcd_prlud0 {
-                                               atmel,pins =
-                                                       <AT91_PIOA 21
-                                                        AT91_PERIPH_GPIO
-                                                        AT91_PINCTRL_OUTPUT_VAL(0)>;
-                                       };
-
-                                       pinctrl_lcd_hipow0: lcd_hipow0 {
-                                               atmel,pins =
-                                                       <AT91_PIOA 23
-                                                        AT91_PERIPH_GPIO
-                                                        AT91_PINCTRL_OUTPUT_VAL(0)>;
-                                       };
-                               };
-                       };
-
-                       watchdog@fffffe40 {
-                               status = "okay";
-                       };
-               };
-       };
-
        gpio-keys {
                compatible = "gpio-keys";
 
@@ -103,10 +63,29 @@ panel_bl: backlight {
        };
 
        panel: panel {
-               compatible = "sharp,lq150x1lg11";
+               compatible = "sharp,lq150x1lg11", "panel-lvds";
+
                backlight = <&panel_bl>;
                power-supply = <&panel_reg>;
 
+               width-mm = <304>;
+               height-mm = <228>;
+
+               data-mapping = "jeida-18";
+
+               panel-timing {
+                       // 1024x768 @ 60Hz (typical)
+                       clock-frequency = <50000000 65000000 80000000>;
+                       hactive = <1024>;
+                       vactive = <768>;
+                       hfront-porch = <48 88 88>;
+                       hback-porch = <96 168 168>;
+                       hsync-len = <32 64 64>;
+                       vsync-len = <3 13 74>;
+                       vfront-porch = <3 13 74>;
+                       vback-porch = <3 12 74>;
+               };
+
                port {
                        panel_input: endpoint {
                                remote-endpoint = <&lvds_encoder_output>;
@@ -115,7 +94,10 @@ panel_input: endpoint {
        };
 
        lvds-encoder {
-               compatible = "lvds-encoder";
+               compatible = "ti,ds90c185", "lvds-encoder";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;
 
                ports {
                        #address-cells = <1>;
@@ -159,6 +141,36 @@ simple-audio-card,codec {
        };
 };
 
+&pinctrl {
+       nattis {
+               pinctrl_usba_vbus: usba_vbus {
+                       atmel,pins = <AT91_PIOD 28 AT91_PERIPH_GPIO
+                                     AT91_PINCTRL_DEGLITCH>;
+               };
+
+               pinctrl_mmc0_cd: mmc0_cd {
+                       atmel,pins = <AT91_PIOD  5 AT91_PERIPH_GPIO
+                                     AT91_PINCTRL_PULL_UP_DEGLITCH>;
+               };
+
+               pinctrl_lvds_prlud0: lvds_prlud0 {
+                       atmel,pins = <AT91_PIOA 21 AT91_PERIPH_GPIO
+                                     (AT91_PINCTRL_OUTPUT |
+                                      AT91_PINCTRL_OUTPUT_VAL(0))>;
+               };
+
+               pinctrl_lvds_hipow0: lvds_hipow0 {
+                       atmel,pins = <AT91_PIOA 23 AT91_PERIPH_GPIO
+                                     (AT91_PINCTRL_OUTPUT |
+                                      AT91_PINCTRL_OUTPUT_VAL(0))>;
+               };
+       };
+};
+
+&watchdog {
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 
@@ -195,14 +207,12 @@ &hlcdc {
 
        hlcdc-display-controller {
                pinctrl-names = "default";
-               pinctrl-0 = <&pinctrl_lcd_base
-                            &pinctrl_lcd_rgb565
-                            &pinctrl_lcd_prlud0
-                            &pinctrl_lcd_hipow0>;
+               pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;
 
                port@0 {
                        hlcdc_output: endpoint {
                                remote-endpoint = <&lvds_encoder_input>;
+                               bus-width = <16>;
                        };
                };
        };
@@ -219,6 +229,7 @@ slot@0 {
                reg = <0>;
                bus-width = <4>;
                cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
+               cd-inverted;
        };
 };
 
index e86e0c00eb6b19ed7ac104a76d2d65fe6811bda4..363a43d77424272529a39fff8346616281e7a0da 100644 (file)
@@ -283,6 +283,13 @@ i2c1: i2c@fc028000 {
                                status = "okay";
                        };
 
+                       adc: adc@fc030000 {
+                               vddana-supply = <&vddana>;
+                               vref-supply = <&advref>;
+
+                               status = "disabled";
+                       };
+
                        pinctrl@fc038000 {
 
                                pinctrl_can1_default: can1_default {
@@ -549,4 +556,39 @@ blue {
                        linux,default-trigger = "heartbeat";
                };
        };
+
+       vddin_3v3: fixed-regulator-vddin_3v3 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VDDIN_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               regulator-boot-on;
+               status = "okay";
+       };
+
+       vddana: fixed-regulator-vddana {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VDDANA";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vddin_3v3>;
+               status = "okay";
+       };
+
+       advref: fixed-regulator-advref {
+               compatible = "regulator-fixed";
+
+               regulator-name = "advref";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vddana>;
+               status = "okay";
+       };
 };
index fcc85d70f36ec6009c5c2ba0a59167f3479f278f..518e2b095ccfdadff77444b1c4baf621478d55fc 100644 (file)
@@ -281,6 +281,12 @@ watchdog@f8048040 {
                                status = "okay";
                        };
 
+                       i2s0: i2s@f8050000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2s0_default>;
+                               status = "disabled"; /* conflict with can0 */
+                       };
+
                        can0: can@f8054000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_can0_default>;
@@ -424,6 +430,24 @@ pinctrl_i2c1_default: i2c1_default {
                                        bias-disable;
                                };
 
+                               pinctrl_i2s0_default: i2s0_default {
+                                       pinmux = <PIN_PC1__I2SC0_CK>,
+                                                <PIN_PC2__I2SC0_MCK>,
+                                                <PIN_PC3__I2SC0_WS>,
+                                                <PIN_PC4__I2SC0_DI0>,
+                                                <PIN_PC5__I2SC0_DO0>;
+                                       bias-disable;
+                               };
+
+                               pinctrl_i2s1_default: i2s1_default {
+                                       pinmux = <PIN_PA15__I2SC1_CK>,
+                                                <PIN_PA14__I2SC1_MCK>,
+                                                <PIN_PA16__I2SC1_WS>,
+                                                <PIN_PA17__I2SC1_DI0>,
+                                                <PIN_PA18__I2SC1_DO0>;
+                                       bias-disable;
+                               };
+
                                pinctrl_key_gpio_default: key_gpio_default {
                                        pinmux = <PIN_PB9__GPIO>;
                                        bias-pull-up;
@@ -546,6 +570,12 @@ classd: classd@fc048000 {
                                status = "okay";
                        };
 
+                       i2s1: i2s@fc04c000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_i2s1_default>;
+                               status = "disabled"; /* conflict with spi0, sdmmc1 */
+                       };
+
                        can1: can@fc050000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_can1_default>;
index 2fbec69d9cd68f62ac1140e3e52a96a0fa3097ff..fe8876eaf917930d46709edf98463b77b5ce1aa4 100644 (file)
@@ -16,25 +16,6 @@ / {
        compatible = "axentia,tse850v3", "axentia,linea",
                     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
 
-       ahb {
-               apb {
-                       pinctrl@fffff200 {
-                               tse850 {
-                                       pinctrl_usba_vbus: usba-vbus {
-                                               atmel,pins =
-                                                       <AT91_PIOC 31
-                                                        AT91_PERIPH_GPIO
-                                                        AT91_PINCTRL_DEGLITCH>;
-                                       };
-                               };
-                       };
-
-                       watchdog@fffffe40 {
-                               status = "okay";
-                       };
-               };
-       };
-
        sck: oscillator {
                compatible = "fixed-clock";
 
@@ -253,6 +234,19 @@ eeprom@50 {
        };
 };
 
+&pinctrl {
+       tse850 {
+               pinctrl_usba_vbus: usba-vbus {
+                       atmel,pins = <AT91_PIOC 31 AT91_PERIPH_GPIO
+                                     AT91_PINCTRL_DEGLITCH>;
+               };
+       };
+};
+
+&watchdog {
+       status = "okay";
+};
+
 &usart0 {
        status = "okay";
 
index 1be9889a2b3a1eb7c40a7c74287910b4f4c616ed..430277291e025fb17c31cebf49173ffaadab55ea 100644 (file)
@@ -128,7 +128,7 @@ ethernet-phy@1 {
                        i2c2: i2c@f8024000 {
                                status = "okay";
 
-                               rtc1: rtc@64 {
+                               rtc1: rtc@32 {
                                        compatible = "epson,rx8900";
                                        reg = <0x32>;
                                };
index d2b865f6029322e296133e97e7df4aa3b5127c3c..07d1b571e6017b27a29b7acb7d5e72499baba1c4 100644 (file)
@@ -127,7 +127,7 @@ macb0: ethernet@fffc4000 {
 
                        spi0: spi@fffc8000 {
                                cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
-                               mtd_dataflash@0 {
+                               mtd_dataflash@1 {
                                        compatible = "atmel,at45", "atmel,dataflash";
                                        spi-max-frequency = <50000000>;
                                        reg = <1>;
index a29fc0494076244576166cc8bf40c123296fac9e..a57f2d435dcae8324c7001942098e55e0aabe267 100644 (file)
@@ -160,7 +160,7 @@ mtd_dataflash@0 {
                                        spi-max-frequency = <15000000>;
                                };
 
-                               tsc2046@0 {
+                               tsc2046@2 {
                                        reg = <2>;
                                        compatible = "ti,ads7843";
                                        interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;
index 71df3adfc7ca1b5684b39947588f6831de90111d..ec1f17ab6753b64211e0030b6725a0099d2c5590 100644 (file)
@@ -109,7 +109,7 @@ ssc0: ssc@fffbc000 {
 
                        spi0: spi@fffc8000 {
                                cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
-                               mtd_dataflash@0 {
+                               mtd_dataflash@1 {
                                        compatible = "atmel,at45", "atmel,dataflash";
                                        spi-max-frequency = <50000000>;
                                        reg = <1>;
index 1ee25a475be87ff452287d1adfda8e1644a71a27..d16db1fa7e15c69dba0060dfc647211e440f607d 100644 (file)
@@ -570,7 +570,7 @@ pinctrl_usart0_cts: usart0_cts-0 {
                                        };
                                };
 
-                               uart1 {
+                               usart1 {
                                        pinctrl_usart1: usart1-0 {
                                                atmel,pins =
                                                        <AT91_PIOB 4 AT91_PERIPH_A AT91_PINCTRL_NONE
index 3084a7c957339f0edc2fef97d203b08635c96790..e4d49731287f693ae94c39239b5d51bac1bfc46c 100644 (file)
@@ -216,7 +216,7 @@ rng: rng@33000 {
                        reg = <0x33000 0x14>;
                };
 
-               qspi: qspi@27200 {
+               qspi: spi@27200 {
                        compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
                        reg = <0x027200 0x184>,
                              <0x027000 0x124>,
index 09ba8504632284532e3b17c6d1531e2d732fadc4..2fd111d9d59c56e087fc1af317806a2d1f438435 100644 (file)
@@ -273,7 +273,7 @@ nand: nand@26000 {
                        brcm,nand-has-wp;
                };
 
-               qspi: qspi@27200 {
+               qspi: spi@27200 {
                        compatible = "brcm,spi-bcm-qspi", "brcm,spi-nsp-qspi";
                        reg = <0x027200 0x184>,
                              <0x027000 0x124>,
@@ -377,7 +377,36 @@ ccbtimer1: timer@35000 {
 
                srab: srab@36000 {
                        compatible = "brcm,nsp-srab";
-                       reg = <0x36000 0x1000>;
+                       reg = <0x36000 0x1000>,
+                             <0x3f308 0x8>,
+                             <0x3f410 0xc>;
+                       reg-names = "srab", "mux_config", "sgmii";
+                       interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "link_state_p0",
+                                         "link_state_p1",
+                                         "link_state_p2",
+                                         "link_state_p3",
+                                         "link_state_p4",
+                                         "link_state_p5",
+                                         "link_state_p7",
+                                         "link_state_p8",
+                                         "phy",
+                                         "ts",
+                                         "imp_sleep_timer_p5",
+                                         "imp_sleep_timer_p7",
+                                         "imp_sleep_timer_p8";
                        #address-cells = <1>;
                        #size-cells = <0>;
 
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 (file)
index 0000000..6c8233a
--- /dev/null
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2837-rpi-cm3.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+       compatible = "raspberrypi,3-compute-module", "brcm,bcm2837";
+       model = "Raspberry Pi Compute Module 3 IO board V3.0";
+};
+
+&gpio {
+       /*
+        * This is based on the official GPU firmware DT blob.
+        *
+        * Legend:
+        * "NC" = not connected (no rail from the SoC)
+        * "FOO" = GPIO line named "FOO" on the schematic
+        * "FOO_N" = GPIO line named "FOO" on schematic, active low
+        */
+       gpio-line-names = "GPIO0",
+                         "GPIO1",
+                         "GPIO2",
+                         "GPIO3",
+                         "GPIO4",
+                         "GPIO5",
+                         "GPIO6",
+                         "GPIO7",
+                         "GPIO8",
+                         "GPIO9",
+                         "GPIO10",
+                         "GPIO11",
+                         "GPIO12",
+                         "GPIO13",
+                         "GPIO14",
+                         "GPIO15",
+                         "GPIO16",
+                         "GPIO17",
+                         "GPIO18",
+                         "GPIO19",
+                         "GPIO20",
+                         "GPIO21",
+                         "GPIO22",
+                         "GPIO23",
+                         "GPIO24",
+                         "GPIO25",
+                         "GPIO26",
+                         "GPIO27",
+                         "GPIO28",
+                         "GPIO29",
+                         "GPIO30",
+                         "GPIO31",
+                         "GPIO32",
+                         "GPIO33",
+                         "GPIO34",
+                         "GPIO35",
+                         "GPIO36",
+                         "GPIO37",
+                         "GPIO38",
+                         "GPIO39",
+                         "GPIO40",
+                         "GPIO41",
+                         "GPIO42",
+                         "GPIO43",
+                         "GPIO44",
+                         "GPIO45",
+                         "GPIO46",
+                         "GPIO47",
+                         /* Used by eMMC */
+                         "SD_CLK_R",
+                         "SD_CMD_R",
+                         "SD_DATA0_R",
+                         "SD_DATA1_R",
+                         "SD_DATA2_R",
+                         "SD_DATA3_R";
+
+       pinctrl-0 = <&gpioout &alt0>;
+};
+
+&hdmi {
+       hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_gpio14>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
new file mode 100644 (file)
index 0000000..7b7ab6a
--- /dev/null
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2837.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+/ {
+       memory {
+               reg = <0 0x40000000>;
+       };
+
+       reg_3v3: fixed-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_1v8: fixed-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+       };
+};
+
+&firmware {
+       expgpio: gpio {
+               compatible = "raspberrypi,firmware-gpio";
+               gpio-controller;
+               #gpio-cells = <2>;
+               gpio-line-names = "HDMI_HPD_N",
+                                 "EMMC_EN_N",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC",
+                                 "NC";
+               status = "okay";
+       };
+};
+
+&sdhost {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdhost_gpio48>;
+       bus-width = <4>;
+       vmmc-supply = <&reg_3v3>;
+       vqmmc-supply = <&reg_1v8>;
+       status = "okay";
+};
index 9403da0990d07b8f021096ff01b86d660aa36efb..70bece63f9a741d5f4cc4f501905bcab46b8b9c1 100644 (file)
@@ -1,4 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
+#include <dt-bindings/net/microchip-lan78xx.h>
+
 / {
        aliases {
                ethernet0 = &ethernet;
@@ -21,6 +23,18 @@ usb-port@1 {
                        ethernet: ethernet@1 {
                                compatible = "usb424,7800";
                                reg = <1>;
+
+                               mdio {
+                                       #address-cells = <0x1>;
+                                       #size-cells = <0x0>;
+                                       eth_phy: ethernet-phy@1 {
+                                               reg = <1>;
+                                               microchip,led-modes = <
+                                                       LAN78XX_LINK_1000_ACTIVITY
+                                                       LAN78XX_LINK_10_100_ACTIVITY
+                                               >;
+                                       };
+                               };
                        };
                };
        };
index 5f663f848db1fabb66c0fd8eb376f9601481296a..189cc3dcd6ef869065ea3dc9b633d92d062c6efd 100644 (file)
@@ -94,6 +94,34 @@ restart {
 
 &spi_nor {
        status = "okay";
+
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x000000 0x040000>;
+                       read-only;
+               };
+
+               os-image@100000 {
+                       label = "os-image";
+                       reg = <0x040000 0x200000>;
+                       compatible = "brcm,trx";
+               };
+
+               rootfs@240000 {
+                       label = "rootfs";
+                       reg = <0x240000 0xc00000>;
+               };
+
+               nvram@ff0000 {
+                       label = "nvram";
+                       reg = <0xff0000 0x010000>;
+               };
+       };
 };
 
 &usb2 {
index 2033411240c78ce9ffdf0c70d36a7b9b3dbfb703..4cb10f88a95eafc1e51c501d4591704a4256a971 100644 (file)
@@ -66,3 +66,34 @@ restart {
 &usb3_phy {
        status = "okay";
 };
+
+&nandcs {
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x00000000 0x00080000>;
+                       read-only;
+               };
+
+               nvram@80000 {
+                       label = "nvram";
+                       reg = <0x00080000 0x00180000>;
+               };
+
+               firmware@200000 {
+                       label = "firmware";
+                       reg = <0x00200000 0x07cc0000>;
+                       compatible = "brcm,trx";
+               };
+
+               asus@7ec0000 {
+                       label = "asus";
+                       reg = <0x07ec0000 0x00140000>;
+                       read-only;
+               };
+       };
+};
index c7143a9daa1a961c1c013ec688c5c15c9dd4d127..b527d2ff987ed36b4564245974375b84b9617f06 100644 (file)
@@ -103,6 +103,34 @@ &usb3 {
 
 &spi_nor {
        status = "okay";
+
+       partitions {
+               compatible = "fixed-partitions";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               boot@0 {
+                       label = "boot";
+                       reg = <0x000000 0x040000>;
+                       read-only;
+               };
+
+               os-image@100000 {
+                       label = "os-image";
+                       reg = <0x040000 0x200000>;
+                       compatible = "brcm,trx";
+               };
+
+               rootfs@240000 {
+                       label = "rootfs";
+                       reg = <0x240000 0xc00000>;
+               };
+
+               nvram@ff0000 {
+                       label = "nvram";
+                       reg = <0xff0000 0x010000>;
+               };
+       };
 };
 
 &usb3_phy {
index e5a2d62daf9267c990c9a79bc9ae466568f1bd9a..925a7c9ce5b7f42bdd21525b566bd3bc5c7aa240 100644 (file)
@@ -12,6 +12,10 @@ nandcs: nandcs@0 {
                        reg = <0>;
                        #address-cells = <1>;
                        #size-cells = <1>;
+
+                       partitions {
+                               compatible = "brcm,bcm947xx-cfe-partitions";
+                       };
                };
        };
 };
index bc607d11eef8e958f654ced7c22e7a409a5fbdff..7a5c188c2676a140aeb542750b25463b0c2d71b3 100644 (file)
@@ -475,8 +475,11 @@ spi_nor: spi-nor@0 {
                        compatible = "jedec,spi-nor";
                        reg = <0>;
                        spi-max-frequency = <20000000>;
-                       linux,part-probe = "ofpart", "bcm47xxpart";
                        status = "disabled";
+
+                       partitions {
+                               compatible = "brcm,bcm947xx-cfe-partitions";
+                       };
                };
        };
 
index ea3fc194f8f37ea4bea411922372eac32e82852e..a53a2f629d74198a5c3f4e5d27f0ba5954c0950a 100644 (file)
@@ -58,6 +58,24 @@ gpio-restart {
                open-source;
                priority = <200>;
        };
+
+       /* Hardware I2C block cannot do more than 63 bytes per transfer,
+        * which would prevent reading from a SFP's EEPROM (256 byte).
+        */
+       i2c1: i2c {
+               compatible = "i2c-gpio";
+               sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+               scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+       };
+
+       sfp: sfp {
+               compatible = "sff,sfp";
+               i2c-bus = <&i2c1>;
+               mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
+               los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>;
+               tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>;
+               tx-disable-gpios = <&gpioa 26 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &amac0 {
@@ -210,6 +228,14 @@ port@4 {
                        reg = <4>;
                };
 
+               port@5 {
+                       label = "sfp";
+                       phy-mode = "sgmii";
+                       reg = <5>;
+                       sfp = <&sfp>;
+                       managed = "in-band-status";
+               };
+
                port@8 {
                        ethernet = <&amac2>;
                        label = "cpu";
index 620b50c19ead93b65ef43794ec3f50d732a0a2db..7c22cbf6f3d41f1d2e1e82538f23899de60be426 100644 (file)
@@ -69,6 +69,8 @@ s2mps14_pmic@66 {
                compatible = "samsung,s2mps14-pmic";
                interrupt-parent = <&gpx3>;
                interrupts = <5 IRQ_TYPE_NONE>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&s2mps14_irq>;
                reg = <0x66>;
 
                s2mps14_osc: clocks {
@@ -350,6 +352,11 @@ wlanen: wlanen {
                samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>;
                samsung,pin-val = <1>;
        };
+
+       s2mps14_irq: s2mps14-irq {
+               samsung,pins = "gpx3-5";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
 };
 
 &rtc {
index 2ab99f9f3d0ac2769bf1c504f3926707f59cc012..dd9ec05eb0f795437999b505253f82d1d375b479 100644 (file)
@@ -151,6 +151,8 @@ max8997_pmic@66 {
                reg = <0x66>;
                interrupt-parent = <&gpx0>;
                interrupts = <4 IRQ_TYPE_NONE>, <3 IRQ_TYPE_NONE>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&max8997_irq>;
 
                max8997,pmic-buck1-dvs-voltage = <1350000>;
                max8997,pmic-buck2-dvs-voltage = <1100000>;
@@ -288,6 +290,13 @@ buck7_reg: BUCK7 {
        };
 };
 
+&pinctrl_1 {
+       max8997_irq: max8997-irq {
+               samsung,pins = "gpx0-3", "gpx0-4";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+};
+
 &sdhci_0 {
        bus-width = <4>;
        pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_cd>;
index 6f1d76cb795157b9947a52e538a1aba8c1595ea7..f9bbc6315cd956699a1691d909e0a48ae117c0fa 100644 (file)
@@ -385,6 +385,12 @@ camsensor_reg: LDO16 {
                             regulator-max-microvolt = <1800000>;
                        };
 
+                       tflash_reg: LDO17 {
+                            regulator-name = "VTF_2.8V";
+                            regulator-min-microvolt = <2800000>;
+                            regulator-max-microvolt = <2800000>;
+                       };
+
                        vddq_reg: LDO21 {
                             regulator-name = "VDDQ_M1M2_1.2V";
                             regulator-min-microvolt = <1200000>;
@@ -452,6 +458,15 @@ &sdhci_0 {
        status = "okay";
 };
 
+&sdhci_2 {
+       bus-width = <4>;
+       pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
+       pinctrl-names = "default";
+       vmmc-supply = <&tflash_reg>;
+       cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
 &serial_0 {
        status = "okay";
 };
index 4e6ff97e1ec41840aed2c4705ee1041c1c50aed1..5c3d98654f137bf793cf51c135b2bc41c34a9ae4 100644 (file)
@@ -310,6 +310,9 @@ vdd_arm_reg: pmic@60 {
 
        pmic@66 {
                compatible = "national,lp3974";
+               interrupts-extended = <&gpx0 7 0>, <&gpx2 7 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&lp3974_irq>;
                reg = <0x66>;
 
                max8998,pmic-buck1-default-dvs-idx = <0>;
@@ -503,6 +506,11 @@ port@0 {
 };
 
 &pinctrl_1 {
+       lp3974_irq: lp3974-irq {
+               samsung,pins = "gpx0-7", "gpx2-7";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+
        hdmi_hpd: hdmi-hpd {
                samsung,pins = "gpx3-7";
                samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
@@ -537,8 +545,7 @@ &sdhci_2 {
        pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
        pinctrl-names = "default";
        vmmc-supply = <&ldo5_reg>;
-       cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index c0476c290977439a0274e7ef3ddfbe795c21099f..aed2f2e2b0d1ba9c56fa8784933f997f30ab4400 100644 (file)
@@ -1269,8 +1269,7 @@ &rtc {
 
 &sdhci_2 {
        bus-width = <4>;
-       cd-gpios = <&gpx3 4 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
        pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4 &sdhci2_cd>;
        pinctrl-names = "default";
        vmmc-supply = <&ldo21_reg>;
index a09e46c9dbc04cbedfc626604339d9f4343f242c..2caa3132f34e0644b7faaf6c589084c0b5ff7641 100644 (file)
@@ -539,8 +539,7 @@ &sdhci_2 {
        pinctrl-names = "default";
        vmmc-supply = <&ldo21_reg>;
        vqmmc-supply = <&ldo4_reg>;
-       cd-gpios = <&gpk2 2 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpk2 2 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 
index 7a8a5c55701a894359c748562d156c9c52109ff5..7d1f2dc59038d69693697593a2fd3ee649978362 100644 (file)
@@ -71,6 +71,17 @@ wakeup {
                };
        };
 
+       panel: panel {
+               compatible = "boe,hv070wsa-100";
+               power-supply = <&vcc_3v3_reg>;
+               enable-gpios = <&gpd1 3 GPIO_ACTIVE_HIGH>;
+               port {
+                       panel_ep: endpoint {
+                               remote-endpoint = <&bridge_out_ep>;
+                       };
+               };
+       };
+
        regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
@@ -97,6 +108,30 @@ reg_hdmi_en: regulator@2 {
                        reg = <2>;
                        regulator-name = "hdmi-en";
                };
+
+               vcc_1v2_reg: regulator@3 {
+                       compatible = "regulator-fixed";
+                       reg = <3>;
+                       regulator-name = "VCC_1V2";
+                       regulator-min-microvolt = <1200000>;
+                       regulator-max-microvolt = <1200000>;
+               };
+
+               vcc_1v8_reg: regulator@4 {
+                       compatible = "regulator-fixed";
+                       reg = <4>;
+                       regulator-name = "VCC_1V8";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               vcc_3v3_reg: regulator@5 {
+                       compatible = "regulator-fixed";
+                       reg = <5>;
+                       regulator-name = "VCC_3V3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
        };
 
        fixed-rate-clocks {
@@ -119,6 +154,32 @@ &cpu0 {
        cpu0-supply = <&buck2_reg>;
 };
 
+&dsi_0 {
+       vddcore-supply = <&ldo8_reg>;
+       vddio-supply = <&ldo10_reg>;
+       samsung,pll-clock-frequency = <24000000>;
+       samsung,burst-clock-frequency = <320000000>;
+       samsung,esc-clock-frequency = <10000000>;
+       status = "okay";
+
+       bridge@0 {
+               reg = <0>;
+               compatible = "toshiba,tc358764";
+               vddc-supply = <&vcc_1v2_reg>;
+               vddio-supply = <&vcc_1v8_reg>;
+               vddlvds-supply = <&vcc_3v3_reg>;
+               reset-gpios = <&gpd1 6 GPIO_ACTIVE_LOW>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               port@1 {
+                       reg = <1>;
+                       bridge_out_ep: endpoint {
+                               remote-endpoint = <&panel_ep>;
+                       };
+               };
+       };
+};
+
 &dp {
        status = "okay";
        samsung,color-space = <0>;
@@ -149,9 +210,11 @@ &fimd {
 };
 
 &hdmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hdmi_hpd>;
        status = "okay";
-       ddc = <&i2c_2>;
-       hpd-gpios = <&gpx3 7 GPIO_ACTIVE_LOW>;
+       ddc = <&i2c_ddc>;
+       hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
        vdd_osc-supply = <&ldo10_reg>;
        vdd_pll-supply = <&ldo8_reg>;
        vdd-supply = <&ldo8_reg>;
@@ -168,6 +231,8 @@ s5m8767_pmic@66 {
                reg = <0x66>;
                interrupt-parent = <&gpx3>;
                interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&s5m8767_irq>;
 
                vinb1-supply = <&main_dc_reg>;
                vinb2-supply = <&main_dc_reg>;
@@ -452,13 +517,6 @@ buck9_reg: BUCK9 {
        };
 };
 
-&i2c_2 {
-       status = "okay";
-       /* used by HDMI DDC */
-       samsung,i2c-sda-delay = <100>;
-       samsung,i2c-max-bus-freq = <66000>;
-};
-
 &i2c_3 {
        status = "okay";
 
@@ -535,6 +593,13 @@ &mmc_2 {
        cap-sd-highspeed;
 };
 
+&pinctrl_0 {
+       s5m8767_irq: s5m8767-irq {
+               samsung,pins = "gpx3-2";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
+};
+
 &rtc {
        status = "okay";
 };
@@ -547,3 +612,22 @@ &sata_phy {
        status = "okay";
        samsung,exynos-sataphy-i2c-phandle = <&sata_phy_i2c>;
 };
+
+&soc {
+       /*
+        * For unknown reasons HDMI-DDC does not work with Exynos I2C
+        * controllers. Lets use software I2C over GPIO pins as a workaround.
+        */
+       i2c_ddc: i2c-gpio {
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_gpio_bus>;
+               status = "okay";
+               compatible = "i2c-gpio";
+               gpios = <&gpa0 6 0 /* sda */
+                        &gpa0 7 0 /* scl */
+                       >;
+               i2c-gpio,delay-us = <2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+};
index 6ff6dea29d4490f13bdf457b1ee7ecfb96929cfa..d31a68672bfacb3a2f6575c26790db05b5498d6c 100644 (file)
@@ -225,6 +225,12 @@ i2c2_hs_bus: i2c2-hs-bus {
                samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
        };
 
+       i2c2_gpio_bus: i2c2-gpio-bus {
+               samsung,pins = "gpa0-6", "gpa0-7";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+               samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+       };
+
        uart2_data: uart2-data {
                samsung,pins = "gpa1-0", "gpa1-1";
                samsung,pin-function = <EXYNOS_PIN_FUNC_2>;
@@ -593,6 +599,11 @@ hdmi_cec: hdmi-cec {
                samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
                samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
        };
+
+       hdmi_hpd: hdmi-hpd {
+               samsung,pins = "gpx3-7";
+               samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+       };
 };
 
 &pinctrl_1 {
index 0348b1c49a691d373792d2433cf26463803c7b70..7cbfc6f1f4b8fde1c52d9ad3203cfe4504c2aa42 100644 (file)
@@ -20,6 +20,14 @@ sound {
 
                samsung,model = "Snow-I2S-MAX98090";
                samsung,audio-codec = <&max98090>;
+
+               cpu {
+                       sound-dai = <&i2s0 0>;
+               };
+
+               codec {
+                       sound-dai = <&max98090 0>, <&hdmi>;
+               };
        };
 };
 
@@ -31,6 +39,9 @@ max98090: codec@10 {
                interrupt-parent = <&gpx0>;
                pinctrl-names = "default";
                pinctrl-0 = <&max98090_irq>;
+               clocks = <&pmu_system_controller 0>;
+               clock-names = "mclk";
+               #sound-dai-cells = <1>;
        };
 };
 
index da163a40af1598c5f2755d588ccf0a5598b578fe..5044f754e6e59afc40fe70d141ce548f07b7ccd2 100644 (file)
@@ -54,62 +54,109 @@ cpu0: cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a15";
                        reg = <0>;
-                       clock-frequency = <1700000000>;
                        clocks = <&clock CLK_ARM_CLK>;
                        clock-names = "cpu";
-                       clock-latency = <140000>;
-
-                       operating-points = <
-                               1700000 1300000
-                               1600000 1250000
-                               1500000 1225000
-                               1400000 1200000
-                               1300000 1150000
-                               1200000 1125000
-                               1100000 1100000
-                               1000000 1075000
-                                900000 1050000
-                                800000 1025000
-                                700000 1012500
-                                600000 1000000
-                                500000  975000
-                                400000  950000
-                                300000  937500
-                                200000  925000
-                       >;
+                       operating-points-v2 = <&cpu0_opp_table>;
                        #cooling-cells = <2>; /* min followed by max */
                };
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a15";
                        reg = <1>;
-                       clock-frequency = <1700000000>;
                        clocks = <&clock CLK_ARM_CLK>;
                        clock-names = "cpu";
-                       clock-latency = <140000>;
-
-                       operating-points = <
-                               1700000 1300000
-                               1600000 1250000
-                               1500000 1225000
-                               1400000 1200000
-                               1300000 1150000
-                               1200000 1125000
-                               1100000 1100000
-                               1000000 1075000
-                                900000 1050000
-                                800000 1025000
-                                700000 1012500
-                                600000 1000000
-                                500000  975000
-                                400000  950000
-                                300000  937500
-                                200000  925000
-                       >;
+                       operating-points-v2 = <&cpu0_opp_table>;
                        #cooling-cells = <2>; /* min followed by max */
                };
        };
 
+       cpu0_opp_table: opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp-200000000 {
+                       opp-hz = /bits/ 64 <200000000>;
+                       opp-microvolt = <925000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-300000000 {
+                       opp-hz = /bits/ 64 <300000000>;
+                       opp-microvolt = <937500>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-400000000 {
+                       opp-hz = /bits/ 64 <400000000>;
+                       opp-microvolt = <950000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-500000000 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <975000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-microvolt = <1000000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-700000000 {
+                       opp-hz = /bits/ 64 <700000000>;
+                       opp-microvolt = <1012500>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-800000000 {
+                       opp-hz = /bits/ 64 <800000000>;
+                       opp-microvolt = <1025000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-900000000 {
+                       opp-hz = /bits/ 64 <900000000>;
+                       opp-microvolt = <1050000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1000000000 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <1075000>;
+                       clock-latency-ns = <140000>;
+                       opp-suspend;
+               };
+               opp-1100000000 {
+                       opp-hz = /bits/ 64 <1100000000>;
+                       opp-microvolt = <1100000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <1125000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1300000000 {
+                       opp-hz = /bits/ 64 <1300000000>;
+                       opp-microvolt = <1150000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1400000000 {
+                       opp-hz = /bits/ 64 <1400000000>;
+                       opp-microvolt = <1200000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1500000000 {
+                       opp-hz = /bits/ 64 <1500000000>;
+                       opp-microvolt = <1225000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1600000000 {
+                       opp-hz = /bits/ 64 <1600000000>;
+                       opp-microvolt = <1250000>;
+                       clock-latency-ns = <140000>;
+               };
+               opp-1700000000 {
+                       opp-hz = /bits/ 64 <1700000000>;
+                       opp-microvolt = <1300000>;
+                       clock-latency-ns = <140000>;
+               };
+       };
+
        soc: soc {
                sysram@2020000 {
                        compatible = "mmio-sram";
@@ -756,6 +803,27 @@ dp_phy: video-phy {
                        #phy-cells = <0>;
                };
 
+               mipi_phy: video-phy@10040710 {
+                       compatible = "samsung,s5pv210-mipi-video-phy";
+                       reg = <0x10040710 0x100>;
+                       #phy-cells = <1>;
+                       syscon = <&pmu_system_controller>;
+               };
+
+               dsi_0: dsi@14500000 {
+                       compatible = "samsung,exynos4210-mipi-dsi";
+                       reg = <0x14500000 0x10000>;
+                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                       samsung,power-domain = <&pd_disp1>;
+                       phys = <&mipi_phy 3>;
+                       phy-names = "dsim";
+                       clocks = <&clock CLK_DSIM0>, <&clock CLK_SCLK_MIPI1>;
+                       clock-names = "bus_clk", "sclk_mipi";
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                adc: adc@12d10000 {
                        compatible = "samsung,exynos-adc-v1";
                        reg = <0x12D10000 0x100>;
index 57c2332bf28247b354592c0dbe839fa5a8ed6560..f78db6809cca4b3659e1eb8fe490b581afabf4c5 100644 (file)
@@ -153,7 +153,7 @@ &adc {
 
 &clock_audss {
        assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
-       assigned-clock-parents = <&clock CLK_FOUT_EPLL>;
+       assigned-clock-parents = <&clock CLK_MAU_EPLL>;
 };
 
 &cpu0 {
@@ -312,6 +312,7 @@ buck7_reg: BUCK7 {
                                regulator-name = "vdd_1v35";
                                regulator-min-microvolt = <1350000>;
                                regulator-max-microvolt = <1350000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
@@ -333,6 +334,7 @@ buck9_reg: BUCK9 {
                                regulator-name = "vdd_2v";
                                regulator-min-microvolt = <2000000>;
                                regulator-max-microvolt = <2000000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
@@ -343,6 +345,7 @@ buck10_reg: BUCK10 {
                                regulator-name = "vdd_1v8";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
index 2f4f40882daba05c1436091f332f80f7f65d8244..2fac4baf1eb49a82411d5b5a4d962a811bad31fa 100644 (file)
@@ -154,6 +154,13 @@ ldo1_reg: LDO1 {
                                regulator-always-on;
                        };
 
+                       ldo2_reg: LDO2 {
+                               regulator-name = "vdd_ldo2";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
                        ldo3_reg: LDO3 {
                                regulator-name = "vddq_mmc0";
                                regulator-min-microvolt = <1800000>;
@@ -216,10 +223,10 @@ ldo11_reg: LDO11 {
                        };
 
                        ldo12_reg: LDO12 {
+                               /* Unused */
                                regulator-name = "vdd_ldo12";
-                               regulator-min-microvolt = <1800000>;
-                               regulator-max-microvolt = <1800000>;
-                               regulator-always-on;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <2375000>;
                        };
 
                        ldo13_reg: LDO13 {
@@ -228,6 +235,13 @@ ldo13_reg: LDO13 {
                                regulator-max-microvolt = <2800000>;
                        };
 
+                       ldo14_reg: LDO14 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo14";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
                        ldo15_reg: LDO15 {
                                regulator-name = "vdd_ldo15";
                                regulator-min-microvolt = <3300000>;
@@ -236,10 +250,10 @@ ldo15_reg: LDO15 {
                        };
 
                        ldo16_reg: LDO16 {
+                               /* Unused */
                                regulator-name = "vdd_ldo16";
-                               regulator-min-microvolt = <2200000>;
-                               regulator-max-microvolt = <2200000>;
-                               regulator-always-on;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
                        };
 
                        ldo17_reg: LDO17 {
@@ -261,20 +275,139 @@ ldo19_reg: LDO19 {
                                regulator-max-microvolt = <2800000>;
                        };
 
-                       ldo24_reg: LDO24 {
-                               regulator-name = "tsp_io";
-                               regulator-min-microvolt = <2800000>;
-                               regulator-max-microvolt = <2800000>;
+                       ldo20_reg: LDO20 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo20";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo21_reg: LDO21 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo21";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo22_reg: LDO22 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo22";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <2375000>;
+                       };
+
+                       ldo23_reg: LDO23 {
+                               regulator-name = "vdd_mifs";
+                               regulator-min-microvolt = <1100000>;
+                               regulator-max-microvolt = <1100000>;
                                regulator-always-on;
                        };
 
+                       ldo24_reg: LDO24 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo24";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo25_reg: LDO25 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo25";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
                        ldo26_reg: LDO26 {
+                               /* Used on XU3, XU3-Lite and XU4 */
                                regulator-name = "vdd_ldo26";
-                               regulator-min-microvolt = <3000000>;
-                               regulator-max-microvolt = <3000000>;
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo27_reg: LDO27 {
+                               regulator-name = "vdd_g3ds";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
                                regulator-always-on;
                        };
 
+                       ldo28_reg: LDO28 {
+                               /* Used on XU3 */
+                               regulator-name = "vdd_ldo28";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo29_reg: LDO29 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo29";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo30_reg: LDO30 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo30";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo31_reg: LDO31 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo31";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo32_reg: LDO32 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo32";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo33_reg: LDO33 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo33";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo34_reg: LDO34 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo34";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo35_reg: LDO35 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo35";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <2375000>;
+                       };
+
+                       ldo36_reg: LDO36 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo36";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo37_reg: LDO37 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo37";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
+                       ldo38_reg: LDO38 {
+                               /* Unused */
+                               regulator-name = "vdd_ldo38";
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3950000>;
+                       };
+
                        buck1_reg: BUCK1 {
                                regulator-name = "vdd_mif";
                                regulator-min-microvolt = <800000>;
index 96e281c0a118ad0d84fd25707640060a5dddb6c5..e522edb2bb82d9a235ab59635a68d6cf15ae173a 100644 (file)
@@ -367,6 +367,12 @@ &i2c_2 {
        status = "okay";
 };
 
+&ldo26_reg {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-always-on;
+};
+
 &mixer {
        status = "okay";
 };
index 0322f281912cb5c9949d7676d004029bd64cf894..db0bc17a667bdf6432e51dbf742501153449a01f 100644 (file)
@@ -49,6 +49,12 @@ ina231@45 {
        };
 };
 
+&ldo28_reg {
+       regulator-name = "dp_p3v3";
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+};
+
 &pwm {
        /*
         * PWM 0 -- fan
index d80ab9085da19330b877643345e24cb50439d89c..e0f470fe54c81da83728a1e9b7611dd2d0d3ad28 100644 (file)
@@ -153,7 +153,7 @@ &adc {
 
 &clock_audss {
        assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>;
-       assigned-clock-parents = <&clock CLK_FOUT_EPLL>;
+       assigned-clock-parents = <&clock CLK_MAU_EPLL>;
 };
 
 &cpu0 {
@@ -312,6 +312,7 @@ buck7_reg: BUCK7 {
                                regulator-name = "vdd_1v35";
                                regulator-min-microvolt = <1350000>;
                                regulator-max-microvolt = <1350000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
@@ -333,6 +334,7 @@ buck9_reg: BUCK9 {
                                regulator-name = "vdd_2v";
                                regulator-min-microvolt = <2000000>;
                                regulator-max-microvolt = <2000000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
@@ -343,6 +345,7 @@ buck10_reg: BUCK10 {
                                regulator-name = "vdd_1v8";
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-state-mem {
                                        regulator-on-in-suspend;
index 44044f2751151c6a244036de3d665da9da4bd32f..0f917b272ff36976ee1881abb1514f1b0d7d8e65 100644 (file)
@@ -277,10 +277,11 @@ etb@0,e3c42000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               port {
-                       etb0_in_port: endpoint@0 {
-                               slave-mode;
-                               remote-endpoint = <&replicator0_out_port0>;
+               in-ports {
+                       port {
+                               etb0_in_port: endpoint@0 {
+                                       remote-endpoint = <&replicator0_out_port0>;
+                               };
                        };
                };
        };
@@ -291,10 +292,11 @@ etb@0,e3c82000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               port {
-                       etb1_in_port: endpoint@0 {
-                               slave-mode;
-                               remote-endpoint = <&replicator1_out_port0>;
+               in-ports {
+                       port {
+                               etb1_in_port: endpoint@0 {
+                                       remote-endpoint = <&replicator1_out_port0>;
+                               };
                        };
                };
        };
@@ -305,10 +307,11 @@ etb@0,e3cc2000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               port {
-                       etb2_in_port: endpoint@0 {
-                               slave-mode;
-                               remote-endpoint = <&replicator2_out_port0>;
+               in-ports {
+                       port {
+                               etb2_in_port: endpoint@0 {
+                                       remote-endpoint = <&replicator2_out_port0>;
+                               };
                        };
                };
        };
@@ -319,10 +322,11 @@ etb@0,e3d02000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               port {
-                       etb3_in_port: endpoint@0 {
-                               slave-mode;
-                               remote-endpoint = <&replicator3_out_port0>;
+               in-ports {
+                       port {
+                               etb3_in_port: endpoint@0 {
+                                       remote-endpoint = <&replicator3_out_port0>;
+                               };
                        };
                };
        };
@@ -333,10 +337,11 @@ tpiu@0,e3c05000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               port {
-                       tpiu_in_port: endpoint@0 {
-                               slave-mode;
-                               remote-endpoint = <&funnel4_out_port0>;
+               in-ports {
+                       port {
+                               tpiu_in_port: endpoint@0 {
+                                       remote-endpoint = <&funnel4_out_port0>;
+                               };
                        };
                };
        };
@@ -347,7 +352,7 @@ replicator0 {
                 */
                compatible = "arm,coresight-replicator";
 
-               ports {
+               out-ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
 
@@ -365,12 +370,11 @@ replicator0_out_port1: endpoint {
                                        remote-endpoint = <&funnel4_in_port0>;
                                };
                        };
+               };
 
-                       /* replicator input port */
-                       port@2 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                replicator0_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&funnel0_out_port0>;
                                };
                        };
@@ -383,7 +387,7 @@ replicator1 {
                 */
                compatible = "arm,coresight-replicator";
 
-               ports {
+               out-ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
 
@@ -401,12 +405,11 @@ replicator1_out_port1: endpoint {
                                        remote-endpoint = <&funnel4_in_port1>;
                                };
                        };
+               };
 
-                       /* replicator input port */
-                       port@2 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                replicator1_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&funnel1_out_port0>;
                                };
                        };
@@ -419,11 +422,10 @@ replicator2 {
                 */
                compatible = "arm,coresight-replicator";
 
-               ports {
+               out-ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       /* replicator output ports */
                        port@0 {
                                reg = <0>;
                                replicator2_out_port0: endpoint {
@@ -437,12 +439,11 @@ replicator2_out_port1: endpoint {
                                        remote-endpoint = <&funnel4_in_port2>;
                                };
                        };
+               };
 
-                       /* replicator input port */
-                       port@2 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                replicator2_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&funnel2_out_port0>;
                                };
                        };
@@ -455,11 +456,10 @@ replicator3 {
                 */
                compatible = "arm,coresight-replicator";
 
-               ports {
+               out-ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
 
-                       /* replicator output ports */
                        port@0 {
                                reg = <0>;
                                replicator3_out_port0: endpoint {
@@ -473,12 +473,11 @@ replicator3_out_port1: endpoint {
                                        remote-endpoint = <&funnel4_in_port3>;
                                };
                        };
+               };
 
-                       /* replicator input port */
-                       port@2 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                replicator3_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&funnel3_out_port0>;
                                };
                        };
@@ -491,48 +490,43 @@ funnel@0,e3c41000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* funnel output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                funnel0_out_port0: endpoint {
                                        remote-endpoint =
                                                <&replicator0_in_port0>;
                                };
                        };
+               };
 
-                       /* funnel input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                funnel0_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm0_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                funnel0_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm1_out_port>;
                                };
                        };
 
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                funnel0_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm2_out_port>;
                                };
                        };
 
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                funnel0_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm3_out_port>;
                                };
                        };
@@ -545,48 +539,43 @@ funnel@0,e3c81000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* funnel output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                funnel1_out_port0: endpoint {
                                        remote-endpoint =
                                                <&replicator1_in_port0>;
                                };
                        };
+               };
 
-                       /* funnel input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                funnel1_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm4_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                funnel1_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm5_out_port>;
                                };
                        };
 
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                funnel1_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm6_out_port>;
                                };
                        };
 
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                funnel1_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm7_out_port>;
                                };
                        };
@@ -599,48 +588,43 @@ funnel@0,e3cc1000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* funnel output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                funnel2_out_port0: endpoint {
                                        remote-endpoint =
                                                <&replicator2_in_port0>;
                                };
                        };
+               };
 
-                       /* funnel input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                funnel2_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm8_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                funnel2_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm9_out_port>;
                                };
                        };
 
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                funnel2_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm10_out_port>;
                                };
                        };
 
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                funnel2_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm11_out_port>;
                                };
                        };
@@ -653,48 +637,43 @@ funnel@0,e3d01000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* funnel output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                funnel3_out_port0: endpoint {
                                        remote-endpoint =
                                                <&replicator3_in_port0>;
                                };
                        };
+               };
 
-                       /* funnel input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                funnel3_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm12_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                funnel3_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm13_out_port>;
                                };
                        };
 
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                funnel3_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm14_out_port>;
                                };
                        };
 
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                funnel3_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&ptm15_out_port>;
                                };
                        };
@@ -707,50 +686,45 @@ funnel@0,e3c04000 {
 
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* funnel output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                funnel4_out_port0: endpoint {
                                        remote-endpoint = <&tpiu_in_port>;
                                };
                        };
+               };
 
-                       /* funnel input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                funnel4_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint =
                                                <&replicator0_out_port1>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                funnel4_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint =
                                                <&replicator1_out_port1>;
                                };
                        };
 
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                funnel4_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint =
                                                <&replicator2_out_port1>;
                                };
                        };
 
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                funnel4_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint =
                                                <&replicator3_out_port1>;
                                };
@@ -765,9 +739,11 @@ ptm@0,e3c7c000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU0>;
-               port {
-                       ptm0_out_port: endpoint {
-                               remote-endpoint = <&funnel0_in_port0>;
+               out-ports {
+                       port {
+                               ptm0_out_port: endpoint {
+                                       remote-endpoint = <&funnel0_in_port0>;
+                               };
                        };
                };
        };
@@ -779,9 +755,11 @@ ptm@0,e3c7d000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU1>;
-               port {
-                       ptm1_out_port: endpoint {
-                               remote-endpoint = <&funnel0_in_port1>;
+               out-ports {
+                       port {
+                               ptm1_out_port: endpoint {
+                                       remote-endpoint = <&funnel0_in_port1>;
+                               };
                        };
                };
        };
@@ -793,9 +771,11 @@ ptm@0,e3c7e000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU2>;
-               port {
-                       ptm2_out_port: endpoint {
-                               remote-endpoint = <&funnel0_in_port2>;
+               out-ports {
+                       port {
+                               ptm2_out_port: endpoint {
+                                       remote-endpoint = <&funnel0_in_port2>;
+                               };
                        };
                };
        };
@@ -807,9 +787,11 @@ ptm@0,e3c7f000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU3>;
-               port {
-                       ptm3_out_port: endpoint {
-                               remote-endpoint = <&funnel0_in_port3>;
+               out-ports {
+                       port {
+                               ptm3_out_port: endpoint {
+                                       remote-endpoint = <&funnel0_in_port3>;
+                               };
                        };
                };
        };
@@ -821,9 +803,11 @@ ptm@0,e3cbc000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU4>;
-               port {
-                       ptm4_out_port: endpoint {
-                               remote-endpoint = <&funnel1_in_port0>;
+               out-ports {
+                       port {
+                               ptm4_out_port: endpoint {
+                                       remote-endpoint = <&funnel1_in_port0>;
+                               };
                        };
                };
        };
@@ -835,9 +819,11 @@ ptm@0,e3cbd000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU5>;
-               port {
-                       ptm5_out_port: endpoint {
-                               remote-endpoint = <&funnel1_in_port1>;
+               out-ports {
+                       port {
+                               ptm5_out_port: endpoint {
+                                       remote-endpoint = <&funnel1_in_port1>;
+                               };
                        };
                };
        };
@@ -849,9 +835,11 @@ ptm@0,e3cbe000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU6>;
-               port {
-                       ptm6_out_port: endpoint {
-                               remote-endpoint = <&funnel1_in_port2>;
+               out-ports {
+                       port {
+                               ptm6_out_port: endpoint {
+                                       remote-endpoint = <&funnel1_in_port2>;
+                               };
                        };
                };
        };
@@ -863,9 +851,11 @@ ptm@0,e3cbf000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU7>;
-               port {
-                       ptm7_out_port: endpoint {
-                               remote-endpoint = <&funnel1_in_port3>;
+               out-ports {
+                       port {
+                               ptm7_out_port: endpoint {
+                                       remote-endpoint = <&funnel1_in_port3>;
+                               };
                        };
                };
        };
@@ -877,9 +867,11 @@ ptm@0,e3cfc000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU8>;
-               port {
-                       ptm8_out_port: endpoint {
-                               remote-endpoint = <&funnel2_in_port0>;
+               out-ports {
+                       port {
+                               ptm8_out_port: endpoint {
+                                       remote-endpoint = <&funnel2_in_port0>;
+                               };
                        };
                };
        };
@@ -890,9 +882,11 @@ ptm@0,e3cfd000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU9>;
-               port {
-                       ptm9_out_port: endpoint {
-                               remote-endpoint = <&funnel2_in_port1>;
+               out-ports {
+                       port {
+                               ptm9_out_port: endpoint {
+                                       remote-endpoint = <&funnel2_in_port1>;
+                               };
                        };
                };
        };
@@ -904,9 +898,11 @@ ptm@0,e3cfe000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU10>;
-               port {
-                       ptm10_out_port: endpoint {
-                               remote-endpoint = <&funnel2_in_port2>;
+               out-ports {
+                       port {
+                               ptm10_out_port: endpoint {
+                                       remote-endpoint = <&funnel2_in_port2>;
+                               };
                        };
                };
        };
@@ -918,9 +914,11 @@ ptm@0,e3cff000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU11>;
-               port {
-                       ptm11_out_port: endpoint {
-                               remote-endpoint = <&funnel2_in_port3>;
+               out-ports {
+                       port {
+                               ptm11_out_port: endpoint {
+                                       remote-endpoint = <&funnel2_in_port3>;
+                               };
                        };
                };
        };
@@ -932,9 +930,11 @@ ptm@0,e3d3c000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU12>;
-               port {
-                       ptm12_out_port: endpoint {
-                               remote-endpoint = <&funnel3_in_port0>;
+               out-ports {
+                       port {
+                               ptm12_out_port: endpoint {
+                                       remote-endpoint = <&funnel3_in_port0>;
+                               };
                        };
                };
        };
@@ -946,9 +946,11 @@ ptm@0,e3d3d000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU13>;
-               port {
-                       ptm13_out_port: endpoint {
-                               remote-endpoint = <&funnel3_in_port1>;
+               out-ports {
+                       port {
+                               ptm13_out_port: endpoint {
+                                       remote-endpoint = <&funnel3_in_port1>;
+                               };
                        };
                };
        };
@@ -960,9 +962,11 @@ ptm@0,e3d3e000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU14>;
-               port {
-                       ptm14_out_port: endpoint {
-                               remote-endpoint = <&funnel3_in_port2>;
+               out-ports {
+                       port {
+                               ptm14_out_port: endpoint {
+                                       remote-endpoint = <&funnel3_in_port2>;
+                               };
                        };
                };
        };
@@ -974,9 +978,11 @@ ptm@0,e3d3f000 {
                clocks = <&clk_375m>;
                clock-names = "apb_pclk";
                cpu = <&CPU15>;
-               port {
-                       ptm15_out_port: endpoint {
-                               remote-endpoint = <&funnel3_in_port3>;
+               out-ports {
+                       port {
+                               ptm15_out_port: endpoint {
+                                       remote-endpoint = <&funnel3_in_port3>;
+                               };
                        };
                };
        };
index 9fb47724b9c1fa2dee8a6f1695fba9a68d30e80f..ad2ae25b7b4dbeb5fb714dee5af9182166d51457 100644 (file)
@@ -13,6 +13,43 @@ memory@40000000 {
                reg = <0x40000000 0x08000000>;
        };
 
+       reg_vddio_sd0: regulator-vddio-sd0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vddio-sd0";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio1 29 0>;
+       };
+
+       reg_lcd_3v3: regulator-lcd-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio1 18 0>;
+               enable-active-high;
+       };
+
+       reg_lcd_5v: regulator-lcd-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-5v";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       panel {
+               compatible = "sii,43wvf1g";
+               backlight = <&backlight_display>;
+               dvdd-supply = <&reg_lcd_3v3>;
+               avdd-supply = <&reg_lcd_5v>;
+
+               port {
+                       panel_in: endpoint {
+                               remote-endpoint = <&display_out>;
+                       };
+               };
+       };
+
        apb@80000000 {
                apbh@80000000 {
                        gpmi-nand@8000c000 {
@@ -52,31 +89,11 @@ MX23_PAD_SSP1_DETECT__SSP1_DETECT
                        lcdif@80030000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&lcdif_24bit_pins_a>;
-                               lcd-supply = <&reg_lcd_3v3>;
-                               display = <&display0>;
                                status = "okay";
 
-                               display0: display0 {
-                                       bits-per-pixel = <32>;
-                                       bus-width = <24>;
-
-                                       display-timings {
-                                               native-mode = <&timing0>;
-                                               timing0: timing0 {
-                                                       clock-frequency = <9200000>;
-                                                       hactive = <480>;
-                                                       vactive = <272>;
-                                                       hback-porch = <15>;
-                                                       hfront-porch = <8>;
-                                                       vback-porch = <12>;
-                                                       vfront-porch = <4>;
-                                                       hsync-len = <1>;
-                                                       vsync-len = <1>;
-                                                       hsync-active = <0>;
-                                                       vsync-active = <0>;
-                                                       de-active = <1>;
-                                                       pixelclk-active = <0>;
-                                               };
+                               port {
+                                       display_out: endpoint {
+                                               remote-endpoint = <&panel_in>;
                                        };
                                };
                        };
@@ -118,32 +135,7 @@ usb0: usb@80080000 {
                };
        };
 
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               reg_vddio_sd0: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "vddio-sd0";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio1 29 0>;
-               };
-
-               reg_lcd_3v3: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "lcd-3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio1 18 0>;
-                       enable-active-high;
-               };
-       };
-
-       backlight {
+       backlight_display: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm 2 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
index 6b0ae667640f1c29c61390fccc9f3c3844e4d6e2..93ab5bdfe068a11a75276ebeaa4d31a99e473e67 100644 (file)
@@ -13,6 +13,87 @@ memory@40000000 {
                reg = <0x40000000 0x08000000>;
        };
 
+
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_vddio_sd0: regulator-vddio-sd0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vddio-sd0";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio3 28 0>;
+       };
+
+       reg_fec_3v3: regulator-fec-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "fec-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 15 0>;
+       };
+
+       reg_usb0_vbus: regulator-usb0-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb0_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio3 9 0>;
+               enable-active-high;
+       };
+
+       reg_usb1_vbus: regulator-usb1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb1_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio3 8 0>;
+               enable-active-high;
+       };
+
+       reg_lcd_3v3: regulator-lcd-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio3 30 0>;
+               enable-active-high;
+       };
+
+       reg_can_3v3: regulator-can-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "can-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio2 13 0>;
+               enable-active-high;
+       };
+
+       reg_lcd_5v: regulator-lcd-5v {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-5v";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       panel {
+               compatible = "sii,43wvf1g";
+               backlight = <&backlight_display>;
+               dvdd-supply = <&reg_lcd_3v3>;
+               avdd-supply = <&reg_lcd_5v>;
+
+               port {
+                       panel_in: endpoint {
+                               remote-endpoint = <&display_out>;
+                       };
+               };
+       };
+
        apb@80000000 {
                apbh@80000000 {
                        gpmi-nand@8000c000 {
@@ -116,31 +197,11 @@ lcdif@80030000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&lcdif_24bit_pins_a
                                             &lcdif_pins_evk>;
-                               lcd-supply = <&reg_lcd_3v3>;
-                               display = <&display0>;
                                status = "okay";
 
-                               display0: display0 {
-                                       bits-per-pixel = <32>;
-                                       bus-width = <24>;
-
-                                       display-timings {
-                                               native-mode = <&timing0>;
-                                               timing0: timing0 {
-                                                       clock-frequency = <33500000>;
-                                                       hactive = <800>;
-                                                       vactive = <480>;
-                                                       hback-porch = <89>;
-                                                       hfront-porch = <164>;
-                                                       vback-porch = <23>;
-                                                       vfront-porch = <10>;
-                                                       hsync-len = <10>;
-                                                       vsync-len = <10>;
-                                                       hsync-active = <0>;
-                                                       vsync-active = <0>;
-                                                       de-active = <1>;
-                                                       pixelclk-active = <0>;
-                                               };
+                               port {
+                                       display_out: endpoint {
+                                               remote-endpoint = <&panel_in>;
                                        };
                                };
                        };
@@ -269,80 +330,6 @@ mac1: ethernet@800f4000 {
                };
        };
 
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               reg_3p3v: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "3P3V";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-always-on;
-               };
-
-               reg_vddio_sd0: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "vddio-sd0";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio3 28 0>;
-               };
-
-               reg_fec_3v3: regulator@2 {
-                       compatible = "regulator-fixed";
-                       reg = <2>;
-                       regulator-name = "fec-3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio2 15 0>;
-               };
-
-               reg_usb0_vbus: regulator@3 {
-                       compatible = "regulator-fixed";
-                       reg = <3>;
-                       regulator-name = "usb0_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio3 9 0>;
-                       enable-active-high;
-               };
-
-               reg_usb1_vbus: regulator@4 {
-                       compatible = "regulator-fixed";
-                       reg = <4>;
-                       regulator-name = "usb1_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio3 8 0>;
-                       enable-active-high;
-               };
-
-               reg_lcd_3v3: regulator@5 {
-                       compatible = "regulator-fixed";
-                       reg = <5>;
-                       regulator-name = "lcd-3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio3 30 0>;
-                       enable-active-high;
-               };
-
-               reg_can_3v3: regulator@6 {
-                       compatible = "regulator-fixed";
-                       reg = <6>;
-                       regulator-name = "can-3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       gpio = <&gpio2 13 0>;
-                       enable-active-high;
-               };
-
-       };
-
        sound {
                compatible = "fsl,imx28-evk-sgtl5000",
                             "fsl,mxs-audio-sgtl5000";
@@ -363,7 +350,7 @@ user {
                };
        };
 
-       backlight {
+       backlight_display: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm 2 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
index 7cbc2ffa4b3a80affe055aecf6f744f4a61a9d00..7234e8330a576d8a53e7658d394e50211bbe2450 100644 (file)
@@ -126,10 +126,14 @@ pcie: pcie@33800000 {
                interrupt-names = "msi";
                #interrupt-cells = <1>;
                interrupt-map-mask = <0 0 0 0x7>;
-               interrupt-map = <0 0 0 1 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 2 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 3 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
-                               <0 0 0 4 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
+               /*
+                * Reference manual lists pci irqs incorrectly
+                * Real hardware ordering is same as imx6: D+MSI, C, B, A
+                */
+               interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+                               <0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>,
                         <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>,
                         <&clks IMX7D_PCIE_PHY_ROOT_CLK>;
index 5cae74eb6cddfb41c9d53317c24d389321af0750..ca9154dd8052b43de8ed9e945b6896260c1db1f9 100644 (file)
@@ -160,10 +160,6 @@ &pcie_bus_clk {
        clock-frequency = <100000000>;
 };
 
-&pciec {
-       status = "okay";
-};
-
 &pfc {
        can0_pins: can0 {
                groups = "can0_data_d";
index abff7ef7c9cd6a571a5966ff75f473215c737233..b7303a4e4236f35f370153645989fabb0366d0a6 100644 (file)
@@ -179,7 +179,7 @@ apb {
                         * ssp0 and spi1 are shared pins;
                         * enable one in your board dts, as needed.
                         */
-                       ssp0: ssp@20084000 {
+                       ssp0: spi@20084000 {
                                compatible = "arm,pl022", "arm,primecell";
                                reg = <0x20084000 0x1000>;
                                interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
@@ -199,7 +199,7 @@ spi1: spi@20088000 {
                         * ssp1 and spi2 are shared pins;
                         * enable one in your board dts, as needed.
                         */
-                       ssp1: ssp@2008c000 {
+                       ssp1: spi@2008c000 {
                                compatible = "arm,pl022", "arm,primecell";
                                reg = <0x2008c000 0x1000>;
                                interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
index d77dcf890cfc82b5c05c88149694f8687e14072c..7162e0ca05b0a5d477fd1369f127e8bef67e8413 100644 (file)
@@ -194,7 +194,7 @@ clkc: clock-controller@4000 {
                #clock-cells = <1>;
                #reset-cells = <1>;
                compatible = "amlogic,meson8-clkc";
-               reg = <0x8000 0x4>, <0x4000 0x460>;
+               reg = <0x8000 0x4>, <0x4000 0x400>;
        };
 
        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 (file)
index 0000000..0872f6e
--- /dev/null
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "meson8b.dtsi"
+
+/ {
+       model = "Endless Computers Endless Mini";
+       compatible = "endless,ec100", "amlogic,meson8b";
+
+       aliases {
+               serial0 = &uart_AO;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x40000000 0x40000000>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <100>;
+
+               pal-switch {
+                       label = "pal";
+                       linux,input-type = <EV_SW>;
+                       linux,code = <KEY_SWITCHVIDEOMODE>;
+                       gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
+               };
+
+               ntsc-switch {
+                       label = "ntsc";
+                       linux,input-type = <EV_SW>;
+                       linux,code = <KEY_SWITCHVIDEOMODE>;
+                       gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>;
+               };
+
+               power-button {
+                       label = "power";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpio GPIOH_9 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio-poweroff {
+               compatible = "gpio-poweroff";
+               /*
+                * shutdown is managed by the EC (embedded micro-controller)
+                * which is configured through GPIOAO_2 (poweroff GPIO) and
+                * GPIOAO_7 (power LED, which has to go LOW as well).
+                */
+               gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
+               timeout-ms = <20000>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               power {
+                       label = "ec100:red:power";
+                       /*
+                        * Needs to go LOW (together with the poweroff GPIO)
+                        * during shutdown to allow the EC (embedded
+                        * micro-controller) to shutdown the system. Setting
+                        * the output to LOW signals the EC to start a
+                        * "breathing"/pulsing effect until the power is fully
+                        * turned off.
+                        */
+                       gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       usb_vbus: regulator-usb-vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_VBUS";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vcc_5v: regulator-vcc5v {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VCC5V";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpio = <&gpio GPIODV_29 GPIO_ACTIVE_LOW>;
+
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vcck: regulator-vcck {
+               compatible = "pwm-regulator";
+
+               regulator-name = "VCCK";
+               regulator-min-microvolt = <860000>;
+               regulator-max-microvolt = <1140000>;
+
+               pwms = <&pwm_cd 0 1148 0>;
+               pwm-dutycycle-range = <100 0>;
+
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vcc_1v8: regulator-vcc1v8 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+       };
+
+       vcc_3v3: regulator-vcc3v3 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&vcck>;
+};
+
+&ethmac {
+       status = "okay";
+
+       pinctrl-0 = <&eth_rmii_pins>;
+       pinctrl-names = "default";
+
+       phy-handle = <&eth_phy0>;
+       phy-mode = "rmii";
+
+       snps,reset-gpio = <&gpio GPIOH_4 0>;
+       snps,reset-delays-us = <0 10000 1000000>;
+       snps,reset-active-low;
+
+       mdio {
+               compatible = "snps,dwmac-mdio";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               eth_phy0: ethernet-phy@0 {
+                       /* IC Plus IP101A/G (0x02430c54) */
+                       reg = <0>;
+               };
+       };
+};
+
+&i2c_A {
+       status = "okay";
+       pinctrl-0 = <&i2c_a_pins>;
+       pinctrl-names = "default";
+
+       rt5640: codec@1c {
+               compatible = "realtek,rt5640";
+               reg = <0x1c>;
+               interrupt-parent = <&gpio_intc>;
+               interrupts = <13 IRQ_TYPE_EDGE_BOTH>; /* GPIOAO_13 */
+               realtek,in1-differential;
+       };
+};
+
+&saradc {
+       status = "okay";
+       vref-supply = <&vcc_1v8>;
+};
+
+&sdio {
+       status = "okay";
+
+       pinctrl-0 = <&sd_b_pins>;
+       pinctrl-names = "default";
+
+       /* SD card */
+       sd_card_slot: slot@1 {
+               compatible = "mmc-slot";
+               reg = <1>;
+               status = "okay";
+
+               bus-width = <4>;
+               no-sdio;
+               cap-mmc-highspeed;
+               cap-sd-highspeed;
+               disable-wp;
+
+               cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+               cd-inverted;
+
+               vmmc-supply = <&vcc_3v3>;
+       };
+};
+
+&pwm_cd {
+       status = "okay";
+       pinctrl-0 = <&pwm_c1_pins>;
+       pinctrl-names = "default";
+       clocks = <&clkc CLKID_XTAL>;
+       clock-names = "clkin0";
+};
+
+/* exposed through the pin headers labeled "URDUG1" on the top of the PCB */
+&uart_AO {
+       status = "okay";
+       pinctrl-0 = <&uart_ao_a_pins>;
+       pinctrl-names = "default";
+};
+
+/*
+ * connected to the Bluetooth part of the RTL8723BS SDIO wifi / Bluetooth
+ * combo chip. This is only available on the variant with 2GB RAM.
+ */
+&uart_B {
+       status = "okay";
+       pinctrl-0 = <&uart_b0_pins>, <&uart_b0_cts_rts_pins>;
+       pinctrl-names = "default";
+       uart-has-rtscts;
+};
+
+&usb1 {
+       status = "okay";
+       vbus-supply = <&usb_vbus>;
+};
+
+&usb1_phy {
+       status = "okay";
+};
index ef3177d3da3dc85d5cb2d2d786a59d368c4189cd..58669abda2594d4979086695db3af0aee095983b 100644 (file)
@@ -57,6 +57,10 @@ aliases {
                mmc0 = &sd_card_slot;
        };
 
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
        memory {
                reg = <0x40000000 0x40000000>;
        };
@@ -71,6 +75,14 @@ blue {
                };
        };
 
+       p5v0: regulator-p5v0 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "P5V0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
        tflash_vdd: regulator-tflash_vdd {
                /*
                 * signal name from schematics: TFLASH_VDD_EN
@@ -81,6 +93,8 @@ tflash_vdd: regulator-tflash_vdd {
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
 
+               vin-supply = <&vcc_3v3>;
+
                gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
                enable-active-high;
        };
@@ -92,6 +106,8 @@ tf_io: gpio-regulator-tf_io {
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <3300000>;
 
+               vin-supply = <&vcc_3v3>;
+
                /*
                 * signal name from schematics: TF_3V3N_1V8_EN
                 */
@@ -101,6 +117,86 @@ tf_io: gpio-regulator-tf_io {
                states = <3300000 0
                          1800000 1>;
        };
+
+       vcc_1v8: regulator-vcc-1v8 {
+               /*
+                * RICHTEK RT9179 configured for a fixed output voltage of
+                * 1.8V. This supplies not only VCC1V8 but also IOREF_1V8 and
+                * VDD1V8 according to the schematics.
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "VCC1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+
+               vin-supply = <&p5v0>;
+       };
+
+       vcc_3v3: regulator-vcc-3v3 {
+               /*
+                * Monolithic Power Systems MP2161 configured for a fixed
+                * output voltage of 3.3V. This supplies not only VCC3V3 but
+                * also VDD3V3 and VDDIO_AO3V3 according to the schematics.
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "VCC3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               vin-supply = <&p5v0>;
+       };
+
+       vcck: regulator-vcck {
+               /* Monolithic Power Systems MP2161 */
+               compatible = "pwm-regulator";
+
+               regulator-name = "VCCK";
+               regulator-min-microvolt = <860000>;
+               regulator-max-microvolt = <1140000>;
+
+               vin-supply = <&p5v0>;
+
+               pwms = <&pwm_cd 0 12218 0>;
+               pwm-dutycycle-range = <91 0>;
+
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vddc_ddr: regulator-vddc-ddr {
+               /*
+                * Monolithic Power Systems MP2161 configured for a fixed
+                * output voltage of 1.5V. This supplies not only DDR_VDDC but
+                * also DDR3_1V5 according to the schematics.
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "DDR_VDDC";
+               regulator-min-microvolt = <1500000>;
+               regulator-max-microvolt = <1500000>;
+
+               vin-supply = <&p5v0>;
+       };
+
+       vdd_rtc: regulator-vdd-rtc {
+               /*
+                * Torex Semiconductor XC6215 configured for a fixed output of
+                * 0.9V.
+                */
+               compatible = "regulator-fixed";
+
+               regulator-name = "VDD_RTC";
+               regulator-min-microvolt = <900000>;
+               regulator-max-microvolt = <900000>;
+
+               vin-supply = <&vcc_3v3>;
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&vcck>;
 };
 
 &ethmac {
@@ -154,6 +250,11 @@ &ir_receiver {
        pinctrl-names = "default";
 };
 
+&saradc {
+       status = "okay";
+       vref-supply = <&vcc_1v8>;
+};
+
 &sdio {
        status = "okay";
 
@@ -180,6 +281,14 @@ sd_card_slot: slot@1 {
        };
 };
 
+&pwm_cd {
+       status = "okay";
+       pinctrl-0 = <&pwm_c1_pins>;
+       pinctrl-names = "default";
+       clocks = <&clkc CLKID_XTAL>;
+       clock-names = "clkin0";
+};
+
 &uart_AO {
        status = "okay";
        pinctrl-0 = <&uart_ao_a_pins>;
index 08f7f6be7254e5e54e0f9bd5ff6790fbfa108dea..cd1ca9dda126bb8467107e715f9ff6402f4a181e 100644 (file)
@@ -163,7 +163,7 @@ clkc: clock-controller@4000 {
                #clock-cells = <1>;
                #reset-cells = <1>;
                compatible = "amlogic,meson8b-clkc";
-               reg = <0x8000 0x4>, <0x4000 0x460>;
+               reg = <0x8000 0x4>, <0x4000 0x400>;
        };
 
        reset: reset-controller@4404 {
@@ -223,6 +223,28 @@ mux {
                        };
                };
 
+               eth_rmii_pins: eth-rmii {
+                       mux {
+                               groups = "eth_tx_en",
+                                        "eth_txd1_0",
+                                        "eth_txd0_0",
+                                        "eth_rx_clk",
+                                        "eth_rx_dv",
+                                        "eth_rxd1",
+                                        "eth_rxd0",
+                                        "eth_mdio_en",
+                                        "eth_mdc";
+                               function = "ethernet";
+                       };
+               };
+
+               i2c_a_pins: i2c-a {
+                       mux {
+                               groups = "i2c_sda_a", "i2c_sck_a";
+                               function = "i2c_a";
+                       };
+               };
+
                sd_b_pins: sd-b {
                        mux {
                                groups = "sd_d0_b", "sd_d1_b", "sd_d2_b",
@@ -230,6 +252,29 @@ mux {
                                function = "sd_b";
                        };
                };
+
+               pwm_c1_pins: pwm-c1 {
+                       mux {
+                               groups = "pwm_c1";
+                               function = "pwm_c";
+                       };
+               };
+
+               uart_b0_pins: uart-b0 {
+                       mux {
+                               groups = "uart_tx_b0",
+                                      "uart_rx_b0";
+                               function = "uart_b";
+                       };
+               };
+
+               uart_b0_cts_rts_pins: uart-b0-cts-rts {
+                       mux {
+                               groups = "uart_cts_b0",
+                                      "uart_rts_b0";
+                               function = "uart_b";
+                       };
+               };
        };
 };
 
index 12d6822f00576f720c9c2086e061de4cb09fc299..04758a2a87f031eb42df555cc85a85bd0bf63816 100644 (file)
@@ -354,7 +354,7 @@ &mmc1 {
 &mmc2 {
        vmmc-supply = <&vsdio>;
        bus-width = <8>;
-       non-removable;
+       ti,non-removable;
 };
 
 &mmc3 {
@@ -621,15 +621,6 @@ OMAP4_IOPAD(0x10a, PIN_INPUT | MUX_MODE1)  /* abe_mcbsp3_clkx */
                OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1)       /* abe_mcbsp3_fsx */
                >;
        };
-};
-
-&omap4_pmx_wkup {
-       usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
-               /* gpio_wk0 */
-               pinctrl-single,pins = <
-               OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
-               >;
-       };
 
        vibrator_direction_pin: pinmux_vibrator_direction_pin {
                pinctrl-single,pins = <
@@ -644,6 +635,15 @@ OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1) /* dmtimer9_pwm_evt (gpio_28) */
        };
 };
 
+&omap4_pmx_wkup {
+       usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins {
+               /* gpio_wk0 */
+               pinctrl-single,pins = <
+               OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
+               >;
+       };
+};
+
 /*
  * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for
  * uart1 wakeirq.
index 95d59be97213e0392505c4e7afd67d2f99e5e4a6..8494b578717090a6401090ce3c59b25f17f7dab1 100644 (file)
@@ -80,6 +80,10 @@ pwm1: pwm@40b00010 {
                        #pwm-cells = <1>;
                        clocks = <&clks CLK_PWM1>;
                };
+
+               rtc@40900000 {
+                       clocks = <&clks CLK_OSC32k768>;
+               };
        };
 
        timer@40a00000 {
index 747f750f675d96dd351d8ad5a02213dae10fb6bf..3228ad5fb725f0aa507e56b54f55383b32f22a4b 100644 (file)
@@ -71,7 +71,7 @@ pwm3: pwm@40c00010 {
                        clocks = <&clks CLK_PWM1>;
                };
 
-               pwri2c: i2c@40f000180 {
+               pwri2c: i2c@40f00180 {
                        compatible = "mrvl,pxa-i2c";
                        reg = <0x40f00180 0x24>;
                        interrupts = <6>;
@@ -113,6 +113,10 @@ &pdma 69 0 /* U channel */
 
                        status = "disabled";
                };
+
+               rtc@40900000 {
+                       clocks = <&clks CLK_OSC32k768>;
+               };
        };
 
        clocks {
index a520b4c14ea9f5023b11672c17cb438f256f9067..080d5c5169b5aed17eceef5406442025d3843256 100644 (file)
@@ -9,6 +9,25 @@
 #include "skeleton.dtsi"
 #include "dt-bindings/clock/pxa-clock.h"
 
+#define PMGROUP(pin) #pin
+#define PMMUX(func, pin, af)                   \
+       mux- ## func {                          \
+               groups = PMGROUP(P ## pin);     \
+               function = #af;                 \
+       }
+#define PMMUX_LPM_LOW(func, pin, af)           \
+       mux- ## func {                          \
+               groups = PMGROUP(P ## pin);     \
+               function = #af;                 \
+               low-power-disable;              \
+       }
+#define PMMUX_LPM_HIGH(func, pin, af)          \
+       mux- ## func {                          \
+               groups = PMGROUP(P ## pin);     \
+               function = #af;                 \
+               low-power-enable;               \
+       }
+
 / {
        model = "Marvell PXA2xx family SoC";
        compatible = "marvell,pxa2xx";
@@ -76,7 +95,7 @@ gcb3: gpio@40e0000c {
                        };
                };
 
-               ffuart: uart@40100000 {
+               ffuart: serial@40100000 {
                        compatible = "mrvl,pxa-uart";
                        reg = <0x40100000 0x30>;
                        interrupts = <22>;
@@ -84,7 +103,7 @@ ffuart: uart@40100000 {
                        status = "disabled";
                };
 
-               btuart: uart@40200000 {
+               btuart: serial@40200000 {
                        compatible = "mrvl,pxa-uart";
                        reg = <0x40200000 0x30>;
                        interrupts = <21>;
@@ -92,7 +111,7 @@ btuart: uart@40200000 {
                        status = "disabled";
                };
 
-               stuart: uart@40700000 {
+               stuart: serial@40700000 {
                        compatible = "mrvl,pxa-uart";
                        reg = <0x40700000 0x30>;
                        interrupts = <20>;
@@ -100,7 +119,7 @@ stuart: uart@40700000 {
                        status = "disabled";
                };
 
-               hwuart: uart@41100000 {
+               hwuart: serial@41100000 {
                        compatible = "mrvl,pxa-uart";
                        reg = <0x41100000 0x30>;
                        interrupts = <7>;
index 327545119ee3f04d82ca3412a148e2f8ffd1e602..0d006aea99da1b40692e3aacc9d12816a92e2aac 100644 (file)
@@ -14,3 +14,7 @@ / {
        model = "iW-RainboW-G20D-Q7 RZ/G1M based plus camera daughter board";
        compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743";
 };
+
+&pciec {
+       status = "okay";
+};
index b683db4da8b17784d17c9d2e69e73cbd8bf43ad4..498e223a5f93b05928e34db4eeb9796e8846b9c7 100644 (file)
@@ -13,3 +13,7 @@ / {
        model = "iWave Systems RainboW-G20D-Qseven board based on RZ/G1M";
        compatible = "iwave,g20d", "iwave,g20m", "renesas,r8a7743";
 };
+
+&pciec {
+       status = "okay";
+};
index e3585daafdd644a189a7098624558d2bccfdc422..22da819f186be395daae3c4ca1c97a590fa21fff 100644 (file)
@@ -35,6 +35,8 @@ &avb {
 
        phy3: ethernet-phy@3 {
                reg = <3>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
                micrel,led-mode = <1>;
        };
 };
@@ -43,6 +45,16 @@ &extal_clk {
        clock-frequency = <20000000>;
 };
 
+&pfc {
+       scif1_pins: scif1 {
+               groups = "scif1_data_b";
+               function = "scif1";
+       };
+};
+
 &scif1 {
+       pinctrl-0 = <&scif1_pins>;
+       pinctrl-names = "default";
+
        status = "okay";
 };
index 87d32d3e23de2c177efccb146845e98aefd7f217..9ec78d3d0ca8bf6bff454a57952ba92dfd68c140 100644 (file)
@@ -8,6 +8,7 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/r8a77470-cpg-mssr.h>
+#include <dt-bindings/power/r8a77470-sysc.h>
 / {
        compatible = "renesas,r8a77470";
        #address-cells = <2>;
@@ -16,6 +17,7 @@ / {
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
+               enable-method = "renesas,apmu";
 
                cpu0: cpu@0 {
                        device_type = "cpu";
@@ -23,16 +25,25 @@ cpu0: cpu@0 {
                        reg = <0>;
                        clock-frequency = <1000000000>;
                        clocks = <&cpg CPG_CORE R8A77470_CLK_Z2>;
-                       power-domains = <&sysc 5>;
+                       power-domains = <&sysc R8A77470_PD_CA7_CPU0>;
                        next-level-cache = <&L2_CA7>;
                };
 
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <1>;
+                       clock-frequency = <1000000000>;
+                       clocks = <&cpg CPG_CORE R8A77470_CLK_Z2>;
+                       power-domains = <&sysc R8A77470_PD_CA7_CPU1>;
+                       next-level-cache = <&L2_CA7>;
+               };
 
                L2_CA7: cache-controller-0 {
                        compatible = "cache";
                        cache-unified;
                        cache-level = <2>;
-                       power-domains = <&sysc 21>;
+                       power-domains = <&sysc R8A77470_PD_CA7_SCU>;
                };
        };
 
@@ -60,6 +71,102 @@ soc {
                #size-cells = <2>;
                ranges;
 
+               gpio0: gpio@e6050000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6050000 0 0x50>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 0 23>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 912>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 912>;
+               };
+
+               gpio1: gpio@e6051000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6051000 0 0x50>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 32 23>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 911>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 911>;
+               };
+
+               gpio2: gpio@e6052000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6052000 0 0x50>;
+                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 64 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 910>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 910>;
+               };
+
+               gpio3: gpio@e6053000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6053000 0 0x50>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 96 30>;
+                       gpio-reserved-ranges = <17 10>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 909>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 909>;
+               };
+
+               gpio4: gpio@e6054000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6054000 0 0x50>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 128 26>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 908>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 908>;
+               };
+
+               gpio5: gpio@e6055000 {
+                       compatible = "renesas,gpio-r8a77470",
+                                    "renesas,rcar-gen2-gpio";
+                       reg = <0 0xe6055000 0 0x50>;
+                       interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 160 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 907>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 907>;
+               };
+
+               pfc: pin-controller@e6060000 {
+                       compatible = "renesas,pfc-r8a77470";
+                       reg = <0 0xe6060000 0 0x118>;
+               };
+
                cpg: clock-controller@e6150000 {
                        compatible = "renesas,r8a77470-cpg-mssr";
                        reg = <0 0xe6150000 0 0x1000>;
@@ -70,6 +177,12 @@ cpg: clock-controller@e6150000 {
                        #reset-cells = <1>;
                };
 
+               apmu@e6151000 {
+                       compatible = "renesas,r8a77470-apmu", "renesas,apmu";
+                       reg = <0 0xe6151000 0 0x188>;
+                       cpus = <&cpu0 &cpu1>;
+               };
+
                rst: reset-controller@e6160000 {
                        compatible = "renesas,r8a77470-rst";
                        reg = <0 0xe6160000 0 0x100>;
@@ -97,7 +210,7 @@ irqc: interrupt-controller@e61c0000 {
                                     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 407>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 407>;
                };
 
@@ -124,6 +237,20 @@ icram2:    sram@e6300000 {
                        reg = <0 0xe6300000 0 0x20000>;
                };
 
+               i2c4: i2c@e6520000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77470",
+                                    "renesas,rcar-gen2-i2c";
+                       reg = <0 0xe6520000 0 0x40>;
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 927>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 927>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
                dmac0: dma-controller@e6700000 {
                        compatible = "renesas,dmac-r8a77470",
                                     "renesas,rcar-dmac";
@@ -151,7 +278,7 @@ GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
                                          "ch12", "ch13", "ch14";
                        clocks = <&cpg CPG_MOD 219>;
                        clock-names = "fck";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 219>;
                        #dma-cells = <1>;
                        dma-channels = <15>;
@@ -184,7 +311,7 @@ GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
                                          "ch12", "ch13", "ch14";
                        clocks = <&cpg CPG_MOD 218>;
                        clock-names = "fck";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 218>;
                        #dma-cells = <1>;
                        dma-channels = <15>;
@@ -196,7 +323,7 @@ avb: ethernet@e6800000 {
                        reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
                        interrupts = <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 812>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 812>;
                        #address-cells = <1>;
                        #size-cells = <0>;
@@ -214,7 +341,7 @@ scif0: serial@e6e60000 {
                        dmas = <&dmac0 0x29>, <&dmac0 0x2a>,
                               <&dmac1 0x29>, <&dmac1 0x2a>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 721>;
                        status = "disabled";
                };
@@ -230,7 +357,7 @@ scif1: serial@e6e68000 {
                        dmas = <&dmac0 0x2d>, <&dmac0 0x2e>,
                               <&dmac1 0x2d>, <&dmac1 0x2e>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 720>;
                        status = "disabled";
                };
@@ -246,7 +373,7 @@ scif2: serial@e6e58000 {
                        dmas = <&dmac0 0x2b>, <&dmac0 0x2c>,
                               <&dmac1 0x2b>, <&dmac1 0x2c>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 719>;
                        status = "disabled";
                };
@@ -262,7 +389,7 @@ scif3: serial@e6ea8000 {
                        dmas = <&dmac0 0x2f>, <&dmac0 0x30>,
                               <&dmac1 0x2f>, <&dmac1 0x30>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 718>;
                        status = "disabled";
                };
@@ -278,7 +405,7 @@ scif4: serial@e6ee0000 {
                        dmas = <&dmac0 0xfb>, <&dmac0 0xfc>,
                               <&dmac1 0xfb>, <&dmac1 0xfc>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 715>;
                        status = "disabled";
                };
@@ -294,11 +421,26 @@ scif5: serial@e6ee8000 {
                        dmas = <&dmac0 0xfd>, <&dmac0 0xfe>,
                               <&dmac1 0xfd>, <&dmac1 0xfe>;
                        dma-names = "tx", "rx", "tx", "rx";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 714>;
                        status = "disabled";
                };
 
+               sdhi2: sd@ee160000 {
+                       compatible = "renesas,sdhi-r8a77470",
+                                    "renesas,rcar-gen2-sdhi";
+                       reg = <0 0xee160000 0 0x328>;
+                       interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 312>;
+                       dmas = <&dmac0 0xd3>, <&dmac0 0xd4>,
+                              <&dmac1 0xd3>, <&dmac1 0xd4>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       max-frequency = <97500000>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
+                       resets = <&cpg 312>;
+                       status = "disabled";
+               };
+
                gic: interrupt-controller@f1001000 {
                        compatible = "arm,gic-400";
                        #interrupt-cells = <3>;
@@ -309,7 +451,7 @@ gic: interrupt-controller@f1001000 {
                        interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
                        clocks = <&cpg CPG_MOD 408>;
                        clock-names = "clk";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
                        resets = <&cpg 408>;
                };
 
index de808d2ea856b19dffe002ecf7148f58d4bac658..cecb22924ec45c0ebd7357988c8afc63ecf83c1c 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Reference Device Tree Source for the Bock-W board
+ * Reference Device Tree Source for the R-Car M1A (R8A77781) Bock-W board
  *
  * Copyright (C) 2013  Renesas Solutions Corp.
  * Copyright (C) 2013  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
index 1bce16cc6b209e63f808b6d2190a573c071b30fc..05db0ccad7a6b745f172d78288d7a77a4a4a873c 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for Renesas r8a7778
+ * Device Tree Source for the R-Car M1A (R8A77781) SoC
  *
  * Copyright (C) 2013  Renesas Solutions Corp.
  * Copyright (C) 2013  Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
index a4d0038363f004d43892966e1e733412df54acc5..abc14e7a4c93ee5e61af3613430c799c1f7d5c98 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the Marzen board
+ * Device Tree Source for the R-Car H1 (R8A77790) Marzen board
  *
  * Copyright (C) 2013 Renesas Solutions Corp.
  * Copyright (C) 2013 Simon Horman
index 6b997bc016ee8a9e989a38ce476bb1c4f62d9f26..3bc133d9489c61374120d60752ec6755c4c75a71 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for Renesas r8a7779
+ * Device Tree Source for the R-Car H1 (R8A77790) SoC
  *
  * Copyright (C) 2013 Renesas Solutions Corp.
  * Copyright (C) 2013 Simon Horman
@@ -344,7 +344,7 @@ tmu2: timer@ffd82000 {
 
        sata: sata@fc600000 {
                compatible = "renesas,sata-r8a7779", "renesas,rcar-sata";
-               reg = <0xfc600000 0x2000>;
+               reg = <0xfc600000 0x200000>;
                interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp1_clks R8A7779_CLK_SATA>;
                power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
index a13a92c2664507ee49d1ef8d0b3f5d80dbeffc5d..629da4cee1b971d6259317313f0f683103e1fe83 100644 (file)
@@ -318,6 +318,10 @@ pmic@58 {
                interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
                interrupt-controller;
 
+               onkey {
+                       compatible = "dlg,da9063-onkey";
+               };
+
                rtc {
                        compatible = "dlg,da9063-rtc";
                };
index 0925bdca438feedaa8ee956f8109fcca75dbbe1f..5a2747758f676a4b526231658fb728aae93d2fe9 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7790 SoC
+ * Device Tree Source for the R-Car H2 (R8A77900) SoC
  *
  * Copyright (C) 2015 Renesas Electronics Corporation
  * Copyright (C) 2013-2014 Renesas Solutions Corp.
@@ -1559,7 +1559,7 @@ mmcif1: mmc@ee220000 {
                sata0: sata@ee300000 {
                        compatible = "renesas,sata-r8a7790",
                                     "renesas,rcar-gen2-sata";
-                       reg = <0 0xee300000 0 0x2000>;
+                       reg = <0 0xee300000 0 0x200000>;
                        interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 815>;
                        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
@@ -1570,7 +1570,7 @@ sata0: sata@ee300000 {
                sata1: sata@ee500000 {
                        compatible = "renesas,sata-r8a7790",
                                     "renesas,rcar-gen2-sata";
-                       reg = <0 0xee500000 0 0x2000>;
+                       reg = <0 0xee500000 0 0x200000>;
                        interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 814>;
                        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
index 991ac6feedd5beb6123f7a12f98c8799d89f9565..6f875502453cf40a52df7337e53e4933c7a8053f 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7791 SoC
+ * Device Tree Source for the R-Car M2-W (R8A77910) SoC
  *
  * Copyright (C) 2013-2015 Renesas Electronics Corporation
  * Copyright (C) 2013-2014 Renesas Solutions Corp.
@@ -1543,7 +1543,7 @@ mmcif0: mmc@ee200000 {
                sata0: sata@ee300000 {
                        compatible = "renesas,sata-r8a7791",
                                     "renesas,rcar-gen2-sata";
-                       reg = <0 0xee300000 0 0x2000>;
+                       reg = <0 0xee300000 0 0x200000>;
                        interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 815>;
                        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
@@ -1554,7 +1554,7 @@ sata0: sata@ee300000 {
                sata1: sata@ee500000 {
                        compatible = "renesas,sata-r8a7791",
                                     "renesas,rcar-gen2-sata";
-                       reg = <0 0xee500000 0 0x2000>;
+                       reg = <0 0xee500000 0 0x200000>;
                        interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 814>;
                        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
index 63a978ec81cc09f0a4d989fff7171d893ba07387..8e9eb4b704d32f2a23179435f158030772ca2365 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7792 SoC
+ * Device Tree Source for the R-Car V2H (R8A77920) SoC
  *
  * Copyright (C) 2016 Cogent Embedded Inc.
  */
@@ -829,7 +829,6 @@ jpu: jpeg-codec@fe980000 {
                du: display@feb00000 {
                        compatible = "renesas,du-r8a7792";
                        reg = <0 0xfeb00000 0 0x40000>;
-                       reg-names = "du";
                        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 724>,
index 6b2f3a4fd13d646c35e48fc46a7efa31ab42035e..f51601af89a2f4d5324e891a85944a6d57d2b074 100644 (file)
@@ -596,6 +596,10 @@ &cmt0 {
        status = "okay";
 };
 
+&cpu0 {
+       cpu0-supply = <&vdd_dvfs>;
+};
+
 &rwdt {
        timeout-sec = <60>;
        status = "okay";
@@ -725,6 +729,18 @@ wdt {
                        compatible = "dlg,da9063-watchdog";
                };
        };
+
+       vdd_dvfs: regulator@68 {
+               compatible = "dlg,da9210";
+               reg = <0x68>;
+               interrupt-parent = <&irqc0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
 };
 
 &i2c4 {
index 620a570307ffcffa0ac2cc42918684882952b4b2..bf05110fac4e23beb7b5dff259d44b317a49c0db 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7793 SoC
+ * Device Tree Source for the R-Car M2-N (R8A77930) SoC
  *
  * Copyright (C) 2014-2015 Renesas Electronics Corporation
  */
index daec965889d3e5fe18e764daaf77758e24aacd0c..60e91ebfa65dc5b3d76cd28218b51aa4fceb8c17 100644 (file)
@@ -405,6 +405,31 @@ &i2c1 {
        clock-frequency = <400000>;
 };
 
+&i2c7 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic@58 {
+               compatible = "dlg,da9063";
+               reg = <0x58>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+
+               onkey {
+                       compatible = "dlg,da9063-onkey";
+               };
+
+               rtc {
+                       compatible = "dlg,da9063-rtc";
+               };
+
+               wdt {
+                       compatible = "dlg,da9063-watchdog";
+               };
+       };
+};
+
 &mmcif0 {
        pinctrl-0 = <&mmcif0_pins>;
        pinctrl-names = "default";
index ea2ca4bdaf1c129c3932644a45bce1145ebabfb6..8d797d34816e3625e1c3a56aa7e6af8cadc219dc 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7794 SoC
+ * Device Tree Source for the R-Car E2 (R8A77940) SoC
  *
  * Copyright (C) 2014 Renesas Electronics Corporation
  * Copyright (C) 2014 Ulrich Hecht
@@ -1349,7 +1349,6 @@ fdp1@fe940000 {
                du: display@feb00000 {
                        compatible = "renesas,du-r8a7794";
                        reg = <0 0xfeb00000 0 0x40000>;
-                       reg-names = "du";
                        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>;
index afe29c95a006e8fa12d0ed66f5948e8ac1a17262..eaf94976ed6dfd0cbf5eed9a835564b8027a937f 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/r9a06g032-sysctrl.h>
 
 / {
        compatible = "renesas,r9a06g032";
@@ -21,14 +22,14 @@ cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a7";
                        reg = <0>;
-                       clocks = <&sysctrl 84>;
+                       clocks = <&sysctrl R9A06G032_CLK_A7MP>;
                };
 
                cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a7";
                        reg = <1>;
-                       clocks = <&sysctrl 84>;
+                       clocks = <&sysctrl R9A06G032_CLK_A7MP>;
                        enable-method = "renesas,r9a06g032-smp";
                        cpu-release-addr = <0 0x4000c204>;
                };
@@ -77,13 +78,90 @@ sysctrl: system-controller@4000c000 {
                };
 
                uart0: serial@40060000 {
-                       compatible = "snps,dw-apb-uart";
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
                        reg = <0x40060000 0x400>;
                        interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&sysctrl 146>;
-                       clock-names = "baudclk";
+                       clocks = <&sysctrl R9A06G032_CLK_UART0>, <&sysctrl R9A06G032_HCLK_UART0>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart1: serial@40061000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
+                       reg = <0x40061000 0x400>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART1>, <&sysctrl R9A06G032_HCLK_UART1>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart2: serial@40062000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart";
+                       reg = <0x40062000 0x400>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART2>, <&sysctrl R9A06G032_HCLK_UART2>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart3: serial@50000000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
+                       reg = <0x50000000 0x400>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART3>, <&sysctrl R9A06G032_HCLK_UART3>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart4: serial@50001000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
+                       reg = <0x50001000 0x400>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART4>, <&sysctrl R9A06G032_HCLK_UART4>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart5: serial@50002000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
+                       reg = <0x50002000 0x400>;
+                       interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART5>, <&sysctrl R9A06G032_HCLK_UART5>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart6: serial@50003000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
+                       reg = <0x50003000 0x400>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART6>, <&sysctrl R9A06G032_HCLK_UART6>;
+                       clock-names = "baudclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               uart7: serial@50004000 {
+                       compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart";
+                       reg = <0x50004000 0x400>;
+                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&sysctrl R9A06G032_CLK_UART7>, <&sysctrl R9A06G032_HCLK_UART7>;
+                       clock-names = "baudclk", "apb_pclk";
                        status = "disabled";
                };
 
index 67358562a6ea2df8df87b522c825b16c3f83da60..75f454a210d628cd63fd1238c40067fbbdfda68d 100644 (file)
@@ -120,7 +120,7 @@ pinctrl0: pinctrl@e0200000 {
                        interrupts = <30>;
 
                        wakeup-interrupt-controller {
-                               compatible = "samsung,exynos4210-wakeup-eint";
+                               compatible = "samsung,s5pv210-wakeup-eint";
                                interrupts = <16>;
                                interrupt-parent = <&vic0>;
                        };
index 61f68e5c48e96324eb1c6cfbc26d90ade0d4a89c..843052f14f1cff7d32cf9622ba1ea470c529aa2f 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/dma/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/clock/at91.h>
+#include <dt-bindings/iio/adc/at91-sama5d2_adc.h>
 
 / {
        model = "Atmel SAMA5D2 family SoC";
@@ -58,6 +59,8 @@ aliases {
                serial1 = &uart3;
                tcb0 = &tcb0;
                tcb1 = &tcb1;
+               i2s0 = &i2s0;
+               i2s1 = &i2s1;
        };
 
        cpus {
@@ -84,10 +87,11 @@ etb {
                clocks = <&mck>;
                clock-names = "apb_pclk";
 
-               port {
-                       etb_in: endpoint {
-                               slave-mode;
-                               remote-endpoint = <&etm_out>;
+               in-ports {
+                       port {
+                               etb_in: endpoint {
+                                       remote-endpoint = <&etm_out>;
+                               };
                        };
                };
        };
@@ -99,9 +103,11 @@ etm {
                clocks = <&mck>;
                clock-names = "apb_pclk";
 
-               port {
-                       etm_out: endpoint {
-                               remote-endpoint = <&etb_in>;
+               out-ports {
+                       port {
+                               etm_out: endpoint {
+                                       remote-endpoint = <&etb_in>;
+                               };
                        };
                };
        };
@@ -323,44 +329,6 @@ nand_controller: nand-controller {
                        };
                };
 
-               nand0: nand@80000000 {
-                       compatible = "atmel,sama5d2-nand";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges;
-                       reg = < /* EBI CS3 */
-                               0x80000000 0x08000000
-                               /* SMC PMECC regs */
-                               0xf8014070 0x00000490
-                               /* SMC PMECC Error Location regs */
-                               0xf8014500 0x00000200
-                               /* ROM Galois tables */
-                               0x00040000 0x00018000
-                               >;
-                       interrupts = <17 IRQ_TYPE_LEVEL_HIGH 6>;
-                       atmel,nand-addr-offset = <21>;
-                       atmel,nand-cmd-offset = <22>;
-                       atmel,nand-has-dma;
-                       atmel,has-pmecc;
-                       atmel,pmecc-lookup-table-offset = <0x0 0x8000>;
-                       status = "disabled";
-
-                       nfc@c0000000 {
-                               compatible = "atmel,sama5d3-nfc";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               reg = < /* NFC Command Registers */
-                                       0xc0000000 0x08000000
-                                       /* NFC HSMC regs */
-                                       0xf8014000 0x00000070
-                                       /* NFC SRAM banks */
-                                       0x00100000 0x00100000
-                                       >;
-                               clocks = <&hsmc_clk>;
-                               atmel,write-by-sram;
-                       };
-               };
-
                sdmmc0: sdio-host@a0000000 {
                        compatible = "atmel,sama5d2-sdhci";
                        reg = <0xa0000000 0x300>;
@@ -992,6 +960,24 @@ classd_gclk: classd_gclk {
                                                atmel,clk-output-range = <0 100000000>;
                                        };
                                };
+
+                               i2s_clkmux {
+                                       compatible = "atmel,sama5d2-clk-i2s-mux";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       i2s0muxck: i2s0_muxclk {
+                                               clocks = <&i2s0_clk>, <&i2s0_gclk>;
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                       };
+
+                                       i2s1muxck: i2s1_muxclk {
+                                               clocks = <&i2s1_clk>, <&i2s1_gclk>;
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                       };
+                               };
                        };
 
                        qspi0: spi@f0020000 {
@@ -1295,6 +1281,24 @@ rtc@f80480b0 {
                                clocks = <&clk32k>;
                        };
 
+                       i2s0: i2s@f8050000 {
+                               compatible = "atmel,sama5d2-i2s";
+                               reg = <0xf8050000 0x100>;
+                               interrupts = <54 IRQ_TYPE_LEVEL_HIGH 7>;
+                               dmas = <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+                                        AT91_XDMAC_DT_PERID(31))>,
+                                      <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+                                        AT91_XDMAC_DT_PERID(32))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&i2s0_clk>, <&i2s0_gclk>;
+                               clock-names = "pclk", "gclk";
+                               assigned-clocks = <&i2s0muxck>;
+                               assigned-clock-parents = <&i2s0_gclk>;
+                               status = "disabled";
+                       };
+
                        can0: can@f8054000 {
                                compatible = "bosch,m_can";
                                reg = <0xf8054000 0x4000>, <0x210000 0x4000>;
@@ -1437,6 +1441,17 @@ adc: adc@fc030000 {
                                atmel,max-sample-rate-hz = <20000000>;
                                atmel,startup-time-ms = <4>;
                                atmel,trigger-edge-type = <IRQ_TYPE_EDGE_RISING>;
+                               #io-channel-cells = <1>;
+                               status = "disabled";
+                       };
+
+                       resistive_touch: resistive-touch {
+                               compatible = "resistive-adc-touch";
+                               io-channels = <&adc AT91_SAMA5D2_ADC_X_CHANNEL>,
+                                             <&adc AT91_SAMA5D2_ADC_Y_CHANNEL>,
+                                             <&adc AT91_SAMA5D2_ADC_P_CHANNEL>;
+                               io-channel-names = "x", "y", "pressure";
+                               touchscreen-min-pressure = <50000>;
                                status = "disabled";
                        };
 
@@ -1488,6 +1503,24 @@ classd: classd@fc048000 {
                                status = "disabled";
                        };
 
+                       i2s1: i2s@fc04c000 {
+                               compatible = "atmel,sama5d2-i2s";
+                               reg = <0xfc04c000 0x100>;
+                               interrupts = <55 IRQ_TYPE_LEVEL_HIGH 7>;
+                               dmas = <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+                                        AT91_XDMAC_DT_PERID(33))>,
+                                      <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1) |
+                                        AT91_XDMAC_DT_PERID(34))>;
+                               dma-names = "tx", "rx";
+                               clocks = <&i2s1_clk>, <&i2s1_gclk>;
+                               clock-names = "pclk", "gclk";
+                               assigned-clocks = <&i2s1muxck>;
+                               assigned-parrents = <&i2s1_gclk>;
+                               status = "disabled";
+                       };
+
                        can1: can@fc050000 {
                                compatible = "bosch,m_can";
                                reg = <0xfc050000 0x4000>, <0x210000 0x4000>;
index 92a35a1942b6a1b75c750a8a96eb1cea0e6355b0..7371f2a0460fbf8b8c45a8afc0ac9484bf337b01 100644 (file)
@@ -1323,13 +1323,13 @@ pmecc: ecc-engine@ffffc070 {
                                };
                        };
 
-                       rstc@fc068600 {
+                       reset_controller: rstc@fc068600 {
                                compatible = "atmel,sama5d3-rstc", "atmel,at91sam9g45-rstc";
                                reg = <0xfc068600 0x10>;
                                clocks = <&clk32k>;
                        };
 
-                       shdwc@fc068610 {
+                       shutdown_controller: shdwc@fc068610 {
                                compatible = "atmel,at91sam9x5-shdwc";
                                reg = <0xfc068610 0x10>;
                                clocks = <&clk32k>;
@@ -1342,7 +1342,7 @@ pit: timer@fc068630 {
                                clocks = <&h32ck>;
                        };
 
-                       watchdog@fc068640 {
+                       watchdog: watchdog@fc068640 {
                                compatible = "atmel,sama5d4-wdt";
                                reg = <0xfc068640 0x10>;
                                interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>;
@@ -1376,7 +1376,7 @@ dbgu: serial@fc069000 {
                        };
 
 
-                       pinctrl@fc06a000 {
+                       pinctrl: pinctrl@fc06a000 {
                                #address-cells = <1>;
                                #size-cells = <1>;
                                compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";
index b38f8c24055800c45e1e81aef451f08ac9e27be5..b3ff5a86efdbec20934b9a489395c312feb1aca5 100644 (file)
@@ -483,10 +483,17 @@ nand_x_clk: nand_x_clk {
                                                clk-gate = <0xa0 9>;
                                        };
 
+                                       nand_ecc_clk: nand_ecc_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-gate-clk";
+                                               clocks = <&nand_x_clk>;
+                                               clk-gate = <0xa0 9>;
+                                       };
+
                                        nand_clk: nand_clk {
                                                #clock-cells = <0>;
                                                compatible = "altr,socfpga-gate-clk";
-                                               clocks = <&f2s_periph_ref_clk>, <&main_nand_sdmmc_clk>, <&per_nand_mmc_clk>;
+                                               clocks = <&nand_x_clk>;
                                                clk-gate = <0xa0 10>;
                                                fixed-divider = <4>;
                                        };
@@ -754,7 +761,8 @@ nand0: nand@ff900000 {
                        reg-names = "nand_data", "denali_reg";
                        interrupts = <0x0 0x90 0x4>;
                        dma-mask = <0xffffffff>;
-                       clocks = <&nand_x_clk>;
+                       clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
+                       clock-names = "nand", "nand_x", "ecc";
                        status = "disabled";
                };
 
@@ -841,6 +849,8 @@ timer0: timer0@ffc08000 {
                        reg = <0xffc08000 0x1000>;
                        clocks = <&l4_sp_clk>;
                        clock-names = "timer";
+                       resets = <&rst SPTIMER0_RESET>;
+                       reset-names = "timer";
                };
 
                timer1: timer1@ffc09000 {
@@ -849,6 +859,8 @@ timer1: timer1@ffc09000 {
                        reg = <0xffc09000 0x1000>;
                        clocks = <&l4_sp_clk>;
                        clock-names = "timer";
+                       resets = <&rst SPTIMER1_RESET>;
+                       reset-names = "timer";
                };
 
                timer2: timer2@ffd00000 {
@@ -857,6 +869,8 @@ timer2: timer2@ffd00000 {
                        reg = <0xffd00000 0x1000>;
                        clocks = <&osc1>;
                        clock-names = "timer";
+                       resets = <&rst OSC1TIMER0_RESET>;
+                       reset-names = "timer";
                };
 
                timer3: timer3@ffd01000 {
@@ -865,6 +879,8 @@ timer3: timer3@ffd01000 {
                        reg = <0xffd01000 0x1000>;
                        clocks = <&osc1>;
                        clock-names = "timer";
+                       resets = <&rst OSC1TIMER1_RESET>;
+                       reset-names = "timer";
                };
 
                uart0: serial0@ffc02000 {
index a4dcb68f4322e2c96dd8bad240bb94b7eb307c9e..4e0c26423d8477e5c70bafc767269164cacf70e8 100644 (file)
@@ -377,13 +377,28 @@ qspi_clk: qspi_clk {
                                                clk-gate = <0xC8 11>;
                                        };
 
-                                       nand_clk: nand_clk {
+                                       nand_x_clk: nand_x_clk {
                                                #clock-cells = <0>;
                                                compatible = "altr,socfpga-a10-gate-clk";
                                                clocks = <&l4_mp_clk>;
                                                clk-gate = <0xC8 10>;
                                        };
 
+                                       nand_ecc_clk: nand_ecc_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-a10-gate-clk";
+                                               clocks = <&nand_x_clk>;
+                                               clk-gate = <0xC8 10>;
+                                       };
+
+                                       nand_clk: nand_clk {
+                                               #clock-cells = <0>;
+                                               compatible = "altr,socfpga-a10-gate-clk";
+                                               clocks = <&nand_x_clk>;
+                                               fixed-divider = <4>;
+                                               clk-gate = <0xC8 10>;
+                                       };
+
                                        spi_m_clk: spi_m_clk {
                                                #clock-cells = <0>;
                                                compatible = "altr,socfpga-a10-gate-clk";
@@ -650,7 +665,8 @@ nand: nand@ffb90000 {
                        reg-names = "nand_data", "denali_reg";
                        interrupts = <0 99 4>;
                        dma-mask = <0xffffffff>;
-                       clocks = <&nand_clk>;
+                       clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
+                       clock-names = "nand", "nand_x", "ecc";
                        status = "disabled";
                };
 
@@ -760,7 +776,7 @@ sysmgr: sysmgr@ffd06000 {
                timer@ffffc600 {
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0xffffc600 0x100>;
-                       interrupts = <1 13 0xf04>;
+                       interrupts = <1 13 0xf01>;
                        clocks = <&mpu_periph_clk>;
                };
 
@@ -770,6 +786,8 @@ timer0: timer0@ffc02700 {
                        reg = <0xffc02700 0x100>;
                        clocks = <&l4_sp_clk>;
                        clock-names = "timer";
+                       resets = <&rst SPTIMER0_RESET>;
+                       reset-names = "timer";
                };
 
                timer1: timer1@ffc02800 {
@@ -778,6 +796,8 @@ timer1: timer1@ffc02800 {
                        reg = <0xffc02800 0x100>;
                        clocks = <&l4_sp_clk>;
                        clock-names = "timer";
+                       resets = <&rst SPTIMER1_RESET>;
+                       reset-names = "timer";
                };
 
                timer2: timer2@ffd00000 {
@@ -786,6 +806,8 @@ timer2: timer2@ffd00000 {
                        reg = <0xffd00000 0x100>;
                        clocks = <&l4_sys_free_clk>;
                        clock-names = "timer";
+                       resets = <&rst L4SYSTIMER0_RESET>;
+                       reset-names = "timer";
                };
 
                timer3: timer3@ffd00100 {
@@ -794,6 +816,8 @@ timer3: timer3@ffd00100 {
                        reg = <0xffd01000 0x100>;
                        clocks = <&l4_sys_free_clk>;
                        clock-names = "timer";
+                       resets = <&rst L4SYSTIMER1_RESET>;
+                       reset-names = "timer";
                };
 
                uart0: serial0@ffc02000 {
similarity index 98%
rename from arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
rename to arch/arm/boot/dts/socfpga_cyclone5_de0_nano_soc.dts
index b280e6494193885aba2ca44e9ad3eb9902a2bb57..31b01a998b2ed7e4f0e7c7b1ab1cda05595d39c7 100644 (file)
@@ -88,7 +88,7 @@ &i2c0 {
        status = "okay";
        clock-frequency = <100000>;
 
-       adxl345: adxl345@0 {
+       adxl345: adxl345@53 {
                compatible = "adi,adxl345";
                reg = <0x53>;
 
index 53bf99eef66de70fba4647fb9592750afffee486..6f5255a7d1925e02f96e6a680c1742e697740a2a 100644 (file)
@@ -22,7 +22,8 @@ / {
        compatible = "ebv,socrates", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
-               bootargs = "console=ttyS0,115200";
+               bootargs = "earlyprintk";
+               stdout-path = "serial0:115200n8";
        };
 
        memory@0 {
index f50b19447de6981c377e6d9b7729f23205990700..e61efe16e79cf53f301fd827065f1629508597cb 100644 (file)
@@ -54,7 +54,8 @@ / {
        compatible = "samtec,vining", "altr,socfpga-cyclone5", "altr,socfpga";
 
        chosen {
-               bootargs = "console=ttyS0,115200";
+               bootargs = "earlyprintk";
+               stdout-path = "serial0:115200n8";
        };
 
        memory@0 {
index 2310a4e97768c222ca19fe8f125c5aede36be8d1..e6ed7c0354a233cdba3f8449582a3e1fe647cadd 100644 (file)
 #include <dt-bindings/arm/ux500_pm_domains.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clock/ste-ab8500.h>
-#include "skeleton.dtsi"
 
 / {
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       chosen {
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -67,9 +72,11 @@ ptm@801ae000 {
                        clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "apb_pclk", "atclk";
                        cpu = <&CPU0>;
-                       port {
-                               ptm0_out_port: endpoint {
-                                       remote-endpoint = <&funnel_in_port0>;
+                       out-ports {
+                               port {
+                                       ptm0_out_port: endpoint {
+                                               remote-endpoint = <&funnel_in_port0>;
+                                       };
                                };
                        };
                };
@@ -81,9 +88,11 @@ ptm@801af000 {
                        clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "apb_pclk", "atclk";
                        cpu = <&CPU1>;
-                       port {
-                               ptm1_out_port: endpoint {
-                                       remote-endpoint = <&funnel_in_port1>;
+                       out-ports {
+                               port {
+                                       ptm1_out_port: endpoint {
+                                               remote-endpoint = <&funnel_in_port1>;
+                                       };
                                };
                        };
                };
@@ -94,32 +103,29 @@ funnel@801a6000 {
 
                        clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "apb_pclk", "atclk";
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               /* funnel output ports */
-                               port@0 {
-                                       reg = <0>;
+                       out-ports {
+                               port {
                                        funnel_out_port: endpoint {
                                                remote-endpoint =
                                                        <&replicator_in_port0>;
                                        };
                                };
+                       };
 
-                               /* funnel input ports */
-                               port@1 {
+                       in-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
                                        reg = <0>;
                                        funnel_in_port0: endpoint {
-                                               slave-mode;
                                                remote-endpoint = <&ptm0_out_port>;
                                        };
                                };
 
-                               port@2 {
+                               port@1 {
                                        reg = <1>;
                                        funnel_in_port1: endpoint {
-                                               slave-mode;
                                                remote-endpoint = <&ptm1_out_port>;
                                        };
                                };
@@ -131,11 +137,10 @@ replicator {
                        clocks = <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "atclk";
 
-                       ports {
+                       out-ports {
                                #address-cells = <1>;
                                #size-cells = <0>;
 
-                               /* replicator output ports */
                                port@0 {
                                        reg = <0>;
                                        replicator_out_port0: endpoint {
@@ -148,12 +153,11 @@ replicator_out_port1: endpoint {
                                                remote-endpoint = <&etb_in_port>;
                                        };
                                };
+                       };
 
-                               /* replicator input port */
-                               port@2 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        replicator_in_port0: endpoint {
-                                               slave-mode;
                                                remote-endpoint = <&funnel_out_port>;
                                        };
                                };
@@ -166,10 +170,11 @@ tpiu@80190000 {
 
                        clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "apb_pclk", "atclk";
-                       port {
-                               tpiu_in_port: endpoint {
-                                       slave-mode;
-                                       remote-endpoint = <&replicator_out_port0>;
+                       in-ports {
+                               port {
+                                       tpiu_in_port: endpoint {
+                                               remote-endpoint = <&replicator_out_port0>;
+                                       };
                                };
                        };
                };
@@ -180,10 +185,11 @@ etb@801a4000 {
 
                        clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
                        clock-names = "apb_pclk", "atclk";
-                       port {
-                               etb_in_port: endpoint {
-                                       slave-mode;
-                                       remote-endpoint = <&replicator_out_port1>;
+                       in-ports {
+                               port {
+                                       etb_in_port: endpoint {
+                                               remote-endpoint = <&replicator_out_port1>;
+                                       };
                                };
                        };
                };
@@ -197,7 +203,7 @@ intc: interrupt-controller@a0411000 {
                              <0xa0410100 0x100>;
                };
 
-               scu@a04100000 {
+               scu@a0410000 {
                        compatible = "arm,cortex-a9-scu";
                        reg = <0xa0410000 0x100>;
                };
@@ -487,7 +493,7 @@ dma: dma-controller@801C0000 {
                };
 
                prcmu: prcmu@80157000 {
-                       compatible = "stericsson,db8500-prcmu";
+                       compatible = "stericsson,db8500-prcmu", "syscon";
                        reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>;
                        reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm";
                        interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
@@ -878,7 +884,7 @@ i2c@8012a000 {
                        power-domains = <&pm_domains DOMAIN_VAPE>;
                };
 
-               ssp@80002000 {
+               spi@80002000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80002000 0x1000>;
                        interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
@@ -892,7 +898,7 @@ ssp@80002000 {
                        power-domains = <&pm_domains DOMAIN_VAPE>;
                };
 
-               ssp@80003000 {
+               spi@80003000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80003000 0x1000>;
                        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
index 5c5cea232743d111f154cd0faa0517b44f6a70ab..1ec193b0c5065b794838705702a99bd48c95586c 100644 (file)
@@ -607,16 +607,20 @@ sleep_cfg3 {
 
                        mcde {
                                lcd_default_mode: lcd_default {
-                                       default_mux {
+                                       default_mux1 {
                                                /* Mux in VSI0 and all the data lines */
                                                function = "lcd";
                                                groups =
                                                "lcdvsi0_a_1", /* VSI0 for LCD */
                                                "lcd_d0_d7_a_1", /* Data lines */
                                                "lcd_d8_d11_a_1", /* TV-out */
-                                               "lcdaclk_b_1", /* Clock line for TV-out */
                                                "lcdvsi1_a_1"; /* VSI1 for HDMI */
                                        };
+                                       default_mux2 {
+                                               function = "lcda";
+                                               groups =
+                                               "lcdaclk_b_1"; /* Clock line for TV-out */
+                                       };
                                        default_cfg1 {
                                                pins =
                                                "GPIO68_E1", /* VSI0 */
index 9e359e4f342e76ebd1fbfab57d1f8f427ece2cd7..feb682a3d3635d907a1abd2f538de42648dc2c1a 100644 (file)
@@ -15,6 +15,7 @@
 
 / {
        memory {
+               device_type = "memory";
                reg = <0x00000000 0x20000000>;
        };
 
index 3f14b4df69b4e4d1ab27bd821eaeeb8d819ef40f..94eeb7f1c947863956561ce5e507bcbc75574bbb 100644 (file)
@@ -57,7 +57,7 @@ tc3589x_gpio: tc3589x_gpio {
                        };
                };
 
-               ssp@80002000 {
+               spi@80002000 {
                        /*
                         * On the first generation boards, this SSP/SPI port was connected
                         * to the AB8500.
index b0b94d05309855f4816a05295cbeb19251bc89e5..2de3ce79e496befac0bb88fa097ad7bf010515b9 100644 (file)
@@ -26,6 +26,7 @@ aliases {
        };
 
        memory {
+               device_type = "memory";
                reg = <0x00000000 0x20000000>;
        };
 
@@ -376,7 +377,7 @@ i2c@80110000 {
                        pinctrl-1 = <&i2c3_sleep_mode>;
                };
 
-               ssp@80002000 {
+               spi@80002000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&ssp0_snowball_mode>;
                };
index 62ecb6a2fa39e14aa99daf35782d7b2071852e93..1bd1aba3322f111c67cf672019bb3aac9599d6cd 100644 (file)
@@ -442,7 +442,7 @@ mmcsd: mmcsd@c0001000 {
                        dma-names = "rx";
                };
 
-               spi: ssp@c0006000 {
+               spi: spi@c0006000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0xc0006000 0x1000>;
                        interrupt-parent = <&vica>;
index 155caa8c002ad95702494ecd686bf9b0be36079f..4ee6d51d8d1ecbe2b4173e66cca524e19860a364 100644 (file)
@@ -61,8 +61,11 @@ sound: sound {
                compatible = "simple-audio-card";
                simple-audio-card,name = "STI-B2260";
                status = "okay";
+               #address-cells = <1>;
+               #size-cells = <0>;
 
-               simple-audio-card,dai-link0 {
+               simple-audio-card,dai-link@0 {
+                       reg = <0>;
                        /* DAC */
                        format = "i2s";
                        mclk-fs = <128>;
index 4dedfcb0fcb304c4968b82f815df31892e63f23a..97e05f55fb6e107f4dcca4c561daf7d5c4acb134 100644 (file)
@@ -27,8 +27,11 @@ sound: sound {
                compatible = "simple-audio-card";
                simple-audio-card,name = "STI-B2120";
                status = "okay";
+               #address-cells = <1>;
+               #size-cells = <0>;
 
-               simple-audio-card,dai-link0 {
+               simple-audio-card,dai-link@0 {
+                       reg = <0>;
                        /* HDMI */
                        format = "i2s";
                        mclk-fs = <128>;
@@ -41,7 +44,8 @@ codec {
                        };
                };
 
-               simple-audio-card,dai-link1 {
+               simple-audio-card,dai-link@1 {
+                       reg = <1>;
                        /* DAC */
                        format = "i2s";
                        mclk-fs = <256>;
@@ -55,7 +59,8 @@ codec {
                        };
                };
 
-               simple-audio-card,dai-link2 {
+               simple-audio-card,dai-link@2 {
+                       reg = <2>;
                        /* SPDIF */
                        format = "left_j";
                        mclk-fs = <128>;
index 7eb786a2d624763627e40e87673f7f0e5c79790d..ed7d7f46465e49881043b5aeddb47b5138cad72e 100644 (file)
@@ -264,8 +264,7 @@ &rtc {
 &sdio {
        status = "okay";
        vmmc-supply = <&mmc_vcard>;
-       cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&stmpegpio 15 GPIO_ACTIVE_LOW>;
        pinctrl-names = "default", "opendrain";
        pinctrl-0 = <&sdio_pins>;
        pinctrl-1 = <&sdio_pins_od>;
index e35d782e7e5f2f0281d1c8936bb90ea70b8d83b8..8d6f028ae285ca11beece355c3df4be2fe0f4dbe 100644 (file)
@@ -58,7 +58,7 @@ clk_hse: clk-hse {
                        clock-frequency = <0>;
                };
 
-               clk-lse {
+               clk_lse: clk-lse {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <32768>;
index 3ee768cb86fc96acf9f1e6a214e1348ead71395c..7937b43d77886bf200d4855b071123719cfd9ce2 100644 (file)
@@ -210,8 +210,7 @@ timer@2 {
 &sdio {
        status = "okay";
        vmmc-supply = <&mmc_vcard>;
-       cd-gpios = <&gpiog 2 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpiog 2 GPIO_ACTIVE_LOW>;
        broken-cd;
        pinctrl-names = "default", "opendrain";
        pinctrl-0 = <&sdio_pins>;
index f9ad71f7c807ce365cc5501e4fdafd4f8476a30f..e3a7bd338d61f0a8cc36dc4a1009e8660407d5e1 100644 (file)
@@ -101,8 +101,7 @@ &i2c1 {
 &sdio1 {
        status = "okay";
        vmmc-supply = <&mmc_vcard>;
-       cd-gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
        pinctrl-names = "default", "opendrain";
        pinctrl-0 = <&sdio_pins_a>;
        pinctrl-1 = <&sdio_pins_od_a>;
index 677276ba4dbe8f5c07f67ed493c839ed4f94f96b..483d896e2bc13376b0a261474ccdb6a56dcbf32d 100644 (file)
@@ -126,8 +126,7 @@ &rtc {
 &sdio2 {
        status = "okay";
        vmmc-supply = <&mmc_vcard>;
-       cd-gpios = <&gpioi 15 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>;
        broken-cd;
        pinctrl-names = "default", "opendrain";
        pinctrl-0 = <&sdio_pins_b>;
index 637beffe506700eb869f03e0089bfe63b3776fe9..cbdd69ca9e7a6e5c6215c646d6fa395ac6034dae 100644 (file)
@@ -472,7 +472,7 @@ rtc: rtc@58004000 {
                        interrupt-parent = <&exti>;
                        interrupts = <17 IRQ_TYPE_EDGE_RISING>;
                        interrupt-names = "alarm";
-                       st,syscfg = <&pwrcfg>;
+                       st,syscfg = <&pwrcfg 0x00 0x100>;
                        status = "disabled";
                };
 
index 372bc2ea6b92192422368bf8413fe62849321d08..063ee8ac5dcbd12d763a9d32a62f3185d819ae50 100644 (file)
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "stm32mp157c-ed1.dts"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -19,6 +20,58 @@ aliases {
                serial0 = &uart4;
                ethernet0 = &ethernet0;
        };
+
+       panel_backlight: panel-backlight {
+               compatible = "gpio-backlight";
+               gpios = <&gpiod 13 GPIO_ACTIVE_LOW>;
+               default-on;
+               status = "okay";
+       };
+};
+
+&cec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&cec_pins_a>;
+       status = "okay";
+};
+
+&dsi {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "okay";
+
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               port@0 {
+                       reg = <0>;
+                       dsi_in: endpoint {
+                               remote-endpoint = <&ltdc_ep0_out>;
+                       };
+               };
+
+               port@1 {
+                       reg = <1>;
+                       dsi_out: endpoint {
+                               remote-endpoint = <&dsi_panel_in>;
+                       };
+               };
+       };
+
+       panel-dsi@0 {
+               compatible = "raydium,rm68200";
+               reg = <0>;
+               reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>;
+               backlight = <&panel_backlight>;
+               status = "okay";
+
+               port {
+                       dsi_panel_in: endpoint {
+                               remote-endpoint = <&dsi_out>;
+                       };
+               };
+       };
 };
 
 &ethernet0 {
@@ -40,12 +93,6 @@ phy0: ethernet-phy@0 {
        };
 };
 
-&cec {
-       pinctrl-names = "default";
-       pinctrl-0 = <&cec_pins_a>;
-       status = "okay";
-};
-
 &i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
@@ -62,6 +109,20 @@ &i2c5 {
        status = "okay";
 };
 
+&ltdc {
+       status = "okay";
+
+       port {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ltdc_ep0_out: endpoint@0 {
+                       reg = <0>;
+                       remote-endpoint = <&dsi_in>;
+               };
+       };
+};
+
 &m_can1 {
        pinctrl-names = "default";
        pinctrl-0 = <&m_can1_pins_a>;
index 661be948ab7424759ebfdb2d1c780822d17f38b0..0e5a2f89f2d934048e7aac505cb334d9864eef22 100644 (file)
@@ -947,7 +947,7 @@ mdma1: dma@58000000 {
                        dma-requests = <48>;
                };
 
-               qspi: qspi@58003000 {
+               qspi: spi@58003000 {
                        compatible = "st,stm32f469-qspi";
                        reg = <0x58003000 0x1000>, <0x70000000 0x10000000>;
                        reg-names = "qspi", "qspi_mm";
index 8acbaab14fe5179a5649d9b39cb35ae1ea143f3c..d2a2eb8b3f2624a4ac974db1a19c7c120dc1f4be 100644 (file)
@@ -92,7 +92,8 @@ &i2c1 {
         */
        clock-frequency = <400000>;
 
-       touchscreen: touchscreen {
+       touchscreen: touchscreen@40 {
+               reg = <0x40>;
                interrupt-parent = <&pio>;
                interrupts = <6 11 IRQ_TYPE_EDGE_FALLING>; /* EINT11 (PG11) */
                pinctrl-names = "default";
index 8bfb36651177d715cd213e16fd2bb0dd2686d7f0..9cd65c46720ba43513fd34f014391cc9cc54a602 100644 (file)
@@ -108,6 +108,21 @@ osc32k: clk@0 {
                };
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
+               cma_pool: cma@4a000000 {
+                       compatible = "shared-dma-pool";
+                       size = <0x6000000>;
+                       alloc-ranges = <0x4a000000 0x6000000>;
+                       reusable;
+                       linux,cma-default;
+               };
+       };
+
        soc@1c00000 {
                compatible = "simple-bus";
                #address-cells = <1>;
@@ -294,6 +309,17 @@ tcon0_out_tve0: endpoint@1 {
                        };
                };
 
+               video-codec@1c0e000 {
+                       compatible = "allwinner,sun5i-a13-video-engine";
+                       reg = <0x01c0e000 0x1000>;
+                       clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
+                                <&ccu CLK_DRAM_VE>;
+                       clock-names = "ahb", "mod", "ram";
+                       resets = <&ccu RST_VE>;
+                       interrupts = <53>;
+                       allwinner,sram = <&ve_sram 1>;
+               };
+
                mmc0: mmc@1c0f000 {
                        compatible = "allwinner,sun5i-a13-mmc";
                        reg = <0x01c0f000 0x1000>;
index 9c52712af24111daeb7e94a8be2ebabcc94c55c9..02e40da9f02801c60ac5097f8821ed3d80677bda 100644 (file)
@@ -174,6 +174,21 @@ memory {
                reg = <0x40000000 0x80000000>;
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
+               cma_pool: cma@4a000000 {
+                       compatible = "shared-dma-pool";
+                       size = <0x6000000>;
+                       alloc-ranges = <0x4a000000 0x6000000>;
+                       reusable;
+                       linux,cma-default;
+               };
+       };
+
        timer {
                compatible = "arm,armv7-timer";
                interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -479,6 +494,17 @@ tcon1_out_hdmi: endpoint@1 {
                        };
                };
 
+               video-codec@1c0e000 {
+                       compatible = "allwinner,sun7i-a20-video-engine";
+                       reg = <0x01c0e000 0x1000>;
+                       clocks = <&ccu CLK_AHB_VE>, <&ccu CLK_VE>,
+                                <&ccu CLK_DRAM_VE>;
+                       clock-names = "ahb", "mod", "ram";
+                       resets = <&ccu RST_VE>;
+                       interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+                       allwinner,sram = <&ve_sram 1>;
+               };
+
                mmc0: mmc@1c0f000 {
                        compatible = "allwinner,sun7i-a20-mmc";
                        reg = <0x01c0f000 0x1000>;
index 4e92741b24a70e222992f977e94d4f09d4486f41..c1cc8f09dd9abe054ae2e80cf38274ae4fbf25e1 100644 (file)
@@ -190,6 +190,21 @@ memory {
                reg = <0x40000000 0x80000000>;
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* Address must be kept in the lower 256 MiBs of DRAM for VE. */
+               cma_pool: cma@4a000000 {
+                       compatible = "shared-dma-pool";
+                       size = <0x6000000>;
+                       alloc-ranges = <0x4a000000 0x6000000>;
+                       reusable;
+                       linux,cma-default;
+               };
+       };
+
        sound: sound {
                compatible = "simple-audio-card";
                simple-audio-card,name = "sun8i-a33-audio";
@@ -254,6 +269,17 @@ tcon0_out_dsi: endpoint@1 {
                        };
                };
 
+               video-codec@01c0e000 {
+                       compatible = "allwinner,sun8i-a33-video-engine";
+                       reg = <0x01c0e000 0x1000>;
+                       clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
+                                <&ccu CLK_DRAM_VE>;
+                       clock-names = "ahb", "mod", "ram";
+                       resets = <&ccu RST_BUS_VE>;
+                       interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+                       allwinner,sram = <&ve_sram 1>;
+               };
+
                crypto: crypto-engine@1c15000 {
                        compatible = "allwinner,sun4i-a10-crypto";
                        reg = <0x01c15000 0x1000>;
index c7ce4158d6c8bccc3eb1b5322d8fe18a2d3aa34c..742d2946b08be48d205bee2ae6041632b27dccf1 100644 (file)
@@ -191,6 +191,11 @@ &mmc2 {
        status = "okay";
 };
 
+&r_cir {
+       clock-frequency = <3000000>;
+       status = "okay";
+};
+
 &r_rsb {
        status = "okay";
 
index 00a02b037320c75ffe313e1c847f7a19b9d3bd93..5617dd387fd35b4c7359a001834745918ed891c8 100644 (file)
@@ -990,6 +990,19 @@ r_cpucfg@1f01c00 {
                        reg = <0x1f01c00 0x400>;
                };
 
+               r_cir: ir@1f02000 {
+                       compatible = "allwinner,sun8i-a83t-ir",
+                               "allwinner,sun5i-a13-ir";
+                       clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
+                       clock-names = "apb", "ir";
+                       resets = <&r_ccu RST_APB0_IR>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       reg = <0x01f02000 0x400>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_cir_pin>;
+                       status = "disabled";
+               };
+
                r_pio: pinctrl@1f02c00 {
                        compatible = "allwinner,sun8i-a83t-r-pinctrl";
                        reg = <0x01f02c00 0x400>;
@@ -1002,6 +1015,11 @@ r_pio: pinctrl@1f02c00 {
                        interrupt-controller;
                        #interrupt-cells = <3>;
 
+                       r_cir_pin: r-cir-pin {
+                               pins = "PL12";
+                               function = "s_cir_rx";
+                       };
+
                        r_rsb_pins: r-rsb-pins {
                                pins = "PL0", "PL1";
                                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 (file)
index 0000000..fc4a8c3
--- /dev/null
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-bananapi-m2-plus-v1.2.dtsi"
+
+/ {
+       model = "Banana Pi BPI-M2-Plus v1.2 H3";
+       compatible = "bananapi,bpi-m2-plus-v1.2", "allwinner,sun8i-h3";
+};
index 30540dc8e0c5fd5c5657ca7ad725769e316bd185..195a75da13f1b87f1c571227781f40a27f4ee488 100644 (file)
 
 /dts-v1/;
 #include "sun8i-h3.dtsi"
-#include "sunxi-common-regulators.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
+#include "sunxi-bananapi-m2-plus.dtsi"
 
 / {
-       model = "Banana Pi BPI-M2-Plus";
+       model = "Banana Pi BPI-M2-Plus H3";
        compatible = "sinovoip,bpi-m2-plus", "allwinner,sun8i-h3";
-
-       aliases {
-               ethernet0 = &emac;
-               serial0 = &uart0;
-               serial1 = &uart1;
-       };
-
-       chosen {
-               stdout-path = "serial0:115200n8";
-       };
-
-       connector {
-               compatible = "hdmi-connector";
-               type = "a";
-
-               port {
-                       hdmi_con_in: endpoint {
-                               remote-endpoint = <&hdmi_out_con>;
-                       };
-               };
-       };
-
-       leds {
-               compatible = "gpio-leds";
-               pinctrl-names = "default";
-
-               pwr_led {
-                       label = "bananapi-m2-plus:red:pwr";
-                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
-                       default-state = "on";
-               };
-       };
-
-       gpio_keys {
-               compatible = "gpio-keys";
-               pinctrl-names = "default";
-
-               sw4 {
-                       label = "power";
-                       linux,code = <BTN_0>;
-                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-               };
-       };
-
-       reg_gmac_3v3: gmac-3v3 {
-                     compatible = "regulator-fixed";
-                     regulator-name = "gmac-3v3";
-                     regulator-min-microvolt = <3300000>;
-                     regulator-max-microvolt = <3300000>;
-                     startup-delay-us = <100000>;
-                     enable-active-high;
-                     gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
-       };
-
-       wifi_pwrseq: wifi_pwrseq {
-               compatible = "mmc-pwrseq-simple";
-               pinctrl-names = "default";
-               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
-       };
-};
-
-&de {
-       status = "okay";
-};
-
-&ehci0 {
-       status = "okay";
-};
-
-&ehci1 {
-       status = "okay";
-};
-
-&ehci2 {
-       status = "okay";
-};
-
-&emac {
-       pinctrl-names = "default";
-       pinctrl-0 = <&emac_rgmii_pins>;
-       phy-supply = <&reg_gmac_3v3>;
-       phy-handle = <&ext_rgmii_phy>;
-       phy-mode = "rgmii";
-
-       status = "okay";
-};
-
-&external_mdio {
-       ext_rgmii_phy: ethernet-phy@1 {
-               compatible = "ethernet-phy-ieee802.3-c22";
-               reg = <0>;
-       };
-};
-
-&hdmi {
-       status = "okay";
-};
-
-&hdmi_out {
-       hdmi_out_con: endpoint {
-               remote-endpoint = <&hdmi_con_in>;
-       };
-};
-
-&ir {
-       pinctrl-names = "default";
-       pinctrl-0 = <&ir_pins_a>;
-       status = "okay";
-};
-
-&mmc0 {
-       vmmc-supply = <&reg_vcc3v3>;
-       bus-width = <4>;
-       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
-       status = "okay";
-};
-
-&mmc1 {
-       vmmc-supply = <&reg_vcc3v3>;
-       vqmmc-supply = <&reg_vcc3v3>;
-       mmc-pwrseq = <&wifi_pwrseq>;
-       bus-width = <4>;
-       non-removable;
-       status = "okay";
-
-       brcmf: wifi@1 {
-               reg = <1>;
-               compatible = "brcm,bcm4329-fmac";
-               interrupt-parent = <&pio>;
-               interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
-               interrupt-names = "host-wake";
-       };
-};
-
-&mmc2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&mmc2_8bit_pins>;
-       vmmc-supply = <&reg_vcc3v3>;
-       vqmmc-supply = <&reg_vcc3v3>;
-       bus-width = <8>;
-       non-removable;
-       status = "okay";
-};
-
-&ohci0 {
-       status = "okay";
-};
-
-&ohci1 {
-       status = "okay";
-};
-
-&ohci2 {
-       status = "okay";
-};
-
-&reg_usb0_vbus {
-       gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
-       status = "okay";
-};
-
-&uart0 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart0_pins_a>;
-       status = "okay";
-};
-
-&uart1 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
-       status = "okay";
-};
-
-&usb_otg {
-       dr_mode = "otg";
-       status = "okay";
-};
-
-&usbphy {
-       usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
-       usb0_vbus-supply = <&reg_usb0_vbus>;
-       /* USB host VBUS is on as long as VCC-IO is on */
-       status = "okay";
 };
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 (file)
index 0000000..c834048
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
+ * Copyright (C) 2018 Diego Rondini <diego.rondini@kynetics.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+
+#include "sun8i-h3.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       model = "OrangePi Zero Plus2 H3";
+       compatible = "xunlong,orangepi-zero-plus2-h3", "allwinner,sun8i-h3";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       reg_vcc3v3: vcc3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
+               post-power-on-delay-ms = <200>;
+       };
+};
+
+&de {
+       status = "okay";
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&r_pio>;
+               interrupts = <0 7 IRQ_TYPE_LEVEL_LOW>;  /* PL7 */
+               interrupt-names = "host-wake";
+       };
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_8bit_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       cap-mmc-hw-reset;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
index f0096074a46786cf36c6a824aa6a7ce8bba824ac..3ecfabb101519c9da0b6de70749f7d4292df1479 100644 (file)
@@ -119,6 +119,20 @@ timer {
                             <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               cma_pool: cma@4a000000 {
+                       compatible = "shared-dma-pool";
+                       size = <0x6000000>;
+                       alloc-ranges = <0x4a000000 0x6000000>;
+                       reusable;
+                       linux,cma-default;
+               };
+       };
+
        soc {
                system-control@1c00000 {
                        compatible = "allwinner,sun8i-h3-system-control";
@@ -142,6 +156,17 @@ ve_sram: sram-section@0 {
                        };
                };
 
+               video-codec@01c0e000 {
+                       compatible = "allwinner,sun8i-h3-video-engine";
+                       reg = <0x01c0e000 0x1000>;
+                       clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
+                                <&ccu CLK_DRAM_VE>;
+                       clock-names = "ahb", "mod", "ram";
+                       resets = <&ccu RST_BUS_VE>;
+                       interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+                       allwinner,sram = <&ve_sram 1>;
+               };
+
                mali: gpu@1c40000 {
                        compatible = "allwinner,sun8i-h3-mali", "arm,mali-400";
                        reg = <0x01c40000 0x10000>;
index c39b9169ea64144e4ecc7aece7b06c9def1c52fe..438b7b44dab3ccedc9efd851a9888aaac958d4da 100644 (file)
@@ -105,6 +105,12 @@ wifi_pwrseq: wifi_pwrseq {
        };
 };
 
+&ahci {
+       ahci-supply = <&reg_dldo4>;
+       phy-supply = <&reg_eldo3>;
+       status = "okay";
+};
+
 &de {
        status = "okay";
 };
@@ -159,8 +165,7 @@ axp22x: pmic@34 {
 &mmc0 {
        vmmc-supply = <&reg_dcdc1>;
        bus-width = <4>;
-       cd-gpios = <&pio 7 13 GPIO_ACTIVE_HIGH>; /* PH13 */
-       cd-inverted;
+       cd-gpios = <&pio 7 13 GPIO_ACTIVE_LOW>; /* PH13 */
        status = "okay";
 };
 
@@ -251,6 +256,18 @@ &reg_dldo2 {
        regulator-name = "vcc-wifi";
 };
 
+&reg_dldo4 {
+       regulator-min-microvolt = <2500000>;
+       regulator-max-microvolt = <2500000>;
+       regulator-name = "vdd2v5-sata";
+};
+
+&reg_eldo3 {
+       regulator-min-microvolt = <1200000>;
+       regulator-max-microvolt = <1200000>;
+       regulator-name = "vdd1v2-sata";
+};
+
 &tcon_tv0 {
        status = "okay";
 };
index ffd9f00f74a46da89d88040db9178c8ef01a37d4..45ceb943a111eacd83f046298d6a78dbc2280b4b 100644 (file)
@@ -529,6 +529,19 @@ i2c4: i2c@1c2c000 {
                        #size-cells = <0>;
                };
 
+               ahci: sata@1c18000 {
+                       compatible = "allwinner,sun8i-r40-ahci";
+                       reg = <0x01c18000 0x1000>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&ccu CLK_BUS_SATA>, <&ccu CLK_SATA>;
+                       resets = <&ccu RST_BUS_SATA>;
+                       resets-name = "ahci";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+
+               };
+
                gmac: ethernet@1c50000 {
                        compatible = "allwinner,sun8i-r40-gmac";
                        syscon = <&ccu>;
index 880096c7e2523aee4174a9ce7fce4d853cf8e882..5e8a95af89b8c3539ff39f902059bdd256a0df43 100644 (file)
@@ -69,7 +69,8 @@ &i2c0 {
         */
        clock-frequency = <400000>;
 
-       touchscreen: touchscreen@0 {
+       touchscreen: touchscreen@40 {
+               reg = <0x40>;
                interrupt-parent = <&pio>;
                interrupts = <1 5 IRQ_TYPE_EDGE_FALLING>; /* PB5 */
                pinctrl-names = "default";
index 35859d8f3267fd2a1d6fa7e716e97094895f3530..bf97f6244c233f802393133d50456735d18766e7 100644 (file)
@@ -95,7 +95,7 @@ &ehci1 {
 &i2c0 {
        status = "okay";
 
-       axp22x: pmic@68 {
+       axp22x: pmic@34 {
                compatible = "x-powers,axp221";
                reg = <0x34>;
                interrupt-parent = <&nmi_intc>;
index 25591d6883ef2feb1fa89e28360bdeb14a048d13..d9532fb1ef65071936c047a25274b2b299c30dce 100644 (file)
@@ -1196,7 +1196,7 @@ r_rsb_pins: r-rsb-pins {
                        };
                };
 
-               r_rsb: i2c@8003400 {
+               r_rsb: rsb@8003400 {
                        compatible = "allwinner,sun8i-a23-rsb";
                        reg = <0x08003400 0x400>;
                        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 (file)
index 0000000..53edd1f
--- /dev/null
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
+ */
+
+#include "sunxi-bananapi-m2-plus.dtsi"
+
+/ {
+       /*
+        * Bananapi M2+ v1.2 uses a GPIO line to change the effective
+        * resistance on the CPU regulator's feedback pin.
+        */
+       reg_vdd_cpux: vdd-cpux {
+               compatible = "regulator-gpio";
+               regulator-name = "vdd-cpux";
+               regulator-type = "voltage";
+               regulator-boot-on;
+               regulator-always-on;
+               regulator-min-microvolt = <1100000>;
+               regulator-max-microvolt = <1300000>;
+               regulator-ramp-delay = <50>; /* 4ms */
+               gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
+               gpios-states = <0x1>;
+               states = <1100000 0x0
+                         1300000 0x1>;
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_vdd_cpux>;
+};
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 (file)
index 0000000..b3283ae
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       aliases {
+               ethernet0 = &emac;
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       connector {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&hdmi_out_con>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+
+               pwr_led {
+                       label = "bananapi-m2-plus:red:pwr";
+                       gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
+                       default-state = "on";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+
+               sw4 {
+                       label = "power";
+                       linux,code = <BTN_0>;
+                       gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       reg_gmac_3v3: gmac-3v3 {
+                     compatible = "regulator-fixed";
+                     regulator-name = "gmac-3v3";
+                     regulator-min-microvolt = <3300000>;
+                     regulator-max-microvolt = <3300000>;
+                     startup-delay-us = <100000>;
+                     enable-active-high;
+                     gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+       };
+};
+
+&de {
+       status = "okay";
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&ehci2 {
+       status = "okay";
+};
+
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_rgmii_pins>;
+       phy-supply = <&reg_gmac_3v3>;
+       phy-handle = <&ext_rgmii_phy>;
+       phy-mode = "rgmii";
+
+       status = "okay";
+};
+
+&external_mdio {
+       ext_rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
+&hdmi {
+       status = "okay";
+};
+
+&hdmi_out {
+       hdmi_out_con: endpoint {
+               remote-endpoint = <&hdmi_con_in>;
+       };
+};
+
+&ir {
+       pinctrl-names = "default";
+       pinctrl-0 = <&ir_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+       status = "okay";
+};
+
+&mmc1 {
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&pio>;
+               interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
+               interrupt-names = "host-wake";
+       };
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_8bit_pins>;
+       vmmc-supply = <&reg_vcc3v3>;
+       vqmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+&ohci2 {
+       status = "okay";
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 3 11 GPIO_ACTIVE_HIGH>; /* PD11 */
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usbphy {
+       usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       /* USB host VBUS is on as long as VCC-IO is on */
+       status = "okay";
+};
index fc6131315c47ffe695a4db6cbf0f7e38a8b89221..4b1530ebe4272887f33c85e00669e4781618848e 100644 (file)
@@ -816,7 +816,7 @@ ir: ir@1f02000 {
                        clock-names = "apb", "ir";
                        resets = <&r_ccu RST_APB0_IR>;
                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                       reg = <0x01f02000 0x40>;
+                       reg = <0x01f02000 0x400>;
                        status = "disabled";
                };
 
index a6ad759dddb479417c517a69ea93c637317f9972..eaee10ef6512ec0b35b6a4163eebd83bd03c230f 100644 (file)
@@ -72,6 +72,7 @@ pci@1,0 {
        host1x@50000000 {
                hdmi@54280000 {
                        status = "okay";
+                       hdmi-supply = <&reg_5v0>;
                };
        };
 
@@ -122,7 +123,7 @@ rtc@68 {
        /*
         * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
         */
-       hdmi_ddc: i2c@7000c400 {
+       i2c@7000c400 {
                status = "okay";
        };
 
@@ -141,29 +142,19 @@ i2c@7000c500 {
        spi@7000d400 {
                status = "okay";
                spi-max-frequency = <50000000>;
-
-               spidev0: spidev@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <50000000>;
-               };
        };
 
        /* SPI4: Apalis SPI2 */
        spi@7000da00 {
                status = "okay";
                spi-max-frequency = <50000000>;
-
-               spidev1: spidev@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <50000000>;
-               };
        };
 
        /* Apalis Serial ATA */
        sata@70020000 {
                status = "okay";
+               target-5v-supply = <&reg_5v0>;
+               target-12v-supply = <&reg_12v0>;
        };
 
        hda@70030000 {
@@ -177,18 +168,18 @@ usb@70090000 {
        /* Apalis MMC1 */
        sdhci@700b0000 {
                status = "okay";
+               bus-width = <4>;
                /* MMC1_CD# */
                cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
-               bus-width = <4>;
                vqmmc-supply = <&vddio_sdmmc1>;
        };
 
        /* Apalis SD1 */
        sdhci@700b0400 {
                status = "okay";
+               bus-width = <4>;
                /* SD1_CD# */
                cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-               bus-width = <4>;
                vqmmc-supply = <&vddio_sdmmc3>;
        };
 
@@ -225,11 +216,12 @@ usb-phy@7d008000 {
 
        backlight: backlight {
                compatible = "pwm-backlight";
-               pwms = <&pwm 3 5000000>; /* BKL1_PWM */
                brightness-levels = <255 231 223 207 191 159 127 0>;
                default-brightness-level = <6>;
                /* BKL1_ON */
                enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 3 5000000>; /* BKL1_PWM */
        };
 
        gpio-keys {
@@ -244,6 +236,13 @@ wakeup {
                };
        };
 
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        reg_5v0: regulator-5v0 {
                compatible = "regulator-fixed";
                regulator-name = "5V_SW";
@@ -251,6 +250,13 @@ reg_5v0: regulator-5v0 {
                regulator-max-microvolt = <5000000>;
        };
 
+       reg_12v0: regulator-12v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "12V_SW";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+       };
+
        /* USBO1_EN */
        reg_usbo1_vbus: regulator-usbo1-vbus {
                compatible = "regulator-fixed";
@@ -276,7 +282,7 @@ reg_usbh_vbus: regulator-usbh-vbus {
 
 &gpio {
        /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
-       pex_perst_n {
+       pex-perst-n {
                gpio-hog;
                gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
                output-high;
index 8a8d5fa0ecd1e6c88989d507b6a317a1ea36fd9b..7961eb4bd8038490f5a9cd3530c93f6edc5f94fc 100644 (file)
@@ -11,7 +11,8 @@
 / {
        model = "Toradex Apalis TK1 on Apalis Evaluation Board";
        compatible = "toradex,apalis-tk1-v1.2-eval", "toradex,apalis-tk1-eval",
-                    "toradex,apalis-tk1", "nvidia,tegra124";
+                    "toradex,apalis-tk1-v1.2", "toradex,apalis-tk1",
+                    "nvidia,tegra124";
 
        aliases {
                rtc0 = "/i2c@7000c000/rtc@68";
@@ -36,6 +37,7 @@ pci@1,0 {
        host1x@50000000 {
                hdmi@54280000 {
                        status = "okay";
+                       hdmi-supply = <&reg_5v0>;
                };
        };
 
@@ -98,7 +100,7 @@ i2c@7000c500 {
         * I2C4 (DDC): I2C4_SDA/SCL (DDC) on MXM3 pin 205/207
         * (e.g. display EDID)
         */
-       hdmi_ddc: i2c@7000c700 {
+       i2c@7000c700 {
                status = "okay";
        };
 
@@ -106,29 +108,19 @@ hdmi_ddc: i2c@7000c700 {
        spi@7000d400 {
                status = "okay";
                spi-max-frequency = <50000000>;
-
-               spidev0: spidev@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <50000000>;
-               };
        };
 
        /* SPI4: Apalis SPI2 */
        spi@7000da00 {
                status = "okay";
                spi-max-frequency = <50000000>;
-
-               spidev1: spidev@0 {
-                       compatible = "spidev";
-                       reg = <0>;
-                       spi-max-frequency = <50000000>;
-               };
        };
 
        /* Apalis Serial ATA */
        sata@70020000 {
                status = "okay";
+               target-5v-supply = <&reg_5v0>;
+               target-12v-supply = <&reg_12v0>;
        };
 
        hda@70030000 {
@@ -142,18 +134,18 @@ usb@70090000 {
        /* Apalis MMC1 */
        sdhci@700b0000 {
                status = "okay";
+               bus-width = <4>;
                /* MMC1_CD# */
                cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
-               bus-width = <4>;
                vqmmc-supply = <&vddio_sdmmc1>;
        };
 
        /* Apalis SD1 */
        sdhci@700b0400 {
                status = "okay";
+               bus-width = <4>;
                /* SD1_CD# */
                cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-               bus-width = <4>;
                vqmmc-supply = <&vddio_sdmmc3>;
        };
 
@@ -190,11 +182,12 @@ usb-phy@7d008000 {
 
        backlight: backlight {
                compatible = "pwm-backlight";
-               pwms = <&pwm 3 5000000>; /* BKL1_PWM */
                brightness-levels = <255 231 223 207 191 159 127 0>;
                default-brightness-level = <6>;
                /* BKL1_ON */
                enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 3 5000000>; /* BKL1_PWM */
        };
 
        gpio-keys {
@@ -209,6 +202,13 @@ wakeup {
                };
        };
 
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        reg_5v0: regulator-5v0 {
                compatible = "regulator-fixed";
                regulator-name = "5V_SW";
@@ -216,6 +216,13 @@ reg_5v0: regulator-5v0 {
                regulator-max-microvolt = <5000000>;
        };
 
+       reg_12v0: regulator-12v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "12V_SW";
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+       };
+
        /* USBO1_EN */
        reg_usbo1_vbus: regulator-usbo1-vbus {
                compatible = "regulator-fixed";
@@ -241,7 +248,7 @@ reg_usbh_vbus: regulator-usbh-vbus {
 
 &gpio {
        /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
-       pex_perst_n {
+       pex-perst-n {
                gpio-hog;
                gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
                output-high;
index 573aaa50fff1c47f0eae1492bc8ed575a3510f0f..367eb8c86098ebc1ff56ebf3ea53656770f2636a 100644 (file)
  * Compatible for Revisions 2GB: V1.2A
  */
 / {
-       model = "Toradex Apalis TK1";
-       compatible = "toradex,apalis-tk1-v1.2", "toradex,apalis-tk1",
-                    "nvidia,tegra124";
-
        memory@80000000 {
                reg = <0x0 0x80000000 0x0 0x80000000>;
        };
 
        pcie@1003000 {
                status = "okay";
-               avddio-pex-supply = <&vdd_1v05>;
-               avdd-pex-pll-supply = <&vdd_1v05>;
-               avdd-pll-erefe-supply = <&avdd_1v05>;
-               dvddio-pex-supply = <&vdd_1v05>;
-               hvdd-pex-pll-e-supply = <&reg_3v3>;
-               hvdd-pex-supply = <&reg_3v3>;
-               vddio-pex-ctl-supply = <&reg_3v3>;
+               avddio-pex-supply = <&reg_1v05_vdd>;
+               avdd-pex-pll-supply = <&reg_1v05_vdd>;
+               avdd-pll-erefe-supply = <&reg_1v05_avdd>;
+               dvddio-pex-supply = <&reg_1v05_vdd>;
+               hvdd-pex-pll-e-supply = <&reg_module_3v3>;
+               hvdd-pex-supply = <&reg_module_3v3>;
+               vddio-pex-ctl-supply = <&reg_module_3v3>;
 
                /* Apalis PCIe (additional lane Apalis type specific) */
                pci@1,0 {
@@ -42,16 +38,21 @@ pci@2,0 {
                        phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
                        phy-names = "pcie-0";
                        status = "okay";
+
+                       pcie@0 {
+                               reg = <0 0 0 0 0>;
+                               local-mac-address = [00 00 00 00 00 00];
+                       };
                };
        };
 
        host1x@50000000 {
                hdmi@54280000 {
-                       pll-supply = <&reg_1v05_avdd_hdmi_pll>;
-                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                        nvidia,ddc-i2c-bus = <&hdmi_ddc>;
                        nvidia,hpd-gpio =
                                <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+                       pll-supply = <&reg_1v05_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                };
        };
 
@@ -60,44 +61,44 @@ gpu@0,57000000 {
                 * Node left disabled on purpose - the bootloader will enable
                 * it after having set the VPR up
                 */
-               vdd-supply = <&vdd_gpu>;
+               vdd-supply = <&reg_vdd_gpu>;
        };
 
-       pinmux: pinmux@70000868 {
+       pinmux@70000868 {
                pinctrl-names = "default";
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
                        /* Analogue Audio (On-module) */
-                       dap3_fs_pp0 {
+                       dap3-fs-pp0 {
                                nvidia,pins = "dap3_fs_pp0";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_din_pp1 {
+                       dap3-din-pp1 {
                                nvidia,pins = "dap3_din_pp1";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap3_dout_pp2 {
+                       dap3-dout-pp2 {
                                nvidia,pins = "dap3_dout_pp2";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_sclk_pp3 {
+                       dap3-sclk-pp3 {
                                nvidia,pins = "dap3_sclk_pp3";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap_mclk1_pw4 {
+                       dap-mclk1-pw4 {
                                nvidia,pins = "dap_mclk1_pw4";
                                nvidia,function = "extperiph1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -124,7 +125,7 @@ pu6 {
                        };
 
                        /* Apalis CAM1_MCLK */
-                       cam_mclk_pcc0 {
+                       cam-mclk-pcc0 {
                                nvidia,pins = "cam_mclk_pcc0";
                                nvidia,function = "vi_alt3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -133,28 +134,28 @@ cam_mclk_pcc0 {
                        };
 
                        /* Apalis Digital Audio */
-                       dap2_fs_pa2 {
+                       dap2-fs-pa2 {
                                nvidia,pins = "dap2_fs_pa2";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_sclk_pa3 {
+                       dap2-sclk-pa3 {
                                nvidia,pins = "dap2_sclk_pa3";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_din_pa4 {
+                       dap2-din-pa4 {
                                nvidia,pins = "dap2_din_pa4";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_dout_pa5 {
+                       dap2-dout-pa5 {
                                nvidia,pins = "dap2_dout_pa5";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -167,7 +168,7 @@ pbb3 { /* DAP1_RESET */
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       clk3_out_pee0 {
+                       clk3-out-pee0 {
                                nvidia,pins = "clk3_out_pee0";
                                nvidia,function = "extperiph3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -176,7 +177,7 @@ clk3_out_pee0 {
                        };
 
                        /* Apalis GPIO */
-                       usb_vbus_en0_pn4 {
+                       usb-vbus-en0-pn4 {
                                nvidia,pins = "usb_vbus_en0_pn4";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -184,7 +185,7 @@ usb_vbus_en0_pn4 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_DISABLE>;
                        };
-                       usb_vbus_en1_pn5 {
+                       usb-vbus-en1-pn5 {
                                nvidia,pins = "usb_vbus_en1_pn5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -192,35 +193,35 @@ usb_vbus_en1_pn5 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_DISABLE>;
                        };
-                       pex_l0_rst_n_pdd1 {
+                       pex-l0-rst-n-pdd1 {
                                nvidia,pins = "pex_l0_rst_n_pdd1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l0_clkreq_n_pdd2 {
+                       pex-l0-clkreq-n-pdd2 {
                                nvidia,pins = "pex_l0_clkreq_n_pdd2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l1_rst_n_pdd5 {
+                       pex-l1-rst-n-pdd5 {
                                nvidia,pins = "pex_l1_rst_n_pdd5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l1_clkreq_n_pdd6 {
+                       pex-l1-clkreq-n-pdd6 {
                                nvidia,pins = "pex_l1_clkreq_n_pdd6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dp_hpd_pff0 {
+                       dp-hpd-pff0 {
                                nvidia,pins = "dp_hpd_pff0";
                                nvidia,function = "dp";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -244,7 +245,7 @@ owr { /* PEX_L1_CLKREQ_N multiplexed GPIO6 */
                        };
 
                        /* Apalis HDMI1_CEC */
-                       hdmi_cec_pee3 {
+                       hdmi-cec-pee3 {
                                nvidia,pins = "hdmi_cec_pee3";
                                nvidia,function = "cec";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -254,7 +255,7 @@ hdmi_cec_pee3 {
                        };
 
                        /* Apalis HDMI1_HPD */
-                       hdmi_int_pn7 {
+                       hdmi-int-pn7 {
                                nvidia,pins = "hdmi_int_pn7";
                                nvidia,function = "rsvd1";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -264,7 +265,7 @@ hdmi_int_pn7 {
                        };
 
                        /* Apalis I2C1 */
-                       gen1_i2c_scl_pc4 {
+                       gen1-i2c-scl-pc4 {
                                nvidia,pins = "gen1_i2c_scl_pc4";
                                nvidia,function = "i2c1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -272,7 +273,7 @@ gen1_i2c_scl_pc4 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       gen1_i2c_sda_pc5 {
+                       gen1-i2c-sda-pc5 {
                                nvidia,pins = "gen1_i2c_sda_pc5";
                                nvidia,function = "i2c1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -282,7 +283,7 @@ gen1_i2c_sda_pc5 {
                        };
 
                        /* Apalis I2C3 (CAM) */
-                       cam_i2c_scl_pbb1 {
+                       cam-i2c-scl-pbb1 {
                                nvidia,pins = "cam_i2c_scl_pbb1";
                                nvidia,function = "i2c3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -290,7 +291,7 @@ cam_i2c_scl_pbb1 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       cam_i2c_sda_pbb2 {
+                       cam-i2c-sda-pbb2 {
                                nvidia,pins = "cam_i2c_sda_pbb2";
                                nvidia,function = "i2c3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -300,7 +301,7 @@ cam_i2c_sda_pbb2 {
                        };
 
                        /* Apalis I2C4 (DDC) */
-                       ddc_scl_pv4 {
+                       ddc-scl-pv4 {
                                nvidia,pins = "ddc_scl_pv4";
                                nvidia,function = "i2c4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -308,7 +309,7 @@ ddc_scl_pv4 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,rcv-sel = <TEGRA_PIN_ENABLE>;
                        };
-                       ddc_sda_pv5 {
+                       ddc-sda-pv5 {
                                nvidia,pins = "ddc_sda_pv5";
                                nvidia,function = "i2c4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -318,77 +319,77 @@ ddc_sda_pv5 {
                        };
 
                        /* Apalis MMC1 */
-                       sdmmc1_cd_n_pv3 { /* CD# GPIO */
+                       sdmmc1-cd-n-pv3 { /* CD# GPIO */
                                nvidia,pins = "sdmmc1_wp_n_pv3";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       clk2_out_pw5 { /* D5 GPIO */
+                       clk2-out-pw5 { /* D5 GPIO */
                                nvidia,pins = "clk2_out_pw5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat3_py4 {
+                       sdmmc1-dat3-py4 {
                                nvidia,pins = "sdmmc1_dat3_py4";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat2_py5 {
+                       sdmmc1-dat2-py5 {
                                nvidia,pins = "sdmmc1_dat2_py5";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat1_py6 {
+                       sdmmc1-dat1-py6 {
                                nvidia,pins = "sdmmc1_dat1_py6";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat0_py7 {
+                       sdmmc1-dat0-py7 {
                                nvidia,pins = "sdmmc1_dat0_py7";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_clk_pz0 {
+                       sdmmc1-clk-pz0 {
                                nvidia,pins = "sdmmc1_clk_pz0";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_cmd_pz1 {
+                       sdmmc1-cmd-pz1 {
                                nvidia,pins = "sdmmc1_cmd_pz1";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       clk2_req_pcc5 { /* D4 GPIO */
+                       clk2-req-pcc5 { /* D4 GPIO */
                                nvidia,pins = "clk2_req_pcc5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */
+                       sdmmc3-clk-lb-in-pee5 { /* D6 GPIO */
                                nvidia,pins = "sdmmc3_clk_lb_in_pee5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       usb_vbus_en2_pff1 { /* D7 GPIO */
+                       usb-vbus-en2-pff1 { /* D7 GPIO */
                                nvidia,pins = "usb_vbus_en2_pff1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -428,7 +429,7 @@ ph3 {
                        };
 
                        /* Apalis SATA1_ACT# */
-                       dap1_dout_pn2 {
+                       dap1-dout-pn2 {
                                nvidia,pins = "dap1_dout_pn2";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -437,49 +438,49 @@ dap1_dout_pn2 {
                        };
 
                        /* Apalis SD1 */
-                       sdmmc3_clk_pa6 {
+                       sdmmc3-clk-pa6 {
                                nvidia,pins = "sdmmc3_clk_pa6";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_cmd_pa7 {
+                       sdmmc3-cmd-pa7 {
                                nvidia,pins = "sdmmc3_cmd_pa7";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat3_pb4 {
+                       sdmmc3-dat3-pb4 {
                                nvidia,pins = "sdmmc3_dat3_pb4";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat2_pb5 {
+                       sdmmc3-dat2-pb5 {
                                nvidia,pins = "sdmmc3_dat2_pb5";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat1_pb6 {
+                       sdmmc3-dat1-pb6 {
                                nvidia,pins = "sdmmc3_dat1_pb6";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat0_pb7 {
+                       sdmmc3-dat0-pb7 {
                                nvidia,pins = "sdmmc3_dat0_pb7";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_cd_n_pv2 { /* CD# GPIO */
+                       sdmmc3-cd-n-pv2 { /* CD# GPIO */
                                nvidia,pins = "sdmmc3_cd_n_pv2";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -488,14 +489,14 @@ sdmmc3_cd_n_pv2 { /* CD# GPIO */
                        };
 
                        /* Apalis SPDIF */
-                       spdif_out_pk5 {
+                       spdif-out-pk5 {
                                nvidia,pins = "spdif_out_pk5";
                                nvidia,function = "spdif";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       spdif_in_pk6 {
+                       spdif-in-pk6 {
                                nvidia,pins = "spdif_in_pk6";
                                nvidia,function = "spdif";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -504,28 +505,28 @@ spdif_in_pk6 {
                        };
 
                        /* Apalis SPI1 */
-                       ulpi_clk_py0 {
+                       ulpi-clk-py0 {
                                nvidia,pins = "ulpi_clk_py0";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_dir_py1 {
+                       ulpi-dir-py1 {
                                nvidia,pins = "ulpi_dir_py1";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       ulpi_nxt_py2 {
+                       ulpi-nxt-py2 {
                                nvidia,pins = "ulpi_nxt_py2";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_stp_py3 {
+                       ulpi-stp-py3 {
                                nvidia,pins = "ulpi_stp_py3";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -578,42 +579,42 @@ pk7 { /* RI GPIO */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_txd_pu0 {
+                       uart1-txd-pu0 {
                                nvidia,pins = "pu0";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart1_rxd_pu1 {
+                       uart1-rxd-pu1 {
                                nvidia,pins = "pu1";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_cts_n_pu2 {
+                       uart1-cts-n-pu2 {
                                nvidia,pins = "pu2";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_rts_n_pu3 {
+                       uart1-rts-n-pu3 {
                                nvidia,pins = "pu3";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart3_cts_n_pa1 { /* DSR GPIO */
+                       uart3-cts-n-pa1 { /* DSR GPIO */
                                nvidia,pins = "uart3_cts_n_pa1";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart3_rts_n_pc0 { /* DTR GPIO */
+                       uart3-rts-n-pc0 { /* DTR GPIO */
                                nvidia,pins = "uart3_rts_n_pc0";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -622,28 +623,28 @@ uart3_rts_n_pc0 { /* DTR GPIO */
                        };
 
                        /* Apalis UART2 */
-                       uart2_txd_pc2 {
+                       uart2-txd-pc2 {
                                nvidia,pins = "uart2_txd_pc2";
                                nvidia,function = "irda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart2_rxd_pc3 {
+                       uart2-rxd-pc3 {
                                nvidia,pins = "uart2_rxd_pc3";
                                nvidia,function = "irda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart2_cts_n_pj5 {
+                       uart2-cts-n-pj5 {
                                nvidia,pins = "uart2_cts_n_pj5";
                                nvidia,function = "uartb";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart2_rts_n_pj6 {
+                       uart2-rts-n-pj6 {
                                nvidia,pins = "uart2_rts_n_pj6";
                                nvidia,function = "uartb";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -652,14 +653,14 @@ uart2_rts_n_pj6 {
                        };
 
                        /* Apalis UART3 */
-                       uart3_txd_pw6 {
+                       uart3-txd-pw6 {
                                nvidia,pins = "uart3_txd_pw6";
                                nvidia,function = "uartc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart3_rxd_pw7 {
+                       uart3-rxd-pw7 {
                                nvidia,pins = "uart3_rxd_pw7";
                                nvidia,function = "uartc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -668,14 +669,14 @@ uart3_rxd_pw7 {
                        };
 
                        /* Apalis UART4 */
-                       uart4_rxd_pb0 {
+                       uart4-rxd-pb0 {
                                nvidia,pins = "pb0";
                                nvidia,function = "uartd";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart4_txd_pj7 {
+                       uart4-txd-pj7 {
                                nvidia,pins = "pj7";
                                nvidia,function = "uartd";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -684,7 +685,7 @@ uart4_txd_pj7 {
                        };
 
                        /* Apalis USBH_EN */
-                       gen2_i2c_sda_pt6 {
+                       gen2-i2c-sda-pt6 {
                                nvidia,pins = "gen2_i2c_sda_pt6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -703,7 +704,7 @@ pbb0 {
                        };
 
                        /* Apalis USBO1_EN */
-                       gen2_i2c_scl_pt5 {
+                       gen2-i2c-scl-pt5 {
                                nvidia,pins = "gen2_i2c_scl_pt5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -722,7 +723,7 @@ pbb4 {
                        };
 
                        /* Apalis WAKE1_MICO */
-                       pex_wake_n_pdd3 {
+                       pex-wake-n-pdd3 {
                                nvidia,pins = "pex_wake_n_pdd3";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -731,7 +732,7 @@ pex_wake_n_pdd3 {
                        };
 
                        /* CORE_PWR_REQ */
-                       core_pwr_req {
+                       core-pwr-req {
                                nvidia,pins = "core_pwr_req";
                                nvidia,function = "pwron";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -740,7 +741,7 @@ core_pwr_req {
                        };
 
                        /* CPU_PWR_REQ */
-                       cpu_pwr_req {
+                       cpu-pwr-req {
                                nvidia,pins = "cpu_pwr_req";
                                nvidia,function = "cpu";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -749,14 +750,14 @@ cpu_pwr_req {
                        };
 
                        /* DVFS */
-                       dvfs_pwm_px0 {
+                       dvfs-pwm-px0 {
                                nvidia,pins = "dvfs_pwm_px0";
                                nvidia,function = "cldvfs";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dvfs_clk_px2 {
+                       dvfs-clk-px2 {
                                nvidia,pins = "dvfs_clk_px2";
                                nvidia,function = "cldvfs";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -765,70 +766,70 @@ dvfs_clk_px2 {
                        };
 
                        /* eMMC */
-                       sdmmc4_dat0_paa0 {
+                       sdmmc4-dat0-paa0 {
                                nvidia,pins = "sdmmc4_dat0_paa0";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat1_paa1 {
+                       sdmmc4-dat1-paa1 {
                                nvidia,pins = "sdmmc4_dat1_paa1";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat2_paa2 {
+                       sdmmc4-dat2-paa2 {
                                nvidia,pins = "sdmmc4_dat2_paa2";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat3_paa3 {
+                       sdmmc4-dat3-paa3 {
                                nvidia,pins = "sdmmc4_dat3_paa3";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat4_paa4 {
+                       sdmmc4-dat4-paa4 {
                                nvidia,pins = "sdmmc4_dat4_paa4";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat5_paa5 {
+                       sdmmc4-dat5-paa5 {
                                nvidia,pins = "sdmmc4_dat5_paa5";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat6_paa6 {
+                       sdmmc4-dat6-paa6 {
                                nvidia,pins = "sdmmc4_dat6_paa6";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat7_paa7 {
+                       sdmmc4-dat7-paa7 {
                                nvidia,pins = "sdmmc4_dat7_paa7";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_clk_pcc4 {
+                       sdmmc4-clk-pcc4 {
                                nvidia,pins = "sdmmc4_clk_pcc4";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_cmd_pt7 {
+                       sdmmc4-cmd-pt7 {
                                nvidia,pins = "sdmmc4_cmd_pt7";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -837,7 +838,7 @@ sdmmc4_cmd_pt7 {
                        };
 
                        /* JTAG_RTCK */
-                       jtag_rtck {
+                       jtag-rtck {
                                nvidia,pins = "jtag_rtck";
                                nvidia,function = "rtck";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -846,7 +847,7 @@ jtag_rtck {
                        };
 
                        /* LAN_DEV_OFF# */
-                       ulpi_data5_po6 {
+                       ulpi-data5-po6 {
                                nvidia,pins = "ulpi_data5_po6";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -855,7 +856,7 @@ ulpi_data5_po6 {
                        };
 
                        /* LAN_RESET# */
-                       kb_row10_ps2 {
+                       kb-row10-ps2 {
                                nvidia,pins = "kb_row10_ps2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -864,7 +865,7 @@ kb_row10_ps2 {
                        };
 
                        /* LAN_WAKE# */
-                       ulpi_data4_po5 {
+                       ulpi-data4-po5 {
                                nvidia,pins = "ulpi_data4_po5";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -918,35 +919,35 @@ pbb6 {
                        };
 
                        /* MCU SPI */
-                       gpio_x4_aud_px4 {
+                       gpio-x4-aud-px4 {
                                nvidia,pins = "gpio_x4_aud_px4";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x5_aud_px5 {
+                       gpio-x5-aud-px5 {
                                nvidia,pins = "gpio_x5_aud_px5";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x6_aud_px6 { /* MCU_CS */
+                       gpio-x6-aud-px6 { /* MCU_CS */
                                nvidia,pins = "gpio_x6_aud_px6";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x7_aud_px7 {
+                       gpio-x7-aud-px7 {
                                nvidia,pins = "gpio_x7_aud_px7";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       gpio_w2_aud_pw2 { /* MCU_CSEZP */
+                       gpio-w2-aud-pw2 { /* MCU_CSEZP */
                                nvidia,pins = "gpio_w2_aud_pw2";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -955,7 +956,7 @@ gpio_w2_aud_pw2 { /* MCU_CSEZP */
                        };
 
                        /* PMIC_CLK_32K */
-                       clk_32k_in {
+                       clk-32k-in {
                                nvidia,pins = "clk_32k_in";
                                nvidia,function = "clk";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -964,7 +965,7 @@ clk_32k_in {
                        };
 
                        /* PMIC_CPU_OC_INT */
-                       clk_32k_out_pa0 {
+                       clk-32k-out-pa0 {
                                nvidia,pins = "clk_32k_out_pa0";
                                nvidia,function = "soc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -973,7 +974,7 @@ clk_32k_out_pa0 {
                        };
 
                        /* PWR_I2C */
-                       pwr_i2c_scl_pz6 {
+                       pwr-i2c-scl-pz6 {
                                nvidia,pins = "pwr_i2c_scl_pz6";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -981,7 +982,7 @@ pwr_i2c_scl_pz6 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       pwr_i2c_sda_pz7 {
+                       pwr-i2c-sda-pz7 {
                                nvidia,pins = "pwr_i2c_sda_pz7";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -991,7 +992,7 @@ pwr_i2c_sda_pz7 {
                        };
 
                        /* PWR_INT_N */
-                       pwr_int_n {
+                       pwr-int-n {
                                nvidia,pins = "pwr_int_n";
                                nvidia,function = "pmi";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1009,7 +1010,7 @@ pu4 {
                        };
 
                        /* RESET_OUT_N */
-                       reset_out_n {
+                       reset-out-n {
                                nvidia,pins = "reset_out_n";
                                nvidia,function = "reset_out_n";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1018,14 +1019,14 @@ reset_out_n {
                        };
 
                        /* SHIFT_CTRL_DIR_IN */
-                       kb_row0_pr0 {
+                       kb-row0-pr0 {
                                nvidia,pins = "kb_row0_pr0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row1_pr1 {
+                       kb-row1-pr1 {
                                nvidia,pins = "kb_row1_pr1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1034,7 +1035,7 @@ kb_row1_pr1 {
                        };
 
                        /* Configure level-shifter as output for HDA */
-                       kb_row11_ps3 {
+                       kb-row11-ps3 {
                                nvidia,pins = "kb_row11_ps3";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1043,21 +1044,21 @@ kb_row11_ps3 {
                        };
 
                        /* SHIFT_CTRL_DIR_OUT */
-                       kb_col5_pq5 {
+                       kb-col5-pq5 {
                                nvidia,pins = "kb_col5_pq5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col6_pq6 {
+                       kb-col6-pq6 {
                                nvidia,pins = "kb_col6_pq6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col7_pq7 {
+                       kb-col7-pq7 {
                                nvidia,pins = "kb_col7_pq7";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1066,35 +1067,35 @@ kb_col7_pq7 {
                        };
 
                        /* SHIFT_CTRL_OE */
-                       kb_col0_pq0 {
+                       kb-col0-pq0 {
                                nvidia,pins = "kb_col0_pq0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col1_pq1 {
+                       kb-col1-pq1 {
                                nvidia,pins = "kb_col1_pq1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col2_pq2 {
+                       kb-col2-pq2 {
                                nvidia,pins = "kb_col2_pq2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col4_pq4 {
+                       kb-col4-pq4 {
                                nvidia,pins = "kb_col4_pq4";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row2_pr2 {
+                       kb-row2-pr2 {
                                nvidia,pins = "kb_row2_pr2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1112,7 +1113,7 @@ pi6 {
                        };
 
                        /* TOUCH_INT */
-                       gpio_w3_aud_pw3 {
+                       gpio-w3-aud-pw3 {
                                nvidia,pins = "gpio_w3_aud_pw3";
                                nvidia,function = "spi6";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1253,189 +1254,189 @@ pk4 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_fs_pn0 { /* NC */
+                       dap1-fs-pn0 { /* NC */
                                nvidia,pins = "dap1_fs_pn0";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_din_pn1 { /* NC */
+                       dap1-din-pn1 { /* NC */
                                nvidia,pins = "dap1_din_pn1";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_sclk_pn3 { /* NC */
+                       dap1-sclk-pn3 { /* NC */
                                nvidia,pins = "dap1_sclk_pn3";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data7_po0 { /* NC */
+                       ulpi-data7-po0 { /* NC */
                                nvidia,pins = "ulpi_data7_po0";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data0_po1 { /* NC */
+                       ulpi-data0-po1 { /* NC */
                                nvidia,pins = "ulpi_data0_po1";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data1_po2 { /* NC */
+                       ulpi-data1-po2 { /* NC */
                                nvidia,pins = "ulpi_data1_po2";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data2_po3 { /* NC */
+                       ulpi-data2-po3 { /* NC */
                                nvidia,pins = "ulpi_data2_po3";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data3_po4 { /* NC */
+                       ulpi-data3-po4 { /* NC */
                                nvidia,pins = "ulpi_data3_po4";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data6_po7 { /* NC */
+                       ulpi-data6-po7 { /* NC */
                                nvidia,pins = "ulpi_data6_po7";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_fs_pp4 { /* NC */
+                       dap4-fs-pp4 { /* NC */
                                nvidia,pins = "dap4_fs_pp4";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_din_pp5 { /* NC */
+                       dap4-din-pp5 { /* NC */
                                nvidia,pins = "dap4_din_pp5";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_dout_pp6 { /* NC */
+                       dap4-dout-pp6 { /* NC */
                                nvidia,pins = "dap4_dout_pp6";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_sclk_pp7 { /* NC */
+                       dap4-sclk-pp7 { /* NC */
                                nvidia,pins = "dap4_sclk_pp7";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col3_pq3 { /* NC */
+                       kb-col3-pq3 { /* NC */
                                nvidia,pins = "kb_col3_pq3";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row3_pr3 { /* NC */
+                       kb-row3-pr3 { /* NC */
                                nvidia,pins = "kb_row3_pr3";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row4_pr4 { /* NC */
+                       kb-row4-pr4 { /* NC */
                                nvidia,pins = "kb_row4_pr4";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row5_pr5 { /* NC */
+                       kb-row5-pr5 { /* NC */
                                nvidia,pins = "kb_row5_pr5";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row6_pr6 { /* NC */
+                       kb-row6-pr6 { /* NC */
                                nvidia,pins = "kb_row6_pr6";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row7_pr7 { /* NC */
+                       kb-row7-pr7 { /* NC */
                                nvidia,pins = "kb_row7_pr7";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row8_ps0 { /* NC */
+                       kb-row8-ps0 { /* NC */
                                nvidia,pins = "kb_row8_ps0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row9_ps1 { /* NC */
+                       kb-row9-ps1 { /* NC */
                                nvidia,pins = "kb_row9_ps1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row12_ps4 { /* NC */
+                       kb-row12-ps4 { /* NC */
                                nvidia,pins = "kb_row12_ps4";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row13_ps5 { /* NC */
+                       kb-row13-ps5 { /* NC */
                                nvidia,pins = "kb_row13_ps5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row14_ps6 { /* NC */
+                       kb-row14-ps6 { /* NC */
                                nvidia,pins = "kb_row14_ps6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row15_ps7 { /* NC */
+                       kb-row15-ps7 { /* NC */
                                nvidia,pins = "kb_row15_ps7";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row16_pt0 { /* NC */
+                       kb-row16-pt0 { /* NC */
                                nvidia,pins = "kb_row16_pt0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row17_pt1 { /* NC */
+                       kb-row17-pt1 { /* NC */
                                nvidia,pins = "kb_row17_pt1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1467,14 +1468,14 @@ pv1 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x1_aud_px1 { /* NC */
+                       gpio-x1-aud-px1 { /* NC */
                                nvidia,pins = "gpio_x1_aud_px1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x3_aud_px3 { /* NC */
+                       gpio-x3-aud-px3 { /* NC */
                                nvidia,pins = "gpio_x3_aud_px3";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1502,14 +1503,14 @@ pcc2 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       clk3_req_pee1 { /* NC */
+                       clk3-req-pee1 { /* NC */
                                nvidia,pins = "clk3_req_pee1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap_mclk1_req_pee2 { /* NC */
+                       dap-mclk1-req-pee2 { /* NC */
                                nvidia,pins = "dap_mclk1_req_pee2";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1525,7 +1526,7 @@ dap_mclk1_req_pee2 { /* NC */
                         * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
                         * bits being set to 0xfffd according to the TRM!
                         */
-                       sdmmc3_clk_lb_out_pee4 { /* NC */
+                       sdmmc3-clk-lb-out-pee4 { /* NC */
                                nvidia,pins = "sdmmc3_clk_lb_out_pee4";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1560,8 +1561,9 @@ i2c@7000d000 {
                sgtl5000: codec@a {
                        compatible = "fsl,sgtl5000";
                        reg = <0x0a>;
-                       VDDA-supply = <&reg_3v3>;
-                       VDDIO-supply = <&vddio_1v8>;
+                       VDDA-supply = <&reg_module_3v3_audio>;
+                       VDDD-supply = <&reg_1v8_vddio>;
+                       VDDIO-supply = <&reg_1v8_vddio>;
                        clocks = <&tegra_car TEGRA124_CLK_EXTERN1>;
                };
 
@@ -1578,14 +1580,14 @@ pmic: pmic@40 {
                        pinctrl-0 = <&as3722_default>;
 
                        as3722_default: pinmux {
-                               gpio2_7 {
+                               gpio2-7 {
                                        pins = "gpio2", /* PWR_EN_+V3.3 */
                                               "gpio7"; /* +V1.6_LPO */
                                        function = "gpio";
                                        bias-pull-up;
                                };
 
-                               gpio0_1_3_4_5_6 {
+                               gpio0-1-3-4-5-6 {
                                        pins = "gpio0", "gpio1", "gpio3",
                                               "gpio4", "gpio5", "gpio6";
                                        bias-high-impedance;
@@ -1593,18 +1595,18 @@ gpio0_1_3_4_5_6 {
                        };
 
                        regulators {
-                               vsup-sd2-supply = <&reg_3v3>;
-                               vsup-sd3-supply = <&reg_3v3>;
-                               vsup-sd4-supply = <&reg_3v3>;
-                               vsup-sd5-supply = <&reg_3v3>;
-                               vin-ldo0-supply = <&vddio_ddr_1v35>;
-                               vin-ldo1-6-supply = <&reg_3v3>;
-                               vin-ldo2-5-7-supply = <&vddio_1v8>;
-                               vin-ldo3-4-supply = <&reg_3v3>;
-                               vin-ldo9-10-supply = <&reg_3v3>;
-                               vin-ldo11-supply = <&reg_3v3>;
-
-                               vdd_cpu: sd0 {
+                               vsup-sd2-supply = <&reg_module_3v3>;
+                               vsup-sd3-supply = <&reg_module_3v3>;
+                               vsup-sd4-supply = <&reg_module_3v3>;
+                               vsup-sd5-supply = <&reg_module_3v3>;
+                               vin-ldo0-supply = <&reg_1v35_vddio_ddr>;
+                               vin-ldo1-6-supply = <&reg_module_3v3>;
+                               vin-ldo2-5-7-supply = <&reg_1v8_vddio>;
+                               vin-ldo3-4-supply = <&reg_module_3v3>;
+                               vin-ldo9-10-supply = <&reg_module_3v3>;
+                               vin-ldo11-supply = <&reg_module_3v3>;
+
+                               reg_vdd_cpu: sd0 {
                                        regulator-name = "+VDD_CPU_AP";
                                        regulator-min-microvolt = <700000>;
                                        regulator-max-microvolt = <1400000>;
@@ -1626,7 +1628,7 @@ sd1 {
                                        ams,ext-control = <1>;
                                };
 
-                               vddio_ddr_1v35: sd2 {
+                               reg_1v35_vddio_ddr: sd2 {
                                        regulator-name =
                                                "+V1.35_VDDIO_DDR(sd2)";
                                        regulator-min-microvolt = <1350000>;
@@ -1644,13 +1646,13 @@ sd3 {
                                        regulator-boot-on;
                                };
 
-                               vdd_1v05: sd4 {
+                               reg_1v05_vdd: sd4 {
                                        regulator-name = "+V1.05";
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                };
 
-                               vddio_1v8: sd5 {
+                               reg_1v8_vddio: sd5 {
                                        regulator-name = "+V1.8";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
@@ -1658,7 +1660,7 @@ vddio_1v8: sd5 {
                                        regulator-always-on;
                                };
 
-                               vdd_gpu: sd6 {
+                               reg_vdd_gpu: sd6 {
                                        regulator-name = "+VDD_GPU_AP";
                                        regulator-min-microvolt = <650000>;
                                        regulator-max-microvolt = <1200000>;
@@ -1668,7 +1670,7 @@ vdd_gpu: sd6 {
                                        regulator-always-on;
                                };
 
-                               avdd_1v05: ldo0 {
+                               reg_1v05_avdd: ldo0 {
                                        regulator-name = "+V1.05_AVDD";
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
@@ -1743,12 +1745,13 @@ ldo11 {
                 * TMP451 temperature sensor
                 * Note: THERM_N directly connected to AS3722 PMIC THERM
                 */
-               temperature-sensor@4c {
+               temp-sensor@4c {
                        compatible = "ti,tmp451";
                        reg = <0x4c>;
                        interrupt-parent = <&gpio>;
                        interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
                        #thermal-sensor-cells = <1>;
+                       vcc-supply = <&reg_module_3v3>;
                };
        };
 
@@ -1780,9 +1783,9 @@ i2c-thermtrip {
        sata@70020000 {
                phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
                phy-names = "sata-0";
-               avdd-supply = <&vdd_1v05>;
-               hvdd-supply = <&reg_3v3>;
-               vddio-supply = <&vdd_1v05>;
+               avdd-supply = <&reg_1v05_vdd>;
+               hvdd-supply = <&reg_module_3v3>;
+               vddio-supply = <&reg_1v05_vdd>;
        };
 
        usb@70090000 {
@@ -1793,14 +1796,14 @@ usb@70090000 {
                       <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>,
                       <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>;
                phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0";
-               avddio-pex-supply = <&vdd_1v05>;
-               avdd-pll-erefe-supply = <&avdd_1v05>;
-               avdd-pll-utmip-supply = <&vddio_1v8>;
-               avdd-usb-ss-pll-supply = <&vdd_1v05>;
-               avdd-usb-supply = <&reg_3v3>;
-               dvddio-pex-supply = <&vdd_1v05>;
-               hvdd-usb-ss-pll-e-supply = <&reg_3v3>;
-               hvdd-usb-ss-supply = <&reg_3v3>;
+               avddio-pex-supply = <&reg_1v05_vdd>;
+               avdd-pll-erefe-supply = <&reg_1v05_avdd>;
+               avdd-pll-utmip-supply = <&reg_1v8_vddio>;
+               avdd-usb-ss-pll-supply = <&reg_1v05_vdd>;
+               avdd-usb-supply = <&reg_module_3v3>;
+               dvddio-pex-supply = <&reg_1v05_vdd>;
+               hvdd-usb-ss-pll-e-supply = <&reg_module_3v3>;
+               hvdd-usb-ss-supply = <&reg_module_3v3>;
        };
 
        padctl@7009f000 {
@@ -1810,18 +1813,18 @@ usb2 {
 
                                lanes {
                                        usb2-0 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
 
                                        usb2-1 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
 
                                        usb2-2 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
                                };
                        };
@@ -1831,28 +1834,28 @@ pcie {
 
                                lanes {
                                        pcie-0 {
-                                               nvidia,function = "usb3-ss";
                                                status = "okay";
+                                               nvidia,function = "usb3-ss";
                                        };
 
                                        pcie-1 {
-                                               nvidia,function = "usb3-ss";
                                                status = "okay";
+                                               nvidia,function = "usb3-ss";
                                        };
 
                                        pcie-2 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
 
                                        pcie-3 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
 
                                        pcie-4 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
                                };
                        };
@@ -1862,8 +1865,8 @@ sata {
 
                                lanes {
                                        sata-0 {
-                                               nvidia,function = "sata";
                                                status = "okay";
+                                               nvidia,function = "sata";
                                        };
                                };
                        };
@@ -1874,7 +1877,6 @@ ports {
                        usb2-0 {
                                status = "okay";
                                mode = "otg";
-
                                vbus-supply = <&reg_usbo1_vbus>;
                        };
 
@@ -1882,7 +1884,6 @@ usb2-0 {
                        usb2-1 {
                                status = "okay";
                                mode = "host";
-
                                vbus-supply = <&reg_usbh_vbus>;
                        };
 
@@ -1890,18 +1891,19 @@ usb2-1 {
                        usb2-2 {
                                status = "okay";
                                mode = "host";
-
                                vbus-supply = <&reg_usbh_vbus>;
                        };
 
                        usb3-0 {
-                               nvidia,usb2-companion = <2>;
                                status = "okay";
+                               nvidia,usb2-companion = <2>;
+                               vbus-supply = <&reg_usbh_vbus>;
                        };
 
                        usb3-1 {
-                               nvidia,usb2-companion = <0>;
                                status = "okay";
+                               nvidia,usb2-companion = <0>;
+                               vbus-supply = <&reg_usbo1_vbus>;
                        };
                };
        };
@@ -1911,13 +1913,16 @@ sdhci@700b0600 {
                status = "okay";
                bus-width = <8>;
                non-removable;
+               vmmc-supply = <&reg_module_3v3>; /* VCC */
+               vqmmc-supply = <&reg_1v8_vddio>; /* VCCQ */
+               mmc-ddr-1_8v;
        };
 
        /* CPU DFLL clock */
        clock@70110000 {
                status = "okay";
-               vdd-cpu-supply = <&vdd_cpu>;
                nvidia,i2c-fs-rate = <400000>;
+               vdd-cpu-supply = <&reg_vdd_cpu>;
        };
 
        ahub@70300000 {
@@ -1926,22 +1931,15 @@ i2s@70301200 {
                };
        };
 
-       clocks {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               clk32k_in: clock@0 {
-                       compatible = "fixed-clock";
-                       reg = <0>;
-                       #clock-cells = <0>;
-                       clock-frequency = <32768>;
-               };
+       clk32k_in: osc3 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
        };
 
        cpus {
                cpu@0 {
-                       vdd-cpu-supply = <&vdd_cpu>;
+                       vdd-cpu-supply = <&reg_vdd_cpu>;
                };
        };
 
@@ -1951,7 +1949,7 @@ reg_1v05_avdd_hdmi_pll: regulator-1v05-avdd-hdmi-pll {
                regulator-min-microvolt = <1050000>;
                regulator-max-microvolt = <1050000>;
                gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
-               vin-supply = <&vdd_1v05>;
+               vin-supply = <&reg_1v05_vdd>;
        };
 
        reg_3v3_mxm: regulator-3v3-mxm {
@@ -1963,7 +1961,15 @@ reg_3v3_mxm: regulator-3v3-mxm {
                regulator-boot-on;
        };
 
-       reg_3v3: regulator-3v3 {
+       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_1v05_vdd>;
+       };
+
+       reg_module_3v3: regulator-module-3v3 {
                compatible = "regulator-fixed";
                regulator-name = "+V3.3";
                regulator-min-microvolt = <3300000>;
@@ -1976,12 +1982,12 @@ reg_3v3: regulator-3v3 {
                vin-supply = <&reg_3v3_mxm>;
        };
 
-       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+       reg_module_3v3_audio: regulator-module-3v3-audio {
                compatible = "regulator-fixed";
-               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-name = "+V3.3_AUDIO_AVDD_S";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&vdd_1v05>;
+               regulator-always-on;
        };
 
        sound {
@@ -2035,7 +2041,7 @@ gpu-shutdown-trip {
 
 &gpio {
        /* I210 Gigabit Ethernet Controller Reset */
-       lan_reset_n {
+       lan-reset-n {
                gpio-hog;
                gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
                output-high;
@@ -2043,7 +2049,7 @@ lan_reset_n {
        };
 
        /* Control MXM3 pin 26 Reset Module Output Carrier Input */
-       reset_moci_ctrl {
+       reset-moci-ctrl {
                gpio-hog;
                gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
                output-high;
index 0f0d4a4988b90fafb9f4ab39c1825b9b3a635055..13c93cd507d8e44acc900d2e5ef69921ebe55ebd 100644 (file)
  * Compatible for Revisions 2GB: V1.0A, V1.0B, V1.1A
  */
 / {
-       model = "Toradex Apalis TK1";
-       compatible = "toradex,apalis-tk1", "nvidia,tegra124";
-
        memory@80000000 {
                reg = <0x0 0x80000000 0x0 0x80000000>;
        };
 
        pcie@1003000 {
                status = "okay";
-               avddio-pex-supply = <&vdd_1v05>;
-               avdd-pex-pll-supply = <&vdd_1v05>;
-               avdd-pll-erefe-supply = <&avdd_1v05>;
-               dvddio-pex-supply = <&vdd_1v05>;
-               hvdd-pex-pll-e-supply = <&reg_3v3>;
-               hvdd-pex-supply = <&reg_3v3>;
-               vddio-pex-ctl-supply = <&reg_3v3>;
+               avddio-pex-supply = <&reg_1v05_vdd>;
+               avdd-pex-pll-supply = <&reg_1v05_vdd>;
+               avdd-pll-erefe-supply = <&reg_1v05_avdd>;
+               dvddio-pex-supply = <&reg_1v05_vdd>;
+               hvdd-pex-pll-e-supply = <&reg_module_3v3>;
+               hvdd-pex-supply = <&reg_module_3v3>;
+               vddio-pex-ctl-supply = <&reg_module_3v3>;
 
                /* Apalis PCIe (additional lane Apalis type specific) */
                pci@1,0 {
@@ -77,16 +74,21 @@ pci@2,0 {
                        phys = <&{/padctl@7009f000/pads/pcie/lanes/pcie-2}>;
                        phy-names = "pcie-0";
                        status = "okay";
+
+                       pcie@0 {
+                               reg = <0 0 0 0 0>;
+                               local-mac-address = [00 00 00 00 00 00];
+                       };
                };
        };
 
        host1x@50000000 {
                hdmi@54280000 {
-                       pll-supply = <&reg_1v05_avdd_hdmi_pll>;
-                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                        nvidia,ddc-i2c-bus = <&hdmi_ddc>;
                        nvidia,hpd-gpio =
                                <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+                       pll-supply = <&reg_1v05_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                };
        };
 
@@ -95,44 +97,44 @@ gpu@0,57000000 {
                 * Node left disabled on purpose - the bootloader will enable
                 * it after having set the VPR up
                 */
-               vdd-supply = <&vdd_gpu>;
+               vdd-supply = <&reg_vdd_gpu>;
        };
 
-       pinmux: pinmux@70000868 {
+       pinmux@70000868 {
                pinctrl-names = "default";
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
                        /* Analogue Audio (On-module) */
-                       dap3_fs_pp0 {
+                       dap3-fs-pp0 {
                                nvidia,pins = "dap3_fs_pp0";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_din_pp1 {
+                       dap3-din-pp1 {
                                nvidia,pins = "dap3_din_pp1";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap3_dout_pp2 {
+                       dap3-dout-pp2 {
                                nvidia,pins = "dap3_dout_pp2";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_sclk_pp3 {
+                       dap3-sclk-pp3 {
                                nvidia,pins = "dap3_sclk_pp3";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap_mclk1_pw4 {
+                       dap-mclk1-pw4 {
                                nvidia,pins = "dap_mclk1_pw4";
                                nvidia,function = "extperiph1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -159,7 +161,7 @@ pu6 {
                        };
 
                        /* Apalis CAM1_MCLK */
-                       cam_mclk_pcc0 {
+                       cam-mclk-pcc0 {
                                nvidia,pins = "cam_mclk_pcc0";
                                nvidia,function = "vi_alt3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -168,28 +170,28 @@ cam_mclk_pcc0 {
                        };
 
                        /* Apalis Digital Audio */
-                       dap2_fs_pa2 {
+                       dap2-fs-pa2 {
                                nvidia,pins = "dap2_fs_pa2";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_sclk_pa3 {
+                       dap2-sclk-pa3 {
                                nvidia,pins = "dap2_sclk_pa3";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_din_pa4 {
+                       dap2-din-pa4 {
                                nvidia,pins = "dap2_din_pa4";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dap2_dout_pa5 {
+                       dap2-dout-pa5 {
                                nvidia,pins = "dap2_dout_pa5";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -202,7 +204,7 @@ pbb3 { /* DAP1_RESET */
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       clk3_out_pee0 {
+                       clk3-out-pee0 {
                                nvidia,pins = "clk3_out_pee0";
                                nvidia,function = "extperiph3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -211,49 +213,49 @@ clk3_out_pee0 {
                        };
 
                        /* Apalis GPIO */
-                       ddc_scl_pv4 {
+                       ddc-scl-pv4 {
                                nvidia,pins = "ddc_scl_pv4";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       ddc_sda_pv5 {
+                       ddc-sda-pv5 {
                                nvidia,pins = "ddc_sda_pv5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l0_rst_n_pdd1 {
+                       pex-l0-rst-n-pdd1 {
                                nvidia,pins = "pex_l0_rst_n_pdd1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l0_clkreq_n_pdd2 {
+                       pex-l0-clkreq-n-pdd2 {
                                nvidia,pins = "pex_l0_clkreq_n_pdd2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l1_rst_n_pdd5 {
+                       pex-l1-rst-n-pdd5 {
                                nvidia,pins = "pex_l1_rst_n_pdd5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       pex_l1_clkreq_n_pdd6 {
+                       pex-l1-clkreq-n-pdd6 {
                                nvidia,pins = "pex_l1_clkreq_n_pdd6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       dp_hpd_pff0 {
+                       dp-hpd-pff0 {
                                nvidia,pins = "dp_hpd_pff0";
                                nvidia,function = "dp";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -277,7 +279,7 @@ owr { /* PEX_L1_CLKREQ_N multiplexed GPIO6 */
                        };
 
                        /* Apalis HDMI1_CEC */
-                       hdmi_cec_pee3 {
+                       hdmi-cec-pee3 {
                                nvidia,pins = "hdmi_cec_pee3";
                                nvidia,function = "cec";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -287,7 +289,7 @@ hdmi_cec_pee3 {
                        };
 
                        /* Apalis HDMI1_HPD */
-                       hdmi_int_pn7 {
+                       hdmi-int-pn7 {
                                nvidia,pins = "hdmi_int_pn7";
                                nvidia,function = "rsvd1";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -297,7 +299,7 @@ hdmi_int_pn7 {
                        };
 
                        /* Apalis I2C1 */
-                       gen1_i2c_scl_pc4 {
+                       gen1-i2c-scl-pc4 {
                                nvidia,pins = "gen1_i2c_scl_pc4";
                                nvidia,function = "i2c1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -305,7 +307,7 @@ gen1_i2c_scl_pc4 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       gen1_i2c_sda_pc5 {
+                       gen1-i2c-sda-pc5 {
                                nvidia,pins = "gen1_i2c_sda_pc5";
                                nvidia,function = "i2c1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -315,7 +317,7 @@ gen1_i2c_sda_pc5 {
                        };
 
                        /* Apalis I2C2 (DDC) */
-                       gen2_i2c_scl_pt5 {
+                       gen2-i2c-scl-pt5 {
                                nvidia,pins = "gen2_i2c_scl_pt5";
                                nvidia,function = "i2c2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -323,7 +325,7 @@ gen2_i2c_scl_pt5 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       gen2_i2c_sda_pt6 {
+                       gen2-i2c-sda-pt6 {
                                nvidia,pins = "gen2_i2c_sda_pt6";
                                nvidia,function = "i2c2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -333,7 +335,7 @@ gen2_i2c_sda_pt6 {
                        };
 
                        /* Apalis I2C3 (CAM) */
-                       cam_i2c_scl_pbb1 {
+                       cam-i2c-scl-pbb1 {
                                nvidia,pins = "cam_i2c_scl_pbb1";
                                nvidia,function = "i2c3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -341,7 +343,7 @@ cam_i2c_scl_pbb1 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       cam_i2c_sda_pbb2 {
+                       cam-i2c-sda-pbb2 {
                                nvidia,pins = "cam_i2c_sda_pbb2";
                                nvidia,function = "i2c3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -351,77 +353,77 @@ cam_i2c_sda_pbb2 {
                        };
 
                        /* Apalis MMC1 */
-                       sdmmc1_cd_n_pv3 { /* CD# GPIO */
+                       sdmmc1-cd-n-pv3 { /* CD# GPIO */
                                nvidia,pins = "sdmmc1_wp_n_pv3";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       clk2_out_pw5 { /* D5 GPIO */
+                       clk2-out-pw5 { /* D5 GPIO */
                                nvidia,pins = "clk2_out_pw5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat3_py4 {
+                       sdmmc1-dat3-py4 {
                                nvidia,pins = "sdmmc1_dat3_py4";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat2_py5 {
+                       sdmmc1-dat2-py5 {
                                nvidia,pins = "sdmmc1_dat2_py5";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat1_py6 {
+                       sdmmc1-dat1-py6 {
                                nvidia,pins = "sdmmc1_dat1_py6";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_dat0_py7 {
+                       sdmmc1-dat0-py7 {
                                nvidia,pins = "sdmmc1_dat0_py7";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_clk_pz0 {
+                       sdmmc1-clk-pz0 {
                                nvidia,pins = "sdmmc1_clk_pz0";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc1_cmd_pz1 {
+                       sdmmc1-cmd-pz1 {
                                nvidia,pins = "sdmmc1_cmd_pz1";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       clk2_req_pcc5 { /* D4 GPIO */
+                       clk2-req-pcc5 { /* D4 GPIO */
                                nvidia,pins = "clk2_req_pcc5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */
+                       sdmmc3-clk-lb-in-pee5 { /* D6 GPIO */
                                nvidia,pins = "sdmmc3_clk_lb_in_pee5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       usb_vbus_en2_pff1 { /* D7 GPIO */
+                       usb-vbus-en2-pff1 { /* D7 GPIO */
                                nvidia,pins = "usb_vbus_en2_pff1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -461,7 +463,7 @@ ph3 {
                        };
 
                        /* Apalis SATA1_ACT# */
-                       dap1_dout_pn2 {
+                       dap1-dout-pn2 {
                                nvidia,pins = "dap1_dout_pn2";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -470,49 +472,49 @@ dap1_dout_pn2 {
                        };
 
                        /* Apalis SD1 */
-                       sdmmc3_clk_pa6 {
+                       sdmmc3-clk-pa6 {
                                nvidia,pins = "sdmmc3_clk_pa6";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_cmd_pa7 {
+                       sdmmc3-cmd-pa7 {
                                nvidia,pins = "sdmmc3_cmd_pa7";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat3_pb4 {
+                       sdmmc3-dat3-pb4 {
                                nvidia,pins = "sdmmc3_dat3_pb4";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat2_pb5 {
+                       sdmmc3-dat2-pb5 {
                                nvidia,pins = "sdmmc3_dat2_pb5";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat1_pb6 {
+                       sdmmc3-dat1-pb6 {
                                nvidia,pins = "sdmmc3_dat1_pb6";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_dat0_pb7 {
+                       sdmmc3-dat0-pb7 {
                                nvidia,pins = "sdmmc3_dat0_pb7";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc3_cd_n_pv2 { /* CD# GPIO */
+                       sdmmc3-cd-n-pv2 { /* CD# GPIO */
                                nvidia,pins = "sdmmc3_cd_n_pv2";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -521,14 +523,14 @@ sdmmc3_cd_n_pv2 { /* CD# GPIO */
                        };
 
                        /* Apalis SPDIF */
-                       spdif_out_pk5 {
+                       spdif-out-pk5 {
                                nvidia,pins = "spdif_out_pk5";
                                nvidia,function = "spdif";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       spdif_in_pk6 {
+                       spdif-in-pk6 {
                                nvidia,pins = "spdif_in_pk6";
                                nvidia,function = "spdif";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -537,28 +539,28 @@ spdif_in_pk6 {
                        };
 
                        /* Apalis SPI1 */
-                       ulpi_clk_py0 {
+                       ulpi-clk-py0 {
                                nvidia,pins = "ulpi_clk_py0";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_dir_py1 {
+                       ulpi-dir-py1 {
                                nvidia,pins = "ulpi_dir_py1";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       ulpi_nxt_py2 {
+                       ulpi-nxt-py2 {
                                nvidia,pins = "ulpi_nxt_py2";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_stp_py3 {
+                       ulpi-stp-py3 {
                                nvidia,pins = "ulpi_stp_py3";
                                nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -611,42 +613,42 @@ pk7 { /* RI GPIO */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_txd_pu0 {
+                       uart1-txd-pu0 {
                                nvidia,pins = "pu0";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart1_rxd_pu1 {
+                       uart1-rxd-pu1 {
                                nvidia,pins = "pu1";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_cts_n_pu2 {
+                       uart1-cts-n-pu2 {
                                nvidia,pins = "pu2";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart1_rts_n_pu3 {
+                       uart1-rts-n-pu3 {
                                nvidia,pins = "pu3";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart3_cts_n_pa1 { /* DSR GPIO */
+                       uart3-cts-n-pa1 { /* DSR GPIO */
                                nvidia,pins = "uart3_cts_n_pa1";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart3_rts_n_pc0 { /* DTR GPIO */
+                       uart3-rts-n-pc0 { /* DTR GPIO */
                                nvidia,pins = "uart3_rts_n_pc0";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -655,28 +657,28 @@ uart3_rts_n_pc0 { /* DTR GPIO */
                        };
 
                        /* Apalis UART2 */
-                       uart2_txd_pc2 {
+                       uart2-txd-pc2 {
                                nvidia,pins = "uart2_txd_pc2";
                                nvidia,function = "irda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart2_rxd_pc3 {
+                       uart2-rxd-pc3 {
                                nvidia,pins = "uart2_rxd_pc3";
                                nvidia,function = "irda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart2_cts_n_pj5 {
+                       uart2-cts-n-pj5 {
                                nvidia,pins = "uart2_cts_n_pj5";
                                nvidia,function = "uartb";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart2_rts_n_pj6 {
+                       uart2-rts-n-pj6 {
                                nvidia,pins = "uart2_rts_n_pj6";
                                nvidia,function = "uartb";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -685,14 +687,14 @@ uart2_rts_n_pj6 {
                        };
 
                        /* Apalis UART3 */
-                       uart3_txd_pw6 {
+                       uart3-txd-pw6 {
                                nvidia,pins = "uart3_txd_pw6";
                                nvidia,function = "uartc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       uart3_rxd_pw7 {
+                       uart3-rxd-pw7 {
                                nvidia,pins = "uart3_rxd_pw7";
                                nvidia,function = "uartc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -701,14 +703,14 @@ uart3_rxd_pw7 {
                        };
 
                        /* Apalis UART4 */
-                       uart4_rxd_pb0 {
+                       uart4-rxd-pb0 {
                                nvidia,pins = "pb0";
                                nvidia,function = "uartd";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       uart4_txd_pj7 {
+                       uart4-txd-pj7 {
                                nvidia,pins = "pj7";
                                nvidia,function = "uartd";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -717,7 +719,7 @@ uart4_txd_pj7 {
                        };
 
                        /* Apalis USBH_EN */
-                       usb_vbus_en1_pn5 {
+                       usb-vbus-en1-pn5 {
                                nvidia,pins = "usb_vbus_en1_pn5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -736,7 +738,7 @@ pbb0 {
                        };
 
                        /* Apalis USBO1_EN */
-                       usb_vbus_en0_pn4 {
+                       usb-vbus-en0-pn4 {
                                nvidia,pins = "usb_vbus_en0_pn4";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -755,7 +757,7 @@ pbb4 {
                        };
 
                        /* Apalis WAKE1_MICO */
-                       pex_wake_n_pdd3 {
+                       pex-wake-n-pdd3 {
                                nvidia,pins = "pex_wake_n_pdd3";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -764,7 +766,7 @@ pex_wake_n_pdd3 {
                        };
 
                        /* CORE_PWR_REQ */
-                       core_pwr_req {
+                       core-pwr-req {
                                nvidia,pins = "core_pwr_req";
                                nvidia,function = "pwron";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -773,7 +775,7 @@ core_pwr_req {
                        };
 
                        /* CPU_PWR_REQ */
-                       cpu_pwr_req {
+                       cpu-pwr-req {
                                nvidia,pins = "cpu_pwr_req";
                                nvidia,function = "cpu";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -782,14 +784,14 @@ cpu_pwr_req {
                        };
 
                        /* DVFS */
-                       dvfs_pwm_px0 {
+                       dvfs-pwm-px0 {
                                nvidia,pins = "dvfs_pwm_px0";
                                nvidia,function = "cldvfs";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dvfs_clk_px2 {
+                       dvfs-clk-px2 {
                                nvidia,pins = "dvfs_clk_px2";
                                nvidia,function = "cldvfs";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -798,70 +800,70 @@ dvfs_clk_px2 {
                        };
 
                        /* eMMC */
-                       sdmmc4_dat0_paa0 {
+                       sdmmc4-dat0-paa0 {
                                nvidia,pins = "sdmmc4_dat0_paa0";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat1_paa1 {
+                       sdmmc4-dat1-paa1 {
                                nvidia,pins = "sdmmc4_dat1_paa1";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat2_paa2 {
+                       sdmmc4-dat2-paa2 {
                                nvidia,pins = "sdmmc4_dat2_paa2";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat3_paa3 {
+                       sdmmc4-dat3-paa3 {
                                nvidia,pins = "sdmmc4_dat3_paa3";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat4_paa4 {
+                       sdmmc4-dat4-paa4 {
                                nvidia,pins = "sdmmc4_dat4_paa4";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat5_paa5 {
+                       sdmmc4-dat5-paa5 {
                                nvidia,pins = "sdmmc4_dat5_paa5";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat6_paa6 {
+                       sdmmc4-dat6-paa6 {
                                nvidia,pins = "sdmmc4_dat6_paa6";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat7_paa7 {
+                       sdmmc4-dat7-paa7 {
                                nvidia,pins = "sdmmc4_dat7_paa7";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_clk_pcc4 {
+                       sdmmc4-clk-pcc4 {
                                nvidia,pins = "sdmmc4_clk_pcc4";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_cmd_pt7 {
+                       sdmmc4-cmd-pt7 {
                                nvidia,pins = "sdmmc4_cmd_pt7";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -870,7 +872,7 @@ sdmmc4_cmd_pt7 {
                        };
 
                        /* JTAG_RTCK */
-                       jtag_rtck {
+                       jtag-rtck {
                                nvidia,pins = "jtag_rtck";
                                nvidia,function = "rtck";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -879,7 +881,7 @@ jtag_rtck {
                        };
 
                        /* LAN_DEV_OFF# */
-                       ulpi_data5_po6 {
+                       ulpi-data5-po6 {
                                nvidia,pins = "ulpi_data5_po6";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -888,7 +890,7 @@ ulpi_data5_po6 {
                        };
 
                        /* LAN_RESET# */
-                       kb_row10_ps2 {
+                       kb-row10-ps2 {
                                nvidia,pins = "kb_row10_ps2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -897,7 +899,7 @@ kb_row10_ps2 {
                        };
 
                        /* LAN_WAKE# */
-                       ulpi_data4_po5 {
+                       ulpi-data4-po5 {
                                nvidia,pins = "ulpi_data4_po5";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -951,35 +953,35 @@ pbb6 {
                        };
 
                        /* MCU SPI */
-                       gpio_x4_aud_px4 {
+                       gpio-x4-aud-px4 {
                                nvidia,pins = "gpio_x4_aud_px4";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x5_aud_px5 {
+                       gpio-x5-aud-px5 {
                                nvidia,pins = "gpio_x5_aud_px5";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x6_aud_px6 { /* MCU_CS */
+                       gpio-x6-aud-px6 { /* MCU_CS */
                                nvidia,pins = "gpio_x6_aud_px6";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x7_aud_px7 {
+                       gpio-x7-aud-px7 {
                                nvidia,pins = "gpio_x7_aud_px7";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       gpio_w2_aud_pw2 { /* MCU_CSEZP */
+                       gpio-w2-aud-pw2 { /* MCU_CSEZP */
                                nvidia,pins = "gpio_w2_aud_pw2";
                                nvidia,function = "spi2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -988,7 +990,7 @@ gpio_w2_aud_pw2 { /* MCU_CSEZP */
                        };
 
                        /* PMIC_CLK_32K */
-                       clk_32k_in {
+                       clk-32k-in {
                                nvidia,pins = "clk_32k_in";
                                nvidia,function = "clk";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -997,7 +999,7 @@ clk_32k_in {
                        };
 
                        /* PMIC_CPU_OC_INT */
-                       clk_32k_out_pa0 {
+                       clk-32k-out-pa0 {
                                nvidia,pins = "clk_32k_out_pa0";
                                nvidia,function = "soc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1006,7 +1008,7 @@ clk_32k_out_pa0 {
                        };
 
                        /* PWR_I2C */
-                       pwr_i2c_scl_pz6 {
+                       pwr-i2c-scl-pz6 {
                                nvidia,pins = "pwr_i2c_scl_pz6";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1014,7 +1016,7 @@ pwr_i2c_scl_pz6 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
-                       pwr_i2c_sda_pz7 {
+                       pwr-i2c-sda-pz7 {
                                nvidia,pins = "pwr_i2c_sda_pz7";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1024,7 +1026,7 @@ pwr_i2c_sda_pz7 {
                        };
 
                        /* PWR_INT_N */
-                       pwr_int_n {
+                       pwr-int-n {
                                nvidia,pins = "pwr_int_n";
                                nvidia,function = "pmi";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1042,7 +1044,7 @@ pu4 {
                        };
 
                        /* RESET_OUT_N */
-                       reset_out_n {
+                       reset-out-n {
                                nvidia,pins = "reset_out_n";
                                nvidia,function = "reset_out_n";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1051,14 +1053,14 @@ reset_out_n {
                        };
 
                        /* SHIFT_CTRL_DIR_IN */
-                       kb_row0_pr0 {
+                       kb-row0-pr0 {
                                nvidia,pins = "kb_row0_pr0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row1_pr1 {
+                       kb-row1-pr1 {
                                nvidia,pins = "kb_row1_pr1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1067,7 +1069,7 @@ kb_row1_pr1 {
                        };
 
                        /* Configure level-shifter as output for HDA */
-                       kb_row11_ps3 {
+                       kb-row11-ps3 {
                                nvidia,pins = "kb_row11_ps3";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1076,21 +1078,21 @@ kb_row11_ps3 {
                        };
 
                        /* SHIFT_CTRL_DIR_OUT */
-                       kb_col5_pq5 {
+                       kb-col5-pq5 {
                                nvidia,pins = "kb_col5_pq5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col6_pq6 {
+                       kb-col6-pq6 {
                                nvidia,pins = "kb_col6_pq6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col7_pq7 {
+                       kb-col7-pq7 {
                                nvidia,pins = "kb_col7_pq7";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
@@ -1099,35 +1101,35 @@ kb_col7_pq7 {
                        };
 
                        /* SHIFT_CTRL_OE */
-                       kb_col0_pq0 {
+                       kb-col0-pq0 {
                                nvidia,pins = "kb_col0_pq0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col1_pq1 {
+                       kb-col1-pq1 {
                                nvidia,pins = "kb_col1_pq1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col2_pq2 {
+                       kb-col2-pq2 {
                                nvidia,pins = "kb_col2_pq2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col4_pq4 {
+                       kb-col4-pq4 {
                                nvidia,pins = "kb_col4_pq4";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row2_pr2 {
+                       kb-row2-pr2 {
                                nvidia,pins = "kb_row2_pr2";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1145,7 +1147,7 @@ pi6 {
                        };
 
                        /* TOUCH_INT */
-                       gpio_w3_aud_pw3 {
+                       gpio-w3-aud-pw3 {
                                nvidia,pins = "gpio_w3_aud_pw3";
                                nvidia,function = "spi6";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1286,189 +1288,189 @@ pk4 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_fs_pn0 { /* NC */
+                       dap1-fs-pn0 { /* NC */
                                nvidia,pins = "dap1_fs_pn0";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_din_pn1 { /* NC */
+                       dap1-din-pn1 { /* NC */
                                nvidia,pins = "dap1_din_pn1";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_sclk_pn3 { /* NC */
+                       dap1-sclk-pn3 { /* NC */
                                nvidia,pins = "dap1_sclk_pn3";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data7_po0 { /* NC */
+                       ulpi-data7-po0 { /* NC */
                                nvidia,pins = "ulpi_data7_po0";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data0_po1 { /* NC */
+                       ulpi-data0-po1 { /* NC */
                                nvidia,pins = "ulpi_data0_po1";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data1_po2 { /* NC */
+                       ulpi-data1-po2 { /* NC */
                                nvidia,pins = "ulpi_data1_po2";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data2_po3 { /* NC */
+                       ulpi-data2-po3 { /* NC */
                                nvidia,pins = "ulpi_data2_po3";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data3_po4 { /* NC */
+                       ulpi-data3-po4 { /* NC */
                                nvidia,pins = "ulpi_data3_po4";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_data6_po7 { /* NC */
+                       ulpi-data6-po7 { /* NC */
                                nvidia,pins = "ulpi_data6_po7";
                                nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_fs_pp4 { /* NC */
+                       dap4-fs-pp4 { /* NC */
                                nvidia,pins = "dap4_fs_pp4";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_din_pp5 { /* NC */
+                       dap4-din-pp5 { /* NC */
                                nvidia,pins = "dap4_din_pp5";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_dout_pp6 { /* NC */
+                       dap4-dout-pp6 { /* NC */
                                nvidia,pins = "dap4_dout_pp6";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap4_sclk_pp7 { /* NC */
+                       dap4-sclk-pp7 { /* NC */
                                nvidia,pins = "dap4_sclk_pp7";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_col3_pq3 { /* NC */
+                       kb-col3-pq3 { /* NC */
                                nvidia,pins = "kb_col3_pq3";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row3_pr3 { /* NC */
+                       kb-row3-pr3 { /* NC */
                                nvidia,pins = "kb_row3_pr3";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row4_pr4 { /* NC */
+                       kb-row4-pr4 { /* NC */
                                nvidia,pins = "kb_row4_pr4";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row5_pr5 { /* NC */
+                       kb-row5-pr5 { /* NC */
                                nvidia,pins = "kb_row5_pr5";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row6_pr6 { /* NC */
+                       kb-row6-pr6 { /* NC */
                                nvidia,pins = "kb_row6_pr6";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row7_pr7 { /* NC */
+                       kb-row7-pr7 { /* NC */
                                nvidia,pins = "kb_row7_pr7";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row8_ps0 { /* NC */
+                       kb-row8-ps0 { /* NC */
                                nvidia,pins = "kb_row8_ps0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row9_ps1 { /* NC */
+                       kb-row9-ps1 { /* NC */
                                nvidia,pins = "kb_row9_ps1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row12_ps4 { /* NC */
+                       kb-row12-ps4 { /* NC */
                                nvidia,pins = "kb_row12_ps4";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row13_ps5 { /* NC */
+                       kb-row13-ps5 { /* NC */
                                nvidia,pins = "kb_row13_ps5";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row14_ps6 { /* NC */
+                       kb-row14-ps6 { /* NC */
                                nvidia,pins = "kb_row14_ps6";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row15_ps7 { /* NC */
+                       kb-row15-ps7 { /* NC */
                                nvidia,pins = "kb_row15_ps7";
                                nvidia,function = "rsvd3";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row16_pt0 { /* NC */
+                       kb-row16-pt0 { /* NC */
                                nvidia,pins = "kb_row16_pt0";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row17_pt1 { /* NC */
+                       kb-row17-pt1 { /* NC */
                                nvidia,pins = "kb_row17_pt1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1496,14 +1498,14 @@ pv1 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x1_aud_px1 { /* NC */
+                       gpio-x1-aud-px1 { /* NC */
                                nvidia,pins = "gpio_x1_aud_px1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_x3_aud_px3 { /* NC */
+                       gpio-x3-aud-px3 { /* NC */
                                nvidia,pins = "gpio_x3_aud_px3";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1531,14 +1533,14 @@ pcc2 { /* NC */
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       clk3_req_pee1 { /* NC */
+                       clk3-req-pee1 { /* NC */
                                nvidia,pins = "clk3_req_pee1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap_mclk1_req_pee2 { /* NC */
+                       dap-mclk1-req-pee2 { /* NC */
                                nvidia,pins = "dap_mclk1_req_pee2";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
@@ -1554,7 +1556,7 @@ dap_mclk1_req_pee2 { /* NC */
                         * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
                         * bits being set to 0xfffd according to the TRM!
                         */
-                       sdmmc3_clk_lb_out_pee4 { /* NC */
+                       sdmmc3-clk-lb-out-pee4 { /* NC */
                                nvidia,pins = "sdmmc3_clk_lb_out_pee4";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -1589,8 +1591,9 @@ i2c@7000d000 {
                sgtl5000: codec@a {
                        compatible = "fsl,sgtl5000";
                        reg = <0x0a>;
-                       VDDA-supply = <&reg_3v3>;
-                       VDDIO-supply = <&vddio_1v8>;
+                       VDDA-supply = <&reg_module_3v3_audio>;
+                       VDDD-supply = <&reg_1v8_vddio>;
+                       VDDIO-supply = <&reg_1v8_vddio>;
                        clocks = <&tegra_car TEGRA124_CLK_EXTERN1>;
                };
 
@@ -1607,14 +1610,14 @@ pmic: pmic@40 {
                        pinctrl-0 = <&as3722_default>;
 
                        as3722_default: pinmux {
-                               gpio2_7 {
+                               gpio2-7 {
                                        pins = "gpio2", /* PWR_EN_+V3.3 */
                                               "gpio7"; /* +V1.6_LPO */
                                        function = "gpio";
                                        bias-pull-up;
                                };
 
-                               gpio0_1_3_4_5_6 {
+                               gpio0-1-3-4-5-6 {
                                        pins = "gpio0", "gpio1", "gpio3",
                                               "gpio4", "gpio5", "gpio6";
                                        bias-high-impedance;
@@ -1622,18 +1625,18 @@ gpio0_1_3_4_5_6 {
                        };
 
                        regulators {
-                               vsup-sd2-supply = <&reg_3v3>;
-                               vsup-sd3-supply = <&reg_3v3>;
-                               vsup-sd4-supply = <&reg_3v3>;
-                               vsup-sd5-supply = <&reg_3v3>;
-                               vin-ldo0-supply = <&vddio_ddr_1v35>;
-                               vin-ldo1-6-supply = <&reg_3v3>;
-                               vin-ldo2-5-7-supply = <&vddio_1v8>;
-                               vin-ldo3-4-supply = <&reg_3v3>;
-                               vin-ldo9-10-supply = <&reg_3v3>;
-                               vin-ldo11-supply = <&reg_3v3>;
-
-                               vdd_cpu: sd0 {
+                               vsup-sd2-supply = <&reg_module_3v3>;
+                               vsup-sd3-supply = <&reg_module_3v3>;
+                               vsup-sd4-supply = <&reg_module_3v3>;
+                               vsup-sd5-supply = <&reg_module_3v3>;
+                               vin-ldo0-supply = <&reg_1v35_vddio_ddr>;
+                               vin-ldo1-6-supply = <&reg_module_3v3>;
+                               vin-ldo2-5-7-supply = <&reg_1v8_vddio>;
+                               vin-ldo3-4-supply = <&reg_module_3v3>;
+                               vin-ldo9-10-supply = <&reg_module_3v3>;
+                               vin-ldo11-supply = <&reg_module_3v3>;
+
+                               reg_vdd_cpu: sd0 {
                                        regulator-name = "+VDD_CPU_AP";
                                        regulator-min-microvolt = <700000>;
                                        regulator-max-microvolt = <1400000>;
@@ -1655,7 +1658,7 @@ sd1 {
                                        ams,ext-control = <1>;
                                };
 
-                               vddio_ddr_1v35: sd2 {
+                               reg_1v35_vddio_ddr: sd2 {
                                        regulator-name =
                                                "+V1.35_VDDIO_DDR(sd2)";
                                        regulator-min-microvolt = <1350000>;
@@ -1673,13 +1676,13 @@ sd3 {
                                        regulator-boot-on;
                                };
 
-                               vdd_1v05: sd4 {
+                               reg_1v05_vdd: sd4 {
                                        regulator-name = "+V1.05";
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                };
 
-                               vddio_1v8: sd5 {
+                               reg_1v8_vddio: sd5 {
                                        regulator-name = "+V1.8";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
@@ -1687,7 +1690,7 @@ vddio_1v8: sd5 {
                                        regulator-always-on;
                                };
 
-                               vdd_gpu: sd6 {
+                               reg_vdd_gpu: sd6 {
                                        regulator-name = "+VDD_GPU_AP";
                                        regulator-min-microvolt = <650000>;
                                        regulator-max-microvolt = <1200000>;
@@ -1697,7 +1700,7 @@ vdd_gpu: sd6 {
                                        regulator-always-on;
                                };
 
-                               avdd_1v05: ldo0 {
+                               reg_1v05_avdd: ldo0 {
                                        regulator-name = "+V1.05_AVDD";
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
@@ -1772,12 +1775,13 @@ ldo11 {
                 * TMP451 temperature sensor
                 * Note: THERM_N directly connected to AS3722 PMIC THERM
                 */
-               temperature-sensor@4c {
+               temp-sensor@4c {
                        compatible = "ti,tmp451";
                        reg = <0x4c>;
                        interrupt-parent = <&gpio>;
                        interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
                        #thermal-sensor-cells = <1>;
+                       vcc-supply = <&reg_module_3v3>;
                };
        };
 
@@ -1809,9 +1813,9 @@ i2c-thermtrip {
        sata@70020000 {
                phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
                phy-names = "sata-0";
-               avdd-supply = <&vdd_1v05>;
-               hvdd-supply = <&reg_3v3>;
-               vddio-supply = <&vdd_1v05>;
+               avdd-supply = <&reg_1v05_vdd>;
+               hvdd-supply = <&reg_module_3v3>;
+               vddio-supply = <&reg_1v05_vdd>;
        };
 
        usb@70090000 {
@@ -1822,14 +1826,14 @@ usb@70090000 {
                       <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>,
                       <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>;
                phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0";
-               avddio-pex-supply = <&vdd_1v05>;
-               avdd-pll-erefe-supply = <&avdd_1v05>;
-               avdd-pll-utmip-supply = <&vddio_1v8>;
-               avdd-usb-ss-pll-supply = <&vdd_1v05>;
-               avdd-usb-supply = <&reg_3v3>;
-               dvddio-pex-supply = <&vdd_1v05>;
-               hvdd-usb-ss-pll-e-supply = <&reg_3v3>;
-               hvdd-usb-ss-supply = <&reg_3v3>;
+               avddio-pex-supply = <&reg_1v05_vdd>;
+               avdd-pll-erefe-supply = <&reg_1v05_avdd>;
+               avdd-pll-utmip-supply = <&reg_1v8_vddio>;
+               avdd-usb-ss-pll-supply = <&reg_1v05_vdd>;
+               avdd-usb-supply = <&reg_module_3v3>;
+               dvddio-pex-supply = <&reg_1v05_vdd>;
+               hvdd-usb-ss-pll-e-supply = <&reg_module_3v3>;
+               hvdd-usb-ss-supply = <&reg_module_3v3>;
        };
 
        padctl@7009f000 {
@@ -1839,18 +1843,18 @@ usb2 {
 
                                lanes {
                                        usb2-0 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
 
                                        usb2-1 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
 
                                        usb2-2 {
-                                               nvidia,function = "xusb";
                                                status = "okay";
+                                               nvidia,function = "xusb";
                                        };
                                };
                        };
@@ -1860,28 +1864,28 @@ pcie {
 
                                lanes {
                                        pcie-0 {
-                                               nvidia,function = "usb3-ss";
                                                status = "okay";
+                                               nvidia,function = "usb3-ss";
                                        };
 
                                        pcie-1 {
-                                               nvidia,function = "usb3-ss";
                                                status = "okay";
+                                               nvidia,function = "usb3-ss";
                                        };
 
                                        pcie-2 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
 
                                        pcie-3 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
 
                                        pcie-4 {
-                                               nvidia,function = "pcie";
                                                status = "okay";
+                                               nvidia,function = "pcie";
                                        };
                                };
                        };
@@ -1891,8 +1895,8 @@ sata {
 
                                lanes {
                                        sata-0 {
-                                               nvidia,function = "sata";
                                                status = "okay";
+                                               nvidia,function = "sata";
                                        };
                                };
                        };
@@ -1903,7 +1907,6 @@ ports {
                        usb2-0 {
                                status = "okay";
                                mode = "otg";
-
                                vbus-supply = <&reg_usbo1_vbus>;
                        };
 
@@ -1911,7 +1914,6 @@ usb2-0 {
                        usb2-1 {
                                status = "okay";
                                mode = "host";
-
                                vbus-supply = <&reg_usbh_vbus>;
                        };
 
@@ -1919,18 +1921,19 @@ usb2-1 {
                        usb2-2 {
                                status = "okay";
                                mode = "host";
-
                                vbus-supply = <&reg_usbh_vbus>;
                        };
 
                        usb3-0 {
-                               nvidia,usb2-companion = <2>;
                                status = "okay";
+                               nvidia,usb2-companion = <2>;
+                               vbus-supply = <&reg_usbh_vbus>;
                        };
 
                        usb3-1 {
-                               nvidia,usb2-companion = <0>;
                                status = "okay";
+                               nvidia,usb2-companion = <0>;
+                               vbus-supply = <&reg_usbo1_vbus>;
                        };
                };
        };
@@ -1940,13 +1943,16 @@ sdhci@700b0600 {
                status = "okay";
                bus-width = <8>;
                non-removable;
+               vmmc-supply = <&reg_module_3v3>; /* VCC */
+               vqmmc-supply = <&reg_1v8_vddio>; /* VCCQ */
+               mmc-ddr-1_8v;
        };
 
        /* CPU DFLL clock */
        clock@70110000 {
                status = "okay";
-               vdd-cpu-supply = <&vdd_cpu>;
                nvidia,i2c-fs-rate = <400000>;
+               vdd-cpu-supply = <&reg_vdd_cpu>;
        };
 
        ahub@70300000 {
@@ -1955,22 +1961,15 @@ i2s@70301200 {
                };
        };
 
-       clocks {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               clk32k_in: clock@0 {
-                       compatible = "fixed-clock";
-                       reg = <0>;
-                       #clock-cells = <0>;
-                       clock-frequency = <32768>;
-               };
+       clk32k_in: osc3 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
        };
 
        cpus {
                cpu@0 {
-                       vdd-cpu-supply = <&vdd_cpu>;
+                       vdd-cpu-supply = <&reg_vdd_cpu>;
                };
        };
 
@@ -1980,7 +1979,7 @@ reg_1v05_avdd_hdmi_pll: regulator-1v05-avdd-hdmi-pll {
                regulator-min-microvolt = <1050000>;
                regulator-max-microvolt = <1050000>;
                gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
-               vin-supply = <&vdd_1v05>;
+               vin-supply = <&reg_1v05_vdd>;
        };
 
        reg_3v3_mxm: regulator-3v3-mxm {
@@ -1992,7 +1991,15 @@ reg_3v3_mxm: regulator-3v3-mxm {
                regulator-boot-on;
        };
 
-       reg_3v3: regulator-3v3 {
+       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&reg_1v05_vdd>;
+       };
+
+       reg_module_3v3: regulator-module-3v3 {
                compatible = "regulator-fixed";
                regulator-name = "+V3.3";
                regulator-min-microvolt = <3300000>;
@@ -2005,12 +2012,12 @@ reg_3v3: regulator-3v3 {
                vin-supply = <&reg_3v3_mxm>;
        };
 
-       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+       reg_module_3v3_audio: regulator-module-3v3-audio {
                compatible = "regulator-fixed";
-               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-name = "+V3.3_AUDIO_AVDD_S";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               vin-supply = <&vdd_1v05>;
+               regulator-always-on;
        };
 
        sound {
@@ -2064,7 +2071,7 @@ gpu-shutdown-trip {
 
 &gpio {
        /* I210 Gigabit Ethernet Controller Reset */
-       lan_reset_n {
+       lan-reset-n {
                gpio-hog;
                gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
                output-high;
@@ -2072,7 +2079,7 @@ lan_reset_n {
        };
 
        /* Control MXM3 pin 26 Reset Module Output Carrier Input */
-       reset_moci_ctrl {
+       reset-moci-ctrl {
                gpio-hog;
                gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
                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 (file)
index 0000000..3c0f268
--- /dev/null
@@ -0,0 +1,262 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "tegra20-colibri.dtsi"
+
+/ {
+       model = "Toradex Colibri T20 on Colibri Evaluation Board";
+       compatible = "toradex,colibri_t20-eval-v3", "toradex,colibri_t20",
+                    "nvidia,tegra20";
+
+       aliases {
+               rtc0 = "/i2c@7000c000/rtc@68";
+               rtc1 = "/i2c@7000d000/pmic@34";
+               rtc2 = "/rtc@7000e000";
+               serial0 = &uarta;
+               serial1 = &uartd;
+               serial2 = &uartb;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       host1x@50000000 {
+               dc@54200000 {
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&panel>;
+                       };
+               };
+
+               hdmi@54280000 {
+                       status = "okay";
+                       hdmi-supply = <&reg_5v0>;
+               };
+       };
+
+       pinmux@70000014 {
+               state_default: pinmux {
+                       bl-on {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       ddc {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       hotplug-detect {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       i2c {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       lcd {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       lm1 {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       mmc {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       mmccd {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       pwm-a-b {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       pwm-c-d {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       ssp {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       uart-a {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       uart-b {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       uart-c {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       usbh-pen {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+               };
+       };
+
+       /* Colibri UART-A */
+       serial@70006000 {
+               status = "okay";
+       };
+
+       /* Colibri UART-C */
+       serial@70006040 {
+               status = "okay";
+       };
+
+       /* Colibri UART-B */
+       serial@70006300 {
+               status = "okay";
+       };
+
+       pwm@7000a000 {
+               status = "okay";
+       };
+
+       /*
+        * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
+        * board)
+        */
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <400000>;
+
+               /* M41T0M6 real time clock on carrier board */
+               rtc@68 {
+                       compatible = "st,m41t0";
+                       reg = <0x68>;
+               };
+       };
+
+       /* GEN2_I2C: unused */
+
+       /* CAM_I2C (I2C3): unused */
+
+       /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
+       i2c@7000c400 {
+               status = "okay";
+       };
+
+       /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
+       usb@c5000000 {
+               status = "okay";
+               dr_mode = "otg";
+       };
+
+       usb-phy@c5000000 {
+               status = "okay";
+               vbus-supply = <&reg_usbc_vbus>;
+       };
+
+       /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
+       usb@c5008000 {
+               status = "okay";
+       };
+
+       usb-phy@c5008000 {
+               status = "okay";
+               vbus-supply = <&reg_usbh_vbus>;
+       };
+
+       /* SPI4: Colibri SSP */
+       spi@7000da00 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+
+               can@0 {
+                       compatible = "microchip,mcp2515";
+                       reg = <0>;
+                       clocks = <&clk16m>;
+                       interrupt-parent = <&gpio>;
+                       /* CAN_INT */
+                       interrupts = <TEGRA_GPIO(A, 0) IRQ_TYPE_EDGE_FALLING>;
+                       spi-max-frequency = <10000000>;
+                       vdd-supply = <&reg_3v3>;
+                       xceiver-supply = <&reg_5v0>;
+               };
+       };
+
+       /* SD/MMC */
+       sdhci@c8000600 {
+               status = "okay";
+               bus-width = <4>;
+               cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
+               no-1-8-v;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               brightness-levels = <255 128 64 32 16 8 4 0>;
+               default-brightness-level = <6>;
+               /* BL_ON */
+               enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 0 5000000>; /* PWM<A> */
+       };
+
+       clk16m: osc3 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <16000000>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               wakeup {
+                       label = "SODIMM pin 45 wakeup";
+                       gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_WAKEUP>;
+                       debounce-interval = <10>;
+                       wakeup-source;
+               };
+       };
+
+       panel: panel {
+               /*
+                * edt,et057090dhu: EDT 5.7" LCD TFT
+                * edt,et070080dh6: EDT 7.0" LCD TFT
+                */
+               compatible = "edt,et057090dhu", "simple-panel";
+               backlight = <&backlight>;
+               power-supply = <&reg_3v3>;
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5V_SW";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       reg_usbc_vbus: regulator-usbc-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB5";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&reg_5v0>;
+       };
+
+       /* USBH_PEN resp. USB_P_EN */
+       reg_usbh_vbus: regulator-usbh-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB[1-4]";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+               vin-supply = <&reg_5v0>;
+       };
+};
index 57f16c0e9917ed0ac85e75432b2563e205767797..d8004d68efa0d422fb2e3214b9d39a62f25571ad 100644 (file)
@@ -1,15 +1,21 @@
 // SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
 #include "tegra20-colibri.dtsi"
 
 / {
-       model = "Toradex Colibri T20 256/512 MB on Iris";
-       compatible = "toradex,iris", "toradex,colibri_t20-512", "nvidia,tegra20";
+       model = "Toradex Colibri T20 on Iris";
+       compatible = "toradex,colibri_t20-iris", "toradex,colibri_t20",
+                    "nvidia,tegra20";
 
        aliases {
+               rtc0 = "/i2c@7000c000/rtc@68";
+               rtc1 = "/i2c@7000d000/pmic@34";
+               rtc2 = "/rtc@7000e000";
                serial0 = &uarta;
                serial1 = &uartd;
+               serial2 = &uartb;
        };
 
        chosen {
@@ -17,90 +23,222 @@ chosen {
        };
 
        host1x@50000000 {
+               dc@54200000 {
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&panel>;
+                       };
+               };
+
                hdmi@54280000 {
                        status = "okay";
+                       hdmi-supply = <&reg_5v0>;
                };
        };
 
        pinmux@70000014 {
                state_default: pinmux {
-                       hdint {
+                       bl-on {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       ddc {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       hotplug-detect {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       i2c {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       lcd {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       lm1 {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       mmc {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       mmccd {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       pwm-a-b {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       pwm-c-d {
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       ssp {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       i2cddc {
+                       uart-a {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       sdio4 {
+                       uart-b {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       uarta {
+                       uart-c {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       uartd {
+                       usbh-pen {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                };
        };
 
+       /* Colibri UART-A */
        serial@70006000 {
                status = "okay";
        };
 
+       /* Colibri UART-C */
+       serial@70006040 {
+               status = "okay";
+       };
+
+       /* Colibri UART-B */
        serial@70006300 {
                status = "okay";
        };
 
-       i2c_ddc: i2c@7000c400 {
+       pwm@7000a000 {
+               status = "okay";
+       };
+
+       /*
+        * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier
+        * board)
+        */
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <400000>;
+
+               /* M41T0M6 real time clock on carrier board */
+               rtc@68 {
+                       compatible = "st,m41t0";
+                       reg = <0x68>;
+               };
+       };
+
+       /* GEN2_I2C: unused */
+
+       /* CAM_I2C (I2C3): unused */
+
+       /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
+       i2c@7000c400 {
                status = "okay";
        };
 
+       /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
        usb@c5000000 {
                status = "okay";
+               dr_mode = "otg";
        };
 
        usb-phy@c5000000 {
                status = "okay";
+               vbus-supply = <&reg_usbc_vbus>;
        };
 
+       /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
        usb@c5008000 {
                status = "okay";
        };
 
        usb-phy@c5008000 {
                status = "okay";
+               vbus-supply = <&reg_usbh_vbus>;
+       };
+
+       /* SPI4: Colibri SSP */
+       spi@7000da00 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
        };
 
+       /* SD/MMC */
        sdhci@c8000600 {
                status = "okay";
                bus-width = <4>;
-               vmmc-supply = <&vcc_sd_reg>;
-               vqmmc-supply = <&vcc_sd_reg>;
-       };
-
-       regulators {
-               regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "usb_host_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-boot-on;
-                       regulator-always-on;
-                       gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
-               };
+               cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
+               no-1-8-v;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               brightness-levels = <255 128 64 32 16 8 4 0>;
+               default-brightness-level = <6>;
+               /* BL_ON */
+               enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 0 5000000>; /* PWM<A> */
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
 
-               vcc_sd_reg: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "vcc_sd";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-boot-on;
-                       regulator-always-on;
+               wakeup {
+                       label = "SODIMM pin 45 wakeup";
+                       gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_WAKEUP>;
+                       debounce-interval = <10>;
+                       wakeup-source;
                };
        };
+
+       panel: panel {
+               /*
+                * edt,et057090dhu: EDT 5.7" LCD TFT
+                * edt,et070080dh6: EDT 7.0" LCD TFT
+                */
+               compatible = "edt,et057090dhu", "simple-panel";
+               backlight = <&backlight>;
+               power-supply = <&reg_3v3>;
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5V";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       reg_usbc_vbus: regulator-usbc-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB2";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&reg_5v0>;
+       };
+
+       /* USBH_PEN resp. USB_P_EN */
+       reg_usbh_vbus: regulator-usbh-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB1";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+               vin-supply = <&reg_5v0>;
+       };
 };
index e7b9ab09908a1af6212cb9c59d9f2136849c1427..6162d193e12cd0b24ecd140254bcd95c724a22fc 100644 (file)
@@ -1,15 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "tegra20.dtsi"
 
+/*
+ * Toradex Colibri T20 Module Device Tree
+ * Compatible for Revisions Colibri T20 256MB V1.1B, V1.2A;
+ * Colibri T20 256MB IT V1.2A; Colibri T20 512MB V1.1C, V1.2A;
+ * Colibri T20 512MB IT V1.2A
+ */
 / {
-       model = "Toradex Colibri T20 256/512 MB";
-       compatible = "toradex,colibri_t20-512", "nvidia,tegra20";
-
-       aliases {
-               rtc0 = "/i2c@7000d000/tps6586x@34";
-               rtc1 = "/rtc@7000e000";
-       };
-
        memory@0 {
                /*
                 * Set memory to 256 MB to be safe as this could be used on
@@ -21,12 +19,11 @@ memory@0 {
 
        host1x@50000000 {
                hdmi@54280000 {
-                       vdd-supply = <&hdmi_vdd_reg>;
-                       pll-supply = <&hdmi_pll_reg>;
-
-                       nvidia,ddc-i2c-bus = <&i2c_ddc>;
-                       nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7)
-                               GPIO_ACTIVE_HIGH>;
+                       nvidia,ddc-i2c-bus = <&hdmi_ddc>;
+                       nvidia,hpd-gpio =
+                               <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+                       pll-supply = <&reg_1v8_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                };
        };
 
@@ -35,187 +32,406 @@ pinmux@70000014 {
                pinctrl-0 = <&state_default>;
 
                state_default: pinmux {
-                       audio_refclk {
+                       /* Analogue Audio AC97 to WM9712 (On-module) */
+                       audio-refclk {
                                nvidia,pins = "cdev1";
                                nvidia,function = "plla_out";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       crt {
-                               nvidia,pins = "crtp";
-                               nvidia,function = "crt";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
-                       };
                        dap3 {
                                nvidia,pins = "dap3";
                                nvidia,function = "dap3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       displaya {
-                               nvidia,pins = "ld0", "ld1", "ld2", "ld3",
-                                       "ld4", "ld5", "ld6", "ld7", "ld8",
-                                       "ld9", "ld10", "ld11", "ld12", "ld13",
-                                       "ld14", "ld15", "ld16", "ld17",
-                                       "lhs", "lpw0", "lpw2", "lsc0",
-                                       "lsc1", "lsck", "lsda", "lspi", "lvs";
-                               nvidia,function = "displaya";
-                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
-                       };
-                       gpio_dte {
-                               nvidia,pins = "dte";
-                               nvidia,function = "rsvd1";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                       };
-                       gpio_gmi {
-                               nvidia,pins = "ata", "atc", "atd", "ate",
-                                       "dap1", "dap2", "dap4", "gpu", "irrx",
-                                       "irtx", "spia", "spib", "spic";
-                               nvidia,function = "gmi";
+
+                       /*
+                        * AC97_RESET, ULPI_RESET, AC97_INT aka WM9712 GENIRQ
+                        * (All on-module), SODIMM Pin 45 Wakeup
+                        */
+                       gpio-uac {
+                               nvidia,pins = "uac";
+                               nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_pta {
+
+                       /*
+                        * Buffer Enables for nPWE and RDnWR (On-module,
+                        * see GPIO hogging further down below)
+                        */
+                       gpio-pta {
                                nvidia,pins = "pta";
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       gpio_uac {
-                               nvidia,pins = "uac";
-                               nvidia,function = "rsvd2";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+
+                       /*
+                        * CLK_32K_OUT, CORE_PWR_REQ, CPU_PWR_REQ, PWR_INT_N,
+                        * SYS_CLK_REQ (All on-module)
+                        */
+                       pmc {
+                               nvidia,pins = "pmc";
+                               nvidia,function = "pwr_on";
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       hdint {
-                               nvidia,pins = "hdint";
+
+                       /*
+                        * Colibri Address/Data Bus (GMI)
+                        * Note: spid and spie optionally used for SPI1
+                        */
+                       gmi {
+                               nvidia,pins = "atc", "atd", "ate", "dap1",
+                                             "dap2", "dap4", "gmd", "gpu",
+                                             "irrx", "irtx", "spia", "spib",
+                                             "spic", "spid", "spie", "uca",
+                                             "ucb";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Further pins may be used as GPIOs */
+                       gmi-gpio1 {
+                               nvidia,pins = "lpw0", "lsc1", "lsck", "lsda";
                                nvidia,function = "hdmi";
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       i2c1 {
-                               nvidia,pins = "rm";
-                               nvidia,function = "i2c1";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                       gmi-gpio2 {
+                               nvidia,pins = "lcsn", "ldc", "lm0", "lsdi";
+                               nvidia,function = "rsvd4";
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       i2c3 {
-                               nvidia,pins = "dtf";
-                               nvidia,function = "i2c3";
+
+                       /* Colibri BL_ON */
+                       bl-on {
+                               nvidia,pins = "dta";
+                               nvidia,function = "rsvd1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       i2cddc {
+
+                       /* Colibri Backlight PWM<A>, PWM<B> */
+                       pwm-a-b {
+                               nvidia,pins = "sdc";
+                               nvidia,function = "pwm";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri DDC */
+                       ddc {
                                nvidia,pins = "ddc";
                                nvidia,function = "i2c2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       i2cp {
-                               nvidia,pins = "i2cp";
-                               nvidia,function = "i2cp";
+
+                       /*
+                        * Colibri EXT_IO*
+                        * Note: dtf optionally used for I2C3
+                        */
+                       ext-io {
+                               nvidia,pins = "dtf", "spdi";
+                               nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       irda {
-                               nvidia,pins = "uad";
-                               nvidia,function = "irda";
+
+                       /*
+                        * Colibri Ethernet (On-module)
+                        * ULPI EHCI instance 1 USB2_DP/N -> AX88772B
+                        */
+                       ulpi {
+                               nvidia,pins = "uaa", "uab", "uda";
+                               nvidia,function = "ulpi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       nand {
-                               nvidia,pins = "kbca", "kbcc", "kbcd",
-                                       "kbce", "kbcf";
-                               nvidia,function = "nand";
+                       ulpi-refclk {
+                               nvidia,pins = "cdev2";
+                               nvidia,function = "pllp_out4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       owc {
-                               nvidia,pins = "owc";
-                               nvidia,function = "owr";
+
+                       /* Colibri HOTPLUG_DETECT (HDMI) */
+                       hotplug-detect {
+                               nvidia,pins = "hdint";
+                               nvidia,function = "hdmi";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri I2C */
+                       i2c {
+                               nvidia,pins = "rm";
+                               nvidia,function = "i2c1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       pmc {
-                               nvidia,pins = "pmc";
-                               nvidia,function = "pwr_on";
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+
+                       /*
+                        * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE
+                        * today's display need DE, disable LCD_M1
+                        */
+                       lm1 {
+                               nvidia,pins = "lm1";
+                               nvidia,function = "rsvd3";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       pwm {
-                               nvidia,pins = "sdb", "sdc", "sdd";
-                               nvidia,function = "pwm";
+
+                       /* Colibri LCD (L_* resp. LDD<*>) */
+                       lcd {
+                               nvidia,pins = "ld0", "ld1", "ld2", "ld3",
+                                             "ld4", "ld5", "ld6", "ld7",
+                                             "ld8", "ld9", "ld10", "ld11",
+                                             "ld12", "ld13", "ld14", "ld15",
+                                             "ld16", "ld17", "lhs", "lsc0",
+                                             "lspi", "lvs";
+                               nvidia,function = "displaya";
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       sdio4 {
-                               nvidia,pins = "atb", "gma", "gme";
+                       /* Colibri LCD (Optional 24 BPP Support) */
+                       lcd-24 {
+                               nvidia,pins = "ldi", "lhp0", "lhp1", "lhp2",
+                                             "lpp", "lvp1";
+                               nvidia,function = "displaya";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri MMC */
+                       mmc {
+                               nvidia,pins = "atb", "gma";
                                nvidia,function = "sdio4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       spi1 {
-                               nvidia,pins = "spid", "spie", "spif";
-                               nvidia,function = "spi1";
+
+                       /* Colibri MMCCD */
+                       mmccd {
+                               nvidia,pins = "gmb";
+                               nvidia,function = "gmi_int";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       spi4 {
+
+                       /* Colibri MMC (Optional 8-bit) */
+                       mmc-8bit {
+                               nvidia,pins = "gme";
+                               nvidia,function = "sdio4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /*
+                        * Colibri Parallel Camera (Optional)
+                        * pins multiplexed with others and therefore disabled
+                        * Note: dta used for BL_ON by default
+                        */
+                       cif-mclk {
+                               nvidia,pins = "csus";
+                               nvidia,function = "vi_sensor_clk";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+                       cif {
+                               nvidia,pins = "dtb", "dtc", "dtd";
+                               nvidia,function = "vi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri PWM<C>, PWM<D> */
+                       pwm-c-d {
+                               nvidia,pins = "sdb", "sdd";
+                               nvidia,function = "pwm";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri SSP */
+                       ssp {
                                nvidia,pins = "slxa", "slxc", "slxd", "slxk";
                                nvidia,function = "spi4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       uarta {
+
+                       /* Colibri UART-A */
+                       uart-a {
                                nvidia,pins = "sdio1";
                                nvidia,function = "uarta";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       uartd {
+                       uart-a-dsr {
+                               nvidia,pins = "lpw1";
+                               nvidia,function = "rsvd3";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+                       uart-a-dcd {
+                               nvidia,pins = "lpw2";
+                               nvidia,function = "hdmi";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri UART-B */
+                       uart-b {
                                nvidia,pins = "gmc";
                                nvidia,function = "uartd";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       ulpi {
-                               nvidia,pins = "uaa", "uab", "uda";
-                               nvidia,function = "ulpi";
+
+                       /* Colibri UART-C */
+                       uart-c {
+                               nvidia,pins = "uad";
+                               nvidia,function = "irda";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri USB_CDET */
+                       usb-cdet {
+                               nvidia,pins = "spdo";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri USBH_OC */
+                       usbh-oc {
+                               nvidia,pins = "spih";
+                               nvidia,function = "spi2_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri USBH_PEN */
+                       usbh-pen {
+                               nvidia,pins = "spig";
+                               nvidia,function = "spi2_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri VGA not supported */
+                       vga {
+                               nvidia,pins = "crtp";
+                               nvidia,function = "crt";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* I2C3 (Optional) */
+                       i2c3 {
+                               nvidia,pins = "dtf";
+                               nvidia,function = "i2c3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* JTAG_RTCK */
+                       jtag-rtck {
+                               nvidia,pins = "gpu7";
+                               nvidia,function = "rtck";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /*
+                        * LAN_RESET, LAN_EXT_WAKEUP and LAN_PME
+                        * (All On-module)
+                        */
+                       gpio-gpv {
+                               nvidia,pins = "gpv";
+                               nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       ulpi_refclk {
-                               nvidia,pins = "cdev2";
-                               nvidia,function = "pllp_out4";
+
+                       /*
+                        * LAN_V_BUS, VDD_FAULT, BATT_FAULT, WM9712 PENDOWN
+                        * (All On-module); Colibri CAN_INT
+                        */
+                       gpio-dte {
+                               nvidia,pins = "dte";
+                               nvidia,function = "rsvd1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       usb_gpio {
-                               nvidia,pins = "spig", "spih";
-                               nvidia,function = "spi2_alt";
+
+                       /* NAND (On-module) */
+                       nand {
+                               nvidia,pins = "kbca", "kbcb", "kbcc", "kbcd",
+                                             "kbce", "kbcf";
+                               nvidia,function = "nand";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       vi {
-                               nvidia,pins = "dta", "dtb", "dtc", "dtd";
-                               nvidia,function = "vi";
+
+                       /* Onewire (Optional) */
+                       owr {
+                               nvidia,pins = "owc";
+                               nvidia,function = "owr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
-                       vi_sc {
-                               nvidia,pins = "csus";
-                               nvidia,function = "vi_sensor_clk";
+
+                       /* Power I2C (On-module) */
+                       i2cp {
+                               nvidia,pins = "i2cp";
+                               nvidia,function = "i2cp";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* RESET_OUT */
+                       reset-out {
+                               nvidia,pins = "ata";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /*
+                        * SPI1 (Optional)
+                        * Note: spid and spie used for Colibri Address/Data
+                        *       Bus (GMI)
+                        */
+                       spi1 {
+                               nvidia,pins = "spid", "spie", "spif";
+                               nvidia,function = "spi1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                        };
+
+                       /*
+                        * THERMD_ALERT# (On-module), unlatched I2C address pin
+                        * of LM95245 temperature sensor therefore requires
+                        * disabling for now
+                        */
+                       lvp0 {
+                               nvidia,pins = "lvp0";
+                               nvidia,function = "rsvd3";
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                       };
                };
        };
 
-       ac97: ac97@70002000 {
+       tegra_ac97: ac97@70002000 {
                status = "okay";
-               nvidia,codec-reset-gpio = <&gpio TEGRA_GPIO(V, 0)
-                       GPIO_ACTIVE_HIGH>;
-               nvidia,codec-sync-gpio = <&gpio TEGRA_GPIO(P, 0)
-                       GPIO_ACTIVE_HIGH>;
+               nvidia,codec-reset-gpio =
+                       <&gpio TEGRA_GPIO(V, 0) GPIO_ACTIVE_HIGH>;
+               nvidia,codec-sync-gpio =
+                       <&gpio TEGRA_GPIO(P, 0) GPIO_ACTIVE_HIGH>;
+       };
+
+       serial@70006040 {
+               compatible = "nvidia,tegra20-hsuart";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra20-hsuart";
        };
 
        nand-controller@70008000 {
@@ -243,7 +459,7 @@ i2c@7000c000 {
        };
 
        /* DDC_SCL/SDA on X3 pin 15/16 (e.g. display EDID) */
-       i2c_ddc: i2c@7000c400 {
+       hdmi_ddc: i2c@7000c400 {
                clock-frequency = <10000>;
        };
 
@@ -256,59 +472,45 @@ i2c@7000d000 {
                status = "okay";
                clock-frequency = <100000>;
 
-               pmic: tps6586x@34 {
+               pmic@34 {
                        compatible = "ti,tps6586x";
                        reg = <0x34>;
                        interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
-
                        ti,system-power-controller;
-
                        #gpio-cells = <2>;
                        gpio-controller;
-
-                       sys-supply = <&vdd_3v3_reg>;
-                       vin-sm0-supply = <&sys_reg>;
-                       vin-sm1-supply = <&sys_reg>;
-                       vin-sm2-supply = <&sys_reg>;
-                       vinldo01-supply = <&sm2_reg>;
-                       vinldo23-supply = <&vdd_3v3_reg>;
-                       vinldo4-supply = <&vdd_3v3_reg>;
-                       vinldo678-supply = <&vdd_3v3_reg>;
-                       vinldo9-supply = <&vdd_3v3_reg>;
+                       sys-supply = <&reg_module_3v3>;
+                       vin-sm0-supply = <&reg_3v3_vsys>;
+                       vin-sm1-supply = <&reg_3v3_vsys>;
+                       vin-sm2-supply = <&reg_3v3_vsys>;
+                       vinldo01-supply = <&reg_1v8_vdd_ddr2>;
+                       vinldo23-supply = <&reg_module_3v3>;
+                       vinldo4-supply = <&reg_module_3v3>;
+                       vinldo678-supply = <&reg_module_3v3>;
+                       vinldo9-supply = <&reg_module_3v3>;
 
                        regulators {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               sys_reg: regulator@0 {
-                                       reg = <0>;
-                                       regulator-compatible = "sys";
-                                       regulator-name = "vdd_sys";
+                               reg_3v3_vsys: sys {
+                                       regulator-name = "VSYS_3.3V";
                                        regulator-always-on;
                                };
 
-                               regulator@1 {
-                                       reg = <1>;
-                                       regulator-compatible = "sm0";
-                                       regulator-name = "vdd_sm0,vdd_core";
+                               sm0 {
+                                       regulator-name = "VDD_CORE_1.2V";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
                                };
 
-                               regulator@2 {
-                                       reg = <2>;
-                                       regulator-compatible = "sm1";
-                                       regulator-name = "vdd_sm1,vdd_cpu";
+                               sm1 {
+                                       regulator-name = "VDD_CPU_1.0V";
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1000000>;
                                        regulator-always-on;
                                };
 
-                               sm2_reg: regulator@3 {
-                                       reg = <3>;
-                                       regulator-compatible = "sm2";
-                                       regulator-name = "vdd_sm2,vin_ldo*";
+                               reg_1v8_vdd_ddr2: sm2 {
+                                       regulator-name = "VDD_DDR2_1.8V";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-always-on;
@@ -316,80 +518,68 @@ sm2_reg: regulator@3 {
 
                                /* LDO0 is not connected to anything */
 
-                               regulator@5 {
-                                       reg = <5>;
-                                       regulator-compatible = "ldo1";
-                                       regulator-name = "vdd_ldo1,avdd_pll*";
+                               /*
+                                * +3.3V_ENABLE_N switching via FET:
+                                * AVDD_AUDIO_S and +3.3V
+                                * see also +3.3V fixed supply
+                                */
+                               ldo1 {
+                                       regulator-name = "AVDD_PLL_1.1V";
                                        regulator-min-microvolt = <1100000>;
                                        regulator-max-microvolt = <1100000>;
                                        regulator-always-on;
                                };
 
-                               regulator@6 {
-                                       reg = <6>;
-                                       regulator-compatible = "ldo2";
-                                       regulator-name = "vdd_ldo2,vdd_rtc";
+                               ldo2 {
+                                       regulator-name = "VDD_RTC_1.2V";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                };
 
                                /* LDO3 is not connected to anything */
 
-                               regulator@8 {
-                                       reg = <8>;
-                                       regulator-compatible = "ldo4";
-                                       regulator-name = "vdd_ldo4,avdd_osc,vddio_sys";
+                               ldo4 {
+                                       regulator-name = "VDDIO_SYS_1.8V";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-always-on;
                                };
 
-                               ldo5_reg: regulator@9 {
-                                       reg = <9>;
-                                       regulator-compatible = "ldo5";
-                                       regulator-name = "vdd_ldo5,vdd_fuse";
+                               /* Switched via FET from regular +3.3V */
+                               ldo5 {
+                                       regulator-name = "+3.3V_USB";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
                                };
 
-                               regulator@10 {
-                                       reg = <10>;
-                                       regulator-compatible = "ldo6";
-                                       regulator-name = "vdd_ldo6,avdd_vdac,vddio_vi,vddio_cam";
+                               ldo6 {
+                                       regulator-name = "AVDD_VDAC_2.85V";
                                        regulator-min-microvolt = <2850000>;
                                        regulator-max-microvolt = <2850000>;
                                };
 
-                               hdmi_vdd_reg: regulator@11 {
-                                       reg = <11>;
-                                       regulator-compatible = "ldo7";
-                                       regulator-name = "vdd_ldo7,avdd_hdmi";
+                               reg_3v3_avdd_hdmi: ldo7 {
+                                       regulator-name = "AVDD_HDMI_3.3V";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                };
 
-                               hdmi_pll_reg: regulator@12 {
-                                       reg = <12>;
-                                       regulator-compatible = "ldo8";
-                                       regulator-name = "vdd_ldo8,avdd_hdmi_pll";
+                               reg_1v8_avdd_hdmi_pll: ldo8 {
+                                       regulator-name = "AVDD_HDMI_PLL_1.8V";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                };
 
-                               regulator@13 {
-                                       reg = <13>;
-                                       regulator-compatible = "ldo9";
-                                       regulator-name = "vdd_ldo9,avdd_2v85,vdd_ddr_rx";
+                               ldo9 {
+                                       regulator-name = "VDDIO_RX_DDR_2.85V";
                                        regulator-min-microvolt = <2850000>;
                                        regulator-max-microvolt = <2850000>;
                                        regulator-always-on;
                                };
 
-                               regulator@14 {
-                                       reg = <14>;
-                                       regulator-compatible = "ldo_rtc";
-                                       regulator-name = "vdd_rtc_out,vdd_cell";
+                               ldo_rtc {
+                                       regulator-name = "VCC_BATT";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
@@ -397,7 +587,8 @@ regulator@14 {
                        };
                };
 
-               temperature-sensor@4c {
+               /* LM95245 temperature sensor */
+               temp-sensor@4c {
                        compatible = "national,lm95245";
                        reg = <0x4c>;
                };
@@ -410,6 +601,14 @@ pmc@7000e400 {
                nvidia,core-pwr-good-time = <3845 3845>;
                nvidia,core-pwr-off-time = <3875>;
                nvidia,sys-clock-req-active-high;
+
+               /* Set SLEEP MODE bit in SUPPLYENE register of TPS658643 PMIC */
+               i2c-thermtrip {
+                       nvidia,i2c-controller-id = <3>;
+                       nvidia,bus-addr = <0x34>;
+                       nvidia,reg-addr = <0x14>;
+                       nvidia,reg-data = <0x8>;
+               };
        };
 
        memory-controller@7000f400 {
@@ -483,79 +682,87 @@ emc-table@333000 {
                };
        };
 
+       /* EHCI instance 1: ULPI PHY -> AX88772B (On-module) */
        usb@c5004000 {
                status = "okay";
-               nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
-                       GPIO_ACTIVE_LOW>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               asix@1 {
+                       reg = <1>;
+                       local-mac-address = [00 00 00 00 00 00];
+               };
        };
 
        usb-phy@c5004000 {
                status = "okay";
-               nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
-                       GPIO_ACTIVE_LOW>;
+               nvidia,phy-reset-gpio =
+                       <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
+               vbus-supply = <&reg_lan_v_bus>;
        };
 
-       sdhci@c8000600 {
-               cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
+       clk32k_in: xtal3 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
        };
 
-       clocks {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               clk32k_in: clock@0 {
-                       compatible = "fixed-clock";
-                       reg = <0>;
-                       #clock-cells = <0>;
-                       clock-frequency = <32768>;
-               };
+       reg_lan_v_bus: regulator-lan-v-bus {
+               compatible = "regulator-fixed";
+               regulator-name = "LAN_V_BUS";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
        };
 
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               vdd_3v3_reg: regulator@100 {
-                       compatible = "regulator-fixed";
-                       reg = <100>;
-                       regulator-name = "vdd_3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-always-on;
-               };
-
-               regulator@101 {
-                       compatible = "regulator-fixed";
-                       reg = <101>;
-                       regulator-name = "internal_usb";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       enable-active-high;
-                       regulator-boot-on;
-                       regulator-always-on;
-                       gpio = <&gpio TEGRA_GPIO(BB, 1) GPIO_ACTIVE_HIGH>;
-               };
+       reg_module_3v3: regulator-module-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
        };
 
        sound {
                compatible = "nvidia,tegra-audio-wm9712-colibri_t20",
-                                "nvidia,tegra-audio-wm9712";
-               nvidia,model = "Colibri T20 AC97 Audio";
-
+                            "nvidia,tegra-audio-wm9712";
+               nvidia,model = "Toradex Colibri T20";
                nvidia,audio-routing =
                        "Headphone", "HPOUTL",
                        "Headphone", "HPOUTR",
                        "LineIn", "LINEINL",
                        "LineIn", "LINEINR",
                        "Mic", "MIC1";
-
-               nvidia,ac97-controller = <&ac97>;
-
+               nvidia,ac97-controller = <&tegra_ac97>;
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
                         <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
 };
+
+&gpio {
+       lan-reset-n {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(V, 4) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "LAN_RESET#";
+       };
+
+       /* Tri-stating GMI_WR_N on SODIMM pin 99 nPWE */
+       npwe {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "Tri-state nPWE";
+       };
+
+       /* Not tri-stating GMI_WR_N on SODIMM pin 93 RDnWR */
+       rdnwr {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(T, 6) GPIO_ACTIVE_HIGH>;
+               output-low;
+               line-name = "Not tri-state RDnWR";
+       };
+};
index ef245291924f076d73aec01d5ad0f68db0e92589..8861e0976e3759a0e5c437c086afa0664a1e3fa0 100644 (file)
@@ -303,7 +303,7 @@ nvec@7000c500 {
                request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
                slave-addr = <138>;
                clocks = <&tegra_car TEGRA20_CLK_I2C3>,
-                        <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
+                        <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
                clock-names = "div-clk", "fast-clk";
                resets = <&tegra_car 67>;
                reset-names = "i2c";
@@ -524,10 +524,10 @@ clk32k_in: clock@0 {
        gpio-keys {
                compatible = "gpio-keys";
 
-               power {
-                       label = "Power";
+               wakeup {
+                       label = "Wakeup";
                        gpios = <&gpio TEGRA_GPIO(J, 7) GPIO_ACTIVE_LOW>;
-                       linux,code = <KEY_POWER>;
+                       linux,code = <KEY_WAKEUP>;
                        wakeup-source;
                };
        };
@@ -599,8 +599,8 @@ sound {
                        GPIO_ACTIVE_HIGH>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
-                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
-                        <&tegra_car TEGRA20_CLK_CDEV1>;
+                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
 };
index 15b73bd377f0408b948f80b36a4afaff82f14688..20869757d32f46f9fa264e83f86724d22284dc91 100644 (file)
@@ -419,19 +419,6 @@ uarte: serial@70006400 {
                status = "disabled";
        };
 
-       gmi@70009000 {
-               compatible = "nvidia,tegra20-gmi";
-               reg = <0x70009000 0x1000>;
-               #address-cells = <2>;
-               #size-cells = <1>;
-               ranges = <0 0 0xd0000000 0xfffffff>;
-               clocks = <&tegra_car TEGRA20_CLK_NOR>;
-               clock-names = "gmi";
-               resets = <&tegra_car 42>;
-               reset-names = "gmi";
-               status = "disabled";
-       };
-
        nand-controller@70008000 {
                compatible = "nvidia,tegra20-nand";
                reg = <0x70008000 0x100>;
@@ -447,6 +434,19 @@ nand-controller@70008000 {
                status = "disabled";
        };
 
+       gmi@70009000 {
+               compatible = "nvidia,tegra20-gmi";
+               reg = <0x70009000 0x1000>;
+               #address-cells = <2>;
+               #size-cells = <1>;
+               ranges = <0 0 0xd0000000 0xfffffff>;
+               clocks = <&tegra_car TEGRA20_CLK_NOR>;
+               clock-names = "gmi";
+               resets = <&tegra_car 42>;
+               reset-names = "gmi";
+               status = "disabled";
+       };
+
        pwm: pwm@7000a000 {
                compatible = "nvidia,tegra20-pwm";
                reg = <0x7000a000 0x100>;
@@ -865,5 +865,7 @@ pmu {
                compatible = "arm,cortex-a9-pmu";
                interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&{/cpus/cpu@0}>,
+                                    <&{/cpus/cpu@1}>;
        };
 };
index 0dc85a20bd4535ccfe5945a2194a9e0dee5d3f9c..749fc6d1ff70e8e8b47b216d1152a1d5fe964919 100644 (file)
@@ -6,11 +6,12 @@
 
 / {
        model = "Toradex Apalis T30 on Apalis Evaluation Board";
-       compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30", "nvidia,tegra30";
+       compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30",
+                    "nvidia,tegra30";
 
        aliases {
                rtc0 = "/i2c@7000c000/rtc@68";
-               rtc1 = "/i2c@7000d000/tps65911@2d";
+               rtc1 = "/i2c@7000d000/pmic@2d";
                rtc2 = "/rtc@7000e000";
                serial0 = &uarta;
                serial1 = &uartb;
@@ -23,8 +24,6 @@ chosen {
        };
 
        pcie@3000 {
-               status = "okay";
-
                pci@1,0 {
                        status = "okay";
                };
@@ -32,10 +31,6 @@ pci@1,0 {
                pci@2,0 {
                        status = "okay";
                };
-
-               pci@3,0 {
-                       status = "okay";
-               };
        };
 
        host1x@50000000 {
@@ -45,27 +40,30 @@ rgb {
                                nvidia,panel = <&panel>;
                        };
                };
+
                hdmi@54280000 {
                        status = "okay";
+                       hdmi-supply = <&reg_5v0>;
                };
        };
 
+       /* Apalis UART1 */
        serial@70006000 {
                status = "okay";
        };
 
+       /* Apalis UART2 */
        serial@70006040 {
-               compatible = "nvidia,tegra30-hsuart";
                status = "okay";
        };
 
+       /* Apalis UART3 */
        serial@70006200 {
-               compatible = "nvidia,tegra30-hsuart";
                status = "okay";
        };
 
+       /* Apalis UART4 */
        serial@70006300 {
-               compatible = "nvidia,tegra30-hsuart";
                status = "okay";
        };
 
@@ -99,13 +97,13 @@ rtc@68 {
         * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
         * carrier board)
         */
-       cami2c: i2c@7000c500 {
+       i2c@7000c500 {
                status = "okay";
                clock-frequency = <400000>;
        };
 
        /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
-       hdmiddc: i2c@7000c700 {
+       i2c@7000c700 {
                status = "okay";
        };
 
@@ -113,29 +111,16 @@ hdmiddc: i2c@7000c700 {
        spi@7000d400 {
                status = "okay";
                spi-max-frequency = <25000000>;
-               spidev0: spidev@1 {
-                       compatible = "spidev";
-                       reg = <1>;
-                       spi-max-frequency = <25000000>;
-               };
        };
 
        /* SPI5: Apalis SPI2 */
        spi@7000dc00 {
                status = "okay";
                spi-max-frequency = <25000000>;
-               spidev1: spidev@2 {
-                       compatible = "spidev";
-                       reg = <2>;
-                       spi-max-frequency = <25000000>;
-               };
-       };
-
-       hda@70030000 {
-               status = "okay";
        };
 
-       sd1: sdhci@78000000 {
+       /* Apalis SD1 */
+       sdhci@78000000 {
                status = "okay";
                bus-width = <4>;
                /* SD1_CD# */
@@ -143,7 +128,8 @@ sd1: sdhci@78000000 {
                no-1-8-v;
        };
 
-       mmc1: sdhci@78000400 {
+       /* Apalis MMC1 */
+       sdhci@78000400 {
                status = "okay";
                bus-width = <8>;
                /* MMC1_CD# */
@@ -154,12 +140,12 @@ mmc1: sdhci@78000400 {
        /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
        usb@7d000000 {
                status = "okay";
+               dr_mode = "otg";
        };
 
        usb-phy@7d000000 {
                status = "okay";
-               dr_mode = "otg";
-               vbus-supply = <&usbo1_vbus_reg>;
+               vbus-supply = <&reg_usbo1_vbus>;
        };
 
        /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
@@ -169,7 +155,7 @@ usb@7d004000 {
 
        usb-phy@7d004000 {
                status = "okay";
-               vbus-supply = <&usbh_vbus_reg>;
+               vbus-supply = <&reg_usbh_vbus>;
        };
 
        /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
@@ -179,18 +165,17 @@ usb@7d008000 {
 
        usb-phy@7d008000 {
                status = "okay";
-               vbus-supply = <&usbh_vbus_reg>;
+               vbus-supply = <&reg_usbh_vbus>;
        };
 
        backlight: backlight {
                compatible = "pwm-backlight";
-
-               /* PWM_BKL1 */
-               pwms = <&pwm 0 5000000>;
                brightness-levels = <255 231 223 207 191 159 127 0>;
                default-brightness-level = <6>;
                /* BKL1_ON */
                enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 0 5000000>; /* BKL1_PWM */
        };
 
        gpio-keys {
@@ -211,64 +196,53 @@ panel: panel {
                 * edt,et070080dh6: EDT 7.0" LCD TFT
                 */
                compatible = "edt,et057090dhu", "simple-panel";
-
                backlight = <&backlight>;
+               power-supply = <&reg_3v3>;
        };
 
-       pwmleds {
-               compatible = "pwm-leds";
-
-               pwm1 {
-                       label = "PWM1";
-                       pwms = <&pwm 3 19600>;
-                       max-brightness = <255>;
-               };
-
-               pwm2 {
-                       label = "PWM2";
-                       pwms = <&pwm 2 19600>;
-                       max-brightness = <255>;
-               };
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
 
-               pwm3 {
-                       label = "PWM3";
-                       pwms = <&pwm 1 19600>;
-                       max-brightness = <255>;
-               };
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5V_SW";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
        };
 
-       regulators {
-               sys_5v0_reg: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-always-on;
-               };
+       /* USBO1_EN */
+       reg_usbo1_vbus: regulator-usbo1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USBO1";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               vin-supply = <&reg_5v0>;
+       };
 
-               /* USBO1_EN */
-               usbo1_vbus_reg: regulator@2 {
-                       compatible = "regulator-fixed";
-                       reg = <2>;
-                       regulator-name = "usbo1_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
-                       enable-active-high;
-                       vin-supply = <&sys_5v0_reg>;
-               };
+       /* USBH_EN */
+       reg_usbh_vbus: regulator-usbh-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               vin-supply = <&reg_5v0>;
+       };
+};
 
-               /* USBH_EN */
-               usbh_vbus_reg: regulator@3 {
-                       compatible = "regulator-fixed";
-                       reg = <3>;
-                       regulator-name = "usbh_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
-                       enable-active-high;
-                       vin-supply = <&sys_5v0_reg>;
-               };
+&gpio {
+       /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
+       pex-perst-n {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(S, 7) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "PEX_PERST_N";
        };
 };
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 (file)
index 0000000..0be50e8
--- /dev/null
@@ -0,0 +1,266 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "tegra30-apalis-v1.1.dtsi"
+
+/ {
+       model = "Toradex Apalis T30 on Apalis Evaluation Board";
+       compatible = "toradex,apalis_t30-v1.1-eval", "toradex,apalis_t30-eval",
+                    "toradex,apalis_t30-v1.1", "toradex,apalis_t30",
+                    "nvidia,tegra30";
+
+       aliases {
+               rtc0 = "/i2c@7000c000/rtc@68";
+               rtc1 = "/i2c@7000d000/pmic@2d";
+               rtc2 = "/rtc@7000e000";
+               serial0 = &uarta;
+               serial1 = &uartb;
+               serial2 = &uartc;
+               serial3 = &uartd;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       pcie@3000 {
+               pci@1,0 {
+                       status = "okay";
+               };
+
+               pci@2,0 {
+                       status = "okay";
+               };
+       };
+
+       host1x@50000000 {
+               dc@54200000 {
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&panel>;
+                       };
+               };
+
+               hdmi@54280000 {
+                       status = "okay";
+                       hdmi-supply = <&reg_5v0>;
+               };
+       };
+
+       /* Apalis UART1 */
+       serial@70006000 {
+               status = "okay";
+       };
+
+       /* Apalis UART2 */
+       serial@70006040 {
+               status = "okay";
+       };
+
+       /* Apalis UART3 */
+       serial@70006200 {
+               status = "okay";
+       };
+
+       /* Apalis UART4 */
+       serial@70006300 {
+               status = "okay";
+       };
+
+       pwm@7000a000 {
+               status = "okay";
+       };
+
+       /*
+        * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
+        * board)
+        */
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <400000>;
+
+               pcie-switch@58 {
+                       compatible = "plx,pex8605";
+                       reg = <0x58>;
+               };
+
+               /* M41T0M6 real time clock on carrier board */
+               rtc@68 {
+                       compatible = "st,m41t0";
+                       reg = <0x68>;
+               };
+       };
+
+       /* GEN2_I2C: unused */
+
+       /*
+        * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
+        * carrier board)
+        */
+       i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <400000>;
+       };
+
+       /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
+       i2c@7000c700 {
+               status = "okay";
+       };
+
+       /* SPI1: Apalis SPI1 */
+       spi@7000d400 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+       };
+
+       /* SPI5: Apalis SPI2 */
+       spi@7000dc00 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+       };
+
+       /* Apalis SD1 */
+       sdhci@78000000 {
+               status = "okay";
+               bus-width = <4>;
+               /* SD1_CD# */
+               cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_LOW>;
+               no-1-8-v;
+       };
+
+       /* Apalis MMC1 */
+       sdhci@78000400 {
+               status = "okay";
+               bus-width = <8>;
+               /* MMC1_CD# */
+               cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
+               vqmmc-supply = <&reg_vddio_sdmmc3>;
+       };
+
+       /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
+       usb@7d000000 {
+               status = "okay";
+               dr_mode = "otg";
+       };
+
+       usb-phy@7d000000 {
+               status = "okay";
+               vbus-supply = <&reg_usbo1_vbus>;
+       };
+
+       /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
+       usb@7d004000 {
+               status = "okay";
+       };
+
+       usb-phy@7d004000 {
+               status = "okay";
+               vbus-supply = <&reg_usbh_vbus>;
+       };
+
+       /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
+       usb@7d008000 {
+               status = "okay";
+       };
+
+       usb-phy@7d008000 {
+               status = "okay";
+               vbus-supply = <&reg_usbh_vbus>;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               brightness-levels = <255 231 223 207 191 159 127 0>;
+               default-brightness-level = <6>;
+               /* BKL1_ON */
+               enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 0 5000000>; /* BKL1_PWM */
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               wakeup {
+                       label = "WAKE1_MICO";
+                       gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_WAKEUP>;
+                       debounce-interval = <10>;
+                       wakeup-source;
+               };
+       };
+
+       panel: panel {
+               /*
+                * edt,et057090dhu: EDT 5.7" LCD TFT
+                * edt,et070080dh6: EDT 7.0" LCD TFT
+                */
+               compatible = "edt,et057090dhu", "simple-panel";
+               backlight = <&backlight>;
+               power-supply = <&reg_3v3>;
+       };
+
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5V_SW";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       /* USBO1_EN */
+       reg_usbo1_vbus: regulator-usbo1-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USBO1";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               vin-supply = <&reg_5v0>;
+       };
+
+       /* USBH_EN */
+       reg_usbh_vbus: regulator-usbh-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               vin-supply = <&reg_5v0>;
+       };
+
+       /*
+        * 1.8 volt resp. 3.3 volt VDDIO_SDMMC3 depending on
+        * EN_+3.3_SDMMC3 GPIO
+        */
+       reg_vddio_sdmmc3: regulator-vddio-sdmmc3 {
+               compatible = "regulator-gpio";
+               regulator-name = "VDDIO_SDMMC3";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-type = "voltage";
+               gpios = <&gpio TEGRA_GPIO(J, 5) GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x0
+                         3300000 0x1>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vddio_sdmmc_1v8_reg>;
+       };
+};
+
+&gpio {
+       /* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
+       pex-perst-n {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(S, 7) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "PEX_PERST_N";
+       };
+};
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 (file)
index 0000000..02f8126
--- /dev/null
@@ -0,0 +1,1189 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+#include "tegra30.dtsi"
+
+/*
+ * Toradex Apalis T30 Module Device Tree
+ * Compatible for Revisions 1GB: V1.1A, V1.1B; 1GB IT: V1.1A, V1.1B;
+ * 2GB: V1.1A, V1.1B
+ */
+/ {
+       memory@80000000 {
+               reg = <0x80000000 0x40000000>;
+       };
+
+       pcie@3000 {
+               status = "okay";
+               avdd-pexa-supply = <&vdd2_reg>;
+               avdd-pexb-supply = <&vdd2_reg>;
+               avdd-pex-pll-supply = <&vdd2_reg>;
+               avdd-plle-supply = <&ldo6_reg>;
+               hvdd-pex-supply = <&reg_module_3v3>;
+               vddio-pex-ctl-supply = <&reg_module_3v3>;
+               vdd-pexa-supply = <&vdd2_reg>;
+               vdd-pexb-supply = <&vdd2_reg>;
+
+               /* Apalis type specific */
+               pci@1,0 {
+                       nvidia,num-lanes = <4>;
+               };
+
+               /* Apalis PCIe */
+               pci@2,0 {
+                       nvidia,num-lanes = <1>;
+               };
+
+               /* I210/I211 Gigabit Ethernet Controller (on-module) */
+               pci@3,0 {
+                       status = "okay";
+                       nvidia,num-lanes = <1>;
+
+                       pcie@0 {
+                               reg = <0 0 0 0 0>;
+                               local-mac-address = [00 00 00 00 00 00];
+                       };
+               };
+       };
+
+       host1x@50000000 {
+               hdmi@54280000 {
+                       nvidia,ddc-i2c-bus = <&hdmi_ddc>;
+                       nvidia,hpd-gpio =
+                               <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+                       pll-supply = <&reg_1v8_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
+               };
+       };
+
+       pinmux@70000868 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&state_default>;
+
+               state_default: pinmux {
+                       /* Analogue Audio (On-module) */
+                       clk1-out-pw4 {
+                               nvidia,pins = "clk1_out_pw4";
+                               nvidia,function = "extperiph1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap3-fs-pp0 {
+                               nvidia,pins = "dap3_fs_pp0",
+                                             "dap3_sclk_pp3",
+                                             "dap3_din_pp1",
+                                             "dap3_dout_pp2";
+                               nvidia,function = "i2s2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis BKL1_ON */
+                       pv2 {
+                               nvidia,pins = "pv2";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis BKL1_PWM */
+                       uart3-rts-n-pc0 {
+                               nvidia,pins = "uart3_rts_n_pc0";
+                               nvidia,function = "pwm0";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
+                       uart3-cts-n-pa1 {
+                               nvidia,pins = "uart3_cts_n_pa1";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis CAN1 on SPI6 */
+                       spi2-cs0-n-px3 {
+                               nvidia,pins = "spi2_cs0_n_px3",
+                                             "spi2_miso_px1",
+                                             "spi2_mosi_px0",
+                                             "spi2_sck_px2";
+                               nvidia,function = "spi6";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* CAN_INT1 */
+                       spi2-cs1-n-pw2 {
+                               nvidia,pins = "spi2_cs1_n_pw2";
+                               nvidia,function = "spi3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis CAN2 on SPI4 */
+                       gmi-a16-pj7 {
+                               nvidia,pins = "gmi_a16_pj7",
+                                             "gmi_a17_pb0",
+                                             "gmi_a18_pb1",
+                                             "gmi_a19_pk7";
+                               nvidia,function = "spi4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* CAN_INT2 */
+                       spi2-cs2-n-pw3 {
+                               nvidia,pins = "spi2_cs2_n_pw3";
+                               nvidia,function = "spi3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis Digital Audio */
+                       clk1-req-pee2 {
+                               nvidia,pins = "clk1_req_pee2";
+                               nvidia,function = "hda";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       clk2-out-pw5 {
+                               nvidia,pins = "clk2_out_pw5";
+                               nvidia,function = "extperiph2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap1-fs-pn0 {
+                               nvidia,pins = "dap1_fs_pn0",
+                                             "dap1_din_pn1",
+                                             "dap1_dout_pn2",
+                                             "dap1_sclk_pn3";
+                               nvidia,function = "hda";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis GPIO */
+                       kb-col0-pq0 {
+                               nvidia,pins = "kb_col0_pq0",
+                                             "kb_col1_pq1",
+                                             "kb_row10_ps2",
+                                             "kb_row11_ps3",
+                                             "kb_row12_ps4",
+                                             "kb_row13_ps5",
+                                             "kb_row14_ps6",
+                                             "kb_row15_ps7";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Multiplexed and therefore disabled */
+                       owr {
+                               nvidia,pins = "owr";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis HDMI1 */
+                       hdmi-cec-pee3 {
+                               nvidia,pins = "hdmi_cec_pee3";
+                               nvidia,function = "cec";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                       };
+                       hdmi-int-pn7 {
+                               nvidia,pins = "hdmi_int_pn7";
+                               nvidia,function = "hdmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C1 */
+                       gen1-i2c-scl-pc4 {
+                               nvidia,pins = "gen1_i2c_scl_pc4",
+                                             "gen1_i2c_sda_pc5";
+                               nvidia,function = "i2c1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C2 (DDC) */
+                       ddc-scl-pv4 {
+                               nvidia,pins = "ddc_scl_pv4",
+                                             "ddc_sda_pv5";
+                               nvidia,function = "i2c4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C3 (CAM) */
+                       cam-i2c-scl-pbb1 {
+                               nvidia,pins = "cam_i2c_scl_pbb1",
+                                             "cam_i2c_sda_pbb2";
+                               nvidia,function = "i2c3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis LCD1 */
+                       lcd-d0-pe0 {
+                               nvidia,pins = "lcd_d0_pe0",
+                                             "lcd_d1_pe1",
+                                             "lcd_d2_pe2",
+                                             "lcd_d3_pe3",
+                                             "lcd_d4_pe4",
+                                             "lcd_d5_pe5",
+                                             "lcd_d6_pe6",
+                                             "lcd_d7_pe7",
+                                             "lcd_d8_pf0",
+                                             "lcd_d9_pf1",
+                                             "lcd_d10_pf2",
+                                             "lcd_d11_pf3",
+                                             "lcd_d12_pf4",
+                                             "lcd_d13_pf5",
+                                             "lcd_d14_pf6",
+                                             "lcd_d15_pf7",
+                                             "lcd_d16_pm0",
+                                             "lcd_d17_pm1",
+                                             "lcd_d18_pm2",
+                                             "lcd_d19_pm3",
+                                             "lcd_d20_pm4",
+                                             "lcd_d21_pm5",
+                                             "lcd_d22_pm6",
+                                             "lcd_d23_pm7",
+                                             "lcd_de_pj1",
+                                             "lcd_hsync_pj3",
+                                             "lcd_pclk_pb3",
+                                             "lcd_vsync_pj4";
+                               nvidia,function = "displaya";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis MMC1 */
+                       sdmmc3-clk-pa6 {
+                               nvidia,pins = "sdmmc3_clk_pa6";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       sdmmc3-dat0-pb7 {
+                               nvidia,pins = "sdmmc3_cmd_pa7",
+                                             "sdmmc3_dat0_pb7",
+                                             "sdmmc3_dat1_pb6",
+                                             "sdmmc3_dat2_pb5",
+                                             "sdmmc3_dat3_pb4",
+                                             "sdmmc3_dat4_pd1",
+                                             "sdmmc3_dat5_pd0",
+                                             "sdmmc3_dat6_pd3",
+                                             "sdmmc3_dat7_pd4";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Apalis MMC1_CD# */
+                       pv3 {
+                               nvidia,pins = "pv3";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis Parallel Camera */
+                       cam-mclk-pcc0 {
+                               nvidia,pins = "cam_mclk_pcc0";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       vi-vsync-pd6 {
+                               nvidia,pins = "vi_d0_pt4",
+                                             "vi_d1_pd5",
+                                             "vi_d2_pl0",
+                                             "vi_d3_pl1",
+                                             "vi_d4_pl2",
+                                             "vi_d5_pl3",
+                                             "vi_d6_pl4",
+                                             "vi_d7_pl5",
+                                             "vi_d8_pl6",
+                                             "vi_d9_pl7",
+                                             "vi_d10_pt2",
+                                             "vi_d11_pt3",
+                                             "vi_hsync_pd7",
+                                             "vi_pclk_pt0",
+                                             "vi_vsync_pd6";
+                               nvidia,function = "vi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Multiplexed and therefore disabled */
+                       kb-col2-pq2 {
+                               nvidia,pins = "kb_col2_pq2",
+                                             "kb_col3_pq3",
+                                             "kb_col4_pq4",
+                                             "kb_row4_pr4";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-row0-pr0 {
+                               nvidia,pins = "kb_row0_pr0",
+                                             "kb_row1_pr1",
+                                             "kb_row2_pr2",
+                                             "kb_row3_pr3";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-row5-pr5 {
+                               nvidia,pins = "kb_row5_pr5",
+                                             "kb_row6_pr6",
+                                             "kb_row7_pr7";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /*
+                        * VI level-shifter direction
+                        * (pull-down => default direction input)
+                        */
+                       vi-mclk-pt1 {
+                               nvidia,pins = "vi_mclk_pt1";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM1 */
+                       pu6 {
+                               nvidia,pins = "pu6";
+                               nvidia,function = "pwm3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM2 */
+                       pu5 {
+                               nvidia,pins = "pu5";
+                               nvidia,function = "pwm2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM3 */
+                       pu4 {
+                               nvidia,pins = "pu4";
+                               nvidia,function = "pwm1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM4 */
+                       pu3 {
+                               nvidia,pins = "pu3";
+                               nvidia,function = "pwm0";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis RESET_MOCI# */
+                       gmi-rst-n-pi4 {
+                               nvidia,pins = "gmi_rst_n_pi4";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis SATA1_ACT# */
+                       pex-l0-prsnt-n-pdd0 {
+                               nvidia,pins = "pex_l0_prsnt_n_pdd0";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis SD1 */
+                       sdmmc1-clk-pz0 {
+                               nvidia,pins = "sdmmc1_clk_pz0";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       sdmmc1-cmd-pz1 {
+                               nvidia,pins = "sdmmc1_cmd_pz1",
+                                             "sdmmc1_dat0_py7",
+                                             "sdmmc1_dat1_py6",
+                                             "sdmmc1_dat2_py5",
+                                             "sdmmc1_dat3_py4";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Apalis SD1_CD# */
+                       clk2-req-pcc5 {
+                               nvidia,pins = "clk2_req_pcc5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis SPDIF1 */
+                       spdif-out-pk5 {
+                               nvidia,pins = "spdif_out_pk5",
+                                             "spdif_in_pk6";
+                               nvidia,function = "spdif";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis SPI1 */
+                       spi1-sck-px5 {
+                               nvidia,pins = "spi1_sck_px5",
+                                             "spi1_mosi_px4",
+                                             "spi1_miso_px7",
+                                             "spi1_cs0_n_px6";
+                               nvidia,function = "spi1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis SPI2 */
+                       lcd-sck-pz4 {
+                               nvidia,pins = "lcd_sck_pz4",
+                                             "lcd_sdout_pn5",
+                                             "lcd_sdin_pz2",
+                                             "lcd_cs0_n_pn4";
+                               nvidia,function = "spi5";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /*
+                        * Apalis TS (Low-speed type specific)
+                        * pins may be used as GPIOs
+                        */
+                       kb-col5-pq5 {
+                               nvidia,pins = "kb_col5_pq5";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       kb-col6-pq6 {
+                               nvidia,pins = "kb_col6_pq6",
+                                             "kb_col7_pq7",
+                                             "kb_row8_ps0",
+                                             "kb_row9_ps1";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis UART1 */
+                       ulpi-data0 {
+                               nvidia,pins = "ulpi_data0_po1",
+                                             "ulpi_data1_po2",
+                                             "ulpi_data2_po3",
+                                             "ulpi_data3_po4",
+                                             "ulpi_data4_po5",
+                                             "ulpi_data5_po6",
+                                             "ulpi_data6_po7",
+                                             "ulpi_data7_po0";
+                               nvidia,function = "uarta";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART2 */
+                       ulpi-clk-py0 {
+                               nvidia,pins = "ulpi_clk_py0",
+                                             "ulpi_dir_py1",
+                                             "ulpi_nxt_py2",
+                                             "ulpi_stp_py3";
+                               nvidia,function = "uartd";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART3 */
+                       uart2-rxd-pc3 {
+                               nvidia,pins = "uart2_rxd_pc3",
+                                             "uart2_txd_pc2";
+                               nvidia,function = "uartb";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART4 */
+                       uart3-rxd-pw7 {
+                               nvidia,pins = "uart3_rxd_pw7",
+                                             "uart3_txd_pw6";
+                               nvidia,function = "uartc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBH_EN */
+                       pex-l0-rst-n-pdd1 {
+                               nvidia,pins = "pex_l0_rst_n_pdd1";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBH_OC# */
+                       pex-l0-clkreq-n-pdd2 {
+                               nvidia,pins = "pex_l0_clkreq_n_pdd2";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis USBO1_EN */
+                       gen2-i2c-scl-pt5 {
+                               nvidia,pins = "gen2_i2c_scl_pt5";
+                               nvidia,function = "rsvd4";
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBO1_OC# */
+                       gen2-i2c-sda-pt6 {
+                               nvidia,pins = "gen2_i2c_sda_pt6";
+                               nvidia,function = "rsvd4";
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis VGA1 not supported and therefore disabled */
+                       crt-hsync-pv6 {
+                               nvidia,pins = "crt_hsync_pv6",
+                                             "crt_vsync_pv7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis WAKE1_MICO */
+                       pv1 {
+                               nvidia,pins = "pv1";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* eMMC (On-module) */
+                       sdmmc4-clk-pcc4 {
+                               nvidia,pins = "sdmmc4_clk_pcc4",
+                                             "sdmmc4_cmd_pt7",
+                                             "sdmmc4_rst_n_pcc3";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       sdmmc4-dat0-paa0 {
+                               nvidia,pins = "sdmmc4_dat0_paa0",
+                                             "sdmmc4_dat1_paa1",
+                                             "sdmmc4_dat2_paa2",
+                                             "sdmmc4_dat3_paa3",
+                                             "sdmmc4_dat4_paa4",
+                                             "sdmmc4_dat5_paa5",
+                                             "sdmmc4_dat6_paa6",
+                                             "sdmmc4_dat7_paa7";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* EN_+3.3_SDMMC3 */
+                       uart2-cts-n-pj5 {
+                               nvidia,pins = "uart2_cts_n_pj5";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* LAN i210/i211 DEV_OFF_N, PE_RST_N (On-module) */
+                       pex-l2-prsnt-n-pdd7 {
+                               nvidia,pins = "pex_l2_prsnt_n_pdd7",
+                                             "pex_l2_rst_n_pcc6";
+                               nvidia,function = "pcie";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* LAN i210/i211 PE_WAKE_N, SDP3 (On-module) */
+                       pex-wake-n-pdd3 {
+                               nvidia,pins = "pex_wake_n_pdd3",
+                                             "pex_l2_clkreq_n_pcc7";
+                               nvidia,function = "pcie";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* LAN i210/i211 SMB_ALERT_N (On-module) */
+                       sys-clk-req-pz5 {
+                               nvidia,pins = "sys_clk_req_pz5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* LVDS Transceiver Configuration */
+                       pbb0 {
+                               nvidia,pins = "pbb0",
+                                             "pbb7",
+                                             "pcc1",
+                                             "pcc2";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       pbb3 {
+                               nvidia,pins = "pbb3",
+                                             "pbb4",
+                                             "pbb5",
+                                             "pbb6";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Not connected and therefore disabled */
+                       clk-32k-out-pa0 {
+                               nvidia,pins = "clk3_out_pee0",
+                                             "clk3_req_pee1",
+                                             "clk_32k_out_pa0",
+                                             "dap4_din_pp5",
+                                             "dap4_dout_pp6",
+                                             "dap4_fs_pp4",
+                                             "dap4_sclk_pp7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap2-fs-pa2 {
+                               nvidia,pins = "dap2_fs_pa2",
+                                             "dap2_sclk_pa3",
+                                             "dap2_din_pa4",
+                                             "dap2_dout_pa5",
+                                             "lcd_dc0_pn6",
+                                             "lcd_m1_pw1",
+                                             "lcd_pwr1_pc1",
+                                             "pex_l1_clkreq_n_pdd6",
+                                             "pex_l1_prsnt_n_pdd4",
+                                             "pex_l1_rst_n_pdd5";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-ad0-pg0 {
+                               nvidia,pins = "gmi_ad0_pg0",
+                                             "gmi_ad2_pg2",
+                                             "gmi_ad3_pg3",
+                                             "gmi_ad4_pg4",
+                                             "gmi_ad5_pg5",
+                                             "gmi_ad6_pg6",
+                                             "gmi_ad7_pg7",
+                                             "gmi_ad8_ph0",
+                                             "gmi_ad9_ph1",
+                                             "gmi_ad10_ph2",
+                                             "gmi_ad11_ph3",
+                                             "gmi_ad12_ph4",
+                                             "gmi_ad13_ph5",
+                                             "gmi_ad14_ph6",
+                                             "gmi_ad15_ph7",
+                                             "gmi_adv_n_pk0",
+                                             "gmi_clk_pk1",
+                                             "gmi_cs4_n_pk2",
+                                             "gmi_cs2_n_pk3",
+                                             "gmi_dqs_pi2",
+                                             "gmi_iordy_pi5",
+                                             "gmi_oe_n_pi1",
+                                             "gmi_wait_pi7",
+                                             "gmi_wr_n_pi0",
+                                             "lcd_cs1_n_pw0",
+                                             "pu0",
+                                             "pu1",
+                                             "pu2";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs0-n-pj0 {
+                               nvidia,pins = "gmi_cs0_n_pj0",
+                                             "gmi_cs1_n_pj2",
+                                             "gmi_cs3_n_pk4";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs6-n-pi3 {
+                               nvidia,pins = "gmi_cs6_n_pi3";
+                               nvidia,function = "sata";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs7-n-pi6 {
+                               nvidia,pins = "gmi_cs7_n_pi6";
+                               nvidia,function = "gmi_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       lcd-pwr0-pb2 {
+                               nvidia,pins = "lcd_pwr0_pb2",
+                                             "lcd_pwr2_pc6",
+                                             "lcd_wr_n_pz3";
+                               nvidia,function = "hdcp";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       uart2-rts-n-pj6 {
+                               nvidia,pins = "uart2_rts_n_pj6";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Power I2C (On-module) */
+                       pwr-i2c-scl-pz6 {
+                               nvidia,pins = "pwr_i2c_scl_pz6",
+                                             "pwr_i2c_sda_pz7";
+                               nvidia,function = "i2cpwr";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /*
+                        * THERMD_ALERT#, unlatched I2C address pin of LM95245
+                        * temperature sensor therefore requires disabling for
+                        * now
+                        */
+                       lcd-dc1-pd2 {
+                               nvidia,pins = "lcd_dc1_pd2";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* TOUCH_PEN_INT# (On-module) */
+                       pv0 {
+                               nvidia,pins = "pv0";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+               };
+       };
+
+       serial@70006040 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       serial@70006200 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       hdmi_ddc: i2c@7000c700 {
+               clock-frequency = <10000>;
+       };
+
+       /*
+        * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
+        * touch screen controller
+        */
+       i2c@7000d000 {
+               status = "okay";
+               clock-frequency = <100000>;
+
+               /* SGTL5000 audio codec */
+               sgtl5000: codec@a {
+                       compatible = "fsl,sgtl5000";
+                       reg = <0x0a>;
+                       VDDA-supply = <&reg_module_3v3_audio>;
+                       VDDD-supply = <&reg_1v8_vio>;
+                       VDDIO-supply = <&reg_module_3v3>;
+                       clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
+               };
+
+               pmic: pmic@2d {
+                       compatible = "ti,tps65911";
+                       reg = <0x2d>;
+
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+
+                       ti,system-power-controller;
+
+                       #gpio-cells = <2>;
+                       gpio-controller;
+
+                       vcc1-supply = <&reg_module_3v3>;
+                       vcc2-supply = <&reg_module_3v3>;
+                       vcc3-supply = <&reg_1v8_vio>;
+                       vcc4-supply = <&reg_module_3v3>;
+                       vcc5-supply = <&reg_module_3v3>;
+                       vcc6-supply = <&reg_1v8_vio>;
+                       vcc7-supply = <&reg_5v0_charge_pump>;
+                       vccio-supply = <&reg_module_3v3>;
+
+                       regulators {
+                               vdd1_reg: vdd1 {
+                                       regulator-name = "+V1.35_VDDIO_DDR";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               vdd2_reg: vdd2 {
+                                       regulator-name = "+V1.05";
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                               };
+
+                               vddctrl_reg: vddctrl {
+                                       regulator-name = "+V1.0_VDD_CPU";
+                                       regulator-min-microvolt = <1150000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       regulator-always-on;
+                               };
+
+                               reg_1v8_vio: vio {
+                                       regulator-name = "+V1.8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * 1.8 volt +VDDIO_SDMMC3 in case EN_+3.3_SDMMC3
+                                * is off
+                                */
+                               vddio_sdmmc_1v8_reg: ldo1 {
+                                       regulator-name = "+VDDIO_SDMMC3_1V8";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * EN_+V3.3 switching via FET:
+                                * +V3.3_AUDIO_AVDD_S, +V3.3
+                                * see also +V3.3 fixed supply
+                                */
+                               ldo2_reg: ldo2 {
+                                       regulator-name = "EN_+V3.3";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: ldo3 {
+                                       regulator-name = "+V1.2_CSI";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                               };
+
+                               ldo4_reg: ldo4 {
+                                       regulator-name = "+V1.2_VDD_RTC";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * +V2.8_AVDD_VDAC:
+                                * only required for (unsupported) analog RGB
+                                */
+                               ldo5_reg: ldo5 {
+                                       regulator-name = "+V2.8_AVDD_VDAC";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
+                                * but LDO6 can't set voltage in 50mV
+                                * granularity
+                                */
+                               ldo6_reg: ldo6 {
+                                       regulator-name = "+V1.05_AVDD_PLLE";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                               };
+
+                               ldo7_reg: ldo7 {
+                                       regulator-name = "+V1.2_AVDD_PLL";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: ldo8 {
+                                       regulator-name = "+V1.0_VDD_DDR_HS";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+                       };
+               };
+
+               /* STMPE811 touch screen controller */
+               touchscreen@41 {
+                       compatible = "st,stmpe811";
+                       reg = <0x41>;
+                       irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
+                       interrupt-controller;
+                       id = <0>;
+                       blocks = <0x5>;
+                       irq-trigger = <0x1>;
+
+                       stmpe_touchscreen {
+                               compatible = "st,stmpe-ts";
+                               /* 3.25 MHz ADC clock speed */
+                               st,adc-freq = <1>;
+                               /* 8 sample average control */
+                               st,ave-ctrl = <3>;
+                               /* 7 length fractional part in z */
+                               st,fraction-z = <7>;
+                               /*
+                                * 50 mA typical 80 mA max touchscreen drivers
+                                * current limit value
+                                */
+                               st,i-drive = <1>;
+                               /* 12-bit ADC */
+                               st,mod-12b = <1>;
+                               /* internal ADC reference */
+                               st,ref-sel = <0>;
+                               /* ADC converstion time: 80 clocks */
+                               st,sample-time = <4>;
+                               /* 1 ms panel driver settling time */
+                               st,settling = <3>;
+                               /* 5 ms touch detect interrupt delay */
+                               st,touch-det-delay = <5>;
+                       };
+               };
+
+               /*
+                * LM95245 temperature sensor
+                * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
+                */
+               temp-sensor@4c {
+                       compatible = "national,lm95245";
+                       reg = <0x4c>;
+               };
+
+               /* SW: +V1.2_VDD_CORE */
+               regulator@60 {
+                       compatible = "ti,tps62362";
+                       reg = <0x60>;
+
+                       regulator-name = "tps62362-vout";
+                       regulator-min-microvolt = <900000>;
+                       regulator-max-microvolt = <1400000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+                       ti,vsel0-state-low;
+                       /* VSEL1: EN_CORE_DVFS_N low for DVFS */
+                       ti,vsel1-state-low;
+               };
+       };
+
+       /* SPI4: CAN2 */
+       spi@7000da00 {
+               status = "okay";
+               spi-max-frequency = <10000000>;
+
+               can@1 {
+                       compatible = "microchip,mcp2515";
+                       reg = <1>;
+                       clocks = <&clk16m>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
+                       spi-max-frequency = <10000000>;
+               };
+       };
+
+       /* SPI6: CAN1 */
+       spi@7000de00 {
+               status = "okay";
+               spi-max-frequency = <10000000>;
+
+               can@0 {
+                       compatible = "microchip,mcp2515";
+                       reg = <0>;
+                       clocks = <&clk16m>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_FALLING>;
+                       spi-max-frequency = <10000000>;
+               };
+       };
+
+       pmc@7000e400 {
+               nvidia,invert-interrupt;
+               nvidia,suspend-mode = <1>;
+               nvidia,cpu-pwr-good-time = <5000>;
+               nvidia,cpu-pwr-off-time = <5000>;
+               nvidia,core-pwr-good-time = <3845 3845>;
+               nvidia,core-pwr-off-time = <0>;
+               nvidia,core-power-req-active-high;
+               nvidia,sys-clock-req-active-high;
+
+               /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
+               i2c-thermtrip {
+                       nvidia,i2c-controller-id = <4>;
+                       nvidia,bus-addr = <0x2d>;
+                       nvidia,reg-addr = <0x3f>;
+                       nvidia,reg-data = <0x1>;
+               };
+       };
+
+       hda@70030000 {
+               status = "okay";
+       };
+
+       ahub@70080000 {
+               i2s@70080500 {
+                       status = "okay";
+               };
+       };
+
+       /* eMMC */
+       sdhci@78000600 {
+               status = "okay";
+               bus-width = <8>;
+               non-removable;
+               vmmc-supply = <&reg_module_3v3>; /* VCC */
+               vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
+               mmc-ddr-1_8v;
+       };
+
+       clk32k_in: xtal1 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+       };
+
+       clk16m: osc4 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <16000000>;
+       };
+
+       reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
+               compatible = "regulator-fixed";
+               regulator-name = "+V1.8_AVDD_HDMI_PLL";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_1v8_vio>;
+       };
+
+       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_module_3v3>;
+       };
+
+       reg_5v0_charge_pump: regulator-5v0-charge-pump {
+               compatible = "regulator-fixed";
+               regulator-name = "+V5.0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       reg_module_3v3: regulator-module-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_module_3v3_audio: regulator-module-3v3-audio {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AUDIO_AVDD_S";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       sound {
+               compatible = "toradex,tegra-audio-sgtl5000-apalis_t30",
+                            "nvidia,tegra-audio-sgtl5000";
+               nvidia,model = "Toradex Apalis T30";
+               nvidia,audio-routing =
+                       "Headphone Jack", "HP_OUT",
+                       "LINE_IN", "Line In Jack",
+                       "MIC_IN", "Mic Jack";
+               nvidia,i2s-controller = <&tegra_i2s2>;
+               nvidia,audio-codec = <&sgtl5000>;
+               clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
+                        <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA30_CLK_EXTERN1>;
+               clock-names = "pll_a", "pll_a_out0", "mclk";
+       };
+};
index 2f807d40c1b792bd35c662bcd243588b7fa91d0b..7f112f192fe9a4ebe2e0db0c0d6e7e2715b65811 100644 (file)
@@ -3,48 +3,53 @@
 
 /*
  * Toradex Apalis T30 Module Device Tree
- * Compatible for Revisions 1GB: V1.0A, V1.1A; 1GB IT: V1.1A;
- * 2GB: V1.0B, V1.0C, V1.0E, V1.1A
+ * Compatible for Revisions 1GB: V1.0A; 2GB: V1.0B, V1.0C, V1.0E
  */
 / {
-       model = "Toradex Apalis T30";
-       compatible = "toradex,apalis_t30", "nvidia,tegra30";
-
        memory@80000000 {
                reg = <0x80000000 0x40000000>;
        };
 
        pcie@3000 {
+               status = "okay";
                avdd-pexa-supply = <&vdd2_reg>;
-               vdd-pexa-supply = <&vdd2_reg>;
                avdd-pexb-supply = <&vdd2_reg>;
-               vdd-pexb-supply = <&vdd2_reg>;
                avdd-pex-pll-supply = <&vdd2_reg>;
                avdd-plle-supply = <&ldo6_reg>;
-               vddio-pex-ctl-supply = <&sys_3v3_reg>;
-               hvdd-pex-supply = <&sys_3v3_reg>;
+               hvdd-pex-supply = <&reg_module_3v3>;
+               vddio-pex-ctl-supply = <&reg_module_3v3>;
+               vdd-pexa-supply = <&vdd2_reg>;
+               vdd-pexb-supply = <&vdd2_reg>;
 
+               /* Apalis type specific */
                pci@1,0 {
                        nvidia,num-lanes = <4>;
                };
 
+               /* Apalis PCIe */
                pci@2,0 {
                        nvidia,num-lanes = <1>;
                };
 
+               /* I210/I211 Gigabit Ethernet Controller (on-module) */
                pci@3,0 {
+                       status = "okay";
                        nvidia,num-lanes = <1>;
+
+                       pcie@0 {
+                               reg = <0 0 0 0 0>;
+                               local-mac-address = [00 00 00 00 00 00];
+                       };
                };
        };
 
        host1x@50000000 {
                hdmi@54280000 {
-                       vdd-supply = <&avdd_hdmi_3v3_reg>;
-                       pll-supply = <&avdd_hdmi_pll_1v8_reg>;
-
+                       nvidia,ddc-i2c-bus = <&hdmi_ddc>;
                        nvidia,hpd-gpio =
                                <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
-                       nvidia,ddc-i2c-bus = <&hdmiddc>;
+                       pll-supply = <&reg_1v8_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                };
        };
 
@@ -54,18 +59,18 @@ pinmux@70000868 {
 
                state_default: pinmux {
                        /* Analogue Audio (On-module) */
-                       clk1_out_pw4 {
+                       clk1-out-pw4 {
                                nvidia,pins = "clk1_out_pw4";
                                nvidia,function = "extperiph1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_fs_pp0 {
-                               nvidia,pins =   "dap3_fs_pp0",
-                                               "dap3_sclk_pp3",
-                                               "dap3_din_pp1",
-                                               "dap3_dout_pp2";
+                       dap3-fs-pp0 {
+                               nvidia,pins = "dap3_fs_pp0",
+                                             "dap3_sclk_pp3",
+                                             "dap3_din_pp1",
+                                             "dap3_dout_pp2";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
@@ -77,25 +82,28 @@ pv2 {
                                nvidia,function = "rsvd4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
                        /* Apalis BKL1_PWM */
-                       uart3_rts_n_pc0 {
+                       uart3-rts-n-pc0 {
                                nvidia,pins = "uart3_rts_n_pc0";
                                nvidia,function = "pwm0";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
                        /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
-                       uart3_cts_n_pa1 {
+                       uart3-cts-n-pa1 {
                                nvidia,pins = "uart3_cts_n_pa1";
                                nvidia,function = "rsvd2";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
                        /* Apalis CAN1 on SPI6 */
-                       spi2_cs0_n_px3 {
+                       spi2-cs0-n-px3 {
                                nvidia,pins = "spi2_cs0_n_px3",
                                              "spi2_miso_px1",
                                              "spi2_mosi_px0",
@@ -105,7 +113,7 @@ spi2_cs0_n_px3 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        /* CAN_INT1 */
-                       spi2_cs1_n_pw2 {
+                       spi2-cs1-n-pw2 {
                                nvidia,pins = "spi2_cs1_n_pw2";
                                nvidia,function = "spi3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -114,7 +122,7 @@ spi2_cs1_n_pw2 {
                        };
 
                        /* Apalis CAN2 on SPI4 */
-                       gmi_a16_pj7 {
+                       gmi-a16-pj7 {
                                nvidia,pins = "gmi_a16_pj7",
                                              "gmi_a17_pb0",
                                              "gmi_a18_pb1",
@@ -125,7 +133,7 @@ gmi_a16_pj7 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                        /* CAN_INT2 */
-                       spi2_cs2_n_pw3 {
+                       spi2-cs2-n-pw3 {
                                nvidia,pins = "spi2_cs2_n_pw3";
                                nvidia,function = "spi3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -134,20 +142,20 @@ spi2_cs2_n_pw3 {
                        };
 
                        /* Apalis Digital Audio */
-                       clk1_req_pee2 {
+                       clk1-req-pee2 {
                                nvidia,pins = "clk1_req_pee2";
                                nvidia,function = "hda";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       clk2_out_pw5 {
+                       clk2-out-pw5 {
                                nvidia,pins = "clk2_out_pw5";
                                nvidia,function = "extperiph2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap1_fs_pn0 {
+                       dap1-fs-pn0 {
                                nvidia,pins = "dap1_fs_pn0",
                                              "dap1_din_pn1",
                                              "dap1_dout_pn2",
@@ -157,28 +165,125 @@ dap1_fs_pn0 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* Apalis I2C3 */
-                       cam_i2c_scl_pbb1 {
+                       /* Apalis GPIO */
+                       kb-col0-pq0 {
+                               nvidia,pins = "kb_col0_pq0",
+                                             "kb_col1_pq1",
+                                             "kb_row10_ps2",
+                                             "kb_row11_ps3",
+                                             "kb_row12_ps4",
+                                             "kb_row13_ps5",
+                                             "kb_row14_ps6",
+                                             "kb_row15_ps7";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Multiplexed and therefore disabled */
+                       owr {
+                               nvidia,pins = "owr";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis HDMI1 */
+                       hdmi-cec-pee3 {
+                               nvidia,pins = "hdmi_cec_pee3";
+                               nvidia,function = "cec";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                       };
+                       hdmi-int-pn7 {
+                               nvidia,pins = "hdmi_int_pn7";
+                               nvidia,function = "hdmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C1 */
+                       gen1-i2c-scl-pc4 {
+                               nvidia,pins = "gen1_i2c_scl_pc4",
+                                             "gen1_i2c_sda_pc5";
+                               nvidia,function = "i2c1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C2 (DDC) */
+                       ddc-scl-pv4 {
+                               nvidia,pins = "ddc_scl_pv4",
+                                             "ddc_sda_pv5";
+                               nvidia,function = "i2c4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C3 (CAM) */
+                       cam-i2c-scl-pbb1 {
                                nvidia,pins = "cam_i2c_scl_pbb1",
                                              "cam_i2c_sda_pbb2";
                                nvidia,function = "i2c3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,lock = <TEGRA_PIN_DISABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
 
+                       /* Apalis LCD1 */
+                       lcd-d0-pe0 {
+                               nvidia,pins = "lcd_d0_pe0",
+                                             "lcd_d1_pe1",
+                                             "lcd_d2_pe2",
+                                             "lcd_d3_pe3",
+                                             "lcd_d4_pe4",
+                                             "lcd_d5_pe5",
+                                             "lcd_d6_pe6",
+                                             "lcd_d7_pe7",
+                                             "lcd_d8_pf0",
+                                             "lcd_d9_pf1",
+                                             "lcd_d10_pf2",
+                                             "lcd_d11_pf3",
+                                             "lcd_d12_pf4",
+                                             "lcd_d13_pf5",
+                                             "lcd_d14_pf6",
+                                             "lcd_d15_pf7",
+                                             "lcd_d16_pm0",
+                                             "lcd_d17_pm1",
+                                             "lcd_d18_pm2",
+                                             "lcd_d19_pm3",
+                                             "lcd_d20_pm4",
+                                             "lcd_d21_pm5",
+                                             "lcd_d22_pm6",
+                                             "lcd_d23_pm7",
+                                             "lcd_de_pj1",
+                                             "lcd_hsync_pj3",
+                                             "lcd_pclk_pb3",
+                                             "lcd_vsync_pj4";
+                               nvidia,function = "displaya";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
                        /* Apalis MMC1 */
-                       sdmmc3_clk_pa6 {
-                               nvidia,pins = "sdmmc3_clk_pa6",
-                                             "sdmmc3_cmd_pa7";
+                       sdmmc3-clk-pa6 {
+                               nvidia,pins = "sdmmc3_clk_pa6";
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       sdmmc3_dat0_pb7 {
-                               nvidia,pins = "sdmmc3_dat0_pb7",
+                       sdmmc3-dat0-pb7 {
+                               nvidia,pins = "sdmmc3_cmd_pa7",
+                                             "sdmmc3_dat0_pb7",
                                              "sdmmc3_dat1_pb6",
                                              "sdmmc3_dat2_pb5",
                                              "sdmmc3_dat3_pb4",
@@ -194,10 +299,81 @@ sdmmc3_dat0_pb7 {
                        pv3 {
                                nvidia,pins = "pv3";
                                nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis Parallel Camera */
+                       cam-mclk-pcc0 {
+                               nvidia,pins = "cam_mclk_pcc0";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       vi-vsync-pd6 {
+                               nvidia,pins = "vi_d0_pt4",
+                                             "vi_d1_pd5",
+                                             "vi_d2_pl0",
+                                             "vi_d3_pl1",
+                                             "vi_d4_pl2",
+                                             "vi_d5_pl3",
+                                             "vi_d6_pl4",
+                                             "vi_d7_pl5",
+                                             "vi_d8_pl6",
+                                             "vi_d9_pl7",
+                                             "vi_d10_pt2",
+                                             "vi_d11_pt3",
+                                             "vi_hsync_pd7",
+                                             "vi_pclk_pt0",
+                                             "vi_vsync_pd6";
+                               nvidia,function = "vi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
+                       /* Multiplexed and therefore disabled */
+                       kb-col2-pq2 {
+                               nvidia,pins = "kb_col2_pq2",
+                                             "kb_col3_pq3",
+                                             "kb_col4_pq4",
+                                             "kb_row4_pr4";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-row0-pr0 {
+                               nvidia,pins = "kb_row0_pr0",
+                                             "kb_row1_pr1",
+                                             "kb_row2_pr2",
+                                             "kb_row3_pr3";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-row5-pr5 {
+                               nvidia,pins = "kb_row5_pr5",
+                                             "kb_row6_pr6",
+                                             "kb_row7_pr7";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /*
+                        * VI level-shifter direction
+                        * (pull-down => default direction input)
+                        */
+                       vi-mclk-pt1 {
+                               nvidia,pins = "vi_mclk_pt1";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
 
                        /* Apalis PWM1 */
                        pu6 {
@@ -232,21 +408,30 @@ pu3 {
                        };
 
                        /* Apalis RESET_MOCI# */
-                       gmi_rst_n_pi4 {
+                       gmi-rst-n-pi4 {
                                nvidia,pins = "gmi_rst_n_pi4";
                                nvidia,function = "gmi";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
+                       /* Apalis SATA1_ACT# */
+                       pex-l0-prsnt-n-pdd0 {
+                               nvidia,pins = "pex_l0_prsnt_n_pdd0";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Apalis SD1 */
-                       sdmmc1_clk_pz0 {
+                       sdmmc1-clk-pz0 {
                                nvidia,pins = "sdmmc1_clk_pz0";
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       sdmmc1_cmd_pz1 {
+                       sdmmc1-cmd-pz1 {
                                nvidia,pins = "sdmmc1_cmd_pz1",
                                              "sdmmc1_dat0_py7",
                                              "sdmmc1_dat1_py6",
@@ -257,16 +442,26 @@ sdmmc1_cmd_pz1 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
                        /* Apalis SD1_CD# */
-                       clk2_req_pcc5 {
+                       clk2-req-pcc5 {
                                nvidia,pins = "clk2_req_pcc5";
                                nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis SPDIF1 */
+                       spdif-out-pk5 {
+                               nvidia,pins = "spdif_out_pk5",
+                                             "spdif_in_pk6";
+                               nvidia,function = "spdif";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
                        /* Apalis SPI1 */
-                       spi1_sck_px5 {
+                       spi1-sck-px5 {
                                nvidia,pins = "spi1_sck_px5",
                                              "spi1_mosi_px4",
                                              "spi1_miso_px7",
@@ -277,7 +472,7 @@ spi1_sck_px5 {
                        };
 
                        /* Apalis SPI2 */
-                       lcd_sck_pz4 {
+                       lcd-sck-pz4 {
                                nvidia,pins = "lcd_sck_pz4",
                                              "lcd_sdout_pn5",
                                              "lcd_sdin_pz2",
@@ -287,8 +482,30 @@ lcd_sck_pz4 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
+                       /*
+                        * Apalis TS (Low-speed type specific)
+                        * pins may be used as GPIOs
+                        */
+                       kb-col5-pq5 {
+                               nvidia,pins = "kb_col5_pq5";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       kb-col6-pq6 {
+                               nvidia,pins = "kb_col6_pq6",
+                                             "kb_col7_pq7",
+                                             "kb_row8_ps0",
+                                             "kb_row9_ps1";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
                        /* Apalis UART1 */
-                       ulpi_data0 {
+                       ulpi-data0 {
                                nvidia,pins = "ulpi_data0_po1",
                                              "ulpi_data1_po2",
                                              "ulpi_data2_po3",
@@ -303,7 +520,7 @@ ulpi_data0 {
                        };
 
                        /* Apalis UART2 */
-                       ulpi_clk_py0 {
+                       ulpi-clk-py0 {
                                nvidia,pins = "ulpi_clk_py0",
                                              "ulpi_dir_py1",
                                              "ulpi_nxt_py2",
@@ -314,7 +531,7 @@ ulpi_clk_py0 {
                        };
 
                        /* Apalis UART3 */
-                       uart2_rxd_pc3 {
+                       uart2-rxd-pc3 {
                                nvidia,pins = "uart2_rxd_pc3",
                                              "uart2_txd_pc2";
                                nvidia,function = "uartb";
@@ -323,7 +540,7 @@ uart2_rxd_pc3 {
                        };
 
                        /* Apalis UART4 */
-                       uart3_rxd_pw7 {
+                       uart3-rxd-pw7 {
                                nvidia,pins = "uart3_rxd_pw7",
                                              "uart3_txd_pw6";
                                nvidia,function = "uartc";
@@ -331,8 +548,26 @@ uart3_rxd_pw7 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
+                       /* Apalis USBH_EN */
+                       pex-l0-rst-n-pdd1 {
+                               nvidia,pins = "pex_l0_rst_n_pdd1";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBH_OC# */
+                       pex-l0-clkreq-n-pdd2 {
+                               nvidia,pins = "pex_l0_clkreq_n_pdd2";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
                        /* Apalis USBO1_EN */
-                       gen2_i2c_scl_pt5 {
+                       gen2-i2c-scl-pt5 {
                                nvidia,pins = "gen2_i2c_scl_pt5";
                                nvidia,function = "rsvd4";
                                nvidia,open-drain = <TEGRA_PIN_DISABLE>;
@@ -341,7 +576,7 @@ gen2_i2c_scl_pt5 {
                        };
 
                        /* Apalis USBO1_OC# */
-                       gen2_i2c_sda_pt6 {
+                       gen2-i2c-sda-pt6 {
                                nvidia,pins = "gen2_i2c_sda_pt6";
                                nvidia,function = "rsvd4";
                                nvidia,open-drain = <TEGRA_PIN_DISABLE>;
@@ -350,6 +585,16 @@ gen2_i2c_sda_pt6 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
+                       /* Apalis VGA1 not supported and therefore disabled */
+                       crt-hsync-pv6 {
+                               nvidia,pins = "crt_hsync_pv6",
+                                             "crt_vsync_pv7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Apalis WAKE1_MICO */
                        pv1 {
                                nvidia,pins = "pv1";
@@ -360,14 +605,16 @@ pv1 {
                        };
 
                        /* eMMC (On-module) */
-                       sdmmc4_clk_pcc4 {
+                       sdmmc4-clk-pcc4 {
                                nvidia,pins = "sdmmc4_clk_pcc4",
+                                             "sdmmc4_cmd_pt7",
                                              "sdmmc4_rst_n_pcc3";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat0_paa0 {
+                       sdmmc4-dat0-paa0 {
                                nvidia,pins = "sdmmc4_dat0_paa0",
                                              "sdmmc4_dat1_paa1",
                                              "sdmmc4_dat2_paa2",
@@ -379,6 +626,34 @@ sdmmc4_dat0_paa0 {
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* LAN i210/i211 DEV_OFF_N, PE_RST_N (On-module) */
+                       pex-l2-prsnt-n-pdd7 {
+                               nvidia,pins = "pex_l2_prsnt_n_pdd7",
+                                             "pex_l2_rst_n_pcc6";
+                               nvidia,function = "pcie";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* LAN i210/i211 PE_WAKE_N, SDP3 (On-module) */
+                       pex-wake-n-pdd3 {
+                               nvidia,pins = "pex_wake_n_pdd3",
+                                             "pex_l2_clkreq_n_pcc7";
+                               nvidia,function = "pcie";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* LAN i210/i211 SMB_ALERT_N (On-module) */
+                       sys-clk-req-pz5 {
+                               nvidia,pins = "sys_clk_req_pz5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
                        /* LVDS Transceiver Configuration */
@@ -391,7 +666,6 @@ pbb0 {
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-                               nvidia,lock = <TEGRA_PIN_DISABLE>;
                        };
                        pbb3 {
                                nvidia,pins = "pbb3",
@@ -402,18 +676,121 @@ pbb3 {
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
-                               nvidia,lock = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Not connected and therefore disabled */
+                       clk-32k-out-pa0 {
+                               nvidia,pins = "clk3_out_pee0",
+                                             "clk3_req_pee1",
+                                             "clk_32k_out_pa0",
+                                             "dap4_din_pp5",
+                                             "dap4_dout_pp6",
+                                             "dap4_fs_pp4",
+                                             "dap4_sclk_pp7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       dap2-fs-pa2 {
+                               nvidia,pins = "dap2_fs_pa2",
+                                             "dap2_sclk_pa3",
+                                             "dap2_din_pa4",
+                                             "dap2_dout_pa5",
+                                             "lcd_dc0_pn6",
+                                             "lcd_m1_pw1",
+                                             "lcd_pwr1_pc1",
+                                             "pex_l1_clkreq_n_pdd6",
+                                             "pex_l1_prsnt_n_pdd4",
+                                             "pex_l1_rst_n_pdd5";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-ad0-pg0 {
+                               nvidia,pins = "gmi_ad0_pg0",
+                                             "gmi_ad2_pg2",
+                                             "gmi_ad3_pg3",
+                                             "gmi_ad4_pg4",
+                                             "gmi_ad5_pg5",
+                                             "gmi_ad6_pg6",
+                                             "gmi_ad7_pg7",
+                                             "gmi_ad8_ph0",
+                                             "gmi_ad9_ph1",
+                                             "gmi_ad10_ph2",
+                                             "gmi_ad11_ph3",
+                                             "gmi_ad12_ph4",
+                                             "gmi_ad13_ph5",
+                                             "gmi_ad14_ph6",
+                                             "gmi_ad15_ph7",
+                                             "gmi_adv_n_pk0",
+                                             "gmi_clk_pk1",
+                                             "gmi_cs4_n_pk2",
+                                             "gmi_cs2_n_pk3",
+                                             "gmi_dqs_pi2",
+                                             "gmi_iordy_pi5",
+                                             "gmi_oe_n_pi1",
+                                             "gmi_wait_pi7",
+                                             "gmi_wr_n_pi0",
+                                             "lcd_cs1_n_pw0",
+                                             "pu0",
+                                             "pu1",
+                                             "pu2";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs0-n-pj0 {
+                               nvidia,pins = "gmi_cs0_n_pj0",
+                                             "gmi_cs1_n_pj2",
+                                             "gmi_cs3_n_pk4";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs6-n-pi3 {
+                               nvidia,pins = "gmi_cs6_n_pi3";
+                               nvidia,function = "sata";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-cs7-n-pi6 {
+                               nvidia,pins = "gmi_cs7_n_pi6";
+                               nvidia,function = "gmi_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       lcd-pwr0-pb2 {
+                               nvidia,pins = "lcd_pwr0_pb2",
+                                             "lcd_pwr2_pc6",
+                                             "lcd_wr_n_pz3";
+                               nvidia,function = "hdcp";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       uart2-cts-n-pj5 {
+                               nvidia,pins = "uart2_cts_n_pj5",
+                                             "uart2_rts_n_pj6";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
                        /* Power I2C (On-module) */
-                       pwr_i2c_scl_pz6 {
+                       pwr-i2c-scl-pz6 {
                                nvidia,pins = "pwr_i2c_scl_pz6",
                                              "pwr_i2c_sda_pz7";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,lock = <TEGRA_PIN_DISABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
 
@@ -422,15 +799,15 @@ pwr_i2c_scl_pz6 {
                         * temperature sensor therefore requires disabling for
                         * now
                         */
-                       lcd_dc1_pd2 {
+                       lcd-dc1-pd2 {
                                nvidia,pins = "lcd_dc1_pd2";
                                nvidia,function = "rsvd3";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* TOUCH_PEN_INT# */
+                       /* TOUCH_PEN_INT# (On-module) */
                        pv0 {
                                nvidia,pins = "pv0";
                                nvidia,function = "rsvd1";
@@ -441,7 +818,19 @@ pv0 {
                };
        };
 
-       hdmiddc: i2c@7000c700 {
+       serial@70006040 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       serial@70006200 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       hdmi_ddc: i2c@7000c700 {
                clock-frequency = <10000>;
        };
 
@@ -457,12 +846,13 @@ i2c@7000d000 {
                sgtl5000: codec@a {
                        compatible = "fsl,sgtl5000";
                        reg = <0x0a>;
-                       VDDA-supply = <&sys_3v3_reg>;
-                       VDDIO-supply = <&sys_3v3_reg>;
+                       VDDA-supply = <&reg_module_3v3_audio>;
+                       VDDD-supply = <&reg_1v8_vio>;
+                       VDDIO-supply = <&reg_module_3v3>;
                        clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
                };
 
-               pmic: tps65911@2d {
+               pmic: pmic@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
 
@@ -475,43 +865,38 @@ pmic: tps65911@2d {
                        #gpio-cells = <2>;
                        gpio-controller;
 
-                       vcc1-supply = <&sys_3v3_reg>;
-                       vcc2-supply = <&sys_3v3_reg>;
-                       vcc3-supply = <&vio_reg>;
-                       vcc4-supply = <&sys_3v3_reg>;
-                       vcc5-supply = <&sys_3v3_reg>;
-                       vcc6-supply = <&vio_reg>;
-                       vcc7-supply = <&charge_pump_5v0_reg>;
-                       vccio-supply = <&sys_3v3_reg>;
+                       vcc1-supply = <&reg_module_3v3>;
+                       vcc2-supply = <&reg_module_3v3>;
+                       vcc3-supply = <&reg_1v8_vio>;
+                       vcc4-supply = <&reg_module_3v3>;
+                       vcc5-supply = <&reg_module_3v3>;
+                       vcc6-supply = <&reg_1v8_vio>;
+                       vcc7-supply = <&reg_5v0_charge_pump>;
+                       vccio-supply = <&reg_module_3v3>;
 
                        regulators {
-                               /* SW1: +V1.35_VDDIO_DDR */
                                vdd1_reg: vdd1 {
-                                       regulator-name = "vddio_ddr_1v35";
+                                       regulator-name = "+V1.35_VDDIO_DDR";
                                        regulator-min-microvolt = <1350000>;
                                        regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
                                };
 
-                               /* SW2: +V1.05 */
                                vdd2_reg: vdd2 {
-                                       regulator-name =
-                                               "vdd_pexa,vdd_pexb,vdd_sata";
+                                       regulator-name = "+V1.05";
                                        regulator-min-microvolt = <1050000>;
                                        regulator-max-microvolt = <1050000>;
                                };
 
-                               /* SW CTRL: +V1.0_VDD_CPU */
                                vddctrl_reg: vddctrl {
-                                       regulator-name = "vdd_cpu,vdd_sys";
+                                       regulator-name = "+V1.0_VDD_CPU";
                                        regulator-min-microvolt = <1150000>;
                                        regulator-max-microvolt = <1150000>;
                                        regulator-always-on;
                                };
 
-                               /* SWIO: +V1.8 */
-                               vio_reg: vio {
-                                       regulator-name = "vdd_1v8_gen";
+                               reg_1v8_vio: vio {
+                                       regulator-name = "+V1.8";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-always-on;
@@ -521,27 +906,24 @@ vio_reg: vio {
 
                                /*
                                 * EN_+V3.3 switching via FET:
-                                * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
-                                * see also v3_3 fixed supply
+                                * +V3.3_AUDIO_AVDD_S, +V3.3
+                                * see also +V3.3 fixed supply
                                 */
                                ldo2_reg: ldo2 {
-                                       regulator-name = "en_3v3";
+                                       regulator-name = "EN_+V3.3";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
                                };
 
-                               /* +V1.2_CSI */
                                ldo3_reg: ldo3 {
-                                       regulator-name =
-                                               "avdd_dsi_csi,pwrdet_mipi";
+                                       regulator-name = "+V1.2_CSI";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                };
 
-                               /* +V1.2_VDD_RTC */
                                ldo4_reg: ldo4 {
-                                       regulator-name = "vdd_rtc";
+                                       regulator-name = "+V1.2_VDD_RTC";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
@@ -549,10 +931,10 @@ ldo4_reg: ldo4 {
 
                                /*
                                 * +V2.8_AVDD_VDAC:
-                                * only required for analog RGB
+                                * only required for (unsupported) analog RGB
                                 */
                                ldo5_reg: ldo5 {
-                                       regulator-name = "avdd_vdac";
+                                       regulator-name = "+V2.8_AVDD_VDAC";
                                        regulator-min-microvolt = <2800000>;
                                        regulator-max-microvolt = <2800000>;
                                        regulator-always-on;
@@ -564,22 +946,20 @@ ldo5_reg: ldo5 {
                                 * granularity
                                 */
                                ldo6_reg: ldo6 {
-                                       regulator-name = "avdd_plle";
+                                       regulator-name = "+V1.05_AVDD_PLLE";
                                        regulator-min-microvolt = <1100000>;
                                        regulator-max-microvolt = <1100000>;
                                };
 
-                               /* +V1.2_AVDD_PLL */
                                ldo7_reg: ldo7 {
-                                       regulator-name = "avdd_pll";
+                                       regulator-name = "+V1.2_AVDD_PLL";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
                                };
 
-                               /* +V1.0_VDD_DDR_HS */
                                ldo8_reg: ldo8 {
-                                       regulator-name = "vdd_ddr_hs";
+                                       regulator-name = "+V1.0_VDD_DDR_HS";
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1000000>;
                                        regulator-always-on;
@@ -588,11 +968,10 @@ ldo8_reg: ldo8 {
                };
 
                /* STMPE811 touch screen controller */
-               stmpe811@41 {
+               touchscreen@41 {
                        compatible = "st,stmpe811";
                        reg = <0x41>;
-                       interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
-                       interrupt-parent = <&gpio>;
+                       irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
                        interrupt-controller;
                        id = <0>;
                        blocks = <0x5>;
@@ -626,7 +1005,7 @@ stmpe_touchscreen {
 
                /*
                 * LM95245 temperature sensor
-                * Note: OVERT_N directly connected to PMIC PWRDN
+                * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
                 */
                temp-sensor@4c {
                        compatible = "national,lm95245";
@@ -634,7 +1013,7 @@ temp-sensor@4c {
                };
 
                /* SW: +V1.2_VDD_CORE */
-               tps62362@60 {
+               regulator@60 {
                        compatible = "ti,tps62362";
                        reg = <0x60>;
 
@@ -659,7 +1038,7 @@ can@1 {
                        reg = <1>;
                        clocks = <&clk16m>;
                        interrupt-parent = <&gpio>;
-                       interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_RISING>;
+                       interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
                        spi-max-frequency = <10000000>;
                };
        };
@@ -674,7 +1053,7 @@ can@0 {
                        reg = <0>;
                        clocks = <&clk16m>;
                        interrupt-parent = <&gpio>;
-                       interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_RISING>;
+                       interrupts = <TEGRA_GPIO(W, 2) IRQ_TYPE_EDGE_FALLING>;
                        spi-max-frequency = <10000000>;
                };
        };
@@ -688,6 +1067,18 @@ pmc@7000e400 {
                nvidia,core-pwr-off-time = <0>;
                nvidia,core-power-req-active-high;
                nvidia,sys-clock-req-active-high;
+
+               /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
+               i2c-thermtrip {
+                       nvidia,i2c-controller-id = <4>;
+                       nvidia,bus-addr = <0x2d>;
+                       nvidia,reg-addr = <0x3f>;
+                       nvidia,reg-data = <0x1>;
+               };
+       };
+
+       hda@70030000 {
+               status = "okay";
        };
 
        ahub@70080000 {
@@ -701,73 +1092,65 @@ sdhci@78000600 {
                status = "okay";
                bus-width = <8>;
                non-removable;
+               vmmc-supply = <&reg_module_3v3>; /* VCC */
+               vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
+               mmc-ddr-1_8v;
        };
 
-       clocks {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
+       clk32k_in: xtal1 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+       };
 
-               clk32k_in: clk@0 {
-                       compatible = "fixed-clock";
-                       reg = <0>;
-                       #clock-cells = <0>;
-                       clock-frequency = <32768>;
-               };
+       clk16m: osc4 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <16000000>;
+       };
 
-               clk16m: clk@1 {
-                       compatible = "fixed-clock";
-                       reg = <1>;
-                       #clock-cells = <0>;
-                       clock-frequency = <16000000>;
-                       clock-output-names = "clk16m";
-               };
+       reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
+               compatible = "regulator-fixed";
+               regulator-name = "+V1.8_AVDD_HDMI_PLL";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_1v8_vio>;
        };
 
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               avdd_hdmi_pll_1v8_reg: regulator@100 {
-                       compatible = "regulator-fixed";
-                       reg = <100>;
-                       regulator-name = "+V1.8_AVDD_HDMI_PLL";
-                       regulator-min-microvolt = <1800000>;
-                       regulator-max-microvolt = <1800000>;
-                       enable-active-high;
-                       gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
-                       vin-supply = <&vio_reg>;
-               };
+       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_module_3v3>;
+       };
 
-               sys_3v3_reg: regulator@101 {
-                       compatible = "regulator-fixed";
-                       reg = <101>;
-                       regulator-name = "3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-always-on;
-               };
+       reg_5v0_charge_pump: regulator-5v0-charge-pump {
+               compatible = "regulator-fixed";
+               regulator-name = "+V5.0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
 
-               avdd_hdmi_3v3_reg: regulator@102 {
-                       compatible = "regulator-fixed";
-                       reg = <102>;
-                       regulator-name = "+V3.3_AVDD_HDMI";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       enable-active-high;
-                       gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
-                       vin-supply = <&sys_3v3_reg>;
-               };
+       reg_module_3v3: regulator-module-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
 
-               charge_pump_5v0_reg: regulator@103 {
-                       compatible = "regulator-fixed";
-                       reg = <103>;
-                       regulator-name = "5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-always-on;
-               };
+       reg_module_3v3_audio: regulator-module-3v3-audio {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AUDIO_AVDD_S";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
        };
 
        sound {
index 16e1f387aa6db65aad52d814bd4e663522f81048..5965150ecdd25aea0b529940b41ba9b0542b78fd 100644 (file)
@@ -1,15 +1,17 @@
 // SPDX-License-Identifier: GPL-2.0
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
 #include "tegra30-colibri.dtsi"
 
 / {
        model = "Toradex Colibri T30 on Colibri Evaluation Board";
-       compatible = "toradex,colibri_t30-eval-v3", "toradex,colibri_t30", "nvidia,tegra30";
+       compatible = "toradex,colibri_t30-eval-v3", "toradex,colibri_t30",
+                    "nvidia,tegra30";
 
        aliases {
                rtc0 = "/i2c@7000c000/rtc@68";
-               rtc1 = "/i2c@7000d000/tps65911@2d";
+               rtc1 = "/i2c@7000d000/pmic@2d";
                rtc2 = "/rtc@7000e000";
                serial0 = &uarta;
                serial1 = &uartb;
@@ -27,22 +29,25 @@ rgb {
                                nvidia,panel = <&panel>;
                        };
                };
+
                hdmi@54280000 {
                        status = "okay";
+                       hdmi-supply = <&reg_5v0>;
                };
        };
 
+       /* Colibri UART-A */
        serial@70006000 {
                status = "okay";
        };
 
+       /* Colibri UART-C */
        serial@70006040 {
-               compatible = "nvidia,tegra30-hsuart";
                status = "okay";
        };
 
+       /* Colibri UART-B */
        serial@70006300 {
-               compatible = "nvidia,tegra30-hsuart";
                status = "okay";
        };
 
@@ -65,8 +70,12 @@ rtc@68 {
                };
        };
 
+       /* GEN2_I2C: unused */
+
+       /* CAM_I2C (I2C3): unused */
+
        /* DDC_CLOCK/DATA on X3 pin 15/16 (e.g. display EDID) */
-       hdmiddc: i2c@7000c700 {
+       i2c@7000c700 {
                status = "okay";
        };
 
@@ -74,18 +83,17 @@ hdmiddc: i2c@7000c700 {
        spi@7000d400 {
                status = "okay";
                spi-max-frequency = <25000000>;
-               can0: can@0 {
+
+               can@0 {
                        compatible = "microchip,mcp2515";
                        reg = <0>;
                        clocks = <&clk16m>;
                        interrupt-parent = <&gpio>;
-                       interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_RISING>;
+                       /* CAN_INT */
+                       interrupts = <TEGRA_GPIO(S, 0) IRQ_TYPE_EDGE_FALLING>;
                        spi-max-frequency = <10000000>;
-               };
-               spidev0: spi@1 {
-                       compatible = "spidev";
-                       reg = <1>;
-                       spi-max-frequency = <25000000>;
+                       vdd-supply = <&reg_3v3>;
+                       xceiver-supply = <&reg_5v0>;
                };
        };
 
@@ -93,19 +101,19 @@ spidev0: spi@1 {
        sdhci@78000200 {
                status = "okay";
                bus-width = <4>;
-               cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
+               cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>; /* MMCD */
                no-1-8-v;
        };
 
        /* EHCI instance 0: USB1_DP/N -> USBC_P/N */
        usb@7d000000 {
                status = "okay";
+               dr_mode = "otg";
        };
 
        usb-phy@7d000000 {
                status = "okay";
-               dr_mode = "otg";
-               vbus-supply = <&usbc_vbus_reg>;
+               vbus-supply = <&reg_usbc_vbus>;
        };
 
        /* EHCI instance 2: USB3_DP/N -> USBH_P/N */
@@ -115,28 +123,23 @@ usb@7d008000 {
 
        usb-phy@7d008000 {
                status = "okay";
-               vbus-supply = <&usbh_vbus_reg>;
+               vbus-supply = <&reg_usbh_vbus>;
        };
 
        backlight: backlight {
                compatible = "pwm-backlight";
-
-               /* PWM<A> */
-               pwms = <&pwm 0 5000000>;
                brightness-levels = <255 128 64 32 16 8 4 0>;
                default-brightness-level = <6>;
                /* BL_ON */
                enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+               power-supply = <&reg_3v3>;
+               pwms = <&pwm 0 5000000>; /* PWM<A> */
        };
 
-       clocks {
-               clk16m: clk@1 {
-                       compatible = "fixed-clock";
-                       reg = <1>;
-                       #clock-cells = <0>;
-                       clock-frequency = <16000000>;
-                       clock-output-names = "clk16m";
-               };
+       clk16m: osc3 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <16000000>;
        };
 
        gpio-keys {
@@ -157,58 +160,39 @@ panel: panel {
                 * edt,et070080dh6: EDT 7.0" LCD TFT
                 */
                compatible = "edt,et057090dhu", "simple-panel";
-
                backlight = <&backlight>;
+               power-supply = <&reg_3v3>;
        };
 
-       pwmleds {
-               compatible = "pwm-leds";
-
-               pwmb {
-                       label = "PWM<B>";
-                       pwms = <&pwm 1 19600>;
-                       max-brightness = <255>;
-               };
-               pwmc {
-                       label = "PWM<C>";
-                       pwms = <&pwm 2 19600>;
-                       max-brightness = <255>;
-               };
-               pwmd {
-                       label = "PWM<D>";
-                       pwms = <&pwm 3 19600>;
-                       max-brightness = <255>;
-               };
+       reg_3v3: regulator-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "3.3V_SW";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
        };
 
-       regulators {
-               sys_5v0_reg: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-always-on;
-               };
+       reg_5v0: regulator-5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "5V_SW";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
 
-               usbc_vbus_reg: regulator@2 {
-                       compatible = "regulator-fixed";
-                       reg = <2>;
-                       regulator-name = "usbc_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       vin-supply = <&sys_5v0_reg>;
-               };
+       reg_usbc_vbus: regulator-usbc-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB5";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&reg_5v0>;
+       };
 
-               /* USBH_PEN */
-               usbh_vbus_reg: regulator@3 {
-                       compatible = "regulator-fixed";
-                       reg = <3>;
-                       regulator-name = "usbh_vbus";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
-                       vin-supply = <&sys_5v0_reg>;
-               };
+       /* USBH_PEN resp. USB_P_EN */
+       reg_usbh_vbus: regulator-usbh-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_USB[1-4]";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+               vin-supply = <&reg_5v0>;
        };
 };
index 526ed71cf7a320f970770213947d6c325e86c181..35af03ca9e908e9146715dcf2005e39d79c65de2 100644 (file)
@@ -1,27 +1,22 @@
 // SPDX-License-Identifier: GPL-2.0
-#include <dt-bindings/input/input.h>
 #include "tegra30.dtsi"
 
 /*
  * Toradex Colibri T30 Module Device Tree
- * Compatible for Revisions V1.1B, V1.1C, V1.1D, V1.1E; IT: V1.1A
+ * Compatible for Revisions V1.1B, V1.1C, V1.1D, V1.1E, V1.1F; IT: V1.1A, V1.1B
  */
 / {
-       model = "Toradex Colibri T30";
-       compatible = "toradex,colibri_t30", "nvidia,tegra30";
-
        memory@80000000 {
                reg = <0x80000000 0x40000000>;
        };
 
        host1x@50000000 {
                hdmi@54280000 {
-                       vdd-supply = <&avdd_hdmi_3v3_reg>;
-                       pll-supply = <&avdd_hdmi_pll_1v8_reg>;
-
+                       nvidia,ddc-i2c-bus = <&hdmi_ddc>;
                        nvidia,hpd-gpio =
                                <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
-                       nvidia,ddc-i2c-bus = <&hdmiddc>;
+                       pll-supply = <&reg_1v8_avdd_hdmi_pll>;
+                       vdd-supply = <&reg_3v3_avdd_hdmi>;
                };
        };
 
@@ -31,23 +26,173 @@ pinmux@70000868 {
 
                state_default: pinmux {
                        /* Analogue Audio (On-module) */
-                       clk1_out_pw4 {
+                       clk1-out-pw4 {
                                nvidia,pins = "clk1_out_pw4";
                                nvidia,function = "extperiph1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
-                       dap3_fs_pp0 {
-                               nvidia,pins =   "dap3_fs_pp0",
-                                               "dap3_sclk_pp3",
-                                               "dap3_din_pp1",
-                                               "dap3_dout_pp2";
+                       dap3-fs-pp0 {
+                               nvidia,pins = "dap3_fs_pp0",
+                                             "dap3_sclk_pp3",
+                                             "dap3_din_pp1",
+                                             "dap3_dout_pp2";
                                nvidia,function = "i2s2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
+                       /* Colibri Address/Data Bus (GMI) */
+                       gmi-ad0-pg0 {
+                               nvidia,pins = "gmi_ad0_pg0",
+                                             "gmi_ad2_pg2",
+                                             "gmi_ad3_pg3",
+                                             "gmi_ad4_pg4",
+                                             "gmi_ad5_pg5",
+                                             "gmi_ad6_pg6",
+                                             "gmi_ad7_pg7",
+                                             "gmi_ad8_ph0",
+                                             "gmi_ad9_ph1",
+                                             "gmi_ad10_ph2",
+                                             "gmi_ad11_ph3",
+                                             "gmi_ad12_ph4",
+                                             "gmi_ad13_ph5",
+                                             "gmi_ad14_ph6",
+                                             "gmi_ad15_ph7",
+                                             "gmi_adv_n_pk0",
+                                             "gmi_clk_pk1",
+                                             "gmi_cs4_n_pk2",
+                                             "gmi_cs2_n_pk3",
+                                             "gmi_iordy_pi5",
+                                             "gmi_oe_n_pi1",
+                                             "gmi_wait_pi7",
+                                             "gmi_wr_n_pi0",
+                                             "dap1_fs_pn0",
+                                             "dap1_din_pn1",
+                                             "dap1_dout_pn2",
+                                             "dap1_sclk_pn3",
+                                             "dap2_fs_pa2",
+                                             "dap2_sclk_pa3",
+                                             "dap2_din_pa4",
+                                             "dap2_dout_pa5",
+                                             "spi1_sck_px5",
+                                             "spi1_mosi_px4",
+                                             "spi1_cs0_n_px6",
+                                             "spi2_cs0_n_px3",
+                                             "spi2_miso_px1",
+                                             "spi2_mosi_px0",
+                                             "spi2_sck_px2",
+                                             "uart2_cts_n_pj5",
+                                             "uart2_rts_n_pj6";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Further pins may be used as GPIOs */
+                       dap4-din-pp5 {
+                               nvidia,pins = "dap4_din_pp5",
+                                             "dap4_dout_pp6",
+                                             "dap4_fs_pp4",
+                                             "dap4_sclk_pp7",
+                                             "pbb7",
+                                             "sdmmc1_clk_pz0",
+                                             "sdmmc1_cmd_pz1",
+                                             "sdmmc1_dat0_py7",
+                                             "sdmmc1_dat1_py6",
+                                             "sdmmc1_dat3_py4",
+                                             "uart3_cts_n_pa1",
+                                             "uart3_txd_pw6",
+                                             "uart3_rxd_pw7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       lcd-d18-pm2 {
+                               nvidia,pins = "lcd_d18_pm2",
+                                             "lcd_d19_pm3",
+                                             "lcd_d20_pm4",
+                                             "lcd_d21_pm5",
+                                             "lcd_d22_pm6",
+                                             "lcd_d23_pm7",
+                                             "lcd_dc0_pn6",
+                                             "pex_l2_clkreq_n_pcc7";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       lcd-cs0-n-pn4 {
+                               nvidia,pins = "lcd_cs0_n_pn4",
+                                             "lcd_sdin_pz2",
+                                             "pu0",
+                                             "pu1",
+                                             "pu2",
+                                             "pu3",
+                                             "pu4",
+                                             "pu5",
+                                             "pu6",
+                                             "spi1_miso_px7",
+                                             "uart3_rts_n_pc0";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       lcd-pwr0-pb2 {
+                               nvidia,pins = "lcd_pwr0_pb2",
+                                             "lcd_sck_pz4",
+                                             "lcd_sdout_pn5",
+                                             "lcd_wr_n_pz3";
+                               nvidia,function = "hdcp";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       pbb4 {
+                               nvidia,pins = "pbb4",
+                                             "pbb5",
+                                             "pbb6";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Multiplexed RDnWR and therefore disabled */
+                       lcd-cs1-n-pw0 {
+                               nvidia,pins = "lcd_cs1_n_pw0";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Multiplexed GMI_CLK and therefore disabled */
+                       owr {
+                               nvidia,pins = "owr";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Tri-stating GMI_WR_N on nPWE SODIMM pin 99 */
+                       sdmmc3-dat4-pd1 {
+                               nvidia,pins = "sdmmc3_dat4_pd1";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Not tri-stating GMI_WR_N on RDnWR SODIMM pin 93 */
+                       sdmmc3-dat5-pd0 {
+                               nvidia,pins = "sdmmc3_dat5_pd0";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
                        /* Colibri BL_ON */
                        pv2 {
                                nvidia,pins = "pv2";
@@ -57,7 +202,7 @@ pv2 {
                        };
 
                        /* Colibri Backlight PWM<A> */
-                       sdmmc3_dat3_pb4 {
+                       sdmmc3-dat3-pb4 {
                                nvidia,pins = "sdmmc3_dat3_pb4";
                                nvidia,function = "pwm0";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -65,7 +210,7 @@ sdmmc3_dat3_pb4 {
                        };
 
                        /* Colibri CAN_INT */
-                       kb_row8_ps0 {
+                       kb-row8-ps0 {
                                nvidia,pins = "kb_row8_ps0";
                                nvidia,function = "kbc";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
@@ -73,26 +218,133 @@ kb_row8_ps0 {
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
 
+                       /* Colibri DDC */
+                       ddc-scl-pv4 {
+                               nvidia,pins = "ddc_scl_pv4",
+                                             "ddc_sda_pv5";
+                               nvidia,function = "i2c4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri EXT_IO* */
+                       gen2-i2c-scl-pt5 {
+                               nvidia,pins = "gen2_i2c_scl_pt5",
+                                             "gen2_i2c_sda_pt6";
+                               nvidia,function = "rsvd4";
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       spdif-in-pk6 {
+                               nvidia,pins =   "spdif_in_pk6";
+                               nvidia,function = "hda";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri GPIO */
+                       clk2-out-pw5 {
+                               nvidia,pins = "clk2_out_pw5",
+                                             "pcc2",
+                                             "pv3",
+                                             "sdmmc1_dat2_py5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       lcd-pwr1-pc1 {
+                               nvidia,pins = "lcd_pwr1_pc1",
+                                             "pex_l1_clkreq_n_pdd6",
+                                             "pex_l1_rst_n_pdd5";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       pv1 {
+                               nvidia,pins = "pv1",
+                                             "sdmmc3_dat0_pb7",
+                                             "sdmmc3_dat1_pb6";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri HOTPLUG_DETECT (HDMI) */
+                       hdmi-int-pn7 {
+                               nvidia,pins = "hdmi_int_pn7";
+                               nvidia,function = "hdmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri I2C */
+                       gen1-i2c-scl-pc4 {
+                               nvidia,pins = "gen1_i2c_scl_pc4",
+                                             "gen1_i2c_sda_pc5";
+                               nvidia,function = "i2c1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri LCD (L_* resp. LDD<*>) */
+                       lcd-d0-pe0 {
+                               nvidia,pins = "lcd_d0_pe0",
+                                             "lcd_d1_pe1",
+                                             "lcd_d2_pe2",
+                                             "lcd_d3_pe3",
+                                             "lcd_d4_pe4",
+                                             "lcd_d5_pe5",
+                                             "lcd_d6_pe6",
+                                             "lcd_d7_pe7",
+                                             "lcd_d8_pf0",
+                                             "lcd_d9_pf1",
+                                             "lcd_d10_pf2",
+                                             "lcd_d11_pf3",
+                                             "lcd_d12_pf4",
+                                             "lcd_d13_pf5",
+                                             "lcd_d14_pf6",
+                                             "lcd_d15_pf7",
+                                             "lcd_d16_pm0",
+                                             "lcd_d17_pm1",
+                                             "lcd_de_pj1",
+                                             "lcd_hsync_pj3",
+                                             "lcd_pclk_pb3",
+                                             "lcd_vsync_pj4";
+                               nvidia,function = "displaya";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
                        /*
                         * Colibri L_BIAS, LCD_M1 is muxed with LCD_DE
-                        * todays display need DE, disable LCD_M1
+                        * today's display need DE, disable LCD_M1
                         */
-                       lcd_m1_pw1 {
+                       lcd-m1-pw1 {
                                nvidia,pins = "lcd_m1_pw1";
                                nvidia,function = "rsvd3";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
                        /* Colibri MMC */
-                       kb_row10_ps2 {
+                       kb-row10-ps2 {
                                nvidia,pins = "kb_row10_ps2";
                                nvidia,function = "sdmmc2";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       kb_row11_ps3 {
+                       kb-row11-ps3 {
                                nvidia,pins = "kb_row11_ps3",
                                              "kb_row12_ps4",
                                              "kb_row13_ps5",
@@ -102,9 +354,108 @@ kb_row11_ps3 {
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
+                       /* Colibri MMC_CD */
+                       gmi-wp-n-pc7 {
+                               nvidia,pins = "gmi_wp_n_pc7";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* Multiplexed and therefore disabled */
+                       cam-mclk-pcc0 {
+                               nvidia,pins =   "cam_mclk_pcc0";
+                               nvidia,function = "vi_alt3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       cam-i2c-scl-pbb1 {
+                               nvidia,pins = "cam_i2c_scl_pbb1",
+                                             "cam_i2c_sda_pbb2";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                       };
+                       pbb0 {
+                               nvidia,pins = "pbb0",
+                                             "pcc1";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       pbb3 {
+                               nvidia,pins = "pbb3";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Colibri nRESET_OUT */
+                       gmi-rst-n-pi4 {
+                               nvidia,pins = "gmi_rst_n_pi4";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /*
+                        * Colibri Parallel Camera (Optional)
+                        * pins multiplexed with others and therefore disabled
+                        */
+                       vi-vsync-pd6 {
+                               nvidia,pins = "vi_d0_pt4",
+                                             "vi_d1_pd5",
+                                             "vi_d2_pl0",
+                                             "vi_d3_pl1",
+                                             "vi_d4_pl2",
+                                             "vi_d5_pl3",
+                                             "vi_d6_pl4",
+                                             "vi_d7_pl5",
+                                             "vi_d8_pl6",
+                                             "vi_d9_pl7",
+                                             "vi_d10_pt2",
+                                             "vi_d11_pt3",
+                                             "vi_hsync_pd7",
+                                             "vi_mclk_pt1",
+                                             "vi_pclk_pt0",
+                                             "vi_vsync_pd6";
+                               nvidia,function = "vi";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Colibri PWM<B> */
+                       sdmmc3-dat2-pb5 {
+                               nvidia,pins = "sdmmc3_dat2_pb5";
+                               nvidia,function = "pwm1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Colibri PWM<C> */
+                       sdmmc3-clk-pa6 {
+                               nvidia,pins = "sdmmc3_clk_pa6";
+                               nvidia,function = "pwm2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Colibri PWM<D> */
+                       sdmmc3-cmd-pa7 {
+                               nvidia,pins = "sdmmc3_cmd_pa7";
+                               nvidia,function = "pwm3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
 
                        /* Colibri SSP */
-                       ulpi_clk_py0 {
+                       ulpi-clk-py0 {
                                nvidia,pins = "ulpi_clk_py0",
                                              "ulpi_dir_py1",
                                              "ulpi_nxt_py2",
@@ -113,16 +464,18 @@ ulpi_clk_py0 {
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
-                       sdmmc3_dat6_pd3 {
+                       /* Multiplexed SSPFRM, SSPTXD and therefore disabled */
+                       sdmmc3-dat6-pd3 {
                                nvidia,pins = "sdmmc3_dat6_pd3",
                                              "sdmmc3_dat7_pd4";
                                nvidia,function = "spdif";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* Colibri UART_A */
-                       ulpi_data0 {
+                       /* Colibri UART-A */
+                       ulpi-data0 {
                                nvidia,pins = "ulpi_data0_po1",
                                              "ulpi_data1_po2",
                                              "ulpi_data2_po3",
@@ -136,8 +489,8 @@ ulpi_data0 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* Colibri UART_B */
-                       gmi_a16_pj7 {
+                       /* Colibri UART-B */
+                       gmi-a16-pj7 {
                                nvidia,pins = "gmi_a16_pj7",
                                              "gmi_a17_pb0",
                                              "gmi_a18_pb1",
@@ -147,8 +500,8 @@ gmi_a16_pj7 {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* Colibri UART_C */
-                       uart2_rxd {
+                       /* Colibri UART-C */
+                       uart2-rxd {
                                nvidia,pins = "uart2_rxd_pc3",
                                              "uart2_txd_pc2";
                                nvidia,function = "uartb";
@@ -156,15 +509,53 @@ uart2_rxd {
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* eMMC */
-                       sdmmc4_clk_pcc4 {
+                       /* Colibri USBC_DET */
+                       spdif-out-pk5 {
+                               nvidia,pins =   "spdif_out_pk5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri USBH_PEN */
+                       spi2-cs1-n-pw2 {
+                               nvidia,pins = "spi2_cs1_n_pw2";
+                               nvidia,function = "spi2_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Colibri USBH_OC */
+                       spi2-cs2-n-pw3, {
+                               nvidia,pins = "spi2_cs2_n_pw3";
+                               nvidia,function = "spi2_alt";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Colibri VGA not supported and therefore disabled */
+                       crt-hsync-pv6 {
+                               nvidia,pins = "crt_hsync_pv6",
+                                             "crt_vsync_pv7";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* eMMC (On-module) */
+                       sdmmc4-clk-pcc4 {
                                nvidia,pins = "sdmmc4_clk_pcc4",
+                                             "sdmmc4_cmd_pt7",
                                              "sdmmc4_rst_n_pcc3";
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
-                       sdmmc4_dat0_paa0 {
+                       sdmmc4-dat0-paa0 {
                                nvidia,pins = "sdmmc4_dat0_paa0",
                                              "sdmmc4_dat1_paa1",
                                              "sdmmc4_dat2_paa2",
@@ -176,17 +567,111 @@ sdmmc4_dat0_paa0 {
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* LAN_EXT_WAKEUP#, LAN_PME (On-module) */
+                       pex-l0-rst-n-pdd1 {
+                               nvidia,pins = "pex_l0_rst_n_pdd1",
+                                             "pex_wake_n_pdd3";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+                       /* LAN_V_BUS, LAN_RESET# (On-module) */
+                       pex-l0-clkreq-n-pdd2 {
+                               nvidia,pins = "pex_l0_clkreq_n_pdd2",
+                                             "pex_l0_prsnt_n_pdd0";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* nBATT_FAULT(SENSE), nVDD_FAULT(SENSE) */
+                       pex-l2-rst-n-pcc6 {
+                               nvidia,pins = "pex_l2_rst_n_pcc6",
+                                             "pex_l2_prsnt_n_pdd7";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Not connected and therefore disabled */
+                       clk1-req-pee2 {
+                               nvidia,pins = "clk1_req_pee2",
+                                             "pex_l1_prsnt_n_pdd4";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       clk2-req-pcc5 {
+                               nvidia,pins = "clk2_req_pcc5",
+                                             "clk3_out_pee0",
+                                             "clk3_req_pee1",
+                                             "clk_32k_out_pa0",
+                                             "hdmi_cec_pee3",
+                                             "sys_clk_req_pz5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       gmi-dqs-pi2 {
+                               nvidia,pins = "gmi_dqs_pi2",
+                                             "kb_col2_pq2",
+                                             "kb_col3_pq3",
+                                             "kb_col4_pq4",
+                                             "kb_col5_pq5",
+                                             "kb_row4_pr4";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-col0-pq0 {
+                               nvidia,pins = "kb_col0_pq0",
+                                             "kb_col1_pq1",
+                                             "kb_col6_pq6",
+                                             "kb_col7_pq7",
+                                             "kb_row5_pr5",
+                                             "kb_row6_pr6",
+                                             "kb_row7_pr7",
+                                             "kb_row9_ps1";
+                               nvidia,function = "kbc";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       kb-row0-pr0 {
+                               nvidia,pins = "kb_row0_pr0",
+                                             "kb_row1_pr1",
+                                             "kb_row2_pr2",
+                                             "kb_row3_pr3";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                       };
+                       lcd-pwr2-pc6 {
+                               nvidia,pins = "lcd_pwr2_pc6";
+                               nvidia,function = "hdcp";
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
                        /* Power I2C (On-module) */
-                       pwr_i2c_scl_pz6 {
+                       pwr-i2c-scl-pz6 {
                                nvidia,pins = "pwr_i2c_scl_pz6",
                                              "pwr_i2c_sda_pz7";
                                nvidia,function = "i2cpwr";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
-                               nvidia,lock = <TEGRA_PIN_DISABLE>;
                                nvidia,open-drain = <TEGRA_PIN_ENABLE>;
                        };
 
@@ -195,15 +680,15 @@ pwr_i2c_scl_pz6 {
                         * temperature sensor therefore requires disabling for
                         * now
                         */
-                       lcd_dc1_pd2 {
+                       lcd-dc1-pd2 {
                                nvidia,pins = "lcd_dc1_pd2";
                                nvidia,function = "rsvd3";
-                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
-                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+                               nvidia,tristate = <TEGRA_PIN_ENABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                        };
 
-                       /* TOUCH_PEN_INT# */
+                       /* TOUCH_PEN_INT# (On-module) */
                        pv0 {
                                nvidia,pins = "pv0";
                                nvidia,function = "rsvd1";
@@ -214,13 +699,21 @@ pv0 {
                };
        };
 
-       hdmiddc: i2c@7000c700 {
+       serial@70006040 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra30-hsuart";
+       };
+
+       hdmi_ddc: i2c@7000c700 {
                clock-frequency = <10000>;
        };
 
        /*
         * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
-        * touch screen controller
+        * touch screen controller (On-module)
         */
        i2c@7000d000 {
                status = "okay";
@@ -230,12 +723,13 @@ i2c@7000d000 {
                sgtl5000: codec@a {
                        compatible = "fsl,sgtl5000";
                        reg = <0x0a>;
-                       VDDA-supply = <&sys_3v3_reg>;
-                       VDDIO-supply = <&sys_3v3_reg>;
+                       VDDA-supply = <&reg_module_3v3_audio>;
+                       VDDD-supply = <&reg_1v8_vio>;
+                       VDDIO-supply = <&reg_module_3v3>;
                        clocks = <&tegra_car TEGRA30_CLK_EXTERN1>;
                };
 
-               pmic: tps65911@2d {
+               pmic: pmic@2d {
                        compatible = "ti,tps65911";
                        reg = <0x2d>;
 
@@ -248,19 +742,18 @@ pmic: tps65911@2d {
                        #gpio-cells = <2>;
                        gpio-controller;
 
-                       vcc1-supply = <&sys_3v3_reg>;
-                       vcc2-supply = <&sys_3v3_reg>;
-                       vcc3-supply = <&vio_reg>;
-                       vcc4-supply = <&sys_3v3_reg>;
-                       vcc5-supply = <&sys_3v3_reg>;
-                       vcc6-supply = <&vio_reg>;
-                       vcc7-supply = <&charge_pump_5v0_reg>;
-                       vccio-supply = <&sys_3v3_reg>;
+                       vcc1-supply = <&reg_module_3v3>;
+                       vcc2-supply = <&reg_module_3v3>;
+                       vcc3-supply = <&reg_1v8_vio>;
+                       vcc4-supply = <&reg_module_3v3>;
+                       vcc5-supply = <&reg_module_3v3>;
+                       vcc6-supply = <&reg_1v8_vio>;
+                       vcc7-supply = <&reg_5v0_charge_pump>;
+                       vccio-supply = <&reg_module_3v3>;
 
                        regulators {
-                               /* SW1: +V1.35_VDDIO_DDR */
                                vdd1_reg: vdd1 {
-                                       regulator-name = "vddio_ddr_1v35";
+                                       regulator-name = "+V1.35_VDDIO_DDR";
                                        regulator-min-microvolt = <1350000>;
                                        regulator-max-microvolt = <1350000>;
                                        regulator-always-on;
@@ -268,17 +761,15 @@ vdd1_reg: vdd1 {
 
                                /* SW2: unused */
 
-                               /* SW CTRL: +V1.0_VDD_CPU */
                                vddctrl_reg: vddctrl {
-                                       regulator-name = "vdd_cpu,vdd_sys";
+                                       regulator-name = "+V1.0_VDD_CPU";
                                        regulator-min-microvolt = <1150000>;
                                        regulator-max-microvolt = <1150000>;
                                        regulator-always-on;
                                };
 
-                               /* SWIO: +V1.8 */
-                               vio_reg: vio {
-                                       regulator-name = "vdd_1v8_gen";
+                               reg_1v8_vio: vio {
+                                       regulator-name = "+V1.8";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        regulator-always-on;
@@ -289,10 +780,10 @@ vio_reg: vio {
                                /*
                                 * EN_+V3.3 switching via FET:
                                 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
-                                * see also 3v3 fixed supply
+                                * see also +V3.3 fixed supply
                                 */
                                ldo2_reg: ldo2 {
-                                       regulator-name = "en_3v3";
+                                       regulator-name = "EN_+V3.3";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
@@ -300,9 +791,8 @@ ldo2_reg: ldo2 {
 
                                /* LDO3: unused */
 
-                               /* +V1.2_VDD_RTC */
                                ldo4_reg: ldo4 {
-                                       regulator-name = "vdd_rtc";
+                                       regulator-name = "+V1.2_VDD_RTC";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
@@ -310,10 +800,10 @@ ldo4_reg: ldo4 {
 
                                /*
                                 * +V2.8_AVDD_VDAC:
-                                * only required for analog RGB
+                                * only required for (unsupported) analog RGB
                                 */
                                ldo5_reg: ldo5 {
-                                       regulator-name = "avdd_vdac";
+                                       regulator-name = "+V2.8_AVDD_VDAC";
                                        regulator-min-microvolt = <2800000>;
                                        regulator-max-microvolt = <2800000>;
                                        regulator-always-on;
@@ -325,22 +815,20 @@ ldo5_reg: ldo5 {
                                 * granularity
                                 */
                                ldo6_reg: ldo6 {
-                                       regulator-name = "avdd_plle";
+                                       regulator-name = "+V1.05_AVDD_PLLE";
                                        regulator-min-microvolt = <1100000>;
                                        regulator-max-microvolt = <1100000>;
                                };
 
-                               /* +V1.2_AVDD_PLL */
                                ldo7_reg: ldo7 {
-                                       regulator-name = "avdd_pll";
+                                       regulator-name = "+V1.2_AVDD_PLL";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1200000>;
                                        regulator-always-on;
                                };
 
-                               /* +V1.0_VDD_DDR_HS */
                                ldo8_reg: ldo8 {
-                                       regulator-name = "vdd_ddr_hs";
+                                       regulator-name = "+V1.0_VDD_DDR_HS";
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1000000>;
                                        regulator-always-on;
@@ -349,11 +837,10 @@ ldo8_reg: ldo8 {
                };
 
                /* STMPE811 touch screen controller */
-               stmpe811@41 {
+               touchscreen@41 {
                        compatible = "st,stmpe811";
                        reg = <0x41>;
-                       interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
-                       interrupt-parent = <&gpio>;
+                       irq-gpio = <&gpio TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
                        interrupt-controller;
                        id = <0>;
                        blocks = <0x5>;
@@ -387,7 +874,7 @@ stmpe_touchscreen {
 
                /*
                 * LM95245 temperature sensor
-                * Note: OVERT_N directly connected to PMIC PWRDN
+                * Note: OVERT1# directly connected to TPS65911 PMIC PWRDN
                 */
                temp-sensor@4c {
                        compatible = "national,lm95245";
@@ -395,7 +882,7 @@ temp-sensor@4c {
                };
 
                /* SW: +V1.2_VDD_CORE */
-               tps62362@60 {
+               regulator@60 {
                        compatible = "ti,tps62362";
                        reg = <0x60>;
 
@@ -419,6 +906,18 @@ pmc@7000e400 {
                nvidia,core-pwr-off-time = <0>;
                nvidia,core-power-req-active-high;
                nvidia,sys-clock-req-active-high;
+
+               /* Set DEV_OFF bit in DCDC control register of TPS65911 PMIC */
+               i2c-thermtrip {
+                       nvidia,i2c-controller-id = <4>;
+                       nvidia,bus-addr = <0x2d>;
+                       nvidia,reg-addr = <0x3f>;
+                       nvidia,reg-data = <0x1>;
+               };
+       };
+
+       hda@70030000 {
+               status = "okay";
        };
 
        ahub@70080000 {
@@ -432,75 +931,85 @@ sdhci@78000600 {
                status = "okay";
                bus-width = <8>;
                non-removable;
+               vmmc-supply = <&reg_module_3v3>; /* VCC */
+               vqmmc-supply = <&reg_1v8_vio>; /* VCCQ */
+               mmc-ddr-1_8v;
        };
 
-       /* EHCI instance 1: USB2_DP/N -> AX88772B */
+       /* EHCI instance 1: USB2_DP/N -> AX88772B (On-module) */
        usb@7d004000 {
                status = "okay";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               asix@1 {
+                       reg = <1>;
+                       local-mac-address = [00 00 00 00 00 00];
+               };
        };
 
        usb-phy@7d004000 {
                status = "okay";
-               nvidia,is-wired = <1>;
+               vbus-supply = <&reg_lan_v_bus>;
        };
 
-       clocks {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
+       clk32k_in: xtal1 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+       };
 
-               clk32k_in: clk@0 {
-                       compatible = "fixed-clock";
-                       reg = <0>;
-                       #clock-cells = <0>;
-                       clock-frequency = <32768>;
-               };
+       reg_1v8_avdd_hdmi_pll: regulator-1v8-avdd-hdmi-pll {
+               compatible = "regulator-fixed";
+               regulator-name = "+V1.8_AVDD_HDMI_PLL";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_1v8_vio>;
        };
 
-       regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
+       reg_3v3_avdd_hdmi: regulator-3v3-avdd-hdmi {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AVDD_HDMI";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               enable-active-high;
+               gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+               vin-supply = <&reg_module_3v3>;
+       };
 
-               avdd_hdmi_pll_1v8_reg: regulator@100 {
-                       compatible = "regulator-fixed";
-                       reg = <100>;
-                       regulator-name = "+V1.8_AVDD_HDMI_PLL";
-                       regulator-min-microvolt = <1800000>;
-                       regulator-max-microvolt = <1800000>;
-                       enable-active-high;
-                       gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
-                       vin-supply = <&vio_reg>;
-               };
+       reg_5v0_charge_pump: regulator-5v0-charge-pump {
+               compatible = "regulator-fixed";
+               regulator-name = "+V5.0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
 
-               sys_3v3_reg: regulator@101 {
-                       compatible = "regulator-fixed";
-                       reg = <101>;
-                       regulator-name = "3v3";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-always-on;
-               };
+       reg_lan_v_bus: regulator-lan-v-bus {
+               compatible = "regulator-fixed";
+               regulator-name = "LAN_V_BUS";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               gpio = <&gpio TEGRA_GPIO(DD, 2) GPIO_ACTIVE_HIGH>;
+       };
 
-               avdd_hdmi_3v3_reg: regulator@102 {
-                       compatible = "regulator-fixed";
-                       reg = <102>;
-                       regulator-name = "+V3.3_AVDD_HDMI";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       enable-active-high;
-                       gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
-                       vin-supply = <&sys_3v3_reg>;
-               };
+       reg_module_3v3: regulator-module-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
 
-               charge_pump_5v0_reg: regulator@103 {
-                       compatible = "regulator-fixed";
-                       reg = <103>;
-                       regulator-name = "5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-always-on;
-               };
+       reg_module_3v3_audio: regulator-module-3v3-audio {
+               compatible = "regulator-fixed";
+               regulator-name = "+V3.3_AUDIO_AVDD_S";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
        };
 
        sound {
@@ -519,3 +1028,12 @@ sound {
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
 };
+
+&gpio {
+       lan-reset-n {
+               gpio-hog;
+               gpios = <TEGRA_GPIO(DD, 0) GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "LAN_RESET#";
+       };
+};
index a6781f6533105e7e27a7bb1e9da8f066cc1814a8..d2b553f76719070e58284a49c3b62fd2c0c491be 100644 (file)
@@ -896,7 +896,7 @@ phy1: usb-phy@7d000000 {
                nvidia,elastic-limit = <16>;
                nvidia,term-range-adj = <6>;
                nvidia,xcvr-setup = <51>;
-               nvidia.xcvr-setup-use-fuses;
+               nvidia,xcvr-setup-use-fuses;
                nvidia,xcvr-lsfslew = <1>;
                nvidia,xcvr-lsrslew = <1>;
                nvidia,xcvr-hsslew = <32>;
@@ -933,7 +933,7 @@ phy2: usb-phy@7d004000 {
                nvidia,elastic-limit = <16>;
                nvidia,term-range-adj = <6>;
                nvidia,xcvr-setup = <51>;
-               nvidia.xcvr-setup-use-fuses;
+               nvidia,xcvr-setup-use-fuses;
                nvidia,xcvr-lsfslew = <2>;
                nvidia,xcvr-lsrslew = <2>;
                nvidia,xcvr-hsslew = <32>;
@@ -969,7 +969,7 @@ phy3: usb-phy@7d008000 {
                nvidia,elastic-limit = <16>;
                nvidia,term-range-adj = <6>;
                nvidia,xcvr-setup = <51>;
-               nvidia.xcvr-setup-use-fuses;
+               nvidia,xcvr-setup-use-fuses;
                nvidia,xcvr-lsfslew = <2>;
                nvidia,xcvr-lsrslew = <2>;
                nvidia,xcvr-hsslew = <32>;
@@ -1013,5 +1013,9 @@ pmu {
                             <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
                             <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&{/cpus/cpu@0}>,
+                                    <&{/cpus/cpu@1}>,
+                                    <&{/cpus/cpu@2}>,
+                                    <&{/cpus/cpu@3}>;
        };
 };
index 5f61d36090270131ed6c8f91a2f93f3ee92ef5e3..6f4f60ba5429c8dedcd3a9863c5558a5e0b8199d 100644 (file)
@@ -373,7 +373,7 @@ sci@101f0000 {
                        clock-names = "apb_pclk";
                };
 
-               ssp@101f4000 {
+               spi@101f4000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x101f4000 0x1000>;
                        interrupts = <11>;
index cc5a3dc2b4a08dc3ceca92112bc6e0206bfd21d1..27cd6cb52f1ba33607db41ce80c6fb502a55837f 100644 (file)
@@ -174,17 +174,17 @@ i2c@7 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <7>;
-                       hwmon@52 {
+                       hwmon@34 {
                                compatible = "ti,ucd9248";
-                               reg = <52>;
+                               reg = <0x34>;
                        };
-                       hwmon@53 {
+                       hwmon@35 {
                                compatible = "ti,ucd9248";
-                               reg = <53>;
+                               reg = <0x35>;
                        };
-                       hwmon@54 {
+                       hwmon@36 {
                                compatible = "ti,ucd9248";
-                               reg = <54>;
+                               reg = <0x36>;
                        };
                };
        };
index 0e1bfdd3421ff04f31266051546b23f5b9e3cfd0..0dd352289a45e58150f75896a590873f66773174 100644 (file)
@@ -68,7 +68,7 @@ &spi1 {
        status = "okay";
        num-cs = <4>;
        is-decoded-cs = <0>;
-       flash@0 {
+       flash@1 {
                compatible = "sst25wf080", "jedec,spi-nor";
                reg = <1>;
                spi-max-frequency = <1000000>;
index 651913f1afa2a06647addfdb6ae415b567031f66..4ae2c85df3a0078111f1b4aa9a24b695265cee16 100644 (file)
@@ -62,7 +62,7 @@ &spi0 {
        status = "okay";
        num-cs = <4>;
        is-decoded-cs = <0>;
-       eeprom: eeprom@0 {
+       eeprom: eeprom@2 {
                at25,byte-len = <8192>;
                at25,addr-mode = <2>;
                at25,page-size = <32>;
index e2c127608bcc0942555579346f7108548b47a318..7eca43ff69bbed1f1d5d431a968826612812ed18 100644 (file)
@@ -257,6 +257,7 @@ CONFIG_IMX_IPUV3_CORE=y
 CONFIG_DRM=y
 CONFIG_DRM_PANEL_LVDS=y
 CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
 CONFIG_DRM_DW_HDMI_AHB_AUDIO=m
 CONFIG_DRM_DW_HDMI_CEC=y
 CONFIG_DRM_IMX=y
index 148226e36152c02625e34f978c3673370aecf039..7b82128575351c9285ca5137e79ed73b9741462c 100644 (file)
@@ -95,6 +95,7 @@ CONFIG_MFD_MXS_LRADC=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_DRM=y
+CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
 CONFIG_DRM_MXSFB=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
index df68dc4056e5770253b2995cc54263d20ef8e62f..5282324c7cefba5d9fc11c8c79b6a723053bc1b3 100644 (file)
@@ -5,19 +5,19 @@ CONFIG_HIGH_RES_TIMERS=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_SLAB=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_PARTITION_ADVANCED=y
 # CONFIG_ARCH_MULTI_V7 is not set
 CONFIG_ARCH_VERSATILE=y
 CONFIG_AEABI=y
 CONFIG_OABI_COMPAT=y
-CONFIG_CMA=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CMDLINE="root=1f03 mem=32M"
 CONFIG_FPE_NWFPE=y
 CONFIG_VFP=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_CMA=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
@@ -59,6 +59,7 @@ CONFIG_GPIO_PL061=y
 CONFIG_DRM=y
 CONFIG_DRM_PANEL_ARM_VERSATILE=y
 CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DRM_DUMB_VGA_DAC=y
 CONFIG_DRM_PL111=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
@@ -89,9 +90,10 @@ CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 CONFIG_NLS_CODEPAGE_850=m
 CONFIG_NLS_ISO8859_1=m
+CONFIG_FONTS=y
+CONFIG_FONT_ACORN_8x8=y
+CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_USER=y
 CONFIG_DEBUG_LL=y
-CONFIG_FONTS=y
-CONFIG_FONT_ACORN_8x8=y
index dcd21bb95e3b9cc7fc705ecbcc8d007d9fb9dd28..f96730cce6e82c48e9f2d2c0b2be58bd55ff93ee 100644 (file)
@@ -110,6 +110,7 @@ void exynos_firmware_init(void);
 #define EXYNOS_SLEEP_MAGIC     0x00000bad
 #define EXYNOS_AFTR_MAGIC      0xfcba0d10
 
+bool __init exynos_secure_firmware_available(void);
 void exynos_set_boot_flag(unsigned int cpu, unsigned int mode);
 void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode);
 
index be1f20fe28f448bee2b03c35dcd30d726ec34a69..d602e3bf3f9665cd367e52d67069c2018748407d 100644 (file)
@@ -185,7 +185,7 @@ static void exynos_l2_configure(const struct l2x0_regs *regs)
        exynos_smc(SMC_CMD_L2X0SETUP2, regs->pwr_ctrl, regs->aux_ctrl, 0);
 }
 
-void __init exynos_firmware_init(void)
+bool __init exynos_secure_firmware_available(void)
 {
        struct device_node *nd;
        const __be32 *addr;
@@ -193,14 +193,22 @@ void __init exynos_firmware_init(void)
        nd = of_find_compatible_node(NULL, NULL,
                                        "samsung,secure-firmware");
        if (!nd)
-               return;
+               return false;
 
        addr = of_get_address(nd, 0, NULL, NULL);
        if (!addr) {
                pr_err("%s: No address specified.\n", __func__);
-               return;
+               return false;
        }
 
+       return true;
+}
+
+void __init exynos_firmware_init(void)
+{
+       if (!exynos_secure_firmware_available())
+               return;
+
        pr_info("Running under secure firmware.\n");
 
        register_firmware_ops(&exynos_firmware_ops);
index 7ead3acd6fa4d4f14463cb3606222894dbc991c4..bb8e3985acdb30f5f568a340f1ceaf3c39e43bb7 100644 (file)
@@ -59,10 +59,15 @@ struct exynos_pm_data {
        int (*cpu_suspend)(unsigned long);
 };
 
-static const struct exynos_pm_data *pm_data __ro_after_init;
+/* Used only on Exynos542x/5800 */
+struct exynos_pm_state {
+       int cpu_state;
+       unsigned int pmu_spare3;
+       void __iomem *sysram_base;
+};
 
-static int exynos5420_cpu_state;
-static unsigned int exynos_pmu_spare3;
+static const struct exynos_pm_data *pm_data __ro_after_init;
+static struct exynos_pm_state pm_state;
 
 /*
  * GIC wake-up support
@@ -257,7 +262,7 @@ static int exynos5420_cpu_suspend(unsigned long arg)
        unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
        unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
 
-       writel_relaxed(0x0, sysram_base_addr + EXYNOS5420_CPU_STATE);
+       writel_relaxed(0x0, pm_state.sysram_base + EXYNOS5420_CPU_STATE);
 
        if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) {
                mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume);
@@ -321,7 +326,7 @@ static void exynos5420_pm_prepare(void)
        /* Set wake-up mask registers */
        exynos_pm_set_wakeup_mask();
 
-       exynos_pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3);
+       pm_state.pmu_spare3 = pmu_raw_readl(S5P_PMU_SPARE3);
        /*
         * The cpu state needs to be saved and restored so that the
         * secondary CPUs will enter low power start. Though the U-Boot
@@ -329,8 +334,8 @@ static void exynos5420_pm_prepare(void)
         * needs to restore it back in case, the primary cpu fails to
         * suspend for any reason.
         */
-       exynos5420_cpu_state = readl_relaxed(sysram_base_addr +
-                                            EXYNOS5420_CPU_STATE);
+       pm_state.cpu_state = readl_relaxed(pm_state.sysram_base +
+                                          EXYNOS5420_CPU_STATE);
 
        exynos_pm_enter_sleep_mode();
 
@@ -448,8 +453,8 @@ static void exynos5420_pm_resume(void)
                       EXYNOS5_ARM_CORE0_SYS_PWR_REG);
 
        /* Restore the sysram cpu state register */
-       writel_relaxed(exynos5420_cpu_state,
-                      sysram_base_addr + EXYNOS5420_CPU_STATE);
+       writel_relaxed(pm_state.cpu_state,
+                      pm_state.sysram_base + EXYNOS5420_CPU_STATE);
 
        pmu_raw_writel(EXYNOS5420_USE_STANDBY_WFI_ALL,
                        S5P_CENTRAL_SEQ_OPTION);
@@ -457,7 +462,7 @@ static void exynos5420_pm_resume(void)
        if (exynos_pm_central_resume())
                goto early_wakeup;
 
-       pmu_raw_writel(exynos_pmu_spare3, S5P_PMU_SPARE3);
+       pmu_raw_writel(pm_state.pmu_spare3, S5P_PMU_SPARE3);
 
 early_wakeup:
 
@@ -654,4 +659,13 @@ void __init exynos_pm_init(void)
 
        register_syscore_ops(&exynos_pm_syscore_ops);
        suspend_set_ops(&exynos_suspend_ops);
+
+       /*
+        * Applicable as of now only to Exynos542x. If booted under secure
+        * firmware, the non-secure region of sysram should be used.
+        */
+       if (exynos_secure_firmware_available())
+               pm_state.sysram_base = sysram_ns_base_addr;
+       else
+               pm_state.sysram_base = sysram_base_addr;
 }
index 2ceffd85dd3d3fbcc4f80ae831713b37d23a83f3..cd65ea4e9c54e633bd66a0178ca3f06ad16e8db9 100644 (file)
@@ -2160,6 +2160,37 @@ static int of_dev_hwmod_lookup(struct device_node *np,
        return -ENODEV;
 }
 
+/**
+ * omap_hwmod_fix_mpu_rt_idx - fix up mpu_rt_idx register offsets
+ *
+ * @oh: struct omap_hwmod *
+ * @np: struct device_node *
+ *
+ * Fix up module register offsets for modules with mpu_rt_idx.
+ * Only needed for cpsw with interconnect target module defined
+ * in device tree while still using legacy hwmod platform data
+ * for rev, sysc and syss registers.
+ *
+ * Can be removed when all cpsw hwmod platform data has been
+ * dropped.
+ */
+static void omap_hwmod_fix_mpu_rt_idx(struct omap_hwmod *oh,
+                                     struct device_node *np,
+                                     struct resource *res)
+{
+       struct device_node *child = NULL;
+       int error;
+
+       child = of_get_next_child(np, child);
+       if (!child)
+               return;
+
+       error = of_address_to_resource(child, oh->mpu_rt_idx, res);
+       if (error)
+               pr_err("%s: error mapping mpu_rt_idx: %i\n",
+                      __func__, error);
+}
+
 /**
  * omap_hwmod_parse_module_range - map module IO range from device tree
  * @oh: struct omap_hwmod *
@@ -2220,7 +2251,13 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh,
        size = be32_to_cpup(ranges);
 
        pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n",
-                oh->name, np->name, base, size);
+                oh ? oh->name : "", np->name, base, size);
+
+       if (oh && oh->mpu_rt_idx) {
+               omap_hwmod_fix_mpu_rt_idx(oh, np, res);
+
+               return 0;
+       }
 
        res->start = base;
        res->end = base + size - 1;
index 9d5595c4ad99f813b4c861344ad87b28f20872f1..594901f3b8e58b8383125c54abf8759c665725dd 100644 (file)
@@ -219,17 +219,6 @@ static void gta02_udc_vbus_draw(unsigned int ma)
 #define gta02_udc_vbus_draw            NULL
 #endif
 
-/*
- * This is called when pc50633 is probed, unfortunately quite late in the
- * day since it is an I2C bus device. Here we can belatedly define some
- * platform devices with the advantage that we can mark the pcf50633 as the
- * parent. This makes them get suspended and resumed with their parent
- * the pcf50633 still around.
- */
-
-static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf);
-
-
 static char *gta02_batteries[] = {
        "battery",
 };
@@ -355,7 +344,6 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
                },
 
        },
-       .probe_done = gta02_pmu_attach_child_devices,
        .mbc_event_callback = gta02_pmu_event_callback,
 };
 
@@ -512,36 +500,6 @@ static struct platform_device *gta02_devices[] __initdata = {
        &s3c_device_ts,
 };
 
-/* These guys DO need to be children of PMU. */
-
-static struct platform_device *gta02_devices_pmu_children[] = {
-};
-
-
-/*
- * This is called when pc50633 is probed, quite late in the day since it is an
- * I2C bus device.  Here we can define platform devices with the advantage that
- * we can mark the pcf50633 as the parent.  This makes them get suspended and
- * resumed with their parent the pcf50633 still around.  All devices whose
- * operation depends on something from pcf50633 must have this relationship
- * made explicit like this, or suspend and resume will become an unreliable
- * hellworld.
- */
-
-static void gta02_pmu_attach_child_devices(struct pcf50633 *pcf)
-{
-       int n;
-
-       /* Grab a copy of the now probed PMU pointer. */
-       gta02_pcf = pcf;
-
-       for (n = 0; n < ARRAY_SIZE(gta02_devices_pmu_children); n++)
-               gta02_devices_pmu_children[n]->dev.parent = pcf->dev;
-
-       platform_add_devices(gta02_devices_pmu_children,
-                            ARRAY_SIZE(gta02_devices_pmu_children));
-}
-
 static void gta02_poweroff(void)
 {
        pcf50633_reg_set_bit_mask(gta02_pcf, PCF50633_REG_OOCSHDWN, 1, 1);
index f9fc1f8d2b2814dbf0de70b77d47b38e6d0ab665..50d67d760efdeef7f3878e00f63195df67336fbf 100644 (file)
@@ -64,31 +64,31 @@ static struct map_desc mini2440_iodesc[] __initdata = {
 };
 
 #define UCON S3C2410_UCON_DEFAULT
-#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
-#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
+#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
+#define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE)
 
 
 static struct s3c2410_uartcfg mini2440_uartcfgs[] __initdata = {
        [0] = {
-               .hwport      = 0,
-               .flags       = 0,
-               .ucon        = UCON,
-               .ulcon       = ULCON,
-               .ufcon       = UFCON,
+               .hwport         = 0,
+               .flags          = 0,
+               .ucon           = UCON,
+               .ulcon          = ULCON,
+               .ufcon          = UFCON,
        },
        [1] = {
-               .hwport      = 1,
-               .flags       = 0,
-               .ucon        = UCON,
-               .ulcon       = ULCON,
-               .ufcon       = UFCON,
+               .hwport         = 1,
+               .flags          = 0,
+               .ucon           = UCON,
+               .ulcon          = ULCON,
+               .ufcon          = UFCON,
        },
        [2] = {
-               .hwport      = 2,
-               .flags       = 0,
-               .ucon        = UCON,
-               .ulcon       = ULCON,
-               .ufcon       = UFCON,
+               .hwport         = 2,
+               .flags          = 0,
+               .ucon           = UCON,
+               .ulcon          = ULCON,
+               .ufcon          = UFCON,
        },
 };
 
@@ -104,8 +104,8 @@ static struct s3c2410_udc_mach_info mini2440_udc_cfg __initdata = {
 /*
  * This macro simplifies the table bellow
  */
-#define _LCD_DECLARE(_clock,_xres,margin_left,margin_right,hsync, \
-                       _yres,margin_top,margin_bottom,vsync, refresh) \
+#define _LCD_DECLARE(_clock, _xres, margin_left, margin_right, hsync, \
+                       _yres, margin_top, margin_bottom, vsync, refresh) \
        .width = _xres, \
        .xres = _xres, \
        .height = _yres, \
@@ -128,7 +128,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
        [0] = { /* mini2440 + 3.5" TFT + touchscreen */
                _LCD_DECLARE(
                        7,                      /* The 3.5 is quite fast */
-                       240, 21, 38, 6,         /* x timing */
+                       240, 21, 38, 6,         /* x timing */
                        320, 4, 4, 2,           /* y timing */
                        60),                    /* refresh rate */
                .lcdcon5        = (S3C2410_LCDCON5_FRM565 |
@@ -140,7 +140,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
        [1] = { /* mini2440 + 7" TFT + touchscreen */
                _LCD_DECLARE(
                        10,                     /* the 7" runs slower */
-                       800, 40, 40, 48,        /* x timing */
+                       800, 40, 40, 48,        /* x timing */
                        480, 29, 3, 3,          /* y timing */
                        50),                    /* refresh rate */
                .lcdcon5        = (S3C2410_LCDCON5_FRM565 |
@@ -148,7 +148,7 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
                                   S3C2410_LCDCON5_INVVFRAME |
                                   S3C2410_LCDCON5_PWREN),
        },
-       /* The VGA shield can outout at several resolutions. All share 
+       /* The VGA shield can outout at several resolutions. All share
         * the same timings, however, anything smaller than 1024x768
         * will only be displayed in the top left corner of a 1024x768
         * XGA output unless you add optional dip switches to the shield.
@@ -158,9 +158,10 @@ static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
                _LCD_DECLARE(
                        10,
                        1024, 1, 2, 2,          /* y timing */
-                       768, 200, 16, 16,       /* x timing */
+                       768, 200, 16, 16,       /* x timing */
                        24),    /* refresh rate, maximum stable,
-                                tested with the FPGA shield */
+                                * tested with the FPGA shield
+                                */
                .lcdcon5        = (S3C2410_LCDCON5_FRM565 |
                                   S3C2410_LCDCON5_HWSWP),
        },
@@ -196,7 +197,8 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 
        /* Enable VD[2..7], VD[10..15], VD[18..23] and VCLK, syncs, VDEN
         * and disable the pull down resistors on pins we are using for LCD
-        * data. */
+        * data.
+        */
 
        .gpcup          = (0xf << 1) | (0x3f << 10),
 
@@ -232,10 +234,11 @@ static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
 /* MMC/SD  */
 
 static struct s3c24xx_mci_pdata mini2440_mmc_cfg __initdata = {
-   .gpio_detect   = S3C2410_GPG(8),
-   .gpio_wprotect = S3C2410_GPH(8),
-   .set_power     = NULL,
-   .ocr_avail     = MMC_VDD_32_33|MMC_VDD_33_34,
+       .gpio_detect            = S3C2410_GPG(8),
+       .gpio_wprotect          = S3C2410_GPH(8),
+       .wprotect_invert        = 1,
+       .set_power              = NULL,
+       .ocr_avail              = MMC_VDD_32_33|MMC_VDD_33_34,
 };
 
 /* NAND Flash on MINI2440 board */
@@ -254,7 +257,8 @@ static struct mtd_partition mini2440_default_nand_part[] __initdata = {
        [2] = {
                .name   = "kernel",
                /* 5 megabytes, for a kernel with no modules
-                * or a uImage with a ramdisk attached */
+                * or a uImage with a ramdisk attached
+                */
                .size   = 0x00500000,
                .offset = SZ_256K + SZ_128K,
        },
@@ -271,7 +275,7 @@ static struct s3c2410_nand_set mini2440_nand_sets[] __initdata = {
                .nr_chips       = 1,
                .nr_partitions  = ARRAY_SIZE(mini2440_default_nand_part),
                .partitions     = mini2440_default_nand_part,
-               .flash_bbt      = 1, /* we use u-boot to create a BBT */
+               .flash_bbt      = 1, /* we use u-boot to create a BBT */
        },
 };
 
@@ -282,7 +286,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
        .nr_sets        = ARRAY_SIZE(mini2440_nand_sets),
        .sets           = mini2440_nand_sets,
        .ignore_unset_ecc = 1,
-       .ecc_mode       = NAND_ECC_HW,
+       .ecc_mode       = NAND_ECC_HW,
 };
 
 /* DM9000AEP 10/100 ethernet controller */
@@ -290,7 +294,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = {
 static struct resource mini2440_dm9k_resource[] = {
        [0] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE, 4),
        [1] = DEFINE_RES_MEM(MACH_MINI2440_DM9K_BASE + 4, 4),
-       [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ \
+       [2] = DEFINE_RES_NAMED(IRQ_EINT7, 1, NULL, IORESOURCE_IRQ
                                                | IORESOURCE_IRQ_HIGHEDGE),
 };
 
@@ -362,7 +366,8 @@ static struct gpio_keys_button mini2440_buttons[] = {
        },
 #if 0
        /* this pin is also known as TCLK1 and seems to already
-        * marked as "in use" somehow in the kernel -- possibly wrongly */
+        * marked as "in use" somehow in the kernel -- possibly wrongly
+        */
        {
                .gpio           = S3C2410_GPG(11),      /* K6 */
                .code           = KEY_F6,
@@ -564,7 +569,8 @@ static char mini2440_features_str[12] __initdata = "0tb";
 static int __init mini2440_features_setup(char *str)
 {
        if (str)
-               strlcpy(mini2440_features_str, str, sizeof(mini2440_features_str));
+               strlcpy(mini2440_features_str, str,
+                       sizeof(mini2440_features_str));
        return 1;
 }
 
@@ -583,10 +589,10 @@ struct mini2440_features_t {
 };
 
 static void __init mini2440_parse_features(
-               struct mini2440_features_t * features,
-               const char * features_str )
+               struct mini2440_features_t *features,
+               const char *features_str)
 {
-       const char * fp = features_str;
+       const char *fp = features_str;
 
        features->count = 0;
        features->done = 0;
@@ -598,13 +604,14 @@ static void __init mini2440_parse_features(
                switch (f) {
                case '0'...'9': /* tft screen */
                        if (features->done & FEATURE_SCREEN) {
-                               printk(KERN_INFO "MINI2440: '%c' ignored, "
-                                       "screen type already set\n", f);
+                               pr_info("MINI2440: '%c' ignored, screen type already set\n",
+                                       f);
                        } else {
                                int li = f - '0';
+
                                if (li >= ARRAY_SIZE(mini2440_lcd_cfg))
-                                       printk(KERN_INFO "MINI2440: "
-                                               "'%c' out of range LCD mode\n", f);
+                                       pr_info("MINI2440: '%c' out of range LCD mode\n",
+                                               f);
                                else {
                                        features->optional[features->count++] =
                                                        &s3c_device_lcd;
@@ -615,8 +622,8 @@ static void __init mini2440_parse_features(
                        break;
                case 'b':
                        if (features->done & FEATURE_BACKLIGHT)
-                               printk(KERN_INFO "MINI2440: '%c' ignored, "
-                                       "backlight already set\n", f);
+                               pr_info("MINI2440: '%c' ignored, backlight already set\n",
+                                       f);
                        else {
                                features->optional[features->count++] =
                                                &mini2440_led_backlight;
@@ -624,13 +631,13 @@ static void __init mini2440_parse_features(
                        features->done |= FEATURE_BACKLIGHT;
                        break;
                case 't':
-                       printk(KERN_INFO "MINI2440: '%c' ignored, "
-                               "touchscreen not compiled in\n", f);
+                       pr_info("MINI2440: '%c' ignored, touchscreen not compiled in\n",
+                               f);
                        break;
                case 'c':
                        if (features->done & FEATURE_CAMERA)
-                               printk(KERN_INFO "MINI2440: '%c' ignored, "
-                                       "camera already registered\n", f);
+                               pr_info("MINI2440: '%c' ignored, camera already registered\n",
+                                       f);
                        else
                                features->optional[features->count++] =
                                        &s3c_device_camif;
@@ -645,7 +652,7 @@ static void __init mini2440_init(void)
        struct mini2440_features_t features = { 0 };
        int i;
 
-       printk(KERN_INFO "MINI2440: Option string mini2440=%s\n",
+       pr_info("MINI2440: Option string mini2440=%s\n",
                        mini2440_features_str);
 
        /* Parse the feature string */
@@ -674,17 +681,17 @@ static void __init mini2440_init(void)
                mini2440_fb_info.displays =
                        &mini2440_lcd_cfg[features.lcd_index];
 
-               printk(KERN_INFO "MINI2440: LCD");
+               pr_info("MINI2440: LCD");
                for (li = 0; li < ARRAY_SIZE(mini2440_lcd_cfg); li++)
                        if (li == features.lcd_index)
-                               printk(" [%d:%dx%d]", li,
+                               pr_cont(" [%d:%dx%d]", li,
                                        mini2440_lcd_cfg[li].width,
                                        mini2440_lcd_cfg[li].height);
                        else
-                               printk(" %d:%dx%d", li,
+                               pr_cont(" %d:%dx%d", li,
                                        mini2440_lcd_cfg[li].width,
                                        mini2440_lcd_cfg[li].height);
-               printk("\n");
+               pr_cont("\n");
                s3c24xx_fb_set_platdata(&mini2440_fb_info);
        }
 
index 29e75b47becd5a94c9e4cf7944e77a67cdca05d7..1b1a0e95c7511b9256f1953c00d0ca32994b2160 100644 (file)
@@ -763,7 +763,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
 
 config HOLES_IN_ZONE
        def_bool y
-       depends on NUMA
 
 source kernel/Kconfig.hz
 
index e12b3f53ffd707b71e8ec9daffcd0ea9cae79a25..8d4f97f279e022570b5bb17c5f0e4d692d71f584 100644 (file)
@@ -9,6 +9,8 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus-v1.2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-libretech-all-h3-cc.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo2.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-nanopi-neo-plus2.dtb
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 (file)
index 0000000..2e2b14c
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
+
+/dts-v1/;
+#include "sun50i-h5.dtsi"
+#include <arm/sunxi-bananapi-m2-plus-v1.2.dtsi>
+
+/ {
+       model = "Banana Pi BPI-M2-Plus v1.2 H5";
+       compatible = "bananapi,bpi-m2-plus-v1.2", "allwinner,sun50i-h5";
+};
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 (file)
index 0000000..7766100
--- /dev/null
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2018 Chen-Yu Tsai <wens@csie.org>
+
+/dts-v1/;
+#include "sun50i-h5.dtsi"
+#include <arm/sunxi-bananapi-m2-plus.dtsi>
+
+/ {
+       model = "Banana Pi BPI-M2-Plus H5";
+       compatible = "sinovoip,bpi-m2-plus", "allwinner,sun50i-h5";
+};
index 62d646baac3c403bb1d1908278694f7404a954f6..b41dc1aab67d3ec6a32d9173b277c7b01b81a78b 100644 (file)
@@ -92,6 +92,49 @@ timer {
                             <GIC_PPI 10
                                (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
        };
+
+       soc {
+               mali: gpu@1e80000 {
+                       compatible = "allwinner,sun50i-h5-mali", "arm,mali-450";
+                       reg = <0x01e80000 0x30000>;
+                       /*
+                        * While the datasheet lists an interrupt for the
+                        * PMU, the actual silicon does not have the PMU
+                        * block. Reads all return zero, and writes are
+                        * ignored.
+                        */
+                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "gp",
+                                         "gpmmu",
+                                         "pp",
+                                         "pp0",
+                                         "ppmmu0",
+                                         "pp1",
+                                         "ppmmu1",
+                                         "pp2",
+                                         "ppmmu2",
+                                         "pp3",
+                                         "ppmmu3",
+                                         "pmu";
+                       clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
+                       clock-names = "bus", "core";
+                       resets = <&ccu RST_BUS_GPU>;
+
+                       assigned-clocks = <&ccu CLK_GPU>;
+                       assigned-clock-rates = <384000000>;
+               };
+       };
 };
 
 &ccu {
index 6edc4fa9fd42683e12f1de2eb4ac3d9732255e44..53cf195c2ada20beab3371a60e21c7088338a40e 100644 (file)
@@ -124,6 +124,8 @@ &watchdog0 {
 &i2c1 {
        status = "okay";
        clock-frequency = <100000>;
+       i2c-sda-falling-time-ns = <890>;  /* hcnt */
+       i2c-sdl-falling-time-ns = <890>;  /* lcnt */
 
        adc@14 {
                compatible = "lltc,ltc2497";
index 125f4deb52fe9e0c08f866050788a941ca710b11..b664e7af74eb3a99953796816ed2e5525b169832 100644 (file)
@@ -107,7 +107,7 @@ serial0: serial@e1010000 {
                        clock-names = "uartclk", "apb_pclk";
                };
 
-               spi0: ssp@e1020000 {
+               spi0: spi@e1020000 {
                        status = "disabled";
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0 0xe1020000 0 0x1000>;
@@ -117,7 +117,7 @@ spi0: ssp@e1020000 {
                        clock-names = "apb_pclk";
                };
 
-               spi1: ssp@e1030000 {
+               spi1: spi@e1030000 {
                        status = "disabled";
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0 0xe1030000 0 0x1000>;
index a97c0e2d7bc64b687277eeb87a550c3dd0f85ee4..c31f29d660debcfdad2ce6c58db462f297a701fd 100644 (file)
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
 dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
index d5c01427a5ca08cc9543acbfed8d22ecfdec4297..d4961dc8356b530b1958d4ca7ab25210cd75cb08 100644 (file)
@@ -60,6 +60,55 @@ aliases {
                serial1 = &uart_A;
        };
 
+       linein: audio-codec@0 {
+               #sound-dai-cells = <0>;
+               compatible = "everest,es7241";
+               VDDA-supply = <&vcc_3v3>;
+               VDDP-supply = <&vcc_3v3>;
+               VDDD-supply = <&vcc_3v3>;
+               status = "okay";
+               sound-name-prefix = "Linein";
+       };
+
+       lineout: audio-codec@1 {
+               #sound-dai-cells = <0>;
+               compatible = "everest,es7154";
+               VDD-supply = <&vcc_3v3>;
+               PVDD-supply = <&vcc_5v>;
+               status = "okay";
+               sound-name-prefix = "Lineout";
+       };
+
+       spdif_dit: audio-codec@2 {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dit";
+               status = "okay";
+               sound-name-prefix = "DIT";
+       };
+
+       dmics: audio-codec@3 {
+               #sound-dai-cells = <0>;
+               compatible = "dmic-codec";
+               num-channels = <7>;
+               wakeup-delay-ms = <50>;
+               status = "okay";
+               sound-name-prefix = "MIC";
+       };
+
+       emmc_pwrseq: emmc-pwrseq {
+               compatible = "mmc-pwrseq-emmc";
+               reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x40000000>;
+       };
+
        main_12v: regulator-main_12v {
                compatible = "regulator-fixed";
                regulator-name = "12V";
@@ -68,15 +117,26 @@ main_12v: regulator-main_12v {
                regulator-always-on;
        };
 
-       vddio_boot: regulator-vddio_boot {
+       vcc_3v3: regulator-vcc_3v3 {
                compatible = "regulator-fixed";
-               regulator-name = "VDDIO_BOOT";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <1800000>;
+               regulator-name = "VCC_3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
                vin-supply = <&vddao_3v3>;
                regulator-always-on;
        };
 
+       vcc_5v: regulator-vcc_5v {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC5V";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&main_12v>;
+
+               gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        vddao_3v3: regulator-vddao_3v3 {
                compatible = "regulator-fixed";
                regulator-name = "VDDAO_3V3";
@@ -95,26 +155,15 @@ vddio_ao18: regulator-vddio_ao18 {
                regulator-always-on;
        };
 
-       vcc_3v3: regulator-vcc_3v3 {
+       vddio_boot: regulator-vddio_boot {
                compatible = "regulator-fixed";
-               regulator-name = "VCC_3V3";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
+               regulator-name = "VDDIO_BOOT";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
                vin-supply = <&vddao_3v3>;
                regulator-always-on;
        };
 
-       vcc_5v: regulator-vcc_5v {
-               compatible = "regulator-fixed";
-               regulator-name = "VCC5V";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               vin-supply = <&main_12v>;
-
-               gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
-
        usb_pwr: regulator-usb_pwr {
                compatible = "regulator-fixed";
                regulator-name = "USB_PWR";
@@ -126,11 +175,6 @@ usb_pwr: regulator-usb_pwr {
                enable-active-high;
        };
 
-       emmc_pwrseq: emmc-pwrseq {
-               compatible = "mmc-pwrseq-emmc";
-               reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
-       };
-
        sdio_pwrseq: sdio-pwrseq {
                compatible = "mmc-pwrseq-simple";
                reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>;
@@ -138,13 +182,6 @@ sdio_pwrseq: sdio-pwrseq {
                clock-names = "ext_clock";
        };
 
-       wifi32k: wifi32k {
-               compatible = "pwm-clock";
-               #clock-cells = <0>;
-               clock-frequency = <32768>;
-               pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
-       };
-
        speaker-leds {
                compatible = "gpio-leds";
 
@@ -179,30 +216,129 @@ aled6 {
                };
        };
 
-       linein: audio-codec@0 {
-               #sound-dai-cells = <0>;
-               compatible = "everest,es7241";
-               VDDA-supply = <&vcc_3v3>;
-               VDDP-supply = <&vcc_3v3>;
-               VDDD-supply = <&vcc_3v3>;
+       sound {
+               compatible = "amlogic,axg-sound-card";
+               model = "AXG-S400";
+               audio-aux-devs = <&tdmin_a>, <&tdmin_b>,  <&tdmin_c>,
+                                <&tdmin_lb>, <&tdmout_c>;
+               audio-widgets = "Line", "Lineout",
+                               "Line", "Linein",
+                               "Speaker", "Speaker1 Left",
+                               "Speaker", "Speaker1 Right";
+               audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+                               "SPDIFOUT IN 0", "FRDDR_A OUT 3",
+                               "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+                               "SPDIFOUT IN 1", "FRDDR_B OUT 3",
+                               "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+                               "SPDIFOUT IN 2", "FRDDR_C OUT 3",
+                               "TDM_C Playback", "TDMOUT_C OUT",
+                               "TDMIN_A IN 2", "TDM_C Capture",
+                               "TDMIN_A IN 5", "TDM_C Loopback",
+                               "TDMIN_B IN 2", "TDM_C Capture",
+                               "TDMIN_B IN 5", "TDM_C Loopback",
+                               "TDMIN_C IN 2", "TDM_C Capture",
+                               "TDMIN_C IN 5", "TDM_C Loopback",
+                               "TDMIN_LB IN 2", "TDM_C Loopback",
+                               "TDMIN_LB IN 5", "TDM_C Capture",
+                               "TODDR_A IN 0", "TDMIN_A OUT",
+                               "TODDR_B IN 0", "TDMIN_A OUT",
+                               "TODDR_C IN 0", "TDMIN_A OUT",
+                               "TODDR_A IN 1", "TDMIN_B OUT",
+                               "TODDR_B IN 1", "TDMIN_B OUT",
+                               "TODDR_C IN 1", "TDMIN_B OUT",
+                               "TODDR_A IN 2", "TDMIN_C OUT",
+                               "TODDR_B IN 2", "TDMIN_C OUT",
+                               "TODDR_C IN 2", "TDMIN_C OUT",
+                               "TODDR_A IN 4", "PDM Capture",
+                               "TODDR_B IN 4", "PDM Capture",
+                               "TODDR_C IN 4", "PDM Capture",
+                               "TODDR_A IN 6", "TDMIN_LB OUT",
+                               "TODDR_B IN 6", "TDMIN_LB OUT",
+                               "TODDR_C IN 6", "TDMIN_LB OUT",
+                               "Lineout", "Lineout AOUTL",
+                               "Lineout", "Lineout AOUTR",
+                               "Speaker1 Left", "SPK1 OUT_A",
+                               "Speaker1 Left", "SPK1 OUT_B",
+                               "Speaker1 Right", "SPK1 OUT_C",
+                               "Speaker1 Right", "SPK1 OUT_D",
+                               "Linein AINL", "Linein",
+                               "Linein AINR", "Linein";
+               assigned-clocks = <&clkc CLKID_HIFI_PLL>,
+                                 <&clkc CLKID_MPLL0>,
+                                 <&clkc CLKID_MPLL1>;
+               assigned-clock-parents = <0>, <0>, <0>;
+               assigned-clock-rates = <589824000>,
+                                      <270950400>,
+                                      <393216000>;
                status = "okay";
-               sound-name-prefix = "Linein";
-       };
 
-       lineout: audio-codec@1 {
-               #sound-dai-cells = <0>;
-               compatible = "everest,es7154";
-               VDD-supply = <&vcc_3v3>;
-               PVDD-supply = <&vcc_5v>;
-               status = "okay";
-               sound-name-prefix = "Lineout";
+               dai-link@0 {
+                       sound-dai = <&frddr_a>;
+               };
+
+               dai-link@1 {
+                       sound-dai = <&frddr_b>;
+               };
+
+               dai-link@2 {
+                       sound-dai = <&frddr_c>;
+               };
+
+               dai-link@3 {
+                       sound-dai = <&toddr_a>;
+               };
+
+               dai-link@4 {
+                       sound-dai = <&toddr_b>;
+               };
+
+               dai-link@5 {
+                       sound-dai = <&toddr_c>;
+               };
+
+               dai-link@6 {
+                       sound-dai = <&tdmif_c>;
+                       dai-format = "i2s";
+                       dai-tdm-slot-tx-mask-2 = <1 1>;
+                       dai-tdm-slot-rx-mask-1 = <1 1>;
+                       mclk-fs = <256>;
+
+                       codec@0 {
+                               sound-dai = <&lineout>;
+                       };
+
+                       codec@1 {
+                               sound-dai = <&speaker_amp1>;
+                       };
+
+                       codec@2 {
+                               sound-dai = <&linein>;
+                       };
+
+               };
+
+               dai-link@7 {
+                       sound-dai = <&spdifout>;
+
+                       codec {
+                               sound-dai = <&spdif_dit>;
+                       };
+               };
+
+               dai-link@8 {
+                       sound-dai = <&pdm>;
+
+                       codec {
+                               sound-dai = <&dmics>;
+                       };
+               };
        };
 
-       spdif_dit: audio-codec@2 {
-               #sound-dai-cells = <0>;
-               compatible = "linux,spdif-dit";
-               status = "okay";
-               sound-name-prefix = "DIT";
+       wifi32k: wifi32k {
+               compatible = "pwm-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */
        };
 };
 
@@ -226,16 +362,16 @@ eth_phy0: ethernet-phy@0 {
        };
 };
 
-&uart_A {
+&frddr_a {
        status = "okay";
-       pinctrl-0 = <&uart_a_pins>;
-       pinctrl-names = "default";
 };
 
-&uart_AO {
+&frddr_b {
+       status = "okay";
+};
+
+&frddr_c {
        status = "okay";
-       pinctrl-0 = <&uart_ao_a_pins>;
-       pinctrl-names = "default";
 };
 
 &ir {
@@ -260,6 +396,7 @@ speaker_amp1: audio-codec@1b {
                PVDD_B-supply = <&main_12v>;
                PVDD_C-supply = <&main_12v>;
                PVDD_D-supply = <&main_12v>;
+               sound-name-prefix = "SPK1";
        };
 };
 
@@ -277,30 +414,22 @@ gpio_speaker: gpio-controller@1f {
        };
 };
 
+&pdm {
+       pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>,
+                   <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &pwm_ab {
        status = "okay";
        pinctrl-0 = <&pwm_a_x20_pins>;
        pinctrl-names = "default";
 };
 
-/* emmc storage */
-&sd_emmc_c {
+&saradc {
        status = "okay";
-       pinctrl-0 = <&emmc_pins>;
-       pinctrl-1 = <&emmc_clk_gate_pins>;
-       pinctrl-names = "default", "clk-gate";
-
-       bus-width = <8>;
-       cap-sd-highspeed;
-       cap-mmc-highspeed;
-       max-frequency = <180000000>;
-       non-removable;
-       disable-wp;
-       mmc-ddr-1_8v;
-       mmc-hs200-1_8v;
-
-       vmmc-supply = <&vcc_3v3>;
-       vqmmc-supply = <&vddio_boot>;
+       vref-supply = <&vddio_ao18>;
 };
 
 /* wifi module */
@@ -330,7 +459,94 @@ brcmf: wifi@1 {
        };
 };
 
-&saradc {
+/* emmc storage */
+&sd_emmc_c {
        status = "okay";
-       vref-supply = <&vddio_ao18>;
+       pinctrl-0 = <&emmc_pins>;
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
+
+       bus-width = <8>;
+       cap-sd-highspeed;
+       cap-mmc-highspeed;
+       max-frequency = <180000000>;
+       non-removable;
+       disable-wp;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+
+       vmmc-supply = <&vcc_3v3>;
+       vqmmc-supply = <&vddio_boot>;
+};
+
+&spdifout {
+       pinctrl-0 = <&spdif_out_a20_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&tdmif_a {
+       pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>,
+                   <&tdma_din0_pins>, <&tdma_dout0_x15_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&tdmif_b {
+       pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>,
+                   <&tdmb_din3_pins>, <&mclk_b_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&tdmif_c {
+       pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>,
+                   <&tdmc_din1_pins>, <&tdmc_dout2_pins>,
+                   <&mclk_c_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
+&tdmin_a {
+       status = "okay";
+};
+
+&tdmin_b {
+       status = "okay";
+};
+
+&tdmin_c {
+       status = "okay";
+};
+
+&tdmin_lb {
+       status = "okay";
+};
+
+&tdmout_c {
+       status = "okay";
+};
+
+&toddr_a {
+       status = "okay";
+};
+
+&toddr_b {
+       status = "okay";
+};
+
+&toddr_c {
+       status = "okay";
+};
+
+&uart_A {
+       status = "okay";
+       pinctrl-0 = <&uart_a_pins>;
+       pinctrl-names = "default";
+};
+
+&uart_AO {
+       status = "okay";
+       pinctrl-0 = <&uart_ao_a_pins>;
+       pinctrl-names = "default";
 };
index c518130e5ce730e8267456cee4a6062d4527b772..df017dbd2e572028f2c98b66b065d1d2b5325b3a 100644 (file)
@@ -3,13 +3,14 @@
  * Copyright (c) 2017 Amlogic, Inc. All rights reserved.
  */
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/axg-aoclkc.h>
 #include <dt-bindings/clock/axg-audio-clkc.h>
 #include <dt-bindings/clock/axg-clkc.h>
-#include <dt-bindings/clock/axg-aoclkc.h>
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/gpio/meson-axg-gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
 #include <dt-bindings/reset/amlogic,meson-axg-reset.h>
 
 / {
@@ -19,22 +20,53 @@ / {
        #address-cells = <2>;
        #size-cells = <2>;
 
-       reserved-memory {
-               #address-cells = <2>;
-               #size-cells = <2>;
-               ranges;
+       tdmif_a: audio-controller@0 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_A";
+               clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
 
-               /* 16 MiB reserved for Hardware ROM Firmware */
-               hwrom_reserved: hwrom@0 {
-                       reg = <0x0 0x0 0x0 0x1000000>;
-                       no-map;
-               };
+       tdmif_b: audio-controller@1 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_B";
+               clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
 
-               /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
-               secmon_reserved: secmon@5000000 {
-                       reg = <0x0 0x05000000 0x0 0x300000>;
-                       no-map;
-               };
+       tdmif_c: audio-controller@2 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_C";
+               clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
+       ao_alt_xtal: ao_alt_xtal-clk {
+               compatible = "fixed-clock";
+               clock-frequency = <32000000>;
+               clock-output-names = "ao_alt_xtal";
+               #clock-cells = <0>;
+       };
+
+       arm-pmu {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
        };
 
        cpus {
@@ -78,77 +110,27 @@ l2: l2-cache0 {
                };
        };
 
-       arm-pmu {
-               compatible = "arm,cortex-a53-pmu";
-               interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
-               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
-       };
-
        psci {
                compatible = "arm,psci-1.0";
                method = "smc";
        };
 
-       tdmif_a: audio-controller@0 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_A";
-               clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_A_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
-       };
-
-       tdmif_b: audio-controller@1 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_B";
-               clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_B_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
-       };
-
-       tdmif_c: audio-controller@2 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_C";
-               clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_C_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
-       };
-
-       timer {
-               compatible = "arm,armv8-timer";
-               interrupts = <GIC_PPI 13
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
-                            <GIC_PPI 14
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
-                            <GIC_PPI 11
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
-                            <GIC_PPI 10
-                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
-       };
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
 
-       xtal: xtal-clk {
-               compatible = "fixed-clock";
-               clock-frequency = <24000000>;
-               clock-output-names = "xtal";
-               #clock-cells = <0>;
-       };
+               /* 16 MiB reserved for Hardware ROM Firmware */
+               hwrom_reserved: hwrom@0 {
+                       reg = <0x0 0x0 0x0 0x1000000>;
+                       no-map;
+               };
 
-       ao_alt_xtal: ao_alt_xtal-clk {
-               compatible = "fixed-clock";
-               clock-frequency = <32000000>;
-               clock-output-names = "ao_alt_xtal";
-               #clock-cells = <0>;
+               /* Alternate 3 MiB reserved for ARM Trusted Firmware (BL31) */
+               secmon_reserved: secmon@5000000 {
+                       reg = <0x0 0x05000000 0x0 0x300000>;
+                       no-map;
+               };
        };
 
        soc {
@@ -157,403 +139,139 @@ soc {
                #size-cells = <2>;
                ranges;
 
-               apb: apb@ffe00000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xffe00000 0x0 0x200000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
-
-                       sd_emmc_b: sd@5000 {
-                               compatible = "amlogic,meson-axg-mmc";
-                               reg = <0x0 0x5000 0x0 0x800>;
-                               interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
-                               status = "disabled";
-                               clocks = <&clkc CLKID_SD_EMMC_B>,
-                                       <&clkc CLKID_SD_EMMC_B_CLK0>,
-                                       <&clkc CLKID_FCLK_DIV2>;
-                               clock-names = "core", "clkin0", "clkin1";
-                               resets = <&reset RESET_SD_EMMC_B>;
-                       };
+               ethmac: ethernet@ff3f0000 {
+                       compatible = "amlogic,meson-axg-dwmac", "snps,dwmac";
+                       reg = <0x0 0xff3f0000 0x0 0x10000
+                              0x0 0xff634540 0x0 0x8>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>,
+                                <&clkc CLKID_FCLK_DIV2>,
+                                <&clkc CLKID_MPLL2>;
+                       clock-names = "stmmaceth", "clkin0", "clkin1";
+                       status = "disabled";
+               };
 
-                       sd_emmc_c: mmc@7000 {
-                               compatible = "amlogic,meson-axg-mmc";
-                               reg = <0x0 0x7000 0x0 0x800>;
-                               interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
-                               status = "disabled";
-                               clocks = <&clkc CLKID_SD_EMMC_C>,
-                                       <&clkc CLKID_SD_EMMC_C_CLK0>,
-                                       <&clkc CLKID_FCLK_DIV2>;
-                               clock-names = "core", "clkin0", "clkin1";
-                               resets = <&reset RESET_SD_EMMC_C>;
-                       };
+               pdm: audio-controller@ff632000 {
+                       compatible = "amlogic,axg-pdm";
+                       reg = <0x0 0xff632000 0x0 0x34>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "PDM";
+                       clocks = <&clkc_audio AUD_CLKID_PDM>,
+                                <&clkc_audio AUD_CLKID_PDM_DCLK>,
+                                <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
+                       clock-names = "pclk", "dclk", "sysclk";
+                       status = "disabled";
                };
 
-               audio: bus@ff642000 {
+               periphs: bus@ff634000 {
                        compatible = "simple-bus";
-                       reg = <0x0 0xff642000 0x0 0x2000>;
+                       reg = <0x0 0xff634000 0x0 0x2000>;
                        #address-cells = <2>;
                        #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
-
-                       clkc_audio: clock-controller@0 {
-                               compatible = "amlogic,axg-audio-clkc";
-                               reg = <0x0 0x0 0x0 0xb4>;
-                               #clock-cells = <1>;
-
-                               clocks = <&clkc CLKID_AUDIO>,
-                                        <&clkc CLKID_MPLL0>,
-                                        <&clkc CLKID_MPLL1>,
-                                        <&clkc CLKID_MPLL2>,
-                                        <&clkc CLKID_MPLL3>,
-                                        <&clkc CLKID_HIFI_PLL>,
-                                        <&clkc CLKID_FCLK_DIV3>,
-                                        <&clkc CLKID_FCLK_DIV4>,
-                                        <&clkc CLKID_GP0_PLL>;
-                               clock-names = "pclk",
-                                             "mst_in0",
-                                             "mst_in1",
-                                             "mst_in2",
-                                             "mst_in3",
-                                             "mst_in4",
-                                             "mst_in5",
-                                             "mst_in6",
-                                             "mst_in7";
+                       ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
 
-                               resets = <&reset RESET_AUDIO>;
+                       hwrng: rng@18 {
+                               compatible = "amlogic,meson-rng";
+                               reg = <0x0 0x18 0x0 0x4>;
+                               clocks = <&clkc CLKID_RNG0>;
+                               clock-names = "core";
                        };
 
-                       arb: reset-controller@280 {
-                               compatible = "amlogic,meson-axg-audio-arb";
-                               reg = <0x0 0x280 0x0 0x4>;
-                               #reset-cells = <1>;
-                               clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
-                       };
+                       pinctrl_periphs: pinctrl@480 {
+                               compatible = "amlogic,meson-axg-periphs-pinctrl";
+                               #address-cells = <2>;
+                               #size-cells = <2>;
+                               ranges;
 
-                       tdmin_a: audio-controller@300 {
-                               compatible = "amlogic,axg-tdmin";
-                               reg = <0x0 0x300 0x0 0x40>;
-                               sound-name-prefix = "TDMIN_A";
-                               clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
+                               gpio: bank@480 {
+                                       reg = <0x0 0x00480 0x0 0x40>,
+                                             <0x0 0x004e8 0x0 0x14>,
+                                             <0x0 0x00520 0x0 0x14>,
+                                             <0x0 0x00430 0x0 0x3c>;
+                                       reg-names = "mux", "pull", "pull-enable", "gpio";
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                                       gpio-ranges = <&pinctrl_periphs 0 0 86>;
+                               };
 
-                       tdmin_b: audio-controller@340 {
-                               compatible = "amlogic,axg-tdmin";
-                               reg = <0x0 0x340 0x0 0x40>;
-                               sound-name-prefix = "TDMIN_B";
-                               clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-
-                       tdmin_c: audio-controller@380 {
-                               compatible = "amlogic,axg-tdmin";
-                               reg = <0x0 0x380 0x0 0x40>;
-                               sound-name-prefix = "TDMIN_C";
-                               clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-
-                       tdmin_lb: audio-controller@3c0 {
-                               compatible = "amlogic,axg-tdmin";
-                               reg = <0x0 0x3c0 0x0 0x40>;
-                               sound-name-prefix = "TDMIN_LB";
-                               clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-
-                       spdifout: audio-controller@480 {
-                               compatible = "amlogic,axg-spdifout";
-                               reg = <0x0 0x480 0x0 0x50>;
-                               #sound-dai-cells = <0>;
-                               sound-name-prefix = "SPDIFOUT";
-                               clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
-                                        <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
-                               clock-names = "pclk", "mclk";
-                               status = "disabled";
-                       };
-
-                       tdmout_a: audio-controller@500 {
-                               compatible = "amlogic,axg-tdmout";
-                               reg = <0x0 0x500 0x0 0x40>;
-                               sound-name-prefix = "TDMOUT_A";
-                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-
-                       tdmout_b: audio-controller@540 {
-                               compatible = "amlogic,axg-tdmout";
-                               reg = <0x0 0x540 0x0 0x40>;
-                               sound-name-prefix = "TDMOUT_B";
-                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-
-                       tdmout_c: audio-controller@580 {
-                               compatible = "amlogic,axg-tdmout";
-                               reg = <0x0 0x580 0x0 0x40>;
-                               sound-name-prefix = "TDMOUT_C";
-                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
-                                        <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
-                               clock-names = "pclk", "sclk", "sclk_sel",
-                                             "lrclk", "lrclk_sel";
-                               status = "disabled";
-                       };
-               };
-
-               cbus: bus@ffd00000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xffd00000 0x0 0x25000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
-
-                       gpio_intc: interrupt-controller@f080 {
-                               compatible = "amlogic,meson-gpio-intc";
-                               reg = <0x0 0xf080 0x0 0x10>;
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                               amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
-                               status = "disabled";
-                       };
-
-                       pwm_ab: pwm@1b000 {
-                               compatible = "amlogic,meson-axg-ee-pwm";
-                               reg = <0x0 0x1b000 0x0 0x20>;
-                               #pwm-cells = <3>;
-                               status = "disabled";
-                       };
-
-                       pwm_cd: pwm@1a000 {
-                               compatible = "amlogic,meson-axg-ee-pwm";
-                               reg = <0x0 0x1a000 0x0 0x20>;
-                               #pwm-cells = <3>;
-                               status = "disabled";
-                       };
-
-                       reset: reset-controller@1004 {
-                               compatible = "amlogic,meson-axg-reset";
-                               reg = <0x0 0x01004 0x0 0x9c>;
-                               #reset-cells = <1>;
-                       };
-
-                       spicc0: spi@13000 {
-                               compatible = "amlogic,meson-axg-spicc";
-                               reg = <0x0 0x13000 0x0 0x3c>;
-                               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clkc CLKID_SPICC0>;
-                               clock-names = "core";
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       spicc1: spi@15000 {
-                               compatible = "amlogic,meson-axg-spicc";
-                               reg = <0x0 0x15000 0x0 0x3c>;
-                               interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clkc CLKID_SPICC1>;
-                               clock-names = "core";
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       i2c0: i2c@1f000 {
-                               compatible = "amlogic,meson-axg-i2c";
-                               reg = <0x0 0x1f000 0x0 0x20>;
-                               interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&clkc CLKID_I2C>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       i2c1: i2c@1e000 {
-                               compatible = "amlogic,meson-axg-i2c";
-                               reg = <0x0 0x1e000 0x0 0x20>;
-                               interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&clkc CLKID_I2C>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       i2c2: i2c@1d000 {
-                               compatible = "amlogic,meson-axg-i2c";
-                               reg = <0x0 0x1d000 0x0 0x20>;
-                               interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&clkc CLKID_I2C>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       i2c3: i2c@1c000 {
-                               compatible = "amlogic,meson-axg-i2c";
-                               reg = <0x0 0x1c000 0x0 0x20>;
-                               interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&clkc CLKID_I2C>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
-                       uart_A: serial@24000 {
-                               compatible = "amlogic,meson-gx-uart";
-                               reg = <0x0 0x24000 0x0 0x18>;
-                               interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
-                               status = "disabled";
-                               clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
-                               clock-names = "xtal", "pclk", "baud";
-                       };
-
-                       uart_B: serial@23000 {
-                               compatible = "amlogic,meson-gx-uart";
-                               reg = <0x0 0x23000 0x0 0x18>;
-                               interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
-                               status = "disabled";
-                               clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
-                               clock-names = "xtal", "pclk", "baud";
-                       };
-               };
-
-               ethmac: ethernet@ff3f0000 {
-                       compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
-                       reg = <0x0 0xff3f0000 0x0 0x10000
-                               0x0 0xff634540 0x0 0x8>;
-                       interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
-                       interrupt-names = "macirq";
-                       clocks = <&clkc CLKID_ETH>,
-                                <&clkc CLKID_FCLK_DIV2>,
-                                <&clkc CLKID_MPLL2>;
-                       clock-names = "stmmaceth", "clkin0", "clkin1";
-                       status = "disabled";
-               };
-
-               gic: interrupt-controller@ffc01000 {
-                       compatible = "arm,gic-400";
-                       reg = <0x0 0xffc01000 0 0x1000>,
-                             <0x0 0xffc02000 0 0x2000>,
-                             <0x0 0xffc04000 0 0x2000>,
-                             <0x0 0xffc06000 0 0x2000>;
-                       interrupt-controller;
-                       interrupts = <GIC_PPI 9
-                               (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
-                       #interrupt-cells = <3>;
-                       #address-cells = <0>;
-               };
-
-               hiubus: bus@ff63c000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xff63c000 0x0 0x1c00>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
+                               i2c0_pins: i2c0 {
+                                       mux {
+                                               groups = "i2c0_sck",
+                                                        "i2c0_sda";
+                                               function = "i2c0";
+                                       };
+                               };
 
-                       sysctrl: system-controller@0 {
-                               compatible = "amlogic,meson-axg-hhi-sysctrl", "syscon", "simple-mfd";
-                               reg = <0 0 0 0x400>;
+                               i2c1_x_pins: i2c1_x {
+                                       mux {
+                                               groups = "i2c1_sck_x",
+                                                        "i2c1_sda_x";
+                                               function = "i2c1";
+                                       };
+                               };
 
-                               clkc: clock-controller {
-                                       compatible = "amlogic,axg-clkc";
-                                       #clock-cells = <1>;
+                               i2c1_z_pins: i2c1_z {
+                                       mux {
+                                               groups = "i2c1_sck_z",
+                                                        "i2c1_sda_z";
+                                               function = "i2c1";
+                                       };
                                };
-                       };
-               };
 
-               mailbox: mailbox@ff63dc00 {
-                       compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
-                       reg = <0 0xff63dc00 0 0x400>;
-                       interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
-                                    <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
-                                    <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
-                       #mbox-cells = <1>;
-               };
+                               i2c2_a_pins: i2c2_a {
+                                       mux {
+                                               groups = "i2c2_sck_a",
+                                                        "i2c2_sda_a";
+                                               function = "i2c2";
+                                       };
+                               };
 
-               periphs: periphs@ff634000 {
-                       compatible = "simple-bus";
-                       reg = <0x0 0xff634000 0x0 0x2000>;
-                       #address-cells = <2>;
-                       #size-cells = <2>;
-                       ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
+                               i2c2_x_pins: i2c2_x {
+                                       mux {
+                                               groups = "i2c2_sck_x",
+                                                        "i2c2_sda_x";
+                                               function = "i2c2";
+                                       };
+                               };
 
-                       hwrng: rng {
-                               compatible = "amlogic,meson-rng";
-                               reg = <0x0 0x18 0x0 0x4>;
-                               clocks = <&clkc CLKID_RNG0>;
-                               clock-names = "core";
-                       };
+                               i2c3_a6_pins: i2c3_a6 {
+                                       mux {
+                                               groups = "i2c3_sda_a6",
+                                                        "i2c3_sck_a7";
+                                               function = "i2c3";
+                                       };
+                               };
 
-                       pinctrl_periphs: pinctrl@480 {
-                               compatible = "amlogic,meson-axg-periphs-pinctrl";
-                               #address-cells = <2>;
-                               #size-cells = <2>;
-                               ranges;
+                               i2c3_a12_pins: i2c3_a12 {
+                                       mux {
+                                               groups = "i2c3_sda_a12",
+                                                        "i2c3_sck_a13";
+                                               function = "i2c3";
+                                       };
+                               };
 
-                               gpio: bank@480 {
-                                       reg = <0x0 0x00480 0x0 0x40>,
-                                               <0x0 0x004e8 0x0 0x14>,
-                                               <0x0 0x00520 0x0 0x14>,
-                                               <0x0 0x00430 0x0 0x3c>;
-                                       reg-names = "mux", "pull", "pull-enable", "gpio";
-                                       gpio-controller;
-                                       #gpio-cells = <2>;
-                                       gpio-ranges = <&pinctrl_periphs 0 0 86>;
+                               i2c3_a19_pins: i2c3_a19 {
+                                       mux {
+                                               groups = "i2c3_sda_a19",
+                                                        "i2c3_sck_a20";
+                                               function = "i2c3";
+                                       };
                                };
 
                                emmc_pins: emmc {
                                        mux {
                                                groups = "emmc_nand_d0",
-                                                       "emmc_nand_d1",
-                                                       "emmc_nand_d2",
-                                                       "emmc_nand_d3",
-                                                       "emmc_nand_d4",
-                                                       "emmc_nand_d5",
-                                                       "emmc_nand_d6",
-                                                       "emmc_nand_d7",
-                                                       "emmc_clk",
-                                                       "emmc_cmd",
-                                                       "emmc_ds";
+                                                        "emmc_nand_d1",
+                                                        "emmc_nand_d2",
+                                                        "emmc_nand_d3",
+                                                        "emmc_nand_d4",
+                                                        "emmc_nand_d5",
+                                                        "emmc_nand_d6",
+                                                        "emmc_nand_d7",
+                                                        "emmc_clk",
+                                                        "emmc_cmd",
+                                                        "emmc_ds";
                                                function = "emmc";
                                        };
                                };
@@ -569,40 +287,57 @@ cfg-pull-down {
                                        };
                                };
 
-                               sdio_pins: sdio {
+                               eth_rgmii_x_pins: eth-x-rgmii {
                                        mux {
-                                               groups = "sdio_d0",
-                                                       "sdio_d1",
-                                                       "sdio_d2",
-                                                       "sdio_d3",
-                                                       "sdio_cmd",
-                                                       "sdio_clk";
-                                               function = "sdio";
+                                               groups = "eth_mdio_x",
+                                                        "eth_mdc_x",
+                                                        "eth_rgmii_rx_clk_x",
+                                                        "eth_rx_dv_x",
+                                                        "eth_rxd0_x",
+                                                        "eth_rxd1_x",
+                                                        "eth_rxd2_rgmii",
+                                                        "eth_rxd3_rgmii",
+                                                        "eth_rgmii_tx_clk",
+                                                        "eth_txen_x",
+                                                        "eth_txd0_x",
+                                                        "eth_txd1_x",
+                                                        "eth_txd2_rgmii",
+                                                        "eth_txd3_rgmii";
+                                               function = "eth";
                                        };
                                };
 
-                               sdio_clk_gate_pins: sdio_clk_gate {
+                               eth_rgmii_y_pins: eth-y-rgmii {
                                        mux {
-                                               groups = "GPIOX_4";
-                                               function = "gpio_periphs";
-                                       };
-                                       cfg-pull-down {
-                                               pins = "GPIOX_4";
-                                               bias-pull-down;
+                                               groups = "eth_mdio_y",
+                                                        "eth_mdc_y",
+                                                        "eth_rgmii_rx_clk_y",
+                                                        "eth_rx_dv_y",
+                                                        "eth_rxd0_y",
+                                                        "eth_rxd1_y",
+                                                        "eth_rxd2_rgmii",
+                                                        "eth_rxd3_rgmii",
+                                                        "eth_rgmii_tx_clk",
+                                                        "eth_txen_y",
+                                                        "eth_txd0_y",
+                                                        "eth_txd1_y",
+                                                        "eth_txd2_rgmii",
+                                                        "eth_txd3_rgmii";
+                                               function = "eth";
                                        };
                                };
 
                                eth_rmii_x_pins: eth-x-rmii {
                                        mux {
                                                groups = "eth_mdio_x",
-                                                      "eth_mdc_x",
-                                                      "eth_rgmii_rx_clk_x",
-                                                      "eth_rx_dv_x",
-                                                      "eth_rxd0_x",
-                                                      "eth_rxd1_x",
-                                                      "eth_txen_x",
-                                                      "eth_txd0_x",
-                                                      "eth_txd1_x";
+                                                        "eth_mdc_x",
+                                                        "eth_rgmii_rx_clk_x",
+                                                        "eth_rx_dv_x",
+                                                        "eth_rxd0_x",
+                                                        "eth_rxd1_x",
+                                                        "eth_txen_x",
+                                                        "eth_txd0_x",
+                                                        "eth_txd1_x";
                                                function = "eth";
                                        };
                                };
@@ -610,55 +345,29 @@ mux {
                                eth_rmii_y_pins: eth-y-rmii {
                                        mux {
                                                groups = "eth_mdio_y",
-                                                      "eth_mdc_y",
-                                                      "eth_rgmii_rx_clk_y",
-                                                      "eth_rx_dv_y",
-                                                      "eth_rxd0_y",
-                                                      "eth_rxd1_y",
-                                                      "eth_txen_y",
-                                                      "eth_txd0_y",
-                                                      "eth_txd1_y";
+                                                        "eth_mdc_y",
+                                                        "eth_rgmii_rx_clk_y",
+                                                        "eth_rx_dv_y",
+                                                        "eth_rxd0_y",
+                                                        "eth_rxd1_y",
+                                                        "eth_txen_y",
+                                                        "eth_txd0_y",
+                                                        "eth_txd1_y";
                                                function = "eth";
                                        };
                                };
 
-                               eth_rgmii_x_pins: eth-x-rgmii {
+                               mclk_b_pins: mclk_b {
                                        mux {
-                                               groups = "eth_mdio_x",
-                                                      "eth_mdc_x",
-                                                      "eth_rgmii_rx_clk_x",
-                                                      "eth_rx_dv_x",
-                                                      "eth_rxd0_x",
-                                                      "eth_rxd1_x",
-                                                      "eth_rxd2_rgmii",
-                                                      "eth_rxd3_rgmii",
-                                                      "eth_rgmii_tx_clk",
-                                                      "eth_txen_x",
-                                                      "eth_txd0_x",
-                                                      "eth_txd1_x",
-                                                      "eth_txd2_rgmii",
-                                                      "eth_txd3_rgmii";
-                                               function = "eth";
+                                               groups = "mclk_b";
+                                               function = "mclk_b";
                                        };
                                };
 
-                               eth_rgmii_y_pins: eth-y-rgmii {
+                               mclk_c_pins: mclk_c {
                                        mux {
-                                               groups = "eth_mdio_y",
-                                                      "eth_mdc_y",
-                                                      "eth_rgmii_rx_clk_y",
-                                                      "eth_rx_dv_y",
-                                                      "eth_rxd0_y",
-                                                      "eth_rxd1_y",
-                                                      "eth_rxd2_rgmii",
-                                                      "eth_rxd3_rgmii",
-                                                      "eth_rgmii_tx_clk",
-                                                      "eth_txen_y",
-                                                      "eth_txd0_y",
-                                                      "eth_txd1_y",
-                                                      "eth_txd2_rgmii",
-                                                      "eth_txd3_rgmii";
-                                               function = "eth";
+                                               groups = "mclk_c";
+                                               function = "mclk_c";
                                        };
                                };
 
@@ -788,6 +497,29 @@ mux {
                                        };
                                };
 
+                               sdio_pins: sdio {
+                                       mux {
+                                               groups = "sdio_d0",
+                                                        "sdio_d1",
+                                                        "sdio_d2",
+                                                        "sdio_d3",
+                                                        "sdio_cmd",
+                                                        "sdio_clk";
+                                               function = "sdio";
+                                       };
+                               };
+
+                               sdio_clk_gate_pins: sdio_clk_gate {
+                                       mux {
+                                               groups = "GPIOX_4";
+                                               function = "gpio_periphs";
+                                       };
+                                       cfg-pull-down {
+                                               pins = "GPIOX_4";
+                                               bias-pull-down;
+                                       };
+                               };
+
                                spdif_in_z_pins: spdif_in_z {
                                        mux {
                                                groups = "spdif_in_z";
@@ -823,13 +555,6 @@ mux {
                                        };
                                };
 
-                               spdif_out_z_pins: spdif_out_z {
-                                       mux {
-                                               groups = "spdif_out_z";
-                                               function = "spdif_out";
-                                       };
-                               };
-
                                spdif_out_a1_pins: spdif_out_a1 {
                                        mux {
                                                groups = "spdif_out_a1";
@@ -858,11 +583,18 @@ mux {
                                        };
                                };
 
+                               spdif_out_z_pins: spdif_out_z {
+                                       mux {
+                                               groups = "spdif_out_z";
+                                               function = "spdif_out";
+                                       };
+                               };
+
                                spi0_pins: spi0 {
                                        mux {
                                                groups = "spi0_miso",
-                                                       "spi0_mosi",
-                                                       "spi0_clk";
+                                                        "spi0_mosi",
+                                                        "spi0_clk";
                                                function = "spi0";
                                        };
                                };
@@ -888,12 +620,11 @@ mux {
                                        };
                                };
 
-
                                spi1_a_pins: spi1_a {
                                        mux {
                                                groups = "spi1_miso_a",
-                                                       "spi1_mosi_a",
-                                                       "spi1_clk_a";
+                                                        "spi1_mosi_a",
+                                                        "spi1_clk_a";
                                                function = "spi1";
                                        };
                                };
@@ -915,8 +646,8 @@ mux {
                                spi1_x_pins: spi1_x {
                                        mux {
                                                groups = "spi1_miso_x",
-                                                       "spi1_mosi_x",
-                                                       "spi1_clk_x";
+                                                        "spi1_mosi_x",
+                                                        "spi1_clk_x";
                                                function = "spi1";
                                        };
                                };
@@ -928,145 +659,52 @@ mux {
                                        };
                                };
 
-                               i2c0_pins: i2c0 {
-                                       mux {
-                                               groups = "i2c0_sck",
-                                                       "i2c0_sda";
-                                               function = "i2c0";
-                                       };
-                               };
-
-                               i2c1_z_pins: i2c1_z {
-                                       mux {
-                                               groups = "i2c1_sck_z",
-                                                       "i2c1_sda_z";
-                                               function = "i2c1";
-                                       };
-                               };
-
-                               i2c1_x_pins: i2c1_x {
-                                       mux {
-                                               groups = "i2c1_sck_x",
-                                                       "i2c1_sda_x";
-                                               function = "i2c1";
-                                       };
-                               };
-
-                               i2c2_x_pins: i2c2_x {
-                                       mux {
-                                               groups = "i2c2_sck_x",
-                                                       "i2c2_sda_x";
-                                               function = "i2c2";
-                                       };
-                               };
-
-                               i2c2_a_pins: i2c2_a {
-                                       mux {
-                                               groups = "i2c2_sck_a",
-                                                       "i2c2_sda_a";
-                                               function = "i2c2";
-                                       };
-                               };
-
-                               i2c3_a6_pins: i2c3_a6 {
-                                       mux {
-                                               groups = "i2c3_sda_a6",
-                                                       "i2c3_sck_a7";
-                                               function = "i2c3";
-                                       };
-                               };
-
-                               i2c3_a12_pins: i2c3_a12 {
-                                       mux {
-                                               groups = "i2c3_sda_a12",
-                                                       "i2c3_sck_a13";
-                                               function = "i2c3";
-                                       };
-                               };
-
-                               i2c3_a19_pins: i2c3_a19 {
-                                       mux {
-                                               groups = "i2c3_sda_a19",
-                                                       "i2c3_sck_a20";
-                                               function = "i2c3";
-                                       };
-                               };
-
-                               uart_a_pins: uart_a {
-                                       mux {
-                                               groups = "uart_tx_a",
-                                                       "uart_rx_a";
-                                               function = "uart_a";
-                                       };
-                               };
-
-                               uart_a_cts_rts_pins: uart_a_cts_rts {
-                                       mux {
-                                               groups = "uart_cts_a",
-                                                       "uart_rts_a";
-                                               function = "uart_a";
-                                       };
-                               };
-
-                               uart_b_x_pins: uart_b_x {
-                                       mux {
-                                               groups = "uart_tx_b_x",
-                                                       "uart_rx_b_x";
-                                               function = "uart_b";
-                                       };
-                               };
-
-                               uart_b_x_cts_rts_pins: uart_b_x_cts_rts {
+                               tdma_din0_pins: tdma_din0 {
                                        mux {
-                                               groups = "uart_cts_b_x",
-                                                       "uart_rts_b_x";
-                                               function = "uart_b";
+                                               groups = "tdma_din0";
+                                               function = "tdma";
                                        };
                                };
 
-                               uart_b_z_pins: uart_b_z {
+                               tdma_dout0_x14_pins: tdma_dout0_x14 {
                                        mux {
-                                               groups = "uart_tx_b_z",
-                                                       "uart_rx_b_z";
-                                               function = "uart_b";
+                                               groups = "tdma_dout0_x14";
+                                               function = "tdma";
                                        };
                                };
 
-                               uart_b_z_cts_rts_pins: uart_b_z_cts_rts {
+                               tdma_dout0_x15_pins: tdma_dout0_x15 {
                                        mux {
-                                               groups = "uart_cts_b_z",
-                                                       "uart_rts_b_z";
-                                               function = "uart_b";
+                                               groups = "tdma_dout0_x15";
+                                               function = "tdma";
                                        };
                                };
 
-                               uart_ao_b_z_pins: uart_ao_b_z {
+                               tdma_dout1_pins: tdma_dout1 {
                                        mux {
-                                               groups = "uart_ao_tx_b_z",
-                                                       "uart_ao_rx_b_z";
-                                               function = "uart_ao_b_z";
+                                               groups = "tdma_dout1";
+                                               function = "tdma";
                                        };
                                };
 
-                               uart_ao_b_z_cts_rts_pins: uart_ao_b_z_cts_rts {
+                               tdma_din1_pins: tdma_din1 {
                                        mux {
-                                               groups = "uart_ao_cts_b_z",
-                                                       "uart_ao_rts_b_z";
-                                               function = "uart_ao_b_z";
+                                               groups = "tdma_din1";
+                                               function = "tdma";
                                        };
                                };
 
-                               mclk_b_pins: mclk_b {
+                               tdma_fs_pins: tdma_fs {
                                        mux {
-                                               groups = "mclk_b";
-                                               function = "mclk_b";
+                                               groups = "tdma_fs";
+                                               function = "tdma";
                                        };
                                };
 
-                               mclk_c_pins: mclk_c {
+                               tdma_fs_slv_pins: tdma_fs_slv {
                                        mux {
-                                               groups = "mclk_c";
-                                               function = "mclk_c";
+                                               groups = "tdma_fs_slv";
+                                               function = "tdma";
                                        };
                                };
 
@@ -1084,65 +722,58 @@ mux {
                                        };
                                };
 
-                               tdma_fs_pins: tdma_fs {
-                                       mux {
-                                               groups = "tdma_fs";
-                                               function = "tdma";
-                                       };
-                               };
-
-                               tdma_fs_slv_pins: tdma_fs_slv {
+                               tdmb_din0_pins: tdmb_din0 {
                                        mux {
-                                               groups = "tdma_fs_slv";
-                                               function = "tdma";
+                                               groups = "tdmb_din0";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdma_din0_pins: tdma_din0 {
+                               tdmb_din1_pins: tdmb_din1 {
                                        mux {
-                                               groups = "tdma_din0";
-                                               function = "tdma";
+                                               groups = "tdmb_din1";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdma_dout0_x14_pins: tdma_dout0_x14 {
+                               tdmb_din2_pins: tdmb_din2 {
                                        mux {
-                                               groups = "tdma_dout0_x14";
-                                               function = "tdma";
+                                               groups = "tdmb_din2";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdma_dout0_x15_pins: tdma_dout0_x15 {
+                               tdmb_din3_pins: tdmb_din3 {
                                        mux {
-                                               groups = "tdma_dout0_x15";
-                                               function = "tdma";
+                                               groups = "tdmb_din3";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdma_dout1_pins: tdma_dout1 {
+                               tdmb_dout0_pins: tdmb_dout0 {
                                        mux {
-                                               groups = "tdma_dout1";
-                                               function = "tdma";
+                                               groups = "tdmb_dout0";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdma_din1_pins: tdma_din1 {
+                               tdmb_dout1_pins: tdmb_dout1 {
                                        mux {
-                                               groups = "tdma_din1";
-                                               function = "tdma";
+                                               groups = "tdmb_dout1";
+                                               function = "tdmb";
                                        };
                                };
 
-                               tdmb_sclk_pins: tdmb_sclk {
+                               tdmb_dout2_pins: tdmb_dout2 {
                                        mux {
-                                               groups = "tdmb_sclk";
+                                               groups = "tdmb_dout2";
                                                function = "tdmb";
                                        };
                                };
 
-                               tdmb_sclk_slv_pins: tdmb_sclk_slv {
+                               tdmb_dout3_pins: tdmb_dout3 {
                                        mux {
-                                               groups = "tdmb_sclk_slv";
+                                               groups = "tdmb_dout3";
                                                function = "tdmb";
                                        };
                                };
@@ -1161,163 +792,412 @@ mux {
                                        };
                                };
 
-                               tdmb_din0_pins: tdmb_din0 {
+                               tdmb_sclk_pins: tdmb_sclk {
                                        mux {
-                                               groups = "tdmb_din0";
+                                               groups = "tdmb_sclk";
                                                function = "tdmb";
                                        };
                                };
 
-                               tdmb_dout0_pins: tdmb_dout0 {
+                               tdmb_sclk_slv_pins: tdmb_sclk_slv {
                                        mux {
-                                               groups = "tdmb_dout0";
+                                               groups = "tdmb_sclk_slv";
                                                function = "tdmb";
                                        };
                                };
 
-                               tdmb_din1_pins: tdmb_din1 {
+                               tdmc_fs_pins: tdmc_fs {
                                        mux {
-                                               groups = "tdmb_din1";
-                                               function = "tdmb";
+                                               groups = "tdmc_fs";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmb_dout1_pins: tdmb_dout1 {
+                               tdmc_fs_slv_pins: tdmc_fs_slv {
                                        mux {
-                                               groups = "tdmb_dout1";
-                                               function = "tdmb";
+                                               groups = "tdmc_fs_slv";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmb_din2_pins: tdmb_din2 {
+                               tdmc_sclk_pins: tdmc_sclk {
                                        mux {
-                                               groups = "tdmb_din2";
-                                               function = "tdmb";
+                                               groups = "tdmc_sclk";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmb_dout2_pins: tdmb_dout2 {
+                               tdmc_sclk_slv_pins: tdmc_sclk_slv {
                                        mux {
-                                               groups = "tdmb_dout2";
-                                               function = "tdmb";
+                                               groups = "tdmc_sclk_slv";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmb_din3_pins: tdmb_din3 {
+                               tdmc_din0_pins: tdmc_din0 {
                                        mux {
-                                               groups = "tdmb_din3";
-                                               function = "tdmb";
+                                               groups = "tdmc_din0";
+                                               function = "tdmc";
+                                       };
+                               };
+
+                               tdmc_din1_pins: tdmc_din1 {
+                                       mux {
+                                               groups = "tdmc_din1";
+                                               function = "tdmc";
+                                       };
+                               };
+
+                               tdmc_din2_pins: tdmc_din2 {
+                                       mux {
+                                               groups = "tdmc_din2";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmb_dout3_pins: tdmb_dout3 {
+                               tdmc_din3_pins: tdmc_din3 {
                                        mux {
-                                               groups = "tdmb_dout3";
-                                               function = "tdmb";
+                                               groups = "tdmc_din3";
+                                               function = "tdmc";
                                        };
                                };
 
-                               tdmc_sclk_pins: tdmc_sclk {
+                               tdmc_dout0_pins: tdmc_dout0 {
                                        mux {
-                                               groups = "tdmc_sclk";
+                                               groups = "tdmc_dout0";
                                                function = "tdmc";
                                        };
                                };
 
-                               tdmc_sclk_slv_pins: tdmc_sclk_slv {
+                               tdmc_dout1_pins: tdmc_dout1 {
                                        mux {
-                                               groups = "tdmc_sclk_slv";
+                                               groups = "tdmc_dout1";
                                                function = "tdmc";
                                        };
                                };
 
-                               tdmc_fs_pins: tdmc_fs {
+                               tdmc_dout2_pins: tdmc_dout2 {
                                        mux {
-                                               groups = "tdmc_fs";
+                                               groups = "tdmc_dout2";
                                                function = "tdmc";
                                        };
                                };
 
-                               tdmc_fs_slv_pins: tdmc_fs_slv {
+                               tdmc_dout3_pins: tdmc_dout3 {
                                        mux {
-                                               groups = "tdmc_fs_slv";
+                                               groups = "tdmc_dout3";
                                                function = "tdmc";
                                        };
                                };
 
-                               tdmc_din0_pins: tdmc_din0 {
+                               uart_a_pins: uart_a {
                                        mux {
-                                               groups = "tdmc_din0";
-                                               function = "tdmc";
+                                               groups = "uart_tx_a",
+                                                        "uart_rx_a";
+                                               function = "uart_a";
                                        };
                                };
 
-                               tdmc_dout0_pins: tdmc_dout0 {
+                               uart_a_cts_rts_pins: uart_a_cts_rts {
                                        mux {
-                                               groups = "tdmc_dout0";
-                                               function = "tdmc";
+                                               groups = "uart_cts_a",
+                                                        "uart_rts_a";
+                                               function = "uart_a";
                                        };
                                };
 
-                               tdmc_din1_pins: tdmc_din1 {
+                               uart_b_x_pins: uart_b_x {
                                        mux {
-                                               groups = "tdmc_din1";
-                                               function = "tdmc";
+                                               groups = "uart_tx_b_x",
+                                                        "uart_rx_b_x";
+                                               function = "uart_b";
                                        };
                                };
 
-                               tdmc_dout1_pins: tdmc_dout1 {
+                               uart_b_x_cts_rts_pins: uart_b_x_cts_rts {
                                        mux {
-                                               groups = "tdmc_dout1";
-                                               function = "tdmc";
+                                               groups = "uart_cts_b_x",
+                                                        "uart_rts_b_x";
+                                               function = "uart_b";
                                        };
                                };
 
-                               tdmc_din2_pins: tdmc_din2 {
+                               uart_b_z_pins: uart_b_z {
                                        mux {
-                                               groups = "tdmc_din2";
-                                               function = "tdmc";
+                                               groups = "uart_tx_b_z",
+                                                        "uart_rx_b_z";
+                                               function = "uart_b";
                                        };
                                };
 
-                               tdmc_dout2_pins: tdmc_dout2 {
+                               uart_b_z_cts_rts_pins: uart_b_z_cts_rts {
                                        mux {
-                                               groups = "tdmc_dout2";
-                                               function = "tdmc";
+                                               groups = "uart_cts_b_z",
+                                                        "uart_rts_b_z";
+                                               function = "uart_b";
                                        };
                                };
 
-                               tdmc_din3_pins: tdmc_din3 {
+                               uart_ao_b_z_pins: uart_ao_b_z {
                                        mux {
-                                               groups = "tdmc_din3";
-                                               function = "tdmc";
+                                               groups = "uart_ao_tx_b_z",
+                                                        "uart_ao_rx_b_z";
+                                               function = "uart_ao_b_z";
                                        };
                                };
 
-                               tdmc_dout3_pins: tdmc_dout3 {
+                               uart_ao_b_z_cts_rts_pins: uart_ao_b_z_cts_rts {
                                        mux {
-                                               groups = "tdmc_dout3";
-                                               function = "tdmc";
+                                               groups = "uart_ao_cts_b_z",
+                                                        "uart_ao_rts_b_z";
+                                               function = "uart_ao_b_z";
                                        };
                                };
                        };
                };
 
-               sram: sram@fffc0000 {
-                       compatible = "amlogic,meson-axg-sram", "mmio-sram";
-                       reg = <0x0 0xfffc0000 0x0 0x20000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges = <0 0x0 0xfffc0000 0x20000>;
+               hiubus: bus@ff63c000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xff63c000 0x0 0x1c00>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
 
-                       cpu_scp_lpri: scp-shmem@0 {
-                               compatible = "amlogic,meson-axg-scp-shmem";
-                               reg = <0x13000 0x400>;
+                       sysctrl: system-controller@0 {
+                               compatible = "amlogic,meson-axg-hhi-sysctrl",
+                                            "simple-mfd", "syscon";
+                               reg = <0 0 0 0x400>;
+
+                               clkc: clock-controller {
+                                       compatible = "amlogic,axg-clkc";
+                                       #clock-cells = <1>;
+                               };
+                       };
+               };
+
+               mailbox: mailbox@ff63dc00 {
+                       compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
+                       reg = <0 0xff63dc00 0 0x400>;
+                       interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
+                       #mbox-cells = <1>;
+               };
+
+               audio: bus@ff642000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xff642000 0x0 0x2000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xff642000 0x0 0x2000>;
+
+                       clkc_audio: clock-controller@0 {
+                               compatible = "amlogic,axg-audio-clkc";
+                               reg = <0x0 0x0 0x0 0xb4>;
+                               #clock-cells = <1>;
+
+                               clocks = <&clkc CLKID_AUDIO>,
+                                        <&clkc CLKID_MPLL0>,
+                                        <&clkc CLKID_MPLL1>,
+                                        <&clkc CLKID_MPLL2>,
+                                        <&clkc CLKID_MPLL3>,
+                                        <&clkc CLKID_HIFI_PLL>,
+                                        <&clkc CLKID_FCLK_DIV3>,
+                                        <&clkc CLKID_FCLK_DIV4>,
+                                        <&clkc CLKID_GP0_PLL>;
+                               clock-names = "pclk",
+                                             "mst_in0",
+                                             "mst_in1",
+                                             "mst_in2",
+                                             "mst_in3",
+                                             "mst_in4",
+                                             "mst_in5",
+                                             "mst_in6",
+                                             "mst_in7";
+
+                               resets = <&reset RESET_AUDIO>;
+                       };
+
+                       toddr_a: audio-controller@100 {
+                               compatible = "amlogic,axg-toddr";
+                               reg = <0x0 0x100 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "TODDR_A";
+                               interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
+                               resets = <&arb AXG_ARB_TODDR_A>;
+                               status = "disabled";
+                       };
+
+                       toddr_b: audio-controller@140 {
+                               compatible = "amlogic,axg-toddr";
+                               reg = <0x0 0x140 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "TODDR_B";
+                               interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
+                               resets = <&arb AXG_ARB_TODDR_B>;
+                               status = "disabled";
+                       };
+
+                       toddr_c: audio-controller@180 {
+                               compatible = "amlogic,axg-toddr";
+                               reg = <0x0 0x180 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "TODDR_C";
+                               interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
+                               resets = <&arb AXG_ARB_TODDR_C>;
+                               status = "disabled";
+                       };
+
+                       frddr_a: audio-controller@1c0 {
+                               compatible = "amlogic,axg-frddr";
+                               reg = <0x0 0x1c0 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "FRDDR_A";
+                               interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
+                               resets = <&arb AXG_ARB_FRDDR_A>;
+                               status = "disabled";
+                       };
+
+                       frddr_b: audio-controller@200 {
+                               compatible = "amlogic,axg-frddr";
+                               reg = <0x0 0x200 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "FRDDR_B";
+                               interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
+                               resets = <&arb AXG_ARB_FRDDR_B>;
+                               status = "disabled";
+                       };
+
+                       frddr_c: audio-controller@240 {
+                               compatible = "amlogic,axg-frddr";
+                               reg = <0x0 0x240 0x0 0x1c>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "FRDDR_C";
+                               interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
+                               resets = <&arb AXG_ARB_FRDDR_C>;
+                               status = "disabled";
+                       };
+
+                       arb: reset-controller@280 {
+                               compatible = "amlogic,meson-axg-audio-arb";
+                               reg = <0x0 0x280 0x0 0x4>;
+                               #reset-cells = <1>;
+                               clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
+                       };
+
+                       tdmin_a: audio-controller@300 {
+                               compatible = "amlogic,axg-tdmin";
+                               reg = <0x0 0x300 0x0 0x40>;
+                               sound-name-prefix = "TDMIN_A";
+                               clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
+                       };
+
+                       tdmin_b: audio-controller@340 {
+                               compatible = "amlogic,axg-tdmin";
+                               reg = <0x0 0x340 0x0 0x40>;
+                               sound-name-prefix = "TDMIN_B";
+                               clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
+                       };
+
+                       tdmin_c: audio-controller@380 {
+                               compatible = "amlogic,axg-tdmin";
+                               reg = <0x0 0x380 0x0 0x40>;
+                               sound-name-prefix = "TDMIN_C";
+                               clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
+                       };
+
+                       tdmin_lb: audio-controller@3c0 {
+                               compatible = "amlogic,axg-tdmin";
+                               reg = <0x0 0x3c0 0x0 0x40>;
+                               sound-name-prefix = "TDMIN_LB";
+                               clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
+                       };
+
+                       spdifout: audio-controller@480 {
+                               compatible = "amlogic,axg-spdifout";
+                               reg = <0x0 0x480 0x0 0x50>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "SPDIFOUT";
+                               clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
+                                        <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
+                               clock-names = "pclk", "mclk";
+                               status = "disabled";
+                       };
+
+                       tdmout_a: audio-controller@500 {
+                               compatible = "amlogic,axg-tdmout";
+                               reg = <0x0 0x500 0x0 0x40>;
+                               sound-name-prefix = "TDMOUT_A";
+                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
+                       };
+
+                       tdmout_b: audio-controller@540 {
+                               compatible = "amlogic,axg-tdmout";
+                               reg = <0x0 0x540 0x0 0x40>;
+                               sound-name-prefix = "TDMOUT_B";
+                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
                        };
 
-                       cpu_scp_hpri: scp-shmem@200 {
-                               compatible = "amlogic,meson-axg-scp-shmem";
-                               reg = <0x13400 0x400>;
+                       tdmout_c: audio-controller@580 {
+                               compatible = "amlogic,axg-tdmout";
+                               reg = <0x0 0x580 0x0 0x40>;
+                               sound-name-prefix = "TDMOUT_C";
+                               clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
+                                        <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
+                               clock-names = "pclk", "sclk", "sclk_sel",
+                                             "lrclk", "lrclk_sel";
+                               status = "disabled";
                        };
                };
 
@@ -1329,7 +1209,7 @@ aobus: bus@ff800000 {
                        ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
 
                        sysctrl_AO: sys-ctrl@0 {
-                               compatible = "amlogic,meson-axg-ao-sysctrl", "syscon", "simple-mfd";
+                               compatible = "amlogic,meson-axg-ao-sysctrl", "simple-mfd", "syscon";
                                reg =  <0x0 0x0 0x0 0x100>;
 
                                clkc_AO: clock-controller {
@@ -1347,8 +1227,8 @@ pinctrl_aobus: pinctrl@14 {
 
                                gpio_ao: bank@14 {
                                        reg = <0x0 0x00014 0x0 0x8>,
-                                               <0x0 0x0002c 0x0 0x4>,
-                                               <0x0 0x00024 0x0 0x8>;
+                                             <0x0 0x0002c 0x0 0x4>,
+                                             <0x0 0x00024 0x0 0x8>;
                                        reg-names = "mux", "pull", "gpio";
                                        gpio-controller;
                                        #gpio-cells = <2>;
@@ -1407,7 +1287,7 @@ mux {
                                uart_ao_a_pins: uart_ao_a {
                                        mux {
                                                groups = "uart_ao_tx_a",
-                                                       "uart_ao_rx_a";
+                                                        "uart_ao_rx_a";
                                                function = "uart_ao_a";
                                        };
                                };
@@ -1415,7 +1295,7 @@ mux {
                                uart_ao_a_cts_rts_pins: uart_ao_a_cts_rts {
                                        mux {
                                                groups = "uart_ao_cts_a",
-                                                       "uart_ao_rts_a";
+                                                        "uart_ao_rts_a";
                                                function = "uart_ao_a";
                                        };
                                };
@@ -1423,7 +1303,7 @@ mux {
                                uart_ao_b_pins: uart_ao_b {
                                        mux {
                                                groups = "uart_ao_tx_b",
-                                                       "uart_ao_rx_b";
+                                                        "uart_ao_rx_b";
                                                function = "uart_ao_b";
                                        };
                                };
@@ -1431,7 +1311,7 @@ mux {
                                uart_ao_b_cts_rts_pins: uart_ao_b_cts_rts {
                                        mux {
                                                groups = "uart_ao_cts_b",
-                                                       "uart_ao_rts_b";
+                                                        "uart_ao_rts_b";
                                                function = "uart_ao_b";
                                        };
                                };
@@ -1443,13 +1323,6 @@ sec_AO: ao-secure@140 {
                                amlogic,has-chip-id;
                        };
 
-                       pwm_AO_ab: pwm@7000 {
-                               compatible = "amlogic,meson-axg-ao-pwm";
-                               reg = <0x0 0x07000 0x0 0x20>;
-                               #pwm-cells = <3>;
-                               status = "disabled";
-                       };
-
                        pwm_AO_cd: pwm@2000 {
                                compatible = "amlogic,meson-axg-ao-pwm";
                                reg = <0x0 0x02000  0x0 0x20>;
@@ -1457,16 +1330,6 @@ pwm_AO_cd: pwm@2000 {
                                status = "disabled";
                        };
 
-                       i2c_AO: i2c@5000 {
-                               compatible = "amlogic,meson-axg-i2c";
-                               reg = <0x0 0x05000 0x0 0x20>;
-                               interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
-                               clocks = <&clkc CLKID_AO_I2C>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               status = "disabled";
-                       };
-
                        uart_AO: serial@3000 {
                                compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
                                reg = <0x0 0x3000 0x0 0x18>;
@@ -1485,6 +1348,23 @@ uart_AO_B: serial@4000 {
                                status = "disabled";
                        };
 
+                       i2c_AO: i2c@5000 {
+                               compatible = "amlogic,meson-axg-i2c";
+                               reg = <0x0 0x05000 0x0 0x20>;
+                               interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_AO_I2C>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       pwm_AO_ab: pwm@7000 {
+                               compatible = "amlogic,meson-axg-ao-pwm";
+                               reg = <0x0 0x07000 0x0 0x20>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
                        ir: ir@8000 {
                                compatible = "amlogic,meson-gxbb-ir";
                                reg = <0x0 0x8000 0x0 0x20>;
@@ -1499,12 +1379,211 @@ saradc: adc@9000 {
                                #io-channel-cells = <1>;
                                interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&xtal>,
-                                       <&clkc_AO CLKID_AO_SAR_ADC>,
-                                       <&clkc_AO CLKID_AO_SAR_ADC_CLK>,
-                                       <&clkc_AO CLKID_AO_SAR_ADC_SEL>;
+                                        <&clkc_AO CLKID_AO_SAR_ADC>,
+                                        <&clkc_AO CLKID_AO_SAR_ADC_CLK>,
+                                        <&clkc_AO CLKID_AO_SAR_ADC_SEL>;
                                clock-names = "clkin", "core", "adc_clk", "adc_sel";
                                status = "disabled";
                        };
                };
+
+               gic: interrupt-controller@ffc01000 {
+                       compatible = "arm,gic-400";
+                       reg = <0x0 0xffc01000 0 0x1000>,
+                             <0x0 0xffc02000 0 0x2000>,
+                             <0x0 0xffc04000 0 0x2000>,
+                             <0x0 0xffc06000 0 0x2000>;
+                       interrupt-controller;
+                       interrupts = <GIC_PPI 9
+                               (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+               };
+
+               cbus: bus@ffd00000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xffd00000 0x0 0x25000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
+
+                       reset: reset-controller@1004 {
+                               compatible = "amlogic,meson-axg-reset";
+                               reg = <0x0 0x01004 0x0 0x9c>;
+                               #reset-cells = <1>;
+                       };
+
+                       gpio_intc: interrupt-controller@f080 {
+                               compatible = "amlogic,meson-gpio-intc";
+                               reg = <0x0 0xf080 0x0 0x10>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
+                               status = "disabled";
+                       };
+
+                       pwm_ab: pwm@1b000 {
+                               compatible = "amlogic,meson-axg-ee-pwm";
+                               reg = <0x0 0x1b000 0x0 0x20>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
+                       pwm_cd: pwm@1a000 {
+                               compatible = "amlogic,meson-axg-ee-pwm";
+                               reg = <0x0 0x1a000 0x0 0x20>;
+                               #pwm-cells = <3>;
+                               status = "disabled";
+                       };
+
+                       spicc0: spi@13000 {
+                               compatible = "amlogic,meson-axg-spicc";
+                               reg = <0x0 0x13000 0x0 0x3c>;
+                               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clkc CLKID_SPICC0>;
+                               clock-names = "core";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       spicc1: spi@15000 {
+                               compatible = "amlogic,meson-axg-spicc";
+                               reg = <0x0 0x15000 0x0 0x3c>;
+                               interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clkc CLKID_SPICC1>;
+                               clock-names = "core";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       i2c3: i2c@1c000 {
+                               compatible = "amlogic,meson-axg-i2c";
+                               reg = <0x0 0x1c000 0x0 0x20>;
+                               interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_I2C>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@1d000 {
+                               compatible = "amlogic,meson-axg-i2c";
+                               reg = <0x0 0x1d000 0x0 0x20>;
+                               interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_I2C>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@1e000 {
+                               compatible = "amlogic,meson-axg-i2c";
+                               reg = <0x0 0x1e000 0x0 0x20>;
+                               interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_I2C>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       i2c0: i2c@1f000 {
+                               compatible = "amlogic,meson-axg-i2c";
+                               reg = <0x0 0x1f000 0x0 0x20>;
+                               interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_I2C>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "disabled";
+                       };
+
+                       uart_B: serial@23000 {
+                               compatible = "amlogic,meson-gx-uart";
+                               reg = <0x0 0x23000 0x0 0x18>;
+                               interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                               clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
+                               clock-names = "xtal", "pclk", "baud";
+                       };
+
+                       uart_A: serial@24000 {
+                               compatible = "amlogic,meson-gx-uart";
+                               reg = <0x0 0x24000 0x0 0x18>;
+                               interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                               clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
+                               clock-names = "xtal", "pclk", "baud";
+                       };
+               };
+
+               apb: bus@ffe00000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xffe00000 0x0 0x200000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
+
+                       sd_emmc_b: sd@5000 {
+                               compatible = "amlogic,meson-axg-mmc";
+                               reg = <0x0 0x5000 0x0 0x800>;
+                               interrupts = <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                               clocks = <&clkc CLKID_SD_EMMC_B>,
+                                       <&clkc CLKID_SD_EMMC_B_CLK0>,
+                                       <&clkc CLKID_FCLK_DIV2>;
+                               clock-names = "core", "clkin0", "clkin1";
+                               resets = <&reset RESET_SD_EMMC_B>;
+                       };
+
+                       sd_emmc_c: mmc@7000 {
+                               compatible = "amlogic,meson-axg-mmc";
+                               reg = <0x0 0x7000 0x0 0x800>;
+                               interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
+                               clocks = <&clkc CLKID_SD_EMMC_C>,
+                                       <&clkc CLKID_SD_EMMC_C_CLK0>,
+                                       <&clkc CLKID_FCLK_DIV2>;
+                               clock-names = "core", "clkin0", "clkin1";
+                               resets = <&reset RESET_SD_EMMC_C>;
+                       };
+               };
+
+               sram: sram@fffc0000 {
+                       compatible = "amlogic,meson-axg-sram", "mmio-sram";
+                       reg = <0x0 0xfffc0000 0x0 0x20000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0x0 0xfffc0000 0x20000>;
+
+                       cpu_scp_lpri: scp-shmem@0 {
+                               compatible = "amlogic,meson-axg-scp-shmem";
+                               reg = <0x13000 0x400>;
+                       };
+
+                       cpu_scp_hpri: scp-shmem@200 {
+                               compatible = "amlogic,meson-axg-scp-shmem";
+                               reg = <0x13400 0x400>;
+                       };
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       xtal: xtal-clk {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xtal";
+               #clock-cells = <0>;
        };
 };
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 (file)
index 0000000..c44dbdd
--- /dev/null
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "meson-g12a.dtsi"
+
+/ {
+       compatible = "amlogic,u200", "amlogic,g12a";
+       model = "Amlogic Meson G12A U200 Development Board";
+
+       aliases {
+               serial0 = &uart_AO;
+       };
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x0 0x0 0x40000000>;
+       };
+};
+
+&uart_AO {
+       status = "okay";
+};
+
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12a.dtsi
new file mode 100644 (file)
index 0000000..3b82a97
--- /dev/null
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       compatible = "amlogic,g12a";
+
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       cpus {
+               #address-cells = <0x2>;
+               #size-cells = <0x0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x2>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x0 0x3>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+               };
+
+               l2: l2-cache0 {
+                       compatible = "cache";
+               };
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       reserved-memory {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               /* 3 MiB reserved for ARM Trusted Firmware (BL31) */
+               secmon_reserved: secmon@5000000 {
+                       reg = <0x0 0x05000000 0x0 0x300000>;
+                       no-map;
+               };
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               periphs: periphs@ff634000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xff634000 0x0 0x2000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xff634000 0x0 0x2000>;
+               };
+
+               hiubus: bus@ff63c000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xff63c000 0x0 0x1c00>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xff63c000 0x0 0x1c00>;
+               };
+
+               aobus: bus@ff800000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xff800000 0x0 0x100000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xff800000 0x0 0x100000>;
+
+                       uart_AO: serial@3000 {
+                               compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
+                               reg = <0x0 0x3000 0x0 0x18>;
+                               interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>, <&xtal>, <&xtal>;
+                               clock-names = "xtal", "pclk", "baud";
+                               status = "disabled";
+                       };
+
+                       uart_AO_B: serial@4000 {
+                               compatible = "amlogic,meson-gx-uart", "amlogic,meson-ao-uart";
+                               reg = <0x0 0x4000 0x0 0x18>;
+                               interrupts = <GIC_SPI 197 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&xtal>, <&xtal>, <&xtal>;
+                               clock-names = "xtal", "pclk", "baud";
+                               status = "disabled";
+                       };
+               };
+
+               gic: interrupt-controller@ffc01000 {
+                       compatible = "arm,gic-400";
+                       reg = <0x0 0xffc01000 0 0x1000>,
+                             <0x0 0xffc02000 0 0x2000>,
+                             <0x0 0xffc04000 0 0x2000>,
+                             <0x0 0xffc06000 0 0x2000>;
+                       interrupt-controller;
+                       interrupts = <GIC_PPI 9
+                               (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+               };
+
+               cbus: bus@ffd00000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xffd00000 0x0 0x25000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xffd00000 0x0 0x25000>;
+               };
+
+               apb: apb@ffe00000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xffe00000 0x0 0x200000>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xffe00000 0x0 0x200000>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10
+                       (GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       xtal: xtal-clk {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xtal";
+               #clock-cells = <0>;
+       };
+
+};
index b8dc4dbb391b669fc13eb13b1a24f01d24ab252f..f1e5cdbade5edf281ecc9ea183c5e5b763c0f726 100644 (file)
@@ -44,7 +44,7 @@ secmon_reserved_alt: secmon@5000000 {
                linux,cma {
                        compatible = "shared-dma-pool";
                        reusable;
-                       size = <0x0 0xbc00000>;
+                       size = <0x0 0x10000000>;
                        alignment = <0x0 0x400000>;
                        linux,cma-default;
                };
@@ -344,7 +344,7 @@ aobus: bus@c8100000 {
                        ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
 
                        sysctrl_AO: sys-ctrl@0 {
-                               compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
+                               compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
                                reg =  <0x0 0x0 0x0 0x100>;
 
                                pwrc_vpu: power-controller-vpu {
@@ -423,6 +423,19 @@ hwrng: rng {
                        };
                };
 
+               dmcbus: bus@c8838000 {
+                       compatible = "simple-bus";
+                       reg = <0x0 0xc8838000 0x0 0x400>;
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x0 0x0 0x0 0xc8838000 0x0 0x400>;
+
+                       canvas: video-lut@48 {
+                               compatible = "amlogic,canvas";
+                               reg = <0x0 0x48 0x0 0x14>;
+                       };
+               };
+
                hiubus: bus@c883c000 {
                        compatible = "simple-bus";
                        reg = <0x0 0xc883c000 0x0 0x2000>;
@@ -431,7 +444,7 @@ hiubus: bus@c883c000 {
                        ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
 
                        sysctrl: system-controller@0 {
-                               compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
+                               compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
                                reg = <0 0 0 0x400>;
                        };
 
index 98cbba6809caa17e2fa4f6b630bf8b02e26f32ab..1ade7e486828c2db082a121e856456e5562d3445 100644 (file)
@@ -390,7 +390,7 @@ mux {
                        };
                };
 
-               spi_pins: spi {
+               spi_pins: spi-pins {
                        mux {
                                groups = "spi_miso",
                                        "spi_mosi",
index f63bceb88caafa249d84de963c3daa034fb842b7..90a56af967a7f11f24e7351da99e168abd0f1085 100644 (file)
@@ -13,7 +13,7 @@
 
 / {
        compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
-       model = "Libre Technology CC";
+       model = "Libre Computer Board AML-S905X-CC";
 
        aliases {
                serial0 = &uart_AO;
index c87a80e9bcc6a80bc0f8a59c43a32d6485facafe..8f0bb3c44bd6d05a11e6dea2ed390f0c88bdc9cc 100644 (file)
@@ -337,7 +337,7 @@ mux {
                        };
                };
 
-               spi_pins: spi {
+               spi_pins: spi-pins {
                        mux {
                                groups = "spi_miso",
                                        "spi_mosi",
index ce56a4acda4fa07bb7eedebfeeb55f05f29c0c8d..ed774ee8f65948d40d925379dc1a900200e1412d 100644 (file)
@@ -115,22 +115,17 @@ etf@20010000 { /* etf0 */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
 
-                       /* input port */
-                       port@0 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                etf0_in_port: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&main_funnel_out_port>;
                                };
                        };
+               };
 
-                       /* output port */
-                       port@1 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                etf0_out_port: endpoint {
                                };
                        };
@@ -144,10 +139,11 @@ tpiu@20030000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       tpiu_in_port: endpoint {
-                               slave-mode;
-                               remote-endpoint = <&replicator_out_port0>;
+               in-ports {
+                       port {
+                               tpiu_in_port: endpoint {
+                                       remote-endpoint = <&replicator_out_port0>;
+                               };
                        };
                };
        };
@@ -160,31 +156,29 @@ main_funnel: funnel@20040000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
 
-                       /* output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                main_funnel_out_port: endpoint {
                                        remote-endpoint = <&etf0_in_port>;
                                };
                        };
+               };
 
-                       /* input ports */
-                       port@1 {
+               main_funnel_in_ports: in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                main_funnel_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster0_funnel_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                main_funnel_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster1_funnel_out_port>;
                                };
                        };
@@ -199,10 +193,12 @@ etr@20070000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       etr_in_port: endpoint {
-                               slave-mode;
-                               remote-endpoint = <&replicator_out_port1>;
+               arm,scatter-gather;
+               in-ports {
+                       port {
+                               etr_in_port: endpoint {
+                                       remote-endpoint = <&replicator_out_port1>;
+                               };
                        };
                };
        };
@@ -216,8 +212,10 @@ stm@20100000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       stm_out_port: endpoint {
+               out-ports {
+                       port {
+                               stm_out_port: endpoint {
+                               };
                        };
                };
        };
@@ -238,9 +236,11 @@ etm0: etm@22040000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster0_etm0_out_port: endpoint {
-                               remote-endpoint = <&cluster0_funnel_in_port0>;
+               out-ports {
+                       port {
+                               cluster0_etm0_out_port: endpoint {
+                                       remote-endpoint = <&cluster0_funnel_in_port0>;
+                               };
                        };
                };
        };
@@ -252,29 +252,28 @@ funnel@220c0000 { /* cluster0 funnel */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                cluster0_funnel_out_port: endpoint {
                                        remote-endpoint = <&main_funnel_in_port0>;
                                };
                        };
+               };
 
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                cluster0_funnel_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster0_etm0_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                cluster0_funnel_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster0_etm1_out_port>;
                                };
                        };
@@ -297,9 +296,11 @@ etm1: etm@22140000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster0_etm1_out_port: endpoint {
-                               remote-endpoint = <&cluster0_funnel_in_port1>;
+               out-ports {
+                       port {
+                               cluster0_etm1_out_port: endpoint {
+                                       remote-endpoint = <&cluster0_funnel_in_port1>;
+                               };
                        };
                };
        };
@@ -320,9 +321,11 @@ etm2: etm@23040000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster1_etm0_out_port: endpoint {
-                               remote-endpoint = <&cluster1_funnel_in_port0>;
+               out-ports {
+                       port {
+                               cluster1_etm0_out_port: endpoint {
+                                       remote-endpoint = <&cluster1_funnel_in_port0>;
+                               };
                        };
                };
        };
@@ -334,43 +337,40 @@ funnel@230c0000 { /* cluster1 funnel */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                cluster1_funnel_out_port: endpoint {
                                        remote-endpoint = <&main_funnel_in_port1>;
                                };
                        };
+               };
 
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
                                reg = <0>;
                                cluster1_funnel_in_port0: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster1_etm0_out_port>;
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                cluster1_funnel_in_port1: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster1_etm1_out_port>;
                                };
                        };
-                       port@3 {
+                       port@2 {
                                reg = <2>;
                                cluster1_funnel_in_port2: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster1_etm2_out_port>;
                                };
                        };
-                       port@4 {
+                       port@3 {
                                reg = <3>;
                                cluster1_funnel_in_port3: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&cluster1_etm3_out_port>;
                                };
                        };
@@ -393,9 +393,11 @@ etm3: etm@23140000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster1_etm1_out_port: endpoint {
-                               remote-endpoint = <&cluster1_funnel_in_port1>;
+               out-ports {
+                       port {
+                               cluster1_etm1_out_port: endpoint {
+                                       remote-endpoint = <&cluster1_funnel_in_port1>;
+                               };
                        };
                };
        };
@@ -416,9 +418,11 @@ etm4: etm@23240000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster1_etm2_out_port: endpoint {
-                               remote-endpoint = <&cluster1_funnel_in_port2>;
+               out-ports {
+                       port {
+                               cluster1_etm2_out_port: endpoint {
+                                       remote-endpoint = <&cluster1_funnel_in_port2>;
+                               };
                        };
                };
        };
@@ -439,9 +443,11 @@ etm5: etm@23340000 {
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               port {
-                       cluster1_etm3_out_port: endpoint {
-                               remote-endpoint = <&cluster1_funnel_in_port3>;
+               out-ports {
+                       port {
+                               cluster1_etm3_out_port: endpoint {
+                                       remote-endpoint = <&cluster1_funnel_in_port3>;
+                               };
                        };
                };
        };
@@ -454,7 +460,7 @@ replicator@20120000 {
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
 
-               ports {
+               out-ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
 
@@ -472,12 +478,10 @@ replicator_out_port1: endpoint {
                                        remote-endpoint = <&etr_in_port>;
                                };
                        };
-
-                       /* replicator input port */
-                       port@2 {
-                               reg = <0>;
+               };
+               in-ports {
+                       port {
                                replicator_in_port0: endpoint {
-                                       slave-mode;
                                };
                        };
                };
index 0c43fb3525eb1db2d9886e56eea474f2951562bf..cf285152deab7fb39d20698e803cdfe94e0d974f 100644 (file)
@@ -7,23 +7,16 @@ funnel@20130000 { /* cssys1 */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                csys1_funnel_out_port: endpoint {
                                        remote-endpoint = <&etf1_in_port>;
                                };
                        };
-
-                       /* input port */
-                       port@1 {
-                               reg = <0>;
+               };
+               in-ports {
+                       port {
                                csys1_funnel_in_port0: endpoint {
-                                       slave-mode;
                                };
                        };
 
@@ -37,22 +30,15 @@ etf@20140000 { /* etf1 */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* input port */
-                       port@0 {
-                               reg = <0>;
+               in-ports {
+                       port {
                                etf1_in_port: endpoint {
-                                       slave-mode;
                                        remote-endpoint = <&csys1_funnel_out_port>;
                                };
                        };
-
-                       /* output port */
-                       port@1 {
-                               reg = <0>;
+               };
+               out-ports {
+                       port {
                                etf1_out_port: endpoint {
                                        remote-endpoint = <&csys2_funnel_in_port1>;
                                };
@@ -67,20 +53,18 @@ funnel@20150000 { /* cssys2 */
                clocks = <&soc_smc50mhz>;
                clock-names = "apb_pclk";
                power-domains = <&scpi_devpd 0>;
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       /* output port */
-                       port@0 {
-                               reg = <0>;
+               out-ports {
+                       port {
                                csys2_funnel_out_port: endpoint {
                                        remote-endpoint = <&replicator_in_port0>;
                                };
                        };
+               };
 
-                       /* input ports */
-                       port@1 {
+               in-ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       port@0 {
                                reg = <0>;
                                csys2_funnel_in_port0: endpoint {
                                        slave-mode;
@@ -88,7 +72,7 @@ csys2_funnel_in_port0: endpoint {
                                };
                        };
 
-                       port@2 {
+                       port@1 {
                                reg = <1>;
                                csys2_funnel_in_port1: endpoint {
                                        slave-mode;
index 1fb5c5a0f32e38876e25561d39548dfe700dde34..08d4ba1716c3e54e043bf63d51dc0cba1259d54e 100644 (file)
@@ -257,14 +257,11 @@ &stm_out_port {
        remote-endpoint = <&main_funnel_in_port2>;
 };
 
-&main_funnel {
-       ports {
-               port@3 {
-                       reg = <2>;
-                       main_funnel_in_port2: endpoint {
-                               slave-mode;
-                               remote-endpoint = <&stm_out_port>;
-                       };
+&main_funnel_in_ports {
+       port@2 {
+               reg = <2>;
+               main_funnel_in_port2: endpoint {
+                       remote-endpoint = <&stm_out_port>;
                };
        };
 };
index 1193a9e34bbb16aaea9cf0e684dc7601af45a10a..667ca989c11b262bc0f8783d373dc5c9eda202fa 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb \
-                             bcm2837-rpi-3-b-plus.dtb
+                             bcm2837-rpi-3-b-plus.dtb \
+                             bcm2837-rpi-cm3-io3.dtb
 
 subdir-y       += northstar2
 subdir-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 (file)
index 0000000..b1c4ab2
--- /dev/null
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "arm/bcm2837-rpi-cm3-io3.dts"
index 1a406a76c86a2ae7ae465c192b08739009e9d891..ea854f689fda89fe8c19526ce99c7724e41c0bd5 100644 (file)
@@ -639,7 +639,7 @@ uart3: serial@66130000 {
                        status = "disabled";
                };
 
-               ssp0: ssp@66180000 {
+               ssp0: spi@66180000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x66180000 0x1000>;
                        interrupts = <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>;
@@ -650,7 +650,7 @@ ssp0: ssp@66180000 {
                        status = "disabled";
                };
 
-               ssp1: ssp@66190000 {
+               ssp1: spi@66190000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x66190000 0x1000>;
                        interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
index bc299c3d90683b02e168b9c06cbfd0b26c66ee2f..a9b92e52d50e8a1d4175ece1de5dc2050c34eea6 100644 (file)
@@ -138,7 +138,7 @@ pca9505: pca9505@20 {
 &i2c1 {
        status = "okay";
 
-       pcf8574: pcf8574@20 {
+       pcf8574: pcf8574@27 {
                compatible = "nxp,pcf8574a";
                gpio-controller;
                #gpio-cells = <2>;
index e283480bfc7e5d50701b7d62bde1b9b3e53ee5a5..cfeaa855bd05a189c348e8a1941dd8c9c7ad1ba7 100644 (file)
@@ -521,7 +521,7 @@ uart3: uart@130000 {
                        status = "disabled";
                };
 
-               ssp0: ssp@180000 {
+               ssp0: spi@180000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x00180000 0x1000>;
                        interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
@@ -533,7 +533,7 @@ ssp0: ssp@180000 {
                        status = "disabled";
                };
 
-               ssp1: ssp@190000 {
+               ssp1: spi@190000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x00190000 0x1000>;
                        interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
index 03d93f8ef8a95a76ce9d8677dda1fe3ed17ead1e..f4d68caeba83185fa8a29f64fc3d023b67183f9a 100644 (file)
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_HISI) += hi3660-hikey960.dtb
+dtb-$(CONFIG_ARCH_HISI) += hi3670-hikey970.dtb
 dtb-$(CONFIG_ARCH_HISI) += hi3798cv200-poplar.dtb
 dtb-$(CONFIG_ARCH_HISI) += hi6220-hikey.dtb
 dtb-$(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 (file)
index 0000000..4f51186
--- /dev/null
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Hisilicon HiKey970 Development Board
+ *
+ * Copyright (C) 2016, Hisilicon Ltd.
+ * Copyright (C) 2018, Linaro Ltd.
+ *
+ */
+
+/dts-v1/;
+
+#include "hi3670.dtsi"
+
+/ {
+       model = "HiKey970";
+       compatible = "hisilicon,hi3670-hikey970", "hisilicon,hi3670";
+
+       aliases {
+               serial6 = &uart6;       /* console UART */
+       };
+
+       chosen {
+               stdout-path = "serial6:115200n8";
+       };
+
+       memory@0 {
+               device_type = "memory";
+               /* expect bootloader to fill in this region */
+               reg = <0x0 0x0 0x0 0x0>;
+       };
+};
+
+&uart6 {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/hisilicon/hi3670.dtsi b/arch/arm64/boot/dts/hisilicon/hi3670.dtsi
new file mode 100644 (file)
index 0000000..c90e6f6
--- /dev/null
@@ -0,0 +1,162 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Hisilicon Hi3670 SoC
+ *
+ * Copyright (C) 2016, Hisilicon Ltd.
+ * Copyright (C) 2018, Linaro Ltd.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       compatible = "hisilicon,hi3670";
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               cpu-map {
+                       cluster0 {
+                               core0 {
+                                       cpu = <&cpu0>;
+                               };
+                               core1 {
+                                       cpu = <&cpu1>;
+                               };
+                               core2 {
+                                       cpu = <&cpu2>;
+                               };
+                               core3 {
+                                       cpu = <&cpu3>;
+                               };
+                       };
+                       cluster1 {
+                               core0 {
+                                       cpu = <&cpu4>;
+                               };
+                               core1 {
+                                       cpu = <&cpu5>;
+                               };
+                               core2 {
+                                       cpu = <&cpu6>;
+                               };
+                               core3 {
+                                       cpu = <&cpu7>;
+                               };
+                       };
+               };
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+               };
+
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+               };
+
+               cpu2: cpu@2 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x2>;
+                       enable-method = "psci";
+               };
+
+               cpu3: cpu@3 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x3>;
+                       enable-method = "psci";
+               };
+
+               cpu4: cpu@100 {
+                       compatible = "arm,cortex-a73", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x100>;
+                       enable-method = "psci";
+               };
+
+               cpu5: cpu@101 {
+                       compatible = "arm,cortex-a73", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x101>;
+                       enable-method = "psci";
+               };
+
+               cpu6: cpu@102 {
+                       compatible = "arm,cortex-a73", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x102>;
+                       enable-method = "psci";
+               };
+
+               cpu7: cpu@103 {
+                       compatible = "arm,cortex-a73", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0 0x103>;
+                       enable-method = "psci";
+               };
+       };
+
+       gic: interrupt-controller@e82b0000 {
+               compatible = "arm,gic-400";
+               reg = <0x0 0xe82b1000 0 0x1000>, /* GICD */
+                     <0x0 0xe82b2000 0 0x2000>, /* GICC */
+                     <0x0 0xe82b4000 0 0x2000>, /* GICH */
+                     <0x0 0xe82b6000 0 0x2000>; /* GICV */
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) |
+                                        IRQ_TYPE_LEVEL_HIGH)>;
+               interrupt-controller;
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) |
+                                         IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) |
+                                         IRQ_TYPE_LEVEL_LOW)>;
+               clock-frequency = <1920000>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               uart6_clk: clk_19_2M {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;
+               };
+
+               uart6: serial@fff32000 {
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0x0 0xfff32000 0x0 0x1000>;
+                       interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&uart6_clk &uart6_clk>;
+                       clock-names = "uartclk", "apb_pclk";
+                       status = "disabled";
+               };
+       };
+};
index 7afee5d5087b077a86766f4b6247abea45d56b0e..68c52f1149be66832c4606fb59d13f871add2e6b 100644 (file)
@@ -20,22 +20,18 @@ funnel@f6401000 {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       out-ports {
+                               port {
                                        soc_funnel_out: endpoint {
                                                remote-endpoint =
                                                        <&etf_in>;
                                        };
                                };
+                       };
 
-                               port@1 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        soc_funnel_in: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&acpu_funnel_out>;
                                        };
@@ -49,21 +45,17 @@ etf@f6402000 {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        etf_in: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&soc_funnel_out>;
                                        };
                                };
+                       };
 
-                               port@1 {
-                                       reg = <0>;
+                       out-ports {
+                               port {
                                        etf_out: endpoint {
                                                remote-endpoint =
                                                        <&replicator_in>;
@@ -77,20 +69,20 @@ replicator {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        replicator_in: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etf_out>;
                                        };
                                };
+                       };
 
-                               port@1 {
+                       out-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
                                        reg = <0>;
                                        replicator_out0: endpoint {
                                                remote-endpoint =
@@ -98,7 +90,7 @@ replicator_out0: endpoint {
                                        };
                                };
 
-                               port@2 {
+                               port@1 {
                                        reg = <1>;
                                        replicator_out1: endpoint {
                                                remote-endpoint =
@@ -114,14 +106,9 @@ etr@f6404000 {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        etr_in: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&replicator_out0>;
                                        };
@@ -135,14 +122,9 @@ tpiu@f6405000 {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       in-ports {
+                               port {
                                        tpiu_in: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&replicator_out1>;
                                        };
@@ -156,85 +138,78 @@ funnel@f6501000 {
                        clocks = <&acpu_sctrl HI6220_ACPU_SFT_AT_S>;
                        clock-names = "apb_pclk";
 
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-
-                               port@0 {
-                                       reg = <0>;
+                       out-ports {
+                               port {
                                        acpu_funnel_out: endpoint {
                                                remote-endpoint =
                                                        <&soc_funnel_in>;
                                        };
                                };
+                       };
 
-                               port@1 {
+                       in-ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
                                        reg = <0>;
                                        acpu_funnel_in0: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm0_out>;
                                        };
                                };
 
-                               port@2 {
+                               port@1 {
                                        reg = <1>;
                                        acpu_funnel_in1: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm1_out>;
                                        };
                                };
 
-                               port@3 {
+                               port@2 {
                                        reg = <2>;
                                        acpu_funnel_in2: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm2_out>;
                                        };
                                };
 
-                               port@4 {
+                               port@3 {
                                        reg = <3>;
                                        acpu_funnel_in3: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm3_out>;
                                        };
                                };
 
-                               port@5 {
+                               port@4 {
                                        reg = <4>;
                                        acpu_funnel_in4: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm4_out>;
                                        };
                                };
 
-                               port@6 {
+                               port@5 {
                                        reg = <5>;
                                        acpu_funnel_in5: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm5_out>;
                                        };
                                };
 
-                               port@7 {
+                               port@6 {
                                        reg = <6>;
                                        acpu_funnel_in6: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm6_out>;
                                        };
                                };
 
-                               port@8 {
+                               port@7 {
                                        reg = <7>;
                                        acpu_funnel_in7: endpoint {
-                                               slave-mode;
                                                remote-endpoint =
                                                        <&etm7_out>;
                                        };
@@ -251,10 +226,12 @@ etm@f659c000 {
 
                        cpu = <&cpu0>;
 
-                       port {
-                               etm0_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in0>;
+                       out-ports {
+                               port {
+                                       etm0_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in0>;
+                                       };
                                };
                        };
                };
@@ -268,10 +245,12 @@ etm@f659d000 {
 
                        cpu = <&cpu1>;
 
-                       port {
-                               etm1_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in1>;
+                       out-ports {
+                               port {
+                                       etm1_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in1>;
+                                       };
                                };
                        };
                };
@@ -285,10 +264,12 @@ etm@f659e000 {
 
                        cpu = <&cpu2>;
 
-                       port {
-                               etm2_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in2>;
+                       out-ports {
+                               port {
+                                       etm2_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in2>;
+                                       };
                                };
                        };
                };
@@ -302,10 +283,12 @@ etm@f659f000 {
 
                        cpu = <&cpu3>;
 
-                       port {
-                               etm3_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in3>;
+                       out-ports {
+                               port {
+                                       etm3_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in3>;
+                                       };
                                };
                        };
                };
@@ -319,10 +302,12 @@ etm@f65dc000 {
 
                        cpu = <&cpu4>;
 
-                       port {
-                               etm4_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in4>;
+                       out-ports {
+                               port {
+                                       etm4_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in4>;
+                                       };
                                };
                        };
                };
@@ -336,10 +321,12 @@ etm@f65dd000 {
 
                        cpu = <&cpu5>;
 
-                       port {
-                               etm5_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in5>;
+                       out-ports {
+                               port {
+                                       etm5_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in5>;
+                                       };
                                };
                        };
                };
@@ -353,10 +340,12 @@ etm@f65de000 {
 
                        cpu = <&cpu6>;
 
-                       port {
-                               etm6_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in6>;
+                       out-ports {
+                               port {
+                                       etm6_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in6>;
+                                       };
                                };
                        };
                };
@@ -370,10 +359,12 @@ etm@f65df000 {
 
                        cpu = <&cpu7>;
 
-                       port {
-                               etm7_out: endpoint {
-                                       remote-endpoint =
-                                               <&acpu_funnel_in7>;
+                       out-ports {
+                               port {
+                                       etm7_out: endpoint {
+                                               remote-endpoint =
+                                                       <&acpu_funnel_in7>;
+                                       };
                                };
                        };
                };
index 247024df714fce9ab1d85ee4dc73a5bec948f99c..97d5bf2c6ec587273dc11a3bb4ef0683378096d3 100644 (file)
@@ -99,6 +99,7 @@ cpu1: cpu@1 {
                        reg = <0x0 0x1>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER0_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -111,6 +112,7 @@ cpu2: cpu@2 {
                        reg = <0x0 0x2>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER0_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -123,6 +125,7 @@ cpu3: cpu@3 {
                        reg = <0x0 0x3>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER0_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -135,6 +138,7 @@ cpu4: cpu@100 {
                        reg = <0x0 0x100>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER1_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -147,6 +151,7 @@ cpu5: cpu@101 {
                        reg = <0x0 0x101>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER1_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -159,6 +164,7 @@ cpu6: cpu@102 {
                        reg = <0x0 0x102>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER1_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
@@ -171,6 +177,7 @@ cpu7: cpu@103 {
                        reg = <0x0 0x103>;
                        enable-method = "psci";
                        next-level-cache = <&CLUSTER1_L2>;
+                       clocks = <&stub_clock 0>;
                        operating-points-v2 = <&cpu_opp_table>;
                        cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                        #cooling-cells = <2>; /* min followed by max */
index 860c8fb10795011f6e6f9894f0ad5e8d4e9444d4..4bde7b6f2b113ccd541c68c9e2c0dee6efe5f568 100644 (file)
@@ -168,14 +168,14 @@ uart2: serial@fe200000 {
                        clock-names = "apb_pclk";
                        status="disabled";
                };
-               spi0: ssp@fe800000 {
+               spi0: spi@fe800000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x0 0xfe800000 0x1000>;
                        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clk_bus>;
                        clock-names = "apb_pclk";
                };
-               spi1: ssp@fe900000 {
+               spi1: spi@fe900000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x0 0xfe900000 0x1000>;
                        interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
index 1887af654a7db96685581b9f6953f8906073da11..16ced1ff1ad36754977dd41c5a1d39c8d8f81866 100644 (file)
@@ -168,14 +168,14 @@ uart2: serial@fe200000 {
                        clock-names = "apb_pclk";
                        status="disabled";
                };
-               spi0: ssp@fe800000 {
+               spi0: spi@fe800000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x0 0xfe800000 0x1000>;
                        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&clk_bus>;
                        clock-names = "apb_pclk";
                };
-               spi1: ssp@fe900000 {
+               spi1: spi@fe900000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x0 0xfe900000 0x1000>;
                        interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
index b762227f6aa1832ac0e8a5de872440deda102aea..2f3c8e29520d344304423ac1daa3a27d2329f1b6 100644 (file)
@@ -4,6 +4,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/mailbox/tegra186-hsp.h>
 #include <dt-bindings/memory/tegra186-mc.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
 #include <dt-bindings/power/tegra186-powergate.h>
 #include <dt-bindings/reset/tegra186-reset.h>
 #include <dt-bindings/thermal/tegra186-bpmp-thermal.h>
@@ -236,6 +237,20 @@ sdmmc1: sdhci@3400000 {
                clock-names = "sdhci";
                resets = <&bpmp TEGRA186_RESET_SDMMC1>;
                reset-names = "sdhci";
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc1_3v3>;
+               pinctrl-1 = <&sdmmc1_1v8>;
+               nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
+               nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
+               nvidia,pad-autocal-pull-up-offset-sdr104 = <0x03>;
+               nvidia,pad-autocal-pull-down-offset-sdr104 = <0x05>;
+               nvidia,default-tap = <0x5>;
+               nvidia,default-trim = <0xb>;
+               assigned-clocks = <&bpmp TEGRA186_CLK_SDMMC1>,
+                                 <&bpmp TEGRA186_CLK_PLLP_OUT0>;
+               assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLP_OUT0>;
                status = "disabled";
        };
 
@@ -247,6 +262,15 @@ sdmmc2: sdhci@3420000 {
                clock-names = "sdhci";
                resets = <&bpmp TEGRA186_RESET_SDMMC2>;
                reset-names = "sdhci";
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc2_3v3>;
+               pinctrl-1 = <&sdmmc2_1v8>;
+               nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
+               nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
+               nvidia,default-tap = <0x5>;
+               nvidia,default-trim = <0xb>;
                status = "disabled";
        };
 
@@ -258,6 +282,17 @@ sdmmc3: sdhci@3440000 {
                clock-names = "sdhci";
                resets = <&bpmp TEGRA186_RESET_SDMMC3>;
                reset-names = "sdhci";
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc3_3v3>;
+               pinctrl-1 = <&sdmmc3_1v8>;
+               nvidia,pad-autocal-pull-up-offset-1v8 = <0x00>;
+               nvidia,pad-autocal-pull-down-offset-1v8 = <0x7a>;
+               nvidia,pad-autocal-pull-up-offset-3v3-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-3v3-timeout = <0x06>;
+               nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x07>;
+               nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x07>;
+               nvidia,default-tap = <0x5>;
+               nvidia,default-trim = <0xb>;
                status = "disabled";
        };
 
@@ -267,8 +302,19 @@ sdmmc4: sdhci@3460000 {
                interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&bpmp TEGRA186_CLK_SDMMC4>;
                clock-names = "sdhci";
+               assigned-clocks = <&bpmp TEGRA186_CLK_SDMMC4>,
+                                 <&bpmp TEGRA186_CLK_PLLC4_VCO>;
+               assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLC4_VCO>;
                resets = <&bpmp TEGRA186_RESET_SDMMC4>;
                reset-names = "sdhci";
+               nvidia,pad-autocal-pull-up-offset-hs400 = <0x05>;
+               nvidia,pad-autocal-pull-down-offset-hs400 = <0x05>;
+               nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x0a>;
+               nvidia,pad-autocal-pull-down-offset-1v8-timeout = <0x0a>;
+               nvidia,default-tap = <0x5>;
+               nvidia,default-trim = <0x9>;
+               nvidia,dqs-trim = <63>;
+               mmc-hs400-1_8v;
                status = "disabled";
        };
 
@@ -368,6 +414,36 @@ pmc@c360000 {
                      <0 0x0c380000 0 0x10000>,
                      <0 0x0c390000 0 0x10000>;
                reg-names = "pmc", "wake", "aotag", "scratch";
+
+               sdmmc1_3v3: sdmmc1-3v3 {
+                       pins = "sdmmc1-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc1_1v8: sdmmc1-1v8 {
+                       pins = "sdmmc1-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
+
+               sdmmc2_3v3: sdmmc2-3v3 {
+                       pins = "sdmmc2-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc2_1v8: sdmmc2-1v8 {
+                       pins = "sdmmc2-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
+
+               sdmmc3_3v3: sdmmc3-3v3 {
+                       pins = "sdmmc3-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc3_1v8: sdmmc3-1v8 {
+                       pins = "sdmmc3-hv";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
        };
 
        ccplex@e000000 {
index a4dfcd19b9e88965187cd24e23116103b0f7e652..9fc14bb9a0affc7dea710afa5bae74b90a264adb 100644 (file)
@@ -118,7 +118,7 @@ uartf: serial@3150000 {
                };
 
                gen1_i2c: i2c@3160000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x03160000 0x10000>;
                        interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -143,7 +143,7 @@ uarth: serial@3170000 {
                };
 
                cam_i2c: i2c@3180000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x03180000 0x10000>;
                        interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -157,7 +157,7 @@ cam_i2c: i2c@3180000 {
 
                /* shares pads with dpaux1 */
                dp_aux_ch1_i2c: i2c@3190000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x03190000 0x10000>;
                        interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -171,7 +171,7 @@ dp_aux_ch1_i2c: i2c@3190000 {
 
                /* shares pads with dpaux0 */
                dp_aux_ch0_i2c: i2c@31b0000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x031b0000 0x10000>;
                        interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -184,7 +184,7 @@ dp_aux_ch0_i2c: i2c@31b0000 {
                };
 
                gen7_i2c: i2c@31c0000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x031c0000 0x10000>;
                        interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -197,7 +197,7 @@ gen7_i2c: i2c@31c0000 {
                };
 
                gen9_i2c: i2c@31e0000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x031e0000 0x10000>;
                        interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -264,7 +264,7 @@ hsp_top0: hsp@3c00000 {
                };
 
                gen2_i2c: i2c@c240000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x0c240000 0x10000>;
                        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
@@ -277,7 +277,7 @@ gen2_i2c: i2c@c240000 {
                };
 
                gen8_i2c: i2c@c250000 {
-                       compatible = "nvidia,tegra194-i2c", "nvidia,tegra114-i2c";
+                       compatible = "nvidia,tegra194-i2c";
                        reg = <0x0c250000 0x10000>;
                        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
index 212e6634c9baa5173efd128eb9e37c28a6714468..053458a5db55bef47ae3223af38eefc00828367a 100644 (file)
@@ -178,16 +178,7 @@ vdd_pex_1v05: ldo1 {
 
                                vddio_sdmmc: ldo2 {
                                        regulator-name = "VDDIO_SDMMC";
-                                       /*
-                                        * Technically this supply should have
-                                        * a supported range from 1.8 - 3.3 V.
-                                        * However, that would cause the SDHCI
-                                        * driver to request 2.7 V upon access
-                                        * and that in turn will cause traffic
-                                        * to be broken. Leave it at 3.3 V for
-                                        * now.
-                                        */
-                                       regulator-min-microvolt = <3300000>;
+                                       regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
                                        regulator-boot-on;
@@ -282,6 +273,7 @@ sdhci@700b0600 {
                status = "okay";
                bus-width = <8>;
                non-removable;
+               vqmmc-supply = <&vdd_1v8>;
        };
 
        clocks {
index 9d5a0e6b2ca4f9b69413e84f8513a7c2f31a5d8f..365726ddd418bfd146ba90cd936aa583e4a3aad9 100644 (file)
@@ -1452,7 +1452,6 @@ usb3-1 {
        sdhci@700b0000 {
                status = "okay";
                bus-width = <4>;
-               no-1-8-v;
 
                cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
 
index 3be920efee823a2913f7695bbd09a4ca10f03eb8..8fe47d6445a5e264e89e7277a506c699111d8533 100644 (file)
@@ -3,6 +3,7 @@
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/memory/tegra210-mc.h>
 #include <dt-bindings/pinctrl/pinctrl-tegra.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/thermal/tegra124-soctherm.h>
 
@@ -776,6 +777,26 @@ pd_vic: vic {
                                #power-domain-cells = <0>;
                        };
                };
+
+               sdmmc1_3v3: sdmmc1-3v3 {
+                       pins = "sdmmc1";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc1_1v8: sdmmc1-1v8 {
+                       pins = "sdmmc1";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
+
+               sdmmc3_3v3: sdmmc3-3v3 {
+                       pins = "sdmmc3";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+               };
+
+               sdmmc3_1v8: sdmmc3-1v8 {
+                       pins = "sdmmc3";
+                       power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+               };
        };
 
        fuse@7000f800 {
@@ -1027,6 +1048,20 @@ sdhci@700b0000 {
                clock-names = "sdhci";
                resets = <&tegra_car 14>;
                reset-names = "sdhci";
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc1_3v3>;
+               pinctrl-1 = <&sdmmc1_1v8>;
+               nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
+               nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
+               nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
+               nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
+               nvidia,default-tap = <0x2>;
+               nvidia,default-trim = <0x4>;
+               assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
+                                 <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>,
+                                 <&tegra_car TEGRA210_CLK_PLL_C4>;
+               assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
+               assigned-clock-rates = <200000000>, <1000000000>, <1000000000>;
                status = "disabled";
        };
 
@@ -1038,6 +1073,10 @@ sdhci@700b0200 {
                clock-names = "sdhci";
                resets = <&tegra_car 9>;
                reset-names = "sdhci";
+               nvidia,pad-autocal-pull-up-offset-1v8 = <0x05>;
+               nvidia,pad-autocal-pull-down-offset-1v8 = <0x05>;
+               nvidia,default-tap = <0x8>;
+               nvidia,default-trim = <0x0>;
                status = "disabled";
        };
 
@@ -1049,6 +1088,15 @@ sdhci@700b0400 {
                clock-names = "sdhci";
                resets = <&tegra_car 69>;
                reset-names = "sdhci";
+               pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+               pinctrl-0 = <&sdmmc3_3v3>;
+               pinctrl-1 = <&sdmmc3_1v8>;
+               nvidia,pad-autocal-pull-up-offset-3v3 = <0x00>;
+               nvidia,pad-autocal-pull-down-offset-3v3 = <0x7d>;
+               nvidia,pad-autocal-pull-up-offset-1v8 = <0x7b>;
+               nvidia,pad-autocal-pull-down-offset-1v8 = <0x7b>;
+               nvidia,default-tap = <0x3>;
+               nvidia,default-trim = <0x3>;
                status = "disabled";
        };
 
@@ -1060,6 +1108,15 @@ sdhci@700b0600 {
                clock-names = "sdhci";
                resets = <&tegra_car 15>;
                reset-names = "sdhci";
+               nvidia,pad-autocal-pull-up-offset-1v8 = <0x05>;
+               nvidia,pad-autocal-pull-down-offset-1v8 = <0x05>;
+               nvidia,default-tap = <0x8>;
+               nvidia,default-trim = <0x0>;
+               assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
+                                 <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
+               assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>;
+               nvidia,dqs-trim = <40>;
+               mmc-hs400-1_8v;
                status = "disabled";
        };
 
index 9e2394bc3c6271ef264db5d8209045af119dbcf2..a8ce6594342d993de8f19211a536e351d6166d57 100644 (file)
@@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb
 dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-m3ulcb-kf.dtb
 dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-xs.dtb
 dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-salvator-x.dtb r8a77965-salvator-xs.dtb
+dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb.dtb
+dtb-$(CONFIG_ARCH_R8A77965) += r8a77965-m3nulcb-kf.dtb
 dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb r8a77970-v3msk.dtb
 dtb-$(CONFIG_ARCH_R8A77980) += r8a77980-condor.dtb r8a77980-v3hsk.dtb
 dtb-$(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 (file)
index 0000000..012cbb6
--- /dev/null
@@ -0,0 +1,1663 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the r8a774a1 SoC
+ *
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/ {
+       compatible = "renesas,r8a774a1";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+               i2c6 = &i2c6;
+               i2c7 = &i2c_dvfs;
+       };
+
+       /*
+        * The external audio clocks are configured as 0 Hz fixed frequency
+        * clocks by default.
+        * Boards that provide audio clocks should override them.
+        */
+       audio_clk_a: audio_clk_a {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       audio_clk_b: audio_clk_b {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       audio_clk_c: audio_clk_c {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       /* External CAN clock - to be overridden by boards that provide it */
+       can_clk: can {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               a57_0: cpu@0 {
+                       compatible = "arm,cortex-a57", "arm,armv8";
+                       reg = <0x0>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 0>;
+                       next-level-cache = <&L2_CA57>;
+                       enable-method = "psci";
+                       clocks = <&cpg CPG_CORE 0>;
+               };
+
+               a57_1: cpu@1 {
+                       compatible = "arm,cortex-a57", "arm,armv8";
+                       reg = <0x1>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 1>;
+                       next-level-cache = <&L2_CA57>;
+                       enable-method = "psci";
+                       clocks = <&cpg CPG_CORE 0>;
+               };
+
+               a53_0: cpu@100 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x100>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 5>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+                       clocks =<&cpg CPG_CORE 1>;
+               };
+
+               a53_1: cpu@101 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x101>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 6>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+                       clocks =<&cpg CPG_CORE 1>;
+               };
+
+               a53_2: cpu@102 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x102>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 7>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+                       clocks =<&cpg CPG_CORE 1>;
+               };
+
+               a53_3: cpu@103 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       reg = <0x103>;
+                       device_type = "cpu";
+                       power-domains = <&sysc 8>;
+                       next-level-cache = <&L2_CA53>;
+                       enable-method = "psci";
+                       clocks =<&cpg CPG_CORE 1>;
+               };
+
+               L2_CA57: cache-controller-0 {
+                       compatible = "cache";
+                       power-domains = <&sysc 12>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+
+               L2_CA53: cache-controller-1 {
+                       compatible = "cache";
+                       power-domains = <&sysc 21>;
+                       cache-unified;
+                       cache-level = <2>;
+               };
+       };
+
+       extal_clk: extal {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+       };
+
+       extalr_clk: extalr {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               /* This value must be overridden by the board */
+               clock-frequency = <0>;
+       };
+
+       /* External PCIe clock - can be overridden by the board */
+       pcie_bus_clk: pcie_bus {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       pmu_a53 {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&a53_0>, <&a53_1>, <&a53_2>, <&a53_3>;
+       };
+
+       pmu_a57 {
+               compatible = "arm,cortex-a57-pmu";
+               interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&a57_0>, <&a57_1>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0", "arm,psci-0.2";
+               method = "smc";
+       };
+
+       /* External SCIF clock - to be overridden by boards that provide it */
+       scif_clk: scif {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               interrupt-parent = <&gic>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               rwdt: watchdog@e6020000 {
+                       compatible = "renesas,r8a774a1-wdt",
+                                    "renesas,rcar-gen3-wdt";
+                       reg = <0 0xe6020000 0 0x0c>;
+                       clocks = <&cpg CPG_MOD 402>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 402>;
+                       status = "disabled";
+               };
+
+               gpio0: gpio@e6050000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6050000 0 0x50>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 0 16>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 912>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 912>;
+               };
+
+               gpio1: gpio@e6051000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6051000 0 0x50>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 32 29>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 911>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 911>;
+               };
+
+               gpio2: gpio@e6052000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6052000 0 0x50>;
+                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 64 15>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 910>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 910>;
+               };
+
+               gpio3: gpio@e6053000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6053000 0 0x50>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 96 16>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 909>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 909>;
+               };
+
+               gpio4: gpio@e6054000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6054000 0 0x50>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 128 18>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 908>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 908>;
+               };
+
+               gpio5: gpio@e6055000 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6055000 0 0x50>;
+                       interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 160 26>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 907>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 907>;
+               };
+
+               gpio6: gpio@e6055400 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6055400 0 0x50>;
+                       interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 192 32>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 906>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 906>;
+               };
+
+               gpio7: gpio@e6055800 {
+                       compatible = "renesas,gpio-r8a774a1",
+                                    "renesas,rcar-gen3-gpio";
+                       reg = <0 0xe6055800 0 0x50>;
+                       interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       gpio-controller;
+                       gpio-ranges = <&pfc 0 224 4>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       clocks = <&cpg CPG_MOD 905>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 905>;
+               };
+
+               pfc: pin-controller@e6060000 {
+                       compatible = "renesas,pfc-r8a774a1";
+                       reg = <0 0xe6060000 0 0x50c>;
+               };
+
+               cpg: clock-controller@e6150000 {
+                       compatible = "renesas,r8a774a1-cpg-mssr";
+                       reg = <0 0xe6150000 0 0x0bb0>;
+                       clocks = <&extal_clk>, <&extalr_clk>;
+                       clock-names = "extal", "extalr";
+                       #clock-cells = <2>;
+                       #power-domain-cells = <0>;
+                       #reset-cells = <1>;
+               };
+
+               rst: reset-controller@e6160000 {
+                       compatible = "renesas,r8a774a1-rst";
+                       reg = <0 0xe6160000 0 0x018c>;
+               };
+
+               sysc: system-controller@e6180000 {
+                       compatible = "renesas,r8a774a1-sysc";
+                       reg = <0 0xe6180000 0 0x0400>;
+                       #power-domain-cells = <1>;
+               };
+
+               tsc: thermal@e6198000 {
+                       compatible = "renesas,r8a774a1-thermal";
+                       reg = <0 0xe6198000 0 0x100>,
+                             <0 0xe61a0000 0 0x100>,
+                             <0 0xe61a8000 0 0x100>;
+                       interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 522>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 522>;
+                       #thermal-sensor-cells = <1>;
+               };
+
+               intc_ex: interrupt-controller@e61c0000 {
+                       compatible = "renesas,intc-ex-r8a774a1", "renesas,irqc";
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+                       reg = <0 0xe61c0000 0 0x200>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 407>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 407>;
+               };
+
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 931>;
+                       dmas = <&dmac1 0x91>, <&dmac1 0x90>,
+                              <&dmac2 0x91>, <&dmac2 0x90>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c1: i2c@e6508000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6508000 0 0x40>;
+                       interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 930>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 930>;
+                       dmas = <&dmac1 0x93>, <&dmac1 0x92>,
+                              <&dmac2 0x93>, <&dmac2 0x92>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c2: i2c@e6510000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6510000 0 0x40>;
+                       interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 929>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 929>;
+                       dmas = <&dmac1 0x95>, <&dmac1 0x94>,
+                              <&dmac2 0x95>, <&dmac2 0x94>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c3: i2c@e66d0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66d0000 0 0x40>;
+                       interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 928>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 928>;
+                       dmas = <&dmac0 0x97>, <&dmac0 0x96>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c4: i2c@e66d8000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66d8000 0 0x40>;
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 927>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 927>;
+                       dmas = <&dmac0 0x99>, <&dmac0 0x98>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c5: i2c@e66e0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e0000 0 0x40>;
+                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 919>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 919>;
+                       dmas = <&dmac0 0x9b>, <&dmac0 0x9a>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c6: i2c@e66e8000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a774a1",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e8000 0 0x40>;
+                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 918>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 918>;
+                       dmas = <&dmac0 0x9d>, <&dmac0 0x9c>;
+                       dma-names = "tx", "rx";
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c_dvfs: i2c@e60b0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,iic-r8a774a1",
+                                    "renesas,rcar-gen3-iic",
+                                    "renesas,rmobile-iic";
+                       reg = <0 0xe60b0000 0 0x425>;
+                       interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 926>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 926>;
+                       dmas = <&dmac0 0x11>, <&dmac0 0x10>;
+                       dma-names = "tx", "rx";
+                       status = "disabled";
+               };
+
+               hscif0: serial@e6540000 {
+                       compatible = "renesas,hscif-r8a774a1",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6540000 0 0x60>;
+                       interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 520>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x31>, <&dmac1 0x30>,
+                              <&dmac2 0x31>, <&dmac2 0x30>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 520>;
+                       status = "disabled";
+               };
+
+               hscif1: serial@e6550000 {
+                       compatible = "renesas,hscif-r8a774a1",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6550000 0 0x60>;
+                       interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 519>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x33>, <&dmac1 0x32>,
+                              <&dmac2 0x33>, <&dmac2 0x32>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 519>;
+                       status = "disabled";
+               };
+
+               hscif2: serial@e6560000 {
+                       compatible = "renesas,hscif-r8a774a1",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe6560000 0 0x60>;
+                       interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 518>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x35>, <&dmac1 0x34>,
+                              <&dmac2 0x35>, <&dmac2 0x34>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 518>;
+                       status = "disabled";
+               };
+
+               hscif3: serial@e66a0000 {
+                       compatible = "renesas,hscif-r8a774a1",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe66a0000 0 0x60>;
+                       interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 517>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac0 0x37>, <&dmac0 0x36>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 517>;
+                       status = "disabled";
+               };
+
+               hscif4: serial@e66b0000 {
+                       compatible = "renesas,hscif-r8a774a1",
+                                    "renesas,rcar-gen3-hscif",
+                                    "renesas,hscif";
+                       reg = <0 0xe66b0000 0 0x60>;
+                       interrupts = <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 516>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac0 0x39>, <&dmac0 0x38>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 516>;
+                       status = "disabled";
+               };
+
+               hsusb: usb@e6590000 {
+                       compatible = "renesas,usbhs-r8a774a1",
+                                    "renesas,rcar-gen3-usbhs";
+                       reg = <0 0xe6590000 0 0x100>;
+                       interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 704>;
+                       dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
+                              <&usb_dmac1 0>, <&usb_dmac1 1>;
+                       dma-names = "ch0", "ch1", "ch2", "ch3";
+                       renesas,buswait = <11>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 704>;
+                       status = "disabled";
+               };
+
+               usb_dmac0: dma-controller@e65a0000 {
+                       compatible = "renesas,r8a774a1-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65a0000 0 0x100>;
+                       interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 330>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 330>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
+               usb_dmac1: dma-controller@e65b0000 {
+                       compatible = "renesas,r8a774a1-usb-dmac",
+                                    "renesas,usb-dmac";
+                       reg = <0 0xe65b0000 0 0x100>;
+                       interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1";
+                       clocks = <&cpg CPG_MOD 331>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 331>;
+                       #dma-cells = <1>;
+                       dma-channels = <2>;
+               };
+
+               usb3_phy0: usb-phy@e65ee000 {
+                       compatible = "renesas,r8a774a1-usb3-phy",
+                                    "renesas,rcar-gen3-usb3-phy";
+                       reg = <0 0xe65ee000 0 0x90>;
+                       clocks = <&cpg CPG_MOD 328>, <&usb3s0_clk>,
+                                <&usb_extal_clk>;
+                       clock-names = "usb3-if", "usb3s_clk", "usb_extal";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 328>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               dmac0: dma-controller@e6700000 {
+                       compatible = "renesas,dmac-r8a774a1",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe6700000 0 0x10000>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 219>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 219>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               dmac1: dma-controller@e7300000 {
+                       compatible = "renesas,dmac-r8a774a1",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7300000 0 0x10000>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 218>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 218>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               dmac2: dma-controller@e7310000 {
+                       compatible = "renesas,dmac-r8a774a1",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7310000 0 0x10000>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 217>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 217>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               ipmmu_ds0: mmu@e6740000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xe6740000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 0>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_ds1: mmu@e7740000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xe7740000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 1>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_hc: mmu@e6570000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xe6570000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 2>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_mm: mmu@e67b0000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xe67b0000 0 0x1000>;
+                       interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_mp: mmu@ec670000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xec670000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 4>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_pv0: mmu@fd800000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xfd800000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 5>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_pv1: mmu@fd950000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xfd950000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 6>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vc0: mmu@fe6b0000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xfe6b0000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 8>;
+                       power-domains = <&sysc 14>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vi0: mmu@febd0000 {
+                       compatible = "renesas,ipmmu-r8a774a1";
+                       reg = <0 0xfebd0000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 9>;
+                       power-domains = <&sysc 32>;
+                       #iommu-cells = <1>;
+               };
+
+               avb: ethernet@e6800000 {
+                       compatible = "renesas,etheravb-r8a774a1",
+                                    "renesas,etheravb-rcar-gen3";
+                       reg = <0 0xe6800000 0 0x800>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "ch0", "ch1", "ch2", "ch3",
+                                         "ch4", "ch5", "ch6", "ch7",
+                                         "ch8", "ch9", "ch10", "ch11",
+                                         "ch12", "ch13", "ch14", "ch15",
+                                         "ch16", "ch17", "ch18", "ch19",
+                                         "ch20", "ch21", "ch22", "ch23",
+                                         "ch24";
+                       clocks = <&cpg CPG_MOD 812>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 812>;
+                       phy-mode = "rgmii";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               pwm0: pwm@e6e30000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e30000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm1: pwm@e6e31000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e31000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm2: pwm@e6e32000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e32000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm3: pwm@e6e33000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e33000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm4: pwm@e6e34000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e34000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm5: pwm@e6e35000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e35000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               pwm6: pwm@e6e36000 {
+                       compatible = "renesas,pwm-r8a774a1", "renesas,pwm-rcar";
+                       reg = <0 0xe6e36000 0 0x8>;
+                       #pwm-cells = <2>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       resets = <&cpg 523>;
+                       power-domains = <&sysc 32>;
+                       status = "disabled";
+               };
+
+               scif0: serial@e6e60000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6e60000 0 0x40>;
+                       interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 207>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x51>, <&dmac1 0x50>,
+                              <&dmac2 0x51>, <&dmac2 0x50>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 207>;
+                       status = "disabled";
+               };
+
+               scif1: serial@e6e68000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6e68000 0 0x40>;
+                       interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 206>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x53>, <&dmac1 0x52>,
+                              <&dmac2 0x53>, <&dmac2 0x52>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 206>;
+                       status = "disabled";
+               };
+
+               scif2: serial@e6e88000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6e88000 0 0x40>;
+                       interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 310>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 310>;
+                       status = "disabled";
+               };
+
+               scif3: serial@e6c50000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6c50000 0 0x40>;
+                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 204>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac0 0x57>, <&dmac0 0x56>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 204>;
+                       status = "disabled";
+               };
+
+               scif4: serial@e6c40000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6c40000 0 0x40>;
+                       interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 203>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac0 0x59>, <&dmac0 0x58>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 203>;
+                       status = "disabled";
+               };
+
+               scif5: serial@e6f30000 {
+                       compatible = "renesas,scif-r8a774a1",
+                                    "renesas,rcar-gen3-scif", "renesas,scif";
+                       reg = <0 0xe6f30000 0 0x40>;
+                       interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 202>,
+                                <&cpg CPG_CORE 19>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+                       dmas = <&dmac1 0x5b>, <&dmac1 0x5a>,
+                              <&dmac2 0x5b>, <&dmac2 0x5a>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 202>;
+                       status = "disabled";
+               };
+
+               msiof0: spi@e6e90000 {
+                       compatible = "renesas,msiof-r8a774a1",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6e90000 0 0x0064>;
+                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 211>;
+                       dmas = <&dmac1 0x41>, <&dmac1 0x40>,
+                              <&dmac2 0x41>, <&dmac2 0x40>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 211>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof1: spi@e6ea0000 {
+                       compatible = "renesas,msiof-r8a774a1",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6ea0000 0 0x0064>;
+                       interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 210>;
+                       dmas = <&dmac1 0x43>, <&dmac1 0x42>,
+                              <&dmac2 0x43>, <&dmac2 0x42>;
+                       dma-names = "tx", "rx", "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 210>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof2: spi@e6c00000 {
+                       compatible = "renesas,msiof-r8a774a1",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6c00000 0 0x0064>;
+                       interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 209>;
+                       dmas = <&dmac0 0x45>, <&dmac0 0x44>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 209>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof3: spi@e6c10000 {
+                       compatible = "renesas,msiof-r8a774a1",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6c10000 0 0x0064>;
+                       interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 208>;
+                       dmas = <&dmac0 0x47>, <&dmac0 0x46>;
+                       dma-names = "tx", "rx";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 208>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               rcar_sound: sound@ec500000 {
+                       /*
+                        * #sound-dai-cells is required
+                        *
+                        * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
+                        * Multi  DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
+                        */
+                       /*
+                        * #clock-cells is required for audio_clkout0/1/2/3
+                        *
+                        * clkout       : #clock-cells = <0>;   <&rcar_sound>;
+                        * clkout0/1/2/3: #clock-cells = <1>;   <&rcar_sound N>;
+                        */
+                       compatible =  "renesas,rcar_sound-r8a774a1", "renesas,rcar_sound-gen3";
+                       reg =   <0 0xec500000 0 0x1000>, /* SCU */
+                               <0 0xec5a0000 0 0x100>,  /* ADG */
+                               <0 0xec540000 0 0x1000>, /* SSIU */
+                               <0 0xec541000 0 0x280>,  /* SSI */
+                               <0 0xec740000 0 0x200>;  /* Audio DMAC peri peri*/
+                       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+                       clocks = <&cpg CPG_MOD 1005>,
+                                <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
+                                <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
+                                <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
+                                <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
+                                <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
+                                <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
+                                <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
+                                <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
+                                <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
+                                <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
+                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+                                <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
+                                <&audio_clk_a>, <&audio_clk_b>,
+                                <&audio_clk_c>,
+                                <&cpg CPG_CORE 10>;
+                       clock-names = "ssi-all",
+                                     "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+                                     "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+                                     "ssi.1", "ssi.0",
+                                     "src.9", "src.8", "src.7", "src.6",
+                                     "src.5", "src.4", "src.3", "src.2",
+                                     "src.1", "src.0",
+                                     "mix.1", "mix.0",
+                                     "ctu.1", "ctu.0",
+                                     "dvc.0", "dvc.1",
+                                     "clk_a", "clk_b", "clk_c", "clk_i";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 1005>,
+                                <&cpg 1006>, <&cpg 1007>,
+                                <&cpg 1008>, <&cpg 1009>,
+                                <&cpg 1010>, <&cpg 1011>,
+                                <&cpg 1012>, <&cpg 1013>,
+                                <&cpg 1014>, <&cpg 1015>;
+                       reset-names = "ssi-all",
+                                     "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+                                     "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+                                     "ssi.1", "ssi.0";
+                       status = "disabled";
+
+                       rcar_sound,dvc {
+                               dvc0: dvc-0 {
+                                       dmas = <&audma1 0xbc>;
+                                       dma-names = "tx";
+                               };
+                               dvc1: dvc-1 {
+                                       dmas = <&audma1 0xbe>;
+                                       dma-names = "tx";
+                               };
+                       };
+
+                       rcar_sound,mix {
+                               mix0: mix-0 { };
+                               mix1: mix-1 { };
+                       };
+
+                       rcar_sound,ctu {
+                               ctu00: ctu-0 { };
+                               ctu01: ctu-1 { };
+                               ctu02: ctu-2 { };
+                               ctu03: ctu-3 { };
+                               ctu10: ctu-4 { };
+                               ctu11: ctu-5 { };
+                               ctu12: ctu-6 { };
+                               ctu13: ctu-7 { };
+                       };
+
+                       rcar_sound,src {
+                               src0: src-0 {
+                                       interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x85>, <&audma1 0x9a>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src1: src-1 {
+                                       interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x87>, <&audma1 0x9c>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src2: src-2 {
+                                       interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x89>, <&audma1 0x9e>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src3: src-3 {
+                                       interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8b>, <&audma1 0xa0>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src4: src-4 {
+                                       interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8d>, <&audma1 0xb0>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src5: src-5 {
+                                       interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8f>, <&audma1 0xb2>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src6: src-6 {
+                                       interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x91>, <&audma1 0xb4>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src7: src-7 {
+                                       interrupts = <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x93>, <&audma1 0xb6>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src8: src-8 {
+                                       interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x95>, <&audma1 0xb8>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src9: src-9 {
+                                       interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x97>, <&audma1 0xba>;
+                                       dma-names = "rx", "tx";
+                               };
+                       };
+
+                       rcar_sound,ssi {
+                               ssi0: ssi-0 {
+                                       interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi1: ssi-1 {
+                                       interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi2: ssi-2 {
+                                       interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi3: ssi-3 {
+                                       interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi4: ssi-4 {
+                                       interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi5: ssi-5 {
+                                       interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi6: ssi-6 {
+                                       interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi7: ssi-7 {
+                                       interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi8: ssi-8 {
+                                       interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi9: ssi-9 {
+                                       interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                       };
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               port@0 {
+                                       reg = <0>;
+                               };
+                               port@1 {
+                                       reg = <1>;
+                               };
+                       };
+               };
+
+               audma0: dma-controller@ec700000 {
+                       compatible = "renesas,dmac-r8a774a1",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xec700000 0 0x10000>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 502>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 502>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               audma1: dma-controller@ec720000 {
+                       compatible = "renesas,dmac-r8a774a1",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xec720000 0 0x10000>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 501>;
+                       clock-names = "fck";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 501>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               xhci0: usb@ee000000 {
+                       compatible = "renesas,xhci-r8a774a1",
+                                    "renesas,rcar-gen3-xhci";
+                       reg = <0 0xee000000 0 0xc00>;
+                       interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 328>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 328>;
+                       status = "disabled";
+               };
+
+               usb3_peri0: usb@ee020000 {
+                       compatible = "renesas,r8a774a1-usb3-peri",
+                                    "renesas,rcar-gen3-usb3-peri";
+                       reg = <0 0xee020000 0 0x400>;
+                       interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 328>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 328>;
+                       status = "disabled";
+               };
+
+               ohci0: usb@ee080000 {
+                       compatible = "generic-ohci";
+                       reg = <0 0xee080000 0 0x100>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 703>;
+                       status = "disabled";
+               };
+
+               ohci1: usb@ee0a0000 {
+                       compatible = "generic-ohci";
+                       reg = <0 0xee0a0000 0 0x100>;
+                       interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 702>;
+                       phys = <&usb2_phy1>;
+                       phy-names = "usb";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 702>;
+                       status = "disabled";
+               };
+
+               ehci0: usb@ee080100 {
+                       compatible = "generic-ehci";
+                       reg = <0 0xee080100 0 0x100>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       phys = <&usb2_phy0>;
+                       phy-names = "usb";
+                       companion = <&ohci0>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 703>;
+                       status = "disabled";
+               };
+
+               ehci1: usb@ee0a0100 {
+                       compatible = "generic-ehci";
+                       reg = <0 0xee0a0100 0 0x100>;
+                       interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 702>;
+                       phys = <&usb2_phy1>;
+                       phy-names = "usb";
+                       companion = <&ohci1>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 702>;
+                       status = "disabled";
+               };
+
+               usb2_phy0: usb-phy@ee080200 {
+                       compatible = "renesas,usb2-phy-r8a774a1",
+                                    "renesas,rcar-gen3-usb2-phy";
+                       reg = <0 0xee080200 0 0x700>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 703>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 703>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               usb2_phy1: usb-phy@ee0a0200 {
+                       compatible = "renesas,usb2-phy-r8a774a1",
+                                    "renesas,rcar-gen3-usb2-phy";
+                       reg = <0 0xee0a0200 0 0x700>;
+                       clocks = <&cpg CPG_MOD 702>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 702>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               sdhi0: sd@ee100000 {
+                       compatible = "renesas,sdhi-r8a774a1",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee100000 0 0x2000>;
+                       interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 314>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 314>;
+                       status = "disabled";
+               };
+
+               sdhi1: sd@ee120000 {
+                       compatible = "renesas,sdhi-r8a774a1",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee120000 0 0x2000>;
+                       interrupts = <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 313>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 313>;
+                       status = "disabled";
+               };
+
+               sdhi2: sd@ee140000 {
+                       compatible = "renesas,sdhi-r8a774a1",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee140000 0 0x2000>;
+                       interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 312>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 312>;
+                       status = "disabled";
+               };
+
+               sdhi3: sd@ee160000 {
+                       compatible = "renesas,sdhi-r8a774a1",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee160000 0 0x2000>;
+                       interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 311>;
+                       max-frequency = <200000000>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 311>;
+                       status = "disabled";
+               };
+
+               gic: interrupt-controller@f1010000 {
+                       compatible = "arm,gic-400";
+                       #interrupt-cells = <3>;
+                       #address-cells = <0>;
+                       interrupt-controller;
+                       reg = <0x0 0xf1010000 0 0x1000>,
+                             <0x0 0xf1020000 0 0x20000>,
+                             <0x0 0xf1040000 0 0x20000>,
+                             <0x0 0xf1060000 0 0x20000>;
+                       interrupts = <GIC_PPI 9
+                                       (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_HIGH)>;
+                       clocks = <&cpg CPG_MOD 408>;
+                       clock-names = "clk";
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 408>;
+               };
+
+               fcpf0: fcp@fe950000 {
+                       compatible = "renesas,fcpf";
+                       reg = <0 0xfe950000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 615>;
+                       power-domains = <&sysc 14>;
+                       resets = <&cpg 615>;
+               };
+
+               fcpvb0: fcp@fe96f000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfe96f000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 607>;
+                       power-domains = <&sysc 14>;
+                       resets = <&cpg 607>;
+               };
+
+               fcpvd0: fcp@fea27000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfea27000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 603>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 603>;
+                       iommus = <&ipmmu_vi0 8>;
+               };
+
+               fcpvd1: fcp@fea2f000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfea2f000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 602>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 602>;
+                       iommus = <&ipmmu_vi0 9>;
+               };
+
+               fcpvd2: fcp@fea37000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfea37000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 601>;
+                       power-domains = <&sysc 32>;
+                       resets = <&cpg 601>;
+                       iommus = <&ipmmu_vi0 10>;
+               };
+
+               fcpvi0: fcp@fe9af000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfe9af000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 611>;
+                       power-domains = <&sysc 14>;
+                       resets = <&cpg 611>;
+                       iommus = <&ipmmu_vc0 19>;
+               };
+
+               prr: chipid@fff00044 {
+                       compatible = "renesas,prr";
+                       reg = <0 0xfff00044 0 4>;
+               };
+       };
+
+       thermal-zones {
+               sensor_thermal1: sensor-thermal1 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+                       thermal-sensors = <&tsc 0>;
+
+                       trips {
+                               sensor1_crit: sensor1-crit {
+                                       temperature = <120000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+
+               sensor_thermal2: sensor-thermal2 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+                       thermal-sensors = <&tsc 1>;
+
+                       trips {
+                               sensor2_crit: sensor2-crit {
+                                       temperature = <120000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+               };
+
+               sensor_thermal3: sensor-thermal3 {
+                       polling-delay-passive = <250>;
+                       polling-delay = <1000>;
+                       thermal-sensors = <&tsc 2>;
+
+                       trips {
+                               sensor3_crit: sensor3-crit {
+                                       temperature = <120000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(6) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       /* External USB clocks - can be overridden by the board */
+       usb3s0_clk: usb3s0 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
+       usb_extal_clk: usb_extal {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+};
index 6b5fa91f1d5d33d38a80a8d39ffb0f5baf92d764..0895503b69d0b71bcdf0f47d64d705ae38326049 100644 (file)
@@ -40,12 +40,11 @@ &du {
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
                 <&cpg CPG_MOD 721>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock5 1>,
                 <&x21_clk>,
                 <&x22_clk>,
                 <&versaclock5 2>;
-       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2", "du.3",
                      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
 };
 
index 7b2fbaec9aef8d71fb1b9fbb04f0f8b1630b0bab..0fb84c219b2feaca91ebcc6a4be7651658997af6 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7795 ES1.x SoC
+ * Device Tree Source for the R-Car H3 (R8A77950) ES1.x SoC
  *
  * Copyright (C) 2015 Renesas Electronics Corp.
  */
@@ -232,7 +232,7 @@ ports {
                port@1 {
                        vin0csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin0>;
+                               remote-endpoint = <&csi21vin0>;
                        };
                };
        };
@@ -243,7 +243,7 @@ ports {
                port@1 {
                        vin1csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin1>;
+                               remote-endpoint = <&csi21vin1>;
                        };
                };
        };
@@ -254,7 +254,7 @@ ports {
                port@1 {
                        vin2csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin2>;
+                               remote-endpoint = <&csi21vin2>;
                        };
                };
        };
@@ -265,7 +265,7 @@ ports {
                port@1 {
                        vin3csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin3>;
+                               remote-endpoint = <&csi21vin3>;
                        };
                };
        };
@@ -276,7 +276,7 @@ ports {
                port@1 {
                        vin4csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin4>;
+                               remote-endpoint = <&csi21vin4>;
                        };
                };
        };
@@ -287,7 +287,7 @@ ports {
                port@1 {
                        vin5csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin5>;
+                               remote-endpoint = <&csi21vin5>;
                        };
                };
        };
@@ -298,7 +298,7 @@ ports {
                port@1 {
                        vin6csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin6>;
+                               remote-endpoint = <&csi21vin6>;
                        };
                };
        };
@@ -309,7 +309,7 @@ ports {
                port@1 {
                        vin7csi21: endpoint@1 {
                                reg = <1>;
-                               remote-endpoint= <&csi21vin7>;
+                               remote-endpoint = <&csi21vin7>;
                        };
                };
        };
index df50bf46406e6e904f31541e1767a1dfe8b4b25a..54515eaf0310f1727f4e695196b74b5bd7354645 100644 (file)
@@ -41,11 +41,10 @@ &du {
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
                 <&cpg CPG_MOD 721>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock5 1>,
                 <&versaclock5 3>,
                 <&versaclock5 4>,
                 <&versaclock5 2>;
-       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2", "du.3",
                      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
 };
index 446822f5751c77e8a78fe599c8f818a7db8d51f5..1620e8d8dacc3c561f0a8dde96877712bfe79547 100644 (file)
@@ -40,12 +40,11 @@ &du {
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
                 <&cpg CPG_MOD 721>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock5 1>,
                 <&x21_clk>,
                 <&x22_clk>,
                 <&versaclock5 2>;
-       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2", "du.3",
                      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
 };
 
index 8ded64d0a4d56a82b7368b94dcaf285f4cb72e9c..cf08a119eec093cdf635fbd43998c58750accddc 100644 (file)
@@ -40,12 +40,11 @@ &du {
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
                 <&cpg CPG_MOD 721>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock6 1>,
                 <&x21_clk>,
                 <&x22_clk>,
                 <&versaclock6 2>;
-       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2", "du.3",
                      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
 };
 
@@ -152,6 +151,15 @@ rsnd_endpoint2: endpoint {
        };
 };
 
+&pca9654 {
+       pcie_sata_switch {
+               gpio-hog;
+               gpios = <7 GPIO_ACTIVE_HIGH>;
+               output-low; /* enable SATA by default */
+               line-name = "PCIE/SATA switch";
+       };
+};
+
 &pfc {
        usb2_pins: usb2 {
                groups = "usb2";
@@ -176,6 +184,11 @@ usb2_ch3_pins: usb2_ch3 {
        };
 };
 
+/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
+&sata {
+       status = "okay";
+};
+
 &usb2_phy2 {
        pinctrl-0 = <&usb2_pins>;
        pinctrl-names = "default";
index fb9d08ad7659da7938b8cffecba6b41ada7b07dc..b5f2273caca4ded1e6bc0cfe3a5e52b97a3fd854 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7795 SoC
+ * Device Tree Source for the R-Car H3 (R8A77950) SoC
  *
  * Copyright (C) 2015 Renesas Electronics Corp.
  */
@@ -123,7 +123,7 @@ a57_0: cpu@0 {
                        power-domains = <&sysc R8A7795_PD_CA57_CPU0>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -135,7 +135,7 @@ a57_1: cpu@1 {
                        power-domains = <&sysc R8A7795_PD_CA57_CPU1>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -147,7 +147,7 @@ a57_2: cpu@2 {
                        power-domains = <&sysc R8A7795_PD_CA57_CPU2>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -159,7 +159,7 @@ a57_3: cpu@3 {
                        power-domains = <&sysc R8A7795_PD_CA57_CPU3>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -171,7 +171,7 @@ a53_0: cpu@100 {
                        power-domains = <&sysc R8A7795_PD_CA53_CPU0>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -182,7 +182,7 @@ a53_1: cpu@101 {
                        power-domains = <&sysc R8A7795_PD_CA53_CPU1>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -193,7 +193,7 @@ a53_2: cpu@102 {
                        power-domains = <&sysc R8A7795_PD_CA53_CPU2>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -204,7 +204,7 @@ a53_3: cpu@103 {
                        power-domains = <&sysc R8A7795_PD_CA53_CPU3>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7795_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7795_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -455,7 +455,6 @@ tsc: thermal@e6198000 {
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
                        resets = <&cpg 522>;
                        #thermal-sensor-cells = <1>;
-                       status = "okay";
                };
 
                intc_ex: interrupt-controller@e61c0000 {
@@ -525,15 +524,6 @@ i2c2: i2c@e6510000 {
                        status = "disabled";
                };
 
-               arm_cc630p: crypto@e6601000 {
-                       compatible = "arm,cryptocell-630p-ree";
-                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
-                       reg = <0x0 0xe6601000 0 0x1000>;
-                       clocks = <&cpg CPG_MOD 229>;
-                       resets = <&cpg 229>;
-                       power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-               };
-
                i2c3: i2c@e66d0000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
@@ -707,7 +697,7 @@ hsusb: usb@e6590000 {
                                     "renesas,rcar-gen3-usbhs";
                        reg = <0 0xe6590000 0 0x100>;
                        interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 704>;
+                       clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
                        dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
                               <&usb_dmac1 0>, <&usb_dmac1 1>;
                        dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -715,7 +705,7 @@ hsusb: usb@e6590000 {
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 704>;
+                       resets = <&cpg 704>, <&cpg 703>;
                        status = "disabled";
                };
 
@@ -724,7 +714,7 @@ hsusb3: usb@e659c000 {
                                     "renesas,rcar-gen3-usbhs";
                        reg = <0 0xe659c000 0 0x100>;
                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 705>;
+                       clocks = <&cpg CPG_MOD 705>, <&cpg CPG_MOD 700>;
                        dmas = <&usb_dmac2 0>, <&usb_dmac2 1>,
                               <&usb_dmac3 0>, <&usb_dmac3 1>;
                        dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -732,7 +722,7 @@ hsusb3: usb@e659c000 {
                        phys = <&usb2_phy3>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 705>;
+                       resets = <&cpg 705>, <&cpg 700>;
                        status = "disabled";
                };
 
@@ -805,6 +795,15 @@ usb3_phy0: usb-phy@e65ee000 {
                        status = "disabled";
                };
 
+               arm_cc630p: crypto@e6601000 {
+                       compatible = "arm,cryptocell-630p-ree";
+                       interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                       reg = <0x0 0xe6601000 0 0x1000>;
+                       clocks = <&cpg CPG_MOD 229>;
+                       resets = <&cpg 229>;
+                       power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+               };
+
                dmac0: dma-controller@e6700000 {
                        compatible = "renesas,dmac-r8a7795",
                                     "renesas,rcar-dmac";
@@ -1425,11 +1424,11 @@ port@1 {
 
                                        vin0csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin0>;
+                                               remote-endpoint = <&csi20vin0>;
                                        };
                                        vin0csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin0>;
+                                               remote-endpoint = <&csi40vin0>;
                                        };
                                };
                        };
@@ -1457,11 +1456,11 @@ port@1 {
 
                                        vin1csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin1>;
+                                               remote-endpoint = <&csi20vin1>;
                                        };
                                        vin1csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin1>;
+                                               remote-endpoint = <&csi40vin1>;
                                        };
                                };
                        };
@@ -1489,11 +1488,11 @@ port@1 {
 
                                        vin2csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin2>;
+                                               remote-endpoint = <&csi20vin2>;
                                        };
                                        vin2csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin2>;
+                                               remote-endpoint = <&csi40vin2>;
                                        };
                                };
                        };
@@ -1521,11 +1520,11 @@ port@1 {
 
                                        vin3csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin3>;
+                                               remote-endpoint = <&csi20vin3>;
                                        };
                                        vin3csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin3>;
+                                               remote-endpoint = <&csi40vin3>;
                                        };
                                };
                        };
@@ -1553,11 +1552,11 @@ port@1 {
 
                                        vin4csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin4>;
+                                               remote-endpoint = <&csi20vin4>;
                                        };
                                        vin4csi41: endpoint@3 {
                                                reg = <3>;
-                                               remote-endpoint= <&csi41vin4>;
+                                               remote-endpoint = <&csi41vin4>;
                                        };
                                };
                        };
@@ -1585,11 +1584,11 @@ port@1 {
 
                                        vin5csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin5>;
+                                               remote-endpoint = <&csi20vin5>;
                                        };
                                        vin5csi41: endpoint@3 {
                                                reg = <3>;
-                                               remote-endpoint= <&csi41vin5>;
+                                               remote-endpoint = <&csi41vin5>;
                                        };
                                };
                        };
@@ -1617,11 +1616,11 @@ port@1 {
 
                                        vin6csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin6>;
+                                               remote-endpoint = <&csi20vin6>;
                                        };
                                        vin6csi41: endpoint@3 {
                                                reg = <3>;
-                                               remote-endpoint= <&csi41vin6>;
+                                               remote-endpoint = <&csi41vin6>;
                                        };
                                };
                        };
@@ -1649,11 +1648,11 @@ port@1 {
 
                                        vin7csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin7>;
+                                               remote-endpoint = <&csi20vin7>;
                                        };
                                        vin7csi41: endpoint@3 {
                                                reg = <3>;
-                                               remote-endpoint= <&csi41vin7>;
+                                               remote-endpoint = <&csi41vin7>;
                                        };
                                };
                        };
@@ -2098,11 +2097,11 @@ ohci0: usb@ee080000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee080000 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -2134,11 +2133,11 @@ ohci3: usb@ee0e0000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee0e0000 0 0x100>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 700>;
+                       clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
                        phys = <&usb2_phy3>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 700>;
+                       resets = <&cpg 700>, <&cpg 705>;
                        status = "disabled";
                };
 
@@ -2146,12 +2145,12 @@ ehci0: usb@ee080100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee080100 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        companion = <&ohci0>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -2185,12 +2184,12 @@ ehci3: usb@ee0e0100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee0e0100 0 0x100>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 700>;
+                       clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
                        phys = <&usb2_phy3>;
                        phy-names = "usb";
                        companion = <&ohci3>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 700>;
+                       resets = <&cpg 700>, <&cpg 705>;
                        status = "disabled";
                };
 
@@ -2199,9 +2198,9 @@ usb2_phy0: usb-phy@ee080200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee080200 0 0x700>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -2233,9 +2232,9 @@ usb2_phy3: usb-phy@ee0e0200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee0e0200 0 0x700>;
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 700>;
+                       clocks = <&cpg CPG_MOD 700>, <&cpg CPG_MOD 705>;
                        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
-                       resets = <&cpg 700>;
+                       resets = <&cpg 700>, <&cpg 705>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -2782,9 +2781,7 @@ port@2 {
 
                du: display@feb00000 {
                        compatible = "renesas,du-r8a7795";
-                       reg = <0 0xfeb00000 0 0x80000>,
-                             <0 0xfeb90000 0 0x14>;
-                       reg-names = "du", "lvds.0";
+                       reg = <0 0xfeb00000 0 0x80000>;
                        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>,
@@ -2792,9 +2789,8 @@ du: display@feb00000 {
                        clocks = <&cpg CPG_MOD 724>,
                                 <&cpg CPG_MOD 723>,
                                 <&cpg CPG_MOD 722>,
-                                <&cpg CPG_MOD 721>,
-                                <&cpg CPG_MOD 727>;
-                       clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0";
+                                <&cpg CPG_MOD 721>;
+                       clock-names = "du.0", "du.1", "du.2", "du.3";
                        vsps = <&vspd0 0 &vspd1 0 &vspd2 0 &vspd0 1>;
                        status = "disabled";
 
@@ -2822,6 +2818,33 @@ du_out_hdmi1: endpoint {
                                port@3 {
                                        reg = <3>;
                                        du_out_lvds0: endpoint {
+                                               remote-endpoint = <&lvds0_in>;
+                                       };
+                               };
+                       };
+               };
+
+               lvds0: lvds@feb90000 {
+                       compatible = "renesas,r8a7795-lvds";
+                       reg = <0 0xfeb90000 0 0x14>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+                       resets = <&cpg 727>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds0_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds0>;
+                                       };
+                               };
+                               port@1 {
+                                       reg = <1>;
+                                       lvds0_out: endpoint {
                                        };
                                };
                        };
index cbd8acbf537e634ab461bd03c9459203440bfbd0..9e4594c27fa6c5534d074eae609ece05eec8538e 100644 (file)
@@ -30,10 +30,9 @@ &du {
        clocks = <&cpg CPG_MOD 724>,
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock5 1>,
                 <&versaclock5 3>,
                 <&versaclock5 2>;
-       clock-names = "du.0", "du.1", "du.2", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2",
                      "dclkin.0", "dclkin.1", "dclkin.2";
 };
index 052d72acc862b83c659f0056deeb9fe720d875a6..b4f9567cb9f86312164fd4d2302a926974df75a6 100644 (file)
@@ -29,11 +29,10 @@ &du {
        clocks = <&cpg CPG_MOD 724>,
                 <&cpg CPG_MOD 723>,
                 <&cpg CPG_MOD 722>,
-                <&cpg CPG_MOD 727>,
                 <&versaclock5 1>,
                 <&x21_clk>,
                 <&versaclock5 2>;
-       clock-names = "du.0", "du.1", "du.2", "lvds.0",
+       clock-names = "du.0", "du.1", "du.2",
                      "dclkin.0", "dclkin.1", "dclkin.2";
 };
 
index cbd35c00b4af6e2bde98edc29b67a2fedb4a323d..1ec6aaa520c19975511b2e471dc6f97d8b702795 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a7796 SoC
+ * Device Tree Source for the R-Car M3-W (R8A77960) SoC
  *
  * Copyright (C) 2016-2017 Renesas Electronics Corp.
  */
@@ -134,7 +134,7 @@ a57_0: cpu@0 {
                        power-domains = <&sysc R8A7796_PD_CA57_CPU0>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -146,7 +146,7 @@ a57_1: cpu@1 {
                        power-domains = <&sysc R8A7796_PD_CA57_CPU1>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z>;
                        operating-points-v2 = <&cluster0_opp>;
                        #cooling-cells = <2>;
                };
@@ -158,7 +158,7 @@ a53_0: cpu@100 {
                        power-domains = <&sysc R8A7796_PD_CA53_CPU0>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -169,7 +169,7 @@ a53_1: cpu@101 {
                        power-domains = <&sysc R8A7796_PD_CA53_CPU1>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -180,7 +180,7 @@ a53_2: cpu@102 {
                        power-domains = <&sysc R8A7796_PD_CA53_CPU2>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -191,7 +191,7 @@ a53_3: cpu@103 {
                        power-domains = <&sysc R8A7796_PD_CA53_CPU3>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
-                       clocks =<&cpg CPG_CORE R8A7796_CLK_Z2>;
+                       clocks = <&cpg CPG_CORE R8A7796_CLK_Z2>;
                        operating-points-v2 = <&cluster1_opp>;
                };
 
@@ -434,7 +434,6 @@ tsc: thermal@e6198000 {
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 522>;
                        #thermal-sensor-cells = <1>;
-                       status = "okay";
                };
 
                intc_ex: interrupt-controller@e61c0000 {
@@ -677,7 +676,7 @@ hsusb: usb@e6590000 {
                                     "renesas,rcar-gen3-usbhs";
                        reg = <0 0xe6590000 0 0x100>;
                        interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 704>;
+                       clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
                        dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
                               <&usb_dmac1 0>, <&usb_dmac1 1>;
                        dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -685,7 +684,7 @@ hsusb: usb@e6590000 {
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
-                       resets = <&cpg 704>;
+                       resets = <&cpg 704>, <&cpg 703>;
                        status = "disabled";
                };
 
@@ -1299,11 +1298,11 @@ port@1 {
 
                                        vin0csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin0>;
+                                               remote-endpoint = <&csi20vin0>;
                                        };
                                        vin0csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin0>;
+                                               remote-endpoint = <&csi40vin0>;
                                        };
                                };
                        };
@@ -1331,11 +1330,11 @@ port@1 {
 
                                        vin1csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin1>;
+                                               remote-endpoint = <&csi20vin1>;
                                        };
                                        vin1csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin1>;
+                                               remote-endpoint = <&csi40vin1>;
                                        };
                                };
                        };
@@ -1363,11 +1362,11 @@ port@1 {
 
                                        vin2csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin2>;
+                                               remote-endpoint = <&csi20vin2>;
                                        };
                                        vin2csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin2>;
+                                               remote-endpoint = <&csi40vin2>;
                                        };
                                };
                        };
@@ -1395,11 +1394,11 @@ port@1 {
 
                                        vin3csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin3>;
+                                               remote-endpoint = <&csi20vin3>;
                                        };
                                        vin3csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin3>;
+                                               remote-endpoint = <&csi40vin3>;
                                        };
                                };
                        };
@@ -1427,11 +1426,11 @@ port@1 {
 
                                        vin4csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin4>;
+                                               remote-endpoint = <&csi20vin4>;
                                        };
                                        vin4csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin4>;
+                                               remote-endpoint = <&csi40vin4>;
                                        };
                                };
                        };
@@ -1459,11 +1458,11 @@ port@1 {
 
                                        vin5csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin5>;
+                                               remote-endpoint = <&csi20vin5>;
                                        };
                                        vin5csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin5>;
+                                               remote-endpoint = <&csi40vin5>;
                                        };
                                };
                        };
@@ -1491,11 +1490,11 @@ port@1 {
 
                                        vin6csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin6>;
+                                               remote-endpoint = <&csi20vin6>;
                                        };
                                        vin6csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin6>;
+                                               remote-endpoint = <&csi40vin6>;
                                        };
                                };
                        };
@@ -1523,11 +1522,11 @@ port@1 {
 
                                        vin7csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin7>;
+                                               remote-endpoint = <&csi20vin7>;
                                        };
                                        vin7csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin7>;
+                                               remote-endpoint = <&csi40vin7>;
                                        };
                                };
                        };
@@ -1970,11 +1969,11 @@ ohci0: usb@ee080000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee080000 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -1994,12 +1993,12 @@ ehci0: usb@ee080100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee080100 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
-                       companion= <&ohci0>;
+                       companion = <&ohci0>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -2010,7 +2009,7 @@ ehci1: usb@ee0a0100 {
                        clocks = <&cpg CPG_MOD 702>;
                        phys = <&usb2_phy1>;
                        phy-names = "usb";
-                       companion= <&ohci1>;
+                       companion = <&ohci1>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
                        resets = <&cpg 702>;
                        status = "disabled";
@@ -2021,9 +2020,9 @@ usb2_phy0: usb-phy@ee080200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee080200 0 0x700>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -2437,17 +2436,14 @@ port@2 {
 
                du: display@feb00000 {
                        compatible = "renesas,du-r8a7796";
-                       reg = <0 0xfeb00000 0 0x70000>,
-                             <0 0xfeb90000 0 0x14>;
-                       reg-names = "du", "lvds.0";
+                       reg = <0 0xfeb00000 0 0x70000>;
                        interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
                        clocks = <&cpg CPG_MOD 724>,
                                 <&cpg CPG_MOD 723>,
-                                <&cpg CPG_MOD 722>,
-                                <&cpg CPG_MOD 727>;
-                       clock-names = "du.0", "du.1", "du.2", "lvds.0";
+                                <&cpg CPG_MOD 722>;
+                       clock-names = "du.0", "du.1", "du.2";
                        status = "disabled";
 
                        vsps = <&vspd0 &vspd1 &vspd2>;
@@ -2470,6 +2466,33 @@ du_out_hdmi0: endpoint {
                                port@2 {
                                        reg = <2>;
                                        du_out_lvds0: endpoint {
+                                               remote-endpoint = <&lvds0_in>;
+                                       };
+                               };
+                       };
+               };
+
+               lvds0: lvds@feb90000 {
+                       compatible = "renesas,r8a7796-lvds";
+                       reg = <0 0xfeb90000 0 0x14>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A7796_PD_ALWAYS_ON>;
+                       resets = <&cpg 727>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds0_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds0>;
+                                       };
+                               };
+                               port@1 {
+                                       reg = <1>;
+                                       lvds0_out: endpoint {
                                        };
                                };
                        };
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 (file)
index 0000000..dadad97
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the M3NULCB Kingfisher board
+ *
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ * Copyright (C) 2018 Cogent Embedded, Inc.
+ */
+
+#include "r8a77965-m3nulcb.dts"
+#include "ulcb-kf.dtsi"
+
+/ {
+       model = "Renesas M3NULCB Kingfisher board based on r8a77965";
+       compatible = "shimafuji,kingfisher", "renesas,m3nulcb",
+                    "renesas,r8a77965";
+};
diff --git a/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts b/arch/arm64/boot/dts/renesas/r8a77965-m3nulcb.dts
new file mode 100644 (file)
index 0000000..964078b
--- /dev/null
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the M3NULCB (R-Car Starter Kit Pro) board
+ *
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ * Copyright (C) 2018 Cogent Embedded, Inc.
+ */
+
+/dts-v1/;
+#include "r8a77965.dtsi"
+#include "ulcb.dtsi"
+
+/ {
+       model = "Renesas M3NULCB board based on r8a77965";
+       compatible = "renesas,m3nulcb", "renesas,r8a77965";
+
+       memory@48000000 {
+               device_type = "memory";
+               /* first 128MB is reserved for secure area. */
+               reg = <0x0 0x48000000 0x0 0x78000000>;
+       };
+};
+
+&du {
+       clocks = <&cpg CPG_MOD 724>,
+                <&cpg CPG_MOD 723>,
+                <&cpg CPG_MOD 721>,
+                <&versaclock5 1>,
+                <&versaclock5 3>,
+                <&versaclock5 2>;
+       clock-names = "du.0", "du.1", "du.3",
+                     "dclkin.0", "dclkin.1", "dclkin.3";
+};
index 9de4e3db1621bd26d566f7a18696e4b77599b240..f03a5e9e0c427e0dc8ac9e05d95f2a0d4d7f87d7 100644 (file)
@@ -47,3 +47,17 @@ rcar_dw_hdmi0_out: endpoint {
 &hdmi0_con {
        remote-endpoint = <&rcar_dw_hdmi0_out>;
 };
+
+&pca9654 {
+       pcie_sata_switch {
+               gpio-hog;
+               gpios = <7 GPIO_ACTIVE_HIGH>;
+               output-low; /* enable SATA by default */
+               line-name = "PCIE/SATA switch";
+       };
+};
+
+/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
+&sata {
+       status = "okay";
+};
index 0cd44461a0bd218b830309f1e9b9f61509084492..83946ca2eba5d042b091cbbae863bb56d207f1c3 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a77965 SoC
+ * Device Tree Source for the R-Car M3-N (R8A77965) SoC
  *
  * Copyright (C) 2018 Jacopo Mondi <jacopo+renesas@jmondi.org>
  *
@@ -12,7 +12,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/r8a77965-sysc.h>
 
-#define CPG_AUDIO_CLK_I                10
+#define CPG_AUDIO_CLK_I                R8A77965_CLK_S0D4
 
 / {
        compatible = "renesas,r8a77965";
@@ -60,6 +60,46 @@ can_clk: can {
                clock-frequency = <0>;
        };
 
+       cluster0_opp: opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp-500000000 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <830000>;
+                       clock-latency-ns = <300000>;
+               };
+               opp-1000000000 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <830000>;
+                       clock-latency-ns = <300000>;
+               };
+               opp-1500000000 {
+                       opp-hz = /bits/ 64 <1500000000>;
+                       opp-microvolt = <830000>;
+                       clock-latency-ns = <300000>;
+                       opp-suspend;
+               };
+               opp-1600000000 {
+                       opp-hz = /bits/ 64 <1600000000>;
+                       opp-microvolt = <900000>;
+                       clock-latency-ns = <300000>;
+                       turbo-mode;
+               };
+               opp-1700000000 {
+                       opp-hz = /bits/ 64 <1700000000>;
+                       opp-microvolt = <900000>;
+                       clock-latency-ns = <300000>;
+                       turbo-mode;
+               };
+               opp-1800000000 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <960000>;
+                       clock-latency-ns = <300000>;
+                       turbo-mode;
+               };
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -71,6 +111,8 @@ a57_0: cpu@0 {
                        power-domains = <&sysc R8A77965_PD_CA57_CPU0>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
+                       clocks = <&cpg CPG_CORE R8A77965_CLK_Z>;
+                       operating-points-v2 = <&cluster0_opp>;
                };
 
                a57_1: cpu@1 {
@@ -80,6 +122,8 @@ a57_1: cpu@1 {
                        power-domains = <&sysc R8A77965_PD_CA57_CPU1>;
                        next-level-cache = <&L2_CA57>;
                        enable-method = "psci";
+                       clocks = <&cpg CPG_CORE R8A77965_CLK_Z>;
+                       operating-points-v2 = <&cluster0_opp>;
                };
 
                L2_CA57: cache-controller-0 {
@@ -306,7 +350,6 @@ tsc: thermal@e6198000 {
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
                        resets = <&cpg 522>;
                        #thermal-sensor-cells = <1>;
-                       status = "okay";
                };
 
                intc_ex: interrupt-controller@e61c0000 {
@@ -545,11 +588,11 @@ hscif4: serial@e66b0000 {
                };
 
                hsusb: usb@e6590000 {
-                       compatible = "renesas,usbhs-r8a7796",
+                       compatible = "renesas,usbhs-r8a77965",
                                     "renesas,rcar-gen3-usbhs";
                        reg = <0 0xe6590000 0 0x100>;
                        interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 704>;
+                       clocks = <&cpg CPG_MOD 704>, <&cpg CPG_MOD 703>;
                        dmas = <&usb_dmac0 0>, <&usb_dmac0 1>,
                               <&usb_dmac1 0>, <&usb_dmac1 1>;
                        dma-names = "ch0", "ch1", "ch2", "ch3";
@@ -557,7 +600,7 @@ hsusb: usb@e6590000 {
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
-                       resets = <&cpg 704>;
+                       resets = <&cpg 704>, <&cpg 703>;
                        status = "disabled";
                };
 
@@ -634,6 +677,14 @@ GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 219>;
                        #dma-cells = <1>;
                        dma-channels = <16>;
+                       iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
+                              <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
+                              <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
+                              <&ipmmu_ds0 6>, <&ipmmu_ds0 7>,
+                              <&ipmmu_ds0 8>, <&ipmmu_ds0 9>,
+                              <&ipmmu_ds0 10>, <&ipmmu_ds0 11>,
+                              <&ipmmu_ds0 12>, <&ipmmu_ds0 13>,
+                              <&ipmmu_ds0 14>, <&ipmmu_ds0 15>;
                };
 
                dmac1: dma-controller@e7300000 {
@@ -668,6 +719,14 @@ GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 218>;
                        #dma-cells = <1>;
                        dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
+                              <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
+                              <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
+                              <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
+                              <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
+                              <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
+                              <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
+                              <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
                };
 
                dmac2: dma-controller@e7310000 {
@@ -702,6 +761,14 @@ GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 217>;
                        #dma-cells = <1>;
                        dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
+                              <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
+                              <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
+                              <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
+                              <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
+                              <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
+                              <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
+                              <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
                };
 
                ipmmu_ds0: mmu@e6740000 {
@@ -838,6 +905,16 @@ avb: ethernet@e6800000 {
                        status = "disabled";
                };
 
+               can0: can@e6c30000 {
+                       reg = <0 0xe6c30000 0 0x1000>;
+                       /* placeholder */
+               };
+
+               can1: can@e6c38000 {
+                       reg = <0 0xe6c38000 0 0x1000>;
+                       /* placeholder */
+               };
+
                pwm0: pwm@e6e30000 {
                        compatible = "renesas,pwm-r8a77965", "renesas,pwm-rcar";
                        reg = <0 0xe6e30000 0 8>;
@@ -1089,11 +1166,11 @@ port@1 {
 
                                        vin0csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin0>;
+                                               remote-endpoint = <&csi20vin0>;
                                        };
                                        vin0csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin0>;
+                                               remote-endpoint = <&csi40vin0>;
                                        };
                                };
                        };
@@ -1121,11 +1198,11 @@ port@1 {
 
                                        vin1csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin1>;
+                                               remote-endpoint = <&csi20vin1>;
                                        };
                                        vin1csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin1>;
+                                               remote-endpoint = <&csi40vin1>;
                                        };
                                };
                        };
@@ -1153,11 +1230,11 @@ port@1 {
 
                                        vin2csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin2>;
+                                               remote-endpoint = <&csi20vin2>;
                                        };
                                        vin2csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin2>;
+                                               remote-endpoint = <&csi40vin2>;
                                        };
                                };
                        };
@@ -1185,11 +1262,11 @@ port@1 {
 
                                        vin3csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin3>;
+                                               remote-endpoint = <&csi20vin3>;
                                        };
                                        vin3csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin3>;
+                                               remote-endpoint = <&csi40vin3>;
                                        };
                                };
                        };
@@ -1217,11 +1294,11 @@ port@1 {
 
                                        vin4csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin4>;
+                                               remote-endpoint = <&csi20vin4>;
                                        };
                                        vin4csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin4>;
+                                               remote-endpoint = <&csi40vin4>;
                                        };
                                };
                        };
@@ -1249,11 +1326,11 @@ port@1 {
 
                                        vin5csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin5>;
+                                               remote-endpoint = <&csi20vin5>;
                                        };
                                        vin5csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin5>;
+                                               remote-endpoint = <&csi40vin5>;
                                        };
                                };
                        };
@@ -1281,11 +1358,11 @@ port@1 {
 
                                        vin6csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin6>;
+                                               remote-endpoint = <&csi20vin6>;
                                        };
                                        vin6csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin6>;
+                                               remote-endpoint = <&csi40vin6>;
                                        };
                                };
                        };
@@ -1313,57 +1390,280 @@ port@1 {
 
                                        vin7csi20: endpoint@0 {
                                                reg = <0>;
-                                               remote-endpoint= <&csi20vin7>;
+                                               remote-endpoint = <&csi20vin7>;
                                        };
                                        vin7csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin7>;
+                                               remote-endpoint = <&csi40vin7>;
                                        };
                                };
                        };
                };
 
                rcar_sound: sound@ec500000 {
+                       /*
+                        * #sound-dai-cells is required
+                        *
+                        * Single DAI : #sound-dai-cells = <0>; <&rcar_sound>;
+                        * Multi  DAI : #sound-dai-cells = <1>; <&rcar_sound N>;
+                        */
+                       /*
+                        * #clock-cells is required for audio_clkout0/1/2/3
+                        *
+                        * clkout       : #clock-cells = <0>;   <&rcar_sound>;
+                        * clkout0/1/2/3: #clock-cells = <1>;   <&rcar_sound N>;
+                        */
+                       compatible =  "renesas,rcar_sound-r8a77965", "renesas,rcar_sound-gen3";
                        reg =   <0 0xec500000 0 0x1000>, /* SCU */
                                <0 0xec5a0000 0 0x100>,  /* ADG */
                                <0 0xec540000 0 0x1000>, /* SSIU */
                                <0 0xec541000 0 0x280>,  /* SSI */
                                <0 0xec740000 0 0x200>;  /* Audio DMAC peri peri*/
-                       /* placeholder */
+                       reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
+
+                       clocks = <&cpg CPG_MOD 1005>,
+                                <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
+                                <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
+                                <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
+                                <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
+                                <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
+                                <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
+                                <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
+                                <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
+                                <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
+                                <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
+                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+                                <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
+                                <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
+                                <&audio_clk_a>, <&audio_clk_b>,
+                                <&audio_clk_c>,
+                                <&cpg CPG_CORE R8A77965_CLK_S0D4>;
+                       clock-names = "ssi-all",
+                                     "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+                                     "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+                                     "ssi.1", "ssi.0",
+                                     "src.9", "src.8", "src.7", "src.6",
+                                     "src.5", "src.4", "src.3", "src.2",
+                                     "src.1", "src.0",
+                                     "mix.1", "mix.0",
+                                     "ctu.1", "ctu.0",
+                                     "dvc.0", "dvc.1",
+                                     "clk_a", "clk_b", "clk_c", "clk_i";
+                       power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+                       resets = <&cpg 1005>,
+                                <&cpg 1006>, <&cpg 1007>,
+                                <&cpg 1008>, <&cpg 1009>,
+                                <&cpg 1010>, <&cpg 1011>,
+                                <&cpg 1012>, <&cpg 1013>,
+                                <&cpg 1014>, <&cpg 1015>;
+                       reset-names = "ssi-all",
+                                     "ssi.9", "ssi.8", "ssi.7", "ssi.6",
+                                     "ssi.5", "ssi.4", "ssi.3", "ssi.2",
+                                     "ssi.1", "ssi.0";
+                       status = "disabled";
 
                        rcar_sound,dvc {
                                dvc0: dvc-0 {
+                                       dmas = <&audma1 0xbc>;
+                                       dma-names = "tx";
                                };
                                dvc1: dvc-1 {
+                                       dmas = <&audma1 0xbe>;
+                                       dma-names = "tx";
                                };
                        };
 
+                       rcar_sound,mix {
+                               mix0: mix-0 { };
+                               mix1: mix-1 { };
+                       };
+
+                       rcar_sound,ctu {
+                               ctu00: ctu-0 { };
+                               ctu01: ctu-1 { };
+                               ctu02: ctu-2 { };
+                               ctu03: ctu-3 { };
+                               ctu10: ctu-4 { };
+                               ctu11: ctu-5 { };
+                               ctu12: ctu-6 { };
+                               ctu13: ctu-7 { };
+                       };
+
                        rcar_sound,src {
                                src0: src-0 {
+                                       interrupts = <GIC_SPI 352 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x85>, <&audma1 0x9a>;
+                                       dma-names = "rx", "tx";
                                };
                                src1: src-1 {
+                                       interrupts = <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x87>, <&audma1 0x9c>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src2: src-2 {
+                                       interrupts = <GIC_SPI 354 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x89>, <&audma1 0x9e>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src3: src-3 {
+                                       interrupts = <GIC_SPI 355 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8b>, <&audma1 0xa0>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src4: src-4 {
+                                       interrupts = <GIC_SPI 356 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8d>, <&audma1 0xb0>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src5: src-5 {
+                                       interrupts = <GIC_SPI 357 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x8f>, <&audma1 0xb2>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src6: src-6 {
+                                       interrupts = <GIC_SPI 358 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x91>, <&audma1 0xb4>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src7: src-7 {
+                                       interrupts = <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x93>, <&audma1 0xb6>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src8: src-8 {
+                                       interrupts = <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x95>, <&audma1 0xb8>;
+                                       dma-names = "rx", "tx";
+                               };
+                               src9: src-9 {
+                                       interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x97>, <&audma1 0xba>;
+                                       dma-names = "rx", "tx";
                                };
                        };
 
                        rcar_sound,ssi {
                                ssi0: ssi-0 {
+                                       interrupts = <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
                                };
                                ssi1: ssi-1 {
+                                       interrupts = <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
                                };
-                       };
-
-                       ports {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               port@0 {
-                                       reg = <0>;
+                               ssi2: ssi-2 {
+                                       interrupts = <GIC_SPI 372 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
                                };
-                               port@1 {
-                                       reg = <1>;
+                               ssi3: ssi-3 {
+                                       interrupts = <GIC_SPI 373 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi4: ssi-4 {
+                                       interrupts = <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi5: ssi-5 {
+                                       interrupts = <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi6: ssi-6 {
+                                       interrupts = <GIC_SPI 376 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi7: ssi-7 {
+                                       interrupts = <GIC_SPI 377 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi8: ssi-8 {
+                                       interrupts = <GIC_SPI 378 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
+                               };
+                               ssi9: ssi-9 {
+                                       interrupts = <GIC_SPI 379 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
+                                       dma-names = "rx", "tx", "rxu", "txu";
                                };
                        };
                };
 
+               audma0: dma-controller@ec700000 {
+                       compatible = "renesas,dmac-r8a77965",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xec700000 0 0x10000>;
+                       interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 502>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+                       resets = <&cpg 502>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
+               audma1: dma-controller@ec720000 {
+                       compatible = "renesas,dmac-r8a77965",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xec720000 0 0x10000>;
+                       interrupts = <GIC_SPI 351 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 348 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 349 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 382 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 501>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+                       resets = <&cpg 501>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+               };
+
                xhci0: usb@ee000000 {
                        compatible = "renesas,xhci-r8a77965",
                                     "renesas,rcar-gen3-xhci";
@@ -1390,11 +1690,11 @@ ohci0: usb@ee080000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee080000 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -1414,12 +1714,12 @@ ehci0: usb@ee080100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee080100 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        companion = <&ohci0>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -1441,9 +1741,9 @@ usb2_phy0: usb-phy@ee080200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee080200 0 0x700>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -1452,9 +1752,9 @@ usb2_phy1: usb-phy@ee0a0200 {
                        compatible = "renesas,usb2-phy-r8a77965",
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee0a0200 0 0x700>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 702>;
                        power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 702>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -1507,6 +1807,17 @@ sdhi3: sd@ee160000 {
                        status = "disabled";
                };
 
+               sata: sata@ee300000 {
+                       compatible = "renesas,sata-r8a77965",
+                                    "renesas,rcar-gen3-sata";
+                       reg = <0 0xee300000 0 0x200000>;
+                       interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 815>;
+                       power-domains = <&sysc R8A77965_PD_ALWAYS_ON>;
+                       resets = <&cpg 815>;
+                       status = "disabled";
+               };
+
                gic: interrupt-controller@f1010000 {
                        compatible = "arm,gic-400";
                        #interrupt-cells = <3>;
@@ -1578,6 +1889,16 @@ pciec1: pcie@ee800000 {
                        status = "disabled";
                };
 
+               fdp1@fe940000 {
+                       compatible = "renesas,fdp1";
+                       reg = <0 0xfe940000 0 0x2400>;
+                       interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 119>;
+                       power-domains = <&sysc R8A77965_PD_A3VP>;
+                       resets = <&cpg 119>;
+                       renesas,fcp = <&fcpf0>;
+               };
+
                fcpf0: fcp@fe950000 {
                        compatible = "renesas,fcpf";
                        reg = <0 0xfe950000 0 0x200>;
@@ -1843,14 +2164,6 @@ prr: chipid@fff00044 {
                };
        };
 
-       timer {
-               compatible = "arm,armv8-timer";
-               interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-                                     <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-                                     <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-                                     <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
-       };
-
        thermal-zones {
                sensor_thermal1: sensor-thermal1 {
                        polling-delay-passive = <250>;
@@ -1895,6 +2208,14 @@ sensor3_crit: sensor3-crit {
                };
        };
 
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts-extended = <&gic GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
+                                     <&gic GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
        /* External USB clocks - can be overridden by the board */
        usb3s0_clk: usb3s0 {
                compatible = "fixed-clock";
index 8eac8ca6550b81f4922cafbe33174de16f3cca98..0dbcb4cccc1803e0d5128333b073edff4ba6b8e8 100644 (file)
@@ -51,6 +51,15 @@ vcc_d3_3v: regulator-1 {
                regulator-always-on;
        };
 
+       vcc_vddq_vin0: regulator-2 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC_VDDQ_VIN0";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        lvds-decoder {
                compatible = "thine,thc63lvd1024";
                vcc-supply = <&vcc_d3_3v>;
@@ -128,6 +137,12 @@ i2c0_pins: i2c0 {
                function = "i2c0";
        };
 
+       mmc_pins: mmc_3_3v {
+               groups = "mmc_data8", "mmc_ctrl";
+               function = "mmc";
+               power-source = <3300>;
+       };
+
        scif0_pins: scif0 {
                groups = "scif0_data";
                function = "scif0";
@@ -192,6 +207,17 @@ lvds0_out: endpoint {
        };
 };
 
+&mmc0 {
+       pinctrl-0 = <&mmc_pins>;
+       pinctrl-names = "default";
+
+       vmmc-supply = <&vcc_d3_3v>;
+       vqmmc-supply = <&vcc_vddq_vin0>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
 &scif0 {
        pinctrl-0 = <&scif0_pins>;
        pinctrl-names = "default";
index 954168858fed95e7c8a34d41629540087eaeae87..cba7885cf7c352e5afabea141130f92e6dc9359d 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a77970 SoC
+ * Device Tree Source for the R-Car V3M (R8A77970) SoC
  *
  * Copyright (C) 2016-2017 Renesas Electronics Corp.
  * Copyright (C) 2017 Cogent Embedded, Inc.
@@ -24,6 +24,13 @@ aliases {
                i2c4 = &i2c4;
        };
 
+       /* External CAN clock - to be overridden by boards that provide it */
+       can_clk: can {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -82,13 +89,6 @@ psci {
                method = "smc";
        };
 
-       /* External CAN clock - to be overridden by boards that provide it */
-       can_clk: can {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
-
        /* External SCIF clock - to be overridden by boards that provide it */
        scif_clk: scif {
                compatible = "fixed-clock";
@@ -209,6 +209,76 @@ pfc: pin-controller@e6060000 {
                        reg = <0 0xe6060000 0 0x504>;
                };
 
+               cmt0: timer@e60f0000 {
+                       compatible = "renesas,r8a77970-cmt0",
+                                    "renesas,rcar-gen3-cmt0";
+                       reg = <0 0xe60f0000 0 0x1004>;
+                       interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 303>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 303>;
+                       status = "disabled";
+               };
+
+               cmt1: timer@e6130000 {
+                       compatible = "renesas,r8a77970-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6130000 0 0x1004>;
+                       interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 302>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 302>;
+                       status = "disabled";
+               };
+
+               cmt2: timer@e6140000 {
+                       compatible = "renesas,r8a77970-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6140000 0 0x1004>;
+                       interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 301>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 301>;
+                       status = "disabled";
+               };
+
+               cmt3: timer@e6148000 {
+                       compatible = "renesas,r8a77970-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6148000 0 0x1004>;
+                       interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 300>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 300>;
+                       status = "disabled";
+               };
+
                cpg: clock-controller@e6150000 {
                        compatible = "renesas,r8a77970-cpg-mssr";
                        reg = <0 0xe6150000 0 0x1000>;
@@ -544,6 +614,16 @@ scif4: serial@e6c40000 {
                        status = "disabled";
                };
 
+               tpu: pwm@e6e80000 {
+                       compatible = "renesas,tpu-r8a77970", "renesas,tpu";
+                       reg = <0 0xe6e80000 0 0x148>;
+                       interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 304>;
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 304>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
 
                vin0: video@e6ef0000 {
                        compatible = "renesas,vin-r8a77970";
@@ -567,7 +647,7 @@ port@1 {
 
                                        vin0csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin0>;
+                                               remote-endpoint = <&csi40vin0>;
                                        };
                                };
                        };
@@ -595,7 +675,7 @@ port@1 {
 
                                        vin1csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin1>;
+                                               remote-endpoint = <&csi40vin1>;
                                        };
                                };
                        };
@@ -623,7 +703,7 @@ port@1 {
 
                                        vin2csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin2>;
+                                               remote-endpoint = <&csi40vin2>;
                                        };
                                };
                        };
@@ -651,7 +731,7 @@ port@1 {
 
                                        vin3csi40: endpoint@2 {
                                                reg = <2>;
-                                               remote-endpoint= <&csi40vin3>;
+                                               remote-endpoint = <&csi40vin3>;
                                        };
                                };
                        };
@@ -754,6 +834,18 @@ ipmmu_vi0: mmu@febd0000 {
                        #iommu-cells = <1>;
                };
 
+               mmc0: mmc@ee140000 {
+                       compatible = "renesas,sdhi-r8a77970",
+                                    "renesas,rcar-gen3-sdhi";
+                       reg = <0 0xee140000 0 0x2000>;
+                       interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 314>;
+                       power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+                       resets = <&cpg 314>;
+                       max-frequency = <200000000>;
+                       status = "disabled";
+               };
+
                gic: interrupt-controller@f1010000 {
                        compatible = "arm,gic-400";
                        #interrupt-cells = <3>;
index 9f25c407dfd711741d14e2b19521c60097ad5006..fe2e2c051cc93fc0668a3d3e59a3b13432ef4766 100644 (file)
@@ -45,6 +45,56 @@ vddq_vin01: regulator-1 {
                regulator-boot-on;
                regulator-always-on;
        };
+
+       d1_8v: regulator-2 {
+               compatible = "regulator-fixed";
+               regulator-name = "D1.8V";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con: endpoint {
+                               remote-endpoint = <&adv7511_out>;
+                       };
+               };
+       };
+
+       lvds-decoder {
+               compatible = "thine,thc63lvd1024";
+               vcc-supply = <&d3_3v>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               thc63lvd1024_in: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               thc63lvd1024_out: endpoint {
+                                       remote-endpoint = <&adv7511_in>;
+                               };
+                       };
+               };
+       };
+
+       x1_clk: x1-clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <148500000>;
+       };
 };
 
 &avb {
@@ -74,6 +124,13 @@ channel0 {
        };
 };
 
+&du {
+       clocks = <&cpg CPG_MOD 724>,
+                <&x1_clk>;
+       clock-names = "du.0", "dclkin.0";
+       status = "okay";
+};
+
 &extal_clk {
        clock-frequency = <16666666>;
 };
@@ -102,6 +159,55 @@ io_expander1: gpio@21 {
                gpio-controller;
                #gpio-cells = <2>;
        };
+
+       hdmi@39 {
+               compatible = "adi,adv7511w";
+               reg = <0x39>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+               avdd-supply = <&d1_8v>;
+               dvdd-supply = <&d1_8v>;
+               pvdd-supply = <&d1_8v>;
+               bgvdd-supply = <&d1_8v>;
+               dvdd-3v-supply = <&d3_3v>;
+
+               adi,input-depth = <8>;
+               adi,input-colorspace = "rgb";
+               adi,input-clock = "1x";
+               adi,input-style = <1>;
+               adi,input-justification = "evenly";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7511_in: endpoint {
+                                       remote-endpoint = <&thc63lvd1024_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               adv7511_out: endpoint {
+                                       remote-endpoint = <&hdmi_con>;
+                               };
+                       };
+               };
+       };
+};
+
+&lvds0 {
+       status = "okay";
+
+       ports {
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&thc63lvd1024_in>;
+                       };
+               };
+       };
 };
 
 &mmc0 {
@@ -117,6 +223,18 @@ &mmc0 {
        status = "okay";
 };
 
+&pciec {
+       status = "okay";
+};
+
+&pcie_bus_clk {
+       clock-frequency = <100000000>;
+};
+
+&pcie_phy {
+       status = "okay";
+};
+
 &pfc {
        avb_pins: avb {
                groups = "avb_mdio", "avb_rgmii";
@@ -156,6 +274,11 @@ scif_clk_pins: scif_clk {
        };
 };
 
+&rwdt {
+       timeout-sec = <60>;
+       status = "okay";
+};
+
 &scif0 {
        pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>;
        pinctrl-names = "default";
index 9dac42f8f80435c91e19fad0121e1e56df6855e1..dd14a41b32cdf242e779fd27330aa311e51240ce 100644 (file)
@@ -27,6 +27,72 @@ memory@48000000 {
                /* first 128MB is reserved for secure area. */
                reg = <0 0x48000000 0 0x78000000>;
        };
+
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con: endpoint {
+                               remote-endpoint = <&adv7511_out>;
+                       };
+               };
+       };
+
+       lvds-decoder {
+               compatible = "thine,thc63lvd1024";
+               vcc-supply = <&vcc3v3_d5>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               thc63lvd1024_in: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               thc63lvd1024_out: endpoint {
+                                       remote-endpoint = <&adv7511_in>;
+                               };
+                       };
+               };
+       };
+
+       osc1_clk: osc1-clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <148500000>;
+       };
+
+       vcc1v8_d4: regulator-0 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC1V8_D4";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vcc3v3_d5: regulator-1 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC3V3_D5";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
+&du {
+       clocks = <&cpg CPG_MOD 724>,
+                <&osc1_clk>;
+       clock-names = "du.0", "dclkin.0";
+       status = "okay";
 };
 
 &extal_clk {
@@ -53,6 +119,64 @@ phy0: ethernet-phy@0 {
        };
 };
 
+&i2c0 {
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       hdmi@39 {
+               compatible = "adi,adv7511w";
+               #sound-dai-cells = <0>;
+               reg = <0x39>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+               avdd-supply = <&vcc1v8_d4>;
+               dvdd-supply = <&vcc1v8_d4>;
+               pvdd-supply = <&vcc1v8_d4>;
+               bgvdd-supply = <&vcc1v8_d4>;
+               dvdd-3v-supply = <&vcc3v3_d5>;
+
+               adi,input-depth = <8>;
+               adi,input-colorspace = "rgb";
+               adi,input-clock = "1x";
+               adi,input-style = <1>;
+               adi,input-justification = "evenly";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7511_in: endpoint {
+                                       remote-endpoint = <&thc63lvd1024_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               adv7511_out: endpoint {
+                                       remote-endpoint = <&hdmi_con>;
+                               };
+                       };
+               };
+       };
+};
+
+&lvds0 {
+       status = "okay";
+
+       ports {
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&thc63lvd1024_in>;
+                       };
+               };
+       };
+};
+
 &pfc {
        gether_pins: gether {
                groups = "gether_mdio_a", "gether_rgmii",
@@ -60,6 +184,11 @@ gether_pins: gether {
                function = "gether";
        };
 
+       i2c0_pins: i2c0 {
+               groups = "i2c0";
+               function = "i2c0";
+       };
+
        scif0_pins: scif0 {
                groups = "scif0_data";
                function = "scif0";
@@ -71,6 +200,11 @@ scif_clk_pins: scif_clk {
        };
 };
 
+&rwdt {
+       timeout-sec = <60>;
+       status = "okay";
+};
+
 &scif0 {
        pinctrl-0 = <&scif0_pins>, <&scif_clk_pins>;
        pinctrl-names = "default";
index b8c9a56562f249bb084a9002f7332fc4f43dad5d..d4952b527d1468f75e93b0442514d090896e3b8d 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a77980 SoC
+ * Device Tree Source for the R-Car V3H (R8A77980) SoC
  *
  * Copyright (C) 2018 Renesas Electronics Corp.
  * Copyright (C) 2018 Cogent Embedded, Inc.
@@ -25,6 +25,13 @@ aliases {
                i2c5 = &i2c5;
        };
 
+       /* External CAN clock - to be overridden by boards that provide it */
+       can_clk: can {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -77,27 +84,36 @@ L2_CA53: cache-controller {
                };
        };
 
-       /* External CAN clock - to be overridden by boards that provide it */
-       can_clk: can {
+       extal_clk: extal {
                compatible = "fixed-clock";
                #clock-cells = <0>;
+               /* This value must be overridden by the board */
                clock-frequency = <0>;
        };
 
-       extal_clk: extal {
+       extalr_clk: extalr {
                compatible = "fixed-clock";
                #clock-cells = <0>;
                /* This value must be overridden by the board */
                clock-frequency = <0>;
        };
 
-       extalr_clk: extalr {
+       /* External PCIe clock - can be overridden by the board */
+       pcie_bus_clk: pcie_bus {
                compatible = "fixed-clock";
                #clock-cells = <0>;
-               /* This value must be overridden by the board */
                clock-frequency = <0>;
        };
 
+       pmu_a53 {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts-extended = <&gic GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
+                                     <&gic GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&a53_0>, <&a53_1>, <&a53_2>, <&a53_3>;
+       };
+
        psci {
                compatible = "arm,psci-1.0", "arm,psci-0.2";
                method = "smc";
@@ -118,6 +134,16 @@ soc {
                #size-cells = <2>;
                ranges;
 
+               rwdt: watchdog@e6020000 {
+                       compatible = "renesas,r8a77980-wdt",
+                                    "renesas,rcar-gen3-wdt";
+                       reg = <0 0xe6020000 0 0x0c>;
+                       clocks = <&cpg CPG_MOD 402>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 402>;
+                       status = "disabled";
+               };
+
                gpio0: gpio@e6050000 {
                        compatible = "renesas,gpio-r8a77980",
                                     "renesas,rcar-gen3-gpio";
@@ -213,6 +239,76 @@ pfc: pin-controller@e6060000 {
                        reg = <0 0xe6060000 0 0x50c>;
                };
 
+               cmt0: timer@e60f0000 {
+                       compatible = "renesas,r8a77980-cmt0",
+                                    "renesas,rcar-gen3-cmt0";
+                       reg = <0 0xe60f0000 0 0x1004>;
+                       interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 303>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 303>;
+                       status = "disabled";
+               };
+
+               cmt1: timer@e6130000 {
+                       compatible = "renesas,r8a77980-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6130000 0 0x1004>;
+                       interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 302>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 302>;
+                       status = "disabled";
+               };
+
+               cmt2: timer@e6140000 {
+                       compatible = "renesas,r8a77980-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6140000 0 0x1004>;
+                       interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 264 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 301>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 301>;
+                       status = "disabled";
+               };
+
+               cmt3: timer@e6148000 {
+                       compatible = "renesas,r8a77980-cmt1",
+                                    "renesas,rcar-gen3-cmt1";
+                       reg = <0 0xe6148000 0 0x1004>;
+                       interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 275 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 276 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 277 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 278 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 280 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 300>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 300>;
+                       status = "disabled";
+               };
+
                cpg: clock-controller@e6150000 {
                        compatible = "renesas,r8a77980-cpg-mssr";
                        reg = <0 0xe6150000 0 0x1000>;
@@ -418,6 +514,16 @@ hscif3: serial@e66a0000 {
                        status = "disabled";
                };
 
+               pcie_phy: pcie-phy@e65d0000 {
+                       compatible = "renesas,r8a77980-pcie-phy";
+                       reg = <0 0xe65d0000 0 0x8000>;
+                       #phy-cells = <0>;
+                       clocks = <&cpg CPG_MOD 319>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 319>;
+                       status = "disabled";
+               };
+
                canfd: can@e66c0000 {
                        compatible = "renesas,r8a77980-canfd",
                                     "renesas,rcar-gen3-canfd";
@@ -443,69 +549,6 @@ channel1 {
                        };
                };
 
-               ipmmu_ds1: mmu@e7740000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xe7740000 0 0x1000>;
-                       renesas,ipmmu-main = <&ipmmu_mm 0>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_vip0: mmu@e7b00000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xe7b00000 0 0x1000>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_vip1: mmu@e7960000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xe7960000 0 0x1000>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_ir: mmu@ff8b0000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xff8b0000 0 0x1000>;
-                       renesas,ipmmu-main = <&ipmmu_mm 3>;
-                       power-domains = <&sysc R8A77980_PD_A3IR>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_mm: mmu@e67b0000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xe67b0000 0 0x1000>;
-                       interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_rt: mmu@ffc80000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xffc80000 0 0x1000>;
-                       renesas,ipmmu-main = <&ipmmu_mm 10>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_vc0: mmu@fe6b0000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xfe6b0000 0 0x1000>;
-                       renesas,ipmmu-main = <&ipmmu_mm 12>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
-               ipmmu_vi0: mmu@febd0000 {
-                       compatible = "renesas,ipmmu-r8a77980";
-                       reg = <0 0xfebd0000 0 0x1000>;
-                       renesas,ipmmu-main = <&ipmmu_mm 14>;
-                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
-                       #iommu-cells = <1>;
-               };
-
                avb: ethernet@e6800000 {
                        compatible = "renesas,etheravb-r8a77980",
                                     "renesas,etheravb-rcar-gen3";
@@ -623,6 +666,313 @@ scif4: serial@e6c40000 {
                        status = "disabled";
                };
 
+               tpu: pwm@e6e80000 {
+                       compatible = "renesas,tpu-r8a77980", "renesas,tpu";
+                       reg = <0 0xe6e80000 0 0x148>;
+                       interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 304>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 304>;
+                       #pwm-cells = <3>;
+                       status = "disabled";
+               };
+
+               vin0: video@e6ef0000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef0000 0 0x1000>;
+                       interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 811>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 811>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin0csi40: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi40vin0>;
+                                       };
+                               };
+                       };
+               };
+
+               vin1: video@e6ef1000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef1000 0 0x1000>;
+                       interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 810>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       status = "disabled";
+                       resets = <&cpg 810>;
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin1csi40: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi40vin1>;
+                                       };
+                               };
+                       };
+               };
+
+               vin2: video@e6ef2000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef2000 0 0x1000>;
+                       interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 809>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 809>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin2csi40: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi40vin2>;
+                                       };
+                               };
+                       };
+               };
+
+               vin3: video@e6ef3000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef3000 0 0x1000>;
+                       interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 808>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 808>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin3csi40: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi40vin3>;
+                                       };
+                               };
+                       };
+               };
+
+               vin4: video@e6ef4000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef4000 0 0x1000>;
+                       interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 807>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 807>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin4csi41: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi41vin4>;
+                                       };
+                               };
+                       };
+               };
+
+               vin5: video@e6ef5000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef5000 0 0x1000>;
+                       interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 806>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 806>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin5csi41: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi41vin5>;
+                                       };
+                               };
+                       };
+               };
+
+               vin6: video@e6ef6000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef6000 0 0x1000>;
+                       interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 805>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 805>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin6csi41: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi41vin6>;
+                                       };
+                               };
+                       };
+               };
+
+               vin7: video@e6ef7000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef7000 0 0x1000>;
+                       interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 804>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 804>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       vin7csi41: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&csi41vin7>;
+                                       };
+                               };
+                       };
+               };
+
+               vin8: video@e6ef8000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef8000 0 0x1000>;
+                       interrupts = <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 628>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 628>;
+                       status = "disabled";
+               };
+
+               vin9: video@e6ef9000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6ef9000 0 0x1000>;
+                       interrupts = <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 627>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 627>;
+                       status = "disabled";
+               };
+
+               vin10: video@e6efa000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6efa000 0 0x1000>;
+                       interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 625>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 625>;
+                       status = "disabled";
+               };
+
+               vin11: video@e6efb000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6efb000 0 0x1000>;
+                       interrupts = <GIC_SPI 296 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 618>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 618>;
+                       status = "disabled";
+               };
+
+               vin12: video@e6efc000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6efc000 0 0x1000>;
+                       interrupts = <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 612>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 612>;
+                       status = "disabled";
+               };
+
+               vin13: video@e6efd000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6efd000 0 0x1000>;
+                       interrupts = <GIC_SPI 299 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 608>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 608>;
+                       status = "disabled";
+               };
+
+               vin14: video@e6efe000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6efe000 0 0x1000>;
+                       interrupts = <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 605>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 605>;
+                       status = "disabled";
+               };
+
+               vin15: video@e6eff000 {
+                       compatible = "renesas,vin-r8a77980";
+                       reg = <0 0xe6eff000 0 0x1000>;
+                       interrupts = <GIC_SPI 302 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 604>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 604>;
+                       status = "disabled";
+               };
+
                dmac1: dma-controller@e7300000 {
                        compatible = "renesas,dmac-r8a77980",
                                     "renesas,rcar-dmac";
@@ -655,6 +1005,14 @@ GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 218>;
                        #dma-cells = <1>;
                        dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
+                              <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
+                              <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
+                              <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
+                              <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
+                              <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
+                              <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
+                              <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
                };
 
                dmac2: dma-controller@e7310000 {
@@ -689,6 +1047,14 @@ GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 217>;
                        #dma-cells = <1>;
                        dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
+                              <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
+                              <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
+                              <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
+                              <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
+                              <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
+                              <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
+                              <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
                };
 
                gether: ethernet@e7400000 {
@@ -703,6 +1069,69 @@ gether: ethernet@e7400000 {
                        status = "disabled";
                };
 
+               ipmmu_ds1: mmu@e7740000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xe7740000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 0>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_ir: mmu@ff8b0000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xff8b0000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 3>;
+                       power-domains = <&sysc R8A77980_PD_A3IR>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_mm: mmu@e67b0000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xe67b0000 0 0x1000>;
+                       interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_rt: mmu@ffc80000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xffc80000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 10>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vc0: mmu@fe6b0000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xfe6b0000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 12>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vi0: mmu@febd0000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xfebd0000 0 0x1000>;
+                       renesas,ipmmu-main = <&ipmmu_mm 14>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vip0: mmu@e7b00000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xe7b00000 0 0x1000>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
+               ipmmu_vip1: mmu@e7960000 {
+                       compatible = "renesas,ipmmu-r8a77980";
+                       reg = <0 0xe7960000 0 0x1000>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       #iommu-cells = <1>;
+               };
+
                mmc0: mmc@ee140000 {
                        compatible = "renesas,sdhi-r8a77980",
                                     "renesas,rcar-gen3-sdhi";
@@ -732,6 +1161,38 @@ gic: interrupt-controller@f1010000 {
                        resets = <&cpg 408>;
                };
 
+               pciec: pcie@fe000000 {
+                       compatible = "renesas,pcie-r8a77980",
+                                    "renesas,pcie-rcar-gen3";
+                       reg = <0 0xfe000000 0 0x80000>;
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       bus-range = <0x00 0xff>;
+                       device_type = "pci";
+                       ranges = <
+                               0x01000000 0 0x00000000 0 0xfe100000 0 0x0100000
+                               0x02000000 0 0xfe200000 0 0xfe200000 0 0x0200000
+                               0x02000000 0 0x30000000 0 0x30000000 0 0x8000000
+                               0x42000000 0 0x38000000 0 0x38000000 0 0x8000000
+                       >;
+                       dma-ranges = <0x42000000 0 0x40000000 0 0x40000000
+                                     0 0x80000000>;
+                       interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 148
+                                        IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
+                       clock-names = "pcie", "pcie_bus";
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 319>;
+                       phys = <&pcie_phy>;
+                       phy-names = "pcie";
+                       status = "disabled";
+               };
+
                vspd0: vsp@fea20000 {
                        compatible = "renesas,vsp2";
                        reg = <0 0xfea20000 0 0x5000>;
@@ -750,6 +1211,84 @@ fcpvd0: fcp@fea27000 {
                        resets = <&cpg 603>;
                };
 
+               csi40: csi2@feaa0000 {
+                       compatible = "renesas,r8a77980-csi2";
+                       reg = <0 0xfeaa0000 0 0x10000>;
+                       interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 716>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 716>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       csi40vin0: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&vin0csi40>;
+                                       };
+                                       csi40vin1: endpoint@1 {
+                                               reg = <1>;
+                                               remote-endpoint = <&vin1csi40>;
+                                       };
+                                       csi40vin2: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&vin2csi40>;
+                                       };
+                                       csi40vin3: endpoint@3 {
+                                               reg = <3>;
+                                               remote-endpoint = <&vin3csi40>;
+                                       };
+                               };
+                       };
+               };
+
+               csi41: csi2@feab0000 {
+                       compatible = "renesas,r8a77980-csi2";
+                       reg = <0 0xfeab0000 0 0x10000>;
+                       interrupts = <GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 715>;
+                       power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
+                       resets = <&cpg 715>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       csi41vin4: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&vin4csi41>;
+                                       };
+                                       csi41vin5: endpoint@1 {
+                                               reg = <1>;
+                                               remote-endpoint = <&vin5csi41>;
+                                       };
+                                       csi41vin6: endpoint@2 {
+                                               reg = <2>;
+                                               remote-endpoint = <&vin6csi41>;
+                                       };
+                                       csi41vin7: endpoint@3 {
+                                               reg = <3>;
+                                               remote-endpoint = <&vin7csi41>;
+                                       };
+                               };
+                       };
+               };
+
                du: display@feb00000 {
                        compatible = "renesas,du-r8a77980",
                                     "renesas,du-r8a77970";
index 2bc3a4884b0031f713391f046dabc2712f54f0aa..f342dd85b152804d3f5c0df483618c98170ce4e6 100644 (file)
@@ -28,6 +28,111 @@ memory@48000000 {
                /* first 128MB is reserved for secure area. */
                reg = <0x0 0x48000000 0x0 0x38000000>;
        };
+
+       cvbs-in {
+               compatible = "composite-video-connector";
+               label = "CVBS IN";
+
+               port {
+                       cvbs_con: endpoint {
+                               remote-endpoint = <&adv7482_ain7>;
+                       };
+               };
+       };
+
+       hdmi-in {
+               compatible = "hdmi-connector";
+               label = "HDMI IN";
+               type = "a";
+
+               port {
+                       hdmi_in_con: endpoint {
+                               remote-endpoint = <&adv7482_hdmi>;
+                       };
+               };
+       };
+
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con_out: endpoint {
+                               remote-endpoint = <&adv7511_out>;
+                       };
+               };
+       };
+
+       lvds-decoder {
+               compatible = "thine,thc63lvd1024";
+               vcc-supply = <&reg_3p3v>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               thc63lvd1024_in: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               thc63lvd1024_out: endpoint {
+                                       remote-endpoint = <&adv7511_in>;
+                               };
+                       };
+               };
+       };
+
+       vga {
+               compatible = "vga-connector";
+
+               port {
+                       vga_in: endpoint {
+                               remote-endpoint = <&adv7123_out>;
+                       };
+               };
+       };
+
+       vga-encoder {
+               compatible = "adi,adv7123";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7123_in: endpoint {
+                                       remote-endpoint = <&du_out_rgb>;
+                               };
+                       };
+                       port@1 {
+                               reg = <1>;
+                               adv7123_out: endpoint {
+                                       remote-endpoint = <&vga_in>;
+                               };
+                       };
+               };
+       };
+
+       reg_3p3v: regulator1 {
+               compatible = "regulator-fixed";
+               regulator-name = "fixed-3.3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       x13_clk: x13 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <74250000>;
+       };
 };
 
 &avb {
@@ -47,6 +152,41 @@ phy0: ethernet-phy@0 {
        };
 };
 
+&csi40 {
+       status = "okay";
+
+       ports {
+               port@0 {
+                       reg = <0>;
+
+                       csi40_in: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                               remote-endpoint = <&adv7482_txa>;
+                       };
+               };
+       };
+};
+
+&du {
+       pinctrl-0 = <&du_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       clocks = <&cpg CPG_MOD 724>,
+                <&cpg CPG_MOD 723>,
+                <&x13_clk>;
+       clock-names = "du.0", "du.1", "dclkin.0";
+
+       ports {
+               port@0 {
+                       endpoint {
+                               remote-endpoint = <&adv7123_in>;
+                       };
+               };
+       };
+};
+
 &ehci0 {
        status = "okay";
 };
@@ -55,6 +195,105 @@ &extal_clk {
        clock-frequency = <48000000>;
 };
 
+&i2c0 {
+       status = "okay";
+
+       hdmi-encoder@39 {
+               compatible = "adi,adv7511w";
+               reg = <0x39>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+
+               adi,input-depth = <8>;
+               adi,input-colorspace = "rgb";
+               adi,input-clock = "1x";
+               adi,input-style = <1>;
+               adi,input-justification = "evenly";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7511_in: endpoint {
+                                       remote-endpoint = <&thc63lvd1024_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               adv7511_out: endpoint {
+                                       remote-endpoint = <&hdmi_con_out>;
+                               };
+                       };
+               };
+       };
+
+       video-receiver@70 {
+               compatible = "adi,adv7482";
+               reg = <0x70>;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               interrupt-parent = <&gpio0>;
+               interrupt-names = "intrq1", "intrq2";
+               interrupts = <7 IRQ_TYPE_LEVEL_LOW>,
+                            <17 IRQ_TYPE_LEVEL_LOW>;
+
+               port@7 {
+                       reg = <7>;
+
+                       adv7482_ain7: endpoint {
+                               remote-endpoint = <&cvbs_con>;
+                       };
+               };
+
+               port@8 {
+                       reg = <8>;
+
+                       adv7482_hdmi: endpoint {
+                               remote-endpoint = <&hdmi_in_con>;
+                       };
+               };
+
+               port@a {
+                       reg = <0xa>;
+
+                       adv7482_txa: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1 2>;
+                               remote-endpoint = <&csi40_in>;
+                       };
+               };
+       };
+};
+
+&lvds0 {
+       status = "okay";
+
+       clocks = <&cpg CPG_MOD 727>,
+                <&x13_clk>,
+                <&extal_clk>;
+       clock-names = "fck", "dclkin.0", "extal";
+
+       ports {
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&thc63lvd1024_in>;
+                       };
+               };
+       };
+};
+
+&lvds1 {
+       clocks = <&cpg CPG_MOD 727>,
+                <&x13_clk>,
+                <&extal_clk>;
+       clock-names = "fck", "dclkin.0", "extal";
+};
+
 &ohci0 {
        status = "okay";
 };
@@ -67,6 +306,21 @@ mux {
                };
        };
 
+       du_pins: du {
+               groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
+               function = "du";
+       };
+
+       pwm3_pins: pwm3 {
+               groups = "pwm3_b";
+               function = "pwm3";
+       };
+
+       pwm5_pins: pwm5 {
+               groups = "pwm5_a";
+               function = "pwm5";
+       };
+
        usb0_pins: usb {
                groups = "usb0_b";
                function = "usb0";
@@ -78,6 +332,20 @@ usb30_pins: usb30 {
        };
 };
 
+&pwm3 {
+       pinctrl-0 = <&pwm3_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&pwm5 {
+       pinctrl-0 = <&pwm5_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &rwdt {
        timeout-sec = <60>;
        status = "okay";
@@ -94,6 +362,10 @@ &usb2_phy0 {
        status = "okay";
 };
 
+&vin4 {
+       status = "okay";
+};
+
 &xhci0 {
        pinctrl-0 = <&usb30_pins>;
        pinctrl-names = "default";
index ae89260baad9fd4d3ad1ec6dbef9c6a7bf1e118f..9509dc05665f59c27a6201e3f4d0d5b1ae517973 100644 (file)
@@ -1,11 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 /*
- * Device Tree Source for the r8a77990 SoC
+ * Device Tree Source for the R-Car E3 (R8A77990) SoC
  *
  * Copyright (C) 2018 Renesas Electronics Corp.
  */
 
-#include <dt-bindings/clock/renesas-cpg-mssr.h>
+#include <dt-bindings/clock/r8a77990-cpg-mssr.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/r8a77990-sysc.h>
 
@@ -14,6 +14,17 @@ / {
        #address-cells = <2>;
        #size-cells = <2>;
 
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+               i2c6 = &i2c6;
+               i2c7 = &i2c7;
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -22,7 +33,7 @@ a53_0: cpu@0 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0>;
                        device_type = "cpu";
-                       power-domains = <&sysc 5>;
+                       power-domains = <&sysc R8A77990_PD_CA53_CPU0>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
                };
@@ -31,14 +42,14 @@ a53_1: cpu@1 {
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <1>;
                        device_type = "cpu";
-                       power-domains = <&sysc 6>;
+                       power-domains = <&sysc R8A77990_PD_CA53_CPU1>;
                        next-level-cache = <&L2_CA53>;
                        enable-method = "psci";
                };
 
                L2_CA53: cache-controller-0 {
                        compatible = "cache";
-                       power-domains = <&sysc 21>;
+                       power-domains = <&sysc R8A77990_PD_CA53_SCU>;
                        cache-unified;
                        cache-level = <2>;
                };
@@ -63,6 +74,13 @@ psci {
                method = "smc";
        };
 
+       /* External SCIF clock - to be overridden by boards that provide it */
+       scif_clk: scif {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <0>;
+       };
+
        soc: soc {
                compatible = "simple-bus";
                interrupt-parent = <&gic>;
@@ -75,7 +93,7 @@ rwdt: watchdog@e6020000 {
                                     "renesas,rcar-gen3-wdt";
                        reg = <0 0xe6020000 0 0x0c>;
                        clocks = <&cpg CPG_MOD 402>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 402>;
                        status = "disabled";
                };
@@ -91,7 +109,7 @@ gpio0: gpio@e6050000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 912>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 912>;
                };
 
@@ -106,7 +124,7 @@ gpio1: gpio@e6051000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 911>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 911>;
                };
 
@@ -121,7 +139,7 @@ gpio2: gpio@e6052000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 910>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 910>;
                };
 
@@ -136,7 +154,7 @@ gpio3: gpio@e6053000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 909>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 909>;
                };
 
@@ -151,7 +169,7 @@ gpio4: gpio@e6054000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 908>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 908>;
                };
 
@@ -166,7 +184,7 @@ gpio5: gpio@e6055000 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 907>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 907>;
                };
 
@@ -181,10 +199,122 @@ gpio6: gpio@e6055400 {
                        #interrupt-cells = <2>;
                        interrupt-controller;
                        clocks = <&cpg CPG_MOD 906>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 906>;
                };
 
+               i2c0: i2c@e6500000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6500000 0 0x40>;
+                       interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 931>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 931>;
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c1: i2c@e6508000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6508000 0 0x40>;
+                       interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 930>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 930>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c2: i2c@e6510000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6510000 0 0x40>;
+                       interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 929>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 929>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c3: i2c@e66d0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66d0000 0 0x40>;
+                       interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 928>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 928>;
+                       i2c-scl-internal-delay-ns = <110>;
+                       status = "disabled";
+               };
+
+               i2c4: i2c@e66d8000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66d8000 0 0x40>;
+                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 927>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 927>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c5: i2c@e66e0000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e0000 0 0x40>;
+                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 919>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 919>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c6: i2c@e66e8000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe66e8000 0 0x40>;
+                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 918>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 918>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
+               i2c7: i2c@e6690000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "renesas,i2c-r8a77990",
+                                    "renesas,rcar-gen3-i2c";
+                       reg = <0 0xe6690000 0 0x40>;
+                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 1003>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 1003>;
+                       i2c-scl-internal-delay-ns = <6>;
+                       status = "disabled";
+               };
+
                pfc: pin-controller@e6060000 {
                        compatible = "renesas,pfc-r8a77990";
                        reg = <0 0xe6060000 0 0x508>;
@@ -211,6 +341,132 @@ sysc: system-controller@e6180000 {
                        #power-domain-cells = <1>;
                };
 
+               dmac0: dma-controller@e6700000 {
+                       compatible = "renesas,dmac-r8a77990",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe6700000 0 0x10000>;
+                       interrupts = <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 202 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 203 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 219>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 219>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+                       iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
+                              <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
+                              <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
+                              <&ipmmu_ds0 6>, <&ipmmu_ds0 7>,
+                              <&ipmmu_ds0 8>, <&ipmmu_ds0 9>,
+                              <&ipmmu_ds0 10>, <&ipmmu_ds0 11>,
+                              <&ipmmu_ds0 12>, <&ipmmu_ds0 13>,
+                              <&ipmmu_ds0 14>, <&ipmmu_ds0 15>;
+               };
+
+               dmac1: dma-controller@e7300000 {
+                       compatible = "renesas,dmac-r8a77990",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7300000 0 0x10000>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 218>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 218>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
+                              <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
+                              <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
+                              <&ipmmu_ds1 6>, <&ipmmu_ds1 7>,
+                              <&ipmmu_ds1 8>, <&ipmmu_ds1 9>,
+                              <&ipmmu_ds1 10>, <&ipmmu_ds1 11>,
+                              <&ipmmu_ds1 12>, <&ipmmu_ds1 13>,
+                              <&ipmmu_ds1 14>, <&ipmmu_ds1 15>;
+               };
+
+               dmac2: dma-controller@e7310000 {
+                       compatible = "renesas,dmac-r8a77990",
+                                    "renesas,rcar-dmac";
+                       reg = <0 0xe7310000 0 0x10000>;
+                       interrupts = <GIC_SPI 416 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 417 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 420 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 422 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 426 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 427 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 428 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 431 IRQ_TYPE_LEVEL_HIGH
+                                     GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "error",
+                                       "ch0", "ch1", "ch2", "ch3",
+                                       "ch4", "ch5", "ch6", "ch7",
+                                       "ch8", "ch9", "ch10", "ch11",
+                                       "ch12", "ch13", "ch14", "ch15";
+                       clocks = <&cpg CPG_MOD 217>;
+                       clock-names = "fck";
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 217>;
+                       #dma-cells = <1>;
+                       dma-channels = <16>;
+                       iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
+                              <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
+                              <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
+                              <&ipmmu_ds1 22>, <&ipmmu_ds1 23>,
+                              <&ipmmu_ds1 24>, <&ipmmu_ds1 25>,
+                              <&ipmmu_ds1 26>, <&ipmmu_ds1 27>,
+                              <&ipmmu_ds1 28>, <&ipmmu_ds1 29>,
+                              <&ipmmu_ds1 30>, <&ipmmu_ds1 31>;
+               };
+
                ipmmu_ds0: mmu@e6740000 {
                        compatible = "renesas,ipmmu-r8a77990";
                        reg = <0 0xe6740000 0 0x1000>;
@@ -329,7 +585,7 @@ avb: ethernet@e6800000 {
                                          "ch20", "ch21", "ch22", "ch23",
                                          "ch24";
                        clocks = <&cpg CPG_MOD 812>;
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 812>;
                        phy-mode = "rgmii";
                        #address-cells = <1>;
@@ -337,18 +593,191 @@ avb: ethernet@e6800000 {
                        status = "disabled";
                };
 
+               pwm0: pwm@e6e30000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e30000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm1: pwm@e6e31000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e31000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm2: pwm@e6e32000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e32000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm3: pwm@e6e33000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e33000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm4: pwm@e6e34000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e34000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm5: pwm@e6e35000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e35000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
+               pwm6: pwm@e6e36000 {
+                       compatible = "renesas,pwm-r8a77990", "renesas,pwm-rcar";
+                       reg = <0 0xe6e36000 0 0x8>;
+                       clocks = <&cpg CPG_MOD 523>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 523>;
+                       #pwm-cells = <2>;
+                       status = "disabled";
+               };
+
                scif2: serial@e6e88000 {
                        compatible = "renesas,scif-r8a77990",
                                     "renesas,rcar-gen3-scif", "renesas,scif";
                        reg = <0 0xe6e88000 0 64>;
                        interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 310>;
-                       clock-names = "fck";
-                       power-domains = <&sysc 32>;
+                       clocks = <&cpg CPG_MOD 310>,
+                                <&cpg CPG_CORE R8A77990_CLK_S3D1C>,
+                                <&scif_clk>;
+                       clock-names = "fck", "brg_int", "scif_clk";
+
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 310>;
                        status = "disabled";
                };
 
+               msiof0: spi@e6e90000 {
+                       compatible = "renesas,msiof-r8a77990",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6e90000 0 0x0064>;
+                       interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 211>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 211>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof1: spi@e6ea0000 {
+                       compatible = "renesas,msiof-r8a77990",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6ea0000 0 0x0064>;
+                       interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 210>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 210>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof2: spi@e6c00000 {
+                       compatible = "renesas,msiof-r8a77990",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6c00000 0 0x0064>;
+                       interrupts = <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 209>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 209>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               msiof3: spi@e6c10000 {
+                       compatible = "renesas,msiof-r8a77990",
+                                    "renesas,rcar-gen3-msiof";
+                       reg = <0 0xe6c10000 0 0x0064>;
+                       interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 208>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 208>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+               };
+
+               vin4: video@e6ef4000 {
+                       compatible = "renesas,vin-r8a77990";
+                       reg = <0 0xe6ef4000 0 0x1000>;
+                       interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 807>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 807>;
+                       renesas,id = <4>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       reg = <1>;
+
+                                       vin4csi40: endpoint {
+                                               remote-endpoint= <&csi40vin4>;
+                                       };
+                               };
+                       };
+               };
+
+               vin5: video@e6ef5000 {
+                       compatible = "renesas,vin-r8a77990";
+                       reg = <0 0xe6ef5000 0 0x1000>;
+                       interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 806>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 806>;
+                       renesas,id = <5>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       reg = <1>;
+
+                                       vin5csi40: endpoint {
+                                               remote-endpoint= <&csi40vin5>;
+                                       };
+                               };
+                       };
+               };
+
                xhci0: usb@ee000000 {
                        compatible = "renesas,xhci-r8a77990",
                                     "renesas,rcar-gen3-xhci";
@@ -364,11 +793,11 @@ ohci0: usb@ee080000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee080000 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
-                       power-domains = <&sysc 32>;
-                       resets = <&cpg 703>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -376,12 +805,12 @@ ehci0: usb@ee080100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee080100 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        companion = <&ohci0>;
-                       power-domains = <&sysc 32>;
-                       resets = <&cpg 703>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -390,9 +819,9 @@ usb2_phy0: usb-phy@ee080200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee080200 0 0x700>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
-                       power-domains = <&sysc 32>;
-                       resets = <&cpg 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -410,10 +839,208 @@ gic: interrupt-controller@f1010000 {
                                        (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
                        clocks = <&cpg CPG_MOD 408>;
                        clock-names = "clk";
-                       power-domains = <&sysc 32>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
                        resets = <&cpg 408>;
                };
 
+               vspb0: vsp@fe960000 {
+                       compatible = "renesas,vsp2";
+                       reg = <0 0xfe960000 0 0x8000>;
+                       interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 626>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 626>;
+                       renesas,fcp = <&fcpvb0>;
+               };
+
+               fcpvb0: fcp@fe96f000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfe96f000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 607>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 607>;
+                       iommus = <&ipmmu_vp0 5>;
+               };
+
+               vspi0: vsp@fe9a0000 {
+                       compatible = "renesas,vsp2";
+                       reg = <0 0xfe9a0000 0 0x8000>;
+                       interrupts = <GIC_SPI 444 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 631>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 631>;
+                       renesas,fcp = <&fcpvi0>;
+               };
+
+               fcpvi0: fcp@fe9af000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfe9af000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 611>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 611>;
+                       iommus = <&ipmmu_vp0 8>;
+               };
+
+               vspd0: vsp@fea20000 {
+                       compatible = "renesas,vsp2";
+                       reg = <0 0xfea20000 0 0x7000>;
+                       interrupts = <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 623>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 623>;
+                       renesas,fcp = <&fcpvd0>;
+               };
+
+               fcpvd0: fcp@fea27000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfea27000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 603>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 603>;
+                       iommus = <&ipmmu_vi0 8>;
+               };
+
+               vspd1: vsp@fea28000 {
+                       compatible = "renesas,vsp2";
+                       reg = <0 0xfea28000 0 0x7000>;
+                       interrupts = <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 622>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 622>;
+                       renesas,fcp = <&fcpvd1>;
+               };
+
+               fcpvd1: fcp@fea2f000 {
+                       compatible = "renesas,fcpv";
+                       reg = <0 0xfea2f000 0 0x200>;
+                       clocks = <&cpg CPG_MOD 602>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 602>;
+                       iommus = <&ipmmu_vi0 9>;
+               };
+
+               csi40: csi2@feaa0000 {
+                       compatible = "renesas,r8a77990-csi2", "renesas,rcar-gen3-csi2";
+                       reg = <0 0xfeaa0000 0 0x10000>;
+                       interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 716>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 716>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@1 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       reg = <1>;
+
+                                       csi40vin4: endpoint@0 {
+                                               reg = <0>;
+                                               remote-endpoint = <&vin4csi40>;
+                                       };
+                                       csi40vin5: endpoint@1 {
+                                               reg = <1>;
+                                               remote-endpoint = <&vin5csi40>;
+                                       };
+                               };
+                       };
+               };
+
+               du: display@feb00000 {
+                       compatible = "renesas,du-r8a77990";
+                       reg = <0 0xfeb00000 0 0x80000>;
+                       interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cpg CPG_MOD 724>,
+                                <&cpg CPG_MOD 723>;
+                       clock-names = "du.0", "du.1";
+                       vsps = <&vspd0 0 &vspd1 0>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       du_out_rgb: endpoint {
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       du_out_lvds0: endpoint {
+                                               remote-endpoint = <&lvds0_in>;
+                                       };
+                               };
+
+                               port@2 {
+                                       reg = <2>;
+                                       du_out_lvds1: endpoint {
+                                               remote-endpoint = <&lvds1_in>;
+                                       };
+                               };
+                       };
+               };
+
+               lvds0: lvds-encoder@feb90000 {
+                       compatible = "renesas,r8a77990-lvds";
+                       reg = <0 0xfeb90000 0 0x20>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 727>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds0_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds0>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       lvds0_out: endpoint {
+                                       };
+                               };
+                       };
+               };
+
+               lvds1: lvds-encoder@feb90100 {
+                       compatible = "renesas,r8a77990-lvds";
+                       reg = <0 0xfeb90100 0 0x20>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A77990_PD_ALWAYS_ON>;
+                       resets = <&cpg 726>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds1_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds1>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       lvds1_out: endpoint {
+                                       };
+                               };
+                       };
+               };
+
                prr: chipid@fff00044 {
                        compatible = "renesas,prr";
                        reg = <0 0xfff00044 0 4>;
index a8e8f2669d4c53ae7492dc489107d3fbac30eebe..2405eaad0296cf4ee6a00f62a1fb43bb0a007922 100644 (file)
@@ -2,7 +2,7 @@
 /*
  * Device Tree Source for the Draak board
  *
- * Copyright (C) 2016 Renesas Electronics Corp.
+ * Copyright (C) 2016-2018 Renesas Electronics Corp.
  * Copyright (C) 2017 Glider bvba
  */
 
@@ -24,55 +24,58 @@ chosen {
                stdout-path = "serial0:115200n8";
        };
 
-       vga {
-               compatible = "vga-connector";
+       composite-in {
+               compatible = "composite-video-connector";
 
                port {
-                       vga_in: endpoint {
-                               remote-endpoint = <&adv7123_out>;
+                       composite_con_in: endpoint {
+                               remote-endpoint = <&adv7180_in>;
                        };
                };
        };
 
-       vga-encoder {
-               compatible = "adi,adv7123";
-
-               ports {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
+       hdmi-in {
+               compatible = "hdmi-connector";
+               type = "a";
 
-                       port@0 {
-                               reg = <0>;
-                               adv7123_in: endpoint {
-                                       remote-endpoint = <&du_out_rgb>;
-                               };
-                       };
-                       port@1 {
-                               reg = <1>;
-                               adv7123_out: endpoint {
-                                       remote-endpoint = <&vga_in>;
-                               };
+               port {
+                       hdmi_con_in: endpoint {
+                               remote-endpoint = <&adv7612_in>;
                        };
                };
        };
 
-       composite-in {
-               compatible = "composite-video-connector";
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "a";
 
                port {
-                       composite_con_in: endpoint {
-                               remote-endpoint = <&adv7180_in>;
+                       hdmi_con_out: endpoint {
+                               remote-endpoint = <&adv7511_out>;
                        };
                };
        };
 
-       hdmi-in {
-               compatible = "hdmi-connector";
-               type = "a";
+       lvds-decoder {
+               compatible = "thine,thc63lvd1024";
+               vcc-supply = <&reg_3p3v>;
 
-               port {
-                       hdmi_con_in: endpoint {
-                               remote-endpoint = <&adv7612_in>;
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               thc63lvd1024_in: endpoint {
+                                       remote-endpoint = <&lvds0_out>;
+                               };
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               thc63lvd1024_out: endpoint {
+                                       remote-endpoint = <&adv7511_in>;
+                               };
                        };
                };
        };
@@ -101,76 +104,86 @@ reg_3p3v: regulator1 {
                regulator-always-on;
        };
 
-       x12_clk: x12 {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <74250000>;
-       };
-};
-
-&extal_clk {
-       clock-frequency = <48000000>;
-};
+       vga {
+               compatible = "vga-connector";
 
-&pfc {
-       avb0_pins: avb {
-               mux {
-                       groups = "avb0_link", "avb0_mdio", "avb0_mii";
-                       function = "avb0";
+               port {
+                       vga_in: endpoint {
+                               remote-endpoint = <&adv7123_out>;
+                       };
                };
        };
 
-       du_pins: du {
-               groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
-               function = "du";
-       };
+       vga-encoder {
+               compatible = "adi,adv7123";
 
-       i2c0_pins: i2c0 {
-               groups = "i2c0";
-               function = "i2c0";
-       };
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
 
-       i2c1_pins: i2c1 {
-               groups = "i2c1";
-               function = "i2c1";
+                       port@0 {
+                               reg = <0>;
+                               adv7123_in: endpoint {
+                                       remote-endpoint = <&du_out_rgb>;
+                               };
+                       };
+                       port@1 {
+                               reg = <1>;
+                               adv7123_out: endpoint {
+                                       remote-endpoint = <&vga_in>;
+                               };
+                       };
+               };
        };
 
-       pwm0_pins: pwm0 {
-               groups = "pwm0_c";
-               function = "pwm0";
+       x12_clk: x12 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <74250000>;
        };
+};
 
-       pwm1_pins: pwm1 {
-               groups = "pwm1_c";
-               function = "pwm1";
-       };
+&avb {
+       pinctrl-0 = <&avb0_pins>;
+       pinctrl-names = "default";
+       renesas,no-ether-link;
+       phy-handle = <&phy0>;
+       phy-mode = "rgmii-txid";
+       status = "okay";
 
-       scif2_pins: scif2 {
-               groups = "scif2_data";
-               function = "scif2";
+       phy0: ethernet-phy@0 {
+               rxc-skew-ps = <1500>;
+               reg = <0>;
+               interrupt-parent = <&gpio5>;
+               interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
        };
+};
 
-       sdhi2_pins: sd2 {
-               groups = "mmc_data8", "mmc_ctrl";
-               function = "mmc";
-               power-source = <1800>;
-       };
+&du {
+       pinctrl-0 = <&du_pins>;
+       pinctrl-names = "default";
+       status = "okay";
 
-       sdhi2_pins_uhs: sd2_uhs {
-               groups = "mmc_data8", "mmc_ctrl";
-               function = "mmc";
-               power-source = <1800>;
-       };
+       clocks = <&cpg CPG_MOD 724>,
+                <&cpg CPG_MOD 723>,
+                <&x12_clk>;
+       clock-names = "du.0", "du.1", "dclkin.0";
 
-       usb0_pins: usb0 {
-               groups = "usb0";
-               function = "usb0";
+       ports {
+               port@0 {
+                       endpoint {
+                               remote-endpoint = <&adv7123_in>;
+                       };
+               };
        };
+};
 
-       vin4_pins_cvbs: vin4 {
-               groups = "vin4_data8", "vin4_sync", "vin4_clk";
-               function = "vin4";
-       };
+&ehci0 {
+       status = "okay";
+};
+
+&extal_clk {
+       clock-frequency = <48000000>;
 };
 
 &i2c0 {
@@ -178,12 +191,6 @@ &i2c0 {
        pinctrl-names = "default";
        status = "okay";
 
-       eeprom@50 {
-               compatible = "rohm,br24t01", "atmel,24c01";
-               reg = <0x50>;
-               pagesize = <8>;
-       };
-
        composite-in@20 {
                compatible = "adi,adv7180cp";
                reg = <0x20>;
@@ -218,6 +225,43 @@ adv7180_out: endpoint {
 
        };
 
+       hdmi-encoder@39 {
+               compatible = "adi,adv7511w";
+               reg = <0x39>, <0x3f>, <0x38>, <0x3c>;
+               reg-names = "main", "edid", "packet", "cec";
+               interrupt-parent = <&gpio1>;
+               interrupts = <28 IRQ_TYPE_LEVEL_LOW>;
+
+               /* Depends on LVDS */
+               max-clock = <135000000>;
+               min-vrefresh = <50>;
+
+               adi,input-depth = <8>;
+               adi,input-colorspace = "rgb";
+               adi,input-clock = "1x";
+               adi,input-style = <1>;
+               adi,input-justification = "evenly";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7511_in: endpoint {
+                                       remote-endpoint = <&thc63lvd1024_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               adv7511_out: endpoint {
+                                       remote-endpoint = <&hdmi_con_out>;
+                               };
+                       };
+               };
+       };
+
        hdmi-decoder@4c {
                compatible = "adi,adv7612";
                reg = <0x4c>;
@@ -254,6 +298,12 @@ adv7612_out: endpoint {
                        };
                };
        };
+
+       eeprom@50 {
+               compatible = "rohm,br24t01", "atmel,24c01";
+               reg = <0x50>;
+               pagesize = <8>;
+       };
 };
 
 &i2c1 {
@@ -262,47 +312,112 @@ &i2c1 {
        status = "okay";
 };
 
-&du {
-       pinctrl-0 = <&du_pins>;
-       pinctrl-names = "default";
+&lvds0 {
        status = "okay";
 
-       clocks = <&cpg CPG_MOD 724>,
-                <&cpg CPG_MOD 723>,
-                <&x12_clk>;
-       clock-names = "du.0", "du.1", "dclkin.0";
+       clocks = <&cpg CPG_MOD 727>,
+                <&x12_clk>,
+                <&extal_clk>;
+       clock-names = "fck", "dclkin.0", "extal";
 
        ports {
-               port@0 {
-                       endpoint {
-                               remote-endpoint = <&adv7123_in>;
+               port@1 {
+                       lvds0_out: endpoint {
+                               remote-endpoint = <&thc63lvd1024_in>;
                        };
                };
        };
 };
 
-&ehci0 {
-       status = "okay";
+&lvds1 {
+       clocks = <&cpg CPG_MOD 727>,
+                <&x12_clk>,
+                <&extal_clk>;
+       clock-names = "fck", "dclkin.0", "extal";
 };
 
 &ohci0 {
        status = "okay";
 };
 
-&avb {
-       pinctrl-0 = <&avb0_pins>;
+&pfc {
+       avb0_pins: avb {
+               mux {
+                       groups = "avb0_link", "avb0_mdio", "avb0_mii";
+                       function = "avb0";
+               };
+       };
+
+       du_pins: du {
+               groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
+               function = "du";
+       };
+
+       i2c0_pins: i2c0 {
+               groups = "i2c0";
+               function = "i2c0";
+       };
+
+       i2c1_pins: i2c1 {
+               groups = "i2c1";
+               function = "i2c1";
+       };
+
+       pwm0_pins: pwm0 {
+               groups = "pwm0_c";
+               function = "pwm0";
+       };
+
+       pwm1_pins: pwm1 {
+               groups = "pwm1_c";
+               function = "pwm1";
+       };
+
+       scif2_pins: scif2 {
+               groups = "scif2_data";
+               function = "scif2";
+       };
+
+       sdhi2_pins: sd2 {
+               groups = "mmc_data8", "mmc_ctrl";
+               function = "mmc";
+               power-source = <1800>;
+       };
+
+       sdhi2_pins_uhs: sd2_uhs {
+               groups = "mmc_data8", "mmc_ctrl";
+               function = "mmc";
+               power-source = <1800>;
+       };
+
+       usb0_pins: usb0 {
+               groups = "usb0";
+               function = "usb0";
+       };
+
+       vin4_pins_cvbs: vin4 {
+               groups = "vin4_data8", "vin4_sync", "vin4_clk";
+               function = "vin4";
+       };
+};
+
+&pwm0 {
+       pinctrl-0 = <&pwm0_pins>;
        pinctrl-names = "default";
-       renesas,no-ether-link;
-       phy-handle = <&phy0>;
-       phy-mode = "rgmii-txid";
+
        status = "okay";
+};
 
-       phy0: ethernet-phy@0 {
-               rxc-skew-ps = <1500>;
-               reg = <0>;
-               interrupt-parent = <&gpio5>;
-               interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
-       };
+&pwm1 {
+       pinctrl-0 = <&pwm1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
+&rwdt {
+       timeout-sec = <60>;
+       status = "okay";
 };
 
 &scif2 {
@@ -333,25 +448,6 @@ &usb2_phy0 {
        status = "okay";
 };
 
-&pwm0 {
-       pinctrl-0 = <&pwm0_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-};
-
-&pwm1 {
-       pinctrl-0 = <&pwm1_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-};
-
-&rwdt {
-       timeout-sec = <60>;
-       status = "okay";
-};
-
 &vin4 {
        pinctrl-0 = <&vin4_pins_cvbs>;
        pinctrl-names = "default";
index fe77bc43c4474d1579502652b5c88c469c3201b6..214f4954b321b89b2dd58d8b81cd48ce0a1bb8ff 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Device Tree Source for the r8a77995 SoC
+ * Device Tree Source for the R-Car D3 (R8A77995) SoC
  *
  * Copyright (C) 2016 Renesas Electronics Corp.
  * Copyright (C) 2017 Glider bvba
@@ -391,6 +391,10 @@ GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 219>;
                        #dma-cells = <1>;
                        dma-channels = <8>;
+                       iommus = <&ipmmu_ds0 0>, <&ipmmu_ds0 1>,
+                              <&ipmmu_ds0 2>, <&ipmmu_ds0 3>,
+                              <&ipmmu_ds0 4>, <&ipmmu_ds0 5>,
+                              <&ipmmu_ds0 6>, <&ipmmu_ds0 7>;
                };
 
                dmac1: dma-controller@e7300000 {
@@ -415,6 +419,10 @@ GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 218>;
                        #dma-cells = <1>;
                        dma-channels = <8>;
+                       iommus = <&ipmmu_ds1 0>, <&ipmmu_ds1 1>,
+                              <&ipmmu_ds1 2>, <&ipmmu_ds1 3>,
+                              <&ipmmu_ds1 4>, <&ipmmu_ds1 5>,
+                              <&ipmmu_ds1 6>, <&ipmmu_ds1 7>;
                };
 
                dmac2: dma-controller@e7310000 {
@@ -439,6 +447,10 @@ GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH
                        resets = <&cpg 217>;
                        #dma-cells = <1>;
                        dma-channels = <8>;
+                       iommus = <&ipmmu_ds1 16>, <&ipmmu_ds1 17>,
+                              <&ipmmu_ds1 18>, <&ipmmu_ds1 19>,
+                              <&ipmmu_ds1 20>, <&ipmmu_ds1 21>,
+                              <&ipmmu_ds1 22>, <&ipmmu_ds1 23>;
                };
 
                ipmmu_ds0: mmu@e6740000 {
@@ -817,11 +829,11 @@ ohci0: usb@ee080000 {
                        compatible = "generic-ohci";
                        reg = <0 0xee080000 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -829,12 +841,12 @@ ehci0: usb@ee080100 {
                        compatible = "generic-ehci";
                        reg = <0 0xee080100 0 0x100>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        phys = <&usb2_phy0>;
                        phy-names = "usb";
                        companion = <&ohci0>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        status = "disabled";
                };
 
@@ -843,9 +855,9 @@ usb2_phy0: usb-phy@ee080200 {
                                     "renesas,rcar-gen3-usb2-phy";
                        reg = <0 0xee080200 0 0x700>;
                        interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&cpg CPG_MOD 703>;
+                       clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
                        power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
-                       resets = <&cpg 703>;
+                       resets = <&cpg 703>, <&cpg 704>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
@@ -960,12 +972,68 @@ du_out_rgb: endpoint {
                                port@1 {
                                        reg = <1>;
                                        du_out_lvds0: endpoint {
+                                               remote-endpoint = <&lvds0_in>;
                                        };
                                };
 
                                port@2 {
                                        reg = <2>;
                                        du_out_lvds1: endpoint {
+                                               remote-endpoint = <&lvds1_in>;
+                                       };
+                               };
+                       };
+               };
+
+               lvds0: lvds-encoder@feb90000 {
+                       compatible = "renesas,r8a77995-lvds";
+                       reg = <0 0xfeb90000 0 0x20>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 727>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds0_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds0>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       lvds0_out: endpoint {
+                                       };
+                               };
+                       };
+               };
+
+               lvds1: lvds-encoder@feb90100 {
+                       compatible = "renesas,r8a77995-lvds";
+                       reg = <0 0xfeb90100 0 0x20>;
+                       clocks = <&cpg CPG_MOD 727>;
+                       power-domains = <&sysc R8A77995_PD_ALWAYS_ON>;
+                       resets = <&cpg 726>;
+                       status = "disabled";
+
+                       ports {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               port@0 {
+                                       reg = <0>;
+                                       lvds1_in: endpoint {
+                                               remote-endpoint = <&du_out_lvds1>;
+                                       };
+                               };
+
+                               port@1 {
+                                       reg = <1>;
+                                       lvds1_out: endpoint {
                                        };
                                };
                        };
index 7d3d866a006352ac196b52002c9c9ce8899f5208..7f91ff5241091b2fca66f9059911f50360628803 100644 (file)
@@ -420,7 +420,10 @@ csa_dvfs: adc@7f {
 
        video-receiver@70 {
                compatible = "adi,adv7482";
-               reg = <0x70>;
+               reg = <0x70 0x71 0x72 0x73 0x74 0x75
+                      0x60 0x61 0x62 0x63 0x64 0x65>;
+               reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
+                           "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
 
                #address-cells = <1>;
                #size-cells = <0>;
@@ -471,6 +474,8 @@ adv7482_txb: endpoint {
 &i2c_dvfs {
        status = "okay";
 
+       clock-frequency = <400000>;
+
        pmic: pmic@30 {
                pinctrl-0 = <&irq0_pins>;
                pinctrl-names = "default";
@@ -748,6 +753,7 @@ &sdhi0 {
        wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
        bus-width = <4>;
        sd-uhs-sdr50;
+       sd-uhs-sdr104;
        status = "okay";
 };
 
@@ -777,6 +783,7 @@ &sdhi3 {
        wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
        bus-width = <4>;
        sd-uhs-sdr50;
+       sd-uhs-sdr104;
        status = "okay";
 };
 
index 8bf3091a899c81ce9234ab05cfcb8aa9542700d7..1b316d79df88ca50f18b4deace7d4e6f718a4271 100644 (file)
@@ -127,7 +127,7 @@ i2cswitch4: i2c-switch@71 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x71>;
-               reset-gpios= <&gpio3 15 GPIO_ACTIVE_LOW>;
+               reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
        };
 };
 
index 0ead552d7eae9678cda710c897b84b3f45964c13..89daca7356dfad191c4ddaede20134b59c5445d9 100644 (file)
@@ -18,6 +18,7 @@ aliases {
        };
 
        chosen {
+               bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
                stdout-path = "serial0:115200n8";
        };
 
@@ -241,6 +242,8 @@ versaclock5: clock-generator@6a {
 &i2c_dvfs {
        status = "okay";
 
+       clock-frequency = <400000>;
+
        pmic: pmic@30 {
                pinctrl-0 = <&irq0_pins>;
                pinctrl-names = "default";
@@ -416,6 +419,7 @@ &sdhi0 {
        cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
        bus-width = <4>;
        sd-uhs-sdr50;
+       sd-uhs-sdr104;
        status = "okay";
 };
 
index b0092d95b574dcc0256f9f5e244e07b4ff794c38..d08b7eda28d2ec754be08de77ef970b21de69c7c 100644 (file)
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_ROCKCHIP) += px30-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
@@ -14,5 +15,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
 dtb-$(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 (file)
index 0000000..c74aa91
--- /dev/null
@@ -0,0 +1,231 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "px30.dtsi"
+
+/ {
+       model = "Rockchip PX30 EVB";
+       compatible = "rockchip,px30-evb", "rockchip,px30";
+
+       chosen {
+               stdout-path = "serial2:1500000n8";
+       };
+
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 2>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1800000>;
+               poll-interval = <100>;
+
+               esc-key {
+                       label = "esc";
+                       linux,code = <KEY_ESC>;
+                       press-threshold-microvolt = <1310000>;
+               };
+
+               home-key {
+                       label = "home";
+                       linux,code = <KEY_HOME>;
+                       press-threshold-microvolt = <624000>;
+               };
+
+               menu-key {
+                       label = "menu";
+                       linux,code = <KEY_MENU>;
+                       press-threshold-microvolt = <987000>;
+               };
+
+               vol-down-key {
+                       label = "volume down";
+                       linux,code = <KEY_VOLUMEDOWN>;
+                       press-threshold-microvolt = <300000>;
+               };
+
+               vol-up-key {
+                       label = "volume up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       press-threshold-microvolt = <17000>;
+               };
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 25000 0>;
+       };
+
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable_h>;
+
+               /*
+                * On the module itself this is one of these (depending
+                * on the actual card populated):
+                * - SDIO_RESET_L_WL_REG_ON
+                * - PDN (power down when low)
+                */
+               reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
+       };
+
+       vcc_phy: vcc-phy-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_phy";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+
+       vcc5v0_sys: vccsys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc5v0_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+};
+
+&display_subsystem {
+       status = "okay";
+};
+
+&emmc {
+       bus-width = <8>;
+       cap-mmc-highspeed;
+       mmc-hs200-1_8v;
+       non-removable;
+       status = "okay";
+};
+
+&gmac {
+       clock_in_out = "output";
+       phy-supply = <&vcc_phy>;
+       snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 50000 50000>;
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+&i2s1_2ch {
+       status = "okay";
+};
+
+&io_domains {
+       status = "okay";
+};
+
+&pinctrl {
+       headphone {
+               hp_det: hp-det {
+                       rockchip,pins =
+                               <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       pmic {
+               pmic_int: pmic_int {
+                       rockchip,pins =
+                               <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+
+               soc_slppin_gpio: soc_slppin_gpio {
+                       rockchip,pins =
+                               <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
+               };
+
+               soc_slppin_slp: soc_slppin_slp {
+                       rockchip,pins =
+                               <0 RK_PA4 RK_FUNC_1 &pcfg_pull_none>;
+               };
+
+               soc_slppin_rst: soc_slppin_rst {
+                       rockchip,pins =
+                               <0 RK_PA4 RK_FUNC_2 &pcfg_pull_none>;
+               };
+       };
+
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins =
+                               <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&pmu_io_domains {
+       status = "okay";
+};
+
+&pwm1 {
+       status = "okay";
+};
+
+&saradc {
+       status = "okay";
+};
+
+&sdmmc {
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       card-detect-delay = <800>;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
+       sd-uhs-sdr104;
+       status = "okay";
+};
+
+&sdio {
+       bus-width = <4>;
+       cap-sd-highspeed;
+       keep-power-in-suspend;
+       non-removable;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       sd-uhs-sdr104;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_xfer &uart1_cts>;
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&usb_host0_ehci {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&vopb {
+       status = "okay";
+};
+
+&vopb_mmu {
+       status = "okay";
+};
+
+&vopl {
+       status = "okay";
+};
+
+&vopl_mmu {
+       status = "okay";
+};
diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
new file mode 100644 (file)
index 0000000..fa82dd8
--- /dev/null
@@ -0,0 +1,2031 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
+ */
+
+#include <dt-bindings/clock/px30-cru.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/power/px30-power.h>
+#include <dt-bindings/soc/rockchip,boot-mode.h>
+
+/ {
+       compatible = "rockchip,px30";
+
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       aliases {
+               ethernet0 = &gmac;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+               serial3 = &uart3;
+               serial4 = &uart4;
+               serial5 = &uart5;
+               spi0 = &spi0;
+               spi1 = &spi1;
+       };
+
+       cpus {
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35", "arm,armv8";
+                       reg = <0x0 0x0>;
+                       enable-method = "psci";
+                       clocks = <&cru ARMCLK>;
+                       #cooling-cells = <2>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+                       dynamic-power-coefficient = <90>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35", "arm,armv8";
+                       reg = <0x0 0x1>;
+                       enable-method = "psci";
+                       clocks = <&cru ARMCLK>;
+                       #cooling-cells = <2>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+                       dynamic-power-coefficient = <90>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+               };
+
+               cpu2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35", "arm,armv8";
+                       reg = <0x0 0x2>;
+                       enable-method = "psci";
+                       clocks = <&cru ARMCLK>;
+                       #cooling-cells = <2>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+                       dynamic-power-coefficient = <90>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+               };
+
+               cpu3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a35", "arm,armv8";
+                       reg = <0x0 0x3>;
+                       enable-method = "psci";
+                       clocks = <&cru ARMCLK>;
+                       #cooling-cells = <2>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+                       dynamic-power-coefficient = <90>;
+                       operating-points-v2 = <&cpu0_opp_table>;
+               };
+
+               idle-states {
+                       entry-method = "psci";
+
+                       CPU_SLEEP: cpu-sleep {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x0010000>;
+                               entry-latency-us = <120>;
+                               exit-latency-us = <250>;
+                               min-residency-us = <900>;
+                       };
+
+                       CLUSTER_SLEEP: cluster-sleep {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x1010000>;
+                               entry-latency-us = <400>;
+                               exit-latency-us = <500>;
+                               min-residency-us = <2000>;
+                       };
+               };
+       };
+
+       cpu0_opp_table: cpu0-opp-table {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp-408000000 {
+                       opp-hz = /bits/ 64 <408000000>;
+                       opp-microvolt = <950000 950000 1350000>;
+                       clock-latency-ns = <40000>;
+                       opp-suspend;
+               };
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-microvolt = <950000 950000 1350000>;
+                       clock-latency-ns = <40000>;
+               };
+               opp-816000000 {
+                       opp-hz = /bits/ 64 <816000000>;
+                       opp-microvolt = <1050000 1050000 1350000>;
+                       clock-latency-ns = <40000>;
+               };
+               opp-1008000000 {
+                       opp-hz = /bits/ 64 <1008000000>;
+                       opp-microvolt = <1175000 1175000 1350000>;
+                       clock-latency-ns = <40000>;
+               };
+               opp-1200000000 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <1300000 1300000 1350000>;
+                       clock-latency-ns = <40000>;
+               };
+               opp-1296000000 {
+                       opp-hz = /bits/ 64 <1296000000>;
+                       opp-microvolt = <1350000 1350000 1350000>;
+                       clock-latency-ns = <40000>;
+               };
+       };
+
+       arm-pmu {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+       };
+
+       display_subsystem: display-subsystem {
+               compatible = "rockchip,display-subsystem";
+               ports = <&vopb_out>, <&vopl_out>;
+               status = "disabled";
+       };
+
+       firmware {
+               optee {
+                       compatible = "linaro,optee-tz";
+                       method = "smc";
+               };
+       };
+
+       gmac_clkin: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <50000000>;
+               clock-output-names = "gmac_clkin";
+               #clock-cells = <0>;
+       };
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       xin24m: xin24m {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <24000000>;
+               clock-output-names = "xin24m";
+       };
+
+       xin32k: xin32k {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               clock-output-names = "xin32k";
+       };
+
+       pmu: power-management@ff000000 {
+               compatible = "rockchip,px30-pmu", "syscon", "simple-mfd";
+               reg = <0x0 0xff000000 0x0 0x1000>;
+
+               power: power-controller {
+                       compatible = "rockchip,px30-power-controller";
+                       #power-domain-cells = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       /* These power domains are grouped by VD_LOGIC */
+                       pd_usb@PX30_PD_USB {
+                               reg = <PX30_PD_USB>;
+                               clocks = <&cru HCLK_HOST>,
+                                        <&cru HCLK_OTG>,
+                                        <&cru SCLK_OTG_ADP>;
+                               pm_qos = <&qos_usb_host>, <&qos_usb_otg>;
+                       };
+                       pd_sdcard@PX30_PD_SDCARD {
+                               reg = <PX30_PD_SDCARD>;
+                               clocks = <&cru HCLK_SDMMC>,
+                                        <&cru SCLK_SDMMC>;
+                               pm_qos = <&qos_sdmmc>;
+                       };
+                       pd_gmac@PX30_PD_GMAC {
+                               reg = <PX30_PD_GMAC>;
+                               clocks = <&cru ACLK_GMAC>,
+                                        <&cru PCLK_GMAC>,
+                                        <&cru SCLK_MAC_REF>,
+                                        <&cru SCLK_GMAC_RX_TX>;
+                               pm_qos = <&qos_gmac>;
+                       };
+                       pd_mmc_nand@PX30_PD_MMC_NAND {
+                               reg = <PX30_PD_MMC_NAND>;
+                               clocks =  <&cru HCLK_NANDC>,
+                                         <&cru HCLK_EMMC>,
+                                         <&cru HCLK_SDIO>,
+                                         <&cru HCLK_SFC>,
+                                         <&cru SCLK_EMMC>,
+                                         <&cru SCLK_NANDC>,
+                                         <&cru SCLK_SDIO>,
+                                         <&cru SCLK_SFC>;
+                               pm_qos = <&qos_emmc>, <&qos_nand>,
+                                        <&qos_sdio>, <&qos_sfc>;
+                       };
+                       pd_vpu@PX30_PD_VPU {
+                               reg = <PX30_PD_VPU>;
+                               clocks = <&cru ACLK_VPU>,
+                                        <&cru HCLK_VPU>,
+                                        <&cru SCLK_CORE_VPU>;
+                               pm_qos = <&qos_vpu>, <&qos_vpu_r128>;
+                       };
+                       pd_vo@PX30_PD_VO {
+                               reg = <PX30_PD_VO>;
+                               clocks = <&cru ACLK_RGA>,
+                                        <&cru ACLK_VOPB>,
+                                        <&cru ACLK_VOPL>,
+                                        <&cru DCLK_VOPB>,
+                                        <&cru DCLK_VOPL>,
+                                        <&cru HCLK_RGA>,
+                                        <&cru HCLK_VOPB>,
+                                        <&cru HCLK_VOPL>,
+                                        <&cru PCLK_MIPI_DSI>,
+                                        <&cru SCLK_RGA_CORE>,
+                                        <&cru SCLK_VOPB_PWM>;
+                               pm_qos = <&qos_rga_rd>, <&qos_rga_wr>,
+                                        <&qos_vop_m0>, <&qos_vop_m1>;
+                       };
+                       pd_vi@PX30_PD_VI {
+                               reg = <PX30_PD_VI>;
+                               clocks = <&cru ACLK_CIF>,
+                                        <&cru ACLK_ISP>,
+                                        <&cru HCLK_CIF>,
+                                        <&cru HCLK_ISP>,
+                                        <&cru SCLK_ISP>;
+                               pm_qos = <&qos_isp_128>, <&qos_isp_rd>,
+                                        <&qos_isp_wr>, <&qos_isp_m1>,
+                                        <&qos_vip>;
+                       };
+                       pd_gpu@PX30_PD_GPU {
+                               reg = <PX30_PD_GPU>;
+                               clocks = <&cru SCLK_GPU>;
+                               pm_qos = <&qos_gpu>;
+                       };
+               };
+       };
+
+       pmugrf: syscon@ff010000 {
+               compatible = "rockchip,px30-pmugrf", "syscon", "simple-mfd";
+               reg = <0x0 0xff010000 0x0 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               pmu_io_domains: io-domains {
+                       compatible = "rockchip,px30-pmu-io-voltage-domain";
+                       status = "disabled";
+               };
+
+               reboot-mode {
+                       compatible = "syscon-reboot-mode";
+                       offset = <0x200>;
+                       mode-bootloader = <BOOT_BL_DOWNLOAD>;
+                       mode-fastboot = <BOOT_FASTBOOT>;
+                       mode-loader = <BOOT_BL_DOWNLOAD>;
+                       mode-normal = <BOOT_NORMAL>;
+                       mode-recovery = <BOOT_RECOVERY>;
+               };
+       };
+
+       uart0: serial@ff030000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff030000 0x0 0x100>;
+               interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&pmucru SCLK_UART0_PMU>, <&pmucru PCLK_UART0_PMU>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 0>, <&dmac 1>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
+               status = "disabled";
+       };
+
+       i2s1_2ch: i2s@ff070000 {
+               compatible = "rockchip,px30-i2s", "rockchip,rk3066-i2s";
+               reg = <0x0 0xff070000 0x0 0x1000>;
+               interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_I2S1>, <&cru HCLK_I2S1>;
+               clock-names = "i2s_clk", "i2s_hclk";
+               dmas = <&dmac 18>, <&dmac 19>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s1_2ch_sclk &i2s1_2ch_lrck
+                            &i2s1_2ch_sdi &i2s1_2ch_sdo>;
+               #sound-dai-cells = <0>;
+               status = "disabled";
+       };
+
+       i2s2_2ch: i2s@ff080000 {
+               compatible = "rockchip,px30-i2s", "rockchip,rk3066-i2s";
+               reg = <0x0 0xff080000 0x0 0x1000>;
+               interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_I2S2>, <&cru HCLK_I2S2>;
+               clock-names = "i2s_clk", "i2s_hclk";
+               dmas = <&dmac 20>, <&dmac 21>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s2_2ch_sclk &i2s2_2ch_lrck
+                            &i2s2_2ch_sdi &i2s2_2ch_sdo>;
+               #sound-dai-cells = <0>;
+               status = "disabled";
+       };
+
+       gic: interrupt-controller@ff131000 {
+               compatible = "arm,gic-400";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0x0 0xff131000 0 0x1000>,
+                     <0x0 0xff132000 0 0x2000>,
+                     <0x0 0xff134000 0 0x2000>,
+                     <0x0 0xff136000 0 0x2000>;
+               interrupts = <GIC_PPI 9
+                     (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       grf: syscon@ff140000 {
+               compatible = "rockchip,px30-grf", "syscon", "simple-mfd";
+               reg = <0x0 0xff140000 0x0 0x1000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               io_domains: io-domains {
+                       compatible = "rockchip,px30-io-voltage-domain";
+                       status = "disabled";
+               };
+       };
+
+       uart1: serial@ff158000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff158000 0x0 0x100>;
+               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 2>, <&dmac 3>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart1_xfer &uart1_cts &uart1_rts>;
+               status = "disabled";
+       };
+
+       uart2: serial@ff160000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff160000 0x0 0x100>;
+               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 4>, <&dmac 5>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart2m0_xfer>;
+               status = "disabled";
+       };
+
+       uart3: serial@ff168000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff168000 0x0 0x100>;
+               interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 6>, <&dmac 7>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart3m1_xfer &uart3m1_cts &uart3m1_rts>;
+               status = "disabled";
+       };
+
+       uart4: serial@ff170000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff170000 0x0 0x100>;
+               interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 8>, <&dmac 9>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart4_xfer &uart4_cts &uart4_rts>;
+               status = "disabled";
+       };
+
+       uart5: serial@ff178000 {
+               compatible = "rockchip,px30-uart", "snps,dw-apb-uart";
+               reg = <0x0 0xff178000 0x0 0x100>;
+               interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_UART5>, <&cru PCLK_UART5>;
+               clock-names = "baudclk", "apb_pclk";
+               dmas = <&dmac 10>, <&dmac 11>;
+               dma-names = "tx", "rx";
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart5_xfer &uart5_cts &uart5_rts>;
+               status = "disabled";
+       };
+
+       i2c0: i2c@ff180000 {
+               compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
+               reg = <0x0 0xff180000 0x0 0x1000>;
+               clocks =  <&cru SCLK_I2C0>, <&cru PCLK_I2C0>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c0_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c1: i2c@ff190000 {
+               compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
+               reg = <0x0 0xff190000 0x0 0x1000>;
+               clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c1_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c2: i2c@ff1a0000 {
+               compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
+               reg = <0x0 0xff1a0000 0x0 0x1000>;
+               clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       i2c3: i2c@ff1b0000 {
+               compatible = "rockchip,px30-i2c", "rockchip,rk3399-i2c";
+               reg = <0x0 0xff1b0000 0x0 0x1000>;
+               clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c3_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi0: spi@ff1d0000 {
+               compatible = "rockchip,px30-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff1d0000 0x0 0x1000>;
+               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac 12>, <&dmac 13>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi1: spi@ff1d8000 {
+               compatible = "rockchip,px30-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff1d8000 0x0 0x1000>;
+               interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
+               clock-names = "spiclk", "apb_pclk";
+               dmas = <&dmac 14>, <&dmac 15>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       wdt: watchdog@ff1e0000 {
+               compatible = "snps,dw-wdt";
+               reg = <0x0 0xff1e0000 0x0 0x100>;
+               clocks = <&cru PCLK_WDT_NS>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       pwm0: pwm@ff200000 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff200000 0x0 0x10>;
+               clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm1: pwm@ff200010 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff200010 0x0 0x10>;
+               clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm1_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm2: pwm@ff200020 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff200020 0x0 0x10>;
+               clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm2_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm3: pwm@ff200030 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff200030 0x0 0x10>;
+               clocks = <&cru SCLK_PWM0>, <&cru PCLK_PWM0>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm3_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm4: pwm@ff208000 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff208000 0x0 0x10>;
+               clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm4_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm5: pwm@ff208010 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff208010 0x0 0x10>;
+               clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm5_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm6: pwm@ff208020 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff208020 0x0 0x10>;
+               clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm6_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       pwm7: pwm@ff208030 {
+               compatible = "rockchip,px30-pwm", "rockchip,rk3328-pwm";
+               reg = <0x0 0xff208030 0x0 0x10>;
+               clocks = <&cru SCLK_PWM1>, <&cru PCLK_PWM1>;
+               clock-names = "pwm", "pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm7_pin>;
+               #pwm-cells = <3>;
+               status = "disabled";
+       };
+
+       rktimer: timer@ff210000 {
+               compatible = "rockchip,px30-timer", "rockchip,rk3288-timer";
+               reg = <0x0 0xff210000 0x0 0x1000>;
+               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru PCLK_TIMER>, <&cru SCLK_TIMER0>;
+               clock-names = "pclk", "timer";
+       };
+
+       amba {
+               compatible = "simple-bus";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               dmac: dmac@ff240000 {
+                       compatible = "arm,pl330", "arm,primecell";
+                       reg = <0x0 0xff240000 0x0 0x4000>;
+                       interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru ACLK_DMAC>;
+                       clock-names = "apb_pclk";
+                       #dma-cells = <1>;
+               };
+       };
+
+       saradc: saradc@ff288000 {
+               compatible = "rockchip,px30-saradc", "rockchip,rk3399-saradc";
+               reg = <0x0 0xff288000 0x0 0x100>;
+               interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+               #io-channel-cells = <1>;
+               clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
+               clock-names = "saradc", "apb_pclk";
+               resets = <&cru SRST_SARADC_P>;
+               reset-names = "saradc-apb";
+               status = "disabled";
+       };
+
+       cru: clock-controller@ff2b0000 {
+               compatible = "rockchip,px30-cru";
+               reg = <0x0 0xff2b0000 0x0 0x1000>;
+               rockchip,grf = <&grf>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+
+               assigned-clocks = <&cru PLL_NPLL>;
+               assigned-clock-rates = <1188000000>;
+       };
+
+       pmucru: clock-controller@ff2bc000 {
+               compatible = "rockchip,px30-pmucru";
+               reg = <0x0 0xff2bc000 0x0 0x1000>;
+               rockchip,grf = <&grf>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+
+               assigned-clocks =
+                       <&pmucru PLL_GPLL>, <&pmucru PCLK_PMU_PRE>,
+                       <&pmucru SCLK_WIFI_PMU>, <&cru ARMCLK>,
+                       <&cru ACLK_BUS_PRE>, <&cru ACLK_PERI_PRE>,
+                       <&cru HCLK_BUS_PRE>, <&cru HCLK_PERI_PRE>,
+                       <&cru PCLK_BUS_PRE>, <&cru SCLK_GPU>;
+               assigned-clock-rates =
+                       <1200000000>, <100000000>,
+                       <26000000>, <600000000>,
+                       <200000000>, <200000000>,
+                       <150000000>, <150000000>,
+                       <100000000>, <200000000>;
+       };
+
+       usb_host0_ehci: usb@ff340000 {
+               compatible = "generic-ehci";
+               reg = <0x0 0xff340000 0x0 0x10000>;
+               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_HOST>;
+               clock-names = "usbhost";
+               power-domains = <&power PX30_PD_USB>;
+               status = "disabled";
+       };
+
+       usb_host0_ohci: usb@ff350000 {
+               compatible = "generic-ohci";
+               reg = <0x0 0xff350000 0x0 0x10000>;
+               interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_HOST>;
+               clock-names = "usbhost";
+               power-domains = <&power PX30_PD_USB>;
+               status = "disabled";
+       };
+
+       gmac: ethernet@ff360000 {
+               compatible = "rockchip,px30-gmac";
+               reg = <0x0 0xff360000 0x0 0x10000>;
+               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "macirq";
+               clocks = <&cru SCLK_GMAC>, <&cru SCLK_GMAC_RX_TX>,
+                        <&cru SCLK_GMAC_RX_TX>, <&cru SCLK_MAC_REF>,
+                        <&cru SCLK_MAC_REFOUT>, <&cru ACLK_GMAC>,
+                        <&cru PCLK_GMAC>, <&cru SCLK_GMAC_RMII>;
+               clock-names = "stmmaceth", "mac_clk_rx",
+                             "mac_clk_tx", "clk_mac_ref",
+                             "clk_mac_refout", "aclk_mac",
+                             "pclk_mac", "clk_mac_speed";
+               rockchip,grf = <&grf>;
+               phy-mode = "rmii";
+               pinctrl-names = "default";
+               pinctrl-0 = <&rmii_pins &mac_refclk_12ma>;
+               power-domains = <&power PX30_PD_GMAC>;
+               resets = <&cru SRST_GMAC_A>;
+               reset-names = "stmmaceth";
+               status = "disabled";
+       };
+
+       sdmmc: dwmmc@ff370000 {
+               compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff370000 0x0 0x4000>;
+               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
+                        <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
+               fifo-depth = <0x100>;
+               max-frequency = <150000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
+               power-domains = <&power PX30_PD_SDCARD>;
+               status = "disabled";
+       };
+
+       sdio: dwmmc@ff380000 {
+               compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff380000 0x0 0x4000>;
+               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
+                        <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
+               fifo-depth = <0x100>;
+               max-frequency = <150000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdio_bus4 &sdio_cmd &sdio_clk>;
+               power-domains = <&power PX30_PD_MMC_NAND>;
+               status = "disabled";
+       };
+
+       emmc: dwmmc@ff390000 {
+               compatible = "rockchip,px30-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff390000 0x0 0x4000>;
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
+                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drv", "ciu-sample";
+               fifo-depth = <0x100>;
+               max-frequency = <150000000>;
+               power-domains = <&power PX30_PD_MMC_NAND>;
+               status = "disabled";
+       };
+
+       vopb: vop@ff460000 {
+               compatible = "rockchip,px30-vop-big";
+               reg = <0x0 0xff460000 0x0 0xefc>;
+               interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru ACLK_VOPB>, <&cru DCLK_VOPB>,
+                        <&cru HCLK_VOPB>;
+               clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+               resets = <&cru SRST_VOPB_A>, <&cru SRST_VOPB_H>, <&cru SRST_VOPB>;
+               reset-names = "axi", "ahb", "dclk";
+               iommus = <&vopb_mmu>;
+               power-domains = <&power PX30_PD_VO>;
+               rockchip,grf = <&grf>;
+               status = "disabled";
+
+               vopb_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+       };
+
+       vopb_mmu: iommu@ff460f00 {
+               compatible = "rockchip,iommu";
+               reg = <0x0 0xff460f00 0x0 0x100>;
+               interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "vopb_mmu";
+               clocks = <&cru ACLK_VOPB>, <&cru HCLK_VOPB>;
+               clock-names = "aclk", "hclk";
+               power-domains = <&power PX30_PD_VO>;
+               #iommu-cells = <0>;
+               status = "disabled";
+       };
+
+       vopl: vop@ff470000 {
+               compatible = "rockchip,px30-vop-lit";
+               reg = <0x0 0xff470000 0x0 0xefc>;
+               interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru ACLK_VOPL>, <&cru DCLK_VOPL>,
+                        <&cru HCLK_VOPL>;
+               clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
+               resets = <&cru SRST_VOPL_A>, <&cru SRST_VOPL_H>, <&cru SRST_VOPL>;
+               reset-names = "axi", "ahb", "dclk";
+               iommus = <&vopl_mmu>;
+               power-domains = <&power PX30_PD_VO>;
+               rockchip,grf = <&grf>;
+               status = "disabled";
+
+               vopl_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+       };
+
+       vopl_mmu: iommu@ff470f00 {
+               compatible = "rockchip,iommu";
+               reg = <0x0 0xff470f00 0x0 0x100>;
+               interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "vopl_mmu";
+               clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
+               clock-names = "aclk", "hclk";
+               power-domains = <&power PX30_PD_VO>;
+               #iommu-cells = <0>;
+               status = "disabled";
+       };
+
+       qos_gmac: qos@ff518000 {
+               compatible = "syscon";
+               reg = <0x0 0xff518000 0x0 0x20>;
+       };
+
+       qos_gpu: qos@ff520000 {
+               compatible = "syscon";
+               reg = <0x0 0xff520000 0x0 0x20>;
+       };
+
+       qos_sdmmc: qos@ff52c000 {
+               compatible = "syscon";
+               reg = <0x0 0xff52c000 0x0 0x20>;
+       };
+
+       qos_emmc: qos@ff538000 {
+               compatible = "syscon";
+               reg = <0x0 0xff538000 0x0 0x20>;
+       };
+
+       qos_nand: qos@ff538080 {
+               compatible = "syscon";
+               reg = <0x0 0xff538080 0x0 0x20>;
+       };
+
+       qos_sdio: qos@ff538100 {
+               compatible = "syscon";
+               reg = <0x0 0xff538100 0x0 0x20>;
+       };
+
+       qos_sfc: qos@ff538180 {
+               compatible = "syscon";
+               reg = <0x0 0xff538180 0x0 0x20>;
+       };
+
+       qos_usb_host: qos@ff540000 {
+               compatible = "syscon";
+               reg = <0x0 0xff540000 0x0 0x20>;
+       };
+
+       qos_usb_otg: qos@ff540080 {
+               compatible = "syscon";
+               reg = <0x0 0xff540080 0x0 0x20>;
+       };
+
+       qos_isp_128: qos@ff548000 {
+               compatible = "syscon";
+               reg = <0x0 0xff548000 0x0 0x20>;
+       };
+
+       qos_isp_rd: qos@ff548080 {
+               compatible = "syscon";
+               reg = <0x0 0xff548080 0x0 0x20>;
+       };
+
+       qos_isp_wr: qos@ff548100 {
+               compatible = "syscon";
+               reg = <0x0 0xff548100 0x0 0x20>;
+       };
+
+       qos_isp_m1: qos@ff548180 {
+               compatible = "syscon";
+               reg = <0x0 0xff548180 0x0 0x20>;
+       };
+
+       qos_vip: qos@ff548200 {
+               compatible = "syscon";
+               reg = <0x0 0xff548200 0x0 0x20>;
+       };
+
+       qos_rga_rd: qos@ff550000 {
+               compatible = "syscon";
+               reg = <0x0 0xff550000 0x0 0x20>;
+       };
+
+       qos_rga_wr: qos@ff550080 {
+               compatible = "syscon";
+               reg = <0x0 0xff550080 0x0 0x20>;
+       };
+
+       qos_vop_m0: qos@ff550100 {
+               compatible = "syscon";
+               reg = <0x0 0xff550100 0x0 0x20>;
+       };
+
+       qos_vop_m1: qos@ff550180 {
+               compatible = "syscon";
+               reg = <0x0 0xff550180 0x0 0x20>;
+       };
+
+       qos_vpu: qos@ff558000 {
+               compatible = "syscon";
+               reg = <0x0 0xff558000 0x0 0x20>;
+       };
+
+       qos_vpu_r128: qos@ff558080 {
+               compatible = "syscon";
+               reg = <0x0 0xff558080 0x0 0x20>;
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,px30-pinctrl";
+               rockchip,grf = <&grf>;
+               rockchip,pmu = <&pmugrf>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               gpio0: gpio0@ff040000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x0 0xff040000 0x0 0x100>;
+                       interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&pmucru PCLK_GPIO0_PMU>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio1: gpio1@ff250000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x0 0xff250000 0x0 0x100>;
+                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio2: gpio2@ff260000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x0 0xff260000 0x0 0x100>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio3: gpio3@ff270000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x0 0xff270000 0x0 0x100>;
+                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO3>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               pcfg_pull_up: pcfg-pull-up {
+                       bias-pull-up;
+               };
+
+               pcfg_pull_down: pcfg-pull-down {
+                       bias-pull-down;
+               };
+
+               pcfg_pull_none: pcfg-pull-none {
+                       bias-disable;
+               };
+
+               pcfg_pull_none_2ma: pcfg-pull-none-2ma {
+                       bias-disable;
+                       drive-strength = <2>;
+               };
+
+               pcfg_pull_up_2ma: pcfg-pull-up-2ma {
+                       bias-pull-up;
+                       drive-strength = <2>;
+               };
+
+               pcfg_pull_up_4ma: pcfg-pull-up-4ma {
+                       bias-pull-up;
+                       drive-strength = <4>;
+               };
+
+               pcfg_pull_none_4ma: pcfg-pull-none-4ma {
+                       bias-disable;
+                       drive-strength = <4>;
+               };
+
+               pcfg_pull_down_4ma: pcfg-pull-down-4ma {
+                       bias-pull-down;
+                       drive-strength = <4>;
+               };
+
+               pcfg_pull_none_8ma: pcfg-pull-none-8ma {
+                       bias-disable;
+                       drive-strength = <8>;
+               };
+
+               pcfg_pull_up_8ma: pcfg-pull-up-8ma {
+                       bias-pull-up;
+                       drive-strength = <8>;
+               };
+
+               pcfg_pull_none_12ma: pcfg-pull-none-12ma {
+                       bias-disable;
+                       drive-strength = <12>;
+               };
+
+               pcfg_pull_up_12ma: pcfg-pull-up-12ma {
+                       bias-pull-up;
+                       drive-strength = <12>;
+               };
+
+               pcfg_pull_none_smt: pcfg-pull-none-smt {
+                       bias-disable;
+                       input-schmitt-enable;
+               };
+
+               pcfg_output_high: pcfg-output-high {
+                       output-high;
+               };
+
+               pcfg_output_low: pcfg-output-low {
+                       output-low;
+               };
+
+               pcfg_input_high: pcfg-input-high {
+                       bias-pull-up;
+                       input-enable;
+               };
+
+               pcfg_input: pcfg-input {
+                       input-enable;
+               };
+
+               i2c0 {
+                       i2c0_xfer: i2c0-xfer {
+                               rockchip,pins =
+                                       <0 RK_PB0 1 &pcfg_pull_none_smt>,
+                                       <0 RK_PB1 1 &pcfg_pull_none_smt>;
+                       };
+               };
+
+               i2c1 {
+                       i2c1_xfer: i2c1-xfer {
+                               rockchip,pins =
+                                       <0 RK_PC2 1 &pcfg_pull_none_smt>,
+                                       <0 RK_PC3 1 &pcfg_pull_none_smt>;
+                       };
+               };
+
+               i2c2 {
+                       i2c2_xfer: i2c2-xfer {
+                               rockchip,pins =
+                                       <2 RK_PB7 2 &pcfg_pull_none_smt>,
+                                       <2 RK_PC0 2 &pcfg_pull_none_smt>;
+                       };
+               };
+
+               i2c3 {
+                       i2c3_xfer: i2c3-xfer {
+                               rockchip,pins =
+                                       <1 RK_PB4 4 &pcfg_pull_none_smt>,
+                                       <1 RK_PB5 4 &pcfg_pull_none_smt>;
+                       };
+               };
+
+               tsadc {
+                       tsadc_otp_gpio: tsadc-otp-gpio {
+                               rockchip,pins =
+                                       <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+
+                       tsadc_otp_out: tsadc-otp-out {
+                               rockchip,pins =
+                                       <0 RK_PA6 1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins =
+                                       <0 RK_PB2 1 &pcfg_pull_up>,
+                                       <0 RK_PB3 1 &pcfg_pull_up>;
+                       };
+
+                       uart0_cts: uart0-cts {
+                               rockchip,pins =
+                                       <0 RK_PB4 1 &pcfg_pull_none>;
+                       };
+
+                       uart0_rts: uart0-rts {
+                               rockchip,pins =
+                                       <0 RK_PB5 1 &pcfg_pull_none>;
+                       };
+
+                       uart0_rts_gpio: uart0-rts-gpio {
+                               rockchip,pins =
+                                       <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+               };
+
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins =
+                                       <1 RK_PC1 1 &pcfg_pull_up>,
+                                       <1 RK_PC0 1 &pcfg_pull_up>;
+                       };
+
+                       uart1_cts: uart1-cts {
+                               rockchip,pins =
+                                       <1 RK_PC2 1 &pcfg_pull_none>;
+                       };
+
+                       uart1_rts: uart1-rts {
+                               rockchip,pins =
+                                       <1 RK_PC3 1 &pcfg_pull_none>;
+                       };
+
+                       uart1_rts_gpio: uart1-rts-gpio {
+                               rockchip,pins =
+                                       <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+               };
+
+               uart2-m0 {
+                       uart2m0_xfer: uart2m0-xfer {
+                               rockchip,pins =
+                                       <1 RK_PD2 2 &pcfg_pull_up>,
+                                       <1 RK_PD3 2 &pcfg_pull_up>;
+                       };
+               };
+
+               uart2-m1 {
+                       uart2m1_xfer: uart2m1-xfer {
+                               rockchip,pins =
+                                       <2 RK_PB4 2 &pcfg_pull_up>,
+                                       <2 RK_PB6 2 &pcfg_pull_up>;
+                       };
+               };
+
+               uart3-m0 {
+                       uart3m0_xfer: uart3m0-xfer {
+                               rockchip,pins =
+                                       <0 RK_PC0 2 &pcfg_pull_up>,
+                                       <0 RK_PC1 2 &pcfg_pull_up>;
+                       };
+
+                       uart3m0_cts: uart3m0-cts {
+                               rockchip,pins =
+                                       <0 RK_PC2 2 &pcfg_pull_none>;
+                       };
+
+                       uart3m0_rts: uart3m0-rts {
+                               rockchip,pins =
+                                       <0 RK_PC3 2 &pcfg_pull_none>;
+                       };
+
+                       uart3m0_rts_gpio: uart3m0-rts-gpio {
+                               rockchip,pins =
+                                       <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+               };
+
+               uart3-m1 {
+                       uart3m1_xfer: uart3m1-xfer {
+                               rockchip,pins =
+                                       <1 RK_PB6 2 &pcfg_pull_up>,
+                                       <1 RK_PB7 2 &pcfg_pull_up>;
+                       };
+
+                       uart3m1_cts: uart3m1-cts {
+                               rockchip,pins =
+                                       <1 RK_PB4 2 &pcfg_pull_none>;
+                       };
+
+                       uart3m1_rts: uart3m1-rts {
+                               rockchip,pins =
+                                       <1 RK_PB5 2 &pcfg_pull_none>;
+                       };
+
+                       uart3m1_rts_gpio: uart3m1-rts-gpio {
+                               rockchip,pins =
+                                       <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+               };
+
+               uart4 {
+                       uart4_xfer: uart4-xfer {
+                               rockchip,pins =
+                                       <1 RK_PD4 2 &pcfg_pull_up>,
+                                       <1 RK_PD5 2 &pcfg_pull_up>;
+                       };
+
+                       uart4_cts: uart4-cts {
+                               rockchip,pins =
+                                       <1 RK_PD6 2 &pcfg_pull_none>;
+                       };
+
+                       uart4_rts: uart4-rts {
+                               rockchip,pins =
+                                       <1 RK_PD7 2 &pcfg_pull_none>;
+                       };
+               };
+
+               uart5 {
+                       uart5_xfer: uart5-xfer {
+                               rockchip,pins =
+                                       <3 RK_PA2 4 &pcfg_pull_up>,
+                                       <3 RK_PA1 4 &pcfg_pull_up>;
+                       };
+
+                       uart5_cts: uart5-cts {
+                               rockchip,pins =
+                                       <3 RK_PA3 4 &pcfg_pull_none>;
+                       };
+
+                       uart5_rts: uart5-rts {
+                               rockchip,pins =
+                                       <3 RK_PA5 4 &pcfg_pull_none>;
+                       };
+               };
+
+               spi0 {
+                       spi0_clk: spi0-clk {
+                               rockchip,pins =
+                                       <1 RK_PB7 3 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi0_csn: spi0-csn {
+                               rockchip,pins =
+                                       <1 RK_PB6 3 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi0_miso: spi0-miso {
+                               rockchip,pins =
+                                       <1 RK_PB5 3 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi0_mosi: spi0-mosi {
+                               rockchip,pins =
+                                       <1 RK_PB4 3 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi0_clk_hs: spi0-clk-hs {
+                               rockchip,pins =
+                                       <1 RK_PB7 3 &pcfg_pull_up_8ma>;
+                       };
+
+                       spi0_miso_hs: spi0-miso-hs {
+                               rockchip,pins =
+                                       <1 RK_PB5 3 &pcfg_pull_up_8ma>;
+                       };
+
+                       spi0_mosi_hs: spi0-mosi-hs {
+                               rockchip,pins =
+                                       <1 RK_PB4 3 &pcfg_pull_up_8ma>;
+                       };
+               };
+
+               spi1 {
+                       spi1_clk: spi1-clk {
+                               rockchip,pins =
+                                       <3 RK_PB7 4 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi1_csn0: spi1-csn0 {
+                               rockchip,pins =
+                                       <3 RK_PB1 4 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi1_csn1: spi1-csn1 {
+                               rockchip,pins =
+                                       <3 RK_PB2 2 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi1_miso: spi1-miso {
+                               rockchip,pins =
+                                       <3 RK_PB6 4 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi1_mosi: spi1-mosi {
+                               rockchip,pins =
+                                       <3 RK_PB4 4 &pcfg_pull_up_4ma>;
+                       };
+
+                       spi1_clk_hs: spi1-clk-hs {
+                               rockchip,pins =
+                                       <3 RK_PB7 4 &pcfg_pull_up_8ma>;
+                       };
+
+                       spi1_miso_hs: spi1-miso-hs {
+                               rockchip,pins =
+                                       <3 RK_PB6 4 &pcfg_pull_up_8ma>;
+                       };
+
+                       spi1_mosi_hs: spi1-mosi-hs {
+                               rockchip,pins =
+                                       <3 RK_PB4 4 &pcfg_pull_up_8ma>;
+                       };
+               };
+
+               pdm {
+                       pdm_clk0m0: pdm-clk0m0 {
+                               rockchip,pins =
+                                       <3 RK_PC6 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_clk0m1: pdm-clk0m1 {
+                               rockchip,pins =
+                                       <2 RK_PC6 1 &pcfg_pull_none>;
+                       };
+
+                       pdm_clk1: pdm-clk1 {
+                               rockchip,pins =
+                                       <3 RK_PC7 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_sdi0m0: pdm-sdi0m0 {
+                               rockchip,pins =
+                                       <3 RK_PD3 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_sdi0m1: pdm-sdi0m1 {
+                               rockchip,pins =
+                                       <2 RK_PC5 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_sdi1: pdm-sdi1 {
+                               rockchip,pins =
+                                       <3 RK_PD0 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_sdi2: pdm-sdi2 {
+                               rockchip,pins =
+                                       <3 RK_PD1 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_sdi3: pdm-sdi3 {
+                               rockchip,pins =
+                                       <3 RK_PD2 2 &pcfg_pull_none>;
+                       };
+
+                       pdm_clk0m0_sleep: pdm-clk0m0-sleep {
+                               rockchip,pins =
+                                       <3 RK_PC6 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_clk0m_sleep1: pdm-clk0m1-sleep {
+                               rockchip,pins =
+                                       <2 RK_PC6 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_clk1_sleep: pdm-clk1-sleep {
+                               rockchip,pins =
+                                       <3 RK_PC7 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_sdi0m0_sleep: pdm-sdi0m0-sleep {
+                               rockchip,pins =
+                                       <3 RK_PD3 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_sdi0m1_sleep: pdm-sdi0m1-sleep {
+                               rockchip,pins =
+                                       <2 RK_PC5 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_sdi1_sleep: pdm-sdi1-sleep {
+                               rockchip,pins =
+                                       <3 RK_PD0 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_sdi2_sleep: pdm-sdi2-sleep {
+                               rockchip,pins =
+                                       <3 RK_PD1 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+
+                       pdm_sdi3_sleep: pdm-sdi3-sleep {
+                               rockchip,pins =
+                                       <3 RK_PD2 RK_FUNC_GPIO &pcfg_input_high>;
+                       };
+               };
+
+               i2s0 {
+                       i2s0_8ch_mclk: i2s0-8ch-mclk {
+                               rockchip,pins =
+                                       <3 RK_PC1 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sclktx: i2s0-8ch-sclktx {
+                               rockchip,pins =
+                                       <3 RK_PC3 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sclkrx: i2s0-8ch-sclkrx {
+                               rockchip,pins =
+                                       <3 RK_PB4 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_lrcktx: i2s0-8ch-lrcktx {
+                               rockchip,pins =
+                                       <3 RK_PC2 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_lrckrx: i2s0-8ch-lrckrx {
+                               rockchip,pins =
+                                       <3 RK_PB5 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdo0: i2s0-8ch-sdo0 {
+                               rockchip,pins =
+                                       <3 RK_PC4 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdo1: i2s0-8ch-sdo1 {
+                               rockchip,pins =
+                                       <3 RK_PC0 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdo2: i2s0-8ch-sdo2 {
+                               rockchip,pins =
+                                       <3 RK_PB7 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdo3: i2s0-8ch-sdo3 {
+                               rockchip,pins =
+                                       <3 RK_PB6 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdi0: i2s0-8ch-sdi0 {
+                               rockchip,pins =
+                                       <3 RK_PC5 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdi1: i2s0-8ch-sdi1 {
+                               rockchip,pins =
+                                       <3 RK_PB3 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdi2: i2s0-8ch-sdi2 {
+                               rockchip,pins =
+                                       <3 RK_PB1 2 &pcfg_pull_none>;
+                       };
+
+                       i2s0_8ch_sdi3: i2s0-8ch-sdi3 {
+                               rockchip,pins =
+                                       <3 RK_PB0 2 &pcfg_pull_none>;
+                       };
+               };
+
+               i2s1 {
+                       i2s1_2ch_mclk: i2s1-2ch-mclk {
+                               rockchip,pins =
+                                       <2 RK_PC3 1 &pcfg_pull_none>;
+                       };
+
+                       i2s1_2ch_sclk: i2s1-2ch-sclk {
+                               rockchip,pins =
+                                       <2 RK_PC2 1 &pcfg_pull_none>;
+                       };
+
+                       i2s1_2ch_lrck: i2s1-2ch-lrck {
+                               rockchip,pins =
+                                       <2 RK_PC1 1 &pcfg_pull_none>;
+                       };
+
+                       i2s1_2ch_sdi: i2s1-2ch-sdi {
+                               rockchip,pins =
+                                       <2 RK_PC5 1 &pcfg_pull_none>;
+                       };
+
+                       i2s1_2ch_sdo: i2s1-2ch-sdo {
+                               rockchip,pins =
+                                       <2 RK_PC4 1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2s2 {
+                       i2s2_2ch_mclk: i2s2-2ch-mclk {
+                               rockchip,pins =
+                                       <3 RK_PA1 2 &pcfg_pull_none>;
+                       };
+
+                       i2s2_2ch_sclk: i2s2-2ch-sclk {
+                               rockchip,pins =
+                                       <3 RK_PA2 2 &pcfg_pull_none>;
+                       };
+
+                       i2s2_2ch_lrck: i2s2-2ch-lrck {
+                               rockchip,pins =
+                                       <3 RK_PA3 2 &pcfg_pull_none>;
+                       };
+
+                       i2s2_2ch_sdi: i2s2-2ch-sdi {
+                               rockchip,pins =
+                                       <3 RK_PA5 2 &pcfg_pull_none>;
+                       };
+
+                       i2s2_2ch_sdo: i2s2-2ch-sdo {
+                               rockchip,pins =
+                                       <3 RK_PA7 2 &pcfg_pull_none>;
+                       };
+               };
+
+               sdmmc {
+                       sdmmc_clk: sdmmc-clk {
+                               rockchip,pins =
+                                       <1 RK_PD6 1 &pcfg_pull_none_8ma>;
+                       };
+
+                       sdmmc_cmd: sdmmc-cmd {
+                               rockchip,pins =
+                                       <1 RK_PD7 1 &pcfg_pull_up_8ma>;
+                       };
+
+                       sdmmc_det: sdmmc-det {
+                               rockchip,pins =
+                                       <0 RK_PA3 1 &pcfg_pull_up_8ma>;
+                       };
+
+                       sdmmc_bus1: sdmmc-bus1 {
+                               rockchip,pins =
+                                       <1 RK_PD2 1 &pcfg_pull_up_8ma>;
+                       };
+
+                       sdmmc_bus4: sdmmc-bus4 {
+                               rockchip,pins =
+                                       <1 RK_PD2 1 &pcfg_pull_up_8ma>,
+                                       <1 RK_PD3 1 &pcfg_pull_up_8ma>,
+                                       <1 RK_PD4 1 &pcfg_pull_up_8ma>,
+                                       <1 RK_PD5 1 &pcfg_pull_up_8ma>;
+                       };
+
+                       sdmmc_gpio: sdmmc-gpio {
+                               rockchip,pins =
+                                       <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
+                                       <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
+                                       <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
+                                       <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
+                                       <1 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up_4ma>,
+                                       <1 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up_4ma>;
+                       };
+               };
+
+               sdio {
+                       sdio_clk: sdio-clk {
+                               rockchip,pins =
+                                       <1 RK_PC5 1 &pcfg_pull_none>;
+                       };
+
+                       sdio_cmd: sdio-cmd {
+                               rockchip,pins =
+                                       <1 RK_PC4 1 &pcfg_pull_up>;
+                       };
+
+                       sdio_bus4: sdio-bus4 {
+                               rockchip,pins =
+                                       <1 RK_PC6 1 &pcfg_pull_up>,
+                                       <1 RK_PC7 1 &pcfg_pull_up>,
+                                       <1 RK_PD0 1 &pcfg_pull_up>,
+                                       <1 RK_PD1 1 &pcfg_pull_up>;
+                       };
+
+                       sdio_gpio: sdio-gpio {
+                               rockchip,pins =
+                                       <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
+                                       <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>,
+                                       <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
+                                       <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>,
+                                       <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>,
+                                       <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+                       };
+               };
+
+               emmc {
+                       emmc_clk: emmc-clk {
+                               rockchip,pins =
+                                       <1 RK_PB1 2 &pcfg_pull_none_8ma>;
+                       };
+
+                       emmc_cmd: emmc-cmd {
+                               rockchip,pins =
+                                       <1 RK_PB2 2 &pcfg_pull_up_8ma>;
+                       };
+
+                       emmc_pwren: emmc-pwren {
+                               rockchip,pins =
+                                       <1 RK_PB0 2 &pcfg_pull_none>;
+                       };
+
+                       emmc_rstnout: emmc-rstnout {
+                               rockchip,pins =
+                                       <1 RK_PB3 2 &pcfg_pull_none>;
+                       };
+
+                       emmc_bus1: emmc-bus1 {
+                               rockchip,pins =
+                                       <1 RK_PA0 2 &pcfg_pull_up_8ma>;
+                       };
+
+                       emmc_bus4: emmc-bus4 {
+                               rockchip,pins =
+                                       <1 RK_PA0 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA1 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA2 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA3 2 &pcfg_pull_up_8ma>;
+                       };
+
+                       emmc_bus8: emmc-bus8 {
+                               rockchip,pins =
+                                       <1 RK_PA0 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA1 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA2 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA3 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA4 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA5 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA6 2 &pcfg_pull_up_8ma>,
+                                       <1 RK_PA7 2 &pcfg_pull_up_8ma>;
+                       };
+               };
+
+               flash {
+                       flash_cs0: flash-cs0 {
+                               rockchip,pins =
+                                       <1 RK_PB0 1 &pcfg_pull_none>;
+                       };
+
+                       flash_rdy: flash-rdy {
+                               rockchip,pins =
+                                       <1 RK_PB1 1 &pcfg_pull_none>;
+                       };
+
+                       flash_dqs: flash-dqs {
+                               rockchip,pins =
+                                       <1 RK_PB2 1 &pcfg_pull_none>;
+                       };
+
+                       flash_ale: flash-ale {
+                               rockchip,pins =
+                                       <1 RK_PB3 1 &pcfg_pull_none>;
+                       };
+
+                       flash_cle: flash-cle {
+                               rockchip,pins =
+                                       <1 RK_PB4 1 &pcfg_pull_none>;
+                       };
+
+                       flash_wrn: flash-wrn {
+                               rockchip,pins =
+                                       <1 RK_PB5 1 &pcfg_pull_none>;
+                       };
+
+                       flash_csl: flash-csl {
+                               rockchip,pins =
+                                       <1 RK_PB6 1 &pcfg_pull_none>;
+                       };
+
+                       flash_rdn: flash-rdn {
+                               rockchip,pins =
+                                       <1 RK_PB7 1 &pcfg_pull_none>;
+                       };
+
+                       flash_bus8: flash-bus8 {
+                               rockchip,pins =
+                                       <1 RK_PA0 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA1 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA2 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA3 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA4 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA5 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA6 1 &pcfg_pull_up_12ma>,
+                                       <1 RK_PA7 1 &pcfg_pull_up_12ma>;
+                       };
+               };
+
+               lcdc {
+                       lcdc_rgb_dclk_pin: lcdc-rgb-dclk-pin {
+                               rockchip,pins =
+                                       <3 RK_PA0 1 &pcfg_pull_none_12ma>;
+                       };
+
+                       lcdc_rgb_m0_hsync_pin: lcdc-rgb-m0-hsync-pin {
+                               rockchip,pins =
+                                       <3 RK_PA1 1 &pcfg_pull_none_12ma>;
+                       };
+
+                       lcdc_rgb_m0_vsync_pin: lcdc-rgb-m0-vsync-pin {
+                               rockchip,pins =
+                                       <3 RK_PA2 1 &pcfg_pull_none_12ma>;
+                       };
+
+                       lcdc_rgb_m0_den_pin: lcdc-rgb-m0-den-pin {
+                               rockchip,pins =
+                                       <3 RK_PA3 1 &pcfg_pull_none_12ma>;
+                       };
+
+                       lcdc_rgb888_m0_data_pins: lcdc-rgb888-m0-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
+                                       <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
+                                       <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
+                                       <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
+                                       <3 RK_PC7 1 &pcfg_pull_none_8ma>, /* lcdc_d19 */
+                                       <3 RK_PC6 1 &pcfg_pull_none_8ma>, /* lcdc_d18 */
+                                       <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
+                                       <3 RK_PC4 1 &pcfg_pull_none_8ma>, /* lcdc_d16 */
+                                       <3 RK_PD3 1 &pcfg_pull_none_8ma>, /* lcdc_d23 */
+                                       <3 RK_PD2 1 &pcfg_pull_none_8ma>, /* lcdc_d22 */
+                                       <3 RK_PD1 1 &pcfg_pull_none_8ma>, /* lcdc_d21 */
+                                       <3 RK_PD0 1 &pcfg_pull_none_8ma>; /* lcdc_d20 */
+                       };
+
+                       lcdc_rgb666_m0_data_pins: lcdc-rgb666-m0-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
+                                       <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
+                                       <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
+                                       <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
+                                       <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
+                                       <3 RK_PC4 1 &pcfg_pull_none_8ma>; /* lcdc_d16 */
+                       };
+
+                       lcdc_rgb565_m0_data_pins: lcdc-rgb565-m0-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA7 1 &pcfg_pull_none_8ma>, /* lcdc_d3 */
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA5 1 &pcfg_pull_none_8ma>, /* lcdc_d1 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB1 1 &pcfg_pull_none_8ma>, /* lcdc_d5 */
+                                       <3 RK_PB0 1 &pcfg_pull_none_8ma>, /* lcdc_d4 */
+                                       <3 RK_PB7 1 &pcfg_pull_none_8ma>, /* lcdc_d11 */
+                                       <3 RK_PB6 1 &pcfg_pull_none_8ma>, /* lcdc_d10 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PB4 1 &pcfg_pull_none_8ma>, /* lcdc_d8 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>; /* lcdc_d12 */
+                       };
+
+                       lcdc_rgb888_m1_data_pins: lcdc-rgb888-m1-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
+                                       <3 RK_PC7 1 &pcfg_pull_none_8ma>, /* lcdc_d19 */
+                                       <3 RK_PC6 1 &pcfg_pull_none_8ma>, /* lcdc_d18 */
+                                       <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
+                                       <3 RK_PC4 1 &pcfg_pull_none_8ma>, /* lcdc_d16 */
+                                       <3 RK_PD3 1 &pcfg_pull_none_8ma>, /* lcdc_d23 */
+                                       <3 RK_PD2 1 &pcfg_pull_none_8ma>, /* lcdc_d22 */
+                                       <3 RK_PD1 1 &pcfg_pull_none_8ma>, /* lcdc_d21 */
+                                       <3 RK_PD0 1 &pcfg_pull_none_8ma>; /* lcdc_d20 */
+                       };
+
+                       lcdc_rgb666_m1_data_pins: lcdc-rgb666-m1-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>, /* lcdc_d12 */
+                                       <3 RK_PC5 1 &pcfg_pull_none_8ma>, /* lcdc_d17 */
+                                       <3 RK_PC4 1 &pcfg_pull_none_8ma>; /* lcdc_d16 */
+                       };
+
+                       lcdc_rgb565_m1_data_pins: lcdc-rgb565-m1-data-pins {
+                               rockchip,pins =
+                                       <3 RK_PA6 1 &pcfg_pull_none_8ma>, /* lcdc_d2 */
+                                       <3 RK_PA4 1 &pcfg_pull_none_8ma>, /* lcdc_d0 */
+                                       <3 RK_PB3 1 &pcfg_pull_none_8ma>, /* lcdc_d7 */
+                                       <3 RK_PB2 1 &pcfg_pull_none_8ma>, /* lcdc_d6 */
+                                       <3 RK_PB5 1 &pcfg_pull_none_8ma>, /* lcdc_d9 */
+                                       <3 RK_PC3 1 &pcfg_pull_none_8ma>, /* lcdc_d15 */
+                                       <3 RK_PC2 1 &pcfg_pull_none_8ma>, /* lcdc_d14 */
+                                       <3 RK_PC1 1 &pcfg_pull_none_8ma>, /* lcdc_d13 */
+                                       <3 RK_PC0 1 &pcfg_pull_none_8ma>; /* lcdc_d12 */
+                       };
+               };
+
+               pwm0 {
+                       pwm0_pin: pwm0-pin {
+                               rockchip,pins =
+                                       <0 RK_PB7 1 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm1 {
+                       pwm1_pin: pwm1-pin {
+                               rockchip,pins =
+                                       <0 RK_PC0 1 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm2 {
+                       pwm2_pin: pwm2-pin {
+                               rockchip,pins =
+                                       <2 RK_PB5 1 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm3 {
+                       pwm3_pin: pwm3-pin {
+                               rockchip,pins =
+                                       <0 RK_PC1 1 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm4 {
+                       pwm4_pin: pwm4-pin {
+                               rockchip,pins =
+                                       <3 RK_PC2 3 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm5 {
+                       pwm5_pin: pwm5-pin {
+                               rockchip,pins =
+                                       <3 RK_PC3 3 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm6 {
+                       pwm6_pin: pwm6-pin {
+                               rockchip,pins =
+                                       <3 RK_PC4 3 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm7 {
+                       pwm7_pin: pwm7-pin {
+                               rockchip,pins =
+                                       <3 RK_PC5 3 &pcfg_pull_none>;
+                       };
+               };
+
+               gmac {
+                       rmii_pins: rmii-pins {
+                               rockchip,pins =
+                                       <2 RK_PA0 2 &pcfg_pull_none_12ma>, /* mac_txen */
+                                       <2 RK_PA1 2 &pcfg_pull_none_12ma>, /* mac_txd1 */
+                                       <2 RK_PA2 2 &pcfg_pull_none_12ma>, /* mac_txd0 */
+                                       <2 RK_PA3 2 &pcfg_pull_none>, /* mac_rxd0 */
+                                       <2 RK_PA4 2 &pcfg_pull_none>, /* mac_rxd1 */
+                                       <2 RK_PA5 2 &pcfg_pull_none>, /* mac_rxer */
+                                       <2 RK_PA6 2 &pcfg_pull_none>, /* mac_rxdv */
+                                       <2 RK_PA7 2 &pcfg_pull_none>, /* mac_mdio */
+                                       <2 RK_PB1 2 &pcfg_pull_none>; /* mac_mdc */
+                       };
+
+                       mac_refclk_12ma: mac-refclk-12ma {
+                               rockchip,pins =
+                                       <2 RK_PB2 2 &pcfg_pull_none_12ma>;
+                       };
+
+                       mac_refclk: mac-refclk {
+                               rockchip,pins =
+                                       <2 RK_PB2 2 &pcfg_pull_none>;
+                       };
+               };
+
+               cif-m0 {
+                       cif_clkout_m0: cif-clkout-m0 {
+                               rockchip,pins =
+                                       <2 RK_PB3 1 &pcfg_pull_none>;
+                       };
+
+                       dvp_d2d9_m0: dvp-d2d9-m0 {
+                               rockchip,pins =
+                                       <2 RK_PA0 1 &pcfg_pull_none>, /* cif_data2 */
+                                       <2 RK_PA1 1 &pcfg_pull_none>, /* cif_data3 */
+                                       <2 RK_PA2 1 &pcfg_pull_none>, /* cif_data4 */
+                                       <2 RK_PA3 1 &pcfg_pull_none>, /* cif_data5 */
+                                       <2 RK_PA4 1 &pcfg_pull_none>, /* cif_data6 */
+                                       <2 RK_PA5 1 &pcfg_pull_none>, /* cif_data7 */
+                                       <2 RK_PA6 1 &pcfg_pull_none>, /* cif_data8 */
+                                       <2 RK_PA7 1 &pcfg_pull_none>, /* cif_data9 */
+                                       <2 RK_PB0 1 &pcfg_pull_none>, /* cif_sync */
+                                       <2 RK_PB1 1 &pcfg_pull_none>, /* cif_href */
+                                       <2 RK_PB2 1 &pcfg_pull_none>, /* cif_clkin */
+                                       <2 RK_PB3 1 &pcfg_pull_none>; /* cif_clkout */
+                       };
+
+                       dvp_d0d1_m0: dvp-d0d1-m0 {
+                               rockchip,pins =
+                                       <2 RK_PB4 1 &pcfg_pull_none>, /* cif_data0 */
+                                       <2 RK_PB6 1 &pcfg_pull_none>; /* cif_data1 */
+                       };
+
+                       dvp_d10d11_m0:d10-d11-m0 {
+                               rockchip,pins =
+                                       <2 RK_PB7 1 &pcfg_pull_none>, /* cif_data10 */
+                                       <2 RK_PC0 1 &pcfg_pull_none>; /* cif_data11 */
+                       };
+               };
+
+               cif-m1 {
+                       cif_clkout_m1: cif-clkout-m1 {
+                               rockchip,pins =
+                                       <3 RK_PD0 3 &pcfg_pull_none>;
+                       };
+
+                       dvp_d2d9_m1: dvp-d2d9-m1 {
+                               rockchip,pins =
+                                       <3 RK_PA3 3 &pcfg_pull_none>, /* cif_data2 */
+                                       <3 RK_PA5 3 &pcfg_pull_none>, /* cif_data3 */
+                                       <3 RK_PA7 3 &pcfg_pull_none>, /* cif_data4 */
+                                       <3 RK_PB0 3 &pcfg_pull_none>, /* cif_data5 */
+                                       <3 RK_PB1 3 &pcfg_pull_none>, /* cif_data6 */
+                                       <3 RK_PB4 3 &pcfg_pull_none>, /* cif_data7 */
+                                       <3 RK_PB6 3 &pcfg_pull_none>, /* cif_data8 */
+                                       <3 RK_PB7 3 &pcfg_pull_none>, /* cif_data9 */
+                                       <3 RK_PD1 3 &pcfg_pull_none>, /* cif_sync */
+                                       <3 RK_PD2 3 &pcfg_pull_none>, /* cif_href */
+                                       <3 RK_PD3 3 &pcfg_pull_none>, /* cif_clkin */
+                                       <3 RK_PD0 3 &pcfg_pull_none>; /* cif_clkout */
+                       };
+
+                       dvp_d0d1_m1: dvp-d0d1-m1 {
+                               rockchip,pins =
+                                       <3 RK_PA1 3 &pcfg_pull_none>, /* cif_data0 */
+                                       <3 RK_PA2 3 &pcfg_pull_none>; /* cif_data1 */
+                       };
+
+                       dvp_d10d11_m1:d10-d11-m1 {
+                               rockchip,pins =
+                                       <3 RK_PC6 3 &pcfg_pull_none>, /* cif_data10 */
+                                       <3 RK_PC7 3 &pcfg_pull_none>; /* cif_data11 */
+                       };
+               };
+
+               isp {
+                       isp_prelight: isp-prelight {
+                               rockchip,pins =
+                                       <3 RK_PD1 4 &pcfg_pull_none>;
+                       };
+               };
+       };
+};
index 246c317f6a6822990fc8851b48c2009bc2cc53a9..99d0d9912950bf6d33fecd4519c98eadc8e89e35 100644 (file)
@@ -41,6 +41,19 @@ vcc_sd: sdmmc-regulator {
                vin-supply = <&vcc_io>;
        };
 
+       vcc_sdio: sdmmcio-regulator {
+               compatible = "regulator-gpio";
+               gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
+               states = <1800000 0x1
+                         3300000 0x0>;
+               regulator-name = "vcc_sdio";
+               regulator-type = "voltage";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               vin-supply = <&vcc_sys>;
+       };
+
        vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
@@ -208,6 +221,18 @@ regulator-state-mem {
        };
 };
 
+&io_domains {
+       status = "okay";
+
+       vccio1-supply = <&vcc_io>;
+       vccio2-supply = <&vcc18_emmc>;
+       vccio3-supply = <&vcc_sdio>;
+       vccio4-supply = <&vcc_18>;
+       vccio5-supply = <&vcc_io>;
+       vccio6-supply = <&vcc_io>;
+       pmuio-supply = <&vcc_io>;
+};
+
 &pinctrl {
        pmic {
                pmic_int_l: pmic-int-l {
@@ -230,7 +255,12 @@ &sdmmc {
        max-frequency = <150000000>;
        pinctrl-names = "default";
        pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
+       sd-uhs-sdr104;
        vmmc-supply = <&vcc_sd>;
+       vqmmc-supply = <&vcc_sdio>;
        status = "okay";
 };
 
index 5272e887a434ec46d52afdffaf76164ad182cdaa..5852061e497b9d4fa3ae5722963fc7771df2fb3a 100644 (file)
@@ -46,7 +46,7 @@ vcc_host_5v: vcc-host-5v-regulator {
        vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
-               gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
+               gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&usb20_host_drv>;
                regulator-name = "vcc_host1_5v";
@@ -238,7 +238,7 @@ pmic_int_l: pmic-int-l {
 
        usb2 {
                usb20_host_drv: usb20-host-drv {
-                       rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+                       rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
                };
        };
 
index 3f5a2944300fe2441f87ec1ac144d771f2cddbfe..d3ef6566325e72d9e47a572117c6d7c95c43400c 100644 (file)
@@ -249,6 +249,12 @@ io_domains: io-domains {
                        status = "disabled";
                };
 
+               grf_gpio: grf-gpio {
+                       compatible = "rockchip,rk3328-grf-gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+
                power: power-controller {
                        compatible = "rockchip,rk3328-power-controller";
                        #power-domain-cells = <1>;
@@ -274,7 +280,6 @@ reboot-mode {
                        mode-bootloader = <BOOT_FASTBOOT>;
                        mode-loader = <BOOT_BL_DOWNLOAD>;
                };
-
        };
 
        uart0: serial@ff110000 {
index 38336ab57cc46046988500ac54496a7c97bc0c4f..c706db0ee9ec63e86199971bec605f946214ffe9 100644 (file)
@@ -622,6 +622,12 @@ vcc5v0_host_en: vcc5v0-host-en {
                };
        };
 
+       wifi {
+               wifi_host_wake_l: wifi-host-wake-l {
+                       rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
        leds {
                work_led_gpio: work_led-gpio {
                        rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -646,6 +652,36 @@ &saradc {
        status = "okay";
 };
 
+&sdio0 {
+       /* WiFi & BT combo module Ampak AP6356S */
+       bus-width = <4>;
+       cap-sdio-irq;
+       cap-sd-highspeed;
+       keep-power-in-suspend;
+       mmc-pwrseq = <&sdio_pwrseq>;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+       sd-uhs-sdr104;
+
+       /* Power supply */
+       vqmmc-supply = &vcc1v8_s3;      /* IO line */
+       vmmc-supply = &vcc_sdio;        /* card's power */
+
+       status = "okay";
+
+       brcmf: wifi@1 {
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&gpio0>;
+               interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
+               interrupt-names = "host-wake";
+               brcm,drive-strength = <5>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_host_wake_l>;
+       };
+};
+
 &sdmmc {
        bus-width = <4>;
        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 (file)
index 0000000..19f7732
--- /dev/null
@@ -0,0 +1,680 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
+ */
+
+/dts-v1/;
+#include <dt-bindings/pwm/pwm.h>
+#include "rk3399.dtsi"
+#include "rk3399-opp.dtsi"
+
+/ {
+       model = "Firefly ROC-RK3399-PC Board";
+       compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
+
+       chosen {
+               stdout-path = "serial2:1500000n8";
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm0 0 25000 0>;
+       };
+
+       clkin_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "clkin_gmac";
+               #clock-cells = <0>;
+       };
+
+       sdio_pwrseq: sdio-pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&rk808 1>;
+               clock-names = "ext_clock";
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_enable_h>;
+
+               /*
+                * On the module itself this is one of these (depending
+                * on the actual card populated):
+                * - SDIO_RESET_L_WL_REG_ON
+                * - PDN (power down when low)
+                */
+               reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
+       };
+
+       vcc_vbus_typec0: vcc-vbus-typec0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_vbus_typec0";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+       };
+
+       /*
+        * should be placed inside mp8859, but not until mp8859 has
+        * its own dt-binding.
+        */
+       vcc12v_sys: mp8859-dcdc1 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc12v_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <12000000>;
+               regulator-max-microvolt = <12000000>;
+               vin-supply = <&vcc_vbus_typec0>;
+       };
+
+       /* switched by pmic_sleep */
+       vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc1v8_s3";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vcc_1v8>;
+       };
+
+       vcc3v3_sys: vcc3v3-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc3v3_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vcc12v_sys>;
+       };
+
+       /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
+       vcc5v0_host: vcc5v0-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
+               regulator-name = "vcc5v0_host";
+               regulator-always-on;
+               vin-supply = <&vcc_sys>;
+       };
+
+       vcc_vbus_typec1: vcc-vbus-typec1 {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc_vbus_typec1_en>;
+               regulator-name = "vcc_vbus_typec1";
+               regulator-always-on;
+               vin-supply = <&vcc_sys>;
+       };
+
+       vcc_sys: vcc-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&vcc12v_sys>;
+       };
+
+       vdd_log: vdd-log {
+               compatible = "pwm-regulator";
+               pwms = <&pwm2 0 25000 1>;
+               regulator-name = "vdd_log";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <800000>;
+               regulator-max-microvolt = <1400000>;
+               vin-supply = <&vcc3v3_sys>;
+       };
+};
+
+&cpu_l0 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l1 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l2 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_l3 {
+       cpu-supply = <&vdd_cpu_l>;
+};
+
+&cpu_b0 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&cpu_b1 {
+       cpu-supply = <&vdd_cpu_b>;
+};
+
+&emmc_phy {
+       status = "okay";
+};
+
+&gmac {
+       assigned-clocks = <&cru SCLK_RMII_SRC>;
+       assigned-clock-parents = <&clkin_gmac>;
+       clock_in_out = "input";
+       phy-supply = <&vcc_lan>;
+       phy-mode = "rgmii";
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 50000>;
+       tx_delay = <0x28>;
+       rx_delay = <0x11>;
+       status = "okay";
+};
+
+&hdmi {
+       ddc-i2c-bus = <&i2c3>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&hdmi_cec>;
+       status = "okay";
+};
+
+&i2c0 {
+       clock-frequency = <400000>;
+       i2c-scl-rising-time-ns = <168>;
+       i2c-scl-falling-time-ns = <4>;
+       status = "okay";
+
+       rk808: pmic@1b {
+               compatible = "rockchip,rk808";
+               reg = <0x1b>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk808-clkout2";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int_l>;
+               rockchip,system-power-controller;
+               wakeup-source;
+
+               vcc1-supply = <&vcc3v3_sys>;
+               vcc2-supply = <&vcc3v3_sys>;
+               vcc3-supply = <&vcc3v3_sys>;
+               vcc4-supply = <&vcc3v3_sys>;
+               vcc6-supply = <&vcc3v3_sys>;
+               vcc7-supply = <&vcc3v3_sys>;
+               vcc8-supply = <&vcc3v3_sys>;
+               vcc9-supply = <&vcc3v3_sys>;
+               vcc10-supply = <&vcc3v3_sys>;
+               vcc11-supply = <&vcc3v3_sys>;
+               vcc12-supply = <&vcc3v3_sys>;
+               vddio-supply = <&vcc1v8_pmu>;
+
+               regulators {
+                       vdd_center: DCDC_REG1 {
+                               regulator-name = "vdd_center";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_cpu_l: DCDC_REG2 {
+                               regulator-name = "vdd_cpu_l";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-ramp-delay = <6001>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-name = "vcc_ddr";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_1v8: DCDC_REG4 {
+                               regulator-name = "vcc_1v8";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcca1v8_codec: LDO_REG1 {
+                               regulator-name = "vcca1v8_codec";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc1v8_hdmi: LDO_REG2 {
+                               regulator-name = "vcc1v8_hdmi";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc1v8_pmu: LDO_REG3 {
+                               regulator-name = "vcc1v8_pmu";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc_sdio: LDO_REG4 {
+                               regulator-name = "vcc_sdio";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3000000>;
+                               };
+                       };
+
+                       vcca3v0_codec: LDO_REG5 {
+                               regulator-name = "vcca3v0_codec";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_1v5: LDO_REG6 {
+                               regulator-name = "vcc_1v5";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1500000>;
+                               };
+                       };
+
+                       vcca0v9_hdmi: LDO_REG7 {
+                               regulator-name = "vcca0v9_hdmi";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <900000>;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc_3v0: LDO_REG8 {
+                               regulator-name = "vcc_3v0";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3000000>;
+                               };
+                       };
+
+                       vcc3v3_s3: vcc_lan: SWITCH_REG1 {
+                               regulator-name = "vcc3v3_s3";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vcc3v3_s0: SWITCH_REG2 {
+                               regulator-name = "vcc3v3_s0";
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+               };
+       };
+
+       vdd_cpu_b: regulator@40 {
+               compatible = "silergy,syr827";
+               reg = <0x40>;
+               fcs,suspend-voltage-selector = <1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vsel1_gpio>;
+               regulator-name = "vdd_cpu_b";
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1500000>;
+               regulator-ramp-delay = <1000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc3v3_sys>;
+
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+
+       vdd_gpu: regulator@41 {
+               compatible = "silergy,syr828";
+               reg = <0x41>;
+               fcs,suspend-voltage-selector = <1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vsel2_gpio>;
+               regulator-name = "vdd_gpu";
+               regulator-min-microvolt = <712500>;
+               regulator-max-microvolt = <1500000>;
+               regulator-ramp-delay = <1000>;
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc3v3_sys>;
+
+               regulator-state-mem {
+                       regulator-off-in-suspend;
+               };
+       };
+};
+
+&i2c1 {
+       i2c-scl-rising-time-ns = <300>;
+       i2c-scl-falling-time-ns = <15>;
+       status = "okay";
+};
+
+&i2c3 {
+       i2c-scl-rising-time-ns = <450>;
+       i2c-scl-falling-time-ns = <15>;
+       status = "okay";
+};
+
+&i2c4 {
+       i2c-scl-rising-time-ns = <600>;
+       i2c-scl-falling-time-ns = <20>;
+       status = "okay";
+
+       fusb1: usb-typec@22 {
+               compatible = "fcs,fusb302";
+               reg = <0x22>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&fusb1_int>;
+               vbus-supply = <&vcc_vbus_typec1>;
+               status = "okay";
+       };
+};
+
+&i2c7 {
+       i2c-scl-rising-time-ns = <600>;
+       i2c-scl-falling-time-ns = <20>;
+       status = "okay";
+
+       fusb0: usb-typec@22 {
+               compatible = "fcs,fusb302";
+               reg = <0x22>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&fusb0_int>;
+               vbus-supply = <&vcc_vbus_typec0>;
+               status = "okay";
+       };
+};
+
+&i2s0 {
+       rockchip,playback-channels = <8>;
+       rockchip,capture-channels = <8>;
+       status = "okay";
+};
+
+&i2s1 {
+       rockchip,playback-channels = <2>;
+       rockchip,capture-channels = <2>;
+       status = "okay";
+};
+
+&i2s2 {
+       status = "okay";
+};
+
+&io_domains {
+       audio-supply = <&vcca1v8_codec>;
+       bt656-supply = <&vcc_3v0>;
+       gpio1830-supply = <&vcc_3v0>;
+       sdmmc-supply = <&vcc_sdio>;
+       status = "okay";
+};
+
+&pmu_io_domains {
+       pmu1830-supply = <&vcc_3v0>;
+       status = "okay";
+};
+
+&pinctrl {
+       lcd-panel {
+               lcd_panel_reset: lcd-panel-reset {
+                       rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       pmic {
+               vsel1_gpio: vsel1-gpio {
+                       rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               vsel2_gpio: vsel2-gpio {
+                       rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       sdio-pwrseq {
+               wifi_enable_h: wifi-enable-h {
+                       rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               pmic_int_l: pmic-int-l {
+                       rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       usb2 {
+               vcc5v0_host_en: vcc5v0-host-en {
+                       rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+
+               hub_rst: hub-rst {
+                       rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
+               };
+       };
+
+       usb-typec {
+               vcc_vbus_typec1_en: vcc-vbus-typec1-en {
+                       rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       fusb30x {
+               fusb0_int: fusb0-int {
+                       rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+
+               fusb1_int: fusb1-int {
+                       rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+};
+
+&pwm0 {
+       status = "okay";
+};
+
+&pwm2 {
+       status = "okay";
+};
+
+&saradc {
+       vref-supply = <&vcca1v8_s3>;
+       status = "okay";
+};
+
+&sdmmc {
+       bus-width = <4>;
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
+       disable-wp;
+       max-frequency = <150000000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
+       status = "okay";
+};
+
+&sdhci {
+       bus-width = <8>;
+       mmc-hs400-1_8v;
+       mmc-hs400-enhanced-strobe;
+       non-removable;
+       status = "okay";
+};
+
+&tcphy0 {
+       status = "okay";
+};
+
+&tcphy1 {
+       status = "okay";
+};
+
+&tsadc {
+       /* tshut mode 0:CRU 1:GPIO */
+       rockchip,hw-tshut-mode = <1>;
+       /* tshut polarity 0:LOW 1:HIGH */
+       rockchip,hw-tshut-polarity = <1>;
+       status = "okay";
+};
+
+&u2phy0 {
+       status = "okay";
+
+       u2phy0_otg: otg-port {
+               phy-supply = <&vcc_vbus_typec0>;
+               status = "okay";
+       };
+
+       u2phy0_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&u2phy1 {
+       status = "okay";
+
+       u2phy1_otg: otg-port {
+               phy-supply = <&vcc_vbus_typec1>;
+               status = "okay";
+       };
+
+       u2phy1_host: host-port {
+               phy-supply = <&vcc5v0_host>;
+               status = "okay";
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_xfer &uart0_cts>;
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&usb_host0_ehci {
+       status = "okay";
+};
+
+&usb_host0_ohci {
+       status = "okay";
+};
+
+&usb_host1_ehci {
+       status = "okay";
+};
+
+&usb_host1_ohci {
+       status = "okay";
+};
+
+&usbdrd3_0 {
+       status = "okay";
+};
+
+&usbdrd_dwc3_0 {
+       status = "okay";
+};
+
+&usbdrd3_1 {
+       status = "okay";
+};
+
+&usbdrd_dwc3_1 {
+       status = "okay";
+       dr_mode = "host";
+};
+
+&vopb {
+       status = "okay";
+};
+
+&vopb_mmu {
+       status = "okay";
+};
+
+&vopl {
+       status = "okay";
+};
+
+&vopl_mmu {
+       status = "okay";
+};
index 36b60791c156d2ace112850571418d0410f81bd7..a531cd6c2e83693c1772ea5a5cce2ab052652835 100644 (file)
@@ -103,20 +103,10 @@ vcc3v3_sys: vcc3v3-sys {
                vin-supply = <&vcc_sys>;
        };
 
-       vcc_sys: vcc-sys {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc_sys";
-               regulator-always-on;
-               regulator-boot-on;
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               vin-supply = <&dc_12v>;
-       };
-
        vcc5v0_host: vcc5v0-host-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
-               gpio = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
+               gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&vcc5v0_host_en>;
                regulator-name = "vcc5v0_host";
@@ -124,6 +114,26 @@ vcc5v0_host: vcc5v0-host-regulator {
                vin-supply = <&vcc_sys>;
        };
 
+       vcc5v0_typec0: vcc5v0-typec0-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio2 RK_PA0 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&vcc5v0_typec0_en>;
+               regulator-name = "vcc5v0_typec0";
+               vin-supply = <&vcc_sys>;
+       };
+
+       vcc_sys: vcc-sys {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-always-on;
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               vin-supply = <&dc_12v>;
+       };
+
        vdd_log: vdd-log {
                compatible = "pwm-regulator";
                pwms = <&pwm2 0 25000 1>;
@@ -208,7 +218,7 @@ rk808: pmic@1b {
                #clock-cells = <1>;
                clock-output-names = "xin32k", "rk808-clkout2";
                pinctrl-names = "default";
-               pinctrl-0 = <&pmic_int_l &pmic_dvs2>;
+               pinctrl-0 = <&pmic_int_l>;
                rockchip,system-power-controller;
                wakeup-source;
 
@@ -455,11 +465,6 @@ pmic_int_l: pmic-int-l {
                                <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
                };
 
-               pmic_dvs2: pmic-dvs2 {
-                       rockchip,pins =
-                               <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
-               };
-
                vsel1_gpio: vsel1-gpio {
                        rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
                };
@@ -474,6 +479,10 @@ vcc5v0_host_en: vcc5v0-host-en {
                        rockchip,pins =
                                <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
                };
+               vcc5v0_typec0_en: vcc5v0-typec0-en {
+                       rockchip,pins =
+                               <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
        };
 };
 
@@ -531,6 +540,7 @@ &u2phy0 {
        status = "okay";
 
        u2phy0_otg: otg-port {
+               phy-supply = <&vcc5v0_typec0>;
                status = "okay";
        };
 
index c88e603396f610615e4070bc8af62dfa9d389b0b..b426902189c0b58003b62dab04179ec351e6bdc2 100644 (file)
@@ -74,6 +74,7 @@ cpu_l0: cpu@0 {
                        clocks = <&cru ARMCLKL>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <100>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                };
 
                cpu_l1: cpu@1 {
@@ -84,6 +85,7 @@ cpu_l1: cpu@1 {
                        clocks = <&cru ARMCLKL>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <100>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                };
 
                cpu_l2: cpu@2 {
@@ -94,6 +96,7 @@ cpu_l2: cpu@2 {
                        clocks = <&cru ARMCLKL>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <100>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                };
 
                cpu_l3: cpu@3 {
@@ -104,6 +107,7 @@ cpu_l3: cpu@3 {
                        clocks = <&cru ARMCLKL>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <100>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                };
 
                cpu_b0: cpu@100 {
@@ -114,6 +118,7 @@ cpu_b0: cpu@100 {
                        clocks = <&cru ARMCLKB>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <436>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
                };
 
                cpu_b1: cpu@101 {
@@ -124,6 +129,29 @@ cpu_b1: cpu@101 {
                        clocks = <&cru ARMCLKB>;
                        #cooling-cells = <2>; /* min followed by max */
                        dynamic-power-coefficient = <436>;
+                       cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+               };
+
+               idle-states {
+                       entry-method = "psci";
+
+                       CPU_SLEEP: cpu-sleep {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x0010000>;
+                               entry-latency-us = <120>;
+                               exit-latency-us = <250>;
+                               min-residency-us = <900>;
+                       };
+
+                       CLUSTER_SLEEP: cluster-sleep {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x1010000>;
+                               entry-latency-us = <400>;
+                               exit-latency-us = <500>;
+                               min-residency-us = <2000>;
+                       };
                };
        };
 
diff --git a/arch/arm64/boot/dts/synaptics/as370.dtsi b/arch/arm64/boot/dts/synaptics/as370.dtsi
new file mode 100644 (file)
index 0000000..7331acf
--- /dev/null
@@ -0,0 +1,173 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2018 Synaptics Incorporated
+ *
+ * Author: Jisheng Zhang <jszhang@kernel.org>
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       compatible = "syna,as370";
+       interrupt-parent = <&gic>;
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       psci {
+               compatible = "arm,psci-1.0";
+               method = "smc";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x0>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       cpu-idle-states = <&CPU_SLEEP_0>;
+               };
+
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x1>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       cpu-idle-states = <&CPU_SLEEP_0>;
+               };
+
+               cpu2: cpu@2 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x2>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       cpu-idle-states = <&CPU_SLEEP_0>;
+               };
+
+               cpu3: cpu@3 {
+                       compatible = "arm,cortex-a53", "arm,armv8";
+                       device_type = "cpu";
+                       reg = <0x3>;
+                       enable-method = "psci";
+                       next-level-cache = <&l2>;
+                       cpu-idle-states = <&CPU_SLEEP_0>;
+               };
+
+               l2: cache {
+                       compatible = "cache";
+               };
+
+               idle-states {
+                       entry-method = "psci";
+                       CPU_SLEEP_0: cpu-sleep-0 {
+                               compatible = "arm,idle-state";
+                               local-timer-stop;
+                               arm,psci-suspend-param = <0x0010000>;
+                               entry-latency-us = <75>;
+                               exit-latency-us = <155>;
+                               min-residency-us = <1000>;
+                       };
+               };
+       };
+
+       osc: osc {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <25000000>;
+       };
+
+       pmu {
+               compatible = "arm,cortex-a53-pmu";
+               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>,
+                                    <&cpu1>,
+                                    <&cpu2>,
+                                    <&cpu3>;
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       soc@f7000000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0 0xf7000000 0x1000000>;
+
+               gic: interrupt-controller@901000 {
+                       compatible = "arm,gic-400";
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+                       reg = <0x901000 0x1000>,
+                             <0x902000 0x2000>,
+                             <0x904000 0x2000>,
+                             <0x906000 0x2000>;
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+               };
+
+               apb@e80000 {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0 0xe80000 0x10000>;
+
+                       uart0: serial@c00 {
+                               compatible = "snps,dw-apb-uart";
+                               reg = <0xc00 0x100>;
+                               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&osc>;
+                               reg-shift = <2>;
+                               status = "disabled";
+                       };
+
+                       gpio0: gpio@1800 {
+                               compatible = "snps,dw-apb-gpio";
+                               reg = <0x1800 0x400>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               porta: gpio-port@0 {
+                                       compatible = "snps,dw-apb-gpio-port";
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                                       snps,nr-gpios = <32>;
+                                       reg = <0>;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                       };
+
+                       gpio1: gpio@2000 {
+                               compatible = "snps,dw-apb-gpio";
+                               reg = <0x2000 0x400>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               portb: gpio-port@1 {
+                                       compatible = "snps,dw-apb-gpio-port";
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                                       snps,nr-gpios = <32>;
+                                       reg = <0>;
+                                       interrupt-controller;
+                                       #interrupt-cells = <2>;
+                                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                       };
+               };
+       };
+};
index 2409344df4fa2f50ee9e91feddc483e0a4a10279..adcd6341e40c02aabef992516a075eb2a14245a8 100644 (file)
@@ -8,13 +8,13 @@
 &cbass_main {
        gic500: interrupt-controller@1800000 {
                compatible = "arm,gic-v3";
-               #address-cells = <1>;
-               #size-cells = <1>;
+               #address-cells = <2>;
+               #size-cells = <2>;
                ranges;
                #interrupt-cells = <3>;
                interrupt-controller;
-               reg = <0x01800000 0x10000>,     /* GICD */
-                     <0x01880000 0x90000>;     /* GICR */
+               reg = <0x00 0x01800000 0x00 0x10000>,   /* GICD */
+                     <0x00 0x01880000 0x00 0x90000>;   /* GICR */
                /*
                 * vcpumntirq:
                 * virtual CPU interface maintenance interrupt
@@ -23,9 +23,50 @@ gic500: interrupt-controller@1800000 {
 
                gic_its: gic-its@18200000 {
                        compatible = "arm,gic-v3-its";
-                       reg = <0x01820000 0x10000>;
+                       reg = <0x00 0x01820000 0x00 0x10000>;
                        msi-controller;
                        #msi-cells = <1>;
                };
        };
+
+       secure_proxy_main: mailbox@32c00000 {
+               compatible = "ti,am654-secure-proxy";
+               #mbox-cells = <1>;
+               reg-names = "target_data", "rt", "scfg";
+               reg = <0x00 0x32c00000 0x00 0x100000>,
+                     <0x00 0x32400000 0x00 0x100000>,
+                     <0x00 0x32800000 0x00 0x100000>;
+               interrupt-names = "rx_011";
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       main_uart0: serial@2800000 {
+               compatible = "ti,am654-uart";
+               reg = <0x00 0x02800000 0x00 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <48000000>;
+               current-speed = <115200>;
+       };
+
+       main_uart1: serial@2810000 {
+               compatible = "ti,am654-uart";
+               reg = <0x00 0x02810000 0x00 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <48000000>;
+               current-speed = <115200>;
+       };
+
+       main_uart2: serial@2820000 {
+               compatible = "ti,am654-uart";
+               reg = <0x00 0x02820000 0x00 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <48000000>;
+               current-speed = <115200>;
+       };
 };
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 (file)
index 0000000..8c611d1
--- /dev/null
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for AM6 SoC Family MCU Domain peripherals
+ *
+ * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
+ */
+
+&cbass_mcu {
+       mcu_uart0: serial@40a00000 {
+               compatible = "ti,am654-uart";
+                       reg = <0x00 0x40a00000 0x00 0x100>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       interrupts = <GIC_SPI 565 IRQ_TYPE_LEVEL_HIGH>;
+                       clock-frequency = <96000000>;
+                       current-speed = <115200>;
+       };
+};
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 (file)
index 0000000..affc3c3
--- /dev/null
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for AM6 SoC Family Wakeup Domain peripherals
+ *
+ * Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
+ */
+
+&cbass_wakeup {
+       dmsc: dmsc {
+               compatible = "ti,k2g-sci";
+               ti,host-id = <12>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               mbox-names = "rx", "tx";
+
+               mboxes= <&secure_proxy_main 11>,
+                       <&secure_proxy_main 13>;
+
+               k3_pds: power-controller {
+                       compatible = "ti,sci-pm-domain";
+                       #power-domain-cells = <1>;
+               };
+
+               k3_clks: clocks {
+                       compatible = "ti,k2g-sci-clk";
+                       #clock-cells = <2>;
+               };
+
+               k3_reset: reset-controller {
+                       compatible = "ti,sci-reset";
+                       #reset-cells = <2>;
+               };
+       };
+
+       wkup_uart0: serial@42300000 {
+               compatible = "ti,am654-uart";
+               reg = <0x00 0x42300000 0x00 0x100>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               interrupts = <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <48000000>;
+               current-speed = <115200>;
+       };
+};
index cede1fa0983c9321511649251cff09c1cdaa4e63..3d4bf369d0304a3afb8bcb43e18ca1eeb2648413 100644 (file)
@@ -16,6 +16,14 @@ / {
        #address-cells = <2>;
        #size-cells = <2>;
 
+       aliases {
+               serial0 = &wkup_uart0;
+               serial1 = &mcu_uart0;
+               serial2 = &main_uart0;
+               serial3 = &main_uart1;
+               serial4 = &main_uart2;
+       };
+
        chosen { };
 
        firmware {
@@ -46,38 +54,38 @@ pmu: pmu {
 
        cbass_main: interconnect@100000 {
                compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges = <0x00100000 0x00 0x00100000 0x00020000>, /* ctrl mmr */
-                        <0x00600000 0x00 0x00600000 0x00001100>, /* GPIO */
-                        <0x00900000 0x00 0x00900000 0x00012000>, /* serdes */
-                        <0x01000000 0x00 0x01000000 0x0af02400>, /* Most peripherals */
-                        <0x30800000 0x00 0x30800000 0x0bc00000>, /* MAIN NAVSS */
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x00 0x00100000 0x00 0x00100000 0x00 0x00020000>, /* ctrl mmr */
+                        <0x00 0x00600000 0x00 0x00600000 0x00 0x00001100>, /* GPIO */
+                        <0x00 0x00900000 0x00 0x00900000 0x00 0x00012000>, /* serdes */
+                        <0x00 0x01000000 0x00 0x01000000 0x00 0x0af02400>, /* Most peripherals */
+                        <0x00 0x30800000 0x00 0x30800000 0x00 0x0bc00000>, /* MAIN NAVSS */
                         /* MCUSS Range */
-                        <0x28380000 0x00 0x28380000 0x03880000>,
-                        <0x40200000 0x00 0x40200000 0x00900100>,
-                        <0x42040000 0x00 0x42040000 0x03ac2400>,
-                        <0x45100000 0x00 0x45100000 0x00c24000>,
-                        <0x46000000 0x00 0x46000000 0x00200000>,
-                        <0x47000000 0x00 0x47000000 0x00068400>;
+                        <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>,
+                        <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>,
+                        <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>,
+                        <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>,
+                        <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>,
+                        <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>;
 
                cbass_mcu: interconnect@28380000 {
                        compatible = "simple-bus";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges = <0x28380000 0x28380000 0x03880000>, /* MCU NAVSS*/
-                                <0x40200000 0x40200000 0x00900100>, /* First peripheral window */
-                                <0x42040000 0x42040000 0x03ac2400>, /* WKUP */
-                                <0x45100000 0x45100000 0x00c24000>, /* MMRs, remaining NAVSS */
-                                <0x46000000 0x46000000 0x00200000>, /* CPSW */
-                                <0x47000000 0x47000000 0x00068400>; /* OSPI space 1 */
+                       #address-cells = <2>;
+                       #size-cells = <2>;
+                       ranges = <0x00 0x28380000 0x00 0x28380000 0x00 0x03880000>, /* MCU NAVSS*/
+                                <0x00 0x40200000 0x00 0x40200000 0x00 0x00900100>, /* First peripheral window */
+                                <0x00 0x42040000 0x00 0x42040000 0x00 0x03ac2400>, /* WKUP */
+                                <0x00 0x45100000 0x00 0x45100000 0x00 0x00c24000>, /* MMRs, remaining NAVSS */
+                                <0x00 0x46000000 0x00 0x46000000 0x00 0x00200000>, /* CPSW */
+                                <0x00 0x47000000 0x00 0x47000000 0x00 0x00068400>; /* OSPI space 1 */
 
                        cbass_wakeup: interconnect@42040000 {
                                compatible = "simple-bus";
                                #address-cells = <1>;
                                #size-cells = <1>;
                                /* WKUP  Basic peripherals */
-                               ranges = <0x42040000 0x42040000 0x03ac2400>;
+                               ranges = <0x42040000 0x00 0x42040000 0x03ac2400>;
                        };
                };
        };
@@ -85,3 +93,5 @@ cbass_wakeup: interconnect@42040000 {
 
 /* Now include the peripherals for each bus segments */
 #include "k3-am65-main.dtsi"
+#include "k3-am65-mcu.dtsi"
+#include "k3-am65-wakeup.dtsi"
index af6956fdc13f49662c47e2750b4296b843851a2e..e146ac2ad781b1f27ad0787f9f6a7b06b0f1a805 100644 (file)
@@ -34,3 +34,8 @@ secure_ddr: secure_ddr@9e800000 {
                };
        };
 };
+
+&wkup_uart0 {
+       /* Wakeup UART is used by System firmware */
+       status = "disabled";
+};
index f67e8d5e93ad96df94aba1400b40fc24d3a52781..db8d364f84768b669333dbe21334fcbb3d3e81c3 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_ARCH_BCM_IPROC=y
 CONFIG_ARCH_BERLIN=y
 CONFIG_ARCH_BRCMSTB=y
 CONFIG_ARCH_EXYNOS=y
+CONFIG_ARCH_K3=y
 CONFIG_ARCH_LAYERSCAPE=y
 CONFIG_ARCH_LG1K=y
 CONFIG_ARCH_HISI=y
@@ -605,6 +606,8 @@ CONFIG_ARCH_TEGRA_132_SOC=y
 CONFIG_ARCH_TEGRA_210_SOC=y
 CONFIG_ARCH_TEGRA_186_SOC=y
 CONFIG_ARCH_TEGRA_194_SOC=y
+CONFIG_ARCH_K3_AM6_SOC=y
+CONFIG_SOC_TI=y
 CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
 CONFIG_EXTCON_USB_GPIO=y
 CONFIG_EXTCON_USBC_CROS_EC=y
index 6e9f33d14930eb045d293c4df7952afa555b56fa..067d8937d5af1e74a69ae7b14b1b0306a53fe087 100644 (file)
@@ -417,7 +417,7 @@ static int gcm_encrypt(struct aead_request *req)
                __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds);
                put_unaligned_be32(2, iv + GCM_IV_SIZE);
 
-               while (walk.nbytes >= AES_BLOCK_SIZE) {
+               while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
                        int blocks = walk.nbytes / AES_BLOCK_SIZE;
                        u8 *dst = walk.dst.virt.addr;
                        u8 *src = walk.src.virt.addr;
@@ -437,11 +437,18 @@ static int gcm_encrypt(struct aead_request *req)
                                        NULL);
 
                        err = skcipher_walk_done(&walk,
-                                                walk.nbytes % AES_BLOCK_SIZE);
+                                                walk.nbytes % (2 * AES_BLOCK_SIZE));
                }
-               if (walk.nbytes)
+               if (walk.nbytes) {
                        __aes_arm64_encrypt(ctx->aes_key.key_enc, ks, iv,
                                            nrounds);
+                       if (walk.nbytes > AES_BLOCK_SIZE) {
+                               crypto_inc(iv, AES_BLOCK_SIZE);
+                               __aes_arm64_encrypt(ctx->aes_key.key_enc,
+                                                   ks + AES_BLOCK_SIZE, iv,
+                                                   nrounds);
+                       }
+               }
        }
 
        /* handle the tail */
@@ -545,7 +552,7 @@ static int gcm_decrypt(struct aead_request *req)
                __aes_arm64_encrypt(ctx->aes_key.key_enc, tag, iv, nrounds);
                put_unaligned_be32(2, iv + GCM_IV_SIZE);
 
-               while (walk.nbytes >= AES_BLOCK_SIZE) {
+               while (walk.nbytes >= (2 * AES_BLOCK_SIZE)) {
                        int blocks = walk.nbytes / AES_BLOCK_SIZE;
                        u8 *dst = walk.dst.virt.addr;
                        u8 *src = walk.src.virt.addr;
@@ -564,11 +571,21 @@ static int gcm_decrypt(struct aead_request *req)
                        } while (--blocks > 0);
 
                        err = skcipher_walk_done(&walk,
-                                                walk.nbytes % AES_BLOCK_SIZE);
+                                                walk.nbytes % (2 * AES_BLOCK_SIZE));
                }
-               if (walk.nbytes)
+               if (walk.nbytes) {
+                       if (walk.nbytes > AES_BLOCK_SIZE) {
+                               u8 *iv2 = iv + AES_BLOCK_SIZE;
+
+                               memcpy(iv2, iv, AES_BLOCK_SIZE);
+                               crypto_inc(iv2, AES_BLOCK_SIZE);
+
+                               __aes_arm64_encrypt(ctx->aes_key.key_enc, iv2,
+                                                   iv2, nrounds);
+                       }
                        __aes_arm64_encrypt(ctx->aes_key.key_enc, iv, iv,
                                            nrounds);
+               }
        }
 
        /* handle the tail */
index b7fb5274b250134253173384ff643578f5c06a29..0c4fc223f22575fbf76ff66d3e077249d86ad8c1 100644 (file)
@@ -69,5 +69,5 @@ static void __exit sm4_ce_mod_fini(void)
        crypto_unregister_alg(&sm4_ce_alg);
 }
 
-module_cpu_feature_match(SM3, sm4_ce_mod_init);
+module_cpu_feature_match(SM4, sm4_ce_mod_init);
 module_exit(sm4_ce_mod_fini);
index 3534aa6a4dc2bc7e833001739582af3660a579d1..1b083c500b9a170beb6c030d882f9d9f675369c5 100644 (file)
@@ -98,11 +98,10 @@ static time64_t pmu_read_time(void)
 
        if (pmu_request(&req, NULL, 1, PMU_READ_RTC) < 0)
                return 0;
-       while (!req.complete)
-               pmu_poll();
+       pmu_wait_complete(&req);
 
-       time = (u32)((req.reply[1] << 24) | (req.reply[2] << 16) |
-                    (req.reply[3] << 8) | req.reply[4]);
+       time = (u32)((req.reply[0] << 24) | (req.reply[1] << 16) |
+                    (req.reply[2] << 8) | req.reply[3]);
 
        return time - RTC_OFFSET;
 }
@@ -116,8 +115,7 @@ static void pmu_write_time(time64_t time)
                        (data >> 24) & 0xFF, (data >> 16) & 0xFF,
                        (data >> 8) & 0xFF, data & 0xFF) < 0)
                return;
-       while (!req.complete)
-               pmu_poll();
+       pmu_wait_complete(&req);
 }
 
 static __u8 pmu_read_pram(int offset)
index 7a49f0d28d14c106ea9300c8e54ad18aa6471e0b..f1da8a7b17ff49b4965f4f5d9e647b9e1d1e258d 100644 (file)
@@ -3,15 +3,6 @@
 config TRACE_IRQFLAGS_SUPPORT
        def_bool y
 
-config DEBUG_STACK_USAGE
-       bool "Enable stack utilization instrumentation"
-       depends on DEBUG_KERNEL
-       help
-         Enables the display of the minimum amount of free stack which each
-         task has ever had available in the sysrq-T and sysrq-P debug output.
-
-         This option will slow down process creation somewhat.
-
 config EARLY_PRINTK
        bool "Activate early kernel debugging"
        default y
index db0b6eebbfa5b55a6f7c4f55b1d489bcf158d974..a80669209155383343ba8adbb90b3e8427e2afdb 100644 (file)
@@ -177,7 +177,6 @@ config PPC
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_MMAP_RND_BITS
        select HAVE_ARCH_MMAP_RND_COMPAT_BITS   if COMPAT
-       select HAVE_ARCH_PREL32_RELOCATIONS
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_CBPF_JIT                    if !PPC64
index c229509288ea2d77c9efe72cfb1ccb0105371296..439dc7072e05bf37a722bb983b69dabed39651fa 100644 (file)
 #ifndef _ASM_RISCV_TLB_H
 #define _ASM_RISCV_TLB_H
 
+struct mmu_gather;
+
+static void tlb_flush(struct mmu_gather *tlb);
+
 #include <asm-generic/tlb.h>
 
 static inline void tlb_flush(struct mmu_gather *tlb)
index 568026ccf6e8712fa59dc3d1e216924f6d1c5c4d..fb03a4482ad60ac7ca66f86429897275020c5ffd 100644 (file)
@@ -65,24 +65,11 @@ SYSCALL_DEFINE6(mmap2, unsigned long, addr, unsigned long, len,
 SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end,
        uintptr_t, flags)
 {
-#ifdef CONFIG_SMP
-       struct mm_struct *mm = current->mm;
-       bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;
-#endif
-
        /* Check the reserved flags. */
        if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL))
                return -EINVAL;
 
-       /*
-        * Without CONFIG_SMP flush_icache_mm is a just a flush_icache_all(),
-        * which generates unused variable warnings all over this function.
-        */
-#ifdef CONFIG_SMP
-       flush_icache_mm(mm, local);
-#else
-       flush_icache_all();
-#endif
+       flush_icache_mm(current->mm, flags & SYS_RISCV_FLUSH_ICACHE_LOCAL);
 
        return 0;
 }
index c5ff296bc5d1252f6eaaf847755a3c88fed52c89..1a0be022f91d8d6d89bc154642e3bd29619e483c 100644 (file)
@@ -2843,7 +2843,7 @@ config X86_SYSFB
          This option, if enabled, marks VGA/VBE/EFI framebuffers as generic
          framebuffers so the new generic system-framebuffer drivers can be
          used on x86. If the framebuffer is not compatible with the generic
-         modes, it is adverticed as fallback platform framebuffer so legacy
+         modes, it is advertised as fallback platform framebuffer so legacy
          drivers like efifb, vesafb and uvesafb can pick it up.
          If this option is not selected, all system framebuffers are always
          marked as fallback platform framebuffers as usual.
index 94859241bc3eada03292e25362649b226511f872..8f6e7eb8ae9fc2342b79cb0fc65de922dee11f2e 100644 (file)
@@ -175,22 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
   endif
 endif
 
-ifndef CC_HAVE_ASM_GOTO
-  $(error Compiler lacks asm-goto support.)
-endif
-
-#
-# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
-# GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226).  There's no way
-# to test for this bug at compile-time because the test case needs to execute,
-# which is a no-go for cross compilers.  So check the GCC version instead.
-#
-ifdef CONFIG_JUMP_LABEL
-  ifneq ($(ACCUMULATE_OUTGOING_ARGS), 1)
-       ACCUMULATE_OUTGOING_ARGS = $(call cc-if-fullversion, -lt, 040502, 1)
-  endif
-endif
-
 ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
        # This compiler flag is not supported by Clang:
        KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -312,6 +296,13 @@ PHONY += vdso_install
 vdso_install:
        $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
 
+archprepare: checkbin
+checkbin:
+ifndef CC_HAVE_ASM_GOTO
+       @echo Compiler lacks asm-goto support.
+       @exit 1
+endif
+
 archclean:
        $(Q)rm -rf $(objtree)/arch/i386
        $(Q)rm -rf $(objtree)/arch/x86_64
index 9bd139569b410d9e41cff15fb36aeb366930be95..cb2deb61c5d96dc53aabdeb7bd880ed436f75db7 100644 (file)
@@ -223,34 +223,34 @@ ALL_F:      .octa 0xffffffffffffffffffffffffffffffff
        pcmpeqd TWOONE(%rip), \TMP2
        pand    POLY(%rip), \TMP2
        pxor    \TMP2, \TMP3
-       movdqa  \TMP3, HashKey(%arg2)
+       movdqu  \TMP3, HashKey(%arg2)
 
        movdqa     \TMP3, \TMP5
        pshufd     $78, \TMP3, \TMP1
        pxor       \TMP3, \TMP1
-       movdqa     \TMP1, HashKey_k(%arg2)
+       movdqu     \TMP1, HashKey_k(%arg2)
 
        GHASH_MUL  \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
 # TMP5 = HashKey^2<<1 (mod poly)
-       movdqa     \TMP5, HashKey_2(%arg2)
+       movdqu     \TMP5, HashKey_2(%arg2)
 # HashKey_2 = HashKey^2<<1 (mod poly)
        pshufd     $78, \TMP5, \TMP1
        pxor       \TMP5, \TMP1
-       movdqa     \TMP1, HashKey_2_k(%arg2)
+       movdqu     \TMP1, HashKey_2_k(%arg2)
 
        GHASH_MUL  \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
 # TMP5 = HashKey^3<<1 (mod poly)
-       movdqa     \TMP5, HashKey_3(%arg2)
+       movdqu     \TMP5, HashKey_3(%arg2)
        pshufd     $78, \TMP5, \TMP1
        pxor       \TMP5, \TMP1
-       movdqa     \TMP1, HashKey_3_k(%arg2)
+       movdqu     \TMP1, HashKey_3_k(%arg2)
 
        GHASH_MUL  \TMP5, \TMP3, \TMP1, \TMP2, \TMP4, \TMP6, \TMP7
 # TMP5 = HashKey^3<<1 (mod poly)
-       movdqa     \TMP5, HashKey_4(%arg2)
+       movdqu     \TMP5, HashKey_4(%arg2)
        pshufd     $78, \TMP5, \TMP1
        pxor       \TMP5, \TMP1
-       movdqa     \TMP1, HashKey_4_k(%arg2)
+       movdqu     \TMP1, HashKey_4_k(%arg2)
 .endm
 
 # GCM_INIT initializes a gcm_context struct to prepare for encoding/decoding.
@@ -271,7 +271,7 @@ ALL_F:      .octa 0xffffffffffffffffffffffffffffffff
        movdqu %xmm0, CurCount(%arg2) # ctx_data.current_counter = iv
 
        PRECOMPUTE \SUBKEY, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7,
-       movdqa HashKey(%arg2), %xmm13
+       movdqu HashKey(%arg2), %xmm13
 
        CALC_AAD_HASH %xmm13, \AAD, \AADLEN, %xmm0, %xmm1, %xmm2, %xmm3, \
        %xmm4, %xmm5, %xmm6
@@ -997,7 +997,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        pshufd    $78, \XMM5, \TMP6
        pxor      \XMM5, \TMP6
        paddd     ONE(%rip), \XMM0              # INCR CNT
-       movdqa    HashKey_4(%arg2), \TMP5
+       movdqu    HashKey_4(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP4           # TMP4 = a1*b1
        movdqa    \XMM0, \XMM1
        paddd     ONE(%rip), \XMM0              # INCR CNT
@@ -1016,7 +1016,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        pxor      (%arg1), \XMM2
        pxor      (%arg1), \XMM3
        pxor      (%arg1), \XMM4
-       movdqa    HashKey_4_k(%arg2), \TMP5
+       movdqu    HashKey_4_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP6           # TMP6 = (a1+a0)*(b1+b0)
        movaps 0x10(%arg1), \TMP1
        AESENC    \TMP1, \XMM1              # Round 1
@@ -1031,7 +1031,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM6, \TMP1
        pshufd    $78, \XMM6, \TMP2
        pxor      \XMM6, \TMP2
-       movdqa    HashKey_3(%arg2), \TMP5
+       movdqu    HashKey_3(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1           # TMP1 = a1 * b1
        movaps 0x30(%arg1), \TMP3
        AESENC    \TMP3, \XMM1              # Round 3
@@ -1044,7 +1044,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        AESENC    \TMP3, \XMM2
        AESENC    \TMP3, \XMM3
        AESENC    \TMP3, \XMM4
-       movdqa    HashKey_3_k(%arg2), \TMP5
+       movdqu    HashKey_3_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2           # TMP2 = (a1+a0)*(b1+b0)
        movaps 0x50(%arg1), \TMP3
        AESENC    \TMP3, \XMM1              # Round 5
@@ -1058,7 +1058,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM7, \TMP1
        pshufd    $78, \XMM7, \TMP2
        pxor      \XMM7, \TMP2
-       movdqa    HashKey_2(%arg2), \TMP5
+       movdqu    HashKey_2(%arg2), \TMP5
 
         # Multiply TMP5 * HashKey using karatsuba
 
@@ -1074,7 +1074,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        AESENC    \TMP3, \XMM2
        AESENC    \TMP3, \XMM3
        AESENC    \TMP3, \XMM4
-       movdqa    HashKey_2_k(%arg2), \TMP5
+       movdqu    HashKey_2_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2           # TMP2 = (a1+a0)*(b1+b0)
        movaps 0x80(%arg1), \TMP3
        AESENC    \TMP3, \XMM1             # Round 8
@@ -1092,7 +1092,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM8, \TMP1
        pshufd    $78, \XMM8, \TMP2
        pxor      \XMM8, \TMP2
-       movdqa    HashKey(%arg2), \TMP5
+       movdqu    HashKey(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1          # TMP1 = a1*b1
        movaps 0x90(%arg1), \TMP3
        AESENC    \TMP3, \XMM1            # Round 9
@@ -1121,7 +1121,7 @@ aes_loop_par_enc_done\@:
        AESENCLAST \TMP3, \XMM2
        AESENCLAST \TMP3, \XMM3
        AESENCLAST \TMP3, \XMM4
-       movdqa    HashKey_k(%arg2), \TMP5
+       movdqu    HashKey_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2          # TMP2 = (a1+a0)*(b1+b0)
        movdqu    (%arg4,%r11,1), \TMP3
        pxor      \TMP3, \XMM1                 # Ciphertext/Plaintext XOR EK
@@ -1205,7 +1205,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        pshufd    $78, \XMM5, \TMP6
        pxor      \XMM5, \TMP6
        paddd     ONE(%rip), \XMM0              # INCR CNT
-       movdqa    HashKey_4(%arg2), \TMP5
+       movdqu    HashKey_4(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP4           # TMP4 = a1*b1
        movdqa    \XMM0, \XMM1
        paddd     ONE(%rip), \XMM0              # INCR CNT
@@ -1224,7 +1224,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        pxor      (%arg1), \XMM2
        pxor      (%arg1), \XMM3
        pxor      (%arg1), \XMM4
-       movdqa    HashKey_4_k(%arg2), \TMP5
+       movdqu    HashKey_4_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP6           # TMP6 = (a1+a0)*(b1+b0)
        movaps 0x10(%arg1), \TMP1
        AESENC    \TMP1, \XMM1              # Round 1
@@ -1239,7 +1239,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM6, \TMP1
        pshufd    $78, \XMM6, \TMP2
        pxor      \XMM6, \TMP2
-       movdqa    HashKey_3(%arg2), \TMP5
+       movdqu    HashKey_3(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1           # TMP1 = a1 * b1
        movaps 0x30(%arg1), \TMP3
        AESENC    \TMP3, \XMM1              # Round 3
@@ -1252,7 +1252,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        AESENC    \TMP3, \XMM2
        AESENC    \TMP3, \XMM3
        AESENC    \TMP3, \XMM4
-       movdqa    HashKey_3_k(%arg2), \TMP5
+       movdqu    HashKey_3_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2           # TMP2 = (a1+a0)*(b1+b0)
        movaps 0x50(%arg1), \TMP3
        AESENC    \TMP3, \XMM1              # Round 5
@@ -1266,7 +1266,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM7, \TMP1
        pshufd    $78, \XMM7, \TMP2
        pxor      \XMM7, \TMP2
-       movdqa    HashKey_2(%arg2), \TMP5
+       movdqu    HashKey_2(%arg2), \TMP5
 
         # Multiply TMP5 * HashKey using karatsuba
 
@@ -1282,7 +1282,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        AESENC    \TMP3, \XMM2
        AESENC    \TMP3, \XMM3
        AESENC    \TMP3, \XMM4
-       movdqa    HashKey_2_k(%arg2), \TMP5
+       movdqu    HashKey_2_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2           # TMP2 = (a1+a0)*(b1+b0)
        movaps 0x80(%arg1), \TMP3
        AESENC    \TMP3, \XMM1             # Round 8
@@ -1300,7 +1300,7 @@ TMP6 XMM0 XMM1 XMM2 XMM3 XMM4 XMM5 XMM6 XMM7 XMM8 operation
        movdqa    \XMM8, \TMP1
        pshufd    $78, \XMM8, \TMP2
        pxor      \XMM8, \TMP2
-       movdqa    HashKey(%arg2), \TMP5
+       movdqu    HashKey(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1          # TMP1 = a1*b1
        movaps 0x90(%arg1), \TMP3
        AESENC    \TMP3, \XMM1            # Round 9
@@ -1329,7 +1329,7 @@ aes_loop_par_dec_done\@:
        AESENCLAST \TMP3, \XMM2
        AESENCLAST \TMP3, \XMM3
        AESENCLAST \TMP3, \XMM4
-       movdqa    HashKey_k(%arg2), \TMP5
+       movdqu    HashKey_k(%arg2), \TMP5
        PCLMULQDQ 0x00, \TMP5, \TMP2          # TMP2 = (a1+a0)*(b1+b0)
        movdqu    (%arg4,%r11,1), \TMP3
        pxor      \TMP3, \XMM1                 # Ciphertext/Plaintext XOR EK
@@ -1405,10 +1405,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
        movdqa    \XMM1, \TMP6
        pshufd    $78, \XMM1, \TMP2
        pxor      \XMM1, \TMP2
-       movdqa    HashKey_4(%arg2), \TMP5
+       movdqu    HashKey_4(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP6       # TMP6 = a1*b1
        PCLMULQDQ 0x00, \TMP5, \XMM1       # XMM1 = a0*b0
-       movdqa    HashKey_4_k(%arg2), \TMP4
+       movdqu    HashKey_4_k(%arg2), \TMP4
        PCLMULQDQ 0x00, \TMP4, \TMP2       # TMP2 = (a1+a0)*(b1+b0)
        movdqa    \XMM1, \XMMDst
        movdqa    \TMP2, \XMM1              # result in TMP6, XMMDst, XMM1
@@ -1418,10 +1418,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
        movdqa    \XMM2, \TMP1
        pshufd    $78, \XMM2, \TMP2
        pxor      \XMM2, \TMP2
-       movdqa    HashKey_3(%arg2), \TMP5
+       movdqu    HashKey_3(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1       # TMP1 = a1*b1
        PCLMULQDQ 0x00, \TMP5, \XMM2       # XMM2 = a0*b0
-       movdqa    HashKey_3_k(%arg2), \TMP4
+       movdqu    HashKey_3_k(%arg2), \TMP4
        PCLMULQDQ 0x00, \TMP4, \TMP2       # TMP2 = (a1+a0)*(b1+b0)
        pxor      \TMP1, \TMP6
        pxor      \XMM2, \XMMDst
@@ -1433,10 +1433,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
        movdqa    \XMM3, \TMP1
        pshufd    $78, \XMM3, \TMP2
        pxor      \XMM3, \TMP2
-       movdqa    HashKey_2(%arg2), \TMP5
+       movdqu    HashKey_2(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1       # TMP1 = a1*b1
        PCLMULQDQ 0x00, \TMP5, \XMM3       # XMM3 = a0*b0
-       movdqa    HashKey_2_k(%arg2), \TMP4
+       movdqu    HashKey_2_k(%arg2), \TMP4
        PCLMULQDQ 0x00, \TMP4, \TMP2       # TMP2 = (a1+a0)*(b1+b0)
        pxor      \TMP1, \TMP6
        pxor      \XMM3, \XMMDst
@@ -1446,10 +1446,10 @@ TMP7 XMM1 XMM2 XMM3 XMM4 XMMDst
        movdqa    \XMM4, \TMP1
        pshufd    $78, \XMM4, \TMP2
        pxor      \XMM4, \TMP2
-       movdqa    HashKey(%arg2), \TMP5
+       movdqu    HashKey(%arg2), \TMP5
        PCLMULQDQ 0x11, \TMP5, \TMP1        # TMP1 = a1*b1
        PCLMULQDQ 0x00, \TMP5, \XMM4       # XMM4 = a0*b0
-       movdqa    HashKey_k(%arg2), \TMP4
+       movdqu    HashKey_k(%arg2), \TMP4
        PCLMULQDQ 0x00, \TMP4, \TMP2       # TMP2 = (a1+a0)*(b1+b0)
        pxor      \TMP1, \TMP6
        pxor      \XMM4, \XMMDst
index 5f4829f10129c5bfd59b803d0ddd4a21be0b3107..dfb2f7c0d0192bcd16569d03badd498f355accf7 100644 (file)
@@ -2465,7 +2465,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs
 
        perf_callchain_store(entry, regs->ip);
 
-       if (!current->mm)
+       if (!nmi_uaccess_okay())
                return;
 
        if (perf_callchain_user32(regs, entry))
index c14f2a74b2be7495f1ee00c92322a58cc43d10a6..15450a675031d3562b4a9da3d3b15816c11003fb 100644 (file)
@@ -33,7 +33,8 @@ extern inline unsigned long native_save_fl(void)
        return flags;
 }
 
-static inline void native_restore_fl(unsigned long flags)
+extern inline void native_restore_fl(unsigned long flags);
+extern inline void native_restore_fl(unsigned long flags)
 {
        asm volatile("push %0 ; popf"
                     : /* no output */
index a564084c6141d42f603b257160a34685e1bffdbe..f8b1ad2c38280c823c103b5d3f6326a340c1060f 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _ASM_X86_PGTABLE_3LEVEL_H
 #define _ASM_X86_PGTABLE_3LEVEL_H
 
+#include <asm/atomic64_32.h>
+
 /*
  * Intel Physical Address Extension (PAE) Mode - three-level page
  * tables on PPro+ CPUs.
@@ -150,10 +152,7 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep)
 {
        pte_t res;
 
-       /* xchg acts as a barrier before the setting of the high bits */
-       res.pte_low = xchg(&ptep->pte_low, 0);
-       res.pte_high = ptep->pte_high;
-       ptep->pte_high = 0;
+       res.pte = (pteval_t)arch_atomic64_xchg((atomic64_t *)ptep, 0);
 
        return res;
 }
index c24297268ebc2acffdc949eae8c7985b206b0ded..d53c54b842daca1c847d8076aadd89564b23cf00 100644 (file)
@@ -132,6 +132,8 @@ struct cpuinfo_x86 {
        /* Index into per_cpu list: */
        u16                     cpu_index;
        u32                     microcode;
+       /* Address space bits used by the cache internally */
+       u8                      x86_cache_bits;
        unsigned                initialized : 1;
 } __randomize_layout;
 
@@ -183,7 +185,7 @@ extern void cpu_detect(struct cpuinfo_x86 *c);
 
 static inline unsigned long long l1tf_pfn_limit(void)
 {
-       return BIT_ULL(boot_cpu_data.x86_phys_bits - 1 - PAGE_SHIFT);
+       return BIT_ULL(boot_cpu_data.x86_cache_bits - 1 - PAGE_SHIFT);
 }
 
 extern void early_cpu_init(void);
index 5f9012ff52ed3c879887df556613979fb0e7d184..33d3c88a7225ff938d81c8912d5ec05457b07e60 100644 (file)
@@ -39,6 +39,7 @@ extern void do_signal(struct pt_regs *regs);
 
 #define __ARCH_HAS_SA_RESTORER
 
+#include <asm/asm.h>
 #include <uapi/asm/sigcontext.h>
 
 #ifdef __i386__
@@ -86,9 +87,9 @@ static inline int __const_sigismember(sigset_t *set, int _sig)
 
 static inline int __gen_sigismember(sigset_t *set, int _sig)
 {
-       unsigned char ret;
-       asm("btl %2,%1\n\tsetc %0"
-           : "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
+       bool ret;
+       asm("btl %2,%1" CC_SET(c)
+           : CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
        return ret;
 }
 
index b6dc698f992a54646266ba7a4dc2901e7bdfa109..f335aad404a479e98e4a5d38dc41ee5e5aa419ec 100644 (file)
@@ -111,6 +111,6 @@ static inline unsigned long caller_frame_pointer(void)
        return (unsigned long)frame;
 }
 
-void show_opcodes(u8 *rip, const char *loglvl);
+void show_opcodes(struct pt_regs *regs, const char *loglvl);
 void show_ip(struct pt_regs *regs, const char *loglvl);
 #endif /* _ASM_X86_STACKTRACE_H */
index 29c9da6c62fc16b8b28bec203eb8982b2f570db5..58ce5288878e85db5c475d8891c0fff2817a20e4 100644 (file)
@@ -175,8 +175,16 @@ struct tlb_state {
         * are on.  This means that it may not match current->active_mm,
         * which will contain the previous user mm when we're in lazy TLB
         * mode even if we've already switched back to swapper_pg_dir.
+        *
+        * During switch_mm_irqs_off(), loaded_mm will be set to
+        * LOADED_MM_SWITCHING during the brief interrupts-off window
+        * when CR3 and loaded_mm would otherwise be inconsistent.  This
+        * is for nmi_uaccess_okay()'s benefit.
         */
        struct mm_struct *loaded_mm;
+
+#define LOADED_MM_SWITCHING ((struct mm_struct *)1)
+
        u16 loaded_mm_asid;
        u16 next_asid;
        /* last user mm's ctx id */
@@ -246,6 +254,38 @@ struct tlb_state {
 };
 DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate);
 
+/*
+ * Blindly accessing user memory from NMI context can be dangerous
+ * if we're in the middle of switching the current user task or
+ * switching the loaded mm.  It can also be dangerous if we
+ * interrupted some kernel code that was temporarily using a
+ * different mm.
+ */
+static inline bool nmi_uaccess_okay(void)
+{
+       struct mm_struct *loaded_mm = this_cpu_read(cpu_tlbstate.loaded_mm);
+       struct mm_struct *current_mm = current->mm;
+
+       VM_WARN_ON_ONCE(!loaded_mm);
+
+       /*
+        * The condition we want to check is
+        * current_mm->pgd == __va(read_cr3_pa()).  This may be slow, though,
+        * if we're running in a VM with shadow paging, and nmi_uaccess_okay()
+        * is supposed to be reasonably fast.
+        *
+        * Instead, we check the almost equivalent but somewhat conservative
+        * condition below, and we rely on the fact that switch_mm_irqs_off()
+        * sets loaded_mm to LOADED_MM_SWITCHING before writing to CR3.
+        */
+       if (loaded_mm != current_mm)
+               return false;
+
+       VM_WARN_ON_ONCE(current_mm->pgd != __va(read_cr3_pa()));
+
+       return true;
+}
+
 /* Initialize cr4 shadow for this CPU. */
 static inline void cr4_init_shadow(void)
 {
index fb856c9f04494b6633d9ea8fd3ebb9204cc2c620..53748541c487ab00d8bd1ee9b4d05305aa33171d 100644 (file)
@@ -93,7 +93,7 @@ static inline unsigned int __getcpu(void)
         *
         * If RDPID is available, use it.
         */
-       alternative_io ("lsl %[p],%[seg]",
+       alternative_io ("lsl %[seg],%[p]",
                        ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */
                        X86_FEATURE_RDPID,
                        [p] "=a" (p), [seg] "r" (__PER_CPU_SEG));
index 014f214da5815d62f8f094f5e69f670c440ef69b..b9d5e7c9ef43e66c0b8d19fc0346be1779fa78d4 100644 (file)
@@ -684,8 +684,6 @@ void *__init_or_module text_poke_early(void *addr, const void *opcode,
  * It means the size must be writable atomically and the address must be aligned
  * in a way that permits an atomic write. It also makes sure we fit on a single
  * page.
- *
- * Note: Must be called under text_mutex.
  */
 void *text_poke(void *addr, const void *opcode, size_t len)
 {
@@ -700,6 +698,8 @@ void *text_poke(void *addr, const void *opcode, size_t len)
         */
        BUG_ON(!after_bootmem);
 
+       lockdep_assert_held(&text_mutex);
+
        if (!core_kernel_text((unsigned long)addr)) {
                pages[0] = vmalloc_to_page(addr);
                pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
@@ -782,8 +782,6 @@ int poke_int3_handler(struct pt_regs *regs)
  *     - replace the first byte (int3) by the first byte of
  *       replacing opcode
  *     - sync cores
- *
- * Note: must be called under text_mutex.
  */
 void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler)
 {
@@ -792,6 +790,9 @@ void *text_poke_bp(void *addr, const void *opcode, size_t len, void *handler)
        bp_int3_handler = handler;
        bp_int3_addr = (u8 *)addr + sizeof(int3);
        bp_patching_in_progress = true;
+
+       lockdep_assert_held(&text_mutex);
+
        /*
         * Corresponding read barrier in int3 notifier for making sure the
         * in_progress and handler are correctly ordered wrt. patching.
index 4c2313d0b9caadb71cd995ef584740b3113af0c1..40bdaea97fe7cac25f2b04bc239fdc520d68f09e 100644 (file)
@@ -668,6 +668,45 @@ EXPORT_SYMBOL_GPL(l1tf_mitigation);
 enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO;
 EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation);
 
+/*
+ * These CPUs all support 44bits physical address space internally in the
+ * cache but CPUID can report a smaller number of physical address bits.
+ *
+ * The L1TF mitigation uses the top most address bit for the inversion of
+ * non present PTEs. When the installed memory reaches into the top most
+ * address bit due to memory holes, which has been observed on machines
+ * which report 36bits physical address bits and have 32G RAM installed,
+ * then the mitigation range check in l1tf_select_mitigation() triggers.
+ * This is a false positive because the mitigation is still possible due to
+ * the fact that the cache uses 44bit internally. Use the cache bits
+ * instead of the reported physical bits and adjust them on the affected
+ * machines to 44bit if the reported bits are less than 44.
+ */
+static void override_cache_bits(struct cpuinfo_x86 *c)
+{
+       if (c->x86 != 6)
+               return;
+
+       switch (c->x86_model) {
+       case INTEL_FAM6_NEHALEM:
+       case INTEL_FAM6_WESTMERE:
+       case INTEL_FAM6_SANDYBRIDGE:
+       case INTEL_FAM6_IVYBRIDGE:
+       case INTEL_FAM6_HASWELL_CORE:
+       case INTEL_FAM6_HASWELL_ULT:
+       case INTEL_FAM6_HASWELL_GT3E:
+       case INTEL_FAM6_BROADWELL_CORE:
+       case INTEL_FAM6_BROADWELL_GT3E:
+       case INTEL_FAM6_SKYLAKE_MOBILE:
+       case INTEL_FAM6_SKYLAKE_DESKTOP:
+       case INTEL_FAM6_KABYLAKE_MOBILE:
+       case INTEL_FAM6_KABYLAKE_DESKTOP:
+               if (c->x86_cache_bits < 44)
+                       c->x86_cache_bits = 44;
+               break;
+       }
+}
+
 static void __init l1tf_select_mitigation(void)
 {
        u64 half_pa;
@@ -675,6 +714,8 @@ static void __init l1tf_select_mitigation(void)
        if (!boot_cpu_has_bug(X86_BUG_L1TF))
                return;
 
+       override_cache_bits(&boot_cpu_data);
+
        switch (l1tf_mitigation) {
        case L1TF_MITIGATION_OFF:
        case L1TF_MITIGATION_FLUSH_NOWARN:
@@ -694,11 +735,6 @@ static void __init l1tf_select_mitigation(void)
        return;
 #endif
 
-       /*
-        * This is extremely unlikely to happen because almost all
-        * systems have far more MAX_PA/2 than RAM can be fit into
-        * DIMM slots.
-        */
        half_pa = (u64)l1tf_pfn_limit() << PAGE_SHIFT;
        if (e820__mapped_any(half_pa, ULLONG_MAX - half_pa, E820_TYPE_RAM)) {
                pr_warn("System has more than MAX_PA/2 memory. L1TF mitigation not effective.\n");
index 84dee5ab745a2657499334c831ea2467408e81d4..44c4ef3d989b59b7bd98ebf617f8e5ee1d2a9548 100644 (file)
@@ -919,6 +919,7 @@ void get_cpu_address_sizes(struct cpuinfo_x86 *c)
        else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36))
                c->x86_phys_bits = 36;
 #endif
+       c->x86_cache_bits = c->x86_phys_bits;
 }
 
 static void identify_cpu_without_cpuid(struct cpuinfo_x86 *c)
index 401e8c1331089ebcd6b752fddc71d3214f6d331a..fc3c07fe7df58a22c01c8c1180d0b394bde8b59a 100644 (file)
@@ -150,6 +150,9 @@ static bool bad_spectre_microcode(struct cpuinfo_x86 *c)
        if (cpu_has(c, X86_FEATURE_HYPERVISOR))
                return false;
 
+       if (c->x86 != 6)
+               return false;
+
        for (i = 0; i < ARRAY_SIZE(spectre_bad_microcodes); i++) {
                if (c->x86_model == spectre_bad_microcodes[i].model &&
                    c->x86_stepping == spectre_bad_microcodes[i].stepping)
index 9c8652974f8ed1f6a8ed20f97ac843ec332706f2..f56895106ccf61d51b2c712f8194e85fcfdc8e6c 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/bug.h>
 #include <linux/nmi.h>
 #include <linux/sysfs.h>
+#include <linux/kasan.h>
 
 #include <asm/cpu_entry_area.h>
 #include <asm/stacktrace.h>
@@ -89,14 +90,24 @@ static void printk_stack_address(unsigned long address, int reliable,
  * Thus, the 2/3rds prologue and 64 byte OPCODE_BUFSIZE is just a random
  * guesstimate in attempt to achieve all of the above.
  */
-void show_opcodes(u8 *rip, const char *loglvl)
+void show_opcodes(struct pt_regs *regs, const char *loglvl)
 {
 #define PROLOGUE_SIZE 42
 #define EPILOGUE_SIZE 21
 #define OPCODE_BUFSIZE (PROLOGUE_SIZE + 1 + EPILOGUE_SIZE)
        u8 opcodes[OPCODE_BUFSIZE];
+       unsigned long prologue = regs->ip - PROLOGUE_SIZE;
+       bool bad_ip;
 
-       if (probe_kernel_read(opcodes, rip - PROLOGUE_SIZE, OPCODE_BUFSIZE)) {
+       /*
+        * Make sure userspace isn't trying to trick us into dumping kernel
+        * memory by pointing the userspace instruction pointer at it.
+        */
+       bad_ip = user_mode(regs) &&
+               __chk_range_not_ok(prologue, OPCODE_BUFSIZE, TASK_SIZE_MAX);
+
+       if (bad_ip || probe_kernel_read(opcodes, (u8 *)prologue,
+                                       OPCODE_BUFSIZE)) {
                printk("%sCode: Bad RIP value.\n", loglvl);
        } else {
                printk("%sCode: %" __stringify(PROLOGUE_SIZE) "ph <%02x> %"
@@ -112,7 +123,7 @@ void show_ip(struct pt_regs *regs, const char *loglvl)
 #else
        printk("%sRIP: %04x:%pS\n", loglvl, (int)regs->cs, (void *)regs->ip);
 #endif
-       show_opcodes((u8 *)regs->ip, loglvl);
+       show_opcodes(regs, loglvl);
 }
 
 void show_iret_regs(struct pt_regs *regs)
@@ -346,7 +357,10 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr)
         * We're not going to return, but we might be on an IST stack or
         * have very little stack space left.  Rewind the stack and kill
         * the task.
+        * Before we rewind the stack, we have to tell KASAN that we're going to
+        * reuse the task stack and that existing poisons are invalid.
         */
+       kasan_unpoison_task_stack(current);
        rewind_stack_do_exit(signr);
 }
 NOKPROBE_SYMBOL(oops_end);
index c8c6ad0d58b89c3621d0fcf11f45e00442ebf2a2..3f435d7fca5e62bc999e48c6a4f3e1c0fc86def9 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/uaccess.h>
 #include <linux/export.h>
 
+#include <asm/tlbflush.h>
+
 /*
  * We rely on the nested NMI work to allow atomic faults from the NMI path; the
  * 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)
        if (__range_not_ok(from, n, TASK_SIZE))
                return n;
 
+       if (!nmi_uaccess_okay())
+               return n;
+
        /*
         * Even though this function is typically called from NMI/IRQ context
         * disable pagefaults so that its behaviour is consistent even when
index b9123c497e0a7b20e25aa6608622118e6a00e3ea..47bebfe6efa70a316424934683f4302de33876a2 100644 (file)
@@ -837,7 +837,7 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code,
 
        printk(KERN_CONT "\n");
 
-       show_opcodes((u8 *)regs->ip, loglvl);
+       show_opcodes(regs, loglvl);
 }
 
 static void
index 8d6c34fe49be9567157b65fa69d8d1059f7779ee..51a5a69ecac9f24ab794ea6e86ea6d7fb39367a8 100644 (file)
@@ -1420,6 +1420,29 @@ static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias)
        return 0;
 }
 
+/*
+ * Machine check recovery code needs to change cache mode of poisoned
+ * pages to UC to avoid speculative access logging another error. But
+ * passing the address of the 1:1 mapping to set_memory_uc() is a fine
+ * way to encourage a speculative access. So we cheat and flip the top
+ * bit of the address. This works fine for the code that updates the
+ * page tables. But at the end of the process we need to flush the cache
+ * and the non-canonical address causes a #GP fault when used by the
+ * CLFLUSH instruction.
+ *
+ * But in the common case we already have a canonical address. This code
+ * will fix the top bit if needed and is a no-op otherwise.
+ */
+static inline unsigned long make_addr_canonical_again(unsigned long addr)
+{
+#ifdef CONFIG_X86_64
+       return (long)(addr << 1) >> 1;
+#else
+       return addr;
+#endif
+}
+
+
 static int change_page_attr_set_clr(unsigned long *addr, int numpages,
                                    pgprot_t mask_set, pgprot_t mask_clr,
                                    int force_split, int in_flag,
@@ -1465,7 +1488,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
                 * Save address for cache flush. *addr is modified in the call
                 * to __change_page_attr_set_clr() below.
                 */
-               baddr = *addr;
+               baddr = make_addr_canonical_again(*addr);
        }
 
        /* Must avoid aliasing mappings in the highmem code */
index 31341ae7309f6b957e8fa8e7207bcd2c8433e6bb..c1fc1ae6b42947a9f6dece93efce6e4f843b7def 100644 (file)
@@ -248,7 +248,7 @@ static pmd_t *pti_user_pagetable_walk_pmd(unsigned long address)
  *
  * Returns a pointer to a PTE on success, or NULL on failure.
  */
-static __init pte_t *pti_user_pagetable_walk_pte(unsigned long address)
+static pte_t *pti_user_pagetable_walk_pte(unsigned long address)
 {
        gfp_t gfp = (GFP_KERNEL | __GFP_NOTRACK | __GFP_ZERO);
        pmd_t *pmd;
index 9517d1b2a2810817907640c6c2dde698c62b3e79..e96b99eb800ccd5f170f7539efaaf99720d192b4 100644 (file)
@@ -305,6 +305,10 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct mm_struct *next,
 
                choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush);
 
+               /* Let nmi_uaccess_okay() know that we're changing CR3. */
+               this_cpu_write(cpu_tlbstate.loaded_mm, LOADED_MM_SWITCHING);
+               barrier();
+
                if (need_flush) {
                        this_cpu_write(cpu_tlbstate.ctxs[new_asid].ctx_id, next->context.ctx_id);
                        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,
                if (next != &init_mm)
                        this_cpu_write(cpu_tlbstate.last_ctx_id, next->context.ctx_id);
 
+               /* Make sure we write CR3 before loaded_mm. */
+               barrier();
+
                this_cpu_write(cpu_tlbstate.loaded_mm, next);
                this_cpu_write(cpu_tlbstate.loaded_mm_asid, new_asid);
        }
index 324b93328b3746f4bb8010780ee85915707b8095..05ca1422246336c6d3c923c22f06ad87113ac1d3 100644 (file)
@@ -85,14 +85,10 @@ pgd_t * __init efi_call_phys_prolog(void)
 
 void __init efi_call_phys_epilog(pgd_t *save_pgd)
 {
-       struct desc_ptr gdt_descr;
-
-       gdt_descr.address = (unsigned long)get_cpu_gdt_rw(0);
-       gdt_descr.size = GDT_SIZE - 1;
-       load_gdt(&gdt_descr);
-
        load_cr3(save_pgd);
        __flush_tlb_all();
+
+       load_fixmap_gdt(0);
 }
 
 void __init efi_runtime_update_mappings(void)
index 45b700ac5fe7e0685578597ee4189b8124b403c1..2fe5c9b1816bbd5e6f0adcc9385bcdf09b173154 100644 (file)
@@ -435,14 +435,13 @@ static void xen_set_pud(pud_t *ptr, pud_t val)
 static void xen_set_pte_atomic(pte_t *ptep, pte_t pte)
 {
        trace_xen_mmu_set_pte_atomic(ptep, pte);
-       set_64bit((u64 *)ptep, native_pte_val(pte));
+       __xen_set_pte(ptep, pte);
 }
 
 static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
 {
        trace_xen_mmu_pte_clear(mm, addr, ptep);
-       if (!xen_batched_set_pte(ptep, native_make_pte(0)))
-               native_pte_clear(mm, addr, ptep);
+       __xen_set_pte(ptep, native_make_pte(0));
 }
 
 static void xen_pmd_clear(pmd_t *pmdp)
@@ -1570,7 +1569,7 @@ static void __init xen_set_pte_init(pte_t *ptep, pte_t pte)
                pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
                               pte_val_ma(pte));
 #endif
-       native_set_pte(ptep, pte);
+       __xen_set_pte(ptep, pte);
 }
 
 /* Early in boot, while setting up the initial pagetable, assume
@@ -2061,7 +2060,6 @@ void __init xen_relocate_p2m(void)
        pud_t *pud;
        pgd_t *pgd;
        unsigned long *new_p2m;
-       int save_pud;
 
        size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long));
        n_pte = roundup(size, PAGE_SIZE) >> PAGE_SHIFT;
@@ -2091,7 +2089,6 @@ void __init xen_relocate_p2m(void)
 
        pgd = __va(read_cr3_pa());
        new_p2m = (unsigned long *)(2 * PGDIR_SIZE);
-       save_pud = n_pud;
        for (idx_pud = 0; idx_pud < n_pud; idx_pud++) {
                pud = early_memremap(pud_phys, PAGE_SIZE);
                clear_page(pud);
index 84507d3e9a981d5e4888c9b3783f0155f992adba..8e20a0677dcf69b6e523b571099fede8c9904d78 100644 (file)
@@ -123,16 +123,11 @@ static void rwb_wake_all(struct rq_wb *rwb)
        }
 }
 
-static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct)
+static void wbt_rqw_done(struct rq_wb *rwb, struct rq_wait *rqw,
+                        enum wbt_flags wb_acct)
 {
-       struct rq_wb *rwb = RQWB(rqos);
-       struct rq_wait *rqw;
        int inflight, limit;
 
-       if (!(wb_acct & WBT_TRACKED))
-               return;
-
-       rqw = get_rq_wait(rwb, wb_acct);
        inflight = atomic_dec_return(&rqw->inflight);
 
        /*
@@ -166,10 +161,22 @@ static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct)
                int diff = limit - inflight;
 
                if (!inflight || diff >= rwb->wb_background / 2)
-                       wake_up(&rqw->wait);
+                       wake_up_all(&rqw->wait);
        }
 }
 
+static void __wbt_done(struct rq_qos *rqos, enum wbt_flags wb_acct)
+{
+       struct rq_wb *rwb = RQWB(rqos);
+       struct rq_wait *rqw;
+
+       if (!(wb_acct & WBT_TRACKED))
+               return;
+
+       rqw = get_rq_wait(rwb, wb_acct);
+       wbt_rqw_done(rwb, rqw, wb_acct);
+}
+
 /*
  * Called on completion of a request. Note that it's also called when
  * 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)
        return limit;
 }
 
+struct wbt_wait_data {
+       struct wait_queue_entry wq;
+       struct task_struct *task;
+       struct rq_wb *rwb;
+       struct rq_wait *rqw;
+       unsigned long rw;
+       bool got_token;
+};
+
+static int wbt_wake_function(struct wait_queue_entry *curr, unsigned int mode,
+                            int wake_flags, void *key)
+{
+       struct wbt_wait_data *data = container_of(curr, struct wbt_wait_data,
+                                                       wq);
+
+       /*
+        * If we fail to get a budget, return -1 to interrupt the wake up
+        * loop in __wake_up_common.
+        */
+       if (!rq_wait_inc_below(data->rqw, get_limit(data->rwb, data->rw)))
+               return -1;
+
+       data->got_token = true;
+       list_del_init(&curr->entry);
+       wake_up_process(data->task);
+       return 1;
+}
+
 /*
  * Block if we will exceed our limit, or if we are currently waiting for
  * the timer to kick off queuing again.
@@ -491,19 +526,40 @@ static void __wbt_wait(struct rq_wb *rwb, enum wbt_flags wb_acct,
        __acquires(lock)
 {
        struct rq_wait *rqw = get_rq_wait(rwb, wb_acct);
-       DECLARE_WAITQUEUE(wait, current);
+       struct wbt_wait_data data = {
+               .wq = {
+                       .func   = wbt_wake_function,
+                       .entry  = LIST_HEAD_INIT(data.wq.entry),
+               },
+               .task = current,
+               .rwb = rwb,
+               .rqw = rqw,
+               .rw = rw,
+       };
        bool has_sleeper;
 
        has_sleeper = wq_has_sleeper(&rqw->wait);
        if (!has_sleeper && rq_wait_inc_below(rqw, get_limit(rwb, rw)))
                return;
 
-       add_wait_queue_exclusive(&rqw->wait, &wait);
+       prepare_to_wait_exclusive(&rqw->wait, &data.wq, TASK_UNINTERRUPTIBLE);
        do {
-               set_current_state(TASK_UNINTERRUPTIBLE);
+               if (data.got_token)
+                       break;
 
-               if (!has_sleeper && rq_wait_inc_below(rqw, get_limit(rwb, rw)))
+               if (!has_sleeper &&
+                   rq_wait_inc_below(rqw, get_limit(rwb, rw))) {
+                       finish_wait(&rqw->wait, &data.wq);
+
+                       /*
+                        * We raced with wbt_wake_function() getting a token,
+                        * which means we now have two. Put our local token
+                        * and wake anyone else potentially waiting for one.
+                        */
+                       if (data.got_token)
+                               wbt_rqw_done(rwb, rqw, wb_acct);
                        break;
+               }
 
                if (lock) {
                        spin_unlock_irq(lock);
@@ -511,11 +567,11 @@ static void __wbt_wait(struct rq_wb *rwb, enum wbt_flags wb_acct,
                        spin_lock_irq(lock);
                } else
                        io_schedule();
+
                has_sleeper = false;
        } while (1);
 
-       __set_current_state(TASK_RUNNING);
-       remove_wait_queue(&rqw->wait, &wait);
+       finish_wait(&rqw->wait, &data.wq);
 }
 
 static 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)
                return;
        }
 
-       if (current_is_kswapd())
-               flags |= WBT_KSWAPD;
-       if (bio_op(bio) == REQ_OP_DISCARD)
-               flags |= WBT_DISCARD;
-
        __wbt_wait(rwb, flags, bio->bi_opf, lock);
 
        if (!blk_stat_is_active(rwb->cb))
index db588add6ba6622b1495446b05f19ce0e5720bf8..9a442c23a715e2f8b53b8bb4209af912a3f45af3 100644 (file)
@@ -37,7 +37,7 @@ struct bsg_device {
        struct request_queue *queue;
        spinlock_t lock;
        struct hlist_node dev_list;
-       atomic_t ref_count;
+       refcount_t ref_count;
        char name[20];
        int max_queue;
 };
@@ -252,7 +252,7 @@ static int bsg_put_device(struct bsg_device *bd)
 
        mutex_lock(&bsg_mutex);
 
-       if (!atomic_dec_and_test(&bd->ref_count)) {
+       if (!refcount_dec_and_test(&bd->ref_count)) {
                mutex_unlock(&bsg_mutex);
                return 0;
        }
@@ -290,7 +290,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
 
        bd->queue = rq;
 
-       atomic_set(&bd->ref_count, 1);
+       refcount_set(&bd->ref_count, 1);
        hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));
 
        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)
 
        hlist_for_each_entry(bd, bsg_dev_idx_hash(minor), dev_list) {
                if (bd->queue == q) {
-                       atomic_inc(&bd->ref_count);
+                       refcount_inc(&bd->ref_count);
                        goto found;
                }
        }
index 5ea6e7d600e46edcd1eec808324640ab8b7099ed..6a06b5d040e5dd8ffab230a3f3ae74bfa6935233 100644 (file)
@@ -895,8 +895,7 @@ int elv_register(struct elevator_type *e)
        spin_lock(&elv_list_lock);
        if (elevator_find(e->elevator_name, e->uses_mq)) {
                spin_unlock(&elv_list_lock);
-               if (e->icq_cache)
-                       kmem_cache_destroy(e->icq_cache);
+               kmem_cache_destroy(e->icq_cache);
                return -EBUSY;
        }
        list_add_tail(&e->list, &elv_list);
index 5d4b72e21161a888c44997b448f602cef99a6709..569a4a662dcd4deb9d9edb0dbca4001f798bcab5 100644 (file)
@@ -256,14 +256,12 @@ static struct ata_port_operations pata_ftide010_port_ops = {
        .qc_issue       = ftide010_qc_issue,
 };
 
-static struct ata_port_info ftide010_port_info[] = {
-       {
-               .flags          = ATA_FLAG_SLAVE_POSS,
-               .mwdma_mask     = ATA_MWDMA2,
-               .udma_mask      = ATA_UDMA6,
-               .pio_mask       = ATA_PIO4,
-               .port_ops       = &pata_ftide010_port_ops,
-       },
+static struct ata_port_info ftide010_port_info = {
+       .flags          = ATA_FLAG_SLAVE_POSS,
+       .mwdma_mask     = ATA_MWDMA2,
+       .udma_mask      = ATA_UDMA6,
+       .pio_mask       = ATA_PIO4,
+       .port_ops       = &pata_ftide010_port_ops,
 };
 
 #if IS_ENABLED(CONFIG_SATA_GEMINI)
@@ -349,6 +347,7 @@ static int pata_ftide010_gemini_cable_detect(struct ata_port *ap)
 }
 
 static int pata_ftide010_gemini_init(struct ftide010 *ftide,
+                                    struct ata_port_info *pi,
                                     bool is_ata1)
 {
        struct device *dev = ftide->dev;
@@ -373,7 +372,13 @@ static int pata_ftide010_gemini_init(struct ftide010 *ftide,
 
        /* Flag port as SATA-capable */
        if (gemini_sata_bridge_enabled(sg, is_ata1))
-               ftide010_port_info[0].flags |= ATA_FLAG_SATA;
+               pi->flags |= ATA_FLAG_SATA;
+
+       /* This device has broken DMA, only PIO works */
+       if (of_machine_is_compatible("itian,sq201")) {
+               pi->mwdma_mask = 0;
+               pi->udma_mask = 0;
+       }
 
        /*
         * 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,
 }
 #else
 static int pata_ftide010_gemini_init(struct ftide010 *ftide,
+                                    struct ata_port_info *pi,
                                     bool is_ata1)
 {
        return -ENOTSUPP;
@@ -446,7 +452,7 @@ static int pata_ftide010_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
        struct device_node *np = dev->of_node;
-       const struct ata_port_info pi = ftide010_port_info[0];
+       struct ata_port_info pi = ftide010_port_info;
        const struct ata_port_info *ppi[] = { &pi, NULL };
        struct ftide010 *ftide;
        struct resource *res;
@@ -490,6 +496,7 @@ static int pata_ftide010_probe(struct platform_device *pdev)
                 * are ATA0. This will also set up the cable types.
                 */
                ret = pata_ftide010_gemini_init(ftide,
+                               &pi,
                                (res->start == 0x63400000));
                if (ret)
                        goto err_dis_clk;
index 8e2e4757adcb02c9cd07a0b868a45e0bb3baa3eb..5a42ae4078c27febf8194901d8fa0e30b43bd1aa 100644 (file)
@@ -185,7 +185,7 @@ EXPORT_SYMBOL_GPL(of_pm_clk_add_clk);
 int of_pm_clk_add_clks(struct device *dev)
 {
        struct clk **clks;
-       unsigned int i, count;
+       int i, count;
        int ret;
 
        if (!dev || !dev->of_node)
index b55b245e805205a07266c9d745b96e4716ed3009..fd1e19f1a49f5803ca6dd5d939ec41ec592af077 100644 (file)
@@ -83,6 +83,18 @@ module_param_named(max_persistent_grants, xen_blkif_max_pgrants, int, 0644);
 MODULE_PARM_DESC(max_persistent_grants,
                  "Maximum number of grants to map persistently");
 
+/*
+ * How long a persistent grant is allowed to remain allocated without being in
+ * use. The time is in seconds, 0 means indefinitely long.
+ */
+
+static unsigned int xen_blkif_pgrant_timeout = 60;
+module_param_named(persistent_grant_unused_seconds, xen_blkif_pgrant_timeout,
+                  uint, 0644);
+MODULE_PARM_DESC(persistent_grant_unused_seconds,
+                "Time in seconds an unused persistent grant is allowed to "
+                "remain allocated. Default is 60, 0 means unlimited.");
+
 /*
  * Maximum number of rings/queues blkback supports, allow as many queues as there
  * are CPUs if user has not specified a value.
@@ -123,6 +135,13 @@ module_param(log_stats, int, 0644);
 /* Number of free pages to remove on each call to gnttab_free_pages */
 #define NUM_BATCH_FREE_PAGES 10
 
+static inline bool persistent_gnt_timeout(struct persistent_gnt *persistent_gnt)
+{
+       return xen_blkif_pgrant_timeout &&
+              (jiffies - persistent_gnt->last_used >=
+               HZ * xen_blkif_pgrant_timeout);
+}
+
 static inline int get_free_page(struct xen_blkif_ring *ring, struct page **page)
 {
        unsigned long flags;
@@ -236,8 +255,7 @@ static int add_persistent_gnt(struct xen_blkif_ring *ring,
                }
        }
 
-       bitmap_zero(persistent_gnt->flags, PERSISTENT_GNT_FLAGS_SIZE);
-       set_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags);
+       persistent_gnt->active = true;
        /* Add new node and rebalance tree. */
        rb_link_node(&(persistent_gnt->node), parent, new);
        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,
                else if (gref > data->gnt)
                        node = node->rb_right;
                else {
-                       if(test_bit(PERSISTENT_GNT_ACTIVE, data->flags)) {
+                       if (data->active) {
                                pr_alert_ratelimited("requesting a grant already in use\n");
                                return NULL;
                        }
-                       set_bit(PERSISTENT_GNT_ACTIVE, data->flags);
+                       data->active = true;
                        atomic_inc(&ring->persistent_gnt_in_use);
                        return data;
                }
@@ -276,10 +294,10 @@ static struct persistent_gnt *get_persistent_gnt(struct xen_blkif_ring *ring,
 static void put_persistent_gnt(struct xen_blkif_ring *ring,
                                struct persistent_gnt *persistent_gnt)
 {
-       if(!test_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags))
+       if (!persistent_gnt->active)
                pr_alert_ratelimited("freeing a grant already unused\n");
-       set_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags);
-       clear_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags);
+       persistent_gnt->last_used = jiffies;
+       persistent_gnt->active = false;
        atomic_dec(&ring->persistent_gnt_in_use);
 }
 
@@ -371,26 +389,26 @@ static void purge_persistent_gnt(struct xen_blkif_ring *ring)
        struct persistent_gnt *persistent_gnt;
        struct rb_node *n;
        unsigned int num_clean, total;
-       bool scan_used = false, clean_used = false;
+       bool scan_used = false;
        struct rb_root *root;
 
-       if (ring->persistent_gnt_c < xen_blkif_max_pgrants ||
-           (ring->persistent_gnt_c == xen_blkif_max_pgrants &&
-           !ring->blkif->vbd.overflow_max_grants)) {
-               goto out;
-       }
-
        if (work_busy(&ring->persistent_purge_work)) {
                pr_alert_ratelimited("Scheduled work from previous purge is still busy, cannot purge list\n");
                goto out;
        }
 
-       num_clean = (xen_blkif_max_pgrants / 100) * LRU_PERCENT_CLEAN;
-       num_clean = ring->persistent_gnt_c - xen_blkif_max_pgrants + num_clean;
-       num_clean = min(ring->persistent_gnt_c, num_clean);
-       if ((num_clean == 0) ||
-           (num_clean > (ring->persistent_gnt_c - atomic_read(&ring->persistent_gnt_in_use))))
-               goto out;
+       if (ring->persistent_gnt_c < xen_blkif_max_pgrants ||
+           (ring->persistent_gnt_c == xen_blkif_max_pgrants &&
+           !ring->blkif->vbd.overflow_max_grants)) {
+               num_clean = 0;
+       } else {
+               num_clean = (xen_blkif_max_pgrants / 100) * LRU_PERCENT_CLEAN;
+               num_clean = ring->persistent_gnt_c - xen_blkif_max_pgrants +
+                           num_clean;
+               num_clean = min(ring->persistent_gnt_c, num_clean);
+               pr_debug("Going to purge at least %u persistent grants\n",
+                        num_clean);
+       }
 
        /*
         * 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)
          * number of grants.
         */
 
-       total = num_clean;
-
-       pr_debug("Going to purge %u persistent grants\n", num_clean);
+       total = 0;
 
        BUG_ON(!list_empty(&ring->persistent_purge_list));
        root = &ring->persistent_gnts;
@@ -412,46 +428,37 @@ static void purge_persistent_gnt(struct xen_blkif_ring *ring)
                BUG_ON(persistent_gnt->handle ==
                        BLKBACK_INVALID_HANDLE);
 
-               if (clean_used) {
-                       clear_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags);
+               if (persistent_gnt->active)
                        continue;
-               }
-
-               if (test_bit(PERSISTENT_GNT_ACTIVE, persistent_gnt->flags))
+               if (!scan_used && !persistent_gnt_timeout(persistent_gnt))
                        continue;
-               if (!scan_used &&
-                   (test_bit(PERSISTENT_GNT_WAS_ACTIVE, persistent_gnt->flags)))
+               if (scan_used && total >= num_clean)
                        continue;
 
                rb_erase(&persistent_gnt->node, root);
                list_add(&persistent_gnt->remove_node,
                         &ring->persistent_purge_list);
-               if (--num_clean == 0)
-                       goto finished;
+               total++;
        }
        /*
-        * If we get here it means we also need to start cleaning
+        * Check whether we also need to start cleaning
         * grants that were used since last purge in order to cope
         * with the requested num
         */
-       if (!scan_used && !clean_used) {
-               pr_debug("Still missing %u purged frames\n", num_clean);
+       if (!scan_used && total < num_clean) {
+               pr_debug("Still missing %u purged frames\n", num_clean - total);
                scan_used = true;
                goto purge_list;
        }
-finished:
-       if (!clean_used) {
-               pr_debug("Finished scanning for grants to clean, removing used flag\n");
-               clean_used = true;
-               goto purge_list;
-       }
 
-       ring->persistent_gnt_c -= (total - num_clean);
-       ring->blkif->vbd.overflow_max_grants = 0;
+       if (total) {
+               ring->persistent_gnt_c -= total;
+               ring->blkif->vbd.overflow_max_grants = 0;
 
-       /* We can defer this work */
-       schedule_work(&ring->persistent_purge_work);
-       pr_debug("Purged %u/%u\n", (total - num_clean), total);
+               /* We can defer this work */
+               schedule_work(&ring->persistent_purge_work);
+               pr_debug("Purged %u/%u\n", num_clean, total);
+       }
 
 out:
        return;
index ecb35fe8ca8dbb54f36a85513a09064819acd67a..1d3002d773f7adb151dcf79adf18f919e461290a 100644 (file)
@@ -233,16 +233,6 @@ struct xen_vbd {
 
 struct backend_info;
 
-/* Number of available flags */
-#define PERSISTENT_GNT_FLAGS_SIZE      2
-/* This persistent grant is currently in use */
-#define PERSISTENT_GNT_ACTIVE          0
-/*
- * This persistent grant has been used, this flag is set when we remove the
- * PERSISTENT_GNT_ACTIVE, to know that this grant has been used recently.
- */
-#define PERSISTENT_GNT_WAS_ACTIVE      1
-
 /* Number of requests that we can fit in a ring */
 #define XEN_BLKIF_REQS_PER_PAGE                32
 
@@ -250,7 +240,8 @@ struct persistent_gnt {
        struct page *page;
        grant_ref_t gnt;
        grant_handle_t handle;
-       DECLARE_BITMAP(flags, PERSISTENT_GNT_FLAGS_SIZE);
+       unsigned long last_used;
+       bool active;
        struct rb_node node;
        struct list_head remove_node;
 };
@@ -278,7 +269,6 @@ struct xen_blkif_ring {
        wait_queue_head_t       pending_free_wq;
 
        /* Tree to store persistent grants. */
-       spinlock_t              pers_gnts_lock;
        struct rb_root          persistent_gnts;
        unsigned int            persistent_gnt_c;
        atomic_t                persistent_gnt_in_use;
index 8986adab9bf58540bd8d2ab0744d317fba6c23a0..a71d817e900ddc07ff45d240f0ae290ff408b6cd 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/scatterlist.h>
 #include <linux/bitmap.h>
 #include <linux/list.h>
+#include <linux/workqueue.h>
 
 #include <xen/xen.h>
 #include <xen/xenbus.h>
@@ -121,6 +122,8 @@ static inline struct blkif_req *blkif_req(struct request *rq)
 
 static DEFINE_MUTEX(blkfront_mutex);
 static const struct block_device_operations xlvbd_block_fops;
+static struct delayed_work blkfront_work;
+static LIST_HEAD(info_list);
 
 /*
  * Maximum number of segments in indirect requests, the actual value used by
@@ -216,6 +219,7 @@ struct blkfront_info
        /* Save uncomplete reqs and bios for migration. */
        struct list_head requests;
        struct bio_list bio_list;
+       struct list_head info_list;
 };
 
 static unsigned int nr_minors;
@@ -1759,6 +1763,12 @@ static int write_per_ring_nodes(struct xenbus_transaction xbt,
        return err;
 }
 
+static void free_info(struct blkfront_info *info)
+{
+       list_del(&info->info_list);
+       kfree(info);
+}
+
 /* Common code used when first setting up, and when resuming. */
 static int talk_to_blkback(struct xenbus_device *dev,
                           struct blkfront_info *info)
@@ -1880,7 +1890,10 @@ static int talk_to_blkback(struct xenbus_device *dev,
  destroy_blkring:
        blkif_free(info, 0);
 
-       kfree(info);
+       mutex_lock(&blkfront_mutex);
+       free_info(info);
+       mutex_unlock(&blkfront_mutex);
+
        dev_set_drvdata(&dev->dev, NULL);
 
        return err;
@@ -1991,6 +2004,10 @@ static int blkfront_probe(struct xenbus_device *dev,
        info->handle = simple_strtoul(strrchr(dev->nodename, '/')+1, NULL, 0);
        dev_set_drvdata(&dev->dev, info);
 
+       mutex_lock(&blkfront_mutex);
+       list_add(&info->info_list, &info_list);
+       mutex_unlock(&blkfront_mutex);
+
        return 0;
 }
 
@@ -2301,6 +2318,12 @@ static void blkfront_gather_backend_features(struct blkfront_info *info)
        if (indirect_segments <= BLKIF_MAX_SEGMENTS_PER_REQUEST)
                indirect_segments = 0;
        info->max_indirect_segments = indirect_segments;
+
+       if (info->feature_persistent) {
+               mutex_lock(&blkfront_mutex);
+               schedule_delayed_work(&blkfront_work, HZ * 10);
+               mutex_unlock(&blkfront_mutex);
+       }
 }
 
 /*
@@ -2482,7 +2505,9 @@ static int blkfront_remove(struct xenbus_device *xbdev)
        mutex_unlock(&info->mutex);
 
        if (!bdev) {
-               kfree(info);
+               mutex_lock(&blkfront_mutex);
+               free_info(info);
+               mutex_unlock(&blkfront_mutex);
                return 0;
        }
 
@@ -2502,7 +2527,9 @@ static int blkfront_remove(struct xenbus_device *xbdev)
        if (info && !bdev->bd_openers) {
                xlvbd_release_gendisk(info);
                disk->private_data = NULL;
-               kfree(info);
+               mutex_lock(&blkfront_mutex);
+               free_info(info);
+               mutex_unlock(&blkfront_mutex);
        }
 
        mutex_unlock(&bdev->bd_mutex);
@@ -2585,7 +2612,7 @@ static void blkif_release(struct gendisk *disk, fmode_t mode)
                dev_info(disk_to_dev(bdev->bd_disk), "releasing disk\n");
                xlvbd_release_gendisk(info);
                disk->private_data = NULL;
-               kfree(info);
+               free_info(info);
        }
 
 out:
@@ -2618,6 +2645,61 @@ static struct xenbus_driver blkfront_driver = {
        .is_ready = blkfront_is_ready,
 };
 
+static void purge_persistent_grants(struct blkfront_info *info)
+{
+       unsigned int i;
+       unsigned long flags;
+
+       for (i = 0; i < info->nr_rings; i++) {
+               struct blkfront_ring_info *rinfo = &info->rinfo[i];
+               struct grant *gnt_list_entry, *tmp;
+
+               spin_lock_irqsave(&rinfo->ring_lock, flags);
+
+               if (rinfo->persistent_gnts_c == 0) {
+                       spin_unlock_irqrestore(&rinfo->ring_lock, flags);
+                       continue;
+               }
+
+               list_for_each_entry_safe(gnt_list_entry, tmp, &rinfo->grants,
+                                        node) {
+                       if (gnt_list_entry->gref == GRANT_INVALID_REF ||
+                           gnttab_query_foreign_access(gnt_list_entry->gref))
+                               continue;
+
+                       list_del(&gnt_list_entry->node);
+                       gnttab_end_foreign_access(gnt_list_entry->gref, 0, 0UL);
+                       rinfo->persistent_gnts_c--;
+                       __free_page(gnt_list_entry->page);
+                       kfree(gnt_list_entry);
+               }
+
+               spin_unlock_irqrestore(&rinfo->ring_lock, flags);
+       }
+}
+
+static void blkfront_delay_work(struct work_struct *work)
+{
+       struct blkfront_info *info;
+       bool need_schedule_work = false;
+
+       mutex_lock(&blkfront_mutex);
+
+       list_for_each_entry(info, &info_list, info_list) {
+               if (info->feature_persistent) {
+                       need_schedule_work = true;
+                       mutex_lock(&info->mutex);
+                       purge_persistent_grants(info);
+                       mutex_unlock(&info->mutex);
+               }
+       }
+
+       if (need_schedule_work)
+               schedule_delayed_work(&blkfront_work, HZ * 10);
+
+       mutex_unlock(&blkfront_mutex);
+}
+
 static int __init xlblk_init(void)
 {
        int ret;
@@ -2626,6 +2708,15 @@ static int __init xlblk_init(void)
        if (!xen_domain())
                return -ENODEV;
 
+       if (!xen_has_pv_disk_devices())
+               return -ENODEV;
+
+       if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
+               pr_warn("xen_blk: can't get major %d with name %s\n",
+                       XENVBD_MAJOR, DEV_NAME);
+               return -ENODEV;
+       }
+
        if (xen_blkif_max_segments < BLKIF_MAX_SEGMENTS_PER_REQUEST)
                xen_blkif_max_segments = BLKIF_MAX_SEGMENTS_PER_REQUEST;
 
@@ -2641,14 +2732,7 @@ static int __init xlblk_init(void)
                xen_blkif_max_queues = nr_cpus;
        }
 
-       if (!xen_has_pv_disk_devices())
-               return -ENODEV;
-
-       if (register_blkdev(XENVBD_MAJOR, DEV_NAME)) {
-               printk(KERN_WARNING "xen_blk: can't get major %d with name %s\n",
-                      XENVBD_MAJOR, DEV_NAME);
-               return -ENODEV;
-       }
+       INIT_DELAYED_WORK(&blkfront_work, blkfront_delay_work);
 
        ret = xenbus_register_frontend(&blkfront_driver);
        if (ret) {
@@ -2663,6 +2747,8 @@ module_init(xlblk_init);
 
 static void __exit xlblk_exit(void)
 {
+       cancel_delayed_work_sync(&blkfront_work);
+
        xenbus_unregister_driver(&blkfront_driver);
        unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
        kfree(minors);
index 2df11cc08a460a893e2ebcb7af510f70bd6e792a..845b0314ce3a7f599360d6c7e3d73c14a5fc2bbb 100644 (file)
@@ -200,6 +200,7 @@ config BT_HCIUART_RTL
        depends on BT_HCIUART
        depends on BT_HCIUART_SERDEV
        depends on GPIOLIB
+       depends on ACPI
        select BT_HCIUART_3WIRE
        select BT_RTL
        help
index ed2a5c7cb77fa0304ed7f3639631c3b9c8eb597e..4593baff2bc944f5a003bb666520062f768f52e5 100644 (file)
@@ -144,8 +144,10 @@ static int mtk_setup_fw(struct hci_dev *hdev)
        fw_size = fw->size;
 
        /* The size of patch header is 30 bytes, should be skip */
-       if (fw_size < 30)
-               return -EINVAL;
+       if (fw_size < 30) {
+               err = -EINVAL;
+               goto free_fw;
+       }
 
        fw_size -= 30;
        fw_ptr += 30;
@@ -172,8 +174,8 @@ static int mtk_setup_fw(struct hci_dev *hdev)
                fw_ptr += dlen;
        }
 
+free_fw:
        release_firmware(fw);
-
        return err;
 }
 
index c9bac9dc4637e7b8ce9ad3eb15e484added77f79..e4fe954e63a9be53b74397c825bf4f57b06dcca5 100644 (file)
@@ -498,32 +498,29 @@ static int sysc_check_registers(struct sysc *ddata)
 
 /**
  * syc_ioremap - ioremap register space for the interconnect target module
- * @ddata: deviec driver data
+ * @ddata: device driver data
  *
  * Note that the interconnect target module registers can be anywhere
- * within the first child device address space. For example, SGX has
- * them at offset 0x1fc00 in the 32MB module address space. We just
- * what we need around the interconnect target module registers.
+ * within the interconnect target module range. For example, SGX has
+ * them at offset 0x1fc00 in the 32MB module address space. And cpsw
+ * has them at offset 0x1200 in the CPSW_WR child. Usually the
+ * the interconnect target module registers are at the beginning of
+ * the module range though.
  */
 static int sysc_ioremap(struct sysc *ddata)
 {
-       u32 size = 0;
-
-       if (ddata->offsets[SYSC_SYSSTATUS] >= 0)
-               size = ddata->offsets[SYSC_SYSSTATUS];
-       else if (ddata->offsets[SYSC_SYSCONFIG] >= 0)
-               size = ddata->offsets[SYSC_SYSCONFIG];
-       else if (ddata->offsets[SYSC_REVISION] >= 0)
-               size = ddata->offsets[SYSC_REVISION];
-       else
-               return -EINVAL;
+       int size;
 
-       size &= 0xfff00;
-       size += SZ_256;
+       size = max3(ddata->offsets[SYSC_REVISION],
+                   ddata->offsets[SYSC_SYSCONFIG],
+                   ddata->offsets[SYSC_SYSSTATUS]);
+
+       if (size < 0 || (size + sizeof(u32)) > ddata->module_size)
+               return -EINVAL;
 
        ddata->module_va = devm_ioremap(ddata->dev,
                                        ddata->module_pa,
-                                       size);
+                                       size + sizeof(u32));
        if (!ddata->module_va)
                return -EIO;
 
@@ -1224,10 +1221,10 @@ static int sysc_child_suspend_noirq(struct device *dev)
        if (!pm_runtime_status_suspended(dev)) {
                error = pm_generic_runtime_suspend(dev);
                if (error) {
-                       dev_err(dev, "%s error at %i: %i\n",
-                               __func__, __LINE__, error);
+                       dev_warn(dev, "%s busy at %i: %i\n",
+                                __func__, __LINE__, error);
 
-                       return error;
+                       return 0;
                }
 
                error = sysc_runtime_suspend(ddata->dev);
index 113fc6edb2b03718166b2e42854d777a2f18f798..a5d5a96479bfe813449c7527024c52bf0d79c1b8 100644 (file)
@@ -2546,7 +2546,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
        if (!CDROM_CAN(CDC_SELECT_DISC) ||
            (arg == CDSL_CURRENT || arg == CDSL_NONE))
                return cdi->ops->drive_status(cdi, CDSL_CURRENT);
-       if (((int)arg >= cdi->capacity))
+       if (arg >= cdi->capacity)
                return -EINVAL;
        return cdrom_slot_status(cdi, arg);
 }
index 740af90a950820055d9934f66e080c338f0cf143..c5edf8f2fd1969337b7803ef96884ee9164495fb 100644 (file)
@@ -558,8 +558,8 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
        if (!clk_base)
                goto npcm7xx_init_error;
 
-       npcm7xx_clk_data = kzalloc(sizeof(*npcm7xx_clk_data->hws) *
-               NPCM7XX_NUM_CLOCKS + sizeof(npcm7xx_clk_data), GFP_KERNEL);
+       npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws,
+                                  NPCM7XX_NUM_CLOCKS), GFP_KERNEL);
        if (!npcm7xx_clk_data)
                goto npcm7xx_init_np_err;
 
index fb62f393800825f1fa4433ea14a7931dfb6409d6..3a0996f2d5564054d782edf83224f425e3799059 100644 (file)
@@ -46,7 +46,7 @@ static int st_clk_probe(struct platform_device *pdev)
                clk_oscout1_parents, ARRAY_SIZE(clk_oscout1_parents),
                0, st_data->base + CLKDRVSTR2, OSCOUT1CLK25MHZ, 3, 0, NULL);
 
-       clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_25M]->clk);
+       clk_set_parent(hws[ST_CLK_MUX]->clk, hws[ST_CLK_48M]->clk);
 
        hws[ST_CLK_GATE] = clk_hw_register_gate(NULL, "oscout1", "oscout1_mux",
                0, st_data->base + MISCCLKCNTL1, OSCCLKENB,
index 110483f0e3fbad97c1304b633b5d55c940e1fe70..e26a40971b263ed5f5cb113c938f4d9f84109862 100644 (file)
@@ -379,9 +379,20 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev,
                if (idx == -1)
                        idx = i; /* first enabled state */
                if (s->target_residency > data->predicted_us) {
-                       if (!tick_nohz_tick_stopped())
+                       if (data->predicted_us < TICK_USEC)
                                break;
 
+                       if (!tick_nohz_tick_stopped()) {
+                               /*
+                                * If the state selected so far is shallow,
+                                * waking up early won't hurt, so retain the
+                                * tick in that case and let the governor run
+                                * again in the next iteration of the loop.
+                                */
+                               expected_interval = drv->states[idx].target_residency;
+                               break;
+                       }
+
                        /*
                         * If the state selected so far is shallow and this
                         * state's target residency matches the time till the
index 6e61cc93c2b0da3be9d2f68bf8e063deaf122054..d7aa7d7ff102fab24aa86bd1d13190348973a1bf 100644 (file)
@@ -679,10 +679,8 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher,
        int ret = 0;
 
        if (keylen != 2 * AES_MIN_KEY_SIZE  && keylen != 2 * AES_MAX_KEY_SIZE) {
-               crypto_ablkcipher_set_flags(ablkcipher,
-                                           CRYPTO_TFM_RES_BAD_KEY_LEN);
                dev_err(jrdev, "key size mismatch\n");
-               return -EINVAL;
+               goto badkey;
        }
 
        ctx->cdata.keylen = keylen;
@@ -715,7 +713,7 @@ static int xts_ablkcipher_setkey(struct crypto_ablkcipher *ablkcipher,
        return ret;
 badkey:
        crypto_ablkcipher_set_flags(ablkcipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
-       return 0;
+       return -EINVAL;
 }
 
 /*
index 578ea63a31098e46a7e32554f2c7acff5f8137cd..f26d62e5533a7a5a622d6e2f0661dcb3d0ebdc40 100644 (file)
@@ -71,8 +71,8 @@ static void rsa_priv_f2_unmap(struct device *dev, struct rsa_edesc *edesc,
        dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE);
        dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE);
        dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE);
-       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE);
-       dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_TO_DEVICE);
+       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
+       dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL);
 }
 
 static 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,
        dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE);
        dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE);
        dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE);
-       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE);
-       dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_TO_DEVICE);
+       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
+       dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL);
 }
 
 /* RSA Job Completion handler */
@@ -417,13 +417,13 @@ static int set_rsa_priv_f2_pdb(struct akcipher_request *req,
                goto unmap_p;
        }
 
-       pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_TO_DEVICE);
+       pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL);
        if (dma_mapping_error(dev, pdb->tmp1_dma)) {
                dev_err(dev, "Unable to map RSA tmp1 memory\n");
                goto unmap_q;
        }
 
-       pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_TO_DEVICE);
+       pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL);
        if (dma_mapping_error(dev, pdb->tmp2_dma)) {
                dev_err(dev, "Unable to map RSA tmp2 memory\n");
                goto unmap_tmp1;
@@ -451,7 +451,7 @@ static int set_rsa_priv_f2_pdb(struct akcipher_request *req,
        return 0;
 
 unmap_tmp1:
-       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE);
+       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
 unmap_q:
        dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE);
 unmap_p:
@@ -504,13 +504,13 @@ static int set_rsa_priv_f3_pdb(struct akcipher_request *req,
                goto unmap_dq;
        }
 
-       pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_TO_DEVICE);
+       pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL);
        if (dma_mapping_error(dev, pdb->tmp1_dma)) {
                dev_err(dev, "Unable to map RSA tmp1 memory\n");
                goto unmap_qinv;
        }
 
-       pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_TO_DEVICE);
+       pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL);
        if (dma_mapping_error(dev, pdb->tmp2_dma)) {
                dev_err(dev, "Unable to map RSA tmp2 memory\n");
                goto unmap_tmp1;
@@ -538,7 +538,7 @@ static int set_rsa_priv_f3_pdb(struct akcipher_request *req,
        return 0;
 
 unmap_tmp1:
-       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_TO_DEVICE);
+       dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL);
 unmap_qinv:
        dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE);
 unmap_dq:
index f4f258075b895a8c55fbd836d35b1b6b399beed8..acdd72016ffe154fab70f8de0ff43f6251b50e28 100644 (file)
@@ -190,7 +190,8 @@ static void caam_jr_dequeue(unsigned long devarg)
                BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
 
                /* Unmap just-run descriptor so we can post-process */
-               dma_unmap_single(dev, jrp->outring[hw_idx].desc,
+               dma_unmap_single(dev,
+                                caam_dma_to_cpu(jrp->outring[hw_idx].desc),
                                 jrp->entinfo[sw_idx].desc_size,
                                 DMA_TO_DEVICE);
 
index 9a476bb6d4c7eace932edb09b040098eccee7aa0..af596455b420f60d68096b8f2d4e9c71745785fc 100644 (file)
@@ -35,6 +35,7 @@ struct nitrox_cmdq {
        /* requests in backlog queues */
        atomic_t backlog_count;
 
+       int write_idx;
        /* command size 32B/64B */
        u8 instr_size;
        u8 qno;
@@ -87,7 +88,7 @@ struct nitrox_bh {
        struct bh_data *slc;
 };
 
-/* NITROX-5 driver state */
+/* NITROX-V driver state */
 #define NITROX_UCODE_LOADED    0
 #define NITROX_READY           1
 
index ebe267379ac95ede190832e8a9c0a1df174e6866..4d31df07777f63129715175f7aa4bc84b50fe49b 100644 (file)
@@ -36,6 +36,7 @@ static int cmdq_common_init(struct nitrox_cmdq *cmdq)
        cmdq->head = PTR_ALIGN(cmdq->head_unaligned, PKT_IN_ALIGN);
        cmdq->dma = PTR_ALIGN(cmdq->dma_unaligned, PKT_IN_ALIGN);
        cmdq->qsize = (qsize + PKT_IN_ALIGN);
+       cmdq->write_idx = 0;
 
        spin_lock_init(&cmdq->response_lock);
        spin_lock_init(&cmdq->cmdq_lock);
index deaefd532aaa155755faba33bba5fbee7b11430f..4a362fc22f6287638f749dfeacde20bc62517896 100644 (file)
  *   Invalid flag options in AES-CCM IV.
  */
 
+static inline int incr_index(int index, int count, int max)
+{
+       if ((index + count) >= max)
+               index = index + count - max;
+       else
+               index += count;
+
+       return index;
+}
+
 /**
  * dma_free_sglist - unmap and free the sg lists.
  * @ndev: N5 device
@@ -426,30 +436,29 @@ static void post_se_instr(struct nitrox_softreq *sr,
                          struct nitrox_cmdq *cmdq)
 {
        struct nitrox_device *ndev = sr->ndev;
-       union nps_pkt_in_instr_baoff_dbell pkt_in_baoff_dbell;
-       u64 offset;
+       int idx;
        u8 *ent;
 
        spin_lock_bh(&cmdq->cmdq_lock);
 
-       /* get the next write offset */
-       offset = NPS_PKT_IN_INSTR_BAOFF_DBELLX(cmdq->qno);
-       pkt_in_baoff_dbell.value = nitrox_read_csr(ndev, offset);
+       idx = cmdq->write_idx;
        /* copy the instruction */
-       ent = cmdq->head + pkt_in_baoff_dbell.s.aoff;
+       ent = cmdq->head + (idx * cmdq->instr_size);
        memcpy(ent, &sr->instr, cmdq->instr_size);
-       /* flush the command queue updates */
-       dma_wmb();
 
-       sr->tstamp = jiffies;
        atomic_set(&sr->status, REQ_POSTED);
        response_list_add(sr, cmdq);
+       sr->tstamp = jiffies;
+       /* flush the command queue updates */
+       dma_wmb();
 
        /* Ring doorbell with count 1 */
        writeq(1, cmdq->dbell_csr_addr);
        /* orders the doorbell rings */
        mmiowb();
 
+       cmdq->write_idx = incr_index(idx, 1, ndev->qlen);
+
        spin_unlock_bh(&cmdq->cmdq_lock);
 }
 
@@ -459,6 +468,9 @@ static int post_backlog_cmds(struct nitrox_cmdq *cmdq)
        struct nitrox_softreq *sr, *tmp;
        int ret = 0;
 
+       if (!atomic_read(&cmdq->backlog_count))
+               return 0;
+
        spin_lock_bh(&cmdq->backlog_lock);
 
        list_for_each_entry_safe(sr, tmp, &cmdq->backlog_head, backlog) {
@@ -466,7 +478,7 @@ static int post_backlog_cmds(struct nitrox_cmdq *cmdq)
 
                /* submit until space available */
                if (unlikely(cmdq_full(cmdq, ndev->qlen))) {
-                       ret = -EBUSY;
+                       ret = -ENOSPC;
                        break;
                }
                /* delete from backlog list */
@@ -491,23 +503,20 @@ static int nitrox_enqueue_request(struct nitrox_softreq *sr)
 {
        struct nitrox_cmdq *cmdq = sr->cmdq;
        struct nitrox_device *ndev = sr->ndev;
-       int ret = -EBUSY;
+
+       /* try to post backlog requests */
+       post_backlog_cmds(cmdq);
 
        if (unlikely(cmdq_full(cmdq, ndev->qlen))) {
                if (!(sr->flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
-                       return -EAGAIN;
-
+                       return -ENOSPC;
+               /* add to backlog list */
                backlog_list_add(sr, cmdq);
-       } else {
-               ret = post_backlog_cmds(cmdq);
-               if (ret) {
-                       backlog_list_add(sr, cmdq);
-                       return ret;
-               }
-               post_se_instr(sr, cmdq);
-               ret = -EINPROGRESS;
+               return -EBUSY;
        }
-       return ret;
+       post_se_instr(sr, cmdq);
+
+       return -EINPROGRESS;
 }
 
 /**
@@ -624,11 +633,9 @@ int nitrox_process_se_request(struct nitrox_device *ndev,
         */
        sr->instr.fdata[0] = *((u64 *)&req->gph);
        sr->instr.fdata[1] = 0;
-       /* flush the soft_req changes before posting the cmd */
-       wmb();
 
        ret = nitrox_enqueue_request(sr);
-       if (ret == -EAGAIN)
+       if (ret == -ENOSPC)
                goto send_fail;
 
        return ret;
index a53a0e6ba024e8175338859c634c81e94859cd13..7725b6ee14efb2ecc89d9c0822aa19903284d3f5 100644 (file)
@@ -96,6 +96,10 @@ enum csk_flags {
        CSK_CONN_INLINE,        /* Connection on HW */
 };
 
+enum chtls_cdev_state {
+       CHTLS_CDEV_STATE_UP = 1
+};
+
 struct listen_ctx {
        struct sock *lsk;
        struct chtls_dev *cdev;
@@ -146,6 +150,7 @@ struct chtls_dev {
        unsigned int send_page_order;
        int max_host_sndbuf;
        struct key_map kmap;
+       unsigned int cdev_state;
 };
 
 struct chtls_hws {
index 9b07f9165658beeb07a29edc4e00c3849176d2ec..f59b044ebd25528864d055c04b90f67b83248eac 100644 (file)
@@ -160,6 +160,7 @@ static void chtls_register_dev(struct chtls_dev *cdev)
        tlsdev->hash = chtls_create_hash;
        tlsdev->unhash = chtls_destroy_hash;
        tls_register_device(&cdev->tlsdev);
+       cdev->cdev_state = CHTLS_CDEV_STATE_UP;
 }
 
 static void chtls_unregister_dev(struct chtls_dev *cdev)
@@ -281,8 +282,10 @@ static void chtls_free_all_uld(void)
        struct chtls_dev *cdev, *tmp;
 
        mutex_lock(&cdev_mutex);
-       list_for_each_entry_safe(cdev, tmp, &cdev_list, list)
-               chtls_free_uld(cdev);
+       list_for_each_entry_safe(cdev, tmp, &cdev_list, list) {
+               if (cdev->cdev_state == CHTLS_CDEV_STATE_UP)
+                       chtls_free_uld(cdev);
+       }
        mutex_unlock(&cdev_mutex);
 }
 
index 5285ece4f33a36df39bfd18068dd14ce6a1213db..b71895871be3f1f2ec0b15d19d4087a16f40016f 100644 (file)
@@ -107,24 +107,23 @@ static int p8_aes_cbc_encrypt(struct blkcipher_desc *desc,
                ret = crypto_skcipher_encrypt(req);
                skcipher_request_zero(req);
        } else {
-               preempt_disable();
-               pagefault_disable();
-               enable_kernel_vsx();
-
                blkcipher_walk_init(&walk, dst, src, nbytes);
                ret = blkcipher_walk_virt(desc, &walk);
                while ((nbytes = walk.nbytes)) {
+                       preempt_disable();
+                       pagefault_disable();
+                       enable_kernel_vsx();
                        aes_p8_cbc_encrypt(walk.src.virt.addr,
                                           walk.dst.virt.addr,
                                           nbytes & AES_BLOCK_MASK,
                                           &ctx->enc_key, walk.iv, 1);
+                       disable_kernel_vsx();
+                       pagefault_enable();
+                       preempt_enable();
+
                        nbytes &= AES_BLOCK_SIZE - 1;
                        ret = blkcipher_walk_done(desc, &walk, nbytes);
                }
-
-               disable_kernel_vsx();
-               pagefault_enable();
-               preempt_enable();
        }
 
        return ret;
@@ -147,24 +146,23 @@ static int p8_aes_cbc_decrypt(struct blkcipher_desc *desc,
                ret = crypto_skcipher_decrypt(req);
                skcipher_request_zero(req);
        } else {
-               preempt_disable();
-               pagefault_disable();
-               enable_kernel_vsx();
-
                blkcipher_walk_init(&walk, dst, src, nbytes);
                ret = blkcipher_walk_virt(desc, &walk);
                while ((nbytes = walk.nbytes)) {
+                       preempt_disable();
+                       pagefault_disable();
+                       enable_kernel_vsx();
                        aes_p8_cbc_encrypt(walk.src.virt.addr,
                                           walk.dst.virt.addr,
                                           nbytes & AES_BLOCK_MASK,
                                           &ctx->dec_key, walk.iv, 0);
+                       disable_kernel_vsx();
+                       pagefault_enable();
+                       preempt_enable();
+
                        nbytes &= AES_BLOCK_SIZE - 1;
                        ret = blkcipher_walk_done(desc, &walk, nbytes);
                }
-
-               disable_kernel_vsx();
-               pagefault_enable();
-               preempt_enable();
        }
 
        return ret;
index 8bd9aff0f55fba6639b67147cf97c2fcfce12bfc..e9954a7d46944d36cd2aeffdfd8202b54c793d71 100644 (file)
@@ -116,32 +116,39 @@ static int p8_aes_xts_crypt(struct blkcipher_desc *desc,
                ret = enc? crypto_skcipher_encrypt(req) : crypto_skcipher_decrypt(req);
                skcipher_request_zero(req);
        } else {
+               blkcipher_walk_init(&walk, dst, src, nbytes);
+
+               ret = blkcipher_walk_virt(desc, &walk);
+
                preempt_disable();
                pagefault_disable();
                enable_kernel_vsx();
 
-               blkcipher_walk_init(&walk, dst, src, nbytes);
-
-               ret = blkcipher_walk_virt(desc, &walk);
                iv = walk.iv;
                memset(tweak, 0, AES_BLOCK_SIZE);
                aes_p8_encrypt(iv, tweak, &ctx->tweak_key);
 
+               disable_kernel_vsx();
+               pagefault_enable();
+               preempt_enable();
+
                while ((nbytes = walk.nbytes)) {
+                       preempt_disable();
+                       pagefault_disable();
+                       enable_kernel_vsx();
                        if (enc)
                                aes_p8_xts_encrypt(walk.src.virt.addr, walk.dst.virt.addr,
                                                nbytes & AES_BLOCK_MASK, &ctx->enc_key, NULL, tweak);
                        else
                                aes_p8_xts_decrypt(walk.src.virt.addr, walk.dst.virt.addr,
                                                nbytes & AES_BLOCK_MASK, &ctx->dec_key, NULL, tweak);
+                       disable_kernel_vsx();
+                       pagefault_enable();
+                       preempt_enable();
 
                        nbytes &= AES_BLOCK_SIZE - 1;
                        ret = blkcipher_walk_done(desc, &walk, nbytes);
                }
-
-               disable_kernel_vsx();
-               pagefault_enable();
-               preempt_enable();
        }
        return ret;
 }
index 502b94fb116a7070af89ce51da182c3a936e48a0..b6e9df11115d358734d686af7b26a9eec0a6de64 100644 (file)
@@ -1012,13 +1012,9 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
                if (r)
                        return r;
 
-               if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE) {
-                       parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT;
-                       if (!parser->ctx->preamble_presented) {
-                               parser->job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
-                               parser->ctx->preamble_presented = true;
-                       }
-               }
+               if (chunk_ib->flags & AMDGPU_IB_FLAG_PREAMBLE)
+                       parser->job->preamble_status |=
+                               AMDGPU_PREAMBLE_IB_PRESENT;
 
                if (parser->ring && parser->ring != ring)
                        return -EINVAL;
@@ -1207,26 +1203,24 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
 
        int r;
 
+       job = p->job;
+       p->job = NULL;
+
+       r = drm_sched_job_init(&job->base, entity, p->filp);
+       if (r)
+               goto error_unlock;
+
+       /* No memory allocation is allowed while holding the mn lock */
        amdgpu_mn_lock(p->mn);
        amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) {
                struct amdgpu_bo *bo = e->robj;
 
                if (amdgpu_ttm_tt_userptr_needs_pages(bo->tbo.ttm)) {
-                       amdgpu_mn_unlock(p->mn);
-                       return -ERESTARTSYS;
+                       r = -ERESTARTSYS;
+                       goto error_abort;
                }
        }
 
-       job = p->job;
-       p->job = NULL;
-
-       r = drm_sched_job_init(&job->base, entity, p->filp);
-       if (r) {
-               amdgpu_job_free(job);
-               amdgpu_mn_unlock(p->mn);
-               return r;
-       }
-
        job->owner = p->filp;
        p->fence = dma_fence_get(&job->base.s_fence->finished);
 
@@ -1241,6 +1235,12 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
 
        amdgpu_cs_post_dependencies(p);
 
+       if ((job->preamble_status & AMDGPU_PREAMBLE_IB_PRESENT) &&
+           !p->ctx->preamble_presented) {
+               job->preamble_status |= AMDGPU_PREAMBLE_IB_PRESENT_FIRST;
+               p->ctx->preamble_presented = true;
+       }
+
        cs->out.handle = seq;
        job->uf_sequence = seq;
 
@@ -1258,6 +1258,15 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
        amdgpu_mn_unlock(p->mn);
 
        return 0;
+
+error_abort:
+       dma_fence_put(&job->base.s_fence->finished);
+       job->base.s_fence = NULL;
+
+error_unlock:
+       amdgpu_job_free(job);
+       amdgpu_mn_unlock(p->mn);
+       return r;
 }
 
 int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
index 5518e623fed21046791c42e026383526f8cf8adb..51b5e977ca885ef1f7d7df49698f3c6843bab437 100644 (file)
@@ -164,8 +164,10 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
                return r;
        }
 
+       need_ctx_switch = ring->current_ctx != fence_ctx;
        if (ring->funcs->emit_pipeline_sync && job &&
            ((tmp = amdgpu_sync_get_fence(&job->sched_sync, NULL)) ||
+            (amdgpu_sriov_vf(adev) && need_ctx_switch) ||
             amdgpu_vm_need_pipeline_sync(ring, job))) {
                need_pipe_sync = true;
                dma_fence_put(tmp);
@@ -196,7 +198,6 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
        }
 
        skip_preamble = ring->current_ctx == fence_ctx;
-       need_ctx_switch = ring->current_ctx != fence_ctx;
        if (job && ring->funcs->emit_cntxcntl) {
                if (need_ctx_switch)
                        status |= AMDGPU_HAVE_CTX_SWITCH;
index 8f98629fbe5936858a3c77b3546fd106577f7254..7b4e657a95c700561298346654118a9915c8caec 100644 (file)
@@ -1932,14 +1932,6 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
                        amdgpu_fence_wait_empty(ring);
        }
 
-       mutex_lock(&adev->pm.mutex);
-       /* update battery/ac status */
-       if (power_supply_is_system_supplied() > 0)
-               adev->pm.ac_power = true;
-       else
-               adev->pm.ac_power = false;
-       mutex_unlock(&adev->pm.mutex);
-
        if (adev->powerplay.pp_funcs->dispatch_tasks) {
                if (!amdgpu_device_has_dc_support(adev)) {
                        mutex_lock(&adev->pm.mutex);
index ece0ac703e277282992422865f9945ce06ca5f0c..b17771dd5ce732620e8c058f788516b7ef9b6fee 100644 (file)
@@ -172,6 +172,7 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
         * is validated on next vm use to avoid fault.
         * */
        list_move_tail(&base->vm_status, &vm->evicted);
+       base->moved = true;
 }
 
 /**
@@ -369,7 +370,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
        uint64_t addr;
        int r;
 
-       addr = amdgpu_bo_gpu_offset(bo);
        entries = amdgpu_bo_size(bo) / 8;
 
        if (pte_support_ats) {
@@ -401,6 +401,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
        if (r)
                goto error;
 
+       addr = amdgpu_bo_gpu_offset(bo);
        if (ats_entries) {
                uint64_t ats_value;
 
@@ -2483,28 +2484,52 @@ static uint32_t amdgpu_vm_get_block_size(uint64_t vm_size)
  * amdgpu_vm_adjust_size - adjust vm size, block size and fragment size
  *
  * @adev: amdgpu_device pointer
- * @vm_size: the default vm size if it's set auto
+ * @min_vm_size: the minimum vm size in GB if it's set auto
  * @fragment_size_default: Default PTE fragment size
  * @max_level: max VMPT level
  * @max_bits: max address space size in bits
  *
  */
-void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t vm_size,
+void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
                           uint32_t fragment_size_default, unsigned max_level,
                           unsigned max_bits)
 {
+       unsigned int max_size = 1 << (max_bits - 30);
+       unsigned int vm_size;
        uint64_t tmp;
 
        /* adjust vm size first */
        if (amdgpu_vm_size != -1) {
-               unsigned max_size = 1 << (max_bits - 30);
-
                vm_size = amdgpu_vm_size;
                if (vm_size > max_size) {
                        dev_warn(adev->dev, "VM size (%d) too large, max is %u GB\n",
                                 amdgpu_vm_size, max_size);
                        vm_size = max_size;
                }
+       } else {
+               struct sysinfo si;
+               unsigned int phys_ram_gb;
+
+               /* Optimal VM size depends on the amount of physical
+                * RAM available. Underlying requirements and
+                * assumptions:
+                *
+                *  - Need to map system memory and VRAM from all GPUs
+                *     - VRAM from other GPUs not known here
+                *     - Assume VRAM <= system memory
+                *  - On GFX8 and older, VM space can be segmented for
+                *    different MTYPEs
+                *  - Need to allow room for fragmentation, guard pages etc.
+                *
+                * This adds up to a rough guess of system memory x3.
+                * Round up to power of two to maximize the available
+                * VM size with the given page table size.
+                */
+               si_meminfo(&si);
+               phys_ram_gb = ((uint64_t)si.totalram * si.mem_unit +
+                              (1 << 30) - 1) >> 30;
+               vm_size = roundup_pow_of_two(
+                       min(max(phys_ram_gb * 3, min_vm_size), max_size));
        }
 
        adev->vm_manager.max_pfn = (uint64_t)vm_size << 18;
index 67a15d439ac006f97b48ffe7e74544d6688bf452..9fa9df0c5e7f9a19d1f9aed6e0430ea78aac8675 100644 (file)
@@ -321,7 +321,7 @@ struct amdgpu_bo_va_mapping *amdgpu_vm_bo_lookup_mapping(struct amdgpu_vm *vm,
 void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket);
 void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
                      struct amdgpu_bo_va *bo_va);
-void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t vm_size,
+void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
                           uint32_t fragment_size_default, unsigned max_level,
                           unsigned max_bits);
 int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp);
index 5cd45210113f645062750e4ef54ffd4e7dc14da7..5a9534a82d40911cebb02462ba0cc5a995a5bfca 100644 (file)
@@ -5664,6 +5664,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
        if (amdgpu_sriov_vf(adev))
                return 0;
 
+       if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
+                               AMD_PG_SUPPORT_RLC_SMU_HS |
+                               AMD_PG_SUPPORT_CP |
+                               AMD_PG_SUPPORT_GFX_DMG))
+               adev->gfx.rlc.funcs->enter_safe_mode(adev);
        switch (adev->asic_type) {
        case CHIP_CARRIZO:
        case CHIP_STONEY:
@@ -5713,7 +5718,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
        default:
                break;
        }
-
+       if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
+                               AMD_PG_SUPPORT_RLC_SMU_HS |
+                               AMD_PG_SUPPORT_CP |
+                               AMD_PG_SUPPORT_GFX_DMG))
+               adev->gfx.rlc.funcs->exit_safe_mode(adev);
        return 0;
 }
 
index 75317f283c6967d2de4daaaf5dca4cfdaf9922b7..ad151fefa41f1ed1d6f19ae1783b13b1b76b4f2e 100644 (file)
@@ -632,12 +632,6 @@ static void gmc_v6_0_gart_disable(struct amdgpu_device *adev)
        amdgpu_gart_table_vram_unpin(adev);
 }
 
-static void gmc_v6_0_gart_fini(struct amdgpu_device *adev)
-{
-       amdgpu_gart_table_vram_free(adev);
-       amdgpu_gart_fini(adev);
-}
-
 static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev,
                                     u32 status, u32 addr, u32 mc_client)
 {
@@ -935,8 +929,9 @@ static int gmc_v6_0_sw_fini(void *handle)
 
        amdgpu_gem_force_release(adev);
        amdgpu_vm_manager_fini(adev);
-       gmc_v6_0_gart_fini(adev);
+       amdgpu_gart_table_vram_free(adev);
        amdgpu_bo_fini(adev);
+       amdgpu_gart_fini(adev);
        release_firmware(adev->gmc.fw);
        adev->gmc.fw = NULL;
 
index 36dc367c4b45ea86a5a5b575ba357f9717ec92b0..f8d8a3a73e42b31397b97f743ab187da2732cd89 100644 (file)
@@ -746,19 +746,6 @@ static void gmc_v7_0_gart_disable(struct amdgpu_device *adev)
        amdgpu_gart_table_vram_unpin(adev);
 }
 
-/**
- * gmc_v7_0_gart_fini - vm fini callback
- *
- * @adev: amdgpu_device pointer
- *
- * Tears down the driver GART/VM setup (CIK).
- */
-static void gmc_v7_0_gart_fini(struct amdgpu_device *adev)
-{
-       amdgpu_gart_table_vram_free(adev);
-       amdgpu_gart_fini(adev);
-}
-
 /**
  * gmc_v7_0_vm_decode_fault - print human readable fault info
  *
@@ -1095,8 +1082,9 @@ static int gmc_v7_0_sw_fini(void *handle)
        amdgpu_gem_force_release(adev);
        amdgpu_vm_manager_fini(adev);
        kfree(adev->gmc.vm_fault_info);
-       gmc_v7_0_gart_fini(adev);
+       amdgpu_gart_table_vram_free(adev);
        amdgpu_bo_fini(adev);
+       amdgpu_gart_fini(adev);
        release_firmware(adev->gmc.fw);
        adev->gmc.fw = NULL;
 
index 70fc97b59b4f2dcf157b49885c8356fedfca05a3..9333109b210de810119f0d15d94ec5d125a84cf7 100644 (file)
@@ -968,19 +968,6 @@ static void gmc_v8_0_gart_disable(struct amdgpu_device *adev)
        amdgpu_gart_table_vram_unpin(adev);
 }
 
-/**
- * gmc_v8_0_gart_fini - vm fini callback
- *
- * @adev: amdgpu_device pointer
- *
- * Tears down the driver GART/VM setup (CIK).
- */
-static void gmc_v8_0_gart_fini(struct amdgpu_device *adev)
-{
-       amdgpu_gart_table_vram_free(adev);
-       amdgpu_gart_fini(adev);
-}
-
 /**
  * gmc_v8_0_vm_decode_fault - print human readable fault info
  *
@@ -1199,8 +1186,9 @@ static int gmc_v8_0_sw_fini(void *handle)
        amdgpu_gem_force_release(adev);
        amdgpu_vm_manager_fini(adev);
        kfree(adev->gmc.vm_fault_info);
-       gmc_v8_0_gart_fini(adev);
+       amdgpu_gart_table_vram_free(adev);
        amdgpu_bo_fini(adev);
+       amdgpu_gart_fini(adev);
        release_firmware(adev->gmc.fw);
        adev->gmc.fw = NULL;
 
index 399a5db27649728686868550502089391f3b0807..72f8018fa2a836572b9c898785bb99deecc1ca91 100644 (file)
@@ -942,26 +942,12 @@ static int gmc_v9_0_sw_init(void *handle)
        return 0;
 }
 
-/**
- * gmc_v9_0_gart_fini - vm fini callback
- *
- * @adev: amdgpu_device pointer
- *
- * Tears down the driver GART/VM setup (CIK).
- */
-static void gmc_v9_0_gart_fini(struct amdgpu_device *adev)
-{
-       amdgpu_gart_table_vram_free(adev);
-       amdgpu_gart_fini(adev);
-}
-
 static int gmc_v9_0_sw_fini(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
        amdgpu_gem_force_release(adev);
        amdgpu_vm_manager_fini(adev);
-       gmc_v9_0_gart_fini(adev);
 
        /*
        * TODO:
@@ -974,7 +960,9 @@ static int gmc_v9_0_sw_fini(void *handle)
        */
        amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, NULL);
 
+       amdgpu_gart_table_vram_free(adev);
        amdgpu_bo_fini(adev);
+       amdgpu_gart_fini(adev);
 
        return 0;
 }
index 3f57f6463dc880c797429d9f3080894b929e5eff..cb79a93c2eb73a5f23fb008cee50e80325ada627 100644 (file)
@@ -65,8 +65,6 @@ static int kv_set_thermal_temperature_range(struct amdgpu_device *adev,
                                            int min_temp, int max_temp);
 static int kv_init_fps_limits(struct amdgpu_device *adev);
 
-static void kv_dpm_powergate_uvd(void *handle, bool gate);
-static void kv_dpm_powergate_vce(struct amdgpu_device *adev, bool gate);
 static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate);
 static void kv_dpm_powergate_acp(struct amdgpu_device *adev, bool gate);
 
@@ -1354,8 +1352,6 @@ static int kv_dpm_enable(struct amdgpu_device *adev)
                return ret;
        }
 
-       kv_update_current_ps(adev, adev->pm.dpm.boot_ps);
-
        if (adev->irq.installed &&
            amdgpu_is_internal_thermal_sensor(adev->pm.int_thermal_type)) {
                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)
 
 static void kv_dpm_disable(struct amdgpu_device *adev)
 {
+       struct kv_power_info *pi = kv_get_pi(adev);
+
        amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
                       AMDGPU_THERMAL_IRQ_LOW_TO_HIGH);
        amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
@@ -1387,8 +1385,10 @@ static void kv_dpm_disable(struct amdgpu_device *adev)
        /* powerup blocks */
        kv_dpm_powergate_acp(adev, false);
        kv_dpm_powergate_samu(adev, false);
-       kv_dpm_powergate_vce(adev, false);
-       kv_dpm_powergate_uvd(adev, false);
+       if (pi->caps_vce_pg) /* power on the VCE block */
+               amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
+       if (pi->caps_uvd_pg) /* power on the UVD block */
+               amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_UVDPowerON);
 
        kv_enable_smc_cac(adev, false);
        kv_enable_didt(adev, false);
@@ -1551,7 +1551,6 @@ static int kv_update_vce_dpm(struct amdgpu_device *adev,
        int ret;
 
        if (amdgpu_new_state->evclk > 0 && amdgpu_current_state->evclk == 0) {
-               kv_dpm_powergate_vce(adev, false);
                if (pi->caps_stable_p_state)
                        pi->vce_boot_level = table->count - 1;
                else
@@ -1573,7 +1572,6 @@ static int kv_update_vce_dpm(struct amdgpu_device *adev,
                kv_enable_vce_dpm(adev, true);
        } else if (amdgpu_new_state->evclk == 0 && amdgpu_current_state->evclk > 0) {
                kv_enable_vce_dpm(adev, false);
-               kv_dpm_powergate_vce(adev, true);
        }
 
        return 0;
@@ -1702,24 +1700,32 @@ static void kv_dpm_powergate_uvd(void *handle, bool gate)
        }
 }
 
-static void kv_dpm_powergate_vce(struct amdgpu_device *adev, bool gate)
+static void kv_dpm_powergate_vce(void *handle, bool gate)
 {
+       struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        struct kv_power_info *pi = kv_get_pi(adev);
-
-       if (pi->vce_power_gated == gate)
-               return;
+       int ret;
 
        pi->vce_power_gated = gate;
 
-       if (!pi->caps_vce_pg)
-               return;
-
-       if (gate)
-               amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF);
-       else
-               amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
+       if (gate) {
+               /* stop the VCE block */
+               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+                                                            AMD_PG_STATE_GATE);
+               kv_enable_vce_dpm(adev, false);
+               if (pi->caps_vce_pg) /* power off the VCE block */
+                       amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerOFF);
+       } else {
+               if (pi->caps_vce_pg) /* power on the VCE block */
+                       amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
+               kv_enable_vce_dpm(adev, true);
+               /* re-init the VCE block */
+               ret = amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VCE,
+                                                            AMD_PG_STATE_UNGATE);
+       }
 }
 
+
 static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate)
 {
        struct kv_power_info *pi = kv_get_pi(adev);
@@ -3061,7 +3067,7 @@ static int kv_dpm_hw_init(void *handle)
        else
                adev->pm.dpm_enabled = true;
        mutex_unlock(&adev->pm.mutex);
-
+       amdgpu_pm_compute_clocks(adev);
        return ret;
 }
 
@@ -3313,6 +3319,9 @@ static int kv_set_powergating_by_smu(void *handle,
        case AMD_IP_BLOCK_TYPE_UVD:
                kv_dpm_powergate_uvd(handle, gate);
                break;
+       case AMD_IP_BLOCK_TYPE_VCE:
+               kv_dpm_powergate_vce(handle, gate);
+               break;
        default:
                break;
        }
index db327b4125626d411e155de18bfeb28f4efb92b4..1de96995e6900c934c91cf610160768b6c08cd37 100644 (file)
@@ -6887,7 +6887,6 @@ static int si_dpm_enable(struct amdgpu_device *adev)
 
        si_enable_auto_throttle_source(adev, AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL, true);
        si_thermal_start_thermal_controller(adev);
-       ni_update_current_ps(adev, boot_ps);
 
        return 0;
 }
@@ -7763,7 +7762,7 @@ static int si_dpm_hw_init(void *handle)
        else
                adev->pm.dpm_enabled = true;
        mutex_unlock(&adev->pm.mutex);
-
+       amdgpu_pm_compute_clocks(adev);
        return ret;
 }
 
index fbe878ae1e8c579cc6e2571e30e95400ba477cad..4ba0003a9d329545a59e1b8050bcecf922a5e55d 100644 (file)
@@ -480,12 +480,20 @@ void pp_rv_set_display_requirement(struct pp_smu *pp,
 {
        struct dc_context *ctx = pp->ctx;
        struct amdgpu_device *adev = ctx->driver_context;
+       void *pp_handle = adev->powerplay.pp_handle;
        const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
+       struct pp_display_clock_request clock = {0};
 
-       if (!pp_funcs || !pp_funcs->display_configuration_changed)
+       if (!pp_funcs || !pp_funcs->display_clock_voltage_request)
                return;
 
-       amdgpu_dpm_display_configuration_changed(adev);
+       clock.clock_type = amd_pp_dcf_clock;
+       clock.clock_freq_in_khz = req->hard_min_dcefclk_khz;
+       pp_funcs->display_clock_voltage_request(pp_handle, &clock);
+
+       clock.clock_type = amd_pp_f_clock;
+       clock.clock_freq_in_khz = req->hard_min_fclk_khz;
+       pp_funcs->display_clock_voltage_request(pp_handle, &clock);
 }
 
 void pp_rv_set_wm_ranges(struct pp_smu *pp,
index 567867915d32d84cb6bb68d3e4da33842de9b2e4..37eaf72ace549d6f132b9fc5933da434fc164396 100644 (file)
@@ -754,8 +754,12 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason)
                         * fail-safe mode
                         */
                        if (dc_is_hdmi_signal(link->connector_signal) ||
-                           dc_is_dvi_signal(link->connector_signal))
+                           dc_is_dvi_signal(link->connector_signal)) {
+                               if (prev_sink != NULL)
+                                       dc_sink_release(prev_sink);
+
                                return false;
+                       }
                default:
                        break;
                }
index 11d834f942205f37c10c1a95a345b8908cb3411f..98358b4b36dea7e13177bdf38554ffaad4f994e9 100644 (file)
@@ -199,7 +199,6 @@ vma_create(struct drm_i915_gem_object *obj,
                vma->flags |= I915_VMA_GGTT;
                list_add(&vma->obj_link, &obj->vma_list);
        } else {
-               i915_ppgtt_get(i915_vm_to_ppgtt(vm));
                list_add_tail(&vma->obj_link, &obj->vma_list);
        }
 
@@ -807,9 +806,6 @@ static void __i915_vma_destroy(struct i915_vma *vma)
        if (vma->obj)
                rb_erase(&vma->obj_node, &vma->obj->vma_tree);
 
-       if (!i915_vma_is_ggtt(vma))
-               i915_ppgtt_put(i915_vm_to_ppgtt(vma->vm));
-
        rbtree_postorder_for_each_entry_safe(iter, n, &vma->active, node) {
                GEM_BUG_ON(i915_gem_active_isset(&iter->base));
                kfree(iter);
index b725835b47efc5116b53e3f27eeb6e0fcdbb65b4..769f3f5866611174cbabeca5e4d1fbb0711b9b86 100644 (file)
@@ -962,9 +962,6 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv)
 {
        int ret;
 
-       if (INTEL_INFO(dev_priv)->num_pipes == 0)
-               return;
-
        ret = component_add(dev_priv->drm.dev, &i915_audio_component_bind_ops);
        if (ret < 0) {
                DRM_ERROR("failed to add audio component (%d)\n", ret);
index ed3fa1c8a98342d549ec8bf5b027b3b783affa08..4a3c8ee9a9732cccc4e1ce1cc42197b0c662cc73 100644 (file)
@@ -2988,6 +2988,7 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
        int w = drm_rect_width(&plane_state->base.src) >> 16;
        int h = drm_rect_height(&plane_state->base.src) >> 16;
        int dst_x = plane_state->base.dst.x1;
+       int dst_w = drm_rect_width(&plane_state->base.dst);
        int pipe_src_w = crtc_state->pipe_src_w;
        int max_width = skl_max_plane_width(fb, 0, rotation);
        int max_height = 4096;
@@ -3009,10 +3010,10 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
         * screen may cause FIFO underflow and display corruption.
         */
        if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
-           (dst_x + w < 4 || dst_x > pipe_src_w - 4)) {
+           (dst_x + dst_w < 4 || dst_x > pipe_src_w - 4)) {
                DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n",
-                             dst_x + w < 4 ? "end" : "start",
-                             dst_x + w < 4 ? dst_x + w : dst_x,
+                             dst_x + dst_w < 4 ? "end" : "start",
+                             dst_x + dst_w < 4 ? dst_x + dst_w : dst_x,
                              4, pipe_src_w - 4);
                return -ERANGE;
        }
index a9076402dcb0864ab6b7c6c4ea1d8346c95e949b..192972a7d287e9fd5ff9aeb599d6730007383500 100644 (file)
@@ -943,8 +943,12 @@ static int intel_hdmi_hdcp_write(struct intel_digital_port *intel_dig_port,
 
        ret = i2c_transfer(adapter, &msg, 1);
        if (ret == 1)
-               return 0;
-       return ret >= 0 ? -EIO : ret;
+               ret = 0;
+       else if (ret >= 0)
+               ret = -EIO;
+
+       kfree(write_buf);
+       return ret;
 }
 
 static
index 5dae16ccd9f1015fe80abc2c41d98937f3aaef89..3e085c5f2b81bfa87daf161bd96e3eb01da5d4ac 100644 (file)
@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon,
        DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n",
                      lspcon_mode_name(mode));
 
-       wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100);
+       wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400);
        if (current_mode != mode)
                DRM_ERROR("LSPCON mode hasn't settled\n");
 
index 978782a776292e6d954755cc71786bd98b5d81ac..28d191192945b0690fd76eb9aa97a1bb3637215f 100644 (file)
@@ -132,6 +132,11 @@ static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w,
        writel(0x0, comp->regs + DISP_REG_OVL_RST);
 }
 
+static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
+{
+       return 4;
+}
+
 static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
 {
        unsigned int reg;
@@ -157,6 +162,11 @@ static void mtk_ovl_layer_off(struct mtk_ddp_comp *comp, unsigned int idx)
 
 static unsigned int ovl_fmt_convert(struct mtk_disp_ovl *ovl, unsigned int fmt)
 {
+       /* The return value in switch "MEM_MODE_INPUT_FORMAT_XXX"
+        * is defined in mediatek HW data sheet.
+        * The alphabet order in XXX is no relation to data
+        * arrangement in memory.
+        */
        switch (fmt) {
        default:
        case DRM_FORMAT_RGB565:
@@ -221,6 +231,7 @@ static const struct mtk_ddp_comp_funcs mtk_disp_ovl_funcs = {
        .stop = mtk_ovl_stop,
        .enable_vblank = mtk_ovl_enable_vblank,
        .disable_vblank = mtk_ovl_disable_vblank,
+       .layer_nr = mtk_ovl_layer_nr,
        .layer_on = mtk_ovl_layer_on,
        .layer_off = mtk_ovl_layer_off,
        .layer_config = mtk_ovl_layer_config,
index 585943c81e1f8818de1a6bb481f6adb90c8ad308..b0a5cffe345ab77f90e443ca88bfac52d62804a4 100644 (file)
 #define RDMA_REG_UPDATE_INT                            BIT(0)
 #define DISP_REG_RDMA_GLOBAL_CON               0x0010
 #define RDMA_ENGINE_EN                                 BIT(0)
+#define RDMA_MODE_MEMORY                               BIT(1)
 #define DISP_REG_RDMA_SIZE_CON_0               0x0014
+#define RDMA_MATRIX_ENABLE                             BIT(17)
+#define RDMA_MATRIX_INT_MTX_SEL                                GENMASK(23, 20)
+#define RDMA_MATRIX_INT_MTX_BT601_to_RGB               (6 << 20)
 #define DISP_REG_RDMA_SIZE_CON_1               0x0018
 #define DISP_REG_RDMA_TARGET_LINE              0x001c
+#define DISP_RDMA_MEM_CON                      0x0024
+#define MEM_MODE_INPUT_FORMAT_RGB565                   (0x000 << 4)
+#define MEM_MODE_INPUT_FORMAT_RGB888                   (0x001 << 4)
+#define MEM_MODE_INPUT_FORMAT_RGBA8888                 (0x002 << 4)
+#define MEM_MODE_INPUT_FORMAT_ARGB8888                 (0x003 << 4)
+#define MEM_MODE_INPUT_FORMAT_UYVY                     (0x004 << 4)
+#define MEM_MODE_INPUT_FORMAT_YUYV                     (0x005 << 4)
+#define MEM_MODE_INPUT_SWAP                            BIT(8)
+#define DISP_RDMA_MEM_SRC_PITCH                        0x002c
+#define DISP_RDMA_MEM_GMC_SETTING_0            0x0030
 #define DISP_REG_RDMA_FIFO_CON                 0x0040
 #define RDMA_FIFO_UNDERFLOW_EN                         BIT(31)
 #define RDMA_FIFO_PSEUDO_SIZE(bytes)                   (((bytes) / 16) << 16)
 #define RDMA_OUTPUT_VALID_FIFO_THRESHOLD(bytes)                ((bytes) / 16)
 #define RDMA_FIFO_SIZE(rdma)                   ((rdma)->data->fifo_size)
+#define DISP_RDMA_MEM_START_ADDR               0x0f00
+
+#define RDMA_MEM_GMC                           0x40402020
 
 struct mtk_disp_rdma_data {
        unsigned int fifo_size;
@@ -138,12 +155,87 @@ static void mtk_rdma_config(struct mtk_ddp_comp *comp, unsigned int width,
        writel(reg, comp->regs + DISP_REG_RDMA_FIFO_CON);
 }
 
+static unsigned int rdma_fmt_convert(struct mtk_disp_rdma *rdma,
+                                    unsigned int fmt)
+{
+       /* The return value in switch "MEM_MODE_INPUT_FORMAT_XXX"
+        * is defined in mediatek HW data sheet.
+        * The alphabet order in XXX is no relation to data
+        * arrangement in memory.
+        */
+       switch (fmt) {
+       default:
+       case DRM_FORMAT_RGB565:
+               return MEM_MODE_INPUT_FORMAT_RGB565;
+       case DRM_FORMAT_BGR565:
+               return MEM_MODE_INPUT_FORMAT_RGB565 | MEM_MODE_INPUT_SWAP;
+       case DRM_FORMAT_RGB888:
+               return MEM_MODE_INPUT_FORMAT_RGB888;
+       case DRM_FORMAT_BGR888:
+               return MEM_MODE_INPUT_FORMAT_RGB888 | MEM_MODE_INPUT_SWAP;
+       case DRM_FORMAT_RGBX8888:
+       case DRM_FORMAT_RGBA8888:
+               return MEM_MODE_INPUT_FORMAT_ARGB8888;
+       case DRM_FORMAT_BGRX8888:
+       case DRM_FORMAT_BGRA8888:
+               return MEM_MODE_INPUT_FORMAT_ARGB8888 | MEM_MODE_INPUT_SWAP;
+       case DRM_FORMAT_XRGB8888:
+       case DRM_FORMAT_ARGB8888:
+               return MEM_MODE_INPUT_FORMAT_RGBA8888;
+       case DRM_FORMAT_XBGR8888:
+       case DRM_FORMAT_ABGR8888:
+               return MEM_MODE_INPUT_FORMAT_RGBA8888 | MEM_MODE_INPUT_SWAP;
+       case DRM_FORMAT_UYVY:
+               return MEM_MODE_INPUT_FORMAT_UYVY;
+       case DRM_FORMAT_YUYV:
+               return MEM_MODE_INPUT_FORMAT_YUYV;
+       }
+}
+
+static unsigned int mtk_rdma_layer_nr(struct mtk_ddp_comp *comp)
+{
+       return 1;
+}
+
+static void mtk_rdma_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
+                                 struct mtk_plane_state *state)
+{
+       struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
+       struct mtk_plane_pending_state *pending = &state->pending;
+       unsigned int addr = pending->addr;
+       unsigned int pitch = pending->pitch & 0xffff;
+       unsigned int fmt = pending->format;
+       unsigned int con;
+
+       con = rdma_fmt_convert(rdma, fmt);
+       writel_relaxed(con, comp->regs + DISP_RDMA_MEM_CON);
+
+       if (fmt == DRM_FORMAT_UYVY || fmt == DRM_FORMAT_YUYV) {
+               rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
+                                RDMA_MATRIX_ENABLE, RDMA_MATRIX_ENABLE);
+               rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
+                                RDMA_MATRIX_INT_MTX_SEL,
+                                RDMA_MATRIX_INT_MTX_BT601_to_RGB);
+       } else {
+               rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
+                                RDMA_MATRIX_ENABLE, 0);
+       }
+
+       writel_relaxed(addr, comp->regs + DISP_RDMA_MEM_START_ADDR);
+       writel_relaxed(pitch, comp->regs + DISP_RDMA_MEM_SRC_PITCH);
+       writel(RDMA_MEM_GMC, comp->regs + DISP_RDMA_MEM_GMC_SETTING_0);
+       rdma_update_bits(comp, DISP_REG_RDMA_GLOBAL_CON,
+                        RDMA_MODE_MEMORY, RDMA_MODE_MEMORY);
+}
+
 static const struct mtk_ddp_comp_funcs mtk_disp_rdma_funcs = {
        .config = mtk_rdma_config,
        .start = mtk_rdma_start,
        .stop = mtk_rdma_stop,
        .enable_vblank = mtk_rdma_enable_vblank,
        .disable_vblank = mtk_rdma_disable_vblank,
+       .layer_nr = mtk_rdma_layer_nr,
+       .layer_config = mtk_rdma_layer_config,
 };
 
 static int mtk_disp_rdma_bind(struct device *dev, struct device *master,
index 2d6aa150a9ff08f0c0be658593abe1114d44a514..0b976dfd04df0b0c8b71bb0c6b2c471027a2e552 100644 (file)
@@ -45,7 +45,8 @@ struct mtk_drm_crtc {
        bool                            pending_needs_vblank;
        struct drm_pending_vblank_event *event;
 
-       struct drm_plane                planes[OVL_LAYER_NR];
+       struct drm_plane                *planes;
+       unsigned int                    layer_nr;
        bool                            pending_planes;
 
        void __iomem                    *config_regs;
@@ -171,9 +172,9 @@ static void mtk_drm_crtc_mode_set_nofb(struct drm_crtc *crtc)
 static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
-       struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
+       struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
 
-       mtk_ddp_comp_enable_vblank(ovl, &mtk_crtc->base);
+       mtk_ddp_comp_enable_vblank(comp, &mtk_crtc->base);
 
        return 0;
 }
@@ -181,9 +182,9 @@ static int mtk_drm_crtc_enable_vblank(struct drm_crtc *crtc)
 static void mtk_drm_crtc_disable_vblank(struct drm_crtc *crtc)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
-       struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
+       struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
 
-       mtk_ddp_comp_disable_vblank(ovl);
+       mtk_ddp_comp_disable_vblank(comp);
 }
 
 static 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)
        }
 
        /* Initially configure all planes */
-       for (i = 0; i < OVL_LAYER_NR; i++) {
+       for (i = 0; i < mtk_crtc->layer_nr; i++) {
                struct drm_plane *plane = &mtk_crtc->planes[i];
                struct mtk_plane_state *plane_state;
 
@@ -334,7 +335,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
        struct mtk_crtc_state *state = to_mtk_crtc_state(mtk_crtc->base.state);
-       struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
+       struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
        unsigned int i;
 
        /*
@@ -343,7 +344,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
         * queue update module registers on vblank.
         */
        if (state->pending_config) {
-               mtk_ddp_comp_config(ovl, state->pending_width,
+               mtk_ddp_comp_config(comp, state->pending_width,
                                    state->pending_height,
                                    state->pending_vrefresh, 0);
 
@@ -351,14 +352,14 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
        }
 
        if (mtk_crtc->pending_planes) {
-               for (i = 0; i < OVL_LAYER_NR; i++) {
+               for (i = 0; i < mtk_crtc->layer_nr; i++) {
                        struct drm_plane *plane = &mtk_crtc->planes[i];
                        struct mtk_plane_state *plane_state;
 
                        plane_state = to_mtk_plane_state(plane->state);
 
                        if (plane_state->pending.config) {
-                               mtk_ddp_comp_layer_config(ovl, i, plane_state);
+                               mtk_ddp_comp_layer_config(comp, i, plane_state);
                                plane_state->pending.config = false;
                        }
                }
@@ -370,12 +371,12 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
                                       struct drm_crtc_state *old_state)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
-       struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
+       struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
        int ret;
 
        DRM_DEBUG_DRIVER("%s %d\n", __func__, crtc->base.id);
 
-       ret = mtk_smi_larb_get(ovl->larb_dev);
+       ret = mtk_smi_larb_get(comp->larb_dev);
        if (ret) {
                DRM_ERROR("Failed to get larb: %d\n", ret);
                return;
@@ -383,7 +384,7 @@ static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
 
        ret = mtk_crtc_ddp_hw_init(mtk_crtc);
        if (ret) {
-               mtk_smi_larb_put(ovl->larb_dev);
+               mtk_smi_larb_put(comp->larb_dev);
                return;
        }
 
@@ -395,7 +396,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
                                        struct drm_crtc_state *old_state)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
-       struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
+       struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
        int i;
 
        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,
                return;
 
        /* Set all pending plane state to disabled */
-       for (i = 0; i < OVL_LAYER_NR; i++) {
+       for (i = 0; i < mtk_crtc->layer_nr; i++) {
                struct drm_plane *plane = &mtk_crtc->planes[i];
                struct mtk_plane_state *plane_state;
 
@@ -418,7 +419,7 @@ static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
 
        drm_crtc_vblank_off(crtc);
        mtk_crtc_ddp_hw_fini(mtk_crtc);
-       mtk_smi_larb_put(ovl->larb_dev);
+       mtk_smi_larb_put(comp->larb_dev);
 
        mtk_crtc->enabled = false;
 }
@@ -450,7 +451,7 @@ static void mtk_drm_crtc_atomic_flush(struct drm_crtc *crtc,
 
        if (mtk_crtc->event)
                mtk_crtc->pending_needs_vblank = true;
-       for (i = 0; i < OVL_LAYER_NR; i++) {
+       for (i = 0; i < mtk_crtc->layer_nr; i++) {
                struct drm_plane *plane = &mtk_crtc->planes[i];
                struct mtk_plane_state *plane_state;
 
@@ -516,7 +517,7 @@ static int mtk_drm_crtc_init(struct drm_device *drm,
        return ret;
 }
 
-void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *ovl)
+void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *comp)
 {
        struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
        struct mtk_drm_private *priv = crtc->dev->dev_private;
@@ -598,7 +599,12 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
                mtk_crtc->ddp_comp[i] = comp;
        }
 
-       for (zpos = 0; zpos < OVL_LAYER_NR; zpos++) {
+       mtk_crtc->layer_nr = mtk_ddp_comp_layer_nr(mtk_crtc->ddp_comp[0]);
+       mtk_crtc->planes = devm_kzalloc(dev, mtk_crtc->layer_nr *
+                                       sizeof(struct drm_plane),
+                                       GFP_KERNEL);
+
+       for (zpos = 0; zpos < mtk_crtc->layer_nr; zpos++) {
                type = (zpos == 0) ? DRM_PLANE_TYPE_PRIMARY :
                                (zpos == 1) ? DRM_PLANE_TYPE_CURSOR :
                                                DRM_PLANE_TYPE_OVERLAY;
@@ -609,7 +615,8 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev,
        }
 
        ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0],
-                               &mtk_crtc->planes[1], pipe);
+                               mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] :
+                               NULL, pipe);
        if (ret < 0)
                goto unprepare;
        drm_mode_crtc_set_gamma_size(&mtk_crtc->base, MTK_LUT_SIZE);
index 9d9410c67ae9eb2026181b4a361e5c4e5707028d..091adb2087ebad132742195a4490e09efae4f427 100644 (file)
 #include "mtk_drm_ddp_comp.h"
 #include "mtk_drm_plane.h"
 
-#define OVL_LAYER_NR   4
 #define MTK_LUT_SIZE   512
 #define MTK_MAX_BPC    10
 #define MTK_MIN_BPC    3
 
 void mtk_drm_crtc_commit(struct drm_crtc *crtc);
-void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *ovl);
+void mtk_crtc_ddp_irq(struct drm_crtc *crtc, struct mtk_ddp_comp *comp);
 int mtk_drm_crtc_create(struct drm_device *drm_dev,
                        const enum mtk_ddp_comp_id *path,
                        unsigned int path_len);
index 87e4191c250ebea7f3f0acb3ca23d3fcb9a9639c..546b3e3b300ba8c6b8a4dc67bfe8c400d5b48de9 100644 (file)
 #define OVL1_MOUT_EN_COLOR1            0x1
 #define GAMMA_MOUT_EN_RDMA1            0x1
 #define RDMA0_SOUT_DPI0                        0x2
+#define RDMA0_SOUT_DPI1                        0x3
+#define RDMA0_SOUT_DSI1                        0x1
 #define RDMA0_SOUT_DSI2                        0x4
 #define RDMA0_SOUT_DSI3                        0x5
 #define RDMA1_SOUT_DPI0                        0x2
 #define DPI0_SEL_IN_RDMA2              0x3
 #define DPI1_SEL_IN_RDMA1              (0x1 << 8)
 #define DPI1_SEL_IN_RDMA2              (0x3 << 8)
+#define DSI0_SEL_IN_RDMA1              0x1
+#define DSI0_SEL_IN_RDMA2              0x4
 #define DSI1_SEL_IN_RDMA1              0x1
 #define DSI1_SEL_IN_RDMA2              0x4
 #define DSI2_SEL_IN_RDMA1              (0x1 << 16)
@@ -224,6 +228,12 @@ static unsigned int mtk_ddp_mout_en(enum mtk_ddp_comp_id cur,
        } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI0) {
                *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
                value = RDMA0_SOUT_DPI0;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DPI1;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DSI1;
        } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) {
                *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
                value = RDMA0_SOUT_DSI2;
@@ -282,6 +292,9 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur,
        } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI1) {
                *addr = DISP_REG_CONFIG_DPI_SEL_IN;
                value = DPI1_SEL_IN_RDMA1;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI0) {
+               *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
+               value = DSI0_SEL_IN_RDMA1;
        } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI1) {
                *addr = DISP_REG_CONFIG_DSIO_SEL_IN;
                value = DSI1_SEL_IN_RDMA1;
@@ -297,8 +310,11 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur,
        } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI1) {
                *addr = DISP_REG_CONFIG_DPI_SEL_IN;
                value = DPI1_SEL_IN_RDMA2;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) {
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI0) {
                *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
+               value = DSI0_SEL_IN_RDMA2;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) {
+               *addr = DISP_REG_CONFIG_DSIO_SEL_IN;
                value = DSI1_SEL_IN_RDMA2;
        } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI2) {
                *addr = DISP_REG_CONFIG_DSIE_SEL_IN;
index 7413ffeb3c9d8bee1ca6bb825eb7a54391c7d013..8399229e6ad2661b77a52a5d9f30eb7502ee2879 100644 (file)
@@ -78,6 +78,7 @@ struct mtk_ddp_comp_funcs {
        void (*stop)(struct mtk_ddp_comp *comp);
        void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc);
        void (*disable_vblank)(struct mtk_ddp_comp *comp);
+       unsigned int (*layer_nr)(struct mtk_ddp_comp *comp);
        void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx);
        void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx);
        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)
                comp->funcs->disable_vblank(comp);
 }
 
+static inline unsigned int mtk_ddp_comp_layer_nr(struct mtk_ddp_comp *comp)
+{
+       if (comp->funcs && comp->funcs->layer_nr)
+               return comp->funcs->layer_nr(comp);
+
+       return 0;
+}
+
 static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp,
                                         unsigned int idx)
 {
index 39721119713bc29d6cba63e2947d6be1ddc439cd..47ec604289b712148fdfa740a2d6c64ca4d0810f 100644 (file)
@@ -381,7 +381,7 @@ static int mtk_drm_bind(struct device *dev)
 err_deinit:
        mtk_drm_kms_deinit(drm);
 err_free:
-       drm_dev_unref(drm);
+       drm_dev_put(drm);
        return ret;
 }
 
@@ -390,7 +390,7 @@ static void mtk_drm_unbind(struct device *dev)
        struct mtk_drm_private *private = dev_get_drvdata(dev);
 
        drm_dev_unregister(private->drm);
-       drm_dev_unref(private->drm);
+       drm_dev_put(private->drm);
        private->drm = NULL;
 }
 
@@ -564,7 +564,7 @@ static int mtk_drm_remove(struct platform_device *pdev)
 
        drm_dev_unregister(drm);
        mtk_drm_kms_deinit(drm);
-       drm_dev_unref(drm);
+       drm_dev_put(drm);
 
        component_master_del(&pdev->dev, &mtk_drm_ops);
        pm_runtime_disable(&pdev->dev);
@@ -580,29 +580,24 @@ static int mtk_drm_sys_suspend(struct device *dev)
 {
        struct mtk_drm_private *private = dev_get_drvdata(dev);
        struct drm_device *drm = private->drm;
+       int ret;
 
-       drm_kms_helper_poll_disable(drm);
-
-       private->suspend_state = drm_atomic_helper_suspend(drm);
-       if (IS_ERR(private->suspend_state)) {
-               drm_kms_helper_poll_enable(drm);
-               return PTR_ERR(private->suspend_state);
-       }
-
+       ret = drm_mode_config_helper_suspend(drm);
        DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n");
-       return 0;
+
+       return ret;
 }
 
 static int mtk_drm_sys_resume(struct device *dev)
 {
        struct mtk_drm_private *private = dev_get_drvdata(dev);
        struct drm_device *drm = private->drm;
+       int ret;
 
-       drm_atomic_helper_resume(drm, private->suspend_state);
-       drm_kms_helper_poll_enable(drm);
-
+       ret = drm_mode_config_helper_resume(drm);
        DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n");
-       return 0;
+
+       return ret;
 }
 #endif
 
index 90837f7c7d0f3203ee64de86dcccd8a1e7cc26ad..f4c7516eb9891fa923a2a736bfcc45ef9b84a6b9 100644 (file)
@@ -302,14 +302,18 @@ static inline u16 volt2reg(int channel, long volt, u8 bypass_attn)
        return clamp_val(reg, 0, 1023) & (0xff << 2);
 }
 
-static u16 adt7475_read_word(struct i2c_client *client, int reg)
+static int adt7475_read_word(struct i2c_client *client, int reg)
 {
-       u16 val;
+       int val1, val2;
 
-       val = i2c_smbus_read_byte_data(client, reg);
-       val |= (i2c_smbus_read_byte_data(client, reg + 1) << 8);
+       val1 = i2c_smbus_read_byte_data(client, reg);
+       if (val1 < 0)
+               return val1;
+       val2 = i2c_smbus_read_byte_data(client, reg + 1);
+       if (val2 < 0)
+               return val2;
 
-       return val;
+       return val1 | (val2 << 8);
 }
 
 static 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,
 {
        struct adt7475_data *data = adt7475_update_device(dev);
        struct sensor_device_attribute_2 *sattr = to_sensor_dev_attr_2(attr);
-       int i = clamp_val(data->range[sattr->index] & 0xf, 0,
-                         ARRAY_SIZE(pwmfreq_table) - 1);
+       int idx;
 
        if (IS_ERR(data))
                return PTR_ERR(data);
+       idx = clamp_val(data->range[sattr->index] & 0xf, 0,
+                       ARRAY_SIZE(pwmfreq_table) - 1);
 
-       return sprintf(buf, "%d\n", pwmfreq_table[i]);
+       return sprintf(buf, "%d\n", pwmfreq_table[idx]);
 }
 
 static 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,
                                        char *buf)
 {
        struct adt7475_data *data = adt7475_update_device(dev);
+
+       if (IS_ERR(data))
+               return PTR_ERR(data);
+
        return sprintf(buf, "%d\n", !!(data->config4 & CONFIG4_MAXDUTY));
 }
 
index e9e6aeabbf842ffd941e0476a185884adac85147..71d3445ba869c85654ae3dcaf3a5460e8fadb268 100644 (file)
@@ -17,7 +17,7 @@
  * Bi-directional Current/Power Monitor with I2C Interface
  * Datasheet: http://www.ti.com/product/ina230
  *
- * Copyright (C) 2012 Lothar Felten <l-felten@ti.com>
+ * Copyright (C) 2012 Lothar Felten <lothar.felten@gmail.com>
  * Thanks to Jan Volkering
  *
  * 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)
        return 0;
 }
 
+static ssize_t ina2xx_show_shunt(struct device *dev,
+                             struct device_attribute *da,
+                             char *buf)
+{
+       struct ina2xx_data *data = dev_get_drvdata(dev);
+
+       return snprintf(buf, PAGE_SIZE, "%li\n", data->rshunt);
+}
+
 static ssize_t ina2xx_store_shunt(struct device *dev,
                                  struct device_attribute *da,
                                  const char *buf, size_t count)
@@ -403,7 +412,7 @@ static SENSOR_DEVICE_ATTR(power1_input, S_IRUGO, ina2xx_show_value, NULL,
 
 /* shunt resistance */
 static SENSOR_DEVICE_ATTR(shunt_resistor, S_IRUGO | S_IWUSR,
-                         ina2xx_show_value, ina2xx_store_shunt,
+                         ina2xx_show_shunt, ina2xx_store_shunt,
                          INA2XX_CALIBRATION);
 
 /* update interval (ina226 only) */
index c6bd61e4695abc01a7ed909f1d27f6944c45e246..944f5b63aecd706228ebcd3a128e3ec488bf63ba 100644 (file)
@@ -63,6 +63,7 @@
 #include <linux/bitops.h>
 #include <linux/dmi.h>
 #include <linux/io.h>
+#include <linux/nospec.h>
 #include "lm75.h"
 
 #define USE_ALTERNATE
@@ -2689,6 +2690,7 @@ store_pwm_weight_temp_sel(struct device *dev, struct device_attribute *attr,
                return err;
        if (val > NUM_TEMP)
                return -EINVAL;
+       val = array_index_nospec(val, NUM_TEMP + 1);
        if (val && (!(data->have_temp & BIT(val - 1)) ||
                    !data->temp_src[val - 1]))
                return -EINVAL;
index 6ec65adaba49569ab7b9775f856859a0fcfbd967..c33dcfb87993b531d40c0f2cdb4954b08f47668a 100644 (file)
@@ -110,8 +110,8 @@ static int sclhi(struct i2c_algo_bit_data *adap)
        }
 #ifdef DEBUG
        if (jiffies != start && i2c_debug >= 3)
-               pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go "
-                        "high\n", jiffies - start);
+               pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go high\n",
+                        jiffies - start);
 #endif
 
 done:
@@ -171,8 +171,9 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
                setsda(adap, sb);
                udelay((adap->udelay + 1) / 2);
                if (sclhi(adap) < 0) { /* timed out */
-                       bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, "
-                               "timeout at bit #%d\n", (int)c, i);
+                       bit_dbg(1, &i2c_adap->dev,
+                               "i2c_outb: 0x%02x, timeout at bit #%d\n",
+                               (int)c, i);
                        return -ETIMEDOUT;
                }
                /* FIXME do arbitration here:
@@ -185,8 +186,8 @@ static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
        }
        sdahi(adap);
        if (sclhi(adap) < 0) { /* timeout */
-               bit_dbg(1, &i2c_adap->dev, "i2c_outb: 0x%02x, "
-                       "timeout at ack\n", (int)c);
+               bit_dbg(1, &i2c_adap->dev,
+                       "i2c_outb: 0x%02x, timeout at ack\n", (int)c);
                return -ETIMEDOUT;
        }
 
@@ -215,8 +216,9 @@ static int i2c_inb(struct i2c_adapter *i2c_adap)
        sdahi(adap);
        for (i = 0; i < 8; i++) {
                if (sclhi(adap) < 0) { /* timeout */
-                       bit_dbg(1, &i2c_adap->dev, "i2c_inb: timeout at bit "
-                               "#%d\n", 7 - i);
+                       bit_dbg(1, &i2c_adap->dev,
+                               "i2c_inb: timeout at bit #%d\n",
+                               7 - i);
                        return -ETIMEDOUT;
                }
                indata *= 2;
@@ -265,8 +267,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
                goto bailout;
        }
        if (!scl) {
-               printk(KERN_WARNING "%s: SCL unexpected low "
-                      "while pulling SDA low!\n", name);
+               printk(KERN_WARNING
+                      "%s: SCL unexpected low while pulling SDA low!\n",
+                      name);
                goto bailout;
        }
 
@@ -278,8 +281,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
                goto bailout;
        }
        if (!scl) {
-               printk(KERN_WARNING "%s: SCL unexpected low "
-                      "while pulling SDA high!\n", name);
+               printk(KERN_WARNING
+                      "%s: SCL unexpected low while pulling SDA high!\n",
+                      name);
                goto bailout;
        }
 
@@ -291,8 +295,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
                goto bailout;
        }
        if (!sda) {
-               printk(KERN_WARNING "%s: SDA unexpected low "
-                      "while pulling SCL low!\n", name);
+               printk(KERN_WARNING
+                      "%s: SDA unexpected low while pulling SCL low!\n",
+                      name);
                goto bailout;
        }
 
@@ -304,8 +309,9 @@ static int test_bus(struct i2c_adapter *i2c_adap)
                goto bailout;
        }
        if (!sda) {
-               printk(KERN_WARNING "%s: SDA unexpected low "
-                      "while pulling SCL high!\n", name);
+               printk(KERN_WARNING
+                      "%s: SDA unexpected low while pulling SCL high!\n",
+                      name);
                goto bailout;
        }
 
@@ -352,8 +358,8 @@ static int try_address(struct i2c_adapter *i2c_adap,
                i2c_start(adap);
        }
        if (i && ret)
-               bit_dbg(1, &i2c_adap->dev, "Used %d tries to %s client at "
-                       "0x%02x: %s\n", i + 1,
+               bit_dbg(1, &i2c_adap->dev,
+                       "Used %d tries to %s client at 0x%02x: %s\n", i + 1,
                        addr & 1 ? "read from" : "write to", addr >> 1,
                        ret == 1 ? "success" : "failed, timeout?");
        return ret;
@@ -442,8 +448,9 @@ static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
                        if (inval <= 0 || inval > I2C_SMBUS_BLOCK_MAX) {
                                if (!(flags & I2C_M_NO_RD_ACK))
                                        acknak(i2c_adap, 0);
-                               dev_err(&i2c_adap->dev, "readbytes: invalid "
-                                       "block length (%d)\n", inval);
+                               dev_err(&i2c_adap->dev,
+                                       "readbytes: invalid block length (%d)\n",
+                                       inval);
                                return -EPROTO;
                        }
                        /* 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)
                        return -ENXIO;
                }
                if (flags & I2C_M_RD) {
-                       bit_dbg(3, &i2c_adap->dev, "emitting repeated "
-                               "start condition\n");
+                       bit_dbg(3, &i2c_adap->dev,
+                               "emitting repeated start condition\n");
                        i2c_repstart(adap);
                        /* okay, now switch into reading mode */
                        addr |= 0x01;
@@ -564,8 +571,8 @@ static int bit_xfer(struct i2c_adapter *i2c_adap,
                        }
                        ret = bit_doAddress(i2c_adap, pmsg);
                        if ((ret != 0) && !nak_ok) {
-                               bit_dbg(1, &i2c_adap->dev, "NAK from "
-                                       "device addr 0x%02x msg #%d\n",
+                               bit_dbg(1, &i2c_adap->dev,
+                                       "NAK from device addr 0x%02x msg #%d\n",
                                        msgs[i].addr, i);
                                goto bailout;
                        }
index e18442b9973ae69d27e193478b9b6a9777d6a10b..94d94b4a9a0d989d932101422eb87feeb9cf7525 100644 (file)
@@ -708,7 +708,6 @@ int i2c_dw_probe(struct dw_i2c_dev *dev)
        i2c_set_adapdata(adap, dev);
 
        if (dev->pm_disabled) {
-               dev_pm_syscore_device(dev->dev, true);
                irq_flags = IRQF_NO_SUSPEND;
        } else {
                irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND;
index 1a8d2da5b000988c82f8f084f90f9576e7e758d8..b5750fd851251e74b0558576774da4a82d81c757 100644 (file)
@@ -434,6 +434,9 @@ static int dw_i2c_plat_suspend(struct device *dev)
 {
        struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
 
+       if (i_dev->pm_disabled)
+               return 0;
+
        i_dev->disable(i_dev);
        i2c_dw_prepare_clk(i_dev, false);
 
@@ -444,7 +447,9 @@ static int dw_i2c_plat_resume(struct device *dev)
 {
        struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
 
-       i2c_dw_prepare_clk(i_dev, true);
+       if (!i_dev->pm_disabled)
+               i2c_dw_prepare_clk(i_dev, true);
+
        i_dev->init(i_dev);
 
        return 0;
index 941c223f64914450fc2e2d76a293cd6202441b0b..04b60a349d7ed6edf44e8f75dd524969a30cf853 100644 (file)
@@ -1415,6 +1415,13 @@ static void i801_add_tco(struct i801_priv *priv)
 }
 
 #ifdef CONFIG_ACPI
+static bool i801_acpi_is_smbus_ioport(const struct i801_priv *priv,
+                                     acpi_physical_address address)
+{
+       return address >= priv->smba &&
+              address <= pci_resource_end(priv->pci_dev, SMBBAR);
+}
+
 static acpi_status
 i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits,
                     u64 *value, void *handler_context, void *region_context)
@@ -1430,7 +1437,7 @@ i801_acpi_io_handler(u32 function, acpi_physical_address address, u32 bits,
         */
        mutex_lock(&priv->acpi_lock);
 
-       if (!priv->acpi_reserved) {
+       if (!priv->acpi_reserved && i801_acpi_is_smbus_ioport(priv, address)) {
                priv->acpi_reserved = true;
 
                dev_warn(&pdev->dev, "BIOS is accessing SMBus registers\n");
index 439e8778f849852f1a38cbf274502c4710e0065e..818cab14e87c5ea47e5c6daaa7b76c818465df52 100644 (file)
@@ -507,8 +507,6 @@ static void sh_mobile_i2c_dma_callback(void *data)
        pd->pos = pd->msg->len;
        pd->stop_after_dma = true;
 
-       i2c_release_dma_safe_msg_buf(pd->msg, pd->dma_buf);
-
        iic_set_clr(pd, ICIC, 0, ICIC_TDMAE | ICIC_RDMAE);
 }
 
@@ -602,8 +600,8 @@ static void sh_mobile_i2c_xfer_dma(struct sh_mobile_i2c_data *pd)
        dma_async_issue_pending(chan);
 }
 
-static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
-                   bool do_init)
+static void start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
+                    bool do_init)
 {
        if (do_init) {
                /* Initialize channel registers */
@@ -627,7 +625,6 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
 
        /* Enable all interrupts to begin with */
        iic_wr(pd, ICIC, ICIC_DTEE | ICIC_WAITE | ICIC_ALE | ICIC_TACKE);
-       return 0;
 }
 
 static int poll_dte(struct sh_mobile_i2c_data *pd)
@@ -698,9 +695,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
                pd->send_stop = i == num - 1 || msg->flags & I2C_M_STOP;
                pd->stop_after_dma = false;
 
-               err = start_ch(pd, msg, do_start);
-               if (err)
-                       break;
+               start_ch(pd, msg, do_start);
 
                if (do_start)
                        i2c_op(pd, OP_START, 0);
@@ -709,6 +704,10 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
                timeout = wait_event_timeout(pd->wait,
                                       pd->sr & (ICSR_TACK | SW_DONE),
                                       adapter->timeout);
+
+               /* 'stop_after_dma' tells if DMA transfer was complete */
+               i2c_put_dma_safe_msg_buf(pd->dma_buf, pd->msg, pd->stop_after_dma);
+
                if (!timeout) {
                        dev_err(pd->dev, "Transfer request timed out\n");
                        if (pd->dma_direction != DMA_NONE)
index f15737763608b0d6c0473fc11f29991f7bfc692a..9ee9a15e71347629d024709a17b9a6bb04fca8aa 100644 (file)
@@ -2293,21 +2293,22 @@ u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold)
 EXPORT_SYMBOL_GPL(i2c_get_dma_safe_msg_buf);
 
 /**
- * i2c_release_dma_safe_msg_buf - release DMA safe buffer and sync with i2c_msg
- * @msg: the message to be synced with
+ * i2c_put_dma_safe_msg_buf - release DMA safe buffer and sync with i2c_msg
  * @buf: the buffer obtained from i2c_get_dma_safe_msg_buf(). May be NULL.
+ * @msg: the message which the buffer corresponds to
+ * @xferred: bool saying if the message was transferred
  */
-void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf)
+void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred)
 {
        if (!buf || buf == msg->buf)
                return;
 
-       if (msg->flags & I2C_M_RD)
+       if (xferred && msg->flags & I2C_M_RD)
                memcpy(msg->buf, buf, msg->len);
 
        kfree(buf);
 }
-EXPORT_SYMBOL_GPL(i2c_release_dma_safe_msg_buf);
+EXPORT_SYMBOL_GPL(i2c_put_dma_safe_msg_buf);
 
 MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
 MODULE_DESCRIPTION("I2C-Bus main module");
index 648eb6743ed58890f356212ed60a81ca5e6dd43c..6edffeed99534935f320b5b3d6e941dad15a968d 100644 (file)
@@ -238,10 +238,6 @@ static void mmc_mq_exit_request(struct blk_mq_tag_set *set, struct request *req,
        mmc_exit_request(mq->queue, req);
 }
 
-/*
- * We use BLK_MQ_F_BLOCKING and have only 1 hardware queue, which means requests
- * will not be dispatched in parallel.
- */
 static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
                                    const struct blk_mq_queue_data *bd)
 {
@@ -264,7 +260,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
 
        spin_lock_irq(q->queue_lock);
 
-       if (mq->recovery_needed) {
+       if (mq->recovery_needed || mq->busy) {
                spin_unlock_irq(q->queue_lock);
                return BLK_STS_RESOURCE;
        }
@@ -291,6 +287,9 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
                break;
        }
 
+       /* Parallel dispatch of requests is not supported at the moment */
+       mq->busy = true;
+
        mq->in_flight[issue_type] += 1;
        get_card = (mmc_tot_in_flight(mq) == 1);
        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,
                mq->in_flight[issue_type] -= 1;
                if (mmc_tot_in_flight(mq) == 0)
                        put_card = true;
+               mq->busy = false;
                spin_unlock_irq(q->queue_lock);
                if (put_card)
                        mmc_put_card(card, &mq->ctx);
+       } else {
+               WRITE_ONCE(mq->busy, false);
        }
 
        return ret;
index 17e59d50b4960298630404e7dbe4a687eb8e9a19..9bf3c924507552caf0bf50a3118944e0390bc044 100644 (file)
@@ -81,6 +81,7 @@ struct mmc_queue {
        unsigned int            cqe_busy;
 #define MMC_CQE_DCMD_BUSY      BIT(0)
 #define MMC_CQE_QUEUE_FULL     BIT(1)
+       bool                    busy;
        bool                    use_cqe;
        bool                    recovery_needed;
        bool                    in_recovery;
index 294de177632c6e25a2024d42f8fbdd926043a80f..61e4e2a213c9637f73faeda61dc585c7922faab8 100644 (file)
@@ -217,7 +217,7 @@ static void goldfish_mmc_xfer_done(struct goldfish_mmc_host *host,
                         * We don't really have DMA, so we need
                         * to copy from our platform driver buffer
                         */
-                       sg_copy_to_buffer(data->sg, 1, host->virt_base,
+                       sg_copy_from_buffer(data->sg, 1, host->virt_base,
                                        data->sg->length);
                }
                host->data->bytes_xfered += data->sg->length;
@@ -393,7 +393,7 @@ static void goldfish_mmc_prepare_data(struct goldfish_mmc_host *host,
                 * We don't really have DMA, so we need to copy to our
                 * platform driver buffer
                 */
-               sg_copy_from_buffer(data->sg, 1, host->virt_base,
+               sg_copy_to_buffer(data->sg, 1, host->virt_base,
                                data->sg->length);
        }
 }
index 5aa2c9404e926db1af2e17452a64cf5a08e4156b..be53044086c76f7291224c33ed10c734ece7e897 100644 (file)
@@ -1976,7 +1976,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
        do {
                value = atmci_readl(host, ATMCI_RDR);
                if (likely(offset + 4 <= sg->length)) {
-                       sg_pcopy_to_buffer(sg, 1, &value, sizeof(u32), offset);
+                       sg_pcopy_from_buffer(sg, 1, &value, sizeof(u32), offset);
 
                        offset += 4;
                        nbytes += 4;
@@ -1993,7 +1993,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
                } else {
                        unsigned int remaining = sg->length - offset;
 
-                       sg_pcopy_to_buffer(sg, 1, &value, remaining, offset);
+                       sg_pcopy_from_buffer(sg, 1, &value, remaining, offset);
                        nbytes += remaining;
 
                        flush_dcache_page(sg_page(sg));
@@ -2003,7 +2003,7 @@ static void atmci_read_data_pio(struct atmel_mci *host)
                                goto done;
 
                        offset = 4 - remaining;
-                       sg_pcopy_to_buffer(sg, 1, (u8 *)&value + remaining,
+                       sg_pcopy_from_buffer(sg, 1, (u8 *)&value + remaining,
                                        offset, 0);
                        nbytes += offset;
                }
@@ -2042,7 +2042,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
 
        do {
                if (likely(offset + 4 <= sg->length)) {
-                       sg_pcopy_from_buffer(sg, 1, &value, sizeof(u32), offset);
+                       sg_pcopy_to_buffer(sg, 1, &value, sizeof(u32), offset);
                        atmci_writel(host, ATMCI_TDR, value);
 
                        offset += 4;
@@ -2059,7 +2059,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
                        unsigned int remaining = sg->length - offset;
 
                        value = 0;
-                       sg_pcopy_from_buffer(sg, 1, &value, remaining, offset);
+                       sg_pcopy_to_buffer(sg, 1, &value, remaining, offset);
                        nbytes += remaining;
 
                        host->sg = sg = sg_next(sg);
@@ -2070,7 +2070,7 @@ static void atmci_write_data_pio(struct atmel_mci *host)
                        }
 
                        offset = 4 - remaining;
-                       sg_pcopy_from_buffer(sg, 1, (u8 *)&value + remaining,
+                       sg_pcopy_to_buffer(sg, 1, (u8 *)&value + remaining,
                                        offset, 0);
                        atmci_writel(host, ATMCI_TDR, value);
                        nbytes += offset;
index 35cc0de6be67a5159a572612ab028ae43d1a84bc..ca0b43973769c9f80b4771914b5b74016b54bf84 100644 (file)
 /* DM_CM_RST */
 #define RST_DTRANRST1          BIT(9)
 #define RST_DTRANRST0          BIT(8)
-#define RST_RESERVED_BITS      GENMASK_ULL(32, 0)
+#define RST_RESERVED_BITS      GENMASK_ULL(31, 0)
 
 /* DM_CM_INFO1 and DM_CM_INFO1_MASK */
 #define INFO1_CLEAR            0
+#define INFO1_MASK_CLEAR       GENMASK_ULL(31, 0)
 #define INFO1_DTRANEND1                BIT(17)
 #define INFO1_DTRANEND0                BIT(16)
 
 /* DM_CM_INFO2 and DM_CM_INFO2_MASK */
+#define INFO2_MASK_CLEAR       GENMASK_ULL(31, 0)
 #define INFO2_DTRANERR1                BIT(17)
 #define INFO2_DTRANERR0                BIT(16)
 
@@ -252,6 +254,12 @@ renesas_sdhi_internal_dmac_request_dma(struct tmio_mmc_host *host,
 {
        struct renesas_sdhi *priv = host_to_priv(host);
 
+       /* Disable DMAC interrupts, we don't use them */
+       renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO1_MASK,
+                                           INFO1_MASK_CLEAR);
+       renesas_sdhi_internal_dmac_dm_write(host, DM_CM_INFO2_MASK,
+                                           INFO2_MASK_CLEAR);
+
        /* Each value is set to non-zero to assume "enabling" each DMA */
        host->chan_rx = host->chan_tx = (void *)0xdeadbeaf;
 
index ca18612c42014288d48c9ac8180a4b5be88e9a06..67b2065e7a19cace554463a74871ab676c221906 100644 (file)
@@ -1338,6 +1338,11 @@ int denali_init(struct denali_nand_info *denali)
 
        denali_enable_irq(denali);
        denali_reset_banks(denali);
+       if (!denali->max_banks) {
+               /* Error out earlier if no chip is found for some reasons. */
+               ret = -ENODEV;
+               goto disable_irq;
+       }
 
        denali->active_bank = DENALI_INVALID_BANK;
 
index a3f04315c05c54e6332a269603184cac0fc89dd4..427fcbc1b71c0551a107b0d8734bdec808a792c4 100644 (file)
@@ -1218,7 +1218,7 @@ static int docg4_resume(struct platform_device *pdev)
        return 0;
 }
 
-static void __init init_mtd_structs(struct mtd_info *mtd)
+static void init_mtd_structs(struct mtd_info *mtd)
 {
        /* initialize mtd and nand data structures */
 
@@ -1290,7 +1290,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
 
 }
 
-static int __init read_id_reg(struct mtd_info *mtd)
+static int read_id_reg(struct mtd_info *mtd)
 {
        struct nand_chip *nand = mtd_to_nand(mtd);
        struct docg4_priv *doc = nand_get_controller_data(nand);
index 139d96c5a02355f557d586f5edcab1712c048036..092c817f8f11cdda48fe8233fb04b7de2a76586a 100644 (file)
@@ -110,16 +110,14 @@ static int bnxt_tc_parse_actions(struct bnxt *bp,
                                 struct tcf_exts *tc_exts)
 {
        const struct tc_action *tc_act;
-       LIST_HEAD(tc_actions);
-       int rc;
+       int i, rc;
 
        if (!tcf_exts_has_actions(tc_exts)) {
                netdev_info(bp->dev, "no actions");
                return -EINVAL;
        }
 
-       tcf_exts_to_list(tc_exts, &tc_actions);
-       list_for_each_entry(tc_act, &tc_actions, list) {
+       tcf_exts_for_each_action(i, tc_act, tc_exts) {
                /* Drop action */
                if (is_tcf_gact_shot(tc_act)) {
                        actions->flags |= BNXT_TC_ACTION_FLAG_DROP;
index dc09f9a8a49bb160e29a829cfaa740a36fde2223..c6707ea2d75198c1157c5e675975d9319e150a9a 100644 (file)
@@ -482,11 +482,6 @@ static int macb_mii_probe(struct net_device *dev)
 
        if (np) {
                if (of_phy_is_fixed_link(np)) {
-                       if (of_phy_register_fixed_link(np) < 0) {
-                               dev_err(&bp->pdev->dev,
-                                       "broken fixed-link specification\n");
-                               return -ENODEV;
-                       }
                        bp->phy_node = of_node_get(np);
                } else {
                        bp->phy_node = of_parse_phandle(np, "phy-handle", 0);
@@ -569,7 +564,7 @@ static int macb_mii_init(struct macb *bp)
 {
        struct macb_platform_data *pdata;
        struct device_node *np;
-       int err;
+       int err = -ENXIO;
 
        /* Enable management port */
        macb_writel(bp, NCR, MACB_BIT(MPE));
@@ -592,12 +587,23 @@ static int macb_mii_init(struct macb *bp)
        dev_set_drvdata(&bp->dev->dev, bp->mii_bus);
 
        np = bp->pdev->dev.of_node;
-       if (pdata)
-               bp->mii_bus->phy_mask = pdata->phy_mask;
+       if (np && of_phy_is_fixed_link(np)) {
+               if (of_phy_register_fixed_link(np) < 0) {
+                       dev_err(&bp->pdev->dev,
+                               "broken fixed-link specification %pOF\n", np);
+                       goto err_out_free_mdiobus;
+               }
+
+               err = mdiobus_register(bp->mii_bus);
+       } else {
+               if (pdata)
+                       bp->mii_bus->phy_mask = pdata->phy_mask;
+
+               err = of_mdiobus_register(bp->mii_bus, np);
+       }
 
-       err = of_mdiobus_register(bp->mii_bus, np);
        if (err)
-               goto err_out_free_mdiobus;
+               goto err_out_free_fixed_link;
 
        err = macb_mii_probe(bp->dev);
        if (err)
@@ -607,6 +613,7 @@ static int macb_mii_init(struct macb *bp)
 
 err_out_unregister_bus:
        mdiobus_unregister(bp->mii_bus);
+err_out_free_fixed_link:
        if (np && of_phy_is_fixed_link(np))
                of_phy_deregister_fixed_link(np);
 err_out_free_mdiobus:
@@ -2028,14 +2035,17 @@ static void macb_reset_hw(struct macb *bp)
 {
        struct macb_queue *queue;
        unsigned int q;
+       u32 ctrl = macb_readl(bp, NCR);
 
        /* Disable RX and TX (XXX: Should we halt the transmission
         * more gracefully?)
         */
-       macb_writel(bp, NCR, 0);
+       ctrl &= ~(MACB_BIT(RE) | MACB_BIT(TE));
 
        /* Clear the stats registers (XXX: Update stats first?) */
-       macb_writel(bp, NCR, MACB_BIT(CLRSTAT));
+       ctrl |= MACB_BIT(CLRSTAT);
+
+       macb_writel(bp, NCR, ctrl);
 
        /* Clear all status flags */
        macb_writel(bp, TSR, -1);
@@ -2223,7 +2233,7 @@ static void macb_init_hw(struct macb *bp)
        }
 
        /* Enable TX and RX */
-       macb_writel(bp, NCR, MACB_BIT(RE) | MACB_BIT(TE) | MACB_BIT(MPE));
+       macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE));
 }
 
 /* The hash address register is 64 bits long and takes up two
index 623f73dd7738dbbb01b8f49649a4507d641b1d9a..c116f96956fe9370c7927070ee6c9196ba26582b 100644 (file)
@@ -417,10 +417,9 @@ static void cxgb4_process_flow_actions(struct net_device *in,
                                       struct ch_filter_specification *fs)
 {
        const struct tc_action *a;
-       LIST_HEAD(actions);
+       int i;
 
-       tcf_exts_to_list(cls->exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, cls->exts) {
                if (is_tcf_gact_ok(a)) {
                        fs->action = FILTER_PASS;
                } else if (is_tcf_gact_shot(a)) {
@@ -591,10 +590,9 @@ static int cxgb4_validate_flow_actions(struct net_device *dev,
        bool act_redir = false;
        bool act_pedit = false;
        bool act_vlan = false;
-       LIST_HEAD(actions);
+       int i;
 
-       tcf_exts_to_list(cls->exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, cls->exts) {
                if (is_tcf_gact_ok(a)) {
                        /* Do nothing */
                } else if (is_tcf_gact_shot(a)) {
index 18eb2aedd4cb0a2659a479f7f50c62f13f32c78d..c7d2b4dc7568e72e56a393171a42769ac46e6177 100644 (file)
@@ -93,14 +93,13 @@ static int fill_action_fields(struct adapter *adap,
        unsigned int num_actions = 0;
        const struct tc_action *a;
        struct tcf_exts *exts;
-       LIST_HEAD(actions);
+       int i;
 
        exts = cls->knode.exts;
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
                /* Don't allow more than one action per rule. */
                if (num_actions)
                        return -EINVAL;
index fa5b30f547f6620a6e761860be6afa341dc185c8..cad52bd331f7b295853b4d2765ad5b1ebd37b0d9 100644 (file)
@@ -220,10 +220,10 @@ struct hnae_desc_cb {
 
        /* priv data for the desc, e.g. skb when use with ip stack*/
        void *priv;
-       u16 page_offset;
-       u16 reuse_flag;
+       u32 page_offset;
+       u32 length;     /* length of the buffer */
 
-       u16 length;     /* length of the buffer */
+       u16 reuse_flag;
 
        /* desc type, used by the ring user to mark the type of the priv data */
        u16 type;
index 9f2b552aee33998680c2dc2c72e81c28f99209f5..02a0ba20fad55f43c0e3cd8531bc38f60f790827 100644 (file)
@@ -406,113 +406,13 @@ netdev_tx_t hns_nic_net_xmit_hw(struct net_device *ndev,
        return NETDEV_TX_BUSY;
 }
 
-/**
- * hns_nic_get_headlen - determine size of header for RSC/LRO/GRO/FCOE
- * @data: pointer to the start of the headers
- * @max: total length of section to find headers in
- *
- * This function is meant to determine the length of headers that will
- * be recognized by hardware for LRO, GRO, and RSC offloads.  The main
- * motivation of doing this is to only perform one pull for IPv4 TCP
- * packets so that we can do basic things like calculating the gso_size
- * based on the average data per packet.
- **/
-static unsigned int hns_nic_get_headlen(unsigned char *data, u32 flag,
-                                       unsigned int max_size)
-{
-       unsigned char *network;
-       u8 hlen;
-
-       /* this should never happen, but better safe than sorry */
-       if (max_size < ETH_HLEN)
-               return max_size;
-
-       /* initialize network frame pointer */
-       network = data;
-
-       /* set first protocol and move network header forward */
-       network += ETH_HLEN;
-
-       /* handle any vlan tag if present */
-       if (hnae_get_field(flag, HNS_RXD_VLAN_M, HNS_RXD_VLAN_S)
-               == HNS_RX_FLAG_VLAN_PRESENT) {
-               if ((typeof(max_size))(network - data) > (max_size - VLAN_HLEN))
-                       return max_size;
-
-               network += VLAN_HLEN;
-       }
-
-       /* handle L3 protocols */
-       if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
-               == HNS_RX_FLAG_L3ID_IPV4) {
-               if ((typeof(max_size))(network - data) >
-                   (max_size - sizeof(struct iphdr)))
-                       return max_size;
-
-               /* access ihl as a u8 to avoid unaligned access on ia64 */
-               hlen = (network[0] & 0x0F) << 2;
-
-               /* verify hlen meets minimum size requirements */
-               if (hlen < sizeof(struct iphdr))
-                       return network - data;
-
-               /* record next protocol if header is present */
-       } else if (hnae_get_field(flag, HNS_RXD_L3ID_M, HNS_RXD_L3ID_S)
-               == HNS_RX_FLAG_L3ID_IPV6) {
-               if ((typeof(max_size))(network - data) >
-                   (max_size - sizeof(struct ipv6hdr)))
-                       return max_size;
-
-               /* record next protocol */
-               hlen = sizeof(struct ipv6hdr);
-       } else {
-               return network - data;
-       }
-
-       /* relocate pointer to start of L4 header */
-       network += hlen;
-
-       /* finally sort out TCP/UDP */
-       if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
-               == HNS_RX_FLAG_L4ID_TCP) {
-               if ((typeof(max_size))(network - data) >
-                   (max_size - sizeof(struct tcphdr)))
-                       return max_size;
-
-               /* access doff as a u8 to avoid unaligned access on ia64 */
-               hlen = (network[12] & 0xF0) >> 2;
-
-               /* verify hlen meets minimum size requirements */
-               if (hlen < sizeof(struct tcphdr))
-                       return network - data;
-
-               network += hlen;
-       } else if (hnae_get_field(flag, HNS_RXD_L4ID_M, HNS_RXD_L4ID_S)
-               == HNS_RX_FLAG_L4ID_UDP) {
-               if ((typeof(max_size))(network - data) >
-                   (max_size - sizeof(struct udphdr)))
-                       return max_size;
-
-               network += sizeof(struct udphdr);
-       }
-
-       /* If everything has gone correctly network should be the
-        * data section of the packet and will be the end of the header.
-        * If not then it probably represents the end of the last recognized
-        * header.
-        */
-       if ((typeof(max_size))(network - data) < max_size)
-               return network - data;
-       else
-               return max_size;
-}
-
 static void hns_nic_reuse_page(struct sk_buff *skb, int i,
                               struct hnae_ring *ring, int pull_len,
                               struct hnae_desc_cb *desc_cb)
 {
        struct hnae_desc *desc;
-       int truesize, size;
+       u32 truesize;
+       int size;
        int last_offset;
        bool twobufs;
 
@@ -530,7 +430,7 @@ static void hns_nic_reuse_page(struct sk_buff *skb, int i,
        }
 
        skb_add_rx_frag(skb, i, desc_cb->priv, desc_cb->page_offset + pull_len,
-                       size - pull_len, truesize - pull_len);
+                       size - pull_len, truesize);
 
         /* avoid re-using remote pages,flag default unreuse */
        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,
        } else {
                ring->stats.seg_pkt_cnt++;
 
-               pull_len = hns_nic_get_headlen(va, bnum_flag, HNS_RX_HEAD_SIZE);
+               pull_len = eth_get_headlen(va, HNS_RX_HEAD_SIZE);
                memcpy(__skb_put(skb, pull_len), va,
                       ALIGN(pull_len, sizeof(long)));
 
index 3554dca7a680a2c970b37313222e517199007e82..955c4ab18b03bb300ec7beb8f8bcf953e817b2fc 100644 (file)
@@ -2019,7 +2019,8 @@ static void hns3_nic_reuse_page(struct sk_buff *skb, int i,
                                struct hns3_desc_cb *desc_cb)
 {
        struct hns3_desc *desc;
-       int truesize, size;
+       u32 truesize;
+       int size;
        int last_offset;
        bool twobufs;
 
index a02a96aee2a2bfdcb9ebb49ea56b40546df83ae8..cb450d7ec8c1665a9ae690a3e3a9b78843976cf4 100644 (file)
@@ -284,11 +284,11 @@ struct hns3_desc_cb {
 
        /* priv data for the desc, e.g. skb when use with ip stack*/
        void *priv;
-       u16 page_offset;
-       u16 reuse_flag;
-
+       u32 page_offset;
        u32 length;     /* length of the buffer */
 
+       u16 reuse_flag;
+
        /* desc type, used by the ring user to mark the type of the priv data */
        u16 type;
 };
index bdb3f8e65ed470e314bf6b4f9b3b3b4e41b93e0f..2569a168334cbc6785f9e2909f5a68ac6450c9d6 100644 (file)
@@ -624,14 +624,14 @@ static int e1000_set_ringparam(struct net_device *netdev,
                adapter->tx_ring = tx_old;
                e1000_free_all_rx_resources(adapter);
                e1000_free_all_tx_resources(adapter);
-               kfree(tx_old);
-               kfree(rx_old);
                adapter->rx_ring = rxdr;
                adapter->tx_ring = txdr;
                err = e1000_up(adapter);
                if (err)
                        goto err_setup;
        }
+       kfree(tx_old);
+       kfree(rx_old);
 
        clear_bit(__E1000_RESETTING, &adapter->flags);
        return 0;
@@ -644,7 +644,8 @@ static int e1000_set_ringparam(struct net_device *netdev,
 err_alloc_rx:
        kfree(txdr);
 err_alloc_tx:
-       e1000_up(adapter);
+       if (netif_running(adapter->netdev))
+               e1000_up(adapter);
 err_setup:
        clear_bit(__E1000_RESETTING, &adapter->flags);
        return err;
index abcd096ede14022ac6e022536a2db02de7e023da..5ff6caa83948c2c14a6b85070ddaba54e0c50c3a 100644 (file)
@@ -2013,7 +2013,7 @@ static void i40e_get_stat_strings(struct net_device *netdev, u8 *data)
        for (i = 0; i < I40E_MAX_USER_PRIORITY; i++)
                i40e_add_stat_strings(&data, i40e_gstrings_pfc_stats, i);
 
-       WARN_ONCE(p - data != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN,
+       WARN_ONCE(data - p != i40e_get_stats_count(netdev) * ETH_GSTRING_LEN,
                  "stat strings count mismatch!");
 }
 
index f2c622e78802a751dc549e03b811825596d1a587..ac685ad4d8773125b059f1209d2b60747996b39b 100644 (file)
@@ -5122,15 +5122,17 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
                                       u8 *bw_share)
 {
        struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
+       struct i40e_pf *pf = vsi->back;
        i40e_status ret;
        int i;
 
-       if (vsi->back->flags & I40E_FLAG_TC_MQPRIO)
+       /* There is no need to reset BW when mqprio mode is on.  */
+       if (pf->flags & I40E_FLAG_TC_MQPRIO)
                return 0;
-       if (!vsi->mqprio_qopt.qopt.hw) {
+       if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags & I40E_FLAG_DCB_ENABLED)) {
                ret = i40e_set_bw_limit(vsi, vsi->seid, 0);
                if (ret)
-                       dev_info(&vsi->back->pdev->dev,
+                       dev_info(&pf->pdev->dev,
                                 "Failed to reset tx rate for vsi->seid %u\n",
                                 vsi->seid);
                return ret;
@@ -5139,12 +5141,11 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,
        for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
                bw_data.tc_bw_credits[i] = bw_share[i];
 
-       ret = i40e_aq_config_vsi_tc_bw(&vsi->back->hw, vsi->seid, &bw_data,
-                                      NULL);
+       ret = i40e_aq_config_vsi_tc_bw(&pf->hw, vsi->seid, &bw_data, NULL);
        if (ret) {
-               dev_info(&vsi->back->pdev->dev,
+               dev_info(&pf->pdev->dev,
                         "AQ command Config VSI BW allocation per TC failed = %d\n",
-                        vsi->back->hw.aq.asq_last_status);
+                        pf->hw.aq.asq_last_status);
                return -EINVAL;
        }
 
index d8b5fff581e717e189ffe8f50dff4215ce8ec805..868f4a1d0f724379534791f74127261bba0c9682 100644 (file)
@@ -89,6 +89,13 @@ extern const char ice_drv_ver[];
 #define ice_for_each_rxq(vsi, i) \
        for ((i) = 0; (i) < (vsi)->num_rxq; (i)++)
 
+/* Macros for each allocated tx/rx ring whether used or not in a VSI */
+#define ice_for_each_alloc_txq(vsi, i) \
+       for ((i) = 0; (i) < (vsi)->alloc_txq; (i)++)
+
+#define ice_for_each_alloc_rxq(vsi, i) \
+       for ((i) = 0; (i) < (vsi)->alloc_rxq; (i)++)
+
 struct ice_tc_info {
        u16 qoffset;
        u16 qcount;
@@ -189,9 +196,9 @@ struct ice_vsi {
        struct list_head tmp_sync_list;         /* MAC filters to be synced */
        struct list_head tmp_unsync_list;       /* MAC filters to be unsynced */
 
-       bool irqs_ready;
-       bool current_isup;               /* Sync 'link up' logging */
-       bool stat_offsets_loaded;
+       u8 irqs_ready;
+       u8 current_isup;                 /* Sync 'link up' logging */
+       u8 stat_offsets_loaded;
 
        /* queue information */
        u8 tx_mapping_mode;              /* ICE_MAP_MODE_[CONTIG|SCATTER] */
@@ -262,7 +269,7 @@ struct ice_pf {
        struct ice_hw_port_stats stats;
        struct ice_hw_port_stats stats_prev;
        struct ice_hw hw;
-       bool stat_prev_loaded;  /* has previous stats been loaded */
+       u8 stat_prev_loaded;    /* has previous stats been loaded */
        char int_name[ICE_INT_NAME_STR_LEN];
 };
 
index 7541ec2270b3708d4e5e9362d0ae8a1f5e09318d..a0614f472658ac5305c6aff1e589d99dbdd1634a 100644 (file)
@@ -329,19 +329,19 @@ struct ice_aqc_vsi_props {
        /* VLAN section */
        __le16 pvid; /* VLANS include priority bits */
        u8 pvlan_reserved[2];
-       u8 port_vlan_flags;
-#define ICE_AQ_VSI_PVLAN_MODE_S        0
-#define ICE_AQ_VSI_PVLAN_MODE_M        (0x3 << ICE_AQ_VSI_PVLAN_MODE_S)
-#define ICE_AQ_VSI_PVLAN_MODE_UNTAGGED 0x1
-#define ICE_AQ_VSI_PVLAN_MODE_TAGGED   0x2
-#define ICE_AQ_VSI_PVLAN_MODE_ALL      0x3
+       u8 vlan_flags;
+#define ICE_AQ_VSI_VLAN_MODE_S 0
+#define ICE_AQ_VSI_VLAN_MODE_M (0x3 << ICE_AQ_VSI_VLAN_MODE_S)
+#define ICE_AQ_VSI_VLAN_MODE_UNTAGGED  0x1
+#define ICE_AQ_VSI_VLAN_MODE_TAGGED    0x2
+#define ICE_AQ_VSI_VLAN_MODE_ALL       0x3
 #define ICE_AQ_VSI_PVLAN_INSERT_PVID   BIT(2)
-#define ICE_AQ_VSI_PVLAN_EMOD_S        3
-#define ICE_AQ_VSI_PVLAN_EMOD_M        (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR_UP   (0x1 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_STR      (0x2 << ICE_AQ_VSI_PVLAN_EMOD_S)
-#define ICE_AQ_VSI_PVLAN_EMOD_NOTHING  (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_S         3
+#define ICE_AQ_VSI_VLAN_EMOD_M         (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR_BOTH  (0x0 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR_UP    (0x1 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_STR       (0x2 << ICE_AQ_VSI_VLAN_EMOD_S)
+#define ICE_AQ_VSI_VLAN_EMOD_NOTHING   (0x3 << ICE_AQ_VSI_VLAN_EMOD_S)
        u8 pvlan_reserved2[3];
        /* ingress egress up sections */
        __le32 ingress_table; /* bitmap, 3 bits per up */
@@ -594,6 +594,7 @@ struct ice_sw_rule_lg_act {
 #define ICE_LG_ACT_GENERIC_OFFSET_M    (0x7 << ICE_LG_ACT_GENERIC_OFFSET_S)
 #define ICE_LG_ACT_GENERIC_PRIORITY_S  22
 #define ICE_LG_ACT_GENERIC_PRIORITY_M  (0x7 << ICE_LG_ACT_GENERIC_PRIORITY_S)
+#define ICE_LG_ACT_GENERIC_OFF_RX_DESC_PROF_IDX        7
 
        /* Action = 7 - Set Stat count */
 #define ICE_LG_ACT_STAT_COUNT          0x7
index 71d032cc5fa7d7ee8d6af579ca3d0e7813de05b5..661beea6af795cd72abf3e609347c89b21d9902d 100644 (file)
@@ -45,6 +45,9 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw)
 /**
  * ice_clear_pf_cfg - Clear PF configuration
  * @hw: pointer to the hardware structure
+ *
+ * Clears any existing PF configuration (VSIs, VSI lists, switch rules, port
+ * configuration, flow director filters, etc.).
  */
 enum ice_status ice_clear_pf_cfg(struct ice_hw *hw)
 {
@@ -1483,7 +1486,7 @@ enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up)
        struct ice_phy_info *phy_info;
        enum ice_status status = 0;
 
-       if (!pi)
+       if (!pi || !link_up)
                return ICE_ERR_PARAM;
 
        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,
        }
 
        /* LUT size is only valid for Global and PF table types */
-       if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128) {
-               flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG <<
-                         ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
-                        ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
-       } else if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512) {
+       switch (lut_size) {
+       case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128:
+               break;
+       case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512:
                flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG <<
                          ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
                         ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
-       } else if ((lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K) &&
-                  (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF)) {
-               flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG <<
-                         ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
-                        ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
-       } else {
+               break;
+       case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K:
+               if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) {
+                       flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG <<
+                                 ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) &
+                                ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M;
+                       break;
+               }
+               /* fall-through */
+       default:
                status = ICE_ERR_PARAM;
                goto ice_aq_get_set_rss_lut_exit;
        }
index 7c511f144ed60d92c16f0f526cfb5b03a3c2a59e..62be72fdc8f30c283b2385216f41ff15b87dc628 100644 (file)
@@ -597,10 +597,14 @@ static enum ice_status ice_init_check_adminq(struct ice_hw *hw)
        return 0;
 
 init_ctrlq_free_rq:
-       ice_shutdown_rq(hw, cq);
-       ice_shutdown_sq(hw, cq);
-       mutex_destroy(&cq->sq_lock);
-       mutex_destroy(&cq->rq_lock);
+       if (cq->rq.head) {
+               ice_shutdown_rq(hw, cq);
+               mutex_destroy(&cq->rq_lock);
+       }
+       if (cq->sq.head) {
+               ice_shutdown_sq(hw, cq);
+               mutex_destroy(&cq->sq_lock);
+       }
        return status;
 }
 
@@ -706,10 +710,14 @@ static void ice_shutdown_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type)
                return;
        }
 
-       ice_shutdown_sq(hw, cq);
-       ice_shutdown_rq(hw, cq);
-       mutex_destroy(&cq->sq_lock);
-       mutex_destroy(&cq->rq_lock);
+       if (cq->sq.head) {
+               ice_shutdown_sq(hw, cq);
+               mutex_destroy(&cq->sq_lock);
+       }
+       if (cq->rq.head) {
+               ice_shutdown_rq(hw, cq);
+               mutex_destroy(&cq->rq_lock);
+       }
 }
 
 /**
@@ -1057,8 +1065,11 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
 
 clean_rq_elem_out:
        /* Set pending if needed, unlock and return */
-       if (pending)
+       if (pending) {
+               /* re-read HW head to calculate actual pending messages */
+               ntu = (u16)(rd32(hw, cq->rq.head) & cq->rq.head_mask);
                *pending = (u16)((ntc > ntu ? cq->rq.count : 0) + (ntu - ntc));
+       }
 clean_rq_elem_err:
        mutex_unlock(&cq->rq_lock);
 
index 1db304c01d100604560a5d4ac8216b093a7f92d6..c71a9b528d6d558eca4a97a4511e445b00aa5bf1 100644 (file)
@@ -26,7 +26,7 @@ static int ice_q_stats_len(struct net_device *netdev)
 {
        struct ice_netdev_priv *np = netdev_priv(netdev);
 
-       return ((np->vsi->num_txq + np->vsi->num_rxq) *
+       return ((np->vsi->alloc_txq + np->vsi->alloc_rxq) *
                (sizeof(struct ice_q_stats) / sizeof(u64)));
 }
 
@@ -218,7 +218,7 @@ static void ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
                        p += ETH_GSTRING_LEN;
                }
 
-               ice_for_each_txq(vsi, i) {
+               ice_for_each_alloc_txq(vsi, i) {
                        snprintf(p, ETH_GSTRING_LEN,
                                 "tx-queue-%u.tx_packets", i);
                        p += ETH_GSTRING_LEN;
@@ -226,7 +226,7 @@ static void ice_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
                        p += ETH_GSTRING_LEN;
                }
 
-               ice_for_each_rxq(vsi, i) {
+               ice_for_each_alloc_rxq(vsi, i) {
                        snprintf(p, ETH_GSTRING_LEN,
                                 "rx-queue-%u.rx_packets", i);
                        p += ETH_GSTRING_LEN;
@@ -253,6 +253,24 @@ static int ice_get_sset_count(struct net_device *netdev, int sset)
 {
        switch (sset) {
        case ETH_SS_STATS:
+               /* The number (and order) of strings reported *must* remain
+                * constant for a given netdevice. This function must not
+                * report a different number based on run time parameters
+                * (such as the number of queues in use, or the setting of
+                * a private ethtool flag). This is due to the nature of the
+                * ethtool stats API.
+                *
+                * User space programs such as ethtool must make 3 separate
+                * ioctl requests, one for size, one for the strings, and
+                * finally one for the stats. Since these cross into
+                * user space, changes to the number or size could result in
+                * undefined memory access or incorrect string<->value
+                * correlations for statistics.
+                *
+                * Even if it appears to be safe, changes to the size or
+                * order of strings will suffer from race conditions and are
+                * not safe.
+                */
                return ICE_ALL_STATS_LEN(netdev);
        default:
                return -EOPNOTSUPP;
@@ -280,18 +298,26 @@ ice_get_ethtool_stats(struct net_device *netdev,
        /* populate per queue stats */
        rcu_read_lock();
 
-       ice_for_each_txq(vsi, j) {
+       ice_for_each_alloc_txq(vsi, j) {
                ring = READ_ONCE(vsi->tx_rings[j]);
-               if (!ring)
-                       continue;
-               data[i++] = ring->stats.pkts;
-               data[i++] = ring->stats.bytes;
+               if (ring) {
+                       data[i++] = ring->stats.pkts;
+                       data[i++] = ring->stats.bytes;
+               } else {
+                       data[i++] = 0;
+                       data[i++] = 0;
+               }
        }
 
-       ice_for_each_rxq(vsi, j) {
+       ice_for_each_alloc_rxq(vsi, j) {
                ring = READ_ONCE(vsi->rx_rings[j]);
-               data[i++] = ring->stats.pkts;
-               data[i++] = ring->stats.bytes;
+               if (ring) {
+                       data[i++] = ring->stats.pkts;
+                       data[i++] = ring->stats.bytes;
+               } else {
+                       data[i++] = 0;
+                       data[i++] = 0;
+               }
        }
 
        rcu_read_unlock();
@@ -519,7 +545,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
                goto done;
        }
 
-       for (i = 0; i < vsi->num_txq; i++) {
+       for (i = 0; i < vsi->alloc_txq; i++) {
                /* clone ring and setup updated count */
                tx_rings[i] = *vsi->tx_rings[i];
                tx_rings[i].count = new_tx_cnt;
@@ -551,7 +577,7 @@ ice_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
                goto done;
        }
 
-       for (i = 0; i < vsi->num_rxq; i++) {
+       for (i = 0; i < vsi->alloc_rxq; i++) {
                /* clone ring and setup updated count */
                rx_rings[i] = *vsi->rx_rings[i];
                rx_rings[i].count = new_rx_cnt;
index 499904874b3ff863554c315add28a03f3a260eeb..6076fc87df9d28d81d3cc40d6b1ee7f042667b7f 100644 (file)
 #define PFINT_FW_CTL_CAUSE_ENA_S       30
 #define PFINT_FW_CTL_CAUSE_ENA_M       BIT(PFINT_FW_CTL_CAUSE_ENA_S)
 #define PFINT_OICR                     0x0016CA00
-#define PFINT_OICR_HLP_RDY_S           14
-#define PFINT_OICR_HLP_RDY_M           BIT(PFINT_OICR_HLP_RDY_S)
-#define PFINT_OICR_CPM_RDY_S           15
-#define PFINT_OICR_CPM_RDY_M           BIT(PFINT_OICR_CPM_RDY_S)
 #define PFINT_OICR_ECC_ERR_S           16
 #define PFINT_OICR_ECC_ERR_M           BIT(PFINT_OICR_ECC_ERR_S)
 #define PFINT_OICR_MAL_DETECT_S                19
 #define PFINT_OICR_GRST_M              BIT(PFINT_OICR_GRST_S)
 #define PFINT_OICR_PCI_EXCEPTION_S     21
 #define PFINT_OICR_PCI_EXCEPTION_M     BIT(PFINT_OICR_PCI_EXCEPTION_S)
-#define PFINT_OICR_GPIO_S              22
-#define PFINT_OICR_GPIO_M              BIT(PFINT_OICR_GPIO_S)
-#define PFINT_OICR_STORM_DETECT_S      24
-#define PFINT_OICR_STORM_DETECT_M      BIT(PFINT_OICR_STORM_DETECT_S)
 #define PFINT_OICR_HMC_ERR_S           26
 #define PFINT_OICR_HMC_ERR_M           BIT(PFINT_OICR_HMC_ERR_S)
 #define PFINT_OICR_PE_CRITERR_S                28
index d23a91665b463799a6a3e4445d3c681a2400fb15..068dbc740b7667ce98541921a57108503e825594 100644 (file)
@@ -265,6 +265,7 @@ enum ice_rx_flex_desc_status_error_0_bits {
 struct ice_rlan_ctx {
        u16 head;
        u16 cpuid; /* bigger than needed, see above for reason */
+#define ICE_RLAN_BASE_S 7
        u64 base;
        u16 qlen;
 #define ICE_RLAN_CTX_DBUF_S 7
index 5299caf55a7f2b44772988d9f4eeb70b27c51cc4..f1e80eed2fd6d9f94eab163acb4d178d83ba4af2 100644 (file)
@@ -901,7 +901,7 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
                case ice_aqc_opc_get_link_status:
                        if (ice_handle_link_event(pf))
                                dev_err(&pf->pdev->dev,
-                                       "Could not handle link event");
+                                       "Could not handle link event\n");
                        break;
                default:
                        dev_dbg(&pf->pdev->dev,
@@ -916,6 +916,21 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
        return pending && (i == ICE_DFLT_IRQ_WORK);
 }
 
+/**
+ * ice_ctrlq_pending - check if there is a difference between ntc and ntu
+ * @hw: pointer to hardware info
+ * @cq: control queue information
+ *
+ * returns true if there are pending messages in a queue, false if there aren't
+ */
+static bool ice_ctrlq_pending(struct ice_hw *hw, struct ice_ctl_q_info *cq)
+{
+       u16 ntu;
+
+       ntu = (u16)(rd32(hw, cq->rq.head) & cq->rq.head_mask);
+       return cq->rq.next_to_clean != ntu;
+}
+
 /**
  * ice_clean_adminq_subtask - clean the AdminQ rings
  * @pf: board private structure
@@ -923,7 +938,6 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)
 static void ice_clean_adminq_subtask(struct ice_pf *pf)
 {
        struct ice_hw *hw = &pf->hw;
-       u32 val;
 
        if (!test_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state))
                return;
@@ -933,9 +947,13 @@ static void ice_clean_adminq_subtask(struct ice_pf *pf)
 
        clear_bit(__ICE_ADMINQ_EVENT_PENDING, pf->state);
 
-       /* re-enable Admin queue interrupt causes */
-       val = rd32(hw, PFINT_FW_CTL);
-       wr32(hw, PFINT_FW_CTL, (val | PFINT_FW_CTL_CAUSE_ENA_M));
+       /* There might be a situation where new messages arrive to a control
+        * queue between processing the last message and clearing the
+        * EVENT_PENDING bit. So before exiting, check queue head again (using
+        * ice_ctrlq_pending) and process new messages if any.
+        */
+       if (ice_ctrlq_pending(hw, &hw->adminq))
+               __ice_clean_ctrlq(pf, ICE_CTL_Q_ADMIN);
 
        ice_flush(hw);
 }
@@ -1295,11 +1313,8 @@ static void ice_vsi_setup_q_map(struct ice_vsi *vsi, struct ice_vsi_ctx *ctxt)
                qcount = numq_tc;
        }
 
-       /* find higher power-of-2 of qcount */
-       pow = ilog2(qcount);
-
-       if (!is_power_of_2(qcount))
-               pow++;
+       /* find the (rounded up) power-of-2 of qcount */
+       pow = order_base_2(qcount);
 
        for (i = 0; i < ICE_MAX_TRAFFIC_CLASS; i++) {
                if (!(vsi->tc_cfg.ena_tc & BIT(i))) {
@@ -1352,14 +1367,15 @@ static void ice_set_dflt_vsi_ctx(struct ice_vsi_ctx *ctxt)
        ctxt->info.sw_flags = ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
        /* Traffic from VSI can be sent to LAN */
        ctxt->info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
-       /* Allow all packets untagged/tagged */
-       ctxt->info.port_vlan_flags = ((ICE_AQ_VSI_PVLAN_MODE_ALL &
-                                      ICE_AQ_VSI_PVLAN_MODE_M) >>
-                                     ICE_AQ_VSI_PVLAN_MODE_S);
-       /* Show VLAN/UP from packets in Rx descriptors */
-       ctxt->info.port_vlan_flags |= ((ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH &
-                                       ICE_AQ_VSI_PVLAN_EMOD_M) >>
-                                      ICE_AQ_VSI_PVLAN_EMOD_S);
+
+       /* By default bits 3 and 4 in vlan_flags are 0's which results in legacy
+        * behavior (show VLAN, DEI, and UP) in descriptor. Also, allow all
+        * packets untagged/tagged.
+        */
+       ctxt->info.vlan_flags = ((ICE_AQ_VSI_VLAN_MODE_ALL &
+                                 ICE_AQ_VSI_VLAN_MODE_M) >>
+                                ICE_AQ_VSI_VLAN_MODE_S);
+
        /* Have 1:1 UP mapping for both ingress/egress tables */
        table |= ICE_UP_TABLE_TRANSLATE(0, 0);
        table |= ICE_UP_TABLE_TRANSLATE(1, 1);
@@ -1688,15 +1704,12 @@ static void ice_ena_misc_vector(struct ice_pf *pf)
        wr32(hw, PFINT_OICR_ENA, 0);    /* disable all */
        rd32(hw, PFINT_OICR);           /* read to clear */
 
-       val = (PFINT_OICR_HLP_RDY_M |
-              PFINT_OICR_CPM_RDY_M |
-              PFINT_OICR_ECC_ERR_M |
+       val = (PFINT_OICR_ECC_ERR_M |
               PFINT_OICR_MAL_DETECT_M |
               PFINT_OICR_GRST_M |
               PFINT_OICR_PCI_EXCEPTION_M |
-              PFINT_OICR_GPIO_M |
-              PFINT_OICR_STORM_DETECT_M |
-              PFINT_OICR_HMC_ERR_M);
+              PFINT_OICR_HMC_ERR_M |
+              PFINT_OICR_PE_CRITERR_M);
 
        wr32(hw, PFINT_OICR_ENA, val);
 
@@ -2058,15 +2071,13 @@ static int ice_req_irq_msix_misc(struct ice_pf *pf)
 skip_req_irq:
        ice_ena_misc_vector(pf);
 
-       val = (pf->oicr_idx & PFINT_OICR_CTL_MSIX_INDX_M) |
-             (ICE_RX_ITR & PFINT_OICR_CTL_ITR_INDX_M) |
-             PFINT_OICR_CTL_CAUSE_ENA_M;
+       val = ((pf->oicr_idx & PFINT_OICR_CTL_MSIX_INDX_M) |
+              PFINT_OICR_CTL_CAUSE_ENA_M);
        wr32(hw, PFINT_OICR_CTL, val);
 
        /* This enables Admin queue Interrupt causes */
-       val = (pf->oicr_idx & PFINT_FW_CTL_MSIX_INDX_M) |
-             (ICE_RX_ITR & PFINT_FW_CTL_ITR_INDX_M) |
-             PFINT_FW_CTL_CAUSE_ENA_M;
+       val = ((pf->oicr_idx & PFINT_FW_CTL_MSIX_INDX_M) |
+              PFINT_FW_CTL_CAUSE_ENA_M);
        wr32(hw, PFINT_FW_CTL, val);
 
        itr_gran = hw->itr_gran_200;
@@ -3246,8 +3257,10 @@ static void ice_clear_interrupt_scheme(struct ice_pf *pf)
        if (test_bit(ICE_FLAG_MSIX_ENA, pf->flags))
                ice_dis_msix(pf);
 
-       devm_kfree(&pf->pdev->dev, pf->irq_tracker);
-       pf->irq_tracker = NULL;
+       if (pf->irq_tracker) {
+               devm_kfree(&pf->pdev->dev, pf->irq_tracker);
+               pf->irq_tracker = NULL;
+       }
 }
 
 /**
@@ -3271,7 +3284,7 @@ static int ice_probe(struct pci_dev *pdev,
 
        err = pcim_iomap_regions(pdev, BIT(ICE_BAR0), pci_name(pdev));
        if (err) {
-               dev_err(&pdev->dev, "I/O map error %d\n", err);
+               dev_err(&pdev->dev, "BAR0 I/O map error %d\n", err);
                return err;
        }
 
@@ -3720,10 +3733,10 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi)
        enum ice_status status;
 
        /* Here we are configuring the VSI to let the driver add VLAN tags by
-        * setting port_vlan_flags to ICE_AQ_VSI_PVLAN_MODE_ALL. The actual VLAN
-        * tag insertion happens in the Tx hot path, in ice_tx_map.
+        * setting vlan_flags to ICE_AQ_VSI_VLAN_MODE_ALL. The actual VLAN tag
+        * insertion happens in the Tx hot path, in ice_tx_map.
         */
-       ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_MODE_ALL;
+       ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_MODE_ALL;
 
        ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID);
        ctxt.vsi_num = vsi->vsi_num;
@@ -3735,7 +3748,7 @@ static int ice_vsi_manage_vlan_insertion(struct ice_vsi *vsi)
                return -EIO;
        }
 
-       vsi->info.port_vlan_flags = ctxt.info.port_vlan_flags;
+       vsi->info.vlan_flags = ctxt.info.vlan_flags;
        return 0;
 }
 
@@ -3757,12 +3770,15 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena)
         */
        if (ena) {
                /* Strip VLAN tag from Rx packet and put it in the desc */
-               ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH;
+               ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_EMOD_STR_BOTH;
        } else {
                /* Disable stripping. Leave tag in packet */
-               ctxt.info.port_vlan_flags = ICE_AQ_VSI_PVLAN_EMOD_NOTHING;
+               ctxt.info.vlan_flags = ICE_AQ_VSI_VLAN_EMOD_NOTHING;
        }
 
+       /* Allow all packets untagged/tagged */
+       ctxt.info.vlan_flags |= ICE_AQ_VSI_VLAN_MODE_ALL;
+
        ctxt.info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_VLAN_VALID);
        ctxt.vsi_num = vsi->vsi_num;
 
@@ -3773,7 +3789,7 @@ static int ice_vsi_manage_vlan_stripping(struct ice_vsi *vsi, bool ena)
                return -EIO;
        }
 
-       vsi->info.port_vlan_flags = ctxt.info.port_vlan_flags;
+       vsi->info.vlan_flags = ctxt.info.vlan_flags;
        return 0;
 }
 
@@ -3986,7 +4002,7 @@ static int ice_setup_rx_ctx(struct ice_ring *ring)
        /* clear the context structure first */
        memset(&rlan_ctx, 0, sizeof(rlan_ctx));
 
-       rlan_ctx.base = ring->dma >> 7;
+       rlan_ctx.base = ring->dma >> ICE_RLAN_BASE_S;
 
        rlan_ctx.qlen = ring->count;
 
@@ -4098,11 +4114,12 @@ static int ice_vsi_cfg(struct ice_vsi *vsi)
 {
        int err;
 
-       ice_set_rx_mode(vsi->netdev);
-
-       err = ice_restore_vlan(vsi);
-       if (err)
-               return err;
+       if (vsi->netdev) {
+               ice_set_rx_mode(vsi->netdev);
+               err = ice_restore_vlan(vsi);
+               if (err)
+                       return err;
+       }
 
        err = ice_vsi_cfg_txqs(vsi);
        if (!err)
@@ -4868,7 +4885,7 @@ int ice_down(struct ice_vsi *vsi)
  */
 static int ice_vsi_setup_tx_rings(struct ice_vsi *vsi)
 {
-       int i, err;
+       int i, err = 0;
 
        if (!vsi->num_txq) {
                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)
  */
 static int ice_vsi_setup_rx_rings(struct ice_vsi *vsi)
 {
-       int i, err;
+       int i, err = 0;
 
        if (!vsi->num_rxq) {
                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)
        u8 count = 0;
 
        if (new_mtu == netdev->mtu) {
-               netdev_warn(netdev, "mtu is already %d\n", netdev->mtu);
+               netdev_warn(netdev, "mtu is already %u\n", netdev->mtu);
                return 0;
        }
 
index 92da0a626ce0b38395633ff90df504f8f88f40c8..295a8cd87fc16565148bf6cbb7713c02a71454f9 100644 (file)
@@ -131,9 +131,8 @@ ice_read_sr_word_aq(struct ice_hw *hw, u16 offset, u16 *data)
  *
  * This function will request NVM ownership.
  */
-static enum
-ice_status ice_acquire_nvm(struct ice_hw *hw,
-                          enum ice_aq_res_access_type access)
+static enum ice_status
+ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access)
 {
        if (hw->nvm.blank_nvm_mode)
                return 0;
index 2e6c1d92cc8884b2bb9755483f82c421b5d9e6f1..eeae199469b6e7f17f680276bb83f77534cbe555 100644 (file)
@@ -1576,8 +1576,7 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_id, u8 tc,
                        return status;
        }
 
-       if (owner == ICE_SCHED_NODE_OWNER_LAN)
-               vsi->max_lanq[tc] = new_numqs;
+       vsi->max_lanq[tc] = new_numqs;
 
        return status;
 }
index 723d15f1e90b4abbb4db585734940bfc874d4712..6b7ec2ae5ad6798818a9d5947e8071aba410ffff 100644 (file)
@@ -645,14 +645,14 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent,
        act |= (1 << ICE_LG_ACT_GENERIC_VALUE_S) & ICE_LG_ACT_GENERIC_VALUE_M;
        lg_act->pdata.lg_act.act[1] = cpu_to_le32(act);
 
-       act = (7 << ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_VALUE_M;
+       act = (ICE_LG_ACT_GENERIC_OFF_RX_DESC_PROF_IDX <<
+              ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_OFFSET_M;
 
        /* Third action Marker value */
        act |= ICE_LG_ACT_GENERIC;
        act |= (sw_marker << ICE_LG_ACT_GENERIC_VALUE_S) &
                ICE_LG_ACT_GENERIC_VALUE_M;
 
-       act |= (0 << ICE_LG_ACT_GENERIC_OFFSET_S) & ICE_LG_ACT_GENERIC_VALUE_M;
        lg_act->pdata.lg_act.act[2] = cpu_to_le32(act);
 
        /* call the fill switch rule to fill the lookup tx rx structure */
index 6f4a0d159dbfdc2bfb1fe5fbd5fa355dc5503832..9b8ec128ee31f57ea2c2498a0fa55bde139ca7b9 100644 (file)
@@ -17,7 +17,7 @@ struct ice_vsi_ctx {
        u16 vsis_unallocated;
        u16 flags;
        struct ice_aqc_vsi_props info;
-       bool alloc_from_pool;
+       u8 alloc_from_pool;
 };
 
 enum ice_sw_fwd_act_type {
@@ -94,8 +94,8 @@ struct ice_fltr_info {
        u8 qgrp_size;
 
        /* Rule creations populate these indicators basing on the switch type */
-       bool lb_en;     /* Indicate if packet can be looped back */
-       bool lan_en;    /* Indicate if packet can be forwarded to the uplink */
+       u8 lb_en;       /* Indicate if packet can be looped back */
+       u8 lan_en;      /* Indicate if packet can be forwarded to the uplink */
 };
 
 /* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */
index 567067b650c4129acafbea94388731f7ad315ba6..31bc998fe2006f7fa515a4b05917abdae50cb7c0 100644 (file)
@@ -143,7 +143,7 @@ struct ice_ring {
        u16 next_to_use;
        u16 next_to_clean;
 
-       bool ring_active;               /* is ring online or not */
+       u8 ring_active;                 /* is ring online or not */
 
        /* stats structs */
        struct ice_q_stats      stats;
index 99c8a9a71b5e4f433a89d575c92fcd34e59ab6ae..97c366e0ca596facaec70c7f1bb4ddc8b81e8774 100644 (file)
@@ -83,7 +83,7 @@ struct ice_link_status {
        u64 phy_type_low;
        u16 max_frame_size;
        u16 link_speed;
-       bool lse_ena;   /* Link Status Event notification */
+       u8 lse_ena;     /* Link Status Event notification */
        u8 link_info;
        u8 an_info;
        u8 ext_info;
@@ -101,7 +101,7 @@ struct ice_phy_info {
        struct ice_link_status link_info_old;
        u64 phy_type_low;
        enum ice_media_type media_type;
-       bool get_link_info;
+       u8 get_link_info;
 };
 
 /* Common HW capabilities for SW use */
@@ -167,7 +167,7 @@ struct ice_nvm_info {
        u32 oem_ver;              /* OEM version info */
        u16 sr_words;             /* Shadow RAM size in words */
        u16 ver;                  /* NVM package version */
-       bool blank_nvm_mode;      /* is NVM empty (no FW present) */
+       u8 blank_nvm_mode;        /* is NVM empty (no FW present) */
 };
 
 /* Max number of port to queue branches w.r.t topology */
@@ -181,7 +181,7 @@ struct ice_sched_node {
        struct ice_aqc_txsched_elem_data info;
        u32 agg_id;                     /* aggregator group id */
        u16 vsi_id;
-       bool in_use;                    /* suspended or in use */
+       u8 in_use;                      /* suspended or in use */
        u8 tx_sched_layer;              /* Logical Layer (1-9) */
        u8 num_children;
        u8 tc_num;
@@ -218,7 +218,7 @@ struct ice_sched_vsi_info {
 struct ice_sched_tx_policy {
        u16 max_num_vsis;
        u8 max_num_lan_qs_per_tc[ICE_MAX_TRAFFIC_CLASS];
-       bool rdma_ena;
+       u8 rdma_ena;
 };
 
 struct ice_port_info {
@@ -243,7 +243,7 @@ struct ice_port_info {
        struct list_head agg_list;      /* lists all aggregator */
        u8 lport;
 #define ICE_LPORT_MASK         0xff
-       bool is_vf;
+       u8 is_vf;
 };
 
 struct ice_switch_info {
@@ -287,7 +287,7 @@ struct ice_hw {
        u8 max_cgds;
        u8 sw_entry_point_layer;
 
-       bool evb_veb;           /* true for VEB, false for VEPA */
+       u8 evb_veb;             /* true for VEB, false for VEPA */
        struct ice_bus_info bus;
        struct ice_nvm_info nvm;
        struct ice_hw_dev_caps dev_caps;        /* device capabilities */
@@ -318,7 +318,7 @@ struct ice_hw {
        u8 itr_gran_100;
        u8 itr_gran_50;
        u8 itr_gran_25;
-       bool ucast_shared;      /* true if VSIs can share unicast addr */
+       u8 ucast_shared;        /* true if VSIs can share unicast addr */
 
 };
 
index f92f7918112de063700f12de3462a482999c8bb3..5acf3b743876a485f61002658dccba47a0ca3d59 100644 (file)
@@ -1649,7 +1649,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter)
        if (hw->phy.type == e1000_phy_m88)
                igb_phy_disable_receiver(adapter);
 
-       mdelay(500);
+       msleep(500);
        return 0;
 }
 
index d03c2f0d759260df50e9d71da5758912326e804f..a32c576c1e656c0102989413cad114d1d8f03771 100644 (file)
@@ -3873,7 +3873,7 @@ static int igb_sw_init(struct igb_adapter *adapter)
 
        adapter->mac_table = kcalloc(hw->mac.rar_entry_count,
                                     sizeof(struct igb_mac_addr),
-                                    GFP_ATOMIC);
+                                    GFP_KERNEL);
        if (!adapter->mac_table)
                return -ENOMEM;
 
@@ -3883,7 +3883,7 @@ static int igb_sw_init(struct igb_adapter *adapter)
 
        /* Setup and initialize a copy of the hw vlan table array */
        adapter->shadow_vfta = kcalloc(E1000_VLAN_FILTER_TBL_SIZE, sizeof(u32),
-                                      GFP_ATOMIC);
+                                      GFP_KERNEL);
        if (!adapter->shadow_vfta)
                return -ENOMEM;
 
@@ -5816,7 +5816,8 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
 
        if (skb->ip_summed != CHECKSUM_PARTIAL) {
 csum_failed:
-               if (!(first->tx_flags & IGB_TX_FLAGS_VLAN))
+               if (!(first->tx_flags & IGB_TX_FLAGS_VLAN) &&
+                   !tx_ring->launchtime_enable)
                        return;
                goto no_csum;
        }
index 43664adf7a3c120d024889ac59f42e2da5d5b1ae..d3e72d0f66ef428b08e4bd88508e05b734bc43a4 100644 (file)
@@ -771,14 +771,13 @@ ixgb_setup_rx_resources(struct ixgb_adapter *adapter)
        rxdr->size = rxdr->count * sizeof(struct ixgb_rx_desc);
        rxdr->size = ALIGN(rxdr->size, 4096);
 
-       rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
-                                       GFP_KERNEL);
+       rxdr->desc = dma_zalloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
+                                        GFP_KERNEL);
 
        if (!rxdr->desc) {
                vfree(rxdr->buffer_info);
                return -ENOMEM;
        }
-       memset(rxdr->desc, 0, rxdr->size);
 
        rxdr->next_to_clean = 0;
        rxdr->next_to_use = 0;
index 94b3165ff543055621326783d330da1f7b4272e7..ccd852ad62a4b109ff26ea40e7587024f8b0d198 100644 (file)
@@ -192,7 +192,7 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid,
        }
 
        /* alloc the udl from per cpu ddp pool */
-       ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_ATOMIC, &ddp->udp);
+       ddp->udl = dma_pool_alloc(ddp_pool->pool, GFP_KERNEL, &ddp->udp);
        if (!ddp->udl) {
                e_err(drv, "failed allocated ddp context\n");
                goto out_noddp_unmap;
@@ -760,7 +760,7 @@ int ixgbe_setup_fcoe_ddp_resources(struct ixgbe_adapter *adapter)
                return 0;
 
        /* Extra buffer to be shared by all DDPs for HW work around */
-       buffer = kmalloc(IXGBE_FCBUFF_MIN, GFP_ATOMIC);
+       buffer = kmalloc(IXGBE_FCBUFF_MIN, GFP_KERNEL);
        if (!buffer)
                return -ENOMEM;
 
index 447098005490926f67e5fb32f7c84b798e387eab..9a23d33a47ed52bfeb10d79d970e114ee4702d6e 100644 (file)
@@ -6201,7 +6201,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
 
        adapter->mac_table = kcalloc(hw->mac.num_rar_entries,
                                     sizeof(struct ixgbe_mac_addr),
-                                    GFP_ATOMIC);
+                                    GFP_KERNEL);
        if (!adapter->mac_table)
                return -ENOMEM;
 
@@ -6620,8 +6620,18 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
        struct ixgbe_adapter *adapter = netdev_priv(netdev);
 
        if (adapter->xdp_prog) {
-               e_warn(probe, "MTU cannot be changed while XDP program is loaded\n");
-               return -EPERM;
+               int new_frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN +
+                                    VLAN_HLEN;
+               int i;
+
+               for (i = 0; i < adapter->num_rx_queues; i++) {
+                       struct ixgbe_ring *ring = adapter->rx_ring[i];
+
+                       if (new_frame_size > ixgbe_rx_bufsz(ring)) {
+                               e_warn(probe, "Requested MTU size is not supported with XDP\n");
+                               return -EINVAL;
+                       }
+               }
        }
 
        /*
@@ -8983,6 +8993,15 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc)
 
 #ifdef CONFIG_IXGBE_DCB
        if (tc) {
+               if (adapter->xdp_prog) {
+                       e_warn(probe, "DCB is not supported with XDP\n");
+
+                       ixgbe_init_interrupt_scheme(adapter);
+                       if (netif_running(dev))
+                               ixgbe_open(dev);
+                       return -EINVAL;
+               }
+
                netdev_set_num_tc(dev, tc);
                ixgbe_set_prio_tc_map(adapter);
 
@@ -9171,14 +9190,12 @@ static int parse_tc_actions(struct ixgbe_adapter *adapter,
                            struct tcf_exts *exts, u64 *action, u8 *queue)
 {
        const struct tc_action *a;
-       LIST_HEAD(actions);
+       int i;
 
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
-
+       tcf_exts_for_each_action(i, a, exts) {
                /* Drop action */
                if (is_tcf_gact_shot(a)) {
                        *action = IXGBE_FDIR_DROP_QUEUE;
@@ -9936,6 +9953,11 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
        int tcs = adapter->hw_tcs ? : 1;
        int pool, err;
 
+       if (adapter->xdp_prog) {
+               e_warn(probe, "L2FW offload is not supported with XDP\n");
+               return ERR_PTR(-EINVAL);
+       }
+
        /* The hardware supported by ixgbe only filters on the destination MAC
         * address. In order to avoid issues we only support offloading modes
         * where the hardware can actually provide the functionality.
index 6f59933cdff7d5ff13620ced894036ddeb3052c3..3c6f01c41b788eb45730e49083f2025c7c0683f1 100644 (file)
@@ -53,6 +53,11 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
        struct ixgbe_hw *hw = &adapter->hw;
        int i;
 
+       if (adapter->xdp_prog) {
+               e_warn(probe, "SRIOV is not supported with XDP\n");
+               return -EINVAL;
+       }
+
        /* Enable VMDq flag so device will be set in VM mode */
        adapter->flags |= IXGBE_FLAG_SRIOV_ENABLED |
                          IXGBE_FLAG_VMDQ_ENABLED;
@@ -688,8 +693,13 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,
 static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
 {
        struct ixgbe_hw *hw = &adapter->hw;
+       struct ixgbe_ring_feature *vmdq = &adapter->ring_feature[RING_F_VMDQ];
        struct vf_data_storage *vfinfo = &adapter->vfinfo[vf];
+       u32 q_per_pool = __ALIGN_MASK(1, ~vmdq->mask);
        u8 num_tcs = adapter->hw_tcs;
+       u32 reg_val;
+       u32 queue;
+       u32 word;
 
        /* remove VLAN filters beloning to this VF */
        ixgbe_clear_vf_vlans(adapter, vf);
@@ -726,6 +736,27 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)
 
        /* reset VF api back to unknown */
        adapter->vfinfo[vf].vf_api = ixgbe_mbox_api_10;
+
+       /* Restart each queue for given VF */
+       for (queue = 0; queue < q_per_pool; queue++) {
+               unsigned int reg_idx = (vf * q_per_pool) + queue;
+
+               reg_val = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(reg_idx));
+
+               /* Re-enabling only configured queues */
+               if (reg_val) {
+                       reg_val |= IXGBE_TXDCTL_ENABLE;
+                       IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);
+                       reg_val &= ~IXGBE_TXDCTL_ENABLE;
+                       IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(reg_idx), reg_val);
+               }
+       }
+
+       /* Clear VF's mailbox memory */
+       for (word = 0; word < IXGBE_VFMAILBOX_SIZE; word++)
+               IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf), word, 0);
+
+       IXGBE_WRITE_FLUSH(hw);
 }
 
 static int ixgbe_set_vf_mac(struct ixgbe_adapter *adapter,
index 44cfb2021145b9be9284c3862c52abf5c5ba6f82..41bcbb337e837ff1dbeb8e6061ae92e9d050350c 100644 (file)
@@ -2518,6 +2518,7 @@ enum {
 /* Translated register #defines */
 #define IXGBE_PVFTDH(P)                (0x06010 + (0x40 * (P)))
 #define IXGBE_PVFTDT(P)                (0x06018 + (0x40 * (P)))
+#define IXGBE_PVFTXDCTL(P)     (0x06028 + (0x40 * (P)))
 #define IXGBE_PVFTDWBAL(P)     (0x06038 + (0x40 * (P)))
 #define IXGBE_PVFTDWBAH(P)     (0x0603C + (0x40 * (P)))
 
index 9131a1376e7dc540cc0238b0cf980bc54c9c19ae..9fed54017659de3b0f58a1287a7eff605c077f6c 100644 (file)
@@ -1982,14 +1982,15 @@ static bool modify_header_match_supported(struct mlx5_flow_spec *spec,
                goto out_ok;
 
        modify_ip_header = false;
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
+               int k;
+
                if (!is_tcf_pedit(a))
                        continue;
 
                nkeys = tcf_pedit_nkeys(a);
-               for (i = 0; i < nkeys; i++) {
-                       htype = tcf_pedit_htype(a, i);
+               for (k = 0; k < nkeys; k++) {
+                       htype = tcf_pedit_htype(a, k);
                        if (htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP4 ||
                            htype == TCA_PEDIT_KEY_EX_HDR_TYPE_IP6) {
                                modify_ip_header = true;
@@ -2053,15 +2054,14 @@ static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
        const struct tc_action *a;
        LIST_HEAD(actions);
        u32 action = 0;
-       int err;
+       int err, i;
 
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
 
        attr->flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
                if (is_tcf_gact_shot(a)) {
                        action |= MLX5_FLOW_CONTEXT_ACTION_DROP;
                        if (MLX5_CAP_FLOWTABLE(priv->mdev,
@@ -2666,7 +2666,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
        LIST_HEAD(actions);
        bool encap = false;
        u32 action = 0;
-       int err;
+       int err, i;
 
        if (!tcf_exts_has_actions(exts))
                return -EINVAL;
@@ -2674,8 +2674,7 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
        attr->in_rep = rpriv->rep;
        attr->in_mdev = priv->mdev;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
                if (is_tcf_gact_shot(a)) {
                        action |= MLX5_FLOW_CONTEXT_ACTION_DROP |
                                  MLX5_FLOW_CONTEXT_ACTION_COUNT;
index 6070d1591d1e77885185fa43e261ec4a80b5ae01..930700413b1d07dd8a62ffbabf47aea995d062cf 100644 (file)
@@ -1346,8 +1346,7 @@ static int mlxsw_sp_port_add_cls_matchall(struct mlxsw_sp_port *mlxsw_sp_port,
                return -ENOMEM;
        mall_tc_entry->cookie = f->cookie;
 
-       tcf_exts_to_list(f->exts, &actions);
-       a = list_first_entry(&actions, struct tc_action, list);
+       a = tcf_exts_first_action(f->exts);
 
        if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) {
                struct mlxsw_sp_port_mall_mirror_tc_entry *mirror;
index 3ae9301967410bca24e601e888b8b270b25c8e82..3cdb7aca90b72492f02fd4bce2c35ad6de76eaa9 100644 (file)
@@ -414,6 +414,8 @@ mlxsw_sp_netdevice_ipip_ul_event(struct mlxsw_sp *mlxsw_sp,
 void
 mlxsw_sp_port_vlan_router_leave(struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan);
 void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif);
+void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
+                                struct net_device *dev);
 
 /* spectrum_kvdl.c */
 enum mlxsw_sp_kvdl_entry_type {
index ebd1b24ebaa5dd48df775d9a0704bd81b8ed09df..8d211972c5e90fbe1a24dc32edf6f371ff018bd4 100644 (file)
@@ -21,8 +21,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
                                         struct netlink_ext_ack *extack)
 {
        const struct tc_action *a;
-       LIST_HEAD(actions);
-       int err;
+       int err, i;
 
        if (!tcf_exts_has_actions(exts))
                return 0;
@@ -32,8 +31,7 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
        if (err)
                return err;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
                if (is_tcf_gact_ok(a)) {
                        err = mlxsw_sp_acl_rulei_act_terminate(rulei);
                        if (err) {
index 3a96307f51b055e4bcf0693704118fd9d4e90995..2ab9cf25a08ae19788d28ffddaa8698ba2213152 100644 (file)
@@ -6234,6 +6234,17 @@ void mlxsw_sp_rif_destroy(struct mlxsw_sp_rif *rif)
        mlxsw_sp_vr_put(mlxsw_sp, vr);
 }
 
+void mlxsw_sp_rif_destroy_by_dev(struct mlxsw_sp *mlxsw_sp,
+                                struct net_device *dev)
+{
+       struct mlxsw_sp_rif *rif;
+
+       rif = mlxsw_sp_rif_find_by_dev(mlxsw_sp, dev);
+       if (!rif)
+               return;
+       mlxsw_sp_rif_destroy(rif);
+}
+
 static void
 mlxsw_sp_rif_subport_params_init(struct mlxsw_sp_rif_params *params,
                                 struct mlxsw_sp_port_vlan *mlxsw_sp_port_vlan)
index 0d8444aaba01ae7e5eddc58ef7dbc87ee5d1cb7b..db715da7bab7746c58ed23b48048d8a4917ca10d 100644 (file)
@@ -127,6 +127,24 @@ bool mlxsw_sp_bridge_device_is_offloaded(const struct mlxsw_sp *mlxsw_sp,
        return !!mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
 }
 
+static int mlxsw_sp_bridge_device_upper_rif_destroy(struct net_device *dev,
+                                                   void *data)
+{
+       struct mlxsw_sp *mlxsw_sp = data;
+
+       mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
+       return 0;
+}
+
+static void mlxsw_sp_bridge_device_rifs_destroy(struct mlxsw_sp *mlxsw_sp,
+                                               struct net_device *dev)
+{
+       mlxsw_sp_rif_destroy_by_dev(mlxsw_sp, dev);
+       netdev_walk_all_upper_dev_rcu(dev,
+                                     mlxsw_sp_bridge_device_upper_rif_destroy,
+                                     mlxsw_sp);
+}
+
 static struct mlxsw_sp_bridge_device *
 mlxsw_sp_bridge_device_create(struct mlxsw_sp_bridge *bridge,
                              struct net_device *br_dev)
@@ -165,6 +183,8 @@ static void
 mlxsw_sp_bridge_device_destroy(struct mlxsw_sp_bridge *bridge,
                               struct mlxsw_sp_bridge_device *bridge_device)
 {
+       mlxsw_sp_bridge_device_rifs_destroy(bridge->mlxsw_sp,
+                                           bridge_device->dev);
        list_del(&bridge_device->list);
        if (bridge_device->vlan_enabled)
                bridge->vlan_enabled_exists = false;
index 0ba0356ec4e6dcd47977436bfe228891c0114b55..9044496803e627e8a992fbcac23eb8e0201e1e76 100644 (file)
@@ -796,11 +796,10 @@ int nfp_flower_compile_action(struct nfp_app *app,
                              struct net_device *netdev,
                              struct nfp_fl_payload *nfp_flow)
 {
-       int act_len, act_cnt, err, tun_out_cnt, out_cnt;
+       int act_len, act_cnt, err, tun_out_cnt, out_cnt, i;
        enum nfp_flower_tun_type tun_type;
        const struct tc_action *a;
        u32 csum_updated = 0;
-       LIST_HEAD(actions);
 
        memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ);
        nfp_flow->meta.act_len = 0;
@@ -810,8 +809,7 @@ int nfp_flower_compile_action(struct nfp_app *app,
        tun_out_cnt = 0;
        out_cnt = 0;
 
-       tcf_exts_to_list(flow->exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, flow->exts) {
                err = nfp_flower_loop_action(app, a, flow, nfp_flow, &act_len,
                                             netdev, &tun_type, &tun_out_cnt,
                                             &out_cnt, &csum_updated);
index d9ab5add27a8bf06af92247b60158e6de2e316be..34193c2f169961a37617b84e675ee78df473d085 100644 (file)
@@ -407,7 +407,7 @@ static void qed_init_cmd_rd(struct qed_hwfn *p_hwfn,
 
        if (i == QED_INIT_MAX_POLL_COUNT) {
                DP_ERR(p_hwfn,
-                      "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparsion %08x)]\n",
+                      "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparison %08x)]\n",
                       addr, le32_to_cpu(cmd->expected_val),
                       val, le32_to_cpu(cmd->op_data));
        }
index d89a0e22f6e4307896cae0383889c7b5b8f05c22..5d37ec7e9b0b7b2bc3785ec00ce2e23314b7c955 100644 (file)
@@ -48,7 +48,7 @@
 #include "qed_reg_addr.h"
 #include "qed_sriov.h"
 
-#define CHIP_MCP_RESP_ITER_US 10
+#define QED_MCP_RESP_ITER_US   10
 
 #define QED_DRV_MB_MAX_RETRIES (500 * 1000)    /* Account for 5 sec */
 #define QED_MCP_RESET_RETRIES  (50 * 1000)     /* Account for 500 msec */
@@ -183,18 +183,57 @@ int qed_mcp_free(struct qed_hwfn *p_hwfn)
        return 0;
 }
 
+/* Maximum of 1 sec to wait for the SHMEM ready indication */
+#define QED_MCP_SHMEM_RDY_MAX_RETRIES  20
+#define QED_MCP_SHMEM_RDY_ITER_MS      50
+
 static int qed_load_mcp_offsets(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 {
        struct qed_mcp_info *p_info = p_hwfn->mcp_info;
+       u8 cnt = QED_MCP_SHMEM_RDY_MAX_RETRIES;
+       u8 msec = QED_MCP_SHMEM_RDY_ITER_MS;
        u32 drv_mb_offsize, mfw_mb_offsize;
        u32 mcp_pf_id = MCP_PF_ID(p_hwfn);
 
        p_info->public_base = qed_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR);
-       if (!p_info->public_base)
-               return 0;
+       if (!p_info->public_base) {
+               DP_NOTICE(p_hwfn,
+                         "The address of the MCP scratch-pad is not configured\n");
+               return -EINVAL;
+       }
 
        p_info->public_base |= GRCBASE_MCP;
 
+       /* Get the MFW MB address and number of supported messages */
+       mfw_mb_offsize = qed_rd(p_hwfn, p_ptt,
+                               SECTION_OFFSIZE_ADDR(p_info->public_base,
+                                                    PUBLIC_MFW_MB));
+       p_info->mfw_mb_addr = SECTION_ADDR(mfw_mb_offsize, mcp_pf_id);
+       p_info->mfw_mb_length = (u16)qed_rd(p_hwfn, p_ptt,
+                                           p_info->mfw_mb_addr +
+                                           offsetof(struct public_mfw_mb,
+                                                    sup_msgs));
+
+       /* The driver can notify that there was an MCP reset, and might read the
+        * SHMEM values before the MFW has completed initializing them.
+        * To avoid this, the "sup_msgs" field in the MFW mailbox is used as a
+        * data ready indication.
+        */
+       while (!p_info->mfw_mb_length && --cnt) {
+               msleep(msec);
+               p_info->mfw_mb_length =
+                       (u16)qed_rd(p_hwfn, p_ptt,
+                                   p_info->mfw_mb_addr +
+                                   offsetof(struct public_mfw_mb, sup_msgs));
+       }
+
+       if (!cnt) {
+               DP_NOTICE(p_hwfn,
+                         "Failed to get the SHMEM ready notification after %d msec\n",
+                         QED_MCP_SHMEM_RDY_MAX_RETRIES * msec);
+               return -EBUSY;
+       }
+
        /* Calculate the driver and MFW mailbox address */
        drv_mb_offsize = qed_rd(p_hwfn, p_ptt,
                                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)
                   "drv_mb_offsiz = 0x%x, drv_mb_addr = 0x%x mcp_pf_id = 0x%x\n",
                   drv_mb_offsize, p_info->drv_mb_addr, mcp_pf_id);
 
-       /* Set the MFW MB address */
-       mfw_mb_offsize = qed_rd(p_hwfn, p_ptt,
-                               SECTION_OFFSIZE_ADDR(p_info->public_base,
-                                                    PUBLIC_MFW_MB));
-       p_info->mfw_mb_addr = SECTION_ADDR(mfw_mb_offsize, mcp_pf_id);
-       p_info->mfw_mb_length = (u16)qed_rd(p_hwfn, p_ptt, p_info->mfw_mb_addr);
-
        /* Get the current driver mailbox sequence before sending
         * the first command
         */
@@ -285,9 +317,15 @@ static void qed_mcp_reread_offsets(struct qed_hwfn *p_hwfn,
 
 int qed_mcp_reset(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 {
-       u32 org_mcp_reset_seq, seq, delay = CHIP_MCP_RESP_ITER_US, cnt = 0;
+       u32 org_mcp_reset_seq, seq, delay = QED_MCP_RESP_ITER_US, cnt = 0;
        int rc = 0;
 
+       if (p_hwfn->mcp_info->b_block_cmd) {
+               DP_NOTICE(p_hwfn,
+                         "The MFW is not responsive. Avoid sending MCP_RESET mailbox command.\n");
+               return -EBUSY;
+       }
+
        /* Ensure that only a single thread is accessing the mailbox */
        spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
 
@@ -413,14 +451,41 @@ static void __qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                   (p_mb_params->cmd | seq_num), p_mb_params->param);
 }
 
+static void qed_mcp_cmd_set_blocking(struct qed_hwfn *p_hwfn, bool block_cmd)
+{
+       p_hwfn->mcp_info->b_block_cmd = block_cmd;
+
+       DP_INFO(p_hwfn, "%s sending of mailbox commands to the MFW\n",
+               block_cmd ? "Block" : "Unblock");
+}
+
+static void qed_mcp_print_cpu_info(struct qed_hwfn *p_hwfn,
+                                  struct qed_ptt *p_ptt)
+{
+       u32 cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2;
+       u32 delay = QED_MCP_RESP_ITER_US;
+
+       cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
+       cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
+       cpu_pc_0 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+       udelay(delay);
+       cpu_pc_1 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+       udelay(delay);
+       cpu_pc_2 = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
+
+       DP_NOTICE(p_hwfn,
+                 "MCP CPU info: mode 0x%08x, state 0x%08x, pc {0x%08x, 0x%08x, 0x%08x}\n",
+                 cpu_mode, cpu_state, cpu_pc_0, cpu_pc_1, cpu_pc_2);
+}
+
 static int
 _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                       struct qed_ptt *p_ptt,
                       struct qed_mcp_mb_params *p_mb_params,
-                      u32 max_retries, u32 delay)
+                      u32 max_retries, u32 usecs)
 {
+       u32 cnt = 0, msecs = DIV_ROUND_UP(usecs, 1000);
        struct qed_mcp_cmd_elem *p_cmd_elem;
-       u32 cnt = 0;
        u16 seq_num;
        int rc = 0;
 
@@ -443,7 +508,11 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                        goto err;
 
                spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
-               udelay(delay);
+
+               if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP))
+                       msleep(msecs);
+               else
+                       udelay(usecs);
        } while (++cnt < max_retries);
 
        if (cnt >= max_retries) {
@@ -472,7 +541,11 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                 * The spinlock stays locked until the list element is removed.
                 */
 
-               udelay(delay);
+               if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP))
+                       msleep(msecs);
+               else
+                       udelay(usecs);
+
                spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
 
                if (p_cmd_elem->b_is_completed)
@@ -491,11 +564,15 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                DP_NOTICE(p_hwfn,
                          "The MFW failed to respond to command 0x%08x [param 0x%08x].\n",
                          p_mb_params->cmd, p_mb_params->param);
+               qed_mcp_print_cpu_info(p_hwfn, p_ptt);
 
                spin_lock_bh(&p_hwfn->mcp_info->cmd_lock);
                qed_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
                spin_unlock_bh(&p_hwfn->mcp_info->cmd_lock);
 
+               if (!QED_MB_FLAGS_IS_SET(p_mb_params, AVOID_BLOCK))
+                       qed_mcp_cmd_set_blocking(p_hwfn, true);
+
                return -EAGAIN;
        }
 
@@ -507,7 +584,7 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                   "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n",
                   p_mb_params->mcp_resp,
                   p_mb_params->mcp_param,
-                  (cnt * delay) / 1000, (cnt * delay) % 1000);
+                  (cnt * usecs) / 1000, (cnt * usecs) % 1000);
 
        /* Clear the sequence number from the MFW response */
        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,
 {
        size_t union_data_size = sizeof(union drv_union_data);
        u32 max_retries = QED_DRV_MB_MAX_RETRIES;
-       u32 delay = CHIP_MCP_RESP_ITER_US;
+       u32 usecs = QED_MCP_RESP_ITER_US;
 
        /* MCP not initialized */
        if (!qed_mcp_is_init(p_hwfn)) {
@@ -533,6 +610,13 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                return -EBUSY;
        }
 
+       if (p_hwfn->mcp_info->b_block_cmd) {
+               DP_NOTICE(p_hwfn,
+                         "The MFW is not responsive. Avoid sending mailbox command 0x%08x [param 0x%08x].\n",
+                         p_mb_params->cmd, p_mb_params->param);
+               return -EBUSY;
+       }
+
        if (p_mb_params->data_src_size > union_data_size ||
            p_mb_params->data_dst_size > union_data_size) {
                DP_ERR(p_hwfn,
@@ -542,8 +626,13 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
                return -EINVAL;
        }
 
+       if (QED_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP)) {
+               max_retries = DIV_ROUND_UP(max_retries, 1000);
+               usecs *= 1000;
+       }
+
        return _qed_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, max_retries,
-                                     delay);
+                                     usecs);
 }
 
 int qed_mcp_cmd(struct qed_hwfn *p_hwfn,
@@ -761,6 +850,7 @@ __qed_mcp_load_req(struct qed_hwfn *p_hwfn,
        mb_params.data_src_size = sizeof(load_req);
        mb_params.p_data_dst = &load_rsp;
        mb_params.data_dst_size = sizeof(load_rsp);
+       mb_params.flags = QED_MB_FLAG_CAN_SLEEP | QED_MB_FLAG_AVOID_BLOCK;
 
        DP_VERBOSE(p_hwfn, QED_MSG_SP,
                   "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,
 
 int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 {
-       u32 wol_param, mcp_resp, mcp_param;
+       struct qed_mcp_mb_params mb_params;
+       u32 wol_param;
 
        switch (p_hwfn->cdev->wol_config) {
        case QED_OV_WOL_DISABLED:
@@ -1000,8 +1091,12 @@ int qed_mcp_unload_req(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
                wol_param = DRV_MB_PARAM_UNLOAD_WOL_MCP;
        }
 
-       return qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_UNLOAD_REQ, wol_param,
-                          &mcp_resp, &mcp_param);
+       memset(&mb_params, 0, sizeof(mb_params));
+       mb_params.cmd = DRV_MSG_CODE_UNLOAD_REQ;
+       mb_params.param = wol_param;
+       mb_params.flags = QED_MB_FLAG_CAN_SLEEP | QED_MB_FLAG_AVOID_BLOCK;
+
+       return qed_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
 }
 
 int 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,
        return rc;
 }
 
+/* A maximal 100 msec waiting time for the MCP to halt */
+#define QED_MCP_HALT_SLEEP_MS          10
+#define QED_MCP_HALT_MAX_RETRIES       10
+
 int qed_mcp_halt(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 {
-       u32 resp = 0, param = 0;
+       u32 resp = 0, param = 0, cpu_state, cnt = 0;
        int rc;
 
        rc = qed_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MCP_HALT, 0, &resp,
                         &param);
-       if (rc)
+       if (rc) {
                DP_ERR(p_hwfn, "MCP response failure, aborting\n");
+               return rc;
+       }
 
-       return rc;
+       do {
+               msleep(QED_MCP_HALT_SLEEP_MS);
+               cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
+               if (cpu_state & MCP_REG_CPU_STATE_SOFT_HALTED)
+                       break;
+       } while (++cnt < QED_MCP_HALT_MAX_RETRIES);
+
+       if (cnt == QED_MCP_HALT_MAX_RETRIES) {
+               DP_NOTICE(p_hwfn,
+                         "Failed to halt the MCP [CPU_MODE = 0x%08x, CPU_STATE = 0x%08x]\n",
+                         qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE), cpu_state);
+               return -EBUSY;
+       }
+
+       qed_mcp_cmd_set_blocking(p_hwfn, true);
+
+       return 0;
 }
 
+#define QED_MCP_RESUME_SLEEP_MS        10
+
 int qed_mcp_resume(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 {
-       u32 value, cpu_mode;
+       u32 cpu_mode, cpu_state;
 
        qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_STATE, 0xffffffff);
 
-       value = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
-       value &= ~MCP_REG_CPU_MODE_SOFT_HALT;
-       qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, value);
        cpu_mode = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
+       cpu_mode &= ~MCP_REG_CPU_MODE_SOFT_HALT;
+       qed_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, cpu_mode);
+       msleep(QED_MCP_RESUME_SLEEP_MS);
+       cpu_state = qed_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
 
-       return (cpu_mode & MCP_REG_CPU_MODE_SOFT_HALT) ? -EAGAIN : 0;
+       if (cpu_state & MCP_REG_CPU_STATE_SOFT_HALTED) {
+               DP_NOTICE(p_hwfn,
+                         "Failed to resume the MCP [CPU_MODE = 0x%08x, CPU_STATE = 0x%08x]\n",
+                         cpu_mode, cpu_state);
+               return -EBUSY;
+       }
+
+       qed_mcp_cmd_set_blocking(p_hwfn, false);
+
+       return 0;
 }
 
 int qed_mcp_ov_update_current_config(struct qed_hwfn *p_hwfn,
index 047976d5c6e962e19323bd5fb6ce99abbd92aa2e..85e6b3989e7a913c7157f27ff27469e6cbf1f3aa 100644 (file)
@@ -635,11 +635,14 @@ struct qed_mcp_info {
         */
        spinlock_t                              cmd_lock;
 
+       /* Flag to indicate whether sending a MFW mailbox command is blocked */
+       bool                                    b_block_cmd;
+
        /* Spinlock used for syncing SW link-changes and link-changes
         * originating from attention context.
         */
        spinlock_t                              link_lock;
-       bool                                    block_mb_sending;
+
        u32                                     public_base;
        u32                                     drv_mb_addr;
        u32                                     mfw_mb_addr;
@@ -660,14 +663,20 @@ struct qed_mcp_info {
 };
 
 struct qed_mcp_mb_params {
-       u32                     cmd;
-       u32                     param;
-       void                    *p_data_src;
-       u8                      data_src_size;
-       void                    *p_data_dst;
-       u8                      data_dst_size;
-       u32                     mcp_resp;
-       u32                     mcp_param;
+       u32 cmd;
+       u32 param;
+       void *p_data_src;
+       void *p_data_dst;
+       u8 data_src_size;
+       u8 data_dst_size;
+       u32 mcp_resp;
+       u32 mcp_param;
+       u32 flags;
+#define QED_MB_FLAG_CAN_SLEEP  (0x1 << 0)
+#define QED_MB_FLAG_AVOID_BLOCK        (0x1 << 1)
+#define QED_MB_FLAGS_IS_SET(params, flag) \
+       ({ typeof(params) __params = (params); \
+          (__params && (__params->flags & QED_MB_FLAG_ ## flag)); })
 };
 
 struct qed_drv_tlv_hdr {
index d8ad2dcad8d5ef589252eb797556359ebe89fbcb..f736f70956fd3763f3f94bffa0e009dec28b9516 100644 (file)
        0
 #define MCP_REG_CPU_STATE \
        0xe05004UL
+#define MCP_REG_CPU_STATE_SOFT_HALTED  (0x1UL << 10)
 #define MCP_REG_CPU_EVENT_MASK \
        0xe05008UL
+#define MCP_REG_CPU_PROGRAM_COUNTER    0xe0501cUL
 #define PGLUE_B_REG_PF_BAR0_SIZE \
        0x2aae60UL
 #define PGLUE_B_REG_PF_BAR1_SIZE \
index 9673d19308e65c37a7ad42e5752ac9f8238b7d4f..b16ce7d93caff5802e41b79ecb8e8b8e5fc78ed5 100644 (file)
@@ -2006,18 +2006,16 @@ int qede_get_arfs_filter_count(struct qede_dev *edev)
 static int qede_parse_actions(struct qede_dev *edev,
                              struct tcf_exts *exts)
 {
-       int rc = -EINVAL, num_act = 0;
+       int rc = -EINVAL, num_act = 0, i;
        const struct tc_action *a;
        bool is_drop = false;
-       LIST_HEAD(actions);
 
        if (!tcf_exts_has_actions(exts)) {
                DP_NOTICE(edev, "No tc actions received\n");
                return rc;
        }
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(a, &actions, list) {
+       tcf_exts_for_each_action(i, a, exts) {
                num_act++;
 
                if (is_tcf_gact_shot(a))
index 353f1c129af1e247e1a8ddaa6d316edfc285682d..059ba9429e51a3193f3af73c16a20ce94ef42844 100644 (file)
@@ -2384,26 +2384,20 @@ static int qlge_update_hw_vlan_features(struct net_device *ndev,
        return status;
 }
 
-static netdev_features_t qlge_fix_features(struct net_device *ndev,
-       netdev_features_t features)
-{
-       int err;
-
-       /* Update the behavior of vlan accel in the adapter */
-       err = qlge_update_hw_vlan_features(ndev, features);
-       if (err)
-               return err;
-
-       return features;
-}
-
 static int qlge_set_features(struct net_device *ndev,
        netdev_features_t features)
 {
        netdev_features_t changed = ndev->features ^ features;
+       int err;
+
+       if (changed & NETIF_F_HW_VLAN_CTAG_RX) {
+               /* Update the behavior of vlan accel in the adapter */
+               err = qlge_update_hw_vlan_features(ndev, features);
+               if (err)
+                       return err;
 
-       if (changed & NETIF_F_HW_VLAN_CTAG_RX)
                qlge_vlan_mode(ndev, features);
+       }
 
        return 0;
 }
@@ -4719,7 +4713,6 @@ static const struct net_device_ops qlge_netdev_ops = {
        .ndo_set_mac_address    = qlge_set_mac_address,
        .ndo_validate_addr      = eth_validate_addr,
        .ndo_tx_timeout         = qlge_tx_timeout,
-       .ndo_fix_features       = qlge_fix_features,
        .ndo_set_features       = qlge_set_features,
        .ndo_vlan_rx_add_vid    = qlge_vlan_rx_add_vid,
        .ndo_vlan_rx_kill_vid   = qlge_vlan_rx_kill_vid,
index b81f4faf7b10114df1f17a0c0d80881e8ea9c5ea..1470fc12282b255181838457ff6a07a362e3e321 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Renesas Ethernet AVB device driver
  *
  * Copyright (C) 2014-2015 Renesas Electronics Corporation
@@ -5,10 +6,6 @@
  * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
  *
  * Based on the SuperH Ethernet driver
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License version 2,
- * as published by the Free Software Foundation.
  */
 
 #ifndef __RAVB_H__
index c06f2df895c2c3e432fc8341f15cc77b0550db11..aff5516b781e27067efc9c1cca19f11bea19dd19 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Renesas Ethernet AVB device driver
  *
  * Copyright (C) 2014-2015 Renesas Electronics Corporation
@@ -5,10 +6,6 @@
  * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
  *
  * Based on the SuperH Ethernet driver
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License version 2,
- * as published by the Free Software Foundation.
  */
 
 #include <linux/cache.h>
index 5573199c4536c283164351ca17d4377ad5a6c6a2..ad4433d592377a9ee2b65753cf61f02735f90518 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*  SuperH Ethernet device driver
  *
  *  Copyright (C) 2014 Renesas Electronics Corporation
@@ -5,18 +6,6 @@
  *  Copyright (C) 2008-2014 Renesas Solutions Corp.
  *  Copyright (C) 2013-2017 Cogent Embedded, Inc.
  *  Copyright (C) 2014 Codethink Limited
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms and conditions of the GNU General Public License,
- *  version 2, as published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- *  more details.
- *
- *  The full GNU General Public License is included in this distribution in
- *  the file called "COPYING".
  */
 
 #include <linux/module.h>
index f94be99cf4002190347014d7643387883556981a..0c18650bbfe69f7c22a78a87b1c263bd4f2e15e5 100644 (file)
@@ -1,19 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*  SuperH Ethernet device driver
  *
  *  Copyright (C) 2006-2012 Nobuhiro Iwamatsu
  *  Copyright (C) 2008-2012 Renesas Solutions Corp.
- *
- *  This program is free software; you can redistribute it and/or modify it
- *  under the terms and conditions of the GNU General Public License,
- *  version 2, as published by the Free Software Foundation.
- *
- *  This program is distributed in the hope it will be useful, but WITHOUT
- *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- *  more details.
- *
- *  The full GNU General Public License is included in this distribution in
- *  the file called "COPYING".
  */
 
 #ifndef __SH_ETH_H__
index edf20361ea5f15c7ddee617f899e31b92d7e261e..bf4acebb6bcddd8807041a75c000251bbc28f19d 100644 (file)
@@ -33,7 +33,7 @@ config DWMAC_DWC_QOS_ETH
        select PHYLIB
        select CRC32
        select MII
-       depends on OF && COMMON_CLK && HAS_DMA
+       depends on OF && HAS_DMA
        help
          Support for chips using the snps,dwc-qos-ethernet.txt DT binding.
 
@@ -57,7 +57,7 @@ config DWMAC_ANARION
 config DWMAC_IPQ806X
        tristate "QCA IPQ806x DWMAC support"
        default ARCH_QCOM
-       depends on OF && COMMON_CLK && (ARCH_QCOM || COMPILE_TEST)
+       depends on OF && (ARCH_QCOM || COMPILE_TEST)
        select MFD_SYSCON
        help
          Support for QCA IPQ806X DWMAC Ethernet.
@@ -100,7 +100,7 @@ config DWMAC_OXNAS
 config DWMAC_ROCKCHIP
        tristate "Rockchip dwmac support"
        default ARCH_ROCKCHIP
-       depends on OF && COMMON_CLK && (ARCH_ROCKCHIP || COMPILE_TEST)
+       depends on OF && (ARCH_ROCKCHIP || COMPILE_TEST)
        select MFD_SYSCON
        help
          Support for Ethernet controller on Rockchip RK3288 SoC.
@@ -123,7 +123,7 @@ config DWMAC_SOCFPGA
 config DWMAC_STI
        tristate "STi GMAC support"
        default ARCH_STI
-       depends on OF && COMMON_CLK && (ARCH_STI || COMPILE_TEST)
+       depends on OF && (ARCH_STI || COMPILE_TEST)
        select MFD_SYSCON
        ---help---
          Support for ethernet controller on STi SOCs.
@@ -147,7 +147,7 @@ config DWMAC_STM32
 config DWMAC_SUNXI
        tristate "Allwinner GMAC support"
        default ARCH_SUNXI
-       depends on OF && COMMON_CLK && (ARCH_SUNXI || COMPILE_TEST)
+       depends on OF && (ARCH_SUNXI || COMPILE_TEST)
        ---help---
          Support for Allwinner A20/A31 GMAC ethernet controllers.
 
index 1a96dd9c1091e6c515753132c4a3fd0128f41bdf..531294f4978bc42bbb0e3cb0177b1312a33bef61 100644 (file)
@@ -61,7 +61,7 @@ static int tc_fill_actions(struct stmmac_tc_entry *entry,
        struct stmmac_tc_entry *action_entry = entry;
        const struct tc_action *act;
        struct tcf_exts *exts;
-       LIST_HEAD(actions);
+       int i;
 
        exts = cls->knode.exts;
        if (!tcf_exts_has_actions(exts))
@@ -69,8 +69,7 @@ static int tc_fill_actions(struct stmmac_tc_entry *entry,
        if (frag)
                action_entry = frag;
 
-       tcf_exts_to_list(exts, &actions);
-       list_for_each_entry(act, &actions, list) {
+       tcf_exts_for_each_action(i, act, exts) {
                /* Accept */
                if (is_tcf_gact_ok(act)) {
                        action_entry->val.af = 1;
index 507f68190cb1b4cbf88b8a441a040f8aacafd1d4..1121a1ec407cd0951e938572fd27c4fa93ca3c85 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/pci.h>
 #include <linux/skbuff.h>
 #include <linux/if_vlan.h>
 #include <linux/in.h>
@@ -2039,12 +2040,16 @@ static int netvsc_register_vf(struct net_device *vf_netdev)
 {
        struct net_device *ndev;
        struct net_device_context *net_device_ctx;
+       struct device *pdev = vf_netdev->dev.parent;
        struct netvsc_device *netvsc_dev;
        int ret;
 
        if (vf_netdev->addr_len != ETH_ALEN)
                return NOTIFY_DONE;
 
+       if (!pdev || !dev_is_pci(pdev) || dev_is_pf(pdev))
+               return NOTIFY_DONE;
+
        /*
         * We will use the MAC address to locate the synthetic interface to
         * associate with the VF interface. If we don't find a matching
index 97742708460bc8a415713537ff90060c07b07d27..2cd71bdb6484c774659598fff1e99cd49181337b 100644 (file)
@@ -5217,8 +5217,8 @@ static int rtl8152_probe(struct usb_interface *intf,
                netdev->hw_features &= ~NETIF_F_RXCSUM;
        }
 
-       if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 &&
-           udev->serial && !strcmp(udev->serial, "000001000000")) {
+       if (le16_to_cpu(udev->descriptor.bcdDevice) == 0x3011 && udev->serial &&
+           (!strcmp(udev->serial, "000001000000") || !strcmp(udev->serial, "000002000000"))) {
                dev_info(&udev->dev, "Dell TB16 Dock, disable RX aggregation");
                set_bit(DELL_TB_RX_AGG_BUG, &tp->flags);
        }
index 1b9951d2067e631de9115b1845dcc2e050069c0e..d668682f91dfdb3428e02a44df2c8ade9ccf0042 100644 (file)
@@ -316,6 +316,14 @@ static bool nvme_dbbuf_update_and_check_event(u16 value, u32 *dbbuf_db,
                old_value = *dbbuf_db;
                *dbbuf_db = value;
 
+               /*
+                * Ensure that the doorbell is updated before reading the event
+                * index from memory.  The controller needs to provide similar
+                * ordering to ensure the envent index is updated before reading
+                * the doorbell.
+                */
+               mb();
+
                if (!nvme_dbbuf_need_event(*dbbuf_ei, value, old_value))
                        return false;
        }
index ebf3e7a6c49ee27003c1e667501eb9d5441791d0..b5ec96abd04870209ed7ea97452180cf6cb63038 100644 (file)
@@ -1210,7 +1210,7 @@ static int __init nvmet_init(void)
 
        error = nvmet_init_discovery();
        if (error)
-               goto out;
+               goto out_free_work_queue;
 
        error = nvmet_init_configfs();
        if (error)
@@ -1219,6 +1219,8 @@ static int __init nvmet_init(void)
 
 out_exit_discovery:
        nvmet_exit_discovery();
+out_free_work_queue:
+       destroy_workqueue(buffered_io_wq);
 out:
        return error;
 }
index 34712def81b15a566bb16a7e320ec7012796cf27..5251689a1d9ac2e5a5852c724f7f54d2ec80801c 100644 (file)
@@ -311,7 +311,7 @@ fcloop_tgt_lsrqst_done_work(struct work_struct *work)
        struct fcloop_tport *tport = tls_req->tport;
        struct nvmefc_ls_req *lsreq = tls_req->lsreq;
 
-       if (tport->remoteport)
+       if (!tport || tport->remoteport)
                lsreq->done(lsreq, tls_req->status);
 }
 
@@ -329,6 +329,7 @@ fcloop_ls_req(struct nvme_fc_local_port *localport,
 
        if (!rport->targetport) {
                tls_req->status = -ECONNREFUSED;
+               tls_req->tport = NULL;
                schedule_work(&tls_req->work);
                return ret;
        }
index 466e3c8582f0fd62628b90872b2046971e064776..9095b8290150c5bd2b8da3916d9f6c9243f24c56 100644 (file)
@@ -54,6 +54,28 @@ DEFINE_MUTEX(of_mutex);
  */
 DEFINE_RAW_SPINLOCK(devtree_lock);
 
+bool of_node_name_eq(const struct device_node *np, const char *name)
+{
+       const char *node_name;
+       size_t len;
+
+       if (!np)
+               return false;
+
+       node_name = kbasename(np->full_name);
+       len = strchrnul(node_name, '@') - node_name;
+
+       return (strlen(name) == len) && (strncmp(node_name, name, len) == 0);
+}
+
+bool of_node_name_prefix(const struct device_node *np, const char *prefix)
+{
+       if (!np)
+               return false;
+
+       return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0;
+}
+
 int of_n_addr_cells(struct device_node *np)
 {
        u32 cells;
@@ -719,6 +741,31 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
 }
 EXPORT_SYMBOL(of_get_next_available_child);
 
+/**
+ * of_get_compatible_child - Find compatible child node
+ * @parent:    parent node
+ * @compatible:        compatible string
+ *
+ * Lookup child node whose compatible property contains the given compatible
+ * string.
+ *
+ * Returns a node pointer with refcount incremented, use of_node_put() on it
+ * when done; or NULL if not found.
+ */
+struct device_node *of_get_compatible_child(const struct device_node *parent,
+                               const char *compatible)
+{
+       struct device_node *child;
+
+       for_each_child_of_node(parent, child) {
+               if (of_device_is_compatible(child, compatible))
+                       break;
+       }
+
+       return child;
+}
+EXPORT_SYMBOL(of_get_compatible_child);
+
 /**
  *     of_get_child_by_name - Find the child node by name for a given parent
  *     @node:  parent node
index 977a8307fbb1a4e0d66cb1c619834472bfe0d1ea..4f28165592056d5ec90309c5bff737f5ba66ea0b 100644 (file)
@@ -260,10 +260,13 @@ static int of_thermal_set_mode(struct thermal_zone_device *tz,
 
        mutex_lock(&tz->lock);
 
-       if (mode == THERMAL_DEVICE_ENABLED)
+       if (mode == THERMAL_DEVICE_ENABLED) {
                tz->polling_delay = data->polling_delay;
-       else
+               tz->passive_delay = data->passive_delay;
+       } else {
                tz->polling_delay = 0;
+               tz->passive_delay = 0;
+       }
 
        mutex_unlock(&tz->lock);
 
index c866cc1659606726584e47b6e74ff59fe2d6aa51..450ed66edf582b4c6c77e3a376a17173cfdf57b9 100644 (file)
@@ -1,16 +1,6 @@
-/*
- * Copyright 2016 Freescale Semiconductor, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- */
+// SPDX-License-Identifier: GPL-2.0
+//
+// Copyright 2016 Freescale Semiconductor, Inc.
 
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -197,7 +187,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        int ret;
        struct qoriq_tmu_data *data;
        struct device_node *np = pdev->dev.of_node;
-       u32 site = 0;
+       u32 site;
 
        if (!np) {
                dev_err(&pdev->dev, "Device OF-Node is NULL");
@@ -233,8 +223,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        if (ret < 0)
                goto err_tmu;
 
-       data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id,
-                               data, &tmu_tz_ops);
+       data->tz = devm_thermal_zone_of_sensor_register(&pdev->dev,
+                                                       data->sensor_id,
+                                                       data, &tmu_tz_ops);
        if (IS_ERR(data->tz)) {
                ret = PTR_ERR(data->tz);
                dev_err(&pdev->dev,
@@ -243,7 +234,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev)
        }
 
        /* Enable monitoring */
-       site |= 0x1 << (15 - data->sensor_id);
+       site = 0x1 << (15 - data->sensor_id);
        tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr);
 
        return 0;
@@ -261,8 +252,6 @@ static int qoriq_tmu_remove(struct platform_device *pdev)
 {
        struct qoriq_tmu_data *data = platform_get_drvdata(pdev);
 
-       thermal_zone_of_sensor_unregister(&pdev->dev, data->tz);
-
        /* Disable monitoring */
        tmu_write(data, TMR_DISABLE, &data->regs->tmr);
 
index 766521eb70715a1ff6c9a6b93434ec47d8716c49..7aed5337bdd35b3b3214372e7d5f9a01cf26789c 100644 (file)
@@ -1,19 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  R-Car Gen3 THS thermal sensor driver
  *  Based on rcar_thermal.c and work from Hien Dang and Khiem Nguyen.
  *
  * Copyright (C) 2016 Renesas Electronics Corporation.
  * Copyright (C) 2016 Sang Engineering
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  General Public License for more details.
- *
  */
 #include <linux/delay.h>
 #include <linux/err.h>
index e77e63070e998e1d997537ca88da1e7dd4ea533c..78f932822d381c9dbc013aee618be56e533baaab 100644 (file)
@@ -1,21 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  *  R-Car THS/TSC thermal sensor driver
  *
  * Copyright (C) 2012 Renesas Solutions Corp.
  * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; version 2 of the License.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 #include <linux/delay.h>
 #include <linux/err.h>
@@ -660,6 +648,6 @@ static struct platform_driver rcar_thermal_driver = {
 };
 module_platform_driver(rcar_thermal_driver);
 
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("R-Car THS/TSC thermal sensor driver");
 MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
index 96c1d8400822a3d852553e5baddaaed9907d7f71..b13c6b4b2c665a332a40aeada1eaa1e421d9a4aa 100644 (file)
@@ -952,7 +952,7 @@ static void vhost_iotlb_notify_vq(struct vhost_dev *d,
        list_for_each_entry_safe(node, n, &d->pending_list, node) {
                struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb;
                if (msg->iova <= vq_msg->iova &&
-                   msg->iova + msg->size - 1 > vq_msg->iova &&
+                   msg->iova + msg->size - 1 >= vq_msg->iova &&
                    vq_msg->type == VHOST_IOTLB_MISS) {
                        vhost_poll_queue(&node->vq->poll);
                        list_del(&node->node);
index f2088838f690b218a4f16ee0a56bfa23a08acb73..5b471889d7237c926682392b123db99e7ab6656f 100644 (file)
@@ -402,10 +402,19 @@ static ssize_t modalias_show(struct device *dev,
 }
 static DEVICE_ATTR_RO(modalias);
 
+static ssize_t state_show(struct device *dev,
+                           struct device_attribute *attr, char *buf)
+{
+       return sprintf(buf, "%s\n",
+                       xenbus_strstate(to_xenbus_device(dev)->state));
+}
+static DEVICE_ATTR_RO(state);
+
 static struct attribute *xenbus_dev_attrs[] = {
        &dev_attr_nodename.attr,
        &dev_attr_devtype.attr,
        &dev_attr_modalias.attr,
+       &dev_attr_state.attr,
        NULL,
 };
 
index 4cc679d5bf58c7bc0d0a7eb09cbc07ab0575197d..6f1ae3ac97896c6fff85e947b9fe7a6553368457 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/buffer_head.h>
 #include <linux/task_io_accounting_ops.h>
 #include <linux/bio.h>
-#include <linux/notifier.h>
 #include <linux/cpu.h>
 #include <linux/bitops.h>
 #include <linux/mpage.h>
index ec3fba7d492f483e14accbfd98d5b63550f2591c..488a9e7f8f66020f4424b322db62eacdcbbdd057 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/mpage.h>
 #include <linux/user_namespace.h>
 #include <linux/seq_file.h>
+#include <linux/blkdev.h>
 
 #include "isofs.h"
 #include "zisofs.h"
@@ -653,6 +654,12 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
        /*
         * What if bugger tells us to go beyond page size?
         */
+       if (bdev_logical_block_size(s->s_bdev) > 2048) {
+               printk(KERN_WARNING
+                      "ISOFS: unsupported/invalid hardware sector size %d\n",
+                       bdev_logical_block_size(s->s_bdev));
+               goto out_freesbi;
+       }
        opt.blocksize = sb_min_blocksize(s, opt.blocksize);
 
        sbi->s_high_sierra = 0; /* default is iso9660 */
index 05506d60131c69d546f574e9633f7d01039c70c6..59cdb27826defe2ddac7023438132c1b80a49c29 100644 (file)
@@ -132,13 +132,13 @@ static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn)
        struct fsnotify_mark *mark;
 
        assert_spin_locked(&conn->lock);
+       /* We can get detached connector here when inode is getting unlinked. */
+       if (!fsnotify_valid_obj_type(conn->type))
+               return;
        hlist_for_each_entry(mark, &conn->list, obj_list) {
                if (mark->flags & FSNOTIFY_MARK_FLAG_ATTACHED)
                        new_mask |= mark->mask;
        }
-       if (WARN_ON(!fsnotify_valid_obj_type(conn->type)))
-               return;
-
        *fsnotify_conn_mask_p(conn) = new_mask;
 }
 
index 860bfbe7a07aa5b9a4491365b48655122fa5eb60..f0cbf58ad4dade2129c19d5dba42c8bb4eed276d 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/quotaops.h>
 #include <linux/types.h>
 #include <linux/writeback.h>
+#include <linux/nospec.h>
 
 static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
                                     qid_t id)
@@ -120,8 +121,6 @@ static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
        struct if_dqinfo uinfo;
        int ret;
 
-       /* This checks whether qc_state has enough entries... */
-       BUILD_BUG_ON(MAXQUOTAS > XQM_MAXQUOTAS);
        if (!sb->s_qcop->get_state)
                return -ENOSYS;
        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)
         * GETXSTATE quotactl has space for just one set of time limits so
         * report them for the first enabled quota type
         */
-       for (type = 0; type < XQM_MAXQUOTAS; type++)
+       for (type = 0; type < MAXQUOTAS; type++)
                if (state.s_state[type].flags & QCI_ACCT_ENABLED)
                        break;
-       BUG_ON(type == XQM_MAXQUOTAS);
+       BUG_ON(type == MAXQUOTAS);
        fqs->qs_btimelimit = state.s_state[type].spc_timelimit;
        fqs->qs_itimelimit = state.s_state[type].ino_timelimit;
        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)
         * GETXSTATV quotactl has space for just one set of time limits so
         * report them for the first enabled quota type
         */
-       for (type = 0; type < XQM_MAXQUOTAS; type++)
+       for (type = 0; type < MAXQUOTAS; type++)
                if (state.s_state[type].flags & QCI_ACCT_ENABLED)
                        break;
-       BUG_ON(type == XQM_MAXQUOTAS);
+       BUG_ON(type == MAXQUOTAS);
        fqs->qs_btimelimit = state.s_state[type].spc_timelimit;
        fqs->qs_itimelimit = state.s_state[type].ino_timelimit;
        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,
 {
        int ret;
 
-       if (type >= (XQM_COMMAND(cmd) ? XQM_MAXQUOTAS : MAXQUOTAS))
+       if (type >= MAXQUOTAS)
                return -EINVAL;
+       type = array_index_nospec(type, MAXQUOTAS);
        /*
         * Quota not supported on this fs? Check this before s_quota_types
         * since they needn't be set if quota is not supported at all.
index 3040dc2a32f6a17a4822343497577e871b03161c..6f515651a2c2fe3817c763e3d77d351509a862d9 100644 (file)
@@ -764,9 +764,7 @@ static int udf_find_fileset(struct super_block *sb,
                            struct kernel_lb_addr *root)
 {
        struct buffer_head *bh = NULL;
-       long lastblock;
        uint16_t ident;
-       struct udf_sb_info *sbi;
 
        if (fileset->logicalBlockNum != 0xFFFFFFFF ||
            fileset->partitionReferenceNum != 0xFFFF) {
@@ -779,69 +777,11 @@ static int udf_find_fileset(struct super_block *sb,
                        return 1;
                }
 
-       }
-
-       sbi = UDF_SB(sb);
-       if (!bh) {
-               /* Search backwards through the partitions */
-               struct kernel_lb_addr newfileset;
-
-/* --> cvg: FIXME - is it reasonable? */
-               return 1;
-
-               for (newfileset.partitionReferenceNum = sbi->s_partitions - 1;
-                    (newfileset.partitionReferenceNum != 0xFFFF &&
-                     fileset->logicalBlockNum == 0xFFFFFFFF &&
-                     fileset->partitionReferenceNum == 0xFFFF);
-                    newfileset.partitionReferenceNum--) {
-                       lastblock = sbi->s_partmaps
-                                       [newfileset.partitionReferenceNum]
-                                               .s_partition_len;
-                       newfileset.logicalBlockNum = 0;
-
-                       do {
-                               bh = udf_read_ptagged(sb, &newfileset, 0,
-                                                     &ident);
-                               if (!bh) {
-                                       newfileset.logicalBlockNum++;
-                                       continue;
-                               }
-
-                               switch (ident) {
-                               case TAG_IDENT_SBD:
-                               {
-                                       struct spaceBitmapDesc *sp;
-                                       sp = (struct spaceBitmapDesc *)
-                                                               bh->b_data;
-                                       newfileset.logicalBlockNum += 1 +
-                                               ((le32_to_cpu(sp->numOfBytes) +
-                                                 sizeof(struct spaceBitmapDesc)
-                                                 - 1) >> sb->s_blocksize_bits);
-                                       brelse(bh);
-                                       break;
-                               }
-                               case TAG_IDENT_FSD:
-                                       *fileset = newfileset;
-                                       break;
-                               default:
-                                       newfileset.logicalBlockNum++;
-                                       brelse(bh);
-                                       bh = NULL;
-                                       break;
-                               }
-                       } while (newfileset.logicalBlockNum < lastblock &&
-                                fileset->logicalBlockNum == 0xFFFFFFFF &&
-                                fileset->partitionReferenceNum == 0xFFFF);
-               }
-       }
-
-       if ((fileset->logicalBlockNum != 0xFFFFFFFF ||
-            fileset->partitionReferenceNum != 0xFFFF) && bh) {
                udf_debug("Fileset at block=%u, partition=%u\n",
                          fileset->logicalBlockNum,
                          fileset->partitionReferenceNum);
 
-               sbi->s_partition = fileset->partitionReferenceNum;
+               UDF_SB(sb)->s_partition = fileset->partitionReferenceNum;
                udf_load_fileset(sb, bh, root);
                brelse(bh);
                return 0;
@@ -1570,10 +1510,16 @@ static void udf_load_logicalvolint(struct super_block *sb, struct kernel_extent_
  */
 #define PART_DESC_ALLOC_STEP 32
 
+struct part_desc_seq_scan_data {
+       struct udf_vds_record rec;
+       u32 partnum;
+};
+
 struct desc_seq_scan_data {
        struct udf_vds_record vds[VDS_POS_LENGTH];
        unsigned int size_part_descs;
-       struct udf_vds_record *part_descs_loc;
+       unsigned int num_part_descs;
+       struct part_desc_seq_scan_data *part_descs_loc;
 };
 
 static struct udf_vds_record *handle_partition_descriptor(
@@ -1582,10 +1528,14 @@ static struct udf_vds_record *handle_partition_descriptor(
 {
        struct partitionDesc *desc = (struct partitionDesc *)bh->b_data;
        int partnum;
+       int i;
 
        partnum = le16_to_cpu(desc->partitionNumber);
-       if (partnum >= data->size_part_descs) {
-               struct udf_vds_record *new_loc;
+       for (i = 0; i < data->num_part_descs; i++)
+               if (partnum == data->part_descs_loc[i].partnum)
+                       return &(data->part_descs_loc[i].rec);
+       if (data->num_part_descs >= data->size_part_descs) {
+               struct part_desc_seq_scan_data *new_loc;
                unsigned int new_size = ALIGN(partnum, PART_DESC_ALLOC_STEP);
 
                new_loc = kcalloc(new_size, sizeof(*new_loc), GFP_KERNEL);
@@ -1597,7 +1547,7 @@ static struct udf_vds_record *handle_partition_descriptor(
                data->part_descs_loc = new_loc;
                data->size_part_descs = new_size;
        }
-       return &(data->part_descs_loc[partnum]);
+       return &(data->part_descs_loc[data->num_part_descs++].rec);
 }
 
 
@@ -1647,6 +1597,7 @@ static noinline int udf_process_sequence(
 
        memset(data.vds, 0, sizeof(struct udf_vds_record) * VDS_POS_LENGTH);
        data.size_part_descs = PART_DESC_ALLOC_STEP;
+       data.num_part_descs = 0;
        data.part_descs_loc = kcalloc(data.size_part_descs,
                                      sizeof(*data.part_descs_loc),
                                      GFP_KERNEL);
@@ -1658,7 +1609,6 @@ static noinline int udf_process_sequence(
         * are in it.
         */
        for (; (!done && block <= lastblock); block++) {
-
                bh = udf_read_tagged(sb, block, block, &ident);
                if (!bh)
                        break;
@@ -1730,13 +1680,10 @@ static noinline int udf_process_sequence(
        }
 
        /* Now handle prevailing Partition Descriptors */
-       for (i = 0; i < data.size_part_descs; i++) {
-               if (data.part_descs_loc[i].block) {
-                       ret = udf_load_partdesc(sb,
-                                               data.part_descs_loc[i].block);
-                       if (ret < 0)
-                               return ret;
-               }
+       for (i = 0; i < data.num_part_descs; i++) {
+               ret = udf_load_partdesc(sb, data.part_descs_loc[i].rec.block);
+               if (ret < 0)
+                       return ret;
        }
 
        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 (file)
index 0000000..20f4340
--- /dev/null
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * pinctrl-tegra-io-pad.h: Tegra I/O pad source voltage configuration constants
+ * pinctrl bindings.
+ *
+ * Copyright (c) 2018, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * Author: Aapo Vienamo <avienamo@nvidia.com>
+ */
+
+#ifndef _DT_BINDINGS_PINCTRL_TEGRA_IO_PAD_H
+#define _DT_BINDINGS_PINCTRL_TEGRA_IO_PAD_H
+
+/* Voltage levels of the I/O pad's source rail */
+#define TEGRA_IO_PAD_VOLTAGE_1V8       0
+#define TEGRA_IO_PAD_VOLTAGE_3V3       1
+
+#endif
index ca1d2cc2cdfa09a8a760693b6b3c10e9c3f6a704..18863d56273cc7ea144bfaf366a2c74755ee72c9 100644 (file)
@@ -199,47 +199,57 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
 
 #define __declare_arg_0(a0, res)                                       \
        struct arm_smccc_res   *___res = res;                           \
-       register u32           r0 asm("r0") = a0;                       \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
        register unsigned long r1 asm("r1");                            \
        register unsigned long r2 asm("r2");                            \
        register unsigned long r3 asm("r3")
 
 #define __declare_arg_1(a0, a1, res)                                   \
+       typeof(a1) __a1 = a1;                                           \
        struct arm_smccc_res   *___res = res;                           \
-       register u32           r0 asm("r0") = a0;                       \
-       register typeof(a1)    r1 asm("r1") = a1;                       \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
        register unsigned long r2 asm("r2");                            \
        register unsigned long r3 asm("r3")
 
 #define __declare_arg_2(a0, a1, a2, res)                               \
+       typeof(a1) __a1 = a1;                                           \
+       typeof(a2) __a2 = a2;                                           \
        struct arm_smccc_res   *___res = res;                           \
-       register u32           r0 asm("r0") = a0;                       \
-       register typeof(a1)    r1 asm("r1") = a1;                       \
-       register typeof(a2)    r2 asm("r2") = a2;                       \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
+       register unsigned long r2 asm("r2") = __a2;                     \
        register unsigned long r3 asm("r3")
 
 #define __declare_arg_3(a0, a1, a2, a3, res)                           \
+       typeof(a1) __a1 = a1;                                           \
+       typeof(a2) __a2 = a2;                                           \
+       typeof(a3) __a3 = a3;                                           \
        struct arm_smccc_res   *___res = res;                           \
-       register u32           r0 asm("r0") = a0;                       \
-       register typeof(a1)    r1 asm("r1") = a1;                       \
-       register typeof(a2)    r2 asm("r2") = a2;                       \
-       register typeof(a3)    r3 asm("r3") = a3
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
+       register unsigned long r2 asm("r2") = __a2;                     \
+       register unsigned long r3 asm("r3") = __a3
 
 #define __declare_arg_4(a0, a1, a2, a3, a4, res)                       \
+       typeof(a4) __a4 = a4;                                           \
        __declare_arg_3(a0, a1, a2, a3, res);                           \
-       register typeof(a4) r4 asm("r4") = a4
+       register unsigned long r4 asm("r4") = __a4
 
 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)                   \
+       typeof(a5) __a5 = a5;                                           \
        __declare_arg_4(a0, a1, a2, a3, a4, res);                       \
-       register typeof(a5) r5 asm("r5") = a5
+       register unsigned long r5 asm("r5") = __a5
 
 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)               \
+       typeof(a6) __a6 = a6;                                           \
        __declare_arg_5(a0, a1, a2, a3, a4, a5, res);                   \
-       register typeof(a6) r6 asm("r6") = a6
+       register unsigned long r6 asm("r6") = __a6
 
 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)           \
+       typeof(a7) __a7 = a7;                                           \
        __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);               \
-       register typeof(a7) r7 asm("r7") = a7
+       register unsigned long r7 asm("r7") = __a7
 
 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
 #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
index b79387fd57da9c2673aee5db81fb4fa2e74ffea8..65b4eaed1d965ca193407f9209a62310a51aafb1 100644 (file)
@@ -855,7 +855,7 @@ static inline u8 i2c_8bit_addr_from_msg(const struct i2c_msg *msg)
 }
 
 u8 *i2c_get_dma_safe_msg_buf(struct i2c_msg *msg, unsigned int threshold);
-void i2c_release_dma_safe_msg_buf(struct i2c_msg *msg, u8 *buf);
+void i2c_put_dma_safe_msg_buf(u8 *buf, struct i2c_msg *msg, bool xferred);
 
 int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr);
 /**
index 4d25e4f952d9bd4c02b1f3c33fea0c4254907e14..99b0ebf496329f347cf723ad5da07ad5c23bcf9d 100644 (file)
@@ -256,6 +256,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
 #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
 #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
 
+extern bool of_node_name_eq(const struct device_node *np, const char *name);
+extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
+
 static inline const char *of_node_full_name(const struct device_node *np)
 {
        return np ? np->full_name : "<no-node>";
@@ -290,6 +293,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
 extern struct device_node *of_get_next_available_child(
        const struct device_node *node, struct device_node *prev);
 
+extern struct device_node *of_get_compatible_child(const struct device_node *parent,
+                                       const char *compatible);
 extern struct device_node *of_get_child_by_name(const struct device_node *node,
                                        const char *name);
 
@@ -561,6 +566,16 @@ static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)
        return NULL;
 }
 
+static inline bool of_node_name_eq(const struct device_node *np, const char *name)
+{
+       return false;
+}
+
+static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix)
+{
+       return false;
+}
+
 static inline const char* of_node_full_name(const struct device_node *np)
 {
        return "<no-node>";
@@ -632,6 +647,12 @@ static inline bool of_have_populated_dt(void)
        return false;
 }
 
+static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
+                                       const char *compatible)
+{
+       return NULL;
+}
+
 static inline struct device_node *of_get_child_by_name(
                                        const struct device_node *node,
                                        const char *name)
@@ -967,6 +988,18 @@ static inline struct device_node *of_find_matching_node(
        return of_find_matching_node_and_match(from, matches, NULL);
 }
 
+static inline const char *of_node_get_device_type(const struct device_node *np)
+{
+       return of_get_property(np, "type", NULL);
+}
+
+static inline bool of_node_is_type(const struct device_node *np, const char *type)
+{
+       const char *match = of_node_get_device_type(np);
+
+       return np && match && type && !strcmp(match, type);
+}
+
 /**
  * of_property_count_u8_elems - Count the number of u8 elements in a property
  *
index 9abc0ca7259b78d5400166dbafd81825ca05b915..9f0aa1b48c7849ae4fd7545bfbf5d8b5a3db102e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Driver for Texas Instruments INA219, INA226 power monitor chips
  *
- * Copyright (C) 2012 Lothar Felten <l-felten@ti.com>
+ * Copyright (C) 2012 Lothar Felten <lothar.felten@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
index ca9772c8e48b0652cf1cfa0929d037cff1e846f3..f32dd270b8e3f26a91cb6b10cdd7ac3dbb2cf6e8 100644 (file)
@@ -408,13 +408,7 @@ struct qc_type_state {
 
 struct qc_state {
        unsigned int s_incoredqs;       /* Number of dquots in core */
-       /*
-        * Per quota type information. The array should really have
-        * max(MAXQUOTAS, XQM_MAXQUOTAS) entries. BUILD_BUG_ON in
-        * quota_getinfo() makes sure XQM_MAXQUOTAS is large enough.  Once VFS
-        * supports project quotas, this can be changed to MAXQUOTAS
-        */
-       struct qc_type_state s_state[XQM_MAXQUOTAS];
+       struct qc_type_state s_state[MAXQUOTAS];  /* Per quota type information */
 };
 
 /* Structure for communicating via ->set_info */
index 1ad5b19e83a95d0a4ba17181f1f55134022791f1..970303448c9029e2aaab37e3735bc83e0490de04 100644 (file)
@@ -23,13 +23,11 @@ struct tc_action {
        const struct tc_action_ops      *ops;
        __u32                           type; /* for backward compat(TCA_OLD_COMPAT) */
        __u32                           order;
-       struct list_head                list;
        struct tcf_idrinfo              *idrinfo;
 
        u32                             tcfa_index;
        refcount_t                      tcfa_refcnt;
        atomic_t                        tcfa_bindcnt;
-       u32                             tcfa_capab;
        int                             tcfa_action;
        struct tcf_t                    tcfa_tm;
        struct gnet_stats_basic_packed  tcfa_bstats;
@@ -44,7 +42,6 @@ struct tc_action {
 #define tcf_index      common.tcfa_index
 #define tcf_refcnt     common.tcfa_refcnt
 #define tcf_bindcnt    common.tcfa_bindcnt
-#define tcf_capab      common.tcfa_capab
 #define tcf_action     common.tcfa_action
 #define tcf_tm         common.tcfa_tm
 #define tcf_bstats     common.tcfa_bstats
@@ -102,7 +99,6 @@ struct tc_action_ops {
        size_t  (*get_fill_size)(const struct tc_action *act);
        struct net_device *(*get_dev)(const struct tc_action *a);
        void    (*put_dev)(struct net_device *dev);
-       int     (*delete)(struct net *net, u32 index);
 };
 
 struct tc_action_net {
@@ -148,8 +144,6 @@ int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
                       const struct tc_action_ops *ops,
                       struct netlink_ext_ack *extack);
 int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index);
-bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a,
-                   int bind);
 int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
                   struct tc_action **a, const struct tc_action_ops *ops,
                   int bind, bool cpustats);
@@ -158,7 +152,6 @@ void tcf_idr_insert(struct tc_action_net *tn, struct tc_action *a);
 void tcf_idr_cleanup(struct tc_action_net *tn, u32 index);
 int tcf_idr_check_alloc(struct tc_action_net *tn, u32 *index,
                        struct tc_action **a, int bind);
-int tcf_idr_delete_index(struct tc_action_net *tn, u32 index);
 int __tcf_idr_release(struct tc_action *a, bool bind, bool strict);
 
 static inline int tcf_idr_release(struct tc_action *a, bool bind)
index ef727f71336e7e5f89d92000194bcfab4bacc5a8..75a3f3fdb3591720d266fd33d98c608fc673b6ca 100644 (file)
@@ -298,19 +298,13 @@ static inline void tcf_exts_put_net(struct tcf_exts *exts)
 #endif
 }
 
-static inline void tcf_exts_to_list(const struct tcf_exts *exts,
-                                   struct list_head *actions)
-{
 #ifdef CONFIG_NET_CLS_ACT
-       int i;
-
-       for (i = 0; i < exts->nr_actions; i++) {
-               struct tc_action *a = exts->actions[i];
-
-               list_add_tail(&a->list, actions);
-       }
+#define tcf_exts_for_each_action(i, a, exts) \
+       for (i = 0; i < TCA_ACT_MAX_PRIO && ((a) = (exts)->actions[i]); i++)
+#else
+#define tcf_exts_for_each_action(i, a, exts) \
+       for (; 0; (void)(i), (void)(a), (void)(exts))
 #endif
-}
 
 static inline void
 tcf_exts_stats_update(const struct tcf_exts *exts,
@@ -361,6 +355,15 @@ static inline bool tcf_exts_has_one_action(struct tcf_exts *exts)
 #endif
 }
 
+static inline struct tc_action *tcf_exts_first_action(struct tcf_exts *exts)
+{
+#ifdef CONFIG_NET_CLS_ACT
+       return exts->actions[0];
+#else
+       return NULL;
+#endif
+}
+
 /**
  * tcf_exts_exec - execute tc filter extensions
  * @skb: socket buffer
index 04b8eda94e7d5f3f6c5b89655d808653c7479bbd..03cc59ee9c9536b885d605027af093c3dd0634ee 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/jhash.h>
 #include <linux/filter.h>
 #include <linux/rculist_nulls.h>
+#include <linux/random.h>
 #include <uapi/linux/btf.h>
 #include "percpu_freelist.h"
 #include "bpf_lru_list.h"
@@ -41,6 +42,7 @@ struct bpf_htab {
        atomic_t count; /* number of elements in this hashtable */
        u32 n_buckets;  /* number of hash buckets */
        u32 elem_size;  /* size of each element in bytes */
+       u32 hashrnd;
 };
 
 /* each htab element is struct htab_elem + key + value */
@@ -371,6 +373,7 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
        if (!htab->buckets)
                goto free_htab;
 
+       htab->hashrnd = get_random_int();
        for (i = 0; i < htab->n_buckets; i++) {
                INIT_HLIST_NULLS_HEAD(&htab->buckets[i].head, i);
                raw_spin_lock_init(&htab->buckets[i].lock);
@@ -402,9 +405,9 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
        return ERR_PTR(err);
 }
 
-static inline u32 htab_map_hash(const void *key, u32 key_len)
+static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd)
 {
-       return jhash(key, key_len, 0);
+       return jhash(key, key_len, hashrnd);
 }
 
 static 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)
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        head = select_bucket(htab, hash);
 
@@ -597,7 +600,7 @@ static int htab_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
        if (!key)
                goto find_first_elem;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        head = select_bucket(htab, hash);
 
@@ -824,7 +827,7 @@ static int htab_map_update_elem(struct bpf_map *map, void *key, void *value,
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        b = __select_bucket(htab, hash);
        head = &b->head;
@@ -880,7 +883,7 @@ static int htab_lru_map_update_elem(struct bpf_map *map, void *key, void *value,
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        b = __select_bucket(htab, hash);
        head = &b->head;
@@ -945,7 +948,7 @@ static int __htab_percpu_map_update_elem(struct bpf_map *map, void *key,
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        b = __select_bucket(htab, hash);
        head = &b->head;
@@ -998,7 +1001,7 @@ static int __htab_lru_percpu_map_update_elem(struct bpf_map *map, void *key,
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
 
        b = __select_bucket(htab, hash);
        head = &b->head;
@@ -1071,7 +1074,7 @@ static int htab_map_delete_elem(struct bpf_map *map, void *key)
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
        b = __select_bucket(htab, hash);
        head = &b->head;
 
@@ -1103,7 +1106,7 @@ static int htab_lru_map_delete_elem(struct bpf_map *map, void *key)
 
        key_size = map->key_size;
 
-       hash = htab_map_hash(key, key_size);
+       hash = htab_map_hash(key, key_size, htab->hashrnd);
        b = __select_bucket(htab, hash);
        head = &b->head;
 
index 98e621a29e8e6953ec9dec5b4cb6f8559dd750d3..cf5195c7c33172879158f56323ff81c6d3bf7c4f 100644 (file)
@@ -1427,12 +1427,15 @@ static void smap_tx_work(struct work_struct *w)
 static void smap_write_space(struct sock *sk)
 {
        struct smap_psock *psock;
+       void (*write_space)(struct sock *sk);
 
        rcu_read_lock();
        psock = smap_psock_sk(sk);
        if (likely(psock && test_bit(SMAP_TX_RUNNING, &psock->state)))
                schedule_work(&psock->tx_work);
+       write_space = psock->save_write_space;
        rcu_read_unlock();
+       write_space(sk);
 }
 
 static 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)
                return ERR_PTR(-EPERM);
 
        /* check sanity of attributes */
-       if (attr->max_entries == 0 || attr->value_size != 4 ||
+       if (attr->max_entries == 0 ||
+           attr->key_size == 0 ||
+           attr->value_size != 4 ||
            attr->map_flags & ~SOCK_CREATE_FLAG_MASK)
                return ERR_PTR(-EINVAL);
 
@@ -2267,8 +2272,10 @@ static struct htab_elem *alloc_sock_hash_elem(struct bpf_htab *htab,
        }
        l_new = kmalloc_node(htab->elem_size, GFP_ATOMIC | __GFP_NOWARN,
                             htab->map.numa_node);
-       if (!l_new)
+       if (!l_new) {
+               atomic_dec(&htab->count);
                return ERR_PTR(-ENOMEM);
+       }
 
        memcpy(l_new->key, key, key_size);
        l_new->sk = sk;
index ed44d7d34c2d9bfc08093af4854dc78bf7232b21..aa7fe85ad62e86de2060d2b89e525b93506cbf0d 100644 (file)
@@ -102,8 +102,6 @@ static inline void cpuhp_lock_release(bool bringup) { }
  * @name:      Name of the step
  * @startup:   Startup function of the step
  * @teardown:  Teardown function of the step
- * @skip_onerr:        Do not invoke the functions on error rollback
- *             Will go away once the notifiers are gone
  * @cant_stop: Bringup/teardown can't be stopped at this step
  */
 struct cpuhp_step {
@@ -119,7 +117,6 @@ struct cpuhp_step {
                                         struct hlist_node *node);
        } teardown;
        struct hlist_head       list;
-       bool                    skip_onerr;
        bool                    cant_stop;
        bool                    multi_instance;
 };
@@ -550,12 +547,8 @@ static int bringup_cpu(unsigned int cpu)
 
 static void undo_cpu_up(unsigned int cpu, struct cpuhp_cpu_state *st)
 {
-       for (st->state--; st->state > st->target; st->state--) {
-               struct cpuhp_step *step = cpuhp_get_step(st->state);
-
-               if (!step->skip_onerr)
-                       cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
-       }
+       for (st->state--; st->state > st->target; st->state--)
+               cpuhp_invoke_callback(cpu, st->state, false, NULL, NULL);
 }
 
 static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
@@ -644,12 +637,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
 
        WARN_ON_ONCE(!cpuhp_is_ap_state(state));
 
-       if (st->rollback) {
-               struct cpuhp_step *step = cpuhp_get_step(state);
-               if (step->skip_onerr)
-                       goto next;
-       }
-
        if (cpuhp_is_atomic_state(state)) {
                local_irq_disable();
                st->result = cpuhp_invoke_callback(cpu, state, bringup, st->node, &st->last);
@@ -673,7 +660,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
                st->should_run = false;
        }
 
-next:
        cpuhp_lock_release(bringup);
 
        if (!st->should_run)
@@ -916,12 +902,8 @@ void cpuhp_report_idle_dead(void)
 
 static void undo_cpu_down(unsigned int cpu, struct cpuhp_cpu_state *st)
 {
-       for (st->state++; st->state < st->target; st->state++) {
-               struct cpuhp_step *step = cpuhp_get_step(st->state);
-
-               if (!step->skip_onerr)
-                       cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
-       }
+       for (st->state++; st->state < st->target; st->state++)
+               cpuhp_invoke_callback(cpu, st->state, true, NULL, NULL);
 }
 
 static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
index 924e37fb1620b5440e3265b4cc3465dad50475c1..fd6f8ed28e010a0808c8e67a698372ce5fc411da 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/kmsg_dump.h>
 #include <linux/syslog.h>
 #include <linux/cpu.h>
-#include <linux/notifier.h>
 #include <linux/rculist.h>
 #include <linux/poll.h>
 #include <linux/irq_work.h>
index 5470dce212c0dbc9861d5d2108b926a473f89de4..977918d5d3501b1447781c91aedbe8fadad05ada 100644 (file)
@@ -261,7 +261,7 @@ static void __touch_watchdog(void)
  * entering idle state.  This should only be used for scheduler events.
  * Use touch_softlockup_watchdog() for everything else.
  */
-void touch_softlockup_watchdog_sched(void)
+notrace void touch_softlockup_watchdog_sched(void)
 {
        /*
         * Preemption can be enabled.  It doesn't matter which CPU's timestamp
@@ -270,7 +270,7 @@ void touch_softlockup_watchdog_sched(void)
        raw_cpu_write(watchdog_touch_ts, 0);
 }
 
-void touch_softlockup_watchdog(void)
+notrace void touch_softlockup_watchdog(void)
 {
        touch_softlockup_watchdog_sched();
        wq_watchdog_touch(raw_smp_processor_id());
index 1f7020d65d0aa2963708d3e44057e08ce2305ead..71381168dedef4e88382a1849412f554a4cb4a56 100644 (file)
@@ -29,7 +29,7 @@ static struct cpumask dead_events_mask;
 static unsigned long hardlockup_allcpu_dumped;
 static atomic_t watchdog_cpus = ATOMIC_INIT(0);
 
-void arch_touch_nmi_watchdog(void)
+notrace void arch_touch_nmi_watchdog(void)
 {
        /*
         * Using __raw here because some code paths have
index 60e80198c3df2af0b12df2e5edda9d6b2db80b88..0280deac392e25c833cda56a0d193507998b6de4 100644 (file)
@@ -5574,7 +5574,7 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
        mod_timer(&wq_watchdog_timer, jiffies + thresh);
 }
 
-void wq_watchdog_touch(int cpu)
+notrace void wq_watchdog_touch(int cpu)
 {
        if (cpu >= 0)
                per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies;
index c72577e472f2f2929f825b0c105a237f54c42971..a66595ba5543e2a345da99b37313112e0dc1a4e6 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include <linux/percpu_counter.h>
-#include <linux/notifier.h>
 #include <linux/mutex.h>
 #include <linux/init.h>
 #include <linux/cpu.h>
index 310e29b5150737eac76503b91baf551da3bc47da..30526afa8343124f06f0649592ee246dc4d88fbe 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/rhashtable.h>
 #include <linux/err.h>
 #include <linux/export.h>
-#include <linux/rhashtable.h>
 
 #define HASH_DEFAULT_SIZE      64UL
 #define HASH_MIN_SIZE          4U
index 6551d3b0dc30a5e5a951f24f27a5586cbe920237..84ae9bf5858ac9dcf7e1155e514a9b9062e0f10d 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/mpage.h>
 #include <linux/rmap.h>
 #include <linux/percpu.h>
-#include <linux/notifier.h>
 #include <linux/smp.h>
 #include <linux/sysctl.h>
 #include <linux/cpu.h>
index e75865d58ba70c42d2dd47e74fd27cb6484c1d6e..05e983f42316a1c5446536fb16cdf3f0ceb3cdd0 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/slab.h>
 #include <linux/ratelimit.h>
 #include <linux/oom.h>
-#include <linux/notifier.h>
 #include <linux/topology.h>
 #include <linux/sysctl.h>
 #include <linux/cpu.h>
index ce2b9e5cea771cb9f06e9bc6bb65151fd7281a95..8da34a8af53d58754ff4a394f26f6f252cbafbe0 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -19,7 +19,6 @@
 #include <linux/slab.h>
 #include "slab.h"
 #include <linux/proc_fs.h>
-#include <linux/notifier.h>
 #include <linux/seq_file.h>
 #include <linux/kasan.h>
 #include <linux/cpu.h>
index 325fc5088370b5b0f06daaaf990c5cee86dfecce..82114e1111e6558d5b8ecc2207aac679e21698c6 100644 (file)
@@ -93,7 +93,6 @@
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
-#include <linux/notifier.h>
 #include <linux/skbuff.h>
 #include <linux/bpf.h>
 #include <linux/bpf_trace.h>
index 962c4fd338ba57e4344eeb62a648de59a5460c36..1c45c1d6d241dbcca8542c51eb0f25b903131756 100644 (file)
@@ -767,7 +767,6 @@ static int dsa_slave_add_cls_matchall(struct net_device *dev,
        const struct tc_action *a;
        struct dsa_port *to_dp;
        int err = -EOPNOTSUPP;
-       LIST_HEAD(actions);
 
        if (!ds->ops->port_mirror_add)
                return err;
@@ -775,8 +774,7 @@ static int dsa_slave_add_cls_matchall(struct net_device *dev,
        if (!tcf_exts_has_one_action(cls->exts))
                return err;
 
-       tcf_exts_to_list(cls->exts, &actions);
-       a = list_first_entry(&actions, struct tc_action, list);
+       a = tcf_exts_first_action(cls->exts);
 
        if (is_tcf_mirred_egress_mirror(a) && protocol == htons(ETH_P_ALL)) {
                struct dsa_mall_mirror_tc_entry *mirror;
index 13d34427ca3dd5bee810395ba4a1ab9759863182..02ff2dde96094cf33b662a20994424a7adea509e 100644 (file)
@@ -95,11 +95,10 @@ struct bbr {
        u32     mode:3,              /* current bbr_mode in state machine */
                prev_ca_state:3,     /* CA state on previous ACK */
                packet_conservation:1,  /* use packet conservation? */
-               restore_cwnd:1,      /* decided to revert cwnd to old value */
                round_start:1,       /* start of packet-timed tx->ack round? */
                idle_restart:1,      /* restarting after idle? */
                probe_rtt_round_done:1,  /* a BBR_PROBE_RTT round at 4 pkts? */
-               unused:12,
+               unused:13,
                lt_is_sampling:1,    /* taking long-term ("LT") samples now? */
                lt_rtt_cnt:7,        /* round trips in long-term interval */
                lt_use_bw:1;         /* use lt_bw as our bw estimate? */
@@ -175,6 +174,8 @@ static const u32 bbr_lt_bw_diff = 4000 / 8;
 /* If we estimate we're policed, use lt_bw for this many round trips: */
 static const u32 bbr_lt_bw_max_rtts = 48;
 
+static void bbr_check_probe_rtt_done(struct sock *sk);
+
 /* Do we estimate that STARTUP filled the pipe? */
 static bool bbr_full_bw_reached(const struct sock *sk)
 {
@@ -309,6 +310,8 @@ static void bbr_cwnd_event(struct sock *sk, enum tcp_ca_event event)
                 */
                if (bbr->mode == BBR_PROBE_BW)
                        bbr_set_pacing_rate(sk, bbr_bw(sk), BBR_UNIT);
+               else if (bbr->mode == BBR_PROBE_RTT)
+                       bbr_check_probe_rtt_done(sk);
        }
 }
 
@@ -396,17 +399,11 @@ static bool bbr_set_cwnd_to_recover_or_restore(
                cwnd = tcp_packets_in_flight(tp) + acked;
        } else if (prev_state >= TCP_CA_Recovery && state < TCP_CA_Recovery) {
                /* Exiting loss recovery; restore cwnd saved before recovery. */
-               bbr->restore_cwnd = 1;
+               cwnd = max(cwnd, bbr->prior_cwnd);
                bbr->packet_conservation = 0;
        }
        bbr->prev_ca_state = state;
 
-       if (bbr->restore_cwnd) {
-               /* Restore cwnd after exiting loss recovery or PROBE_RTT. */
-               cwnd = max(cwnd, bbr->prior_cwnd);
-               bbr->restore_cwnd = 0;
-       }
-
        if (bbr->packet_conservation) {
                *new_cwnd = max(cwnd, tcp_packets_in_flight(tp) + acked);
                return true;    /* yes, using packet conservation */
@@ -423,10 +420,10 @@ static void bbr_set_cwnd(struct sock *sk, const struct rate_sample *rs,
 {
        struct tcp_sock *tp = tcp_sk(sk);
        struct bbr *bbr = inet_csk_ca(sk);
-       u32 cwnd = 0, target_cwnd = 0;
+       u32 cwnd = tp->snd_cwnd, target_cwnd = 0;
 
        if (!acked)
-               return;
+               goto done;  /* no packet fully ACKed; just apply caps */
 
        if (bbr_set_cwnd_to_recover_or_restore(sk, rs, acked, &cwnd))
                goto done;
@@ -748,6 +745,20 @@ static void bbr_check_drain(struct sock *sk, const struct rate_sample *rs)
                bbr_reset_probe_bw_mode(sk);  /* we estimate queue is drained */
 }
 
+static void bbr_check_probe_rtt_done(struct sock *sk)
+{
+       struct tcp_sock *tp = tcp_sk(sk);
+       struct bbr *bbr = inet_csk_ca(sk);
+
+       if (!(bbr->probe_rtt_done_stamp &&
+             after(tcp_jiffies32, bbr->probe_rtt_done_stamp)))
+               return;
+
+       bbr->min_rtt_stamp = tcp_jiffies32;  /* wait a while until PROBE_RTT */
+       tp->snd_cwnd = max(tp->snd_cwnd, bbr->prior_cwnd);
+       bbr_reset_mode(sk);
+}
+
 /* The goal of PROBE_RTT mode is to have BBR flows cooperatively and
  * periodically drain the bottleneck queue, to converge to measure the true
  * 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)
                } else if (bbr->probe_rtt_done_stamp) {
                        if (bbr->round_start)
                                bbr->probe_rtt_round_done = 1;
-                       if (bbr->probe_rtt_round_done &&
-                           after(tcp_jiffies32, bbr->probe_rtt_done_stamp)) {
-                               bbr->min_rtt_stamp = tcp_jiffies32;
-                               bbr->restore_cwnd = 1;  /* snap to prior_cwnd */
-                               bbr_reset_mode(sk);
-                       }
+                       if (bbr->probe_rtt_round_done)
+                               bbr_check_probe_rtt_done(sk);
                }
        }
        /* 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)
        bbr->has_seen_rtt = 0;
        bbr_init_pacing_rate_from_rtt(sk);
 
-       bbr->restore_cwnd = 0;
        bbr->round_start = 0;
        bbr->idle_restart = 0;
        bbr->full_bw_reached = 0;
index 9e041fa5c545367961f03fa8a9124aebbc1b6c69..44c09eddbb781c03da2417aaa925e360de01a6e9 100644 (file)
@@ -2517,6 +2517,12 @@ static int __net_init tcp_sk_init(struct net *net)
                if (res)
                        goto fail;
                sock_set_flag(sk, SOCK_USE_WRITE_QUEUE);
+
+               /* Please enforce IP_DF and IPID==0 for RST and
+                * ACK sent in SYN-RECV and TIME-WAIT state.
+                */
+               inet_sk(sk)->pmtudisc = IP_PMTUDISC_DO;
+
                *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk;
        }
 
index 2fac4ad748672cd62de6653d3fdedebe743c6ad0..d51a8c0b3372d09ad1c78b76f94b4ebaf7ca3f61 100644 (file)
@@ -2398,7 +2398,7 @@ static void addrconf_add_mroute(struct net_device *dev)
 
        ipv6_addr_set(&cfg.fc_dst, htonl(0xFF000000), 0, 0, 0);
 
-       ip6_route_add(&cfg, GFP_ATOMIC, NULL);
+       ip6_route_add(&cfg, GFP_KERNEL, NULL);
 }
 
 static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
@@ -3062,7 +3062,7 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
        if (addr.s6_addr32[3]) {
                add_addr(idev, &addr, plen, scope);
                addrconf_prefix_route(&addr, plen, 0, idev->dev, 0, pflags,
-                                     GFP_ATOMIC);
+                                     GFP_KERNEL);
                return;
        }
 
@@ -3087,7 +3087,7 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
 
                                add_addr(idev, &addr, plen, flag);
                                addrconf_prefix_route(&addr, plen, 0, idev->dev,
-                                                     0, pflags, GFP_ATOMIC);
+                                                     0, pflags, GFP_KERNEL);
                        }
                }
        }
index d212738e9d100d4e3270f9188466da6b8a3d186c..c861a6d4671d3f0f82f68752d16a8192ac649f8a 100644 (file)
@@ -198,6 +198,8 @@ void fib6_info_destroy_rcu(struct rcu_head *head)
                }
        }
 
+       lwtstate_put(f6i->fib6_nh.nh_lwtstate);
+
        if (f6i->fib6_nh.nh_dev)
                dev_put(f6i->fib6_nh.nh_dev);
 
index 38dec9da90d338b4704a8acd4586536b467f75b9..5095367c7204927f489c2833c736fbf5292c8d09 100644 (file)
@@ -1094,7 +1094,8 @@ static void __net_exit vti6_destroy_tunnels(struct vti6_net *ip6n,
        }
 
        t = rtnl_dereference(ip6n->tnls_wc[0]);
-       unregister_netdevice_queue(t->dev, list);
+       if (t)
+               unregister_netdevice_queue(t->dev, list);
 }
 
 static int __net_init vti6_init_net(struct net *net)
index 7208c16302f61adc15636f6a332ff0c02325cfcf..c4ea13e8360b9a399c811563165383e720c1cbb4 100644 (file)
@@ -956,7 +956,7 @@ static void ip6_rt_init_dst(struct rt6_info *rt, struct fib6_info *ort)
        rt->dst.error = 0;
        rt->dst.output = ip6_output;
 
-       if (ort->fib6_type == RTN_LOCAL) {
+       if (ort->fib6_type == RTN_LOCAL || ort->fib6_type == RTN_ANYCAST) {
                rt->dst.input = ip6_input;
        } else if (ipv6_addr_type(&ort->fib6_dst.addr) & IPV6_ADDR_MULTICAST) {
                rt->dst.input = ip6_mc_input;
index 82e6edf9c5d9c8454d17c53a2e0c461ff399a881..45f33d6dedf771c7d9f4a21496201ad3198aba8b 100644 (file)
@@ -100,7 +100,7 @@ static int ncsi_write_package_info(struct sk_buff *skb,
        bool found;
        int rc;
 
-       if (id > ndp->package_num) {
+       if (id > ndp->package_num - 1) {
                netdev_info(ndp->ndev.dev, "NCSI: No package with id %u\n", id);
                return -ENODEV;
        }
@@ -240,7 +240,7 @@ static int ncsi_pkg_info_all_nl(struct sk_buff *skb,
                return 0; /* done */
 
        hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
-                         &ncsi_genl_family, 0,  NCSI_CMD_PKG_INFO);
+                         &ncsi_genl_family, NLM_F_MULTI,  NCSI_CMD_PKG_INFO);
        if (!hdr) {
                rc = -EMSGSIZE;
                goto err;
index 2c7b7c352d3e8cf77c7aed4d29b61d481249827f..b9bbcf3d6c63976912433109d5c450830fb779f4 100644 (file)
@@ -37,7 +37,6 @@
 #include <net/tcp.h>
 #include <net/net_namespace.h>
 #include <net/netns/generic.h>
-#include <net/tcp.h>
 #include <net/addrconf.h>
 
 #include "rds.h"
index 229d63c99be23b2329caa84b6912c8f770ccca64..db83dac1e7f488cd2fd0d013bce374c5d4123f3c 100644 (file)
@@ -300,21 +300,17 @@ int tcf_generic_walker(struct tc_action_net *tn, struct sk_buff *skb,
 }
 EXPORT_SYMBOL(tcf_generic_walker);
 
-static bool __tcf_idr_check(struct tc_action_net *tn, u32 index,
-                           struct tc_action **a, int bind)
+int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index)
 {
        struct tcf_idrinfo *idrinfo = tn->idrinfo;
        struct tc_action *p;
 
        spin_lock(&idrinfo->lock);
        p = idr_find(&idrinfo->action_idr, index);
-       if (IS_ERR(p)) {
+       if (IS_ERR(p))
                p = NULL;
-       } else if (p) {
+       else if (p)
                refcount_inc(&p->tcfa_refcnt);
-               if (bind)
-                       atomic_inc(&p->tcfa_bindcnt);
-       }
        spin_unlock(&idrinfo->lock);
 
        if (p) {
@@ -323,23 +319,10 @@ static bool __tcf_idr_check(struct tc_action_net *tn, u32 index,
        }
        return false;
 }
-
-int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index)
-{
-       return __tcf_idr_check(tn, index, a, 0);
-}
 EXPORT_SYMBOL(tcf_idr_search);
 
-bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a,
-                  int bind)
+static int tcf_idr_delete_index(struct tcf_idrinfo *idrinfo, u32 index)
 {
-       return __tcf_idr_check(tn, index, a, bind);
-}
-EXPORT_SYMBOL(tcf_idr_check);
-
-int tcf_idr_delete_index(struct tc_action_net *tn, u32 index)
-{
-       struct tcf_idrinfo *idrinfo = tn->idrinfo;
        struct tc_action *p;
        int ret = 0;
 
@@ -370,7 +353,6 @@ int tcf_idr_delete_index(struct tc_action_net *tn, u32 index)
        spin_unlock(&idrinfo->lock);
        return ret;
 }
-EXPORT_SYMBOL(tcf_idr_delete_index);
 
 int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est,
                   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,
 
        p->idrinfo = idrinfo;
        p->ops = ops;
-       INIT_LIST_HEAD(&p->list);
        *a = p;
        return 0;
 err3:
@@ -686,14 +667,18 @@ static int tcf_action_put(struct tc_action *p)
        return __tcf_action_put(p, false);
 }
 
+/* Put all actions in this array, skip those NULL's. */
 static void tcf_action_put_many(struct tc_action *actions[])
 {
        int i;
 
-       for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
+       for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
                struct tc_action *a = actions[i];
-               const struct tc_action_ops *ops = a->ops;
+               const struct tc_action_ops *ops;
 
+               if (!a)
+                       continue;
+               ops = a->ops;
                if (tcf_action_put(a))
                        module_put(ops->owner);
        }
@@ -1175,41 +1160,38 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
        return err;
 }
 
-static int tcf_action_delete(struct net *net, struct tc_action *actions[],
-                            int *acts_deleted, struct netlink_ext_ack *extack)
+static int tcf_action_delete(struct net *net, struct tc_action *actions[])
 {
-       u32 act_index;
-       int ret, i;
+       int i;
 
        for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
                struct tc_action *a = actions[i];
                const struct tc_action_ops *ops = a->ops;
-
                /* Actions can be deleted concurrently so we must save their
                 * type and id to search again after reference is released.
                 */
-               act_index = a->tcfa_index;
+               struct tcf_idrinfo *idrinfo = a->idrinfo;
+               u32 act_index = a->tcfa_index;
 
                if (tcf_action_put(a)) {
                        /* last reference, action was deleted concurrently */
                        module_put(ops->owner);
                } else  {
+                       int ret;
+
                        /* now do the delete */
-                       ret = ops->delete(net, act_index);
-                       if (ret < 0) {
-                               *acts_deleted = i + 1;
+                       ret = tcf_idr_delete_index(idrinfo, act_index);
+                       if (ret < 0)
                                return ret;
-                       }
                }
+               actions[i] = NULL;
        }
-       *acts_deleted = i;
        return 0;
 }
 
 static int
 tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
-              int *acts_deleted, u32 portid, size_t attr_size,
-              struct netlink_ext_ack *extack)
+              u32 portid, size_t attr_size, struct netlink_ext_ack *extack)
 {
        int ret;
        struct sk_buff *skb;
@@ -1227,7 +1209,7 @@ tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],
        }
 
        /* now do the delete */
-       ret = tcf_action_delete(net, actions, acts_deleted, extack);
+       ret = tcf_action_delete(net, actions);
        if (ret < 0) {
                NL_SET_ERR_MSG(extack, "Failed to delete TC action");
                kfree_skb(skb);
@@ -1249,8 +1231,7 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
        struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
        struct tc_action *act;
        size_t attr_size = 0;
-       struct tc_action *actions[TCA_ACT_MAX_PRIO + 1] = {};
-       int acts_deleted = 0;
+       struct tc_action *actions[TCA_ACT_MAX_PRIO] = {};
 
        ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, extack);
        if (ret < 0)
@@ -1280,14 +1261,13 @@ tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
        if (event == RTM_GETACTION)
                ret = tcf_get_notify(net, portid, n, actions, event, extack);
        else { /* delete */
-               ret = tcf_del_notify(net, n, actions, &acts_deleted, portid,
-                                    attr_size, extack);
+               ret = tcf_del_notify(net, n, actions, portid, attr_size, extack);
                if (ret)
                        goto err;
-               return ret;
+               return 0;
        }
 err:
-       tcf_action_put_many(&actions[acts_deleted]);
+       tcf_action_put_many(actions);
        return ret;
 }
 
index d30b23e424364300f5440da022abb2129b9cf5f8..0c68bc9cf0b4df540a223e14dfa8ff569f96a40c 100644 (file)
@@ -395,13 +395,6 @@ static int tcf_bpf_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_bpf_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, bpf_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_bpf_ops __read_mostly = {
        .kind           =       "bpf",
        .type           =       TCA_ACT_BPF,
@@ -412,7 +405,6 @@ static struct tc_action_ops act_bpf_ops __read_mostly = {
        .init           =       tcf_bpf_init,
        .walk           =       tcf_bpf_walker,
        .lookup         =       tcf_bpf_search,
-       .delete         =       tcf_bpf_delete,
        .size           =       sizeof(struct tcf_bpf),
 };
 
index 54c0bf54f2acf71cd63ff17ef0cb74898bc0d478..6f0f273f1139f83ef1a45f017c37d200c36fcae1 100644 (file)
@@ -198,13 +198,6 @@ static int tcf_connmark_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_connmark_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, connmark_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_connmark_ops = {
        .kind           =       "connmark",
        .type           =       TCA_ACT_CONNMARK,
@@ -214,7 +207,6 @@ static struct tc_action_ops act_connmark_ops = {
        .init           =       tcf_connmark_init,
        .walk           =       tcf_connmark_walker,
        .lookup         =       tcf_connmark_search,
-       .delete         =       tcf_connmark_delete,
        .size           =       sizeof(struct tcf_connmark_info),
 };
 
index e698d3fe2080d1051d70c6ab92ff111bcd42d36d..b8a67ae3105ad10f645bfcb65a503dafcbe5cbb2 100644 (file)
@@ -659,13 +659,6 @@ static size_t tcf_csum_get_fill_size(const struct tc_action *act)
        return nla_total_size(sizeof(struct tc_csum));
 }
 
-static int tcf_csum_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, csum_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_csum_ops = {
        .kind           = "csum",
        .type           = TCA_ACT_CSUM,
@@ -677,7 +670,6 @@ static struct tc_action_ops act_csum_ops = {
        .walk           = tcf_csum_walker,
        .lookup         = tcf_csum_search,
        .get_fill_size  = tcf_csum_get_fill_size,
-       .delete         = tcf_csum_delete,
        .size           = sizeof(struct tcf_csum),
 };
 
index 6a3f25a8ffb30b8998fc2a7c37aaccc2c29c466d..cd1d9bd32ef9af4c5789e0331b6d1c1b7e6820f3 100644 (file)
@@ -243,13 +243,6 @@ static size_t tcf_gact_get_fill_size(const struct tc_action *act)
        return sz;
 }
 
-static int tcf_gact_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, gact_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_gact_ops = {
        .kind           =       "gact",
        .type           =       TCA_ACT_GACT,
@@ -261,7 +254,6 @@ static struct tc_action_ops act_gact_ops = {
        .walk           =       tcf_gact_walker,
        .lookup         =       tcf_gact_search,
        .get_fill_size  =       tcf_gact_get_fill_size,
-       .delete         =       tcf_gact_delete,
        .size           =       sizeof(struct tcf_gact),
 };
 
index d1081bdf1bdb5565660e41130e541800392e3889..196430aefe87a355a9a237ef7184fa2a4830a3a3 100644 (file)
@@ -167,16 +167,16 @@ static struct tcf_meta_ops *find_ife_oplist(u16 metaid)
 {
        struct tcf_meta_ops *o;
 
-       read_lock_bh(&ife_mod_lock);
+       read_lock(&ife_mod_lock);
        list_for_each_entry(o, &ifeoplist, list) {
                if (o->metaid == metaid) {
                        if (!try_module_get(o->owner))
                                o = NULL;
-                       read_unlock_bh(&ife_mod_lock);
+                       read_unlock(&ife_mod_lock);
                        return o;
                }
        }
-       read_unlock_bh(&ife_mod_lock);
+       read_unlock(&ife_mod_lock);
 
        return NULL;
 }
@@ -190,12 +190,12 @@ int register_ife_op(struct tcf_meta_ops *mops)
            !mops->get || !mops->alloc)
                return -EINVAL;
 
-       write_lock_bh(&ife_mod_lock);
+       write_lock(&ife_mod_lock);
 
        list_for_each_entry(m, &ifeoplist, list) {
                if (m->metaid == mops->metaid ||
                    (strcmp(mops->name, m->name) == 0)) {
-                       write_unlock_bh(&ife_mod_lock);
+                       write_unlock(&ife_mod_lock);
                        return -EEXIST;
                }
        }
@@ -204,7 +204,7 @@ int register_ife_op(struct tcf_meta_ops *mops)
                mops->release = ife_release_meta_gen;
 
        list_add_tail(&mops->list, &ifeoplist);
-       write_unlock_bh(&ife_mod_lock);
+       write_unlock(&ife_mod_lock);
        return 0;
 }
 EXPORT_SYMBOL_GPL(unregister_ife_op);
@@ -214,7 +214,7 @@ int unregister_ife_op(struct tcf_meta_ops *mops)
        struct tcf_meta_ops *m;
        int err = -ENOENT;
 
-       write_lock_bh(&ife_mod_lock);
+       write_lock(&ife_mod_lock);
        list_for_each_entry(m, &ifeoplist, list) {
                if (m->metaid == mops->metaid) {
                        list_del(&mops->list);
@@ -222,7 +222,7 @@ int unregister_ife_op(struct tcf_meta_ops *mops)
                        break;
                }
        }
-       write_unlock_bh(&ife_mod_lock);
+       write_unlock(&ife_mod_lock);
 
        return err;
 }
@@ -265,11 +265,8 @@ static const char *ife_meta_id2name(u32 metaid)
 #endif
 
 /* called when adding new meta information
- * under ife->tcf_lock for existing action
 */
-static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid,
-                               void *val, int len, bool exists,
-                               bool rtnl_held)
+static int load_metaops_and_vet(u32 metaid, void *val, int len, bool rtnl_held)
 {
        struct tcf_meta_ops *ops = find_ife_oplist(metaid);
        int ret = 0;
@@ -277,15 +274,11 @@ static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid,
        if (!ops) {
                ret = -ENOENT;
 #ifdef CONFIG_MODULES
-               if (exists)
-                       spin_unlock_bh(&ife->tcf_lock);
                if (rtnl_held)
                        rtnl_unlock();
                request_module("ife-meta-%s", ife_meta_id2name(metaid));
                if (rtnl_held)
                        rtnl_lock();
-               if (exists)
-                       spin_lock_bh(&ife->tcf_lock);
                ops = find_ife_oplist(metaid);
 #endif
        }
@@ -302,24 +295,17 @@ static int load_metaops_and_vet(struct tcf_ife_info *ife, u32 metaid,
 }
 
 /* called when adding new meta information
- * under ife->tcf_lock for existing action
 */
-static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
-                       int len, bool atomic)
+static int __add_metainfo(const struct tcf_meta_ops *ops,
+                         struct tcf_ife_info *ife, u32 metaid, void *metaval,
+                         int len, bool atomic, bool exists)
 {
        struct tcf_meta_info *mi = NULL;
-       struct tcf_meta_ops *ops = find_ife_oplist(metaid);
        int ret = 0;
 
-       if (!ops)
-               return -ENOENT;
-
        mi = kzalloc(sizeof(*mi), atomic ? GFP_ATOMIC : GFP_KERNEL);
-       if (!mi) {
-               /*put back what find_ife_oplist took */
-               module_put(ops->owner);
+       if (!mi)
                return -ENOMEM;
-       }
 
        mi->metaid = metaid;
        mi->ops = ops;
@@ -327,29 +313,47 @@ static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
                ret = ops->alloc(mi, metaval, atomic ? GFP_ATOMIC : GFP_KERNEL);
                if (ret != 0) {
                        kfree(mi);
-                       module_put(ops->owner);
                        return ret;
                }
        }
 
+       if (exists)
+               spin_lock_bh(&ife->tcf_lock);
        list_add_tail(&mi->metalist, &ife->metalist);
+       if (exists)
+               spin_unlock_bh(&ife->tcf_lock);
+
+       return ret;
+}
+
+static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval,
+                       int len, bool exists)
+{
+       const struct tcf_meta_ops *ops = find_ife_oplist(metaid);
+       int ret;
 
+       if (!ops)
+               return -ENOENT;
+       ret = __add_metainfo(ops, ife, metaid, metaval, len, false, exists);
+       if (ret)
+               /*put back what find_ife_oplist took */
+               module_put(ops->owner);
        return ret;
 }
 
-static int use_all_metadata(struct tcf_ife_info *ife)
+static int use_all_metadata(struct tcf_ife_info *ife, bool exists)
 {
        struct tcf_meta_ops *o;
        int rc = 0;
        int installed = 0;
 
-       read_lock_bh(&ife_mod_lock);
+       read_lock(&ife_mod_lock);
        list_for_each_entry(o, &ifeoplist, list) {
-               rc = add_metainfo(ife, o->metaid, NULL, 0, true);
+               rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
                if (rc == 0)
                        installed += 1;
        }
-       read_unlock_bh(&ife_mod_lock);
+       read_unlock(&ife_mod_lock);
 
        if (installed)
                return 0;
@@ -422,7 +426,6 @@ static void tcf_ife_cleanup(struct tc_action *a)
                kfree_rcu(p, rcu);
 }
 
-/* under ife->tcf_lock for existing action */
 static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb,
                             bool exists, bool rtnl_held)
 {
@@ -436,8 +439,7 @@ static int populate_metalist(struct tcf_ife_info *ife, struct nlattr **tb,
                        val = nla_data(tb[i]);
                        len = nla_len(tb[i]);
 
-                       rc = load_metaops_and_vet(ife, i, val, len, exists,
-                                                 rtnl_held);
+                       rc = load_metaops_and_vet(i, val, len, rtnl_held);
                        if (rc != 0)
                                return rc;
 
@@ -540,8 +542,6 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
                p->eth_type = ife_type;
        }
 
-       if (exists)
-               spin_lock_bh(&ife->tcf_lock);
 
        if (ret == ACT_P_CREATED)
                INIT_LIST_HEAD(&ife->metalist);
@@ -551,10 +551,7 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
                                       NULL, NULL);
                if (err) {
 metadata_parse_err:
-                       if (exists)
-                               spin_unlock_bh(&ife->tcf_lock);
                        tcf_idr_release(*a, bind);
-
                        kfree(p);
                        return err;
                }
@@ -569,17 +566,16 @@ static int tcf_ife_init(struct net *net, struct nlattr *nla,
                 * as we can. You better have at least one else we are
                 * going to bail out
                 */
-               err = use_all_metadata(ife);
+               err = use_all_metadata(ife, exists);
                if (err) {
-                       if (exists)
-                               spin_unlock_bh(&ife->tcf_lock);
                        tcf_idr_release(*a, bind);
-
                        kfree(p);
                        return err;
                }
        }
 
+       if (exists)
+               spin_lock_bh(&ife->tcf_lock);
        ife->tcf_action = parm->action;
        /* protected by tcf_lock when modifying existing action */
        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,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_ife_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, ife_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_ife_ops = {
        .kind = "ife",
        .type = TCA_ACT_IFE,
@@ -870,7 +859,6 @@ static struct tc_action_ops act_ife_ops = {
        .init = tcf_ife_init,
        .walk = tcf_ife_walker,
        .lookup = tcf_ife_search,
-       .delete = tcf_ife_delete,
        .size = sizeof(struct tcf_ife_info),
 };
 
index 51f235bbeb5bccb4267fd70eeec8399494c9f246..23273b5303fd9dcc68cf09ee6f701defe50580b5 100644 (file)
@@ -337,13 +337,6 @@ static int tcf_ipt_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_ipt_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, ipt_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_ipt_ops = {
        .kind           =       "ipt",
        .type           =       TCA_ACT_IPT,
@@ -354,7 +347,6 @@ static struct tc_action_ops act_ipt_ops = {
        .init           =       tcf_ipt_init,
        .walk           =       tcf_ipt_walker,
        .lookup         =       tcf_ipt_search,
-       .delete         =       tcf_ipt_delete,
        .size           =       sizeof(struct tcf_ipt),
 };
 
@@ -395,13 +387,6 @@ static int tcf_xt_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_xt_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, xt_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_xt_ops = {
        .kind           =       "xt",
        .type           =       TCA_ACT_XT,
@@ -412,7 +397,6 @@ static struct tc_action_ops act_xt_ops = {
        .init           =       tcf_xt_init,
        .walk           =       tcf_xt_walker,
        .lookup         =       tcf_xt_search,
-       .delete         =       tcf_xt_delete,
        .size           =       sizeof(struct tcf_ipt),
 };
 
index 38fd20f10f6796eaba1402ee572d7712837f1a2c..8bf66d0a6800006e070eacc77519257410696097 100644 (file)
@@ -395,13 +395,6 @@ static void tcf_mirred_put_dev(struct net_device *dev)
        dev_put(dev);
 }
 
-static int tcf_mirred_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, mirred_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_mirred_ops = {
        .kind           =       "mirred",
        .type           =       TCA_ACT_MIRRED,
@@ -416,7 +409,6 @@ static struct tc_action_ops act_mirred_ops = {
        .size           =       sizeof(struct tcf_mirred),
        .get_dev        =       tcf_mirred_get_dev,
        .put_dev        =       tcf_mirred_put_dev,
-       .delete         =       tcf_mirred_delete,
 };
 
 static __net_init int mirred_init_net(struct net *net)
index 822e903bfc25f008d9754d1340a5b4352f4fe59e..4313aa102440e9b55fb0ba200406801217d65284 100644 (file)
@@ -300,13 +300,6 @@ static int tcf_nat_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_nat_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, nat_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_nat_ops = {
        .kind           =       "nat",
        .type           =       TCA_ACT_NAT,
@@ -316,7 +309,6 @@ static struct tc_action_ops act_nat_ops = {
        .init           =       tcf_nat_init,
        .walk           =       tcf_nat_walker,
        .lookup         =       tcf_nat_search,
-       .delete         =       tcf_nat_delete,
        .size           =       sizeof(struct tcf_nat),
 };
 
index 8a7a7cb94e8308e8b4d240f957b64080b269f485..10703407001972a8cccc297a8c0d85e72edfed1c 100644 (file)
@@ -460,13 +460,6 @@ static int tcf_pedit_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_pedit_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, pedit_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_pedit_ops = {
        .kind           =       "pedit",
        .type           =       TCA_ACT_PEDIT,
@@ -477,7 +470,6 @@ static struct tc_action_ops act_pedit_ops = {
        .init           =       tcf_pedit_init,
        .walk           =       tcf_pedit_walker,
        .lookup         =       tcf_pedit_search,
-       .delete         =       tcf_pedit_delete,
        .size           =       sizeof(struct tcf_pedit),
 };
 
index 06f0742db593166370cfb69f1ef8a687e29007be..5d8bfa878477e8e738be55d2c9b818423c3c8ccc 100644 (file)
@@ -320,13 +320,6 @@ static int tcf_police_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_police_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, police_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 MODULE_AUTHOR("Alexey Kuznetsov");
 MODULE_DESCRIPTION("Policing actions");
 MODULE_LICENSE("GPL");
@@ -340,7 +333,6 @@ static struct tc_action_ops act_police_ops = {
        .init           =       tcf_police_init,
        .walk           =       tcf_police_walker,
        .lookup         =       tcf_police_search,
-       .delete         =       tcf_police_delete,
        .size           =       sizeof(struct tcf_police),
 };
 
index 207b4132d1b066a394467ace6cf454dbce53a33f..44e9c00657bc1e8572d78e8a9ca1c6a142eb9c76 100644 (file)
@@ -232,13 +232,6 @@ static int tcf_sample_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_sample_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, sample_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_sample_ops = {
        .kind     = "sample",
        .type     = TCA_ACT_SAMPLE,
@@ -249,7 +242,6 @@ static struct tc_action_ops act_sample_ops = {
        .cleanup  = tcf_sample_cleanup,
        .walk     = tcf_sample_walker,
        .lookup   = tcf_sample_search,
-       .delete   = tcf_sample_delete,
        .size     = sizeof(struct tcf_sample),
 };
 
index e616523ba3c15f9126146240d440d96849ac4ded..52400d49f81f233a572de8cdffff9c94099e614a 100644 (file)
@@ -196,13 +196,6 @@ static int tcf_simp_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_simp_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, simp_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_simp_ops = {
        .kind           =       "simple",
        .type           =       TCA_ACT_SIMP,
@@ -213,7 +206,6 @@ static struct tc_action_ops act_simp_ops = {
        .init           =       tcf_simp_init,
        .walk           =       tcf_simp_walker,
        .lookup         =       tcf_simp_search,
-       .delete         =       tcf_simp_delete,
        .size           =       sizeof(struct tcf_defact),
 };
 
index 926d7bc4a89d9db85078677f1bdb9d6c57a767fc..73e44ce2a8837d9151b77de1e1bf619872af217c 100644 (file)
@@ -299,13 +299,6 @@ static int tcf_skbedit_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_skbedit_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, skbedit_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_skbedit_ops = {
        .kind           =       "skbedit",
        .type           =       TCA_ACT_SKBEDIT,
@@ -316,7 +309,6 @@ static struct tc_action_ops act_skbedit_ops = {
        .cleanup        =       tcf_skbedit_cleanup,
        .walk           =       tcf_skbedit_walker,
        .lookup         =       tcf_skbedit_search,
-       .delete         =       tcf_skbedit_delete,
        .size           =       sizeof(struct tcf_skbedit),
 };
 
index d6a1af0c41712cf6e61bcdaefc06959e616efa21..588077fafd6cc58473b1d0de85b1aa3103b3bf69 100644 (file)
@@ -259,13 +259,6 @@ static int tcf_skbmod_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_skbmod_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, skbmod_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_skbmod_ops = {
        .kind           =       "skbmod",
        .type           =       TCA_ACT_SKBMOD,
@@ -276,7 +269,6 @@ static struct tc_action_ops act_skbmod_ops = {
        .cleanup        =       tcf_skbmod_cleanup,
        .walk           =       tcf_skbmod_walker,
        .lookup         =       tcf_skbmod_search,
-       .delete         =       tcf_skbmod_delete,
        .size           =       sizeof(struct tcf_skbmod),
 };
 
index 8f09cf08d8fe1242cdbbc1951124e0f19ace18ae..420759153d5f4442eebab5a375714f7f89df7ea9 100644 (file)
@@ -548,13 +548,6 @@ static int tunnel_key_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tunnel_key_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, tunnel_key_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_tunnel_key_ops = {
        .kind           =       "tunnel_key",
        .type           =       TCA_ACT_TUNNEL_KEY,
@@ -565,7 +558,6 @@ static struct tc_action_ops act_tunnel_key_ops = {
        .cleanup        =       tunnel_key_release,
        .walk           =       tunnel_key_walker,
        .lookup         =       tunnel_key_search,
-       .delete         =       tunnel_key_delete,
        .size           =       sizeof(struct tcf_tunnel_key),
 };
 
index 209e70ad2c09a0b0e9567f24b33108f7b5e1f1e4..033d273afe50236a090fd4caddd0a8328ce82157 100644 (file)
@@ -296,13 +296,6 @@ static int tcf_vlan_search(struct net *net, struct tc_action **a, u32 index,
        return tcf_idr_search(tn, a, index);
 }
 
-static int tcf_vlan_delete(struct net *net, u32 index)
-{
-       struct tc_action_net *tn = net_generic(net, vlan_net_id);
-
-       return tcf_idr_delete_index(tn, index);
-}
-
 static struct tc_action_ops act_vlan_ops = {
        .kind           =       "vlan",
        .type           =       TCA_ACT_VLAN,
@@ -313,7 +306,6 @@ static struct tc_action_ops act_vlan_ops = {
        .cleanup        =       tcf_vlan_cleanup,
        .walk           =       tcf_vlan_walker,
        .lookup         =       tcf_vlan_search,
-       .delete         =       tcf_vlan_delete,
        .size           =       sizeof(struct tcf_vlan),
 };
 
index d5d2a6dc39216b0ca28bd11094f0b64fda5c5964..f218ccf1e2d9a651ad07c2a6276742b97d3b2102 100644 (file)
@@ -914,6 +914,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
        struct nlattr *opt = tca[TCA_OPTIONS];
        struct nlattr *tb[TCA_U32_MAX + 1];
        u32 htid, flags = 0;
+       size_t sel_size;
        int err;
 #ifdef CONFIG_CLS_U32_PERF
        size_t size;
@@ -1076,8 +1077,13 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
        }
 
        s = nla_data(tb[TCA_U32_SEL]);
+       sel_size = struct_size(s, keys, s->nkeys);
+       if (nla_len(tb[TCA_U32_SEL]) < sel_size) {
+               err = -EINVAL;
+               goto erridr;
+       }
 
-       n = kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);
+       n = kzalloc(offsetof(typeof(*n), sel) + sel_size, GFP_KERNEL);
        if (n == NULL) {
                err = -ENOBUFS;
                goto erridr;
@@ -1092,7 +1098,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
        }
 #endif
 
-       memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
+       memcpy(&n->sel, s, sel_size);
        RCU_INIT_POINTER(n->ht_up, ht);
        n->handle = handle;
        n->fshift = s->hmask ? ffs(ntohl(s->hmask)) - 1 : 0;
index 35fc7252187c1f54fbcbceb827d7270381b2da5b..c07c30b916d5e4d7b7fef5586f92df366194da85 100644 (file)
@@ -64,7 +64,6 @@
 #include <linux/vmalloc.h>
 #include <linux/reciprocal_div.h>
 #include <net/netlink.h>
-#include <linux/version.h>
 #include <linux/if_vlan.h>
 #include <net/pkt_sched.h>
 #include <net/pkt_cls.h>
@@ -621,15 +620,20 @@ static bool cake_ddst(int flow_mode)
 }
 
 static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
-                    int flow_mode)
+                    int flow_mode, u16 flow_override, u16 host_override)
 {
-       u32 flow_hash = 0, srchost_hash, dsthost_hash;
+       u32 flow_hash = 0, srchost_hash = 0, dsthost_hash = 0;
        u16 reduced_hash, srchost_idx, dsthost_idx;
        struct flow_keys keys, host_keys;
 
        if (unlikely(flow_mode == CAKE_FLOW_NONE))
                return 0;
 
+       /* If both overrides are set we can skip packet dissection entirely */
+       if ((flow_override || !(flow_mode & CAKE_FLOW_FLOWS)) &&
+           (host_override || !(flow_mode & CAKE_FLOW_HOSTS)))
+               goto skip_hash;
+
        skb_flow_dissect_flow_keys(skb, &keys,
                                   FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL);
 
@@ -676,6 +680,14 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
        if (flow_mode & CAKE_FLOW_FLOWS)
                flow_hash = flow_hash_from_keys(&keys);
 
+skip_hash:
+       if (flow_override)
+               flow_hash = flow_override - 1;
+       if (host_override) {
+               dsthost_hash = host_override - 1;
+               srchost_hash = host_override - 1;
+       }
+
        if (!(flow_mode & CAKE_FLOW_FLOWS)) {
                if (flow_mode & CAKE_FLOW_SRC_IP)
                        flow_hash ^= srchost_hash;
@@ -1571,7 +1583,7 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
        struct cake_sched_data *q = qdisc_priv(sch);
        struct tcf_proto *filter;
        struct tcf_result res;
-       u32 flow = 0;
+       u16 flow = 0, host = 0;
        int result;
 
        filter = rcu_dereference_bh(q->filter_list);
@@ -1595,10 +1607,12 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
 #endif
                if (TC_H_MIN(res.classid) <= CAKE_QUEUES)
                        flow = TC_H_MIN(res.classid);
+               if (TC_H_MAJ(res.classid) <= (CAKE_QUEUES << 16))
+                       host = TC_H_MAJ(res.classid) >> 16;
        }
 hash:
        *t = cake_select_tin(sch, skb);
-       return flow ?: cake_hash(*t, skb, flow_mode) + 1;
+       return cake_hash(*t, skb, flow_mode, flow, host) + 1;
 }
 
 static void cake_reconfigure(struct Qdisc *sch);
index 93c0c225ab340ae0f0de3c5c2e6b2a149579c19e..180b6640e5316bb89b502414c2b51c4db0269997 100644 (file)
@@ -213,9 +213,14 @@ static void tls_write_space(struct sock *sk)
 {
        struct tls_context *ctx = tls_get_ctx(sk);
 
-       /* We are already sending pages, ignore notification */
-       if (ctx->in_tcp_sendpages)
+       /* If in_tcp_sendpages call lower protocol write space handler
+        * to ensure we wake up any waiting operations there. For example
+        * if do_tcp_sendpages where to call sk_wait_event.
+        */
+       if (ctx->in_tcp_sendpages) {
+               ctx->sk_write_space(sk);
                return;
+       }
 
        if (!sk->sk_write_pending && tls_is_pending_closed_record(ctx)) {
                gfp_t sk_allocation = sk->sk_allocation;
index 911ca6d3cb5a6cd7d056a04cf3df57d5833bafeb..bfe2dbea480ba8ef54e0cc24659aa15d267aea2a 100644 (file)
@@ -74,14 +74,14 @@ int xdp_umem_assign_dev(struct xdp_umem *umem, struct net_device *dev,
                return 0;
 
        if (!dev->netdev_ops->ndo_bpf || !dev->netdev_ops->ndo_xsk_async_xmit)
-               return force_zc ? -ENOTSUPP : 0; /* fail or fallback */
+               return force_zc ? -EOPNOTSUPP : 0; /* fail or fallback */
 
        bpf.command = XDP_QUERY_XSK_UMEM;
 
        rtnl_lock();
        err = xdp_umem_query(dev, queue_id);
        if (err) {
-               err = err < 0 ? -ENOTSUPP : -EBUSY;
+               err = err < 0 ? -EOPNOTSUPP : -EBUSY;
                goto err_rtnl_unlock;
        }
 
index c75413d05a630cbb8111857b927cb8b0202c5432..ce53639a864a14fa13d85710af4b875fd477217f 100644 (file)
@@ -153,10 +153,6 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
 # Usage:  EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
 cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4))
 
-# cc-if-fullversion
-# Usage:  EXTRA_CFLAGS += $(call cc-if-fullversion, -lt, 040502, -O1)
-cc-if-fullversion = $(shell [ $(cc-fullversion) $(1) $(2) ] && echo $(3) || echo $(4))
-
 # cc-ldoption
 # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
 cc-ldoption = $(call try-run,\
index 1c48572223d11fa802873af09d0990b731a74697..5a2d1c9578a0ce19d764dcc8d84740234feb58c6 100644 (file)
@@ -246,8 +246,6 @@ objtool_args += --no-fp
 endif
 ifdef CONFIG_GCOV_KERNEL
 objtool_args += --no-unreachable
-else
-objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable)
 endif
 ifdef CONFIG_RETPOLINE
 ifneq ($(RETPOLINE_CFLAGS),)
index 1832100d1b274db7b71045e4dfe9e7e00e534ae0..6d41323be291bbf7e18348375aa88006d36facda 100644 (file)
@@ -194,8 +194,10 @@ int do_event_pipe(int argc, char **argv)
        }
 
        while (argc) {
-               if (argc < 2)
+               if (argc < 2) {
                        BAD_ARG();
+                       goto err_close_map;
+               }
 
                if (is_prefix(*argv, "cpu")) {
                        char *endptr;
@@ -221,6 +223,7 @@ int do_event_pipe(int argc, char **argv)
                        NEXT_ARG();
                } else {
                        BAD_ARG();
+                       goto err_close_map;
                }
 
                do_all = false;