]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'omap-for-v4.5/81xx-dts-signed' of git://git.kernel.org/pub/scm/linux/kerne...
authorArnd Bergmann <arnd@arndb.de>
Thu, 31 Dec 2015 15:25:22 +0000 (16:25 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 31 Dec 2015 15:25:22 +0000 (16:25 +0100)
Pull "reworked dts changes for ti81xx devices and minimal
dra62x j5ec-evm support" from Tony Lindgren:

Add minimal device tree support for dra62x also known j5eco. It is
related to dm814x, just the clocks are a bit different and it has a
different set of integrated devices. And let's get some basic dm814x
and dra62x devices working as many of the devices are like on am33xx::

- pinctrl using the pinctrl defines as for am33xx

- Updated EDMA bindings with support for using exma_xbar

- MMC support for dm814x-evm, t410 and dra62x-j5eco-evm

- USB support for dm814x-evm, t410 and dra62x-j5eco-evm

This branch depends on an earlier omap-for-v4.5/81xx-fixes-signed
branch that has dm814x dts fixes interlaced with SoC related fixes to
keep things booting. The interlaced SoC and dts fixes were needed
because of issues with the device tree defined clocks that just
happened to work on bootloader timings for t410 earlier.

* tag 'omap-for-v4.5/81xx-dts-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (21 commits)
  ARM: dts: Add usb support for j5-eco evm
  ARM: dts: Add usb support for hp t410
  ARM: dts: Add usb support for dm814x-evm
  ARM: dts: Add usb support for dm814x and dra62x
  ARM: dts: Enable emmc on hp t410
  ARM: dts: Add mmc support for dra62x j5-eco evm
  ARM: dts: Add mmc support for dm8148-evm
  ARM: dts: Add mmc device entries for dm814x
  ARM: dts: Update edma bindings on dm814x to use edma_xbar
  ARM: dts: Add pinctrl macros for dm814x
  ARM: dts: Add minimal dra62x j5-eco evm support
  ARM: dts: Add basic support for dra62x j5-eco SoC
  ARM: OMAP2+: Remove useless check for legacy booting for dm814x
  ARM: OMAP2+: Enable GPIO for dm814x
  ARM: dts: Fix dm814x pinctrl address and mask
  ARM: dts: Fix dm8148 control modules ranges
  ARM: OMAP2+: Fix timer entries for dm814x
  ARM: dts: Fix some mux and divider clocks to get dm814x-evm booting
  ARM: OMAP2+: Add DPPLS clock manager for dm814x
  clk: ti: Add few dm814x clock aliases
  ...

548 files changed:
Documentation/arm/keystone/Overview.txt
Documentation/block/null_blk.txt
Documentation/devicetree/bindings/arm/bcm/brcm,bcm4708.txt
Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/compulab-boards.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/cpus.txt
Documentation/devicetree/bindings/arm/marvell,kirkwood.txt
Documentation/devicetree/bindings/arm/mediatek.txt
Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
Documentation/devicetree/bindings/arm/omap/omap.txt
Documentation/devicetree/bindings/arm/rockchip.txt
Documentation/devicetree/bindings/arm/scu.txt
Documentation/devicetree/bindings/arm/technologic.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/arm-syscon-icst.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
Documentation/devicetree/bindings/clock/dove-divider-clock.txt [new file with mode: 0644]
Documentation/devicetree/bindings/display/panel/startek,startek-kd050c.txt [new file with mode: 0644]
Documentation/devicetree/bindings/dma/ti-edma.txt
Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt
Documentation/devicetree/bindings/regulator/tps65217.txt
Documentation/devicetree/bindings/serial/mtk-uart.txt
Documentation/devicetree/bindings/soc/dove/pmu.txt [new file with mode: 0644]
Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt [new file with mode: 0644]
Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt [new file with mode: 0644]
Documentation/devicetree/bindings/spi/ti_qspi.txt
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/devicetree/bindings/watchdog/mtk-wdt.txt
MAINTAINERS
Makefile
arch/arc/configs/axs101_defconfig
arch/arc/configs/axs103_defconfig
arch/arc/configs/axs103_smp_defconfig
arch/arc/configs/nsim_hs_defconfig
arch/arc/configs/nsim_hs_smp_defconfig
arch/arc/configs/nsimosci_hs_defconfig
arch/arc/configs/nsimosci_hs_smp_defconfig
arch/arc/configs/vdk_hs38_defconfig
arch/arc/configs/vdk_hs38_smp_defconfig
arch/arc/include/asm/irqflags-arcv2.h
arch/arc/include/asm/irqflags-compact.h
arch/arc/kernel/ctx_sw.c
arch/arc/kernel/ctx_sw_asm.S
arch/arc/kernel/process.c
arch/arc/kernel/unwind.c
arch/arc/mm/tlb.c
arch/arm/Kconfig
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/am335x-baltos-ir5221.dts
arch/arm/boot/dts/am335x-bone-common.dtsi
arch/arm/boot/dts/am335x-boneblack.dts
arch/arm/boot/dts/am335x-bonegreen.dts
arch/arm/boot/dts/am335x-chiliboard.dts
arch/arm/boot/dts/am335x-chilisom.dtsi
arch/arm/boot/dts/am335x-cm-t335.dts [new file with mode: 0644]
arch/arm/boot/dts/am335x-evm.dts
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am335x-lxm.dts
arch/arm/boot/dts/am335x-nano.dts
arch/arm/boot/dts/am335x-pepper.dts
arch/arm/boot/dts/am335x-phycore-som.dtsi
arch/arm/boot/dts/am335x-sbc-t335.dts [new file with mode: 0644]
arch/arm/boot/dts/am335x-shc.dts [new file with mode: 0644]
arch/arm/boot/dts/am335x-sl50.dts
arch/arm/boot/dts/am335x-wega.dtsi
arch/arm/boot/dts/am33xx.dtsi
arch/arm/boot/dts/am3517-craneboard.dts
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/am437x-cm-t43.dts [new file with mode: 0644]
arch/arm/boot/dts/am437x-gp-evm.dts
arch/arm/boot/dts/am437x-idk-evm.dts
arch/arm/boot/dts/am437x-sbc-t43.dts [new file with mode: 0644]
arch/arm/boot/dts/am437x-sk-evm.dts
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/am57xx-beagle-x15.dts
arch/arm/boot/dts/am57xx-cl-som-am57x.dts [new file with mode: 0644]
arch/arm/boot/dts/am57xx-sbc-am57x.dts [new file with mode: 0644]
arch/arm/boot/dts/animeo_ip.dts
arch/arm/boot/dts/arm-realview-pb11mp.dts [new file with mode: 0644]
arch/arm/boot/dts/armada-370-netgear-rn102.dts
arch/arm/boot/dts/armada-370-netgear-rn104.dts
arch/arm/boot/dts/armada-388-clearfog.dts [new file with mode: 0644]
arch/arm/boot/dts/armada-388-gp.dts
arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi [new file with mode: 0644]
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
arch/arm/boot/dts/at91-foxg20.dts
arch/arm/boot/dts/at91-kizbox.dts
arch/arm/boot/dts/at91-kizbox2.dts
arch/arm/boot/dts/at91-kizboxmini.dts
arch/arm/boot/dts/at91-qil_a9260.dts
arch/arm/boot/dts/at91-sama5d2_xplained.dts
arch/arm/boot/dts/at91-sama5d3_xplained.dts
arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts [new file with mode: 0644]
arch/arm/boot/dts/at91-sama5d4_xplained.dts
arch/arm/boot/dts/at91-sama5d4ek.dts
arch/arm/boot/dts/at91-vinco.dts [new file with mode: 0644]
arch/arm/boot/dts/at91rm9200ek.dts
arch/arm/boot/dts/at91sam9261ek.dts
arch/arm/boot/dts/at91sam9263ek.dts
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
arch/arm/boot/dts/at91sam9m10g45ek.dts
arch/arm/boot/dts/at91sam9n12ek.dts
arch/arm/boot/dts/at91sam9rlek.dts
arch/arm/boot/dts/at91sam9x5cm.dtsi
arch/arm/boot/dts/bcm-cygnus.dtsi
arch/arm/boot/dts/bcm-nsp.dtsi
arch/arm/boot/dts/bcm4709-netgear-r8000.dts
arch/arm/boot/dts/bcm5301x.dtsi
arch/arm/boot/dts/bcm63138.dtsi
arch/arm/boot/dts/bcm94708.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm94709.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm953012k.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm958625k.dts
arch/arm/boot/dts/berlin2.dtsi
arch/arm/boot/dts/berlin2cd.dtsi
arch/arm/boot/dts/berlin2q-marvell-dmp.dts
arch/arm/boot/dts/berlin2q.dtsi
arch/arm/boot/dts/compulab-sb-som.dtsi [new file with mode: 0644]
arch/arm/boot/dts/dm816x.dtsi
arch/arm/boot/dts/dove-cubox.dts
arch/arm/boot/dts/dove.dtsi
arch/arm/boot/dts/dra7-evm.dts
arch/arm/boot/dts/dra7.dtsi
arch/arm/boot/dts/dra72-evm.dts
arch/arm/boot/dts/ea3250.dts
arch/arm/boot/dts/exynos3250.dtsi
arch/arm/boot/dts/exynos4.dtsi
arch/arm/boot/dts/exynos5.dtsi
arch/arm/boot/dts/exynos5410.dtsi
arch/arm/boot/dts/imx25-pinfunc.h
arch/arm/boot/dts/imx25.dtsi
arch/arm/boot/dts/imx28-cfa10057.dts
arch/arm/boot/dts/imx28.dtsi
arch/arm/boot/dts/imx51-ts4800.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl.dtsi
arch/arm/boot/dts/imx6q-gw5400-a.dts
arch/arm/boot/dts/imx6q-novena.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q.dtsi
arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
arch/arm/boot/dts/imx6qdl-gw551x.dtsi
arch/arm/boot/dts/imx6qdl-gw552x.dtsi
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6sl.dtsi
arch/arm/boot/dts/imx6sx.dtsi
arch/arm/boot/dts/imx6ul.dtsi
arch/arm/boot/dts/imx7d-cl-som-imx7.dts [new file with mode: 0644]
arch/arm/boot/dts/imx7d-sbc-imx7.dts [new file with mode: 0644]
arch/arm/boot/dts/imx7d-sdb.dts
arch/arm/boot/dts/imx7d.dtsi
arch/arm/boot/dts/k2l-netcp.dtsi
arch/arm/boot/dts/kirkwood-nsa325.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-ts219.dtsi
arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts
arch/arm/boot/dts/logicpd-torpedo-som.dtsi
arch/arm/boot/dts/lpc18xx.dtsi
arch/arm/boot/dts/lpc32xx.dtsi
arch/arm/boot/dts/lpc4337-ciaa.dts
arch/arm/boot/dts/lpc4357-ea4357-devkit.dts
arch/arm/boot/dts/lpc4357.dtsi
arch/arm/boot/dts/ls1021a-qds.dts
arch/arm/boot/dts/ls1021a-twr.dts
arch/arm/boot/dts/ls1021a.dtsi
arch/arm/boot/dts/mt2701-evb.dts [new file with mode: 0644]
arch/arm/boot/dts/mt2701.dtsi [new file with mode: 0644]
arch/arm/boot/dts/mt8135.dtsi
arch/arm/boot/dts/omap3-beagle-xm.dts
arch/arm/boot/dts/omap3-beagle.dts
arch/arm/boot/dts/omap3-cm-t3x.dtsi
arch/arm/boot/dts/omap3-devkit8000-common.dtsi
arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi
arch/arm/boot/dts/omap3-evm-37xx.dts
arch/arm/boot/dts/omap3-gta04.dtsi
arch/arm/boot/dts/omap3-igep0020.dts
arch/arm/boot/dts/omap3-igep0030.dts
arch/arm/boot/dts/omap3-ldp.dts
arch/arm/boot/dts/omap3-lilly-a83x.dtsi
arch/arm/boot/dts/omap3-n900.dts
arch/arm/boot/dts/omap3-n950-n9.dtsi
arch/arm/boot/dts/omap3-overo-alto35-common.dtsi
arch/arm/boot/dts/omap3-overo-chestnut43-common.dtsi
arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi
arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi
arch/arm/boot/dts/omap3-overo-gallop43-common.dtsi
arch/arm/boot/dts/omap3-overo-palo35-common.dtsi
arch/arm/boot/dts/omap3-overo-palo43-common.dtsi
arch/arm/boot/dts/omap3-pandora-common.dtsi
arch/arm/boot/dts/omap3-panel-sharp-ls037v7dw01.dtsi
arch/arm/boot/dts/omap3-zoom3.dts
arch/arm/boot/dts/omap3.dtsi
arch/arm/boot/dts/omap4-duovero-parlor.dts
arch/arm/boot/dts/omap4-panda-a4.dts
arch/arm/boot/dts/omap4-panda-common.dtsi
arch/arm/boot/dts/omap4-panda-es.dts
arch/arm/boot/dts/omap4-sdp-es23plus.dts
arch/arm/boot/dts/omap4-sdp.dts
arch/arm/boot/dts/omap4-var-om44customboard.dtsi
arch/arm/boot/dts/omap4.dtsi
arch/arm/boot/dts/omap5-board-common.dtsi
arch/arm/boot/dts/omap5-cm-t54.dts
arch/arm/boot/dts/omap5-uevm.dts
arch/arm/boot/dts/omap5.dtsi
arch/arm/boot/dts/phy3250.dts
arch/arm/boot/dts/qcom-apq8064-cm-qs600.dts
arch/arm/boot/dts/qcom-apq8064-ifc6410.dts
arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts [new file with mode: 0644]
arch/arm/boot/dts/qcom-apq8064.dtsi
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
arch/arm/boot/dts/qcom-apq8084-mtp.dts
arch/arm/boot/dts/qcom-apq8084.dtsi
arch/arm/boot/dts/qcom-msm8960.dtsi
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
arch/arm/boot/dts/qcom-msm8974.dtsi
arch/arm/boot/dts/qcom-pm8841.dtsi
arch/arm/boot/dts/qcom-pm8941.dtsi
arch/arm/boot/dts/qcom-pma8084.dtsi
arch/arm/boot/dts/r8a73a4-ape6evm.dts
arch/arm/boot/dts/r8a7740-armadillo800eva.dts
arch/arm/boot/dts/r8a7740.dtsi
arch/arm/boot/dts/r8a7778-bockw.dts
arch/arm/boot/dts/r8a7778.dtsi
arch/arm/boot/dts/r8a7790-lager.dts
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791-henninger.dts [deleted file]
arch/arm/boot/dts/r8a7791-koelsch.dts
arch/arm/boot/dts/r8a7791-porter.dts
arch/arm/boot/dts/r8a7791.dtsi
arch/arm/boot/dts/r8a7793-gose.dts
arch/arm/boot/dts/r8a7793.dtsi
arch/arm/boot/dts/r8a7794-alt.dts
arch/arm/boot/dts/r8a7794-silk.dts
arch/arm/boot/dts/r8a7794.dtsi
arch/arm/boot/dts/rk3036-evb.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3036-kylin.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3036.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/boot/dts/rk3188.dtsi
arch/arm/boot/dts/rk3228-evb.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3228.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3288-evb-act8846.dts
arch/arm/boot/dts/rk3288-evb-rk808.dts
arch/arm/boot/dts/rk3288-evb.dtsi
arch/arm/boot/dts/rk3288-r89.dts
arch/arm/boot/dts/rk3288-rock2-som.dtsi
arch/arm/boot/dts/rk3288-rock2-square.dts
arch/arm/boot/dts/rk3288-thermal.dtsi
arch/arm/boot/dts/rk3288-veyron-brain.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3288-veyron-mickey.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3288-veyron-minnie.dts
arch/arm/boot/dts/rk3288-veyron-speedy.dts
arch/arm/boot/dts/rk3288-veyron.dtsi
arch/arm/boot/dts/rk3288.dtsi
arch/arm/boot/dts/rk3xxx.dtsi
arch/arm/boot/dts/sama5d2.dtsi
arch/arm/boot/dts/sama5d35ek.dts
arch/arm/boot/dts/sama5d4.dtsi
arch/arm/boot/dts/sh73a0-kzm9g.dts
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/boot/dts/socfpga.dtsi
arch/arm/boot/dts/socfpga_arria5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi [new file with mode: 0644]
arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts [new file with mode: 0644]
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
arch/arm/boot/dts/ste-dbx5x0.dtsi
arch/arm/boot/dts/ste-href-stuib.dtsi
arch/arm/boot/dts/ste-href-tvk1281618.dtsi
arch/arm/boot/dts/ste-hrefv60plus.dtsi
arch/arm/boot/dts/ste-nomadik-s8815.dts
arch/arm/boot/dts/ste-snowball.dts
arch/arm/boot/dts/ste-u300.dts
arch/arm/boot/dts/sun4i-a10-gemei-g9.dts
arch/arm/boot/dts/sun4i-a10-inet1.dts
arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts
arch/arm/boot/dts/sun4i-a10-mk802.dts
arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/boot/dts/sun5i-a10s-auxtek-t004.dts
arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts [new file with mode: 0644]
arch/arm/boot/dts/sun5i-a13-utoo-p66.dts
arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
arch/arm/boot/dts/sun7i-a20-bananapi.dts
arch/arm/boot/dts/sun7i-a20-icnova-swac.dts [new file with mode: 0644]
arch/arm/boot/dts/sun7i-a20-mk808c.dts
arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts
arch/arm/boot/dts/sun7i-a20-orangepi-mini.dts
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
arch/arm/boot/dts/sun7i-a20-pcduino3.dts
arch/arm/boot/dts/sun7i-a20-wexler-tab7200.dts
arch/arm/boot/dts/sun7i-a20-wits-pro-a20-dkt.dts
arch/arm/boot/dts/sun7i-a20.dtsi
arch/arm/boot/dts/sun8i-a23-a33.dtsi
arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-h3.dtsi [new file with mode: 0644]
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
arch/arm/boot/dts/sun9i-a80-optimus.dts
arch/arm/boot/dts/sun9i-a80.dtsi
arch/arm/boot/dts/tango4-common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tango4-smp8758.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tango4-vantage-1172.dts [new file with mode: 0644]
arch/arm/boot/dts/tps65217.dtsi [deleted file]
arch/arm/boot/dts/twl4030_omap3.dtsi
arch/arm/boot/dts/twl6030_omap4.dtsi
arch/arm/boot/dts/uniphier-common32.dtsi [new file with mode: 0644]
arch/arm/boot/dts/uniphier-ph1-ld4.dtsi
arch/arm/boot/dts/uniphier-ph1-pro4.dtsi
arch/arm/boot/dts/uniphier-ph1-pro5.dtsi
arch/arm/boot/dts/uniphier-ph1-sld8.dtsi
arch/arm/boot/dts/uniphier-proxstream2.dtsi
arch/arm/boot/dts/usb_a9260_common.dtsi
arch/arm/boot/dts/usb_a9263.dts
arch/arm/boot/dts/vf-colibri.dtsi
arch/arm/boot/dts/vf610-colibri.dtsi
arch/arm/boot/dts/vf610.dtsi
arch/arm/boot/dts/vf610m4-cosmic.dts [new file with mode: 0644]
arch/arm/boot/dts/vfxxx.dtsi
arch/arm/boot/dts/zynq-7000.dtsi
arch/arm/boot/dts/zynq-zc702.dts
arch/arm/configs/at91_dt_defconfig
arch/arm/configs/sama5_defconfig
arch/arm/include/asm/irq.h
arch/arm/include/uapi/asm/unistd.h
arch/arm/kernel/bios32.c
arch/arm/kernel/calls.S
arch/arm/kvm/arm.c
arch/arm/kvm/mmu.c
arch/arm/mach-dove/include/mach/entry-macro.S
arch/arm/mach-imx/gpc.c
arch/arm/mach-mediatek/mediatek.c
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_7xx_data.c
arch/arm/mach-omap2/pdata-quirks.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-orion5x/include/mach/entry-macro.S
arch/arm/mach-pxa/palm27x.c
arch/arm/mach-pxa/palmtc.c
arch/arm/mach-shmobile/setup-r8a7793.c
arch/arm/mach-zx/Kconfig
arch/arm64/Kconfig
arch/arm64/boot/dts/mediatek/mt8173.dtsi
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/hw_breakpoint.h
arch/arm64/include/asm/irq.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/kernel/cpu_errata.c
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/efi.c
arch/arm64/kvm/hyp.S
arch/arm64/kvm/inject_fault.c
arch/arm64/mm/context.c
arch/arm64/mm/fault.c
arch/arm64/mm/mmu.c
arch/m68k/coldfire/m54xx.c
arch/m68k/include/asm/unistd.h
arch/m68k/include/uapi/asm/unistd.h
arch/m68k/kernel/setup_no.c
arch/m68k/kernel/syscalltable.S
arch/m68k/mm/motorola.c
arch/m68k/sun3/config.c
arch/mips/kvm/emulate.c
arch/mips/kvm/locore.S
arch/mips/kvm/mips.c
arch/mips/pci/pci-rt2880.c
arch/mips/pmcs-msp71xx/msp_setup.c
arch/mips/sni/reset.c
arch/nios2/mm/cacheflush.c
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/process.c
arch/powerpc/kernel/signal_32.c
arch/powerpc/kernel/signal_64.c
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/priv.c
arch/s390/kvm/sigp.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
block/blk-merge.c
block/blk-mq.c
block/blk-timeout.c
block/noop-iosched.c
block/partitions/mac.c
drivers/Makefile
drivers/block/mtip32xx/mtip32xx.c
drivers/block/null_blk.c
drivers/bus/omap-ocp2scp.c
drivers/clk/bcm/Kconfig
drivers/clk/bcm/Makefile
drivers/clk/bcm/clk-bcm63xx.c [new file with mode: 0644]
drivers/clk/imx/clk-imx25.c
drivers/clk/imx/clk-imx51-imx53.c
drivers/clk/imx/clk-imx6q.c
drivers/clk/imx/clk-imx6ul.c
drivers/clk/imx/clk-imx7d.c
drivers/clk/imx/clk-pllv3.c
drivers/clk/imx/clk-vf610.c
drivers/cpufreq/Kconfig.arm
drivers/cpufreq/cppc_cpufreq.c
drivers/cpufreq/cpufreq.c
drivers/cpufreq/intel_pstate.c
drivers/dma/edma.c
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
drivers/gpu/drm/amd/scheduler/sched_fence.c
drivers/gpu/drm/nouveau/include/nvkm/subdev/instmem.h
drivers/gpu/drm/nouveau/nouveau_acpi.c
drivers/gpu/drm/nouveau/nouveau_drm.h
drivers/gpu/drm/nouveau/nouveau_usif.c
drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
drivers/gpu/drm/radeon/rv730_dpm.c
drivers/gpu/drm/radeon/rv770_dpm.c
drivers/lightnvm/core.c
drivers/lightnvm/gennvm.c
drivers/lightnvm/gennvm.h
drivers/lightnvm/rrpc.c
drivers/md/dm-crypt.c
drivers/md/dm-mpath.c
drivers/md/dm-thin.c
drivers/md/dm.c
drivers/nvme/host/lightnvm.c
drivers/nvme/host/pci.c
drivers/pci/host/pcie-designware.c
drivers/pci/host/pcie-hisi.c
drivers/pci/pci-sysfs.c
drivers/pci/pci.h
drivers/rtc/rtc-ds1307.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c
drivers/soc/mediatek/Kconfig
drivers/soc/ti/knav_qmss_queue.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_nego.c
drivers/target/iscsi/iscsi_target_parameters.c
drivers/target/target_core_sbc.c
drivers/target/target_core_stat.c
drivers/target/target_core_tmr.c
drivers/target/target_core_transport.c
drivers/target/target_core_user.c
drivers/thermal/Kconfig
drivers/thermal/imx_thermal.c
drivers/thermal/of-thermal.c
drivers/thermal/power_allocator.c
drivers/thermal/rcar_thermal.c
drivers/thermal/rockchip_thermal.c
drivers/watchdog/Kconfig
drivers/watchdog/mtk_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/pnx4008_wdt.c
drivers/watchdog/tegra_wdt.c
drivers/watchdog/w83977f_wdt.c
drivers/xen/events/events_base.c
drivers/xen/evtchn.c
drivers/xen/gntdev.c
fs/btrfs/backref.c
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/qgroup.c
fs/btrfs/scrub.c
fs/btrfs/tests/free-space-tests.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h
fs/btrfs/volumes.c
fs/btrfs/volumes.h
fs/nfs/callback_xdr.c
fs/nfs/inode.c
fs/nfs/nfs42proc.c
fs/nfs/nfs4client.c
fs/nfs/nfs4file.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
fs/nfs/pnfs.c
fs/splice.c
fs/sysv/inode.c
include/dt-bindings/clock/imx7d-clock.h
include/dt-bindings/clock/r8a7791-clock.h
include/dt-bindings/clock/r8a7794-clock.h
include/dt-bindings/clock/rk3036-cru.h [new file with mode: 0644]
include/dt-bindings/clock/rk3228-cru.h [new file with mode: 0644]
include/dt-bindings/clock/rk3288-cru.h
include/dt-bindings/clock/sh73a0-clock.h
include/dt-bindings/pinctrl/am43xx.h
include/dt-bindings/pinctrl/dra.h
include/dt-bindings/pinctrl/omap.h
include/dt-bindings/reset/mt8135-resets.h [moved from include/dt-bindings/reset-controller/mt8135-resets.h with 100% similarity]
include/dt-bindings/reset/mt8173-resets.h [moved from include/dt-bindings/reset-controller/mt8173-resets.h with 100% similarity]
include/kvm/arm_vgic.h
include/linux/kref.h
include/linux/kvm_host.h
include/linux/lightnvm.h
include/linux/nfs_xdr.h
include/linux/pci.h
include/linux/platform_data/edma.h
include/linux/scpi_protocol.h
include/linux/syscalls.h
include/linux/thermal.h
include/linux/types.h
include/target/target_core_base.h
include/uapi/linux/nfs.h
kernel/pid.c
net/sunrpc/backchannel_rqst.c
net/sunrpc/svc.c
security/keys/encrypted-keys/encrypted.c
security/keys/trusted.c
security/keys/user_defined.c
security/selinux/ss/conditional.c
sound/firewire/dice/dice.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_hdmi.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/usb/midi.c
sound/usb/quirks-table.h
sound/usb/quirks.c
sound/usb/usbaudio.h
tools/testing/selftests/futex/README
tools/testing/selftests/seccomp/seccomp_bpf.c
virt/kvm/arm/arch_timer.c
virt/kvm/arm/vgic.c

index f17bc4c9dff9fa1334d518e0a6c0ffc8ac270e3a..400c0c270d2e8d935e55fc1396989e75abbad36d 100644 (file)
@@ -49,24 +49,6 @@ specified through DTS. Following are the DTS used:-
 The device tree documentation for the keystone machines are located at
         Documentation/devicetree/bindings/arm/keystone/keystone.txt
 
-Known issues & workaround
--------------------------
-
-Some of the device drivers used on keystone are re-used from that from
-DaVinci and other TI SoCs. These device drivers may use clock APIs directly.
-Some of the keystone specific drivers such as netcp uses run time power
-management API instead to enable clock. As this API has limitations on
-keystone, following workaround is needed to boot Linux.
-
-   Add 'clk_ignore_unused' to the bootargs env variable in u-boot. Otherwise
-   clock frameworks will try to disable clocks that are unused and disable
-   the hardware. This is because netcp related power domain and clock
-   domains are enabled in u-boot as run time power management API currently
-   doesn't enable clocks for netcp due to a limitation. This workaround is
-   expected to be removed in the future when proper API support becomes
-   available. Until then, this work around is needed.
-
-
 Document Author
 ---------------
 Murali Karicheri <m-karicheri2@ti.com>
index 2f6c6ff7161d4e77f3ec8ffee998b19f53b18cf7..d8880ca30af4c35d562c0f77b1b3a56c3ff6e1d7 100644 (file)
@@ -70,3 +70,6 @@ use_per_node_hctx=[0/1]: Default: 0
      parameter.
   1: The multi-queue block layer is instantiated with a hardware dispatch
      queue for each CPU node in the system.
+
+use_lightnvm=[0/1]: Default: 0
+  Register device with LightNVM. Requires blk-mq to be used.
index 6b0f49f6f499f5ceee4c679367650228bc14a2c5..8608a776caa71a2ff52eca594fabd059ea65e94d 100644 (file)
@@ -5,4 +5,11 @@ Boards with the BCM4708 SoC shall have the following properties:
 
 Required root node property:
 
+bcm4708
 compatible = "brcm,bcm4708";
+
+bcm4709
+compatible = "brcm,bcm4709";
+
+bcm53012
+compatible = "brcm,bcm53012";
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,nsp-cpu-method.txt
new file mode 100644 (file)
index 0000000..677ef9d
--- /dev/null
@@ -0,0 +1,39 @@
+Broadcom Northstar Plus SoC CPU Enable Method
+---------------------------------------------
+This binding defines the enable method used for starting secondary
+CPU in the following Broadcom SoCs:
+  BCM58522, BCM58525, BCM58535, BCM58622, BCM58623, BCM58625, BCM88312
+
+The enable method is specified by defining the following required
+properties in the corresponding secondary "cpu" device tree node:
+  - enable-method = "brcm,bcm-nsp-smp";
+  - secondary-boot-reg = <...>;
+
+The secondary-boot-reg property is a u32 value that specifies the
+physical address of the register which should hold the common
+entry point for a secondary CPU. This entry is cpu node specific
+and should be added per cpu. E.g., in case of NSP (BCM58625) which
+is a dual core CPU SoC, this entry should be added to cpu1 node.
+
+
+Example:
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       enable-method = "brcm,bcm-nsp-smp";
+                       secondary-boot-reg = <0xffff042c>;
+                       reg = <1>;
+               };
+       };
diff --git a/Documentation/devicetree/bindings/arm/compulab-boards.txt b/Documentation/devicetree/bindings/arm/compulab-boards.txt
new file mode 100644 (file)
index 0000000..71172d5
--- /dev/null
@@ -0,0 +1,5 @@
+CompuLab SB-SOM is a multi-module baseboard capable of carrying CM-T43, CM-T54,
+and CM-QS600 modules with minor modifications to the SB-SOM assembly.
+
+Required root node properties:
+    - compatible = should be "compulab,sb-som"
index 3a07a87fef2087550cb24f0c4aff5f8e2fecab21..d1915549e0094c024a56ad5a7e18dbe82f16a140 100644 (file)
@@ -190,6 +190,7 @@ nodes to be present and contain the properties described below.
                            "allwinner,sun6i-a31"
                            "allwinner,sun8i-a23"
                            "arm,psci"
+                           "brcm,bcm-nsp-smp"
                            "brcm,brahma-b15"
                            "marvell,armada-375-smp"
                            "marvell,armada-380-smp"
index 5171ad8f48ff43445c84735a35e4aa980f21e526..ab0c9cdf388e9e5769bf7ecfa88f5bbc869b58fb 100644 (file)
@@ -24,6 +24,8 @@ board. Currently known boards are:
 "buffalo,lswxl"
 "buffalo,lsxhl"
 "buffalo,lsxl"
+"cloudengines,pogo02"
+"cloudengines,pogoplugv4"
 "dlink,dns-320"
 "dlink,dns-320-a1"
 "dlink,dns-325"
index 618a91994a18ecd8942b2ec9b32ccae2e71a9694..54f43bc2df443370ab0d4391a7ab6e6c713aa566 100644 (file)
@@ -6,6 +6,7 @@ following property:
 Required root node property:
 
 compatible: Must contain one of
+   "mediatek,mt2701"
    "mediatek,mt6580"
    "mediatek,mt6589"
    "mediatek,mt6592"
@@ -17,6 +18,9 @@ compatible: Must contain one of
 
 Supported boards:
 
+- Evaluation board for MT2701:
+    Required root node properties:
+      - compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
 - Evaluation board for MT6580:
     Required root node properties:
       - compatible = "mediatek,mt6580-evbp1", "mediatek,mt6580";
index f6cd3e4192ffc2c06a9a131a91a2b122746dde51..aaf8d1460c4d35e89ab3ad0b3c65026cccd434c7 100644 (file)
@@ -18,7 +18,7 @@ The available clocks are defined in dt-bindings/clock/mt*-clk.h.
 Also it uses the common reset controller binding from
 Documentation/devicetree/bindings/reset/reset.txt.
 The available reset outputs are defined in
-dt-bindings/reset-controller/mt*-resets.h
+dt-bindings/reset/mt*-resets.h
 
 Example:
 
index f25b85499a6f6f2571a5a5b634ef08777494dd00..2f6ff86df49f4c15a7da43c98b094423015711d2 100644 (file)
@@ -18,7 +18,7 @@ The available clocks are defined in dt-bindings/clock/mt*-clk.h.
 Also it uses the common reset controller binding from
 Documentation/devicetree/bindings/reset/reset.txt.
 The available reset outputs are defined in
-dt-bindings/reset-controller/mt*-resets.h
+dt-bindings/reset/mt*-resets.h
 
 Example:
 
index 9f4e5136e5681b7068fac0aacdb907e2994b23e3..a2bd593881cab361fa739d9a12e63ee7ba63ef50 100644 (file)
@@ -138,9 +138,21 @@ Boards:
 - AM335X phyBOARD-WEGA: Single Board Computer dev kit
   compatible = "phytec,am335x-wega", "phytec,am335x-phycore-som", "ti,am33xx"
 
+- AM335X CM-T335 : System On Module, built around the Sitara AM3352/4
+  compatible = "compulab,cm-t335", "ti,am33xx"
+
+- AM335X SBC-T335 : single board computer, built around the Sitara AM3352/4
+  compatible = "compulab,sbc-t335", "compulab,cm-t335", "ti,am33xx"
+
 - OMAP5 EVM : Evaluation Module
   compatible = "ti,omap5-evm", "ti,omap5"
 
+- AM437x CM-T43
+  compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
+
+- AM437x SBC-T43
+  compatible = "compulab,am437x-sbc-t43", "compulab,am437x-cm-t43", "ti,am4372", "ti,am43"
+
 - AM43x EPOS EVM
   compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43"
 
@@ -150,6 +162,12 @@ Boards:
 - AM437x SK EVM: AM437x StarterKit Evaluation Module
   compatible = "ti,am437x-sk-evm", "ti,am4372", "ti,am43"
 
+- AM57XX CL-SOM-AM57x
+  compatible = "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
+
+- AM57XX SBC-AM57x
+  compatible = "compulab,sbc-am57x", "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"
+
 - DRA742 EVM:  Software Development Board for DRA742
   compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
 
index 8e985dd2f181e11c3a28d10e9284924e24d74eb4..c980b2b81227987567fb2fa8c3b28ee4e942d472 100644 (file)
@@ -1,6 +1,10 @@
 Rockchip platforms device tree bindings
 ---------------------------------------
 
+- Kylin RK3036 board:
+    Required root node properties:
+      - compatible = "rockchip,kylin-rk3036", "rockchip,rk3036";
+
 - MarsBoard RK3066 board:
     Required root node properties:
       - compatible = "haoyu,marsboard-rk3066", "rockchip,rk3066a";
@@ -35,6 +39,11 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "netxeon,r89", "rockchip,rk3288";
 
+- Google Brain (dev-board):
+    Required root node properties:
+      - compatible = "google,veyron-brain-rev0", "google,veyron-brain",
+                    "google,veyron", "rockchip,rk3288";
+
 - Google Jaq (Haier Chromebook 11 and more):
     Required root node properties:
       - compatible = "google,veyron-jaq-rev5", "google,veyron-jaq-rev4",
@@ -49,6 +58,15 @@ Rockchip platforms device tree bindings
                     "google,veyron-jerry-rev3", "google,veyron-jerry",
                     "google,veyron", "rockchip,rk3288";
 
+- Google Mickey (Asus Chromebit CS10):
+    Required root node properties:
+      - compatible = "google,veyron-mickey-rev8", "google,veyron-mickey-rev7",
+                    "google,veyron-mickey-rev6", "google,veyron-mickey-rev5",
+                    "google,veyron-mickey-rev4", "google,veyron-mickey-rev3",
+                    "google,veyron-mickey-rev2", "google,veyron-mickey-rev1",
+                    "google,veyron-mickey-rev0", "google,veyron-mickey",
+                    "google,veyron", "rockchip,rk3288";
+
 - Google Minnie (Asus Chromebook Flip C100P):
     Required root node properties:
       - compatible = "google,veyron-minnie-rev4", "google,veyron-minnie-rev3",
@@ -72,3 +90,7 @@ Rockchip platforms device tree bindings
 - Rockchip R88 board:
     Required root node properties:
       - compatible = "rockchip,r88", "rockchip,rk3368";
+
+- Rockchip RK3228 Evaluation board:
+    Required root node properties:
+      - compatible = "rockchip,rk3228-evb", "rockchip,rk3228";
index c447680519bba28871d0ee5e5ded7fa18517ac74..08a587875996b47cf25dd20f7bd7cde81f61d5ff 100644 (file)
@@ -10,10 +10,13 @@ References:
   Revision r2p0
 - Cortex-A5: see DDI0434B Cortex-A5 MPCore Technical Reference Manual
   Revision r0p1
+- ARM11 MPCore: see DDI0360F ARM 11 MPCore Processor Technical Reference
+  Manial Revision r2p0
 
 - compatible : Should be:
        "arm,cortex-a9-scu"
        "arm,cortex-a5-scu"
+       "arm,arm11mp-scu"
 
 - reg : Specify the base address and the size of the SCU register window.
 
diff --git a/Documentation/devicetree/bindings/arm/technologic.txt b/Documentation/devicetree/bindings/arm/technologic.txt
new file mode 100644 (file)
index 0000000..8422988
--- /dev/null
@@ -0,0 +1,6 @@
+Technologic Systems Platforms Device Tree Bindings
+--------------------------------------------------
+
+TS-4800 board
+Required root node properties:
+       - compatible = "technologic,imx51-ts4800", "fsl,imx51";
diff --git a/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt b/Documentation/devicetree/bindings/clock/arm-syscon-icst.txt
new file mode 100644 (file)
index 0000000..8b7177c
--- /dev/null
@@ -0,0 +1,40 @@
+ARM System Controller ICST clocks
+
+The ICS525 and ICS307 oscillators are produced by Integrated Devices
+Technology (IDT). ARM integrated these oscillators deeply into their
+reference designs by adding special control registers that manage such
+oscillators to their system controllers.
+
+The ARM system controller contains logic to serialize and initialize
+an ICST clock request after a write to the 32 bit register at an offset
+into the system controller. Furthermore, to even be able to alter one of
+these frequencies, the system controller must first be unlocked by
+writing a special token to another offset in the system controller.
+
+The ICST oscillator must be provided inside a system controller node.
+
+Required properties:
+- lock-offset: the offset address into the system controller where the
+  unlocking register is located
+- vco-offset: the offset address into the system controller where the
+  ICST control register is located (even 32 bit address)
+- compatible: must be one of "arm,syscon-icst525" or "arm,syscon-icst307"
+- #clock-cells: must be <0>
+- clocks: parent clock, since the ICST needs a parent clock to derive its
+  frequency from, this attribute is compulsory.
+
+Example:
+
+syscon: syscon@10000000 {
+       compatible = "syscon";
+       reg = <0x10000000 0x1000>;
+
+       oscclk0: osc0@0c {
+               compatible = "arm,syscon-icst307";
+               #clock-cells = <0>;
+               lock-offset = <0x20>;
+               vco-offset = <0x0c>;
+               clocks = <&xtal24mhz>;
+       };
+       (...)
+};
index ede65a55e21bc74c2afe9d254dd757bcc1d06a83..0b35e71b39e891fb15cfbac0d6af1d4763192e40 100644 (file)
@@ -208,3 +208,8 @@ These clock IDs are defined in:
     ch3_unused lcpll_ports     4       BCM_NS2_LCPLL_PORTS_CH3_UNUSED
     ch4_unused lcpll_ports     5       BCM_NS2_LCPLL_PORTS_CH4_UNUSED
     ch5_unused lcpll_ports     6       BCM_NS2_LCPLL_PORTS_CH5_UNUSED
+
+BCM63138
+--------
+PLL and leaf clock compatible strings for BCM63138 are:
+    "brcm,bcm63138-armpll"
diff --git a/Documentation/devicetree/bindings/clock/dove-divider-clock.txt b/Documentation/devicetree/bindings/clock/dove-divider-clock.txt
new file mode 100644 (file)
index 0000000..e3eb0f6
--- /dev/null
@@ -0,0 +1,28 @@
+PLL divider based Dove clocks
+
+Marvell Dove has a 2GHz PLL, which feeds into a set of dividers to provide
+high speed clocks for a number of peripherals.  These dividers are part of
+the PMU, and thus this node should be a child of the PMU node.
+
+The following clocks are provided:
+
+ID     Clock
+-------------
+0      AXI bus clock
+1      GPU clock
+2      VMeta clock
+3      LCD clock
+
+Required properties:
+- compatible : shall be "marvell,dove-divider-clock"
+- reg : shall be the register address of the Core PLL and Clock Divider
+   Control 0 register.  This will cover that register, as well as the
+   Core PLL and Clock Divider Control 1 register.  Thus, it will have
+   a size of 8.
+- #clock-cells : from common clock binding; shall be set to 1
+
+divider_clk: core-clock@0064 {
+       compatible = "marvell,dove-divider-clock";
+       reg = <0x0064 0x8>;
+       #clock-cells = <1>;
+};
diff --git a/Documentation/devicetree/bindings/display/panel/startek,startek-kd050c.txt b/Documentation/devicetree/bindings/display/panel/startek,startek-kd050c.txt
new file mode 100644 (file)
index 0000000..70cd8d1
--- /dev/null
@@ -0,0 +1,4 @@
+Startek Electronic Technology Co. KD050C 5.0" WVGA TFT LCD panel
+
+Required properties:
+- compatible: should be "startek,startek-kd050c"
index d3d0a4fb1c733b8288884869088fda088328546d..079b42a81d7cf3c5af086872fc86127023ab2c15 100644 (file)
@@ -22,8 +22,7 @@ Required properties:
 Optional properties:
 - ti,hwmods:   Name of the hwmods associated to the eDMA CC
 - ti,edma-memcpy-channels: List of channels allocated to be used for memcpy, iow
-               these channels will be SW triggered channels. The list must
-               contain 16 bits numbers, see example.
+               these channels will be SW triggered channels. See example.
 - ti,edma-reserved-slot-ranges: PaRAM slot ranges which should not be used by
                the driver, they are allocated to be used by for example the
                DSP. See example.
@@ -56,10 +55,9 @@ edma: edma@49000000 {
        ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 7>, <&edma_tptc2 0>;
 
        /* Channel 20 and 21 is allocated for memcpy */
-       ti,edma-memcpy-channels = /bits/ 16 <20 21>;
-       /* The following PaRAM slots are reserved: 35-45 and 100-110 */
-       ti,edma-reserved-slot-ranges = /bits/ 16 <35 10>,
-                                      /bits/ 16 <100 10>;
+       ti,edma-memcpy-channels = <20 21>;
+       /* The following PaRAM slots are reserved: 35-44 and 100-109 */
+       ti,edma-reserved-slot-ranges = <35 10>, <100 10>;
 };
 
 edma_tptc0: tptc@49800000 {
index afef6a85ac51d46f0496954ea1d76a9144e7d247..b8e1674c7837c274c6b485cfa3bb3977bd97232d 100644 (file)
@@ -14,6 +14,7 @@ Required properties:
        "mediatek,mt6582-sysirq"
        "mediatek,mt6580-sysirq"
        "mediatek,mt6577-sysirq"
+       "mediatek,mt2701-sysirq"
 - interrupt-controller : Identifies the node as an interrupt controller
 - #interrupt-cells : Use the same format as specified by GIC in
   Documentation/devicetree/bindings/arm/gic.txt
index 4f05d208c95cfeac7ebbc217003d34f08e0f4772..d18109657da6c0154d3abebd980178f91b4a9102 100644 (file)
@@ -26,7 +26,11 @@ Example:
                ti,pmic-shutdown-controller;
 
                regulators {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
                        dcdc1_reg: dcdc1 {
+                               reg = <0>;
                                regulator-min-microvolt = <900000>;
                                regulator-max-microvolt = <1800000>;
                                regulator-boot-on;
@@ -34,6 +38,7 @@ Example:
                        };
 
                        dcdc2_reg: dcdc2 {
+                               reg = <1>;
                                regulator-min-microvolt = <900000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
@@ -41,6 +46,7 @@ Example:
                        };
 
                        dcdc3_reg: dcc3 {
+                               reg = <2>;
                                regulator-min-microvolt = <900000>;
                                regulator-max-microvolt = <1500000>;
                                regulator-boot-on;
@@ -48,6 +54,7 @@ Example:
                        };
 
                        ldo1_reg: ldo1 {
+                               reg = <3>;
                                regulator-min-microvolt = <1000000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
@@ -55,6 +62,7 @@ Example:
                        };
 
                        ldo2_reg: ldo2 {
+                               reg = <4>;
                                regulator-min-microvolt = <900000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
@@ -62,6 +70,7 @@ Example:
                        };
 
                        ldo3_reg: ldo3 {
+                               reg = <5>;
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
@@ -69,6 +78,7 @@ Example:
                        };
 
                        ldo4_reg: ldo4 {
+                               reg = <6>;
                                regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-boot-on;
index 2d47add34765ae6a5f5b7f9474409f05927e988e..a833a016f656783314a7c92d3f75f8a6a66f29ed 100644 (file)
@@ -2,15 +2,15 @@
 
 Required properties:
 - compatible should contain:
-  * "mediatek,mt8135-uart" for MT8135 compatible UARTS
+  * "mediatek,mt2701-uart" for MT2701 compatible UARTS
+  * "mediatek,mt6580-uart" for MT6580 compatible UARTS
+  * "mediatek,mt6582-uart" for MT6582 compatible UARTS
+  * "mediatek,mt6589-uart" for MT6589 compatible UARTS
+  * "mediatek,mt6795-uart" for MT6795 compatible UARTS
   * "mediatek,mt8127-uart" for MT8127 compatible UARTS
+  * "mediatek,mt8135-uart" for MT8135 compatible UARTS
   * "mediatek,mt8173-uart" for MT8173 compatible UARTS
-  * "mediatek,mt6795-uart" for MT6795 compatible UARTS
-  * "mediatek,mt6589-uart" for MT6589 compatible UARTS
-  * "mediatek,mt6582-uart" for MT6582 compatible UARTS
-  * "mediatek,mt6580-uart" for MT6580 compatible UARTS
-  * "mediatek,mt6577-uart" for all compatible UARTS (MT8173, MT6795,
-        MT6589, MT6582, MT6580, MT6577)
+  * "mediatek,mt6577-uart" for MT6577 and all of the above
 
 - reg: The base address of the UART register bank.
 
diff --git a/Documentation/devicetree/bindings/soc/dove/pmu.txt b/Documentation/devicetree/bindings/soc/dove/pmu.txt
new file mode 100644 (file)
index 0000000..edd40b7
--- /dev/null
@@ -0,0 +1,56 @@
+Device Tree bindings for Marvell PMU
+
+Required properties:
+ - compatible: value should be "marvell,dove-pmu".
+    May also include "simple-bus" if there are child devices, in which
+    case the ranges node is required.
+ - reg: two base addresses and sizes of the PM controller and PMU.
+ - interrupts: single interrupt number for the PMU interrupt
+ - interrupt-controller: must be specified as the PMU itself is an
+    interrupt controller.
+ - #interrupt-cells: must be 1.
+ - #reset-cells: must be 1.
+ - domains: sub-node containing domain descriptions
+
+Optional properties:
+ - ranges: defines the address mapping for child devices, as per the
+   standard property of this name.  Required when compatible includes
+   "simple-bus".
+
+Power domain descriptions are listed as child nodes of the "domains"
+sub-node.  Each domain has the following properties:
+
+Required properties:
+ - #power-domain-cells: must be 0.
+
+Optional properties:
+ - marvell,pmu_pwr_mask: specifies the mask value for PMU power register
+ - marvell,pmu_iso_mask: specifies the mask value for PMU isolation register
+ - resets: points to the reset manager (PMU node) and reset index.
+
+Example:
+
+       pmu: power-management@d0000 {
+               compatible = "marvell,dove-pmu";
+               reg = <0xd0000 0x8000>, <0xd8000 0x8000>;
+               interrupts = <33>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+               #reset-cells = <1>;
+
+               domains {
+                       vpu_domain: vpu-domain {
+                               #power-domain-cells = <0>;
+                               marvell,pmu_pwr_mask = <0x00000008>;
+                               marvell,pmu_iso_mask = <0x00000001>;
+                               resets = <&pmu 16>;
+                       };
+
+                       gpu_domain: gpu-domain {
+                               #power-domain-cells = <0>;
+                               marvell,pmu_pwr_mask = <0x00000004>;
+                               marvell,pmu_iso_mask = <0x00000002>;
+                               resets = <&pmu 18>;
+                       };
+               };
+       };
index a6c8afc8385a79787f4ce4b999a7f2ea69ae9613..e8f15e34027ff4c62370253a4368c9f58da2615f 100644 (file)
@@ -21,6 +21,18 @@ Required properties:
                      These are the clocks which hardware needs to be enabled
                      before enabling certain power domains.
 
+Optional properties:
+- vdec-supply: Power supply for the vdec power domain
+- venc-supply: Power supply for the venc power domain
+- isp-supply: Power supply for the isp power domain
+- mm-supply: Power supply for the mm power domain
+- venc_lt-supply: Power supply for the venc_lt power domain
+- audio-supply: Power supply for the audio power domain
+- usb-supply: Power supply for the usb power domain
+- mfg_async-supply: Power supply for the mfg_async power domain
+- mfg_2d-supply: Power supply for the mfg_2d power domain
+- mfg-supply: Power supply for the mfg power domain
+
 Example:
 
        scpsys: scpsys@10006000 {
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt
new file mode 100644 (file)
index 0000000..5cc82b8
--- /dev/null
@@ -0,0 +1,104 @@
+Qualcomm Shared Memory Point 2 Point binding
+
+The Shared Memory Point to Point (SMP2P) protocol facilitates communication of
+a single 32-bit value between two processors.  Each value has a single writer
+(the local side) and a single reader (the remote side).  Values are uniquely
+identified in the system by the directed edge (local processor ID to remote
+processor ID) and a string identifier.
+
+- compatible:
+       Usage: required
+       Value type: <string>
+       Definition: must be one of:
+                   "qcom,smp2p"
+
+- interrupts:
+       Usage: required
+       Value type: <prop-encoded-array>
+       Definition: one entry specifying the smp2p notification interrupt
+
+- qcom,ipc:
+       Usage: required
+       Value type: <prop-encoded-array>
+       Definition: three entries specifying the outgoing ipc bit used for
+                   signaling the remote end of the smp2p edge:
+                   - phandle to a syscon node representing the apcs registers
+                   - u32 representing offset to the register within the syscon
+                   - u32 representing the ipc bit within the register
+
+- qcom,smem:
+       Usage: required
+       Value type: <u32 array>
+       Definition: two identifiers of the inbound and outbound smem items used
+                   for this edge
+
+- qcom,local-pid:
+       Usage: required
+       Value type: <u32>
+       Definition: specifies the identfier of the local endpoint of this edge
+
+- qcom,remote-pid:
+       Usage: required
+       Value type: <u32>
+       Definition: specifies the identfier of the remote endpoint of this edge
+
+= SUBNODES
+Each SMP2P pair contain a set of inbound and outbound entries, these are
+described in subnodes of the smp2p device node. The node names are not
+important.
+
+- qcom,entry-name:
+       Usage: required
+       Value type: <string>
+       Definition: specifies the name of this entry, for inbound entries this
+                   will be used to match against the remotely allocated entry
+                   and for outbound entries this name is used for allocating
+                   entries
+
+- interrupt-controller:
+       Usage: required for incoming entries
+       Value type: <empty>
+       Definition: marks the entry as inbound; the node should be specified
+                   as a two cell interrupt-controller as defined in
+                   "../interrupt-controller/interrupts.txt"
+                   If not specified this node will denote the outgoing entry
+
+- #interrupt-cells:
+       Usage: required for incoming entries
+       Value type: <u32>
+       Definition: must be 2 - denoting the bit in the entry and IRQ flags
+
+- #qcom,state-cells:
+       Usage: required for outgoing entries
+       Value type: <u32>
+       Definition: must be 1 - denoting the bit in the entry
+
+= EXAMPLE
+The following example shows the SMP2P setup with the wireless processor,
+defined from the 8974 apps processor's point-of-view. It encompasses one
+inbound and one outbound entry:
+
+wcnss-smp2p {
+       compatible = "qcom,smp2p";
+       qcom,smem = <431>, <451>;
+
+       interrupts = <0 143 1>;
+
+       qcom,ipc = <&apcs 8 18>;
+
+       qcom,local-pid = <0>;
+       qcom,remote-pid = <4>;
+
+       wcnss_smp2p_out: master-kernel {
+               qcom,entry-name = "master-kernel";
+
+               #qcom,state-cells = <1>;
+       };
+
+       wcnss_smp2p_in: slave-kernel {
+               qcom,entry-name = "slave-kernel";
+
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+};
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smsm.txt
new file mode 100644 (file)
index 0000000..a6634c7
--- /dev/null
@@ -0,0 +1,104 @@
+Qualcomm Shared Memory State Machine
+
+The Shared Memory State Machine facilitates broadcasting of single bit state
+information between the processors in a Qualcomm SoC. Each processor is
+assigned 32 bits of state that can be modified. A processor can through a
+matrix of bitmaps signal subscription of notifications upon changes to a
+certain bit owned by a certain remote processor.
+
+- compatible:
+       Usage: required
+       Value type: <string>
+       Definition: must be one of:
+                   "qcom,smsm"
+
+- qcom,ipc-N:
+       Usage: required
+       Value type: <prop-encoded-array>
+       Definition: three entries specifying the outgoing ipc bit used for
+                   signaling the N:th remote processor
+                   - phandle to a syscon node representing the apcs registers
+                   - u32 representing offset to the register within the syscon
+                   - u32 representing the ipc bit within the register
+
+- qcom,local-host:
+       Usage: optional
+       Value type: <u32>
+       Definition: identifier of the local processor in the list of hosts, or
+                   in other words specifier of the column in the subscription
+                   matrix representing the local processor
+                   defaults to host 0
+
+- #address-cells:
+       Usage: required
+       Value type: <u32>
+       Definition: must be 1
+
+- #size-cells:
+       Usage: required
+       Value type: <u32>
+       Definition: must be 0
+
+= SUBNODES
+Each processor's state bits are described by a subnode of the smsm device node.
+Nodes can either be flagged as an interrupt-controller to denote a remote
+processor's state bits or the local processors bits.  The node names are not
+important.
+
+- reg:
+       Usage: required
+       Value type: <u32>
+       Definition: specifies the offset, in words, of the first bit for this
+                   entry
+
+- #qcom,state-cells:
+       Usage: required for local entry
+       Value type: <u32>
+       Definition: must be 1 - denotes bit number
+
+- interrupt-controller:
+       Usage: required for remote entries
+       Value type: <empty>
+       Definition: marks the entry as a interrupt-controller and the state bits
+                   to belong to a remote processor
+
+- #interrupt-cells:
+       Usage: required for remote entries
+       Value type: <u32>
+       Definition: must be 2 - denotes bit number and IRQ flags
+
+- interrupts:
+       Usage: required for remote entries
+       Value type: <prop-encoded-array>
+       Definition: one entry specifying remote IRQ used by the remote processor
+                   to signal changes of its state bits
+
+
+= EXAMPLE
+The following example shows the SMEM setup for controlling properties of the
+wireless processor, defined from the 8974 apps processor's point-of-view. It
+encompasses one outbound entry and the outgoing interrupt for the wireless
+processor.
+
+smsm {
+       compatible = "qcom,smsm";
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       qcom,ipc-3 = <&apcs 8 19>;
+
+       apps_smsm: apps@0 {
+               reg = <0>;
+
+               #qcom,state-cells = <1>;
+       };
+
+       wcnss_smsm: wcnss@7 {
+               reg = <7>;
+               interrupts = <0 144 1>;
+
+               interrupt-controller;
+               #interrupt-cells = <2>;
+       };
+};
index 601a360531a5a3eac9c10a97e9c67286e93ee2e0..cc8304aa64ac55400636d1c8e4b2559310f9ef62 100644 (file)
@@ -15,14 +15,32 @@ Recommended properties:
 - spi-max-frequency: Definition as per
                      Documentation/devicetree/bindings/spi/spi-bus.txt
 
+Optional properties:
+- syscon-chipselects: Handle to system control region contains QSPI
+                     chipselect register and offset of that register.
+
 Example:
 
+For am4372:
 qspi: qspi@4b300000 {
-       compatible = "ti,dra7xxx-qspi";
-       reg = <0x47900000 0x100>, <0x30000000 0x3ffffff>;
+       compatible = "ti,am4372-qspi";
+       reg = <0x47900000 0x100>, <0x30000000 0x4000000>;
        reg-names = "qspi_base", "qspi_mmap";
        #address-cells = <1>;
        #size-cells = <0>;
        spi-max-frequency = <25000000>;
        ti,hwmods = "qspi";
 };
+
+For dra7xx:
+qspi: qspi@4b300000 {
+       compatible = "ti,dra7xxx-qspi";
+       reg = <0x4b300000 0x100>,
+             <0x5c000000 0x4000000>,
+       reg-names = "qspi_base", "qspi_mmap";
+       syscon-chipselects = <&scm_conf 0x558>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+       spi-max-frequency = <48000000>;
+       ti,hwmods = "qspi";
+};
index b38200d2583a5473ebe4c618aa09475128d31100..0dfa60d88dd3b4bb4ce2a42d2c0b3d15f4835e45 100644 (file)
@@ -1,7 +1,9 @@
 * Temperature Sensor ADC (TSADC) on rockchip SoCs
 
 Required properties:
-- compatible : "rockchip,rk3288-tsadc"
+- compatible : should be "rockchip,<name>-tsadc"
+   "rockchip,rk3288-tsadc": found on RK3288 SoCs
+   "rockchip,rk3368-tsadc": found on RK3368 SoCs
 - reg : physical base address of the controller and length of memory mapped
        region.
 - interrupts : The interrupt number to the cpu. The interrupt specifier format
index 64083bc5633c136b0cee1424b93d115086609cc0..8ff54eb464dc6bf0f25f44bf4296c29371e44804 100644 (file)
@@ -3,6 +3,7 @@ Mediatek MT6577, MT6572 and MT6589 Timers
 
 Required properties:
 - compatible should contain:
+       * "mediatek,mt2701-timer" for MT2701 compatible timers
        * "mediatek,mt6580-timer" for MT6580 compatible timers
        * "mediatek,mt6589-timer" for MT6589 compatible timers
        * "mediatek,mt8127-timer" for MT8127 compatible timers
index 55df1d444e9f82c150ef144c02357d13169ead31..e4cd78a4c652fff7e580863eb039af675400018c 100644 (file)
@@ -123,6 +123,7 @@ jedec       JEDEC Solid State Technology Association
 karo   Ka-Ro electronics GmbH
 keymile        Keymile GmbH
 kinetic Kinetic Technologies
+kosagi Sutajio Ko-Usagi PTE Ltd.
 lacie  LaCie
 lantiq Lantiq Semiconductor
 lenovo Lenovo Group Ltd.
@@ -218,11 +219,13 @@ sony      Sony Corporation
 spansion       Spansion Inc.
 sprd   Spreadtrum Communications Inc.
 st     STMicroelectronics
+startek        Startek
 ste    ST-Ericsson
 stericsson     ST-Ericsson
 synology       Synology, Inc.
 tbs    TBS Technologies
 tcl    Toby Churchill Ltd.
+technologic    Technologic Systems
 thine  THine Electronics, Inc.
 ti     Texas Instruments
 tlm    Trusted Logic Mobility
index af9eb5b8a2534ab965d8a7843c3ecc1895af888b..6a00939a059a1185c5e4ece5bbcd388131bb4987 100644 (file)
@@ -2,7 +2,11 @@ Mediatek SoCs Watchdog timer
 
 Required properties:
 
-- compatible : should be "mediatek,mt6589-wdt"
+- compatible should contain:
+       * "mediatek,mt2701-wdt" for MT2701 compatible watchdog timers
+       * "mediatek,mt6589-wdt" for all compatible watchdog timers (MT2701,
+               MT6589)
+
 - reg : Specifies base physical address and size of the registers.
 
 Example:
index 050d0e77a2cf00f7d6a33e6d11bccf88c22ad761..cba790b42f23d5980088588d01d97084cd8423d2 100644 (file)
@@ -1931,7 +1931,7 @@ S:        Supported
 F:     drivers/i2c/busses/i2c-at91.c
 
 ATMEL ISI DRIVER
-M:     Josh Wu <josh.wu@atmel.com>
+M:     Ludovic Desroches <ludovic.desroches@atmel.com>
 L:     linux-media@vger.kernel.org
 S:     Supported
 F:     drivers/media/platform/soc_camera/atmel-isi.c
@@ -1950,7 +1950,8 @@ S:        Supported
 F:     drivers/net/ethernet/cadence/
 
 ATMEL NAND DRIVER
-M:     Josh Wu <josh.wu@atmel.com>
+M:     Wenyou Yang <wenyou.yang@atmel.com>
+M:     Josh Wu <rainyfeeling@outlook.com>
 L:     linux-mtd@lists.infradead.org
 S:     Supported
 F:     drivers/mtd/nand/atmel_nand*
@@ -6366,6 +6367,7 @@ F:        arch/*/include/asm/pmem.h
 LIGHTNVM PLATFORM SUPPORT
 M:     Matias Bjorling <mb@lightnvm.io>
 W:     http://github/OpenChannelSSD
+L:     linux-block@vger.kernel.org
 S:     Maintained
 F:     drivers/lightnvm/
 F:     include/linux/lightnvm.h
index 2ffdf9d6f339f7254f1a08ff979bf424f0c5a33d..904a1d65df302160853af36b76122c71870874b3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -rc2
+EXTRAVERSION = -rc3
 NAME = Blurry Fish Butt
 
 # *DOCUMENTATION*
index c92c0ef1e9d290b2db437001338cf477c1df9513..f1ac9818b751e1fab854f2c1a4440b9ca8af3e85 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
index cfac24e0e7b6565a48c3a22f6251e8992fbb84bb..323486d6ee83419a9e50d5c53fa042f53e08ebed 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
index 9922a118a15a3d28c99c85f1c67407142e75fb86..66191cd0447eaabc524a36ec497e7047043dc9a4 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
index f761a7c70761862139ffeb7a2f89d2b159ffec71..f68838e8068af53eb2ebb29c83d88cb10dc0bfac 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
index dc6f74f412837b51486634851a1e10ddc4341f10..96bd1c20fb0badeb5d3ebf41f2671f6558939c22 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
index 3fef0a210c5654bda4e0bc085d3910d2b336a59c..fcae66683ca0bd5865924a88816a388e763604cd 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
index 51784837daaec1e0b3fd0434b60e41b5b6e15610..b01b659168ea4a1c36ac85e0ee41c545aa697ec8 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
index ef35ef3923ddca3a6fa84bd121b682681c861fc7..a07f20de221ba1f0b0963ca1f1d44053c6b1b89a 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_CROSS_MEMORY_ATTACH is not set
index 634509e5e572ef02911e1a79906d54faf8523951..f36c047b33cad0c469bd2368bb3e5fa4260535e5 100644 (file)
@@ -1,4 +1,4 @@
-CONFIG_CROSS_COMPILE="arc-linux-uclibc-"
+CONFIG_CROSS_COMPILE="arc-linux-"
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_DEFAULT_HOSTNAME="ARCLinux"
 # CONFIG_CROSS_MEMORY_ATTACH is not set
index ad481c24070dd1f369fefab436160f6d60f9dc2c..258b0e5ad3329a614e59204df55d91873e969623 100644 (file)
@@ -37,6 +37,9 @@
 #define ISA_INIT_STATUS_BITS   (STATUS_IE_MASK | STATUS_AD_MASK | \
                                        (ARCV2_IRQ_DEF_PRIO << 1))
 
+/* SLEEP needs default irq priority (<=) which can interrupt the doze */
+#define ISA_SLEEP_ARG          (0x10 | ARCV2_IRQ_DEF_PRIO)
+
 #ifndef __ASSEMBLY__
 
 /*
index d8c608174617783496b8855bc6ed19de9b6f67cd..c1d36458bfb7aa665acb30a2234660034a19aecd 100644 (file)
@@ -43,6 +43,8 @@
 
 #define ISA_INIT_STATUS_BITS   STATUS_IE_MASK
 
+#define ISA_SLEEP_ARG          0x3
+
 #ifndef __ASSEMBLY__
 
 /******************************************************************
index c14a5bea0c76792ead17b42e1f548e38960cc194..5d446df2c41353a15edfc5a5f7b05abd24b16df3 100644 (file)
@@ -58,8 +58,6 @@ __switch_to(struct task_struct *prev_task, struct task_struct *next_task)
                "st      sp, [r24]       \n\t"
 #endif
 
-               "sync   \n\t"
-
                /*
                 * setup _current_task with incoming tsk.
                 * optionally, set r25 to that as well
index e248594097e7d69c66b2f46044dbfe4782008bd0..e6890b1f8650647774b48678c88e805f6b16de3a 100644 (file)
@@ -44,9 +44,6 @@ __switch_to:
        * don't need to do anything special to return it
        */
 
-       /* hardware memory barrier */
-       sync
-
        /*
         * switch to new task, contained in r1
         * Temp reg r3 is required to get the ptr to store val
index 91d5a0f1f3f79cdd454e99e7781b2e3741caae76..a3f750e76b683dd25a45584b71014532214b20ac 100644 (file)
@@ -44,11 +44,10 @@ SYSCALL_DEFINE0(arc_gettls)
 void arch_cpu_idle(void)
 {
        /* sleep, but enable all interrupts before committing */
-       if (is_isa_arcompact()) {
-               __asm__("sleep 0x3");
-       } else {
-               __asm__("sleep 0x10");
-       }
+       __asm__ __volatile__(
+               "sleep %0       \n"
+               :
+               :"I"(ISA_SLEEP_ARG)); /* can't be "r" has to be embedded const */
 }
 
 asmlinkage void ret_from_fork(void);
index 93c6ea52b6719e4e238d6076fda6c3b981ac48fe..7352475451f6c3798885c97b04c11ddd53146990 100644 (file)
@@ -986,42 +986,13 @@ int arc_unwind(struct unwind_frame_info *frame)
                                                            (const u8 *)(fde +
                                                                         1) +
                                                            *fde, ptrType);
-                               if (pc >= endLoc)
+                               if (pc >= endLoc) {
                                        fde = NULL;
-                       } else
-                               fde = NULL;
-               }
-               if (fde == NULL) {
-                       for (fde = table->address, tableSize = table->size;
-                            cie = NULL, tableSize > sizeof(*fde)
-                            && tableSize - sizeof(*fde) >= *fde;
-                            tableSize -= sizeof(*fde) + *fde,
-                            fde += 1 + *fde / sizeof(*fde)) {
-                               cie = cie_for_fde(fde, table);
-                               if (cie == &bad_cie) {
                                        cie = NULL;
-                                       break;
                                }
-                               if (cie == NULL
-                                   || cie == &not_fde
-                                   || (ptrType = fde_pointer_type(cie)) < 0)
-                                       continue;
-                               ptr = (const u8 *)(fde + 2);
-                               startLoc = read_pointer(&ptr,
-                                                       (const u8 *)(fde + 1) +
-                                                       *fde, ptrType);
-                               if (!startLoc)
-                                       continue;
-                               if (!(ptrType & DW_EH_PE_indirect))
-                                       ptrType &=
-                                           DW_EH_PE_FORM | DW_EH_PE_signed;
-                               endLoc =
-                                   startLoc + read_pointer(&ptr,
-                                                           (const u8 *)(fde +
-                                                                        1) +
-                                                           *fde, ptrType);
-                               if (pc >= startLoc && pc < endLoc)
-                                       break;
+                       } else {
+                               fde = NULL;
+                               cie = NULL;
                        }
                }
        }
index 0ee7398468476f57b301bde2fa7c7e13735bb3fb..daf2bf52b984c6781dbb6831e22f013b04e58d0d 100644 (file)
@@ -619,10 +619,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long vaddr_unaligned,
 
                int dirty = !test_and_set_bit(PG_dc_clean, &page->flags);
                if (dirty) {
-                       /* wback + inv dcache lines */
+                       /* wback + inv dcache lines (K-mapping) */
                        __flush_dcache_page(paddr, paddr);
 
-                       /* invalidate any existing icache lines */
+                       /* invalidate any existing icache lines (U-mapping) */
                        if (vma->vm_flags & VM_EXEC)
                                __inv_icache_page(paddr, vaddr);
                }
index 0365cbbc917989853d87b8a84c8409ae268d6e33..34e1569a11ee322a0a020bdfe0c9b801b6b58c12 100644 (file)
@@ -76,6 +76,8 @@ config ARM
        select IRQ_FORCED_THREADING
        select MODULES_USE_ELF_REL
        select NO_BOOTMEM
+       select OF_EARLY_FLATTREE if OF
+       select OF_RESERVED_MEM if OF
        select OLD_SIGACTION
        select OLD_SIGSUSPEND3
        select PERF_USE_VMALLOC
@@ -1822,8 +1824,6 @@ config USE_OF
        bool "Flattened Device Tree support"
        select IRQ_DOMAIN
        select OF
-       select OF_EARLY_FLATTREE
-       select OF_RESERVED_MEM
        help
          Include support for flattened device tree machine descriptions.
 
index aa237cf14b528a3d5255b0dd6765fcbb0e380c00..f70d4c1c49e4ee7539164175eb6264ccc809c146 100644 (file)
@@ -48,8 +48,10 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
        sama5d34ek.dtb \
        sama5d35ek.dtb \
        sama5d36ek.dtb \
+       at91-sama5d4_ma5d4evk.dtb \
        at91-sama5d4_xplained.dtb \
-       at91-sama5d4ek.dtb
+       at91-sama5d4ek.dtb \
+       at91-vinco.dtb
 dtb-$(CONFIG_ARCH_ATLAS6) += \
        atlas6-evb.dtb
 dtb-$(CONFIG_ARCH_ATLAS7) += \
@@ -75,7 +77,10 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
        bcm4709-asus-rt-ac87u.dtb \
        bcm4709-buffalo-wxr-1900dhp.dtb \
        bcm4709-netgear-r7000.dtb \
-       bcm4709-netgear-r8000.dtb
+       bcm4709-netgear-r8000.dtb \
+       bcm94708.dtb \
+       bcm94709.dtb \
+       bcm953012k.dtb
 dtb-$(CONFIG_ARCH_BCM_63XX) += \
        bcm963138dvt.dtb
 dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
@@ -200,12 +205,14 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
        kirkwood-ns2mini.dtb \
        kirkwood-nsa310.dtb \
        kirkwood-nsa310a.dtb \
+       kirkwood-nsa325.dtb \
        kirkwood-openblocks_a6.dtb \
        kirkwood-openblocks_a7.dtb \
        kirkwood-openrd-base.dtb \
        kirkwood-openrd-client.dtb \
        kirkwood-openrd-ultimate.dtb \
        kirkwood-pogo_e02.dtb \
+       kirkwood-pogoplug-series-4.dtb \
        kirkwood-rd88f6192.dtb \
        kirkwood-rd88f6281-z0.dtb \
        kirkwood-rd88f6281-a.dtb \
@@ -268,7 +275,8 @@ dtb-$(CONFIG_SOC_IMX51) += \
        imx51-apf51dev.dtb \
        imx51-babbage.dtb \
        imx51-digi-connectcore-jsk.dtb \
-       imx51-eukrea-mbimxsd51-baseboard.dtb
+       imx51-eukrea-mbimxsd51-baseboard.dtb \
+       imx51-ts4800.dtb
 dtb-$(CONFIG_SOC_IMX53) += \
        imx53-ard.dtb \
        imx53-m53evk.dtb \
@@ -325,6 +333,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
        imx6q-hummingboard.dtb \
        imx6q-nitrogen6x.dtb \
        imx6q-nitrogen6_max.dtb \
+       imx6q-novena.dtb \
        imx6q-phytec-pbab01.dtb \
        imx6q-rex-pro.dtb \
        imx6q-sabreauto.dtb \
@@ -350,6 +359,8 @@ dtb-$(CONFIG_SOC_IMX6SX) += \
 dtb-$(CONFIG_SOC_IMX6UL) += \
        imx6ul-14x14-evk.dtb
 dtb-$(CONFIG_SOC_IMX7D) += \
+       imx7d-cl-som-imx7.dtb \
+       imx7d-sbc-imx7.dtb \
        imx7d-sdb.dtb
 dtb-$(CONFIG_SOC_LS1021A) += \
        ls1021a-qds.dtb \
@@ -359,6 +370,7 @@ dtb-$(CONFIG_SOC_VF610) += \
        vf610-colibri-eval-v3.dtb \
        vf610m4-colibri.dtb \
        vf610-cosmic.dtb \
+       vf610m4-cosmic.dtb \
        vf610-twr.dtb
 dtb-$(CONFIG_ARCH_MXS) += \
        imx23-evk.dtb \
@@ -460,13 +472,16 @@ dtb-$(CONFIG_SOC_AM33XX) += \
        am335x-bone.dtb \
        am335x-boneblack.dtb \
        am335x-bonegreen.dtb \
-       am335x-sl50.dtb \
+       am335x-chiliboard.dtb \
+       am335x-cm-t335.dtb \
        am335x-evm.dtb \
        am335x-evmsk.dtb \
+       am335x-lxm.dtb \
        am335x-nano.dtb \
        am335x-pepper.dtb \
-       am335x-lxm.dtb \
-       am335x-chiliboard.dtb \
+       am335x-shc.dtb \
+       am335x-sbc-t335.dtb \
+       am335x-sl50.dtb \
        am335x-wega-rdk.dtb
 dtb-$(CONFIG_ARCH_OMAP4) += \
        omap4-duovero-parlor.dtb \
@@ -479,17 +494,21 @@ dtb-$(CONFIG_ARCH_OMAP4) += \
        omap4-var-stk-om44.dtb
 dtb-$(CONFIG_SOC_AM43XX) += \
        am43x-epos-evm.dtb \
-       am437x-sk-evm.dtb \
+       am437x-cm-t43.dtb \
+       am437x-gp-evm.dtb \
        am437x-idk-evm.dtb \
-       am437x-gp-evm.dtb
+       am437x-sbc-t43.dtb \
+       am437x-sk-evm.dtb
 dtb-$(CONFIG_SOC_OMAP5) += \
        omap5-cm-t54.dtb \
        omap5-igep0050.dtb \
        omap5-sbc-t54.dtb \
        omap5-uevm.dtb
 dtb-$(CONFIG_SOC_DRA7XX) += \
-       dra7-evm.dtb \
        am57xx-beagle-x15.dtb \
+       am57xx-cl-som-am57x.dtb \
+       am57xx-sbc-am57x.dtb \
+       dra7-evm.dtb \
        dra72-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += \
        orion5x-lacie-d2-network.dtb \
@@ -503,6 +522,7 @@ dtb-$(CONFIG_ARCH_PRIMA2) += \
 dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-apq8064-cm-qs600.dtb \
        qcom-apq8064-ifc6410.dtb \
+       qcom-apq8064-sony-xperia-yuga.dtb \
        qcom-apq8074-dragonboard.dtb \
        qcom-apq8084-ifc6540.dtb \
        qcom-apq8084-mtp.dtb \
@@ -511,12 +531,16 @@ dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-msm8960-cdp.dtb \
        qcom-msm8974-sony-xperia-honami.dtb
 dtb-$(CONFIG_ARCH_REALVIEW) += \
-       arm-realview-pb1176.dtb
+       arm-realview-pb1176.dtb \
+       arm-realview-pb11mp.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += \
+       rk3036-evb.dtb \
+       rk3036-kylin.dtb \
        rk3066a-bqcurie2.dtb \
        rk3066a-marsboard.dtb \
        rk3066a-rayeager.dtb \
        rk3188-radxarock.dtb \
+       rk3228-evb.dtb \
        rk3288-evb-act8846.dtb \
        rk3288-evb-rk808.dtb \
        rk3288-firefly-beta.dtb \
@@ -524,8 +548,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
        rk3288-popmetal.dtb \
        rk3288-r89.dtb \
        rk3288-rock2-square.dtb \
+       rk3288-veyron-brain.dtb \
        rk3288-veyron-jaq.dtb \
        rk3288-veyron-jerry.dtb \
+       rk3288-veyron-mickey.dtb \
        rk3288-veyron-minnie.dtb \
        rk3288-veyron-pinky.dtb \
        rk3288-veyron-speedy.dtb
@@ -548,7 +574,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
        r8a7778-bockw.dtb \
        r8a7779-marzen.dtb \
        r8a7790-lager.dtb \
-       r8a7791-henninger.dtb \
        r8a7791-koelsch.dtb \
        r8a7791-porter.dtb \
        r8a7793-gose.dtb \
@@ -558,6 +583,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
 dtb-$(CONFIG_ARCH_SOCFPGA) += \
        socfpga_arria5_socdk.dtb \
        socfpga_arria10_socdk_sdmmc.dtb \
+       socfpga_cyclone5_mcvevk.dtb \
        socfpga_cyclone5_socdk.dtb \
        socfpga_cyclone5_de0_sockit.dtb \
        socfpga_cyclone5_sockit.dtb \
@@ -613,6 +639,7 @@ dtb-$(CONFIG_MACH_SUN5I) += \
        sun5i-a10s-olinuxino-micro.dtb \
        sun5i-a10s-r7-tv-dongle.dtb \
        sun5i-a10s-wobo-i5.dtb \
+       sun5i-a13-empire-electronix-d709.dtb \
        sun5i-a13-hsg-h702.dtb \
        sun5i-a13-inet-98v-rev2.dtb \
        sun5i-a13-olinuxino.dtb \
@@ -639,6 +666,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-cubietruck.dtb \
        sun7i-a20-hummingbird.dtb \
        sun7i-a20-i12-tvbox.dtb \
+       sun7i-a20-icnova-swac.dtb \
        sun7i-a20-m3.dtb \
        sun7i-a20-mk808c.dtb \
        sun7i-a20-olimex-som-evb.dtb \
@@ -661,10 +689,13 @@ dtb-$(CONFIG_MACH_SUN8I) += \
        sun8i-a33-ga10h-v1.1.dtb \
        sun8i-a33-ippo-q8h-v1.2.dtb \
        sun8i-a33-q8-tablet.dtb \
-       sun8i-a33-sinlinx-sina33.dtb
+       sun8i-a33-sinlinx-sina33.dtb \
+       sun8i-h3-orangepi-plus.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
        sun9i-a80-optimus.dtb \
        sun9i-a80-cubieboard4.dtb
+dtb-$(CONFIG_ARCH_TANGO) += \
+       tango4-vantage-1172.dtb
 dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
        tegra20-harmony.dtb \
        tegra20-iris-512.dtb \
@@ -749,6 +780,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
        armada-385-db-ap.dtb \
        armada-385-linksys-caiman.dtb \
        armada-385-linksys-cobra.dtb \
+       armada-388-clearfog.dtb \
        armada-388-db.dtb \
        armada-388-gp.dtb \
        armada-388-rd.dtb
@@ -772,6 +804,7 @@ dtb-$(CONFIG_MACH_DOVE) += \
        dove-dove-db.dtb \
        dove-sbc-a510.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += \
+       mt2701-evb.dtb \
        mt6580-evbp1.dtb \
        mt6589-aquaris5.dtb \
        mt6592-evb.dtb \
index 7d36601697da867a6f5ff1a4d061f0eecc0664dd..ded1eb64ea5216eb993f312fc2d2cbcad2e795cc 100644 (file)
 &am33xx_pinmux {
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x020 (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad8.mmc1_dat0_mux0 */
-                       0x024 (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad9.mmc1_dat1_mux0 */
-                       0x028 (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad10.mmc1_dat2_mux0 */
-                       0x02c (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad11.mmc1_dat3_mux0 */
-                       0x080 (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_csn1.mmc1_clk_mux0 */
-                       0x084 (PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_csn2.mmc1_cmd_mux0 */
-                       0x1e4 (PIN_INPUT_PULLUP | MUX_MODE7)      /* emu0.gpio3[7] */
+                       AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad8.mmc1_dat0_mux0 */
+                       AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad9.mmc1_dat1_mux0 */
+                       AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad10.mmc1_dat2_mux0 */
+                       AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_ad11.mmc1_dat3_mux0 */
+                       AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_csn1.mmc1_clk_mux0 */
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)      /* gpmc_csn2.mmc1_cmd_mux0 */
+                       AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLUP | MUX_MODE7)      /* emu0.gpio3[7] */
                >;
        };
 
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0x1e8 (PIN_OUTPUT_PULLUP | MUX_MODE7)      /* emu1.gpio3[8] */
+                       AM33XX_IOPAD(0x9e8, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* emu1.gpio3[8] */
                >;
        };
 
        tps65910_pins: pinmux_tps65910_pins {
                pinctrl-single,pins = <
-                       0x078 (PIN_INPUT_PULLUP | MUX_MODE7)      /* gpmc_ben1.gpio1[28] */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE7)      /* gpmc_ben1.gpio1[28] */
                >;
        };
 
        tca6416_pins: pinmux_tca6416_pins {
                pinctrl-single,pins = <
-                       0x1b4 (PIN_INPUT_PULLUP | MUX_MODE7)      /* xdma_event_intr1.gpio0[20] tca6416 stuff */
+                       AM33XX_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE7)      /* xdma_event_intr1.gpio0[20] tca6416 stuff */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x158 0x2a      /* spi0_d1.i2c1_sda_mux3, INPUT | MODE2 */
-                       0x15c 0x2a      /* spi0_cs0.i2c1_scl_mux3, INPUT | MODE2 */
+                       AM33XX_IOPAD(0x958, PIN_INPUT | MUX_MODE2)      /* spi0_d1.i2c1_sda_mux3 */
+                       AM33XX_IOPAD(0x95c, PIN_INPUT | MUX_MODE2)      /* spi0_cs0.i2c1_scl_mux3 */
                >;
        };
 
        dcan1_pins: pinmux_dcan1_pins {
                pinctrl-single,pins = <
-                       0x168 0x0a      /* uart0_ctsn.dcan1_tx_mux0, OUTPUT | MODE2 */
-                       0x16c 0x2a      /* uart0_rtsn.dcan1_rx_mux0, INPUT | MODE2 */
+                       AM33XX_IOPAD(0x968, PIN_OUTPUT | MUX_MODE2)      /* uart0_ctsn.dcan1_tx_mux0 */
+                       AM33XX_IOPAD(0x96c, PIN_INPUT | MUX_MODE2)      /* uart0_rtsn.dcan1_rx_mux0 */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)         /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)            /* uart0_txd.uart0_txd */
                >;
        };
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                       0x180 0x28      /* uart1_rxd, INPUT | MODE0 */
-                       0x184 0x28      /* uart1_txd, INPUT | MODE0 */
-                       /*0x178 0x28*/      /* uart1_ctsn, INPUT | MODE0 */
-                       /*0x17c 0x08*/      /* uart1_rtsn, OUTPUT | MODE0 */
-                       0x178 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* uart1_ctsn, INPUT | MODE0 */
-                       0x17c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* uart1_rtsn, OUTPUT | MODE0 */
-                       0x0e0 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* lcd_vsync.gpio2[22] DTR */
-                       0x0e4 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_hsync.gpio2[23] DSR */
-                       0x0e8 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_pclk.gpio2[24] DCD */
-                       0x0ec (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_ac_bias_en.gpio2[25] RI */
+                       AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0)      /* uart1_rxd */
+                       AM33XX_IOPAD(0x984, PIN_INPUT | MUX_MODE0)      /* uart1_txd */
+                       AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* uart1_ctsn, INPUT | MODE0 */
+                       AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* uart1_rtsn, OUTPUT | MODE0 */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* lcd_vsync.gpio2[22] DTR */
+                       AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_hsync.gpio2[23] DSR */
+                       AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_pclk.gpio2[24] DCD */
+                       AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* lcd_ac_bias_en.gpio2[25] RI */
                >;
        };
 
        uart2_pins: pinmux_uart2_pins {
                pinctrl-single,pins = <
-                       0x150 0x29      /* spi0_sclk.uart2_rxd_mux3, INPUT | MODE1 */
-                       0x154 0x09      /* spi0_d0.uart2_txd_mux3, OUTPUT | MODE1 */
-                       /*0x188 0x2a*/      /* i2c0_sda.uart2_ctsn_mux0, INPUT | MODE2 */
-                       /*0x18c 0x2a*/      /* i2c0_scl.uart2_rtsn_mux0, INPUT | MODE2 */
-                       0x188 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* i2c0_sda.uart2_ctsn_mux0 */
-                       0x18c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* i2c0_scl.uart2_rtsn_mux0 */
-                       0x030 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad12.gpio1[12] DTR */
-                       0x034 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad13.gpio1[13] DSR */
-                       0x038 (PIN_INPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad14.gpio1[14] DCD */
-                       0x03c (PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad15.gpio1[15] RI */
-
-                       0x1a0 (PIN_INPUT_PULLUP | MUX_MODE7)      /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */
+                       AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1)      /* spi0_sclk.uart2_rxd_mux3 */
+                       AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1)      /* spi0_d0.uart2_txd_mux3 */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* i2c0_sda.uart2_ctsn_mux0 */
+                       AM33XX_IOPAD(0x98c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* i2c0_scl.uart2_rtsn_mux0 */
+                       AM33XX_IOPAD(0x830, PIN_OUTPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad12.gpio1[12] DTR */
+                       AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad13.gpio1[13] DSR */
+                       AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7)      /* gpmc_ad14.gpio1[14] DCD */
+                       AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad15.gpio1[15] RI */
+
+                       AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7)      /* mcasp0_aclkr.gpio3[18], INPUT_PULLDOWN | MODE7 */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)       /* mii1_crs.rmii1_crs_dv */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_tx_en.rmii1_txen */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_txd1.rmii1_txd1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_txd0.rmii1_txd0 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)      /* mii1_rxd1.rmii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)      /* mii1_rxd0.rmii1_rxd0 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)      /* rmii1_ref_clk.rmii1_refclk */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)       /* mii1_crs.rmii1_crs_dv */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_tx_en.rmii1_txen */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_txd1.rmii1_txd1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)      /* mii1_txd0.rmii1_txd0 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1)      /* mii1_rxd1.rmii1_rxd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1)      /* mii1_rxd0.rmii1_rxd0 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* rmii1_ref_clk.rmii1_refclk */
 
 
                        /* Slave 2 */
-                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rctl */
-                       0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
-                       0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
-                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
-                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
-                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a8.rgmii2_rd3 */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a0.rgmii2_tctl */
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a1.rgmii2_rctl */
+                       AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a2.rgmii2_td3 */
+                       AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a3.rgmii2_td2 */
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a4.rgmii2_td1 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a5.rgmii2_td0 */
+                       AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a6.rgmii2_tclk */
+                       AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a7.rgmii2_rclk */
+                       AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a8.rgmii2_rd3 */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a9.rgmii2_rd2 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a10.rgmii2_rd1 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a11.rgmii2_rd0 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
 
                        /* Slave 2 reset value*/
-                       0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        nandflash_pins_s0: nandflash_pins_s0 {
                pinctrl-single,pins = <
-                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
-                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
-                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
-                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
-                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
-                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad7.gpmc_ad7 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_wpn.gpio0_30 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0  */
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_be0n_cle.gpmc_be0n_cle */
                >;
        };
 };
index 5d370d54bd30e18a42c675341ba57d9d82cf8783..f3db13d2d90e7d457954c2cd93f3b9df45cb57d2 100644 (file)
 
        user_leds_s0: user_leds_s0 {
                pinctrl-single,pins = <
-                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
-                       0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a6.gpio1_22 */
-                       0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a7.gpio1_23 */
-                       0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a5.gpio1_21 */
+                       AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_a6.gpio1_22 */
+                       AM33XX_IOPAD(0x85c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a7.gpio1_23 */
+                       AM33XX_IOPAD(0x860, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_a8.gpio1_24 */
                >;
        };
 
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                >;
        };
 
        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
-                       0x178 (PIN_INPUT_PULLUP | MUX_MODE3)    /* uart1_ctsn.i2c2_sda */
-                       0x17c (PIN_INPUT_PULLUP | MUX_MODE3)    /* uart1_rtsn.i2c2_scl */
+                       AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3)       /* uart1_ctsn.i2c2_sda */
+                       AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3)       /* uart1_rtsn.i2c2_scl */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
 
        clkout2_pin: pinmux_clkout2_pin {
                pinctrl-single,pins = <
-                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+                       AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr1.clkout2 */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxerr.mii1_rxerr */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
-                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxdv.mii1_rxdv */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
-                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_txclk.mii1_txclk */
-                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxclk.mii1_rxclk */
-                       0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd3.mii1_rxd3 */
-                       0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd2.mii1_rxd2 */
-                       0x13c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd1.mii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd0.mii1_rxd0 */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxerr.mii1_rxerr */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* mii1_txen.mii1_txen */
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxdv.mii1_rxdv */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* mii1_txd3.mii1_txd3 */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* mii1_txd2.mii1_txd2 */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* mii1_txd1.mii1_txd1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* mii1_txd0.mii1_txd0 */
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_txclk.mii1_txclk */
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxclk.mii1_rxclk */
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxd3.mii1_rxd3 */
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxd2.mii1_rxd2 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxd1.mii1_rxd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE0)       /* mii1_rxd0.mii1_rxd0 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
                >;
        };
 
        emmc_pins: pinmux_emmc_pins {
                pinctrl-single,pins = <
-                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
-                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
-                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
-                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
-                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
-                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+                       AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
                >;
        };
 };
        };
 };
 
-
-/include/ "tps65217.dtsi"
-
 &tps {
+       compatible = "ti,tps65217";
        /*
         * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only
         * mode") at poweroff.  Most BeagleBone versions do not support RTC-only
        ti,pmic-shutdown-controller;
 
        regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
                dcdc1_reg: regulator@0 {
+                       reg = <0>;
                        regulator-name = "vdds_dpr";
                        regulator-always-on;
                };
 
                dcdc2_reg: regulator@1 {
+                       reg = <1>;
                        /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
                        regulator-name = "vdd_mpu";
                        regulator-min-microvolt = <925000>;
                };
 
                dcdc3_reg: regulator@2 {
+                       reg = <2>;
                        /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
                        regulator-name = "vdd_core";
                        regulator-min-microvolt = <925000>;
                };
 
                ldo1_reg: regulator@3 {
+                       reg = <3>;
                        regulator-name = "vio,vrtc,vdds";
                        regulator-always-on;
                };
 
                ldo2_reg: regulator@4 {
+                       reg = <4>;
                        regulator-name = "vdd_3v3aux";
                        regulator-always-on;
                };
 
                ldo3_reg: regulator@5 {
+                       reg = <5>;
                        regulator-name = "vdd_1v8";
                        regulator-always-on;
                };
 
                ldo4_reg: regulator@6 {
+                       reg = <6>;
                        regulator-name = "vdd_3v3a";
                        regulator-always-on;
                };
index eadbba32386d80a42300266f0dd423d610c2dd51..55c0e954b1464427722d7bc89513af507cff6591 100644 (file)
 &am33xx_pinmux {
        nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
                pinctrl-single,pins = <
-                       0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
-                       0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
-                       0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-                       0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-                       0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
-                       0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+                       AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr0 */
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)             /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* lcd_ac_bias_en.lcd_ac_bias_en */
                >;
        };
        nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
                pinctrl-single,pins = <
-                       0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
+                       AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr0 */
                >;
        };
 };
index 0f65bdaaa58333bad9f1e6a8f72d24ecd2e751ab..dce3c8657e04db18d539d52444d9f1b3a51f721d 100644 (file)
@@ -36,8 +36,8 @@
 &am33xx_pinmux {
        uart2_pins: uart2_pins {
                pinctrl-single,pins = <
-                       0x150 (PIN_INPUT | MUX_MODE1)   /* spi0_sclk.uart2_rxd */
-                       0x154 (PIN_OUTPUT | MUX_MODE1)  /* spi0_d0.uart2_txd */
+                       AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1)      /* spi0_sclk.uart2_rxd */
+                       AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1)     /* spi0_d0.uart2_txd */
                >;
        };
 };
index 310da20a8aa765f8a9e5a2d61c17c028b04263ff..15d47ab288657fb16bb29b985300df5de57fb15e 100644 (file)
 &am33xx_pinmux {
        usb1_drvvbus: usb1_drvvbus {
                pinctrl-single,pins = <
-                       0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
+                       AM33XX_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
                >;
        };
 
        sd_pins: pinmux_sd_card {
                pinctrl-single,pins = <
-                       0xf0 (PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
-                       0xf4 (PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
-                       0xf8 (PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
-                       0xfc (PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
-                       0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
+                       AM33XX_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
+                       AM33XX_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        led_gpio_pins: led_gpio_pins {
                pinctrl-single,pins = <
-                       0x1e4 (PIN_OUTPUT | MUX_MODE7) /* emu0.gpio3_7 */
-                       0x1e8 (PIN_OUTPUT | MUX_MODE7) /* emu1.gpio3_8 */
+                       AM33XX_IOPAD(0x9e4, PIN_OUTPUT | MUX_MODE7) /* emu0.gpio3_7 */
+                       AM33XX_IOPAD(0x9e8, PIN_OUTPUT | MUX_MODE7) /* emu1.gpio3_8 */
                >;
        };
 };
index 7e9a34dffe2113c6bdff809d0ee23a1830062800..fda457b07e15c282887ede12eee576d56c6f3855 100644 (file)
 
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_crs.rmii1_crs */
-                       0x110 (PIN_INPUT_PULLUP | MUX_MODE1)    /* mii1_rxerr.rmii1_rxerr */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
-                       0x13c (PIN_INPUT_PULLUP | MUX_MODE1)    /* mii1_rxd1.rmii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLUP | MUX_MODE1)    /* mii1_rxd0.rmii1_rxd0 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rmii1_ref_clk.rmii_ref_clk */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_crs.rmii1_crs */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1)       /* mii1_rxerr.rmii1_rxerr */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txen.rmii1_txen */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txd1.rmii1_txd1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txd0.rmii1_txd0 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1)       /* mii1_rxd1.rmii1_rxd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1)       /* mii1_rxd0.rmii1_rxd0 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* rmii1_ref_clk.rmii_ref_clk */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* mdio_data.mdio_data */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
                        /* mdio_clk.mdio_clk */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        nandflash_pins: nandflash_pins {
                pinctrl-single,pins = <
-                       0x00 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad0.gpmc_ad0 */
-                       0x04 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad1.gpmc_ad1 */
-                       0x08 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad2.gpmc_ad2 */
-                       0x0c (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad7.gpmc_ad7 */
-
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x7c (PIN_OUTPUT_PULLUP | MUX_MODE0)    /* gpmc_csn0.gpmc_csn0 */
-                       0x90 (PIN_OUTPUT_PULLUP | MUX_MODE0)    /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT_PULLUP | MUX_MODE0)    /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT_PULLUP | MUX_MODE0)    /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT_PULLUP | MUX_MODE0)    /* gpmc_be0n_cle.gpmc_be0n_cle */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
+
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE0)      /* gpmc_csn0.gpmc_csn0 */
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT_PULLUP | MUX_MODE0)      /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT_PULLUP | MUX_MODE0)      /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT_PULLUP | MUX_MODE0)      /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT_PULLUP | MUX_MODE0)      /* gpmc_be0n_cle.gpmc_be0n_cle */
                >;
        };
 };
 
 };
 
-/include/ "tps65217.dtsi"
-
 &tps {
+       compatible = "ti,tps65217";
+
        regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
                dcdc1_reg: regulator@0 {
+                       reg = <0>;
                        regulator-name = "vdds_dpr";
                        regulator-always-on;
                };
 
                dcdc2_reg: regulator@1 {
+                       reg = <1>;
                        /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
                        regulator-name = "vdd_mpu";
                        regulator-min-microvolt = <925000>;
                };
 
                dcdc3_reg: regulator@2 {
+                       reg = <2>;
                        /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
                        regulator-name = "vdd_core";
                        regulator-min-microvolt = <925000>;
                };
 
                ldo1_reg: regulator@3 {
+                       reg = <3>;
                        regulator-name = "vio,vrtc,vdds";
                        regulator-boot-on;
                        regulator-always-on;
                };
 
                ldo2_reg: regulator@4 {
+                       reg = <4>;
                        regulator-name = "vdd_3v3aux";
                        regulator-boot-on;
                        regulator-always-on;
                };
 
                ldo3_reg: regulator@5 {
+                       reg = <5>;
                        regulator-name = "vdd_1v8";
                        regulator-boot-on;
                        regulator-always-on;
                };
 
                ldo4_reg: regulator@6 {
+                       reg = <6>;
                        regulator-name = "vdd_3v3d";
                        regulator-boot-on;
                        regulator-always-on;
diff --git a/arch/arm/boot/dts/am335x-cm-t335.dts b/arch/arm/boot/dts/am335x-cm-t335.dts
new file mode 100644 (file)
index 0000000..42e9b66
--- /dev/null
@@ -0,0 +1,396 @@
+/*
+ * am335x-cm-t335.dts - Device Tree file for Compulab CM-T335
+ *
+ * Copyright (C) 2014 - 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+       model = "CompuLab CM-T335";
+       compatible = "compulab,cm-t335", "ti,am33xx";
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x8000000>;   /* 128 MB */
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_led_pins>;
+               led@0 {
+                       label = "cm_t335:green";
+                       gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;     /* gpio2_0 */
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       /* regulator for mmc */
+       vmmc_fixed: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc_fixed";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&ecap0 0 50000 0>;
+               brightness-levels = <0 51 53 56 62 75 101 152 255>;
+               default-brightness-level = <8>;
+       };
+};
+
+&am33xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&bluetooth_pins>;
+
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)
+               >;
+       };
+
+       i2c1_pins: pinmux_i2c1_pins {
+               pinctrl-single,pins = <
+                       /* uart0_ctsn.i2c1_sda */
+                       AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE2)
+                       /* uart0_rtsn.i2c1_scl */
+                       AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE2)
+               >;
+       };
+
+       gpio_led_pins: pinmux_gpio_led_pins {
+               pinctrl-single,pins = <
+                       /* gpmc_csn3.gpio2_0 */
+                       AM33XX_IOPAD(0x888, PIN_OUTPUT | MUX_MODE7)
+               >;
+       };
+
+       nandflash_pins: pinmux_nandflash_pins {
+               pinctrl-single,pins = <
+                       /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_ad7.gpmc_ad7 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* gpmc_wpn.gpio0_30 */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7)
+                       /* gpmc_csn0.gpmc_csn0  */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)
+                       /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)
+                       /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)
+                       /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)
+                       /* gpmc_ben0_cle.gpmc_ben0_cle */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)
+               >;
+       };
+
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+
+       uart1_pins: pinmux_uart1_pins {
+               pinctrl-single,pins = <
+                       /* uart1_ctsn.uart1_ctsn */
+                       AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)
+                       /* uart1_rtsn.uart1_rtsn */
+                       AM33XX_IOPAD(0x97C, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       /* uart1_rxd.uart1_rxd */
+                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* uart1_txd.uart1_txd */
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+
+       ecap0_pins: pinmux_ecap0_pins {
+               pinctrl-single,pins = <
+                       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+                       AM33XX_IOPAD(0x964, 0x0)
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       /* mii1_tx_en.rgmii1_tctl */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxdv.rgmii1_rctl */
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_txd3.rgmii1_td3 */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_txd2.rgmii1_td2 */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_txd1.rgmii1_td1 */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_txd0.rgmii1_td0 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_txclk.rgmii1_tclk */
+                       AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxclk.rgmii1_rclk */
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxd3.rgmii1_rd3 */
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxd2.rgmii1_rd2 */
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxd1.rgmii1_rd1 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)
+                       /* mii1_rxd0.rgmii1_rd0 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)
+               >;
+       };
+
+       cpsw_sleep: cpsw_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 reset value */
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
+                       /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)
+               >;
+       };
+
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       /* mmc0_dat3.mmc0_dat3 */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* mmc0_dat2.mmc0_dat2 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* mmc0_dat1.mmc0_dat1 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* mmc0_dat0.mmc0_dat0 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* mmc0_clk.mmc0_clk */
+                       AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)
+                       /* mmc0_cmd.mmc0_cmd */
+                       AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)
+               >;
+       };
+
+       /* wl1271 bluetooth */
+       bluetooth_pins: pinmux_bluetooth_pins {
+               pinctrl-single,pins = <
+                       /* XDMA_EVENT_INTR0.gpio0_19 - bluetooth enable */
+                       AM33XX_IOPAD(0x9b0, PIN_OUTPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+
+       status = "okay";
+};
+
+/* WLS1271 bluetooth */
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+
+status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       status = "okay";
+       clock-frequency = <400000>;
+       /* CM-T335 board EEPROM */
+       eeprom: 24c02@50 {
+               compatible = "atmel,24c02";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+       /* Real Time Clock */
+       ext_rtc: em3027@56 {
+               compatible = "emmicro,em3027";
+               reg = <0x56>;
+       };
+};
+
+&usb {
+       status = "okay";
+};
+
+&usb_ctrl_mod {
+       status = "okay";
+};
+
+&usb0_phy {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+};
+
+&cppi41dma  {
+       status = "okay";
+};
+
+&epwmss0 {
+       status = "okay";
+
+       ecap0: ecap@48300100 {
+               status = "okay";
+               pinctrl-names = "default";
+               pinctrl-0 = <&ecap0_pins>;
+       };
+};
+
+&gpmc {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nandflash_pins>;
+       ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
+       nand@0,0 {
+               reg = <0 0 0>; /* CS0, offset 0 */
+               ti,nand-ecc-opt = "bch8";
+               ti,elm-id = <&elm>;
+               nand-bus-width = <8>;
+               gpmc,device-width = <1>;
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-on-ns = <0>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wait-on-read = "true";
+               gpmc,wait-on-write = "true";
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,clk-activation-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+               /* MTD partition table */
+               #address-cells = <1>;
+               #size-cells = <1>;
+               partition@0 {
+                       label = "spl";
+                       reg = <0x00000000 0x00200000>;
+               };
+               partition@1 {
+                       label = "uboot";
+                       reg = <0x00200000 0x00100000>;
+               };
+               partition@2 {
+                       label = "uboot environment";
+                       reg = <0x00300000 0x00100000>;
+               };
+               partition@3 {
+                       label = "dtb";
+                       reg = <0x00400000 0x00100000>;
+               };
+               partition@4 {
+                       label = "splash";
+                       reg = <0x00500000 0x00400000>;
+               };
+               partition@5 {
+                       label = "linux";
+                       reg = <0x00900000 0x00600000>;
+               };
+               partition@6 {
+                       label = "rootfs";
+                       reg = <0x00F00000 0>;
+               };
+       };
+};
+
+&elm {
+       status = "okay";
+};
+
+&mac {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&cpsw_default>;
+       pinctrl-1 = <&cpsw_sleep>;
+       slaves = <1>;
+       status = "okay";
+};
+
+&davinci_mdio {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&davinci_mdio_default>;
+       pinctrl-1 = <&davinci_mdio_sleep>;
+       status = "okay";
+};
+
+&cpsw_emac0 {
+       phy_id = <&davinci_mdio>, <0>;
+       phy-mode = "rgmii-txid";
+};
+
+&mmc1 {
+       status = "okay";
+       vmmc-supply = <&vmmc_fixed>;
+       bus-width = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+};
index d9d00ab863a21735312ff2d53a6830c48ad425ff..0d6a68ce434a44fa8c9cfc37eacdd72dcab818e5 100644 (file)
                        label = "volume-up";
                        linux,code = <115>;
                        gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                switch@10 {
                        label = "volume-down";
                        linux,code = <114>;
                        gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
 
        matrix_keypad_s0: matrix_keypad_s0 {
                pinctrl-single,pins = <
-                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
-                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a6.gpio1_22 */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a9.gpio1_25 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a10.gpio1_26 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a11.gpio1_27 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a5.gpio1_21 */
+                       AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a6.gpio1_22 */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a9.gpio1_25 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a10.gpio1_26 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a11.gpio1_27 */
                >;
        };
 
        volume_keys_s0: volume_keys_s0 {
                pinctrl-single,pins = <
-                       0x150 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_sclk.gpio0_2 */
-                       0x154 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* spi0_d0.gpio0_3 */
+                       AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* spi0_sclk.gpio0_2 */
+                       AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* spi0_d0.gpio0_3 */
                >;
        };
 
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x158 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_d1.i2c1_sda */
-                       0x15c (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_cs0.i2c1_scl */
+                       AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE2)       /* spi0_d1.i2c1_sda */
+                       AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE2)       /* spi0_cs0.i2c1_scl */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                       0x178 (PIN_INPUT | MUX_MODE0)           /* uart1_ctsn.uart1_ctsn */
-                       0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */
-                       0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
-                       0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
+                       AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)              /* uart1_ctsn.uart1_ctsn */
+                       AM33XX_IOPAD(0x97C, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_rtsn.uart1_rtsn */
+                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
                >;
        };
 
        clkout2_pin: pinmux_clkout2_pin {
                pinctrl-single,pins = <
-                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+                       AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr1.clkout2 */
                >;
        };
 
        nandflash_pins_s0: nandflash_pins_s0 {
                pinctrl-single,pins = <
-                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
-                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
-                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
-                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
-                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
-                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad7.gpmc_ad7 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_wpn.gpio0_30 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0  */
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_be0n_cle.gpmc_be0n_cle */
                >;
        };
 
        ecap0_pins: backlight_pins {
                pinctrl-single,pins = <
-                       0x164 0x0       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+                       AM33XX_IOPAD(0x964, MUX_MODE0)  /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_tctl */
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rctl */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd3.rgmii1_td3 */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd2.rgmii1_td2 */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_td1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_td0 */
+                       AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rgmii1_tclk */
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rgmii1_rclk */
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd3.rgmii1_rd3 */
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd2.rgmii1_rd2 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rd0 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        mmc3_pins: pinmux_mmc3_pins {
                pinctrl-single,pins = <
-                       0x44 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */
-                       0x48 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */
-                       0x4C (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */
-                       0x78 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */
-                       0x88 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
-                       0x8C (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a1.mmc2_dat0, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x848, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a2.mmc2_dat1, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x84c, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a3.mmc2_dat2, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_ben1.mmc2_dat3, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_csn3.mmc2_cmd, INPUT_PULLUP | MODE3 */
+                       AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_clk.mmc2_clk, INPUT_PULLUP | MODE3 */
                >;
        };
 
        wlan_pins: pinmux_wlan_pins {
                pinctrl-single,pins = <
-                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a0.gpio1_16 */
-                       0x19C (PIN_INPUT | MUX_MODE7)           /* mcasp0_ahclkr.gpio3_17 */
-                       0x1AC (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mcasp0_ahclkx.gpio3_21 */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a0.gpio1_16 */
+                       AM33XX_IOPAD(0x99c, PIN_INPUT | MUX_MODE7)              /* mcasp0_ahclkr.gpio3_17 */
+                       AM33XX_IOPAD(0x9ac, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* mcasp0_ahclkx.gpio3_21 */
                >;
        };
 
        lcd_pins_s0: lcd_pins_s0 {
                pinctrl-single,pins = <
-                       0x20 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad8.lcd_data23 */
-                       0x24 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad9.lcd_data22 */
-                       0x28 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad10.lcd_data21 */
-                       0x2c (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad11.lcd_data20 */
-                       0x30 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad12.lcd_data19 */
-                       0x34 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad13.lcd_data18 */
-                       0x38 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad14.lcd_data17 */
-                       0x3c (PIN_OUTPUT | MUX_MODE1)           /* gpmc_ad15.lcd_data16 */
-                       0xa0 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data0.lcd_data0 */
-                       0xa4 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data1.lcd_data1 */
-                       0xa8 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data2.lcd_data2 */
-                       0xac (PIN_OUTPUT | MUX_MODE0)           /* lcd_data3.lcd_data3 */
-                       0xb0 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data4.lcd_data4 */
-                       0xb4 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data5.lcd_data5 */
-                       0xb8 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data6.lcd_data6 */
-                       0xbc (PIN_OUTPUT | MUX_MODE0)           /* lcd_data7.lcd_data7 */
-                       0xc0 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data8.lcd_data8 */
-                       0xc4 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data9.lcd_data9 */
-                       0xc8 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data10.lcd_data10 */
-                       0xcc (PIN_OUTPUT | MUX_MODE0)           /* lcd_data11.lcd_data11 */
-                       0xd0 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data12.lcd_data12 */
-                       0xd4 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data13.lcd_data13 */
-                       0xd8 (PIN_OUTPUT | MUX_MODE0)           /* lcd_data14.lcd_data14 */
-                       0xdc (PIN_OUTPUT | MUX_MODE0)           /* lcd_data15.lcd_data15 */
-                       0xe0 (PIN_OUTPUT | MUX_MODE0)           /* lcd_vsync.lcd_vsync */
-                       0xe4 (PIN_OUTPUT | MUX_MODE0)           /* lcd_hsync.lcd_hsync */
-                       0xe8 (PIN_OUTPUT | MUX_MODE0)           /* lcd_pclk.lcd_pclk */
-                       0xec (PIN_OUTPUT | MUX_MODE0)           /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad8.lcd_data23 */
+                       AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad9.lcd_data22 */
+                       AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad10.lcd_data21 */
+                       AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad11.lcd_data20 */
+                       AM33XX_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad12.lcd_data19 */
+                       AM33XX_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad13.lcd_data18 */
+                       AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad14.lcd_data17 */
+                       AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)             /* gpmc_ad15.lcd_data16 */
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)             /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)             /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)             /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)             /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)             /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0)             /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0)             /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0)             /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0)             /* lcd_ac_bias_en.lcd_ac_bias_en */
                >;
        };
 
        mcasp1_pins: mcasp1_pins {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
-                       0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+                       AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
                >;
        };
 
        mcasp1_pins_sleep: mcasp1_pins_sleep {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        dcan1_pins_default: dcan1_pins_default {
                pinctrl-single,pins = <
-                       0x168 (PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
-                       0x16c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
+                       AM33XX_IOPAD(0x968, PIN_OUTPUT | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
+                       AM33XX_IOPAD(0x96c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
                >;
        };
 };
 &mmc3 {
        /* these are on the crossbar and are outlined in the
           xbar-event-map element */
-       dmas = <&edma 12
-               &edma 13>;
+       dmas = <&edma_xbar 12 0 1
+               &edma_xbar 13 0 2>;
        dma-names = "tx", "rx";
        status = "okay";
        vmmc-supply = <&wlan_en_reg>;
        };
 };
 
-&edma {
-       ti,edma-xbar-event-map = /bits/ 16 <1 12
-                                           2 13>;
-};
-
 &sham {
        status = "okay";
 };
index 89442e98a8375c965dc117fd2e04da3be6e8d2de..282fe1b370959f7fb429dd3cc4cbc70232890e15 100644 (file)
                        label = "button2";
                        linux,code = <0x102>;
                        gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                switch@4 {
 
        lcd_pins_default: lcd_pins_default {
                pinctrl-single,pins = <
-                       0x20 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad8.lcd_data23 */
-                       0x24 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad9.lcd_data22 */
-                       0x28 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad10.lcd_data21 */
-                       0x2c (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad11.lcd_data20 */
-                       0x30 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad12.lcd_data19 */
-                       0x34 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad13.lcd_data18 */
-                       0x38 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad14.lcd_data17 */
-                       0x3c (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad15.lcd_data16 */
-                       0xa0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data0.lcd_data0 */
-                       0xa4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data1.lcd_data1 */
-                       0xa8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data2.lcd_data2 */
-                       0xac (PIN_OUTPUT | MUX_MODE0)   /* lcd_data3.lcd_data3 */
-                       0xb0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data4.lcd_data4 */
-                       0xb4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data5.lcd_data5 */
-                       0xb8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data6.lcd_data6 */
-                       0xbc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data7.lcd_data7 */
-                       0xc0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data8.lcd_data8 */
-                       0xc4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data9.lcd_data9 */
-                       0xc8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data10.lcd_data10 */
-                       0xcc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data11.lcd_data11 */
-                       0xd0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data12.lcd_data12 */
-                       0xd4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data13.lcd_data13 */
-                       0xd8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data14.lcd_data14 */
-                       0xdc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data15.lcd_data15 */
-                       0xe0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_vsync.lcd_vsync */
-                       0xe4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_hsync.lcd_hsync */
-                       0xe8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_pclk.lcd_pclk */
-                       0xec (PIN_OUTPUT | MUX_MODE0)   /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad8.lcd_data23 */
+                       AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad9.lcd_data22 */
+                       AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad10.lcd_data21 */
+                       AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad11.lcd_data20 */
+                       AM33XX_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad12.lcd_data19 */
+                       AM33XX_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad13.lcd_data18 */
+                       AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad14.lcd_data17 */
+                       AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad15.lcd_data16 */
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)     /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0)     /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0)     /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0)     /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0)     /* lcd_ac_bias_en.lcd_ac_bias_en */
                >;
        };
 
        lcd_pins_sleep: lcd_pins_sleep {
                pinctrl-single,pins = <
-                       0x20 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad8.lcd_data23 */
-                       0x24 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad9.lcd_data22 */
-                       0x28 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad10.lcd_data21 */
-                       0x2c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad11.lcd_data20 */
-                       0x30 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad12.lcd_data19 */
-                       0x34 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad13.lcd_data18 */
-                       0x38 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad14.lcd_data17 */
-                       0x3c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ad15.lcd_data16 */
-                       0xa0 (PULL_DISABLE | MUX_MODE7) /* lcd_data0.lcd_data0 */
-                       0xa4 (PULL_DISABLE | MUX_MODE7) /* lcd_data1.lcd_data1 */
-                       0xa8 (PULL_DISABLE | MUX_MODE7) /* lcd_data2.lcd_data2 */
-                       0xac (PULL_DISABLE | MUX_MODE7) /* lcd_data3.lcd_data3 */
-                       0xb0 (PULL_DISABLE | MUX_MODE7) /* lcd_data4.lcd_data4 */
-                       0xb4 (PULL_DISABLE | MUX_MODE7) /* lcd_data5.lcd_data5 */
-                       0xb8 (PULL_DISABLE | MUX_MODE7) /* lcd_data6.lcd_data6 */
-                       0xbc (PULL_DISABLE | MUX_MODE7) /* lcd_data7.lcd_data7 */
-                       0xc0 (PULL_DISABLE | MUX_MODE7) /* lcd_data8.lcd_data8 */
-                       0xc4 (PULL_DISABLE | MUX_MODE7) /* lcd_data9.lcd_data9 */
-                       0xc8 (PULL_DISABLE | MUX_MODE7) /* lcd_data10.lcd_data10 */
-                       0xcc (PULL_DISABLE | MUX_MODE7) /* lcd_data11.lcd_data11 */
-                       0xd0 (PULL_DISABLE | MUX_MODE7) /* lcd_data12.lcd_data12 */
-                       0xd4 (PULL_DISABLE | MUX_MODE7) /* lcd_data13.lcd_data13 */
-                       0xd8 (PULL_DISABLE | MUX_MODE7) /* lcd_data14.lcd_data14 */
-                       0xdc (PULL_DISABLE | MUX_MODE7) /* lcd_data15.lcd_data15 */
-                       0xe0 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* lcd_vsync.lcd_vsync */
-                       0xe4 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* lcd_hsync.lcd_hsync */
-                       0xe8 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* lcd_pclk.lcd_pclk */
-                       0xec (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x820, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad8.lcd_data23 */
+                       AM33XX_IOPAD(0x824, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad9.lcd_data22 */
+                       AM33XX_IOPAD(0x828, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad10.lcd_data21 */
+                       AM33XX_IOPAD(0x82c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad11.lcd_data20 */
+                       AM33XX_IOPAD(0x830, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad12.lcd_data19 */
+                       AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad13.lcd_data18 */
+                       AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad14.lcd_data17 */
+                       AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ad15.lcd_data16 */
+                       AM33XX_IOPAD(0x8a0, PULL_DISABLE | MUX_MODE7)   /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a4, PULL_DISABLE | MUX_MODE7)   /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a8, PULL_DISABLE | MUX_MODE7)   /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8ac, PULL_DISABLE | MUX_MODE7)   /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8b0, PULL_DISABLE | MUX_MODE7)   /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b4, PULL_DISABLE | MUX_MODE7)   /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b8, PULL_DISABLE | MUX_MODE7)   /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8bc, PULL_DISABLE | MUX_MODE7)   /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8c0, PULL_DISABLE | MUX_MODE7)   /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c4, PULL_DISABLE | MUX_MODE7)   /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c8, PULL_DISABLE | MUX_MODE7)   /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8cc, PULL_DISABLE | MUX_MODE7)   /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8d0, PULL_DISABLE | MUX_MODE7)   /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d4, PULL_DISABLE | MUX_MODE7)   /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d8, PULL_DISABLE | MUX_MODE7)   /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8dc, PULL_DISABLE | MUX_MODE7)   /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8e0, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* lcd_ac_bias_en.lcd_ac_bias_en */
                >;
        };
 
 
        user_leds_s0: user_leds_s0 {
                pinctrl-single,pins = <
-                       0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad4.gpio1_4 */
-                       0x14 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad5.gpio1_5 */
-                       0x18 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad6.gpio1_6 */
-                       0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad7.gpio1_7 */
+                       AM33XX_IOPAD(0x810, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad4.gpio1_4 */
+                       AM33XX_IOPAD(0x814, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad5.gpio1_5 */
+                       AM33XX_IOPAD(0x818, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad6.gpio1_6 */
+                       AM33XX_IOPAD(0x81c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_ad7.gpio1_7 */
                >;
        };
 
        gpio_keys_s0: gpio_keys_s0 {
                pinctrl-single,pins = <
-                       0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_oen_ren.gpio2_3 */
-                       0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_advn_ale.gpio2_2 */
-                       0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_wait0.gpio0_30 */
-                       0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_ben0_cle.gpio2_5 */
+                       AM33XX_IOPAD(0x894, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_oen_ren.gpio2_3 */
+                       AM33XX_IOPAD(0x890, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_advn_ale.gpio2_2 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_wait0.gpio0_30 */
+                       AM33XX_IOPAD(0x89c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_ben0_cle.gpio2_5 */
                >;
        };
 
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)         /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
 
        clkout2_pin: pinmux_clkout2_pin {
                pinctrl-single,pins = <
-                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)         /* xdma_event_intr1.clkout2 */
+                       AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr1.clkout2 */
                >;
        };
 
        ecap2_pins: backlight_pins {
                pinctrl-single,pins = <
-                       0x19c 0x4       /* mcasp0_ahclkr.ecap2_in_pwm2_out MODE4 */
+                       AM33XX_IOPAD(0x99c, MUX_MODE4)  /* mcasp0_ahclkr.ecap2_in_pwm2_out */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rgmii1_rclk */
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd3.rgmii1_rd3 */
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd2.rgmii1_rd2 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_tctl */
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rctl */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd3.rgmii1_td3 */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd2.rgmii1_td2 */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_td1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_td0 */
+                       AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rgmii1_tclk */
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rgmii1_rclk */
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd3.rgmii1_rd3 */
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd2.rgmii1_rd2 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rd0 */
 
                        /* Slave 2 */
-                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rctl */
-                       0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
-                       0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
-                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
-                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
-                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a8.rgmii2_rd3 */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a0.rgmii2_tctl */
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a1.rgmii2_rctl */
+                       AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a2.rgmii2_td3 */
+                       AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a3.rgmii2_td2 */
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a4.rgmii2_td1 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a5.rgmii2_td0 */
+                       AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a6.rgmii2_tclk */
+                       AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a7.rgmii2_rclk */
+                       AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a8.rgmii2_rd3 */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a9.rgmii2_rd2 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a10.rgmii2_rd1 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a11.rgmii2_rd0 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
 
                        /* Slave 2 reset value*/
-                       0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        mcasp1_pins: mcasp1_pins {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
-                       0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
+                       AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
                >;
        };
 
        mcasp1_pins_sleep: mcasp1_pins_sleep {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_31 */
-                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
-                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
-                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
-                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
-                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
-                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_31 */
+                       AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
                >;
        };
 
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0x7c (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_csn0.gpio1_29 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_csn0.gpio1_29 */
                >;
        };
 };
index 5c5667a3624dee614047e6b63efde568c063f431..d97b0efa43f358de8385bb52bf8b02b1ef48dc98 100644 (file)
 &am33xx_pinmux {
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat3 */
-                       0xf4 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat2 */
-                       0xf8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat1 */
-                       0xfc (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat0 */
-                       0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_clk */
-                       0x104 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_cmd */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0 */
+                       AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk */
+                       AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd */
                >;
        };
 
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT | MUX_MODE0)   /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT | MUX_MODE0)   /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0)      /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0)      /* i2c0_scl.i2c0_scl */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii1_int */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* rmii1_crs_dv */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* rmii1_rxer */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* rmii1_txen */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* rmii1_td1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* rmii1_td0 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* rmii1_rd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* rmii1_rd0 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rmii1_refclk */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_int */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* rmii1_crs_dv */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* rmii1_rxer */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* rmii1_txen */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* rmii1_td1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* rmii1_td0 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* rmii1_rd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* rmii1_rd0 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* rmii1_refclk */
 
                        /* Slave 2 */
-                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)  /* rmii2_txen */
-                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)  /* rmii2_td1 */
-                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)  /* rmii2_td0 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* rmii2_rd1 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* rmii2_rd0 */
-                       0x70 (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* rmii2_crs_dv */
-                       0x74 (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* rmii2_rxer */
-                       0x78 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_int */
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* rmii2_refclk */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* rmii2_txen */
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* rmii2_td1 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* rmii2_td0 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE3)     /* rmii2_rd1 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE3)     /* rmii2_rd0 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE3)     /* rmii2_crs_dv */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE3)     /* rmii2_rxer */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_int */
+                       AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* rmii2_refclk */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii1_int */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_crs_dv */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_rxer */
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_txen */
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_td1 */
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_td0 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_rd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_rd0 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii1_refclk */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_int */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_crs_dv */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_rxer */
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_txen */
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_td1 */
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_td0 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_rd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_rd0 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii1_refclk */
 
                        /* Slave 2 reset value*/
-                       0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_txen */
-                       0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_td1 */
-                       0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_td0 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_rd1 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_rd0 */
-                       0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_crs_dv */
-                       0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_rxer */
-                       0x78 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* rmii2_int */
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* rmii2_refclk */
+                       AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_txen */
+                       AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_td1 */
+                       AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_td0 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_rd1 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_rd0 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_crs_dv */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_rxer */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_int */
+                       AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* rmii2_refclk */
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        emmc_pins: pinmux_emmc_pins {
                pinctrl-single,pins = <
-                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
-                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
-                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
-                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
-                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
-                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+                       AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
                >;
        };
 
        uart0_pins: pinmux_uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
 };
index 5ed4ca6eaf55b6ea0adeae9f0ea635fce453a6ef..77559a1ded60fb4530d90aef42323ca187ed6ac9 100644 (file)
 
        misc_pins: misc_pins {
                pinctrl-single,pins = <
-                       0x15c (PIN_OUTPUT | MUX_MODE7)  /* spi0_cs0.gpio0_5 */
+                       AM33XX_IOPAD(0x95c, PIN_OUTPUT | MUX_MODE7)     /* spi0_cs0.gpio0_5 */
                >;
        };
 
        gpmc_pins: gpmc_pins {
                pinctrl-single,pins = <
-                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
-                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
-                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
-                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
-                       0x20 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad8.gpmc_ad8 */
-                       0x24 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad9.gpmc_ad9 */
-                       0x28 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad10.gpmc_ad10 */
-                       0x2c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad11.gpmc_ad11 */
-                       0x30 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad12.gpmc_ad12 */
-                       0x34 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad13.gpmc_ad13 */
-                       0x38 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad14.gpmc_ad14 */
-                       0x3c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad15.gpmc_ad15 */
-
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0 */
-                       0x80 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn1.gpmc_csn1 */
-                       0x84 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn2.gpmc_csn2 */
-                       0x88 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn3.gpmc_csn3 */
-
-                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_ben0_cle.gpmc_ben0_cle */
-
-                       0xa4 (PIN_OUTPUT | MUX_MODE1)           /* lcd_data1.gpmc_a1 */
-                       0xa8 (PIN_OUTPUT | MUX_MODE1)           /* lcd_data2.gpmc_a2 */
-                       0xac (PIN_OUTPUT | MUX_MODE1)           /* lcd_data3.gpmc_a3 */
-                       0xb0 (PIN_OUTPUT | MUX_MODE1)           /* lcd_data4.gpmc_a4 */
-                       0xb4 (PIN_OUTPUT | MUX_MODE1)           /* lcd_data5.gpmc_a5 */
-                       0xb8 (PIN_OUTPUT | MUX_MODE1)           /* lcd_data6.gpmc_a6 */
-                       0xbc (PIN_OUTPUT | MUX_MODE1)           /* lcd_data7.gpmc_a7 */
-
-                       0xe0 (PIN_OUTPUT | MUX_MODE1)           /* lcd_vsync.gpmc_a8 */
-                       0xe4 (PIN_OUTPUT | MUX_MODE1)           /* lcd_hsync.gpmc_a9 */
-                       0xe8 (PIN_OUTPUT | MUX_MODE1)           /* lcd_pclk.gpmc_a10 */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad7.gpmc_ad7 */
+                       AM33XX_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad8.gpmc_ad8 */
+                       AM33XX_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad9.gpmc_ad9 */
+                       AM33XX_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad10.gpmc_ad10 */
+                       AM33XX_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad11.gpmc_ad11 */
+                       AM33XX_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad12.gpmc_ad12 */
+                       AM33XX_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad13.gpmc_ad13 */
+                       AM33XX_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad14.gpmc_ad14 */
+                       AM33XX_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad15.gpmc_ad15 */
+
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0 */
+                       AM33XX_IOPAD(0x880, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn1.gpmc_csn1 */
+                       AM33XX_IOPAD(0x884, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn2.gpmc_csn2 */
+                       AM33XX_IOPAD(0x888, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn3.gpmc_csn3 */
+
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_ben0_cle.gpmc_ben0_cle */
+
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE1)             /* lcd_data1.gpmc_a1 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE1)             /* lcd_data2.gpmc_a2 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE1)             /* lcd_data3.gpmc_a3 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE1)             /* lcd_data4.gpmc_a4 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE1)             /* lcd_data5.gpmc_a5 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE1)             /* lcd_data6.gpmc_a6 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE1)             /* lcd_data7.gpmc_a7 */
+
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE1)             /* lcd_vsync.gpmc_a8 */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE1)             /* lcd_hsync.gpmc_a9 */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE1)             /* lcd_pclk.gpmc_a10 */
                >;
        };
 
        i2c0_pins: i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* i2c0_scl.i2c0_scl */
                >;
        };
 
        uart0_pins: uart0_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT | MUX_MODE0)          /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT | MUX_MODE0)             /* uart0_txd.uart0_txd */
                >;
        };
 
        uart1_pins: uart1_pins {
                pinctrl-single,pins = <
-                       0x178 (PIN_OUTPUT | MUX_MODE7)          /* uart1_ctsn.uart1_ctsn */
-                       0x17c (PIN_OUTPUT | MUX_MODE7)          /* uart1_rtsn.uart1_rtsn */
-                       0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
-                       0x184 (PIN_OUTPUT | MUX_MODE0)          /* uart1_txd.uart1_txd */
+                       AM33XX_IOPAD(0x978, PIN_OUTPUT | MUX_MODE7)             /* uart1_ctsn.uart1_ctsn */
+                       AM33XX_IOPAD(0x97c, PIN_OUTPUT | MUX_MODE7)             /* uart1_rtsn.uart1_rtsn */
+                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT | MUX_MODE0)             /* uart1_txd.uart1_txd */
                >;
        };
 
        uart2_pins: uart2_pins {
                pinctrl-single,pins = <
-                       0xc0 (PIN_INPUT_PULLUP | MUX_MODE7)     /* lcd_data8.gpio2[14] */
-                       0xc4 (PIN_OUTPUT | MUX_MODE7)           /* lcd_data9.gpio2[15] */
-                       0x150 (PIN_INPUT | MUX_MODE1)           /* spi0_sclk.uart2_rxd */
-                       0x154 (PIN_OUTPUT | MUX_MODE1)          /* spi0_d0.uart2_txd */
+                       AM33XX_IOPAD(0x8c0, PIN_INPUT_PULLUP | MUX_MODE7)       /* lcd_data8.gpio2[14] */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE7)             /* lcd_data9.gpio2[15] */
+                       AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1)              /* spi0_sclk.uart2_rxd */
+                       AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1)             /* spi0_d0.uart2_txd */
                >;
        };
 
        uart3_pins: uart3_pins {
                pinctrl-single,pins = <
-                       0xc8 (PIN_INPUT_PULLUP | MUX_MODE6)     /* lcd_data10.uart3_ctsn */
-                       0xcc (PIN_OUTPUT | MUX_MODE6)           /* lcd_data11.uart3_rtsn */
-                       0x160 (PIN_INPUT | MUX_MODE1)           /* spi0_cs1.uart3_rxd */
-                       0x164 (PIN_OUTPUT | MUX_MODE1)          /* ecap0_in_pwm0_out.uart3_txd */
+                       AM33XX_IOPAD(0x8c8, PIN_INPUT_PULLUP | MUX_MODE6)       /* lcd_data10.uart3_ctsn */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE6)             /* lcd_data11.uart3_rtsn */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE1)              /* spi0_cs1.uart3_rxd */
+                       AM33XX_IOPAD(0x964, PIN_OUTPUT | MUX_MODE1)             /* ecap0_in_pwm0_out.uart3_txd */
                >;
        };
 
        uart4_pins: uart4_pins {
                pinctrl-single,pins = <
-                       0xd0 (PIN_INPUT_PULLUP | MUX_MODE6)     /* lcd_data12.uart4_ctsn */
-                       0xd4 (PIN_OUTPUT | MUX_MODE6)           /* lcd_data13.uart4_rtsn */
-                       0x168 (PIN_INPUT | MUX_MODE1)           /* uart0_ctsn.uart4_rxd */
-                       0x16c (PIN_OUTPUT | MUX_MODE1)          /* uart0_rtsn.uart4_txd */
+                       AM33XX_IOPAD(0x8d0, PIN_INPUT_PULLUP | MUX_MODE6)       /* lcd_data12.uart4_ctsn */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE6)             /* lcd_data13.uart4_rtsn */
+                       AM33XX_IOPAD(0x968, PIN_INPUT | MUX_MODE1)              /* uart0_ctsn.uart4_rxd */
+                       AM33XX_IOPAD(0x96c, PIN_OUTPUT | MUX_MODE1)             /* uart0_rtsn.uart4_txd */
                >;
        };
 
        uart5_pins: uart5_pins {
                pinctrl-single,pins = <
-                       0xd8 (PIN_INPUT | MUX_MODE4)            /* lcd_data14.uart5_rxd */
-                       0x144 (PIN_OUTPUT | MUX_MODE3)          /* rmiii1_refclk.uart5_txd */
+                       AM33XX_IOPAD(0x8d8, PIN_INPUT | MUX_MODE4)              /* lcd_data14.uart5_rxd */
+                       AM33XX_IOPAD(0x944, PIN_OUTPUT | MUX_MODE3)             /* rmiii1_refclk.uart5_txd */
                >;
        };
 
        mmc1_pins: mmc1_pins {
                pinctrl-single,pins = <
-                       0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat0.mmc0_dat0 */
-                       0xf4 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat1.mmc0_dat1 */
-                       0xf8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat2.mmc0_dat2 */
-                       0xfc (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat3.mmc0_dat3 */
-                       0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_cmd.mmc0_cmd */
-                       0x1e8 (PIN_INPUT_PULLUP | MUX_MODE7)    /* emu1.gpio3[8] */
-                       0x1a0 (PIN_INPUT_PULLUP | MUX_MODE7)    /* mcasp0_aclkr.gpio3[18] */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0.mmc0_dat0 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1.mmc0_dat1 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2.mmc0_dat2 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3.mmc0_dat3 */
+                       AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk.mmc0_clk */
+                       AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd.mmc0_cmd */
+                       AM33XX_IOPAD(0x9e8, PIN_INPUT_PULLUP | MUX_MODE7)       /* emu1.gpio3[8] */
+                       AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7)       /* mcasp0_aclkr.gpio3[18] */
                >;
        };
 };
        wp-gpios = <&gpio3 18 0>;
 };
 
-#include "tps65217.dtsi"
-
 &tps {
+       compatible = "ti,tps65217";
+
        regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
                dcdc1_reg: regulator@0 {
+                       reg = <0>;
                        /* +1.5V voltage with Â±4% tolerance */
                        regulator-min-microvolt = <1450000>;
                        regulator-max-microvolt = <1550000>;
                };
 
                dcdc2_reg: regulator@1 {
+                       reg = <1>;
                        /* VDD_MPU voltage limits 0.95V - 1.1V with Â±4% tolerance */
                        regulator-name = "vdd_mpu";
                        regulator-min-microvolt = <915000>;
                };
 
                dcdc3_reg: regulator@2 {
+                       reg = <2>;
                        /* VDD_CORE voltage limits 0.95V - 1.1V with Â±4% tolerance */
                        regulator-name = "vdd_core";
                        regulator-min-microvolt = <915000>;
                };
 
                ldo1_reg: regulator@3 {
+                       reg = <3>;
                        /* +1.8V voltage with Â±4% tolerance */
                        regulator-min-microvolt = <1750000>;
                        regulator-max-microvolt = <1870000>;
                };
 
                ldo2_reg: regulator@4 {
+                       reg = <4>;
                        /* +3.3V voltage with Â±4% tolerance */
                        regulator-min-microvolt = <3175000>;
                        regulator-max-microvolt = <3430000>;
                };
 
                ldo3_reg: regulator@5 {
+                       reg = <5>;
                        /* +1.8V voltage with Â±4% tolerance */
                        regulator-min-microvolt = <1750000>;
                        regulator-max-microvolt = <1870000>;
                };
 
                ldo4_reg: regulator@6 {
+                       reg = <6>;
                        /* +3.3V voltage with Â±4% tolerance */
                        regulator-min-microvolt = <3175000>;
                        regulator-max-microvolt = <3430000>;
index 7106114c74647cd2e76499a6f5654ddf5f98f73d..471a3a70ea1f173ce15190f77443e6860e15c328 100644 (file)
 &am33xx_pinmux {
        i2c0_pins: pinmux_i2c0 {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                >;
        };
        i2c1_pins: pinmux_i2c1 {
                pinctrl-single,pins = <
-                       0x10C (PIN_INPUT_PULLUP | MUX_MODE3)    /* mii1_crs,i2c1_sda */
-                       0x110 (PIN_INPUT_PULLUP | MUX_MODE3)    /* mii1_rxerr,i2c1_scl */
+                       AM33XX_IOPAD(0x90C, PIN_INPUT_PULLUP | MUX_MODE3)       /* mii1_crs,i2c1_sda */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE3)       /* mii1_rxerr,i2c1_scl */
                >;
        };
 };
 &am33xx_pinmux {
        accel_pins: pinmux_accel {
                pinctrl-single,pins = <
-                       0x98 (PIN_INPUT | MUX_MODE7)   /* gpmc_wen.gpio2_4 */
+                       AM33XX_IOPAD(0x898, PIN_INPUT | MUX_MODE7)   /* gpmc_wen.gpio2_4 */
                >;
        };
 };
 &am33xx_pinmux {
        audio_pins: pinmux_audio {
                pinctrl-single,pins = <
-                       0x1AC (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_ahcklx.mcasp0_ahclkx */
-                       0x194 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_fsx.mcasp0_fsx */
-                       0x190 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_aclkx.mcasp0_aclkx */
-                       0x198 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_axr0.mcasp0_axr0 */
-                       0x1A8 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_axr1.mcasp0_axr1 */
-                       0x40 (PIN_OUTPUT | MUX_MODE7)   /* gpmc_a0.gpio1_16 */
+                       AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* mcasp0_ahcklx.mcasp0_ahclkx */
+                       AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* mcasp0_fsx.mcasp0_fsx */
+                       AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* mcasp0_aclkx.mcasp0_aclkx */
+                       AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* mcasp0_axr0.mcasp0_axr0 */
+                       AM33XX_IOPAD(0x9a8, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* mcasp0_axr1.mcasp0_axr1 */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE7)     /* gpmc_a0.gpio1_16 */
                >;
        };
 };
 &am33xx_pinmux {
        lcd_pins: pinmux_lcd {
                pinctrl-single,pins = <
-                       0xa0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data0.lcd_data0 */
-                       0xa4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data1.lcd_data1 */
-                       0xa8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data2.lcd_data2 */
-                       0xac (PIN_OUTPUT | MUX_MODE0)   /* lcd_data3.lcd_data3 */
-                       0xb0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data4.lcd_data4 */
-                       0xb4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data5.lcd_data5 */
-                       0xb8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data6.lcd_data6 */
-                       0xbc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data7.lcd_data7 */
-                       0xc0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data8.lcd_data8 */
-                       0xc4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data9.lcd_data9 */
-                       0xc8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data10.lcd_data10 */
-                       0xcc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data11.lcd_data11 */
-                       0xd0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data12.lcd_data12 */
-                       0xd4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data13.lcd_data13 */
-                       0xd8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_data14.lcd_data14 */
-                       0xdc (PIN_OUTPUT | MUX_MODE0)   /* lcd_data15.lcd_data15 */
-                       0x20 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad8.lcd_data16 */
-                       0x24 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad9.lcd_data17 */
-                       0x28 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad10.lcd_data18 */
-                       0x2c (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad11.lcd_data19 */
-                       0x30 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad12.lcd_data20 */
-                       0x34 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad13.lcd_data21 */
-                       0x38 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad14.lcd_data22 */
-                       0x3c (PIN_OUTPUT | MUX_MODE1)   /* gpmc_ad15.lcd_data23 */
-                       0xe0 (PIN_OUTPUT | MUX_MODE0)   /* lcd_vsync.lcd_vsync */
-                       0xe4 (PIN_OUTPUT | MUX_MODE0)   /* lcd_hsync.lcd_hsync */
-                       0xe8 (PIN_OUTPUT | MUX_MODE0)   /* lcd_pclk.lcd_pclk */
-                       0xec (PIN_OUTPUT | MUX_MODE0)   /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)     /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)     /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)     /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)     /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)     /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad8.lcd_data16 */
+                       AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad9.lcd_data17 */
+                       AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad10.lcd_data18 */
+                       AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad11.lcd_data19 */
+                       AM33XX_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad12.lcd_data20 */
+                       AM33XX_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad13.lcd_data21 */
+                       AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad14.lcd_data22 */
+                       AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)     /* gpmc_ad15.lcd_data23 */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0)     /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0)     /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0)     /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0)     /* lcd_ac_bias_en.lcd_ac_bias_en */
                        /* Display Enable */
-                       0x6c (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a11.gpio1_27 */
+                       AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_a11.gpio1_27 */
                >;
        };
 };
 &am33xx_pinmux {
        ethernet_pins: pinmux_ethernet {
                pinctrl-single,pins = <
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                       0x118 (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxdv.rgmii1_rctl */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                       0x12c (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_txclk.rgmii1_tclk */
-                       0x130 (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxclk.rgmii1_rclk */
-                       0x134 (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxd3.rgmii1_rxd3 */
-                       0x138 (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxd2.rgmii1_rxd2 */
-                       0x13c (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxd1.rgmii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLUP | MUX_MODE2)    /* mii1_rxd0.rgmii1_rxd0 */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_tctl */
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxdv.rgmii1_rctl */
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd3.rgmii1_td3 */
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd2.rgmii1_td2 */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_td1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_td0 */
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_txclk.rgmii1_tclk */
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxclk.rgmii1_rclk */
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxd3.rgmii1_rxd3 */
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxd2.rgmii1_rxd2 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxd1.rgmii1_rxd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE2)       /* mii1_rxd0.rgmii1_rxd0 */
                        /* ethernet interrupt */
-                       0x144 (PIN_INPUT_PULLUP | MUX_MODE7)    /* rmii2_refclk.gpio0_29 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLUP | MUX_MODE7)       /* rmii2_refclk.gpio0_29 */
                        /* ethernet PHY nReset */
-                       0x108 (PIN_OUTPUT_PULLUP | MUX_MODE7)   /* mii1_col.gpio3_0 */
+                       AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* mii1_col.gpio3_0 */
                >;
        };
 
        mdio_pins: pinmux_mdio {
                pinctrl-single,pins = <
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 };
        ti,non-removable;
 };
 
-&edma {
-       /* Map eDMA MMC2 Events from Crossbar */
-       ti,edma-xbar-event-map = /bits/ 16 <1 12
-                                            2 13>;
-};
-
-
 &mmc3 {
        /* Wifi & Bluetooth on MMC #3 */
        status = "okay";
        vmmmc-supply = <&v3v3c_reg>;
        bus-width = <4>;
        ti,non-removable;
-       dmas = <&edma 12
-               &edma 13>;
+       dmas = <&edma_xbar 12 0 1
+               &edma_xbar 13 0 2>;
        dma-names = "tx", "rx";
 };
 
 &am33xx_pinmux {
        sd_pins: pinmux_sd_card {
                pinctrl-single,pins = <
-                       0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat0.mmc0_dat0 */
-                       0xf4 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat1.mmc0_dat1 */
-                       0xf8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat2.mmc0_dat2 */
-                       0xfc (PIN_INPUT_PULLUP | MUX_MODE0)     /* mmc0_dat3.mmc0_dat3 */
-                       0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_cmd.mmc0_cmd */
-                       0x160 (PIN_INPUT | MUX_MODE7)           /* spi0_cs1.gpio0_6 */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0.mmc0_dat0 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1.mmc0_dat1 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2.mmc0_dat2 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3.mmc0_dat3 */
+                       AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk.mmc0_clk */
+                       AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd.mmc0_cmd */
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7)              /* spi0_cs1.gpio0_6 */
                >;
        };
        emmc_pins: pinmux_emmc {
                pinctrl-single,pins = <
-                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2)     /* gpmc_csn1.mmc1_clk */
-                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2)     /* gpmc_csn2.mmc1_cmd */
-                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad0.mmc1_dat0 */
-                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad1.mmc1_dat1 */
-                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad2.mmc1_dat2 */
-                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad3.mmc1_dat3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad4.mmc1_dat4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad5.mmc1_dat5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad6.mmc1_dat6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE1)     /* gpmc_ad7.mmc1_dat7 */
+                       AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2)       /* gpmc_csn1.mmc1_clk */
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)       /* gpmc_csn2.mmc1_cmd */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad0.mmc1_dat0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad1.mmc1_dat1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad2.mmc1_dat2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad3.mmc1_dat3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad4.mmc1_dat4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad5.mmc1_dat5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad6.mmc1_dat6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1)       /* gpmc_ad7.mmc1_dat7 */
                        /* EMMC nReset */
-                       0x74 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_wpn.gpio0_31 */
+                       AM33XX_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_wpn.gpio0_31 */
                >;
        };
        wireless_pins: pinmux_wireless {
                pinctrl-single,pins = <
-                       0x44 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a1.mmc2_dat0 */
-                       0x48 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a2.mmc2_dat1 */
-                       0x4c (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_a3.mmc2_dat2 */
-                       0x78 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_ben1.mmc2_dat3 */
-                       0x88 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_csn3.mmc2_cmd */
-                       0x8c (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_clk.mmc1_clk */
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a1.mmc2_dat0 */
+                       AM33XX_IOPAD(0x848, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a2.mmc2_dat1 */
+                       AM33XX_IOPAD(0x84c, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_a3.mmc2_dat2 */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_ben1.mmc2_dat3 */
+                       AM33XX_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_csn3.mmc2_cmd */
+                       AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_clk.mmc1_clk */
                        /* WLAN nReset */
-                       0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
+                       AM33XX_IOPAD(0x860, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_a8.gpio1_24 */
                        /* WLAN nPower down */
-                       0x70 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_wait0.gpio0_30 */
+                       AM33XX_IOPAD(0x870, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_wait0.gpio0_30 */
                        /* 32kHz Clock */
-                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+                       AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* xdma_event_intr1.clkout2 */
                >;
        };
 };
        vin-supply = <&vbat>;
 };
 
-/include/ "tps65217.dtsi"
-
 &tps {
+       compatible = "ti,tps65217";
+
        backlight {
                isel = <1>; /* ISET1 */
                fdim = <200>; /* TPS65217_BL_FDIM_200HZ */
        };
 
        regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
                dcdc1_reg: regulator@0 {
+                       reg = <0>;
                        /* VDD_1V8 system supply */
                        regulator-always-on;
                };
 
                dcdc2_reg: regulator@1 {
+                       reg = <1>;
                        /* VDD_CORE voltage limits 0.95V - 1.26V with +/-4% tolerance */
                        regulator-name = "vdd_core";
                        regulator-min-microvolt = <925000>;
                };
 
                dcdc3_reg: regulator@2 {
+                       reg = <2>;
                        /* VDD_MPU voltage limits 0.95V - 1.1V with +/-4% tolerance */
                        regulator-name = "vdd_mpu";
                        regulator-min-microvolt = <925000>;
                };
 
                ldo1_reg: regulator@3 {
+                       reg = <3>;
                        /* VRTC 1.8V always-on supply */
                        regulator-name = "vrtc,vdds";
                        regulator-always-on;
                };
 
                ldo2_reg: regulator@4 {
+                       reg = <4>;
                        /* 3.3V rail */
                        regulator-name = "vdd_3v3aux";
                        regulator-always-on;
                };
 
                ldo3_reg: regulator@5 {
+                       reg = <5>;
                        /* VDD_3V3A 3.3V rail */
                        regulator-name = "vdd_3v3a";
                        regulator-min-microvolt = <3300000>;
                };
 
                ldo4_reg: regulator@6 {
+                       reg = <6>;
                        /* VDD_3V3B 3.3V rail */
                        regulator-name = "vdd_3v3b";
                        regulator-always-on;
 &am33xx_pinmux {
        spi0_pins: pinmux_spi0 {
                pinctrl-single,pins = <
-                       0x150 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */
-                       0x15C (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
-                       0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
-                       0x158 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */
+                       AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */
+                       AM33XX_IOPAD(0x95C, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
+                       AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
+                       AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */
                >;
        };
 };
 &am33xx_pinmux {
        uart0_pins: pinmux_uart0 {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
                >;
        };
        uart1_pins: pinmux_uart1 {
                pinctrl-single,pins = <
-                       0x178 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_ctsn.uart1_ctsn */
-                       0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */
-                       0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
-                       0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
+                       AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_ctsn.uart1_ctsn */
+                       AM33XX_IOPAD(0x97C, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_rtsn.uart1_rtsn */
+                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
                >;
        };
 };
        usb_pins: pinmux_usb {
                pinctrl-single,pins = <
                        /* USB0 Over-Current (active low) */
-                       0x64 (PIN_INPUT | MUX_MODE7)    /* gpmc_a9.gpio1_25 */
+                       AM33XX_IOPAD(0x864, PIN_INPUT | MUX_MODE7)      /* gpmc_a9.gpio1_25 */
                        /* USB1 Over-Current (active low) */
-                       0x68 (PIN_INPUT | MUX_MODE7)    /* gpmc_a10.gpio1_26 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT | MUX_MODE7)      /* gpmc_a10.gpio1_26 */
                >;
        };
 };
                label = "home";
                linux,code = <KEY_HOME>;
                gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
-               gpio-key,wakeup;
+               wakeup-source;
        };
 
        button@1 {
                label = "menu";
                linux,code = <KEY_MENU>;
                gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
-               gpio-key,wakeup;
+               wakeup-source;
        };
 
        buttons@2 {
                label = "power";
                linux,code = <KEY_POWER>;
                gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
-               gpio-key,wakeup;
+               wakeup-source;
        };
 };
 
 &am33xx_pinmux {
        user_leds_pins: pinmux_user_leds {
                pinctrl-single,pins = <
-                       0x50 (PIN_OUTPUT | MUX_MODE7)   /* gpmc_a4.gpio1_20 */
-                       0x54 (PIN_OUTPUT | MUX_MODE7)   /* gpmc_a5.gpio1_21 */
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE7)     /* gpmc_a4.gpio1_20 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7)     /* gpmc_a5.gpio1_21 */
                >;
        };
 
        user_buttons_pins: pinmux_user_buttons {
                pinctrl-single,pins = <
-                       0x58 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_a6.gpio1_22 */
-                       0x5C (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_a7.gpio1_21 */
-                       0x164 (PIN_INPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio0_7 */
+                       AM33XX_IOPAD(0x858, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_a6.gpio1_22 */
+                       AM33XX_IOPAD(0x85C, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_a7.gpio1_21 */
+                       AM33XX_IOPAD(0x964, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_a8.gpio0_7 */
                >;
        };
 };
index 2f43e458ea4ad834889920669b26f970d03219d5..c20ae6c6f6c7cf01ce54ac04d28e20ab40fdac20 100644 (file)
 &am33xx_pinmux {
        ethernet0_pins: pinmux_ethernet0 {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_crs.rmii1_crs_dv */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxerr.rmii1_rxerr */
-                       0x114 (PIN_OUTPUT | MUX_MODE1)          /* mii1_txen.rmii1_txen */
-                       0x124 (PIN_OUTPUT | MUX_MODE1)          /* mii1_txd1.rmii1_txd1 */
-                       0x128 (PIN_OUTPUT | MUX_MODE1)          /* mii1_txd0.rmii1_txd0 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxd1.rmii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxd0.rmii1_rxd0 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rmii1_refclk.rmii1_refclk */
+                       AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_crs.rmii1_crs_dv */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxerr.rmii1_rxerr */
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT | MUX_MODE1)             /* mii1_txen.rmii1_txen */
+                       AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1)             /* mii1_txd1.rmii1_txd1 */
+                       AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1)             /* mii1_txd0.rmii1_txd0 */
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd1.rmii1_rxd1 */
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd0.rmii1_rxd0 */
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* rmii1_refclk.rmii1_refclk */
                >;
        };
 
        mdio_pins: pinmux_mdio {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 };
 &am33xx_pinmux {
        i2c0_pins: pinmux_i2c0 {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT | MUX_MODE0)   /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT | MUX_MODE0)   /* i2c0_scl.i2c0_scl */
+                       AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0)      /* i2c0_sda.i2c0_sda */
+                       AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0)      /* i2c0_scl.i2c0_scl */
                >;
        };
 };
 &am33xx_pinmux {
                nandflash_pins: pinmux_nandflash {
                        pinctrl-single,pins = <
-                       0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
-                       0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
-                       0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
-                       0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0 */
-                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad0.gpmc_ad0 */
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad1.gpmc_ad1 */
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad2.gpmc_ad2 */
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad3.gpmc_ad3 */
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad4.gpmc_ad4 */
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad5.gpmc_ad5 */
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad6.gpmc_ad6 */
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_ad7.gpmc_ad7 */
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0 */
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_be0n_cle.gpmc_be0n_cle */
                >;
        };
 };
 &am33xx_pinmux {
        spi0_pins: pinmux_spi0 {
                pinctrl-single,pins = <
-                       0x150 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* spi0_clk.spi0_clk */
-                       0x154 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* spi0_d0.spi0_d0 */
-                       0x158 (PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_d1.spi0_d1 */
-                       0x15c (PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_cs0.spi0_cs0 */
+                       AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* spi0_clk.spi0_clk */
+                       AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* spi0_d0.spi0_d0 */
+                       AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)       /* spi0_d1.spi0_d1 */
+                       AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)       /* spi0_cs0.spi0_cs0 */
                >;
        };
 };
diff --git a/arch/arm/boot/dts/am335x-sbc-t335.dts b/arch/arm/boot/dts/am335x-sbc-t335.dts
new file mode 100644 (file)
index 0000000..917d7cc
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * am335x-sbc-t335.dts - Device Tree file for Compulab SBC-T335
+ *
+ * Copyright (C) 2014 - 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+
+#include "am335x-cm-t335.dts"
+
+/ {
+       model = "CompuLab CM-T335 on SB-T335";
+       compatible = "compulab,sbc-t335", "compulab,cm-t335", "ti,am33xx";
+
+       /* DRM display driver */
+       panel {
+               compatible = "ti,tilcdc,panel";
+               status = "okay";
+               pinctrl-names = "default", "sleep";
+               pinctrl-0 = <&lcd_pins_default>;
+               pinctrl-1 = <&lcd_pins_sleep>;
+
+               panel-info {
+                       ac-bias           = <255>;
+                       ac-bias-intrpt    = <0>;
+                       dma-burst-sz      = <16>;
+                       bpp               = <32>;
+                       fdd               = <0x80>;
+                       sync-edge         = <0>;
+                       sync-ctrl         = <1>;
+                       raster-order      = <0>;
+                       fifo-th           = <0>;
+               };
+               display-timings {
+                       /* Timing selection performed by U-Boot */
+                       timing0: lcd {/* 800x480p62 */
+                               clock-frequency = <30000000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hfront-porch = <39>;
+                               hback-porch = <39>;
+                               hsync-len = <47>;
+                               vback-porch = <29>;
+                               vfront-porch = <13>;
+                               vsync-len = <2>;
+                               hsync-active = <1>;
+                               vsync-active = <1>;
+                       };
+                       timing1: dvi { /* 1024x768p60 */
+                               clock-frequency = <65000000>;
+                               hactive = <1024>;
+                               hfront-porch = <24>;
+                               hback-porch = <160>;
+                               hsync-len = <136>;
+                               vactive = <768>;
+                               vfront-porch = <3>;
+                               vback-porch = <29>;
+                               vsync-len = <6>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                       };
+               };
+       };
+};
+
+&am33xx_pinmux {
+       /* Display */
+       lcd_pins_default: lcd_pins_default {
+               pinctrl-single,pins = <
+                       /* gpmc_ad8.lcd_data23 */
+                       AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad9.lcd_data22 */
+                       AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad10.lcd_data21 */
+                       AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad11.lcd_data20 */
+                       AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad12.lcd_data19 */
+                       AM33XX_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad13.lcd_data18 */
+                       AM33XX_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad14.lcd_data17 */
+                       AM33XX_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)
+                       /* gpmc_ad15.lcd_data16 */
+                       AM33XX_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)
+                       /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0)
+                       /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0)
+               >;
+       };
+
+       lcd_pins_sleep: lcd_pins_sleep {
+               pinctrl-single,pins = <
+                       /* gpmc_ad8.lcd_data23 */
+                       AM33XX_IOPAD(0x820, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad9.lcd_data22 */
+                       AM33XX_IOPAD(0x824, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad10.lcd_data21 */
+                       AM33XX_IOPAD(0x828, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad11.lcd_data20 */
+                       AM33XX_IOPAD(0x82c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad12.lcd_data19 */
+                       AM33XX_IOPAD(0x830, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad13.lcd_data18 */
+                       AM33XX_IOPAD(0x834, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad14.lcd_data17 */
+                       AM33XX_IOPAD(0x838, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* gpmc_ad15.lcd_data16 */
+                       AM33XX_IOPAD(0x83c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* lcd_data0.lcd_data0 */
+                       AM33XX_IOPAD(0x8a0, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data1.lcd_data1 */
+                       AM33XX_IOPAD(0x8a4, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data2.lcd_data2 */
+                       AM33XX_IOPAD(0x8a8, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data3.lcd_data3 */
+                       AM33XX_IOPAD(0x8ac, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data4.lcd_data4 */
+                       AM33XX_IOPAD(0x8b0, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data5.lcd_data5 */
+                       AM33XX_IOPAD(0x8b4, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data6.lcd_data6 */
+                       AM33XX_IOPAD(0x8b8, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data7.lcd_data7 */
+                       AM33XX_IOPAD(0x8bc, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data8.lcd_data8 */
+                       AM33XX_IOPAD(0x8c0, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data9.lcd_data9 */
+                       AM33XX_IOPAD(0x8c4, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data10.lcd_data10 */
+                       AM33XX_IOPAD(0x8c8, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data11.lcd_data11 */
+                       AM33XX_IOPAD(0x8cc, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data12.lcd_data12 */
+                       AM33XX_IOPAD(0x8d0, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data13.lcd_data13 */
+                       AM33XX_IOPAD(0x8d4, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data14.lcd_data14 */
+                       AM33XX_IOPAD(0x8d8, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_data15.lcd_data15 */
+                       AM33XX_IOPAD(0x8dc, PULL_DISABLE | MUX_MODE7)
+                       /* lcd_vsync.lcd_vsync */
+                       AM33XX_IOPAD(0x8e0, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* lcd_hsync.lcd_hsync */
+                       AM33XX_IOPAD(0x8e4, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* lcd_pclk.lcd_pclk */
+                       AM33XX_IOPAD(0x8e8, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       /* lcd_ac_bias_en.lcd_ac_bias_en */
+                       AM33XX_IOPAD(0x8ec, PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+};
+
+&i2c0 {
+       /* GPIO extender */
+       gpio_ext: pca9555@26 {
+               compatible = "nxp,pca9555";
+               pinctrl-names = "default";
+               gpio-controller;
+               #gpio-cells = <2>;
+               reg = <0x26>;
+               dvi_ena {
+                       gpio-hog;
+                       gpios = <13 GPIO_ACTIVE_HIGH>;
+                       output-high;
+                       line-name = "dvi-enable";
+               };
+               lcd_ena {
+                       gpio-hog;
+                       gpios = <11 GPIO_ACTIVE_HIGH>;
+                       output-high;
+                       line-name = "lcd-enable";
+               };
+       };
+};
+
+/* Display */
+&lcdc {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-shc.dts b/arch/arm/boot/dts/am335x-shc.dts
new file mode 100644 (file)
index 0000000..1b5b044
--- /dev/null
@@ -0,0 +1,577 @@
+/*
+ * support for the bosch am335x based shc c3 board
+ *
+ * Copyright, C) 2015 Heiko Schocher <hs@denx.de>
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Bosch SHC";
+       compatible = "ti,am335x-shc", "ti,am335x-bone", "ti,am33xx";
+
+       aliases {
+               mmcblk0 = &mmc1;
+               mmcblk1 = &mmc2;
+       };
+
+       cpus {
+               cpu@0 {
+                       /*
+                        * To consider voltage drop between PMIC and SoC,
+                        * tolerance value is reduced to 2% from 4% and
+                        * voltage value is increased as a precaution.
+                        */
+                       operating-points = <
+                               /* kHz    uV */
+                               594000  1225000
+                               294000  1125000
+                       >;
+                       voltage-tolerance = <2>; /* 2 percentage */
+                       cpu0-supply = <&dcdc2_reg>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               back_button {
+                       label = "Back Button";
+                       gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_BACK>;
+                       debounce-interval = <1000>;
+                       gpio-key,wakeup;
+               };
+
+               front_button {
+                       label = "Front Button";
+                       gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_FRONT>;
+                       debounce-interval = <1000>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       leds {
+               pinctrl-names = "default";
+               pinctrl-0 = <&user_leds_s0>;
+
+               compatible = "gpio-leds";
+
+               led@1 {
+                       label = "shc:power:red";
+                       gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               led@2 {
+                       label = "shc:power:bl";
+                       gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "timer";
+                       default-state = "on";
+               };
+
+               led@3 {
+                       label = "shc:lan:red";
+                       gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               led@4 {
+                       label = "shc:lan:bl";
+                       gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               led@5 {
+                       label = "shc:cloud:red";
+                       gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               led@6 {
+                       label = "shc:cloud:bl";
+                       gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x20000000>; /* 512 MB */
+       };
+
+       vmmcsd_fixed: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmcsd_fixed";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+};
+
+&aes {
+       status = "okay";
+};
+
+&cppi41dma  {
+       status = "okay";
+};
+
+&davinci_mdio {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&davinci_mdio_default>;
+       pinctrl-1 = <&davinci_mdio_sleep>;
+       status = "okay";
+
+       ethernetphy0: ethernet-phy@0 {
+               reg = <0>;
+               smsc,disable-energy-detect;
+       };
+};
+
+&epwmss1 {
+       status = "okay";
+
+       ehrpwm1: ehrpwm@48302200 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&ehrpwm1_pins>;
+               status = "okay";
+       };
+};
+
+&gpio1 {
+       hmtc_rst {
+               gpio-hog;
+               gpios = <24 GPIO_ACTIVE_LOW>;
+               output-high;
+               line-name = "homematic_reset";
+       };
+
+       hmtc_prog {
+               gpio-hog;
+               gpios = <27 GPIO_ACTIVE_LOW>;
+               output-high;
+               line-name = "homematic_program";
+       };
+};
+
+&gpio3 {
+       zgb_rst {
+               gpio-hog;
+               gpios = <18 GPIO_ACTIVE_LOW>;
+               output-low;
+               line-name = "zigbee_reset";
+       };
+
+       zgb_boot {
+               gpio-hog;
+               gpios = <19 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "zigbee_boot";
+       };
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       status = "okay";
+       clock-frequency = <400000>;
+
+       tps: tps@24 {
+               reg = <0x24>;
+       };
+
+       at24@50 {
+               compatible = "at24,24c32";
+               pagesize = <32>;
+               reg = <0x50>;
+       };
+
+       pcf8563@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&mac {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&cpsw_default>;
+       pinctrl-1 = <&cpsw_sleep>;
+       status = "okay";
+       slaves = <1>;
+       cpsw_emac0: slave@4a100200  {
+               phy_id = <&davinci_mdio>, <0>;
+               phy-mode = "mii";
+               phy-handle = <&ethernetphy0>;
+       };
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       bus-width = <0x4>;
+       cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+       cd-inverted;
+       max-frequency = <26000000>;
+       vmmc-supply = <&vmmcsd_fixed>;
+       status = "okay";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emmc_pins>;
+       bus-width = <8>;
+       max-frequency = <26000000>;
+       sd-uhs-sdr25;
+       vmmc-supply = <&vmmcsd_fixed>;
+       status = "okay";
+};
+
+&mmc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_pins>;
+       bus-width = <4>;
+       cap-power-off-card;
+       max-frequency = <26000000>;
+       sd-uhs-sdr25;
+       vmmc-supply = <&vmmcsd_fixed>;
+       status = "okay";
+};
+
+&rtc {
+       ti,no-init;
+};
+
+&sham {
+       status = "okay";
+};
+
+&tps {
+       compatible = "ti,tps65217";
+       ti,pmic-shutdown-controller;
+
+       regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               dcdc1_reg: regulator@0 {
+                       reg = <0>;
+                       regulator-name = "vdds_dpr";
+                       regulator-compatible = "dcdc1";
+                       regulator-min-microvolt = <1300000>;
+                       regulator-max-microvolt = <1450000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc2_reg: regulator@1 {
+                       reg = <1>;
+                       /*
+                        * VDD_MPU voltage limits 0.95V - 1.26V with
+                        * +/-4% tolerance
+                        */
+                       regulator-compatible = "dcdc2";
+                       regulator-name = "vdd_mpu";
+                       regulator-min-microvolt = <925000>;
+                       regulator-max-microvolt = <1375000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+                       regulator-ramp-delay = <70000>;
+               };
+
+               dcdc3_reg: regulator@2 {
+                       reg = <2>;
+                       /*
+                        * VDD_CORE voltage limits 0.95V - 1.1V with
+                        * +/-4% tolerance
+                        */
+                       regulator-name = "vdd_core";
+                       regulator-compatible = "dcdc3";
+                       regulator-min-microvolt = <925000>;
+                       regulator-max-microvolt = <1125000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               ldo1_reg: regulator@3 {
+                       reg = <3>;
+                       regulator-name = "vio,vrtc,vdds";
+                       regulator-compatible = "ldo1";
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+
+               ldo2_reg: regulator@4 {
+                       reg = <4>;
+                       regulator-name = "vdd_3v3aux";
+                       regulator-compatible = "ldo2";
+                       regulator-min-microvolt = <900000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               ldo3_reg: regulator@5 {
+                       reg = <5>;
+                       regulator-name = "vdd_1v8";
+                       regulator-compatible = "ldo3";
+                       regulator-min-microvolt = <900000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+
+               ldo4_reg: regulator@6 {
+                       reg = <6>;
+                       regulator-name = "vdd_3v3a";
+                       regulator-compatible = "ldo4";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart4_pins>;
+       status = "okay";
+};
+
+&usb {
+       status = "okay";
+};
+
+&usb_ctrl_mod {
+       status = "okay";
+};
+
+&usb1_phy {
+       status = "okay";
+};
+
+&usb1 {
+       status = "okay";
+       dr_mode = "host";
+};
+
+&am33xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&clkout2_pin>;
+
+       clkout2_pin: pinmux_clkout2_pin {
+               pinctrl-single,pins = <
+                       /* xdma_event_intr1.clkout2 */
+                       AM33XX_IOPAD(0x9b4, PIN_INPUT | MUX_MODE6)
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE0)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+
+       cpsw_sleep: cpsw_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 reset value */
+                       AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* mdio_data.mdio_data */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
+                       /* mdio_clk.mdio_clk */
+                       AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)
+               >;
+       };
+
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       ehrpwm1_pins: pinmux_ehrpwm1 {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE6) /* gpmc_a3.gpio1_19 */
+               >;
+       };
+
+       emmc_pins: pinmux_emmc_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x880, PIN_INPUT | MUX_MODE2)
+                       AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)
+                       AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1)
+                       AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1)
+               >;
+       };
+
+       i2c0_pins: pinmux_i2c0_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x988, PIN_INPUT | MUX_MODE0)
+                       AM33XX_IOPAD(0x98c, PIN_INPUT | MUX_MODE0)
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE5)
+               >;
+       };
+
+       mmc3_pins: pinmux_mmc3_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x830, PIN_INPUT | MUX_MODE3)
+                       AM33XX_IOPAD(0x834, PIN_INPUT | MUX_MODE3)
+                       AM33XX_IOPAD(0x838, PIN_INPUT | MUX_MODE3)
+                       AM33XX_IOPAD(0x83c, PIN_INPUT | MUX_MODE3)
+                       AM33XX_IOPAD(0x888, PIN_INPUT | MUX_MODE3)
+                       AM33XX_IOPAD(0x88c, PIN_INPUT | MUX_MODE3)
+               >;
+       };
+
+       uart0_pins: pinmux_uart0_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x968, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x96c, PIN_OUTPUT | MUX_MODE0)
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT | MUX_MODE0)
+               >;
+       };
+
+       uart1_pins: pinmux_uart1 {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x978, PIN_INPUT_PULLDOWN | MUX_MODE0)
+                       AM33XX_IOPAD(0x97C, PIN_OUTPUT | MUX_MODE0)
+                       AM33XX_IOPAD(0x980, PIN_INPUT | MUX_MODE0)
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT | MUX_MODE0)
+               >;
+       };
+
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x950, PIN_INPUT | MUX_MODE1)
+                       AM33XX_IOPAD(0x954, PIN_OUTPUT | MUX_MODE1)
+               >;
+       };
+
+       uart4_pins: pinmux_uart4_pins {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE6)
+                       AM33XX_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE6)
+               >;
+       };
+
+       user_leds_s0: user_leds_s0 {
+               pinctrl-single,pins = <
+                       AM33XX_IOPAD(0x820, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x824, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x844, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x85c, PIN_OUTPUT_PULLUP | MUX_MODE7)
+                       AM33XX_IOPAD(0x860, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x864, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x868, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x86c, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x878, PIN_OUTPUT_PULLUP | MUX_MODE7)
+                       AM33XX_IOPAD(0x87c, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x894, PIN_INPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x898, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x958, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x95c, PIN_OUTPUT | MUX_MODE7)
+                       AM33XX_IOPAD(0x964, PIN_OUTPUT_PULLUP | MUX_MODE7)
+                       AM33XX_IOPAD(0x9a0, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x9a4, PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x9a8, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+};
index 3303c281697b017901f103aa96fee5af0a25ef8a..d38edfa53bb9a95df14936af36dc600c55e8e2bc 100644 (file)
        pinctrl-0 = <&uart4_pins>;
 };
 
-#include "tps65217.dtsi"
-
 &tps {
+       compatible = "ti,tps65217";
        ti,pmic-shutdown-controller;
 
        interrupt-parent = <&intc>;
        interrupts = <7>;       /* NNMI */
 
        regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
                dcdc1_reg: regulator@0 {
+                       reg = <0>;
                        /* VDDS_DDR */
                        regulator-min-microvolt = <1500000>;
                        regulator-max-microvolt = <1500000>;
                };
 
                dcdc2_reg: regulator@1 {
+                       reg = <1>;
                        /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
                        regulator-name = "vdd_mpu";
                        regulator-min-microvolt = <925000>;
                };
 
                dcdc3_reg: regulator@2 {
+                       reg = <2>;
                        /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
                        regulator-name = "vdd_core";
                        regulator-min-microvolt = <925000>;
                };
 
                ldo1_reg: regulator@3 {
+                       reg = <3>;
                        /* VRTC / VIO / VDDS*/
                        regulator-always-on;
                        regulator-min-microvolt = <1800000>;
                };
 
                ldo2_reg: regulator@4 {
+                       reg = <4>;
                        /* VDD_3V3AUX */
                        regulator-always-on;
                        regulator-min-microvolt = <3300000>;
                };
 
                ldo3_reg: regulator@5 {
+                       reg = <5>;
                        /* VDD_1V8 */
                        regulator-min-microvolt = <1800000>;
                        regulator-max-microvolt = <1800000>;
                };
 
                ldo4_reg: regulator@6 {
+                       reg = <6>;
                        /* VDD_3V3A */
                        regulator-min-microvolt = <3300000>;
                        regulator-max-microvolt = <3300000>;
index 2cecb3951e1bbae11e3fb22fea9bc2c95613fb7d..282f6d4b27bce4a3308e9ca6d5666e60de1c00ca 100644 (file)
@@ -28,8 +28,8 @@
 &am33xx_pinmux {
        dcan1_pins: pinmux_dcan1 {
                pinctrl-single,pins = <
-                       0x168 (PIN_OUTPUT_PULLUP | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
-                       0x16c (PIN_INPUT_PULLUP | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
+                       AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLUP | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
+                       AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
                >;
        };
 };
 &am33xx_pinmux {
        ethernet1_pins: pinmux_ethernet1 {
                pinctrl-single,pins = <
-                       0x40 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_a0.mii2_txen */
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a1.mii2_rxdv */
-                       0x48 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_a2.mii2_txd3 */
-                       0x4c (PIN_OUTPUT | MUX_MODE1)           /* gpmc_a3.mii2_txd2 */
-                       0x50 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_a4.mii2_txd1 */
-                       0x54 (PIN_OUTPUT | MUX_MODE1)           /* gpmc_a5.mii2_txd0 */
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a6.mii2_txclk */
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a7.mii2_rxclk */
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a8.mii2_rxd3 */
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a9.mii2_rxd2 */
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a10.mii2_rxd1 */
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_a11.mii2_rxd0 */
-                       0x74 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_wpn.mii2_rxerr */
-                       0x78 (PIN_INPUT_PULLDOWN | MUX_MODE1)   /* gpmc_ben1.mii2_col */
+                       AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a0.mii2_txen */
+                       AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a1.mii2_rxdv */
+                       AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a2.mii2_txd3 */
+                       AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a3.mii2_txd2 */
+                       AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a4.mii2_txd1 */
+                       AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a5.mii2_txd0 */
+                       AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a6.mii2_txclk */
+                       AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a7.mii2_rxclk */
+                       AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a8.mii2_rxd3 */
+                       AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a9.mii2_rxd2 */
+                       AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a10.mii2_rxd1 */
+                       AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a11.mii2_rxd0 */
+                       AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_wpn.mii2_rxerr */
+                       AM33XX_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_ben1.mii2_col */
                >;
        };
 };
 &am33xx_pinmux {
        mmc1_pins: pinmux_mmc1 {
                pinctrl-single,pins = <
-                       0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat3.mmc0_dat3 */
-                       0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat2.mmc0_dat2 */
-                       0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat1.mmc0_dat1 */
-                       0x0FC (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat0.mmc0_dat0 */
-                       0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_cmd.mmc0_cmd */
-                       0x160 (PIN_INPUT_PULLUP | MUX_MODE7)    /* spi0_cs1.mmc0_sdcd */
+                       AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3.mmc0_dat3 */
+                       AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2.mmc0_dat2 */
+                       AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1.mmc0_dat1 */
+                       AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0.mmc0_dat0 */
+                       AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk.mmc0_clk */
+                       AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd.mmc0_cmd */
+                       AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7)       /* spi0_cs1.mmc0_sdcd */
                >;
        };
 };
 &am33xx_pinmux {
        uart0_pins: pinmux_uart0 {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
-                       0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+                       AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+                       AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
                >;
        };
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                       0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
-                       0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
-                       0x178 (PIN_INPUT | MUX_MODE0)           /* uart1_ctsn.uart1_ctsn */
-                       0x17c (PIN_OUTPUT_PULLDOWN | MUX_MODE0)         /* uart1_rtsn.uart1_rtsn */
+                       AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
+                       AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
+                       AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)              /* uart1_ctsn.uart1_ctsn */
+                       AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_rtsn.uart1_rtsn */
                >;
        };
 };
index d23e2524d694e95512a0ab967c6ef4fd9c1b8314..04885f9f959e21fcffb388940d64be0b6eb32869 100644 (file)
                                        mboxes = <&mailbox &mbox_wkupm3>;
                                };
 
+                               edma_xbar: dma-router@f90 {
+                                       compatible = "ti,am335x-edma-crossbar";
+                                       reg = <0xf90 0x40>;
+                                       #dma-cells = <3>;
+                                       dma-requests = <32>;
+                                       dma-masters = <&edma>;
+                               };
+
                                scm_clockdomains: clockdomains {
                                };
                        };
                };
 
                edma: edma@49000000 {
-                       compatible = "ti,edma3";
-                       ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
-                       reg =   <0x49000000 0x10000>,
-                               <0x44e10f90 0x40>;
+                       compatible = "ti,edma3-tpcc";
+                       ti,hwmods = "tpcc";
+                       reg =   <0x49000000 0x10000>;
+                       reg-names = "edma3_cc";
                        interrupts = <12 13 14>;
-                       #dma-cells = <1>;
+                       interrupt-names = "edma3_ccint", "emda3_mperr",
+                                         "edma3_ccerrint";
+                       dma-requests = <64>;
+                       #dma-cells = <2>;
+
+                       ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>,
+                                  <&edma_tptc2 0>;
+
+                       ti,edma-memcpy-channels = <20 21>;
+               };
+
+               edma_tptc0: tptc@49800000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc0";
+                       reg =   <0x49800000 0x100000>;
+                       interrupts = <112>;
+                       interrupt-names = "edma3_tcerrint";
+               };
+
+               edma_tptc1: tptc@49900000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc1";
+                       reg =   <0x49900000 0x100000>;
+                       interrupts = <113>;
+                       interrupt-names = "edma3_tcerrint";
+               };
+
+               edma_tptc2: tptc@49a00000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc2";
+                       reg =   <0x49a00000 0x100000>;
+                       interrupts = <114>;
+                       interrupt-names = "edma3_tcerrint";
                };
 
                gpio0: gpio@44e07000 {
                        reg = <0x44e09000 0x2000>;
                        interrupts = <72>;
                        status = "disabled";
-                       dmas = <&edma 26>, <&edma 27>;
+                       dmas = <&edma 26 0>, <&edma 27 0>;
                        dma-names = "tx", "rx";
                };
 
                        reg = <0x48022000 0x2000>;
                        interrupts = <73>;
                        status = "disabled";
-                       dmas = <&edma 28>, <&edma 29>;
+                       dmas = <&edma 28 0>, <&edma 29 0>;
                        dma-names = "tx", "rx";
                };
 
                        reg = <0x48024000 0x2000>;
                        interrupts = <74>;
                        status = "disabled";
-                       dmas = <&edma 30>, <&edma 31>;
+                       dmas = <&edma 30 0>, <&edma 31 0>;
                        dma-names = "tx", "rx";
                };
 
                        ti,dual-volt;
                        ti,needs-special-reset;
                        ti,needs-special-hs-handling;
-                       dmas = <&edma 24
-                               &edma 25>;
+                       dmas = <&edma_xbar 24 0 0
+                               &edma_xbar 25 0 0>;
                        dma-names = "tx", "rx";
                        interrupts = <64>;
                        interrupt-parent = <&intc>;
                        compatible = "ti,omap4-hsmmc";
                        ti,hwmods = "mmc2";
                        ti,needs-special-reset;
-                       dmas = <&edma 2
-                               &edma 3>;
+                       dmas = <&edma 2 0
+                               &edma 3 0>;
                        dma-names = "tx", "rx";
                        interrupts = <28>;
                        interrupt-parent = <&intc>;
                        interrupts = <65>;
                        ti,spi-num-cs = <2>;
                        ti,hwmods = "spi0";
-                       dmas = <&edma 16
-                               &edma 17
-                               &edma 18
-                               &edma 19>;
+                       dmas = <&edma 16 0
+                               &edma 17 0
+                               &edma 18 0
+                               &edma 19 0>;
                        dma-names = "tx0", "rx0", "tx1", "rx1";
                        status = "disabled";
                };
                        interrupts = <125>;
                        ti,spi-num-cs = <2>;
                        ti,hwmods = "spi1";
-                       dmas = <&edma 42
-                               &edma 43
-                               &edma 44
-                               &edma 45>;
+                       dmas = <&edma 42 0
+                               &edma 43 0
+                               &edma 44 0
+                               &edma 45 0>;
                        dma-names = "tx0", "rx0", "tx1", "rx1";
                        status = "disabled";
                };
                        ti,no-idle-on-init;
                        reg = <0x50000000 0x2000>;
                        interrupts = <100>;
+                       dmas = <&edma 52>;
+                       dma-names = "rxtx";
                        gpmc,num-cs = <7>;
                        gpmc,num-waitpins = <2>;
                        #address-cells = <2>;
                        ti,hwmods = "sham";
                        reg = <0x53100000 0x200>;
                        interrupts = <109>;
-                       dmas = <&edma 36>;
+                       dmas = <&edma 36 0>;
                        dma-names = "rx";
                };
 
                        ti,hwmods = "aes";
                        reg = <0x53500000 0xa0>;
                        interrupts = <103>;
-                       dmas = <&edma 6>,
-                              <&edma 5>;
+                       dmas = <&edma 6 0>,
+                              <&edma 5 0>;
                        dma-names = "tx", "rx";
                };
 
                        interrupts = <80>, <81>;
                        interrupt-names = "tx", "rx";
                        status = "disabled";
-                       dmas = <&edma 8>,
-                               <&edma 9>;
+                       dmas = <&edma 8 2>,
+                               <&edma 9 2>;
                        dma-names = "tx", "rx";
                };
 
                        interrupts = <82>, <83>;
                        interrupt-names = "tx", "rx";
                        status = "disabled";
-                       dmas = <&edma 10>,
-                               <&edma 11>;
+                       dmas = <&edma 10 2>,
+                               <&edma 11 2>;
                        dma-names = "tx", "rx";
                };
 
index 2d40b3f241cd3da7de5d2e51cf36c4695ee44393..cb7de1d4e05fa685d8cfbbfd9bf2687dcc2d6ebe 100644 (file)
@@ -77,7 +77,7 @@
 &omap3_pmx_core {
        tps_pins: pinmux_tps_pins {
                pinctrl-single,pins = <
-                       0x1b0 (PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq.sys_nirq */
+                       OMAP3_CORE1_IOPAD(0x21e0, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq.sys_nirq */
                >;
        };
 };
index d83ff9c9701e36d5d837c87ce292d89c421c4a70..dcae0d60ed8799451471681272c5efc6891951d2 100644 (file)
@@ -30,6 +30,7 @@
                serial5 = &uart5;
                ethernet0 = &cpsw_emac0;
                ethernet1 = &cpsw_emac1;
+               spi0 = &qspi;
        };
 
        cpus {
                                        mboxes = <&mailbox &mbox_wkupm3>;
                                };
 
+                               edma_xbar: dma-router@f90 {
+                                       compatible = "ti,am335x-edma-crossbar";
+                                       reg = <0xf90 0x40>;
+                                       #dma-cells = <3>;
+                                       dma-requests = <64>;
+                                       dma-masters = <&edma>;
+                               };
+
                                scm_clockdomains: clockdomains {
                                };
                        };
                };
 
                edma: edma@49000000 {
-                       compatible = "ti,edma3";
-                       ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
-                       reg =   <0x49000000 0x10000>,
-                               <0x44e10f90 0x10>;
+                       compatible = "ti,edma3-tpcc";
+                       ti,hwmods = "tpcc";
+                       reg =   <0x49000000 0x10000>;
+                       reg-names = "edma3_cc";
                        interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
-                                       <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
-                                       <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
-                       #dma-cells = <1>;
+                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "edma3_ccint", "emda3_mperr",
+                                         "edma3_ccerrint";
+                       dma-requests = <64>;
+                       #dma-cells = <2>;
+
+                       ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>,
+                                  <&edma_tptc2 0>;
+
+                       ti,edma-memcpy-channels = <32 33>;
+               };
+
+               edma_tptc0: tptc@49800000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc0";
+                       reg =   <0x49800000 0x100000>;
+                       interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "edma3_tcerrint";
+               };
+
+               edma_tptc1: tptc@49900000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc1";
+                       reg =   <0x49900000 0x100000>;
+                       interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "edma3_tcerrint";
+               };
+
+               edma_tptc2: tptc@49a00000 {
+                       compatible = "ti,edma3-tptc";
+                       ti,hwmods = "tptc2";
+                       reg =   <0x49a00000 0x100000>;
+                       interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "edma3_tcerrint";
                };
 
                uart0: serial@44e09000 {
                        ti,hwmods = "mmc1";
                        ti,dual-volt;
                        ti,needs-special-reset;
-                       dmas = <&edma 24
-                               &edma 25>;
+                       dmas = <&edma 24 0>,
+                               <&edma 25 0>;
                        dma-names = "tx", "rx";
                        interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                        reg = <0x481d8000 0x1000>;
                        ti,hwmods = "mmc2";
                        ti,needs-special-reset;
-                       dmas = <&edma 2
-                               &edma 3>;
+                       dmas = <&edma 2 0>,
+                               <&edma 3 0>;
                        dma-names = "tx", "rx";
                        interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                        compatible = "ti,omap5-sham";
                        ti,hwmods = "sham";
                        reg = <0x53100000 0x300>;
-                       dmas = <&edma 36>;
+                       dmas = <&edma 36 0>;
                        dma-names = "rx";
                        interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
                };
                        ti,hwmods = "aes";
                        reg = <0x53501000 0xa0>;
                        interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma 6
-                               &edma 5>;
+                       dmas = <&edma 6 0>,
+                               <&edma 5 0>;
                        dma-names = "tx", "rx";
                };
 
                        ti,hwmods = "des";
                        reg = <0x53701000 0xa0>;
                        interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
-                       dmas = <&edma 34
-                               &edma 33>;
+                       dmas = <&edma 34 0>,
+                               <&edma 33 0>;
                        dma-names = "tx", "rx";
                };
 
                        interrupts = <80>, <81>;
                        interrupt-names = "tx", "rx";
                        status = "disabled";
-                       dmas = <&edma 8>,
-                              <&edma 9>;
+                       dmas = <&edma 8 2>,
+                              <&edma 9 2>;
                        dma-names = "tx", "rx";
                };
 
                        interrupts = <82>, <83>;
                        interrupt-names = "tx", "rx";
                        status = "disabled";
-                       dmas = <&edma 10>,
-                              <&edma 11>;
+                       dmas = <&edma 10 2>,
+                              <&edma 11 2>;
                        dma-names = "tx", "rx";
                };
 
                gpmc: gpmc@50000000 {
                        compatible = "ti,am3352-gpmc";
                        ti,hwmods = "gpmc";
+                       dmas = <&edma 52>;
+                       dma-names = "rxtx";
                        clocks = <&l3s_gclk>;
                        clock-names = "fck";
                        reg = <0x50000000 0x2000>;
 
                qspi: qspi@47900000 {
                        compatible = "ti,am4372-qspi";
-                       reg = <0x47900000 0x100>;
+                       reg = <0x47900000 0x100>,
+                             <0x30000000 0x4000000>;
+                       reg-names = "qspi_base", "qspi_mmap";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "qspi";
diff --git a/arch/arm/boot/dts/am437x-cm-t43.dts b/arch/arm/boot/dts/am437x-cm-t43.dts
new file mode 100644 (file)
index 0000000..8677f4c
--- /dev/null
@@ -0,0 +1,422 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/pinctrl/am43xx.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "am4372.dtsi"
+
+/ {
+       model = "CompuLab CM-T43";
+       compatible = "compulab,am437x-cm-t43", "ti,am4372", "ti,am43";
+
+       leds {
+               compatible = "gpio-leds";
+
+               ledb {
+                       label = "cm-t43:green";
+                       gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       vmmc_3v3: fixedregulator-v3_3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               enable-active-high;
+       };
+};
+
+&am43xx_pinmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&cm_t43_led_pins>;
+
+       cm_t43_led_pins: cm_t43_led_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0xa78, MUX_MODE7)
+               >;
+       };
+
+       i2c0_pins: i2c0_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
+                       AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
+               >;
+       };
+
+       emmc_pins: emmc_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x820, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
+                       AM4372_IOPAD(0x824, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
+                       AM4372_IOPAD(0x828, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
+                       AM4372_IOPAD(0x82c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
+                       AM4372_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
+                       AM4372_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
+                       AM4372_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
+                       AM4372_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
+                       AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+               >;
+       };
+
+       spi0_pins: pinmux_spi0_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0) /* spi0_sclk.spi0_sclk */
+                       AM4372_IOPAD(0x954, PIN_INPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */
+                       AM4372_IOPAD(0x958, PIN_OUTPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */
+                       AM4372_IOPAD(0x95C, PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
+               >;
+       };
+
+       nand_flash_x8: nand_flash_x8 {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x800, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x804, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x808, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x80c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x810, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x814, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x818, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x81c, PIN_INPUT | PULL_DISABLE | MUX_MODE0)
+                       AM4372_IOPAD(0x870, PIN_INPUT_PULLUP  | MUX_MODE0)
+                       AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x898, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM4372_IOPAD(0x894, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM4372_IOPAD(0x890, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+                       AM4372_IOPAD(0x89c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_txen */
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rxctl */
+                       AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd3 */
+                       AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd2 */
+                       AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd1 */
+                       AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd0 */
+                       AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rmii1_tclk */
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rmii1_rclk */
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd3 */
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd2 */
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd1 */
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd0 */
+                       AM4372_IOPAD(0xa74, MUX_MODE3)
+                       /* Slave 2 */
+                       AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a0.txen */
+                       AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a1.rxctl */
+                       AM4372_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a2.txd3 */
+                       AM4372_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a3.txd2 */
+                       AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a4.txd1 */
+                       AM4372_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a5.txd0 */
+                       AM4372_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a6.tclk */
+                       AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a7.rclk */
+                       AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a8.rxd3 */
+                       AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a9.rxd2 */
+                       AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a10.rxd1 */
+                       AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN  | MUX_MODE2)    /* gpmc_a11.rxd0 */
+                       AM4372_IOPAD(0xa38, MUX_MODE7)
+               >;
+       };
+
+       davinci_mdio_default: davinci_mdio_default {
+               pinctrl-single,pins = <
+                       /* MDIO */
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
+               >;
+       };
+};
+
+&gpmc {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&nand_flash_x8>;
+       ranges = <0 0 0x08000000 0x1000000>;
+       nand@0,0 {
+               reg = <0 0 0>;
+               ti,nand-ecc-opt = "bch8";
+               ti,elm-id = <&elm>;
+
+               nand-bus-width = <8>;
+               gpmc,device-width = <1>;
+               gpmc,sync-clk-ps = <0>;
+               gpmc,cs-on-ns = <0>;
+               gpmc,cs-rd-off-ns = <44>;
+               gpmc,cs-wr-off-ns = <44>;
+               gpmc,adv-on-ns = <6>;
+               gpmc,adv-rd-off-ns = <34>;
+               gpmc,adv-wr-off-ns = <44>;
+               gpmc,we-on-ns = <0>;
+               gpmc,we-off-ns = <40>;
+               gpmc,oe-on-ns = <0>;
+               gpmc,oe-off-ns = <54>;
+               gpmc,access-ns = <64>;
+               gpmc,rd-cycle-ns = <82>;
+               gpmc,wr-cycle-ns = <82>;
+               gpmc,wait-on-read = "true";
+               gpmc,wait-on-write = "true";
+               gpmc,bus-turnaround-ns = <0>;
+               gpmc,cycle2cycle-delay-ns = <0>;
+               gpmc,clk-activation-ns = <0>;
+               gpmc,wait-monitoring-ns = <0>;
+               gpmc,wr-access-ns = <40>;
+               gpmc,wr-data-mux-bus-ns = <0>;
+
+               gpmc,wait-pin = <0>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+               /* MTD partition table */
+               partition@0 {
+                       label = "kernel";
+                       reg = <0x0 0x00980000>;
+               };
+               partition@980000 {
+                       label = "dtb";
+                       reg = <0x00980000 0x00080000>;
+               };
+               partition@a00000 {
+                       label = "rootfs";
+                       reg = <0x00a00000 0x0>;
+               };
+       };
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       clock-frequency = <100000>;
+
+       tps65218: tps65218@24 {
+               compatible = "ti,tps65218";
+               reg = <0x24>;
+               interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
+               interrupt-parent = <&gic>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               dcdc1: regulator-dcdc1 {
+                       compatible = "ti,tps65218-dcdc1";
+                       regulator-name = "vdd_core";
+                       regulator-min-microvolt = <912000>;
+                       regulator-max-microvolt = <1144000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc2: regulator-dcdc2 {
+                       compatible = "ti,tps65218-dcdc2";
+                       regulator-name = "vdd_mpu";
+                       regulator-min-microvolt = <912000>;
+                       regulator-max-microvolt = <1378000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc3: regulator-dcdc3 {
+                       compatible = "ti,tps65218-dcdc3";
+                       regulator-name = "vdcdc3";
+                       regulator-suspend-enable;
+                       regulator-min-microvolt = <1500000>;
+                       regulator-max-microvolt = <1500000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc5: regulator-dcdc5 {
+                       compatible = "ti,tps65218-dcdc5";
+                       regulator-name = "v1_0bat";
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1000000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc6: regulator-dcdc6 {
+                       compatible = "ti,tps65218-dcdc6";
+                       regulator-name = "v1_8bat";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               ldo1: regulator-ldo1 {
+                       compatible = "ti,tps65218-ldo1";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+       };
+
+       eeprom_module: at24@50 {
+               compatible = "atmel,24c02";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
+&gpio0 {
+       status = "okay";
+};
+
+&gpio1 {
+       status = "okay";
+};
+
+&gpio2 {
+       status = "okay";
+};
+
+&gpio3 {
+       status = "okay";
+};
+
+&gpio4 {
+       status = "okay";
+};
+
+&gpio5 {
+       status = "okay";
+};
+
+&mmc2 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&emmc_pins>;
+       vmmc-supply = <&vmmc_3v3>;
+       bus-width = <8>;
+       ti,non-removable;
+};
+
+&spi0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pins>;
+       dmas = <&edma 16
+               &edma 17>;
+       dma-names = "tx0", "rx0";
+
+       flash: w25q64cvzpig@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <20000000>;
+               partition@0 {
+                       label = "uboot";
+                       reg = <0x0 0xc0000>;
+               };
+
+               partition@c0000 {
+                       label = "uboot environment";
+                       reg = <0xc0000 0x40000>;
+               };
+
+               partition@100000 {
+                       label = "reserved";
+                       reg = <0x100000 0x100000>;
+               };
+       };
+};
+
+&mac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&cpsw_default>;
+       dual_emac = <1>;
+       status = "okay";
+};
+
+&davinci_mdio {
+       pinctrl-names = "default";
+       pinctrl-0 = <&davinci_mdio_default>;
+       status = "okay";
+};
+
+&cpsw_emac0 {
+       phy_id = <&davinci_mdio>, <0>;
+       phy-mode = "rgmii-txid";
+       dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+       phy_id = <&davinci_mdio>, <1>;
+       phy-mode = "rgmii-txid";
+       dual_emac_res_vlan = <2>;
+};
+
+&dwc3_1 {
+       status = "okay";
+};
+
+&usb2_phy1 {
+       status = "okay";
+};
+
+&usb1 {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&dwc3_2 {
+       status = "okay";
+};
+
+&usb2_phy2 {
+       status = "okay";
+};
+
+&usb2 {
+       dr_mode = "host";
+       status = "okay";
+       interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+                    <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+       interrupt-names = "peripheral", "host", "otg";
+};
+
+&elm {
+       status = "okay";
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&tscadc {
+       status = "okay";
+       tsc {
+               ti,wires = <4>;
+               ti,x-plate-resistance = <200>;
+               ti,coordiante-readouts = <5>;
+               ti,wire-config = <0x00 0x11 0x22 0x33>;
+       };
+
+       adc {
+               ti,adc-channels = <4 5 6 7>;
+       };
+};
+
+&cpu {
+       cpu0-supply = <&dcdc2>;
+       operating-points = <1000000 1330000>,
+                          <800000 1260000>,
+                          <720000 1200000>,
+                          <600000 1100000>,
+                          <300000 950000>;
+};
index d2450ab0a3805f1ceb841e5c5fa559602fa84d6b..64d43325bcbc73aa08bf1da025c255883737f233 100644 (file)
 
        i2c0_pins: i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
+                       AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
+                       AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
                >;
        };
 
        i2c1_pins: i2c1_pins {
                pinctrl-single,pins = <
-                       0x15c (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_cs0.i2c1_scl */
-                       0x158 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_d1.i2c1_sda  */
+                       AM4372_IOPAD(0x95c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_cs0.i2c1_scl */
+                       AM4372_IOPAD(0x958, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_d1.i2c1_sda  */
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        ecap0_pins: backlight_pins {
                pinctrl-single,pins = <
-                       0x164 MUX_MODE0       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+                       AM4372_IOPAD(0x964, MUX_MODE0)       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
                >;
        };
 
        pixcir_ts_pins: pixcir_ts_pins {
                pinctrl-single,pins = <
-                       0x264 (PIN_INPUT_PULLUP | MUX_MODE7)  /* spi2_d0.gpio3_22 */
+                       AM4372_IOPAD(0xa64, PIN_INPUT_PULLUP | MUX_MODE7)  /* spi2_d0.gpio3_22 */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_txen */
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rxctl */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd3 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd2 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_txd1 */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_txd0 */
-                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rmii1_tclk */
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rmii1_rclk */
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rxd3 */
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rxd2 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rxd1 */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rxd0 */
+                       AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_txen */
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rxctl */
+                       AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd3 */
+                       AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd2 */
+                       AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_txd1 */
+                       AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_txd0 */
+                       AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rmii1_tclk */
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rmii1_rclk */
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd3 */
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd2 */
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rxd1 */
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rxd0 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        nand_flash_x8: nand_flash_x8 {
                pinctrl-single,pins = <
-                       0x0  (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad0.gpmc_ad0 */
-                       0x4  (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad1.gpmc_ad1 */
-                       0x8  (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad2.gpmc_ad2 */
-                       0xc  (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad3.gpmc_ad3 */
-                       0x10 (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad4.gpmc_ad4 */
-                       0x14 (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad5.gpmc_ad5 */
-                       0x18 (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad6.gpmc_ad6 */
-                       0x1c (PIN_INPUT  | MUX_MODE0)   /* gpmc_ad7.gpmc_ad7 */
-                       0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                       0x74 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_wpn.gpmc_wpn */
-                       0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
-                       0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                       0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                       0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                       0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+                       AM4372_IOPAD(0x800, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad0.gpmc_ad0 */
+                       AM4372_IOPAD(0x804, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad1.gpmc_ad1 */
+                       AM4372_IOPAD(0x808, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad2.gpmc_ad2 */
+                       AM4372_IOPAD(0x80c, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad3.gpmc_ad3 */
+                       AM4372_IOPAD(0x810, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
+                       AM4372_IOPAD(0x814, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
+                       AM4372_IOPAD(0x818, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
+                       AM4372_IOPAD(0x81c, PIN_INPUT  | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
+                       AM4372_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                       AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_wpn.gpmc_wpn */
+                       AM4372_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0  */
+                       AM4372_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                       AM4372_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                       AM4372_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                       AM4372_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_be0n_cle.gpmc_be0n_cle */
                >;
        };
 
        dss_pins: dss_pins {
                pinctrl-single,pins = <
-                       0x020 (PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
-                       0x024 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x028 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x02c (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x030 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x034 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x038 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                       0x03c (PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
-                       0x0a0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
-                       0x0a4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0a8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0ac (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0b0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0b4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0b8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0bc (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0c0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0c4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0c8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0cc (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0d0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0d4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0d8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                       0x0dc (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
-                       0x0e0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
-                       0x0e4 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
-                       0x0e8 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
-                       0x0ec (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
+                       AM4372_IOPAD(0x820, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
+                       AM4372_IOPAD(0x824, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x828, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x82c, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x830, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x834, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x838, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                       AM4372_IOPAD(0x83c, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
+                       AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
+                       AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
+                       AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
+                       AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
+                       AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
+                       AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
 
                >;
        };
        display_mux_pins: display_mux_pins {
                pinctrl-single,pins = <
                        /* GPIO 5_8 to select LCD / HDMI */
-                       0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
+                       AM4372_IOPAD(0xa38, PIN_OUTPUT_PULLUP | MUX_MODE7)
                >;
        };
 
        dcan0_default: dcan0_default_pins {
                pinctrl-single,pins = <
-                       0x178 (PIN_OUTPUT | MUX_MODE2)          /* uart1_ctsn.d_can0_tx */
-                       0x17c (PIN_INPUT_PULLUP | MUX_MODE2)    /* uart1_rtsn.d_can0_rx */
+                       AM4372_IOPAD(0x978, PIN_OUTPUT | MUX_MODE2)             /* uart1_ctsn.d_can0_tx */
+                       AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE2)       /* uart1_rtsn.d_can0_rx */
                >;
        };
 
        dcan0_sleep: dcan0_sleep_pins {
                pinctrl-single,pins = <
-                       0x178 (PIN_INPUT_PULLUP | MUX_MODE7)    /* uart1_ctsn.gpio0_12 */
-                       0x17c (PIN_INPUT_PULLUP | MUX_MODE7)    /* uart1_rtsn.gpio0_13 */
+                       AM4372_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE7)       /* uart1_ctsn.gpio0_12 */
+                       AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE7)       /* uart1_rtsn.gpio0_13 */
                >;
        };
 
        dcan1_default: dcan1_default_pins {
                pinctrl-single,pins = <
-                       0x180 (PIN_OUTPUT | MUX_MODE2)          /* uart1_rxd.d_can1_tx */
-                       0x184 (PIN_INPUT_PULLUP | MUX_MODE2)    /* uart1_txd.d_can1_rx */
+                       AM4372_IOPAD(0x980, PIN_OUTPUT | MUX_MODE2)             /* uart1_rxd.d_can1_tx */
+                       AM4372_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE2)       /* uart1_txd.d_can1_rx */
                >;
        };
 
        dcan1_sleep: dcan1_sleep_pins {
                pinctrl-single,pins = <
-                       0x180 (PIN_INPUT_PULLUP | MUX_MODE7)    /* uart1_rxd.gpio0_14 */
-                       0x184 (PIN_INPUT_PULLUP | MUX_MODE7)    /* uart1_txd.gpio0_15 */
+                       AM4372_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE7)       /* uart1_rxd.gpio0_14 */
+                       AM4372_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE7)       /* uart1_txd.gpio0_15 */
                >;
        };
 
        vpfe0_pins_default: vpfe0_pins_default {
                pinctrl-single,pins = <
-                       0x1B0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_hd mode 0*/
-                       0x1B4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_vd mode 0*/
-                       0x1C0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_pclk mode 0*/
-                       0x1C4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data8 mode 0*/
-                       0x1C8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data9 mode 0*/
-                       0x208 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data0 mode 0*/
-                       0x20C (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data1 mode 0*/
-                       0x210 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data2 mode 0*/
-                       0x214 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data3 mode 0*/
-                       0x218 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data4 mode 0*/
-                       0x21C (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data5 mode 0*/
-                       0x220 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data6 mode 0*/
-                       0x224 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data7 mode 0*/
+                       AM4372_IOPAD(0x9b0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_hd mode 0*/
+                       AM4372_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_vd mode 0*/
+                       AM4372_IOPAD(0x9c0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_pclk mode 0*/
+                       AM4372_IOPAD(0x9c4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data8 mode 0*/
+                       AM4372_IOPAD(0x9c8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data9 mode 0*/
+                       AM4372_IOPAD(0xa08, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data0 mode 0*/
+                       AM4372_IOPAD(0xa0c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data1 mode 0*/
+                       AM4372_IOPAD(0xa10, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data2 mode 0*/
+                       AM4372_IOPAD(0xa14, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data3 mode 0*/
+                       AM4372_IOPAD(0xa18, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data4 mode 0*/
+                       AM4372_IOPAD(0xa1c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data5 mode 0*/
+                       AM4372_IOPAD(0xa20, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data6 mode 0*/
+                       AM4372_IOPAD(0xa24, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data7 mode 0*/
                >;
        };
 
        vpfe0_pins_sleep: vpfe0_pins_sleep {
                pinctrl-single,pins = <
-                       0x1B0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_hd mode 0*/
-                       0x1B4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_vd mode 0*/
-                       0x1C0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_pclk mode 0*/
-                       0x1C4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data8 mode 0*/
-                       0x1C8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data9 mode 0*/
-                       0x208 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data0 mode 0*/
-                       0x20C (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data1 mode 0*/
-                       0x210 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data2 mode 0*/
-                       0x214 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data3 mode 0*/
-                       0x218 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data4 mode 0*/
-                       0x21C (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data5 mode 0*/
-                       0x220 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data6 mode 0*/
-                       0x224 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data7 mode 0*/
+                       AM4372_IOPAD(0x9b0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_hd mode 0*/
+                       AM4372_IOPAD(0x9b4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_vd mode 0*/
+                       AM4372_IOPAD(0x9c0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_pclk mode 0*/
+                       AM4372_IOPAD(0x9c4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data8 mode 0*/
+                       AM4372_IOPAD(0x9c8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data9 mode 0*/
+                       AM4372_IOPAD(0xa08, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data0 mode 0*/
+                       AM4372_IOPAD(0xa0c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data1 mode 0*/
+                       AM4372_IOPAD(0xa10, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data2 mode 0*/
+                       AM4372_IOPAD(0xa14, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data3 mode 0*/
+                       AM4372_IOPAD(0xa18, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data4 mode 0*/
+                       AM4372_IOPAD(0xa1c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data5 mode 0*/
+                       AM4372_IOPAD(0xa20, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data6 mode 0*/
+                       AM4372_IOPAD(0xa24, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data7 mode 0*/
                >;
        };
 
        vpfe1_pins_default: vpfe1_pins_default {
                pinctrl-single,pins = <
-                       0x1CC (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data9 mode 0*/
-                       0x1D0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data8 mode 0*/
-                       0x1D4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_hd mode 0*/
-                       0x1D8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_vd mode 0*/
-                       0x1DC (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_pclk mode 0*/
-                       0x1E8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data0 mode 0*/
-                       0x1EC (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data1 mode 0*/
-                       0x1F0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data2 mode 0*/
-                       0x1F4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data3 mode 0*/
-                       0x1F8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data4 mode 0*/
-                       0x1FC (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data5 mode 0*/
-                       0x200 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data6 mode 0*/
-                       0x204 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data7 mode 0*/
+                       AM4372_IOPAD(0x9cc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data9 mode 0*/
+                       AM4372_IOPAD(0x9d0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data8 mode 0*/
+                       AM4372_IOPAD(0x9d4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_hd mode 0*/
+                       AM4372_IOPAD(0x9d8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_vd mode 0*/
+                       AM4372_IOPAD(0x9dC, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_pclk mode 0*/
+                       AM4372_IOPAD(0x9e8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data0 mode 0*/
+                       AM4372_IOPAD(0x9ec, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data1 mode 0*/
+                       AM4372_IOPAD(0x9f0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data2 mode 0*/
+                       AM4372_IOPAD(0x9f4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data3 mode 0*/
+                       AM4372_IOPAD(0x9f8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data4 mode 0*/
+                       AM4372_IOPAD(0x9fc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data5 mode 0*/
+                       AM4372_IOPAD(0xa00, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data6 mode 0*/
+                       AM4372_IOPAD(0xa04, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data7 mode 0*/
                >;
        };
 
        vpfe1_pins_sleep: vpfe1_pins_sleep {
                pinctrl-single,pins = <
-                       0x1CC (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data9 mode 0*/
-                       0x1D0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data8 mode 0*/
-                       0x1D4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_hd mode 0*/
-                       0x1D8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_vd mode 0*/
-                       0x1DC (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_pclk mode 0*/
-                       0x1E8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data0 mode 0*/
-                       0x1EC (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data1 mode 0*/
-                       0x1F0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data2 mode 0*/
-                       0x1F4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data3 mode 0*/
-                       0x1F8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data4 mode 0*/
-                       0x1FC (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data5 mode 0*/
-                       0x200 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data6 mode 0*/
-                       0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data7 mode 0*/
+                       AM4372_IOPAD(0x9cc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data9 mode 0*/
+                       AM4372_IOPAD(0x9d0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data8 mode 0*/
+                       AM4372_IOPAD(0x9d4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_hd mode 0*/
+                       AM4372_IOPAD(0x9d8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_vd mode 0*/
+                       AM4372_IOPAD(0x9dc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_pclk mode 0*/
+                       AM4372_IOPAD(0x9e8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data0 mode 0*/
+                       AM4372_IOPAD(0x9ec, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data1 mode 0*/
+                       AM4372_IOPAD(0x9f0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data2 mode 0*/
+                       AM4372_IOPAD(0x9f4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data3 mode 0*/
+                       AM4372_IOPAD(0x9f8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data4 mode 0*/
+                       AM4372_IOPAD(0x9fc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data5 mode 0*/
+                       AM4372_IOPAD(0xa00, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data6 mode 0*/
+                       AM4372_IOPAD(0xa04, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data7 mode 0*/
                >;
        };
 
        mmc3_pins_default: pinmux_mmc3_pins_default {
                pinctrl-single,pins = <
-                       0x8c (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_clk.mmc2_clk */
-                       0x88 (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_csn3.mmc2_cmd */
-                       0x44 (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a1.mmc2_dat0 */
-                       0x48 (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a2.mmc2_dat1 */
-                       0x4c (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a3.mmc2_dat2 */
-                       0x78 (PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_be1n.mmc2_dat3 */
+                       AM4372_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_clk.mmc2_clk */
+                       AM4372_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_csn3.mmc2_cmd */
+                       AM4372_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a1.mmc2_dat0 */
+                       AM4372_IOPAD(0x848, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a2.mmc2_dat1 */
+                       AM4372_IOPAD(0x84c, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a3.mmc2_dat2 */
+                       AM4372_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_be1n.mmc2_dat3 */
                >;
        };
 
        mmc3_pins_sleep: pinmux_mmc3_pins_sleep {
                pinctrl-single,pins = <
-                       0x8c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_clk.mmc2_clk */
-                       0x88 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_csn3.mmc2_cmd */
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a1.mmc2_dat0 */
-                       0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a2.mmc2_dat1 */
-                       0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_a3.mmc2_dat2 */
-                       0x78 (PIN_INPUT_PULLDOWN | MUX_MODE7)   /* gpmc_be1n.mmc2_dat3 */
+                       AM4372_IOPAD(0x88c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_clk.mmc2_clk */
+                       AM4372_IOPAD(0x888, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_csn3.mmc2_cmd */
+                       AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a1.mmc2_dat0 */
+                       AM4372_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a2.mmc2_dat1 */
+                       AM4372_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_a3.mmc2_dat2 */
+                       AM4372_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* gpmc_be1n.mmc2_dat3 */
                >;
        };
 
        wlan_pins_default: pinmux_wlan_pins_default {
                pinctrl-single,pins = <
-                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)          /* gpmc_a4.gpio1_20 WL_EN */
-                       0x5c (PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)    /* gpmc_a7.gpio1_23 WL_IRQ*/
-                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)          /* gpmc_a0.gpio1_16 BT_EN*/
+                       AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE7)            /* gpmc_a4.gpio1_20 WL_EN */
+                       AM4372_IOPAD(0x85c, PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)      /* gpmc_a7.gpio1_23 WL_IRQ*/
+                       AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE7)            /* gpmc_a0.gpio1_16 BT_EN*/
                >;
        };
 
        wlan_pins_sleep: pinmux_wlan_pins_sleep {
                pinctrl-single,pins = <
-                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)          /* gpmc_a4.gpio1_20 WL_EN */
-                       0x5c (PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)    /* gpmc_a7.gpio1_23 WL_IRQ*/
-                       0x40 (PIN_OUTPUT_PULLUP | MUX_MODE7)            /* gpmc_a0.gpio1_16 BT_EN*/
+                       AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE7)            /* gpmc_a4.gpio1_20 WL_EN */
+                       AM4372_IOPAD(0x85c, PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)      /* gpmc_a7.gpio1_23 WL_IRQ*/
+                       AM4372_IOPAD(0x840, PIN_OUTPUT_PULLUP | MUX_MODE7)              /* gpmc_a0.gpio1_16 BT_EN*/
                >;
        };
 
        uart3_pins: uart3_pins {
                pinctrl-single,pins = <
-                       0x228 (PIN_INPUT | MUX_MODE0)           /* uart3_rxd.uart3_rxd */
-                       0x22c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_txd.uart3_txd */
-                       0x230 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart3_ctsn.uart3_ctsn */
-                       0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_rtsn.uart3_rtsn */
+                       AM4372_IOPAD(0xa28, PIN_INPUT | MUX_MODE0)              /* uart3_rxd.uart3_rxd */
+                       AM4372_IOPAD(0xa2c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_txd.uart3_txd */
+                       AM4372_IOPAD(0xa30, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart3_ctsn.uart3_ctsn */
+                       AM4372_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_rtsn.uart3_rtsn */
                >;
        };
 
        mcasp1_pins: mcasp1_pins {
                pinctrl-single,pins = <
-                       0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* mii1_crs.mcasp1_aclkx */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* mii1_rxerr.mcasp1_fsx */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* rmii1_ref_clk.mcasp1_axr3 */
+                       AM4372_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4)    /* mii1_col.mcasp1_axr2 */
+                       AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* mii1_crs.mcasp1_aclkx */
+                       AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* mii1_rxerr.mcasp1_fsx */
+                       AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* rmii1_ref_clk.mcasp1_axr3 */
                >;
        };
 
        mcasp1_sleep_pins: mcasp1_sleep_pins {
                pinctrl-single,pins = <
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        gpio0_pins: gpio0_pins {
                pinctrl-single,pins = <
-                       0x26c (PIN_OUTPUT | MUX_MODE9) /* spi2_cs0.gpio0_23 SEL_eMMCorNANDn */
+                       AM4372_IOPAD(0xa6c, PIN_OUTPUT | MUX_MODE9) /* spi2_cs0.gpio0_23 SEL_eMMCorNANDn */
                >;
        };
 
        emmc_pins_default: emmc_pins_default {
                pinctrl-single,pins = <
-                       0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
-                       0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
-                       0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
-                       0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
-                       0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
-                       0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
-                       0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
-                       0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
-                       0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
-                       0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+                       AM4372_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+                       AM4372_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+                       AM4372_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+                       AM4372_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+                       AM4372_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
+                       AM4372_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
+                       AM4372_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
+                       AM4372_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+                       AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+                       AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
                >;
        };
 
        emmc_pins_sleep: emmc_pins_sleep {
                pinctrl-single,pins = <
-                       0x00 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad0.gpio1_0 */
-                       0x04 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad1.gpio1_1 */
-                       0x08 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad2.gpio1_2 */
-                       0x0c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad3.gpio1_3 */
-                       0x10 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
-                       0x14 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */
-                       0x18 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */
-                       0x1c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */
-                       0x80 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.gpio1_30 */
-                       0x84 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.gpio1_31 */
+                       AM4372_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad0.gpio1_0 */
+                       AM4372_IOPAD(0x804, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad1.gpio1_1 */
+                       AM4372_IOPAD(0x808, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad2.gpio1_2 */
+                       AM4372_IOPAD(0x80c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad3.gpio1_3 */
+                       AM4372_IOPAD(0x810, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
+                       AM4372_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */
+                       AM4372_IOPAD(0x818, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */
+                       AM4372_IOPAD(0x81c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */
+                       AM4372_IOPAD(0x880, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.gpio1_30 */
+                       AM4372_IOPAD(0x884, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.gpio1_31 */
                >;
        };
 };
        status = "okay";
        /* these are on the crossbar and are outlined in the
           xbar-event-map element */
-       dmas = <&edma 30
-               &edma 31>;
+       dmas = <&edma_xbar 30 0 1>,
+               <&edma_xbar 31 0 2>;
        dma-names = "tx", "rx";
        vmmc-supply = <&vmmcwl_fixed>;
        bus-width = <4>;
        };
 };
 
-&edma {
-       ti,edma-xbar-event-map = /bits/ 16 <1 30
-                                           2 31>;
-};
-
 &uart3 {
        status = "okay";
        pinctrl-names = "default";
index 337fb91ee74c02dc1193c3f40c6d5ae5a8dd07bd..76dcfc6d5f0db862a876cbb572fc5bd26eb51597 100644 (file)
 &am43xx_pinmux {
        gpio_keys_pins_default: gpio_keys_pins_default {
                pinctrl-single,pins = <
-                       0x1b8 (PIN_INPUT | MUX_MODE7)   /* cam0_field.gpio4_2 */
+                       AM4372_IOPAD(0x9b8, PIN_INPUT | MUX_MODE7)      /* cam0_field.gpio4_2 */
                >;
        };
 
        i2c0_pins_default: i2c0_pins_default {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
+                       AM4372_IOPAD(0x988, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
+                       AM4372_IOPAD(0x98c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
                >;
        };
 
        i2c0_pins_sleep: i2c0_pins_sleep {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x18c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x98c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        i2c2_pins_default: i2c2_pins_default {
                pinctrl-single,pins = <
-                       0x1e8 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data1.i2c2_scl */
-                       0x1ec (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data0.i2c2_sda */
+                       AM4372_IOPAD(0x9e8, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data1.i2c2_scl */
+                       AM4372_IOPAD(0x9ec, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data0.i2c2_sda */
                >;
        };
 
        i2c2_pins_sleep: i2c2_pins_sleep {
                pinctrl-single,pins = <
-                       0x1e8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x1ec (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9e8, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9ec, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        mmc1_pins_default: pinmux_mmc1_pins_default {
                pinctrl-single,pins = <
-                       0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
-                       0x1f0 (PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
-                       0x1f4 (PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
-                       0x1f8 (PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
-                       0x1fc (PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM4372_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
+                       AM4372_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
+                       AM4372_IOPAD(0x9f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
+                       AM4372_IOPAD(0x9f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
+                       AM4372_IOPAD(0x9f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
+                       AM4372_IOPAD(0x9fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
+                       AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
                pinctrl-single,pins = <
-                       0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x1f0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x1f4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x1f8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x1fc (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x160 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x900, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x904, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9f0, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9f4, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9f8, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x9fc, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x960, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        ecap0_pins_default: backlight_pins_default {
                pinctrl-single,pins = <
-                       0x164 (PIN_OUTPUT | MUX_MODE0) /* ecap0_in_pwm0_out.ecap0_in_pwm0_out */
+                       AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE0) /* ecap0_in_pwm0_out.ecap0_in_pwm0_out */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
-                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
-                       0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
-                       0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
-                       0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
-                       0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td2 */
-                       0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td3 */
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxclk.rmii1_rclk */
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxdv.rgmii1_rctl */
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd0 */
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd1 */
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd0.rgmii1_rd2 */
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mii1_rxd1.rgmii1_rd3 */
+                       AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txclk.rgmii1_tclk */
+                       AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txen.rgmii1_tctl */
+                       AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_td0 */
+                       AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_td1 */
+                       AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd0.rgmii1_td2 */
+                       AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* mii1_txd1.rgmii1_td3 */
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxclk.rmii1_rclk */
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxdv.rgmii1_rctl */
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rd0 */
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rd1 */
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd0.rgmii1_rd2 */
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* mii1_rxd1.rgmii1_rd3 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                       AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        qspi_pins_default: qspi_pins_default {
                pinctrl-single,pins = <
-                       0x7c (PIN_OUTPUT_PULLUP | MUX_MODE3)    /* gpmc_csn0.qspi_csn */
-                       0x88 (PIN_OUTPUT | MUX_MODE2)           /* gpmc_csn3.qspi_clk */
-                       0x90 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_advn_ale.qspi_d0 */
-                       0x94 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_oen_ren.qspi_d1 */
-                       0x98 (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_wen.qspi_d2 */
-                       0x9c (PIN_INPUT_PULLUP | MUX_MODE3)     /* gpmc_be0n_cle.qspi_d3 */
+                       AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE3)      /* gpmc_csn0.qspi_csn */
+                       AM4372_IOPAD(0x888, PIN_OUTPUT | MUX_MODE2)             /* gpmc_csn3.qspi_clk */
+                       AM4372_IOPAD(0x890, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_advn_ale.qspi_d0 */
+                       AM4372_IOPAD(0x894, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_oen_ren.qspi_d1 */
+                       AM4372_IOPAD(0x898, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_wen.qspi_d2 */
+                       AM4372_IOPAD(0x89c, PIN_INPUT_PULLUP | MUX_MODE3)       /* gpmc_be0n_cle.qspi_d3 */
                >;
        };
 
        qspi_pins_sleep: qspi_pins_sleep{
                pinctrl-single,pins = <
-                       0x7c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x88 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x98 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x87c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x888, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x890, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x894, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x898, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x89c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 };
diff --git a/arch/arm/boot/dts/am437x-sbc-t43.dts b/arch/arm/boot/dts/am437x-sbc-t43.dts
new file mode 100644 (file)
index 0000000..5f750c0
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+
+#include "am437x-cm-t43.dts"
+#include "compulab-sb-som.dtsi"
+
+/ {
+       model = "CompuLab CM-T43 on SB-SOM-T43";
+       compatible = "compulab,am437x-sbc-t43", "compulab,am437x-cm-t43", "ti,am4372", "ti,am43";
+
+       aliases {
+               display0 = &lcd0;
+       };
+};
+
+&am43xx_pinmux {
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
+                       AM4372_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
+                       AM4372_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
+                       AM4372_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
+                       AM4372_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
+                       AM4372_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
+                       AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM4372_IOPAD(0x964, PIN_INPUT | MUX_MODE7) /* ecap0_in_pwm0_out.gpio0_7 */
+               >;
+       };
+
+       dss_pinctrl_default: dss_pinctrl_default {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x9b0, PIN_OUTPUT_PULLUP | MUX_MODE2) /* cam0 hd -> DSS DATA 23 */
+                       AM4372_IOPAD(0x9b4, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9b8, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9bc, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9c0, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9c4, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9c8, PIN_OUTPUT_PULLUP | MUX_MODE2)
+                       AM4372_IOPAD(0x9cc, PIN_OUTPUT_PULLUP | MUX_MODE2) /* cam1 data 9 -> DSS DATA 16 */
+
+                       AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
+                       AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                       AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
+                       AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
+                       AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
+                       AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
+                       AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
+                       AM4372_IOPAD(0xa20, PIN_OUTPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+
+       uart0_pins_default: uart0_pins_default {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
+                       AM4372_IOPAD(0x96C, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0)
+                       AM4372_IOPAD(0x970, PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_rxd.uart0_rxd */
+                       AM4372_IOPAD(0x974, PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_txd.uart0_txd */
+               >;
+       };
+
+       i2c1_pins: i2c1_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0xa6c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE1)  /* spi2_cs0.i2c1_sda  */
+                       AM4372_IOPAD(0xa60, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE1)  /* spi2_sclk.i2c1_scl */
+               >;
+       };
+
+       i2c2_pins: i2c2_pins {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0x978, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE3)  /* uart1_ctsn.i2c2_sda  */
+                       AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE3)  /* uart1_rtsn.i2c2_scl */
+               >;
+       };
+
+       usb2_phy1_default: usb2_phy1_default {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0xac0, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+
+       usb2_phy2_default: usb2_phy2_default {
+               pinctrl-single,pins = <
+                       AM4372_IOPAD(0xac4, DS0_PULL_UP_DOWN_EN | PIN_INPUT_PULLDOWN | MUX_MODE0)
+               >;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+
+       pca9555: pca9555@20 {
+               compatible = "nxp,pca9555";
+               reg = <0x20>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       eeprom_base: at24@50 {
+               compatible = "atmel,24c02";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
+&i2c2 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_pins>;
+};
+
+&mmc1 {
+       status = "okay";
+       bus-width = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+       vmmc-supply = <&vsb_3v3>;
+       cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+       wp-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+};
+
+&dss {
+       status = "ok";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_pinctrl_default>;
+
+       port {
+               dpi_lcd_out: endpoint@0 {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <24>;
+               };
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_default>;
+};
+
+&dwc3_1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb2_phy1_default>;
+};
+
+&dwc3_2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb2_phy2_default>;
+};
+
+&lcd0 {
+       enable-gpios = <&pca9555 14 GPIO_ACTIVE_HIGH
+                       &gpio4 28 GPIO_ACTIVE_HIGH>;
+
+       port {
+               lcd_in: endpoint {
+                       remote-endpoint = <&dpi_lcd_out>;
+                       data-lines = <24>;
+               };
+       };
+};
index 63de2a1b4315ef56e4329e4825410deb3ccf7c07..d82dd6e3f9b1dda71783ff52cc495c45ed4578c4 100644 (file)
 &am43xx_pinmux {
        matrix_keypad_pins: matrix_keypad_pins {
                pinctrl-single,pins = <
-                       0x24c (PIN_OUTPUT | MUX_MODE7)  /* gpio5_13.gpio5_13 */
-                       0x250 (PIN_OUTPUT | MUX_MODE7)  /* spi4_sclk.gpio5_4 */
-                       0x254 (PIN_INPUT | MUX_MODE7)   /* spi4_d0.gpio5_5 */
-                       0x258 (PIN_INPUT | MUX_MODE7)   /* spi4_d1.gpio5_5 */
+                       AM4372_IOPAD(0xa4c, PIN_OUTPUT | MUX_MODE7)     /* gpio5_13.gpio5_13 */
+                       AM4372_IOPAD(0xa50, PIN_OUTPUT | MUX_MODE7)     /* spi4_sclk.gpio5_4 */
+                       AM4372_IOPAD(0xa54, PIN_INPUT | MUX_MODE7)      /* spi4_d0.gpio5_5 */
+                       AM4372_IOPAD(0xa58, PIN_INPUT | MUX_MODE7)      /* spi4_d1.gpio5_5 */
                >;
        };
 
        leds_pins: leds_pins {
                pinctrl-single,pins = <
-                       0x228 (PIN_OUTPUT | MUX_MODE7)  /* uart3_rxd.gpio5_2 */
-                       0x22c (PIN_OUTPUT | MUX_MODE7)  /* uart3_txd.gpio5_3 */
-                       0x230 (PIN_OUTPUT | MUX_MODE7)  /* uart3_ctsn.gpio5_0 */
-                       0x234 (PIN_OUTPUT | MUX_MODE7)  /* uart3_rtsn.gpio5_1 */
+                       AM4372_IOPAD(0xa28, PIN_OUTPUT | MUX_MODE7)     /* uart3_rxd.gpio5_2 */
+                       AM4372_IOPAD(0xa2c, PIN_OUTPUT | MUX_MODE7)     /* uart3_txd.gpio5_3 */
+                       AM4372_IOPAD(0xa30, PIN_OUTPUT | MUX_MODE7)     /* uart3_ctsn.gpio5_0 */
+                       AM4372_IOPAD(0xa34, PIN_OUTPUT | MUX_MODE7)     /* uart3_rtsn.gpio5_1 */
                >;
        };
 
        i2c0_pins: i2c0_pins {
                pinctrl-single,pins = <
-                       0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
-                       0x18c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
+                       AM4372_IOPAD(0x988, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
+                       AM4372_IOPAD(0x98c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
                >;
        };
 
        i2c1_pins: i2c1_pins {
                pinctrl-single,pins = <
-                       0x15c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_cs0.i2c1_scl */
-                       0x158 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_d1.i2c1_sda  */
+                       AM4372_IOPAD(0x95c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_cs0.i2c1_scl */
+                       AM4372_IOPAD(0x958, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_d1.i2c1_sda  */
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x0f0 (PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
-                       0x0f4 (PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
-                       0x0f8 (PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
-                       0x0fc (PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
-                       0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
-                       0x104 (PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
-                       0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                       AM4372_IOPAD(0x8f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
+                       AM4372_IOPAD(0x8f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
+                       AM4372_IOPAD(0x8f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
+                       AM4372_IOPAD(0x8fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
+                       AM4372_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
+                       AM4372_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
+                       AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                >;
        };
 
        ecap0_pins: backlight_pins {
                pinctrl-single,pins = <
-                       0x164 (PIN_OUTPUT | MUX_MODE0) /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
+                       AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE0) /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
                >;
        };
 
        edt_ft5306_ts_pins: edt_ft5306_ts_pins {
                pinctrl-single,pins = <
-                       0x74 (PIN_INPUT | MUX_MODE7)    /* gpmc_wpn.gpio0_31 */
-                       0x78 (PIN_OUTPUT | MUX_MODE7)   /* gpmc_be1n.gpio1_28 */
+                       AM4372_IOPAD(0x874, PIN_INPUT | MUX_MODE7)      /* gpmc_wpn.gpio0_31 */
+                       AM4372_IOPAD(0x878, PIN_OUTPUT | MUX_MODE7)     /* gpmc_be1n.gpio1_28 */
                >;
        };
 
        vpfe0_pins_default: vpfe0_pins_default {
                pinctrl-single,pins = <
-                       0x1b0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_hd mode 0*/
-                       0x1b4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_vd mode 0*/
-                       0x1b8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_field mode 0*/
-                       0x1bc (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_wen mode 0*/
-                       0x1c0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_pclk mode 0*/
-                       0x1c4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data8 mode 0*/
-                       0x1c8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data9 mode 0*/
-                       0x208 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data0 mode 0*/
-                       0x20c (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data1 mode 0*/
-                       0x210 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data2 mode 0*/
-                       0x214 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data3 mode 0*/
-                       0x218 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data4 mode 0*/
-                       0x21c (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data5 mode 0*/
-                       0x220 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data6 mode 0*/
-                       0x224 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data7 mode 0*/
+                       AM4372_IOPAD(0x9b0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_hd mode 0*/
+                       AM4372_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_vd mode 0*/
+                       AM4372_IOPAD(0x9b8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_field mode 0*/
+                       AM4372_IOPAD(0x9bc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_wen mode 0*/
+                       AM4372_IOPAD(0x9c0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_pclk mode 0*/
+                       AM4372_IOPAD(0x9c4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data8 mode 0*/
+                       AM4372_IOPAD(0x9c8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data9 mode 0*/
+                       AM4372_IOPAD(0xa08, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data0 mode 0*/
+                       AM4372_IOPAD(0xa0c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data1 mode 0*/
+                       AM4372_IOPAD(0xa10, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data2 mode 0*/
+                       AM4372_IOPAD(0xa14, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data3 mode 0*/
+                       AM4372_IOPAD(0xa18, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data4 mode 0*/
+                       AM4372_IOPAD(0xa1c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data5 mode 0*/
+                       AM4372_IOPAD(0xa20, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data6 mode 0*/
+                       AM4372_IOPAD(0xa24, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data7 mode 0*/
                >;
        };
 
        vpfe0_pins_sleep: vpfe0_pins_sleep {
                pinctrl-single,pins = <
-                       0x1b0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1b4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1b8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1bc (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1c0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1c4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x1c8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x208 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x20c (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x210 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x214 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x218 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x21c (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x220 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                       0x224 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9b0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9b4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9b8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9bc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9c0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9c4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0x9c8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa08, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa0c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa10, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa14, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa18, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa1c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa20, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                       AM4372_IOPAD(0xa24, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x12c (PIN_OUTPUT | MUX_MODE2)  /* mii1_txclk.rmii1_tclk */
-                       0x114 (PIN_OUTPUT | MUX_MODE2)  /* mii1_txen.rgmii1_tctl */
-                       0x128 (PIN_OUTPUT | MUX_MODE2)  /* mii1_txd0.rgmii1_td0 */
-                       0x124 (PIN_OUTPUT | MUX_MODE2)  /* mii1_txd1.rgmii1_td1 */
-                       0x120 (PIN_OUTPUT | MUX_MODE2)  /* mii1_txd0.rgmii1_td2 */
-                       0x11c (PIN_OUTPUT | MUX_MODE2)  /* mii1_txd1.rgmii1_td3 */
-                       0x130 (PIN_INPUT | MUX_MODE2)   /* mii1_rxclk.rmii1_rclk */
-                       0x118 (PIN_INPUT | MUX_MODE2)   /* mii1_rxdv.rgmii1_rctl */
-                       0x140 (PIN_INPUT | MUX_MODE2)   /* mii1_rxd0.rgmii1_rd0 */
-                       0x13c (PIN_INPUT | MUX_MODE2)   /* mii1_rxd1.rgmii1_rd1 */
-                       0x138 (PIN_INPUT | MUX_MODE2)   /* mii1_rxd0.rgmii1_rd2 */
-                       0x134 (PIN_INPUT | MUX_MODE2)   /* mii1_rxd1.rgmii1_rd3 */
+                       AM4372_IOPAD(0x92c, PIN_OUTPUT | MUX_MODE2)     /* mii1_txclk.rmii1_tclk */
+                       AM4372_IOPAD(0x914, PIN_OUTPUT | MUX_MODE2)     /* mii1_txen.rgmii1_tctl */
+                       AM4372_IOPAD(0x928, PIN_OUTPUT | MUX_MODE2)     /* mii1_txd0.rgmii1_td0 */
+                       AM4372_IOPAD(0x924, PIN_OUTPUT | MUX_MODE2)     /* mii1_txd1.rgmii1_td1 */
+                       AM4372_IOPAD(0x920, PIN_OUTPUT | MUX_MODE2)     /* mii1_txd0.rgmii1_td2 */
+                       AM4372_IOPAD(0x91c, PIN_OUTPUT | MUX_MODE2)     /* mii1_txd1.rgmii1_td3 */
+                       AM4372_IOPAD(0x930, PIN_INPUT | MUX_MODE2)      /* mii1_rxclk.rmii1_rclk */
+                       AM4372_IOPAD(0x918, PIN_INPUT | MUX_MODE2)      /* mii1_rxdv.rgmii1_rctl */
+                       AM4372_IOPAD(0x940, PIN_INPUT | MUX_MODE2)      /* mii1_rxd0.rgmii1_rd0 */
+                       AM4372_IOPAD(0x93c, PIN_INPUT | MUX_MODE2)      /* mii1_rxd1.rgmii1_rd1 */
+                       AM4372_IOPAD(0x938, PIN_INPUT | MUX_MODE2)      /* mii1_rxd0.rgmii1_rd2 */
+                       AM4372_IOPAD(0x934, PIN_INPUT | MUX_MODE2)      /* mii1_rxd1.rgmii1_rd3 */
 
                        /* Slave 2 */
-                       0x58 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a6.rgmii2_tclk */
-                       0x40 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a0.rgmii2_tctl */
-                       0x54 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a5.rgmii2_td0 */
-                       0x50 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a4.rgmii2_td1 */
-                       0x4c (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a3.rgmii2_td2 */
-                       0x48 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_a2.rgmii2_td3 */
-                       0x5c (PIN_INPUT | MUX_MODE2)    /* gpmc_a7.rgmii2_rclk */
-                       0x44 (PIN_INPUT | MUX_MODE2)    /* gpmc_a1.rgmii2_rtcl */
-                       0x6c (PIN_INPUT | MUX_MODE2)    /* gpmc_a11.rgmii2_rd0 */
-                       0x68 (PIN_INPUT | MUX_MODE2)    /* gpmc_a10.rgmii2_rd1 */
-                       0x64 (PIN_INPUT | MUX_MODE2)    /* gpmc_a9.rgmii2_rd2 */
-                       0x60 (PIN_INPUT | MUX_MODE2)    /* gpmc_a8.rgmii2_rd3 */
+                       AM4372_IOPAD(0x858, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a6.rgmii2_tclk */
+                       AM4372_IOPAD(0x840, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a0.rgmii2_tctl */
+                       AM4372_IOPAD(0x854, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a5.rgmii2_td0 */
+                       AM4372_IOPAD(0x850, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a4.rgmii2_td1 */
+                       AM4372_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a3.rgmii2_td2 */
+                       AM4372_IOPAD(0x848, PIN_OUTPUT | MUX_MODE2)     /* gpmc_a2.rgmii2_td3 */
+                       AM4372_IOPAD(0x85c, PIN_INPUT | MUX_MODE2)      /* gpmc_a7.rgmii2_rclk */
+                       AM4372_IOPAD(0x844, PIN_INPUT | MUX_MODE2)      /* gpmc_a1.rgmii2_rtcl */
+                       AM4372_IOPAD(0x86c, PIN_INPUT | MUX_MODE2)      /* gpmc_a11.rgmii2_rd0 */
+                       AM4372_IOPAD(0x868, PIN_INPUT | MUX_MODE2)      /* gpmc_a10.rgmii2_rd1 */
+                       AM4372_IOPAD(0x864, PIN_INPUT | MUX_MODE2)      /* gpmc_a9.rgmii2_rd2 */
+                       AM4372_IOPAD(0x860, PIN_INPUT | MUX_MODE2)      /* gpmc_a8.rgmii2_rd3 */
                >;
        };
 
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 reset value */
-                       0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
 
                        /* Slave 2 reset value */
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x148 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)   /* mdio_data.mdio_data */
-                       0x14c (PIN_OUTPUT | MUX_MODE0)                  /* mdio_clk.mdio_clk */
+                       AM4372_IOPAD(0x948, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0)      /* mdio_data.mdio_data */
+                       AM4372_IOPAD(0x94c, PIN_OUTPUT | MUX_MODE0)                     /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
                        /* MDIO reset value */
-                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        dss_pins: dss_pins {
                pinctrl-single,pins = <
-                       0x020 (PIN_OUTPUT | MUX_MODE1)  /* gpmc ad 8 -> DSS DATA 23 */
-                       0x024 (PIN_OUTPUT | MUX_MODE1)
-                       0x028 (PIN_OUTPUT | MUX_MODE1)
-                       0x02c (PIN_OUTPUT | MUX_MODE1)
-                       0x030 (PIN_OUTPUT | MUX_MODE1)
-                       0x034 (PIN_OUTPUT | MUX_MODE1)
-                       0x038 (PIN_OUTPUT | MUX_MODE1)
-                       0x03c (PIN_OUTPUT | MUX_MODE1)  /* gpmc ad 15 -> DSS DATA 16 */
-                       0x0a0 (PIN_OUTPUT | MUX_MODE0)  /* DSS DATA 0 */
-                       0x0a4 (PIN_OUTPUT | MUX_MODE0)
-                       0x0a8 (PIN_OUTPUT | MUX_MODE0)
-                       0x0ac (PIN_OUTPUT | MUX_MODE0)
-                       0x0b0 (PIN_OUTPUT | MUX_MODE0)
-                       0x0b4 (PIN_OUTPUT | MUX_MODE0)
-                       0x0b8 (PIN_OUTPUT | MUX_MODE0)
-                       0x0bc (PIN_OUTPUT | MUX_MODE0)
-                       0x0c0 (PIN_OUTPUT | MUX_MODE0)
-                       0x0c4 (PIN_OUTPUT | MUX_MODE0)
-                       0x0c8 (PIN_OUTPUT | MUX_MODE0)
-                       0x0cc (PIN_OUTPUT | MUX_MODE0)
-                       0x0d0 (PIN_OUTPUT | MUX_MODE0)
-                       0x0d4 (PIN_OUTPUT | MUX_MODE0)
-                       0x0d8 (PIN_OUTPUT | MUX_MODE0)
-                       0x0dc (PIN_OUTPUT | MUX_MODE0)  /* DSS DATA 15 */
-                       0x0e0 (PIN_OUTPUT | MUX_MODE0)  /* DSS VSYNC */
-                       0x0e4 (PIN_OUTPUT | MUX_MODE0)  /* DSS HSYNC */
-                       0x0e8 (PIN_OUTPUT | MUX_MODE0)  /* DSS PCLK */
-                       0x0ec (PIN_OUTPUT | MUX_MODE0)  /* DSS AC BIAS EN */
+                       AM4372_IOPAD(0x820, PIN_OUTPUT | MUX_MODE1)     /* gpmc ad 8 -> DSS DATA 23 */
+                       AM4372_IOPAD(0x824, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x828, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x830, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x834, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x838, PIN_OUTPUT | MUX_MODE1)
+                       AM4372_IOPAD(0x83c, PIN_OUTPUT | MUX_MODE1)     /* gpmc ad 15 -> DSS DATA 16 */
+                       AM4372_IOPAD(0x8a0, PIN_OUTPUT | MUX_MODE0)     /* DSS DATA 0 */
+                       AM4372_IOPAD(0x8a4, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8a8, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8ac, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8b0, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8b4, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8b8, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8bc, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8c0, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8c4, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8c8, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8d0, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8d4, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8d8, PIN_OUTPUT | MUX_MODE0)
+                       AM4372_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE0)     /* DSS DATA 15 */
+                       AM4372_IOPAD(0x8e0, PIN_OUTPUT | MUX_MODE0)     /* DSS VSYNC */
+                       AM4372_IOPAD(0x8e4, PIN_OUTPUT | MUX_MODE0)     /* DSS HSYNC */
+                       AM4372_IOPAD(0x8e8, PIN_OUTPUT | MUX_MODE0)     /* DSS PCLK */
+                       AM4372_IOPAD(0x8ec, PIN_OUTPUT | MUX_MODE0)     /* DSS AC BIAS EN */
 
                >;
        };
 
        qspi_pins: qspi_pins {
                pinctrl-single,pins = <
-                       0x7c (PIN_OUTPUT | MUX_MODE3)   /* gpmc_csn0.qspi_csn */
-                       0x88 (PIN_OUTPUT | MUX_MODE2)   /* gpmc_csn3.qspi_clk */
-                       0x90 (PIN_INPUT | MUX_MODE3)    /* gpmc_advn_ale.qspi_d0 */
-                       0x94 (PIN_INPUT | MUX_MODE3)    /* gpmc_oen_ren.qspi_d1 */
-                       0x98 (PIN_INPUT | MUX_MODE3)    /* gpmc_wen.qspi_d2 */
-                       0x9c (PIN_INPUT | MUX_MODE3)    /* gpmc_be0n_cle.qspi_d3 */
+                       AM4372_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE3)     /* gpmc_csn0.qspi_csn */
+                       AM4372_IOPAD(0x888, PIN_OUTPUT | MUX_MODE2)     /* gpmc_csn3.qspi_clk */
+                       AM4372_IOPAD(0x890, PIN_INPUT | MUX_MODE3)      /* gpmc_advn_ale.qspi_d0 */
+                       AM4372_IOPAD(0x894, PIN_INPUT | MUX_MODE3)      /* gpmc_oen_ren.qspi_d1 */
+                       AM4372_IOPAD(0x898, PIN_INPUT | MUX_MODE3)      /* gpmc_wen.qspi_d2 */
+                       AM4372_IOPAD(0x89c, PIN_INPUT | MUX_MODE3)      /* gpmc_be0n_cle.qspi_d3 */
                >;
        };
 
        mcasp1_pins: mcasp1_pins {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* mii1_crs.mcasp1_aclkx */
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* mii1_rxerr.mcasp1_fsx */
-                       0x108 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4)  /* rmii1_ref_clk.mcasp1_axr3 */
+                       AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* mii1_crs.mcasp1_aclkx */
+                       AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* mii1_rxerr.mcasp1_fsx */
+                       AM4372_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4)    /* mii1_col.mcasp1_axr2 */
+                       AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4)     /* rmii1_ref_clk.mcasp1_axr3 */
                >;
        };
 
        mcasp1_pins_sleep: mcasp1_pins_sleep {
                pinctrl-single,pins = <
-                       0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x108 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                       0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                >;
        };
 
        lcd_pins: lcd_pins {
                pinctrl-single,pins = <
-                       0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
+                       AM4372_IOPAD(0x81c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
                >;
        };
 
        usb1_pins: usb1_pins {
                pinctrl-single,pins = <
-                       0x2c0 (PIN_OUTPUT | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
+                       AM4372_IOPAD(0xac0, PIN_OUTPUT | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
                >;
        };
 
        usb2_pins: usb2_pins {
                pinctrl-single,pins = <
-                       0x2c4 (PIN_OUTPUT | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
+                       AM4372_IOPAD(0xac4, PIN_OUTPUT | MUX_MODE0) /* usb0_drvvbus.usb0_drvvbus */
                >;
        };
 };
index 47954ed990f8be83c9aabe38b3878911d21f92a2..746fd2b179587fe4522724f5b42b16202e97edef 100644 (file)
                cpsw_default: cpsw_default {
                        pinctrl-single,pins = <
                                /* Slave 1 */
-                               0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_crs.rmii1_crs */
-                               0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxerr.rmii1_rxerr */
-                               0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxdv.rmii1_rxdv */
-                               0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
-                               0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxd1.rmii1_rxd1 */
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* mii1_rxd0.rmii1_rxd0 */
-                               0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* rmii1_refclk.rmii1_refclk */
+                               AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_crs.rmii1_crs */
+                               AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxerr.rmii1_rxerr */
+                               AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txen.rmii1_txen */
+                               AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxdv.rmii1_rxdv */
+                               AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txd1.rmii1_txd1 */
+                               AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_txd0.rmii1_txd0 */
+                               AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd1.rmii1_rxd1 */
+                               AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd0.rmii1_rxd0 */
+                               AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* rmii1_refclk.rmii1_refclk */
                        >;
                };
 
                cpsw_sleep: cpsw_sleep {
                        pinctrl-single,pins = <
                                /* Slave 1 reset value */
-                               0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        >;
                };
 
                davinci_mdio_default: davinci_mdio_default {
                        pinctrl-single,pins = <
                                /* MDIO */
-                               0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
-                               0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
+                               AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* mdio_data.mdio_data */
+                               AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)                      /* mdio_clk.mdio_clk */
                        >;
                };
 
                davinci_mdio_sleep: davinci_mdio_sleep {
                        pinctrl-single,pins = <
                                /* MDIO reset value */
-                               0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        >;
                };
 
                i2c0_pins: pinmux_i2c0_pins {
                        pinctrl-single,pins = <
-                               0x188 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
-                               0x18c (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+                               AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* i2c0_sda.i2c0_sda */
+                               AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)       /* i2c0_scl.i2c0_scl */
                        >;
                };
 
                nand_flash_x8: nand_flash_x8 {
                        pinctrl-single,pins = <
-                               0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a0.SELQSPIorNAND/GPIO */
-                               0x0  (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad0.gpmc_ad0 */
-                               0x4  (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad1.gpmc_ad1 */
-                               0x8  (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad2.gpmc_ad2 */
-                               0xc  (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad3.gpmc_ad3 */
-                               0x10 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad4.gpmc_ad4 */
-                               0x14 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad5.gpmc_ad5 */
-                               0x18 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad6.gpmc_ad6 */
-                               0x1c (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* gpmc_ad7.gpmc_ad7 */
-                               0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
-                               0x74 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_wpn.gpmc_wpn */
-                               0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
-                               0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
-                               0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
-                               0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
-                               0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
+                               AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_a0.SELQSPIorNAND/GPIO */
+                               AM4372_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad0.gpmc_ad0 */
+                               AM4372_IOPAD(0x804, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad1.gpmc_ad1 */
+                               AM4372_IOPAD(0x808, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad2.gpmc_ad2 */
+                               AM4372_IOPAD(0x80c, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad3.gpmc_ad3 */
+                               AM4372_IOPAD(0x810, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
+                               AM4372_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
+                               AM4372_IOPAD(0x818, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
+                               AM4372_IOPAD(0x81c, PIN_INPUT_PULLDOWN | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
+                               AM4372_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)       /* gpmc_wait0.gpmc_wait0 */
+                               AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* gpmc_wpn.gpmc_wpn */
+                               AM4372_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_csn0.gpmc_csn0  */
+                               AM4372_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)             /* gpmc_advn_ale.gpmc_advn_ale */
+                               AM4372_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)             /* gpmc_oen_ren.gpmc_oen_ren */
+                               AM4372_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)             /* gpmc_wen.gpmc_wen */
+                               AM4372_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)             /* gpmc_be0n_cle.gpmc_be0n_cle */
                        >;
                };
 
                ecap0_pins: backlight_pins {
                        pinctrl-single,pins = <
-                               0x164 MUX_MODE0         /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
+                               AM4372_IOPAD(0x964, MUX_MODE0)         /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
                        >;
                };
 
                i2c2_pins: pinmux_i2c2_pins {
                        pinctrl-single,pins = <
-                               0x1c0 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE8)    /* i2c2_sda.i2c2_sda */
-                               0x1c4 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE8)    /* i2c2_scl.i2c2_scl */
+                               AM4372_IOPAD(0x9c0, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE8)    /* i2c2_sda.i2c2_sda */
+                               AM4372_IOPAD(0x9c4, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE8)    /* i2c2_scl.i2c2_scl */
                        >;
                };
 
                spi0_pins: pinmux_spi0_pins {
                        pinctrl-single,pins = <
-                               0x150 (PIN_INPUT | MUX_MODE0)           /* spi0_clk.spi0_clk */
-                               0x154 (PIN_OUTPUT | MUX_MODE0)           /* spi0_d0.spi0_d0 */
-                               0x158 (PIN_INPUT | MUX_MODE0)           /* spi0_d1.spi0_d1 */
-                               0x15c (PIN_OUTPUT | MUX_MODE0)          /* spi0_cs0.spi0_cs0 */
+                               AM4372_IOPAD(0x950, PIN_INPUT | MUX_MODE0)           /* spi0_clk.spi0_clk */
+                               AM4372_IOPAD(0x954, PIN_OUTPUT | MUX_MODE0)           /* spi0_d0.spi0_d0 */
+                               AM4372_IOPAD(0x958, PIN_INPUT | MUX_MODE0)           /* spi0_d1.spi0_d1 */
+                               AM4372_IOPAD(0x95c, PIN_OUTPUT | MUX_MODE0)          /* spi0_cs0.spi0_cs0 */
                        >;
                };
 
                spi1_pins: pinmux_spi1_pins {
                        pinctrl-single,pins = <
-                               0x190 (PIN_INPUT | MUX_MODE3)           /* mcasp0_aclkx.spi1_clk */
-                               0x194 (PIN_OUTPUT | MUX_MODE3)           /* mcasp0_fsx.spi1_d0 */
-                               0x198 (PIN_INPUT | MUX_MODE3)           /* mcasp0_axr0.spi1_d1 */
-                               0x19c (PIN_OUTPUT | MUX_MODE3)          /* mcasp0_ahclkr.spi1_cs0 */
+                               AM4372_IOPAD(0x990, PIN_INPUT | MUX_MODE3)           /* mcasp0_aclkx.spi1_clk */
+                               AM4372_IOPAD(0x994, PIN_OUTPUT | MUX_MODE3)           /* mcasp0_fsx.spi1_d0 */
+                               AM4372_IOPAD(0x998, PIN_INPUT | MUX_MODE3)           /* mcasp0_axr0.spi1_d1 */
+                               AM4372_IOPAD(0x99c, PIN_OUTPUT | MUX_MODE3)          /* mcasp0_ahclkr.spi1_cs0 */
                        >;
                };
 
                mmc1_pins: pinmux_mmc1_pins {
                        pinctrl-single,pins = <
-                               0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+                               AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
                        >;
                };
 
                qspi1_default: qspi1_default {
                        pinctrl-single,pins = <
-                               0x7c (PIN_INPUT_PULLUP | MUX_MODE3)
-                               0x88 (PIN_INPUT_PULLUP | MUX_MODE2)
-                               0x90 (PIN_INPUT_PULLUP | MUX_MODE3)
-                               0x94 (PIN_INPUT_PULLUP | MUX_MODE3)
-                               0x98 (PIN_INPUT_PULLUP | MUX_MODE3)
-                               0x9c (PIN_INPUT_PULLUP | MUX_MODE3)
+                               AM4372_IOPAD(0x87c, PIN_INPUT_PULLUP | MUX_MODE3)
+                               AM4372_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE2)
+                               AM4372_IOPAD(0x890, PIN_INPUT_PULLUP | MUX_MODE3)
+                               AM4372_IOPAD(0x894, PIN_INPUT_PULLUP | MUX_MODE3)
+                               AM4372_IOPAD(0x898, PIN_INPUT_PULLUP | MUX_MODE3)
+                               AM4372_IOPAD(0x89c, PIN_INPUT_PULLUP | MUX_MODE3)
                        >;
                };
 
                pixcir_ts_pins: pixcir_ts_pins {
                        pinctrl-single,pins = <
-                               0x44 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_a1.gpio1_17 */
+                               AM4372_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE7)       /* gpmc_a1.gpio1_17 */
                        >;
                };
 
                hdq_pins: pinmux_hdq_pins {
                        pinctrl-single,pins = <
-                               0x234 (PIN_INPUT_PULLUP | MUX_MODE1)    /* cam1_wen.hdq_gpio */
+                               AM4372_IOPAD(0xa34, PIN_INPUT_PULLUP | MUX_MODE1)    /* cam1_wen.hdq_gpio */
                        >;
                };
 
                dss_pins: dss_pins {
                        pinctrl-single,pins = <
-                               0x020 (PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
-                               0x024 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x028 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x02C (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x030 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x034 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x038 (PIN_OUTPUT_PULLUP | MUX_MODE1)
-                               0x03C (PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
-                               0x0A0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
-                               0x0A4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0A8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0AC (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0B0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0B4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0B8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0BC (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0C0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0C4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0C8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0CC (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0D0 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0D4 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0D8 (PIN_OUTPUT_PULLUP | MUX_MODE0)
-                               0x0DC (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
-                               0x0E0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
-                               0x0E4 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
-                               0x0E8 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
-                               0x0EC (PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
+                               AM4372_IOPAD(0x820, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
+                               AM4372_IOPAD(0x824, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x828, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x82c, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x830, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x834, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x838, PIN_OUTPUT_PULLUP | MUX_MODE1)
+                               AM4372_IOPAD(0x83c, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
+                               AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
+                               AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8B8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
+                               AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
+                               AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
+                               AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
+                               AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
+                               AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
                        >;
                };
 
                display_mux_pins: display_mux_pins {
                        pinctrl-single,pins = <
                                /* GPMC CLK -> GPIO 2_1 to select LCD / HDMI */
-                               0x08C (PIN_OUTPUT_PULLUP | MUX_MODE7)
+                               AM4372_IOPAD(0x88C, PIN_OUTPUT_PULLUP | MUX_MODE7)
                        >;
                };
 
                vpfe1_pins_default: vpfe1_pins_default {
                        pinctrl-single,pins = <
-                               0x1cc (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data9 mode 0 */
-                               0x1d0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data8 mode 0 */
-                               0x1d4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_hd mode 0 */
-                               0x1d8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_vd mode 0 */
-                               0x1dc (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_pclk mode 0 */
-                               0x1e8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data0 mode 0 */
-                               0x1ec (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data1 mode 0 */
-                               0x1f0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data2 mode 0 */
-                               0x1f4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data3 mode 0 */
-                               0x1f8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data4 mode 0 */
-                               0x1fc (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data5 mode 0 */
-                               0x200 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data6 mode 0 */
-                               0x204 (PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data7 mode 0 */
+                               AM4372_IOPAD(0x9cc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data9 mode 0 */
+                               AM4372_IOPAD(0x9d0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data8 mode 0 */
+                               AM4372_IOPAD(0x9d4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_hd mode 0 */
+                               AM4372_IOPAD(0x9d8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_vd mode 0 */
+                               AM4372_IOPAD(0x9dc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_pclk mode 0 */
+                               AM4372_IOPAD(0x9e8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data0 mode 0 */
+                               AM4372_IOPAD(0x9ec, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data1 mode 0 */
+                               AM4372_IOPAD(0x9f0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data2 mode 0 */
+                               AM4372_IOPAD(0x9f4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data3 mode 0 */
+                               AM4372_IOPAD(0x9f8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data4 mode 0 */
+                               AM4372_IOPAD(0x9fc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data5 mode 0 */
+                               AM4372_IOPAD(0xa00, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data6 mode 0 */
+                               AM4372_IOPAD(0xa04, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data7 mode 0 */
                        >;
                };
 
                vpfe1_pins_sleep: vpfe1_pins_sleep {
                        pinctrl-single,pins = <
-                               0x1cc (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1d0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1d4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1d8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1dc (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1e8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1ec (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1f0 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1f4 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1f8 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x1fc (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x200 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
-                               0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9cc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9d0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9d4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9d8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9dc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9e8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9ec, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9f0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9f4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9f8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0x9fc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0xa00, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
+                               AM4372_IOPAD(0xa04, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
                        >;
                };
 
                mcasp1_pins: mcasp1_pins {
                        pinctrl-single,pins = <
-                               0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_ACLKR/MCASP1_ACLKX */
-                               0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_FSR/MCASP1_FSX */
-                               0x1a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)/* MCASP0_AXR1/MCASP1_AXR0 */
-                               0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_AHCLKX/MCASP1_AXR1 */
+                               AM4372_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_ACLKR/MCASP1_ACLKX */
+                               AM4372_IOPAD(0x9a4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_FSR/MCASP1_FSX */
+                               AM4372_IOPAD(0x9a8, PIN_OUTPUT_PULLDOWN | MUX_MODE3)/* MCASP0_AXR1/MCASP1_AXR0 */
+                               AM4372_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE3) /* MCASP0_AHCLKX/MCASP1_AXR1 */
                        >;
                };
 
                mcasp1_sleep_pins: mcasp1_sleep_pins {
                        pinctrl-single,pins = <
-                               0x1a0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x1a4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
-                               0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x9a4, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x9a8, PIN_INPUT_PULLDOWN | MUX_MODE7)
+                               AM4372_IOPAD(0x9ac, PIN_INPUT_PULLDOWN | MUX_MODE7)
                        >;
                };
 };
index d9ba6b879fc1b25e25f8d006c8b57ab722310c7d..36c0fa6c362ae32000701ffec7e81df73f2a187a 100644 (file)
 &dra7_pmx_core {
        leds_pins_default: leds_pins_default {
                pinctrl-single,pins = <
-                       0x3a8 (PIN_OUTPUT | MUX_MODE14) /* spi1_d1.gpio7_8 */
-                       0x3ac (PIN_OUTPUT | MUX_MODE14) /* spi1_d0.gpio7_9 */
-                       0x3c0 (PIN_OUTPUT | MUX_MODE14) /* spi2_sclk.gpio7_14 */
-                       0x3c4 (PIN_OUTPUT | MUX_MODE14) /* spi2_d1.gpio7_15 */
+                       DRA7XX_CORE_IOPAD(0x37a8, PIN_OUTPUT | MUX_MODE14)      /* spi1_d1.gpio7_8 */
+                       DRA7XX_CORE_IOPAD(0x37ac, PIN_OUTPUT | MUX_MODE14)      /* spi1_d0.gpio7_9 */
+                       DRA7XX_CORE_IOPAD(0x37c0, PIN_OUTPUT | MUX_MODE14)      /* spi2_sclk.gpio7_14 */
+                       DRA7XX_CORE_IOPAD(0x37c4, PIN_OUTPUT | MUX_MODE14)      /* spi2_d1.gpio7_15 */
                >;
        };
 
        i2c1_pins_default: i2c1_pins_default {
                pinctrl-single,pins = <
-                       0x400 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_sda.sda */
-                       0x404 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_scl.scl */
+                       DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda.sda */
+                       DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl.scl */
                >;
        };
 
        hdmi_pins: pinmux_hdmi_pins {
                pinctrl-single,pins = <
-                       0x408 (PIN_INPUT | MUX_MODE1)   /* i2c2_sda.hdmi1_ddc_scl */
-                       0x40c (PIN_INPUT | MUX_MODE1)   /* i2c2_scl.hdmi1_ddc_sda */
+                       DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1)        /* i2c2_sda.hdmi1_ddc_scl */
+                       DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1)        /* i2c2_scl.hdmi1_ddc_sda */
                >;
        };
 
        i2c3_pins_default: i2c3_pins_default {
                pinctrl-single,pins = <
-                       0x2a4 (PIN_INPUT| MUX_MODE10)   /* mcasp1_aclkx.i2c3_sda */
-                       0x2a8 (PIN_INPUT| MUX_MODE10)   /* mcasp1_fsx.i2c3_scl */
+                       DRA7XX_CORE_IOPAD(0x36a4, PIN_INPUT| MUX_MODE10)        /* mcasp1_aclkx.i2c3_sda */
+                       DRA7XX_CORE_IOPAD(0x36a8, PIN_INPUT| MUX_MODE10)        /* mcasp1_fsx.i2c3_scl */
                >;
        };
 
        uart3_pins_default: uart3_pins_default {
                pinctrl-single,pins = <
-                       0x3f8 (PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */
-                       0x3fc (PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */
+                       DRA7XX_CORE_IOPAD(0x37f8, PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */
+                       DRA7XX_CORE_IOPAD(0x37fc, PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */
                >;
        };
 
        mmc1_pins_default: mmc1_pins_default {
                pinctrl-single,pins = <
-                       0x36c (PIN_INPUT | MUX_MODE14)  /* mmc1sdcd.gpio219 */
-                       0x354 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
-                       0x358 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
-                       0x35c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
-                       0x360 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
-                       0x364 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
-                       0x368 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
+                       DRA7XX_CORE_IOPAD(0x376c, PIN_INPUT | MUX_MODE14)       /* mmc1sdcd.gpio219 */
+                       DRA7XX_CORE_IOPAD(0x3754, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
+                       DRA7XX_CORE_IOPAD(0x3758, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
+                       DRA7XX_CORE_IOPAD(0x375c, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
+                       DRA7XX_CORE_IOPAD(0x3760, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
+                       DRA7XX_CORE_IOPAD(0x3764, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
+                       DRA7XX_CORE_IOPAD(0x3768, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
                >;
        };
 
        mmc2_pins_default: mmc2_pins_default {
                pinctrl-single,pins = <
-                       0x9c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
-                       0xb0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
-                       0xa0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
-                       0xa4 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
-                       0xa8 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
-                       0xac (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
-                       0x8c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
-                       0x90 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
-                       0x94 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
-                       0x98 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
+                       DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
+                       DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
+                       DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
+                       DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
+                       DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
+                       DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
+                       DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
+                       DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
+                       DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
+                       DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
                >;
        };
 
        cpsw_pins_default: cpsw_pins_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x250 (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_tclk */
-                       0x254 (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_tctl */
-                       0x258 (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_td3 */
-                       0x25c (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_td2 */
-                       0x260 (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_td1 */
-                       0x264 (PIN_OUTPUT | MUX_MODE0)  /* rgmii1_td0 */
-                       0x268 (PIN_INPUT | MUX_MODE0)   /* rgmii1_rclk */
-                       0x26c (PIN_INPUT | MUX_MODE0)   /* rgmii1_rctl */
-                       0x270 (PIN_INPUT | MUX_MODE0)   /* rgmii1_rd3 */
-                       0x274 (PIN_INPUT | MUX_MODE0)   /* rgmii1_rd2 */
-                       0x278 (PIN_INPUT | MUX_MODE0)   /* rgmii1_rd1 */
-                       0x27c (PIN_INPUT | MUX_MODE0)   /* rgmii1_rd0 */
+                       DRA7XX_CORE_IOPAD(0x3650, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_tclk */
+                       DRA7XX_CORE_IOPAD(0x3654, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_tctl */
+                       DRA7XX_CORE_IOPAD(0x3658, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_td3 */
+                       DRA7XX_CORE_IOPAD(0x365c, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_td2 */
+                       DRA7XX_CORE_IOPAD(0x3660, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_td1 */
+                       DRA7XX_CORE_IOPAD(0x3664, PIN_OUTPUT | MUX_MODE0)       /* rgmii1_td0 */
+                       DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE0)        /* rgmii1_rclk */
+                       DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE0)        /* rgmii1_rctl */
+                       DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE0)        /* rgmii1_rd3 */
+                       DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT | MUX_MODE0)        /* rgmii1_rd2 */
+                       DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT | MUX_MODE0)        /* rgmii1_rd1 */
+                       DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT | MUX_MODE0)        /* rgmii1_rd0 */
 
                        /* Slave 2 */
-                       0x198 (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_tclk */
-                       0x19c (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_tctl */
-                       0x1a0 (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_td3 */
-                       0x1a4 (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_td2 */
-                       0x1a8 (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_td1 */
-                       0x1ac (PIN_OUTPUT | MUX_MODE3)  /* rgmii2_td0 */
-                       0x1b0 (PIN_INPUT | MUX_MODE3)   /* rgmii2_rclk */
-                       0x1b4 (PIN_INPUT | MUX_MODE3)   /* rgmii2_rctl */
-                       0x1b8 (PIN_INPUT | MUX_MODE3)   /* rgmii2_rd3 */
-                       0x1bc (PIN_INPUT | MUX_MODE3)   /* rgmii2_rd2 */
-                       0x1c0 (PIN_INPUT | MUX_MODE3)   /* rgmii2_rd1 */
-                       0x1c4 (PIN_INPUT | MUX_MODE3)   /* rgmii2_rd0 */
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_tclk */
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_tctl */
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_td3 */
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_td2 */
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_td1 */
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3)       /* rgmii2_td0 */
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE3)        /* rgmii2_rclk */
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE3)        /* rgmii2_rctl */
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE3)        /* rgmii2_rd3 */
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE3)        /* rgmii2_rd2 */
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE3)        /* rgmii2_rd1 */
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE3)        /* rgmii2_rd0 */
                >;
 
        };
        cpsw_pins_sleep: cpsw_pins_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x250 (PIN_INPUT | MUX_MODE15)
-                       0x254 (PIN_INPUT | MUX_MODE15)
-                       0x258 (PIN_INPUT | MUX_MODE15)
-                       0x25c (PIN_INPUT | MUX_MODE15)
-                       0x260 (PIN_INPUT | MUX_MODE15)
-                       0x264 (PIN_INPUT | MUX_MODE15)
-                       0x268 (PIN_INPUT | MUX_MODE15)
-                       0x26c (PIN_INPUT | MUX_MODE15)
-                       0x270 (PIN_INPUT | MUX_MODE15)
-                       0x274 (PIN_INPUT | MUX_MODE15)
-                       0x278 (PIN_INPUT | MUX_MODE15)
-                       0x27c (PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3650, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3654, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3658, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x365c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3660, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3664, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT | MUX_MODE15)
 
                        /* Slave 2 */
-                       0x198 (PIN_INPUT | MUX_MODE15)
-                       0x19c (PIN_INPUT | MUX_MODE15)
-                       0x1a0 (PIN_INPUT | MUX_MODE15)
-                       0x1a4 (PIN_INPUT | MUX_MODE15)
-                       0x1a8 (PIN_INPUT | MUX_MODE15)
-                       0x1ac (PIN_INPUT | MUX_MODE15)
-                       0x1b0 (PIN_INPUT | MUX_MODE15)
-                       0x1b4 (PIN_INPUT | MUX_MODE15)
-                       0x1b8 (PIN_INPUT | MUX_MODE15)
-                       0x1bc (PIN_INPUT | MUX_MODE15)
-                       0x1c0 (PIN_INPUT | MUX_MODE15)
-                       0x1c4 (PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE15)
                >;
        };
 
        davinci_mdio_pins_default: davinci_mdio_pins_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* mdio_mclk */
-                       0x240 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mdio_d */
+                       DRA7XX_CORE_IOPAD(0x363c, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* mdio_mclk */
+                       DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLUP | MUX_MODE0) /* mdio_d */
                >;
        };
 
        davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
                pinctrl-single,pins = <
-                       0x23c (PIN_INPUT | MUX_MODE15)
-                       0x240 (PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x363c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT | MUX_MODE15)
                >;
        };
 
        tps659038_pins_default: tps659038_pins_default {
                pinctrl-single,pins = <
-                       0x418 (PIN_INPUT_PULLUP | MUX_MODE14)   /* wakeup0.gpio1_0 */
+                       DRA7XX_CORE_IOPAD(0x3818, PIN_INPUT_PULLUP | MUX_MODE14)        /* wakeup0.gpio1_0 */
                >;
        };
 
        tmp102_pins_default: tmp102_pins_default {
                pinctrl-single,pins = <
-                       0x3C8 (PIN_INPUT_PULLUP | MUX_MODE14)   /* spi2_d0.gpio7_16 */
+                       DRA7XX_CORE_IOPAD(0x37c8, PIN_INPUT_PULLUP | MUX_MODE14)        /* spi2_d0.gpio7_16 */
                >;
        };
 
        mcp79410_pins_default: mcp79410_pins_default {
                pinctrl-single,pins = <
-                       0x424 (PIN_INPUT_PULLUP | MUX_MODE1)    /* wakeup3.sys_nirq1 */
+                       DRA7XX_CORE_IOPAD(0x3824, PIN_INPUT_PULLUP | MUX_MODE1) /* wakeup3.sys_nirq1 */
                >;
        };
 
        usb1_pins: pinmux_usb1_pins {
                pinctrl-single,pins = <
-                       0x280 (PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
+                       DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
                >;
        };
 
        extcon_usb1_pins: extcon_usb1_pins {
                pinctrl-single,pins = <
-                       0x3ec (PIN_INPUT_PULLUP | MUX_MODE14) /* uart1_rtsn.gpio7_25 */
+                       DRA7XX_CORE_IOPAD(0x37ec, PIN_INPUT_PULLUP | MUX_MODE14) /* uart1_rtsn.gpio7_25 */
                >;
        };
 
        tpd12s015_pins: pinmux_tpd12s015_pins {
                pinctrl-single,pins = <
-                       0x3b0 (PIN_OUTPUT | MUX_MODE14)         /* gpio7_10 CT_CP_HPD */
-                       0x3b8 (PIN_INPUT_PULLDOWN | MUX_MODE14) /* gpio7_12 HPD */
-                       0x370 (PIN_OUTPUT | MUX_MODE14)         /* gpio6_28 LS_OE */
+                       DRA7XX_CORE_IOPAD(0x37b0, PIN_OUTPUT | MUX_MODE14)              /* gpio7_10 CT_CP_HPD */
+                       DRA7XX_CORE_IOPAD(0x37b8, PIN_INPUT_PULLDOWN | MUX_MODE14)      /* gpio7_12 HPD */
+                       DRA7XX_CORE_IOPAD(0x3770, PIN_OUTPUT | MUX_MODE14)              /* gpio6_28 LS_OE */
                >;
        };
 
        clkout2_pins_default: clkout2_pins_default {
                pinctrl-single,pins = <
-                       0x294 (PIN_OUTPUT_PULLDOWN | MUX_MODE9) /* xref_clk0.clkout2 */
+                       DRA7XX_CORE_IOPAD(0x3694, PIN_OUTPUT_PULLDOWN | MUX_MODE9)      /* xref_clk0.clkout2 */
                >;
        };
 
        clkout2_pins_sleep: clkout2_pins_sleep {
                pinctrl-single,pins = <
-                       0x294 (PIN_INPUT | MUX_MODE15)  /* xref_clk0.clkout2 */
+                       DRA7XX_CORE_IOPAD(0x3694, PIN_INPUT | MUX_MODE15)       /* xref_clk0.clkout2 */
                >;
        };
 
        mcasp3_pins_default: mcasp3_pins_default {
                pinctrl-single,pins = <
-                       0x324 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx.mcasp3_aclkx */
-                       0x328 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx.mcasp3_fsx */
-                       0x32c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0.mcasp3_axr0 */
-                       0x330 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr1.mcasp3_axr1 */
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx.mcasp3_aclkx */
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx.mcasp3_fsx */
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0.mcasp3_axr0 */
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr1.mcasp3_axr1 */
                >;
        };
 
        mcasp3_pins_sleep: mcasp3_pins_sleep {
                pinctrl-single,pins = <
-                       0x324 (PIN_INPUT | MUX_MODE15)
-                       0x328 (PIN_INPUT | MUX_MODE15)
-                       0x32c (PIN_INPUT | MUX_MODE15)
-                       0x330 (PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT | MUX_MODE15)
                >;
        };
 };
                reg = <0x6f>;
                interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>,
                                      <&dra7_pmx_core 0x424>;
+               interrupt-names = "irq", "wakeup";
 
                pinctrl-names = "default";
                pinctrl-0 = <&mcp79410_pins_default>;
diff --git a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
new file mode 100644 (file)
index 0000000..c538826
--- /dev/null
@@ -0,0 +1,617 @@
+/*
+ * Support for CompuLab CL-SOM-AM57x System-on-Module
+ *
+ * Copyright (C) 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
+ *
+ * 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 published by
+ * the Free Software Foundation.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "dra74x.dtsi"
+
+/ {
+       model = "CompuLab CL-SOM-AM57x";
+       compatible = "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x20000000>; /* 512 MB - minimal configuration */
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_pins_default>;
+
+               led@0 {
+                       label = "cl-som-am57x:green";
+                       gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+       };
+
+       vdd_3v3: fixedregulator-vdd_3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vdd_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       ads7846reg: fixedregulator-ads7846-reg {
+               compatible = "regulator-fixed";
+               regulator-name = "ads7846-reg";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
+       sound0: sound@0 {
+               compatible = "simple-audio-card";
+               simple-audio-card,name = "CL-SOM-AM57x-Sound-Card";
+               simple-audio-card,format = "i2s";
+               simple-audio-card,bitclock-master = <&dailink0_master>;
+               simple-audio-card,frame-master = <&dailink0_master>;
+               simple-audio-card,widgets =
+                                       "Headphone", "Headphone Jack",
+                                       "Microphone", "Microphone Jack",
+                                       "Line", "Line Jack";
+               simple-audio-card,routing =
+                                       "Headphone Jack", "RHPOUT",
+                                       "Headphone Jack", "LHPOUT",
+                                       "LLINEIN", "Line Jack",
+                                       "MICIN", "Mic Bias",
+                                       "Mic Bias", "Microphone Jack";
+
+               dailink0_master: simple-audio-card,cpu {
+                       sound-dai = <&mcasp3>;
+               };
+
+               simple-audio-card,codec {
+                       sound-dai = <&wm8731>;
+                       system-clock-frequency = <12000000>;
+               };
+       };
+};
+
+&dra7_pmx_core {
+       leds_pins_default: leds_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x347c, PIN_OUTPUT | MUX_MODE14)      /* gpmc_a15.gpio2_5 */
+               >;
+       };
+
+       i2c1_pins_default: i2c1_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_sda.sda */
+                       DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT_PULLUP | MUX_MODE0) /* i2c1_scl.scl */
+               >;
+       };
+
+       i2c3_pins_default: i2c3_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x36a4, PIN_INPUT| MUX_MODE10)        /* mcasp1_aclkx.i2c3_sda */
+                       DRA7XX_CORE_IOPAD(0x36a8, PIN_INPUT| MUX_MODE10)        /* mcasp1_fsx.i2c3_scl */
+               >;
+       };
+
+       i2c4_pins_default: i2c4_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x36ac, PIN_INPUT| MUX_MODE10)        /* mcasp1_acl.i2c4_sda */
+                       DRA7XX_CORE_IOPAD(0x36b0, PIN_INPUT| MUX_MODE10)        /* mcasp1_fsr.i2c4_scl */
+               >;
+       };
+
+       tps659038_pins_default: tps659038_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3818, PIN_INPUT_PULLUP | MUX_MODE14) /* wakeup0.gpio1_0 */
+               >;
+       };
+
+       mmc2_pins_default: mmc2_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
+                       DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
+                       DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
+                       DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
+                       DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
+                       DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
+                       DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
+                       DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
+                       DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
+                       DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
+               >;
+       };
+
+       qspi1_pins: pinmux_qspi1_pins {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3474, PIN_INPUT | MUX_MODE1)        /* gpmc_a13.qspi1_rtclk */
+                       DRA7XX_CORE_IOPAD(0x3480, PIN_INPUT | MUX_MODE1)        /* gpmc_a16.qspi1_d0 */
+                       DRA7XX_CORE_IOPAD(0x3484, PIN_INPUT | MUX_MODE1)        /* gpmc_a17.qspi1_d1 */
+                       DRA7XX_CORE_IOPAD(0x3488, PIN_INPUT | MUX_MODE1)        /* qpmc_a18.qspi1_sclk */
+                       DRA7XX_CORE_IOPAD(0x34b8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs2.qspi1_cs0 */
+                       DRA7XX_CORE_IOPAD(0x34bc, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs3.qspi1_cs1 */
+               >;
+       };
+
+       cpsw_pins_default: cpsw_pins_default {
+               pinctrl-single,pins = <
+                       /* Slave at addr 0x0 */
+                       DRA7XX_CORE_IOPAD(0x3650, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_tclk */
+                       DRA7XX_CORE_IOPAD(0x3654, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_tctl */
+                       DRA7XX_CORE_IOPAD(0x3658, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_td3 */
+                       DRA7XX_CORE_IOPAD(0x365c, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_td2 */
+                       DRA7XX_CORE_IOPAD(0x3660, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_td1 */
+                       DRA7XX_CORE_IOPAD(0x3664, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_td0 */
+                       DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rclk */
+                       DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rctl */
+                       DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rd3 */
+                       DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rd2 */
+                       DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rd1 */
+                       DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* rgmii0_rd0 */
+
+                       /* Slave at addr 0x1 */
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d12.rgmii1_tclk */
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d13.rgmii1_tctl */
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d14.rgmii1_td3 */
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d15.rgmii1_td2 */
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d16.rgmii1_td1 */
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d17.rgmii1_td0 */
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d18.rgmii1_rclk */
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d19.rgmii1_rctl */
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d20.rgmii1_rd3 */
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d21.rgmii1_rd2 */
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d22.rgmii1_rd1 */
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT_PULLUP | MUX_MODE3) /* vin2a_d23.rgmii1_rd0 */
+               >;
+       };
+
+       cpsw_pins_sleep: cpsw_pins_sleep {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       DRA7XX_CORE_IOPAD(0x3650, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3654, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3658, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x365c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3660, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3664, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT | MUX_MODE15)
+
+                       /* Slave 2 */
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE15)
+               >;
+       };
+
+       davinci_mdio_pins_default: davinci_mdio_pins_default {
+               pinctrl-single,pins = <
+                       /* MDIO */
+                       DRA7XX_CORE_IOPAD(0x3590, PIN_OUTPUT_PULLUP | MUX_MODE3)/* vin2a_d10.mdio_mclk */
+                       DRA7XX_CORE_IOPAD(0x3594, PIN_INPUT_PULLUP | MUX_MODE3) /* vin2a_d11.mdio_d */
+               >;
+       };
+
+       davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3590, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3594, PIN_INPUT | MUX_MODE15)
+               >;
+       };
+
+       ads7846_pins: pinmux_ads7846_pins {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3464, PIN_INPUT_PULLDOWN | MUX_MODE14) /* gpmc_a9.gpio1_31 */
+               >;
+       };
+
+       mcasp3_pins_default: mcasp3_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx.mcasp3_aclkx */
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx.mcasp3_fsx */
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0.mcasp3_axr0 */
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr1.mcasp3_axr1 */
+               >;
+       };
+
+       mcasp3_pins_sleep: mcasp3_pins_sleep {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_INPUT | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT | MUX_MODE15)
+               >;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_default>;
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pins_default>;
+       clock-frequency = <400000>;
+};
+
+&i2c4 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_pins_default>;
+       clock-frequency = <400000>;
+
+       tps659038: tps659038@58 {
+               compatible = "ti,tps659038";
+               reg = <0x58>;
+               interrupt-parent = <&gpio1>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&tps659038_pins_default>;
+
+               #interrupt-cells = <2>;
+               interrupt-controller;
+
+               ti,system-power-controller;
+
+               tps659038_pmic {
+                       compatible = "ti,tps659038-pmic";
+
+                       regulators {
+                               smps12_reg: smps12 {
+                                       /* VDD_MPU */
+                                       regulator-name = "smps12";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps3_reg: smps3 {
+                                       /* VDD_DDR */
+                                       regulator-name = "smps3";
+                                       regulator-min-microvolt = <1500000>;
+                                       regulator-max-microvolt = <1500000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps45_reg: smps45 {
+                                       /* VDD_DSPEVE */
+                                       regulator-name = "smps45";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps6_reg: smps6 {
+                                       /* VDD_GPU */
+                                       regulator-name = "smps6";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps7_reg: smps7 {
+                                       /* VDD_CORE */
+                                       regulator-name = "smps7";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1160000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps8_reg: smps8 {
+                                       /* VDD_IVA */
+                                       regulator-name = "smps8";
+                                       regulator-min-microvolt = < 850000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               smps9_reg: smps9 {
+                                       /* PMIC_3V3 */
+                                       regulator-name = "smps9";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+
+                               ldo1_reg: ldo1 {
+                                       /* VDD_SD / VDDSHV8  */
+                                       regulator-name = "ldo1";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-boot-on;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: ldo2 {
+                                       /* VDD_1V8 */
+                                       regulator-name = "ldo2";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldo3_reg: ldo3 {
+                                       /* VDDA_1V8_PHYA - supplies VDDA_SATA, VDDA_USB1/2/3 */
+                                       regulator-name = "ldo3";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldo4_reg: ldo4 {
+                                       /* VDDA_1V8_PHYB - supplies VDDA_HDMI, VDDA_PCIE/0/1 */
+                                       regulator-name = "ldo4";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldo9_reg: ldo9 {
+                                       /* VDD_RTC */
+                                       regulator-name = "ldo9";
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldoln_reg: ldoln {
+                                       /* VDDA_1V8_PLL */
+                                       regulator-name = "ldoln";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               ldousb_reg: ldousb {
+                                       /* VDDA_3V_USB: VDDA_USBHS33 */
+                                       regulator-name = "ldousb";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               /* regen1 not used */
+                       };
+               };
+
+               tps659038_pwr_button: tps659038_pwr_button {
+                       compatible = "ti,palmas-pwrbutton";
+                       interrupt-parent = <&tps659038>;
+                       interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
+                       wakeup-source;
+                       ti,palmas-long-press-seconds = <12>;
+               };
+
+               tps659038_gpio: tps659038_gpio {
+                       compatible = "ti,palmas-gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+       };
+
+       rtc0: rtc@56 {
+               compatible = "emmicro,em3027";
+               reg = <0x56>;
+       };
+
+       eeprom_module: atmel@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+
+       wm8731: wm8731@1a {
+               #sound-dai-cells = <0>;
+               compatible = "wlf,wm8731";
+               reg = <0x1a>;
+               status = "okay";
+       };
+};
+
+&cpu0 {
+       cpu0-supply = <&smps12_reg>;
+       voltage-tolerance = <1>;
+};
+
+&sata {
+       status = "okay";
+};
+
+&mailbox5 {
+       status = "okay";
+       mbox_ipu1_ipc3x: mbox_ipu1_ipc3x {
+               status = "okay";
+       };
+       mbox_dsp1_ipc3x: mbox_dsp1_ipc3x {
+               status = "okay";
+       };
+};
+
+&mailbox6 {
+       status = "okay";
+       mbox_ipu2_ipc3x: mbox_ipu2_ipc3x {
+               status = "okay";
+       };
+       mbox_dsp2_ipc3x: mbox_dsp2_ipc3x {
+               status = "okay";
+       };
+};
+
+&mmc2 {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins_default>;
+
+       vmmc-supply = <&vdd_3v3>;
+       bus-width = <8>;
+       ti,non-removable;
+       cap-mmc-dual-data-rate;
+};
+
+&qspi {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&qspi1_pins>;
+
+       spi-max-frequency = <20000000>;
+
+       spi_flash: spi_flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "spansion,m25p80", "jedec,spi-nor";
+               reg = <0>;                              /* CS0 */
+               spi-max-frequency = <20000000>;
+
+               partition@0 {
+                       label = "uboot";
+                       reg = <0x0 0xc0000>;
+               };
+
+               partition@c0000 {
+                       label = "uboot environment";
+                       reg = <0xc0000 0x40000>;
+               };
+
+               partition@100000 {
+                       label = "reserved";
+                       reg = <0x100000 0x0>;
+               };
+       };
+
+       /* touch controller */
+       ads7846@0 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&ads7846_pins>;
+
+               compatible = "ti,ads7846";
+               vcc-supply = <&ads7846reg>;
+
+               reg = <1>;                              /* CS1 */
+               spi-max-frequency = <1500000>;
+
+               interrupt-parent = <&gpio1>;
+               interrupts = <31 0>;
+               pendown-gpio = <&gpio1 31 0>;
+
+
+               ti,x-min = /bits/ 16 <0x0>;
+               ti,x-max = /bits/ 16 <0x0fff>;
+               ti,y-min = /bits/ 16 <0x0>;
+               ti,y-max = /bits/ 16 <0x0fff>;
+
+               ti,x-plate-ohms = /bits/ 16 <180>;
+               ti,pressure-max = /bits/ 16 <255>;
+
+               ti,debounce-max = /bits/ 16 <30>;
+               ti,debounce-tol = /bits/ 16 <10>;
+               ti,debounce-rep = /bits/ 16 <1>;
+
+               linux,wakeup;
+       };
+};
+
+&mac {
+       status = "okay";
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&cpsw_pins_default>;
+       pinctrl-1 = <&cpsw_pins_sleep>;
+       dual_emac;
+};
+
+&cpsw_emac0 {
+       phy_id = <&davinci_mdio>, <0>;
+       phy-mode = "rgmii";
+       dual_emac_res_vlan = <0>;
+};
+
+&cpsw_emac1 {
+       phy_id = <&davinci_mdio>, <1>;
+       phy-mode = "rgmii";
+       dual_emac_res_vlan = <1>;
+};
+
+&davinci_mdio {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&davinci_mdio_pins_default>;
+       pinctrl-1 = <&davinci_mdio_pins_sleep>;
+};
+
+&usb2_phy1 {
+       phy-supply = <&ldousb_reg>;
+};
+
+&usb2_phy2 {
+       phy-supply = <&ldousb_reg>;
+};
+
+&usb1 {
+       dr_mode = "host";
+};
+
+&usb2 {
+       dr_mode = "peripheral";
+};
+
+&mcasp3 {
+       #sound-dai-cells = <0>;
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&mcasp3_pins_default>;
+       pinctrl-1 = <&mcasp3_pins_sleep>;
+       status = "okay";
+
+       op-mode = <0>;  /* MCASP_IIS_MODE */
+       tdm-slots = <2>;
+       /* 4 serializers */
+       serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
+               1 2 0 0
+       >;
+};
+
+&gpio3 {
+       status = "okay";
+       ti,no-reset-on-init;
+};
+
+&gpio2 {
+       status = "okay";
+       ti,no-reset-on-init;
+};
diff --git a/arch/arm/boot/dts/am57xx-sbc-am57x.dts b/arch/arm/boot/dts/am57xx-sbc-am57x.dts
new file mode 100644 (file)
index 0000000..77bb8e1
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Support for CompuLab SBC-AM57x single board computer
+ *
+ * Copyright (C) 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ * Author: Dmitry Lifshitz <lifshitz@compulab.co.il>
+ *
+ * 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 published by
+ * the Free Software Foundation.
+ */
+
+#include "am57xx-cl-som-am57x.dts"
+#include "compulab-sb-som.dtsi"
+
+/ {
+       model = "CompuLab CL-SOM-AM57x on SB-SOM-AM57x";
+       compatible = "compulab,sbc-am57x", "compulab,cl-som-am57x", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
+
+       aliases {
+               display0 = &lcd0;
+               display1 = &hdmi;
+       };
+};
+
+&dra7_pmx_core {
+       uart3_pins_default: uart3_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x37f8, PIN_INPUT_SLEW | MUX_MODE2)   /* uart2_ctsn.uart3_rxd */
+                       DRA7XX_CORE_IOPAD(0x37fc, PIN_INPUT_SLEW | MUX_MODE1)   /* uart2_rtsn.uart3_txd */
+               >;
+       };
+
+       mmc1_pins_default: mmc1_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3754, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
+                       DRA7XX_CORE_IOPAD(0x3758, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
+                       DRA7XX_CORE_IOPAD(0x375c, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
+                       DRA7XX_CORE_IOPAD(0x3760, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
+                       DRA7XX_CORE_IOPAD(0x3764, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
+                       DRA7XX_CORE_IOPAD(0x3768, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
+                       DRA7XX_CORE_IOPAD(0x376c, PIN_INPUT | MUX_MODE14)       /* mmc1_sdcd.gpio6_27 */
+                       DRA7XX_CORE_IOPAD(0x377c, PIN_INPUT | MUX_MODE14)       /* mmc1_sdwp.gpio6_28 */
+               >;
+       };
+
+       usb1_pins: pinmux_usb1_pins {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
+               >;
+       };
+
+       i2c5_pins_default: i2c5_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x36b4, PIN_INPUT| MUX_MODE10)        /* mcasp1_axr0.i2c5_sda */
+                       DRA7XX_CORE_IOPAD(0x36b8, PIN_INPUT| MUX_MODE10)        /* mcasp1_axr1.i2c5_scl */
+               >;
+       };
+
+       lcd_pins_default: lcd_pins_default {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3564, PIN_OUTPUT | MUX_MODE14)      /* vin2a_vsync0.gpio4_0 */
+               >;
+       };
+
+       hdmi_pins: pinmux_hdmi_pins {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1)        /* i2c2_sda.hdmi1_ddc_scl */
+                       DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1)        /* i2c2_scl.hdmi1_ddc_sda */
+               >;
+       };
+
+       hdmi_conn_pins: pinmux_hdmi_conn_pins {
+               pinctrl-single,pins = <
+                       DRA7XX_CORE_IOPAD(0x37b8, PIN_INPUT | MUX_MODE14)       /* spi1_cs2.gpio7_12 */
+               >;
+       };
+};
+
+&uart3 {
+       status = "okay";
+       interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
+                             <&dra7_pmx_core 0x3f8>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_pins_default>;
+};
+
+&mmc1 {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins_default>;
+
+       vmmc-supply = <&ldo1_reg>;
+       bus-width = <4>;
+       cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
+};
+
+&usb1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb1_pins>;
+};
+
+&i2c5 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c5_pins_default>;
+       clock-frequency = <400000>;
+
+       eeprom_base: atmel@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+
+       pca9555: pca9555@20 {
+               compatible = "nxp,pca9555";
+               reg = <0x20>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+};
+
+&dss {
+       status = "ok";
+
+       vdda_video-supply = <&ldoln_reg>;
+
+       port {
+               dpi_lcd_out: endpoint@0 {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <24>;
+               };
+       };
+};
+
+&lcd0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&lcd_pins_default>;
+
+       enable-gpios = <&pca9555 14 GPIO_ACTIVE_HIGH
+                       &gpio4 0 GPIO_ACTIVE_HIGH>;
+
+       port {
+               lcd_in: endpoint {
+                       remote-endpoint = <&dpi_lcd_out>;
+                       data-lines = <24>;
+               };
+       };
+};
+
+&hdmi {
+       status = "ok";
+       vdda-supply = <&ldo4_reg>;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&hdmi_pins>;
+
+       port {
+               hdmi_out: endpoint {
+                       remote-endpoint = <&hdmi_connector_in>;
+                       lanes = <1 0 3 2 5 4 7 6>;
+               };
+       };
+};
+
+&hdmi_conn {
+       pinctrl-names = "default";
+       pinctrl-0 = <&hdmi_conn_pins>;
+
+       hpd-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+
+       port {
+               hdmi_connector_in: endpoint {
+                       remote-endpoint = <&hdmi_out>;
+               };
+       };
+};
index 4e0ad3b827962831fe7d3e0d5a325d33b420381f..0962f2fa3f6e74d3f253593720689cf934dd56b0 100644 (file)
                        label = "keyswitch_in";
                        gpios = <&pioB 1 GPIO_ACTIVE_HIGH>;
                        linux,code = <28>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                error_in {
                        label = "error_in";
                        gpios = <&pioB 2 GPIO_ACTIVE_HIGH>;
                        linux,code = <29>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                btn {
                        label = "btn";
                        gpios = <&pioC 23 GPIO_ACTIVE_HIGH>;
                        linux,code = <31>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
new file mode 100644 (file)
index 0000000..896bd21
--- /dev/null
@@ -0,0 +1,668 @@
+/*
+ * Copyright 2015 Linaro Ltd
+ *
+ * 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 <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "skeleton.dtsi"
+
+/ {
+       model = "ARM RealView PB11MPcore";
+       compatible = "arm,realview-pb11mp";
+
+       chosen { };
+
+       aliases {
+               serial0 = &pb11mp_serial0;
+               serial1 = &pb11mp_serial1;
+               serial2 = &pb11mp_serial2;
+               serial3 = &pb11mp_serial3;
+       };
+
+       memory {
+               /*
+                * The PB11MPCore has 512 MiB memory @ 0x70000000
+                * and the first 256 are also remapped @ 0x00000000
+                */
+               reg = <0x70000000 0x20000000>;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "arm,realview-smp";
+
+               MP11_0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       reg = <0>;
+                       next-level-cache = <&L2>;
+               };
+
+               MP11_1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       reg = <1>;
+                       next-level-cache = <&L2>;
+               };
+
+               MP11_2: cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       reg = <2>;
+                       next-level-cache = <&L2>;
+               };
+
+               MP11_3: cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,arm11mpcore";
+                       reg = <3>;
+                       next-level-cache = <&L2>;
+               };
+       };
+
+       /* Primary TestChip GIC synthesized with the CPU */
+       intc_tc11mp: interrupt-controller@1f000100 {
+               compatible = "arm,tc11mp-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <1>;
+               interrupt-controller;
+               reg = <0x1f001000 0x1000>,
+                     <0x1f000100 0x100>;
+       };
+
+       L2: l2-cache {
+               compatible = "arm,l220-cache";
+               reg = <0x1f002000 0x1000>;
+               interrupt-parent = <&intc_tc11mp>;
+               interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 30 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 31 IRQ_TYPE_LEVEL_HIGH>;
+               cache-unified;
+               cache-level = <2>;
+       };
+
+       scu@1f000000 {
+               compatible = "arm,arm11mp-scu";
+               reg = <0x1f000000 0x100>;
+       };
+
+       timer@1f000600 {
+               compatible = "arm,arm11mp-twd-timer";
+               reg = <0x1f000600 0x20>;
+               interrupt-parent = <&intc_tc11mp>;
+               interrupts = <1 13 0xf04>;
+       };
+
+       watchdog@1f000620 {
+               compatible = "arm,arm11mp-twd-wdt";
+               reg = <0x1f000620 0x20>;
+               interrupt-parent = <&intc_tc11mp>;
+               interrupts = <1 14 0xf04>;
+       };
+
+       /* PMU with one IRQ line per core */
+       pmu {
+               compatible = "arm,arm11mpcore-pmu";
+               interrupt-parent = <&intc_tc11mp>;
+               interrupts = <0 17 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 18 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 19 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 20 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&MP11_0>, <&MP11_1>, <&MP11_2>, <&MP11_3>;
+       };
+
+       /* The voltage to the MMC card is hardwired at 3.3V */
+       vmmc: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+        };
+
+       veth: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "veth";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+       };
+
+       xtal24mhz: xtal24mhz@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+       };
+
+       refclk32khz: refclk32khz {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+       };
+
+       timclk: timclk@1M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <24>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       mclk: mclk@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <1>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       kmiclk: kmiclk@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <1>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       sspclk: sspclk@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <1>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       uartclk: uartclk@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <1>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       wdogclk: wdogclk@24M {
+               #clock-cells = <0>;
+               compatible = "fixed-factor-clock";
+               clock-div = <1>;
+               clock-mult = <1>;
+               clocks = <&xtal24mhz>;
+       };
+
+       /* FIXME: this actually hangs off the PLL clocks */
+       pclk: pclk@0 {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <0>;
+       };
+
+       flash0@40000000 {
+               /* 2 * 32MiB NOR Flash memory */
+               compatible = "arm,vexpress-flash", "cfi-flash";
+               reg = <0x40000000 0x04000000>;
+               bank-width = <4>;
+       };
+
+       flash1@44000000 {
+               // 2 * 32MiB NOR Flash memory
+               compatible = "arm,vexpress-flash", "cfi-flash";
+               reg = <0x44000000 0x04000000>;
+               bank-width = <4>;
+       };
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "arm,realview-pb11mp-soc", "simple-bus";
+               regmap = <&pb11mp_syscon>;
+               ranges;
+
+               pb11mp_syscon: syscon@10000000 {
+                       compatible = "arm,realview-pb11mp-syscon", "syscon", "simple-mfd";
+                       reg = <0x10000000 0x1000>;
+
+                       led@08.0 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x01>;
+                               label = "versatile:0";
+                               linux,default-trigger = "heartbeat";
+                               default-state = "on";
+                       };
+                       led@08.1 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x02>;
+                               label = "versatile:1";
+                               linux,default-trigger = "mmc0";
+                               default-state = "off";
+                       };
+                       led@08.2 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x04>;
+                               label = "versatile:2";
+                               linux,default-trigger = "cpu0";
+                               default-state = "off";
+                       };
+                       led@08.3 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x08>;
+                               label = "versatile:3";
+                               linux,default-trigger = "cpu1";
+                               default-state = "off";
+                       };
+                       led@08.4 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x10>;
+                               label = "versatile:4";
+                               linux,default-trigger = "cpu2";
+                               default-state = "off";
+                       };
+                       led@08.5 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x20>;
+                               label = "versatile:5";
+                               linux,default-trigger = "cpu3";
+                               default-state = "off";
+                       };
+                       led@08.6 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x40>;
+                               label = "versatile:6";
+                               default-state = "off";
+                       };
+                       led@08.7 {
+                               compatible = "register-bit-led";
+                               offset = <0x08>;
+                               mask = <0x80>;
+                               label = "versatile:7";
+                               default-state = "off";
+                       };
+
+                       oscclk0: osc0@0c {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0x0C>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk1: osc1@10 {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0x10>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk2: osc2@14 {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0x14>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk3: osc3@18 {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0x18>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk4: osc4@1c {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0x1c>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk5: osc5@d4 {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0xd4>;
+                               clocks = <&xtal24mhz>;
+                       };
+                       oscclk6: osc6@d8 {
+                               compatible = "arm,syscon-icst307";
+                               #clock-cells = <0>;
+                               lock-offset = <0x20>;
+                               vco-offset = <0xd8>;
+                               clocks = <&xtal24mhz>;
+                       };
+               };
+
+               sp810_syscon: sysctl@10001000 {
+                       compatible = "arm,sp810", "arm,primecell";
+                       reg = <0x10001000 0x1000>;
+                       clocks = <&refclk32khz>, <&timclk>, <&xtal24mhz>;
+                       clock-names = "refclk", "timclk", "apb_pclk";
+                       #clock-cells = <1>;
+                       clock-output-names = "timerclk0",
+                                            "timerclk1",
+                                            "timerclk2",
+                                            "timerclk3";
+                       assigned-clocks = <&sp810_syscon 0>,
+                                         <&sp810_syscon 1>,
+                                         <&sp810_syscon 2>,
+                                         <&sp810_syscon 3>;
+                       assigned-clock-parents = <&timclk>,
+                                              <&timclk>,
+                                              <&timclk>,
+                                              <&timclk>;
+               };
+
+               i2c0: i2c@10002000 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       compatible = "arm,versatile-i2c";
+                       reg = <0x10002000 0x1000>;
+
+                       rtc@68 {
+                               compatible = "dallas,ds1338";
+                               reg = <0x68>;
+                       };
+               };
+
+               aaci: aaci@10004000 {
+                       compatible = "arm,pl041", "arm,primecell";
+                       reg = <0x10004000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&pclk>;
+                       clock-names = "apb_pclk";
+               };
+
+               mci: mmcsd@10005000 {
+                       compatible = "arm,pl18x", "arm,primecell";
+                       reg = <0x10005000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>,
+                                       <0 15 IRQ_TYPE_LEVEL_HIGH>;
+                       /* Due to frequent FIFO overruns, use just 500 kHz */
+                       max-frequency = <500000>;
+                       bus-width = <4>;
+                       cap-sd-highspeed;
+                       cap-mmc-highspeed;
+                       clocks = <&mclk>, <&pclk>;
+                       clock-names = "mclk", "apb_pclk";
+                       vmmc-supply = <&vmmc>;
+                       cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+                       wp-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
+               };
+
+               kmi0: kmi@10006000 {
+                       compatible = "arm,pl050", "arm,primecell";
+                       reg = <0x10006000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&kmiclk>, <&pclk>;
+                       clock-names = "KMIREFCLK", "apb_pclk";
+               };
+
+               kmi1: kmi@10007000 {
+                       compatible = "arm,pl050", "arm,primecell";
+                       reg = <0x10007000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&kmiclk>, <&pclk>;
+                       clock-names = "KMIREFCLK", "apb_pclk";
+               };
+
+               pb11mp_serial0: serial@10009000 {
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0x10009000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&uartclk>, <&pclk>;
+                       clock-names = "uartclk", "apb_pclk";
+               };
+
+               pb11mp_serial1: serial@1000a000 {
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0x1000a000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&uartclk>, <&pclk>;
+                       clock-names = "uartclk", "apb_pclk";
+               };
+
+               pb11mp_serial2: serial@1000b000 {
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0x1000b000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&uartclk>, <&pclk>;
+                       clock-names = "uartclk", "apb_pclk";
+               };
+
+               pb11mp_serial3: serial@1000c000 {
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0x1000c000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&uartclk>, <&pclk>;
+                       clock-names = "uartclk", "apb_pclk";
+               };
+
+               ssp@1000d000 {
+                       compatible = "arm,pl022", "arm,primecell";
+                       reg = <0x1000d000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&sspclk>, <&pclk>;
+                       clock-names = "SSPCLK", "apb_pclk";
+               };
+
+               watchdog@1000f000 {
+                       compatible = "arm,sp805", "arm,primecell";
+                       reg = <0x1000f000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&wdogclk>, <&pclk>;
+                       clock-names = "wdogclk", "apb_pclk";
+                       status = "disabled";
+               };
+
+               watchdog@10010000 {
+                       compatible = "arm,sp805", "arm,primecell";
+                       reg = <0x10010000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&wdogclk>, <&pclk>;
+                       clock-names = "wdogclk", "apb_pclk";
+               };
+
+               timer01: timer@10011000 {
+                       compatible = "arm,sp804", "arm,primecell";
+                       reg = <0x10011000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 1 IRQ_TYPE_LEVEL_HIGH>;
+                       arm,sp804-has-irq = <1>;
+                       clocks = <&sp810_syscon 0>,
+                                <&sp810_syscon 1>,
+                                <&pclk>;
+                       clock-names = "timerclk0",
+                                   "timerclk1",
+                                   "apb_pclk";
+               };
+
+               timer23: timer@10012000 {
+                       compatible = "arm,sp804", "arm,primecell";
+                       reg = <0x10012000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
+                       arm,sp804-has-irq = <1>;
+                       clocks = <&sp810_syscon 2>,
+                                <&sp810_syscon 3>,
+                                <&pclk>;
+                       clock-names = "timerclk2",
+                                   "timerclk3",
+                                   "apb_pclk";
+               };
+
+               gpio0: gpio@10013000 {
+                       compatible = "arm,pl061", "arm,primecell";
+                       reg = <0x10013000 0x1000>;
+                       gpio-controller;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       clocks = <&pclk>;
+                       clock-names = "apb_pclk";
+               };
+
+               gpio1: gpio@10014000 {
+                       compatible = "arm,pl061", "arm,primecell";
+                       reg = <0x10014000 0x1000>;
+                       gpio-controller;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       clocks = <&pclk>;
+                       clock-names = "apb_pclk";
+               };
+
+               gpio2: gpio@10015000 {
+                       compatible = "arm,pl061", "arm,primecell";
+                       reg = <0x10015000 0x1000>;
+                       gpio-controller;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       clocks = <&pclk>;
+                       clock-names = "apb_pclk";
+               };
+
+               rtc: rtc@10017000 {
+                       compatible = "arm,pl031", "arm,primecell";
+                       reg = <0x10017000 0x1000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&pclk>;
+                       clock-names = "apb_pclk";
+               };
+
+               timer45: timer@10018000 {
+                       compatible = "arm,sp804", "arm,primecell";
+                       reg = <0x10018000 0x1000>;
+                       clocks = <&timclk>, <&pclk>;
+                       clock-names = "timer", "apb_pclk";
+                       status = "disabled";
+               };
+
+               timer67: timer@10019000 {
+                       compatible = "arm,sp804", "arm,primecell";
+                       reg = <0x10019000 0x1000>;
+                       clocks = <&timclk>, <&pclk>;
+                       clock-names = "timer", "apb_pclk";
+                       status = "disabled";
+               };
+
+
+               clcd@10020000 {
+                       compatible = "arm,pl111", "arm,primecell";
+                       reg = <0x10020000 0x1000>;
+                       interrupt-parent = <&intc_pb11mp>;
+                       interrupt-names = "combined";
+                       interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&oscclk4>, <&pclk>;
+                       clock-names = "clcdclk", "apb_pclk";
+                       max-memory-bandwidth = <130000000>; /* 16bpp @ 63.5MHz */
+
+                       port {
+                               clcd_pads: endpoint {
+                                       remote-endpoint = <&clcd_panel>;
+                                       arm,pl11x,tft-r0g0b0-pads = <0 8 16>;
+                               };
+                       };
+
+                       panel {
+                               compatible = "panel-dpi";
+
+                               port {
+                                       clcd_panel: endpoint {
+                                               remote-endpoint = <&clcd_pads>;
+                                       };
+                               };
+
+                               panel-timing {
+                                       clock-frequency = <63500127>;
+                                       hactive = <1024>;
+                                       hback-porch = <152>;
+                                       hfront-porch = <48>;
+                                       hsync-len = <104>;
+                                       vactive = <768>;
+                                       vback-porch = <23>;
+                                       vfront-porch = <3>;
+                                       vsync-len = <4>;
+                               };
+                       };
+               };
+
+               /*
+                * This GIC on the Platform Baseboard is cascaded off the
+                * TestChip GIC
+                */
+               intc_pb11mp: interrupt-controller@1e000000 {
+                       compatible = "arm,arm11mp-gic";
+                       #interrupt-cells = <3>;
+                       #address-cells = <1>;
+                       interrupt-controller;
+                       reg = <0x1e001000 0x1000>,
+                             <0x1e000000 0x100>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               /* SMSC 9118 ethernet with PHY and EEPROM */
+               ethernet@4e000000 {
+                       compatible = "smsc,lan9118", "smsc,lan9115";
+                       reg = <0x4e000000 0x10000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+                       phy-mode = "mii";
+                       reg-io-width = <4>;
+                       smsc,irq-active-high;
+                       smsc,irq-push-pull;
+                       vdd33a-supply = <&veth>;
+                       vddvario-supply = <&veth>;
+               };
+
+               usb@4f000000 {
+                       compatible = "nxp,usb-isp1761";
+                       reg = <0x4f000000 0x20000>;
+                       interrupt-parent = <&intc_tc11mp>;
+                       interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>;
+                       port1-otg;
+               };
+       };
+};
index 5555875f44f9983324266b6e66cda0c69c2e5d10..39181b3fa90d1d3a68745a9f3e2faec83b0d6c9b 100644 (file)
                                isl12057: isl12057@68 {
                                        compatible = "isil,isl12057";
                                        reg = <0x68>;
-                                       isil,irq2-can-wakeup-machine;
+                                       wakeup-source;
                                };
 
                                g762: g762@3e {
index 78b563c02f3c160d5a6ed58703523e1658d25cbd..faa474874cb8e5c4436154cf6dcbf38f7daa60ef 100644 (file)
                                isl12057: isl12057@68 {
                                        compatible = "isil,isl12057";
                                        reg = <0x68>;
-                                       isil,irq2-can-wakeup-machine;
+                                       wakeup-source;
                                };
 
                                g762: g762@3e {
diff --git a/arch/arm/boot/dts/armada-388-clearfog.dts b/arch/arm/boot/dts/armada-388-clearfog.dts
new file mode 100644 (file)
index 0000000..c6e180e
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828)
+ *
+ *  Copyright (C) 2015 Russell King
+ *
+ * This board is in development; the contents of this file work with
+ * the A1 rev 2.0 of the board, which does not represent final
+ * production board.  Things will change, don't expect this file to
+ * remain compatible info the future.
+ *
+ * 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
+ *     version 2 as published by the Free Software Foundation.
+ *
+ *     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 , 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 "armada-388.dtsi"
+#include "armada-38x-solidrun-microsom.dtsi"
+
+/ {
+       model = "SolidRun Clearfog A1";
+       compatible = "solidrun,clearfog-a1", "marvell,armada388",
+               "marvell,armada385", "marvell,armada380";
+
+       aliases {
+               /* So that mvebu u-boot can update the MAC addresses */
+               ethernet1 = &eth0;
+               ethernet2 = &eth1;
+               ethernet3 = &eth2;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       soc {
+               internal-regs {
+                       ethernet@30000 {
+                               phy-mode = "sgmii";
+                               status = "okay";
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+
+                       ethernet@34000 {
+                               phy-mode = "sgmii";
+                               status = "okay";
+
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+
+                       i2c@11000 {
+                               /* Is there anything on this? */
+                               clock-frequency = <100000>;
+                               pinctrl-0 = <&i2c0_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+
+                               /*
+                                * PCA9655 GPIO expander, up to 1MHz clock.
+                                *  0-CON3 CLKREQ#
+                                *  1-CON3 PERST#
+                                *  2-CON2 PERST#
+                                *  3-CON3 W_DISABLE
+                                *  4-CON2 CLKREQ#
+                                *  5-USB3 overcurrent
+                                *  6-USB3 power
+                                *  7-CON2 W_DISABLE
+                                *  8-JP4 P1
+                                *  9-JP4 P4
+                                * 10-JP4 P5
+                                * 11-m.2 DEVSLP
+                                * 12-SFP_LOS
+                                * 13-SFP_TX_FAULT
+                                * 14-SFP_TX_DISABLE
+                                * 15-SFP_MOD_DEF0
+                                */
+                               expander0: gpio-expander@20 {
+                                       /*
+                                        * This is how it should be:
+                                        * compatible = "onnn,pca9655",
+                                        *       "nxp,pca9555";
+                                        * but you can't do this because of
+                                        * the way I2C works.
+                                        */
+                                       compatible = "nxp,pca9555";
+                                       gpio-controller;
+                                       #gpio-cells = <2>;
+                                       reg = <0x20>;
+
+                                       pcie1_0_clkreq {
+                                               gpio-hog;
+                                               gpios = <0 GPIO_ACTIVE_LOW>;
+                                               input;
+                                               line-name = "pcie1.0-clkreq";
+                                       };
+                                       pcie1_0_w_disable {
+                                               gpio-hog;
+                                               gpios = <3 GPIO_ACTIVE_LOW>;
+                                               output-low;
+                                               line-name = "pcie1.0-w-disable";
+                                       };
+                                       pcie2_0_clkreq {
+                                               gpio-hog;
+                                               gpios = <4 GPIO_ACTIVE_LOW>;
+                                               input;
+                                               line-name = "pcie2.0-clkreq";
+                                       };
+                                       pcie2_0_w_disable {
+                                               gpio-hog;
+                                               gpios = <7 GPIO_ACTIVE_LOW>;
+                                               output-low;
+                                               line-name = "pcie2.0-w-disable";
+                                       };
+                                       usb3_ilimit {
+                                               gpio-hog;
+                                               gpios = <5 GPIO_ACTIVE_LOW>;
+                                               input;
+                                               line-name = "usb3-current-limit";
+                                       };
+                                       usb3_power {
+                                               gpio-hog;
+                                               gpios = <6 GPIO_ACTIVE_HIGH>;
+                                               output-high;
+                                               line-name = "usb3-power";
+                                       };
+                                       m2_devslp {
+                                               gpio-hog;
+                                               gpios = <11 GPIO_ACTIVE_HIGH>;
+                                               output-low;
+                                               line-name = "m.2 devslp";
+                                       };
+                                       sfp_los {
+                                               /* SFP loss of signal */
+                                               gpio-hog;
+                                               gpios = <12 GPIO_ACTIVE_HIGH>;
+                                               input;
+                                               line-name = "sfp-los";
+                                       };
+                                       sfp_tx_fault {
+                                               /* SFP laser fault */
+                                               gpio-hog;
+                                               gpios = <13 GPIO_ACTIVE_HIGH>;
+                                               input;
+                                               line-name = "sfp-tx-fault";
+                                       };
+                                       sfp_tx_disable {
+                                               /* SFP transmit disable */
+                                               gpio-hog;
+                                               gpios = <14 GPIO_ACTIVE_HIGH>;
+                                               output-low;
+                                               line-name = "sfp-tx-disable";
+                                       };
+                                       sfp_mod_def0 {
+                                               /* SFP module present */
+                                               gpio-hog;
+                                               gpios = <15 GPIO_ACTIVE_LOW>;
+                                               input;
+                                               line-name = "sfp-mod-def0";
+                                       };
+                               };
+
+                               /* The MCP3021 is 100kHz clock only */
+                               mikrobus_adc: mcp3021@4c {
+                                       compatible = "microchip,mcp3021";
+                                       reg = <0x4c>;
+                               };
+
+                               /* Also something at 0x64 */
+                       };
+
+                       i2c@11100 {
+                               /*
+                                * Routed to SFP, mikrobus, and PCIe.
+                                * SFP limits this to 100kHz, and requires
+                                *  an AT24C01A/02/04 with address pins tied
+                                *  low, which takes addresses 0x50 and 0x51.
+                                * Mikrobus doesn't specify beyond an I2C
+                                *  bus being present.
+                                * PCIe uses ARP to assign addresses, or
+                                *  0x63-0x64.
+                                */
+                               clock-frequency = <100000>;
+                               pinctrl-0 = <&clearfog_i2c1_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+                       };
+
+                       mdio@72004 {
+                               pinctrl-0 = <&mdio_pins>;
+                               pinctrl-names = "default";
+
+                               phy_dedicated: ethernet-phy@0 {
+                                       /*
+                                        * Annoyingly, the marvell phy driver
+                                        * configures the LED register, rather
+                                        * than preserving reset-loaded setting.
+                                        * We undo that rubbish here.
+                                        */
+                                       marvell,reg-init = <3 16 0 0x101e>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       pinctrl@18000 {
+                               clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins {
+                                       marvell,pins = "mpp46";
+                                       marvell,function = "ref";
+                               };
+                               clearfog_dsa0_pins: clearfog-dsa0-pins {
+                                       marvell,pins = "mpp23", "mpp41";
+                                       marvell,function = "gpio";
+                               };
+                               clearfog_i2c1_pins: i2c1-pins {
+                                       /* SFP, PCIe, mSATA, mikrobus */
+                                       marvell,pins = "mpp26", "mpp27";
+                                       marvell,function = "i2c1";
+                               };
+                               clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins {
+                                       marvell,pins = "mpp20";
+                                       marvell,function = "gpio";
+                               };
+                               clearfog_sdhci_pins: clearfog-sdhci-pins {
+                                       marvell,pins = "mpp21", "mpp28",
+                                                      "mpp37", "mpp38",
+                                                      "mpp39", "mpp40";
+                                       marvell,function = "sd0";
+                               };
+                               clearfog_spi1_cs_pins: spi1-cs-pins {
+                                       marvell,pins = "mpp55";
+                                       marvell,function = "spi1";
+                               };
+                               mikro_pins: mikro-pins {
+                                       /* int: mpp22 rst: mpp29 */
+                                       marvell,pins = "mpp22", "mpp29";
+                                       marvell,function = "gpio";
+                               };
+                               mikro_spi_pins: mikro-spi-pins {
+                                       marvell,pins = "mpp43";
+                                       marvell,function = "spi1";
+                               };
+                               mikro_uart_pins: mikro-uart-pins {
+                                       marvell,pins = "mpp24", "mpp25";
+                                       marvell,function = "ua1";
+                               };
+                               rear_button_pins: rear-button-pins {
+                                       marvell,pins = "mpp34";
+                                       marvell,function = "gpio";
+                               };
+                       };
+
+                       sata@a8000 {
+                               /* pinctrl? */
+                               status = "okay";
+                       };
+
+                       sata@e0000 {
+                               /* pinctrl? */
+                               status = "okay";
+                       };
+
+                       sdhci@d8000 {
+                               bus-width = <4>;
+                               cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+                               no-1-8-v;
+                               pinctrl-0 = <&clearfog_sdhci_pins
+                                            &clearfog_sdhci_cd_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+                               vmmc = <&reg_3p3v>;
+                               wp-inverted;
+                       };
+
+                       serial@12100 {
+                               /* mikrobus uart */
+                               pinctrl-0 = <&mikro_uart_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+                       };
+
+                       spi@10680 {
+                               /*
+                                * We don't seem to have the W25Q32 on the
+                                * A1 Rev 2.0 boards, so disable SPI.
+                                * CS0: W25Q32 (doesn't appear to be present)
+                                * CS1:
+                                * CS2: mikrobus
+                                */
+                               pinctrl-0 = <&spi1_pins
+                                            &clearfog_spi1_cs_pins
+                                            &mikro_spi_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+
+                               spi-flash@0 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "w25q32", "jedec,spi-nor";
+                                       reg = <0>; /* Chip select 0 */
+                                       spi-max-frequency = <3000000>;
+                                       status = "disabled";
+                               };
+                       };
+
+                       usb@58000 {
+                               /* CON3, nearest  power. */
+                               status = "okay";
+                       };
+
+                       usb3@f0000 {
+                               /* CON2, nearest CPU, USB2 only. */
+                               status = "okay";
+                       };
+
+                       usb3@f8000 {
+                               /* CON7 */
+                               status = "okay";
+                       };
+               };
+
+               pcie-controller {
+                       status = "okay";
+                       /*
+                        * The two PCIe units are accessible through
+                        * the mini-PCIe connectors on the board.
+                        */
+                       pcie@2,0 {
+                               /* Port 1, Lane 0. CON3, nearest power. */
+                               reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
+                               status = "okay";
+                       };
+                       pcie@3,0 {
+                               /* Port 2, Lane 0. CON2, nearest CPU. */
+                               reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>;
+                               status = "okay";
+                       };
+               };
+       };
+
+       dsa@0 {
+               compatible = "marvell,dsa";
+               dsa,ethernet = <&eth1>;
+               dsa,mii-bus = <&mdio>;
+               pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>;
+               pinctrl-names = "default";
+               #address-cells = <2>;
+               #size-cells = <0>;
+
+               switch@0 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <4 0>;
+
+                       port@0 {
+                               reg = <0>;
+                               label = "lan1";
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               label = "lan2";
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "lan3";
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "lan4";
+                       };
+
+                       port@4 {
+                               reg = <4>;
+                               label = "lan5";
+                       };
+
+                       port@5 {
+                               reg = <5>;
+                               label = "cpu";
+                       };
+
+                       port@6 {
+                               /* 88E1512 external phy */
+                               reg = <6>;
+                               label = "lan6";
+                               fixed-link {
+                                       speed = <1000>;
+                                       full-duplex;
+                               };
+                       };
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-0 = <&rear_button_pins>;
+               pinctrl-names = "default";
+
+               button_0 {
+                       /* The rear SW3 button */
+                       label = "Rear Button";
+                       gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+                       linux,can-disable;
+                       linux,code = <BTN_0>;
+               };
+       };
+};
index a633be3defda4b5c6015ec0b85f5b74a7ad2d82e..cd316021d6ce2b72af13fa6fc3ccb7b833d423f0 100644 (file)
                gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
        };
 
-       reg_usb2_1_vbus: v5-vbus1 {
-               compatible = "regulator-fixed";
-               regulator-name = "v5.0-vbus1";
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-               enable-active-high;
-               regulator-always-on;
-               gpio = <&expander0 4 GPIO_ACTIVE_HIGH>;
-       };
-
        reg_sata0: pwr-sata0 {
                compatible = "regulator-fixed";
                regulator-name = "pwr_en_sata0";
diff --git a/arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/boot/dts/armada-38x-solidrun-microsom.dtsi
new file mode 100644 (file)
index 0000000..3f792a5
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Device Tree file for SolidRun Armada 38x Microsom
+ *
+ *  Copyright (C) 2015 Russell King
+ *
+ * This board is in development; the contents of this file work with
+ * the A1 rev 2.0 of the board, which does not represent final
+ * production board.  Things will change, don't expect this file to
+ * remain compatible info the future.
+ *
+ * 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
+ *     version 2 as published by the Free Software Foundation.
+ *
+ *     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 , 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 <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>; /* 256 MB */
+       };
+
+       soc {
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
+                         MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000
+                         MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000
+                         MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>;
+
+               internal-regs {
+                       ethernet@70000 {
+                               pinctrl-0 = <&ge0_rgmii_pins>;
+                               pinctrl-names = "default";
+                               phy = <&phy_dedicated>;
+                               phy-mode = "rgmii-id";
+                               status = "okay";
+                       };
+
+                       mdio@72004 {
+                               /*
+                                * Add the phy clock here, so the phy can be
+                                * accessed to read its IDs prior to binding
+                                * with the driver.
+                                */
+                               pinctrl-0 = <&mdio_pins &microsom_phy_clk_pins>;
+                               pinctrl-names = "default";
+
+                               phy_dedicated: ethernet-phy@0 {
+                                       /*
+                                        * Annoyingly, the marvell phy driver
+                                        * configures the LED register, rather
+                                        * than preserving reset-loaded setting.
+                                        * We undo that rubbish here.
+                                        */
+                                       marvell,reg-init = <3 16 0 0x101e>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       pinctrl@18000 {
+                               microsom_phy_clk_pins: microsom-phy-clk-pins {
+                                       marvell,pins = "mpp45";
+                                       marvell,function = "ref";
+                               };
+                       };
+
+                       rtc@a3800 {
+                               /*
+                                * If the rtc doesn't work, run "date reset"
+                                * twice in u-boot.
+                                */
+                               status = "okay";
+                       };
+
+                       serial@12000 {
+                               pinctrl-0 = <&uart0_pins>;
+                               pinctrl-names = "default";
+                               status = "okay";
+                       };
+               };
+       };
+};
index 58b500873bfd57f2787080a9229d58e5785acbe2..13cf69a8d0fb392b264910f014cf7ff8434f9e2b 100644 (file)
                                marvell,nand-enable-arbiter;
                                nand-on-flash-bbt;
 
-                               partition@0 {
-                                       label = "u-boot";
-                                       reg = <0x0000000 0xe0000>;
-                                       read-only;
-                               };
-
-                               partition@e0000 {
-                                       label = "u-boot-env";
-                                       reg = <0xe0000 0x20000>;
-                                       read-only;
-                               };
-
-                               partition@100000 {
-                                       label = "u-boot-env2";
-                                       reg = <0x100000 0x20000>;
-                                       read-only;
-                               };
-
-                               partition@120000 {
-                                       label = "zImage";
-                                       reg = <0x120000 0x400000>;
-                               };
-
-                               partition@520000 {
-                                       label = "initrd";
-                                       reg = <0x520000 0x400000>;
-                               };
-
-                               partition@xE00000 {
-                                       label = "boot";
-                                       reg = <0xE00000 0x3F200000>;
-                               };
-
-                               partition@flash {
-                                       label = "flash";
-                                       reg = <0x0 0x40000000>;
+                               partitions {
+                                       #address-cells = <1>;
+                                       #size-cells = <1>;
+
+                                       partition@0 {
+                                               label = "u-boot";
+                                               reg = <0x00000000 0x000e0000>;
+                                               read-only;
+                                       };
+
+                                       partition@e0000 {
+                                               label = "u-boot-env";
+                                               reg = <0x000e0000 0x00020000>;
+                                               read-only;
+                                       };
+
+                                       partition@100000 {
+                                               label = "u-boot-env2";
+                                               reg = <0x00100000 0x00020000>;
+                                               read-only;
+                                       };
+
+                                       partition@120000 {
+                                               label = "zImage";
+                                               reg = <0x00120000 0x00400000>;
+                                       };
+
+                                       partition@520000 {
+                                               label = "initrd";
+                                               reg = <0x00520000 0x00400000>;
+                                       };
+
+                                       partition@e00000 {
+                                               label = "boot";
+                                               reg = <0x00e00000 0x3f200000>;
+                                       };
                                };
                        };
                };
index 6fe8972de0a219688fe76c1d0c0cb0944056270f..62175a8848bc2234343a8627d7cdf0ababfee851 100644 (file)
                                isl12057: isl12057@68 {
                                        compatible = "isil,isl12057";
                                        reg = <0x68>;
-                                       isil,irq2-can-wakeup-machine;
+                                       wakeup-source;
                                };
                        };
 
index f89598af4c2b1ef24b1812b15fca28de2c5b4382..6bf873e7d96c226ac532658c62af2ca1e869046a 100644 (file)
                        label = "Button";
                        gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
                        linux,code = <0x103>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index bf18ece0c02708c4d7b99ac543e2bc9045daf63b..229e989eb60df3305fb6a609e44e919a3696b143 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <18432000>;
-               };
-
                main_xtal {
                        clock-frequency = <18432000>;
                };
                        label = "PB_RST";
                        gpios = <&pioB 30 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                user {
                        label = "PB_USER";
                        gpios = <&pioB 31 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x101>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index f0b1563cb3f164907c63a3ea3d94390a0cd863f9..50a14568f094a64cd5368851e2c39bd250e0cebe 100644 (file)
                        label = "PB_PROG";
                        gpios = <&pioE 27 GPIO_ACTIVE_LOW>;
                        linux,code = <0x102>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                reset {
                        label = "PB_RST";
                        gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                user {
                        label = "PB_USER";
                        gpios = <&pioE 31 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x101>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 9f72b49326344925b55d600a1a5c30173c5f7d48..9682d105d4d8317a4733412fbe4cde6241158e74 100644 (file)
                        label = "PB_PROG";
                        gpios = <&pioC 17 GPIO_ACTIVE_LOW>;
                        linux,code = <0x102>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                reset {
                        label = "PB_RST";
                        gpios = <&pioC 16 GPIO_ACTIVE_LOW>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index a9aef53ab764202df553a058b73cd77a84c55dff..4f2eebf4a5603a5de81043fdefca99d13400c4cf 100644 (file)
                        label = "user_pb";
                        gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
                        linux,code = <28>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index e07c2b206beba18c8a139574aa8bc83f74c23545..787a166b0393ff5551ab9844d40fb55647fcfc17 100644 (file)
@@ -45,6 +45,7 @@
 /dts-v1/;
 #include "sama5d2.dtsi"
 #include "sama5d2-pinfunc.h"
+#include <dt-bindings/mfd/atmel-flexcom.h>
 
 / {
        model = "Atmel SAMA5D2 Xplained";
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        status = "okay";
                };
 
+               sdmmc0: sdio-host@a0000000 {
+                       bus-width = <8>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_sdmmc0_default>;
+                       non-removable;
+                       mmc-ddr-1_8v;
+                       status = "okay";
+               };
+
+               sdmmc1: sdio-host@b0000000 {
+                       bus-width = <4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_sdmmc1_default>;
+                       status = "okay"; /* conflict with qspi0 */
+               };
+
                apb {
                        spi0: spi@f8000000 {
                                pinctrl-names = "default";
                                status = "okay";
                        };
 
+                       pdmic@f8018000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_pdmic_default>;
+                               atmel,model = "PDMIC @ sama5d2_xplained";
+                               atmel,mic-min-freq = <1000000>;
+                               atmel,mic-max-freq = <3246000>;
+                               atmel,mic-offset = <0x0>;
+                               status = "okay";
+                       };
+
                        uart1: serial@f8020000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart1_default>;
                                dmas = <0>, <0>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_i2c0_default>;
+                               i2c-sda-hold-time-ns = <350>;
                                status = "okay";
 
                                pmic: act8865@5b {
                                };
                        };
 
+                       flx0: flexcom@f8034000 {
+                               atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
+                               status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
+
+                               uart5: serial@200 {
+                                       compatible = "atmel,at91sam9260-usart";
+                                       reg = <0x200 0x200>;
+                                       interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       clocks = <&flx0_clk>;
+                                       clock-names = "usart";
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_flx0_default>;
+                                       atmel,fifo-size = <32>;
+                                       status = "okay";
+                               };
+                       };
+
+                       watchdog@f8048040 {
+                               status = "okay";
+                       };
+
                        uart3: serial@fc008000 {
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart3_default>;
                                status = "okay";
                        };
 
+                       flx4: flexcom@fc018000 {
+                               atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
+                               status = "okay";
+
+                               i2c2: i2c@600 {
+                                       compatible = "atmel,sama5d2-i2c";
+                                       reg = <0x600 0x200>;
+                                       interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
+                                       dmas = <0>, <0>;
+                                       dma-names = "tx", "rx";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&flx4_clk>;
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_flx4_default>;
+                                       atmel,fifo-size = <16>;
+                                       status = "okay";
+                               };
+                       };
+
                        i2c1: i2c@fc028000 {
                                dmas = <0>, <0>;
                                pinctrl-names = "default";
                        };
 
                        pinctrl@fc038000 {
+                               pinctrl_flx0_default: flx0_default {
+                                       pinmux = <PIN_PB28__FLEXCOM0_IO0>,
+                                                <PIN_PB29__FLEXCOM0_IO1>;
+                                       bias-disable;
+                               };
+
+                               pinctrl_flx4_default: flx4_default {
+                                       pinmux = <PIN_PD12__FLEXCOM4_IO0>,
+                                                <PIN_PD13__FLEXCOM4_IO1>;
+                                       bias-disable;
+                               };
+
                                pinctrl_i2c0_default: i2c0_default {
                                        pinmux = <PIN_PD21__TWD0>,
                                                 <PIN_PD22__TWCK0>;
                                        bias-disable;
                                };
 
+                               pinctrl_pdmic_default: pdmic_default {
+                                       pinmux = <PIN_PB26__PDMIC_DAT>,
+                                               <PIN_PB27__PDMIC_CLK>;
+                                       bias-disable;
+                               };
+
+                               pinctrl_sdmmc0_default: sdmmc0_default {
+                                       cmd_data {
+                                               pinmux = <PIN_PA1__SDMMC0_CMD>,
+                                                        <PIN_PA2__SDMMC0_DAT0>,
+                                                        <PIN_PA3__SDMMC0_DAT1>,
+                                                        <PIN_PA4__SDMMC0_DAT2>,
+                                                        <PIN_PA5__SDMMC0_DAT3>,
+                                                        <PIN_PA6__SDMMC0_DAT4>,
+                                                        <PIN_PA7__SDMMC0_DAT5>,
+                                                        <PIN_PA8__SDMMC0_DAT6>,
+                                                        <PIN_PA9__SDMMC0_DAT7>;
+                                               bias-pull-up;
+                                       };
+
+                                       ck_cd_rstn_vddsel {
+                                               pinmux = <PIN_PA0__SDMMC0_CK>,
+                                                        <PIN_PA10__SDMMC0_RSTN>,
+                                                        <PIN_PA11__SDMMC0_VDDSEL>,
+                                                        <PIN_PA13__SDMMC0_CD>;
+                                               bias-disable;
+                                       };
+                               };
+
+                               pinctrl_sdmmc1_default: sdmmc1_default {
+                                       cmd_data {
+                                               pinmux = <PIN_PA28__SDMMC1_CMD>,
+                                                        <PIN_PA18__SDMMC1_DAT0>,
+                                                        <PIN_PA19__SDMMC1_DAT1>,
+                                                        <PIN_PA20__SDMMC1_DAT2>,
+                                                        <PIN_PA21__SDMMC1_DAT3>;
+                                               bias-pull-up;
+                                       };
+
+                                       conf-ck_cd {
+                                               pinmux = <PIN_PA22__SDMMC1_CK>,
+                                                        <PIN_PA30__SDMMC1_CD>;
+                                               bias-disable;
+                                       };
+                               };
+
                                pinctrl_spi0_default: spi0_default {
                                        pinmux = <PIN_PA14__SPI0_SPCK>,
                                                 <PIN_PA15__SPI0_MOSI>,
index 8488ac53d22d3b4d6f0562ebd9018d3126ce5ee2..ff888d21c786a69b1f56c768ea6a2219056b98dc 100644 (file)
                        label = "PB_USER";
                        gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
                        linux,code = <0x104>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi b/arch/arm/boot/dts/at91-sama5d4_ma5d4.dtsi
new file mode 100644 (file)
index 0000000..e7b2109
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "sama5d4.dtsi"
+
+/ {
+       model = "DENX MA5D4";
+       compatible = "denx,ma5d4", "atmel,sama5d4", "atmel,sama5";
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       clocks {
+               main_clock: main_clock {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <12000000>;
+               };
+
+               clk20m: clk20m {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <20000000>;
+                       clock-output-names = "clk20m";
+               };
+       };
+
+       ahb {
+               apb {
+                       mmc0: mmc@f8000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7>;
+                               vmmc-supply = <&vcc_mmc0_reg>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <8>;
+                                       broken-cd;
+                               };
+                       };
+
+                       spi0: spi@f8010000 {
+                               cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+                               status = "okay";
+
+                               m25p80@0 {
+                                       compatible = "atmel,at25df321a";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       i2c0: i2c@f8014000 {
+                               status = "okay";
+                       };
+
+                       spi1: spi@fc018000 {
+                               cs-gpios = <&pioB 22 0>, <&pioB 23 0>, <0>, <0>;
+                               status = "okay";
+
+                               can0: can@0 {
+                                       compatible = "microchip,mcp2515";
+                                       reg = <0>;
+                                       clocks = <&clk20m>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <6 GPIO_ACTIVE_LOW>;
+                                       spi-max-frequency = <10000000>;
+                               };
+
+                               can1: can@1 {
+                                       compatible = "microchip,mcp2515";
+                                       reg = <1>;
+                                       clocks = <&clk20m>;
+                                       interrupt-parent = <&pioE>;
+                                       interrupts = <7 GPIO_ACTIVE_LOW>;
+                                       spi-max-frequency = <10000000>;
+                               };
+                       };
+
+                       adc0: adc@fc034000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <
+                                       /* external trigger conflicts with USBA_VBUS */
+                                       &pinctrl_adc0_ad0
+                                       &pinctrl_adc0_ad1
+                                       &pinctrl_adc0_ad2
+                                       &pinctrl_adc0_ad3
+                                       &pinctrl_adc0_ad4
+                                       >;
+                               atmel,adc-vref = <3300>;
+                               status = "okay";
+                       };
+
+                       watchdog@fc068640 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       vcc_3v3_reg: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC 3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
+       vcc_mmc0_reg: fixedregulator@1 {
+               compatible = "regulator-fixed";
+               gpio = <&pioE 15 GPIO_ACTIVE_HIGH>;
+               regulator-name = "RST_n MCI0";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vcc_3v3_reg>;
+               regulator-boot-on;
+       };
+};
diff --git a/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts b/arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts
new file mode 100644 (file)
index 0000000..abaaba5
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "at91-sama5d4_ma5d4.dtsi"
+
+/ {
+       model = "DENX MA5D4EVK";
+       compatible = "denx,ma5d4evk", "atmel,sama5d4", "atmel,sama5";
+
+       chosen {
+               stdout-path = "serial3:115200n8";
+       };
+
+       ahb {
+               usb0: gadget@00400000 {
+                       atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "okay";
+               };
+
+               usb1: ohci@00500000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0
+                                          &pioE 11 GPIO_ACTIVE_LOW
+                                          &pioE 14 GPIO_ACTIVE_LOW
+                                         >;
+                       status = "okay";
+               };
+
+               usb2: ehci@00600000 {
+                       status = "okay";
+               };
+
+               apb {
+                       hlcdc: hlcdc@f0000000 {
+                               status = "okay";
+
+                               hlcdc-display-controller {
+                                       pinctrl-names = "default";
+                                       pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
+
+                                       port@0 {
+                                               hlcdc_panel_output: endpoint@0 {
+                                                       reg = <0>;
+                                                       remote-endpoint = <&panel_input>;
+                                               };
+                                       };
+                               };
+
+                       };
+
+                       macb0: ethernet@f8020000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+
+                               phy0: ethernet-phy@0 {
+                                       reg = <0>;
+                               };
+                       };
+
+                       usart0: serial@f802c000 {
+                               status = "okay";
+                       };
+
+                       usart1: serial@f8030000 {
+                               status = "okay";
+                       };
+
+                       mmc1: mmc@fc000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+                               vmmc-supply = <&vcc_mmc1_reg>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <4>;
+                                       cd-gpios = <&pioE 5 0>;
+                               };
+                       };
+
+                       adc0: adc@fc034000 {
+                               atmel,adc-ts-wires = <4>;
+                               atmel,adc-ts-pressure-threshold = <10000>;
+                       };
+
+
+                       pinctrl@fc06a000 {
+                               board {
+                                       pinctrl_mmc1_cd: mmc1_cd {
+                                               atmel,pins = <AT91_PIOE 5 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
+                                       };
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                                       <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+                                       };
+                               };
+                       };
+               };
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&hlcdc_pwm 0 50000 0>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
+               status = "okay";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               user1 {
+                       label = "user1";
+                       gpios = <&pioD 28 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               user2 {
+                       label = "user2";
+                       gpios = <&pioD 29 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               user3 {
+                       label = "user3";
+                       gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       panel: panel {
+               /* Actually Ampire 800480R2 */
+               compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
+               backlight = <&backlight>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "okay";
+
+               port@0 {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       panel_input: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&hlcdc_panel_output>;
+                       };
+               };
+       };
+
+       vcc_mmc1_reg: fixedregulator@2 {
+               compatible = "regulator-fixed";
+               gpio = <&pioE 17 GPIO_ACTIVE_LOW>;
+               regulator-name = "VDD MCI1";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               vin-supply = <&vcc_3v3_reg>;
+       };
+};
index 45371a1b61b398b6b939292649b20d0315cd399b..131614f28e758653e34cc2b993bb6a5a28f20bbb 100644 (file)
@@ -50,7 +50,6 @@
        compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5";
 
        chosen {
-               bootargs = "ignore_loglevel earlyprintk";
                stdout-path = "serial0:115200n8";
        };
 
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "pb_user1";
                        gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 6d272c0125e365b64aad7dadbeec309c51c60fc6..2d4a33100af6bdc4fcd4a3500467456673f54325 100644 (file)
@@ -50,7 +50,6 @@
        compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5";
 
        chosen {
-               bootargs = "ignore_loglevel earlyprintk";
                stdout-path = "serial0:115200n8";
        };
 
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "pb_user1";
                        gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
diff --git a/arch/arm/boot/dts/at91-vinco.dts b/arch/arm/boot/dts/at91-vinco.dts
new file mode 100644 (file)
index 0000000..79aec55
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * Device Tree file for VInCo platform
+ *
+ *  Copyright (C) 2014 Atmel,
+ *                2014 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *   2015 Gregory CLEMENT <gregory.clement@free-electrons.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 "sama5d4.dtsi"
+
+/ {
+       model = "L+G VInCo platform";
+       compatible = "l+g,vinco", "atmel,sama5d4", "atmel,sama5";
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+
+                       adc0: adc@fc034000 {
+                               status = "okay"; /* Enable ADC IIO support */
+                       };
+
+                       mmc0: mmc@f8000000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
+                                            &pinctrl_mmc0_dat1_3
+                                            &pinctrl_mmc0_dat4_7>;
+                               vqmmc-supply = <&vcc_3v3_reg>;
+                               vmmc-supply = <&vcc_3v3_reg>;
+                               no-1-8-v;
+                               status = "okay";
+                               slot@0 {
+                                       reg = <0>;
+                                       bus-width = <8>;
+                                       non-removable;
+                                       broken-cd;
+                                       status = "okay";
+                               };
+                       };
+
+                       spi0: spi@f8010000 {
+                               cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
+                               status = "okay";
+                               m25p80@0 {
+                                       compatible = "n25q32b", "jedec,spi-nor";
+                                       spi-max-frequency = <50000000>;
+                                       reg = <0>;
+                               };
+                       };
+
+                       i2c0: i2c@f8014000 {
+                               status = "okay";
+                       };
+
+                       i2c1: i2c@f8018000 {
+                               status = "okay";
+                               /* kerkey security module */
+                       };
+
+                       macb0: ethernet@f8020000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                                       reset-gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
+                               };
+
+                       };
+
+                       i2c2: i2c@f8024000 {
+                               status = "okay";
+
+                               rtc1: rtc@64 {
+                                       compatible = "epson,rx8900";
+                                       reg = <0x32>;
+                               };
+                       };
+
+                       usart2: serial@fc008000 {
+                               /* MBUS */
+                               status = "okay";
+                       };
+
+                       usart3: serial@fc00c000 {
+                               /* debug */
+                               status = "okay";
+                       };
+
+                       usart4: serial@fc010000 {
+                               /* LMN */
+                               pinctrl-0 = <&pinctrl_usart4 &pinctrl_usart4_rts>;
+                               linux,rs485-enabled-at-boot-time;
+                               status = "okay";
+                       };
+
+                       macb1: ethernet@fc028000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               status = "okay";
+
+                               ethernet-phy@1 {
+                                       reg = <0x1>;
+                                       interrupt-parent = <&pioB>;
+                                       interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
+                                       reset-gpios = <&pioE 6 GPIO_ACTIVE_HIGH>;
+                               };
+                       };
+
+                       watchdog@fc068640 {
+                               status = "okay";
+                       };
+
+                       pinctrl@fc06a000 {
+                               board {
+                                       pinctrl_usba_vbus: usba_vbus {
+                                               atmel,pins =
+                                               <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
+                                       };
+                               };
+                       };
+               };
+
+               usb0: gadget@00400000 {
+                       atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
+                       status = "disable";
+               };
+
+               usb1: ohci@00500000 {
+                       num-ports = <3>;
+                       atmel,vbus-gpio = <0
+                                          &pioE 11 GPIO_ACTIVE_LOW
+                                          &pioE 12 GPIO_ACTIVE_LOW
+                                         >;
+                       status = "disable";
+               };
+
+               usb2: ehci@00600000 {
+                       /* 4G Modem */
+                       status = "okay";
+               };
+
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               led_err {
+                       label = "err";
+                       gpios = <&pioA 7 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+
+               led_rssi {
+                       label = "rssi";
+                       gpios = <&pioA 9 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+
+               led_tls {
+                       label = "tls";
+                       gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+
+               led_lmc {
+                       label = "lmc";
+                       gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+
+               led_wmt {
+                       label = "wmt";
+                       gpios = <&pioA 29 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+               };
+
+               led_pwr {
+                       label = "pwr";
+                       gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+
+       };
+
+       vcc_3v3_reg: fixedregulator@0 {
+               compatible = "regulator-fixed";
+               regulator-name = "VCC 3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
index 8dab4b75ca97cfed9beae29bf49224dc71a06bb9..f90e1c2d3caa2fc41485ba330bdcd691a379e6be 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <18432000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
index 2e92ac020f2383ef58c25a1836b22954834211be..55bd51f07fa601e709f7fc910e7fa757fe4f32ee 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <18432000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                                        ti,debounce-tol = /bits/ 16 <65535>;
                                        ti,debounce-max = /bits/ 16 <1>;
 
-                                       linux,wakeup;
+                                       wakeup-source;
                                };
                        };
 
                        label = "button_0";
                        gpios = <&pioA 27 GPIO_ACTIVE_LOW>;
                        linux,code = <256>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                button_1 {
                        label = "button_1";
                        gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
                        linux,code = <257>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                button_2 {
                        label = "button_2";
                        gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
                        linux,code = <258>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                button_3 {
                        label = "button_3";
                        gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
                        linux,code = <259>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index 23381276ffb8016b0dafc1237eb990bad1e775b1..59df9d73d27659d507d78d195fe3b1be7c499dd4 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <16367660>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "left_click";
                        gpios = <&pioC 5 GPIO_ACTIVE_LOW>;
                        linux,code = <272>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                right_click {
                        label = "right_click";
                        gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
                        linux,code = <273>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 57548a2c5a1eb80b0701129f612bf3a785b65928..e9cc99b6353ad1e464bb0942c29e3cea6dc5d37e 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <18432000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "Button 3";
                        gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
                        linux,code = <0x103>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                btn4 {
                        label = "Button 4";
                        gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
                        linux,code = <0x104>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 9d16ef8453c556f7ad69a21f65d9526a90325115..2400c99134f7f516e97af8234d89b8d3098196bd 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-
                slow_xtal {
                      clock-frequency = <32768>;
                };
                        label = "left_click";
                        gpios = <&pioB 6 GPIO_ACTIVE_LOW>;
                        linux,code = <272>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                right_click {
                        label = "right_click";
                        gpios = <&pioB 7 GPIO_ACTIVE_LOW>;
                        linux,code = <273>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                left {
index acf3451a332da266f9a4e0ad5903a7ec11767587..ca4ddf86817ab64dc6a8a31193191460bfaf8d4b 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <16000000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "Enter";
                        gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
                        linux,code = <28>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 558c9f220bedef3c61ac0b78e3dad2eb76017573..f10566f759cdceba2bedb202365a8c30d979c2f5 100644 (file)
        };
 
        clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-
                slow_xtal {
                        clock-frequency = <32768>;
                };
                        label = "right_click";
                        gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
                        linux,code = <273>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                left_click {
                        label = "left_click";
                        gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
                        linux,code = <272>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 26112ebd15fc4e896d576932b330b846fc4cc397..b098ad8cd93a7622b02198ee4bf2b06422af941a 100644 (file)
                reg = <0x20000000 0x8000000>;
        };
 
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-       };
-
        clocks {
                slow_xtal {
                        clock-frequency = <32768>;
index 2778533502d9b7fcfdc1ac4ef074fafdd274c012..3878793364f0c23efe2213f3bf961fc36c06c168 100644 (file)
                #address-cells = <1>;
                #size-cells = <1>;
 
+               pcie_phy: phy@0301d0a0 {
+                       compatible = "brcm,cygnus-pcie-phy";
+                       reg = <0x0301d0a0 0x14>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       pcie0_phy: phy@0 {
+                               reg = <0>;
+                               #phy-cells = <0>;
+                       };
+
+                       pcie1_phy: phy@1 {
+                               reg = <1>;
+                               #phy-cells = <0>;
+                       };
+               };
+
                pinctrl: pinctrl@0x0301d0c8 {
                        compatible = "brcm,cygnus-pinmux";
                        reg = <0x0301d0c8 0x30>,
                        compatible = "brcm,cygnus-crmu-gpio";
                        reg = <0x03024800 0x50>,
                              <0x03024008 0x18>;
+                       ngpios = <6>;
                        #gpio-cells = <2>;
                        gpio-controller;
                };
                        compatible = "brcm,cygnus-ccm-gpio";
                        reg = <0x1800a000 0x50>,
                              <0x0301d164 0x20>;
+                       ngpios = <24>;
                        #gpio-cells = <2>;
                        gpio-controller;
                        interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
                        ranges = <0x81000000 0 0          0x28000000 0 0x00010000
                                  0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
 
+                       phys = <&pcie0_phy>;
+                       phy-names = "pcie-phy";
+
                        status = "disabled";
+
+                       msi-parent = <&msi0>;
+                       msi0: msi@18012000 {
+                               compatible = "brcm,iproc-msi";
+                               msi-controller;
+                               interrupt-parent = <&gic>;
+                               interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 97 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 98 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 99 IRQ_TYPE_NONE>;
+                       };
                };
 
                pcie1: pcie@18013000 {
                        ranges = <0x81000000 0 0          0x48000000 0 0x00010000
                                  0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
 
+                       phys = <&pcie1_phy>;
+                       phy-names = "pcie-phy";
+
                        status = "disabled";
+
+                       msi-parent = <&msi1>;
+                       msi1: msi@18013000 {
+                               compatible = "brcm,iproc-msi";
+                               msi-controller;
+                               interrupt-parent = <&gic>;
+                               interrupts = <GIC_SPI 102 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 103 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 104 IRQ_TYPE_NONE>,
+                                            <GIC_SPI 105 IRQ_TYPE_NONE>;
+                       };
                };
 
                uart0: serial@18020000 {
                gpio_asiu: gpio@180a5000 {
                        compatible = "brcm,cygnus-asiu-gpio";
                        reg = <0x180a5000 0x668>;
+                       ngpios = <146>;
                        #gpio-cells = <2>;
                        gpio-controller;
 
-                       pinmux = <&pinctrl>;
-
                        interrupt-controller;
                        interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+                       gpio-ranges = <&pinctrl 0 42 1>,
+                                       <&pinctrl 1 44 3>,
+                                       <&pinctrl 4 48 1>,
+                                       <&pinctrl 5 50 3>,
+                                       <&pinctrl 8 126 1>,
+                                       <&pinctrl 9 155 1>,
+                                       <&pinctrl 10 152 1>,
+                                       <&pinctrl 11 154 1>,
+                                       <&pinctrl 12 153 1>,
+                                       <&pinctrl 13 127 3>,
+                                       <&pinctrl 16 140 1>,
+                                       <&pinctrl 17 145 7>,
+                                       <&pinctrl 24 130 10>,
+                                       <&pinctrl 34 141 4>,
+                                       <&pinctrl 38 54 1>,
+                                       <&pinctrl 39 56 3>,
+                                       <&pinctrl 42 60 3>,
+                                       <&pinctrl 45 64 3>,
+                                       <&pinctrl 48 68 2>,
+                                       <&pinctrl 50 84 6>,
+                                       <&pinctrl 56 94 6>,
+                                       <&pinctrl 62 72 1>,
+                                       <&pinctrl 63 70 1>,
+                                       <&pinctrl 64 80 1>,
+                                       <&pinctrl 65 74 3>,
+                                       <&pinctrl 68 78 1>,
+                                       <&pinctrl 69 82 1>,
+                                       <&pinctrl 70 156 17>,
+                                       <&pinctrl 87 104 12>,
+                                       <&pinctrl 99 102 2>,
+                                       <&pinctrl 101 90 4>,
+                                       <&pinctrl 105 116 6>,
+                                       <&pinctrl 111 100 2>,
+                                       <&pinctrl 113 122 4>,
+                                       <&pinctrl 123 11 1>,
+                                       <&pinctrl 124 38 4>,
+                                       <&pinctrl 128 43 1>,
+                                       <&pinctrl 129 47 1>,
+                                       <&pinctrl 130 49 1>,
+                                       <&pinctrl 131 53 1>,
+                                       <&pinctrl 132 55 1>,
+                                       <&pinctrl 133 59 1>,
+                                       <&pinctrl 134 63 1>,
+                                       <&pinctrl 135 67 1>,
+                                       <&pinctrl 136 71 1>,
+                                       <&pinctrl 137 73 1>,
+                                       <&pinctrl 138 77 1>,
+                                       <&pinctrl 139 79 1>,
+                                       <&pinctrl 140 81 1>,
+                                       <&pinctrl 141 83 1>,
+                                       <&pinctrl 142 10 1>;
                };
 
                touchscreen: tsc@180a6000 {
index 58aca277e4a7e6ba8411524c5120ac02afda3459..10bdef557ba0505ceb05583db76fa88580188b1b 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/clock/bcm-nsp.h>
 
 #include "skeleton.dtsi"
 
        model = "Broadcom Northstar Plus SoC";
        interrupt-parent = <&gic>;
 
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       reg = <0x0>;
+               };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&L2>;
+                       enable-method = "brcm,bcm-nsp-smp";
+                       secondary-boot-reg = <0xffff042c>;
+                       reg = <0x1>;
+               };
+       };
+
        mpcore {
                compatible = "simple-bus";
-               ranges = <0x00000000 0x19020000 0x00003000>;
+               ranges = <0x00000000 0x19000000 0x00023000>;
                #address-cells = <1>;
                #size-cells = <1>;
 
                        };
                };
 
-               L2: l2-cache {
-                       compatible = "arm,pl310-cache";
-                       reg = <0x2000 0x1000>;
-                       cache-unified;
-                       cache-level = <2>;
+               a9pll: arm_clk@00000 {
+                       #clock-cells = <0>;
+                       compatible = "brcm,nsp-armpll";
+                       clocks = <&osc>;
+                       reg = <0x00000 0x1000>;
+               };
+
+               timer@20200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x20200 0x100>;
+                       interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&periph_clk>;
+               };
+
+               twd-timer@20600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x20600 0x20>;
+                       interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
+                                                 IRQ_TYPE_LEVEL_HIGH)>;
+                       clocks = <&periph_clk>;
+               };
+
+               twd-watchdog@20620 {
+                       compatible = "arm,cortex-a9-twd-wdt";
+                       reg = <0x20620 0x20>;
+                       interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
+                                                 IRQ_TYPE_LEVEL_HIGH)>;
+                       clocks = <&periph_clk>;
                };
 
-               gic: interrupt-controller@19021000 {
+               gic: interrupt-controller@21000 {
                        compatible = "arm,cortex-a9-gic";
                        #interrupt-cells = <3>;
                        #address-cells = <0>;
                        interrupt-controller;
-                       reg = <0x1000 0x1000>,
-                             <0x0100 0x100>;
+                       reg = <0x21000 0x1000>,
+                             <0x20100 0x100>;
                };
 
-               timer@19020200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x0200 0x100>;
-                       interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&periph_clk>;
+               L2: l2-cache {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x22000 0x1000>;
+                       cache-unified;
+                       cache-level = <2>;
                };
        };
 
                #size-cells = <1>;
                ranges;
 
-               periph_clk: periph_clk {
+               osc: oscillator {
+                       #clock-cells = <0>;
                        compatible = "fixed-clock";
+                       clock-frequency = <25000000>;
+               };
+
+               iprocmed: iprocmed {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+               };
+
+               iprocslow: iprocslow {
                        #clock-cells = <0>;
-                       clock-frequency = <500000000>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+               };
+
+               periph_clk: periph_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&a9pll>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
                };
        };
 
        axi {
                compatible = "simple-bus";
-               ranges = <0x00000000 0x18000000 0x00001000>;
+               ranges = <0x00000000 0x18000000 0x0011ba08>;
                #address-cells = <1>;
                #size-cells = <1>;
 
-               uart0: serial@18000300 {
+               uart0: serial@0300 {
                        compatible = "ns16550a";
                        reg = <0x0300 0x100>;
                        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
-                       clock-frequency = <62499840>;
+                       clocks = <&osc>;
                        status = "disabled";
                };
 
-               uart1: serial@18000400 {
+               uart1: serial@0400 {
                        compatible = "ns16550a";
                        reg = <0x0400 0x100>;
                        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
-                       clock-frequency = <62499840>;
+                       clocks = <&osc>;
+                       status = "disabled";
+               };
+
+               pcie0: pcie@12000 {
+                       compatible = "brcm,iproc-pcie";
+                       reg = <0x12000 0x1000>;
+
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 131 IRQ_TYPE_NONE>;
+
+                       linux,pci-domain = <0>;
+
+                       bus-range = <0x00 0xff>;
+
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       device_type = "pci";
+
+                       /* Note: The HW does not support I/O resources.  So,
+                        * only the memory resource range is being specified.
+                        */
+                       ranges = <0x82000000 0 0x08000000 0x08000000 0 0x8000000>;
+
+                       status = "disabled";
+               };
+
+               pcie1: pcie@13000 {
+                       compatible = "brcm,iproc-pcie";
+                       reg = <0x13000 0x1000>;
+
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 137 IRQ_TYPE_NONE>;
+
+                       linux,pci-domain = <1>;
+
+                       bus-range = <0x00 0xff>;
+
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       device_type = "pci";
+
+                       /* Note: The HW does not support I/O resources.  So,
+                        * only the memory resource range is being specified.
+                        */
+                       ranges = <0x82000000 0 0x40000000 0x40000000 0 0x8000000>;
+
+                       status = "disabled";
+               };
+
+               pcie2: pcie@14000 {
+                       compatible = "brcm,iproc-pcie";
+                       reg = <0x14000 0x1000>;
+
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 143 IRQ_TYPE_NONE>;
+
+                       linux,pci-domain = <2>;
+
+                       bus-range = <0x00 0xff>;
+
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       device_type = "pci";
+
+                       /* Note: The HW does not support I/O resources.  So,
+                        * only the memory resource range is being specified.
+                        */
+                       ranges = <0x82000000 0 0x48000000 0x48000000 0 0x8000000>;
+
                        status = "disabled";
                };
+
+               nand: nand@26000 {
+                       compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1";
+                       reg = <0x026000 0x600>,
+                             <0x11b408 0x600>,
+                             <0x026f00 0x20>;
+                       reg-names = "nand", "iproc-idm", "iproc-ext";
+                       interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
+
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       brcm,nand-has-wp;
+               };
+
+               i2c0: i2c@38000 {
+                       compatible = "brcm,iproc-i2c";
+                       reg = <0x38000 0x50>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
+                       clock-frequency = <100000>;
+               };
+
+               lcpll0: lcpll0@3f100 {
+                       #clock-cells = <1>;
+                       compatible = "brcm,nsp-lcpll0";
+                       reg = <0x3f100 0x14>;
+                       clocks = <&osc>;
+                       clock-output-names = "lcpll0", "pcie_phy", "sdio",
+                                            "ddr_phy";
+               };
+
+               genpll: genpll@3f140 {
+                       #clock-cells = <1>;
+                       compatible = "brcm,nsp-genpll";
+                       reg = <0x3f140 0x24>;
+                       clocks = <&osc>;
+                       clock-output-names = "genpll", "phy", "ethernetclk",
+                                            "usbclk", "iprocfast", "sata1",
+                                            "sata2";
+               };
+
+               pinctrl: pinctrl@3f1c0 {
+                       compatible = "brcm,nsp-pinmux";
+                       reg = <0x3f1c0 0x04>,
+                             <0x30028 0x04>,
+                             <0x3f408 0x04>;
+               };
        };
 };
index 446c586cd473e8bc8f18c4a07adec3b01fb75be7..b52927c94e351fd543e76541540170789677be90 100644 (file)
                        gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
                        linux,default-trigger = "default-off";
                };
+
+               wireless {
+                       label = "bcm53xx:white:wireless";
+                       gpios = <&chipcommon 14 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-off";
+               };
+
+               wps {
+                       label = "bcm53xx:white:wps";
+                       gpios = <&chipcommon 15 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-off";
+               };
+
+               5ghz-2 {
+                       label = "bcm53xx:white:5ghz-2";
+                       gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "default-off";
+               };
+
+               usb3 {
+                       label = "bcm53xx:white:usb3";
+                       gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "default-off";
+               };
+
+               usb2 {
+                       label = "bcm53xx:white:usb2";
+                       gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "default-off";
+               };
        };
 
        gpio-keys {
index 6f50f672efbdf754f200f67b9f4e1518d91f6a26..65a1309bd6e26f52cd0229ae6cce3ca3801b70cb 100644 (file)
@@ -8,6 +8,7 @@
  * Licensed under the GNU/GPL. See COPYING for details.
  */
 
+#include <dt-bindings/clock/bcm-nsp.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
@@ -27,7 +28,7 @@
                        compatible = "ns16550";
                        reg = <0x0300 0x100>;
                        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
-                       clock-frequency = <100000000>;
+                       clocks = <&iprocslow>;
                        status = "disabled";
                };
 
                        compatible = "ns16550";
                        reg = <0x0400 0x100>;
                        interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
-                       clock-frequency = <100000000>;
+                       clocks = <&iprocslow>;
                        status = "disabled";
                };
        };
 
        mpcore {
                compatible = "simple-bus";
-               ranges = <0x00000000 0x19020000 0x00003000>;
+               ranges = <0x00000000 0x19000000 0x00023000>;
                #address-cells = <1>;
                #size-cells = <1>;
 
-               scu@0000 {
+               a9pll: arm_clk@00000 {
+                       #clock-cells = <0>;
+                       compatible = "brcm,nsp-armpll";
+                       clocks = <&osc>;
+                       reg = <0x00000 0x1000>;
+               };
+
+               scu@20000 {
                        compatible = "arm,cortex-a9-scu";
-                       reg = <0x0000 0x100>;
+                       reg = <0x20000 0x100>;
                };
 
-               timer@0200 {
+               timer@20200 {
                        compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x0200 0x100>;
+                       reg = <0x20200 0x100>;
                        interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clk_periph>;
+                       clocks = <&periph_clk>;
                };
 
-               local-timer@0600 {
+               local-timer@20600 {
                        compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x0600 0x100>;
+                       reg = <0x20600 0x100>;
                        interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clk_periph>;
+                       clocks = <&periph_clk>;
                };
 
-               gic: interrupt-controller@1000 {
+               gic: interrupt-controller@21000 {
                        compatible = "arm,cortex-a9-gic";
                        #interrupt-cells = <3>;
                        #address-cells = <0>;
                        interrupt-controller;
-                       reg = <0x1000 0x1000>,
-                             <0x0100 0x100>;
+                       reg = <0x21000 0x1000>,
+                             <0x20100 0x100>;
                };
 
-               L2: cache-controller@2000 {
+               L2: cache-controller@22000 {
                        compatible = "arm,pl310-cache";
-                       reg = <0x2000 0x1000>;
+                       reg = <0x22000 0x1000>;
                        cache-unified;
                        arm,shared-override;
                        prefetch-data = <1>;
 
        clocks {
                #address-cells = <1>;
-               #size-cells = <0>;
+               #size-cells = <1>;
+               ranges;
 
-               /* As long as we do not have a real clock driver us this
-                * fixed clock */
-               clk_periph: periph {
+               osc: oscillator {
+                       #clock-cells = <0>;
                        compatible = "fixed-clock";
+                       clock-frequency = <25000000>;
+               };
+
+               iprocmed: iprocmed {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+               };
+
+               iprocslow: iprocslow {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+               };
+
+               periph_clk: periph_clk {
                        #clock-cells = <0>;
-                       clock-frequency = <400000000>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&a9pll>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
                };
        };
 
                };
        };
 
+       lcpll0: lcpll0@1800c100 {
+               #clock-cells = <1>;
+               compatible = "brcm,nsp-lcpll0";
+               reg = <0x1800c100 0x14>;
+               clocks = <&osc>;
+               clock-output-names = "lcpll0", "pcie_phy", "sdio",
+                                    "ddr_phy";
+       };
+
+       genpll: genpll@1800c140 {
+               #clock-cells = <1>;
+               compatible = "brcm,nsp-genpll";
+               reg = <0x1800c140 0x24>;
+               clocks = <&osc>;
+               clock-output-names = "genpll", "phy", "ethernetclk",
+                                    "usbclk", "iprocfast", "sata1",
+                                    "sata2";
+       };
+
        nand: nand@18028000 {
                compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
                reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;
index 34cd6405125096e4cd9d830d30487d11c9ff7765..d0560e8cd6de745aff3a0c1e8fb7d84e7d0617d7 100644 (file)
                #address-cells = <1>;
                #size-cells = <0>;
 
-               arm_timer_clk: arm_timer_clk {
-                       #clock-cells = <0>;
-                       compatible = "fixed-clock";
-                       clock-frequency = <500000000>;
-               };
-
+               /* UBUS peripheral clock */
                periph_clk: periph_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-frequency = <50000000>;
                        clock-output-names = "periph";
                };
+
+               /* peripheral clock for system timer */
+               axi_clk: axi_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&armpll>;
+                       clock-div = <2>;
+                       clock-mult = <1>;
+               };
+
+               /* APB bus clock */
+               apb_clk: apb_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clocks = <&armpll>;
+                       clock-div = <4>;
+                       clock-mult = <1>;
+               };
        };
 
        /* ARM bus */
                        compatible = "arm,cortex-a9-global-timer";
                        reg = <0x1e200 0x20>;
                        interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&arm_timer_clk>;
+                       clocks = <&axi_clk>;
                };
 
                local_timer: local-timer@1e600 {
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0x1e600 0x20>;
                        interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&arm_timer_clk>;
+                       clocks = <&axi_clk>;
                };
 
                twd_watchdog: watchdog@1e620 {
                        interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               armpll: armpll {
+                       #clock-cells = <0>;
+                       compatible = "brcm,bcm63138-armpll";
+                       clocks = <&periph_clk>;
+                       reg = <0x20000 0xf00>;
+               };
+
                pmb0: reset-controller@4800c0 {
                        compatible = "brcm,bcm63138-pmb";
                        reg = <0x4800c0 0x10>;
diff --git a/arch/arm/boot/dts/bcm94708.dts b/arch/arm/boot/dts/bcm94708.dts
new file mode 100644 (file)
index 0000000..251a486
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2015 Broadcom Corporation.  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "bcm4708.dtsi"
+
+/ {
+       model = "NorthStar SVK (BCM94708)";
+       compatible = "brcm,bcm94708", "brcm,bcm4708";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x00000000 0x08000000>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm94709.dts b/arch/arm/boot/dts/bcm94709.dts
new file mode 100644 (file)
index 0000000..b16cac9
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2015 Broadcom Corporation.  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "bcm4708.dtsi"
+
+/ {
+       model = "NorthStar SVK (BCM94709)";
+       compatible = "brcm,bcm94709", "brcm,bcm4709", "brcm,bcm4708";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x00000000 0x08000000>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm953012k.dts b/arch/arm/boot/dts/bcm953012k.dts
new file mode 100644 (file)
index 0000000..05a985a
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2015 Broadcom Corporation.  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "bcm4708.dtsi"
+
+/ {
+       model = "NorthStar SVK (BCM953012K)";
+       compatible = "brcm,bcm953012k", "brcm,brcm53012", "brcm,bcm4708";
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       memory {
+               reg = <0x00000000 0x10000000>;
+       };
+};
+
+&uart0 {
+       clock-frequency = <62499840>;
+       status = "okay";
+};
+
+&uart1 {
+       clock-frequency = <62499840>;
+       status = "okay";
+};
index 16303dbd35df3d0ce0a5238a1e8c303c4d225df1..e298450b49b2bd6ee801b0367b5408724b4cb113 100644 (file)
 &uart1 {
        status = "okay";
 };
+
+&pcie0 {
+       status = "okay";
+};
+
+&pcie1 {
+       status = "okay";
+};
+
+&pcie2 {
+       status = "okay";
+};
+
+&nand {
+       nandcs@0 {
+               compatible = "brcm,nandcs";
+               reg = <0>;
+               nand-on-flash-bbt;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               nand-ecc-strength = <24>;
+               nand-ecc-step-size = <1024>;
+
+               brcm,nand-oob-sector-size = <27>;
+
+               partition@0 {
+                       label = "nboot";
+                       reg = <0x00000000 0x00200000>;
+                       read-only;
+               };
+               partition@1 {
+                       label = "nenv";
+                       reg = <0x00200000 0x00400000>;
+               };
+               partition@2 {
+                       label = "nsystem";
+                       reg = <0x00600000 0x00a00000>;
+               };
+               partition@3 {
+                       label = "nrootfs";
+                       reg = <0x01000000 0x03000000>;
+               };
+               partition@4 {
+                       label = "ncustfs";
+                       reg = <0x04000000 0x3c000000>;
+               };
+       };
+};
+
+&pinctrl {
+       pinctrl-names = "default";
+       pinctrl-0 = <&nand_sel>;
+       nand_sel: nand_sel {
+               function = "nand";
+               groups = "nand_grp";
+       };
+};
index eaadac3bdd44233d138a542364c1db28bc1908e8..ae81009741ffb3d024e6773e8680663032dbf0c2 100644 (file)
                        ranges = <0 0xfc0000 0x10000>;
                        interrupt-parent = <&sic>;
 
+                       wdt0: watchdog@1000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x1000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <0>;
+                       };
+
+                       wdt1: watchdog@2000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x2000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <1>;
+                               status = "disabled";
+                       };
+
+                       wdt2: watchdog@3000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x3000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <2>;
+                               status = "disabled";
+                       };
+
                        sm_gpio1: gpio@5000 {
                                compatible = "snps,dw-apb-gpio";
                                reg = <0x5000 0x400>;
index b16df157214d0271b37515434bcd7f93772a6434..6d06b6118d8373844f6bfb957419c28de353277e 100644 (file)
                        ranges = <0 0xfc0000 0x10000>;
                        interrupt-parent = <&sic>;
 
+                       wdt0: watchdog@1000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x1000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <0>;
+                       };
+
+                       wdt1: watchdog@2000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x2000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <1>;
+                               status = "disabled";
+                       };
+
+                       wdt2: watchdog@3000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x3000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <2>;
+                               status = "disabled";
+                       };
+
                        sm_gpio1: gpio@5000 {
                                compatible = "snps,dw-apb-gpio";
                                reg = <0x5000 0x400>;
index da28c9704a9d1dc741fcc71c89722428f2fd3653..33b28757b8f684e64d9bc07e16d1fb17d5377d44 100644 (file)
                        gpio = <&portb 12 GPIO_ACTIVE_HIGH>;
                        enable-active-high;
                };
+
+               reg_sdio1_vmmc: regulator@3 {
+                       compatible = "regulator-fixed";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-name = "sdio1_vmmc";
+                       enable-active-high;
+                       regulator-boot-on;
+                       gpio = <&portb 21 GPIO_ACTIVE_HIGH>;
+               };
+
+               reg_sdio1_vqmmc: regulator@4 {
+                       compatible = "regulator-gpio";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-name = "sdio1_vqmmc";
+                       regulator-type = "voltage";
+                       enable-active-high;
+                       gpios = <&portb 16 GPIO_ACTIVE_HIGH>;
+                       states = <3300000 0x1
+                                 1800000 0x0>;
+               };
+       };
+};
+
+&soc_pinctrl {
+       sd1gpio_pmux: sd1pwr-pmux {
+               groups = "G23", "G32";
+               function = "gpio";
        };
 };
 
 &sdhci1 {
-       broken-cd;
-       sdhci,wp-inverted;
+       vmmc-supply = <&reg_sdio1_vmmc>;
+       vqmmc-supply = <&reg_sdio1_vqmmc>;
+       cd-gpios = <&portc 30 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&portd 0 GPIO_ACTIVE_HIGH>;
+       pinctrl-0 = <&sd1gpio_pmux>, <&sd1_pmux>;
+       pinctrl-names = "default";
        status = "okay";
 };
 
 &sdhci2 {
-       broken-cd;
        bus-width = <8>;
        non-removable;
        status = "okay";
index 8ea177f375ddd652c98339ac2cc8ef8935396442..5f0abf6a89eba88f580cc7b4b2a573ca09daff06 100644 (file)
                                #address-cells = <1>;
                                #size-cells = <0>;
                                reg = <0x1400 0x100>;
-                               interrupt-parent = <&aic>;
                                interrupts = <4>;
                                clocks = <&chip_clk CLKID_CFG>;
                                pinctrl-0 = <&twsi0_pmux>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                reg = <0x1800 0x100>;
-                               interrupt-parent = <&aic>;
                                interrupts = <5>;
                                clocks = <&chip_clk CLKID_CFG>;
                                pinctrl-0 = <&twsi1_pmux>;
                        soc_pinctrl: pin-controller {
                                compatible = "marvell,berlin2q-soc-pinctrl";
 
+                               sd1_pmux: sd1-pmux {
+                                       groups = "G31";
+                                       function = "sd1";
+                               };
+
                                twsi0_pmux: twsi0-pmux {
                                        groups = "G6";
                                        function = "twsi0";
                        ranges = <0 0xfc0000 0x10000>;
                        interrupt-parent = <&sic>;
 
+                       wdt0: watchdog@1000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x1000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <0>;
+                       };
+
+                       wdt1: watchdog@2000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x2000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <1>;
+                               status = "disabled";
+                       };
+
+                       wdt2: watchdog@3000 {
+                               compatible = "snps,dw-wdt";
+                               reg = <0x3000 0x100>;
+                               clocks = <&refclk>;
+                               interrupts = <2>;
+                               status = "disabled";
+                       };
+
                        sm_gpio1: gpio@5000 {
                                compatible = "snps,dw-apb-gpio";
                                reg = <0x5000 0x400>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                reg = <0x7000 0x100>;
-                               interrupt-parent = <&sic>;
                                interrupts = <6>;
                                clocks = <&refclk>;
                                pinctrl-0 = <&twsi2_pmux>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                reg = <0x8000 0x100>;
-                               interrupt-parent = <&sic>;
                                interrupts = <7>;
                                clocks = <&refclk>;
                                pinctrl-0 = <&twsi3_pmux>;
                        uart0: uart@9000 {
                                compatible = "snps,dw-apb-uart";
                                reg = <0x9000 0x100>;
-                               interrupt-parent = <&sic>;
                                interrupts = <8>;
                                clocks = <&refclk>;
                                reg-shift = <2>;
                        uart1: uart@a000 {
                                compatible = "snps,dw-apb-uart";
                                reg = <0xa000 0x100>;
-                               interrupt-parent = <&sic>;
                                interrupts = <9>;
                                clocks = <&refclk>;
                                reg-shift = <2>;
diff --git a/arch/arm/boot/dts/compulab-sb-som.dtsi b/arch/arm/boot/dts/compulab-sb-som.dtsi
new file mode 100644 (file)
index 0000000..93d7e23
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2015 CompuLab, Ltd. - http://www.compulab.co.il/
+ *
+ * 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
+ * published by the Free Software Foundation.
+ */
+
+/ {
+       model = "CompuLab SB-SOM";
+       compatible = "compulab,sb-som";
+
+       vsb_3v3: fixedregulator-v3_3 {
+               compatible = "regulator-fixed";
+               regulator-name = "vsb_3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               enable-active-high;
+       };
+
+       lcd0: display {
+               compatible = "startek,startek-kd050c", "panel-dpi";
+               label = "lcd";
+
+               panel-timing {
+                       clock-frequency = <33000000>;
+                       hactive = <800>;
+                       vactive = <480>;
+                       hfront-porch = <40>;
+                       hback-porch = <40>;
+                       hsync-len = <43>;
+                       vback-porch = <29>;
+                       vfront-porch = <13>;
+                       vsync-len = <3>;
+                       hsync-active = <0>;
+                       vsync-active = <0>;
+                       de-active = <1>;
+                       pixelclk-active = <1>;
+               };
+       };
+
+       hdmi_conn: connector@0 {
+               compatible = "hdmi-connector";
+               label = "hdmi";
+
+               type = "a";
+       };
+};
index 3c99cfa1a8761604a409b9d0525f143c494571b0..b6543a86510237ba03e594e969123e05824d40a7 100644 (file)
@@ -64,7 +64,6 @@
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;
-               ti,hwmods = "l3_main";
 
                prcm: prcm@48180000 {
                        compatible = "ti,dm816-prcm";
                        #address-cells = <2>;
                        #size-cells = <1>;
                        interrupts = <100>;
+                       dmas = <&edma 52>;
+                       dma-names = "rxtx";
                        gpmc,num-cs = <6>;
                        gpmc,num-waitpins = <2>;
                };
                        };
                };
 
+               spinbox: spinbox@480ca000 {
+                       compatible = "ti,omap4-hwspinlock";
+                       reg = <0x480ca000 0x2000>;
+                       ti,hwmods = "spinbox";
+                       #hwlock-cells = <1>;
+               };
+
                mdio: mdio@4a100800 {
                        compatible = "ti,davinci_mdio";
                        #address-cells = <1>;
                        reg = <0x48044000 0x2000>;
                        interrupts = <92>;
                        ti,hwmods = "timer4";
+                       ti,timer-pwm;
                };
 
                timer5: timer@48046000 {
                        reg = <0x48046000 0x2000>;
                        interrupts = <93>;
                        ti,hwmods = "timer5";
+                       ti,timer-pwm;
                };
 
                timer6: timer@48048000 {
                        reg = <0x48048000 0x2000>;
                        interrupts = <94>;
                        ti,hwmods = "timer6";
+                       ti,timer-pwm;
                };
 
                timer7: timer@4804a000 {
                        reg = <0x4804a000 0x2000>;
                        interrupts = <95>;
                        ti,hwmods = "timer7";
+                       ti,timer-pwm;
                };
 
                uart1: uart@48020000 {
index e6fa251e17b93b54f67bcd39b8da57476ddda519..af3cb633135fc68885c12e30536290ae4e097e12 100644 (file)
                pinctrl-0 = <&pmx_gpio_19>;
                pinctrl-names = "default";
        };
+
+       gpu-subsystem {
+               status = "okay";
+       };
 };
 
 &uart0 { status = "okay"; };
        reg = <1>;
 };
 
+&gpu {
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
        clock-frequency = <100000>;
index cd58c2e62757a06c8230ea6edf1547f198acc3ca..698d58cea20d2e8c1a3c7d8e7a4dadb717847624 100644 (file)
                marvell,tauros2-cache-features = <0>;
        };
 
+       gpu-subsystem {
+               compatible = "marvell,dove-gpu-subsystem";
+               cores = <&gpu>;
+               status = "disabled";
+       };
+
        i2c-mux {
                compatible = "i2c-mux-pinctrl";
                #address-cells = <1>;
                                        #clock-cells = <1>;
                                };
 
+                               divider_clk: core-clock@0064 {
+                                       compatible = "marvell,dove-divider-clock";
+                                       reg = <0x0064 0x8>;
+                                       #clock-cells = <1>;
+                               };
+
                                pinctrl: pin-ctrl@0200 {
                                        compatible = "marvell,dove-pinctrl";
                                        reg = <0x0200 0x14>,
                                #address-cells = <1>;
                                #size-cells = <1>;
                        };
+
+                       gpu: gpu@840000 {
+                               clocks = <&divider_clk 1>;
+                               clock-names = "core";
+                               compatible = "vivante,gc";
+                               interrupts = <48>;
+                               power-domains = <&gpu_domain>;
+                               reg = <0x840000 0x4000>;
+                               status = "disabled";
+                       };
                };
        };
 };
index 864f60020124e44181a66706797c0c16c6970044..cfc24e52244e1b8b12f7d2e939458831df9173fe 100644 (file)
 
        vtt_pin: pinmux_vtt_pin {
                pinctrl-single,pins = <
-                       0x3b4 (PIN_OUTPUT | MUX_MODE14) /* spi1_cs1.gpio7_11 */
+                       DRA7XX_CORE_IOPAD(0x37b4, PIN_OUTPUT | MUX_MODE14) /* spi1_cs1.gpio7_11 */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda */
-                       0x404 (PIN_INPUT | MUX_MODE0) /* i2c1_scl */
+                       DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT | MUX_MODE0) /* i2c1_sda */
+                       DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT | MUX_MODE0) /* i2c1_scl */
                >;
        };
 
        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
-                       0x408 (PIN_INPUT | MUX_MODE0) /* i2c2_sda */
-                       0x40c (PIN_INPUT | MUX_MODE0) /* i2c2_scl */
+                       DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE0) /* i2c2_sda */
+                       DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE0) /* i2c2_scl */
                >;
        };
 
        i2c3_pins: pinmux_i2c3_pins {
                pinctrl-single,pins = <
-                       0x288 (PIN_INPUT | MUX_MODE9) /* gpio6_14.i2c3_sda */
-                       0x28c (PIN_INPUT | MUX_MODE9) /* gpio6_15.i2c3_scl */
+                       DRA7XX_CORE_IOPAD(0x3688, PIN_INPUT | MUX_MODE9) /* gpio6_14.i2c3_sda */
+                       DRA7XX_CORE_IOPAD(0x368c, PIN_INPUT | MUX_MODE9) /* gpio6_15.i2c3_scl */
                >;
        };
 
        mcspi1_pins: pinmux_mcspi1_pins {
                pinctrl-single,pins = <
-                       0x3a4 (PIN_INPUT | MUX_MODE0) /* spi1_sclk */
-                       0x3a8 (PIN_INPUT | MUX_MODE0) /* spi1_d1 */
-                       0x3ac (PIN_INPUT | MUX_MODE0) /* spi1_d0 */
-                       0x3b0 (PIN_INPUT_SLEW | MUX_MODE0) /* spi1_cs0 */
-                       0x3b8 (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs2.hdmi1_hpd */
-                       0x3bc (PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs3.hdmi1_cec */
+                       DRA7XX_CORE_IOPAD(0x37a4, PIN_INPUT | MUX_MODE0) /* spi1_sclk */
+                       DRA7XX_CORE_IOPAD(0x37a8, PIN_INPUT | MUX_MODE0) /* spi1_d1 */
+                       DRA7XX_CORE_IOPAD(0x37ac, PIN_INPUT | MUX_MODE0) /* spi1_d0 */
+                       DRA7XX_CORE_IOPAD(0x37b0, PIN_INPUT_SLEW | MUX_MODE0) /* spi1_cs0 */
+                       DRA7XX_CORE_IOPAD(0x37b8, PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs2.hdmi1_hpd */
+                       DRA7XX_CORE_IOPAD(0x37bc, PIN_INPUT_SLEW | MUX_MODE6) /* spi1_cs3.hdmi1_cec */
                >;
        };
 
        mcspi2_pins: pinmux_mcspi2_pins {
                pinctrl-single,pins = <
-                       0x3c0 (PIN_INPUT | MUX_MODE0) /* spi2_sclk */
-                       0x3c4 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
-                       0x3c8 (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
-                       0x3cc (PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */
+                       DRA7XX_CORE_IOPAD(0x37c0, PIN_INPUT | MUX_MODE0) /* spi2_sclk */
+                       DRA7XX_CORE_IOPAD(0x37c4, PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
+                       DRA7XX_CORE_IOPAD(0x37c8, PIN_INPUT_SLEW | MUX_MODE0) /* spi2_d1 */
+                       DRA7XX_CORE_IOPAD(0x37cc, PIN_INPUT_SLEW | MUX_MODE0) /* spi2_cs0 */
                >;
        };
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                       0x3e0 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_rxd */
-                       0x3e4 (PIN_INPUT_SLEW | MUX_MODE0) /* uart1_txd */
-                       0x3e8 (PIN_INPUT | MUX_MODE3) /* uart1_ctsn */
-                       0x3ec (PIN_INPUT | MUX_MODE3) /* uart1_rtsn */
+                       DRA7XX_CORE_IOPAD(0x37e0, PIN_INPUT_SLEW | MUX_MODE0) /* uart1_rxd */
+                       DRA7XX_CORE_IOPAD(0x37e4, PIN_INPUT_SLEW | MUX_MODE0) /* uart1_txd */
+                       DRA7XX_CORE_IOPAD(0x37e8, PIN_INPUT | MUX_MODE3) /* uart1_ctsn */
+                       DRA7XX_CORE_IOPAD(0x37ec, PIN_INPUT | MUX_MODE3) /* uart1_rtsn */
                >;
        };
 
        uart2_pins: pinmux_uart2_pins {
                pinctrl-single,pins = <
-                       0x3f0 (PIN_INPUT | MUX_MODE0) /* uart2_rxd */
-                       0x3f4 (PIN_INPUT | MUX_MODE0) /* uart2_txd */
-                       0x3f8 (PIN_INPUT | MUX_MODE0) /* uart2_ctsn */
-                       0x3fc (PIN_INPUT | MUX_MODE0) /* uart2_rtsn */
+                       DRA7XX_CORE_IOPAD(0x37f0, PIN_INPUT | MUX_MODE0) /* uart2_rxd */
+                       DRA7XX_CORE_IOPAD(0x37f4, PIN_INPUT | MUX_MODE0) /* uart2_txd */
+                       DRA7XX_CORE_IOPAD(0x37f8, PIN_INPUT | MUX_MODE0) /* uart2_ctsn */
+                       DRA7XX_CORE_IOPAD(0x37fc, PIN_INPUT | MUX_MODE0) /* uart2_rtsn */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x248 (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
-                       0x24c (PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
+                       DRA7XX_CORE_IOPAD(0x3648, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
+                       DRA7XX_CORE_IOPAD(0x364c, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
                >;
        };
 
        qspi1_pins: pinmux_qspi1_pins {
                pinctrl-single,pins = <
-                       0x4c (PIN_INPUT | MUX_MODE1)  /* gpmc_a3.qspi1_cs2 */
-                       0x50 (PIN_INPUT | MUX_MODE1)  /* gpmc_a4.qspi1_cs3 */
-                       0x74 (PIN_INPUT | MUX_MODE1)  /* gpmc_a13.qspi1_rtclk */
-                       0x78 (PIN_INPUT | MUX_MODE1)  /* gpmc_a14.qspi1_d3 */
-                       0x7c (PIN_INPUT | MUX_MODE1)  /* gpmc_a15.qspi1_d2 */
-                       0x80 (PIN_INPUT | MUX_MODE1) /* gpmc_a16.qspi1_d1 */
-                       0x84 (PIN_INPUT | MUX_MODE1)  /* gpmc_a17.qspi1_d0 */
-                       0x88 (PIN_INPUT | MUX_MODE1)  /* qpmc_a18.qspi1_sclk */
-                       0xb8 (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs2.qspi1_cs0 */
-                       0xbc (PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs3.qspi1_cs1 */
+                       DRA7XX_CORE_IOPAD(0x344c, PIN_INPUT | MUX_MODE1)  /* gpmc_a3.qspi1_cs2 */
+                       DRA7XX_CORE_IOPAD(0x3450, PIN_INPUT | MUX_MODE1)  /* gpmc_a4.qspi1_cs3 */
+                       DRA7XX_CORE_IOPAD(0x3474, PIN_INPUT | MUX_MODE1)  /* gpmc_a13.qspi1_rtclk */
+                       DRA7XX_CORE_IOPAD(0x3478, PIN_INPUT | MUX_MODE1)  /* gpmc_a14.qspi1_d3 */
+                       DRA7XX_CORE_IOPAD(0x347c, PIN_INPUT | MUX_MODE1)  /* gpmc_a15.qspi1_d2 */
+                       DRA7XX_CORE_IOPAD(0x3480, PIN_INPUT | MUX_MODE1) /* gpmc_a16.qspi1_d1 */
+                       DRA7XX_CORE_IOPAD(0x3484, PIN_INPUT | MUX_MODE1)  /* gpmc_a17.qspi1_d0 */
+                       DRA7XX_CORE_IOPAD(0x3488, PIN_INPUT | MUX_MODE1)  /* qpmc_a18.qspi1_sclk */
+                       DRA7XX_CORE_IOPAD(0x34b8, PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs2.qspi1_cs0 */
+                       DRA7XX_CORE_IOPAD(0x34bc, PIN_INPUT_PULLUP | MUX_MODE1)  /* gpmc_cs3.qspi1_cs1 */
                >;
        };
 
        usb1_pins: pinmux_usb1_pins {
                 pinctrl-single,pins = <
-                       0x280 (PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
+                       DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
                 >;
         };
 
        usb2_pins: pinmux_usb2_pins {
                 pinctrl-single,pins = <
-                       0x284 (PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
+                       DRA7XX_CORE_IOPAD(0x3684, PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
                 >;
         };
 
                 * SW5.9 (GPMC_WPN) = LOW
                 * SW5.1 (NAND_BOOTn) = HIGH */
                pinctrl-single,pins = <
-                       0x0     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad0     */
-                       0x4     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad1     */
-                       0x8     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad2     */
-                       0xc     (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad3     */
-                       0x10    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad4     */
-                       0x14    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad5     */
-                       0x18    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad6     */
-                       0x1c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad7     */
-                       0x20    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad8     */
-                       0x24    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad9     */
-                       0x28    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad10    */
-                       0x2c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad11    */
-                       0x30    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad12    */
-                       0x34    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad13    */
-                       0x38    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad14    */
-                       0x3c    (PIN_INPUT  | MUX_MODE0)        /* gpmc_ad15    */
-                       0xd8    (PIN_INPUT_PULLUP  | MUX_MODE0) /* gpmc_wait0   */
-                       0xcc    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_wen     */
-                       0xb4    (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_csn0    */
-                       0xc4    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_advn_ale */
-                       0xc8    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_oen_ren  */
-                       0xd0    (PIN_OUTPUT | MUX_MODE0)        /* gpmc_be0n_cle */
+                       DRA7XX_CORE_IOPAD(0x3400, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad0     */
+                       DRA7XX_CORE_IOPAD(0x3404, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad1     */
+                       DRA7XX_CORE_IOPAD(0x3408, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad2     */
+                       DRA7XX_CORE_IOPAD(0x340c, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad3     */
+                       DRA7XX_CORE_IOPAD(0x3410, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad4     */
+                       DRA7XX_CORE_IOPAD(0x3414, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad5     */
+                       DRA7XX_CORE_IOPAD(0x3418, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad6     */
+                       DRA7XX_CORE_IOPAD(0x341c, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad7     */
+                       DRA7XX_CORE_IOPAD(0x3420, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad8     */
+                       DRA7XX_CORE_IOPAD(0x3424, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad9     */
+                       DRA7XX_CORE_IOPAD(0x3428, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad10    */
+                       DRA7XX_CORE_IOPAD(0x342c, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad11    */
+                       DRA7XX_CORE_IOPAD(0x3430, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad12    */
+                       DRA7XX_CORE_IOPAD(0x3434, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad13    */
+                       DRA7XX_CORE_IOPAD(0x3438, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad14    */
+                       DRA7XX_CORE_IOPAD(0x343c, PIN_INPUT  | MUX_MODE0)       /* gpmc_ad15    */
+                       DRA7XX_CORE_IOPAD(0x34d8, PIN_INPUT_PULLUP  | MUX_MODE0)        /* gpmc_wait0   */
+                       DRA7XX_CORE_IOPAD(0x34cc, PIN_OUTPUT | MUX_MODE0)       /* gpmc_wen     */
+                       DRA7XX_CORE_IOPAD(0x34b4, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* gpmc_csn0    */
+                       DRA7XX_CORE_IOPAD(0x34c4, PIN_OUTPUT | MUX_MODE0)       /* gpmc_advn_ale */
+                       DRA7XX_CORE_IOPAD(0x34c8, PIN_OUTPUT | MUX_MODE0)       /* gpmc_oen_ren  */
+                       DRA7XX_CORE_IOPAD(0x34d0, PIN_OUTPUT | MUX_MODE0)       /* gpmc_be0n_cle */
                >;
        };
 
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x250 (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txc.rgmii0_txc */
-                       0x254 (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txctl.rgmii0_txctl */
-                       0x258 (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_td3.rgmii0_txd3 */
-                       0x25c (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd2.rgmii0_txd2 */
-                       0x260 (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd1.rgmii0_txd1 */
-                       0x264 (PIN_OUTPUT | MUX_MODE0)  /* rgmii0_txd0.rgmii0_txd0 */
-                       0x268 (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxc.rgmii0_rxc */
-                       0x26c (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxctl.rgmii0_rxctl */
-                       0x270 (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxd3.rgmii0_rxd3 */
-                       0x274 (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxd2.rgmii0_rxd2 */
-                       0x278 (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxd1.rgmii0_rxd1 */
-                       0x27c (PIN_INPUT | MUX_MODE0)   /* rgmii0_rxd0.rgmii0_rxd0 */
+                       DRA7XX_CORE_IOPAD(0x3650, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_txc.rgmii0_txc */
+                       DRA7XX_CORE_IOPAD(0x3654, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_txctl.rgmii0_txctl */
+                       DRA7XX_CORE_IOPAD(0x3658, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_td3.rgmii0_txd3 */
+                       DRA7XX_CORE_IOPAD(0x365c, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_txd2.rgmii0_txd2 */
+                       DRA7XX_CORE_IOPAD(0x3660, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_txd1.rgmii0_txd1 */
+                       DRA7XX_CORE_IOPAD(0x3664, PIN_OUTPUT | MUX_MODE0)       /* rgmii0_txd0.rgmii0_txd0 */
+                       DRA7XX_CORE_IOPAD(0x3668, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxc.rgmii0_rxc */
+                       DRA7XX_CORE_IOPAD(0x366c, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxctl.rgmii0_rxctl */
+                       DRA7XX_CORE_IOPAD(0x3670, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxd3.rgmii0_rxd3 */
+                       DRA7XX_CORE_IOPAD(0x3674, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxd2.rgmii0_rxd2 */
+                       DRA7XX_CORE_IOPAD(0x3678, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxd1.rgmii0_rxd1 */
+                       DRA7XX_CORE_IOPAD(0x367c, PIN_INPUT | MUX_MODE0)        /* rgmii0_rxd0.rgmii0_rxd0 */
 
                        /* Slave 2 */
-                       0x198 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d12.rgmii1_txc */
-                       0x19c (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d13.rgmii1_tctl */
-                       0x1a0 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d14.rgmii1_td3 */
-                       0x1a4 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d15.rgmii1_td2 */
-                       0x1a8 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d16.rgmii1_td1 */
-                       0x1ac (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d17.rgmii1_td0 */
-                       0x1b0 (PIN_INPUT | MUX_MODE3)   /* vin2a_d18.rgmii1_rclk */
-                       0x1b4 (PIN_INPUT | MUX_MODE3)   /* vin2a_d19.rgmii1_rctl */
-                       0x1b8 (PIN_INPUT | MUX_MODE3)   /* vin2a_d20.rgmii1_rd3 */
-                       0x1bc (PIN_INPUT | MUX_MODE3)   /* vin2a_d21.rgmii1_rd2 */
-                       0x1c0 (PIN_INPUT | MUX_MODE3)   /* vin2a_d22.rgmii1_rd1 */
-                       0x1c4 (PIN_INPUT | MUX_MODE3)   /* vin2a_d23.rgmii1_rd0 */
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d12.rgmii1_txc */
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d13.rgmii1_tctl */
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d14.rgmii1_td3 */
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d15.rgmii1_td2 */
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d16.rgmii1_td1 */
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d17.rgmii1_td0 */
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE3)        /* vin2a_d18.rgmii1_rclk */
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE3)        /* vin2a_d19.rgmii1_rctl */
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE3)        /* vin2a_d20.rgmii1_rd3 */
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE3)        /* vin2a_d21.rgmii1_rd2 */
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE3)        /* vin2a_d22.rgmii1_rd1 */
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE3)        /* vin2a_d23.rgmii1_rd0 */
                >;
 
        };
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 1 */
-                       0x250 (MUX_MODE15)
-                       0x254 (MUX_MODE15)
-                       0x258 (MUX_MODE15)
-                       0x25c (MUX_MODE15)
-                       0x260 (MUX_MODE15)
-                       0x264 (MUX_MODE15)
-                       0x268 (MUX_MODE15)
-                       0x26c (MUX_MODE15)
-                       0x270 (MUX_MODE15)
-                       0x274 (MUX_MODE15)
-                       0x278 (MUX_MODE15)
-                       0x27c (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3650, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3654, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3658, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x365c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3660, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3664, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3668, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x366c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3670, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3674, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3678, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x367c, MUX_MODE15)
 
                        /* Slave 2 */
-                       0x198 (MUX_MODE15)
-                       0x19c (MUX_MODE15)
-                       0x1a0 (MUX_MODE15)
-                       0x1a4 (MUX_MODE15)
-                       0x1a8 (MUX_MODE15)
-                       0x1ac (MUX_MODE15)
-                       0x1b0 (MUX_MODE15)
-                       0x1b4 (MUX_MODE15)
-                       0x1b8 (MUX_MODE15)
-                       0x1bc (MUX_MODE15)
-                       0x1c0 (MUX_MODE15)
-                       0x1c4 (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3598, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x359c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a4, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a8, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35ac, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b4, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b8, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35bc, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c4, MUX_MODE15)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
-                       0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* mdio_d.mdio_d */
-                       0x240 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mdio_clk.mdio_clk */
+                       DRA7XX_CORE_IOPAD(0x363c, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* mdio_d.mdio_d */
+                       DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
-                       0x23c (MUX_MODE15)
-                       0x240 (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x363c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3640, MUX_MODE15)
                >;
        };
 
        dcan1_pins_default: dcan1_pins_default {
                pinctrl-single,pins = <
-                       0x3d0   (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
-                       0x418   (PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */
+                       DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
+                       DRA7XX_CORE_IOPAD(0x3818, PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */
                >;
        };
 
        dcan1_pins_sleep: dcan1_pins_sleep {
                pinctrl-single,pins = <
-                       0x3d0   (MUX_MODE15 | PULL_UP)  /* dcan1_tx.off */
-                       0x418   (MUX_MODE15 | PULL_UP)  /* wakeup0.off */
+                       DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */
+                       DRA7XX_CORE_IOPAD(0x3818, MUX_MODE15 | PULL_UP) /* wakeup0.off */
                >;
        };
 
        atl_pins: pinmux_atl_pins {
                pinctrl-single,pins = <
-                       0x298 (PIN_OUTPUT | MUX_MODE5)  /* xref_clk1.atl_clk1 */
-                       0x29c (PIN_OUTPUT | MUX_MODE5)  /* xref_clk2.atl_clk2 */
+                       DRA7XX_CORE_IOPAD(0x3698, PIN_OUTPUT | MUX_MODE5)       /* xref_clk1.atl_clk1 */
+                       DRA7XX_CORE_IOPAD(0x369c, PIN_OUTPUT | MUX_MODE5)       /* xref_clk2.atl_clk2 */
                >;
        };
 
        mcasp3_pins: pinmux_mcasp3_pins {
                pinctrl-single,pins = <
-                       0x324 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx */
-                       0x328 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx */
-                       0x32c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0 */
-                       0x330 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp3_axr1 */
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_aclkx */
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_fsx */
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_axr0 */
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE0)       /* mcasp3_axr1 */
                >;
        };
 
        mcasp3_sleep_pins: pinmux_mcasp3_sleep_pins {
                pinctrl-single,pins = <
-                       0x324 (MUX_MODE15)
-                       0x328 (MUX_MODE15)
-                       0x32c (MUX_MODE15)
-                       0x330 (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3724, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3728, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x372c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3730, MUX_MODE15)
                >;
        };
 };
                                        regulator-max-microvolt = <1050000>;
                                        regulator-always-on;
                                        regulator-boot-on;
+                                       regulator-allow-bypass;
                                };
 
                                ldoln_reg: ldoln {
index bc672fb91466a5635a29c0811c202ef5c418aeeb..c4d9175b90dceab5aa64ca1973505652bf325bee 100644 (file)
@@ -41,6 +41,7 @@
                ethernet1 = &cpsw_emac1;
                d_can0 = &dcan1;
                d_can1 = &dcan2;
+               spi0 = &qspi;
        };
 
        timer {
 
                qspi: qspi@4b300000 {
                        compatible = "ti,dra7xxx-qspi";
-                       reg = <0x4b300000 0x100>;
-                       reg-names = "qspi_base";
+                       reg = <0x4b300000 0x100>,
+                             <0x5c000000 0x4000000>;
+                       reg-names = "qspi_base", "qspi_mmap";
+                       syscon-chipselects = <&scm_conf 0x558>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "qspi";
                        interrupt-names = "tx", "rx";
                        dmas = <&sdma_xbar 133>, <&sdma_xbar 132>;
                        dma-names = "tx", "rx";
-                       clocks = <&mcasp3_ahclkx_mux>;
-                       clock-names = "fck";
+                       clocks = <&mcasp3_aux_gfclk_mux>, <&mcasp3_ahclkx_mux>;
+                       clock-names = "fck", "ahclkx";
                        status = "disabled";
                };
 
index d6104d5f0c0181ac8a880db0b67e29a3d65aaf19..00b12002c07c064df61c029cfa1ab9f97ba25323 100644 (file)
 &dra7_pmx_core {
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x400 (PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
-                       0x404 (PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
+                       DRA7XX_CORE_IOPAD(0x3800, PIN_INPUT | MUX_MODE0) /* i2c1_sda.i2c1_sda */
+                       DRA7XX_CORE_IOPAD(0x3804, PIN_INPUT | MUX_MODE0) /* i2c1_scl.i2c1_scl */
                >;
        };
 
        i2c5_pins: pinmux_i2c5_pins {
                pinctrl-single,pins = <
-                       0x2b4 (PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
-                       0x2b8 (PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
+                       DRA7XX_CORE_IOPAD(0x36b4, PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
+                       DRA7XX_CORE_IOPAD(0x36b8, PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
                >;
        };
 
        i2c5_pins: pinmux_i2c5_pins {
                pinctrl-single,pins = <
-                       0x2b4 (PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
-                       0x2b8 (PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
+                       DRA7XX_CORE_IOPAD(0x36b4, PIN_INPUT | MUX_MODE10) /* mcasp1_axr0.i2c5_sda */
+                       DRA7XX_CORE_IOPAD(0x36b8, PIN_INPUT | MUX_MODE10) /* mcasp1_axr1.i2c5_scl */
                >;
        };
 
        nand_default: nand_default {
                pinctrl-single,pins = <
-                       0x0     (PIN_INPUT  | MUX_MODE0) /* gpmc_ad0 */
-                       0x4     (PIN_INPUT  | MUX_MODE0) /* gpmc_ad1 */
-                       0x8     (PIN_INPUT  | MUX_MODE0) /* gpmc_ad2 */
-                       0xc     (PIN_INPUT  | MUX_MODE0) /* gpmc_ad3 */
-                       0x10    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad4 */
-                       0x14    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad5 */
-                       0x18    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad6 */
-                       0x1c    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad7 */
-                       0x20    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad8 */
-                       0x24    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad9 */
-                       0x28    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad10 */
-                       0x2c    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad11 */
-                       0x30    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad12 */
-                       0x34    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad13 */
-                       0x38    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad14 */
-                       0x3c    (PIN_INPUT  | MUX_MODE0) /* gpmc_ad15 */
-                       0xb4    (PIN_OUTPUT | MUX_MODE0) /* gpmc_cs0 */
-                       0xc4    (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale */
-                       0xcc    (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen */
-                       0xc8    (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren */
-                       0xd0    (PIN_OUTPUT | MUX_MODE0) /* gpmc_ben0 */
-                       0xd8    (PIN_INPUT  | MUX_MODE0) /* gpmc_wait0 */
+                       DRA7XX_CORE_IOPAD(0x3400, PIN_INPUT  | MUX_MODE0) /* gpmc_ad0 */
+                       DRA7XX_CORE_IOPAD(0x3404, PIN_INPUT  | MUX_MODE0) /* gpmc_ad1 */
+                       DRA7XX_CORE_IOPAD(0x3408, PIN_INPUT  | MUX_MODE0) /* gpmc_ad2 */
+                       DRA7XX_CORE_IOPAD(0x340c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad3 */
+                       DRA7XX_CORE_IOPAD(0x3410, PIN_INPUT  | MUX_MODE0) /* gpmc_ad4 */
+                       DRA7XX_CORE_IOPAD(0x3414, PIN_INPUT  | MUX_MODE0) /* gpmc_ad5 */
+                       DRA7XX_CORE_IOPAD(0x3418, PIN_INPUT  | MUX_MODE0) /* gpmc_ad6 */
+                       DRA7XX_CORE_IOPAD(0x341c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad7 */
+                       DRA7XX_CORE_IOPAD(0x3420, PIN_INPUT  | MUX_MODE0) /* gpmc_ad8 */
+                       DRA7XX_CORE_IOPAD(0x3424, PIN_INPUT  | MUX_MODE0) /* gpmc_ad9 */
+                       DRA7XX_CORE_IOPAD(0x3428, PIN_INPUT  | MUX_MODE0) /* gpmc_ad10 */
+                       DRA7XX_CORE_IOPAD(0x342c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad11 */
+                       DRA7XX_CORE_IOPAD(0x3430, PIN_INPUT  | MUX_MODE0) /* gpmc_ad12 */
+                       DRA7XX_CORE_IOPAD(0x3434, PIN_INPUT  | MUX_MODE0) /* gpmc_ad13 */
+                       DRA7XX_CORE_IOPAD(0x3438, PIN_INPUT  | MUX_MODE0) /* gpmc_ad14 */
+                       DRA7XX_CORE_IOPAD(0x343c, PIN_INPUT  | MUX_MODE0) /* gpmc_ad15 */
+                       DRA7XX_CORE_IOPAD(0x34b4, PIN_OUTPUT | MUX_MODE0) /* gpmc_cs0 */
+                       DRA7XX_CORE_IOPAD(0x34c4, PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale */
+                       DRA7XX_CORE_IOPAD(0x34cc, PIN_OUTPUT | MUX_MODE0) /* gpmc_wen */
+                       DRA7XX_CORE_IOPAD(0x34c8, PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren */
+                       DRA7XX_CORE_IOPAD(0x34d0, PIN_OUTPUT | MUX_MODE0) /* gpmc_ben0 */
+                       DRA7XX_CORE_IOPAD(0x34d8, PIN_INPUT  | MUX_MODE0) /* gpmc_wait0 */
                >;
        };
 
        usb1_pins: pinmux_usb1_pins {
                pinctrl-single,pins = <
-                       0x280 (PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
+                       DRA7XX_CORE_IOPAD(0x3680, PIN_INPUT_SLEW | MUX_MODE0) /* usb1_drvvbus */
                >;
        };
 
        usb2_pins: pinmux_usb2_pins {
                pinctrl-single,pins = <
-                       0x284 (PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
+                       DRA7XX_CORE_IOPAD(0x3684, PIN_INPUT_SLEW | MUX_MODE0) /* usb2_drvvbus */
                >;
        };
 
        tps65917_pins_default: tps65917_pins_default {
                pinctrl-single,pins = <
-                       0x424 (PIN_INPUT_PULLUP | MUX_MODE1) /* wakeup3.sys_nirq1 */
+                       DRA7XX_CORE_IOPAD(0x3824, PIN_INPUT_PULLUP | MUX_MODE1) /* wakeup3.sys_nirq1 */
                >;
        };
 
        mmc1_pins_default: mmc1_pins_default {
                pinctrl-single,pins = <
-                       0x36c (PIN_INPUT | MUX_MODE14)  /* mmc1sdcd.gpio219 */
-                       0x354 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
-                       0x358 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
-                       0x35c (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
-                       0x360 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
-                       0x364 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
-                       0x368 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
+                       DRA7XX_CORE_IOPAD(0x376c, PIN_INPUT | MUX_MODE14)       /* mmc1sdcd.gpio219 */
+                       DRA7XX_CORE_IOPAD(0x3754, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_clk.clk */
+                       DRA7XX_CORE_IOPAD(0x3758, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_cmd.cmd */
+                       DRA7XX_CORE_IOPAD(0x375c, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat0.dat0 */
+                       DRA7XX_CORE_IOPAD(0x3760, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat1.dat1 */
+                       DRA7XX_CORE_IOPAD(0x3764, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat2.dat2 */
+                       DRA7XX_CORE_IOPAD(0x3768, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc1_dat3.dat3 */
                >;
        };
 
        mmc2_pins_default: mmc2_pins_default {
                pinctrl-single,pins = <
-                       0x9c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
-                       0xb0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
-                       0xa0 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
-                       0xa4 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
-                       0xa8 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
-                       0xac (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
-                       0x8c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
-                       0x90 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
-                       0x94 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
-                       0x98 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
+                       DRA7XX_CORE_IOPAD(0x349c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a23.mmc2_clk */
+                       DRA7XX_CORE_IOPAD(0x34b0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_cs1.mmc2_cmd */
+                       DRA7XX_CORE_IOPAD(0x34a0, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a24.mmc2_dat0 */
+                       DRA7XX_CORE_IOPAD(0x34a4, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a25.mmc2_dat1 */
+                       DRA7XX_CORE_IOPAD(0x34a8, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a26.mmc2_dat2 */
+                       DRA7XX_CORE_IOPAD(0x34ac, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a27.mmc2_dat3 */
+                       DRA7XX_CORE_IOPAD(0x348c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a19.mmc2_dat4 */
+                       DRA7XX_CORE_IOPAD(0x3490, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a20.mmc2_dat5 */
+                       DRA7XX_CORE_IOPAD(0x3494, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a21.mmc2_dat6 */
+                       DRA7XX_CORE_IOPAD(0x3498, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_a22.mmc2_dat7 */
                >;
        };
 
        dcan1_pins_default: dcan1_pins_default {
                pinctrl-single,pins = <
-                       0x3d0   (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
-                       0x418   (PULL_UP | MUX_MODE1)   /* wakeup0.dcan1_rx */
+                       DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */
+                       DRA7XX_CORE_IOPAD(0x3818, PULL_UP | MUX_MODE1)  /* wakeup0.dcan1_rx */
                >;
        };
 
        dcan1_pins_sleep: dcan1_pins_sleep {
                pinctrl-single,pins = <
-                       0x3d0   (MUX_MODE15 | PULL_UP)  /* dcan1_tx.off */
-                       0x418   (MUX_MODE15 | PULL_UP)  /* wakeup0.off */
+                       DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */
+                       DRA7XX_CORE_IOPAD(0x3818, MUX_MODE15 | PULL_UP) /* wakeup0.off */
                >;
        };
 
        qspi1_pins: pinmux_qspi1_pins {
                pinctrl-single,pins = <
-                       0x74 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_a13.qspi1_rtclk */
-                       0x78 (PIN_INPUT | MUX_MODE1)    /* gpmc_a14.qspi1_d3 */
-                       0x7c (PIN_INPUT | MUX_MODE1)    /* gpmc_a15.qspi1_d2 */
-                       0x80 (PIN_INPUT | MUX_MODE1)    /* gpmc_a16.qspi1_d1 */
-                       0x84 (PIN_INPUT | MUX_MODE1)    /* gpmc_a17.qspi1_d0 */
-                       0x88 (PIN_OUTPUT | MUX_MODE1)   /* qpmc_a18.qspi1_sclk */
-                       0xb8 (PIN_OUTPUT | MUX_MODE1)   /* gpmc_cs2.qspi1_cs0 */
+                       DRA7XX_CORE_IOPAD(0x3474, PIN_OUTPUT | MUX_MODE1)       /* gpmc_a13.qspi1_rtclk */
+                       DRA7XX_CORE_IOPAD(0x3478, PIN_INPUT | MUX_MODE1)        /* gpmc_a14.qspi1_d3 */
+                       DRA7XX_CORE_IOPAD(0x347c, PIN_INPUT | MUX_MODE1)        /* gpmc_a15.qspi1_d2 */
+                       DRA7XX_CORE_IOPAD(0x3480, PIN_INPUT | MUX_MODE1)        /* gpmc_a16.qspi1_d1 */
+                       DRA7XX_CORE_IOPAD(0x3484, PIN_INPUT | MUX_MODE1)        /* gpmc_a17.qspi1_d0 */
+                       DRA7XX_CORE_IOPAD(0x3488, PIN_OUTPUT | MUX_MODE1)       /* qpmc_a18.qspi1_sclk */
+                       DRA7XX_CORE_IOPAD(0x34b8, PIN_OUTPUT | MUX_MODE1)       /* gpmc_cs2.qspi1_cs0 */
                >;
        };
 
        hdmi_pins: pinmux_hdmi_pins {
                pinctrl-single,pins = <
-                       0x408 (PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */
-                       0x40c (PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */
+                       DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */
+                       DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */
                >;
        };
 
        tpd12s015_pins: pinmux_tpd12s015_pins {
                pinctrl-single,pins = <
-                       0x3b8 (PIN_INPUT_PULLDOWN | MUX_MODE14) /* gpio7_12 HPD */
+                       DRA7XX_CORE_IOPAD(0x37b8, PIN_INPUT_PULLDOWN | MUX_MODE14) /* gpio7_12 HPD */
                >;
        };
 
        atl_pins: pinmux_atl_pins {
                pinctrl-single,pins = <
-                       0x298 (PIN_OUTPUT | MUX_MODE5)  /* xref_clk1.atl_clk1 */
-                       0x29c (PIN_OUTPUT | MUX_MODE5)  /* xref_clk2.atl_clk2 */
+                       DRA7XX_CORE_IOPAD(0x3698, PIN_OUTPUT | MUX_MODE5)       /* xref_clk1.atl_clk1 */
+                       DRA7XX_CORE_IOPAD(0x369c, PIN_OUTPUT | MUX_MODE5)       /* xref_clk2.atl_clk2 */
                >;
        };
 
        mcasp3_pins: pinmux_mcasp3_pins {
                pinctrl-single,pins = <
-                       0x324 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_aclkx */
-                       0x328 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_fsx */
-                       0x32c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp3_axr0 */
-                       0x330 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp3_axr1 */
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_aclkx */
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_fsx */
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)      /* mcasp3_axr0 */
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE0)       /* mcasp3_axr1 */
                >;
        };
 
        mcasp3_sleep_pins: pinmux_mcasp3_sleep_pins {
                pinctrl-single,pins = <
-                       0x324 (PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       0x328 (PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       0x32c (PIN_INPUT_PULLDOWN | MUX_MODE15)
-                       0x330 (PIN_INPUT_PULLDOWN | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3724, PIN_INPUT_PULLDOWN | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3728, PIN_INPUT_PULLDOWN | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x372c, PIN_INPUT_PULLDOWN | MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3730, PIN_INPUT_PULLDOWN | MUX_MODE15)
                >;
        };
 };
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
                                        regulator-boot-on;
+                                       regulator-allow-bypass;
                                };
 
                                ldo2_reg: ldo2 {
                                        regulator-name = "ldo2";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <3300000>;
+                                       regulator-allow-bypass;
                                };
 
                                ldo3_reg: ldo3 {
 
 &uart1 {
        status = "okay";
+       interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+                             <&dra7_pmx_core 0x3e0>;
 };
 
 &elm {
        cpsw_default: cpsw_default {
                pinctrl-single,pins = <
                        /* Slave 2 */
-                       0x198 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d12.rgmii1_txc */
-                       0x19c (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d13.rgmii1_tctl */
-                       0x1a0 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d14.rgmii1_td3 */
-                       0x1a4 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d15.rgmii1_td2 */
-                       0x1a8 (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d16.rgmii1_td1 */
-                       0x1ac (PIN_OUTPUT | MUX_MODE3)  /* vin2a_d17.rgmii1_td0 */
-                       0x1b0 (PIN_INPUT | MUX_MODE3)   /* vin2a_d18.rgmii1_rclk */
-                       0x1b4 (PIN_INPUT | MUX_MODE3)   /* vin2a_d19.rgmii1_rctl */
-                       0x1b8 (PIN_INPUT | MUX_MODE3)   /* vin2a_d20.rgmii1_rd3 */
-                       0x1bc (PIN_INPUT | MUX_MODE3)   /* vin2a_d21.rgmii1_rd2 */
-                       0x1c0 (PIN_INPUT | MUX_MODE3)   /* vin2a_d22.rgmii1_rd1 */
-                       0x1c4 (PIN_INPUT | MUX_MODE3)   /* vin2a_d23.rgmii1_rd0 */
+                       DRA7XX_CORE_IOPAD(0x3598, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d12.rgmii1_txc */
+                       DRA7XX_CORE_IOPAD(0x359c, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d13.rgmii1_tctl */
+                       DRA7XX_CORE_IOPAD(0x35a0, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d14.rgmii1_td3 */
+                       DRA7XX_CORE_IOPAD(0x35a4, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d15.rgmii1_td2 */
+                       DRA7XX_CORE_IOPAD(0x35a8, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d16.rgmii1_td1 */
+                       DRA7XX_CORE_IOPAD(0x35ac, PIN_OUTPUT | MUX_MODE3)       /* vin2a_d17.rgmii1_td0 */
+                       DRA7XX_CORE_IOPAD(0x35b0, PIN_INPUT | MUX_MODE3)        /* vin2a_d18.rgmii1_rclk */
+                       DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT | MUX_MODE3)        /* vin2a_d19.rgmii1_rctl */
+                       DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT | MUX_MODE3)        /* vin2a_d20.rgmii1_rd3 */
+                       DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT | MUX_MODE3)        /* vin2a_d21.rgmii1_rd2 */
+                       DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT | MUX_MODE3)        /* vin2a_d22.rgmii1_rd1 */
+                       DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT | MUX_MODE3)        /* vin2a_d23.rgmii1_rd0 */
                >;
 
        };
        cpsw_sleep: cpsw_sleep {
                pinctrl-single,pins = <
                        /* Slave 2 */
-                       0x198 (MUX_MODE15)
-                       0x19c (MUX_MODE15)
-                       0x1a0 (MUX_MODE15)
-                       0x1a4 (MUX_MODE15)
-                       0x1a8 (MUX_MODE15)
-                       0x1ac (MUX_MODE15)
-                       0x1b0 (MUX_MODE15)
-                       0x1b4 (MUX_MODE15)
-                       0x1b8 (MUX_MODE15)
-                       0x1bc (MUX_MODE15)
-                       0x1c0 (MUX_MODE15)
-                       0x1c4 (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3598, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x359c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a4, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35a8, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35ac, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b4, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35b8, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35bc, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c0, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x35c4, MUX_MODE15)
                >;
        };
 
        davinci_mdio_default: davinci_mdio_default {
                pinctrl-single,pins = <
                        /* MDIO */
-                       0x23c (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* mdio_d.mdio_d */
-                       0x240 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mdio_clk.mdio_clk */
+                       DRA7XX_CORE_IOPAD(0x363c, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* mdio_d.mdio_d */
+                       DRA7XX_CORE_IOPAD(0x3640, PIN_INPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
                >;
        };
 
        davinci_mdio_sleep: davinci_mdio_sleep {
                pinctrl-single,pins = <
-                       0x23c (MUX_MODE15)
-                       0x240 (MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x363c, MUX_MODE15)
+                       DRA7XX_CORE_IOPAD(0x3640, MUX_MODE15)
                >;
        };
 };
index a4ba31b23c88606379bec02dfca9fd6b86fb09ef..a4a281fe82af3698c89f23b13941796616b56bc3 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 /dts-v1/;
-/include/ "lpc32xx.dtsi"
+#include "lpc32xx.dtsi"
 
 / {
        model = "Embedded Artists LPC3250 board based on NXP LPC3250";
@@ -22,7 +22,7 @@
 
        memory {
                device_type = "memory";
-               reg = <0 0x4000000>;
+               reg = <0x80000000 0x4000000>;
        };
 
        ahb {
                        use-iram;
                };
 
-               /* Here, choose exactly one from: ohci, usbd */
-               ohci@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-
-/*
-               usbd@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-*/
-
                /* 128MB Flash via SLC NAND controller */
                slc: flash@20020000 {
                        status = "okay";
                                clock-frequency = <100000>;
                        };
 
-                       i2cusb: i2c@31020300 {
-                               clock-frequency = <100000>;
-
-                               isp1301: usb-transceiver@2d {
-                                       compatible = "nxp,isp1301";
-                                       reg = <0x2d>;
-                               };
-                       };
-
                        sd@20098000 {
                                wp-gpios = <&pca9532 5 0>;
                                cd-gpios = <&pca9532 4 0>;
                };
        };
 };
+
+/* Here, choose exactly one from: ohci, usbd */
+&ohci /* &usbd */ {
+       transceiver = <&isp1301>;
+       status = "okay";
+};
+
+&i2cusb {
+       clock-frequency = <100000>;
+
+       isp1301: usb-transceiver@2d {
+               compatible = "nxp,isp1301";
+               reg = <0x2d>;
+       };
+};
index 2f30d632f1cca74c70e5b8b733047f242e608a13..18e3deffbf4803b2a659f4825f1df00d0674b2f3 100644 (file)
                        interrupt-parent = <&gic>;
                };
 
+               poweroff: syscon-poweroff {
+                       compatible = "syscon-poweroff";
+                       regmap = <&pmu_system_controller>;
+                       offset = <0x330C>; /* PS_HOLD_CONTROL */
+                       mask = <0x5200>; /* Reset value */
+               };
+
+               reboot: syscon-reboot {
+                       compatible = "syscon-reboot";
+                       regmap = <&pmu_system_controller>;
+                       offset = <0x0400>; /* SWRESET */
+                       mask = <0x1>;
+               };
+
                mipi_phy: video-phy@10020710 {
                        compatible = "samsung,s5pv210-mipi-video-phy";
                        #phy-cells = <1>;
index 3184e10f260a39a9cace8e70d38ac58ef851afd8..07e10ee60bd827879447213f8325adfc8c1412b7 100644 (file)
                interrupt-parent = <&gic>;
        };
 
+       poweroff: syscon-poweroff {
+               compatible = "syscon-poweroff";
+               regmap = <&pmu_system_controller>;
+               offset = <0x330C>; /* PS_HOLD_CONTROL */
+               mask = <0x5200>; /* reset value */
+       };
+
+       reboot: syscon-reboot {
+               compatible = "syscon-reboot";
+               regmap = <&pmu_system_controller>;
+               offset = <0x0400>; /* SWRESET */
+               mask = <0x1>;
+       };
+
        dsi_0: dsi@11C80000 {
                compatible = "samsung,exynos4210-mipi-dsi";
                reg = <0x11C80000 0x10000>;
index 110dbd4fb884de7a6eeb63de3fa897fa08ebe601..e2439e87ee4ab4b807b2692829f58a4823a73e53 100644 (file)
                status = "disabled";
        };
 
+       poweroff: syscon-poweroff {
+               compatible = "syscon-poweroff";
+               regmap = <&pmu_system_controller>;
+               offset = <0x330C>; /* PS_HOLD_CONTROL */
+               mask = <0x5200>; /* reset value */
+       };
+
+       reboot: syscon-reboot {
+               compatible = "syscon-reboot";
+               regmap = <&pmu_system_controller>;
+               offset = <0x0400>; /* SWRESET */
+               mask = <0x1>;
+       };
+
        fimd: fimd@14400000 {
                compatible = "samsung,exynos5250-fimd";
                interrupt-parent = <&combiner>;
index 731eefd23fa999aef4479d705ffc499d297a2680..fad0779b1b6e86d887a926a4afdee929ca33a1d7 100644 (file)
                        reg = <0x10040000 0x5000>;
                };
 
+               poweroff: syscon-poweroff {
+                       compatible = "syscon-poweroff";
+                       regmap = <&pmu_system_controller>;
+                       offset = <0x330C>; /* PS_HOLD_CONTROL */
+                       mask = <0x5200>; /* reset value */
+               };
+
+               reboot: syscon-reboot {
+                       compatible = "syscon-reboot";
+                       regmap = <&pmu_system_controller>;
+                       offset = <0x0400>; /* SWRESET */
+                       mask = <0x1>;
+               };
+
                mct: mct@101C0000 {
                        compatible = "samsung,exynos4210-mct";
                        reg = <0x101C0000 0xB00>;
index 7c4b9f2f9aad8a31214ba2627be1fcb180884220..848ffa785b637abfb3fd101597e63a88c80f4351 100644 (file)
 #define MX25_PAD_CONTRAST__CC4                 0x118 0x310 0x000 0x11 0x000
 #define MX25_PAD_CONTRAST__PWM4_PWMO           0x118 0x310 0x000 0x14 0x000
 #define MX25_PAD_CONTRAST__FEC_CRS             0x118 0x310 0x508 0x15 0x001
+#define MX25_PAD_CONTRAST__USBH2_PWR           0x118 0x310 0x000 0x16 0x000
 
 #define MX25_PAD_PWM__PWM                      0x11c 0x314 0x000 0x10 0x000
 #define MX25_PAD_PWM__GPIO_1_26                        0x11c 0x314 0x000 0x15 0x000
 #define MX25_PAD_SD1_DATA3__GPIO_2_28          0x1a4 0x39c 0x000 0x15 0x000
 
 #define MX25_PAD_KPP_ROW0__KPP_ROW0            0x1a8 0x3a0 0x000 0x10 0x000
+#define MX25_PAD_KPP_ROW0__UART1_DTR           0x1a8 0x3a0 0x000 0x14 0x000
 #define MX25_PAD_KPP_ROW0__GPIO_2_29           0x1a8 0x3a0 0x000 0x15 0x000
 
 #define MX25_PAD_KPP_ROW1__KPP_ROW1            0x1ac 0x3a4 0x000 0x10 0x000
 
 #define MX25_PAD_KPP_ROW2__KPP_ROW2            0x1b0 0x3a8 0x000 0x10 0x000
 #define MX25_PAD_KPP_ROW2__CSI_D0              0x1b0 0x3a8 0x488 0x13 0x002
+#define MX25_PAD_KPP_ROW2__UART1_DCD           0x1b0 0x3a8 0x000 0x14 0x000
 #define MX25_PAD_KPP_ROW2__GPIO_2_31           0x1b0 0x3a8 0x000 0x15 0x000
 
 #define MX25_PAD_KPP_ROW3__KPP_ROW3            0x1b4 0x3ac 0x000 0x10 0x000
index 677f81d9dcd529f92b6cf856464ec6595ef00509..cde329e9b9e3fcf2e7a9fb477f12ca14d9818774 100644 (file)
                i2c2 = &i2c3;
                mmc0 = &esdhc1;
                mmc1 = &esdhc2;
+               pwm0 = &pwm1;
+               pwm1 = &pwm2;
+               pwm2 = &pwm3;
+               pwm3 = &pwm4;
                serial0 = &uart1;
                serial1 = &uart2;
                serial2 = &uart3;
index 5df0b24eaf59e857cefe09b7c19e2975b0f6ad4a..7a80bd686c402a6449bceb3dc35f91da5e1f1d7d 100644 (file)
 
                        pwm: pwm@80064000 {
                                pinctrl-names = "default";
-                               pinctrl-0 = <&pwm3_pins_b>;
+                               pinctrl-0 = <&pwm4_pins_a>;
                                status = "okay";
                        };
 
 
        backlight {
                compatible = "pwm-backlight";
-               pwms = <&pwm 3 5000000>;
+               pwms = <&pwm 4 5000000>;
                brightness-levels = <0 4 8 16 32 64 128 255>;
                default-brightness-level = <7>;
        };
index c5b57d4adadee9eb5094d620f57db28442ffee48..fae7b9069fc43a6ef8bb2dae43d23460e0939aab 100644 (file)
                                        fsl,pull-up = <MXS_PULL_DISABLE>;
                                };
 
+                               auart4_2pins_b: auart4@1 {
+                                       reg = <1>;
+                                       fsl,pinmux-ids = <
+                                               MX28_PAD_AUART0_CTS__AUART4_RX
+                                               MX28_PAD_AUART0_RTS__AUART4_TX
+                                       >;
+                                       fsl,drive-strength = <MXS_DRIVE_4mA>;
+                                       fsl,voltage = <MXS_VOLTAGE_HIGH>;
+                                       fsl,pull-up = <MXS_PULL_DISABLE>;
+                               };
+
                                mac0_pins_a: mac0@0 {
                                        reg = <0>;
                                        fsl,pinmux-ids = <
diff --git a/arch/arm/boot/dts/imx51-ts4800.dts b/arch/arm/boot/dts/imx51-ts4800.dts
new file mode 100644 (file)
index 0000000..0ff76a1
--- /dev/null
@@ -0,0 +1,302 @@
+/*
+ * Copyright 2015 Savoir-faire Linux
+ *
+ * This device tree is based on imx51-babbage.dts
+ *
+ * Licensed under the X11 license or the GPL v2 (or later)
+ */
+
+/dts-v1/;
+#include "imx51.dtsi"
+
+/ {
+       model = "Technologic Systems TS-4800";
+       compatible = "technologic,imx51-ts4800", "fsl,imx51";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       memory {
+               reg = <0x90000000 0x10000000>;
+       };
+
+       clocks {
+               ckih1 {
+                       clock-frequency = <22579200>;
+               };
+
+               ckih2 {
+                       clock-frequency = <24576000>;
+               };
+       };
+
+       backlight_reg: regulator-backlight {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_enable_lcd>;
+               regulator-name = "enable_lcd_reg";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio4 9 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 78770>;
+               brightness-levels = <0 150 200 255>;
+               default-brightness-level = <1>;
+               power-supply = <&backlight_reg>;
+       };
+
+       display0: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_lcd>;
+
+               display-timings {
+                       800x480p60 {
+                               native-mode;
+                               clock-frequency = <30066000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hfront-porch = <50>;
+                               hback-porch = <70>;
+                               hsync-len = <50>;
+                               vback-porch = <0>;
+                               vfront-porch = <0>;
+                               vsync-len = <50>;
+                       };
+               };
+
+               port@0 {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu_di0_disp0>;
+                       };
+               };
+       };
+};
+
+&esdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_esdhc1>;
+       cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_fec>;
+       phy-mode = "mii";
+       phy-reset-gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
+       phy-reset-duration = <1>;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       rtc: m41t00@68 {
+               compatible = "stm,m41t00";
+               reg = <0x68>;
+       };
+};
+
+&ipu_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm_backlight>;
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       status = "okay";
+};
+
+&weim {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_weim>;
+       status = "okay";
+
+       fpga@0 {
+               compatible = "simple-bus";
+               fsl,weim-cs-timing = <0x0061008F 0x00000002 0x1c022000
+                                     0x00000000 0x1c092480 0x00000000>;
+               reg = <0 0x0000000 0x1d000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0 0 0x1d000>;
+
+               syscon: syscon@b0010000 {
+                       compatible = "syscon", "simple-mfd";
+                       reg = <0x10000 0x3d>;
+                       reg-io-width = <2>;
+
+                       wdt@e {
+                               compatible = "technologic,ts4800-wdt";
+                               syscon = <&syscon 0xe>;
+                       };
+               };
+
+               touchscreen {
+                       compatible = "technologic,ts4800-ts";
+                       reg = <0x12000 0x1000>;
+                       syscon = <&syscon 0x10 6>;
+               };
+       };
+};
+
+&iomuxc {
+       pinctrl_ecspi1: ecspi1grp {
+               fsl,pins = <
+                       MX51_PAD_CSPI1_MISO__ECSPI1_MISO        0x185
+                       MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI        0x185
+                       MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK        0x185
+                       MX51_PAD_CSPI1_SS0__GPIO4_24            0x85 /* CS0 */
+               >;
+       };
+
+       pinctrl_enable_lcd: enablelcdgrp {
+               fsl,pins = <
+                       MX51_PAD_CSI2_D12__GPIO4_9              0x1c5
+               >;
+       };
+
+       pinctrl_esdhc1: esdhc1grp {
+               fsl,pins = <
+                       MX51_PAD_SD1_CMD__SD1_CMD               0x400020d5
+                       MX51_PAD_SD1_CLK__SD1_CLK               0x20d5
+                       MX51_PAD_SD1_DATA0__SD1_DATA0           0x20d5
+                       MX51_PAD_SD1_DATA1__SD1_DATA1           0x20d5
+                       MX51_PAD_SD1_DATA2__SD1_DATA2           0x20d5
+                       MX51_PAD_SD1_DATA3__SD1_DATA3           0x20d5
+                       MX51_PAD_GPIO1_0__GPIO1_0               0x100
+                       MX51_PAD_GPIO1_1__GPIO1_1               0x100
+               >;
+       };
+
+       pinctrl_fec: fecgrp {
+               fsl,pins = <
+                       MX51_PAD_EIM_EB2__FEC_MDIO              0x000001f5
+                       MX51_PAD_EIM_EB3__FEC_RDATA1            0x00000085
+                       MX51_PAD_EIM_CS2__FEC_RDATA2            0x00000085
+                       MX51_PAD_EIM_CS3__FEC_RDATA3            0x00000085
+                       MX51_PAD_EIM_CS4__FEC_RX_ER             0x00000180
+                       MX51_PAD_EIM_CS5__FEC_CRS               0x00000180
+                       MX51_PAD_DISP2_DAT10__FEC_COL           0x00000180
+                       MX51_PAD_DISP2_DAT11__FEC_RX_CLK        0x00000180
+                       MX51_PAD_DISP2_DAT14__FEC_RDATA0        0x00002180
+                       MX51_PAD_DISP2_DAT15__FEC_TDATA0        0x00002004
+                       MX51_PAD_NANDF_CS2__FEC_TX_ER           0x00002004
+                       MX51_PAD_DI2_PIN2__FEC_MDC              0x00002004
+                       MX51_PAD_DISP2_DAT6__FEC_TDATA1         0x00002004
+                       MX51_PAD_DISP2_DAT7__FEC_TDATA2         0x00002004
+                       MX51_PAD_DISP2_DAT8__FEC_TDATA3         0x00002004
+                       MX51_PAD_DISP2_DAT9__FEC_TX_EN          0x00002004
+                       MX51_PAD_DISP2_DAT13__FEC_TX_CLK        0x00002180
+                       MX51_PAD_DISP2_DAT12__FEC_RX_DV         0x000020a4
+                       MX51_PAD_EIM_A20__GPIO2_14              0x00000085 /* Phy Reset */
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX51_PAD_KEY_COL4__I2C2_SCL             0x400001ed
+                       MX51_PAD_KEY_COL5__I2C2_SDA             0x400001ed
+               >;
+       };
+
+       pinctrl_lcd: lcdgrp {
+               fsl,pins = <
+                       MX51_PAD_DISP1_DAT0__DISP1_DAT0         0x5
+                       MX51_PAD_DISP1_DAT1__DISP1_DAT1         0x5
+                       MX51_PAD_DISP1_DAT2__DISP1_DAT2         0x5
+                       MX51_PAD_DISP1_DAT3__DISP1_DAT3         0x5
+                       MX51_PAD_DISP1_DAT4__DISP1_DAT4         0x5
+                       MX51_PAD_DISP1_DAT5__DISP1_DAT5         0x5
+                       MX51_PAD_DISP1_DAT6__DISP1_DAT6         0x5
+                       MX51_PAD_DISP1_DAT7__DISP1_DAT7         0x5
+                       MX51_PAD_DISP1_DAT8__DISP1_DAT8         0x5
+                       MX51_PAD_DISP1_DAT9__DISP1_DAT9         0x5
+                       MX51_PAD_DISP1_DAT10__DISP1_DAT10       0x5
+                       MX51_PAD_DISP1_DAT11__DISP1_DAT11       0x5
+                       MX51_PAD_DISP1_DAT12__DISP1_DAT12       0x5
+                       MX51_PAD_DISP1_DAT13__DISP1_DAT13       0x5
+                       MX51_PAD_DISP1_DAT14__DISP1_DAT14       0x5
+                       MX51_PAD_DISP1_DAT15__DISP1_DAT15       0x5
+                       MX51_PAD_DISP1_DAT16__DISP1_DAT16       0x5
+                       MX51_PAD_DISP1_DAT17__DISP1_DAT17       0x5
+                       MX51_PAD_DISP1_DAT18__DISP1_DAT18       0x5
+                       MX51_PAD_DISP1_DAT19__DISP1_DAT19       0x5
+                       MX51_PAD_DISP1_DAT20__DISP1_DAT20       0x5
+                       MX51_PAD_DISP1_DAT21__DISP1_DAT21       0x5
+                       MX51_PAD_DISP1_DAT22__DISP1_DAT22       0x5
+                       MX51_PAD_DISP1_DAT23__DISP1_DAT23       0x5
+                       MX51_PAD_DI1_PIN2__DI1_PIN2             0x5
+                       MX51_PAD_DI1_PIN3__DI1_PIN3             0x5
+                       MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK     0x5
+                       MX51_PAD_DI_GP4__DI2_PIN15              0x5
+               >;
+       };
+
+       pinctrl_pwm_backlight: backlightgrp {
+               fsl,pins = <
+                       MX51_PAD_GPIO1_2__PWM1_PWMO             0x80000000
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX51_PAD_UART1_RXD__UART1_RXD           0x1c5
+                       MX51_PAD_UART1_TXD__UART1_TXD           0x1c5
+               >;
+       };
+
+       pinctrl_uart2: uart2grp {
+               fsl,pins = <
+                       MX51_PAD_UART2_RXD__UART2_RXD           0x1c5
+                       MX51_PAD_UART2_TXD__UART2_TXD           0x1c5
+               >;
+       };
+
+       pinctrl_uart3: uart3grp {
+               fsl,pins = <
+                       MX51_PAD_EIM_D25__UART3_RXD             0x1c5
+                       MX51_PAD_EIM_D26__UART3_TXD             0x1c5
+               >;
+       };
+
+       pinctrl_weim: weimgrp {
+               fsl,pins = <
+                       MX51_PAD_EIM_DTACK__EIM_DTACK           0x85
+                       MX51_PAD_EIM_CS0__EIM_CS0               0x0
+                       MX51_PAD_EIM_CS1__EIM_CS1               0x0
+                       MX51_PAD_EIM_EB0__EIM_EB0               0x85
+                       MX51_PAD_EIM_EB1__EIM_EB1               0x85
+                       MX51_PAD_EIM_OE__EIM_OE                 0x85
+                       MX51_PAD_EIM_LBA__EIM_LBA               0x85
+               >;
+       };
+};
index 4b0ec07038256d25cbac349baf758988d5f61183..c13a73aa55ca3a690faebc58e9791daa7c47e2c0 100644 (file)
                compatible = "fsl,imx-display-subsystem";
                ports = <&ipu1_di0>, <&ipu1_di1>;
        };
+
+       gpu-subsystem {
+               compatible = "fsl,imx-gpu-subsystem";
+               cores = <&gpu_2d>, <&gpu_3d>;
+       };
 };
 
 &gpt {
-       compatible = "fsl,imx6dl-gpt", "fsl,imx6q-gpt";
+       compatible = "fsl,imx6dl-gpt";
 };
 
 &hdmi {
index 58adf176425a69fc48d16731973f93827b080bab..a51834e1dd2789ed0bfeed69b2dbddc08aa946fc 100644 (file)
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
        status = "okay";
 };
diff --git a/arch/arm/boot/dts/imx6q-novena.dts b/arch/arm/boot/dts/imx6q-novena.dts
new file mode 100644 (file)
index 0000000..5acd0c6
--- /dev/null
@@ -0,0 +1,785 @@
+/*
+ * Copyright 2015 Sutajio Ko-Usagi PTE LTD
+ *
+ * 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.
+ *
+ *     You should have received a copy of the GNU General Public
+ *     License along with this file; if not, write to the Free
+ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ *     MA 02110-1301 USA
+ *
+ * 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 "imx6q.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "Kosagi Novena Dual/Quad";
+       compatible = "kosagi,imx6q-novena", "fsl,imx6q";
+
+       chosen {
+               stdout-path = &uart2;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 10000000>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight_novena>;
+               power-supply = <&reg_lvds_lcd>;
+               brightness-levels = <0 3 6 12 16 24 32 48 64 96 128 192 255>;
+               default-brightness-level = <12>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys_novena>;
+
+               user-button {
+                       label = "User Button";
+                       gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+               };
+
+               lid {
+                       label = "Lid";
+                       gpios = <&gpio4 12 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <5>; /* EV_SW */
+                       linux,code = <0>;       /* SW_LID */
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_leds_novena>;
+
+               heartbeat {
+                       label = "novena:white:panel";
+                       gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "default-on";
+               };
+       };
+
+       panel: panel {
+               compatible = "innolux,n133hse-ea1", "simple-panel";
+               backlight = <&backlight>;
+       };
+
+       reg_2p5v: regulator-2p5v {
+               compatible = "regulator-fixed";
+               regulator-name = "2P5V";
+               regulator-min-microvolt = <2500000>;
+               regulator-max-microvolt = <2500000>;
+               regulator-always-on;
+       };
+
+       reg_3p3v: regulator-3p3v {
+               compatible = "regulator-fixed";
+               regulator-name = "3P3V";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+       };
+
+       reg_audio_codec: regulator-audio-codec {
+               compatible = "regulator-fixed";
+               regulator-name = "es8328-power";
+               regulator-boot-on;
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               startup-delay-us = <400000>;
+               gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_display: regulator-display {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-display-power";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               startup-delay-us = <200000>;
+               gpio = <&gpio5 28 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_lvds_lcd: regulator-lvds-lcd {
+               compatible = "regulator-fixed";
+               regulator-name = "lcd-lvds-power";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_pcie: regulator-pcie {
+               compatible = "regulator-fixed";
+               regulator-name = "pcie-bus-power";
+               regulator-min-microvolt = <1500000>;
+               regulator-max-microvolt = <1500000>;
+               gpio = <&gpio7 12 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+               regulator-always-on;
+       };
+
+       reg_sata: regulator-sata {
+               compatible = "regulator-fixed";
+               regulator-name = "sata-power";
+               regulator-boot-on;
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               startup-delay-us = <10000>;
+               gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       reg_usb_otg_vbus: regulator-usb-otg-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_otg_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+       };
+
+       sound {
+               compatible = "fsl,imx-audio-es8328";
+               model = "imx-audio-es8328";
+               ssi-controller = <&ssi1>;
+               audio-codec = <&codec>;
+               audio-amp-supply = <&reg_audio_codec>;
+               jack-gpio = <&gpio5 15 GPIO_ACTIVE_HIGH>;
+               audio-routing =
+                       "Speaker", "LOUT2",
+                       "Speaker", "ROUT2",
+                       "Speaker", "audio-amp",
+                       "Headphone", "ROUT1",
+                       "Headphone", "LOUT1",
+                       "LINPUT1", "Mic Jack",
+                       "RINPUT1", "Mic Jack",
+                       "Mic Jack", "Mic Bias";
+               mux-int-port = <0x1>;
+               mux-ext-port = <0x3>;
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux_novena>;
+       status = "okay";
+};
+
+&ecspi3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi3_novena>;
+       fsl,spi-num-chipselects = <3>;
+       status = "okay";
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet_novena>;
+       phy-mode = "rgmii";
+       phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
+       rxc-skew-ps = <3000>;
+       rxdv-skew-ps = <0>;
+       txc-skew-ps = <3000>;
+       txen-skew-ps = <0>;
+       rxd0-skew-ps = <0>;
+       rxd1-skew-ps = <0>;
+       rxd2-skew-ps = <0>;
+       rxd3-skew-ps = <0>;
+       txd0-skew-ps = <3000>;
+       txd1-skew-ps = <3000>;
+       txd2-skew-ps = <3000>;
+       txd3-skew-ps = <3000>;
+       status = "okay";
+};
+
+&hdmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hdmi_novena>;
+       ddc-i2c-bus = <&i2c2>;
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1_novena>;
+       status = "okay";
+
+       accel: mma8452@1c {
+               compatible = "fsl,mma8452";
+               reg = <0x1c>;
+       };
+
+       rtc: pcf8523@68 {
+               compatible = "nxp,pcf8523";
+               reg = <0x68>;
+       };
+
+       sbs_battery: bq20z75@0b {
+               compatible = "sbs,sbs-battery";
+               reg = <0x0b>;
+               sbs,i2c-retry-count = <50>;
+       };
+
+       touch: stmpe811@44 {
+               compatible = "st,stmpe811";
+               reg = <0x44>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               irq-gpio = <&gpio5 13 GPIO_ACTIVE_HIGH>;
+               id = <0>;
+               blocks = <0x5>;
+               irq-trigger = <0x1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_stmpe_novena>;
+               vio-supply = <&reg_3p3v>;
+               vcc-supply = <&reg_3p3v>;
+
+               stmpe_touchscreen {
+                       compatible = "st,stmpe-ts";
+                       st,sample-time = <4>;
+                       st,mod-12b = <1>;
+                       st,ref-sel = <0>;
+                       st,adc-freq = <1>;
+                       st,ave-ctrl = <1>;
+                       st,touch-det-delay = <2>;
+                       st,settling = <2>;
+                       st,fraction-z = <7>;
+                       st,i-drive = <1>;
+               };
+       };
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2_novena>;
+       status = "okay";
+
+       pmic: pfuze100@08 {
+               compatible = "fsl,pfuze100";
+               reg = <0x08>;
+
+               regulators {
+                       reg_sw1a: sw1a {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       reg_sw1c: sw1c {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_sw2: sw2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_sw3a: sw3a {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_sw3b: sw3b {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_sw4: sw4 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       reg_swbst: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                               regulator-boot-on;
+                       };
+
+                       reg_snvs: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_vref: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       reg_vgen1: vgen1 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       reg_vgen2: vgen2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       reg_vgen3: vgen3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       reg_vgen4: vgen4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       reg_vgen5: vgen5 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       reg_vgen6: vgen6 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3_novena>;
+       status = "okay";
+
+       codec: es8328@11 {
+               compatible = "everest,es8328";
+               reg = <0x11>;
+               DVDD-supply = <&reg_audio_codec>;
+               AVDD-supply = <&reg_audio_codec>;
+               PVDD-supply = <&reg_audio_codec>;
+               HPVDD-supply = <&reg_audio_codec>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_sound_novena>;
+               clocks = <&clks IMX6QDL_CLK_CKO1>;
+               assigned-clocks = <&clks IMX6QDL_CLK_CKO>,
+                                 <&clks IMX6QDL_CLK_CKO1_SEL>,
+                                 <&clks IMX6QDL_CLK_PLL4_AUDIO>,
+                                 <&clks IMX6QDL_CLK_CKO1>;
+               assigned-clock-parents = <&clks IMX6QDL_CLK_CKO1>,
+                                        <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>,
+                                        <&clks IMX6QDL_CLK_OSC>,
+                                        <&clks IMX6QDL_CLK_CKO1_PODF>;
+               assigned-clock-rates = <0 0 722534400 22579200>;
+       };
+};
+
+&kpp {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_kpp_novena>;
+       linux,keymap = <
+               MATRIX_KEY(1, 1, KEY_CONFIG)
+       >;
+       status = "okay";
+};
+
+&ldb {
+       fsl,dual-channel;
+       status = "okay";
+
+       lvds-channel@0 {
+               fsl,data-mapping = "jeida";
+               fsl,data-width = <24>;
+               fsl,panel = <&panel>;
+               status = "okay";
+       };
+};
+
+&pcie {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pcie_novena>;
+       reset-gpio = <&gpio3 29 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&sata {
+       target-supply = <&reg_sata>;
+       fsl,transmit-level-mV = <1025>;
+       fsl,transmit-boost-mdB = <0>;
+       fsl,transmit-atten-16ths = <8>;
+       status = "okay";
+};
+
+&ssi1 {
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2_novena>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3_novena>;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4_novena>;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       dr_mode = "otg";
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg_novena>;
+       disable-over-current;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_swbst>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2_novena>;
+       cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3_novena>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_audmux_novena: audmuxgrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT7__AUD3_RXD          0x130b0
+                       MX6QDL_PAD_CSI0_DAT4__AUD3_TXC          0x130b0
+                       MX6QDL_PAD_CSI0_DAT5__AUD3_TXD          0x110b0
+                       MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS         0x130b0
+               >;
+       };
+
+       pinctrl_backlight_novena: backlightgrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_DISP0_DAT8__PWM1_OUT         0x1b0b0
+                       MX6QDL_PAD_CSI0_DAT10__GPIO5_IO28       0x1b0b1
+                       MX6QDL_PAD_KEY_ROW4__GPIO4_IO15         0x1b0b1
+               >;
+       };
+
+       pinctrl_ecspi3_novena: ecspi3grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO      0x100b1
+                       MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI      0x100b1
+                       MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK      0x100b1
+               >;
+       };
+
+       pinctrl_enet_novena: enetgrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                       MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                       MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b020
+                       MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b028
+                       MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b028
+                       MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b028
+                       MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x1b028
+                       MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b028
+                       MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK    0x1b0b0
+                       MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD0__RGMII_RD0         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD1__RGMII_RD1         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x1b0b0
+                       MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b0b0
+                       MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x1b0b0
+                       MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8
+                       /* Ethernet reset */
+                       MX6QDL_PAD_EIM_D23__GPIO3_IO23          0x1b0b1
+               >;
+       };
+
+       pinctrl_fpga_gpio: fpgagpiogrp-novena {
+               fsl,pins = <
+                       /* FPGA power */
+                       MX6QDL_PAD_SD1_DAT1__GPIO1_IO17         0x1b0b1
+                       /* Reset */
+                       MX6QDL_PAD_DISP0_DAT13__GPIO5_IO07      0x1b0b1
+                       /* FPGA GPIOs */
+                       MX6QDL_PAD_EIM_DA0__GPIO3_IO00          0x1b0b1
+                       MX6QDL_PAD_EIM_DA1__GPIO3_IO01          0x1b0b1
+                       MX6QDL_PAD_EIM_DA2__GPIO3_IO02          0x1b0b1
+                       MX6QDL_PAD_EIM_DA3__GPIO3_IO03          0x1b0b1
+                       MX6QDL_PAD_EIM_DA4__GPIO3_IO04          0x1b0b1
+                       MX6QDL_PAD_EIM_DA5__GPIO3_IO05          0x1b0b1
+                       MX6QDL_PAD_EIM_DA6__GPIO3_IO06          0x1b0b1
+                       MX6QDL_PAD_EIM_DA7__GPIO3_IO07          0x1b0b1
+                       MX6QDL_PAD_EIM_DA8__GPIO3_IO08          0x1b0b1
+                       MX6QDL_PAD_EIM_DA9__GPIO3_IO09          0x1b0b1
+                       MX6QDL_PAD_EIM_DA10__GPIO3_IO10         0x1b0b1
+                       MX6QDL_PAD_EIM_DA11__GPIO3_IO11         0x1b0b1
+                       MX6QDL_PAD_EIM_DA12__GPIO3_IO12         0x1b0b1
+                       MX6QDL_PAD_EIM_DA13__GPIO3_IO13         0x1b0b1
+                       MX6QDL_PAD_EIM_DA14__GPIO3_IO14         0x1b0b1
+                       MX6QDL_PAD_EIM_DA15__GPIO3_IO15         0x1b0b1
+                       MX6QDL_PAD_EIM_A16__GPIO2_IO22          0x1b0b1
+                       MX6QDL_PAD_EIM_A17__GPIO2_IO21          0x1b0b1
+                       MX6QDL_PAD_EIM_A18__GPIO2_IO20          0x1b0b1
+                       MX6QDL_PAD_EIM_CS0__GPIO2_IO23          0x1b0b1
+                       MX6QDL_PAD_EIM_CS1__GPIO2_IO24          0x1b0b1
+                       MX6QDL_PAD_EIM_LBA__GPIO2_IO27          0x1b0b1
+                       MX6QDL_PAD_EIM_OE__GPIO2_IO25           0x1b0b1
+                       MX6QDL_PAD_EIM_RW__GPIO2_IO26           0x1b0b1
+                       MX6QDL_PAD_EIM_WAIT__GPIO5_IO00         0x1b0b1
+                       MX6QDL_PAD_EIM_BCLK__GPIO6_IO31         0x1b0b1
+               >;
+       };
+
+       pinctrl_fpga_eim: fpgaeimgrp-novena {
+               fsl,pins = <
+                       /* FPGA power */
+                       MX6QDL_PAD_SD1_DAT1__GPIO1_IO17         0x1b0b1
+                       /* Reset */
+                       MX6QDL_PAD_DISP0_DAT13__GPIO5_IO07      0x1b0b1
+                       /* FPGA GPIOs */
+                       MX6QDL_PAD_EIM_DA0__EIM_AD00            0xb0f1
+                       MX6QDL_PAD_EIM_DA1__EIM_AD01            0xb0f1
+                       MX6QDL_PAD_EIM_DA2__EIM_AD02            0xb0f1
+                       MX6QDL_PAD_EIM_DA3__EIM_AD03            0xb0f1
+                       MX6QDL_PAD_EIM_DA4__EIM_AD04            0xb0f1
+                       MX6QDL_PAD_EIM_DA5__EIM_AD05            0xb0f1
+                       MX6QDL_PAD_EIM_DA6__EIM_AD06            0xb0f1
+                       MX6QDL_PAD_EIM_DA7__EIM_AD07            0xb0f1
+                       MX6QDL_PAD_EIM_DA8__EIM_AD08            0xb0f1
+                       MX6QDL_PAD_EIM_DA9__EIM_AD09            0xb0f1
+                       MX6QDL_PAD_EIM_DA10__EIM_AD10           0xb0f1
+                       MX6QDL_PAD_EIM_DA11__EIM_AD11           0xb0f1
+                       MX6QDL_PAD_EIM_DA12__EIM_AD12           0xb0f1
+                       MX6QDL_PAD_EIM_DA13__EIM_AD13           0xb0f1
+                       MX6QDL_PAD_EIM_DA14__EIM_AD14           0xb0f1
+                       MX6QDL_PAD_EIM_DA15__EIM_AD15           0xb0f1
+                       MX6QDL_PAD_EIM_A16__EIM_ADDR16          0xb0f1
+                       MX6QDL_PAD_EIM_A17__EIM_ADDR17          0xb0f1
+                       MX6QDL_PAD_EIM_A18__EIM_ADDR18          0xb0f1
+                       MX6QDL_PAD_EIM_CS0__EIM_CS0_B           0xb0f1
+                       MX6QDL_PAD_EIM_CS1__EIM_CS1_B           0xb0f1
+                       MX6QDL_PAD_EIM_LBA__EIM_LBA_B           0xb0f1
+                       MX6QDL_PAD_EIM_OE__EIM_OE_B             0xb0f1
+                       MX6QDL_PAD_EIM_RW__EIM_RW               0xb0f1
+                       MX6QDL_PAD_EIM_WAIT__EIM_WAIT_B         0xb0f1
+                       MX6QDL_PAD_EIM_BCLK__EIM_BCLK           0xb0f1
+               >;
+       };
+
+       pinctrl_gpio_keys_novena: gpiokeysgrp-novena {
+               fsl,pins = <
+                       /* User button */
+                       MX6QDL_PAD_KEY_COL4__GPIO4_IO14         0x1b0b0
+                       /* PCIe Wakeup */
+                       MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x1f0e0
+                       /* Lid switch */
+                       MX6QDL_PAD_KEY_COL3__GPIO4_IO12         0x1b0b0
+               >;
+       };
+
+       pinctrl_hdmi_novena: hdmigrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_KEY_ROW2__HDMI_TX_CEC_LINE   0x1f8b0
+                       MX6QDL_PAD_EIM_A24__GPIO5_IO04          0x1b0b1
+               >;
+       };
+
+       pinctrl_i2c1_novena: i2c1grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
+                       MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c2_novena: i2c2grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_EB2__I2C2_SCL            0x4001b8b1
+                       MX6QDL_PAD_EIM_D16__I2C2_SDA            0x4001b8b1
+               >;
+       };
+
+       pinctrl_i2c3_novena: i2c3grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D17__I2C3_SCL            0x4001b8b1
+                       MX6QDL_PAD_EIM_D18__I2C3_SDA            0x4001b8b1
+               >;
+       };
+
+       pinctrl_kpp_novena: kppgrp-novena {
+               fsl,pins = <
+                       /* Front panel button */
+                       MX6QDL_PAD_KEY_ROW1__KEY_ROW1           0x1b0b1
+                       /* Fake column driver, not connected */
+                       MX6QDL_PAD_KEY_COL1__KEY_COL1           0x1b0b1
+               >;
+       };
+
+       pinctrl_leds_novena: ledsgrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_SD1_DAT3__GPIO1_IO21         0x1b0b1
+               >;
+       };
+
+       pinctrl_pcie_novena: pciegrp-novena {
+               fsl,pins = <
+                       /* Reset */
+                       MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x1b0b1
+                       /* Power On */
+                       MX6QDL_PAD_GPIO_17__GPIO7_IO12          0x1b0b1
+                       /* Wifi kill */
+                       MX6QDL_PAD_EIM_A22__GPIO2_IO16          0x1b0b1
+               >;
+       };
+
+       pinctrl_sata_novena: satagrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D30__GPIO3_IO30          0x1b0b1
+               >;
+       };
+
+       pinctrl_senoko_novena: senokogrp-novena {
+               fsl,pins = <
+                       /* Senoko IRQ line */
+                       MX6QDL_PAD_SD1_CLK__GPIO1_IO20          0x13048
+                       /* Senoko reset line */
+                       MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21       0x1b0b1
+               >;
+       };
+
+       pinctrl_sound_novena: soundgrp-novena {
+               fsl,pins = <
+                       /* Audio power regulator */
+                       MX6QDL_PAD_DISP0_DAT23__GPIO5_IO17      0x1b0b1
+                       /* Headphone plug */
+                       MX6QDL_PAD_DISP0_DAT21__GPIO5_IO15      0x1b0b1
+                       MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x000b0
+               >;
+       };
+
+       pinctrl_stmpe_novena: stmpegrp-novena {
+               fsl,pins = <
+                       /* Touchscreen interrupt */
+                       MX6QDL_PAD_DISP0_DAT19__GPIO5_IO13      0x1b0b1
+               >;
+       };
+
+       pinctrl_uart2_novena: uart2grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D26__UART2_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D27__UART2_RX_DATA       0x1b0b1
+               >;
+       };
+
+       pinctrl_uart3_novena: uart3grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                       MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+               >;
+       };
+
+       pinctrl_uart4_novena: uart4grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA    0x1b0b1
+                       MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA    0x1b0b1
+               >;
+       };
+
+       pinctrl_usbotg_novena: usbotggrp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID       0x17059
+               >;
+       };
+
+       pinctrl_usdhc2_novena: usdhc2grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_SD2_CMD__SD2_CMD             0x170f9
+                       MX6QDL_PAD_SD2_CLK__SD2_CLK             0x100f9
+                       MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x170f9
+                       MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x170f9
+                       MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x170f9
+                       MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x170f9
+                       /* Write protect */
+                       MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b1
+                       /* Card detect */
+                       MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1b0b1
+               >;
+       };
+
+       pinctrl_usdhc3_novena: usdhc3grp-novena {
+               fsl,pins = <
+                       MX6QDL_PAD_SD3_CMD__SD3_CMD             0x170f9
+                       MX6QDL_PAD_SD3_CLK__SD3_CLK             0x100f9
+                       MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x170f9
+                       MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x170f9
+                       MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x170f9
+                       MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x170f9
+               >;
+       };
+};
index 399103b8e2c948110154fa0b109e917a192061b0..9b6a193b64cac8740776ebcba037806e7befd4ab 100644 (file)
@@ -14,6 +14,7 @@
 
 / {
        aliases {
+               ipu1 = &ipu2;
                spi4 = &ecspi5;
        };
 
                        status = "disabled";
                };
 
+               gpu_vg: gpu@02204000 {
+                       compatible = "vivante,gc";
+                       reg = <0x02204000 0x4000>;
+                       interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clks IMX6QDL_CLK_OPENVG_AXI>,
+                                <&clks IMX6QDL_CLK_GPU2D_CORE>;
+                       clock-names = "bus", "core";
+                       power-domains = <&gpc 1>;
+               };
+
                ipu2: ipu@02800000 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                compatible = "fsl,imx-display-subsystem";
                ports = <&ipu1_di0>, <&ipu1_di1>, <&ipu2_di0>, <&ipu2_di1>;
        };
+
+       gpu-subsystem {
+               compatible = "fsl,imx-gpu-subsystem";
+               cores = <&gpu_2d>, <&gpu_3d>, <&gpu_vg>;
+       };
 };
 
 &hdmi {
index 7b31fdb79ced5cbac2eecff792fa8d56b1a9a010..5cd16f2178b80fd955e8be48b776fb601afe606b 100644 (file)
@@ -94,7 +94,7 @@
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
        status = "okay";
 };
 
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
+&pwm4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm4>; /* MX6_DIO3 */
+       status = "disabled";
+};
+
 &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart1>;
                        >;
                };
 
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm4: pwm4grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT2__PWM4_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_uart1: uart1grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA      0x1b0b1
index 1b66328a84987a1040b0406e1b4dfe29a87707ed..9fa8a10c7cc8892266a87be766974b03fcfff326 100644 (file)
        status = "okay";
 };
 
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
+&ecspi3 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi3>;
+       status = "okay";
+};
+
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
        status = "okay";
 };
 
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
 &pwm4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm4>;
                        >;
                };
 
+               pinctrl_ecspi3: escpi3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK      0x100b1
+                               MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI      0x100b1
+                               MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO      0x100b1
+                               MX6QDL_PAD_DISP0_DAT3__GPIO4_IO24       0x100b1
+                       >;
+               };
+
                pinctrl_enet: enetgrp {
                        fsl,pins = <
                                MX6QDL_PAD_RGMII_RXC__RGMII_RXC         0x1b0b0
                        >;
                };
 
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_pwm4: pwm4grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD1_CMD__PWM4_OUT            0x1b0b1
index 7c51839ff93467d209e0f3809b3ed9e8bc541c54..e8375e173873edc5dc39ef011321cbbac9378f00 100644 (file)
        status = "okay";
 };
 
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
 &ldb {
        status = "okay";
 
-       lvds-channel@1 {
+       lvds-channel@0 {
                fsl,data-mapping = "spwg";
                fsl,data-width = <18>;
                status = "okay";
        };
 };
 
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
 &pwm4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm4>;
                        >;
                };
 
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_pwm4: pwm4grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD1_CMD__PWM4_OUT            0x1b0b1
index 929e0b37bd9e542e252be1159e6e588dd34b94e1..66983dc5cbdae8868b2f20ade01b3df1be44575d 100644 (file)
        status = "okay";
 };
 
+&clks {
+       assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+       assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
+                         <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
+};
+
 &fec {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
-       phy-mode = "rgmii";
+       phy-mode = "rgmii-id";
        phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
                        swbst_reg: swbst {
                                regulator-min-microvolt = <5000000>;
                                regulator-max-microvolt = <5150000>;
+                               regulator-boot-on;
+                               regulator-always-on;
                        };
 
                        snvs_reg: vsnvs {
 &ldb {
        status = "okay";
 
-       lvds-channel@1 {
+       lvds-channel@0 {
                fsl,data-mapping = "spwg";
                fsl,data-width = <18>;
                status = "okay";
        };
 };
 
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>; /* MX6_DIO0 */
+       status = "disabled";
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
 &pwm4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm4>;
                        >;
                };
 
+               pinctrl_pwm1: pwm1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_9__PWM1_OUT             0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_pwm4: pwm4grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD1_CMD__PWM4_OUT            0x1b0b1
index 741f3d529e3e23bcf3cb17160620fb30ae2c79dc..118bea524dab4220318c62a0d37edb3892556877 100644 (file)
        status = "okay";
 };
 
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
 &ssi1 {
        status = "okay";
 };
                        >;
                };
 
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_uart2: uart2grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
index d1e5048b00b51c493b7843c7eba5d9e824269e86..cca39f194017c262d6c850172f76c584a73f099f 100644 (file)
        status = "okay";
 };
 
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>; /* MX6_DIO1 */
+       status = "disabled";
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm3>; /* MX6_DIO2 */
+       status = "disabled";
+};
+
 &uart2 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart2>;
                        >;
                };
 
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_DAT2__PWM2_OUT           0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm3: pwm3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT           0x1b0b1
+                       >;
+               };
+
                pinctrl_uart2: uart2grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
index 8263fc18a7d95ff88b470ae57fd5e2e89036f99f..d354d406954da437071db41de61e349a48644802 100644 (file)
 &clks {
        assigned-clocks = <&clks IMX6QDL_PLL4_BYPASS_SRC>,
                          <&clks IMX6QDL_PLL4_BYPASS>,
-                         <&clks IMX6QDL_CLK_PLL4_POST_DIV>,
                          <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
-                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>;
+                         <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
+                         <&clks IMX6QDL_CLK_PLL4_POST_DIV>;
        assigned-clock-parents = <&clks IMX6QDL_CLK_LVDS2_IN>,
                                 <&clks IMX6QDL_PLL4_BYPASS_SRC>,
                                 <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
                                 <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
-       assigned-clock-rates = <0>, <0>, <24576000>;
+       assigned-clock-rates = <0>, <0>, <0>, <0>, <24576000>;
 };
 
 &ecspi1 {
index 2b6cc8bf3c5cce97349f2385e5dfba1009b5df0a..4f6ae921656f16dfd3814d7a70972be798e0fce9 100644 (file)
@@ -30,6 +30,7 @@
                i2c0 = &i2c1;
                i2c1 = &i2c2;
                i2c2 = &i2c3;
+               ipu0 = &ipu1;
                mmc0 = &usdhc1;
                mmc1 = &usdhc2;
                mmc2 = &usdhc3;
                usbphy1 = &usbphy2;
        };
 
-       intc: interrupt-controller@00a01000 {
-               compatible = "arm,cortex-a9-gic";
-               #interrupt-cells = <3>;
-               interrupt-controller;
-               reg = <0x00a01000 0x1000>,
-                     <0x00a00100 0x100>;
-               interrupt-parent = <&intc>;
-       };
-
        clocks {
                #address-cells = <1>;
                #size-cells = <0>;
                        };
                };
 
+               gpu_3d: gpu@00130000 {
+                       compatible = "vivante,gc";
+                       reg = <0x00130000 0x4000>;
+                       interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clks IMX6QDL_CLK_GPU3D_AXI>,
+                                <&clks IMX6QDL_CLK_GPU3D_CORE>,
+                                <&clks IMX6QDL_CLK_GPU3D_SHADER>;
+                       clock-names = "bus", "core", "shader";
+                       power-domains = <&gpc 1>;
+               };
+
+               gpu_2d: gpu@00134000 {
+                       compatible = "vivante,gc";
+                       reg = <0x00134000 0x4000>;
+                       interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clks IMX6QDL_CLK_GPU2D_AXI>,
+                                <&clks IMX6QDL_CLK_GPU2D_CORE>;
+                       clock-names = "bus", "core";
+                       power-domains = <&gpc 1>;
+               };
+
                timer@00a00600 {
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0x00a00600 0x20>;
                        clocks = <&clks IMX6QDL_CLK_TWD>;
                };
 
+               intc: interrupt-controller@00a01000 {
+                       compatible = "arm,cortex-a9-gic";
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+                       reg = <0x00a01000 0x1000>,
+                             <0x00a00100 0x100>;
+                       interrupt-parent = <&intc>;
+               };
+
                L2: l2-cache@00a02000 {
                        compatible = "arm,pl310-cache";
                        reg = <0x00a02000 0x1000>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
-                       ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 /* configuration space */
-                                 0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
+                       ranges = <0x81000000 0 0          0x01f80000 0 0x00010000 /* downstream I/O */
                                  0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; /* non-prefetchable memory */
                        num-lanes = <1>;
                        interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
                                                      "rxtx1", "rxtx2",
                                                      "rxtx3", "rxtx4",
                                                      "rxtx5", "rxtx6",
-                                                     "rxtx7", "dma";
+                                                     "rxtx7", "spba";
                                        status = "disabled";
                                };
 
                                                 <&clks IMX6QDL_CLK_ESAI_EXTAL>,
                                                 <&clks IMX6QDL_CLK_ESAI_IPG>,
                                                 <&clks IMX6QDL_CLK_SPBA>;
-                                       clock-names = "core", "mem", "extal", "fsys", "dma";
+                                       clock-names = "core", "mem", "extal", "fsys", "spba";
                                        dmas = <&sdma 23 21 0>, <&sdma 24 21 0>;
                                        dma-names = "rx", "tx";
                                        status = "disabled";
                                                "asrck_1", "asrck_2", "asrck_3", "asrck_4",
                                                "asrck_5", "asrck_6", "asrck_7", "asrck_8",
                                                "asrck_9", "asrck_a", "asrck_b", "asrck_c",
-                                               "asrck_d", "asrck_e", "asrck_f", "dma";
+                                               "asrck_d", "asrck_e", "asrck_f", "spba";
                                        dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>,
                                                <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>;
                                        dma-names = "rxa", "rxb", "rxc",
                                clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy1>;
                                fsl,usbmisc = <&usbmisc 0>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                fsl,usbphy = <&usbphy2>;
                                fsl,usbmisc = <&usbmisc 1>;
                                dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbmisc = <&usbmisc 2>;
                                dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbmisc = <&usbmisc 3>;
                                dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
index d8ba99f1d87ba396b4e320ec52e63f903461d6bf..d12b250342a6deab8cb4809c8dc105403e44cd39 100644 (file)
                                                "rxtx1", "rxtx2",
                                                "rxtx3", "rxtx4",
                                                "rxtx5", "rxtx6",
-                                               "rxtx7", "dma";
+                                               "rxtx7", "spba";
                                        status = "disabled";
                                };
 
                                clocks = <&clks IMX6SL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy1>;
                                fsl,usbmisc = <&usbmisc 0>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6SL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy2>;
                                fsl,usbmisc = <&usbmisc 1>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6SL_CLK_USBOH3>;
                                fsl,usbmisc = <&usbmisc 2>;
                                dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
index 167f77b3bd43654c45d181e2a7f31965f6f1c946..a5f76025a0ce9196569cb0f140740b952933407a 100644 (file)
                                                      "rxtx1", "rxtx2",
                                                      "rxtx3", "rxtx4",
                                                      "rxtx5", "rxtx6",
-                                                     "rxtx7", "dma";
+                                                     "rxtx7", "spba";
                                        status = "disabled";
                                };
 
                                                 <&clks IMX6SX_CLK_ESAI_IPG>,
                                                 <&clks IMX6SX_CLK_SPBA>;
                                        clock-names = "core", "mem", "extal",
-                                                     "fsys", "dma";
+                                                     "fsys", "spba";
                                        status = "disabled";
                                };
 
                                                 <&clks IMX6SX_CLK_ASRC_IPG>,
                                                 <&clks IMX6SX_CLK_SPDIF>,
                                                 <&clks IMX6SX_CLK_SPBA>;
-                                       clock-names = "mem", "ipg", "asrck", "dma";
+                                       clock-names = "mem", "ipg", "asrck", "spba";
                                        dmas = <&sdma 17 20 1>, <&sdma 18 20 1>,
                                               <&sdma 19 20 1>, <&sdma 20 20 1>,
                                               <&sdma 21 20 1>, <&sdma 22 20 1>;
                                fsl,usbphy = <&usbphy1>;
                                fsl,usbmisc = <&usbmisc 0>;
                                fsl,anatop = <&anatop>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6SX_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy2>;
                                fsl,usbmisc = <&usbmisc 1>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                phy_type = "hsic";
                                fsl,anatop = <&anatop>;
                                dr_mode = "host";
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6SX_CLK_IPG>;
                                clock-names = "adc";
+                               fsl,adck-max-frequency = <30000000>, <40000000>,
+                                                        <20000000>;
                                status = "disabled";
                         };
 
                                interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6SX_CLK_IPG>;
                                clock-names = "adc";
+                               fsl,adck-max-frequency = <30000000>, <40000000>,
+                                                        <20000000>;
                                status = "disabled";
                         };
 
index d00e994bdbd296e8c6c3ba1db019121de9e11cf3..99b646506fc91d83f4648406f668ccb4294a540a 100644 (file)
                                fsl,usbphy = <&usbphy1>;
                                fsl,usbmisc = <&usbmisc 0>;
                                fsl,anatop = <&anatop>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                clocks = <&clks IMX6UL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy2>;
                                fsl,usbmisc = <&usbmisc 1>;
+                               ahb-burst-config = <0x0>;
+                               tx-burst-size-dword = <0x10>;
+                               rx-burst-size-dword = <0x10>;
                                status = "disabled";
                        };
 
                                status = "disabled";
                        };
 
+                       adc1: adc@02198000 {
+                               compatible = "fsl,imx6ul-adc", "fsl,vf610-adc";
+                               reg = <0x02198000 0x4000>;
+                               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6UL_CLK_ADC1>;
+                               num-channels = <2>;
+                               clock-names = "adc";
+                               fsl,adck-max-frequency = <30000000>, <40000000>,
+                                                        <20000000>;
+                               status = "disabled";
+                       };
+
                        i2c1: i2c@021a0000 {
                                #address-cells = <1>;
                                #size-cells = <0>;
diff --git a/arch/arm/boot/dts/imx7d-cl-som-imx7.dts b/arch/arm/boot/dts/imx7d-cl-som-imx7.dts
new file mode 100644 (file)
index 0000000..4863451
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+ * Support for CompuLab CL-SOM-iMX7 System-on-Module
+ *
+ * Copyright (C) 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ * Author: Ilya Ledvich <ilya@compulab.co.il>
+ *
+ * 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.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "imx7d.dtsi"
+
+/ {
+       model = "CompuLab CL-SOM-iMX7";
+       compatible = "compulab,cl-som-imx7", "fsl,imx7d";
+
+       memory {
+               reg = <0x80000000 0x10000000>; /* 256 MB - minimal configuration */
+       };
+
+       reg_usb_otg1_vbus: regulator-vbus {
+               compatible = "regulator-fixed";
+               regulator-name = "usb_otg1_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+};
+
+&cpu0 {
+       arm-supply = <&sw1a_reg>;
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet1>;
+       assigned-clocks = <&clks IMX7D_ENET1_TIME_ROOT_SRC>,
+                         <&clks IMX7D_ENET1_TIME_ROOT_CLK>;
+       assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
+       assigned-clock-rates = <0>, <100000000>;
+       phy-mode = "rgmii";
+       phy-handle = <&ethphy0>;
+       fsl,magic-packet;
+       status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy0: ethernet-phy@0 {
+                       reg = <0>;
+               };
+
+               ethphy1: ethernet-phy@1 {
+                       reg = <1>;
+               };
+       };
+};
+
+&fec2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet2>;
+       assigned-clocks = <&clks IMX7D_ENET2_TIME_ROOT_SRC>,
+                         <&clks IMX7D_ENET2_TIME_ROOT_CLK>;
+       assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
+       assigned-clock-rates = <0>, <100000000>;
+       phy-mode = "rgmii";
+       phy-handle = <&ethphy1>;
+       fsl,magic-packet;
+       status = "okay";
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       pmic: pmic@8 {
+               compatible = "fsl,pfuze3000";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1a {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1475000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       /* use sw1c_reg to align with pfuze100/pfuze200 */
+                       sw1c_reg: sw1b {
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1475000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <1500000>;
+                               regulator-max-microvolt = <1850000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3 {
+                               regulator-min-microvolt = <900000>;
+                               regulator-max-microvolt = <1650000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       swbst_reg: swbst {
+                               regulator-min-microvolt = <5000000>;
+                               regulator-max-microvolt = <5150000>;
+                       };
+
+                       snvs_reg: vsnvs {
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <3000000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vref_reg: vrefddr {
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vgen1_reg: vldo1 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen2_reg: vldo2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       vgen3_reg: vccsd {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen4_reg: v33 {
+                               regulator-min-microvolt = <2850000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vldo3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vldo4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+
+       pca9555: pca9555@20 {
+               compatible = "nxp,pca9555";
+               gpio-controller;
+               #gpio-cells = <2>;
+               reg = <0x20>;
+       };
+
+       eeprom@50 {
+               compatible = "atmel,24c08";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       assigned-clocks = <&clks IMX7D_UART1_ROOT_SRC>;
+       assigned-clock-parents = <&clks IMX7D_PLL_SYS_MAIN_240M_CLK>;
+       status = "okay";
+};
+
+&usbotg1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg1>;
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       assigned-clocks = <&clks IMX7D_USDHC3_ROOT_CLK>;
+       assigned-clock-rates = <400000000>;
+       bus-width = <8>;
+       fsl,tuning-step = <2>;
+       non-removable;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_enet1: enet1grp {
+               fsl,pins = <
+                       MX7D_PAD_SD2_CD_B__ENET1_MDIO                   0x3
+                       MX7D_PAD_SD2_WP__ENET1_MDC                      0x3
+                       MX7D_PAD_ENET1_RGMII_TXC__ENET1_RGMII_TXC       0x1
+                       MX7D_PAD_ENET1_RGMII_TD0__ENET1_RGMII_TD0       0x1
+                       MX7D_PAD_ENET1_RGMII_TD1__ENET1_RGMII_TD1       0x1
+                       MX7D_PAD_ENET1_RGMII_TD2__ENET1_RGMII_TD2       0x1
+                       MX7D_PAD_ENET1_RGMII_TD3__ENET1_RGMII_TD3       0x1
+                       MX7D_PAD_ENET1_RGMII_TX_CTL__ENET1_RGMII_TX_CTL 0x1
+                       MX7D_PAD_ENET1_RGMII_RXC__ENET1_RGMII_RXC       0x1
+                       MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0       0x1
+                       MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1       0x1
+                       MX7D_PAD_ENET1_RGMII_RD2__ENET1_RGMII_RD2       0x1
+                       MX7D_PAD_ENET1_RGMII_RD3__ENET1_RGMII_RD3       0x1
+                       MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x1
+               >;
+       };
+
+       pinctrl_enet2: enet2grp {
+               fsl,pins = <
+                       MX7D_PAD_EPDC_GDSP__ENET2_RGMII_TXC             0x1
+                       MX7D_PAD_EPDC_SDCE2__ENET2_RGMII_TD0            0x1
+                       MX7D_PAD_EPDC_SDCE3__ENET2_RGMII_TD1            0x1
+                       MX7D_PAD_EPDC_GDCLK__ENET2_RGMII_TD2            0x1
+                       MX7D_PAD_EPDC_GDOE__ENET2_RGMII_TD3             0x1
+                       MX7D_PAD_EPDC_GDRL__ENET2_RGMII_TX_CTL          0x1
+                       MX7D_PAD_EPDC_SDCE1__ENET2_RGMII_RXC            0x1
+                       MX7D_PAD_EPDC_SDCLK__ENET2_RGMII_RD0            0x1
+                       MX7D_PAD_EPDC_SDLE__ENET2_RGMII_RD1             0x1
+                       MX7D_PAD_EPDC_SDOE__ENET2_RGMII_RD2             0x1
+                       MX7D_PAD_EPDC_SDSHR__ENET2_RGMII_RD3            0x1
+                       MX7D_PAD_EPDC_SDCE0__ENET2_RGMII_RX_CTL         0x1
+               >;
+       };
+
+       pinctrl_i2c2: i2c2grp {
+               fsl,pins = <
+                       MX7D_PAD_I2C2_SDA__I2C2_SDA             0x4000007f
+                       MX7D_PAD_I2C2_SCL__I2C2_SCL             0x4000007f
+               >;
+       };
+
+       pinctrl_uart1: uart1grp {
+               fsl,pins = <
+                       MX7D_PAD_UART1_TX_DATA__UART1_DCE_TX    0x79
+                       MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX    0x79
+               >;
+       };
+
+       pinctrl_usbotg1: usbotg1grp {
+               fsl,pins = <
+                       MX7D_PAD_GPIO1_IO05__GPIO1_IO5          0x14 /* OTG PWREN */
+               >;
+       };
+
+       pinctrl_usdhc3: usdhc3grp {
+               fsl,pins = <
+                       MX7D_PAD_SD3_CMD__SD3_CMD               0x59
+                       MX7D_PAD_SD3_CLK__SD3_CLK               0x19
+                       MX7D_PAD_SD3_DATA0__SD3_DATA0           0x59
+                       MX7D_PAD_SD3_DATA1__SD3_DATA1           0x59
+                       MX7D_PAD_SD3_DATA2__SD3_DATA2           0x59
+                       MX7D_PAD_SD3_DATA3__SD3_DATA3           0x59
+                       MX7D_PAD_SD3_DATA4__SD3_DATA4           0x59
+                       MX7D_PAD_SD3_DATA5__SD3_DATA5           0x59
+                       MX7D_PAD_SD3_DATA6__SD3_DATA6           0x59
+                       MX7D_PAD_SD3_DATA7__SD3_DATA7           0x59
+                       MX7D_PAD_SD3_STROBE__SD3_STROBE         0x19
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/imx7d-sbc-imx7.dts b/arch/arm/boot/dts/imx7d-sbc-imx7.dts
new file mode 100644 (file)
index 0000000..d63c597
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Support for CompuLab SBC-iMX7 Single Board Computer
+ *
+ * Copyright (C) 2015 CompuLab Ltd. - http://www.compulab.co.il/
+ * Author: Ilya Ledvich <ilya@compulab.co.il>
+ *
+ * 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.
+ */
+
+#include "imx7d-cl-som-imx7.dts"
+
+/ {
+       model = "CompuLab SBC-iMX7";
+       compatible = "compulab,sbc-imx7", "compulab,cl-som-imx7", "fsl,imx7d";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       cd-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
+       enable-sdio-wakeup;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_usdhc1: usdhc1grp {
+               fsl,pins = <
+                       MX7D_PAD_SD1_CMD__SD1_CMD               0x59
+                       MX7D_PAD_SD1_CLK__SD1_CLK               0x19
+                       MX7D_PAD_SD1_DATA0__SD1_DATA0           0x59
+                       MX7D_PAD_SD1_DATA1__SD1_DATA1           0x59
+                       MX7D_PAD_SD1_DATA2__SD1_DATA2           0x59
+                       MX7D_PAD_SD1_DATA3__SD1_DATA3           0x59
+                       MX7D_PAD_SD1_CD_B__GPIO5_IO0            0x59 /* CD */
+                       MX7D_PAD_SD1_WP__GPIO5_IO1              0x59 /* WP */
+               >;
+       };
+};
index 432aaf5d5ef7884382c1d3656ebd6785f6468431..b2c453662905e313626a79a93c1543d1bfb301ef 100644 (file)
        };
 };
 
+&adc1 {
+       vref-supply = <&reg_vref_1v8>;
+       status = "okay";
+};
+
+&adc2 {
+       vref-supply = <&reg_vref_1v8>;
+       status = "okay";
+};
+
 &cpu0 {
        arm-supply = <&sw1a_reg>;
 };
index ebc053a06405e848c773fc9f66c2a779fce5780c..25ad3097874016ab3f1281e6a46d7824c7a91fc8 100644 (file)
@@ -85,9 +85,7 @@
                                792000  975000
                        >;
                        clock-latency = <61036>; /* two CLK32 periods */
-                       clocks = <&clks IMX7D_ARM_A7_ROOT_CLK>, <&clks IMX7D_ARM_A7_ROOT_SRC>,
-                                <&clks IMX7D_PLL_ARM_MAIN_CLK>, <&clks IMX7D_PLL_SYS_MAIN_CLK>;
-                       clock-names = "arm", "arm_root_src", "pll_arm", "pll_sys_main";
+                       clocks = <&clks IMX7D_CLK_ARM>;
                };
 
                cpu1: cpu@1 {
                        reg = <0x30400000 0x400000>;
                        ranges;
 
+                       adc1: adc@30610000 {
+                               compatible = "fsl,imx7d-adc";
+                               reg = <0x30610000 0x10000>;
+                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+                               clock-names = "adc";
+                               status = "disabled";
+                       };
+
+                       adc2: adc@30620000 {
+                               compatible = "fsl,imx7d-adc";
+                               reg = <0x30620000 0x10000>;
+                               interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+                               clock-names = "adc";
+                               status = "disabled";
+                       };
+
                        pwm1: pwm@30660000 {
                                compatible = "fsl,imx7d-pwm", "fsl,imx27-pwm";
                                reg = <0x30660000 0x10000>;
index 01aef230773d4052e19ba13b5c4a95df9ea08787..5acbd0dcc2abd9d3ffd3ac09adeab6f2dc33dfad 100644 (file)
@@ -137,7 +137,7 @@ netcp: netcp@26000000 {
        /* NetCP address range */
        ranges = <0 0x26000000 0x1000000>;
 
-       clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>;
+       clocks = <&clkosr>, <&papllclk>, <&clkcpgmac>, <&chipclk12>;
        dma-coherent;
 
        ti,navigator-dmas = <&dma_gbe 0>,
diff --git a/arch/arm/boot/dts/kirkwood-nsa325.dts b/arch/arm/boot/dts/kirkwood-nsa325.dts
new file mode 100644 (file)
index 0000000..bc4ec93
--- /dev/null
@@ -0,0 +1,238 @@
+/* Device tree file for the Zyxel NSA 325 NAS box.
+ *
+ * Copyright (c) 2015, Hans Ulli Kroll <ulli.kroll@googlemail.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; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Based upon the board setup file created by Peter Schildmann
+ */
+
+/dts-v1/;
+
+#include "kirkwood-nsa3x0-common.dtsi"
+
+/ {
+       model = "ZyXEL NSA325";
+       compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x20000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200";
+               stdout-path = &uart0;
+       };
+
+       mbus {
+               pcie-controller {
+                       status = "okay";
+
+                       pcie@1,0 {
+                               status = "okay";
+                       };
+               };
+       };
+
+       ocp@f1000000 {
+               pinctrl: pin-controller@10000 {
+                       pinctrl-names = "default";
+
+                       pmx_led_hdd2_green: pmx-led-hdd2-green {
+                               marvell,pins = "mpp12";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_hdd2_red: pmx-led-hdd2-red {
+                               marvell,pins = "mpp13";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_mcu_data: pmx-mcu-data {
+                               marvell,pins = "mpp14";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_usb_green: pmx-led-usb-green {
+                               marvell,pins = "mpp15";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_mcu_clk: pmx-mcu-clk {
+                               marvell,pins = "mpp16";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_mcu_act: pmx-mcu-act {
+                               marvell,pins = "mpp17";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_sys_green: pmx-led-sys-green {
+                               marvell,pins = "mpp28";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_sys_orange: pmx-led-sys-orange {
+                               marvell,pins = "mpp29";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_hdd1_green: pmx-led-hdd1-green {
+                               marvell,pins = "mpp41";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_led_hdd1_red: pmx-led-hdd1-red {
+                               marvell,pins = "mpp42";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_htp: pmx-htp {
+                               marvell,pins = "mpp43";
+                               marvell,function = "gpio";
+                       };
+
+                       /*
+                        * Buzzer needs to be switched at around 1kHz so is
+                        * not compatible with the gpio-beeper driver.
+                        */
+                       pmx_buzzer: pmx-buzzer {
+                               marvell,pins = "mpp44";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_vid_b1: pmx-vid-b1 {
+                               marvell,pins = "mpp45";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_power_resume_data: pmx-power-resume-data {
+                               marvell,pins = "mpp47";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_power_resume_clk: pmx-power-resume-clk {
+                               marvell,pins = "mpp49";
+                               marvell,function = "gpio";
+                       };
+
+                       pmx_pwr_sata1: pmx-pwr-sata1 {
+                               marvell,pins = "mpp47";
+                               marvell,function = "gpio";
+                       };
+               };
+
+               /* This board uses the pcf8563 RTC instead of the SoC RTC */
+               rtc@10300 {
+                       status = "disabled";
+               };
+
+               i2c@11000 {
+                       status = "okay";
+
+                       pcf8563: pcf8563@51 {
+                               compatible = "nxp,pcf8563";
+                               reg = <0x51>;
+                       };
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-0 = <&pmx_pwr_sata1>;
+               pinctrl-names = "default";
+
+               usb0_power: regulator@1 {
+                       enable-active-high;
+               };
+
+               sata1_power: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "SATA1 Power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       enable-active-high;
+                       gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_led_hdd2_green &pmx_led_hdd2_red
+                            &pmx_led_usb_green
+                            &pmx_led_sys_green &pmx_led_sys_orange
+                            &pmx_led_copy_green &pmx_led_copy_red
+                            &pmx_led_hdd1_green &pmx_led_hdd1_red>;
+               pinctrl-names = "default";
+
+               green-sys {
+                       label = "nsa325:green:sys";
+                       gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+               };
+               orange-sys {
+                       label = "nsa325:orange:sys";
+                       gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+               };
+               green-hdd1 {
+                       label = "nsa325:green:hdd1";
+                       gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+               };
+               red-hdd1 {
+                       label = "nsa325:red:hdd1";
+                       gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+               };
+               green-hdd2 {
+                       label = "nsa325:green:hdd2";
+                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+               };
+               red-hdd2 {
+                       label = "nsa325:red:hdd2";
+                       gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+               };
+               green-usb {
+                       label = "nsa325:green:usb";
+                       gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
+               };
+               green-copy {
+                       label = "nsa325:green:copy";
+                       gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+               };
+               red-copy {
+                       label = "nsa325:red:copy";
+                       gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+               };
+
+       /* The following pins are currently not assigned to a driver,
+          some of them should be configured as inputs.
+       pinctrl-0 = <&pmx_mcu_data &pmx_mcu_clk &pmx_mcu_act
+                    &pmx_htp &pmx_vid_b1
+                    &pmx_power_resume_data &pmx_power_resume_clk>; */
+       };
+
+
+};
+
+&mdio {
+       status = "okay";
+       ethphy0: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
diff --git a/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts b/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
new file mode 100644 (file)
index 0000000..1db6f2c
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * kirkwood-pogoplug-series-4.dts - Device tree file for PogoPlug Series 4
+ * inspired by the board files made by Kevin Mihelich for ArchLinux,
+ * and their DTS file.
+ *
+ * Copyright (C) 2015 Linus Walleij <linus.walleij@linaro.org>
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6192.dtsi"
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+       model = "Cloud Engines PogoPlug Series 4";
+       compatible = "cloudengines,pogoplugv4", "marvell,kirkwood-88f6192",
+                    "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x08000000>;
+       };
+
+       chosen {
+               stdout-path = "uart0:115200n8";
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-0 = <&pmx_button_eject>;
+               pinctrl-names = "default";
+
+               button@1 {
+                       debounce_interval = <50>;
+                       wakeup-source;
+                       linux,code = <KEY_EJECTCD>;
+                       label = "Eject Button";
+                       gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&pmx_led_green &pmx_led_red>;
+               pinctrl-names = "default";
+
+               health {
+                       label = "pogoplugv4:green:health";
+                       gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+               fault {
+                       label = "pogoplugv4:red:fault";
+                       gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+               };
+       };
+};
+
+&pinctrl {
+       pmx_sata0: pmx-sata0 {
+               marvell,pins = "mpp21";
+               marvell,function = "sata0";
+       };
+
+       pmx_sata1: pmx-sata1 {
+               marvell,pins = "mpp20";
+               marvell,function = "sata1";
+       };
+
+       pmx_sdio_cd: pmx-sdio-cd {
+               marvell,pins = "mpp27";
+               marvell,function = "gpio";
+       };
+
+       pmx_sdio_wp: pmx-sdio-wp {
+               marvell,pins = "mpp28";
+               marvell,function = "gpio";
+       };
+
+       pmx_button_eject: pmx-button-eject {
+               marvell,pins = "mpp29";
+               marvell,function = "gpio";
+       };
+
+       pmx_led_green: pmx-led-green {
+               marvell,pins = "mpp22";
+               marvell,function = "gpio";
+       };
+
+       pmx_led_red: pmx-led-red {
+               marvell,pins = "mpp24";
+               marvell,function = "gpio";
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+/*
+ * This PCIE controller has a USB 3.0 XHCI controller at 1,0
+ */
+&pciec {
+       status = "okay";
+};
+
+&pcie0 {
+       status = "okay";
+};
+
+&sata {
+       status = "okay";
+       pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
+       pinctrl-names = "default";
+       nr-ports = <1>;
+};
+
+&sdio {
+       status = "okay";
+       pinctrl-0 = <&pmx_sdio &pmx_sdio_cd &pmx_sdio_wp>;
+       pinctrl-names = "default";
+       cd-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+};
+
+&nand {
+       /* 128 MiB of NAND flash */
+       chip-delay = <40>;
+       status = "okay";
+       partitions {
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               partition@0 {
+                       label = "u-boot";
+                       reg = <0x00000000 0x200000>;
+                       read-only;
+               };
+
+               partition@200000 {
+                       label = "uImage";
+                       reg = <0x00200000 0x300000>;
+               };
+
+               partition@500000 {
+                       label = "uImage2";
+                       reg = <0x00500000 0x300000>;
+               };
+
+               partition@800000 {
+                       label = "failsafe";
+                       reg = <0x00800000 0x800000>;
+               };
+
+               partition@1000000 {
+                       label = "root";
+                       reg = <0x01000000 0x7000000>;
+               };
+       };
+};
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index c56ab6bbfe3c3a1fa1b60f481840cbaa3292a7f2..0e46560551f44b5d5dba4a01dcd74d9eb91ec5b2 100644 (file)
@@ -40,7 +40,7 @@
                };
                poweroff@12100 {
                        compatible = "qnap,power-off";
-                       reg = <0x12000 0x100>;
+                       reg = <0x12100 0x100>;
                        clocks = <&gate_clk 7>;
                };
                spi@10600 {
index 5b0430041ec6d1980cb47ba253ce410bcebd05d0..fb13f18c08cc36f4292d3c3bbe19fa74199acd85 100644 (file)
                        label = "sysboot2";
                        gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;     /* gpio2 */
                        linux,code = <BTN_0>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                sysboot5 {
                        label = "sysboot5";
                        gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;     /* gpio7 */
                        linux,code = <BTN_1>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                gpio1 {
                        label = "gpio1";
                        gpios = <&gpio6 21 GPIO_ACTIVE_LOW>;    /* gpio181 */
                        linux,code = <BTN_2>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                gpio2 {
                        label = "gpio2";
                        gpios = <&gpio6 18 GPIO_ACTIVE_LOW>;    /* gpio178 */
                        linux,code = <BTN_3>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
+       sound {
+               compatible = "ti,omap-twl4030";
+               ti,model = "omap3logic";
+               ti,mcbsp = <&mcbsp2>;
+       };
+
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
        };
 };
 
+&vaux1 {
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+};
+
+&vaux4 {
+       regulator-min-microvolt = <1800000>;
+       regulator-max-microvolt = <1800000>;
+};
+
+&mcbsp2 {
+       status = "okay";
+};
+
 &charger {
        ti,bb-uvolt = <3200000>;
        ti,bb-uamp = <150>;
        };
 };
 
+&vpll2 {
+       regulator-always-on;
+};
+
+&dss {
+       status = "ok";
+       vdds_dsi-supply = <&vpll2>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_dpi_pins1>;
+       port {
+               dpi_out: endpoint {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <16>;
+               };
+       };
+};
+
+/ {
+       aliases {
+               display0 = &lcd0;
+       };
+
+       lcd0: display@0 {
+               compatible = "panel-dpi";
+               label = "15";
+               status = "okay";
+               /* default-on; */
+               pinctrl-names = "default";
+               enable-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>;    /* gpio155, lcd INI */
+
+               port {
+                       lcd_in: endpoint {
+                               remote-endpoint = <&dpi_out>;
+                       };
+               };
+
+               panel-timing {
+                       clock-frequency = <9000000>;
+                       hactive = <480>;
+                       vactive = <272>;
+                       hfront-porch = <3>;
+                       hback-porch = <2>;
+                       hsync-len = <42>;
+                       vback-porch = <3>;
+                       vfront-porch = <4>;
+                       vsync-len = <11>;
+                       hsync-active = <0>;
+                       vsync-active = <0>;
+                       de-active = <1>;
+                       pixelclk-active = <1>;
+               };
+       };
+
+       bl: backlight {
+               compatible = "gpio-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&backlight_pins>;
+
+               gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>, /* gpio_56 */
+                       <&gpio5 26 GPIO_ACTIVE_HIGH>; /* gpio_154 */
+               default-on;
+       };
+};
+
 &mmc1 {
        interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
        pinctrl-names = "default";
                        OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT | MUX_MODE0)        /* sdmmc1_dat3.sdmmc1_dat3 */
                >;
        };
+
+       tsc2004_pins: pinmux_tsc2004_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE4)        /* mcbsp4_dr.gpio_153 */
+               >;
+       };
+
+       backlight_pins: pinmux_backlight_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20B8, PIN_OUTPUT | MUX_MODE4)       /* gpmc_ncs5.gpio_56 */
+                       OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE4)       /* mcbsp4_dx.gpio_154 */
+               >;
+       };
+
+       dss_dpi_pins1: pinmux_dss_dpi_pins1 {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+                       OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+                       OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+                       OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+
+                       OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+                       OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+                       OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+                       OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+                       OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+                       OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+                       OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+                       OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+                       OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+                       OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+                       OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+                       OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+
+                       OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3)   /* dss_data18.dss_data0 */
+                       OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3)   /* dss_data19.dss_data1 */
+                       OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3)   /* dss_data20.dss_data2 */
+                       OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3)   /* dss_data21.dss_data3 */
+                       OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3)   /* dss_data22.dss_data4 */
+                       OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3)   /* dss_data23.dss_data5 */
+               >;
+       };
 };
 
 &omap3_pmx_wkup {
        };
 };
 
+&i2c3 {
+       touchscreen: tsc2004@48 {
+               compatible = "ti,tsc2004";
+               reg = <0x48>;
+               vio-supply = <&vaux1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&tsc2004_pins>;
+               interrupts-extended = <&gpio5 25 IRQ_TYPE_EDGE_RISING>; /* gpio 153 */
+
+               touchscreen-fuzz-x = <4>;
+               touchscreen-fuzz-y = <7>;
+               touchscreen-fuzz-pressure = <2>;
+               touchscreen-size-x = <4096>;
+               touchscreen-size-y = <4096>;
+               touchscreen-max-pressure = <2048>;
+
+               ti,x-plate-ohms = <280>;
+               ti,esd-recovery-timeout-ms = <8000>;
+       };
+};
+
 &uart1 {
        interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
 };
index 36387b11451d4b342873cdadc888723e6bbd208c..7fed0bd4f3deea46281881ead81b2ebd29c5fa4b 100644 (file)
                reg = <0x48>;
                interrupts = <7>; /* SYS_NIRQ cascaded to intc */
                interrupt-parent = <&intc>;
+               twl_audio: audio {
+                       compatible = "ti,twl4030-audio";
+                       codec {
+                       };
+               };
        };
 };
 
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+};
+
+&i2c2 {
+       clock-frequency = <400000>;
+};
+
+&i2c3 {
+       clock-frequency = <400000>;
+};
+
 /*
  * Only found on the wireless SOM. For the SOM without wireless, the pins for
  * MMC3 can be routed with jumpers to the second MMC slot on the devkit and
                        OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4)       /* mcbsp1_fsr.gpio_157 */
                >;
        };
+       mcbsp2_pins: pinmux_mcbsp2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)        /* mcbsp2_fsx */
+                       OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)        /* mcbsp2_clkx */
+                       OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)        /* mcbsp2_dr */
+                       OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)       /* mcbsp2_dx */
+               >;
+       };
+       uart2_pins: pinmux_uart2_pins {
+               pinctrl-single,pins = <
+                       OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)        /* uart2_cts.uart2_cts */
+                       OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)       /* uart2_rts .uart2_rts*/
+                       OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)       /* uart2_tx.uart2_tx */
+                       OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)        /* uart2_rx.uart2_rx */
+                       OMAP3_CORE1_IOPAD(0x2198, PIN_OUTPUT | MUX_MODE4)       /* GPIO_162,BT_EN */
+               >;
+       };
+};
+
+&uart2 {
+       interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_pins>;
 };
 
 &omap3_pmx_core2 {
index 52591d83e8cd2759088421521abe184d32062abb..053a1f54f4bba4d397b8d75ed0268e0661449f64 100644 (file)
                        status = "disabled";
                };
 
+               eeprom: eeprom@4000e000 {
+                       compatible = "nxp,lpc1857-eeprom";
+                       reg = <0x4000e000 0x1000>, <0x20040000 0x4000>;
+                       reg-names = "reg", "mem";
+                       clocks = <&ccu1 CLK_CPU_EEPROM>;
+                       clock-names = "eeprom";
+                       resets = <&rgu 27>;
+                       interrupts = <4>;
+                       status = "disabled";
+               };
+
                mac: ethernet@40010000 {
                        compatible = "nxp,lpc1850-dwmac", "snps,dwmac-3.611", "snps,dwmac";
                        reg = <0x40010000 0x2000>;
index 3abebb75fc57c729ee7f615276862e60a6d51171..c85cf979725e0c5f83c2570014605cc7da4ad096 100644 (file)
  * http://www.gnu.org/copyleft/gpl.html
  */
 
-/include/ "skeleton.dtsi"
+#include "skeleton.dtsi"
 
 / {
        compatible = "nxp,lpc3220";
        interrupt-parent = <&mic>;
 
        cpus {
-               #address-cells = <0>;
+               #address-cells = <1>;
                #size-cells = <0>;
 
-               cpu {
+               cpu@0 {
                        compatible = "arm,arm926ej-s";
                        device_type = "cpu";
+                       reg = <0x0>;
                };
        };
 
@@ -31,7 +32,8 @@
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "simple-bus";
-               ranges = <0x20000000 0x20000000 0x30000000>;
+               ranges = <0x20000000 0x20000000 0x30000000>,
+                        <0xe0000000 0xe0000000 0x04000000>;
 
                /*
                 * Enable either SLC or MLC
                        status = "disabled";
                };
 
-               dma@31000000 {
+               dma: dma@31000000 {
                        compatible = "arm,pl080", "arm,primecell";
                        reg = <0x31000000 0x1000>;
                        interrupts = <0x1c 0>;
                };
 
-               /*
-                * Enable either ohci or usbd (gadget)!
-                */
-               ohci@31020000 {
-                       compatible = "nxp,ohci-nxp", "usb-ohci";
-                       reg = <0x31020000 0x300>;
-                       interrupts = <0x3b 0>;
-                       status = "disabled";
-               };
+               usb {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       compatible = "simple-bus";
+                       ranges = <0x0 0x31020000 0x00001000>;
 
-               usbd@31020000 {
-                       compatible = "nxp,lpc3220-udc";
-                       reg = <0x31020000 0x300>;
-                       interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
-                       status = "disabled";
+                       /*
+                        * Enable either ohci or usbd (gadget)!
+                        */
+                       ohci: ohci@0 {
+                               compatible = "nxp,ohci-nxp", "usb-ohci";
+                               reg = <0x0 0x300>;
+                               interrupts = <0x3b 0>;
+                               status = "disabled";
+                       };
+
+                       usbd: usbd@0 {
+                               compatible = "nxp,lpc3220-udc";
+                               reg = <0x0 0x300>;
+                               interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
+                               status = "disabled";
+                       };
+
+                       i2cusb: i2c@300 {
+                               compatible = "nxp,pnx-i2c";
+                               reg = <0x300 0x100>;
+                               interrupts = <0x3f 0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               pnx,timeout = <0x64>;
+                       };
                };
 
-               clcd@31040000 {
+               clcd: clcd@31040000 {
                        compatible = "arm,pl110", "arm,primecell";
                        reg = <0x31040000 0x1000>;
                        interrupts = <0x0e 0>;
                        interrupts = <0x1d 0>;
                };
 
+               emc: memory-controller@31080000 {
+                       compatible = "arm,pl175", "arm,primecell";
+                       reg = <0x31080000 0x1000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       ranges = <0 0xe0000000 0x01000000>,
+                                <1 0xe1000000 0x01000000>,
+                                <2 0xe2000000 0x01000000>,
+                                <3 0xe3000000 0x01000000>;
+                       status = "disabled";
+               };
+
                apb {
                        #address-cells = <1>;
                        #size-cells = <1>;
                                reg = <0x20094000 0x1000>;
                        };
 
-                       sd@20098000 {
+                       sd: sd@20098000 {
                                compatible = "arm,pl18x", "arm,primecell";
                                reg = <0x20098000 0x1000>;
                                interrupts = <0x0f 0>, <0x0d 0>;
                                status = "disabled";
                                #pwm-cells = <2>;
                        };
-
-                       i2cusb: i2c@31020300 {
-                               compatible = "nxp,pnx-i2c";
-                               reg = <0x31020300 0x100>;
-                               interrupts = <0x3f 0>;
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               pnx,timeout = <0x64>;
-                       };
                };
 
                fab {
                                status = "disabled";
                        };
 
-                       rtc@40024000 {
+                       rtc: rtc@40024000 {
                                compatible = "nxp,lpc3220-rtc";
                                reg = <0x40024000 0x1000>;
                                interrupts = <0x34 0>;
                                #gpio-cells = <3>; /* bank, pin, flags */
                        };
 
-                       watchdog@4003C000 {
+                       timer4: timer@4002C000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x4002C000 0x1000>;
+                               interrupts = <0x3 0>;
+                               status = "disabled";
+                       };
+
+                       timer5: timer@40030000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x40030000 0x1000>;
+                               interrupts = <0x4 0>;
+                               status = "disabled";
+                       };
+
+                       watchdog: watchdog@4003C000 {
                                compatible = "nxp,pnx4008-wdt";
                                reg = <0x4003C000 0x1000>;
                        };
 
+                       timer0: timer@40044000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x40044000 0x1000>;
+                               interrupts = <0x10 0>;
+                       };
+
                        /*
                         * TSC vs. ADC: Since those two share the same
                         * hardware, you need to choose from one of the
                         * them
                         */
 
-                       adc@40048000 {
+                       adc: adc@40048000 {
                                compatible = "nxp,lpc3220-adc";
                                reg = <0x40048000 0x1000>;
                                interrupts = <0x27 0>;
                                status = "disabled";
                        };
 
-                       tsc@40048000 {
+                       tsc: tsc@40048000 {
                                compatible = "nxp,lpc3220-tsc";
                                reg = <0x40048000 0x1000>;
                                interrupts = <0x27 0>;
                                status = "disabled";
                        };
 
-                       key@40050000 {
+                       timer1: timer@4004C000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x4004C000 0x1000>;
+                               interrupts = <0x11 0>;
+                       };
+
+                       key: key@40050000 {
                                compatible = "nxp,lpc3220-key";
                                reg = <0x40050000 0x1000>;
                                interrupts = <54 0>;
                                status = "disabled";
                        };
 
-                       pwm: pwm@4005C000 {
+                       timer2: timer@40058000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x40058000 0x1000>;
+                               interrupts = <0x12 0>;
+                               status = "disabled";
+                       };
+
+                       pwm1: pwm@4005C000 {
                                compatible = "nxp,lpc3220-pwm";
-                               reg = <0x4005C000 0x8>;
+                               reg = <0x4005C000 0x4>;
+                               status = "disabled";
+                       };
+
+                       pwm2: pwm@4005C004 {
+                               compatible = "nxp,lpc3220-pwm";
+                               reg = <0x4005C004 0x4>;
+                               status = "disabled";
+                       };
+
+                       timer3: timer@40060000 {
+                               compatible = "nxp,lpc3220-timer";
+                               reg = <0x40060000 0x1000>;
+                               interrupts = <0x13 0>;
                                status = "disabled";
                        };
                };
index 5f500c1ad89c13ca2d9af175a4969f1d10d6569f..5cfadb06c8df2f8c0be10c47dddf0d50ff2e894f 100644 (file)
                };
        };
 
+       i2c0_pins: i2c0-pins {
+               i2c0_pins_cfg {
+                       pins = "i2c0_scl", "i2c0_sda";
+                       function = "i2c0";
+                       input-enable;
+               };
+       };
+
        ssp_pins: ssp-pins {
                ssp1_cs {
                        pins = "p6_7";
        clock-frequency = <50000000>;
 };
 
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       clock-frequency = <400000>;
+
+       eeprom@50 {
+               compatible = "microchip,24c512";
+               reg = <0x50>;
+       };
+
+       eeprom@51 {
+               compatible = "microchip,24c02";
+               reg = <0x51>;
+       };
+
+       eeprom@54 {
+               compatible = "microchip,24c512";
+               reg = <0x54>;
+       };
+};
+
 &mac {
        status = "okay";
        phy-mode = "rmii";
        pinctrl-0 = <&enet_rmii_pins>;
 };
 
+&sct_pwm {
+       status = "okay";
+};
+
 &ssp1 {
        status = "okay";
        pinctrl-names = "default";
index 391121d24daa390a46b1d431123a6ebdd59ac7ba..079d3cf8c00bd3632139af827ede45fc7e5ecfca 100644 (file)
        pinctrl-0 = <&i2c0_pins>;
        clock-frequency = <400000>;
 
+       mma7455@1d {
+               compatible = "fsl,mma7455";
+               reg = <0x1d>;
+       };
+
        lm75@48 {
                compatible = "nxp,lm75";
                reg = <0x48>;
index fb9ecc754e8d518549508218d1694cc2603656ba..72f12db8d53a7d5e8e297762e89e2c11967c26ab 100644 (file)
@@ -37,3 +37,7 @@
                };
        };
 };
+
+&eeprom {
+       status = "okay";
+};
index 0521e6864cb7fdc92dd7a7731f4553e836ebfdea..940875316d0f3926b39ea0717e560288f8594084 100644 (file)
        status = "okay";
 };
 
+&sata {
+       status = "okay";
+};
+
 &uart0 {
        status = "okay";
 };
index fbb89d13401ea34e3b45198a062e06b230322e41..75ecaed32ae595b814ca902bafeacadb742a68f4 100644 (file)
                        bitclock-master;
                };
        };
+
+       panel: panel {
+               compatible = "nec,nl4827hc19-05b";
+       };
+};
+
+&dcu {
+       fsl,panel = <&panel>;
+       status = "okay";
 };
 
 &dspi1 {
        status = "okay";
 };
 
+&sata {
+       status = "okay";
+};
+
 &uart0 {
        status = "okay";
 };
index 9430a99281992dec3f3502de556b8521db492c69..2c84ca236473a10d8381666ef921a29a3ab395e0 100644 (file)
                        status = "disabled";
                };
 
+               sata: sata@3200000 {
+                       compatible = "fsl,ls1021a-ahci";
+                       reg = <0x0 0x3200000 0x0 0x10000>,
+                             <0x0 0x20220520 0x0 0x4>;
+                       reg-names = "ahci", "sata-ecc";
+                       interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&platform_clk 1>;
+                       dma-coherent;
+                       status = "disabled";
+               };
+
                scfg: scfg@1570000 {
                        compatible = "fsl,ls1021a-scfg", "syscon";
                        reg = <0x0 0x1570000 0x0 0x10000>;
                                 <&platform_clk 1>;
                };
 
+               dcu: dcu@2ce0000 {
+                       compatible = "fsl,ls1021a-dcu";
+                       reg = <0x0 0x2ce0000 0x0 0x10000>;
+                       interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&platform_clk 0>;
+                       clock-names = "dcu";
+                       big-endian;
+                       status = "disabled";
+               };
+
                mdio0: mdio@2d24000 {
                        compatible = "gianfar";
                        device_type = "mdio";
diff --git a/arch/arm/boot/dts/mt2701-evb.dts b/arch/arm/boot/dts/mt2701-evb.dts
new file mode 100644 (file)
index 0000000..082ca88
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015 MediaTek Inc.
+ * Author: Erin Lo <erin.lo@mediatek.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
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+/dts-v1/;
+#include "mt2701.dtsi"
+
+/ {
+       model = "MediaTek MT2701 evaluation board";
+       compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
+
+       memory {
+               reg = <0 0x80000000 0 0x40000000>;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/mt2701.dtsi b/arch/arm/boot/dts/mt2701.dtsi
new file mode 100644 (file)
index 0000000..3766904
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2015 MediaTek Inc.
+ * Author: Erin.Lo <erin.lo@mediatek.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
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "skeleton64.dtsi"
+
+/ {
+       compatible = "mediatek,mt2701";
+       interrupt-parent = <&sysirq>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x0>;
+               };
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x1>;
+               };
+               cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x2>;
+               };
+               cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0x3>;
+               };
+       };
+
+       system_clk: dummy13m {
+               compatible = "fixed-clock";
+               clock-frequency = <13000000>;
+               #clock-cells = <0>;
+       };
+
+       rtc_clk: dummy32k {
+               compatible = "fixed-clock";
+               clock-frequency = <32000>;
+               #clock-cells = <0>;
+       };
+
+       uart_clk: dummy26m {
+               compatible = "fixed-clock";
+               clock-frequency = <26000000>;
+               #clock-cells = <0>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupt-parent = <&gic>;
+               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)>;
+       };
+
+       watchdog: watchdog@10007000 {
+               compatible = "mediatek,mt2701-wdt",
+                            "mediatek,mt6589-wdt";
+               reg = <0 0x10007000 0 0x100>;
+       };
+
+       timer: timer@10008000 {
+               compatible = "mediatek,mt2701-timer",
+                            "mediatek,mt6577-timer";
+               reg = <0 0x10008000 0 0x80>;
+               interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>;
+               clocks = <&system_clk>, <&rtc_clk>;
+               clock-names = "system-clk", "rtc-clk";
+       };
+
+       sysirq: interrupt-controller@10200100 {
+               compatible = "mediatek,mt2701-sysirq",
+                            "mediatek,mt6577-sysirq";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               interrupt-parent = <&gic>;
+               reg = <0 0x10200100 0 0x1c>;
+       };
+
+       gic: interrupt-controller@10211000 {
+               compatible = "arm,cortex-a7-gic";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               interrupt-parent = <&gic>;
+               reg = <0 0x10211000 0 0x1000>,
+                     <0 0x10212000 0 0x1000>,
+                     <0 0x10214000 0 0x2000>,
+                     <0 0x10216000 0 0x2000>;
+       };
+
+       uart0: serial@11002000 {
+               compatible = "mediatek,mt2701-uart",
+                            "mediatek,mt6577-uart";
+               reg = <0 0x11002000 0 0x400>;
+               interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
+               clocks = <&uart_clk>;
+               status = "disabled";
+       };
+
+       uart1: serial@11003000 {
+               compatible = "mediatek,mt2701-uart",
+                            "mediatek,mt6577-uart";
+               reg = <0 0x11003000 0 0x400>;
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_LOW>;
+               clocks = <&uart_clk>;
+               status = "disabled";
+       };
+
+       uart2: serial@11004000 {
+               compatible = "mediatek,mt2701-uart",
+                            "mediatek,mt6577-uart";
+               reg = <0 0x11004000 0 0x400>;
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_LOW>;
+               clocks = <&uart_clk>;
+               status = "disabled";
+       };
+
+       uart3: serial@11005000 {
+               compatible = "mediatek,mt2701-uart",
+                            "mediatek,mt6577-uart";
+               reg = <0 0x11005000 0 0x400>;
+               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_LOW>;
+               clocks = <&uart_clk>;
+               status = "disabled";
+       };
+};
index cb99b02d2cccc19c0b5c60c4eed6d994424fb790..1d7f92bdcb9c30b00a9a6a0c8e3103ac37dee9e0 100644 (file)
@@ -15,7 +15,7 @@
 #include <dt-bindings/clock/mt8135-clk.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/reset-controller/mt8135-resets.h>
+#include <dt-bindings/reset/mt8135-resets.h>
 #include "skeleton64.dtsi"
 #include "mt8135-pinfunc.h"
 
index 73f1e3a8f62c436a0eea6dcae58958d07663a42d..01e1e2d5c735b3067e46b48b969a32b2e515452a 100644 (file)
@@ -69,7 +69,7 @@
                        label = "user";
                        gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x114>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
        };
 &omap3_pmx_wkup {
        gpio1_pins: pinmux_gpio1_pins {
                pinctrl-single,pins = <
-                       0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
+                       OMAP3_WKUP_IOPAD(0x2a0e, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
                >;
        };
 
        dss_dpi_pins2: pinmux_dss_dpi_pins1 {
                pinctrl-single,pins = <
-                       0x0a (PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 */
-                       0x0c (PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 */
-                       0x10 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 */
-                       0x12 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 */
-                       0x14 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 */
-                       0x16 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 */
+                       OMAP3_WKUP_IOPAD(0x2a0a, PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 */
+                       OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 */
+                       OMAP3_WKUP_IOPAD(0x2a10, PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 */
+                       OMAP3_WKUP_IOPAD(0x2a12, PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 */
+                       OMAP3_WKUP_IOPAD(0x2a14, PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 */
+                       OMAP3_WKUP_IOPAD(0x2a16, PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 */
                >;
        };
 };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x16e (PIN_INPUT | MUX_MODE0)   /* uart3_rx_irrx.uart3_rx_irrx */
-                       0x170 (PIN_OUTPUT | MUX_MODE0)  /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
+                       OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | MUX_MODE0)        /* uart3_rx_irrx.uart3_rx_irrx */
+                       OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)       /* uart3_tx_irtx.uart3_tx_irtx OUTPUT | MODE0 */
                >;
        };
 
index 274c2c482aaa2200d54861aeba1ca0d492609bbd..8ba465d57635fb90c1e7872000ae9b93064e29a1 100644 (file)
@@ -80,7 +80,7 @@
                        label = "user";
                        gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x114>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
        };
 &omap3_pmx_wkup {
        gpio1_pins: pinmux_gpio1_pins {
                pinctrl-single,pins = <
-                       0x14 (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
+                       OMAP3_WKUP_IOPAD(0x2a14, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
                >;
        };
 };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x16e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
-                       0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
+                       OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                       OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
                >;
        };
 
        tfp410_pins: pinmux_tfp410_pins {
                pinctrl-single,pins = <
-                       0x196 (PIN_OUTPUT | MUX_MODE4)  /* hdq_sio.gpio_170 */
+                       OMAP3_CORE1_IOPAD(0x21c6, PIN_OUTPUT | MUX_MODE4)       /* hdq_sio.gpio_170 */
                >;
        };
 
        dss_dpi_pins: pinmux_dss_dpi_pins {
                pinctrl-single,pins = <
-                       0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
-                       0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
-                       0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
-                       0x0aa (PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
-                       0x0ac (PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
-                       0x0ae (PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
-                       0x0b0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
-                       0x0b2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
-                       0x0b4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
-                       0x0b6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
-                       0x0b8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
-                       0x0ba (PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
-                       0x0bc (PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
-                       0x0be (PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
-                       0x0c0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
-                       0x0c2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
-                       0x0c4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
-                       0x0c6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
-                       0x0c8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
-                       0x0ca (PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
-                       0x0cc (PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
-                       0x0ce (PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
-                       0x0d0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
-                       0x0d2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
-                       0x0d4 (PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
-                       0x0d6 (PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
-                       0x0d8 (PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
-                       0x0da (PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
+                       OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+                       OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
+                       OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
+                       OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0)   /* dss_acbias.dss_acbias */
+                       OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 */
+                       OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 */
+                       OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 */
+                       OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 */
+                       OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0)   /* dss_data4.dss_data4 */
+                       OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0)   /* dss_data5.dss_data5 */
+                       OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0)   /* dss_data6.dss_data6 */
+                       OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0)   /* dss_data7.dss_data7 */
+                       OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0)   /* dss_data8.dss_data8 */
+                       OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0)   /* dss_data9.dss_data9 */
+                       OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0)   /* dss_data10.dss_data10 */
+                       OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0)   /* dss_data11.dss_data11 */
+                       OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0)   /* dss_data12.dss_data12 */
+                       OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0)   /* dss_data13.dss_data13 */
+                       OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0)   /* dss_data14.dss_data14 */
+                       OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0)   /* dss_data15.dss_data15 */
+                       OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0)   /* dss_data16.dss_data16 */
+                       OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0)   /* dss_data17.dss_data17 */
+                       OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE0)   /* dss_data18.dss_data18 */
+                       OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE0)   /* dss_data19.dss_data19 */
+                       OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE0)   /* dss_data20.dss_data20 */
+                       OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE0)   /* dss_data21.dss_data21 */
+                       OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0)   /* dss_data22.dss_data22 */
+                       OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0)   /* dss_data23.dss_data23 */
                >;
        };
 };
index 8c813e77b17f4237c0f262c44f396e0fca2e6d76..e5f7f5c92c1a9ea23068a2f2ba370780fa1d6cbd 100644 (file)
                ti,debounce-tol = /bits/ 16 <10>;
                ti,debounce-rep = /bits/ 16 <1>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
 
index 9ca2865a83d6e9bbc02a82156376ea857e9bee49..86850bb311ebbe491ccf523c60686928882b2374 100644 (file)
@@ -64,7 +64,7 @@
                        label = "user";
                        gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
                        linux,code = <BTN_EXTRA>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 4813e96157b3a62ce51a40ab1562fc5a5b440872..738910db5c0cb7dea2584706f79f330e6d097317 100644 (file)
@@ -68,6 +68,6 @@
                ti,keep-vref-on = <1>;
                ti,settle-delay-usec = /bits/ 16 <150>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
index bb339d1648e071c4c456a3f627de68f805e1aa9b..ac188657a95d150ee1ba61274d6d989d80e02079 100644 (file)
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_clk.sdmmc1_clk */
-                       0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd.sdmmc1_cmd */
-                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
-                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
-                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
-                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
-                       0x120 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat4.sdmmc1_dat4 */
-                       0x122 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat5.sdmmc1_dat5 */
-                       0x124 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat6.sdmmc1_dat6 */
-                       0x126 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat7.sdmmc1_dat7 */
+                       OMAP3_CORE1_IOPAD(0x2144, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* sdmmc1_clk.sdmmc1_clk */
+                       OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */
+                       OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat0.sdmmc1_dat0 */
+                       OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat1.sdmmc1_dat1 */
+                       OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat2.sdmmc1_dat2 */
+                       OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat3.sdmmc1_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2150, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat4.sdmmc1_dat4 */
+                       OMAP3_CORE1_IOPAD(0x2152, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat5.sdmmc1_dat5 */
+                       OMAP3_CORE1_IOPAD(0x2154, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat6.sdmmc1_dat6 */
+                       OMAP3_CORE1_IOPAD(0x2156, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat7.sdmmc1_dat7 */
                >;
        };
 
        /* NOTE: Clocked externally, needs INPUT also for sdmmc2_clk.sdmmc2_clk */
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk.sdmmc2_clk */
-                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd.sdmmc2_cmd */
-                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0.sdmmc2_dat0 */
-                       0x12e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */
-                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2.sdmmc2_dat2 */
-                       0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3.sdmmc2_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */
+                       OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */
+                       OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */
+                       OMAP3_CORE1_IOPAD(0x215e, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */
+                       OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
-                       0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx_irtx.uart3_tx_irtx */
+                       OMAP3_CORE1_IOPAD(0x219e, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                       OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)               /* uart3_tx_irtx.uart3_tx_irtx */
                >;
        };
 
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0x150 (PIN_OUTPUT | MUX_MODE4)          /* uart1_cts.gpio_150 */
-                       0x14e (PIN_INPUT | MUX_MODE4)           /* uart1_rts.gpio_149 */
+                       OMAP3_CORE1_IOPAD(0x2180, PIN_OUTPUT | MUX_MODE4)               /* uart1_cts.gpio_150 */
+                       OMAP3_CORE1_IOPAD(0x217e, PIN_INPUT | MUX_MODE4)                /* uart1_rts.gpio_149 */
                >;
        };
 
        smsc911x_pins: pinmux_smsc911x_pins {
                pinctrl-single,pins = <
-                       0x1a2 (PIN_INPUT | MUX_MODE4)           /* mcspi1_cs2.gpio_176 */
+                       OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT | MUX_MODE4)                /* mcspi1_cs2.gpio_176 */
                >;
        };
 };
 &omap3_pmx_wkup {
        dss_dpi_pins2: pinmux_dss_dpi_pins1 {
                pinctrl-single,pins = <
-                       0x0a (PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 */
-                       0x0c (PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 */
-                       0x10 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 */
-                       0x12 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 */
-                       0x14 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 */
-                       0x16 (PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 */
+                       OMAP3_WKUP_IOPAD(0x2a0a, PIN_OUTPUT | MUX_MODE3)   /* sys_boot0.dss_data18 */
+                       OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE3)   /* sys_boot1.dss_data19 */
+                       OMAP3_WKUP_IOPAD(0x2a10, PIN_OUTPUT | MUX_MODE3)   /* sys_boot3.dss_data20 */
+                       OMAP3_WKUP_IOPAD(0x2a12, PIN_OUTPUT | MUX_MODE3)   /* sys_boot4.dss_data21 */
+                       OMAP3_WKUP_IOPAD(0x2a14, PIN_OUTPUT | MUX_MODE3)   /* sys_boot5.dss_data22 */
+                       OMAP3_WKUP_IOPAD(0x2a16, PIN_OUTPUT | MUX_MODE3)   /* sys_boot6.dss_data23 */
                >;
        };
 };
index e14d15e5abc89bb245b5f29eb7833eeebe3ea667..5e2d6433d9394b8464b25df9d7fa189ced97e708 100644 (file)
@@ -37,7 +37,7 @@
                        label = "aux";
                        linux,code = <169>;
                        gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 3835e1569c292a952fdc2e29e0fb27e9cebfa2ee..33d6b4ead0925025fbba5ba037283fa904a559db 100644 (file)
        model = "IGEPv2 Rev. C (TI OMAP AM/DM37x)";
        compatible = "isee,omap3-igep0020", "ti,omap36xx", "ti,omap3";
 
-       /* Regulator to trigger the WIFI_PDN signal of the Wifi module */
-       lbee1usjyc_pdn: lbee1usjyc_pdn {
+       vmmcsdio_fixed: fixedregulator-mmcsdio {
                compatible = "regulator-fixed";
-               regulator-name = "regulator-lbee1usjyc-pdn";
+               regulator-name = "vmmcsdio_fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;    /* gpio_138 - WIFI_PDN */
-               startup-delay-us = <10000>;
-               enable-active-high;
        };
 
-       /* Regulator to trigger the RESET_N_W signal of the Wifi module */
-       lbee1usjyc_reset_n_w: lbee1usjyc_reset_n_w {
-               compatible = "regulator-fixed";
-               regulator-name = "regulator-lbee1usjyc-reset-n-w";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio5 11 GPIO_ACTIVE_HIGH>;    /* gpio_139 - RESET_N_W */
-               enable-active-high;
+       mmc2_pwrseq: mmc2_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>,      /* gpio_139 - RESET_N_W */
+                             <&gpio5 10 GPIO_ACTIVE_LOW>;      /* gpio_138 - WIFI_PDN */
        };
 };
 
@@ -51,8 +43,8 @@
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins &lbee1usjyc_pins>;
-       vmmc-supply = <&lbee1usjyc_pdn>;
-       vmmc_aux-supply = <&lbee1usjyc_reset_n_w>;
+       vmmc-supply = <&vmmcsdio_fixed>;
+       mmc-pwrseq = <&mmc2_pwrseq>;
        bus-width = <4>;
        non-removable;
 };
index 468608dab30a690d11fd30377749f6c195a98199..55b0cc4f5ee5ab25837590a2359e8eca1a3aeae1 100644 (file)
        model = "IGEP COM MODULE Rev. E (TI OMAP AM/DM37x)";
        compatible = "isee,omap3-igep0030", "ti,omap36xx", "ti,omap3";
 
-       /* Regulator to trigger the WIFI_PDN signal of the Wifi module */
-       lbee1usjyc_pdn: lbee1usjyc_pdn {
+       vmmcsdio_fixed: fixedregulator-mmcsdio {
                compatible = "regulator-fixed";
-               regulator-name = "regulator-lbee1usjyc-pdn";
+               regulator-name = "vmmcsdio_fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
-               gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;    /* gpio_138 - WIFI_PDN */
-               startup-delay-us = <10000>;
-               enable-active-high;
        };
 
-       /* Regulator to trigger the RESET_N_W signal of the Wifi module */
-       lbee1usjyc_reset_n_w: lbee1usjyc_reset_n_w {
-               compatible = "regulator-fixed";
-               regulator-name = "regulator-lbee1usjyc-reset-n-w";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               gpio = <&gpio5 11 GPIO_ACTIVE_HIGH>;    /* gpio_139 - RESET_N_W */
-               enable-active-high;
+       mmc2_pwrseq: mmc2_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               reset-gpios = <&gpio5 11 GPIO_ACTIVE_LOW>,      /* gpio_139 - RESET_N_W */
+                             <&gpio5 10 GPIO_ACTIVE_LOW>;      /* gpio_138 - WIFI_PDN */
        };
 };
 
@@ -62,8 +54,8 @@
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_pins &lbee1usjyc_pins>;
-       vmmc-supply = <&lbee1usjyc_pdn>;
-       vmmc_aux-supply = <&lbee1usjyc_reset_n_w>;
+       vmmc-supply = <&vmmcsdio_fixed>;
+       mmc-pwrseq = <&mmc2_pwrseq>;
        bus-width = <4>;
        non-removable;
 };
index d2fab8c0d4f87109f8994a64ff8653e6e3ef95f3..540163025dd3ede47afa448e83c67f81b427dae8 100644 (file)
                        label = "enter";
                        gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* gpio101 */
                        linux,code = <KEY_ENTER>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_f1 {
                        label = "f1";
                        gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* gpio102 */
                        linux,code = <KEY_F1>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_f2 {
                        label = "f2";
                        gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; /* gpio103 */
                        linux,code = <KEY_F2>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_f3 {
                        label = "f3";
                        gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; /* gpio104 */
                        linux,code = <KEY_F3>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_f4 {
                        label = "f4";
                        gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; /* gpio105 */
                        linux,code = <KEY_F4>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_left {
                        label = "left";
                        gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; /* gpio106 */
                        linux,code = <KEY_LEFT>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_right {
                        label = "right";
                        gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; /* gpio107 */
                        linux,code = <KEY_RIGHT>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_up {
                        label = "up";
                        gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; /* gpio108 */
                        linux,code = <KEY_UP>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                key_down {
                        label = "down";
                        gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; /* gpio109 */
                        linux,code = <KEY_DOWN>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
 &omap3_pmx_core {
        gpio_key_pins: pinmux_gpio_key_pins {
                pinctrl-single,pins = <
-                       0xea (PIN_INPUT | MUX_MODE4)    /* cam_d2.gpio_101 */
-                       0xec (PIN_INPUT | MUX_MODE4)    /* cam_d3.gpio_102 */
-                       0xee (PIN_INPUT | MUX_MODE4)    /* cam_d4.gpio_103 */
-                       0xf0 (PIN_INPUT | MUX_MODE4)    /* cam_d5.gpio_104 */
-                       0xf2 (PIN_INPUT | MUX_MODE4)    /* cam_d6.gpio_105 */
-                       0xf4 (PIN_INPUT | MUX_MODE4)    /* cam_d7.gpio_106 */
-                       0xf6 (PIN_INPUT | MUX_MODE4)    /* cam_d8.gpio_107 */
-                       0xf8 (PIN_INPUT | MUX_MODE4)    /* cam_d9.gpio_108 */
-                       0xfa (PIN_INPUT | MUX_MODE4)    /* cam_d10.gpio_109 */
+                       OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE4)        /* cam_d2.gpio_101 */
+                       OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE4)        /* cam_d3.gpio_102 */
+                       OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE4)        /* cam_d4.gpio_103 */
+                       OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE4)        /* cam_d5.gpio_104 */
+                       OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE4)        /* cam_d6.gpio_105 */
+                       OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE4)        /* cam_d7.gpio_106 */
+                       OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT | MUX_MODE4)        /* cam_d8.gpio_107 */
+                       OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT | MUX_MODE4)        /* cam_d9.gpio_108 */
+                       OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT | MUX_MODE4)        /* cam_d10.gpio_109 */
                >;
        };
 
        musb_pins: pinmux_musb_pins {
                pinctrl-single,pins = <
-                       0x172 (PIN_INPUT | MUX_MODE0)   /* hsusb0_clk.hsusb0_clk */
-                       0x17a (PIN_INPUT | MUX_MODE0)   /* hsusb0_data0.hsusb0_data0 */
-                       0x17c (PIN_INPUT | MUX_MODE0)   /* hsusb0_data1.hsusb0_data1 */
-                       0x17e (PIN_INPUT | MUX_MODE0)   /* hsusb0_data2.hsusb0_data2 */
-                       0x180 (PIN_INPUT | MUX_MODE0)   /* hsusb0_data3.hsusb0_data3 */
-                       0x182 (PIN_INPUT | MUX_MODE0)   /* hsusb0_data4.hsusb0_data4 */
-                       0x184 (PIN_INPUT | MUX_MODE0)   /* hsusb0_data5.hsusb0_data5 */
-                       0x186 (PIN_INPUT | MUX_MODE0)   /* hsusb0_data6.hsusb0_data6 */
-                       0x188 (PIN_INPUT | MUX_MODE0)   /* hsusb0_data7.hsusb0_data7 */
-                       0x176 (PIN_INPUT | MUX_MODE0)   /* hsusb0_dir.hsusb0_dir */
-                       0x178 (PIN_INPUT | MUX_MODE0)   /* hsusb0_nxt.hsusb0_nxt */
-                       0x174 (PIN_OUTPUT | MUX_MODE0)  /* hsusb0_stp.hsusb0_stp */
+                       OMAP3_CORE1_IOPAD(0x21a2, PIN_INPUT | MUX_MODE0)        /* hsusb0_clk.hsusb0_clk */
+                       OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT | MUX_MODE0)        /* hsusb0_data0.hsusb0_data0 */
+                       OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT | MUX_MODE0)        /* hsusb0_data1.hsusb0_data1 */
+                       OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT | MUX_MODE0)        /* hsusb0_data2.hsusb0_data2 */
+                       OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT | MUX_MODE0)        /* hsusb0_data3.hsusb0_data3 */
+                       OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT | MUX_MODE0)        /* hsusb0_data4.hsusb0_data4 */
+                       OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT | MUX_MODE0)        /* hsusb0_data5.hsusb0_data5 */
+                       OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT | MUX_MODE0)        /* hsusb0_data6.hsusb0_data6 */
+                       OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT | MUX_MODE0)        /* hsusb0_data7.hsusb0_data7 */
+                       OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT | MUX_MODE0)        /* hsusb0_dir.hsusb0_dir */
+                       OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT | MUX_MODE0)        /* hsusb0_nxt.hsusb0_nxt */
+                       OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0)       /* hsusb0_stp.hsusb0_stp */
                >;
        };
 
index 57d7c93cc72bd750fdffc2d4c27a01591b6c5dae..93f8dfe20f1321c97a69e2b971275c682f631ae1 100644 (file)
                ti,pressure-max = /bits/ 16 <255>;
                ti,swap-xy;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
 
index 5f5e0f3d5b64fcb2283f72b9df923c793be7f75c..74d8f7eb556399e489eaebc7e754a4515a96f57f 100644 (file)
                        gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* 110 */
                        linux,input-type = <5>; /* EV_SW */
                        linux,code = <0x09>; /* SW_CAMERA_LENS_COVER */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                camera_focus {
                        label = "Camera Focus";
                        gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; /* 68 */
                        linux,code = <0x210>; /* KEY_CAMERA_FOCUS */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                camera_capture {
                        label = "Camera Capture";
                        gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; /* 69 */
                        linux,code = <0xd4>; /* KEY_CAMERA */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                lock_button {
                        label = "Lock Button";
                        gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* 113 */
                        linux,code = <0x98>; /* KEY_SCREENLOCK */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                keypad_slide {
@@ -96,7 +96,7 @@
                        gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; /* 71 */
                        linux,input-type = <5>; /* EV_SW */
                        linux,code = <0x0a>; /* SW_KEYPAD_SLIDE */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                proximity_sensor {
 
        uart2_pins: pinmux_uart2_pins {
                pinctrl-single,pins = <
-                       0x14a (PIN_INPUT | MUX_MODE0)           /* uart2_rx */
-                       0x148 (PIN_OUTPUT | MUX_MODE0)          /* uart2_tx */
+                       OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)                /* uart2_rx */
+                       OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)               /* uart2_tx */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x16e (PIN_INPUT | MUX_MODE0)           /* uart3_rx */
-                       0x170 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx */
+                       OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | MUX_MODE0)                /* uart3_rx */
+                       OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)               /* uart3_tx */
                >;
        };
 
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x18a (PIN_INPUT | MUX_MODE0)           /* i2c1_scl */
-                       0x18c (PIN_INPUT | MUX_MODE0)           /* i2c1_sda */
+                       OMAP3_CORE1_IOPAD(0x21ba, PIN_INPUT | MUX_MODE0)                /* i2c1_scl */
+                       OMAP3_CORE1_IOPAD(0x21bc, PIN_INPUT | MUX_MODE0)                /* i2c1_sda */
                >;
        };
 
        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
-                       0x18e (PIN_INPUT | MUX_MODE0)           /* i2c2_scl */
-                       0x190 (PIN_INPUT | MUX_MODE0)           /* i2c2_sda */
+                       OMAP3_CORE1_IOPAD(0x21be, PIN_INPUT | MUX_MODE0)                /* i2c2_scl */
+                       OMAP3_CORE1_IOPAD(0x21c0, PIN_INPUT | MUX_MODE0)                /* i2c2_sda */
                >;
        };
 
        i2c3_pins: pinmux_i2c3_pins {
                pinctrl-single,pins = <
-                       0x192 (PIN_INPUT | MUX_MODE0)           /* i2c3_scl */
-                       0x194 (PIN_INPUT | MUX_MODE0)           /* i2c3_sda */
+                       OMAP3_CORE1_IOPAD(0x21c2, PIN_INPUT | MUX_MODE0)                /* i2c3_scl */
+                       OMAP3_CORE1_IOPAD(0x21c4, PIN_INPUT | MUX_MODE0)                /* i2c3_sda */
                >;
        };
 
 
        mcspi4_pins: pinmux_mcspi4_pins {
                pinctrl-single,pins = <
-                       0x15c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_clk */
-                       0x162 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_somi */
-                       0x160 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_simo */
-                       0x166 (PIN_OUTPUT | MUX_MODE1) /* mcspi4_cs0 */
+                       OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_clk */
+                       OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mcspi4_somi */
+                       OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE1) /* mcspi4_simo */
+                       OMAP3_CORE1_IOPAD(0x2196, PIN_OUTPUT | MUX_MODE1) /* mcspi4_cs0 */
                >;
        };
 
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x114 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_clk */
-                       0x116 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_cmd */
-                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0 */
-                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1 */
-                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2 */
-                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk */
+                       OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd */
+                       OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc1_dat0 */
+                       OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1 */
+                       OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2 */
+                       OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3 */
                >;
        };
 
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk */
-                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd */
-                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat0 */
-                       0x12e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat1 */
-                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat2 */
-                       0x132 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat3 */
-                       0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat4 */
-                       0x136 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat5 */
-                       0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat6 */
-                       0x13a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_dat7 */
+                       OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */
+                       OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */
+                       OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0)         /* sdmmc2_dat0 */
+                       OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */
+                       OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat4 */
+                       OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat5 */
+                       OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat6 */
+                       OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat7 */
                >;
        };
 
        acx565akm_pins: pinmux_acx565akm_pins {
                pinctrl-single,pins = <
-                       0x0d4 (PIN_OUTPUT | MUX_MODE4)          /* RX51_LCD_RESET_GPIO */
+                       OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE4)               /* RX51_LCD_RESET_GPIO */
                >;
        };
 
        dss_sdi_pins: pinmux_dss_sdi_pins {
                pinctrl-single,pins = <
-                       0x0c0 (PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
-                       0x0c2 (PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
-                       0x0c4 (PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
-                       0x0c6 (PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
+                       OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE1)   /* dss_data10.sdi_dat1n */
+                       OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE1)   /* dss_data11.sdi_dat1p */
+                       OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE1)   /* dss_data12.sdi_dat2n */
+                       OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE1)   /* dss_data13.sdi_dat2p */
 
-                       0x0d8 (PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
-                       0x0da (PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
+                       OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE1)   /* dss_data22.sdi_clkp */
+                       OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE1)   /* dss_data23.sdi_clkn */
                >;
        };
 
        wl1251_pins: pinmux_wl1251 {
                pinctrl-single,pins = <
-                       0x0ce (PIN_OUTPUT | MUX_MODE4)          /* gpio 87 => wl1251 enable */
-                       0x05a (PIN_INPUT | MUX_MODE4)           /* gpio 42 => wl1251 irq */
+                       OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE4)               /* gpio 87 => wl1251 enable */
+                       OMAP3_CORE1_IOPAD(0x208a, PIN_INPUT | MUX_MODE4)                /* gpio 42 => wl1251 irq */
                >;
        };
 
        ssi_pins: pinmux_ssi {
                pinctrl-single,pins = <
-                       0x150 (PIN_INPUT_PULLUP | MUX_MODE1)    /* ssi1_rdy_tx */
-                       0x14e (PIN_OUTPUT | MUX_MODE1)          /* ssi1_flag_tx */
-                       0x152 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */
-                       0x14c (PIN_OUTPUT | MUX_MODE1)          /* ssi1_dat_tx */
-                       0x154 (PIN_INPUT | MUX_MODE1)           /* ssi1_dat_rx */
-                       0x156 (PIN_INPUT | MUX_MODE1)           /* ssi1_flag_rx */
-                       0x158 (PIN_OUTPUT | MUX_MODE1)          /* ssi1_rdy_rx */
-                       0x15a (PIN_OUTPUT | MUX_MODE1)          /* ssi1_wake */
+                       OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT_PULLUP | MUX_MODE1) /* ssi1_rdy_tx */
+                       OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE1)               /* ssi1_flag_tx */
+                       OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* ssi1_wake_tx (cawake) */
+                       OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE1)               /* ssi1_dat_tx */
+                       OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT | MUX_MODE1)                /* ssi1_dat_rx */
+                       OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT | MUX_MODE1)                /* ssi1_flag_rx */
+                       OMAP3_CORE1_IOPAD(0x2188, PIN_OUTPUT | MUX_MODE1)               /* ssi1_rdy_rx */
+                       OMAP3_CORE1_IOPAD(0x218a, PIN_OUTPUT | MUX_MODE1)               /* ssi1_wake */
                >;
        };
 
        modem_pins: pinmux_modem {
                pinctrl-single,pins = <
-                       0x0ac (PIN_OUTPUT | MUX_MODE4)          /* gpio 70 => cmt_apeslpx */
-                       0x0b0 (PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio 72 => ape_rst_rq */
-                       0x0b2 (PIN_OUTPUT | MUX_MODE4)          /* gpio 73 => cmt_rst_rq */
-                       0x0b4 (PIN_OUTPUT | MUX_MODE4)          /* gpio 74 => cmt_en */
-                       0x0b6 (PIN_OUTPUT | MUX_MODE4)          /* gpio 75 => cmt_rst */
-                       0x15e (PIN_OUTPUT | MUX_MODE4)          /* gpio 157 => cmt_bsi */
+                       OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE4)               /* gpio 70 => cmt_apeslpx */
+                       OMAP3_CORE1_IOPAD(0x20e0, PIN_INPUT | WAKEUP_EN | MUX_MODE4) /* gpio 72 => ape_rst_rq */
+                       OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE4)               /* gpio 73 => cmt_rst_rq */
+                       OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE4)               /* gpio 74 => cmt_en */
+                       OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE4)               /* gpio 75 => cmt_rst */
+                       OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4)               /* gpio 157 => cmt_bsi */
                >;
        };
 };
index e9ee1df0e467291ca49757225d6dcd0b2a61705d..a2c2b8d8dd2c70a2ab5a8007b0cc2e24faeaafd0 100644 (file)
 &omap3_pmx_core {
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */
-                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */
-                       0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */
-                       0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */
-                       0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */
-                       0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */
+                       OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */
+                       OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */
+                       OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */
+                       OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */
                >;
        };
 };
index 7aae8fb82c1f33b66ba80566c6a1c5d0345f8a8a..3b3a75997f811597489b157dc831939f07eb5c3d 100644 (file)
@@ -48,7 +48,7 @@
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;            /* gpio_10 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index 17b82f82638a97e5e6157fc0c9c16d156de962eb..7df27926ead215be3fdb1e0f8b02ce078ecb935b 100644 (file)
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;            /* gpio_23 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
                button1@14 {
                        label = "button1";
                        linux,code = <BTN_1>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;            /* gpio_14 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index b09cedf66117398d0a75f0c07027deac5c793ea1..6314da2580f589c086408b459d607a545862fd98 100644 (file)
                ti,x-plate-ohms = /bits/ 16 <180>;
                ti,pressure-max = /bits/ 16 <255>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
index 5f979590571b9ded188a2c2f6a4e0e72808d5e96..7e3fe85a8ad9c47f9a1d6b7f5603f539e6eaccbb 100644 (file)
                ti,x-plate-ohms = /bits/ 16 <180>;
                ti,pressure-max = /bits/ 16 <255>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
 
index 49d2254a99b0f3767bfb3b797530139e2af84abe..250cc7fe5d5e1832365f5ecd55f009c0a41c313a 100644 (file)
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;            /* gpio_23 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
                button1@14 {
                        label = "button1";
                        linux,code = <BTN_1>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;            /* gpio_14 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index 680d7262399c9131944271bedf8fa684e90c3d34..8df7ec35d17d11eb30f095d8b42123f07a6ddb17 100644 (file)
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;            /* gpio_23 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
                button1@14 {
                        label = "button1";
                        linux,code = <BTN_1>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;            /* gpio_14 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index 087aedf5b9028c6f9f58d1065fd0029ce6ae0a0d..0ea2c451c80963f01456d0468327ac8336c578a6 100644 (file)
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;            /* gpio_23 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
                button1@14 {
                        label = "button1";
                        linux,code = <BTN_1>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;            /* gpio_14 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index cfe140c657e7c6b5d051f621536a565a99c41fe9..13e9d1f987afea7ecfca699bd7bf40cf701a9327 100644 (file)
                        label = "up";
                        linux,code = <KEY_UP>;
                        gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;    /* GPIO_110 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                down-button {
                        label = "down";
                        linux,code = <KEY_DOWN>;
                        gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;     /* GPIO_103 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                left-button {
                        label = "left";
                        linux,code = <KEY_LEFT>;
                        gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;     /* GPIO_96 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                right-button {
                        label = "right";
                        linux,code = <KEY_RIGHT>;
                        gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;     /* GPIO_98 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                pageup-button {
                        label = "game 1";
                        linux,code = <KEY_PAGEUP>;
                        gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;    /* GPIO_109 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                pagedown-button {
                        label = "game 3";
                        linux,code = <KEY_PAGEDOWN>;
                        gpios = <&gpio4 10 GPIO_ACTIVE_LOW>;    /* GPIO_106 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                home-button {
                        label = "game 4";
                        linux,code = <KEY_HOME>;
                        gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;     /* GPIO_101 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                end-button {
                        label = "game 2";
                        linux,code = <KEY_END>;
                        gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;    /* GPIO_111 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                right-shift {
                        label = "l";
                        linux,code = <KEY_RIGHTSHIFT>;
                        gpios = <&gpio4 6 GPIO_ACTIVE_LOW>;     /* GPIO_102 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                kp-plus {
                        label = "l2";
                        linux,code = <KEY_KPPLUS>;
                        gpios = <&gpio4 1 GPIO_ACTIVE_LOW>;     /* GPIO_97 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                right-ctrl {
                        label = "r";
                        linux,code = <KEY_RIGHTCTRL>;
                        gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;     /* GPIO_105 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                kp-minus {
                        label = "r2";
                        linux,code = <KEY_KPMINUS>;
                        gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;    /* GPIO_107 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                left-ctrl {
                        label = "ctrl";
                        linux,code = <KEY_LEFTCTRL>;
                        gpios = <&gpio4 8 GPIO_ACTIVE_LOW>;     /* GPIO_104 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                menu {
                        label = "menu";
                        linux,code = <KEY_MENU>;
                        gpios = <&gpio4 3 GPIO_ACTIVE_LOW>;     /* GPIO_99 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                hold {
                        label = "hold";
                        linux,code = <KEY_COFFEE>;
                        gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;    /* GPIO_176 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                left-alt {
                        label = "alt";
                        linux,code = <KEY_LEFTALT>;
                        gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;    /* GPIO_100 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                lid {
                ti,x-plate-ohms = /bits/ 16 <40>;
                ti,pressure-max = /bits/ 16 <255>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 
        lcd: lcd@1 {
index f4b1a61853e38523364a816ff4315caae15c378b..157345bb8e794548a97cfb974b745e032e87f2b3 100644 (file)
@@ -66,6 +66,6 @@
                ti,x-plate-ohms = /bits/ 16 <40>;
                ti,pressure-max = /bits/ 16 <255>;
                ti,swap-xy;
-               linux,wakeup;
+               wakeup-source;
        };
 };
index 7bc5fdd6981e25d76e3409533fbc46238177ce3f..f19170bdcc1fa0f382f2305112daa457ff528e6c 100644 (file)
        /* REVISIT: twl gpio0 is mmc0_cd */
        mmc1_pins: pinmux_mmc1_pins {
                pinctrl-single,pins = <
-                       0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_clk.sdmmc1_clk */
-                       0x116 (PIN_OUTPUT_PULLUP | MUX_MODE0)   /* sdmmc1_cmd.sdmmc1_cmd */
-                       0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat0.sdmmc1_dat0 */
-                       0x11a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat1.sdmmc1_dat1 */
-                       0x11c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat2.sdmmc1_dat2 */
-                       0x11e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc1_dat3.sdmmc1_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2144, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* sdmmc1_clk.sdmmc1_clk */
+                       OMAP3_CORE1_IOPAD(0x2146, PIN_OUTPUT_PULLUP | MUX_MODE0)        /* sdmmc1_cmd.sdmmc1_cmd */
+                       OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */
+                       OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */
+                       OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */
+                       OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */
                >;
        };
 
        mmc2_pins: pinmux_mmc2_pins {
                pinctrl-single,pins = <
-                       0x128 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_clk.sdmmc2_clk */
-                       0x12a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc2_cmd.sdmmc2_cmd */
-                       0x12c (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat0.sdmmc2_dat0 */
-                       0x12e (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat1.sdmmc2_dat1 */
-                       0x130 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat2.sdmmc2_dat2 */
-                       0x132 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat3.sdmmc2_dat3 */
-                       0x134 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat4.sdmmc2_dat4 */
-                       0x136 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat5.sdmmc2_dat5 */
-                       0x138 (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat6.sdmmc2_dat6 */
-                       0x13a (PIN_INPUT | MUX_MODE0)           /* sdmmc2_dat7.sdmmc2_dat7 */
+                       OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */
+                       OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */
+                       OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat0.sdmmc2_dat0 */
+                       OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat1.sdmmc2_dat1 */
+                       OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat2.sdmmc2_dat2 */
+                       OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat3.sdmmc2_dat3 */
+                       OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat4.sdmmc2_dat4 */
+                       OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat5.sdmmc2_dat5 */
+                       OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat6.sdmmc2_dat6 */
+                       OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT | MUX_MODE0)                /* sdmmc2_dat7.sdmmc2_dat7 */
                >;
        };
 
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                        0x150 (PIN_INPUT | MUX_MODE0)          /* uart1_cts.uart1_cts */
-                        0x14e (PIN_OUTPUT | MUX_MODE0)         /* uart1_rts.uart1_rts */
-                        0x152 (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart1_rx.uart1_rx */
-                        0x14c (PIN_OUTPUT | MUX_MODE0)         /* uart1_tx.uart1_tx */
+                        OMAP3_CORE1_IOPAD(0x2180, PIN_INPUT | MUX_MODE0)               /* uart1_cts.uart1_cts */
+                        OMAP3_CORE1_IOPAD(0x217e, PIN_OUTPUT | MUX_MODE0)              /* uart1_rts.uart1_rts */
+                        OMAP3_CORE1_IOPAD(0x2182, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart1_rx.uart1_rx */
+                        OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE0)              /* uart1_tx.uart1_tx */
                >;
        };
 
        uart2_pins: pinmux_uart2_pins {
                pinctrl-single,pins = <
-                        0x144 (PIN_INPUT_PULLUP | MUX_MODE0)   /* uart2_cts.uart2_cts */
-                        0x146 (PIN_OUTPUT | MUX_MODE0)         /* uart2_rts.uart2_rts */
-                        0x14a (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */
-                        0x148 (PIN_OUTPUT | MUX_MODE0)         /* uart2_tx.uart2_tx */
+                        OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT_PULLUP | MUX_MODE0)        /* uart2_cts.uart2_cts */
+                        OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)              /* uart2_rts.uart2_rts */
+                        OMAP3_CORE1_IOPAD(0x217a, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */
+                        OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)              /* uart2_tx.uart2_tx */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                        0x16a (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */
-                        0x16c (PIN_OUTPUT | MUX_MODE0)         /* uart3_rts_sd.uart3_rts_sd */
-                        0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
-                        0x170 (PIN_OUTPUT | MUX_MODE0)         /* uart3_tx_irtx.uart3_tx_irtx */
+                        OMAP3_CORE1_IOPAD(0x219a, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* uart3_cts_rctx.uart3_cts_rctx */
+                        OMAP3_CORE1_IOPAD(0x219c, PIN_OUTPUT | MUX_MODE0)              /* uart3_rts_sd.uart3_rts_sd */
+                        OMAP3_CORE1_IOPAD(0x219e, WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
+                        OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0)              /* uart3_tx_irtx.uart3_tx_irtx */
                >;
        };
 
        /* wl12xx GPIO output for WLAN_EN */
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0xea (PIN_OUTPUT| MUX_MODE4)            /* cam_d2.gpio_101 */
+                       OMAP3_CORE1_IOPAD(0x211a, PIN_OUTPUT| MUX_MODE4)                /* cam_d2.gpio_101 */
                >;
        };
 };
 &omap3_pmx_wkup {
        wlan_host_wkup: pinmux_wlan_host_wkup_pins {
                pinctrl-single,pins = <
-                       0x1a (PIN_INPUT_PULLUP | MUX_MODE4)     /* sys_clkout1.gpio_10 WLAN_HOST_WKUP */
+                       OMAP3_WKUP_IOPAD(0x2a1a, PIN_INPUT_PULLUP | MUX_MODE4)  /* sys_clkout1.gpio_10 WLAN_HOST_WKUP */
                >;
        };
 };
index 8a2b25332b8c73092fb39ea962bd752dd166ae6a..d1ffabb7c74fc7dee2de91665ac92aca5c898eeb 100644 (file)
                        ti,hwmods = "gpmc";
                        reg = <0x6e000000 0x02d0>;
                        interrupts = <20>;
+                       dmas = <&sdma 4>;
+                       dma-names = "rxtx";
                        gpmc,num-cs = <8>;
                        gpmc,num-waitpins = <4>;
                        #address-cells = <2>;
index 1a78f013f37ab8e2ee4de5361dc16bdeec2b2516..ab17b9929250bef0104f62a0fea33c8235705db3 100644 (file)
@@ -36,7 +36,7 @@
                        label = "button0";
                        linux,code = <BTN_0>;
                        gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;    /* gpio_121 */
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 133f1b74e8aede2cb823790446d9ef4c201e66f6..78d3631777629b8422deac792a6d2e6f1c655e7c 100644 (file)
@@ -13,8 +13,8 @@
 /* Pandaboard Rev A4+ have external pullups on SCL & SDA */
 &dss_hdmi_pins {
        pinctrl-single,pins = <
-               0x5a (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_cec.hdmi_cec */
-               0x5c (PIN_INPUT | MUX_MODE0)            /* hdmi_scl.hdmi_scl */
-               0x5e (PIN_INPUT | MUX_MODE0)            /* hdmi_sda.hdmi_sda */
+               OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+               OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)               /* hdmi_scl.hdmi_scl */
+               OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)               /* hdmi_sda.hdmi_sda */
                >;
 };
index 18d096696fc0b8e69e560215560e4d0b2d68c1af..df2e356ec089df2d9723497f8b89bb470823c891 100644 (file)
 
        twl6040_pins: pinmux_twl6040_pins {
                pinctrl-single,pins = <
-                       0xe0 (PIN_OUTPUT | MUX_MODE3)   /* hdq_sio.gpio_127 */
-                       0x160 (PIN_INPUT | MUX_MODE0)   /* sys_nirq2.sys_nirq2 */
+                       OMAP4_IOPAD(0x120, PIN_OUTPUT | MUX_MODE3)      /* hdq_sio.gpio_127 */
+                       OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0)       /* sys_nirq2.sys_nirq2 */
                >;
        };
 
        mcpdm_pins: pinmux_mcpdm_pins {
                pinctrl-single,pins = <
-                       0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_ul_data.abe_pdm_ul_data */
-                       0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_dl_data.abe_pdm_dl_data */
-                       0xca (PIN_INPUT_PULLUP   | MUX_MODE0)   /* abe_pdm_frame.abe_pdm_frame */
-                       0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_lb_clk.abe_pdm_lb_clk */
-                       0xce (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_clks.abe_clks */
+                       OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_ul_data.abe_pdm_ul_data */
+                       OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_dl_data.abe_pdm_dl_data */
+                       OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP   | MUX_MODE0)      /* abe_pdm_frame.abe_pdm_frame */
+                       OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_lb_clk.abe_pdm_lb_clk */
+                       OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_clks.abe_clks */
                >;
        };
 
        mcbsp1_pins: pinmux_mcbsp1_pins {
                pinctrl-single,pins = <
-                       0xbe (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
-                       0xc0 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_mcbsp1_dr.abe_mcbsp1_dr */
-                       0xc2 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)  /* abe_mcbsp1_dx.abe_mcbsp1_dx */
-                       0xc4 (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
+                       OMAP4_IOPAD(0x0fe, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
+                       OMAP4_IOPAD(0x100, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_mcbsp1_dr.abe_mcbsp1_dr */
+                       OMAP4_IOPAD(0x102, PIN_OUTPUT_PULLDOWN | MUX_MODE0)     /* abe_mcbsp1_dx.abe_mcbsp1_dx */
+                       OMAP4_IOPAD(0x104, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
                >;
        };
 
        dss_dpi_pins: pinmux_dss_dpi_pins {
                pinctrl-single,pins = <
-                       0x122 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data23 */
-                       0x124 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data22 */
-                       0x126 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data21 */
-                       0x128 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data20 */
-                       0x12a (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data19 */
-                       0x12c (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data18 */
-                       0x12e (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data15 */
-                       0x130 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data14 */
-                       0x132 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data13 */
-                       0x134 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data12 */
-                       0x136 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data11 */
-
-                       0x174 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data10 */
-                       0x176 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data9 */
-                       0x178 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data16 */
-                       0x17a (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data17 */
-                       0x17c (PIN_OUTPUT | MUX_MODE5)  /* dispc2_hsync */
-                       0x17e (PIN_OUTPUT | MUX_MODE5)  /* dispc2_pclk */
-                       0x180 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_vsync */
-                       0x182 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_de */
-                       0x184 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data8 */
-                       0x186 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data7 */
-                       0x188 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data6 */
-                       0x18a (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data5 */
-                       0x18c (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data4 */
-                       0x18e (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data3 */
-
-                       0x190 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data2 */
-                       0x192 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data1 */
-                       0x194 (PIN_OUTPUT | MUX_MODE5)  /* dispc2_data0 */
+                       OMAP4_IOPAD(0x162, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data23 */
+                       OMAP4_IOPAD(0x164, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data22 */
+                       OMAP4_IOPAD(0x166, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data21 */
+                       OMAP4_IOPAD(0x168, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data20 */
+                       OMAP4_IOPAD(0x16a, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data19 */
+                       OMAP4_IOPAD(0x16c, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data18 */
+                       OMAP4_IOPAD(0x16e, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data15 */
+                       OMAP4_IOPAD(0x170, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data14 */
+                       OMAP4_IOPAD(0x172, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data13 */
+                       OMAP4_IOPAD(0x174, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data12 */
+                       OMAP4_IOPAD(0x176, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data11 */
+
+                       OMAP4_IOPAD(0x1b4, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data10 */
+                       OMAP4_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data9 */
+                       OMAP4_IOPAD(0x1b8, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data16 */
+                       OMAP4_IOPAD(0x1ba, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data17 */
+                       OMAP4_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE5)      /* dispc2_hsync */
+                       OMAP4_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE5)      /* dispc2_pclk */
+                       OMAP4_IOPAD(0x1c0, PIN_OUTPUT | MUX_MODE5)      /* dispc2_vsync */
+                       OMAP4_IOPAD(0x1c2, PIN_OUTPUT | MUX_MODE5)      /* dispc2_de */
+                       OMAP4_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data8 */
+                       OMAP4_IOPAD(0x1c6, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data7 */
+                       OMAP4_IOPAD(0x1c8, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data6 */
+                       OMAP4_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data5 */
+                       OMAP4_IOPAD(0x1cc, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data4 */
+                       OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data3 */
+
+                       OMAP4_IOPAD(0x1d0, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data2 */
+                       OMAP4_IOPAD(0x1d2, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data1 */
+                       OMAP4_IOPAD(0x1d4, PIN_OUTPUT | MUX_MODE5)      /* dispc2_data0 */
                >;
        };
 
        tfp410_pins: pinmux_tfp410_pins {
                pinctrl-single,pins = <
-                       0x144 (PIN_OUTPUT | MUX_MODE3)  /* gpio_0 */
+                       OMAP4_IOPAD(0x184, PIN_OUTPUT | MUX_MODE3)      /* gpio_0 */
                >;
        };
 
        dss_hdmi_pins: pinmux_dss_hdmi_pins {
                pinctrl-single,pins = <
-                       0x5a (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_cec.hdmi_cec */
-                       0x5c (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_scl.hdmi_scl */
-                       0x5e (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_sda.hdmi_sda */
+                       OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+                       OMAP4_IOPAD(0x09c, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_scl.hdmi_scl */
+                       OMAP4_IOPAD(0x09e, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_sda.hdmi_sda */
                >;
        };
 
        tpd12s015_pins: pinmux_tpd12s015_pins {
                pinctrl-single,pins = <
-                       0x22 (PIN_OUTPUT | MUX_MODE3)           /* gpmc_a17.gpio_41 */
-                       0x48 (PIN_OUTPUT | MUX_MODE3)           /* gpmc_nbe1.gpio_60 */
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* hdmi_hpd.gpio_63 */
+                       OMAP4_IOPAD(0x062, PIN_OUTPUT | MUX_MODE3)              /* gpmc_a17.gpio_41 */
+                       OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)              /* gpmc_nbe1.gpio_60 */
+                       OMAP4_IOPAD(0x098, PIN_INPUT_PULLDOWN | MUX_MODE3)      /* hdmi_hpd.gpio_63 */
                >;
        };
 
        hsusbb1_pins: pinmux_hsusbb1_pins {
                pinctrl-single,pins = <
-                       0x82 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
-                       0x84 (PIN_OUTPUT | MUX_MODE4)           /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
-                       0x86 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
-                       0x88 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
-                       0x8a (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
-                       0x8c (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
-                       0x8e (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
-                       0x90 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
-                       0x92 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
-                       0x94 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
-                       0x96 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
-                       0x98 (PIN_INPUT_PULLDOWN | MUX_MODE4)   /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
+                       OMAP4_IOPAD(0x0c2, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_clk.usbb1_ulpiphy_clk */
+                       OMAP4_IOPAD(0x0c4, PIN_OUTPUT | MUX_MODE4)              /* usbb1_ulpitll_stp.usbb1_ulpiphy_stp */
+                       OMAP4_IOPAD(0x0c6, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dir.usbb1_ulpiphy_dir */
+                       OMAP4_IOPAD(0x0c8, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_nxt.usbb1_ulpiphy_nxt */
+                       OMAP4_IOPAD(0x0ca, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat0.usbb1_ulpiphy_dat0 */
+                       OMAP4_IOPAD(0x0cc, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat1.usbb1_ulpiphy_dat1 */
+                       OMAP4_IOPAD(0x0ce, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat2.usbb1_ulpiphy_dat2 */
+                       OMAP4_IOPAD(0x0d0, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat3.usbb1_ulpiphy_dat3 */
+                       OMAP4_IOPAD(0x0d2, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat4.usbb1_ulpiphy_dat4 */
+                       OMAP4_IOPAD(0x0d4, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat5.usbb1_ulpiphy_dat5 */
+                       OMAP4_IOPAD(0x0d6, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat6.usbb1_ulpiphy_dat6 */
+                       OMAP4_IOPAD(0x0d8, PIN_INPUT_PULLDOWN | MUX_MODE4)      /* usbb1_ulpitll_dat7.usbb1_ulpiphy_dat7 */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0xe2 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c1_scl */
-                       0xe4 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c1_sda */
+                       OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_scl */
+                       OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_sda */
                >;
        };
 
        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
-                       0xe6 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c2_scl */
-                       0xe8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c2_sda */
+                       OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c2_scl */
+                       OMAP4_IOPAD(0x128, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c2_sda */
                >;
        };
 
        i2c3_pins: pinmux_i2c3_pins {
                pinctrl-single,pins = <
-                       0xea (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c3_scl */
-                       0xec (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c3_sda */
+                       OMAP4_IOPAD(0x12a, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c3_scl */
+                       OMAP4_IOPAD(0x12c, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c3_sda */
                >;
        };
 
        i2c4_pins: pinmux_i2c4_pins {
                pinctrl-single,pins = <
-                       0xee (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c4_scl */
-                       0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c4_sda */
+                       OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_scl */
+                       OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_sda */
                >;
        };
 
         */
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0x26 (PIN_OUTPUT | MUX_MODE3)           /* gpmc_a19.gpio_43 */
-                       0x2c (PIN_OUTPUT | MUX_MODE3)           /* gpmc_a22.gpio_46 */
-                       0x30 (PIN_OUTPUT_PULLUP | MUX_MODE3)    /* gpmc_a24.gpio_48 */
-                       0x32 (PIN_OUTPUT_PULLUP | MUX_MODE3)    /* gpmc_a25.gpio_49 */
+                       OMAP4_IOPAD(0x066, PIN_OUTPUT | MUX_MODE3)              /* gpmc_a19.gpio_43 */
+                       OMAP4_IOPAD(0x06c, PIN_OUTPUT | MUX_MODE3)              /* gpmc_a22.gpio_46 */
+                       OMAP4_IOPAD(0x070, PIN_OUTPUT_PULLUP | MUX_MODE3)       /* gpmc_a24.gpio_48 */
+                       OMAP4_IOPAD(0x072, PIN_OUTPUT_PULLUP | MUX_MODE3)       /* gpmc_a25.gpio_49 */
                >;
        };
 
        /* wl12xx GPIO inputs and SDIO pins */
        wl12xx_pins: pinmux_wl12xx_pins {
                pinctrl-single,pins = <
-                       0x38 (PIN_INPUT | MUX_MODE3)            /* gpmc_ncs2.gpio_52 */
-                       0x3a (PIN_INPUT | MUX_MODE3)            /* gpmc_ncs3.gpio_53 */
-                       0x108 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_clk.sdmmc5_clk */
-                       0x10a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_cmd.sdmmc5_cmd */
-                       0x10c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat0.sdmmc5_dat0 */
-                       0x10e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat1.sdmmc5_dat1 */
-                       0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat2.sdmmc5_dat2 */
-                       0x112 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat3.sdmmc5_dat3 */
+                       OMAP4_IOPAD(0x078, PIN_INPUT | MUX_MODE3)               /* gpmc_ncs2.gpio_52 */
+                       OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)               /* gpmc_ncs3.gpio_53 */
+                       OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_clk.sdmmc5_clk */
+                       OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_cmd.sdmmc5_cmd */
+                       OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat0.sdmmc5_dat0 */
+                       OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat1.sdmmc5_dat1 */
+                       OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat2.sdmmc5_dat2 */
+                       OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat3.sdmmc5_dat3 */
                >;
        };
 };
 &omap4_pmx_wkup {
        led_wkgpio_pins: pinmux_leds_wkpins {
                pinctrl-single,pins = <
-                       0x1a (PIN_OUTPUT | MUX_MODE3)   /* gpio_wk7 */
-                       0x1c (PIN_OUTPUT | MUX_MODE3)   /* gpio_wk8 */
+                       OMAP4_IOPAD(0x05a, PIN_OUTPUT | MUX_MODE3)      /* gpio_wk7 */
+                       OMAP4_IOPAD(0x05c, PIN_OUTPUT | MUX_MODE3)      /* gpio_wk8 */
                >;
        };
 };
index 2f1dabcc6adfbda07ea62af45254c9ef8d6a87ef..119f8e657edc9bae37089588968b660c9c3749da 100644 (file)
 /* PandaboardES has external pullups on SCL & SDA */
 &dss_hdmi_pins {
        pinctrl-single,pins = <
-               0x5a (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_cec.hdmi_cec */
-               0x5c (PIN_INPUT | MUX_MODE0)            /* hdmi_scl.hdmi_scl */
-               0x5e (PIN_INPUT | MUX_MODE0)            /* hdmi_sda.hdmi_sda */
+               OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+               OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)               /* hdmi_scl.hdmi_scl */
+               OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)               /* hdmi_sda.hdmi_sda */
                >;
 };
 
 &omap4_pmx_core {
        led_gpio_pins: gpio_led_pmx {
                pinctrl-single,pins = <
-                       0xb6 (PIN_OUTPUT | MUX_MODE3)   /* gpio_110 */
+                       OMAP4_IOPAD(0x0f6, PIN_OUTPUT | MUX_MODE3)      /* gpio_110 */
                >;
        };
 };
 
 &led_wkgpio_pins {
        pinctrl-single,pins = <
-               0x1c (PIN_OUTPUT | MUX_MODE3)   /* gpio_wk8 */
+               OMAP4_IOPAD(0x05c, PIN_OUTPUT | MUX_MODE3)      /* gpio_wk8 */
        >;
 };
 
index aad5dda0f469ff7c3177ee26bbd29a4aabfaf7ad..b4d19a7ae39304e93c2d741a2bbd4830674eb663 100644 (file)
@@ -10,8 +10,8 @@
 /* SDP boards with 4430 ES2.3+ or 4460 have external pullups on SCL & SDA */
 &dss_hdmi_pins {
        pinctrl-single,pins = <
-               0x5a (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_cec.hdmi_cec */
-               0x5c (PIN_INPUT | MUX_MODE0)            /* hdmi_scl.hdmi_scl */
-               0x5e (PIN_INPUT | MUX_MODE0)            /* hdmi_sda.hdmi_sda */
+               OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+               OMAP4_IOPAD(0x09c, PIN_INPUT | MUX_MODE0)               /* hdmi_scl.hdmi_scl */
+               OMAP4_IOPAD(0x09e, PIN_INPUT | MUX_MODE0)               /* hdmi_sda.hdmi_sda */
                >;
 };
index f0bdc41f8eff0c7ac9b5fa05b1de59d2cf7cbde5..aae513265dc245c589d9beb785ad114c168443ad 100644 (file)
 
        uart2_pins: pinmux_uart2_pins {
                pinctrl-single,pins = <
-                       0xd8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* uart2_cts.uart2_cts */
-                       0xda (PIN_OUTPUT | MUX_MODE0)           /* uart2_rts.uart2_rts */
-                       0xdc (PIN_INPUT_PULLUP | MUX_MODE0)     /* uart2_rx.uart2_rx */
-                       0xde (PIN_OUTPUT | MUX_MODE0)           /* uart2_tx.uart2_tx */
+                       OMAP4_IOPAD(0x118, PIN_INPUT_PULLUP | MUX_MODE0)        /* uart2_cts.uart2_cts */
+                       OMAP4_IOPAD(0x11a, PIN_OUTPUT | MUX_MODE0)              /* uart2_rts.uart2_rts */
+                       OMAP4_IOPAD(0x11c, PIN_INPUT_PULLUP | MUX_MODE0)        /* uart2_rx.uart2_rx */
+                       OMAP4_IOPAD(0x11e, PIN_OUTPUT | MUX_MODE0)              /* uart2_tx.uart2_tx */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart3_cts_rctx.uart3_cts_rctx */
-                       0x102 (PIN_OUTPUT | MUX_MODE0)          /* uart3_rts_sd.uart3_rts_sd */
-                       0x104 (PIN_INPUT | MUX_MODE0)           /* uart3_rx_irrx.uart3_rx_irrx */
-                       0x106 (PIN_OUTPUT | MUX_MODE0)          /* uart3_tx_irtx.uart3_tx_irtx */
+                       OMAP4_IOPAD(0x140, PIN_INPUT_PULLUP | MUX_MODE0)        /* uart3_cts_rctx.uart3_cts_rctx */
+                       OMAP4_IOPAD(0x142, PIN_OUTPUT | MUX_MODE0)              /* uart3_rts_sd.uart3_rts_sd */
+                       OMAP4_IOPAD(0x144, PIN_INPUT | MUX_MODE0)               /* uart3_rx_irrx.uart3_rx_irrx */
+                       OMAP4_IOPAD(0x146, PIN_OUTPUT | MUX_MODE0)              /* uart3_tx_irtx.uart3_tx_irtx */
                >;
        };
 
        uart4_pins: pinmux_uart4_pins {
                pinctrl-single,pins = <
-                       0x11c (PIN_INPUT | MUX_MODE0)           /* uart4_rx.uart4_rx */
-                       0x11e (PIN_OUTPUT | MUX_MODE0)          /* uart4_tx.uart4_tx */
+                       OMAP4_IOPAD(0x15c, PIN_INPUT | MUX_MODE0)               /* uart4_rx.uart4_rx */
+                       OMAP4_IOPAD(0x15e, PIN_OUTPUT | MUX_MODE0)              /* uart4_tx.uart4_tx */
                >;
        };
 
        twl6040_pins: pinmux_twl6040_pins {
                pinctrl-single,pins = <
-                       0xe0 (PIN_OUTPUT | MUX_MODE3)           /* hdq_sio.gpio_127 */
-                       0x160 (PIN_INPUT | MUX_MODE0)           /* sys_nirq2.sys_nirq2 */
+                       OMAP4_IOPAD(0x120, PIN_OUTPUT | MUX_MODE3)              /* hdq_sio.gpio_127 */
+                       OMAP4_IOPAD(0x1a0, PIN_INPUT | MUX_MODE0)               /* sys_nirq2.sys_nirq2 */
                >;
        };
 
        mcpdm_pins: pinmux_mcpdm_pins {
                pinctrl-single,pins = <
-                       0xc6 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_ul_data.abe_pdm_ul_data */
-                       0xc8 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_dl_data.abe_pdm_dl_data */
-                       0xca (PIN_INPUT_PULLUP | MUX_MODE0)     /* abe_pdm_frame.abe_pdm_frame */
-                       0xcc (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_pdm_lb_clk.abe_pdm_lb_clk */
-                       0xce (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_clks.abe_clks */
+                       OMAP4_IOPAD(0x106, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_ul_data.abe_pdm_ul_data */
+                       OMAP4_IOPAD(0x108, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_dl_data.abe_pdm_dl_data */
+                       OMAP4_IOPAD(0x10a, PIN_INPUT_PULLUP | MUX_MODE0)        /* abe_pdm_frame.abe_pdm_frame */
+                       OMAP4_IOPAD(0x10c, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_pdm_lb_clk.abe_pdm_lb_clk */
+                       OMAP4_IOPAD(0x10e, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_clks.abe_clks */
                >;
        };
 
        dmic_pins: pinmux_dmic_pins {
                pinctrl-single,pins = <
-                       0xd0 (PIN_OUTPUT | MUX_MODE0)           /* abe_dmic_clk1.abe_dmic_clk1 */
-                       0xd2 (PIN_INPUT | MUX_MODE0)            /* abe_dmic_din1.abe_dmic_din1 */
-                       0xd4 (PIN_INPUT | MUX_MODE0)            /* abe_dmic_din2.abe_dmic_din2 */
-                       0xd6 (PIN_INPUT | MUX_MODE0)            /* abe_dmic_din3.abe_dmic_din3 */
+                       OMAP4_IOPAD(0x110, PIN_OUTPUT | MUX_MODE0)              /* abe_dmic_clk1.abe_dmic_clk1 */
+                       OMAP4_IOPAD(0x112, PIN_INPUT | MUX_MODE0)               /* abe_dmic_din1.abe_dmic_din1 */
+                       OMAP4_IOPAD(0x114, PIN_INPUT | MUX_MODE0)               /* abe_dmic_din2.abe_dmic_din2 */
+                       OMAP4_IOPAD(0x116, PIN_INPUT | MUX_MODE0)               /* abe_dmic_din3.abe_dmic_din3 */
                >;
        };
 
        mcbsp1_pins: pinmux_mcbsp1_pins {
                pinctrl-single,pins = <
-                       0xbe (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
-                       0xc0 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_mcbsp1_dr.abe_mcbsp1_dr */
-                       0xc2 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)  /* abe_mcbsp1_dx.abe_mcbsp1_dx */
-                       0xc4 (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
+                       OMAP4_IOPAD(0x0fe, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp1_clkx.abe_mcbsp1_clkx */
+                       OMAP4_IOPAD(0x100, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_mcbsp1_dr.abe_mcbsp1_dr */
+                       OMAP4_IOPAD(0x102, PIN_OUTPUT_PULLDOWN | MUX_MODE0)     /* abe_mcbsp1_dx.abe_mcbsp1_dx */
+                       OMAP4_IOPAD(0x104, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp1_fsx.abe_mcbsp1_fsx */
                >;
        };
 
        mcbsp2_pins: pinmux_mcbsp2_pins {
                pinctrl-single,pins = <
-                       0xb6 (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp2_clkx.abe_mcbsp2_clkx */
-                       0xb8 (PIN_INPUT_PULLDOWN | MUX_MODE0)   /* abe_mcbsp2_dr.abe_mcbsp2_dr */
-                       0xba (PIN_OUTPUT_PULLDOWN | MUX_MODE0)  /* abe_mcbsp2_dx.abe_mcbsp2_dx */
-                       0xbc (PIN_INPUT | MUX_MODE0)            /* abe_mcbsp2_fsx.abe_mcbsp2_fsx */
+                       OMAP4_IOPAD(0x0f6, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp2_clkx.abe_mcbsp2_clkx */
+                       OMAP4_IOPAD(0x0f8, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_mcbsp2_dr.abe_mcbsp2_dr */
+                       OMAP4_IOPAD(0x0fa, PIN_OUTPUT_PULLDOWN | MUX_MODE0)     /* abe_mcbsp2_dx.abe_mcbsp2_dx */
+                       OMAP4_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)               /* abe_mcbsp2_fsx.abe_mcbsp2_fsx */
                >;
        };
 
        mcspi1_pins: pinmux_mcspi1_pins {
                pinctrl-single,pins = <
-                       0xf2 (PIN_INPUT | MUX_MODE0)            /*  mcspi1_clk.mcspi1_clk */
-                       0xf4 (PIN_INPUT | MUX_MODE0)            /*  mcspi1_somi.mcspi1_somi */
-                       0xf6 (PIN_INPUT | MUX_MODE0)            /*  mcspi1_simo.mcspi1_simo */
-                       0xf8 (PIN_INPUT | MUX_MODE0)            /*  mcspi1_cs0.mcspi1_cs0 */
+                       OMAP4_IOPAD(0x132, PIN_INPUT | MUX_MODE0)               /*  mcspi1_clk.mcspi1_clk */
+                       OMAP4_IOPAD(0x134, PIN_INPUT | MUX_MODE0)               /*  mcspi1_somi.mcspi1_somi */
+                       OMAP4_IOPAD(0x136, PIN_INPUT | MUX_MODE0)               /*  mcspi1_simo.mcspi1_simo */
+                       OMAP4_IOPAD(0x138, PIN_INPUT | MUX_MODE0)               /*  mcspi1_cs0.mcspi1_cs0 */
                >;
        };
 
        dss_hdmi_pins: pinmux_dss_hdmi_pins {
                pinctrl-single,pins = <
-                       0x5a (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_cec.hdmi_cec */
-                       0x5c (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_scl.hdmi_scl */
-                       0x5e (PIN_INPUT_PULLUP | MUX_MODE0)     /* hdmi_sda.hdmi_sda */
+                       OMAP4_IOPAD(0x09a, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+                       OMAP4_IOPAD(0x09c, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_scl.hdmi_scl */
+                       OMAP4_IOPAD(0x09e, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_sda.hdmi_sda */
                >;
        };
 
        tpd12s015_pins: pinmux_tpd12s015_pins {
                pinctrl-single,pins = <
-                       0x22 (PIN_OUTPUT | MUX_MODE3)           /* gpmc_a17.gpio_41 */
-                       0x48 (PIN_OUTPUT | MUX_MODE3)           /* gpmc_nbe1.gpio_60 */
-                       0x58 (PIN_INPUT_PULLDOWN | MUX_MODE3)   /* hdmi_hpd.gpio_63 */
+                       OMAP4_IOPAD(0x062, PIN_OUTPUT | MUX_MODE3)              /* gpmc_a17.gpio_41 */
+                       OMAP4_IOPAD(0x088, PIN_OUTPUT | MUX_MODE3)              /* gpmc_nbe1.gpio_60 */
+                       OMAP4_IOPAD(0x098, PIN_INPUT_PULLDOWN | MUX_MODE3)      /* hdmi_hpd.gpio_63 */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0xe2 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c1_scl */
-                       0xe4 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c1_sda */
+                       OMAP4_IOPAD(0x122, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_scl */
+                       OMAP4_IOPAD(0x124, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_sda */
                >;
        };
 
        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
-                       0xe6 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c2_scl */
-                       0xe8 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c2_sda */
+                       OMAP4_IOPAD(0x126, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c2_scl */
+                       OMAP4_IOPAD(0x128, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c2_sda */
                >;
        };
 
        i2c3_pins: pinmux_i2c3_pins {
                pinctrl-single,pins = <
-                       0xea (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c3_scl */
-                       0xec (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c3_sda */
+                       OMAP4_IOPAD(0x12a, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c3_scl */
+                       OMAP4_IOPAD(0x12c, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c3_sda */
                >;
        };
 
        i2c4_pins: pinmux_i2c4_pins {
                pinctrl-single,pins = <
-                       0xee (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c4_scl */
-                       0xf0 (PIN_INPUT_PULLUP | MUX_MODE0)     /* i2c4_sda */
+                       OMAP4_IOPAD(0x12e, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_scl */
+                       OMAP4_IOPAD(0x130, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c4_sda */
                >;
        };
 
        /* wl12xx GPIO output for WLAN_EN */
        wl12xx_gpio: pinmux_wl12xx_gpio {
                pinctrl-single,pins = <
-                       0x3c (PIN_OUTPUT | MUX_MODE3)           /* gpmc_nwp.gpio_54 */
+                       OMAP4_IOPAD(0x07c, PIN_OUTPUT | MUX_MODE3)              /* gpmc_nwp.gpio_54 */
                >;
        };
 
        /* wl12xx GPIO inputs and SDIO pins */
        wl12xx_pins: pinmux_wl12xx_pins {
                pinctrl-single,pins = <
-                       0x3a (PIN_INPUT | MUX_MODE3)            /* gpmc_ncs3.gpio_53 */
-                       0x108 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_clk.sdmmc5_clk */
-                       0x10a (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_cmd.sdmmc5_cmd */
-                       0x10c (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat0.sdmmc5_dat0 */
-                       0x10e (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat1.sdmmc5_dat1 */
-                       0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat2.sdmmc5_dat2 */
-                       0x112 (PIN_INPUT_PULLUP | MUX_MODE0)    /* sdmmc5_dat3.sdmmc5_dat3 */
+                       OMAP4_IOPAD(0x07a, PIN_INPUT | MUX_MODE3)               /* gpmc_ncs3.gpio_53 */
+                       OMAP4_IOPAD(0x148, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_clk.sdmmc5_clk */
+                       OMAP4_IOPAD(0x14a, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_cmd.sdmmc5_cmd */
+                       OMAP4_IOPAD(0x14c, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat0.sdmmc5_dat0 */
+                       OMAP4_IOPAD(0x14e, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat1.sdmmc5_dat1 */
+                       OMAP4_IOPAD(0x150, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat2.sdmmc5_dat2 */
+                       OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat3.sdmmc5_dat3 */
                >;
        };
 };
index f2d2fdb756289ac578ee7e35ff645e7602c1243d..6e278d7716a515c63c148fbc3c42f95a5ba7d472 100644 (file)
@@ -41,7 +41,7 @@
                        label = "user";
                        gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
                        linux,code = <BTN_EXTRA>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 5a206c100ce287b34ce35f454d80749dfe6e9f06..2bd9c83300b2bc3810da219e821f79e4385cc98d 100644 (file)
                        #interrupt-cells = <2>;
                };
 
+               elm: elm@48078000 {
+                       compatible = "ti,am3352-elm";
+                       reg = <0x48078000 0x2000>;
+                       interrupts = <4>;
+                       ti,hwmods = "elm";
+                       status = "disabled";
+               };
+
                gpmc: gpmc@50000000 {
                        compatible = "ti,omap4430-gpmc";
                        reg = <0x50000000 0x1000>;
                        #address-cells = <2>;
                        #size-cells = <1>;
                        interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&sdma 4>;
+                       dma-names = "rxtx";
                        gpmc,num-cs = <8>;
                        gpmc,num-waitpins = <4>;
                        ti,hwmods = "gpmc";
index 5cf76a1c5c752c080bdd6e454540acb51ce80992..888412c63f97492ef445368c3208434d748912f2 100644 (file)
 
        twl6040_pins: pinmux_twl6040_pins {
                pinctrl-single,pins = <
-                       0x17e (PIN_OUTPUT | MUX_MODE6)  /* mcspi1_somi.gpio5_141 */
+                       OMAP5_IOPAD(0x1be, PIN_OUTPUT | MUX_MODE6)      /* mcspi1_somi.gpio5_141 */
                >;
        };
 
        mcpdm_pins: pinmux_mcpdm_pins {
                pinctrl-single,pins = <
-                       0x142 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* abe_clks.abe_clks */
-                       0x15c (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* abemcpdm_ul_data.abemcpdm_ul_data */
-                       0x15e (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* abemcpdm_dl_data.abemcpdm_dl_data */
-                       0x160 (PIN_INPUT_PULLUP | MUX_MODE0)    /* abemcpdm_frame.abemcpdm_frame */
-                       0x162 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* abemcpdm_lb_clk.abemcpdm_lb_clk */
+                       OMAP5_IOPAD(0x182, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abe_clks.abe_clks */
+                       OMAP5_IOPAD(0x19c, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abemcpdm_ul_data.abemcpdm_ul_data */
+                       OMAP5_IOPAD(0x19e, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abemcpdm_dl_data.abemcpdm_dl_data */
+                       OMAP5_IOPAD(0x1a0, PIN_INPUT_PULLUP | MUX_MODE0)        /* abemcpdm_frame.abemcpdm_frame */
+                       OMAP5_IOPAD(0x1a2, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abemcpdm_lb_clk.abemcpdm_lb_clk */
                >;
        };
 
        mcbsp1_pins: pinmux_mcbsp1_pins {
                pinctrl-single,pins = <
-                       0x14c (PIN_INPUT | MUX_MODE1)           /* abedmic_clk2.abemcbsp1_fsx */
-                       0x14e (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* abedmic_clk3.abemcbsp1_dx */
-                       0x150 (PIN_INPUT | MUX_MODE1)           /* abeslimbus1_clock.abemcbsp1_clkx */
-                       0x152 (PIN_INPUT_PULLDOWN | MUX_MODE1)  /* abeslimbus1_data.abemcbsp1_dr */
+                       OMAP5_IOPAD(0x18c, PIN_INPUT | MUX_MODE1)               /* abedmic_clk2.abemcbsp1_fsx */
+                       OMAP5_IOPAD(0x18e, PIN_OUTPUT_PULLDOWN | MUX_MODE1)     /* abedmic_clk3.abemcbsp1_dx */
+                       OMAP5_IOPAD(0x190, PIN_INPUT | MUX_MODE1)               /* abeslimbus1_clock.abemcbsp1_clkx */
+                       OMAP5_IOPAD(0x192, PIN_INPUT_PULLDOWN | MUX_MODE1)      /* abeslimbus1_data.abemcbsp1_dr */
                >;
        };
 
        mcbsp2_pins: pinmux_mcbsp2_pins {
                pinctrl-single,pins = <
-                       0x154 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* abemcbsp2_dr.abemcbsp2_dr */
-                       0x156 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* abemcbsp2_dx.abemcbsp2_dx */
-                       0x158 (PIN_INPUT | MUX_MODE0)           /* abemcbsp2_fsx.abemcbsp2_fsx */
-                       0x15a (PIN_INPUT | MUX_MODE0)           /* abemcbsp2_clkx.abemcbsp2_clkx */
+                       OMAP5_IOPAD(0x194, PIN_INPUT_PULLDOWN | MUX_MODE0)      /* abemcbsp2_dr.abemcbsp2_dr */
+                       OMAP5_IOPAD(0x196, PIN_OUTPUT_PULLDOWN | MUX_MODE0)     /* abemcbsp2_dx.abemcbsp2_dx */
+                       OMAP5_IOPAD(0x198, PIN_INPUT | MUX_MODE0)               /* abemcbsp2_fsx.abemcbsp2_fsx */
+                       OMAP5_IOPAD(0x19a, PIN_INPUT | MUX_MODE0)               /* abemcbsp2_clkx.abemcbsp2_clkx */
                >;
        };
 
        i2c1_pins: pinmux_i2c1_pins {
                pinctrl-single,pins = <
-                       0x1b2 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_scl */
-                       0x1b4 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c1_sda */
+                       OMAP5_IOPAD(0x1f2, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_scl */
+                       OMAP5_IOPAD(0x1f4, PIN_INPUT_PULLUP | MUX_MODE0)        /* i2c1_sda */
                >;
        };
 
        mcspi2_pins: pinmux_mcspi2_pins {
                pinctrl-single,pins = <
-                       0xbc (PIN_INPUT | MUX_MODE0)            /*  mcspi2_clk */
-                       0xbe (PIN_INPUT | MUX_MODE0)            /*  mcspi2_simo */
-                       0xc0 (PIN_INPUT_PULLUP | MUX_MODE0)     /*  mcspi2_somi */
-                       0xc2 (PIN_OUTPUT | MUX_MODE0)           /*  mcspi2_cs0 */
+                       OMAP5_IOPAD(0x0fc, PIN_INPUT | MUX_MODE0)               /*  mcspi2_clk */
+                       OMAP5_IOPAD(0x0fe, PIN_INPUT | MUX_MODE0)               /*  mcspi2_simo */
+                       OMAP5_IOPAD(0x100, PIN_INPUT_PULLUP | MUX_MODE0)        /*  mcspi2_somi */
+                       OMAP5_IOPAD(0x102, PIN_OUTPUT | MUX_MODE0)              /*  mcspi2_cs0 */
                >;
        };
 
        mcspi3_pins: pinmux_mcspi3_pins {
                pinctrl-single,pins = <
-                       0x78 (PIN_INPUT | MUX_MODE1)            /*  mcspi3_somi */
-                       0x7a (PIN_INPUT | MUX_MODE1)            /*  mcspi3_cs0 */
-                       0x7c (PIN_INPUT | MUX_MODE1)            /*  mcspi3_simo */
-                       0x7e (PIN_INPUT | MUX_MODE1)            /*  mcspi3_clk */
+                       OMAP5_IOPAD(0x0b8, PIN_INPUT | MUX_MODE1)               /*  mcspi3_somi */
+                       OMAP5_IOPAD(0x0ba, PIN_INPUT | MUX_MODE1)               /*  mcspi3_cs0 */
+                       OMAP5_IOPAD(0x0bc, PIN_INPUT | MUX_MODE1)               /*  mcspi3_simo */
+                       OMAP5_IOPAD(0x0be, PIN_INPUT | MUX_MODE1)               /*  mcspi3_clk */
                >;
        };
 
 
        usbhost_pins: pinmux_usbhost_pins {
                pinctrl-single,pins = <
-                       0x84 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
-                       0x86 (PIN_INPUT | MUX_MODE0) /* usbb2_hsic_data */
+                       OMAP5_IOPAD(0x0c4, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
+                       OMAP5_IOPAD(0x0c6, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_data */
 
-                       0x19e (PIN_INPUT | MUX_MODE0) /* usbb3_hsic_strobe */
-                       0x1a0 (PIN_INPUT | MUX_MODE0) /* usbb3_hsic_data */
+                       OMAP5_IOPAD(0x1de, PIN_INPUT | MUX_MODE0) /* usbb3_hsic_strobe */
+                       OMAP5_IOPAD(0x1e0, PIN_INPUT | MUX_MODE0) /* usbb3_hsic_data */
 
-                       0x70 (PIN_OUTPUT | MUX_MODE6) /* gpio3_80 HUB_NRESET */
-                       0x6e (PIN_OUTPUT | MUX_MODE6) /* gpio3_79 ETH_NRESET */
+                       OMAP5_IOPAD(0x0b0, PIN_OUTPUT | MUX_MODE6) /* gpio3_80 HUB_NRESET */
+                       OMAP5_IOPAD(0x0ae, PIN_OUTPUT | MUX_MODE6) /* gpio3_79 ETH_NRESET */
                >;
        };
 
        led_gpio_pins: pinmux_led_gpio_pins {
                pinctrl-single,pins = <
-                       0x196 (PIN_OUTPUT | MUX_MODE6) /* uart3_cts_rctx.gpio5_153 */
+                       OMAP5_IOPAD(0x1d6, PIN_OUTPUT | MUX_MODE6) /* uart3_cts_rctx.gpio5_153 */
                >;
        };
 
        uart1_pins: pinmux_uart1_pins {
                pinctrl-single,pins = <
-                       0x60 (PIN_OUTPUT | MUX_MODE0) /* uart1_tx.uart1_cts */
-                       0x62 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_tx.uart1_cts */
-                       0x64 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rx.uart1_rts */
-                       0x66 (PIN_OUTPUT | MUX_MODE0) /* uart1_rx.uart1_rts */
+                       OMAP5_IOPAD(0x0a0, PIN_OUTPUT | MUX_MODE0) /* uart1_tx.uart1_cts */
+                       OMAP5_IOPAD(0x0a2, PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_tx.uart1_cts */
+                       OMAP5_IOPAD(0x0a4, PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rx.uart1_rts */
+                       OMAP5_IOPAD(0x0a6, PIN_OUTPUT | MUX_MODE0) /* uart1_rx.uart1_rts */
                >;
        };
 
        uart3_pins: pinmux_uart3_pins {
                pinctrl-single,pins = <
-                       0x19a (PIN_OUTPUT | MUX_MODE0) /* uart3_rts_irsd.uart3_tx_irtx */
-                       0x19c (PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_rx_irrx.uart3_usbb3_hsic */
+                       OMAP5_IOPAD(0x1da, PIN_OUTPUT | MUX_MODE0) /* uart3_rts_irsd.uart3_tx_irtx */
+                       OMAP5_IOPAD(0x1dc, PIN_INPUT_PULLUP | MUX_MODE0) /* uart3_rx_irrx.uart3_usbb3_hsic */
                >;
        };
 
        uart5_pins: pinmux_uart5_pins {
                pinctrl-single,pins = <
-                       0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_rx.uart5_rx */
-                       0x172 (PIN_OUTPUT | MUX_MODE0) /* uart5_tx.uart5_tx */
-                       0x174 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_cts.uart5_rts */
-                       0x176 (PIN_OUTPUT | MUX_MODE0) /* uart5_cts.uart5_rts */
+                       OMAP5_IOPAD(0x1b0, PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_rx.uart5_rx */
+                       OMAP5_IOPAD(0x1b2, PIN_OUTPUT | MUX_MODE0) /* uart5_tx.uart5_tx */
+                       OMAP5_IOPAD(0x1b4, PIN_INPUT_PULLUP | MUX_MODE0) /* uart5_cts.uart5_rts */
+                       OMAP5_IOPAD(0x1b6, PIN_OUTPUT | MUX_MODE0) /* uart5_cts.uart5_rts */
                >;
        };
 
        dss_hdmi_pins: pinmux_dss_hdmi_pins {
                pinctrl-single,pins = <
-                       0x0fc (PIN_INPUT_PULLUP | MUX_MODE0)    /* hdmi_cec.hdmi_cec */
-                       0x100 (PIN_INPUT | MUX_MODE0)   /* hdmi_ddc_scl.hdmi_ddc_scl */
-                       0x102 (PIN_INPUT | MUX_MODE0)   /* hdmi_ddc_sda.hdmi_ddc_sda */
+                       OMAP5_IOPAD(0x13c, PIN_INPUT_PULLUP | MUX_MODE0)        /* hdmi_cec.hdmi_cec */
+                       OMAP5_IOPAD(0x140, PIN_INPUT | MUX_MODE0)       /* hdmi_ddc_scl.hdmi_ddc_scl */
+                       OMAP5_IOPAD(0x142, PIN_INPUT | MUX_MODE0)       /* hdmi_ddc_sda.hdmi_ddc_sda */
                >;
        };
 
        tpd12s015_pins: pinmux_tpd12s015_pins {
                pinctrl-single,pins = <
-                       0x0fe (PIN_INPUT_PULLDOWN | MUX_MODE6)  /* hdmi_hpd.gpio7_193 */
+                       OMAP5_IOPAD(0x13e, PIN_INPUT_PULLDOWN | MUX_MODE6)      /* hdmi_hpd.gpio7_193 */
                >;
        };
 };
 
        usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
                pinctrl-single,pins = <
-                       0x1A (PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
+                       OMAP5_IOPAD(0x05a, PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
                >;
        };
 
        wlcore_irq_pin: pinmux_wlcore_irq_pin {
                pinctrl-single,pins = <
-                       OMAP5_IOPAD(0x040, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE6)    /* llia_wakereqin.gpio1_wk14 */
+                       OMAP5_IOPAD(0x40, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE6)     /* llia_wakereqin.gpio1_wk14 */
                >;
        };
 };
index 3774b37be6c89dbc26b75114bf8891885ccd07c2..ecc591dc0778ddbf77222d417884387511d31f0d 100644 (file)
 
        ads7846_pins: pinmux_ads7846_pins {
                pinctrl-single,pins = <
-                       0x02 (PIN_INPUT_PULLDOWN | MUX_MODE6)  /* llib_wakereqin.gpio1_wk15 */
+                       OMAP5_IOPAD(0x0042, PIN_INPUT_PULLDOWN | MUX_MODE6)  /* llib_wakereqin.gpio1_wk15 */
                >;
        };
 };
                ti,debounce-tol = /bits/ 16 <10>;
                ti,debounce-rep = /bits/ 16 <1>;
 
-               linux,wakeup;
+               wakeup-source;
        };
 };
 
index 05b1c1ebded8d1305f053427cb8e482d5ef6c00e..60b3fbb3bf07ad384182e951e1329ca46a8cf1ab 100644 (file)
@@ -40,8 +40,8 @@
 &omap5_pmx_core {
        i2c5_pins: pinmux_i2c5_pins {
                pinctrl-single,pins = <
-                       0x186 (PIN_INPUT | MUX_MODE0)           /* i2c5_scl */
-                       0x188 (PIN_INPUT | MUX_MODE0)           /* i2c5_sda */
+                       OMAP5_IOPAD(0x1c6, PIN_INPUT | MUX_MODE0)               /* i2c5_scl */
+                       OMAP5_IOPAD(0x1c8, PIN_INPUT | MUX_MODE0)               /* i2c5_sda */
                >;
        };
 };
index 4c04389dab3252fdbdc4c6e904bac0964eb58421..ca3c17fde5a0fb465965de579234efe9fb052e44 100644 (file)
                        #address-cells = <2>;
                        #size-cells = <1>;
                        interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       dmas = <&sdma 4>;
+                       dma-names = "rxtx";
                        gpmc,num-cs = <8>;
                        gpmc,num-waitpins = <4>;
                        ti,hwmods = "gpmc";
index 90fdbd77f2740f36c09a3daeaa359625107e8fe8..7d253bb6265ac13e1e478e2f46270f2df1a63b5b 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 /dts-v1/;
-/include/ "lpc32xx.dtsi"
+#include "lpc32xx.dtsi"
 
 / {
        model = "PHYTEC phyCORE-LPC3250 board based on NXP LPC3250";
@@ -22,7 +22,7 @@
 
        memory {
                device_type = "memory";
-               reg = <0 0x4000000>;
+               reg = <0x80000000 0x4000000>;
        };
 
        ahb {
                        use-iram;
                };
 
-               /* Here, choose exactly one from: ohci, usbd */
-               ohci@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-
-/*
-               usbd@31020000 {
-                       transceiver = <&isp1301>;
-                       status = "okay";
-               };
-*/
-
                clcd@31040000 {
                        status = "okay";
                };
                                clock-frequency = <100000>;
                        };
 
-                       i2cusb: i2c@31020300 {
-                               clock-frequency = <100000>;
-
-                               isp1301: usb-transceiver@2c {
-                                       compatible = "nxp,isp1301";
-                                       reg = <0x2c>;
-                               };
-                       };
-
                        ssp0: ssp@20084000 {
                                #address-cells = <1>;
                                #size-cells = <0>;
                };
        };
 };
+
+/* Here, choose exactly one from: ohci, usbd */
+&ohci /* &usbd */ {
+       transceiver = <&isp1301>;
+       status = "okay";
+};
+
+&i2cusb {
+       clock-frequency = <100000>;
+
+       isp1301: usb-transceiver@2c {
+               compatible = "nxp,isp1301";
+               reg = <0x2c>;
+       };
+};
index 03784f1366e593ef2b317568962d1ab17ae03363..21095dad77419afdc59e1ccebbae95fd0ccd51dd 100644 (file)
@@ -54,7 +54,7 @@
 
 
                                /* Buck SMPS */
-                               pm8921_s1: s1 {
+                               s1 {
                                        regulator-always-on;
                                        regulator-min-microvolt = <1225000>;
                                        regulator-max-microvolt = <1225000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_s3: s3 {
+                               s3 {
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1400000>;
                                        qcom,switch-mode-frequency = <4800000>;
                                };
 
-                               pm8921_s4: s4 {
+                               s4 {
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        qcom,switch-mode-frequency = <3200000>;
                                };
 
-                               pm8921_s7: s7 {
+                               s7 {
                                        regulator-min-microvolt = <1300000>;
                                        regulator-max-microvolt = <1300000>;
                                        qcom,switch-mode-frequency = <3200000>;
                                };
 
-                               pm8921_l3: l3 {
+                               l3 {
                                        regulator-min-microvolt = <3050000>;
                                        regulator-max-microvolt = <3300000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l4: l4 {
+                               l4 {
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1800000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l5: l5 {
+                               l5 {
                                        regulator-min-microvolt = <2750000>;
                                        regulator-max-microvolt = <3000000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l23: l23 {
+                               l23 {
                                        regulator-min-microvolt = <1700000>;
                                        regulator-max-microvolt = <1900000>;
                                        bias-pull-down;
index 11ac608b6d50e716e6fc2aabf47839ce1b871d96..aa9303b84d67f1da0c22ab49af5732c347f7f9d9 100644 (file)
@@ -64,7 +64,7 @@
 
 
                                /* Buck SMPS */
-                               pm8921_s1: s1 {
+                               s1 {
                                        regulator-always-on;
                                        regulator-min-microvolt = <1225000>;
                                        regulator-max-microvolt = <1225000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_s3: s3 {
+                               s3 {
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1400000>;
                                        qcom,switch-mode-frequency = <4800000>;
                                };
 
-                               pm8921_s4: s4 {
+                               s4 {
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        qcom,switch-mode-frequency = <3200000>;
                                };
 
-                               pm8921_s7: s7 {
+                               s7 {
                                        regulator-min-microvolt = <1300000>;
                                        regulator-max-microvolt = <1300000>;
                                        qcom,switch-mode-frequency = <3200000>;
                                };
 
-                               pm8921_l3: l3 {
+                               l3 {
                                        regulator-min-microvolt = <3050000>;
                                        regulator-max-microvolt = <3300000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l4: l4 {
+                               l4 {
                                        regulator-min-microvolt = <1000000>;
                                        regulator-max-microvolt = <1800000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l5: l5 {
+                               l5 {
                                        regulator-min-microvolt = <2750000>;
                                        regulator-max-microvolt = <3000000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l6: l6 {
+                               l6 {
                                        regulator-min-microvolt = <2950000>;
                                        regulator-max-microvolt = <2950000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_l23: l23 {
+                               l23 {
                                        regulator-min-microvolt = <1700000>;
                                        regulator-max-microvolt = <1900000>;
                                        bias-pull-down;
                                };
 
-                               pm8921_lvs1: lvs1 {
+                               lvs1 {
                                        bias-pull-down;
                                };
                        };
 
                gsbi@16500000 {
                        status = "ok";
-                       qcom,mode = <GSBI_PROT_I2C_UART>;
+                       qcom,mode = <GSBI_PROT_UART_W_FC>;
 
                        serial@16540000 {
                                status = "ok";
diff --git a/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts b/arch/arm/boot/dts/qcom-apq8064-sony-xperia-yuga.dts
new file mode 100644 (file)
index 0000000..06b3c76
--- /dev/null
@@ -0,0 +1,436 @@
+#include "qcom-apq8064-v2.0.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/qcom-rpm.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
+/ {
+       model = "Sony Xperia Z";
+       compatible = "sony,xperia-yuga", "qcom,apq8064";
+
+       aliases {
+               serial0 = &gsbi5_serial;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               input-name = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys_pin_a>;
+
+               camera-focus {
+                       label = "camera_focus";
+                       gpios = <&pm8921_gpio 3 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA_FOCUS>;
+               };
+
+               camera-snapshot {
+                       label = "camera_snapshot";
+                       gpios = <&pm8921_gpio 4 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA>;
+               };
+
+               volume-down {
+                       label = "volume_down";
+                       gpios = <&pm8921_gpio 29 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+
+               volume-up {
+                       label = "volume_up";
+                       gpios = <&pm8921_gpio 35 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+       };
+
+       soc {
+               pinctrl@800000 {
+                       gsbi5_uart_pin_a: gsbi5-uart-pin-active {
+                               rx {
+                                       pins = "gpio52";
+                                       function = "gsbi5";
+                                       drive-strength = <2>;
+                                       bias-pull-up;
+                               };
+
+                               tx {
+                                       pins = "gpio51";
+                                       function = "gsbi5";
+                                       drive-strength = <4>;
+                                       bias-disable;
+                               };
+                       };
+
+                       sdcc1_pin_a: sdcc1-pin-active {
+                               clk {
+                                       pins = "sdc1_clk";
+                                       drive-strengh = <16>;
+                                       bias-disable;
+                               };
+
+                               cmd {
+                                       pins = "sdc1_cmd";
+                                       drive-strengh = <10>;
+                                       bias-pull-up;
+                               };
+
+                               data {
+                                       pins = "sdc1_data";
+                                       drive-strengh = <10>;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       sdcc3_pin_a: sdcc3-pin-active {
+                               clk {
+                                       pins = "sdc3_clk";
+                                       drive-strengh = <8>;
+                                       bias-disable;
+                               };
+
+                               cmd {
+                                       pins = "sdc3_cmd";
+                                       drive-strengh = <8>;
+                                       bias-pull-up;
+                               };
+
+                               data {
+                                       pins = "sdc3_data";
+                                       drive-strengh = <8>;
+                                       bias-pull-up;
+                               };
+                       };
+
+                       sdcc3_cd_pin_a: sdcc3-cd-pin-active {
+                               pins = "gpio26";
+                               function = "gpio";
+
+                               drive-strength = <2>;
+                               bias-disable;
+                       };
+               };
+
+
+               rpm@108000 {
+                       regulators {
+                               vin_l1_l2_l12_l18-supply = <&pm8921_s4>;
+                               vin_lvs_1_3_6-supply = <&pm8921_s4>;
+                               vin_lvs_4_5_7-supply = <&pm8921_s4>;
+                               vin_ncp-supply = <&pm8921_l6>;
+                               vin_lvs2-supply = <&pm8921_s4>;
+                               vin_l24-supply = <&pm8921_s1>;
+                               vin_l25-supply = <&pm8921_s1>;
+                               vin_l27-supply = <&pm8921_s7>;
+                               vin_l28-supply = <&pm8921_s7>;
+
+                               /* Buck SMPS */
+                               s1 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1225000>;
+                                       regulator-max-microvolt = <1225000>;
+                                       qcom,switch-mode-frequency = <3200000>;
+                                       bias-pull-down;
+                               };
+
+                               s2 {
+                                       regulator-min-microvolt = <1300000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                               };
+
+                               s3 {
+                                       regulator-min-microvolt = <500000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       qcom,switch-mode-frequency = <4800000>;
+                                       bias-pull-down;
+                               };
+
+                               s4 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                                       bias-pull-down;
+                                       qcom,force-mode = <QCOM_RPM_FORCE_MODE_AUTO>;
+                               };
+
+                               s7 {
+                                       regulator-min-microvolt = <1300000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       qcom,switch-mode-frequency = <3200000>;
+                               };
+
+                               s8 {
+                                       regulator-min-microvolt = <2200000>;
+                                       regulator-max-microvolt = <2200000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                               };
+
+                               /* PMOS LDO */
+                               l1 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       bias-pull-down;
+                               };
+
+                               l2 {
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       bias-pull-down;
+                               };
+
+                               l3 {
+                                       regulator-min-microvolt = <3075000>;
+                                       regulator-max-microvolt = <3075000>;
+                                       bias-pull-down;
+                               };
+
+                               l4 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       bias-pull-down;
+                               };
+
+                               l5 {
+                                       regulator-min-microvolt = <2950000>;
+                                       regulator-max-microvolt = <2950000>;
+                                       bias-pull-down;
+                               };
+
+                               l6 {
+                                       regulator-min-microvolt = <2950000>;
+                                       regulator-max-microvolt = <2950000>;
+                                       bias-pull-down;
+                               };
+
+                               l7 {
+                                       regulator-min-microvolt = <1850000>;
+                                       regulator-max-microvolt = <2950000>;
+                                       bias-pull-down;
+                               };
+
+                               l8 {
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       bias-pull-down;
+                               };
+
+                               l9 {
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       bias-pull-down;
+                               };
+
+                               l10 {
+                                       regulator-min-microvolt = <2900000>;
+                                       regulator-max-microvolt = <2900000>;
+                                       bias-pull-down;
+                               };
+
+                               l11 {
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       bias-pull-down;
+                               };
+
+                               l12 {
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       bias-pull-down;
+                               };
+
+                               l14 {
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       bias-pull-down;
+                               };
+
+                               l15 {
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <2950000>;
+                                       bias-pull-down;
+                               };
+
+                               l16 {
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       bias-pull-down;
+                               };
+
+                               l17 {
+                                       regulator-min-microvolt = <2000000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       bias-pull-down;
+                               };
+
+                               l18 {
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       bias-pull-down;
+                               };
+
+                               l21 {
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       bias-pull-down;
+                               };
+
+                               l22 {
+                                       regulator-min-microvolt = <2600000>;
+                                       regulator-max-microvolt = <2600000>;
+                                       bias-pull-down;
+                               };
+
+                               l23 {
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       bias-pull-down;
+                               };
+
+                               l24 {
+                                       regulator-min-microvolt = <750000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       bias-pull-down;
+                               };
+
+                               l25 {
+                                       regulator-always-on;
+                                       regulator-min-microvolt = <1250000>;
+                                       regulator-max-microvolt = <1250000>;
+                                       bias-pull-down;
+                               };
+
+                               l27 {
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                               };
+
+                               l28 {
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                                       bias-pull-down;
+                               };
+
+                               l29 {
+                                       regulator-min-microvolt = <2000000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       bias-pull-down;
+                               };
+
+                               /* Low Voltage Switch */
+                               lvs1 {
+                                       bias-pull-down;
+                               };
+
+                               lvs2 {
+                                       bias-pull-down;
+                               };
+
+                               lvs3 {
+                                       bias-pull-down;
+                               };
+
+                               lvs4 {
+                                       bias-pull-down;
+                               };
+
+                               lvs5 {
+                                       bias-pull-down;
+                               };
+
+                               lvs6 {
+                                       bias-pull-down;
+                               };
+
+                               lvs7 {
+                                       bias-pull-down;
+                               };
+
+                               usb-switch {};
+
+                               hdmi-switch {};
+
+                               ncp {
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       qcom,switch-mode-frequency = <1600000>;
+                               };
+                       };
+               };
+
+               qcom,ssbi@500000 {
+                       pmic@0 {
+                               gpio@150 {
+                                       gpio_keys_pin_a: gpio-keys-pin-active {
+                                               pins = "gpio3", "gpio4", "gpio29", "gpio35";
+                                               function = "normal";
+
+                                               bias-pull-up;
+                                               drive-push-pull;
+                                               input-enable;
+                                               power-source = <2>;
+                                               qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+                                               qcom,pull-up-strength = <0>;
+                                       };
+                               };
+                       };
+               };
+
+               phy@12500000 {
+                       status          = "okay";
+                       vddcx-supply    = <&pm8921_s3>;
+                       v3p3-supply     = <&pm8921_l3>;
+                       v1p8-supply     = <&pm8921_l4>;
+               };
+
+               gadget@12500000 {
+                       status = "okay";
+               };
+
+               gsbi@1a200000 {
+                       status = "ok";
+                       qcom,mode = <GSBI_PROT_I2C_UART>;
+
+                       serial@1a240000 {
+                               status = "ok";
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&gsbi5_uart_pin_a>;
+                       };
+               };
+
+               amba {
+                       sdcc1: sdcc@12400000 {
+                               status = "okay";
+
+                               vmmc-supply = <&pm8921_l5>;
+                               vqmmc-supply = <&pm8921_s4>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&sdcc1_pin_a>;
+                       };
+
+                       sdcc3: sdcc@12180000 {
+                               status = "okay";
+
+                               vmmc-supply = <&pm8921_l6>;
+                               cd-gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
+
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&sdcc3_pin_a>, <&sdcc3_cd_pin_a>;
+                       };
+               };
+       };
+};
index a4c1762b53ea3712a46e5f8a04cff5783d93b14d..edfc6ee56ea16c819844af403189739935bb53e7 100644 (file)
        compatible = "qcom,apq8064";
        interrupt-parent = <&intc>;
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               smem_region: smem@80000000 {
+                       reg = <0x80000000 0x200000>;
+                       no-map;
+               };
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                interrupts = <1 10 0x304>;
        };
 
+       clocks {
+               cxo_board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;
+               };
+
+               pxo_board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <27000000>;
+               };
+
+               sleep_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+               };
+       };
+
+       sfpb_mutex: hwmutex {
+               compatible = "qcom,sfpb-mutex";
+               syscon = <&sfpb_wrapper_mutex 0x604 0x4>;
+               #hwlock-cells = <1>;
+       };
+
+       smem {
+               compatible = "qcom,smem";
+               memory-region = <&smem_region>;
+
+               hwlocks = <&sfpb_mutex 3>;
+       };
+
        soc: soc {
                #address-cells = <1>;
                #size-cells = <1>;
                        };
                };
 
+               sfpb_wrapper_mutex: syscon@1200000 {
+                       compatible = "syscon";
+                       reg = <0x01200000 0x8000>;
+               };
+
                intc: interrupt-controller@2000000 {
                        compatible = "qcom,msm-qgic2";
                        interrupt-controller;
                        };
                };
 
+               gsbi5: gsbi@1a200000 {
+                       status = "disabled";
+                       compatible = "qcom,gsbi-v1.0.0";
+                       cell-index = <5>;
+                       reg = <0x1a200000 0x03>;
+                       clocks = <&gcc GSBI5_H_CLK>;
+                       clock-names = "iface";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       gsbi5_serial: serial@1a240000 {
+                               compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
+                               reg = <0x1a240000 0x100>,
+                                     <0x1a200000 0x03>;
+                               interrupts = <0 154 0x0>;
+                               clocks = <&gcc GSBI5_UART_CLK>, <&gcc GSBI5_H_CLK>;
+                               clock-names = "core", "iface";
+                               status = "disabled";
+                       };
+               };
+
                gsbi6: gsbi@16500000 {
                        status = "disabled";
                        compatible = "qcom,gsbi-v1.0.0";
                        };
                };
 
+               rng@1a500000 {
+                       compatible = "qcom,prng";
+                       reg = <0x1a500000 0x200>;
+                       clocks = <&gcc PRNG_CLK>;
+                       clock-names = "core";
+               };
+
                qcom,ssbi@500000 {
                        compatible = "qcom,ssbi";
                        reg = <0x00500000 0x1000>;
 
                                pm8921_gpio: gpio@150 {
 
-                                       compatible = "qcom,pm8921-gpio";
+                                       compatible = "qcom,pm8921-gpio",
+                                                    "qcom,ssbi-gpio";
                                        reg = <0x150>;
                                        interrupts = <192 1>, <193 1>, <194 1>,
                                                     <195 1>, <196 1>, <197 1>,
                                };
 
                                pm8921_mpps: mpps@50 {
-                                       compatible = "qcom,pm8921-mpp";
+                                       compatible = "qcom,pm8921-mpp",
+                                                    "qcom,ssbi-mpp";
                                        reg = <0x50>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                        regulators {
                                compatible = "qcom,rpm-pm8921-regulators";
 
+                               pm8921_s1: s1 {};
+                               pm8921_s2: s2 {};
+                               pm8921_s3: s3 {};
+                               pm8921_s4: s4 {};
+                               pm8921_s7: s7 {};
+                               pm8921_s8: s8 {};
+
+                               pm8921_l1: l1 {};
+                               pm8921_l2: l2 {};
+                               pm8921_l3: l3 {};
+                               pm8921_l4: l4 {};
+                               pm8921_l5: l5 {};
+                               pm8921_l6: l6 {};
+                               pm8921_l7: l7 {};
+                               pm8921_l8: l8 {};
+                               pm8921_l9: l9 {};
+                               pm8921_l10: l10 {};
+                               pm8921_l11: l11 {};
+                               pm8921_l12: l12 {};
+                               pm8921_l14: l14 {};
+                               pm8921_l15: l15 {};
+                               pm8921_l16: l16 {};
+                               pm8921_l17: l17 {};
+                               pm8921_l18: l18 {};
+                               pm8921_l21: l21 {};
+                               pm8921_l22: l22 {};
+                               pm8921_l23: l23 {};
+                               pm8921_l24: l24 {};
+                               pm8921_l25: l25 {};
+                               pm8921_l26: l26 {};
+                               pm8921_l27: l27 {};
+                               pm8921_l28: l28 {};
+                               pm8921_l29: l29 {};
+
+                               pm8921_lvs1: lvs1 {};
+                               pm8921_lvs2: lvs2 {};
+                               pm8921_lvs3: lvs3 {};
+                               pm8921_lvs4: lvs4 {};
+                               pm8921_lvs5: lvs5 {};
+                               pm8921_lvs6: lvs6 {};
+                               pm8921_lvs7: lvs7 {};
+
+                               pm8921_usb_switch: usb-switch {};
+
                                pm8921_hdmi_switch: hdmi-switch {
                                        bias-pull-down;
                                };
+
+                               pm8921_ncp: ncp {};
                        };
                };
 
index 835bdc71c5ba4e7db71642305e541f5e203d4758..c0e2053150424825c5419112109ec6785db30b2d 100644 (file)
@@ -8,6 +8,8 @@
 
        aliases {
                serial0 = &blsp1_uart2;
+               usid0 = &pm8941_0;
+               usid4 = &pm8841_0;
        };
 
        chosen {
index c9c2b769554f84d91b0a535e98fb1a070cf6b232..2052b84a77c6434e22367a948529cd2ee107e8f3 100644 (file)
@@ -3,10 +3,11 @@
 
 / {
        model = "Qualcomm APQ8084/IFC6540";
-       compatible = "qcom,apq8084-ifc6540", "qcom,apq8084";
+       compatible = "qcom,apq8084-sbc", "qcom,apq8084";
 
        aliases {
                serial0 = &blsp2_uart2;
+               usid0 = &pma8084_0;
        };
 
        chosen {
index 3016c7048d446cb5ee1e0810b37986663eb20398..d174d15bcf70d8a7bec9e3fcde771e7a5d4adca8 100644 (file)
@@ -7,6 +7,7 @@
 
        aliases {
                serial0 = &blsp2_uart2;
+               usid0 = &pma8084_0;
        };
 
        chosen {
index fcffecae3e67a2bd58ab80c1494a8edefd0bbf62..08214cbae16da84c0f191661528d40bc132e09b3 100644 (file)
        compatible = "qcom,apq8084";
        interrupt-parent = <&intc>;
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               smem_mem: smem_region@fa00000 {
+                       reg = <0xfa00000 0x200000>;
+                       no-map;
+               };
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                clock-frequency = <19200000>;
        };
 
+       smem {
+               compatible = "qcom,smem";
+
+               qcom,rpm-msg-ram = <&rpm_msg_ram>;
+               memory-region = <&smem_mem>;
+
+               hwlocks = <&tcsr_mutex 3>;
+       };
+
        soc: soc {
                #address-cells = <1>;
                #size-cells = <1>;
                              <0xf9002000 0x1000>;
                };
 
+               apcs: syscon@f9011000 {
+                       compatible = "syscon";
+                       reg = <0xf9011000 0x1000>;
+               };
+
                timer@f9020000 {
                        #address-cells = <1>;
                        #size-cells = <1>;
                        reg = <0xfc400000 0x4000>;
                };
 
+               tcsr_mutex_regs: syscon@fd484000 {
+                       compatible = "syscon";
+                       reg = <0xfd484000 0x2000>;
+               };
+
+               tcsr_mutex: hwlock {
+                       compatible = "qcom,tcsr-mutex";
+                       syscon = <&tcsr_mutex_regs 0 0x80>;
+                       #hwlock-cells = <1>;
+               };
+
+               rpm_msg_ram: memory@fc428000 {
+                       compatible = "qcom,rpm-msg-ram";
+                       reg = <0xfc428000 0x4000>;
+               };
+
                tlmm: pinctrl@fd510000 {
                        compatible = "qcom,apq8084-pinctrl";
                        reg = <0xfd510000 0x4000>;
                        #interrupt-cells = <4>;
                };
        };
+
+       smd {
+               compatible = "qcom,smd";
+
+               rpm {
+                       interrupts = <0 168 1>;
+                       qcom,ipc = <&apcs 8 0>;
+                       qcom,smd-edge = <15>;
+
+                       rpm_requests {
+                               compatible = "qcom,rpm-apq8084";
+                               qcom,smd-channels = "rpm_requests";
+
+                               pma8084-regulators {
+                                       compatible = "qcom,rpm-pma8084-regulators";
+
+                                       pma8084_s1: s1 {};
+                                       pma8084_s2: s2 {};
+                                       pma8084_s3: s3 {};
+                                       pma8084_s4: s4 {};
+                                       pma8084_s5: s5 {};
+                                       pma8084_s6: s6 {};
+                                       pma8084_s7: s7 {};
+                                       pma8084_s8: s8 {};
+                                       pma8084_s9: s9 {};
+                                       pma8084_s10: s10 {};
+                                       pma8084_s11: s11 {};
+                                       pma8084_s12: s12 {};
+
+                                       pma8084_l1: l1 {};
+                                       pma8084_l2: l2 {};
+                                       pma8084_l3: l3 {};
+                                       pma8084_l4: l4 {};
+                                       pma8084_l5: l5 {};
+                                       pma8084_l6: l6 {};
+                                       pma8084_l7: l7 {};
+                                       pma8084_l8: l8 {};
+                                       pma8084_l9: l9 {};
+                                       pma8084_l10: l10 {};
+                                       pma8084_l11: l11 {};
+                                       pma8084_l12: l12 {};
+                                       pma8084_l13: l13 {};
+                                       pma8084_l14: l14 {};
+                                       pma8084_l15: l15 {};
+                                       pma8084_l16: l16 {};
+                                       pma8084_l17: l17 {};
+                                       pma8084_l18: l18 {};
+                                       pma8084_l19: l19 {};
+                                       pma8084_l20: l20 {};
+                                       pma8084_l21: l21 {};
+                                       pma8084_l22: l22 {};
+                                       pma8084_l23: l23 {};
+                                       pma8084_l24: l24 {};
+                                       pma8084_l25: l25 {};
+                                       pma8084_l26: l26 {};
+                                       pma8084_l27: l27 {};
+
+                                       pma8084_lvs1: lvs1 {};
+                                       pma8084_lvs2: lvs2 {};
+                                       pma8084_lvs3: lvs3 {};
+                                       pma8084_lvs4: lvs4 {};
+
+                                       pma8084_5vs1: 5vs1 {};
+                               };
+                       };
+               };
+       };
 };
index 134cd91d68ece1034077c0e36f154756f6143cb6..51a40d84145c51b4a206598e3344181be1442a64 100644 (file)
                qcom,no-pc-write;
        };
 
+       clocks {
+               cxo_board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <19200000>;
+                       clock-output-names = "cxo_board";
+               };
+
+               pxo_board {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <27000000>;
+                       clock-output-names = "pxo_board";
+               };
+
+               sleep_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+                       clock-output-names = "sleep_clk";
+               };
+       };
+
        soc: soc {
                #address-cells = <1>;
                #size-cells = <1>;
index 016f9ad9392a9cbad2702834aff6648add614b7b..a0398b69f4f226d947516a286ec14aa3297443fb 100644 (file)
@@ -1,6 +1,9 @@
 #include "qcom-msm8974.dtsi"
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
        model = "Sony Xperia Z1";
                stdout-path = "serial0:115200n8";
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               input-name = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&gpio_keys_pin_a>;
+
+               volume-down {
+                       label = "volume_down";
+                       gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+
+               camera-snapshot {
+                       label = "camera_snapshot";
+                       gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA>;
+               };
+
+               camera-focus {
+                       label = "camera_focus";
+                       gpios = <&pm8941_gpios 4 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_CAMERA_FOCUS>;
+               };
+
+               volume-up {
+                       label = "volume_up";
+                       gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <1>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+       };
+
        memory@0 {
                reg = <0 0x40000000>, <0x40000000 0x40000000>;
                device_type = "memory";
        };
+
+       smd {
+               rpm {
+                       rpm_requests {
+                               pm8841-regulators {
+                                       s1 {
+                                               regulator-min-microvolt = <675000>;
+                                               regulator-max-microvolt = <1050000>;
+                                       };
+
+                                       s2 {
+                                               regulator-min-microvolt = <500000>;
+                                               regulator-max-microvolt = <1050000>;
+                                       };
+
+                                       s3 {
+                                               regulator-min-microvolt = <500000>;
+                                               regulator-max-microvolt = <1050000>;
+                                       };
+
+                                       s4 {
+                                               regulator-min-microvolt = <500000>;
+                                               regulator-max-microvolt = <1050000>;
+                                       };
+                               };
+
+                               pm8941-regulators {
+                                       vdd_l1_l3-supply = <&pm8941_s1>;
+                                       vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
+                                       vdd_l4_l11-supply = <&pm8941_s1>;
+                                       vdd_l5_l7-supply = <&pm8941_s2>;
+                                       vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
+                                       vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
+                                       vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
+                                       vdd_l21-supply = <&vreg_boost>;
+                                       vin_5vs-supply = <&pm8941_5v>;
+
+                                       s1 {
+                                               regulator-min-microvolt = <1300000>;
+                                               regulator-max-microvolt = <1300000>;
+                                               regulator-always-on;
+                                               regulator-boot-on;
+                                       };
+
+                                       s2 {
+                                               regulator-min-microvolt = <2150000>;
+                                               regulator-max-microvolt = <2150000>;
+                                               regulator-boot-on;
+                                       };
+
+                                       s3 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+                                               regulator-always-on;
+                                               regulator-boot-on;
+                                       };
+
+                                       s4 {
+                                               regulator-min-microvolt = <5000000>;
+                                               regulator-max-microvolt = <5000000>;
+                                       };
+
+                                       l1 {
+                                               regulator-min-microvolt = <1225000>;
+                                               regulator-max-microvolt = <1225000>;
+
+                                               regulator-always-on;
+                                               regulator-boot-on;
+                                       };
+
+                                       l2 {
+                                               regulator-min-microvolt = <1200000>;
+                                               regulator-max-microvolt = <1200000>;
+                                       };
+
+                                       l3 {
+                                               regulator-min-microvolt = <1200000>;
+                                               regulator-max-microvolt = <1200000>;
+                                       };
+
+                                       l4 {
+                                               regulator-min-microvolt = <1225000>;
+                                               regulator-max-microvolt = <1225000>;
+                                       };
+
+                                       l5 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+                                       };
+
+                                       l6 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+
+                                               regulator-boot-on;
+                                       };
+
+                                       l7 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+
+                                               regulator-boot-on;
+                                       };
+
+                                       l8 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+                                       };
+
+                                       l9 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <2950000>;
+                                       };
+
+                                       l11 {
+                                               regulator-min-microvolt = <1300000>;
+                                               regulator-max-microvolt = <1350000>;
+                                       };
+
+                                       l12 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+
+                                               regulator-always-on;
+                                               regulator-boot-on;
+                                       };
+
+                                       l13 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <2950000>;
+
+                                               regulator-boot-on;
+                                       };
+
+                                       l14 {
+                                               regulator-min-microvolt = <1800000>;
+                                               regulator-max-microvolt = <1800000>;
+                                       };
+
+                                       l15 {
+                                               regulator-min-microvolt = <2050000>;
+                                               regulator-max-microvolt = <2050000>;
+                                       };
+
+                                       l16 {
+                                               regulator-min-microvolt = <2700000>;
+                                               regulator-max-microvolt = <2700000>;
+                                       };
+
+                                       l17 {
+                                               regulator-min-microvolt = <2700000>;
+                                               regulator-max-microvolt = <2700000>;
+                                       };
+
+                                       l18 {
+                                               regulator-min-microvolt = <2850000>;
+                                               regulator-max-microvolt = <2850000>;
+                                       };
+
+                                       l19 {
+                                               regulator-min-microvolt = <3300000>;
+                                               regulator-max-microvolt = <3300000>;
+                                       };
+
+                                       l20 {
+                                               regulator-min-microvolt = <2950000>;
+                                               regulator-max-microvolt = <2950000>;
+
+                                               regulator-allow-set-load;
+                                               regulator-boot-on;
+                                               regulator-system-load = <200000>;
+                                       };
+
+                                       l21 {
+                                               regulator-min-microvolt = <2950000>;
+                                               regulator-max-microvolt = <2950000>;
+
+                                               regulator-boot-on;
+                                       };
+
+                                       l22 {
+                                               regulator-min-microvolt = <3000000>;
+                                               regulator-max-microvolt = <3000000>;
+                                       };
+
+                                       l23 {
+                                               regulator-min-microvolt = <2800000>;
+                                               regulator-max-microvolt = <2800000>;
+                                       };
+
+                                       l24 {
+                                               regulator-min-microvolt = <3075000>;
+                                               regulator-max-microvolt = <3075000>;
+
+                                               regulator-boot-on;
+                                       };
+                               };
+                       };
+               };
+       };
+
+       vreg_boost: vreg-boost {
+               compatible = "regulator-fixed";
+
+               regulator-name = "vreg-boost";
+               regulator-min-microvolt = <3150000>;
+               regulator-max-microvolt = <3150000>;
+
+               regulator-always-on;
+               regulator-boot-on;
+
+               gpio = <&pm8941_gpios 21 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&boost_bypass_n_pin>;
+     };
 };
 
 &soc {
+       sdhci@f9824900 {
+               status = "ok";
+
+               vmmc-supply = <&pm8941_l20>;
+               vqmmc-supply = <&pm8941_s3>;
+
+               bus-width = <8>;
+               non-removable;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdhc1_pin_a>;
+       };
+
+       sdhci@f98a4900 {
+               status = "ok";
+
+               bus-width = <4>;
+
+               vmmc-supply = <&pm8941_l21>;
+               vqmmc-supply = <&pm8941_l13>;
+
+               cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
+       };
+
        serial@f991e000 {
                status = "ok";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&blsp1_uart2_pin_a>;
+       };
+
+       pinctrl@fd510000 {
+               blsp1_uart2_pin_a: blsp1-uart2-pin-active {
+                       rx {
+                               pins = "gpio5";
+                               function = "blsp_uart2";
+
+                               drive-strength = <2>;
+                               bias-pull-up;
+                       };
+
+                       tx {
+                               pins = "gpio4";
+                               function = "blsp_uart2";
+
+                               drive-strength = <4>;
+                               bias-disable;
+                       };
+               };
+
+               sdhc1_pin_a: sdhc1-pin-active {
+                       clk {
+                               pins = "sdc1_clk";
+                               drive-strength = <16>;
+                               bias-disable;
+                       };
+
+                       cmd-data {
+                               pins = "sdc1_cmd", "sdc1_data";
+                               drive-strength = <10>;
+                               bias-pull-up;
+                       };
+               };
+
+               sdhc2_cd_pin_a: sdhc2-cd-pin-active {
+                       pins = "gpio62";
+                       function = "gpio";
+
+                       drive-strength = <2>;
+                       bias-disable;
+                };
+
+               sdhc2_pin_a: sdhc2-pin-active {
+                       clk {
+                               pins = "sdc2_clk";
+                               drive-strength = <10>;
+                               bias-disable;
+                       };
+
+                       cmd-data {
+                               pins = "sdc2_cmd", "sdc2_data";
+                               drive-strength = <6>;
+                               bias-pull-up;
+                       };
+               };
+
        };
 };
 
 &spmi_bus {
        pm8941@0 {
+               charger@1000 {
+                       qcom,fast-charge-safe-current = <1500000>;
+                       qcom,fast-charge-current-limit = <1500000>;
+                       qcom,dc-current-limit = <1800000>;
+                       qcom,fast-charge-safe-voltage = <4400000>;
+                       qcom,fast-charge-high-threshold-voltage = <4350000>;
+                       qcom,fast-charge-low-threshold-voltage = <3400000>;
+                       qcom,auto-recharge-threshold-voltage = <4200000>;
+                       qcom,minimum-input-voltage = <4300000>;
+               };
+
+               gpios@c000 {
+                       boost_bypass_n_pin: boost-bypass {
+                               pins = "gpio21";
+                               function = "normal";
+                       };
+
+                       gpio_keys_pin_a: gpio-keys-active {
+                               pins = "gpio2", "gpio3", "gpio4", "gpio5";
+                               function = "normal";
+
+                               bias-pull-up;
+                               power-source = <PM8941_GPIO_S3>;
+                       };
+               };
+
                coincell@2800 {
                        status = "ok";
                        qcom,rset-ohms = <2100>;
                        qcom,vset-millivolts = <3000>;
                };
        };
+
+       pm8941@1 {
+               wled@d800 {
+                       status = "ok";
+
+                       qcom,cs-out;
+                       qcom,current-limit = <20>;
+                       qcom,current-boost-limit = <805>;
+                       qcom,switching-freq = <1600>;
+                       qcom,ovp = <29>;
+                       qcom,num-strings = <2>;
+               };
+       };
 };
index 753bdfddd46ea5d503c8409cc5c035b239efe47c..dfdafdcb8aae99711507bc4abfbbd7374ba39205 100644 (file)
                        interrupts = <0 208 0>;
                };
 
+               blsp_i2c8: i2c@f9964000 {
+                       status = "disabled";
+                       compatible = "qcom,i2c-qup-v2.1.1";
+                       reg = <0xf9964000 0x1000>;
+                       interrupts = <0 102 IRQ_TYPE_NONE>;
+                       clocks = <&gcc GCC_BLSP2_QUP2_I2C_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>;
+                       clock-names = "core", "iface";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                blsp_i2c11: i2c@f9967000 {
                        status = "disabled";
                        compatible = "qcom,i2c-qup-v2.1.1";
index 8f1a0b16201739ead985a49f09a97fcbd3b13ed9..9f357f68713c44fedd26a899303480f5cab7f09a 100644 (file)
@@ -3,14 +3,14 @@
 
 &spmi_bus {
 
-       usid4: pm8841@4 {
-               compatible = "qcom,spmi-pmic";
+       pm8841_0: pm8841@4 {
+               compatible = "qcom,pm8841", "qcom,spmi-pmic";
                reg = <0x4 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
 
                pm8841_mpps: mpps@a000 {
-                       compatible = "qcom,pm8841-mpp";
+                       compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
                        reg = <0xa000 0x400>;
                        gpio-controller;
                        #gpio-cells = <2>;
@@ -27,8 +27,8 @@
                };
        };
 
-       usid5: pm8841@5 {
-               compatible = "qcom,spmi-pmic";
+       pm8841_1: pm8841@5 {
+               compatible = "qcom,pm8841", "qcom,spmi-pmic";
                reg = <0x5 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
index b0d443999fcccb84d3301e7787c292830a596e86..ca53a5947437525d1e706259909616c16a3d21de 100644 (file)
@@ -4,8 +4,8 @@
 
 &spmi_bus {
 
-       usid0: pm8941@0 {
-               compatible ="qcom,spmi-pmic";
+       pm8941_0: pm8941@0 {
+               compatible = "qcom,pm8941", "qcom,spmi-pmic";
                reg = <0x0 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
@@ -48,7 +48,7 @@
                };
 
                pm8941_gpios: gpios@c000 {
-                       compatible = "qcom,pm8941-gpio";
+                       compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
                        reg = <0xc000 0x2400>;
                        gpio-controller;
                        #gpio-cells = <2>;
@@ -91,7 +91,7 @@
                };
 
                pm8941_mpps: mpps@a000 {
-                       compatible = "qcom,pm8941-mpp";
+                       compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
                        reg = <0xa000 0x800>;
                        gpio-controller;
                        #gpio-cells = <2>;
                };
        };
 
-       usid1: pm8941@1 {
-               compatible = "qcom,spmi-pmic";
+       pm8941_1: pm8941@1 {
+               compatible = "qcom,pm8941", "qcom,spmi-pmic";
                reg = <0x1 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               wled@d800 {
+               pm8941_wled: wled@d800 {
                        compatible = "qcom,pm8941-wled";
                        reg = <0xd800 0x100>;
                        label = "backlight";
 
-                       qcom,cs-out;
-                       qcom,current-limit = <20>;
-                       qcom,current-boost-limit = <805>;
-                       qcom,switching-freq = <1600>;
-                       qcom,ovp = <29>;
-                       qcom,num-strings = <2>;
+                       status = "disabled";
                };
        };
 };
index 5e240ccc08b705d46937abc93747905cb733b46c..4e9bd3f88473e4220f67ddf54eec71e47eca2d12 100644 (file)
@@ -4,8 +4,8 @@
 
 &spmi_bus {
 
-       usid0: pma8084@0 {
-               compatible = "qcom,spmi-pmic";
+       pma8084_0: pma8084@0 {
+               compatible = "qcom,pma8084", "qcom,spmi-pmic";
                reg = <0x0 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
@@ -19,7 +19,7 @@
                };
 
                pma8084_gpios: gpios@c000 {
-                       compatible = "qcom,pma8084-gpio";
+                       compatible = "qcom,pma8084-gpio", "qcom,spmi-gpio";
                        reg = <0xc000 0x1600>;
                        gpio-controller;
                        #gpio-cells = <2>;
@@ -48,7 +48,7 @@
                };
 
                pma8084_mpps: mpps@a000 {
-                       compatible = "qcom,pma8084-mpp";
+                       compatible = "qcom,pma8084-mpp", "qcom,spmi-mpp";
                        reg = <0xa000 0x800>;
                        gpio-controller;
                        #gpio-cells = <2>;
                };
        };
 
-       usid1: pma8084@1 {
-               compatible = "qcom,spmi-pmic";
+       pma8084_1: pma8084@1 {
+               compatible = "qcom,pma8084", "qcom,spmi-pmic";
                reg = <0x1 SPMI_USID>;
                #address-cells = <1>;
                #size-cells = <0>;
index a4c425923c05e8cdeff90843a2407eb8884a2bfb..590257095700409f34f3ee25ff341cd1bbfd9b63 100644 (file)
@@ -23,7 +23,7 @@
 
        chosen {
                bootargs = "ignore_loglevel root=/dev/nfs ip=dhcp rw";
-               stdout-path = &scifa0;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                        gpios = <&pfc 324 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_0>;
                        label = "S16";
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                menu-key {
index 105d9c95de4af6114c091027a50e393aac147b09..78a21f2828dff6d1cbafa9139b12791d4840936d 100644 (file)
@@ -85,7 +85,7 @@
                        gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_POWER>;
                        label = "SW3";
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
 
                back-key {
index e14cb1438216e8df195dc6e943a349feb644b24a..7676646f7085f03813a9f1ff14de4ed0ba1f95bd 100644 (file)
@@ -26,6 +26,7 @@
                        reg = <0x0>;
                        clock-frequency = <800000000>;
                        power-domains = <&pd_a3sm>;
+                       next-level-cache = <&L2>;
                };
        };
 
                      <0xc2000000 0x1000>;
        };
 
+       L2: cache-controller {
+               compatible = "arm,pl310-cache";
+               reg = <0xf0100000 0x1000>;
+               interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
+               power-domains = <&pd_a3sm>;
+               arm,data-latency = <3 3 3>;
+               arm,tag-latency = <2 2 2>;
+               arm,shared-override;
+               cache-unified;
+               cache-level = <2>;
+       };
+
        dbsc3: memory-controller@fe400000 {
                compatible = "renesas,dbsc3-r8a7740";
                reg = <0xfe400000 0x400>;
index 90543b12d7e26bcbd9eca0e0c113ffaa718a3873..b1aa025992293a58a4c51b9ebcc29705c4b1f849 100644 (file)
@@ -28,8 +28,8 @@
        };
 
        chosen {
-               bootargs = "console=ttySC0,115200 ignore_loglevel ip=dhcp root=/dev/nfs rw";
-               stdout-path = &scif0;
+               bootargs = "ignore_loglevel ip=dhcp root=/dev/nfs rw";
+               stdout-path = "serial0:115200n8";
        };
 
        memory {
        };
 
        sdhi0_pins: sd0 {
-               renesas,groups = "sdhi0_data4", "sdhi0_ctrl",
-                                 "sdhi0_cd";
+               renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
                renesas,function = "sdhi0";
        };
+       sdhi0_pup_pins: sd0_pup {
+               renesas,groups = "sdhi0_cd", "sdhi0_wp";
+               renesas,function = "sdhi0";
+               bias-pull-up;
+       };
 
        hspi0_pins: hspi0 {
                renesas,groups = "hspi0_a";
        };
 };
 
+&rcar_sound {
+       /* Single DAI */
+       #sound-dai-cells = <0>;
+};
+
 &sdhi0 {
-       pinctrl-0 = <&sdhi0_pins>;
+       pinctrl-0 = <&sdhi0_pins>, <&sdhi0_pup_pins>;
        pinctrl-names = "default";
 
        vmmc-supply = <&fixedregulator3v3>;
        status = "okay";
 
        flash: flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "spansion,s25fl008k", "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <104000000>;
                m25p,fast-read;
 
-               partition@0 {
-                       label = "data(spi)";
-                       reg = <0x00000000 0x00100000>;
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "data(spi)";
+                               reg = <0x00000000 0x00100000>;
+                       };
                };
        };
 };
index 4f8e0781174642a3f94e970affd42044d7d98d11..b140627dd88b196479eb9958ec66a1903f8eba07 100644 (file)
        };
 
        rcar_sound: sound@ffd90000 {
-               #sound-dai-cells = <1>;
+               /*
+                * #sound-dai-cells is required
+                *
+                * Single DAI : #sound-dai-cells = <0>;         <&rcar_sound>;
+                * Multi  DAI : #sound-dai-cells = <1>;         <&rcar_sound N>;
+                */
                compatible = "renesas,rcar_sound-r8a7778", "renesas,rcar_sound-gen1";
                reg =   <0xffd90000 0x1000>,    /* SRU */
                        <0xffd91000 0x240>,     /* SSI */
index c553abd711eeb3813f786ad7a95bafc76502ee1c..44ba69b974a21de2c34f64e35d181c31b6ffe000 100644 (file)
        compatible = "renesas,lager", "renesas,r8a7790";
 
        aliases {
-               serial0 = &scifa0;
+               serial0 = &scif0;
                serial1 = &scifa1;
        };
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scifa0;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                button@1 {
                        linux,code = <KEY_1>;
                        label = "SW2-1";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                        gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
                };
                button@2 {
                        linux,code = <KEY_2>;
                        label = "SW2-2";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                        gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
                };
                button@3 {
                        linux,code = <KEY_3>;
                        label = "SW2-3";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                        gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
                };
                button@4 {
                        linux,code = <KEY_4>;
                        label = "SW2-4";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                        gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
                };
                renesas,function = "du";
        };
 
-       scifa0_pins: serial0 {
-               renesas,groups = "scifa0_data";
-               renesas,function = "scifa0";
+       scif0_pins: serial0 {
+               renesas,groups = "scif0_data";
+               renesas,function = "scif0";
        };
 
        ether_pins: ether {
        status = "okay";
 
        flash: flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "spansion,s25fl512s", "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <30000000>;
                spi-cpol;
                m25p,fast-read;
 
-               partition@0 {
-                       label = "loader";
-                       reg = <0x00000000 0x00040000>;
-                       read-only;
-               };
-               partition@40000 {
-                       label = "user";
-                       reg = <0x00040000 0x00400000>;
-                       read-only;
-               };
-               partition@440000 {
-                       label = "flash";
-                       reg = <0x00440000 0x03bc0000>;
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "loader";
+                               reg = <0x00000000 0x00040000>;
+                               read-only;
+                       };
+                       partition@40000 {
+                               label = "user";
+                               reg = <0x00040000 0x00400000>;
+                               read-only;
+                       };
+                       partition@440000 {
+                               label = "flash";
+                               reg = <0x00440000 0x03bc0000>;
+                       };
                };
        };
 };
 
-&scifa0 {
-       pinctrl-0 = <&scifa0_pins>;
+&scif0 {
+       pinctrl-0 = <&scif0_pins>;
        pinctrl-names = "default";
 
        status = "okay";
index e07ae5d45e19ffd5e05cb6ce1e6cdcb7c238b649..7dfd393bfc7e7a5b52826139c9d4ad16a4de3841 100644 (file)
                interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
-               gpio-ranges = <&pfc 0 32 32>;
+               gpio-ranges = <&pfc 0 32 30>;
                #interrupt-cells = <2>;
                interrupt-controller;
                clocks = <&mstp9_clks R8A7790_CLK_GPIO1>;
                interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
-               gpio-ranges = <&pfc 0 64 32>;
+               gpio-ranges = <&pfc 0 64 30>;
                #interrupt-cells = <2>;
                interrupt-controller;
                clocks = <&mstp9_clks R8A7790_CLK_GPIO2>;
        };
 
        dmac0: dma-controller@e6700000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7790", "renesas,rcar-dmac";
                reg = <0 0xe6700000 0 0x20000>;
                interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
                              0 200 IRQ_TYPE_LEVEL_HIGH
        };
 
        dmac1: dma-controller@e6720000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7790", "renesas,rcar-dmac";
                reg = <0 0xe6720000 0 0x20000>;
                interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
                              0 216 IRQ_TYPE_LEVEL_HIGH
        };
 
        audma0: dma-controller@ec700000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7790", "renesas,rcar-dmac";
                reg = <0 0xec700000 0 0x10000>;
                interrupts =    <0 346 IRQ_TYPE_LEVEL_HIGH
                                 0 320 IRQ_TYPE_LEVEL_HIGH
        };
 
        audma1: dma-controller@ec720000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7790", "renesas,rcar-dmac";
                reg = <0 0xec720000 0 0x10000>;
                interrupts =    <0 347 IRQ_TYPE_LEVEL_HIGH
                                 0 333 IRQ_TYPE_LEVEL_HIGH
        };
 
        usb_dmac0: dma-controller@e65a0000 {
-               compatible = "renesas,usb-dmac";
+               compatible = "renesas,r8a7790-usb-dmac", "renesas,usb-dmac";
                reg = <0 0xe65a0000 0 0x100>;
                interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH
                              0 109 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        usb_dmac1: dma-controller@e65b0000 {
-               compatible = "renesas,usb-dmac";
+               compatible = "renesas,r8a7790-usb-dmac", "renesas,usb-dmac";
                reg = <0 0xe65b0000 0 0x100>;
                interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH
                              0 110 IRQ_TYPE_LEVEL_HIGH>;
                interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7790_CLK_I2C0>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <110>;
                status = "disabled";
        };
 
                interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7790_CLK_I2C1>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7790_CLK_I2C2>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7790_CLK_I2C3>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <110>;
                status = "disabled";
        };
 
        };
 
        ipmmu_sy0: mmu@e6280000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xe6280000 0 0x1000>;
                interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
                             <0 224 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_sy1: mmu@e6290000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xe6290000 0 0x1000>;
                interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_ds: mmu@e6740000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xe6740000 0 0x1000>;
                interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
                             <0 199 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_mp: mmu@ec680000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xec680000 0 0x1000>;
                interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_mx: mmu@fe951000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xfe951000 0 0x1000>;
                interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
                             <0 221 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_rt: mmu@ffc80000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7790", "renesas,ipmmu-vmsa";
                reg = <0 0xffc80000 0 0x1000>;
                interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
deleted file mode 100644 (file)
index 655d180..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Device Tree Source for the Henninger board
- *
- * Copyright (C) 2014 Renesas Solutions Corp.
- * Copyright (C) 2014 Cogent Embedded, Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2.  This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-/dts-v1/;
-#include "r8a7791.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-
-/ {
-       model = "Henninger";
-       compatible = "renesas,henninger", "renesas,r8a7791";
-
-       aliases {
-               serial0 = &scif0;
-       };
-
-       chosen {
-               bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif0;
-       };
-
-       memory@40000000 {
-               device_type = "memory";
-               reg = <0 0x40000000 0 0x40000000>;
-       };
-
-       memory@200000000 {
-               device_type = "memory";
-               reg = <2 0x00000000 0 0x40000000>;
-       };
-
-       vcc_sdhi0: regulator@0 {
-               compatible = "regulator-fixed";
-
-               regulator-name = "SDHI0 Vcc";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-       };
-
-       vccq_sdhi0: regulator@1 {
-               compatible = "regulator-gpio";
-
-               regulator-name = "SDHI0 VccQ";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <3300000>;
-
-               gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
-               gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
-       };
-
-       vcc_sdhi2: regulator@2 {
-               compatible = "regulator-fixed";
-
-               regulator-name = "SDHI2 Vcc";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-always-on;
-       };
-
-       vccq_sdhi2: regulator@3 {
-               compatible = "regulator-gpio";
-
-               regulator-name = "SDHI2 VccQ";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <3300000>;
-
-               gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
-               gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
-       };
-};
-
-&extal_clk {
-       clock-frequency = <20000000>;
-};
-
-&pfc {
-       scif0_pins: serial0 {
-               renesas,groups = "scif0_data_d";
-               renesas,function = "scif0";
-       };
-
-       ether_pins: ether {
-               renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
-               renesas,function = "eth";
-       };
-
-       phy1_pins: phy1 {
-               renesas,groups = "intc_irq0";
-               renesas,function = "intc";
-       };
-
-       sdhi0_pins: sd0 {
-               renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
-               renesas,function = "sdhi0";
-       };
-
-       sdhi2_pins: sd2 {
-               renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
-               renesas,function = "sdhi2";
-       };
-
-       i2c2_pins: i2c2 {
-               renesas,groups = "i2c2";
-               renesas,function = "i2c2";
-       };
-
-       qspi_pins: spi0 {
-               renesas,groups = "qspi_ctrl", "qspi_data4";
-               renesas,function = "qspi";
-       };
-
-       msiof0_pins: spi1 {
-               renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
-                                "msiof0_tx";
-               renesas,function = "msiof0";
-       };
-
-       usb0_pins: usb0 {
-               renesas,groups = "usb0";
-               renesas,function = "usb0";
-       };
-
-       usb1_pins: usb1 {
-               renesas,groups = "usb1";
-               renesas,function = "usb1";
-       };
-
-       vin0_pins: vin0 {
-               renesas,groups = "vin0_data8", "vin0_clk";
-               renesas,function = "vin0";
-       };
-
-       can0_pins: can0 {
-               renesas,groups = "can0_data";
-               renesas,function = "can0";
-       };
-};
-
-&scif0 {
-       pinctrl-0 = <&scif0_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-};
-
-&ether {
-       pinctrl-0 = <&ether_pins &phy1_pins>;
-       pinctrl-names = "default";
-
-       phy-handle = <&phy1>;
-       renesas,ether-link-active-low;
-       status = "okay";
-
-       phy1: ethernet-phy@1 {
-               reg = <1>;
-               interrupt-parent = <&irqc0>;
-               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-               micrel,led-mode = <1>;
-       };
-};
-
-&sata0 {
-       status = "okay";
-};
-
-&sdhi0 {
-       pinctrl-0 = <&sdhi0_pins>;
-       pinctrl-names = "default";
-
-       vmmc-supply = <&vcc_sdhi0>;
-       vqmmc-supply = <&vccq_sdhi0>;
-       cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
-       wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
-       status = "okay";
-};
-
-&sdhi2 {
-       pinctrl-0 = <&sdhi2_pins>;
-       pinctrl-names = "default";
-
-       vmmc-supply = <&vcc_sdhi2>;
-       vqmmc-supply = <&vccq_sdhi2>;
-       cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
-       status = "okay";
-};
-
-&i2c2 {
-       pinctrl-0 = <&i2c2_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-       clock-frequency = <400000>;
-
-       composite-in@20 {
-               compatible = "adi,adv7180";
-               reg = <0x20>;
-               remote = <&vin0>;
-
-               port {
-                       adv7180: endpoint {
-                               bus-width = <8>;
-                               remote-endpoint = <&vin0ep>;
-                       };
-               };
-       };
-};
-
-&qspi {
-       pinctrl-0 = <&qspi_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-
-       flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               compatible = "spansion,s25fl512s", "jedec,spi-nor";
-               reg = <0>;
-               spi-max-frequency = <30000000>;
-               spi-tx-bus-width = <4>;
-               spi-rx-bus-width = <4>;
-               m25p,fast-read;
-
-               partition@0 {
-                       label = "loader_prg";
-                       reg = <0x00000000 0x00040000>;
-                       read-only;
-               };
-               partition@40000 {
-                       label = "user_prg";
-                       reg = <0x00040000 0x00400000>;
-                       read-only;
-               };
-               partition@440000 {
-                       label = "flash_fs";
-                       reg = <0x00440000 0x03bc0000>;
-               };
-       };
-};
-
-&msiof0 {
-       pinctrl-0 = <&msiof0_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-
-       pmic@0 {
-               compatible = "renesas,r2a11302ft";
-               reg = <0>;
-               spi-max-frequency = <6000000>;
-               spi-cpol;
-               spi-cpha;
-       };
-};
-
-&pci0 {
-       status = "okay";
-       pinctrl-0 = <&usb0_pins>;
-       pinctrl-names = "default";
-};
-
-&pci1 {
-       status = "okay";
-       pinctrl-0 = <&usb1_pins>;
-       pinctrl-names = "default";
-};
-
-&hsusb {
-       status = "okay";
-       pinctrl-0 = <&usb0_pins>;
-       pinctrl-names = "default";
-       renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
-};
-
-&usbphy {
-       status = "okay";
-};
-
-&pcie_bus_clk {
-       status = "okay";
-};
-
-&pciec {
-       status = "okay";
-};
-
-/* composite video input */
-&vin0 {
-       status = "okay";
-       pinctrl-0 = <&vin0_pins>;
-       pinctrl-names = "default";
-
-       port {
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               vin0ep: endpoint {
-                       remote-endpoint = <&adv7180>;
-                       bus-width = <8>;
-               };
-       };
-};
-
-&can0 {
-       pinctrl-0 = <&can0_pins>;
-       pinctrl-names = "default";
-       status = "okay";
-};
index fc44ea361a4b72bc89b046c759a1ec78a077ff10..c94a0fb807a2ff299a57a856ea11b6a65f03cf4a 100644 (file)
@@ -54,7 +54,7 @@
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif0;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                        gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_1>;
                        label = "SW2-1";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-2 {
                        gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_2>;
                        label = "SW2-2";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-3 {
                        gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_3>;
                        label = "SW2-3";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-4 {
                        gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_4>;
                        label = "SW2-4";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-a {
                        gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_A>;
                        label = "SW30";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-b {
                        gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_B>;
                        label = "SW31";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-c {
                        gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_C>;
                        label = "SW32";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-d {
                        gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_D>;
                        label = "SW33";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-e {
                        gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_E>;
                        label = "SW34";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-f {
                        gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_F>;
                        label = "SW35";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
                key-g {
                        gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_G>;
                        label = "SW36";
-                       gpio-key,wakeup;
+                       wakeup-source;
                        debounce-interval = <20>;
                };
        };
        };
 
        du_pins: du {
-               renesas,groups = "du_rgb666", "du_sync", "du_disp", "du_clk_out_0";
+               renesas,groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
                renesas,function = "du";
        };
 
        status = "okay";
 
        flash: flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "spansion,s25fl512s", "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <30000000>;
                spi-cpol;
                m25p,fast-read;
 
-               partition@0 {
-                       label = "loader";
-                       reg = <0x00000000 0x00080000>;
-                       read-only;
-               };
-               partition@80000 {
-                       label = "user";
-                       reg = <0x00080000 0x00580000>;
-                       read-only;
-               };
-               partition@600000 {
-                       label = "flash";
-                       reg = <0x00600000 0x03a00000>;
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "loader";
+                               reg = <0x00000000 0x00080000>;
+                               read-only;
+                       };
+                       partition@80000 {
+                               label = "user";
+                               reg = <0x00080000 0x00580000>;
+                               read-only;
+                       };
+                       partition@600000 {
+                               label = "flash";
+                               reg = <0x00600000 0x03a00000>;
+                       };
                };
        };
 };
index fe0f12fc02a186da11f23a7d0e5aab9a87e70a48..71ba7b6b3a337cd9ab843ea1b8b1a1553ecf1c8f 100644 (file)
@@ -22,7 +22,7 @@
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif0;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                renesas,groups = "vin0_data8", "vin0_clk";
                renesas,function = "vin0";
        };
+
+       can0_pins: can0 {
+               renesas,groups = "can0_data";
+               renesas,function = "can0";
+       };
 };
 
 &scif0 {
        status = "okay";
 
        flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "spansion,s25fl512s", "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <30000000>;
                spi-rx-bus-width = <4>;
                m25p,fast-read;
 
-               partition@0 {
-                       label = "loader_prg";
-                       reg = <0x00000000 0x00040000>;
-                       read-only;
-               };
-               partition@40000 {
-                       label = "user_prg";
-                       reg = <0x00040000 0x00400000>;
-                       read-only;
-               };
-               partition@440000 {
-                       label = "flash_fs";
-                       reg = <0x00440000 0x03bc0000>;
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "loader_prg";
+                               reg = <0x00000000 0x00040000>;
+                               read-only;
+                       };
+                       partition@40000 {
+                               label = "user_prg";
+                               reg = <0x00040000 0x00400000>;
+                               read-only;
+                       };
+                       partition@440000 {
+                               label = "flash_fs";
+                               reg = <0x00440000 0x03bc0000>;
+                       };
                };
        };
 };
        status = "okay";
 };
 
+&hsusb {
+       pinctrl-0 = <&usb0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>;
+};
+
 &usbphy {
        status = "okay";
 };
 &pciec {
        status = "okay";
 };
+
+&can0 {
+       pinctrl-0 = <&can0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
index 328f48bd15e711adb729450f4638afb24600bc99..2a369ddcb6fd8dff8ce997993710d2f2592cb3f3 100644 (file)
                interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
                #gpio-cells = <2>;
                gpio-controller;
-               gpio-ranges = <&pfc 0 32 32>;
+               gpio-ranges = <&pfc 0 32 26>;
                #interrupt-cells = <2>;
                interrupt-controller;
                clocks = <&mstp9_clks R8A7791_CLK_GPIO1>;
        };
 
        dmac0: dma-controller@e6700000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7791", "renesas,rcar-dmac";
                reg = <0 0xe6700000 0 0x20000>;
                interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
                              0 200 IRQ_TYPE_LEVEL_HIGH
        };
 
        dmac1: dma-controller@e6720000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7791", "renesas,rcar-dmac";
                reg = <0 0xe6720000 0 0x20000>;
                interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
                              0 216 IRQ_TYPE_LEVEL_HIGH
        };
 
        audma0: dma-controller@ec700000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7791", "renesas,rcar-dmac";
                reg = <0 0xec700000 0 0x10000>;
                interrupts =    <0 346 IRQ_TYPE_LEVEL_HIGH
                                 0 320 IRQ_TYPE_LEVEL_HIGH
        };
 
        audma1: dma-controller@ec720000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7791", "renesas,rcar-dmac";
                reg = <0 0xec720000 0 0x10000>;
                interrupts =    <0 347 IRQ_TYPE_LEVEL_HIGH
                                 0 333 IRQ_TYPE_LEVEL_HIGH
        };
 
        usb_dmac0: dma-controller@e65a0000 {
-               compatible = "renesas,usb-dmac";
+               compatible = "renesas,r8a7791-usb-dmac", "renesas,usb-dmac";
                reg = <0 0xe65a0000 0 0x100>;
                interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH
                              0 109 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        usb_dmac1: dma-controller@e65b0000 {
-               compatible = "renesas,usb-dmac";
+               compatible = "renesas,r8a7791-usb-dmac", "renesas,usb-dmac";
                reg = <0 0xe65b0000 0 0x100>;
                interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH
                              0 110 IRQ_TYPE_LEVEL_HIGH>;
                interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C0>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C1>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C2>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C3>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C4>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                interrupts = <0 20 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp9_clks R8A7791_CLK_I2C5>;
                power-domains = <&cpg_clocks>;
+               i2c-scl-internal-delay-ns = <110>;
                status = "disabled";
        };
 
        pfc: pfc@e6060000 {
                compatible = "renesas,pfc-r8a7791";
                reg = <0 0xe6060000 0 0x250>;
-               #gpio-range-cells = <3>;
        };
 
        mmcif0: mmc@ee200000 {
                status = "disabled";
        };
 
+       avb: ethernet@e6800000 {
+               compatible = "renesas,etheravb-r8a7791",
+                            "renesas,etheravb-rcar-gen2";
+               reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
+               interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp8_clks R8A7791_CLK_ETHERAVB>;
+               power-domains = <&cpg_clocks>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        sata0: sata@ee300000 {
                compatible = "renesas,sata-r8a7791";
                reg = <0 0xee300000 0 0x2000>;
                        clock-mult = <1>;
                        clock-output-names = "m2";
                };
-               imp_clk: imp_clk {
-                       compatible = "fixed-factor-clock";
-                       clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
-                       #clock-cells = <0>;
-                       clock-div = <4>;
-                       clock-mult = <1>;
-                       clock-output-names = "imp";
-               };
                rclk_clk: rclk_clk {
                        compatible = "fixed-factor-clock";
                        clocks = <&cpg_clocks R8A7791_CLK_PLL1>;
                        compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
                        clocks = <&zx_clk>, <&hp_clk>, <&zg_clk>, <&zg_clk>,
-                                <&zg_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>;
+                                <&zg_clk>, <&hp_clk>, <&p_clk>, <&zs_clk>,
+                                <&zs_clk>;
                        #clock-cells = <1>;
                        clock-indices = <
                                R8A7791_CLK_IPMMU_SGX R8A7791_CLK_MLB
                                R8A7791_CLK_VIN2 R8A7791_CLK_VIN1 R8A7791_CLK_VIN0
-                               R8A7791_CLK_ETHER R8A7791_CLK_SATA1 R8A7791_CLK_SATA0
+                               R8A7791_CLK_ETHERAVB R8A7791_CLK_ETHER
+                               R8A7791_CLK_SATA1 R8A7791_CLK_SATA0
                        >;
                        clock-output-names =
-                               "ipmmu_sgx", "mlb", "vin2", "vin1", "vin0", "ether",
-                               "sata1", "sata0";
+                               "ipmmu_sgx", "mlb", "vin2", "vin1", "vin0",
+                               "etheravb", "ether", "sata1", "sata0";
                };
                mstp9_clks: mstp9_clks@e6150994 {
                        compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
        };
 
        ipmmu_sy0: mmu@e6280000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xe6280000 0 0x1000>;
                interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
                             <0 224 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_sy1: mmu@e6290000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xe6290000 0 0x1000>;
                interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_ds: mmu@e6740000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xe6740000 0 0x1000>;
                interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
                             <0 199 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_mp: mmu@ec680000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xec680000 0 0x1000>;
                interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_mx: mmu@fe951000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xfe951000 0 0x1000>;
                interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
                             <0 221 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_rt: mmu@ffc80000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xffc80000 0 0x1000>;
                interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_gp: mmu@e62a0000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7791", "renesas,ipmmu-vmsa";
                reg = <0 0xe62a0000 0 0x1000>;
                interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>,
                             <0 261 IRQ_TYPE_LEVEL_HIGH>;
index 96443ec5f6abdd8f4e52e92dfe323514dc1a113b..3e3122490650d1401227bb9add715b52620bab10 100644 (file)
@@ -24,7 +24,7 @@
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif0;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
        clock-frequency = <20000000>;
 };
 
+&pfc {
+       scif0_pins: serial0 {
+               renesas,groups = "scif0_data_d";
+               renesas,function = "scif0";
+       };
+
+       scif1_pins: serial1 {
+               renesas,groups = "scif1_data_d";
+               renesas,function = "scif1";
+       };
+
+       ether_pins: ether {
+               renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
+               renesas,function = "eth";
+       };
+
+       phy1_pins: phy1 {
+               renesas,groups = "intc_irq0";
+               renesas,function = "intc";
+       };
+
+       qspi_pins: spi0 {
+               renesas,groups = "qspi_ctrl", "qspi_data4";
+               renesas,function = "qspi";
+       };
+};
+
 &ether {
+       pinctrl-0 = <&ether_pins &phy1_pins>;
+       pinctrl-names = "default";
+
        phy-handle = <&phy1>;
        renesas,ether-link-active-low;
        status = "okay";
 };
 
 &scif0 {
+       pinctrl-0 = <&scif0_pins>;
+       pinctrl-names = "default";
+
        status = "okay";
 };
 
 &scif1 {
+       pinctrl-0 = <&scif1_pins>;
+       pinctrl-names = "default";
+
        status = "okay";
 };
+
+&qspi {
+       pinctrl-0 = <&qspi_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+
+       flash@0 {
+               compatible = "spansion,s25fl512s", "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <30000000>;
+               spi-tx-bus-width = <4>;
+               spi-rx-bus-width = <4>;
+               spi-cpol;
+               spi-cpha;
+               m25p,fast-read;
+
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "loader";
+                               reg = <0x00000000 0x00040000>;
+                               read-only;
+                       };
+                       partition@40000 {
+                               label = "user";
+                               reg = <0x00040000 0x00400000>;
+                               read-only;
+                       };
+                       partition@440000 {
+                               label = "flash";
+                               reg = <0x00440000 0x03bc0000>;
+                       };
+               };
+       };
+};
index c4654047e684ff093c0c77e6e6d3bb8dbe6314be..aef9e69d6c26ae7cfab58fb5418e6771e0f226ba 100644 (file)
        #address-cells = <2>;
        #size-cells = <2>;
 
+       aliases {
+               spi0 = &qspi;
+       };
+
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
        };
 
+       gpio0: gpio@e6050000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6050000 0 0x50>;
+               interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 0 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO0>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio1: gpio@e6051000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6051000 0 0x50>;
+               interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 32 26>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO1>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio2: gpio@e6052000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6052000 0 0x50>;
+               interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 64 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO2>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio3: gpio@e6053000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6053000 0 0x50>;
+               interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 96 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO3>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio4: gpio@e6054000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6054000 0 0x50>;
+               interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 128 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO4>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio5: gpio@e6055000 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6055000 0 0x50>;
+               interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 160 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO5>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio6: gpio@e6055400 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6055400 0 0x50>;
+               interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 192 32>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO6>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       gpio7: gpio@e6055800 {
+               compatible = "renesas,gpio-r8a7793", "renesas,gpio-rcar";
+               reg = <0 0xe6055800 0 0x50>;
+               interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
+               #gpio-cells = <2>;
+               gpio-controller;
+               gpio-ranges = <&pfc 0 224 26>;
+               #interrupt-cells = <2>;
+               interrupt-controller;
+               clocks = <&mstp9_clks R8A7793_CLK_GPIO7>;
+               power-domains = <&cpg_clocks>;
+       };
+
+       thermal@e61f0000 {
+               compatible = "renesas,thermal-r8a7793", "renesas,rcar-thermal";
+               reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
+               interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp5_clks R8A7793_CLK_THERMAL>;
+               power-domains = <&cpg_clocks>;
+       };
+
        timer {
                compatible = "arm,armv7-timer";
                interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
                power-domains = <&cpg_clocks>;
        };
 
+       pfc: pfc@e6060000 {
+               compatible = "renesas,pfc-r8a7793";
+               reg = <0 0xe6060000 0 0x250>;
+       };
+
+       dmac0: dma-controller@e6700000 {
+               compatible = "renesas,dmac-r8a7793", "renesas,rcar-dmac";
+               reg = <0 0xe6700000 0 0x20000>;
+               interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
+                             0 200 IRQ_TYPE_LEVEL_HIGH
+                             0 201 IRQ_TYPE_LEVEL_HIGH
+                             0 202 IRQ_TYPE_LEVEL_HIGH
+                             0 203 IRQ_TYPE_LEVEL_HIGH
+                             0 204 IRQ_TYPE_LEVEL_HIGH
+                             0 205 IRQ_TYPE_LEVEL_HIGH
+                             0 206 IRQ_TYPE_LEVEL_HIGH
+                             0 207 IRQ_TYPE_LEVEL_HIGH
+                             0 208 IRQ_TYPE_LEVEL_HIGH
+                             0 209 IRQ_TYPE_LEVEL_HIGH
+                             0 210 IRQ_TYPE_LEVEL_HIGH
+                             0 211 IRQ_TYPE_LEVEL_HIGH
+                             0 212 IRQ_TYPE_LEVEL_HIGH
+                             0 213 IRQ_TYPE_LEVEL_HIGH
+                             0 214 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "error",
+                               "ch0", "ch1", "ch2", "ch3",
+                               "ch4", "ch5", "ch6", "ch7",
+                               "ch8", "ch9", "ch10", "ch11",
+                               "ch12", "ch13", "ch14";
+               clocks = <&mstp2_clks R8A7793_CLK_SYS_DMAC0>;
+               clock-names = "fck";
+               power-domains = <&cpg_clocks>;
+               #dma-cells = <1>;
+               dma-channels = <15>;
+       };
+
+       dmac1: dma-controller@e6720000 {
+               compatible = "renesas,dmac-r8a7793", "renesas,rcar-dmac";
+               reg = <0 0xe6720000 0 0x20000>;
+               interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
+                             0 216 IRQ_TYPE_LEVEL_HIGH
+                             0 217 IRQ_TYPE_LEVEL_HIGH
+                             0 218 IRQ_TYPE_LEVEL_HIGH
+                             0 219 IRQ_TYPE_LEVEL_HIGH
+                             0 308 IRQ_TYPE_LEVEL_HIGH
+                             0 309 IRQ_TYPE_LEVEL_HIGH
+                             0 310 IRQ_TYPE_LEVEL_HIGH
+                             0 311 IRQ_TYPE_LEVEL_HIGH
+                             0 312 IRQ_TYPE_LEVEL_HIGH
+                             0 313 IRQ_TYPE_LEVEL_HIGH
+                             0 314 IRQ_TYPE_LEVEL_HIGH
+                             0 315 IRQ_TYPE_LEVEL_HIGH
+                             0 316 IRQ_TYPE_LEVEL_HIGH
+                             0 317 IRQ_TYPE_LEVEL_HIGH
+                             0 318 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "error",
+                               "ch0", "ch1", "ch2", "ch3",
+                               "ch4", "ch5", "ch6", "ch7",
+                               "ch8", "ch9", "ch10", "ch11",
+                               "ch12", "ch13", "ch14";
+               clocks = <&mstp2_clks R8A7793_CLK_SYS_DMAC1>;
+               clock-names = "fck";
+               power-domains = <&cpg_clocks>;
+               #dma-cells = <1>;
+               dma-channels = <15>;
+       };
+
+       scifa0: serial@e6c40000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c40000 0 64>;
+               interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFA0>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x21>, <&dmac0 0x22>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifa1: serial@e6c50000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c50000 0 64>;
+               interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFA1>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x25>, <&dmac0 0x26>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifa2: serial@e6c60000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c60000 0 64>;
+               interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFA2>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x27>, <&dmac0 0x28>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifa3: serial@e6c70000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c70000 0 64>;
+               interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp11_clks R8A7793_CLK_SCIFA3>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x1b>, <&dmac0 0x1c>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifa4: serial@e6c78000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c78000 0 64>;
+               interrupts = <0 30 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp11_clks R8A7793_CLK_SCIFA4>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x1f>, <&dmac0 0x20>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifa5: serial@e6c80000 {
+               compatible = "renesas,scifa-r8a7793", "renesas,scifa";
+               reg = <0 0xe6c80000 0 64>;
+               interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp11_clks R8A7793_CLK_SCIFA5>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x23>, <&dmac0 0x24>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifb0: serial@e6c20000 {
+               compatible = "renesas,scifb-r8a7793", "renesas,scifb";
+               reg = <0 0xe6c20000 0 64>;
+               interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFB0>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x3d>, <&dmac0 0x3e>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifb1: serial@e6c30000 {
+               compatible = "renesas,scifb-r8a7793", "renesas,scifb";
+               reg = <0 0xe6c30000 0 64>;
+               interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFB1>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x19>, <&dmac0 0x1a>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scifb2: serial@e6ce0000 {
+               compatible = "renesas,scifb-r8a7793", "renesas,scifb";
+               reg = <0 0xe6ce0000 0 64>;
+               interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks R8A7793_CLK_SCIFB2>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x1d>, <&dmac0 0x1e>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
        scif0: serial@e6e60000 {
                compatible = "renesas,scif-r8a7793", "renesas,scif";
                reg = <0 0xe6e60000 0 64>;
                interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp7_clks R8A7793_CLK_SCIF0>;
                clock-names = "sci_ick";
+               dmas = <&dmac0 0x29>, <&dmac0 0x2a>;
+               dma-names = "tx", "rx";
                power-domains = <&cpg_clocks>;
                status = "disabled";
        };
                interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp7_clks R8A7793_CLK_SCIF1>;
                clock-names = "sci_ick";
+               dmas = <&dmac0 0x2d>, <&dmac0 0x2e>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scif2: serial@e6e58000 {
+               compatible = "renesas,scif-r8a7793", "renesas,scif";
+               reg = <0 0xe6e58000 0 64>;
+               interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_SCIF2>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x2b>, <&dmac0 0x2c>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scif3: serial@e6ea8000 {
+               compatible = "renesas,scif-r8a7793", "renesas,scif";
+               reg = <0 0xe6ea8000 0 64>;
+               interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_SCIF3>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x2f>, <&dmac0 0x30>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scif4: serial@e6ee0000 {
+               compatible = "renesas,scif-r8a7793", "renesas,scif";
+               reg = <0 0xe6ee0000 0 64>;
+               interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_SCIF4>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0xfb>, <&dmac0 0xfc>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       scif5: serial@e6ee8000 {
+               compatible = "renesas,scif-r8a7793", "renesas,scif";
+               reg = <0 0xe6ee8000 0 64>;
+               interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_SCIF5>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0xfd>, <&dmac0 0xfe>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       hscif0: serial@e62c0000 {
+               compatible = "renesas,hscif-r8a7793", "renesas,hscif";
+               reg = <0 0xe62c0000 0 96>;
+               interrupts = <0 154 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_HSCIF0>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x39>, <&dmac0 0x3a>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       hscif1: serial@e62c8000 {
+               compatible = "renesas,hscif-r8a7793", "renesas,hscif";
+               reg = <0 0xe62c8000 0 96>;
+               interrupts = <0 155 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_HSCIF1>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x4d>, <&dmac0 0x4e>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               status = "disabled";
+       };
+
+       hscif2: serial@e62d0000 {
+               compatible = "renesas,hscif-r8a7793", "renesas,hscif";
+               reg = <0 0xe62d0000 0 96>;
+               interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_HSCIF2>;
+               clock-names = "sci_ick";
+               dmas = <&dmac0 0x3b>, <&dmac0 0x3c>;
+               dma-names = "tx", "rx";
                power-domains = <&cpg_clocks>;
                status = "disabled";
        };
                status = "disabled";
        };
 
+       qspi: spi@e6b10000 {
+               compatible = "renesas,qspi-r8a7793", "renesas,qspi";
+               reg = <0 0xe6b10000 0 0x2c>;
+               interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp9_clks R8A7793_CLK_QSPI_MOD>;
+               dmas = <&dmac0 0x17>, <&dmac0 0x18>;
+               dma-names = "tx", "rx";
+               power-domains = <&cpg_clocks>;
+               num-cs = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       du: display@feb00000 {
+               compatible = "renesas,du-r8a7793";
+               reg = <0 0xfeb00000 0 0x40000>,
+                     <0 0xfeb90000 0 0x1c>;
+               reg-names = "du", "lvds.0";
+               interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 268 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7793_CLK_DU0>,
+                        <&mstp7_clks R8A7793_CLK_DU1>,
+                        <&mstp7_clks R8A7793_CLK_LVDS0>;
+               clock-names = "du.0", "du.1", "lvds.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 {
+                               };
+                       };
+               };
+       };
+
        clocks {
                #address-cells = <2>;
                #size-cells = <2>;
                                "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
                                "vsp1-du0", "vsps";
                };
+               mstp2_clks: mstp2_clks@e6150138 {
+                       compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
+                       clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
+                                <&mp_clk>, <&mp_clk>, <&zs_clk>, <&zs_clk>;
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7793_CLK_SCIFA2 R8A7793_CLK_SCIFA1 R8A7793_CLK_SCIFA0
+                               R8A7793_CLK_SCIFB0 R8A7793_CLK_SCIFB1 R8A7793_CLK_SCIFB2
+                               R8A7793_CLK_SYS_DMAC1 R8A7793_CLK_SYS_DMAC0
+                       >;
+                       clock-output-names =
+                               "scifa2", "scifa1", "scifa0", "scifb0",
+                               "scifb1", "scifb2", "sys-dmac1", "sys-dmac0";
+               };
                mstp3_clks: mstp3_clks@e615013c {
                        compatible = "renesas,r8a7793-mstp-clocks",
                                     "renesas,cpg-mstp-clocks";
                        clock-indices = <R8A7793_CLK_IRQC>;
                        clock-output-names = "irqc";
                };
+               mstp5_clks: mstp5_clks@e6150144 {
+                       compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
+                       clocks = <&extal_clk>;
+                       #clock-cells = <1>;
+                       clock-indices = <R8A7793_CLK_THERMAL>;
+                       clock-output-names = "thermal";
+               };
                mstp7_clks: mstp7_clks@e615014c {
                        compatible = "renesas,r8a7793-mstp-clocks",
                                     "renesas,cpg-mstp-clocks";
                                "ipmmu_sgx", "vin2", "vin1", "vin0", "ether",
                                "sata1", "sata0";
                };
+               mstp9_clks: mstp9_clks@e6150994 {
+                       compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
+                       clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+                                <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
+                                <&cpg_clocks R8A7793_CLK_QSPI>;
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7793_CLK_GPIO7 R8A7793_CLK_GPIO6
+                               R8A7793_CLK_GPIO5 R8A7793_CLK_GPIO4
+                               R8A7793_CLK_GPIO3 R8A7793_CLK_GPIO2
+                               R8A7793_CLK_GPIO1 R8A7793_CLK_GPIO0
+                               R8A7793_CLK_QSPI_MOD
+                       >;
+                       clock-output-names =
+                               "gpio7", "gpio6", "gpio5", "gpio4",
+                               "gpio3", "gpio2", "gpio1", "gpio0",
+                               "qspi_mod";
+               };
+               mstp11_clks: mstp11_clks@e615099c {
+                       compatible = "renesas,r8a7793-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
+                       clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>;
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7793_CLK_SCIFA3 R8A7793_CLK_SCIFA4 R8A7793_CLK_SCIFA5
+                       >;
+                       clock-output-names = "scifa3", "scifa4", "scifa5";
+               };
+       };
+
+       ipmmu_sy0: mmu@e6280000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xe6280000 0 0x1000>;
+               interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 224 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
+
+       ipmmu_sy1: mmu@e6290000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xe6290000 0 0x1000>;
+               interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
+
+       ipmmu_ds: mmu@e6740000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xe6740000 0 0x1000>;
+               interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 199 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
+
+       ipmmu_mp: mmu@ec680000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xec680000 0 0x1000>;
+               interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
+
+       ipmmu_mx: mmu@fe951000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xfe951000 0 0x1000>;
+               interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 221 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
+
+       ipmmu_rt: mmu@ffc80000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xffc80000 0 0x1000>;
+               interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
        };
 
+       ipmmu_gp: mmu@e62a0000 {
+               compatible = "renesas,ipmmu-r8a7793", "renesas,ipmmu-vmsa";
+               reg = <0 0xe62a0000 0 0x1000>;
+               interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 261 IRQ_TYPE_LEVEL_HIGH>;
+               #iommu-cells = <1>;
+               status = "disabled";
+       };
 };
index 928cfa641475e4f96a44232c60aacea9f7744159..2394e4883786f13eb0a4b005fb6a81e456f9a3f0 100644 (file)
@@ -21,7 +21,7 @@
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif2;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                #address-cells = <1>;
                #size-cells = <1>;
        };
+
+       vga-encoder {
+               compatible = "adi,adv7123";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               adv7123_in: endpoint {
+                                       remote-endpoint = <&du_out_rgb1>;
+                               };
+                       };
+                       port@1 {
+                               reg = <1>;
+                               adv7123_out: endpoint {
+                                       remote-endpoint = <&vga_in>;
+                               };
+                       };
+               };
+       };
+
+       vga {
+               compatible = "vga-connector";
+
+               port {
+                       vga_in: endpoint {
+                               remote-endpoint = <&adv7123_out>;
+                       };
+               };
+       };
+
+       x2_clk: x2-clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <74250000>;
+       };
+
+       x13_clk: x13-clock {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <148500000>;
+       };
+};
+
+&du {
+       pinctrl-0 = <&du_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       clocks = <&mstp7_clks R8A7794_CLK_DU0>,
+                <&mstp7_clks R8A7794_CLK_DU0>,
+                <&x13_clk>, <&x2_clk>;
+       clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
+
+       ports {
+               port@1 {
+                       endpoint {
+                               remote-endpoint = <&adv7123_in>;
+                       };
+               };
+       };
 };
 
 &extal_clk {
        clock-frequency = <20000000>;
 };
 
+&pfc {
+       du_pins: du {
+               renesas,groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_dotclkout0";
+               renesas,function = "du";
+       };
+
+       scif2_pins: serial2 {
+               renesas,groups = "scif2_data";
+               renesas,function = "scif2";
+       };
+
+       ether_pins: ether {
+               renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
+               renesas,function = "eth";
+       };
+
+       phy1_pins: phy1 {
+               renesas,groups = "intc_irq8";
+               renesas,function = "intc";
+       };
+
+       i2c1_pins: i2c1 {
+               renesas,groups = "i2c1";
+               renesas,function = "i2c1";
+       };
+
+       vin0_pins: vin0 {
+               renesas,groups = "vin0_data8", "vin0_clk";
+               renesas,function = "vin0";
+       };
+};
+
 &cmt0 {
        status = "okay";
 };
 
 &ether {
+       pinctrl-0 = <&ether_pins &phy1_pins>;
+       pinctrl-names = "default";
+
        phy-handle = <&phy1>;
        renesas,ether-link-active-low;
        status = "okay";
        };
 };
 
+&i2c1 {
+       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       composite-in@20 {
+               compatible = "adi,adv7180";
+               reg = <0x20>;
+               remote = <&vin0>;
+
+               port {
+                       adv7180: endpoint {
+                               bus-width = <8>;
+                               remote-endpoint = <&vin0ep>;
+                       };
+               };
+       };
+};
+
+&vin0 {
+       status = "okay";
+       pinctrl-0 = <&vin0_pins>;
+       pinctrl-names = "default";
+
+       port {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               vin0ep: endpoint {
+                       remote-endpoint = <&adv7180>;
+                       bus-width = <8>;
+               };
+       };
+};
+
 &scif2 {
+       pinctrl-0 = <&scif2_pins>;
+       pinctrl-names = "default";
+
        status = "okay";
 };
index 48ff3e2958ae68d5e81b6713379cba6f2b100c3f..5a8dcac37c8e70c211ec17aa85a54e46af3f4012 100644 (file)
@@ -12,6 +12,7 @@
 
 /dts-v1/;
 #include "r8a7794.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "SILK";
@@ -23,7 +24,7 @@
 
        chosen {
                bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
-               stdout-path = &scif2;
+               stdout-path = "serial0:115200n8";
        };
 
        memory@40000000 {
                regulator-boot-on;
                regulator-always-on;
        };
+
+       vcc_sdhi1: regulator@3 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "SDHI1 Vcc";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
+       vccq_sdhi1: regulator@4 {
+               compatible = "regulator-gpio";
+
+               regulator-name = "SDHI1 VccQ";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
+               gpios-states = <1>;
+               states = <3300000 1
+                         1800000 0>;
+       };
 };
 
 &extal_clk {
                renesas,function = "mmc";
        };
 
+       sdhi1_pins: sd1 {
+               renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
+               renesas,function = "sdhi1";
+       };
+
        qspi_pins: spi0 {
                renesas,groups = "qspi_ctrl", "qspi_data4";
                renesas,function = "qspi";
        status = "okay";
 };
 
+&sdhi1 {
+       pinctrl-0 = <&sdhi1_pins>;
+       pinctrl-names = "default";
+
+       vmmc-supply = <&vcc_sdhi1>;
+       vqmmc-supply = <&vccq_sdhi1>;
+       cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
 &qspi {
        pinctrl-0 = <&qspi_pins>;
        pinctrl-names = "default";
        status = "okay";
 
        flash@0 {
-               #address-cells = <1>;
-               #size-cells = <1>;
                compatible = "spansion,s25fl512s", "jedec,spi-nor";
                reg = <0>;
                spi-max-frequency = <30000000>;
                spi-cpha;
                m25p,fast-read;
 
-               partition@0 {
-                       label = "loader";
-                       reg = <0x00000000 0x00040000>;
-                       read-only;
-               };
-               partition@40000 {
-                       label = "user";
-                       reg = <0x00040000 0x00400000>;
-                       read-only;
-               };
-               partition@440000 {
-                       label = "flash";
-                       reg = <0x00440000 0x03bc0000>;
+               partitions {
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "loader";
+                               reg = <0x00000000 0x00040000>;
+                               read-only;
+                       };
+                       partition@40000 {
+                               label = "user";
+                               reg = <0x00040000 0x00400000>;
+                               read-only;
+                       };
+                       partition@440000 {
+                               label = "flash";
+                               reg = <0x00440000 0x03bc0000>;
+                       };
                };
        };
 };
index a9977d6ee81af21fbb3c2268a2deb8588c300ecf..6c78f1fae90f7ae43b42f6a8baea078a73fd30f4 100644 (file)
        pfc: pin-controller@e6060000 {
                compatible = "renesas,pfc-r8a7794";
                reg = <0 0xe6060000 0 0x11c>;
-               #gpio-range-cells = <3>;
        };
 
        dmac0: dma-controller@e6700000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7794", "renesas,rcar-dmac";
                reg = <0 0xe6700000 0 0x20000>;
                interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
                              0 200 IRQ_TYPE_LEVEL_HIGH
        };
 
        dmac1: dma-controller@e6720000 {
-               compatible = "renesas,rcar-dmac";
+               compatible = "renesas,dmac-r8a7794", "renesas,rcar-dmac";
                reg = <0 0xe6720000 0 0x20000>;
                interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
                              0 216 IRQ_TYPE_LEVEL_HIGH
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                power-domains = <&cpg_clocks>;
                #address-cells = <1>;
                #size-cells = <0>;
+               i2c-scl-internal-delay-ns = <6>;
                status = "disabled";
        };
 
                };
        };
 
+       du: display@feb00000 {
+               compatible = "renesas,du-r8a7794";
+               reg = <0 0xfeb00000 0 0x40000>;
+               reg-names = "du";
+               interrupts = <0 256 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 268 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp7_clks R8A7794_CLK_DU0>,
+                        <&mstp7_clks R8A7794_CLK_DU0>;
+               clock-names = "du.0", "du.1";
+               status = "disabled";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               du_out_rgb0: endpoint {
+                               };
+                       };
+                       port@1 {
+                               reg = <1>;
+                               du_out_rgb1: endpoint {
+                               };
+                       };
+               };
+       };
+
        clocks {
                #address-cells = <2>;
                #size-cells = <2>;
                        clock-mult = <1>;
                        clock-output-names = "m2";
                };
-               imp_clk: imp_clk {
-                       compatible = "fixed-factor-clock";
-                       clocks = <&cpg_clocks R8A7794_CLK_PLL1>;
-                       #clock-cells = <0>;
-                       clock-div = <4>;
-                       clock-mult = <1>;
-                       clock-output-names = "imp";
-               };
                rclk_clk: rclk_clk {
                        compatible = "fixed-factor-clock";
                        clocks = <&cpg_clocks R8A7794_CLK_PLL1>;
                        reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
                        clocks = <&mp_clk>, <&mp_clk>,
                                 <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
-                                <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
+                                <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                                <&zx_clk>;
                        #clock-cells = <1>;
                        clock-indices = <
                                R8A7794_CLK_EHCI R8A7794_CLK_HSUSB
                                R8A7794_CLK_HSCIF2 R8A7794_CLK_SCIF5
                                R8A7794_CLK_SCIF4 R8A7794_CLK_HSCIF1 R8A7794_CLK_HSCIF0
                                R8A7794_CLK_SCIF3 R8A7794_CLK_SCIF2 R8A7794_CLK_SCIF1
-                               R8A7794_CLK_SCIF0
+                               R8A7794_CLK_SCIF0 R8A7794_CLK_DU0
                        >;
                        clock-output-names =
                                "ehci", "hsusb",
                                "hscif2", "scif5", "scif4", "hscif1", "hscif0",
-                               "scif3", "scif2", "scif1", "scif0";
+                               "scif3", "scif2", "scif1", "scif0", "du0";
                };
                mstp8_clks: mstp8_clks@e6150990 {
                        compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
        };
 
        ipmmu_sy0: mmu@e6280000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xe6280000 0 0x1000>;
                interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
                             <0 224 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        ipmmu_sy1: mmu@e6290000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xe6290000 0 0x1000>;
                interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_ds: mmu@e6740000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xe6740000 0 0x1000>;
                interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
                             <0 199 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
+               status = "disabled";
        };
 
        ipmmu_mp: mmu@ec680000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xec680000 0 0x1000>;
                interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
        };
 
        ipmmu_mx: mmu@fe951000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xfe951000 0 0x1000>;
                interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
                             <0 221 IRQ_TYPE_LEVEL_HIGH>;
                #iommu-cells = <1>;
+               status = "disabled";
        };
 
        ipmmu_gp: mmu@e62a0000 {
-               compatible = "renesas,ipmmu-vmsa";
+               compatible = "renesas,ipmmu-r8a7794", "renesas,ipmmu-vmsa";
                reg = <0 0xe62a0000 0 0x1000>;
                interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>,
                             <0 261 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/rk3036-evb.dts b/arch/arm/boot/dts/rk3036-evb.dts
new file mode 100644 (file)
index 0000000..28a0336
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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 "rk3036.dtsi"
+
+/ {
+       model = "Rockchip RK3036 Evaluation board";
+       compatible = "rockchip,rk3036-evb", "rockchip,rk3036";
+};
+
+&i2c1 {
+       status = "okay";
+
+       hym8563: hym8563@51 {
+               compatible = "haoyu,hym8563";
+               reg = <0x51>;
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+               clock-output-names = "xin32k";
+       };
+};
+
+&uart2 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3036-kylin.dts b/arch/arm/boot/dts/rk3036-kylin.dts
new file mode 100644 (file)
index 0000000..992f9ca
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * 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 "rk3036.dtsi"
+
+/ {
+       model = "Rockchip RK3036 KylinBoard";
+       compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
+
+       vcc_sys: vsys-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc_sys";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+               regulator-boot-on;
+       };
+};
+
+&acodec {
+       status = "okay";
+};
+
+&emmc {
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <400000>;
+
+       status = "okay";
+
+       rk808: pmic@1b {
+               compatible = "rockchip,rk808";
+               reg = <0x1b>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pmic_int &global_pwroff>;
+               rockchip,system-power-controller;
+               wakeup-source;
+               #clock-cells = <1>;
+               clock-output-names = "xin32k", "rk808-clkout2";
+
+               vcc1-supply = <&vcc_sys>;
+               vcc2-supply = <&vcc_sys>;
+               vcc3-supply = <&vcc_sys>;
+               vcc4-supply = <&vcc_sys>;
+               vcc6-supply = <&vcc_sys>;
+               vcc7-supply = <&vcc_sys>;
+               vcc8-supply = <&vcc_18>;
+               vcc9-supply = <&vcc_io>;
+               vcc10-supply = <&vcc_io>;
+               vcc11-supply = <&vcc_sys>;
+               vcc12-supply = <&vcc_io>;
+               vddio-supply = <&vccio_pmu>;
+
+               regulators {
+                       vdd_cpu: DCDC_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <750000>;
+                               regulator-max-microvolt = <1350000>;
+                               regulator-name = "vdd_arm";
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_gpu: DCDC_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <850000>;
+                               regulator-max-microvolt = <1250000>;
+                               regulator-name = "vdd_gpu";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc_ddr: DCDC_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_ddr";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_io: DCDC_REG4 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_io";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vccio_pmu: LDO_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vccio_pmu";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vcc_tp: LDO_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vcc_tp";
+                               regulator-state-mem {
+                                       regulator-off-in-suspend;
+                               };
+                       };
+
+                       vdd_10: LDO_REG3 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-name = "vdd_10";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1000000>;
+                               };
+                       };
+
+                       vcc18_lcd: LDO_REG4 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc18_lcd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vccio_sd: LDO_REG5 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-name = "vccio_sd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <3300000>;
+                               };
+                       };
+
+                       vout5: LDO_REG6 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <2500000>;
+                               regulator-name = "vout5";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc_18: LDO_REG7 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcc_18";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcca_codec: LDO_REG8 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-name = "vcca_codec";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                                       regulator-suspend-microvolt = <1800000>;
+                               };
+                       };
+
+                       vcc_wl: SWITCH_REG1 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_wl";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+
+                       vcc_lcd: SWITCH_REG2 {
+                               regulator-always-on;
+                               regulator-boot-on;
+                               regulator-name = "vcc_lcd";
+                               regulator-state-mem {
+                                       regulator-on-in-suspend;
+                               };
+                       };
+               };
+       };
+};
+
+&i2c2 {
+       status = "okay";
+};
+
+&sdio {
+       status = "okay";
+
+       broken-cd;
+       bus-width = <4>;
+       cap-sdio-irq;
+       default-sample-phase = <90>;
+       keep-power-in-suspend;
+       non-removable;
+       num-slots = <1>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&usb_host {
+       status = "okay";
+};
+
+&usb_otg {
+       status = "okay";
+};
+
+&pinctrl {
+       pmic {
+               pmic_int: pmic-int {
+                       rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
+               };
+       };
+
+       sleep {
+               global_pwroff: global-pwroff {
+                       rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi
new file mode 100644 (file)
index 0000000..b9567c1
--- /dev/null
@@ -0,0 +1,622 @@
+/*
+ * 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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/clock/rk3036-cru.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "rockchip,rk3036";
+
+       interrupt-parent = <&gic>;
+
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               mshc0 = &emmc;
+               mshc1 = &sdmmc;
+               mshc2 = &sdio;
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x60000000 0x40000000>;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "rockchip,rk3036-smp";
+
+               cpu0: cpu@f00 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf00>;
+                       resets = <&cru SRST_CORE0>;
+                       operating-points = <
+                               /* KHz    uV */
+                                816000 1000000
+                       >;
+                       clock-latency = <40000>;
+                       clocks = <&cru ARMCLK>;
+               };
+
+               cpu1: cpu@f01 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf01>;
+                       resets = <&cru SRST_CORE1>;
+               };
+       };
+
+       amba {
+               compatible = "arm,amba-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               pdma: pdma@20078000 {
+                       compatible = "arm,pl330", "arm,primecell";
+                       reg = <0x20078000 0x4000>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+                       #dma-cells = <1>;
+                       clocks = <&cru ACLK_DMAC2>;
+                       clock-names = "apb_pclk";
+               };
+       };
+
+       arm-pmu {
+               compatible = "arm,cortex-a7-pmu";
+               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>, <&cpu1>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               arm,cpu-registers-not-fw-configured;
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
+               clock-frequency = <24000000>;
+       };
+
+       xin24m: oscillator {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xin24m";
+               #clock-cells = <0>;
+       };
+
+       bus_intmem@10080000 {
+               compatible = "mmio-sram";
+               reg = <0x10080000 0x2000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x10080000 0x2000>;
+
+               smp-sram@0 {
+                       compatible = "rockchip,rk3066-smp-sram";
+                       reg = <0x00 0x10>;
+               };
+       };
+
+       gic: interrupt-controller@10139000 {
+               compatible = "arm,gic-400";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+
+               reg = <0x10139000 0x1000>,
+                     <0x1013a000 0x1000>,
+                     <0x1013c000 0x2000>,
+                     <0x1013e000 0x2000>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       usb_otg: usb@10180000 {
+               compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",
+                               "snps,dwc2";
+               reg = <0x10180000 0x40000>;
+               interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_OTG0>;
+               clock-names = "otg";
+               dr_mode = "otg";
+               g-np-tx-fifo-size = <16>;
+               g-rx-fifo-size = <275>;
+               g-tx-fifo-size = <256 128 128 64 64 32>;
+               g-use-dma;
+               status = "disabled";
+       };
+
+       usb_host: usb@101c0000 {
+               compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",
+                               "snps,dwc2";
+               reg = <0x101c0000 0x40000>;
+               interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_OTG1>;
+               clock-names = "otg";
+               dr_mode = "host";
+               status = "disabled";
+       };
+
+       sdmmc: dwmmc@10214000 {
+               compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x10214000 0x4000>;
+               clock-frequency = <37500000>;
+               clock-freq-min-max = <400000 37500000>;
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
+               clock-names = "biu", "ciu";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       sdio: dwmmc@10218000 {
+               compatible = "rockchip,rk3036-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x10218000 0x4000>;
+               clock-freq-min-max = <400000 37500000>;
+               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>;
+               interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       emmc: dwmmc@1021c000 {
+               compatible = "rockchip,rk3288-dw-mshc";
+               reg = <0x1021c000 0x4000>;
+               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+               broken-cd;
+               bus-width = <8>;
+               cap-mmc-highspeed;
+               clock-frequency = <37500000>;
+               clock-freq-min-max = <400000 37500000>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
+                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
+               default-sample-phase = <158>;
+               disable-wp;
+               dmas = <&pdma 12>;
+               dma-names = "rx-tx";
+               fifo-depth = <0x100>;
+               mmc-ddr-1_8v;
+               non-removable;
+               num-slots = <1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+               status = "disabled";
+       };
+
+       i2s: i2s@10220000 {
+               compatible = "rockchip,rk3036-i2s", "rockchip,rk3066-i2s";
+               reg = <0x10220000 0x4000>;
+               interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2s_hclk", "i2s_clk";
+               clocks = <&cru HCLK_I2S>, <&cru SCLK_I2S>;
+               dmas = <&pdma 0>, <&pdma 1>;
+               dma-names = "tx", "rx";
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s_bus>;
+               status = "disabled";
+       };
+
+       cru: clock-controller@20000000 {
+               compatible = "rockchip,rk3036-cru";
+               reg = <0x20000000 0x1000>;
+               rockchip,grf = <&grf>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+               assigned-clocks = <&cru PLL_GPLL>;
+               assigned-clock-rates = <594000000>;
+       };
+
+       grf: syscon@20008000 {
+               compatible = "rockchip,rk3036-grf", "syscon";
+               reg = <0x20008000 0x1000>;
+       };
+
+       acodec: acodec-ana@20030000 {
+               compatible = "rk3036-codec";
+               reg = <0x20030000 0x4000>;
+               rockchip,grf = <&grf>;
+               clock-names = "acodec_pclk";
+               clocks = <&cru PCLK_ACODEC>;
+               status = "disabled";
+       };
+
+       timer: timer@20044000 {
+               compatible = "rockchip,rk3036-timer", "rockchip,rk3288-timer";
+               reg = <0x20044000 0x20>;
+               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&xin24m>, <&cru PCLK_TIMER>;
+               clock-names = "timer", "pclk";
+       };
+
+       pwm0: pwm@20050000 {
+               compatible = "rockchip,rk3036-pwm", "rockchip,rk2928-pwm";
+               reg = <0x20050000 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               status = "disabled";
+       };
+
+       pwm1: pwm@20050010 {
+               compatible = "rockchip,rk3036-pwm", "rockchip,rk2928-pwm";
+               reg = <0x20050010 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm1_pin>;
+               status = "disabled";
+       };
+
+       pwm2: pwm@20050020 {
+               compatible = "rockchip,rk3036-pwm", "rockchip,rk2928-pwm";
+               reg = <0x20050020 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm2_pin>;
+               status = "disabled";
+       };
+
+       pwm3: pwm@20050030 {
+               compatible = "rockchip,rk3036-pwm", "rockchip,rk2928-pwm";
+               reg = <0x20050030 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm3_pin>;
+               status = "disabled";
+       };
+
+       i2c1: i2c@20056000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0x20056000 0x1000>;
+               interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c1_xfer>;
+               status = "disabled";
+       };
+
+       i2c2: i2c@2005a000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0x2005a000 0x1000>;
+               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C2>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c2_xfer>;
+               status = "disabled";
+       };
+
+       uart0: serial@20060000 {
+               compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
+               reg = <0x20060000 0x100>;
+               interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
+               status = "disabled";
+       };
+
+       uart1: serial@20064000 {
+               compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
+               reg = <0x20064000 0x100>;
+               interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart1_xfer>;
+               status = "disabled";
+       };
+
+       uart2: serial@20068000 {
+               compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
+               reg = <0x20068000 0x100>;
+               interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart2_xfer>;
+               status = "disabled";
+       };
+
+       i2c0: i2c@20072000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0x20072000 0x1000>;
+               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c0_xfer>;
+               status = "disabled";
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,rk3036-pinctrl";
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio0: gpio0@2007c000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2007c000 0x100>;
+                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO0>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio1: gpio1@20080000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20080000 0x100>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio2: gpio2@20084000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20084000 0x100>;
+                       interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               pcfg_pull_default: pcfg_pull_default {
+                       bias-pull-pin-default;
+               };
+
+               pcfg_pull_none: pcfg-pull-none {
+                       bias-disable;
+               };
+
+               pwm0 {
+                       pwm0_pin: pwm0-pin {
+                               rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm1 {
+                       pwm1_pin: pwm1-pin {
+                               rockchip,pins = <0 1 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm2 {
+                       pwm2_pin: pwm2-pin {
+                               rockchip,pins = <0 1 2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm3 {
+                       pwm3_pin: pwm3-pin {
+                               rockchip,pins = <0 27 1 &pcfg_pull_none>;
+                       };
+               };
+
+               sdmmc {
+                       sdmmc_clk: sdmmc-clk {
+                               rockchip,pins = <1 16 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       sdmmc_cmd: sdmmc-cmd {
+                               rockchip,pins = <1 15 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdmmc_cd: sdmcc-cd {
+                               rockchip,pins = <1 17 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdmmc_bus1: sdmmc-bus1 {
+                               rockchip,pins = <1 18 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdmmc_bus4: sdmmc-bus4 {
+                               rockchip,pins = <1 18 RK_FUNC_1 &pcfg_pull_default>,
+                                               <1 19 RK_FUNC_1 &pcfg_pull_default>,
+                                               <1 20 RK_FUNC_1 &pcfg_pull_default>,
+                                               <1 21 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+               };
+
+               sdio {
+                       sdio_bus1: sdio-bus1 {
+                               rockchip,pins = <0 11 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdio_bus4: sdio-bus4 {
+                               rockchip,pins = <0 11 RK_FUNC_1 &pcfg_pull_default>,
+                                               <0 12 RK_FUNC_1 &pcfg_pull_default>,
+                                               <0 13 RK_FUNC_1 &pcfg_pull_default>,
+                                               <0 14 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdio_cmd: sdio-cmd {
+                               rockchip,pins = <0 8 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       sdio_clk: sdio-clk {
+                               rockchip,pins = <0 9 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               emmc {
+                       /*
+                        * We run eMMC at max speed; bump up drive strength.
+                        * We also have external pulls, so disable the internal ones.
+                        */
+                       emmc_clk: emmc-clk {
+                               rockchip,pins = <2 4 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       emmc_cmd: emmc-cmd {
+                               rockchip,pins = <2 1 RK_FUNC_2 &pcfg_pull_default>;
+                       };
+
+                       emmc_bus8: emmc-bus8 {
+                               rockchip,pins = <1 24 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 25 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 26 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 27 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 28 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 29 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 30 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 31 RK_FUNC_2 &pcfg_pull_default>;
+                       };
+               };
+
+               i2c0 {
+                       i2c0_xfer: i2c0-xfer {
+                               rockchip,pins = <0 0 RK_FUNC_1 &pcfg_pull_none>,
+                                               <0 1 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c1 {
+                       i2c1_xfer: i2c1-xfer {
+                               rockchip,pins = <0 2 RK_FUNC_1 &pcfg_pull_none>,
+                                               <0 3 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c2 {
+                       i2c2_xfer: i2c2-xfer {
+                               rockchip,pins = <2 20 RK_FUNC_1 &pcfg_pull_none>,
+                                               <2 21 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2s {
+                       i2s_bus: i2s-bus {
+                               rockchip,pins = <1 0 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 1 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 2 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 3 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 4 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins = <0 16 RK_FUNC_1 &pcfg_pull_default>,
+                                               <0 17 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart0_cts: uart0-cts {
+                               rockchip,pins = <0 18 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+
+                       uart0_rts: uart0-rts {
+                               rockchip,pins = <0 19 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins = <2 22 RK_FUNC_1 &pcfg_pull_default>,
+                                               <2 23 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+                       /* no rts / cts for uart1 */
+               };
+
+               uart2 {
+                       uart2_xfer: uart2-xfer {
+                               rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_default>,
+                                               <1 19 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+                       /* no rts / cts for uart2 */
+               };
+       };
+};
index 946f18705e965cb6fdfa357d0839bb594637f14a..58bac5053858bc95bcc8f089fd32deb9fdfa0b32 100644 (file)
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
+               rockchip,playback-channels = <8>;
+               rockchip,capture-channels = <2>;
                status = "disabled";
        };
 
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S1>, <&cru SCLK_I2S1>;
+               rockchip,playback-channels = <2>;
+               rockchip,capture-channels = <2>;
                status = "disabled";
        };
 
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S2>, <&cru SCLK_I2S2>;
+               rockchip,playback-channels = <2>;
+               rockchip,capture-channels = <2>;
                status = "disabled";
        };
 
                clock-names = "timer", "pclk";
        };
 
+       efuse: efuse@20010000 {
+               compatible = "rockchip,rockchip-efuse";
+               reg = <0x20010000 0x4000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               clocks = <&cru PCLK_EFUSE>;
+               clock-names = "pclk_efuse";
+
+               cpu_leakage: cpu_leakage {
+                       reg = <0x17 0x1>;
+               };
+       };
+
        timer@20038000 {
                compatible = "snps,dw-apb-timer-osc";
                reg = <0x20038000 0x100>;
index 6399942f1840cc4ae485c07040f848d1bc630fea..348d46b7ada5a07ebdefe4dafc1630ddd079c0b7 100644 (file)
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
+               rockchip,playback-channels = <2>;
+               rockchip,capture-channels = <2>;
                status = "disabled";
        };
 
                #reset-cells = <1>;
        };
 
+       efuse: efuse@20010000 {
+               compatible = "rockchip,rockchip-efuse";
+               reg = <0x20010000 0x4000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               clocks = <&cru PCLK_EFUSE>;
+               clock-names = "pclk_efuse";
+
+               cpu_leakage: cpu_leakage {
+                       reg = <0x17 0x1>;
+               };
+       };
+
        usbphy: phy {
                compatible = "rockchip,rk3188-usb-phy", "rockchip,rk3288-usb-phy";
                rockchip,grf = <&grf>;
diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/arch/arm/boot/dts/rk3228-evb.dts
new file mode 100644 (file)
index 0000000..e3898b8
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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 "rk3228.dtsi"
+
+/ {
+       model = "Rockchip RK3228 Evaluation board";
+       compatible = "rockchip,rk3228-evb", "rockchip,rk3228";
+
+       memory {
+               device_type = "memory";
+               reg = <0x60000000 0x40000000>;
+       };
+};
+
+&emmc {
+       broken-cd;
+       cap-mmc-highspeed;
+       mmc-ddr-1_8v;
+       disable-wp;
+       non-removable;
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3228.dtsi b/arch/arm/boot/dts/rk3228.dtsi
new file mode 100644 (file)
index 0000000..119ff12
--- /dev/null
@@ -0,0 +1,442 @@
+/*
+ * 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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/clock/rk3228-cru.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "rockchip,rk3228";
+
+       interrupt-parent = <&gic>;
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@f00 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf00>;
+                       resets = <&cru SRST_CORE0>;
+                       operating-points = <
+                               /* KHz    uV */
+                                816000 1000000
+                       >;
+                       clock-latency = <40000>;
+                       clocks = <&cru ARMCLK>;
+               };
+
+               cpu1: cpu@f01 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf01>;
+                       resets = <&cru SRST_CORE1>;
+               };
+
+               cpu2: cpu@f02 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf02>;
+                       resets = <&cru SRST_CORE2>;
+               };
+
+               cpu3: cpu@f03 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a7";
+                       reg = <0xf03>;
+                       resets = <&cru SRST_CORE3>;
+               };
+       };
+
+       amba {
+               compatible = "arm,amba-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               pdma: pdma@110f0000 {
+                       compatible = "arm,pl330", "arm,primecell";
+                       reg = <0x110f0000 0x4000>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+                       #dma-cells = <1>;
+                       clocks = <&cru ACLK_DMAC>;
+                       clock-names = "apb_pclk";
+               };
+       };
+
+       arm-pmu {
+               compatible = "arm,cortex-a7-pmu";
+               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               arm,cpu-registers-not-fw-configured;
+               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)>;
+               clock-frequency = <24000000>;
+       };
+
+       xin24m: oscillator {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xin24m";
+               #clock-cells = <0>;
+       };
+
+       grf: syscon@11000000 {
+               compatible = "syscon";
+               reg = <0x11000000 0x1000>;
+       };
+
+       uart0: serial@11010000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x11010000 0x100>;
+               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               status = "disabled";
+       };
+
+       uart1: serial@11020000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x11020000 0x100>;
+               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart1_xfer>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               status = "disabled";
+       };
+
+       uart2: serial@11030000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x11030000 0x100>;
+               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <24000000>;
+               clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart2_xfer>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               status = "disabled";
+       };
+
+       pwm0: pwm@110b0000 {
+               compatible = "rockchip,rk3288-pwm";
+               reg = <0x110b0000 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               status = "disabled";
+       };
+
+       pwm1: pwm@110b0010 {
+               compatible = "rockchip,rk3288-pwm";
+               reg = <0x110b0010 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm1_pin>;
+               status = "disabled";
+       };
+
+       pwm2: pwm@110b0020 {
+               compatible = "rockchip,rk3288-pwm";
+               reg = <0x110b0020 0x10>;
+               #pwm-cells = <3>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm2_pin>;
+               status = "disabled";
+       };
+
+       pwm3: pwm@110b0030 {
+               compatible = "rockchip,rk3288-pwm";
+               reg = <0x110b0030 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM>;
+               clock-names = "pwm";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm3_pin>;
+               status = "disabled";
+       };
+
+       timer: timer@110c0000 {
+               compatible = "rockchip,rk3288-timer";
+               reg = <0x110c0000 0x20>;
+               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&xin24m>, <&cru PCLK_TIMER>;
+               clock-names = "timer", "pclk";
+       };
+
+       cru: clock-controller@110e0000 {
+               compatible = "rockchip,rk3228-cru";
+               reg = <0x110e0000 0x1000>;
+               rockchip,grf = <&grf>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+               assigned-clocks = <&cru PLL_GPLL>;
+               assigned-clock-rates = <594000000>;
+       };
+
+       emmc: dwmmc@30020000 {
+               compatible = "rockchip,rk3288-dw-mshc";
+               reg = <0x30020000 0x4000>;
+               interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+               clock-frequency = <37500000>;
+               clock-freq-min-max = <400000 37500000>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
+                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
+               bus-width = <8>;
+               default-sample-phase = <158>;
+               num-slots = <1>;
+               fifo-depth = <0x100>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
+               status = "disabled";
+       };
+
+       gic: interrupt-controller@32010000 {
+               compatible = "arm,gic-400";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+
+               reg = <0x32011000 0x1000>,
+                     <0x32012000 0x1000>,
+                     <0x32014000 0x2000>,
+                     <0x32016000 0x2000>;
+               interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,rk3228-pinctrl";
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio0: gpio0@11110000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x11110000 0x100>;
+                       interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO0>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio1: gpio1@11120000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x11120000 0x100>;
+                       interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio2: gpio2@11130000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x11130000 0x100>;
+                       interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio3: gpio3@11140000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x11140000 0x100>;
+                       interrupts = <GIC_SPI 54 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;
+               };
+
+               emmc {
+                       emmc_clk: emmc-clk {
+                               rockchip,pins = <2 7 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       emmc_cmd: emmc-cmd {
+                               rockchip,pins = <1 22 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       emmc_bus8: emmc-bus8 {
+                               rockchip,pins = <1 24 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 25 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 26 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 27 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 28 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 29 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 30 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 31 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm0 {
+                       pwm0_pin: pwm0-pin {
+                               rockchip,pins = <3 21 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm1 {
+                       pwm1_pin: pwm1-pin {
+                               rockchip,pins = <0 30 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm2 {
+                       pwm2_pin: pwm2-pin {
+                               rockchip,pins = <1 12 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               pwm3 {
+                       pwm3_pin: pwm3-pin {
+                               rockchip,pins = <1 11 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
+
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins = <2 26 RK_FUNC_1 &pcfg_pull_none>,
+                                               <2 27 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart0_cts: uart0-cts {
+                               rockchip,pins = <2 29 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart0_rts: uart0-rts {
+                               rockchip,pins = <0 17 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins = <1 9 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 10 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart1_cts: uart1-cts {
+                               rockchip,pins = <1 8 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart1_rts: uart1-rts {
+                               rockchip,pins = <1 11 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart2 {
+                       uart2_xfer: uart2-xfer {
+                               rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_none>,
+                                               <1 19 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       uart2_cts: uart2-cts {
+                               rockchip,pins = <0 25 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart2_rts: uart2-rts {
+                               rockchip,pins = <0 24 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+       };
+};
index 43949a6771f08466c0431cd2e7237ea87be6076d..452ca2441e848943e08a73389ce67b289e583e6f 100644 (file)
 
 / {
        compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
-};
 
-&cpu0 {
-       cpu0-supply = <&vdd_cpu>;
+       vcc_lcd: vcc-lcd {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_en>;
+               regulator-name = "vcc_lcd";
+               vin-supply = <&vcc_io>;
+       };
+
+       vcc_wl: vcc-wl {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio7 9 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_pwr>;
+               regulator-name = "vcc_wl";
+               vin-supply = <&vcc_18>;
+       };
 };
 
 &i2c0 {
 
                        vdd_log: REG3 {
                                regulator-name = "VDD_LOG";
-                               regulator-min-microvolt = <1000000>;
-                               regulator-max-microvolt = <1000000>;
+                               regulator-min-microvolt = <700000>;
+                               regulator-max-microvolt = <1500000>;
                                regulator-always-on;
                        };
 
 
                        vccio_sd: REG5 {
                                regulator-name = "VCCIO_SD";
-                               regulator-min-microvolt = <3300000>;
+                               regulator-min-microvolt = <1800000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };
                                regulator-always-on;
                        };
 
-                       vcca_tp: REG8 {
+                       vcc_tp: REG8 {
                                regulator-name = "VCCA_TP";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                };
        };
 };
+
+&pinctrl {
+       lcd {
+               lcd_en: lcd-en  {
+                       rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       wifi {
+               wifi_pwr: wifi-pwr {
+                       rockchip,pins = <7 9 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
index 18eb6cb495f45449577a872c156ccbfc14f61174..736b08b0bfdda65462013e0e0fa2468beb001ca6 100644 (file)
 
 / {
        compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
-
-       ext_gmac: external-gmac-clock {
-               compatible = "fixed-clock";
-               clock-frequency = <125000000>;
-               clock-output-names = "ext_gmac";
-               #clock-cells = <0>;
-       };
-};
-
-&cpu0 {
-       cpu0-supply = <&vdd_cpu>;
 };
 
 &i2c0 {
                };
        };
 };
-
-&gmac {
-       phy-supply = <&vcc_phy>;
-       phy-mode = "rgmii";
-       clock_in_out = "input";
-       snps,reset-gpio = <&gpio4 7 0>;
-       snps,reset-active-low;
-       snps,reset-delays-us = <0 10000 1000000>;
-       assigned-clocks = <&cru SCLK_MAC>;
-       assigned-clock-parents = <&ext_gmac>;
-       pinctrl-names = "default";
-       pinctrl-0 = <&rgmii_pins>;
-       tx_delay = <0x30>;
-       rx_delay = <0x10>;
-       status = "ok";
-};
index f6d2e7894b051bbde8333b41427c613d8a560aff..4faabdb65868e38c0e4f96143d4a3cd5370afe5e 100644 (file)
                pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
        };
 
+       ext_gmac: external-gmac-clock {
+               compatible = "fixed-clock";
+               clock-frequency = <125000000>;
+               clock-output-names = "ext_gmac";
+               #clock-cells = <0>;
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
                #address-cells = <1>;
        };
 };
 
+&cpu0 {
+       cpu0-supply = <&vdd_cpu>;
+};
+
 &emmc {
        broken-cd;
        bus-width = <8>;
        status = "okay";
 };
 
-&hdmi {
-       ddc-i2c-bus = <&i2c5>;
-       status = "okay";
-};
-
 &sdmmc {
        bus-width = <4>;
        cap-mmc-highspeed;
        vqmmc-supply = <&vccio_sd>;
 };
 
+&gmac {
+       phy-supply = <&vcc_phy>;
+       phy-mode = "rgmii";
+       clock_in_out = "input";
+       snps,reset-gpio = <&gpio4 7 0>;
+       snps,reset-active-low;
+       snps,reset-delays-us = <0 10000 1000000>;
+       assigned-clocks = <&cru SCLK_MAC>;
+       assigned-clock-parents = <&ext_gmac>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&rgmii_pins>;
+       tx_delay = <0x30>;
+       rx_delay = <0x10>;
+       status = "ok";
+};
+
+&hdmi {
+       ddc-i2c-bus = <&i2c5>;
+       status = "okay";
+};
+
 &i2c0 {
        status = "okay";
 };
index 14b9fc73c8a47f704d0b78a64a1fc42762e1d031..17f13c73fe5e078e1adebbd1932615d41b89bbcb 100644 (file)
                };
        };
 
+       ir: ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ir_int>;
+       };
+
        vcc_host: vcc-host-regulator {
                compatible = "regulator-fixed";
                enable-active-high;
                };
        };
 
+       ir {
+               ir_int: ir-int {
+                       rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
        pmic {
                pmic_int: pmic-int {
                        rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
index 1813b7c36556e025c724f7fb7fccefd9c9252743..1ece66f3e162786e839c26e5ef89c04b4bc71fec 100644 (file)
        act8846: act8846@5a {
                compatible = "active-semi,act8846";
                reg = <0x5a>;
+               system-power-controller;
                inl1-supply = <&vcc_io>;
                inl2-supply = <&vcc_sys>;
                inl3-supply = <&vcc_20>;
index 8af35c867a8013e78b278bb6b855e2dc43d62e60..c5453a0b07fca940227c8f24a92b838cbe43219d 100644 (file)
                stdout-path = "serial2:115200n8";
        };
 
+       ir: ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ir_int>;
+       };
+
        sound {
                compatible = "simple-audio-card";
                simple-audio-card,name = "SPDIF";
 };
 
 &pinctrl {
+       ir {
+               ir_int: ir-int {
+                       rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
        pmic {
                pmic_int: pmic-int {
                        rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
index 34040665218627b3c2c167aa1b8faa867449a6de..651b962e3d538d76ed0286e13504b78bf1ff4ad4 100644 (file)
@@ -52,7 +52,7 @@ reserve_thermal: reserve_thermal {
 };
 
 cpu_thermal: cpu_thermal {
-       polling-delay-passive = <1000>; /* milliseconds */
+       polling-delay-passive = <100>; /* milliseconds */
        polling-delay = <5000>; /* milliseconds */
 
        thermal-sensors = <&tsadc 1>;
@@ -63,6 +63,11 @@ cpu_thermal: cpu_thermal {
                        hysteresis = <2000>; /* millicelsius */
                        type = "passive";
                };
+               cpu_alert1: cpu_alert1 {
+                       temperature = <75000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
                cpu_crit: cpu_crit {
                        temperature = <90000>; /* millicelsius */
                        hysteresis = <2000>; /* millicelsius */
@@ -73,6 +78,11 @@ cpu_thermal: cpu_thermal {
        cooling-maps {
                map0 {
                        trip = <&cpu_alert0>;
+                       cooling-device =
+                               <&cpu0 THERMAL_NO_LIMIT 6>;
+               };
+               map1 {
+                       trip = <&cpu_alert1>;
                        cooling-device =
                                <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                };
@@ -80,7 +90,7 @@ cpu_thermal: cpu_thermal {
 };
 
 gpu_thermal: gpu_thermal {
-       polling-delay-passive = <1000>; /* milliseconds */
+       polling-delay-passive = <100>; /* milliseconds */
        polling-delay = <5000>; /* milliseconds */
 
        thermal-sensors = <&tsadc 2>;
diff --git a/arch/arm/boot/dts/rk3288-veyron-brain.dts b/arch/arm/boot/dts/rk3288-veyron-brain.dts
new file mode 100644 (file)
index 0000000..cf5311d
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Google Veyron Brain Rev 0 board device tree source
+ *
+ * Copyright 2014 Google, Inc
+ *
+ * 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 "rk3288-veyron.dtsi"
+
+/ {
+       model = "Google Brain";
+       compatible = "google,veyron-brain-rev0", "google,veyron-brain",
+                    "google,veyron", "rockchip,rk3288";
+
+       vcc33_sys: vcc33-sys {
+               vin-supply = <&vcc_5v>;
+       };
+
+       vcc33_io: vcc33_io {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc33_io";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc33_sys>;
+               /* This is gated by vcc_18 too */
+       };
+
+       /* This turns on vbus for host2 and otg (dwc2) */
+       vcc5_host2: vcc5-host2-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&usb2_pwr_en>;
+               regulator-name = "vcc5_host2";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+};
+
+&pinctrl {
+       hdmi {
+               vcc50_hdmi_en: vcc50-hdmi-en {
+                       rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               dvs_1: dvs-1 {
+                       rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               dvs_2: dvs-2 {
+                       rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+
+       usb-host {
+               usb2_pwr_en: usb2-pwr-en {
+                       rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&rk808 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
+       dvs-gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>,
+                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
+
+       /delete-property/ vcc6-supply;
+
+       regulators {
+               /* vcc33_io is sourced directly from vcc33_sys */
+               /delete-node/ LDO_REG1;
+
+               /* This is not a pwren anymore, but the real power supply */
+               vdd10_lcd: LDO_REG7 {
+                       regulator-always-on;
+                       regulator-boot-on;
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1000000>;
+                       regulator-name = "vdd10_lcd";
+                       regulator-suspend-mem-disabled;
+               };
+
+               vcc18_hdmi: SWITCH_REG2 {
+                       regulator-always-on;
+                       regulator-boot-on;
+                       regulator-name = "vcc18_hdmi";
+                       regulator-suspend-mem-disabled;
+               };
+       };
+};
+
+&vcc50_hdmi {
+       enable-active-high;
+       gpio = <&gpio7 2 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&vcc50_hdmi_en>;
+};
diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts
new file mode 100644 (file)
index 0000000..f36f6f4
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * Google Veyron Mickey Rev 0 board device tree source
+ *
+ * Copyright 2015 Google, Inc
+ *
+ * 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 "rk3288-veyron.dtsi"
+
+/ {
+       model = "Google Mickey";
+       compatible = "google,veyron-mickey-rev8", "google,veyron-mickey-rev7",
+                    "google,veyron-mickey-rev6", "google,veyron-mickey-rev5",
+                    "google,veyron-mickey-rev4", "google,veyron-mickey-rev3",
+                    "google,veyron-mickey-rev2", "google,veyron-mickey-rev1",
+                    "google,veyron-mickey-rev0", "google,veyron-mickey",
+                    "google,veyron", "rockchip,rk3288";
+
+       vcc_5v: vcc-5v {
+               vin-supply = <&vcc33_sys>;
+       };
+
+       vcc33_io: vcc33_io {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc33_io";
+               regulator-always-on;
+               regulator-boot-on;
+               vin-supply = <&vcc33_sys>;
+       };
+};
+
+&cpu_thermal {
+       /delete-node/ trips;
+       /delete-node/ cooling-maps;
+
+       trips {
+               cpu_alert_almost_warm: cpu_alert_almost_warm {
+                       temperature = <63000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_alert_warm: cpu_alert_warm {
+                       temperature = <65000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_alert_almost_hot: cpu_alert_almost_hot {
+                       temperature = <80000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_alert_hot: cpu_alert_hot {
+                       temperature = <82000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_alert_hotter: cpu_alert_hotter {
+                       temperature = <84000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_alert_very_hot: cpu_alert_very_hot {
+                       temperature = <85000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "passive";
+               };
+               cpu_crit: cpu_crit {
+                       temperature = <90000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "critical";
+               };
+       };
+
+       cooling-maps {
+               /*
+                * After 1st level, throttle the CPU down to as low as 1.4 GHz
+                * and don't let the GPU go faster than 400 MHz.  Note that we
+                * won't throttle the GPU lower than 400 MHz due to CPU
+                * heat--we'll let the GPU do the rest itself.
+                */
+               cpu_warm_limit_cpu {
+                       trip = <&cpu_alert_warm>;
+                       cooling-device =
+                               <&cpu0 THERMAL_NO_LIMIT 4>;
+               };
+
+               /*
+                * Add some discrete steps to help throttling system deal
+                * with the fact that there are two passive cooling devices:
+                * the CPU and the GPU.
+                *
+                * - 1.2 GHz - 1.0 GHz (almost hot)
+                * - 800 MHz           (hot)
+                * - 800 MHz - 696 MHz (hotter)
+                * - 696 MHz - min     (very hot)
+                *
+                * Note:
+                * - 800 MHz appears to be a "sweet spot" for me.  I can run
+                *   some pretty serious workload here and be happy.
+                * - After 696 MHz we stop lowering voltage, so throttling
+                *   past there is less effective.
+                */
+               cpu_almost_hot_limit_cpu {
+                       trip = <&cpu_alert_almost_hot>;
+                       cooling-device =
+                               <&cpu0 5 6>;
+               };
+               cpu_hot_limit_cpu {
+                       trip = <&cpu_alert_hot>;
+                       cooling-device =
+                               <&cpu0 7 7>;
+               };
+               cpu_hotter_limit_cpu {
+                       trip = <&cpu_alert_hotter>;
+                       cooling-device =
+                               <&cpu0 7 8>;
+               };
+               cpu_very_hot_limit_cpu {
+                       trip = <&cpu_alert_very_hot>;
+                       cooling-device =
+                               <&cpu0 8 THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
+&emmc {
+       /delete-property/mmc-hs200-1_8v;
+};
+
+&i2c2 {
+       status = "disabled";
+};
+
+&i2c4 {
+       status = "disabled";
+};
+
+&i2s {
+       status = "okay";
+       clock-names = "i2s_hclk", "i2s_clk", "i2s_clk_out";
+       clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>, <&cru SCLK_I2S0_OUT>;
+};
+
+&rk808 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pmic_int_l &dvs_1 &dvs_2>;
+       dvs-gpios = <&gpio7 12 GPIO_ACTIVE_HIGH>,
+                   <&gpio7 15 GPIO_ACTIVE_HIGH>;
+
+       /delete-property/ vcc6-supply;
+       /delete-property/ vcc12-supply;
+
+       vcc11-supply = <&vcc33_sys>;
+
+       regulators {
+               /* vcc33_io is sourced directly from vcc33_sys */
+               /delete-node/ LDO_REG1;
+               /delete-node/ LDO_REG7;
+
+               /* This is not a pwren anymore, but the real power supply */
+               vdd10_lcd: LDO_REG7 {
+                       regulator-always-on;
+                       regulator-boot-on;
+                       regulator-min-microvolt = <1000000>;
+                       regulator-max-microvolt = <1000000>;
+                       regulator-name = "vdd10_lcd";
+                       regulator-suspend-mem-disabled;
+               };
+
+               vcc18_lcd: LDO_REG8 {
+                       regulator-always-on;
+                       regulator-boot-on;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-name = "vcc18_lcd";
+                       regulator-suspend-mem-disabled;
+               };
+       };
+};
+
+&pinctrl {
+       hdmi {
+               power_hdmi_on: power-hdmi-on {
+                       rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+
+       pmic {
+               dvs_1: dvs-1 {
+                       rockchip,pins = <7 12 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
+               dvs_2: dvs-2 {
+                       rockchip,pins = <7 15 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+       };
+};
+
+&usb_host0_ehci {
+       status = "disabled";
+};
+
+&usb_host1 {
+       status = "disabled";
+};
+
+&vcc50_hdmi {
+       enable-active-high;
+       gpio = <&gpio7 11 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&power_hdmi_on>;
+};
index 8fd8ef2c72dae55de1a1fa6004be38928b6f660f..699beb0a9481b54b30eabe75a6b95008ced1bacb 100644 (file)
        };
 };
 
+&emmc {
+       /delete-property/mmc-hs200-1_8v;
+};
+
 &gpio_keys {
        pinctrl-0 = <&pwr_key_l &ap_lid_int_l &volum_down_l &volum_up_l>;
 
        clock-frequency = <400000>;
        i2c-scl-falling-time-ns = <50>;
        i2c-scl-rising-time-ns = <300>;
+
+       touchscreen@10 {
+               compatible = "elan,ekth3500";
+               reg = <0x10>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touch_int &touch_rst>;
+               reset-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+               vcc33-supply = <&vcc33_touch>;
+               vccio-supply = <&vcc33_touch>;
+       };
 };
 
 &rk808 {
index a7ea7d06cf7fd115787388d7110703076d9594a4..b34a7b5b3f62e04db16b1fd74d76f2c045775fc1 100644 (file)
        };
 };
 
+&cpu_alert0 {
+       temperature = <65000>;
+};
+
+&cpu_alert1 {
+       temperature = <70000>;
+};
+
 &rk808 {
        pinctrl-names = "default";
        pinctrl-0 = <&pmic_int_l>;
index 5e61f07724d42a5e6c40e41d8f5f72029feec3de..9fce91ffff6fd89b1f39ba960dfeecd71ff8ae24 100644 (file)
        i2c-scl-rising-time-ns = <1000>;
 };
 
+&power {
+       assigned-clocks = <&cru SCLK_EDP_24M>;
+       assigned-clock-parents = <&xin24m>;
+};
+
 &pwm1 {
        status = "okay";
 };
index 6a79c9c526b8809d9ea201d087d680851653e990..8ac49f3efc178ddc05ead42d5fec2178280275c2 100644 (file)
@@ -53,6 +53,7 @@
        interrupt-parent = <&gic>;
 
        aliases {
+               ethernet0 = &gmac;
                i2c0 = &i2c0;
                i2c1 = &i2c1;
                i2c2 = &i2c2;
                clock-names = "tsadc", "apb_pclk";
                resets = <&cru SRST_TSADC>;
                reset-names = "tsadc-apb";
-               pinctrl-names = "default";
-               pinctrl-0 = <&otp_out>;
+               pinctrl-names = "init", "default", "sleep";
+               pinctrl-0 = <&otp_gpio>;
+               pinctrl-1 = <&otp_out>;
+               pinctrl-2 = <&otp_gpio>;
                #thermal-sensor-cells = <1>;
                rockchip,hw-tshut-temp = <95000>;
                status = "disabled";
                clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
                pinctrl-names = "default";
                pinctrl-0 = <&i2s0_bus>;
+               rockchip,playback-channels = <8>;
+               rockchip,capture-channels = <2>;
                status = "disabled";
        };
 
+       crypto: cypto-controller@ff8a0000 {
+               compatible = "rockchip,rk3288-crypto";
+               reg = <0xff8a0000 0x4000>;
+               interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru ACLK_CRYPTO>, <&cru HCLK_CRYPTO>,
+                        <&cru SCLK_CRYPTO>, <&cru ACLK_DMAC1>;
+               clock-names = "aclk", "hclk", "sclk", "apb_pclk";
+               resets = <&cru SRST_CRYPTO>;
+               reset-names = "crypto-rst";
+               status = "okay";
+       };
+
        vopb: vop@ff930000 {
                compatible = "rockchip,rk3288-vop";
                reg = <0xff930000 0x19c>;
                interrupts = <GIC_PPI 9 0xf04>;
        };
 
+       efuse: efuse@ffb40000 {
+               compatible = "rockchip,rockchip-efuse";
+               reg = <0xffb40000 0x20>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               clocks = <&cru PCLK_EFUSE256>;
+               clock-names = "pclk_efuse";
+
+               cpu_leakage: cpu_leakage@17 {
+                       reg = <0x17 0x1>;
+               };
+       };
+
        usbphy: phy {
                compatible = "rockchip,rk3288-usb-phy";
                rockchip,grf = <&grf>;
                                rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
-                       sdmmc_cd: sdmcc-cd {
+                       sdmmc_cd: sdmmc-cd {
                                rockchip,pins = <6 22 RK_FUNC_1 &pcfg_pull_up>;
                        };
 
                };
 
                tsadc {
+                       otp_gpio: otp-gpio {
+                               rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+                       };
+
                        otp_out: otp-out {
                                rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>;
                        };
index 4497d288a7cbdb5e837279a1e67f0358da9582c5..99eeea70223b94c9492a9df2fb8f7e4ffa373613 100644 (file)
@@ -49,6 +49,7 @@
        interrupt-parent = <&gic>;
 
        aliases {
+               ethernet0 = &emac;
                i2c0 = &i2c0;
                i2c1 = &i2c1;
                i2c2 = &i2c2;
index 4dfca8fc49b3db0777e5d262c2d8eb0a3f02f6f0..3f750f6170f2fc1a1913d5a67d0a4ba28d698958 100644 (file)
                                                atmel,clk-output-range = <0 83000000>;
                                        };
 
+                                       pdmic_clk: pdmic_clk {
+                                               #clock-cells = <0>;
+                                               reg = <48>;
+                                               atmel,clk-output-range = <0 83000000>;
+                                       };
+
                                        i2s0_clk: i2s0_clk {
                                                #clock-cells = <0>;
                                                reg = <54>;
                                                atmel,clk-output-range = <0 83000000>;
                                        };
 
+                                       pdmic_gclk: pdmic_gclk {
+                                               #clock-cells = <0>;
+                                               reg = <48>;
+                                       };
+
                                        i2s0_gclk: i2s0_gclk {
                                                #clock-cells = <0>;
                                                reg = <54>;
                                clock-names = "t0_clk", "slow_clk";
                        };
 
+                       pdmic: pdmic@f8018000 {
+                               compatible = "atmel,sama5d2-pdmic";
+                               reg = <0xf8018000 0x124>;
+                               interrupts = <48 IRQ_TYPE_LEVEL_HIGH 7>;
+                               dmas = <&dma0
+                                       (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
+                                       | AT91_XDMAC_DT_PERID(50))>;
+                               dma-names = "rx";
+                               clocks = <&pdmic_clk>, <&pdmic_gclk>;
+                               clock-names = "pclk", "gclk";
+                               status = "disabled";
+                       };
+
                        uart0: serial@f801c000 {
                                compatible = "atmel,at91sam9260-usart";
                                reg = <0xf801c000 0x100>;
                                clocks = <&h32ck>;
                        };
 
+                       watchdog@f8048040 {
+                               compatible = "atmel,sama5d4-wdt";
+                               reg = <0xf8048040 0x10>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH 7>;
+                               status = "disabled";
+                       };
+
                        sckc@f8048050 {
                                compatible = "atmel,at91sam9x5-sckc";
                                reg = <0xf8048050 0x4>;
index d9a9aca1ccfdf6d5514b535241d7c5f2ae379e92..e812f5c1bf709db8edded907516c75e66e20c4b8 100644 (file)
@@ -49,7 +49,7 @@
                        label = "pb_user1";
                        gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
                        linux,code = <0x100>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 };
index 15bbaf690047dfb9ab0082d31b83142b63228e09..b8032bca462152e6904d299f84514c483dde0165 100644 (file)
                                        interrupt-parent = <&pmc>;
                                        interrupts = <AT91_PMC_MCKRDY>;
                                        clocks = <&clk32k>, <&main>, <&plladiv>, <&utmi>;
-                                       atmel,clk-output-range = <125000000 177000000>;
+                                       atmel,clk-output-range = <125000000 200000000>;
                                        atmel,clk-divisors = <1 2 4 3>;
                                };
 
                        };
 
                        i2c0: i2c@f8014000 {
-                               compatible = "atmel,at91sam9x5-i2c";
+                               compatible = "atmel,sama5d4-i2c";
                                reg = <0xf8014000 0x4000>;
                                interrupts = <32 IRQ_TYPE_LEVEL_HIGH 6>;
                                dmas = <&dma1
                        };
 
                        i2c1: i2c@f8018000 {
-                               compatible = "atmel,at91sam9x5-i2c";
+                               compatible = "atmel,sama5d4-i2c";
                                reg = <0xf8018000 0x4000>;
                                interrupts = <33 IRQ_TYPE_LEVEL_HIGH 6>;
                                dmas = <&dma1
                        };
 
                        i2c2: i2c@f8024000 {
-                               compatible = "atmel,at91sam9x5-i2c";
+                               compatible = "atmel,sama5d4-i2c";
                                reg = <0xf8024000 0x4000>;
                                interrupts = <34 IRQ_TYPE_LEVEL_HIGH 6>;
                                dmas = <&dma1
                        };
 
                        watchdog@fc068640 {
-                               compatible = "atmel,at91sam9260-wdt";
+                               compatible = "atmel,sama5d4-wdt";
                                reg = <0xfc068640 0x10>;
                                clocks = <&clk32k>;
                                status = "disabled";
                                        pinctrl_mmc0_clk_cmd_dat0: mmc0_clk_cmd_dat0 {
                                                atmel,pins =
                                                        <AT91_PIOC 4 AT91_PERIPH_B AT91_PINCTRL_NONE    /* MCI0_CK, conflict with PCK1(ISI_MCK) */
-                                                        AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_CDB, conflict with NAND_D0 */
-                                                        AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB0, conflict with NAND_D1 */
+                                                        AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_CDA, conflict with NAND_D0 */
+                                                        AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA0, conflict with NAND_D1 */
                                                        >;
                                        };
                                        pinctrl_mmc0_dat1_3: mmc0_dat1_3 {
                                                atmel,pins =
-                                                       <AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB1, conflict with NAND_D2 */
-                                                        AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB2, conflict with NAND_D3 */
-                                                        AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DB3, conflict with NAND_D4 */
+                                                       <AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA1, conflict with NAND_D2 */
+                                                        AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA2, conflict with NAND_D3 */
+                                                        AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_PULL_UP /* MCI0_DA3, conflict with NAND_D4 */
+                                                       >;
+                                       };
+                                       pinctrl_mmc0_dat4_7: mmc0_dat4_7 {
+                                               atmel,pins =
+                                                       <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA4, conflict with NAND_D5 */
+                                                        AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA5, conflict with NAND_D6 */
+                                                        AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA6, conflict with NAND_D7 */
+                                                        AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_PULL_UP        /* MCI0_DA7, conflict with NAND_OE */
                                                        >;
                                        };
                                };
index 7fc5602810ad0da1d55a776a1fad926f1e332194..aa8bae3b8fcff6d63f56be37fde528350cf39049 100644 (file)
                        gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
                        linux,code = <KEY_HOME>;
                        label = "SW1";
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index ff7c8f298f30a58d3ea987f2375acfe3f6e9be34..3a6056f9f0d23f17edb87674882e3b98f31fee49 100644 (file)
@@ -28,6 +28,7 @@
                        reg = <0>;
                        clock-frequency = <1196000000>;
                        power-domains = <&pd_a2sl>;
+                       next-level-cache = <&L2>;
                };
                cpu@1 {
                        device_type = "cpu";
@@ -35,6 +36,7 @@
                        reg = <1>;
                        clock-frequency = <1196000000>;
                        power-domains = <&pd_a2sl>;
+                       next-level-cache = <&L2>;
                };
        };
 
                      <0xf0000100 0x100>;
        };
 
+       L2: cache-controller {
+               compatible = "arm,pl310-cache";
+               reg = <0xf0100000 0x1000>;
+               interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
+               power-domains = <&pd_a3sm>;
+               arm,data-latency = <3 3 3>;
+               arm,tag-latency = <2 2 2>;
+               arm,shared-override;
+               cache-unified;
+               cache-level = <2>;
+       };
+
        sbsc2: memory-controller@fb400000 {
                compatible = "renesas,sbsc-sh73a0";
                reg = <0xfb400000 0x400>;
                status = "disabled";
        };
 
+       msiof0: spi@e6e20000 {
+               compatible = "renesas,msiof-sh73a0", "renesas,sh-mobile-msiof";
+               reg = <0xe6e20000 0x0064>;
+               interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp0_clks SH73A0_CLK_MSIOF0>;
+               power-domains = <&pd_a3sp>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       msiof1: spi@e6e10000 {
+               compatible = "renesas,msiof-sh73a0", "renesas,sh-mobile-msiof";
+               reg = <0xe6e10000 0x0064>;
+               interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks SH73A0_CLK_MSIOF1>;
+               power-domains = <&pd_a3sp>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       msiof2: spi@e6e00000 {
+               compatible = "renesas,msiof-sh73a0", "renesas,sh-mobile-msiof";
+               reg = <0xe6e00000 0x0064>;
+               interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks SH73A0_CLK_MSIOF2>;
+               power-domains = <&pd_a3sp>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       msiof3: spi@e6c90000 {
+               compatible = "renesas,msiof-sh73a0", "renesas,sh-mobile-msiof";
+               reg = <0xe6c90000 0x0064>;
+               interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp2_clks SH73A0_CLK_MSIOF3>;
+               power-domains = <&pd_a3sp>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        sdhi0: sd@ee100000 {
                compatible = "renesas,sdhi-sh73a0";
                reg = <0xee100000 0x100>;
                mstp0_clks: mstp0_clks@e6150130 {
                        compatible = "renesas,sh73a0-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0xe6150130 4>, <0xe6150030 4>;
-                       clocks = <&cpg_clocks SH73A0_CLK_HP>;
+                       clocks = <&cpg_clocks SH73A0_CLK_HP>, <&sub_clk>;
                        #clock-cells = <1>;
                        clock-indices = <
-                               SH73A0_CLK_IIC2
+                               SH73A0_CLK_IIC2 SH73A0_CLK_MSIOF0
                        >;
                        clock-output-names =
-                               "iic2";
+                               "iic2", "msiof0";
                };
                mstp1_clks: mstp1_clks@e6150134 {
                        compatible = "renesas,sh73a0-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0xe6150138 4>, <0xe6150040 4>;
                        clocks = <&sub_clk>, <&cpg_clocks SH73A0_CLK_HP>,
                                 <&cpg_clocks SH73A0_CLK_HP>, <&sub_clk>,
-                                <&sub_clk>, <&sub_clk>, <&sub_clk>, <&sub_clk>,
-                                <&sub_clk>, <&sub_clk>;
+                                <&sub_clk>, <&sub_clk>, <&sub_clk>,
+                                <&sub_clk>, <&sub_clk>, <&sub_clk>,
+                                <&sub_clk>, <&sub_clk>, <&sub_clk>;
                        #clock-cells = <1>;
                        clock-indices = <
                                SH73A0_CLK_SCIFA7 SH73A0_CLK_SY_DMAC
-                               SH73A0_CLK_MP_DMAC SH73A0_CLK_SCIFA5
-                               SH73A0_CLK_SCIFB SH73A0_CLK_SCIFA0
-                               SH73A0_CLK_SCIFA1 SH73A0_CLK_SCIFA2
-                               SH73A0_CLK_SCIFA3 SH73A0_CLK_SCIFA4
+                               SH73A0_CLK_MP_DMAC SH73A0_CLK_MSIOF3
+                               SH73A0_CLK_MSIOF1 SH73A0_CLK_SCIFA5
+                               SH73A0_CLK_SCIFB SH73A0_CLK_MSIOF2
+                               SH73A0_CLK_SCIFA0 SH73A0_CLK_SCIFA1
+                               SH73A0_CLK_SCIFA2 SH73A0_CLK_SCIFA3
+                               SH73A0_CLK_SCIFA4
                        >;
                        clock-output-names =
-                               "scifa7", "sy_dmac", "mp_dmac", "scifa5",
-                               "scifb", "scifa0", "scifa1", "scifa2",
-                               "scifa3", "scifa4";
+                               "scifa7", "sy_dmac", "mp_dmac", "msiof3",
+                               "msiof1", "scifa5", "scifb", "msiof2",
+                               "scifa0", "scifa1", "scifa2", "scifa3",
+                               "scifa4";
                };
                mstp3_clks: mstp3_clks@e615013c {
                        compatible = "renesas,sh73a0-mstp-clocks", "renesas,cpg-mstp-clocks";
index 39c470e291f96fa42c6d7b3740d63a96b2131194..3ed4abdaaa9cc4efe8b8c169b01a49f8e6b938fd 100644 (file)
                        #size-cells = <0>;
                        clocks = <&l4_mp_clk>, <&sdmmc_clk_divided>;
                        clock-names = "biu", "ciu";
+                       status = "disabled";
                };
 
                ocram: sram@ffff0000 {
index a75a666032b2fca76997546ffedc7c7cd7962e12..3c8867862b0dbece25f0dd5a68ac5bc0f6c2dde1 100644 (file)
@@ -79,6 +79,7 @@
 &mmc0 {
        vmmc-supply = <&regulator_3_3v>;
        vqmmc-supply = <&regulator_3_3v>;
+       status = "okay";
 };
 
 &usb1 {
index 555e9caf21e160112ff24490a6a776c2e6de746d..afea3645ada43500eb0f2903b904760b169eddde 100644 (file)
 &mmc0 {
        vmmc-supply = <&regulator_3_3v>;
        vqmmc-supply = <&regulator_3_3v>;
+       status = "okay";
 };
 
 &uart0 {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi b/arch/arm/boot/dts/socfpga_cyclone5_mcv.dtsi
new file mode 100644 (file)
index 0000000..f86f9c0
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "socfpga_cyclone5.dtsi"
+
+/ {
+       model = "DENX MCV";
+       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+
+       memory {
+               name = "memory";
+               device_type = "memory";
+               reg = <0x0 0x40000000>; /* 1 GiB */
+       };
+};
+
+&mmc0 {        /* On-SoM eMMC */
+       bus-width = <8>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts b/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts
new file mode 100644 (file)
index 0000000..7186a29
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2015 Marek Vasut <marex@denx.de>
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "socfpga_cyclone5_mcv.dtsi"
+
+/ {
+       model = "DENX MCV EVK";
+       compatible = "altr,socfpga-cyclone5", "altr,socfpga";
+
+       aliases {
+               ethernet0 = &gmac0;
+               stmpe-i2c0 = &stmpe1;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&can0 {
+       status = "okay";
+};
+
+&can1 {
+       status = "okay";
+};
+
+&gmac0 {
+       phy-mode = "rgmii";
+       status = "okay";
+};
+
+&gpio0 {       /* GPIO  0 ... 28 */
+       status = "okay";
+};
+
+&gpio1 {       /* GPIO 29 ... 57 */
+       status = "okay";
+};
+
+&gpio2 {       /* GPIO 58..66 (HLGPI 0..13 at offset 13) */
+       status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       speed-mode = <0>;
+
+       stmpe1: stmpe811@41 {
+               compatible = "st,stmpe811";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x41>;
+               id = <0>;
+               blocks = <0x5>;
+               irq-gpio = <&portb 28 0x4>;     /* GPIO 57, trig. level HI */
+
+               stmpe_touchscreen {
+                       compatible = "st,stmpe-ts";
+                       reg = <0>;
+                       ts,sample-time = <4>;
+                       ts,mod-12b = <1>;
+                       ts,ref-sel = <0>;
+                       ts,adc-freq = <1>;
+                       ts,ave-ctrl = <1>;
+                       ts,touch-det-delay = <3>;
+                       ts,settling = <4>;
+                       ts,fraction-z = <7>;
+                       ts,i-drive = <1>;
+               };
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&usb1 {
+       status = "okay";
+};
index d4d0a28fb331a76caf611e3335e2b70ba984d549..15e43f43f24480efcbeca00930844e9a72bc2e1e 100644 (file)
@@ -84,6 +84,7 @@
        cd-gpios = <&portb 18 0>;
        vmmc-supply = <&regulator_3_3v>;
        vqmmc-supply = <&regulator_3_3v>;
+       status = "okay";
 };
 
 &usb1 {
index 48bf651bd7625d960cfade4d55bd02326ae5cb84..b61f22f9ac9f5f7da550e8ac61150c31eaf387ac 100644 (file)
@@ -80,6 +80,7 @@
 &mmc0 {
        vmmc-supply = <&regulator_3_3v>;
        vqmmc-supply = <&regulator_3_3v>;
+       status = "okay";
 };
 
 &usb1 {
index 50f5e9d0920382ce74e5a5678adc6c422fdd62d3..341f5b7ed242a6205a2cf426505f4601f825d435 100644 (file)
 
                                // DB8500_REGULATOR_VAPE
                                db8500_vape_reg: db8500_vape {
-                                       regulator-compatible = "db8500_vape";
                                        regulator-always-on;
                                };
 
                                // DB8500_REGULATOR_VARM
                                db8500_varm_reg: db8500_varm {
-                                       regulator-compatible = "db8500_varm";
                                };
 
                                // DB8500_REGULATOR_VMODEM
                                db8500_vmodem_reg: db8500_vmodem {
-                                       regulator-compatible = "db8500_vmodem";
                                };
 
                                // DB8500_REGULATOR_VPLL
                                db8500_vpll_reg: db8500_vpll {
-                                       regulator-compatible = "db8500_vpll";
                                };
 
                                // DB8500_REGULATOR_VSMPS1
                                db8500_vsmps1_reg: db8500_vsmps1 {
-                                       regulator-compatible = "db8500_vsmps1";
                                };
 
                                // DB8500_REGULATOR_VSMPS2
                                db8500_vsmps2_reg: db8500_vsmps2 {
-                                       regulator-compatible = "db8500_vsmps2";
                                };
 
                                // DB8500_REGULATOR_VSMPS3
                                db8500_vsmps3_reg: db8500_vsmps3 {
-                                       regulator-compatible = "db8500_vsmps3";
                                };
 
                                // DB8500_REGULATOR_VRF1
                                db8500_vrf1_reg: db8500_vrf1 {
-                                       regulator-compatible = "db8500_vrf1";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SVAMMDSP
                                db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
-                                       regulator-compatible = "db8500_sva_mmdsp";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SVAMMDSPRET
                                db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
-                                       regulator-compatible = "db8500_sva_mmdsp_ret";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SVAPIPE
                                db8500_sva_pipe_reg: db8500_sva_pipe {
-                                       regulator-compatible = "db8500_sva_pipe";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SIAMMDSP
                                db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
-                                       regulator-compatible = "db8500_sia_mmdsp";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SIAMMDSPRET
 
                                // DB8500_REGULATOR_SWITCH_SIAPIPE
                                db8500_sia_pipe_reg: db8500_sia_pipe {
-                                       regulator-compatible = "db8500_sia_pipe";
                                };
 
                                // DB8500_REGULATOR_SWITCH_SGA
                                db8500_sga_reg: db8500_sga {
-                                       regulator-compatible = "db8500_sga";
                                        vin-supply = <&db8500_vape_reg>;
                                };
 
                                // DB8500_REGULATOR_SWITCH_B2R2_MCDE
                                db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
-                                       regulator-compatible = "db8500_b2r2_mcde";
                                        vin-supply = <&db8500_vape_reg>;
                                };
 
                                // DB8500_REGULATOR_SWITCH_ESRAM12
                                db8500_esram12_reg: db8500_esram12 {
-                                       regulator-compatible = "db8500_esram12";
                                };
 
                                // DB8500_REGULATOR_SWITCH_ESRAM12RET
                                db8500_esram12_ret_reg: db8500_esram12_ret {
-                                       regulator-compatible = "db8500_esram12_ret";
                                };
 
                                // DB8500_REGULATOR_SWITCH_ESRAM34
                                db8500_esram34_reg: db8500_esram34 {
-                                       regulator-compatible = "db8500_esram34";
                                };
 
                                // DB8500_REGULATOR_SWITCH_ESRAM34RET
                                db8500_esram34_ret_reg: db8500_esram34_ret {
-                                       regulator-compatible = "db8500_esram34_ret";
                                };
                        };
 
                                        compatible = "stericsson,ab8500-ext-regulator";
 
                                        ab8500_ext1_reg: ab8500_ext1 {
-                                               regulator-compatible = "ab8500_ext1";
                                                regulator-min-microvolt = <1800000>;
                                                regulator-max-microvolt = <1800000>;
                                                regulator-boot-on;
                                        };
 
                                        ab8500_ext2_reg: ab8500_ext2 {
-                                               regulator-compatible = "ab8500_ext2";
                                                regulator-min-microvolt = <1360000>;
                                                regulator-max-microvolt = <1360000>;
                                                regulator-boot-on;
                                        };
 
                                        ab8500_ext3_reg: ab8500_ext3 {
-                                               regulator-compatible = "ab8500_ext3";
                                                regulator-min-microvolt = <3400000>;
                                                regulator-max-microvolt = <3400000>;
                                                regulator-boot-on;
 
                                        // supplies to the display/camera
                                        ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
-                                               regulator-compatible = "ab8500_ldo_aux1";
                                                regulator-min-microvolt = <2500000>;
                                                regulator-max-microvolt = <2900000>;
                                                regulator-boot-on;
 
                                        // supplies to the on-board eMMC
                                        ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
-                                               regulator-compatible = "ab8500_ldo_aux2";
                                                regulator-min-microvolt = <1100000>;
                                                regulator-max-microvolt = <3300000>;
                                        };
 
                                        // supply for VAUX3; SDcard slots
                                        ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
-                                               regulator-compatible = "ab8500_ldo_aux3";
                                                regulator-min-microvolt = <1100000>;
                                                regulator-max-microvolt = <3300000>;
                                        };
 
                                        // supply for v-intcore12; VINTCORE12 LDO
                                        ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
-                                               regulator-compatible = "ab8500_ldo_intcore";
                                        };
 
                                        // supply for tvout; gpadc; TVOUT LDO
                                        ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
-                                               regulator-compatible = "ab8500_ldo_tvout";
                                        };
 
                                        // supply for ab8500-usb; USB LDO
                                        ab8500_ldo_usb_reg: ab8500_ldo_usb {
-                                               regulator-compatible = "ab8500_ldo_usb";
                                        };
 
                                        // supply for ab8500-vaudio; VAUDIO LDO
                                        ab8500_ldo_audio_reg: ab8500_ldo_audio {
-                                               regulator-compatible = "ab8500_ldo_audio";
                                        };
 
                                        // supply for v-anamic1 VAMIC1 LDO
                                        ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
-                                               regulator-compatible = "ab8500_ldo_anamic1";
                                        };
 
                                        // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1
                                        ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
-                                               regulator-compatible = "ab8500_ldo_anamic2";
                                        };
 
                                        // supply for v-dmic; VDMIC LDO
                                        ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
-                                               regulator-compatible = "ab8500_ldo_dmic";
                                        };
 
                                        // supply for U8500 CSI/DSI; VANA LDO
                                        ab8500_ldo_ana_reg: ab8500_ldo_ana {
-                                               regulator-compatible = "ab8500_ldo_ana";
                                        };
                                };
                        };
index 78b75256c638af2e70f8a4f95940bdac56b80079..c3987ad06d796e9133498253df31a608befd11b9 100644 (file)
                                rohm,touch-max-x = <384>;
                                rohm,touch-max-y = <704>;
                                rohm,flip-y;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&touch_rohm_mode>;
                        };
 
                        bu21013_tp@5d {
                                rohm,touch-max-x = <384>;
                                rohm,touch-max-y = <704>;
                                rohm,flip-y;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&touch_rohm_mode>;
                        };
                };
 
                                        };
                                };
                        };
+                       touch {
+                               touch_rohm_mode: touch_rohm {
+                                       /*
+                                        * ROHM touch screen uses GPIO 143 for
+                                        * RST1, GPIO 146 for RST2 and
+                                        * GPIO 67 for interrupts. Pull-up
+                                        * the IRQ line and drive both
+                                        * reset signals low.
+                                        */
+                                       stuib_cfg1 {
+                                               pins = "GPIO143_D12", "GPIO146_D13";
+                                               ste,config = <&gpio_out_lo>;
+                                       };
+                                       stuib_cfg2 {
+                                               pins = "GPIO67_G2";
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                               };
+                       };
                };
        };
 };
index 0e1c96943d4795e7bd7355c03f5449ec71ae626a..b7b4211c5353ea9102e7742fc4c80afe274d8d26 100644 (file)
@@ -66,7 +66,7 @@
                                        keypad,num-columns = <8>;
                                        keypad,num-rows = <8>;
                                        linux,no-autorepeat;
-                                       linux,wakeup;
+                                       wakeup-source;
                                        linux,keymap = <0x0301006b
                                                        0x04010066
                                                        0x06040072
                                             <19 IRQ_TYPE_EDGE_RISING>;
                        };
                        lsm303dlh@1e {
-                               /* Magnetometer */
+                               /*
+                                * This magnetometer is packaged with
+                                * the accelerometer, and has a DRDY line,
+                                * however it is not connected on this
+                                * board so it can not generate interrupts.
+                                */
                                compatible = "st,lsm303dlh-magn";
                                reg = <0x1e>;
                                vdd-supply = <&ab8500_ldo_aux1_reg>;
                                vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       lis331dl@1c {
+                               /* Accelerometer */
+                               compatible = "st,lis331dl-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x1c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                               interrupt-parent = <&gpio2>;
+                               interrupts = <18 IRQ_TYPE_EDGE_RISING>,
+                                            <19 IRQ_TYPE_EDGE_RISING>;
+                       };
+                       ak8974@0f {
+                               /* Magnetometer */
+                               compatible = "asahi-kasei,ak8974";
+                               reg = <0x0f>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
-                               pinctrl-0 = <&magneto_tvk_mode>;
+                               pinctrl-0 = <&gyro_magn_tvk_mode>;
+                               interrupt-parent = <&gpio1>;
+                               interrupts = <0 IRQ_TYPE_EDGE_RISING>;
                        };
                        l3g4200d@68 {
                                /* Gyroscope */
                                reg = <0x68>;
                                vdd-supply = <&ab8500_ldo_aux1_reg>;
                                vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&gyro_magn_tvk_mode>;
+                               interrupt-parent = <&gpio1>;
+                               interrupts = <0 IRQ_TYPE_EDGE_RISING>;
                        };
                        lsp001wm@5c {
                                /* Barometer/pressure sensor */
                                        /* Accelerometer interrupt lines 1 & 2 */
                                        tvk_cfg {
                                                pins = "GPIO82_C1", "GPIO83_D3";
-                                               ste,config = <&gpio_in_pu>;
+                                               ste,config = <&gpio_in_pd>;
                                        };
                                };
                        };
-                       magnetometer {
-                               magneto_tvk_mode: magneto_tvk {
-                                       /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
+                       gyroscope {
+                               /*
+                                * These lines are shared between Gyroscope l3g400dh
+                                * and AK8974 magnetometer.
+                                */
+                               gyro_magn_tvk_mode: gyro_magn_tvk {
+                                        /* GPIO 31 used for INT pull down the line */
                                        tvk_cfg1 {
                                                pins = "GPIO31_V3";
-                                               ste,config = <&gpio_in_pu>;
+                                               ste,config = <&gpio_in_pd>;
                                        };
+                                       /* GPIO 32 used for DRDY, pull this down */
                                        tvk_cfg2 {
                                                pins = "GPIO32_V2";
                                                ste,config = <&gpio_in_pd>;
index 9c2387b34d0c73c6942c4051d7f6ce72ee2a0aec..149a72e7e37aa39a99798d04d741041732c97294 100644 (file)
@@ -43,7 +43,6 @@
                                  <&vaudio_hf_hrefv60_mode>,
                                  <&gbf_hrefv60_mode>,
                                  <&hdtv_hrefv60_mode>,
-                                 <&touch_hrefv60_mode>,
                                  <&gpios_hrefv60_mode>;
 
                        sdi0 {
                                        };
                                 };
                        };
-                       touch {
-                               touch_hrefv60_mode: touch_hrefv60 {
-                                       /*
-                                        * Touch screen uses GPIO 143 for RST1, GPIO 146 for RST2 and
-                                        * GPIO 67 for interrupts. Pull-up the IRQ line and drive both
-                                        * reset signals low.
-                                        */
-                                       hrefv60_cfg1 {
-                                               pins = "GPIO143_D12", "GPIO146_D13";
-                                               ste,config = <&gpio_out_lo>;
-                                       };
-                                       hrefv60_cfg2 {
-                                               pins = "GPIO67_G2";
-                                               ste,config = <&gpio_in_pu>;
-                                       };
-                               };
-                       };
                        mcde {
                                lcd_hrefv60_mode: lcd_hrefv60 {
                                        /*
index 35282c0105c6a1de01b80371b77e98aa82cfadf1..789329030658a20860b3e4fb642bfabca0578ef1 100644 (file)
                        label = "user_button";
                        gpios = <&gpio0 3 0x1>;
                        linux,code = <1>; /* KEY_ESC */
-                       gpio-key,wakeup;
+                       wakeup-source;
                        pinctrl-names = "default";
                        pinctrl-0 = <&user_button_default_mode>;
                };
index e80e42163883610005287282d9673c80377b6ce4..08f82077b64d47b4012c2b1d64ccc2aa7fb52282 100644 (file)
                                vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&magneto_snowball_mode>;
-                               gpios = <&gpio5 5 0x4>; /* DRDY line */
+                               interrupt-parent = <&gpio5>;
+                               interrupts = <5 IRQ_TYPE_EDGE_RISING>; /* DRDY line */
                        };
                        l3g4200d@68 {
                                /* Gyroscope */
                                vddio-supply = <&db8500_vsmps2_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&gyro_snowball_mode>;
-                               gpios = <&gpio5 6 0x4>; /* DRDY line */
                                interrupt-parent = <&gpio5>;
-                               interrupts = <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */
+                               interrupts = <6 IRQ_TYPE_EDGE_RISING>, /* DRDY line */
+                                            <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */
                        };
                        lsp001wm@5c {
                                /* Barometer/pressure sensor */
index 82a661677e97e75b9194308e261888081b998710..9c73ac2842ad1605c7ec72f8a28191ffb2fdd358 100644 (file)
                        ab3100-regulators {
                                compatible = "stericsson,ab3100-regulators";
                                ab3100_ldo_a_reg: ab3100_ldo_a {
-                                       regulator-compatible = "ab3100_ldo_a";
                                        startup-delay-us = <200>;
                                        regulator-always-on;
                                        regulator-boot-on;
                                };
                                ab3100_ldo_c_reg: ab3100_ldo_c {
-                                       regulator-compatible = "ab3100_ldo_c";
                                        startup-delay-us = <200>;
                                };
                                ab3100_ldo_d_reg: ab3100_ldo_d {
-                                       regulator-compatible = "ab3100_ldo_d";
                                        startup-delay-us = <200>;
                                };
                                ab3100_ldo_e_reg: ab3100_ldo_e {
-                                       regulator-compatible = "ab3100_ldo_e";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <1800000>;
                                        startup-delay-us = <200>;
                                        regulator-boot-on;
                                };
                                ab3100_ldo_f_reg: ab3100_ldo_f {
-                                       regulator-compatible = "ab3100_ldo_f";
                                        regulator-min-microvolt = <2500000>;
                                        regulator-max-microvolt = <2500000>;
                                        startup-delay-us = <600>;
                                        regulator-boot-on;
                                };
                                ab3100_ldo_g_reg: ab3100_ldo_g {
-                                       regulator-compatible = "ab3100_ldo_g";
                                        regulator-min-microvolt = <1500000>;
                                        regulator-max-microvolt = <2850000>;
                                        startup-delay-us = <400>;
                                };
                                ab3100_ldo_h_reg: ab3100_ldo_h {
-                                       regulator-compatible = "ab3100_ldo_h";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <2750000>;
                                        startup-delay-us = <200>;
                                };
                                ab3100_ldo_k_reg: ab3100_ldo_k {
-                                       regulator-compatible = "ab3100_ldo_k";
                                        regulator-min-microvolt = <1800000>;
                                        regulator-max-microvolt = <2750000>;
                                        startup-delay-us = <200>;
                                };
                                ab3100_ext_reg: ab3100_ext {
-                                       regulator-compatible = "ab3100_ext";
                                };
                                ab3100_buck_reg: ab3100_buck {
-                                       regulator-compatible = "ab3100_buck";
                                        regulator-min-microvolt = <1200000>;
                                        regulator-max-microvolt = <1800000>;
                                        startup-delay-us = <1000>;
index 3f0aeb8288cd2364ab16cdae8211ddd978adda92..ac64781a0a9cc0f5bf0472157f7120224359254e 100644 (file)
 /*
  * TODO:
  *   2x cameras via CSI
- *   audio
  *   AXP battery management
  *   NAND
  *   OTG
  *   Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48
  */
+&codec {
+       /* PH15 controls power to external amplifier (ft2012q) */
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
 
 &ehci0 {
        status = "okay";
        status = "okay";
 
        axp209: pmic@34 {
-               compatible = "x-powers,axp209";
                reg = <0x34>;
                interrupts = <0>;
-
-               interrupt-controller;
-               #interrupt-cells = <1>;
        };
 };
 
+#include "axp209.dtsi"
+
 &i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
 };
 
 &lradc {
-       vref-supply = <&reg_vcc3v0>;
+       vref-supply = <&reg_ldo2>;
 
        status = "okay";
 
        status = "okay";
 };
 
+&pio {
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
 &reg_usb1_vbus {
        status = "okay";
 };
index 487ce63519dcf9f0a79cc0df11a13a121cf715ee..e09053bf5e1ffe0887d7b6dbe1fe08b5788f51c3 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "iNet-1";
                serial0 = &uart0;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_inet>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       ft5x: touchscreen@38 {
+               compatible = "edt,edt-ft5406";
+               reg = <0x38>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_wake_pin>;
+               wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
+               touchscreen-size-x = <600>;
+               touchscreen-size-y = <1024>;
+               touchscreen-swapped-x-y;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       bl_en_pin_inet: bl_en_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       touchscreen_wake_pin: touchscreen_wake_pin@0 {
+               allwinner,pins = "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index 2fffc04340758083ce82031640c8d623ae6aa72c..ca49b0d0ce1e0bad3a3de2552acb04f66ee8b952 100644 (file)
        chosen {
                stdout-path = "serial0:115200n8";
        };
+
+       gpio_keys {
+               compatible = "gpio-keys-polled";
+               pinctrl-names = "default";
+               pinctrl-0 = <&key_pins_inet9f>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+
+               button@0 {
+                       label = "Left Joystick Left";
+                       linux,code = <ABS_X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 6 GPIO_ACTIVE_LOW>; /* PA6 */
+               };
+
+               button@1 {
+                       label = "Left Joystick Right";
+                       linux,code = <ABS_X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 5 GPIO_ACTIVE_LOW>; /* PA5 */
+               };
+
+               button@2 {
+                       label = "Left Joystick Up";
+                       linux,code = <ABS_Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 8 GPIO_ACTIVE_LOW>; /* PA8 */
+               };
+
+               button@3 {
+                       label = "Left Joystick Down";
+                       linux,code = <ABS_Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
+               };
+
+               button@4 {
+                       label = "Right Joystick Left";
+                       linux,code = <ABS_Z>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 1 GPIO_ACTIVE_LOW>; /* PA1 */
+               };
+
+               button@5 {
+                       label = "Right Joystick Right";
+                       linux,code = <ABS_Z>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
+               };
+
+               button@6 {
+                       label = "Right Joystick Up";
+                       linux,code = <ABS_RZ>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 0 3 GPIO_ACTIVE_LOW>; /* PA3 */
+               };
+
+               button@7 {
+                       label = "Right Joystick Down";
+                       linux,code = <ABS_RZ>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 0 4 GPIO_ACTIVE_LOW>; /* PA4 */
+               };
+
+               button@8 {
+                       label = "DPad Left";
+                       linux,code = <ABS_HAT0X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 7 23 GPIO_ACTIVE_LOW>; /* PH23 */
+               };
+
+               button@9 {
+                       label = "DPad Right";
+                       linux,code = <ABS_HAT0X>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
+               };
+
+               button@10 {
+                       label = "DPad Up";
+                       linux,code = <ABS_HAT0Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <0xffffffff>; /* -1 */
+                       gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
+               };
+
+               button@11 {
+                       label = "DPad Down";
+                       linux,code = <ABS_HAT0Y>;
+                       linux,input-type = <EV_ABS>;
+                       linux,input-value = <1>;
+                       gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
+               };
+
+               button@12 {
+                       label = "Button X";
+                       linux,code = <BTN_X>;
+                       gpios = <&pio 0 16 GPIO_ACTIVE_LOW>; /* PA16 */
+               };
+
+               button@13 {
+                       label = "Button Y";
+                       linux,code = <BTN_Y>;
+                       gpios = <&pio 0 14 GPIO_ACTIVE_LOW>; /* PA14 */
+               };
+
+               button@14 {
+                       label = "Button A";
+                       linux,code = <BTN_A>;
+                       gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
+               };
+
+               button@15 {
+                       label = "Button B";
+                       linux,code = <BTN_B>;
+                       gpios = <&pio 0 15 GPIO_ACTIVE_LOW>; /* PA15 */
+               };
+
+               button@16 {
+                       label = "Select Button";
+                       linux,code = <BTN_SELECT>;
+                       gpios = <&pio 0 11 GPIO_ACTIVE_LOW>; /* PA11 */
+               };
+
+               button@17 {
+                       label = "Start Button";
+                       linux,code = <BTN_START>;
+                       gpios = <&pio 0 12 GPIO_ACTIVE_LOW>; /* PA12 */
+               };
+
+               button@18 {
+                       label = "Top Left Button";
+                       linux,code = <BTN_TL>;
+                       gpios = <&pio 7 22 GPIO_ACTIVE_LOW>; /* PH22 */
+               };
+
+               button@19 {
+                       label = "Top Right Button";
+                       linux,code = <BTN_TR>;
+                       gpios = <&pio 0 13 GPIO_ACTIVE_LOW>; /* PA13 */
+               };
+       };
 };
 
 &cpu0 {
 };
 
 &pio {
+       key_pins_inet9f: key_pins@0 {
+               allwinner,pins = "PA0", "PA1", "PA3", "PA4",
+                                "PA5", "PA6", "PA8", "PA9",
+                                "PA11", "PA12", "PA13",
+                                "PA14", "PA15", "PA16", "PA17",
+                                "PH22", "PH23", "PH24", "PH25", "PH26";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
index 3c7eebe170882d67623ed7ca1aa005bb662dddb3..ddf0683cbc6a420137299ad7d688c3bce33597bc 100644 (file)
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
index 82e69c3820a2e9d962ae635547434f3d77450f25..918f97294b33473a1259fe95844832603001de08 100644 (file)
@@ -47,6 +47,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Point of View Protab2-IPS9";
                serial0 = &uart0;
        };
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_en_pin_protab>;
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       pixcir_ts@5c {
+               pinctrl-names = "default";
+               pinctrl-0 = <&touchscreen_pins>;
+               compatible = "pixcir,pixcir_tangoc";
+               reg = <0x5c>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+               attb-gpio = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* PH21 */
+               enable-gpios = <&pio 0 5 GPIO_ACTIVE_LOW>;
+               wake-gpios = <&pio 1 13 GPIO_ACTIVE_LOW>;
+               touchscreen-size-x = <1024>;
+               touchscreen-size-y = <768>;
+               touchscreen-inverted-x;
+               touchscreen-inverted-y;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       bl_en_pin_protab: bl_en_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       touchscreen_pins: touchscreen_pins@0 {
+               allwinner,pins = "PA5", "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index aa90f319309bac5486e072efdd57792907e5d440..2c8f5e6ad90587eefe09593334dd01df426f7012 100644 (file)
@@ -66,7 +66,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -75,7 +75,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>, <&ahb_gates 46>;
+                                <&ahb_gates 44>, <&ahb_gates 46>,
+                                <&dram_gates 25>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -84,7 +85,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
-                                <&ahb_gates 46>;
+                                <&ahb_gates 46>, <&dram_gates 25>,
+                                <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -93,7 +95,8 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0";
                        clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
-                                <&ahb_gates 44>, <&ahb_gates 46>;
+                                <&ahb_gates 44>, <&ahb_gates 46>,
+                                <&dram_gates 25>, <&dram_gates 26>;
                        status = "disabled";
                };
        };
                        clock-output-names = "spi3";
                };
 
+               dram_gates: clk@01c20100 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-dram-gates-clk";
+                       reg = <0x01c20100 0x4>;
+                       clocks = <&pll5 0>;
+                       clock-indices = <0>,
+                                       <1>, <2>,
+                                       <3>,
+                                       <4>,
+                                       <5>, <6>,
+                                       <15>,
+                                       <24>, <25>,
+                                       <26>, <27>,
+                                       <28>, <29>;
+                       clock-output-names = "dram_ve",
+                                            "dram_csi0", "dram_csi1",
+                                            "dram_ts",
+                                            "dram_tvd",
+                                            "dram_tve0", "dram_tve1",
+                                            "dram_output",
+                                            "dram_de_fe1", "dram_de_fe0",
+                                            "dram_de_be0", "dram_de_be1",
+                                            "dram_de_mp", "dram_ace";
+               };
+
+               ve_clk: clk@01c2013c {
+                       #clock-cells = <0>;
+                       #reset-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-ve-clk";
+                       reg = <0x01c2013c 0x4>;
+                       clocks = <&pll4>;
+                       clock-output-names = "ve";
+               };
+
                codec_clk: clk@01c20140 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-a10-codec-clk";
index 2b3511ea2e5dff80ad4d935fb66420a52f205557..a790ec8adb75263c1a20e70d6737c184a51a6736 100644 (file)
        status = "okay";
 };
 
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp152: pmic@30 {
+               compatible = "x-powers,axp152";
+               reg = <0x30>;
+               interrupts = <0>;
+               interrupt-controller;
+               #interrupt-cells = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_t004>;
diff --git a/arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts b/arch/arm/boot/dts/sun5i-a13-empire-electronix-d709.dts
new file mode 100644 (file)
index 0000000..7fbb0b0
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2015 Hans de Goede <hdegoede@redhat.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 "sun5i-a13.dtsi"
+#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       model = "Empire Electronix D709 tablet";
+       compatible = "empire-electronix,d709", "allwinner,sun5i-a13";
+
+       aliases {
+               serial0 = &uart1;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupts = <0>;
+       };
+};
+
+#include "axp209.dtsi"
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+
+       pcf8563: rtc@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_ldo2>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <200000>;
+       };
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <400000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_inet98fv2>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 6 0 GPIO_ACTIVE_HIGH>; /* PG0 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_pins_a>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+
+       mmccard: mmccard@0 {
+               reg = <0>;
+               compatible = "mmc-card";
+               broken-hpi;
+       };
+};
+
+&otg_sram {
+       status = "okay";
+};
+
+&pio {
+       mmc0_cd_pin_inet98fv2: mmc0_cd_pin@0 {
+               allwinner,pins = "PG0";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+
+       usb0_vbus_detect_pin: usb0_vbus_detect_pin@0 {
+               allwinner,pins = "PG1";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_DOWN>;
+       };
+
+       usb0_id_detect_pin: usb0_id_detect_pin@0 {
+               allwinner,pins = "PG2";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1250000>;
+       regulator-max-microvolt = <1250000>;
+       regulator-name = "vdd-int-pll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_ldo3 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+&reg_usb0_vbus {
+       gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins_b>;
+       status = "okay";
+};
+
+&usb_otg {
+       dr_mode = "otg";
+       status = "okay";
+};
+
+&usb0_vbus_pin_a {
+       allwinner,pins = "PG12";
+};
+
+&usbphy {
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
+       usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
+       usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
+       usb0_vbus-supply = <&reg_usb0_vbus>;
+       usb1_vbus-supply = <&reg_ldo3>;
+       status = "okay";
+};
index eb793d5a2bd6748cec5696c2bdbfbbb4999b530f..fa9ddfdcfe9688ab932c8c0ff30b38879fd0d604 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Utoo P66";
        compatible = "utoo,p66", "allwinner,sun5i-a13";
 
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               /* Note levels of 10 / 20% result in backlight off */
+               brightness-levels = <0 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <6>;
+               /* TODO: backlight uses axp gpio1 as enable pin */
+       };
+
        i2c_lcd: i2c@0 {
                /* The lcd panel i2c interface is hooked up via gpios */
                compatible = "i2c-gpio";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 6 3 GPIO_ACTIVE_HIGH>; /* PG3 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
 };
 
 &pio {
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PG3";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_p66: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index b199020733d388b746f9f8bbc6228758d0e1eb3f..360adfb1e9ca56a76094e170e6662d504e115f3c 100644 (file)
        allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
 };
 
-&reg_usb1_vbus {
-       gpio = <&pio 7 27 GPIO_ACTIVE_HIGH>;
+&p2wi {
        status = "okay";
+
+       axp22x: pmic@68 {
+               compatible = "x-powers,axp221";
+               reg = <0x68>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
 };
 
-&usb1_vbus_pin_a {
-       allwinner,pins = "PH27";
+#include "axp22x.dtsi"
+
+&reg_aldo3 {
+       regulator-always-on;
+       regulator-min-microvolt = <2700000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "avcc";
 };
 
-&usbphy {
-       usb1_vbus-supply = <&reg_usb1_vbus>;
-       status = "okay";
+&reg_dc1sw {
+       regulator-name = "vcc-lcd-usb2";
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+};
+
+&reg_dc5ldo {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpus";
+};
+
+&reg_dcdc1 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "vcc-3v0";
+};
+
+&reg_dcdc2 {
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-gpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc4 {
+       regulator-always-on;
+       regulator-min-microvolt = <700000>;
+       regulator-max-microvolt = <1320000>;
+       regulator-name = "vdd-sys-dll";
+};
+
+&reg_dcdc5 {
+       regulator-always-on;
+       regulator-min-microvolt = <1500000>;
+       regulator-max-microvolt = <1500000>;
+       regulator-name = "vcc-dram";
+};
+
+&reg_dldo1 {
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       regulator-name = "vcc-wifi";
+};
+
+/* Voltage source for I2C pullup resistors for I2C Bus 0 */
+&reg_dldo3 {
+       regulator-min-microvolt = <2800000>;
+       regulator-max-microvolt = <2800000>;
+       regulator-name = "vddio-csi";
 };
 
 &uart0 {
        pinctrl-0 = <&uart0_pins_a>;
        status = "okay";
 };
+
+&usbphy {
+       usb1_vbus-supply = <&reg_dldo1>;
+       usb2_vbus-supply = <&reg_dc1sw>;
+       status = "okay";
+};
index fd7594ff90d5e6cddd2622e912c26bfdc25fea94..67c8a7644b99623838b08e142bf2c236f0db5c9e 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
        operating-points = <
diff --git a/arch/arm/boot/dts/sun7i-a20-icnova-swac.dts b/arch/arm/boot/dts/sun7i-a20-icnova-swac.dts
new file mode 100644 (file)
index 0000000..f5b5325
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2015 Stefan Roese <sr@denx.de>
+ *
+ * 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 "sun7i-a20.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "ICnova-A20 SWAC";
+       compatible = "swac,icnova-a20-swac", "incircuit,icnova-a20", "allwinner,sun7i-a20";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ehci0 {
+       status = "okay";
+};
+
+&ehci1 {
+       status = "okay";
+};
+
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_pins_mii_a>;
+       phy = <&phy1>;
+       phy-mode = "mii";
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins_a>;
+       status = "okay";
+
+       axp209: pmic@34 {
+               reg = <0x34>;
+               interrupt-parent = <&nmi_intc>;
+               interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+       };
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_a>;
+       status = "okay";
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; /* PI5 */
+       cd-inverted;
+       status = "okay";
+};
+
+&ohci0 {
+       status = "okay";
+};
+
+&ohci1 {
+       status = "okay";
+};
+
+#include "axp209.dtsi"
+
+&reg_dcdc2 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+       regulator-always-on;
+       regulator-min-microvolt = <1000000>;
+       regulator-max-microvolt = <1400000>;
+       regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+       regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+       regulator-always-on;
+       regulator-min-microvolt = <3000000>;
+       regulator-max-microvolt = <3000000>;
+       regulator-name = "avcc";
+};
+
+&reg_usb1_vbus {
+       status = "okay";
+};
+
+&reg_usb2_vbus {
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
+
+&usbphy {
+       usb1_vbus-supply = <&reg_usb1_vbus>;
+       usb2_vbus-supply = <&reg_usb2_vbus>;
+       status = "okay";
+};
index 4f432f8ade77aa66b388177ab33d9c3b9755d1d1..c9e648d17a1e80ee28e5b7c99414ad5e8923c48a 100644 (file)
        };
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
index b7fe102475e7c19ba78d55ae8c46eb289fddffd8..c3c626b2cfa21d547021871a3c12175bc0aafa55 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright 2015 - Marcus Cooper <codekipper@gmail.com>
+ * Copyright 2015 - Karsten Merker <merker@debian.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
@@ -45,6 +46,7 @@
 #include "sunxi-common-regulators.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/sun4i-a10.h>
 
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &gmac {
        pinctrl-names = "default";
        pinctrl-0 = <&gmac_pins_rgmii_a>;
        };
 };
 
+&lradc {
+       vref-supply = <&reg_vcc3v0>;
+       status = "okay";
+
+       button@190 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <190000>;
+       };
+
+       button@390 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <390000>;
+       };
+
+       button@600 {
+               label = "Menu";
+               linux,code = <KEY_MENU>;
+               channel = <0>;
+               voltage = <600000>;
+       };
+
+       button@800 {
+               label = "Search";
+               linux,code = <KEY_SEARCH>;
+               channel = <0>;
+               voltage = <800000>;
+       };
+
+       button@980 {
+               label = "Home";
+               linux,code = <KEY_HOMEPAGE>;
+               channel = <0>;
+               voltage = <980000>;
+       };
+
+       button@1180 {
+               label = "Esc";
+               linux,code = <KEY_ESC>;
+               channel = <0>;
+               voltage = <1180000>;
+       };
+
+       button@1400 {
+               label = "Enter";
+               linux,code = <KEY_ENTER>;
+               channel = <0>;
+               voltage = <1400000>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
        status = "okay";
 };
 
+&mmc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc3_pins_a>, <&mmc3_cd_pin_olimex_som_evb>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
+       cd-inverted;
+       status = "okay";
+};
+
 &ohci0 {
        status = "okay";
 };
                allwinner,drive = <SUN4I_PINCTRL_20_MA>;
                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
        };
+
+       mmc3_cd_pin_olimex_som_evb: mmc3_cd_pin@0 {
+               allwinner,pins = "PH0";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
 };
 
 &reg_ahci_5v {
index 4f65664e5dfef0de42cbc52545da44c9429c693e..2be04c438b1e144a4616376fa41901b1baf4de33 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &ehci0 {
        status = "okay";
 };
index 1757a6ad74e9c80ea59e527d7c568fb87828b950..ddac7328b852c1593fd269eca8c74ba8505a17fb 100644 (file)
        status = "okay";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
index 861a4a66fb19db62a7649584be9313227283ba39..1a8b39be1d61d83e0666623bb5ba839cfd1c798c 100644 (file)
        allwinner,pins = "PH2";
 };
 
+&codec {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
index 78239ad988e729fc51187b2c4237258a9edddbfb..2f6b21adddd9b963f6b2ec84f2ae1dc289009830 100644 (file)
@@ -48,6 +48,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/pwm/pwm.h>
 
 / {
        model = "Wexler TAB7200";
                serial0 = &uart0;
        };
 
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+               default-brightness-level = <8>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&bl_enable_pin>;
+               enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins_a>;
        status = "okay";
+
+       gt911: touchscreen@5d {
+               compatible = "goodix,gt911";
+               reg = <0x5d>;
+               interrupt-parent = <&pio>;
+               interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>; /* EINT21 (PH21) */
+               pinctrl-names = "default";
+               pinctrl-0 = <&ts_reset_pin>;
+               irq-gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* INT (PH21) */
+               reset-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* RST (PB13) */
+               touchscreen-swapped-x-y;
+       };
 };
 
 &lradc {
 };
 
 &pio {
+       bl_enable_pin: bl_enable_pin@0 {
+               allwinner,pins = "PH7";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PH15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
+       ts_reset_pin: ts_reset_pin@0 {
+               allwinner,pins = "PB13";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        usb0_id_detect_pin: usb0_id_detect_pin@0 {
                allwinner,pins = "PH4";
                allwinner,function = "gpio_in";
        };
 };
 
+&pwm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_pins_a>;
+       status = "okay";
+};
+
 &reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
index 85b500d8cc4cbd178b3310f85b322a8cf25f1f06..dc31d476ef813985b306242bad50a9daad413506 100644 (file)
        status = "okay";
 };
 
+&gmac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&gmac_pins_rgmii_a>;
+       phy = <&phy1>;
+       phy-mode = "rgmii";
+       status = "okay";
+
+       phy1: ethernet-phy@1 {
+               reg = <1>;
+       };
+};
+
 &i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins_a>;
index e02eb720c4fc1ab192bd76ba0aab0893282ee553..0940a788f824396d318214d8ab3d148227cc8fc5 100644 (file)
@@ -68,7 +68,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-hdmi";
                        clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 43>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -76,7 +76,8 @@
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0";
-                       clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>;
+                       clocks = <&pll5 1>, <&ahb_gates 36>, <&ahb_gates 44>,
+                                <&dram_gates 26>;
                        status = "disabled";
                };
 
@@ -85,7 +86,7 @@
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0-tve0";
                        clocks = <&pll5 1>, <&ahb_gates 34>, <&ahb_gates 36>,
-                                <&ahb_gates 44>;
+                                <&ahb_gates 44>, <&dram_gates 26>;
                        status = "disabled";
                };
        };
                        clock-output-names = "spi3";
                };
 
+               dram_gates: clk@01c20100 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-dram-gates-clk";
+                       reg = <0x01c20100 0x4>;
+                       clocks = <&pll5 0>;
+                       clock-indices = <0>,
+                                       <1>, <2>,
+                                       <3>,
+                                       <4>,
+                                       <5>, <6>,
+                                       <15>,
+                                       <24>, <25>,
+                                       <26>, <27>,
+                                       <28>, <29>;
+                       clock-output-names = "dram_ve",
+                                            "dram_csi0", "dram_csi1",
+                                            "dram_ts",
+                                            "dram_tvd",
+                                            "dram_tve0", "dram_tve1",
+                                            "dram_output",
+                                            "dram_de_fe1", "dram_de_fe0",
+                                            "dram_de_be0", "dram_de_be1",
+                                            "dram_de_mp", "dram_ace";
+               };
+
+               ve_clk: clk@01c2013c {
+                       #clock-cells = <0>;
+                       #reset-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-ve-clk";
+                       reg = <0x01c2013c 0x4>;
+                       clocks = <&pll4>;
+                       clock-output-names = "ve";
+               };
+
                codec_clk: clk@01c20140 {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun4i-a10-codec-clk";
index 0c0964d4fa1f81b2a18791f76664012cce3d5c61..6f88fb0ddbc7d13a1f2ee83befbdd111ee36dfb4 100644 (file)
@@ -56,7 +56,7 @@
                #size-cells = <1>;
                ranges;
 
-               framebuffer@0 {
+               simplefb_lcd: framebuffer@0 {
                        compatible = "allwinner,simple-framebuffer",
                                     "simple-framebuffer";
                        allwinner,pipeline = "de_be0-lcd0";
diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
new file mode 100644 (file)
index 0000000..e67df59
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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 "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Xunlong Orange Pi Plus";
+       compatible = "xunlong,orangepi-plus", "allwinner,sun8i-h3";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
+       vmmc-supply = <&reg_vcc3v3>;
+       bus-width = <4>;
+       cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
+       cd-inverted;
+       status = "okay";
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_a>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/sun8i-h3.dtsi b/arch/arm/boot/dts/sun8i-h3.dtsi
new file mode 100644 (file)
index 0000000..1524130
--- /dev/null
@@ -0,0 +1,497 @@
+/*
+ * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.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.
+ */
+
+#include "skeleton.dtsi"
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       interrupt-parent = <&gic>;
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <1>;
+               };
+
+               cpu@2 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <2>;
+               };
+
+               cpu@3 {
+                       compatible = "arm,cortex-a7";
+                       device_type = "cpu";
+                       reg = <3>;
+               };
+       };
+
+       timer {
+               compatible = "arm,armv7-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)>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               osc24M: osc24M_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <24000000>;
+                       clock-output-names = "osc24M";
+               };
+
+               osc32k: osc32k_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <32768>;
+                       clock-output-names = "osc32k";
+               };
+
+               pll1: clk@01c20000 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun8i-a23-pll1-clk";
+                       reg = <0x01c20000 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll1";
+               };
+
+               /* dummy clock until actually implemented */
+               pll5: pll5_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <0>;
+                       clock-output-names = "pll5";
+               };
+
+               pll6: clk@01c20028 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-pll6-clk";
+                       reg = <0x01c20028 0x4>;
+                       clocks = <&osc24M>;
+                       clock-output-names = "pll6", "pll6x2";
+               };
+
+               pll6d2: pll6d2_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-factor-clock";
+                       clock-div = <2>;
+                       clock-mult = <1>;
+                       clocks = <&pll6 0>;
+                       clock-output-names = "pll6d2";
+               };
+
+               /* dummy clock until pll6 can be reused */
+               pll8: pll8_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <1>;
+                       clock-output-names = "pll8";
+               };
+
+               cpu: cpu_clk@01c20050 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-cpu-clk";
+                       reg = <0x01c20050 0x4>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
+                       clock-output-names = "cpu";
+               };
+
+               axi: axi_clk@01c20050 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-axi-clk";
+                       reg = <0x01c20050 0x4>;
+                       clocks = <&cpu>;
+                       clock-output-names = "axi";
+               };
+
+               ahb1: ahb1_clk@01c20054 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun6i-a31-ahb1-clk";
+                       reg = <0x01c20054 0x4>;
+                       clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
+                       clock-output-names = "ahb1";
+               };
+
+               ahb2: ahb2_clk@01c2005c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun8i-h3-ahb2-clk";
+                       reg = <0x01c2005c 0x4>;
+                       clocks = <&ahb1>, <&pll6d2>;
+                       clock-output-names = "ahb2";
+               };
+
+               apb1: apb1_clk@01c20054 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-apb0-clk";
+                       reg = <0x01c20054 0x4>;
+                       clocks = <&ahb1>;
+                       clock-output-names = "apb1";
+               };
+
+               apb2: apb2_clk@01c20058 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-apb1-clk";
+                       reg = <0x01c20058 0x4>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
+                       clock-output-names = "apb2";
+               };
+
+               bus_gates: clk@01c20060 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-h3-bus-gates-clk";
+                       reg = <0x01c20060 0x14>;
+                       clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
+                       clock-names = "ahb1", "ahb2", "apb1", "apb2";
+                       clock-indices = <5>, <6>, <8>,
+                                       <9>, <10>, <13>,
+                                       <14>, <17>, <18>,
+                                       <19>, <20>,
+                                       <21>, <23>,
+                                       <24>, <25>,
+                                       <26>, <27>,
+                                       <28>, <29>,
+                                       <30>, <31>, <32>,
+                                       <35>, <36>, <37>,
+                                       <40>, <41>, <43>,
+                                       <44>, <52>, <53>,
+                                       <54>, <64>,
+                                       <65>, <69>, <72>,
+                                       <76>, <77>, <78>,
+                                       <96>, <97>, <98>,
+                                       <112>, <113>,
+                                       <114>, <115>,
+                                       <116>, <128>, <135>;
+                       clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
+                                            "bus_mmc1", "bus_mmc2", "bus_nand",
+                                            "bus_sdram", "bus_gmac", "bus_ts",
+                                            "bus_hstimer", "bus_spi0",
+                                            "bus_spi1", "bus_otg",
+                                            "bus_otg_ehci0", "bus_ehci1",
+                                            "bus_ehci2", "bus_ehci3",
+                                            "bus_otg_ohci0", "bus_ohci1",
+                                            "bus_ohci2", "bus_ohci3", "bus_ve",
+                                            "bus_lcd0", "bus_lcd1", "bus_deint",
+                                            "bus_csi", "bus_tve", "bus_hdmi",
+                                            "bus_de", "bus_gpu", "bus_msgbox",
+                                            "bus_spinlock", "bus_codec",
+                                            "bus_spdif", "bus_pio", "bus_ths",
+                                            "bus_i2s0", "bus_i2s1", "bus_i2s2",
+                                            "bus_i2c0", "bus_i2c1", "bus_i2c2",
+                                            "bus_uart0", "bus_uart1",
+                                            "bus_uart2", "bus_uart3",
+                                            "bus_scr", "bus_ephy", "bus_dbg";
+               };
+
+               mmc0_clk: clk@01c20088 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-mmc-clk";
+                       reg = <0x01c20088 0x4>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+                       clock-output-names = "mmc0",
+                                            "mmc0_output",
+                                            "mmc0_sample";
+               };
+
+               mmc1_clk: clk@01c2008c {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-mmc-clk";
+                       reg = <0x01c2008c 0x4>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+                       clock-output-names = "mmc1",
+                                            "mmc1_output",
+                                            "mmc1_sample";
+               };
+
+               mmc2_clk: clk@01c20090 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun4i-a10-mmc-clk";
+                       reg = <0x01c20090 0x4>;
+                       clocks = <&osc24M>, <&pll6 0>, <&pll8>;
+                       clock-output-names = "mmc2",
+                                            "mmc2_output",
+                                            "mmc2_sample";
+               };
+
+               mbus_clk: clk@01c2015c {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun8i-a23-mbus-clk";
+                       reg = <0x01c2015c 0x4>;
+                       clocks = <&osc24M>, <&pll6 1>, <&pll5>;
+                       clock-output-names = "mbus";
+               };
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               dma: dma-controller@01c02000 {
+                       compatible = "allwinner,sun8i-h3-dma";
+                       reg = <0x01c02000 0x1000>;
+                       interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&bus_gates 6>;
+                       resets = <&ahb_rst 6>;
+                       #dma-cells = <1>;
+               };
+
+               mmc0: mmc@01c0f000 {
+                       compatible = "allwinner,sun5i-a13-mmc";
+                       reg = <0x01c0f000 0x1000>;
+                       clocks = <&bus_gates 8>,
+                                <&mmc0_clk 0>,
+                                <&mmc0_clk 1>,
+                                <&mmc0_clk 2>;
+                       clock-names = "ahb",
+                                     "mmc",
+                                     "output",
+                                     "sample";
+                       resets = <&ahb_rst 8>;
+                       reset-names = "ahb";
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mmc1: mmc@01c10000 {
+                       compatible = "allwinner,sun5i-a13-mmc";
+                       reg = <0x01c10000 0x1000>;
+                       clocks = <&bus_gates 9>,
+                                <&mmc1_clk 0>,
+                                <&mmc1_clk 1>,
+                                <&mmc1_clk 2>;
+                       clock-names = "ahb",
+                                     "mmc",
+                                     "output",
+                                     "sample";
+                       resets = <&ahb_rst 9>;
+                       reset-names = "ahb";
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               mmc2: mmc@01c11000 {
+                       compatible = "allwinner,sun5i-a13-mmc";
+                       reg = <0x01c11000 0x1000>;
+                       clocks = <&bus_gates 10>,
+                                <&mmc2_clk 0>,
+                                <&mmc2_clk 1>,
+                                <&mmc2_clk 2>;
+                       clock-names = "ahb",
+                                     "mmc",
+                                     "output",
+                                     "sample";
+                       resets = <&ahb_rst 10>;
+                       reset-names = "ahb";
+                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               pio: pinctrl@01c20800 {
+                       compatible = "allwinner,sun8i-h3-pinctrl";
+                       reg = <0x01c20800 0x400>;
+                       interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&bus_gates 69>;
+                       gpio-controller;
+                       #gpio-cells = <3>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+
+                       uart0_pins_a: uart0@0 {
+                               allwinner,pins = "PA4", "PA5";
+                               allwinner,function = "uart0";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       mmc0_pins_a: mmc0@0 {
+                               allwinner,pins = "PF0", "PF1", "PF2", "PF3",
+                                                "PF4", "PF5";
+                               allwinner,function = "mmc0";
+                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       mmc0_cd_pin: mmc0_cd_pin@0 {
+                               allwinner,pins = "PF6";
+                               allwinner,function = "gpio_in";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+                       };
+
+                       mmc1_pins_a: mmc1@0 {
+                               allwinner,pins = "PG0", "PG1", "PG2", "PG3",
+                                                "PG4", "PG5";
+                               allwinner,function = "mmc1";
+                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+               };
+
+               ahb_rst: reset@01c202c0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-ahb1-reset";
+                       reg = <0x01c202c0 0xc>;
+               };
+
+               apb1_rst: reset@01c202d0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d0 0x4>;
+               };
+
+               apb2_rst: reset@01c202d8 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       reg = <0x01c202d8 0x4>;
+               };
+
+               timer@01c20c00 {
+                       compatible = "allwinner,sun4i-a10-timer";
+                       reg = <0x01c20c00 0xa0>;
+                       interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&osc24M>;
+               };
+
+               wdt0: watchdog@01c20ca0 {
+                       compatible = "allwinner,sun6i-a31-wdt";
+                       reg = <0x01c20ca0 0x20>;
+                       interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               uart0: serial@01c28000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28000 0x400>;
+                       interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&bus_gates 112>;
+                       resets = <&apb2_rst 16>;
+                       dmas = <&dma 6>, <&dma 6>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
+               uart1: serial@01c28400 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28400 0x400>;
+                       interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&bus_gates 113>;
+                       resets = <&apb2_rst 17>;
+                       dmas = <&dma 7>, <&dma 7>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
+               uart2: serial@01c28800 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28800 0x400>;
+                       interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&bus_gates 114>;
+                       resets = <&apb2_rst 18>;
+                       dmas = <&dma 8>, <&dma 8>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
+               uart3: serial@01c28c00 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28c00 0x400>;
+                       interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&bus_gates 115>;
+                       resets = <&apb2_rst 19>;
+                       dmas = <&dma 9>, <&dma 9>;
+                       dma-names = "rx", "tx";
+                       status = "disabled";
+               };
+
+               gic: interrupt-controller@01c81000 {
+                       compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
+                       reg = <0x01c81000 0x1000>,
+                             <0x01c82000 0x1000>,
+                             <0x01c84000 0x2000>,
+                             <0x01c86000 0x2000>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+               };
+
+               rtc: rtc@01f00000 {
+                       compatible = "allwinner,sun6i-a31-rtc";
+                       reg = <0x01f00000 0x54>;
+                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+               };
+       };
+};
index 6484dcf6987300d3857cd642de8447d2aa4807d4..382bd9fc5647abbe4e23eb0d8ac3ed855cd1cd4d 100644 (file)
                stdout-path = "serial0:115200n8";
        };
 
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins_cubieboard4>;
+
+               green {
+                       label = "cubieboard4:green:usr";
+                       gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
+               };
+
+               red {
+                       label = "cubieboard4:red:usr";
+                       gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+               };
+       };
 };
 
 &pio {
+       led_pins_cubieboard4: led-pins@0 {
+               allwinner,pins = "PH6", "PH17";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
                allwinner,pins = "PH18";
                allwinner,function = "gpio_in";
        status = "okay";
 };
 
+&r_ir {
+       status = "okay";
+};
+
+&r_rsb {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
index 6ce4b5e8b615a64eb1ade806b4db1a899a095b17..c0060e4f7379fe775d78f6dfb9d5db4c169f7a05 100644 (file)
@@ -65,7 +65,7 @@
        leds {
                compatible = "gpio-leds";
                pinctrl-names = "default";
-               pinctrl-0 = <&led_pins_optimus>;
+               pinctrl-0 = <&led_pins_optimus>, <&led_r_pins_optimus>;
 
                /* The LED names match those found on the board */
 
                        gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
                };
 
-               /* led3 is on PM15, in R_PIO */
+               led3 {
+                       label = "optimus:led3:usr";
+                       gpios = <&r_pio 1 15 GPIO_ACTIVE_HIGH>; /* PM15 */
+               };
 
                led4 {
                        label = "optimus:led4:usr";
        status = "okay";
 };
 
+&r_ir {
+       status = "okay";
+};
+
+&r_pio {
+       led_r_pins_optimus: led-pins@1 {
+               allwinner,pins = "PM15";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+};
+
+&r_rsb {
+       status = "okay";
+};
+
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pins_a>;
index 1118bf5cc4fbe95e9f4d6485d1cc317b774f25d1..e838f206f2a0f34f361bf858d00a6762b4d5739c 100644 (file)
                 */
                ranges = <0 0 0 0x20000000>;
 
+               /*
+                * This clock is actually configurable from the PRCM address
+                * space. The external 24M oscillator can be turned off, and
+                * the clock switched to an internal 16M RC oscillator. Under
+                * normal operation there's no reason to do this, and the
+                * default is to use the external good one, so just model this
+                * as a fixed clock. Also it is not entirely clear if the
+                * osc24M mux in the PRCM affects the entire clock tree, which
+                * would also throw all the PLL clock rates off, or just the
+                * downstream clocks in the PRCM.
+                */
                osc24M: osc24M_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                        clock-output-names = "osc24M";
                };
 
+               /*
+                * The 32k clock is from an external source, normally the
+                * AC100 codec/RTC chip. This clock is by default enabled
+                * and clocked at 32768 Hz, from the oscillator connected
+                * to the AC100. It is configurable, but no such driver or
+                * bindings exist yet.
+                */
                osc32k: osc32k_clk {
                        #clock-cells = <0>;
                        compatible = "fixed-clock";
                                             "usb_phy2", "usb_hsic_12M";
                };
 
+               pll3: clk@06000008 {
+                       /* placeholder until implemented */
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-rate = <0>;
+                       clock-output-names = "pll3";
+               };
+
                pll4: clk@0600000c {
                        #clock-cells = <0>;
                        compatible = "allwinner,sun9i-a80-pll4-clk";
                                        "apb1_uart2", "apb1_uart3",
                                        "apb1_uart4", "apb1_uart5";
                };
+
+               cpus_clk: clk@08001410 {
+                       compatible = "allwinner,sun9i-a80-cpus-clk";
+                       reg = <0x08001410 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll4>, <&pll3>;
+                       clock-output-names = "cpus";
+               };
+
+               ahbs: ahbs_clk {
+                       compatible = "fixed-factor-clock";
+                       #clock-cells = <0>;
+                       clock-div = <1>;
+                       clock-mult = <1>;
+                       clocks = <&cpus_clk>;
+                       clock-output-names = "ahbs";
+               };
+
+               apbs: clk@0800141c {
+                       compatible = "allwinner,sun8i-a23-apb0-clk";
+                       reg = <0x0800141c 0x4>;
+                       #clock-cells = <0>;
+                       clocks = <&ahbs>;
+                       clock-output-names = "apbs";
+               };
+
+               apbs_gates: clk@08001428 {
+                       compatible = "allwinner,sun9i-a80-apbs-gates-clk";
+                       reg = <0x08001428 0x4>;
+                       #clock-cells = <1>;
+                       clocks = <&apbs>;
+                       clock-indices = <0>, <1>,
+                                       <2>, <3>,
+                                       <4>, <5>,
+                                       <6>, <7>,
+                                       <12>, <13>,
+                                       <16>, <17>,
+                                       <18>, <20>;
+                       clock-output-names = "apbs_pio", "apbs_ir",
+                                       "apbs_timer", "apbs_rsb",
+                                       "apbs_uart", "apbs_1wire",
+                                       "apbs_i2c0", "apbs_i2c1",
+                                       "apbs_ps2_0", "apbs_ps2_1",
+                                       "apbs_dma", "apbs_i2s0",
+                                       "apbs_i2s1", "apbs_twd";
+               };
+
+               r_1wire_clk: clk@08001450 {
+                       reg = <0x08001450 0x4>;
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       clocks = <&osc32k>, <&osc24M>;
+                       clock-output-names = "r_1wire";
+               };
+
+               r_ir_clk: clk@08001454 {
+                       reg = <0x08001454 0x4>;
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-mod0-clk";
+                       clocks = <&osc32k>, <&osc24M>;
+                       clock-output-names = "r_ir";
+               };
        };
 
        soc {
                        interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                };
 
+               apbs_rst: reset@080014b0 {
+                       reg = <0x080014b0 0x4>;
+                       compatible = "allwinner,sun6i-a31-clock-reset";
+                       #reset-cells = <1>;
+               };
+
+               nmi_intc: interrupt-controller@080015a0 {
+                       compatible = "allwinner,sun9i-a80-nmi";
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       reg = <0x080015a0 0xc>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               r_ir: ir@08002000 {
+                       compatible = "allwinner,sun5i-a13-ir";
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_ir_pins>;
+                       clocks = <&apbs_gates 1>, <&r_ir_clk>;
+                       clock-names = "apb", "ir";
+                       resets = <&apbs_rst 1>;
+                       reg = <0x08002000 0x40>;
+                       status = "disabled";
+               };
+
                r_uart: serial@08002800 {
                        compatible = "snps,dw-apb-uart";
                        reg = <0x08002800 0x400>;
                        interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
                        reg-shift = <2>;
                        reg-io-width = <4>;
-                       clocks = <&osc24M>;
+                       clocks = <&apbs_gates 4>;
+                       resets = <&apbs_rst 4>;
+                       status = "disabled";
+               };
+
+               r_pio: pinctrl@08002c00 {
+                       compatible = "allwinner,sun9i-a80-r-pinctrl";
+                       reg = <0x08002c00 0x400>;
+                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apbs_gates 0>;
+                       resets = <&apbs_rst 0>;
+                       gpio-controller;
+                       interrupt-controller;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       #gpio-cells = <3>;
+
+                       r_ir_pins: r_ir {
+                               allwinner,pins = "PL6";
+                               allwinner,function = "s_cir_rx";
+                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
+                       r_rsb_pins: r_rsb {
+                               allwinner,pins = "PN0", "PN1";
+                               allwinner,function = "s_rsb";
+                               allwinner,drive = <SUN4I_PINCTRL_20_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+                       };
+               };
+
+               r_rsb: i2c@08003400 {
+                       compatible = "allwinner,sun8i-a23-rsb";
+                       reg = <0x08003400 0x400>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&apbs_gates 3>;
+                       clock-frequency = <3000000>;
+                       resets = <&apbs_rst 3>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_rsb_pins>;
                        status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                };
        };
 };
diff --git a/arch/arm/boot/dts/tango4-common.dtsi b/arch/arm/boot/dts/tango4-common.dtsi
new file mode 100644 (file)
index 0000000..ef665d2
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * Based on Mans Rullgard's Tango3 DT
+ * https://github.com/mansr/linux-tangox
+ */
+
+#define CPU_CLK 0
+#define SYS_CLK 1
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       periph_clk: periph_clk {
+               compatible = "fixed-factor-clock";
+               clocks = <&clkgen CPU_CLK>;
+               clock-mult = <1>;
+               clock-div  = <2>;
+               #clock-cells = <0>;
+       };
+
+       mpcore {
+               compatible = "simple-bus";
+               ranges = <0x00000000 0x20000000 0x2000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               scu@0 {
+                       compatible = "arm,cortex-a9-scu";
+                       reg = <0x0 0x100>;
+               };
+
+               twd@600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x600 0x10>;
+                       interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&periph_clk>;
+                       always-on;
+               };
+
+               gic: interrupt-controller@1000 {
+                       compatible = "arm,cortex-a9-gic";
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+                       reg = <0x1000 0x1000>, <0x100 0x100>;
+               };
+       };
+
+       l2cc: l2-cache-controller@20100000 {
+               compatible = "arm,pl310-cache";
+               reg = <0x20100000 0x1000>;
+               cache-level = <2>;
+               cache-unified;
+       };
+
+       soc {
+               compatible = "simple-bus";
+               interrupt-parent = <&irq0>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               xtal: xtal {
+                       compatible = "fixed-clock";
+                       clock-frequency = <27000000>;
+                       #clock-cells = <0>;
+               };
+
+               clkgen: clkgen@10000 {
+                       compatible = "sigma,tango4-clkgen";
+                       reg = <0x10000 0x40>;
+                       clocks = <&xtal>;
+                       #clock-cells = <1>;
+               };
+
+               tick-counter@10048 {
+                       compatible = "sigma,tick-counter";
+                       reg = <0x10048 0x4>;
+                       clocks = <&xtal>;
+               };
+
+               uart: serial@10700 {
+                       compatible = "ralink,rt2880-uart";
+                       reg = <0x10700 0x30>;
+                       interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+                       clock-frequency = <7372800>;
+                       reg-shift = <2>;
+               };
+
+               eth0: ethernet@26000 {
+                       compatible = "sigma,smp8734-ethernet";
+                       reg = <0x26000 0x800>;
+                       interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clkgen SYS_CLK>;
+               };
+
+               intc: interrupt-controller@6e000 {
+                       compatible = "sigma,smp8642-intc";
+                       reg = <0x6e000 0x400>;
+                       ranges = <0 0x6e000 0x400>;
+                       interrupt-parent = <&gic>;
+                       interrupt-controller;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       irq0: irq0@000 {
+                               reg = <0x000 0x100>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       irq1: irq1@100 {
+                               reg = <0x100 0x100>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       irq2: irq2@300 {
+                               reg = <0x300 0x100>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/tango4-smp8758.dtsi b/arch/arm/boot/dts/tango4-smp8758.dtsi
new file mode 100644 (file)
index 0000000..7ed88ee
--- /dev/null
@@ -0,0 +1,31 @@
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "sigma,tango4-smp";
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&l2cc>;
+                       device_type = "cpu";
+                       reg = <0>;
+               };
+
+               cpu1: cpu@1 {
+                       compatible = "arm,cortex-a9";
+                       next-level-cache = <&l2cc>;
+                       device_type = "cpu";
+                       reg = <1>;
+               };
+       };
+
+       pmu {
+               compatible = "arm,cortex-a9-pmu";
+               interrupt-affinity = <&cpu0>, <&cpu1>;
+               interrupts =
+                       <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
+                       <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+       };
+};
diff --git a/arch/arm/boot/dts/tango4-vantage-1172.dts b/arch/arm/boot/dts/tango4-vantage-1172.dts
new file mode 100644 (file)
index 0000000..3e5b9c8
--- /dev/null
@@ -0,0 +1,37 @@
+/dts-v1/;
+
+#include "tango4-smp8758.dtsi"
+#include "tango4-common.dtsi"
+
+/ {
+       model = "Sigma Designs SMP8758 Vantage-1172 Rev E1";
+       compatible = "sigma,vantage-1172", "sigma,smp8758", "sigma,tango4";
+
+       aliases {
+               serial = &uart;
+       };
+
+       memory@80000000 {
+               device_type = "memory";
+               reg = <0x80000000 0x80000000>; /* 2 GB */
+       };
+
+       chosen {
+               stdout-path = "serial:115200n8";
+       };
+};
+
+&eth0 {
+       phy-connection-type = "rgmii";
+       phy-handle = <&eth0_phy>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       /* Atheros AR8035 */
+       eth0_phy: ethernet-phy@4 {
+               compatible = "ethernet-phy-id004d.d072",
+                            "ethernet-phy-ieee802.3-c22";
+               interrupts = <37 IRQ_TYPE_EDGE_RISING>;
+               reg = <4>;
+       };
+};
diff --git a/arch/arm/boot/dts/tps65217.dtsi b/arch/arm/boot/dts/tps65217.dtsi
deleted file mode 100644 (file)
index a632724..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.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
- * published by the Free Software Foundation.
- */
-
-/*
- * Integrated Power Management Chip
- * http://www.ti.com/lit/ds/symlink/tps65217.pdf
- */
-
-&tps {
-       compatible = "ti,tps65217";
-
-       regulators {
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               dcdc1_reg: regulator@0 {
-                       reg = <0>;
-                       regulator-compatible = "dcdc1";
-               };
-
-               dcdc2_reg: regulator@1 {
-                       reg = <1>;
-                       regulator-compatible = "dcdc2";
-               };
-
-               dcdc3_reg: regulator@2 {
-                       reg = <2>;
-                       regulator-compatible = "dcdc3";
-               };
-
-               ldo1_reg: regulator@3 {
-                       reg = <3>;
-                       regulator-compatible = "ldo1";
-               };
-
-               ldo2_reg: regulator@4 {
-                       reg = <4>;
-                       regulator-compatible = "ldo2";
-               };
-
-               ldo3_reg: regulator@5 {
-                       reg = <5>;
-                       regulator-compatible = "ldo3";
-               };
-
-               ldo4_reg: regulator@6 {
-                       reg = <6>;
-                       regulator-compatible = "ldo4";
-               };
-       };
-};
index 3537ae5b2146211febbfd9c5e255e2ad34c07f3f..5288e6dffef78ac73e15295ebfd0dcba8275d35f 100644 (file)
@@ -19,7 +19,7 @@
         */
        twl4030_pins: pinmux_twl4030_pins {
                pinctrl-single,pins = <
-                       0x1b0 (PIN_INPUT_PULLUP | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* sys_nirq.sys_nirq */
+                       OMAP3_CORE1_IOPAD(0x21e0, PIN_INPUT_PULLUP | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* sys_nirq.sys_nirq */
                >;
        };
 };
index a4fa5703c42b554522cc69273a053940816a3781..e373f59cea9c6150d1596a39310551cb1d0ee0c6 100644 (file)
@@ -24,7 +24,7 @@
 &omap4_pmx_wkup {
        twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
                pinctrl-single,pins = <
-                       0x14 (PIN_OUTPUT | MUX_MODE2)           /* fref_clk0_out.sys_drm_msecure */
+                       OMAP4_IOPAD(0x054, PIN_OUTPUT | MUX_MODE2)              /* fref_clk0_out.sys_drm_msecure */
                >;
        };
 };
@@ -32,7 +32,7 @@
 &omap4_pmx_core {
        twl6030_pins: pinmux_twl6030_pins {
                pinctrl-single,pins = <
-                       0x15e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0)        /* sys_nirq1.sys_nirq1 */
+                       OMAP4_IOPAD(0x19e, WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0)    /* sys_nirq1.sys_nirq1 */
                >;
        };
 };
diff --git a/arch/arm/boot/dts/uniphier-common32.dtsi b/arch/arm/boot/dts/uniphier-common32.dtsi
new file mode 100644 (file)
index 0000000..ea9301a
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * Device Tree Source commonly used by UniPhier ARM SoCs
+ *
+ * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.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.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+       soc: soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               interrupt-parent = <&intc>;
+
+               extbus: extbus {
+                       compatible = "simple-bus";
+                       #address-cells = <2>;
+                       #size-cells = <1>;
+               };
+
+               serial0: serial@54006800 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006800 0x40>;
+                       interrupts = <0 33 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart0>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial1: serial@54006900 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006900 0x40>;
+                       interrupts = <0 35 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart1>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial2: serial@54006a00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006a00 0x40>;
+                       interrupts = <0 37 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart2>;
+                       clocks = <&uart_clk>;
+               };
+
+               serial3: serial@54006b00 {
+                       compatible = "socionext,uniphier-uart";
+                       status = "disabled";
+                       reg = <0x54006b00 0x40>;
+                       interrupts = <0 177 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_uart3>;
+                       clocks = <&uart_clk>;
+               };
+
+               system-bus-controller@58c00000 {
+                       compatible = "socionext,uniphier-system-bus-controller";
+                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
+               };
+
+               timer@60000200 {
+                       compatible = "arm,cortex-a9-global-timer";
+                       reg = <0x60000200 0x20>;
+                       interrupts = <1 11 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               timer@60000600 {
+                       compatible = "arm,cortex-a9-twd-timer";
+                       reg = <0x60000600 0x20>;
+                       interrupts = <1 13 0x104>;
+                       clocks = <&arm_timer_clk>;
+               };
+
+               intc: interrupt-controller@60001000 {
+                       compatible = "arm,cortex-a9-gic";
+                       reg = <0x60001000 0x1000>,
+                             <0x60000100 0x100>;
+                       #interrupt-cells = <3>;
+                       interrupt-controller;
+               };
+
+               pinctrl: pinctrl@5f801000 {
+                       /* specify compatible in each SoC DTSI */
+                       reg = <0x5f801000 0xe00>;
+               };
+       };
+};
+
+/include/ "uniphier-pinctrl.dtsi"
index af493819548dca9f5fed87d104a403aa5d713a46..34f0d8dcd81470a2d60b4809a89598ac050f896e 100644 (file)
@@ -42,7 +42,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-ld4";
                        clock-frequency = <100000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               l2: l2-cache@500c0000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
-                             <0x506c0000 0x400>;
-                       interrupts = <0 174 4>, <0 175 4>;
-                       cache-unified;
-                       cache-size = <(512 * 1024)>;
-                       cache-sets = <256>;
-                       cache-line-size = <128>;
-                       cache-level = <2>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               i2c0: i2c@58400000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58400000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58480000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58480000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               /* chip-internal connection for DMD */
-               i2c2: i2c@58500000 {
-                       compatible = "socionext,uniphier-i2c";
-                       reg = <0x58500000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <400000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(512 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               i2c3: i2c@58580000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58580000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
+       i2c0: i2c@58400000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58400000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller@58c00000 {
-                       compatible = "socionext,uniphier-system-bus-controller";
-                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
-               };
+       i2c1: i2c@58480000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58480000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb0: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 80 4>;
-               };
+       /* chip-internal connection for DMD */
+       i2c2: i2c@58500000 {
+               compatible = "socionext,uniphier-i2c";
+               reg = <0x58500000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <400000>;
+       };
 
-               usb1: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       interrupts = <0 81 4>;
-               };
+       i2c3: i2c@58580000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58580000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb2: usb@5a820100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a820100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 82 4>;
-               };
+       usb0: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-ld4-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       usb1: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb2: usb@5a820100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a820100 0x100>;
+               interrupts = <0 82 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
+       };
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+};
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
-       };
+&serial3 {
+       interrupts = <0 29 4>;
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-ld4-pinctrl", "syscon";
+};
index 254642fe0e71300f112a6b57eb379f7f1ff42722..d78142fb35c42f847024fcc6ba66dbdffe87166a 100644 (file)
@@ -42,7 +42,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-pro4";
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               l2: l2-cache@500c0000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
-                             <0x506c0000 0x400>;
-                       interrupts = <0 174 4>, <0 175 4>;
-                       cache-unified;
-                       cache-size = <(768 * 1024)>;
-                       cache-sets = <256>;
-                       cache-line-size = <128>;
-                       cache-level = <2>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               /* i2c4 does not exist */
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(768 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller@58c00000 {
-                       compatible = "socionext,uniphier-system-bus-controller";
-                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
-               };
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb2: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 80 4>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb3: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb3>;
-                       interrupts = <0 81 4>;
-               };
+       /* i2c4 does not exist */
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-pro4-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       /* chip-internal connection for DMD */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb2: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
+       };
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+       usb3: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb3>;
        };
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-pro4-pinctrl", "syscon";
+};
index 11eb76239feb7b549931e3940107a23d3d0d10e3..2f389ea75e0150b9a5127394027b277b8c99bf7d 100644 (file)
@@ -42,7 +42,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-pro5";
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               l2: l2-cache@500c0000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c0000 0x2000>, <0x503c0100 0x8>,
-                             <0x506c0000 0x400>;
-                       interrupts = <0 190 4>, <0 191 4>;
-                       cache-unified;
-                       cache-size = <(2 * 1024 * 1024)>;
-                       cache-sets = <512>;
-                       cache-line-size = <128>;
-                       cache-level = <2>;
-                       next-level-cache = <&l3>;
-               };
-
-               l3: l3-cache@500c8000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c8000 0x2000>, <0x503c8100 0x8>,
-                             <0x506c8000 0x400>;
-                       interrupts = <0 174 4>, <0 175 4>;
-                       cache-unified;
-                       cache-size = <(2 * 1024 * 1024)>;
-                       cache-sets = <512>;
-                       cache-line-size = <256>;
-                       cache-level = <3>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 177 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x8>, <0x506c0000 0x400>;
+               interrupts = <0 190 4>, <0 191 4>;
+               cache-unified;
+               cache-size = <(2 * 1024 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+               next-level-cache = <&l3>;
+       };
 
-               /* i2c4 does not exist */
+       l3: l3-cache@500c8000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c8000 0x2000>, <0x503c8100 0x8>, <0x506c8000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(2 * 1024 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <256>;
+               cache-level = <3>;
+       };
 
-               /* chip-internal connection for DMD */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller@58c00000 {
-                       compatible = "socionext,uniphier-system-bus-controller";
-                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
-               };
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-pro5-pinctrl", "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+       /* i2c4 does not exist */
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x304>;
-                       clocks = <&arm_timer_clk>;
-               };
+       /* chip-internal connection for DMD */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
        };
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,ph1-pro5-pinctrl", "syscon";
+};
index e88559b66be75399634ec1f855813cd0a06ea78d..7d06a1c487d8c8fa059983e4c97c605d15254ef4 100644 (file)
@@ -42,7 +42,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,ph1-sld8";
                        clock-frequency = <100000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               l2: l2-cache@500c0000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
-                             <0x506c0000 0x400>;
-                       interrupts = <0 174 4>, <0 175 4>;
-                       cache-unified;
-                       cache-size = <(256 * 1024)>;
-                       cache-sets = <256>;
-                       cache-line-size = <128>;
-                       cache-level = <2>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 29 4>;
-                       clocks = <&uart_clk>;
-                       fifo-size = <64>;
-               };
-
-               i2c0: i2c@58400000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58400000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58480000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58480000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               /* chip-internal connection for DMD */
-               i2c2: i2c@58500000 {
-                       compatible = "socionext,uniphier-i2c";
-                       reg = <0x58500000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <400000>;
-               };
-
-               i2c3: i2c@58580000 {
-                       compatible = "socionext,uniphier-i2c";
-                       status = "disabled";
-                       reg = <0x58580000 0x40>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 1>;
-                       clocks = <&iobus_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               system-bus-controller@58c00000 {
-                       compatible = "socionext,uniphier-system-bus-controller";
-                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>;
+               cache-unified;
+               cache-size = <(256 * 1024)>;
+               cache-sets = <256>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               usb0: usb@5a800100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a800100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb0>;
-                       interrupts = <0 80 4>;
-               };
+       i2c0: i2c@58400000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58400000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb1: usb@5a810100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a810100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb1>;
-                       interrupts = <0 81 4>;
-               };
+       i2c1: i2c@58480000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58480000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               usb2: usb@5a820100 {
-                       compatible = "socionext,uniphier-ehci", "generic-ehci";
-                       status = "disabled";
-                       reg = <0x5a820100 0x100>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_usb2>;
-                       interrupts = <0 82 4>;
-               };
+       /* chip-internal connection for DMD */
+       i2c2: i2c@58500000 {
+               compatible = "socionext,uniphier-i2c";
+               reg = <0x58500000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 43 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <400000>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,ph1-sld8-pinctrl",
-                                    "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       i2c3: i2c@58580000 {
+               compatible = "socionext,uniphier-i2c";
+               status = "disabled";
+               reg = <0x58580000 0x40>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&iobus_clk>;
+               clock-frequency = <100000>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb0: usb@5a800100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a800100 0x100>;
+               interrupts = <0 80 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb0>;
+       };
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0x104>;
-                       clocks = <&arm_timer_clk>;
-               };
+       usb1: usb@5a810100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a810100 0x100>;
+               interrupts = <0 81 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1>;
+       };
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+       usb2: usb@5a820100 {
+               compatible = "socionext,uniphier-ehci", "generic-ehci";
+               status = "disabled";
+               reg = <0x5a820100 0x100>;
+               interrupts = <0 82 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb2>;
        };
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&serial3 {
+       interrupts = <0 29 4>;
+};
+
+&pinctrl {
+       compatible = "socionext,ph1-sld8-pinctrl", "syscon";
+};
index 259f1a909e2401db2bd09e86476781e54583ec92..6bd353f2d77efceaeb1dd38a9991072190092f8d 100644 (file)
@@ -42,7 +42,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "uniphier-common32.dtsi"
 
 / {
        compatible = "socionext,proxstream2";
                        clock-frequency = <50000000>;
                };
        };
+};
 
-       soc {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-               interrupt-parent = <&intc>;
-
-               extbus: extbus {
-                       compatible = "simple-bus";
-                       #address-cells = <2>;
-                       #size-cells = <1>;
-               };
-
-               l2: l2-cache@500c0000 {
-                       compatible = "socionext,uniphier-system-cache";
-                       reg = <0x500c0000 0x2000>, <0x503c0100 0x4>,
-                             <0x506c0000 0x400>;
-                       interrupts = <0 174 4>, <0 175 4>, <0 190 4>, <0 191 4>;
-                       cache-unified;
-                       cache-size = <(1280 * 1024)>;
-                       cache-sets = <512>;
-                       cache-line-size = <128>;
-                       cache-level = <2>;
-               };
-
-               serial0: serial@54006800 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006800 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart0>;
-                       interrupts = <0 33 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial1: serial@54006900 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006900 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart1>;
-                       interrupts = <0 35 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial2: serial@54006a00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006a00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart2>;
-                       interrupts = <0 37 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               serial3: serial@54006b00 {
-                       compatible = "socionext,uniphier-uart";
-                       status = "disabled";
-                       reg = <0x54006b00 0x40>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_uart3>;
-                       interrupts = <0 177 4>;
-                       clocks = <&uart_clk>;
-               };
-
-               i2c0: i2c@58780000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58780000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c0>;
-                       interrupts = <0 41 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c1: i2c@58781000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58781000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c1>;
-                       interrupts = <0 42 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c2: i2c@58782000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58782000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c2>;
-                       interrupts = <0 43 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               i2c3: i2c@58783000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       status = "disabled";
-                       reg = <0x58783000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&pinctrl_i2c3>;
-                       interrupts = <0 44 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <100000>;
-               };
-
-               /* chip-internal connection for DMD */
-               i2c4: i2c@58784000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58784000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 45 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+&soc {
+       l2: l2-cache@500c0000 {
+               compatible = "socionext,uniphier-system-cache";
+               reg = <0x500c0000 0x2000>, <0x503c0100 0x4>, <0x506c0000 0x400>;
+               interrupts = <0 174 4>, <0 175 4>, <0 190 4>, <0 191 4>;
+               cache-unified;
+               cache-size = <(1280 * 1024)>;
+               cache-sets = <512>;
+               cache-line-size = <128>;
+               cache-level = <2>;
+       };
 
-               /* chip-internal connection for STM */
-               i2c5: i2c@58785000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58785000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 25 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c0: i2c@58780000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58780000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 41 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c0>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               /* chip-internal connection for HDMI */
-               i2c6: i2c@58786000 {
-                       compatible = "socionext,uniphier-fi2c";
-                       reg = <0x58786000 0x80>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       interrupts = <0 26 4>;
-                       clocks = <&i2c_clk>;
-                       clock-frequency = <400000>;
-               };
+       i2c1: i2c@58781000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58781000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 42 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c1>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               system-bus-controller@58c00000 {
-                       compatible = "socionext,uniphier-system-bus-controller";
-                       reg = <0x58c00000 0x400>, <0x59800000 0x2000>;
-               };
+       i2c2: i2c@58782000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58782000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c2>;
+               interrupts = <0 43 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               pinctrl: pinctrl@5f801000 {
-                       compatible = "socionext,proxstream2-pinctrl", "syscon";
-                       reg = <0x5f801000 0xe00>;
-               };
+       i2c3: i2c@58783000 {
+               compatible = "socionext,uniphier-fi2c";
+               status = "disabled";
+               reg = <0x58783000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 44 4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_i2c3>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <100000>;
+       };
 
-               timer@60000200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x60000200 0x20>;
-                       interrupts = <1 11 0xf04>;
-                       clocks = <&arm_timer_clk>;
-               };
+       /* chip-internal connection for DMD */
+       i2c4: i2c@58784000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58784000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 45 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               timer@60000600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x60000600 0x20>;
-                       interrupts = <1 13 0xf04>;
-                       clocks = <&arm_timer_clk>;
-               };
+       /* chip-internal connection for STM */
+       i2c5: i2c@58785000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58785000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 25 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
+       };
 
-               intc: interrupt-controller@60001000 {
-                       compatible = "arm,cortex-a9-gic";
-                       #interrupt-cells = <3>;
-                       interrupt-controller;
-                       reg = <0x60001000 0x1000>,
-                             <0x60000100 0x100>;
-               };
+       /* chip-internal connection for HDMI */
+       i2c6: i2c@58786000 {
+               compatible = "socionext,uniphier-fi2c";
+               reg = <0x58786000 0x80>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               interrupts = <0 26 4>;
+               clocks = <&i2c_clk>;
+               clock-frequency = <400000>;
        };
 };
 
-/include/ "uniphier-pinctrl.dtsi"
+&pinctrl {
+       compatible = "socionext,proxstream2-pinctrl", "syscon";
+};
index 12edafefd44a3dfb17a5aae66a3fdeb3b8788679..9beea8976584e5067d68ec895c5b9ab1d8eb7929 100644 (file)
                        label = "user_pb";
                        gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
                        linux,code = <28>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index 68c0de36c339f7662b7545e072a60762b82627db..8cc6edb296942762772e5fb4e51cdc99ae219af7 100644 (file)
                        label = "user_pb";
                        gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
                        linux,code = <28>;
-                       gpio-key,wakeup;
+                       wakeup-source;
                };
        };
 
index e5949b9349453394688ba62bd4073c817049ac58..6e556be42ccdca53e1b109d8c664bb43dbfa0635 100644 (file)
        status = "okay";
 };
 
+&can0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan0>;
+       status = "disabled";
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       status = "disabled";
+};
+
 &dspi1 {
        bus-num = <1>;
        pinctrl-names = "default";
 
 &iomuxc {
        vf610-colibri {
+               pinctrl_flexcan0: can0grp {
+                       fsl,pins = <
+                               VF610_PAD_PTB14__CAN0_RX        0x31F1
+                               VF610_PAD_PTB15__CAN0_TX        0x31F2
+                       >;
+               };
+
+               pinctrl_flexcan1: can1grp {
+                       fsl,pins = <
+                               VF610_PAD_PTB16__CAN1_RX        0x31F1
+                               VF610_PAD_PTB17__CAN1_TX        0x31F2
+                       >;
+               };
+
                pinctrl_gpio_ext: gpio_ext {
                        fsl,pins = <
                                VF610_PAD_PTD10__GPIO_89        0x22ed /* EXT_IO_0 */
index 19fe045b83342a6ee0f55a02b1490c291b9537dd..2d7eab7552100225efcf2cb5d52a5443459f6a58 100644 (file)
@@ -18,8 +18,3 @@
                reg = <0x80000000 0x10000000>;
        };
 };
-
-&L2 {
-       arm,data-latency = <2 1 2>;
-       arm,tag-latency = <3 2 3>;
-};
index 5f8eb1bd782bf01a6454aa7cb63682835c179650..58bc6e448be5601ed8d04106fbcc193793f040f1 100644 (file)
@@ -19,7 +19,7 @@
                reg = <0x40006000 0x1000>;
                cache-unified;
                cache-level = <2>;
-               arm,data-latency = <1 1 1>;
+               arm,data-latency = <3 3 3>;
                arm,tag-latency = <2 2 2>;
        };
 };
diff --git a/arch/arm/boot/dts/vf610m4-cosmic.dts b/arch/arm/boot/dts/vf610m4-cosmic.dts
new file mode 100644 (file)
index 0000000..8944a2d
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Device tree for Cosmic+ VF6xx Cortex-M4 support
+ *
+ * Copyright (C) 2015
+ *
+ * Based on vf610m4 Colibri
+ *
+ * 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 , 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 "vf610m4.dtsi"
+
+/ {
+       model = "VF610 Cortex-M4";
+       compatible = "fsl,vf610m4";
+};
+
+&gpio0 {
+       status = "disabled";
+};
+
+&gpio1 {
+       status = "disabled";
+};
+
+&gpio2 {
+       status = "disabled";
+};
+
+&gpio3 {
+       status = "disabled";
+};
+
+&gpio4 {
+       status = "disabled";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       status = "okay";
+};
+
+&iomuxc {
+       vf610-cosmic {
+               pinctrl_uart3: uart3grp {
+                       fsl,pins = <
+                               VF610_PAD_PTA20__UART3_TX               0x21a2
+                               VF610_PAD_PTA21__UART3_RX               0x21a1
+                       >;
+               };
+       };
+};
index 6736bae43a5b09280ec824146e6caee85f787cdd..a9ceb5bac40ef244dc6ca18602eef4072b87a57d 100644 (file)
                                interrupts = <67 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks VF610_CLK_DSPI0>;
                                clock-names = "dspi";
-                               spi-num-chipselects = <5>;
+                               spi-num-chipselects = <6>;
                                status = "disabled";
                        };
 
                                interrupts = <68 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks VF610_CLK_DSPI1>;
                                clock-names = "dspi";
-                               spi-num-chipselects = <5>;
+                               spi-num-chipselects = <4>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,vf610-sai";
                                reg = <0x40031000 0x1000>;
                                interrupts = <86 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks VF610_CLK_SAI2>;
-                               clock-names = "sai";
+                               clocks = <&clks VF610_CLK_SAI2>,
+                                       <&clks VF610_CLK_SAI2_DIV>,
+                                       <&clks 0>, <&clks 0>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
                                dma-names = "tx", "rx";
                                dmas = <&edma0 0 21>,
                                        <&edma0 0 20>;
                                status = "disabled";
                        };
 
+                       dspi2: dspi2@400ac000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,vf610-dspi";
+                               reg = <0x400ac000 0x1000>;
+                               interrupts = <69 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks VF610_CLK_DSPI2>;
+                               clock-names = "dspi";
+                               spi-num-chipselects = <2>;
+                               status = "disabled";
+                       };
+
+                       dspi3: dspi3@400ad000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,vf610-dspi";
+                               reg = <0x400ad000 0x1000>;
+                               interrupts = <70 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks VF610_CLK_DSPI3>;
+                               clock-names = "dspi";
+                               spi-num-chipselects = <2>;
+                               status = "disabled";
+                       };
+
                        adc1: adc@400bb000 {
                                compatible = "fsl,vf610-adc";
                                reg = <0x400bb000 0x1000>;
                                clock-names = "adc";
                                #io-channel-cells = <1>;
                                status = "disabled";
+                               fsl,adck-max-frequency = <30000000>, <40000000>,
+                                                       <20000000>;
                        };
 
                        esdhc0: esdhc@400b1000 {
                                        <&clks VF610_CLK_ESDHC0>;
                                clock-names = "ipg", "ahb", "per";
                                status = "disabled";
-                               fsl,adck-max-frequency = <30000000>, <40000000>,
-                                                       <20000000>;
                        };
 
                        esdhc1: esdhc@400b2000 {
index 1a5220e05109022dda87912a0145666176f670e0..f283ff08381c5b0765cfee9c062cdb3baedd8eab 100644 (file)
@@ -19,7 +19,7 @@
                #address-cells = <1>;
                #size-cells = <0>;
 
-               cpu@0 {
+               cpu0: cpu@0 {
                        compatible = "arm,cortex-a9";
                        device_type = "cpu";
                        reg = <0>;
@@ -33,7 +33,7 @@
                        >;
                };
 
-               cpu@1 {
+               cpu1: cpu@1 {
                        compatible = "arm,cortex-a9";
                        device_type = "cpu";
                        reg = <1>;
                        #gpio-cells = <2>;
                        clocks = <&clkc 42>;
                        gpio-controller;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                        interrupt-parent = <&intc>;
                        interrupts = <0 20 4>;
                        reg = <0xe000a000 0x1000>;
                slcr: slcr@f8000000 {
                        #address-cells = <1>;
                        #size-cells = <1>;
-                       compatible = "xlnx,zynq-slcr", "syscon", "simple-bus";
+                       compatible = "xlnx,zynq-slcr", "syscon", "simple-mfd";
                        reg = <0xF8000000 0x1000>;
                        ranges;
                        clkc: clkc@100 {
index 5df8f81f4217968ef094fb33acb98086033f5248..cb64209bca08cbb05b506a45a7b3e45b58a09142 100644 (file)
                        label = "sw14";
                        gpios = <&gpio0 12 0>;
                        linux,code = <108>; /* down */
-                       gpio-key,wakeup;
+                       wakeup-source;
                        autorepeat;
                };
                sw13 {
                        label = "sw13";
                        gpios = <&gpio0 14 0>;
                        linux,code = <103>; /* up */
-                       gpio-key,wakeup;
+                       wakeup-source;
                        autorepeat;
                };
        };
index 1b1e5acd76e2ebd8545f5da91397366b264a989f..e4b1be66b3f56a8d0ecb2590559902bb347b539b 100644 (file)
@@ -125,7 +125,6 @@ CONFIG_POWER_RESET=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_AT91SAM9X_WATCHDOG=y
-CONFIG_SSB=m
 CONFIG_MFD_ATMEL_HLCDC=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
index a0c57ac88b2756c0a4cdf0b9758e4df65d975833..63f7e6ce649a8630e3f5471a7fea60ee483c5496 100644 (file)
@@ -129,7 +129,6 @@ CONFIG_GPIO_SYSFS=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_POWER_RESET=y
 # CONFIG_HWMON is not set
-CONFIG_SSB=m
 CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
index be1d07d59ee9784c7b3dd12a2150a009c7c742ba..1bd9510de1b9ced64b1947f2734ddbf4c8ce4f5d 100644 (file)
@@ -40,6 +40,11 @@ extern void arch_trigger_all_cpu_backtrace(bool);
 #define arch_trigger_all_cpu_backtrace(x) arch_trigger_all_cpu_backtrace(x)
 #endif
 
+static inline int nr_legacy_irqs(void)
+{
+       return NR_IRQS_LEGACY;
+}
+
 #endif
 
 #endif
index 7a2a32a1d5a8c3fef87e995ac349435de1daeb6f..ede692ffa32ed14958f81eec0d7caac8f7efe853 100644 (file)
 #define __NR_execveat                  (__NR_SYSCALL_BASE+387)
 #define __NR_userfaultfd               (__NR_SYSCALL_BASE+388)
 #define __NR_membarrier                        (__NR_SYSCALL_BASE+389)
+#define __NR_mlock2                    (__NR_SYSCALL_BASE+390)
 
 /*
  * The following SWIs are ARM private.
index 6551d28c27e687068bc69af093a9a97805362d46..066f7f9ba411e09b5e492a84f03034b86305e38f 100644 (file)
 #include <asm/mach/pci.h>
 
 static int debug_pci;
-static resource_size_t (*align_resource)(struct pci_dev *dev,
-                 const struct resource *res,
-                 resource_size_t start,
-                 resource_size_t size,
-                 resource_size_t align) = NULL;
 
 /*
  * We can't use pci_get_device() here since we are
@@ -461,7 +456,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
                sys->busnr   = busnr;
                sys->swizzle = hw->swizzle;
                sys->map_irq = hw->map_irq;
-               align_resource = hw->align_resource;
                INIT_LIST_HEAD(&sys->resources);
 
                if (hw->private_data)
@@ -470,6 +464,8 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
                ret = hw->setup(nr, sys);
 
                if (ret > 0) {
+                       struct pci_host_bridge *host_bridge;
+
                        ret = pcibios_init_resources(nr, sys);
                        if (ret)  {
                                kfree(sys);
@@ -491,6 +487,9 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
                        busnr = sys->bus->busn_res.end + 1;
 
                        list_add(&sys->node, head);
+
+                       host_bridge = pci_find_host_bridge(sys->bus);
+                       host_bridge->align_resource = hw->align_resource;
                } else {
                        kfree(sys);
                        if (ret < 0)
@@ -578,14 +577,18 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
 {
        struct pci_dev *dev = data;
        resource_size_t start = res->start;
+       struct pci_host_bridge *host_bridge;
 
        if (res->flags & IORESOURCE_IO && start & 0x300)
                start = (start + 0x3ff) & ~0x3ff;
 
        start = (start + align - 1) & ~(align - 1);
 
-       if (align_resource)
-               return align_resource(dev, res, start, size, align);
+       host_bridge = pci_find_host_bridge(dev->bus);
+
+       if (host_bridge->align_resource)
+               return host_bridge->align_resource(dev, res,
+                               start, size, align);
 
        return start;
 }
index fde6c88d560cffcf8d1433fe486695e763704ca9..ac368bb068d1409af37a8e2585bb837b1ef1f02b 100644 (file)
                CALL(sys_execveat)
                CALL(sys_userfaultfd)
                CALL(sys_membarrier)
+               CALL(sys_mlock2)
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
index eab83b2435b8b8ed2abc6342e3a22e19da80d623..e06fd299de0846b44b72cd037eacd05b0b2cb051 100644 (file)
@@ -563,18 +563,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
                if (vcpu->arch.power_off || vcpu->arch.pause)
                        vcpu_sleep(vcpu);
 
-               /*
-                * Disarming the background timer must be done in a
-                * preemptible context, as this call may sleep.
-                */
-               kvm_timer_flush_hwstate(vcpu);
-
                /*
                 * Preparing the interrupts to be injected also
                 * involves poking the GIC, which must be done in a
                 * non-preemptible context.
                 */
                preempt_disable();
+               kvm_timer_flush_hwstate(vcpu);
                kvm_vgic_flush_hwstate(vcpu);
 
                local_irq_disable();
index 6984342da13d09fd0194563f4b598cfb913ec6c1..7dace909d5cf158c9f7771da8ef7c951ee2dea1c 100644 (file)
@@ -98,6 +98,11 @@ static void kvm_flush_dcache_pud(pud_t pud)
        __kvm_flush_dcache_pud(pud);
 }
 
+static bool kvm_is_device_pfn(unsigned long pfn)
+{
+       return !pfn_valid(pfn);
+}
+
 /**
  * stage2_dissolve_pmd() - clear and flush huge PMD entry
  * @kvm:       pointer to kvm structure.
@@ -213,7 +218,7 @@ static void unmap_ptes(struct kvm *kvm, pmd_t *pmd,
                        kvm_tlb_flush_vmid_ipa(kvm, addr);
 
                        /* No need to invalidate the cache for device mappings */
-                       if ((pte_val(old_pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE)
+                       if (!kvm_is_device_pfn(__phys_to_pfn(addr)))
                                kvm_flush_dcache_pte(old_pte);
 
                        put_page(virt_to_page(pte));
@@ -305,8 +310,7 @@ static void stage2_flush_ptes(struct kvm *kvm, pmd_t *pmd,
 
        pte = pte_offset_kernel(pmd, addr);
        do {
-               if (!pte_none(*pte) &&
-                   (pte_val(*pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE)
+               if (!pte_none(*pte) && !kvm_is_device_pfn(__phys_to_pfn(addr)))
                        kvm_flush_dcache_pte(*pte);
        } while (pte++, addr += PAGE_SIZE, addr != end);
 }
@@ -1037,11 +1041,6 @@ static bool kvm_is_write_fault(struct kvm_vcpu *vcpu)
        return kvm_vcpu_dabt_iswrite(vcpu);
 }
 
-static bool kvm_is_device_pfn(unsigned long pfn)
-{
-       return !pfn_valid(pfn);
-}
-
 /**
  * stage2_wp_ptes - write protect PMD range
  * @pmd:       pointer to pmd entry
index 72d622baaad3165ee3e920e6c5fc774e79cf26c5..df1d44bdc375b8c053ca258aa6e6027697e9fc98 100644 (file)
        @ check low interrupts
        ldr     \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
        ldr     \tmp, [\base, #IRQ_MASK_LOW_OFF]
-       mov     \irqnr, #31
+       mov     \irqnr, #32
        ands    \irqstat, \irqstat, \tmp
 
        @ if no low interrupts set, check high interrupts
        ldreq   \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
        ldreq   \tmp, [\base, #IRQ_MASK_HIGH_OFF]
-       moveq   \irqnr, #63
+       moveq   \irqnr, #64
        andeqs  \irqstat, \irqstat, \tmp
 
        @ find first active interrupt source
index 8e7976a4c3e723e1b27a08928700bac2b6cb9a09..cfc696b972f323e07b5e9a180755130e63e5e1b2 100644 (file)
@@ -177,6 +177,7 @@ static struct irq_chip imx_gpc_chip = {
        .irq_unmask             = imx_gpc_irq_unmask,
        .irq_retrigger          = irq_chip_retrigger_hierarchy,
        .irq_set_wake           = imx_gpc_irq_set_wake,
+       .irq_set_type           = irq_chip_set_type_parent,
 #ifdef CONFIG_SMP
        .irq_set_affinity       = irq_chip_set_affinity_parent,
 #endif
index d019a080a559a467acd503c94c0f70ec7c0050af..2f9f09ac51bd0b6c13915d581b08bd140398d725 100644 (file)
@@ -44,6 +44,7 @@ static void __init mediatek_timer_init(void)
 };
 
 static const char * const mediatek_board_dt_compat[] = {
+       "mediatek,mt2701",
        "mediatek,mt6589",
        "mediatek,mt6592",
        "mediatek,mt8127",
index 5305ec7341eca5579398a10b72f263a2fbbe8e0e..79e1f876d1c9b9f28dc862e013e7bc657153fd4f 100644 (file)
@@ -143,9 +143,9 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
                 * Ensure that CPU power state is set to ON to avoid CPU
                 * powerdomain transition on wfi
                 */
-               clkdm_wakeup(cpu1_clkdm);
-               omap_set_pwrdm_state(cpu1_pwrdm, PWRDM_POWER_ON);
-               clkdm_allow_idle(cpu1_clkdm);
+               clkdm_wakeup_nolock(cpu1_clkdm);
+               pwrdm_set_next_pwrst(cpu1_pwrdm, PWRDM_POWER_ON);
+               clkdm_allow_idle_nolock(cpu1_clkdm);
 
                if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) {
                        while (gic_dist_disabled()) {
index cc8a987149e2737db4bf255075d5baf3bc2b2bb0..48495ad82aba16775ff2108ead31ceb820a023b5 100644 (file)
@@ -890,6 +890,36 @@ static int _init_opt_clks(struct omap_hwmod *oh)
        return ret;
 }
 
+static void _enable_optional_clocks(struct omap_hwmod *oh)
+{
+       struct omap_hwmod_opt_clk *oc;
+       int i;
+
+       pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name);
+
+       for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
+               if (oc->_clk) {
+                       pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
+                                __clk_get_name(oc->_clk));
+                       clk_enable(oc->_clk);
+               }
+}
+
+static void _disable_optional_clocks(struct omap_hwmod *oh)
+{
+       struct omap_hwmod_opt_clk *oc;
+       int i;
+
+       pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name);
+
+       for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
+               if (oc->_clk) {
+                       pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
+                                __clk_get_name(oc->_clk));
+                       clk_disable(oc->_clk);
+               }
+}
+
 /**
  * _enable_clocks - enable hwmod main clock and interface clocks
  * @oh: struct omap_hwmod *
@@ -917,6 +947,9 @@ static int _enable_clocks(struct omap_hwmod *oh)
                        clk_enable(os->_clk);
        }
 
+       if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
+               _enable_optional_clocks(oh);
+
        /* The opt clocks are controlled by the device driver. */
 
        return 0;
@@ -948,41 +981,14 @@ static int _disable_clocks(struct omap_hwmod *oh)
                        clk_disable(os->_clk);
        }
 
+       if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
+               _disable_optional_clocks(oh);
+
        /* The opt clocks are controlled by the device driver. */
 
        return 0;
 }
 
-static void _enable_optional_clocks(struct omap_hwmod *oh)
-{
-       struct omap_hwmod_opt_clk *oc;
-       int i;
-
-       pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name);
-
-       for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
-               if (oc->_clk) {
-                       pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
-                                __clk_get_name(oc->_clk));
-                       clk_enable(oc->_clk);
-               }
-}
-
-static void _disable_optional_clocks(struct omap_hwmod *oh)
-{
-       struct omap_hwmod_opt_clk *oc;
-       int i;
-
-       pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name);
-
-       for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
-               if (oc->_clk) {
-                       pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
-                                __clk_get_name(oc->_clk));
-                       clk_disable(oc->_clk);
-               }
-}
-
 /**
  * _omap4_enable_module - enable CLKCTRL modulemode on OMAP4
  * @oh: struct omap_hwmod *
index ca6df1a734756fa6640067b9158dc1112e37b2a1..76bce11c85a40c477a5b87aab919d5b8dfded5e8 100644 (file)
@@ -523,6 +523,8 @@ struct omap_hwmod_omap4_prcm {
  * HWMOD_RECONFIG_IO_CHAIN: omap_hwmod code needs to reconfigure wake-up 
  *     events by calling _reconfigure_io_chain() when a device is enabled
  *     or idled.
+ * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
+ *     operate and they need to be handled at the same time as the main_clk.
  */
 #define HWMOD_SWSUP_SIDLE                      (1 << 0)
 #define HWMOD_SWSUP_MSTANDBY                   (1 << 1)
@@ -538,6 +540,7 @@ struct omap_hwmod_omap4_prcm {
 #define HWMOD_FORCE_MSTANDBY                   (1 << 11)
 #define HWMOD_SWSUP_SIDLE_ACT                  (1 << 12)
 #define HWMOD_RECONFIG_IO_CHAIN                        (1 << 13)
+#define HWMOD_OPT_CLKS_NEEDED                  (1 << 14)
 
 /*
  * omap_hwmod._int_flags definitions
index 51d1ecb384bdddb95c1996258de93ee9ba9b85ec..ee4e04434a943ea573210fb2468ba29a36232f07 100644 (file)
@@ -1297,6 +1297,44 @@ static struct omap_hwmod dra7xx_mcspi4_hwmod = {
        .dev_attr       = &mcspi4_dev_attr,
 };
 
+/*
+ * 'mcasp' class
+ *
+ */
+static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
+       .sysc_offs      = 0x0004,
+       .sysc_flags     = SYSC_HAS_SIDLEMODE,
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type3,
+};
+
+static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
+       .name   = "mcasp",
+       .sysc   = &dra7xx_mcasp_sysc,
+};
+
+/* mcasp3 */
+static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
+       { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
+};
+
+static struct omap_hwmod dra7xx_mcasp3_hwmod = {
+       .name           = "mcasp3",
+       .class          = &dra7xx_mcasp_hwmod_class,
+       .clkdm_name     = "l4per2_clkdm",
+       .main_clk       = "mcasp3_aux_gfclk_mux",
+       .flags          = HWMOD_OPT_CLKS_NEEDED,
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
+                       .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+       .opt_clks       = mcasp3_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(mcasp3_opt_clks),
+};
+
 /*
  * 'mmc' class
  *
@@ -2566,6 +2604,22 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+/* l4_per2 -> mcasp3 */
+static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
+       .master         = &dra7xx_l4_per2_hwmod,
+       .slave          = &dra7xx_mcasp3_hwmod,
+       .clk            = "l4_root_clk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+/* l3_main_1 -> mcasp3 */
+static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
+       .master         = &dra7xx_l3_main_1_hwmod,
+       .slave          = &dra7xx_mcasp3_hwmod,
+       .clk            = "l3_iclk_div",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* l4_per1 -> elm */
 static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
        .master         = &dra7xx_l4_per1_hwmod,
@@ -3308,6 +3362,8 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
        &dra7xx_l4_wkup__dcan1,
        &dra7xx_l4_per2__dcan2,
        &dra7xx_l4_per2__cpgmac0,
+       &dra7xx_l4_per2__mcasp3,
+       &dra7xx_l3_main_1__mcasp3,
        &dra7xx_gmac__mdio,
        &dra7xx_l4_cfg__dma_system,
        &dra7xx_l3_main_1__dss,
index 1dfe34654c43a353a34ac2cb9b941ff9f951b275..62269a30a978302ace575af1349626681f392aea 100644 (file)
@@ -24,9 +24,6 @@
 #include <linux/platform_data/iommu-omap.h>
 #include <linux/platform_data/wkup_m3.h>
 
-#include <asm/siginfo.h>
-#include <asm/signal.h>
-
 #include "common.h"
 #include "common-board-devices.h"
 #include "dss-common.h"
@@ -153,6 +150,21 @@ static struct platform_device wl18xx_device = {
        }
 };
 
+static struct ti_st_plat_data wilink7_pdata = {
+       .nshutdown_gpio = 162,
+       .dev_name = "/dev/ttyO1",
+       .flow_cntrl = 1,
+       .baud_rate = 300000,
+};
+
+static struct platform_device wl128x_device = {
+       .name   = "kim",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &wilink7_pdata,
+       }
+};
+
 static struct platform_device btwilink_device = {
        .name   = "btwilink",
        .id     = -1,
@@ -279,6 +291,13 @@ static void __init omap3_tao3530_legacy_init(void)
        hsmmc2_internal_input_clk();
 }
 
+static void __init omap3_logicpd_torpedo_init(void)
+{
+       omap3_gpio126_127_129();
+       platform_device_register(&wl128x_device);
+       platform_device_register(&btwilink_device);
+}
+
 /* omap3pandora legacy devices */
 #define PANDORA_WIFI_IRQ_GPIO          21
 #define PANDORA_WIFI_NRESET_GPIO       23
@@ -385,29 +404,6 @@ static void __init omap3_pandora_legacy_init(void)
 }
 #endif /* CONFIG_ARCH_OMAP3 */
 
-#ifdef CONFIG_SOC_TI81XX
-static int fault_fixed_up;
-
-static int t410_abort_handler(unsigned long addr, unsigned int fsr,
-                             struct pt_regs *regs)
-{
-       if ((fsr == 0x406 || fsr == 0xc06) && !fault_fixed_up) {
-               pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
-                       addr, fsr);
-               fault_fixed_up = 1;
-               return 0;
-       }
-
-       return 1;
-}
-
-static void __init t410_abort_init(void)
-{
-       hook_fault_code(16 + 6, t410_abort_handler, SIGBUS, BUS_OBJERR,
-                       "imprecise external abort");
-}
-#endif
-
 #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
 static struct iommu_platform_data omap4_iommu_pdata = {
        .reset_name = "mmu_cache",
@@ -529,16 +525,13 @@ static struct pdata_init pdata_quirks[] __initdata = {
        { "nokia,omap3-n950", hsmmc2_internal_input_clk, },
        { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
        { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
-       { "logicpd,dm3730-torpedo-devkit", omap3_gpio126_127_129, },
+       { "logicpd,dm3730-torpedo-devkit", omap3_logicpd_torpedo_init, },
        { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
        { "ti,am3517-evm", am3517_evm_legacy_init, },
        { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
        { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
        { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
 #endif
-#ifdef CONFIG_SOC_TI81XX
-       { "hp,t410", t410_abort_init, },
-#endif
 #ifdef CONFIG_SOC_OMAP5
        { "ti,omap5-uevm", omap5_uevm_legacy_init, },
 #endif
index 87b98bf92366f4f816ca4f53a32ecae305930016..2dbd3785ee6f0d00b4c3d88bada28d83c0203b2a 100644 (file)
@@ -301,11 +301,11 @@ static void omap3_pm_idle(void)
        if (omap_irq_pending())
                return;
 
-       trace_cpu_idle(1, smp_processor_id());
+       trace_cpu_idle_rcuidle(1, smp_processor_id());
 
        omap_sram_idle();
 
-       trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id());
+       trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
 }
 
 #ifdef CONFIG_SUSPEND
index 79eb502a1e64a67a7b716d0b31d7db0903aeab9f..73919a36b5775f1facd9cde91be9ef872ab7e18e 100644 (file)
@@ -21,5 +21,5 @@
        @ find cause bits that are unmasked
        ands    \irqstat, \irqstat, \tmp        @ clear Z flag if any
        clzne   \irqnr, \irqstat                @ calc irqnr
-       rsbne   \irqnr, \irqnr, #31
+       rsbne   \irqnr, \irqnr, #32
        .endm
index 13eba2b26e0aa478e7e26eb541855be091ac68e0..8fbfb10047ec30543b4ccf4c7e6787d9fd5ae5b0 100644 (file)
@@ -344,7 +344,7 @@ void __init palm27x_pwm_init(int bl, int lcd)
 {
        palm_bl_power   = bl;
        palm_lcd_power  = lcd;
-       pwm_add_lookup(palm27x_pwm_lookup, ARRAY_SIZE(palm27x_pwm_lookup));
+       pwm_add_table(palm27x_pwm_lookup, ARRAY_SIZE(palm27x_pwm_lookup));
        platform_device_register(&palm27x_backlight);
 }
 #endif
index aebf6de62468962b9398f6ee299c0539920cbba8..0b5c3876720cc3215949a6cbcf017bdf41f1eec8 100644 (file)
@@ -169,7 +169,7 @@ static inline void palmtc_keys_init(void) {}
 #if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
 static struct pwm_lookup palmtc_pwm_lookup[] = {
        PWM_LOOKUP("pxa25x-pwm.1", 0, "pwm-backlight.0", NULL, PALMTC_PERIOD_NS,
-                  PWM_PERIOD_NORMAL),
+                  PWM_POLARITY_NORMAL),
 };
 
 static struct platform_pwm_backlight_data palmtc_backlight_data = {
index 1d2825cb7a65050bc7b05bed4b200f3e8036349a..5fce87f7f254c2fa4b052c5ab91d11a91e2e3a15 100644 (file)
@@ -19,7 +19,7 @@
 #include "common.h"
 #include "rcar-gen2.h"
 
-static const char *r8a7793_boards_compat_dt[] __initconst = {
+static const char * const r8a7793_boards_compat_dt[] __initconst = {
        "renesas,r8a7793",
        NULL,
 };
index 7fdc5bf24f9b5c05d055f59932b285db4b85d465..446334a25cf5c6f0db61a9c10558e6c1e57b7823 100644 (file)
@@ -13,7 +13,7 @@ config SOC_ZX296702
        select ARM_GLOBAL_TIMER
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
-       select PM_GENERIC_DOMAINS
+       select PM_GENERIC_DOMAINS if PM
        help
          Support for ZTE ZX296702 SoC which is a dual core CortexA9MP
 endif
index 9ac16a482ff1e690b9b6aa66a09225cec831966b..871f21783866d5fdb1557ec56e5f13b602ba331a 100644 (file)
@@ -49,7 +49,7 @@ config ARM64
        select HAVE_ARCH_AUDITSYSCALL
        select HAVE_ARCH_BITREVERSE
        select HAVE_ARCH_JUMP_LABEL
-       select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP
+       select HAVE_ARCH_KASAN if SPARSEMEM_VMEMMAP && !(ARM64_16K_PAGES && ARM64_VA_BITS_48)
        select HAVE_ARCH_KGDB
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
@@ -316,6 +316,27 @@ config ARM64_ERRATUM_832075
 
          If unsure, say Y.
 
+config ARM64_ERRATUM_834220
+       bool "Cortex-A57: 834220: Stage 2 translation fault might be incorrectly reported in presence of a Stage 1 fault"
+       depends on KVM
+       default y
+       help
+         This option adds an alternative code sequence to work around ARM
+         erratum 834220 on Cortex-A57 parts up to r1p2.
+
+         Affected Cortex-A57 parts might report a Stage 2 translation
+         fault as the result of a Stage 1 fault for load crossing a
+         page boundary when there is a permission or device memory
+         alignment fault at Stage 1 and a translation fault at Stage 2.
+
+         The workaround is to verify that the Stage 1 translation
+         doesn't generate a fault before handling the Stage 2 fault.
+         Please note that this does not necessarily enable the workaround,
+         as it depends on the alternative framework, which will only patch
+         the kernel if an affected CPU is detected.
+
+         If unsure, say Y.
+
 config ARM64_ERRATUM_845719
        bool "Cortex-A53: 845719: a load might read incorrect data"
        depends on COMPAT
index 4dd5f93d0303f9302e80f171ed9bfbeff8bb994b..fd71a87588f1dc2c7a2244d3dddccf4995232e7c 100644 (file)
@@ -15,7 +15,7 @@
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/power/mt8173-power.h>
-#include <dt-bindings/reset-controller/mt8173-resets.h>
+#include <dt-bindings/reset/mt8173-resets.h>
 #include "mt8173-pinfunc.h"
 
 / {
index 11d5bb0fdd541052b9cdd49197b2dc90e9ece737..8f271b83f9106c7c9753ce2601d3b59e1ffbdfc5 100644 (file)
@@ -29,8 +29,9 @@
 #define ARM64_HAS_PAN                          4
 #define ARM64_HAS_LSE_ATOMICS                  5
 #define ARM64_WORKAROUND_CAVIUM_23154          6
+#define ARM64_WORKAROUND_834220                        7
 
-#define ARM64_NCAPS                            7
+#define ARM64_NCAPS                            8
 
 #ifndef __ASSEMBLY__
 
@@ -46,8 +47,12 @@ enum ftr_type {
 #define FTR_STRICT     true    /* SANITY check strict matching required */
 #define FTR_NONSTRICT  false   /* SANITY check ignored */
 
+#define FTR_SIGNED     true    /* Value should be treated as signed */
+#define FTR_UNSIGNED   false   /* Value should be treated as unsigned */
+
 struct arm64_ftr_bits {
-       bool            strict;   /* CPU Sanity check: strict matching required ? */
+       bool            sign;   /* Value is signed ? */
+       bool            strict; /* CPU Sanity check: strict matching required ? */
        enum ftr_type   type;
        u8              shift;
        u8              width;
@@ -123,6 +128,18 @@ cpuid_feature_extract_field(u64 features, int field)
        return cpuid_feature_extract_field_width(features, field, 4);
 }
 
+static inline unsigned int __attribute_const__
+cpuid_feature_extract_unsigned_field_width(u64 features, int field, int width)
+{
+       return (u64)(features << (64 - width - field)) >> (64 - width);
+}
+
+static inline unsigned int __attribute_const__
+cpuid_feature_extract_unsigned_field(u64 features, int field)
+{
+       return cpuid_feature_extract_unsigned_field_width(features, field, 4);
+}
+
 static inline u64 arm64_ftr_mask(struct arm64_ftr_bits *ftrp)
 {
        return (u64)GENMASK(ftrp->shift + ftrp->width - 1, ftrp->shift);
@@ -130,7 +147,9 @@ static inline u64 arm64_ftr_mask(struct arm64_ftr_bits *ftrp)
 
 static inline s64 arm64_ftr_value(struct arm64_ftr_bits *ftrp, u64 val)
 {
-       return cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width);
+       return ftrp->sign ?
+               cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width) :
+               cpuid_feature_extract_unsigned_field_width(val, ftrp->shift, ftrp->width);
 }
 
 static inline bool id_aa64mmfr0_mixed_endian_el0(u64 mmfr0)
index e54415ec693571d1d4195d57b1928e2e58173353..9732908bfc8a54b546c4cab40802f70a56b36fce 100644 (file)
@@ -138,16 +138,18 @@ extern struct pmu perf_ops_bp;
 /* Determine number of BRP registers available. */
 static inline int get_num_brps(void)
 {
+       u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
        return 1 +
-               cpuid_feature_extract_field(read_system_reg(SYS_ID_AA64DFR0_EL1),
+               cpuid_feature_extract_unsigned_field(dfr0,
                                                ID_AA64DFR0_BRPS_SHIFT);
 }
 
 /* Determine number of WRP registers available. */
 static inline int get_num_wrps(void)
 {
+       u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1);
        return 1 +
-               cpuid_feature_extract_field(read_system_reg(SYS_ID_AA64DFR0_EL1),
+               cpuid_feature_extract_unsigned_field(dfr0,
                                                ID_AA64DFR0_WRPS_SHIFT);
 }
 
index 23eb450b820ba03ce83b737f308fcd3d6b33f9a8..8e8d30684392b1065b0c5d1f65e7715e4028331c 100644 (file)
@@ -7,4 +7,9 @@ struct pt_regs;
 
 extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
 
+static inline int nr_legacy_irqs(void)
+{
+       return 0;
+}
+
 #endif
index 17e92f05b1fe597ea1c4e833debf7541be0fde79..3ca894ecf699b33693e214479ca196bced5fa0c3 100644 (file)
@@ -99,11 +99,13 @@ static inline void vcpu_set_thumb(struct kvm_vcpu *vcpu)
        *vcpu_cpsr(vcpu) |= COMPAT_PSR_T_BIT;
 }
 
+/*
+ * vcpu_reg should always be passed a register number coming from a
+ * read of ESR_EL2. Otherwise, it may give the wrong result on AArch32
+ * with banked registers.
+ */
 static inline unsigned long *vcpu_reg(const struct kvm_vcpu *vcpu, u8 reg_num)
 {
-       if (vcpu_mode_is_32bit(vcpu))
-               return vcpu_reg32(vcpu, reg_num);
-
        return (unsigned long *)&vcpu_gp_regs(vcpu)->regs.regs[reg_num];
 }
 
index 24926f2504f7aaf2e37a6f9ecf1692ce3fff422b..feb6b4efa6414846d5598ccb0913a544ba0cf441 100644 (file)
@@ -75,6 +75,15 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
                           (1 << MIDR_VARIANT_SHIFT) | 2),
        },
 #endif
+#ifdef CONFIG_ARM64_ERRATUM_834220
+       {
+       /* Cortex-A57 r0p0 - r1p2 */
+               .desc = "ARM erratum 834220",
+               .capability = ARM64_WORKAROUND_834220,
+               MIDR_RANGE(MIDR_CORTEX_A57, 0x00,
+                          (1 << MIDR_VARIANT_SHIFT) | 2),
+       },
+#endif
 #ifdef CONFIG_ARM64_ERRATUM_845719
        {
        /* Cortex-A53 r0p[01234] */
index c8cf89223b5a8ceb3564e77cc5a6893e5c8eb99d..0669c63281ea01a93ef9794f9731b424b6afd28e 100644 (file)
@@ -44,8 +44,9 @@ unsigned int compat_elf_hwcap2 __read_mostly;
 
 DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
 
-#define ARM64_FTR_BITS(STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL) \
+#define __ARM64_FTR_BITS(SIGNED, STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL) \
        {                                               \
+               .sign = SIGNED,                         \
                .strict = STRICT,                       \
                .type = TYPE,                           \
                .shift = SHIFT,                         \
@@ -53,6 +54,14 @@ DECLARE_BITMAP(cpu_hwcaps, ARM64_NCAPS);
                .safe_val = SAFE_VAL,                   \
        }
 
+/* Define a feature with signed values */
+#define ARM64_FTR_BITS(STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL) \
+       __ARM64_FTR_BITS(FTR_SIGNED, STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL)
+
+/* Define a feature with unsigned value */
+#define U_ARM64_FTR_BITS(STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL) \
+       __ARM64_FTR_BITS(FTR_UNSIGNED, STRICT, TYPE, SHIFT, WIDTH, SAFE_VAL)
+
 #define ARM64_FTR_END                                  \
        {                                               \
                .width = 0,                             \
@@ -99,7 +108,7 @@ static struct arm64_ftr_bits ftr_id_aa64mmfr0[] = {
         * Differing PARange is fine as long as all peripherals and memory are mapped
         * within the minimum PARange of all CPUs
         */
-       ARM64_FTR_BITS(FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64MMFR0_PARANGE_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64MMFR0_PARANGE_SHIFT, 4, 0),
        ARM64_FTR_END,
 };
 
@@ -115,18 +124,18 @@ static struct arm64_ftr_bits ftr_id_aa64mmfr1[] = {
 };
 
 static struct arm64_ftr_bits ftr_ctr[] = {
-       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 31, 1, 1),        /* RAO */
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 31, 1, 1),      /* RAO */
        ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 28, 3, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_HIGHER_SAFE, 24, 4, 0),  /* CWG */
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 20, 4, 0),   /* ERG */
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 16, 4, 1),   /* DminLine */
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_HIGHER_SAFE, 24, 4, 0),        /* CWG */
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 20, 4, 0), /* ERG */
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 16, 4, 1), /* DminLine */
        /*
         * Linux can handle differing I-cache policies. Userspace JITs will
         * make use of *minLine
         */
-       ARM64_FTR_BITS(FTR_NONSTRICT, FTR_EXACT, 14, 2, 0),     /* L1Ip */
+       U_ARM64_FTR_BITS(FTR_NONSTRICT, FTR_EXACT, 14, 2, 0),   /* L1Ip */
        ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 4, 10, 0),        /* RAZ */
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 0, 4, 0),    /* IminLine */
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, 0, 4, 0),  /* IminLine */
        ARM64_FTR_END,
 };
 
@@ -144,12 +153,12 @@ static struct arm64_ftr_bits ftr_id_mmfr0[] = {
 
 static struct arm64_ftr_bits ftr_id_aa64dfr0[] = {
        ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, 32, 32, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_CTX_CMPS_SHIFT, 4, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_WRPS_SHIFT, 4, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_BRPS_SHIFT, 4, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_PMUVER_SHIFT, 4, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_TRACEVER_SHIFT, 4, 0),
-       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_DEBUGVER_SHIFT, 4, 0x6),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_CTX_CMPS_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_WRPS_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_LOWER_SAFE, ID_AA64DFR0_BRPS_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_PMUVER_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_TRACEVER_SHIFT, 4, 0),
+       U_ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64DFR0_DEBUGVER_SHIFT, 4, 0x6),
        ARM64_FTR_END,
 };
 
index fc5508e0df57ff8a132894d091c94938d299ee02..4eeb17198cfaf598fd403b1e4040c77f5ee3068a 100644 (file)
@@ -127,7 +127,11 @@ static int __init uefi_init(void)
        table_size = sizeof(efi_config_table_64_t) * efi.systab->nr_tables;
        config_tables = early_memremap(efi_to_phys(efi.systab->tables),
                                       table_size);
-
+       if (config_tables == NULL) {
+               pr_warn("Unable to map EFI config table array.\n");
+               retval = -ENOMEM;
+               goto out;
+       }
        retval = efi_config_parse_tables(config_tables, efi.systab->nr_tables,
                                         sizeof(efi_config_table_64_t), NULL);
 
@@ -209,6 +213,14 @@ void __init efi_init(void)
                         PAGE_ALIGN(params.mmap_size + (params.mmap & ~PAGE_MASK)));
        memmap.phys_map = params.mmap;
        memmap.map = early_memremap(params.mmap, params.mmap_size);
+       if (memmap.map == NULL) {
+               /*
+               * If we are booting via UEFI, the UEFI memory map is the only
+               * description of memory we have, so there is little point in
+               * proceeding if we cannot access it.
+               */
+               panic("Unable to map EFI memory map.\n");
+       }
        memmap.map_end = memmap.map + params.mmap_size;
        memmap.desc_size = params.desc_size;
        memmap.desc_version = params.desc_ver;
@@ -227,7 +239,6 @@ static bool __init efi_virtmap_init(void)
        init_new_context(NULL, &efi_mm);
 
        for_each_efi_memory_desc(&memmap, md) {
-               u64 paddr, npages, size;
                pgprot_t prot;
 
                if (!(md->attribute & EFI_MEMORY_RUNTIME))
@@ -235,11 +246,6 @@ static bool __init efi_virtmap_init(void)
                if (md->virt_addr == 0)
                        return false;
 
-               paddr = md->phys_addr;
-               npages = md->num_pages;
-               memrange_efi_to_native(&paddr, &npages);
-               size = npages << PAGE_SHIFT;
-
                pr_info("  EFI remap 0x%016llx => %p\n",
                        md->phys_addr, (void *)md->virt_addr);
 
@@ -256,7 +262,8 @@ static bool __init efi_virtmap_init(void)
                else
                        prot = PAGE_KERNEL;
 
-               create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size,
+               create_pgd_mapping(&efi_mm, md->phys_addr, md->virt_addr,
+                                  md->num_pages << EFI_PAGE_SHIFT, 
                                   __pgprot(pgprot_val(prot) | PTE_NG));
        }
        return true;
@@ -273,12 +280,12 @@ static int __init arm64_enable_runtime_services(void)
 
        if (!efi_enabled(EFI_BOOT)) {
                pr_info("EFI services will not be available.\n");
-               return -1;
+               return 0;
        }
 
        if (efi_runtime_disabled()) {
                pr_info("EFI runtime services will be disabled.\n");
-               return -1;
+               return 0;
        }
 
        pr_info("Remapping and enabling EFI services.\n");
@@ -288,7 +295,7 @@ static int __init arm64_enable_runtime_services(void)
                                                   mapsize);
        if (!memmap.map) {
                pr_err("Failed to remap EFI memory map\n");
-               return -1;
+               return -ENOMEM;
        }
        memmap.map_end = memmap.map + mapsize;
        efi.memmap = &memmap;
@@ -297,13 +304,13 @@ static int __init arm64_enable_runtime_services(void)
                                                   sizeof(efi_system_table_t));
        if (!efi.systab) {
                pr_err("Failed to remap EFI System Table\n");
-               return -1;
+               return -ENOMEM;
        }
        set_bit(EFI_SYSTEM_TABLES, &efi.flags);
 
        if (!efi_virtmap_init()) {
                pr_err("No UEFI virtual mapping was installed -- runtime services will not be available\n");
-               return -1;
+               return -ENOMEM;
        }
 
        /* Set up runtime services function pointers */
index 1599701ef044b28b2534a3766dde1d255dba103a..86c289832272d71ba48786414bb6e4ecb9b9cb14 100644 (file)
@@ -864,6 +864,10 @@ ENTRY(__kvm_flush_vm_context)
 ENDPROC(__kvm_flush_vm_context)
 
 __kvm_hyp_panic:
+       // Stash PAR_EL1 before corrupting it in __restore_sysregs
+       mrs     x0, par_el1
+       push    x0, xzr
+
        // Guess the context by looking at VTTBR:
        // If zero, then we're already a host.
        // Otherwise restore a minimal host context before panicing.
@@ -898,7 +902,7 @@ __kvm_hyp_panic:
        mrs     x3, esr_el2
        mrs     x4, far_el2
        mrs     x5, hpfar_el2
-       mrs     x6, par_el1
+       pop     x6, xzr         // active context PAR_EL1
        mrs     x7, tpidr_el2
 
        mov     lr, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
@@ -914,7 +918,7 @@ __kvm_hyp_panic:
 ENDPROC(__kvm_hyp_panic)
 
 __hyp_panic_str:
-       .ascii  "HYP panic:\nPS:%08x PC:%p ESR:%p\nFAR:%p HPFAR:%p PAR:%p\nVCPU:%p\n\0"
+       .ascii  "HYP panic:\nPS:%08x PC:%016x ESR:%08x\nFAR:%016x HPFAR:%016x PAR:%016x\nVCPU:%p\n\0"
 
        .align  2
 
@@ -1015,9 +1019,15 @@ el1_trap:
        b.ne    1f              // Not an abort we care about
 
        /* This is an abort. Check for permission fault */
+alternative_if_not ARM64_WORKAROUND_834220
        and     x2, x1, #ESR_ELx_FSC_TYPE
        cmp     x2, #FSC_PERM
        b.ne    1f              // Not a permission fault
+alternative_else
+       nop                     // Use the permission fault path to
+       nop                     // check for a valid S1 translation,
+       nop                     // regardless of the ESR value.
+alternative_endif
 
        /*
         * Check for Stage-1 page table walk, which is guaranteed
index 85c57158dcd96a83d80ce99c2c557b371c275984..648112e90ed546d2d052ccf7d9f66866d2390d06 100644 (file)
@@ -48,7 +48,7 @@ static void prepare_fault32(struct kvm_vcpu *vcpu, u32 mode, u32 vect_offset)
 
        /* Note: These now point to the banked copies */
        *vcpu_spsr(vcpu) = new_spsr_value;
-       *vcpu_reg(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
+       *vcpu_reg32(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
 
        /* Branch to exception vector */
        if (sctlr & (1 << 13))
index f636a2639f031dd03d0b5058ccf378721d67dbf4..e87f53ff5f583aeb47b3ec3187d229df380b2c50 100644 (file)
@@ -76,13 +76,28 @@ static void flush_context(unsigned int cpu)
                __flush_icache_all();
 }
 
-static int is_reserved_asid(u64 asid)
+static bool check_update_reserved_asid(u64 asid, u64 newasid)
 {
        int cpu;
-       for_each_possible_cpu(cpu)
-               if (per_cpu(reserved_asids, cpu) == asid)
-                       return 1;
-       return 0;
+       bool hit = false;
+
+       /*
+        * Iterate over the set of reserved ASIDs looking for a match.
+        * If we find one, then we can update our mm to use newasid
+        * (i.e. the same ASID in the current generation) but we can't
+        * exit the loop early, since we need to ensure that all copies
+        * of the old ASID are updated to reflect the mm. Failure to do
+        * so could result in us missing the reserved ASID in a future
+        * generation.
+        */
+       for_each_possible_cpu(cpu) {
+               if (per_cpu(reserved_asids, cpu) == asid) {
+                       hit = true;
+                       per_cpu(reserved_asids, cpu) = newasid;
+               }
+       }
+
+       return hit;
 }
 
 static u64 new_context(struct mm_struct *mm, unsigned int cpu)
@@ -92,12 +107,14 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
        u64 generation = atomic64_read(&asid_generation);
 
        if (asid != 0) {
+               u64 newasid = generation | (asid & ~ASID_MASK);
+
                /*
                 * If our current ASID was active during a rollover, we
                 * can continue to use it and this was just a false alarm.
                 */
-               if (is_reserved_asid(asid))
-                       return generation | (asid & ~ASID_MASK);
+               if (check_update_reserved_asid(asid, newasid))
+                       return newasid;
 
                /*
                 * We had a valid ASID in a previous life, so try to re-use
@@ -105,7 +122,7 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
                 */
                asid &= ~ASID_MASK;
                if (!__test_and_set_bit(asid, asid_map))
-                       goto bump_gen;
+                       return newasid;
        }
 
        /*
@@ -129,10 +146,7 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
 set_asid:
        __set_bit(asid, asid_map);
        cur_idx = asid;
-
-bump_gen:
-       asid |= generation;
-       return asid;
+       return asid | generation;
 }
 
 void check_and_switch_context(struct mm_struct *mm, unsigned int cpu)
index 19211c4a891111cee301552a234821646f522ea6..92ddac1e8ca2f35b8f24028514bb761aed3591a4 100644 (file)
@@ -393,16 +393,16 @@ static struct fault_info {
        { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 1 translation fault"     },
        { do_translation_fault, SIGSEGV, SEGV_MAPERR,   "level 2 translation fault"     },
        { do_page_fault,        SIGSEGV, SEGV_MAPERR,   "level 3 translation fault"     },
-       { do_bad,               SIGBUS,  0,             "reserved access flag fault"    },
+       { do_bad,               SIGBUS,  0,             "unknown 8"                     },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 1 access flag fault"     },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 2 access flag fault"     },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 3 access flag fault"     },
-       { do_bad,               SIGBUS,  0,             "reserved permission fault"     },
+       { do_bad,               SIGBUS,  0,             "unknown 12"                    },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 1 permission fault"      },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 2 permission fault"      },
        { do_page_fault,        SIGSEGV, SEGV_ACCERR,   "level 3 permission fault"      },
        { do_bad,               SIGBUS,  0,             "synchronous external abort"    },
-       { do_bad,               SIGBUS,  0,             "asynchronous external abort"   },
+       { do_bad,               SIGBUS,  0,             "unknown 17"                    },
        { do_bad,               SIGBUS,  0,             "unknown 18"                    },
        { do_bad,               SIGBUS,  0,             "unknown 19"                    },
        { do_bad,               SIGBUS,  0,             "synchronous abort (translation table walk)" },
@@ -410,16 +410,16 @@ static struct fault_info {
        { do_bad,               SIGBUS,  0,             "synchronous abort (translation table walk)" },
        { do_bad,               SIGBUS,  0,             "synchronous abort (translation table walk)" },
        { do_bad,               SIGBUS,  0,             "synchronous parity error"      },
-       { do_bad,               SIGBUS,  0,             "asynchronous parity error"     },
+       { do_bad,               SIGBUS,  0,             "unknown 25"                    },
        { do_bad,               SIGBUS,  0,             "unknown 26"                    },
        { do_bad,               SIGBUS,  0,             "unknown 27"                    },
-       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk" },
-       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk" },
-       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk" },
-       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk" },
+       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk)" },
+       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk)" },
+       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk)" },
+       { do_bad,               SIGBUS,  0,             "synchronous parity error (translation table walk)" },
        { do_bad,               SIGBUS,  0,             "unknown 32"                    },
        { do_bad,               SIGBUS,  BUS_ADRALN,    "alignment fault"               },
-       { do_bad,               SIGBUS,  0,             "debug event"                   },
+       { do_bad,               SIGBUS,  0,             "unknown 34"                    },
        { do_bad,               SIGBUS,  0,             "unknown 35"                    },
        { do_bad,               SIGBUS,  0,             "unknown 36"                    },
        { do_bad,               SIGBUS,  0,             "unknown 37"                    },
@@ -433,21 +433,21 @@ static struct fault_info {
        { do_bad,               SIGBUS,  0,             "unknown 45"                    },
        { do_bad,               SIGBUS,  0,             "unknown 46"                    },
        { do_bad,               SIGBUS,  0,             "unknown 47"                    },
-       { do_bad,               SIGBUS,  0,             "unknown 48"                    },
+       { do_bad,               SIGBUS,  0,             "TLB conflict abort"            },
        { do_bad,               SIGBUS,  0,             "unknown 49"                    },
        { do_bad,               SIGBUS,  0,             "unknown 50"                    },
        { do_bad,               SIGBUS,  0,             "unknown 51"                    },
        { do_bad,               SIGBUS,  0,             "implementation fault (lockdown abort)" },
-       { do_bad,               SIGBUS,  0,             "unknown 53"                    },
+       { do_bad,               SIGBUS,  0,             "implementation fault (unsupported exclusive)" },
        { do_bad,               SIGBUS,  0,             "unknown 54"                    },
        { do_bad,               SIGBUS,  0,             "unknown 55"                    },
        { do_bad,               SIGBUS,  0,             "unknown 56"                    },
        { do_bad,               SIGBUS,  0,             "unknown 57"                    },
-       { do_bad,               SIGBUS,  0,             "implementation fault (coprocessor abort)" },
+       { do_bad,               SIGBUS,  0,             "unknown 58"                    },
        { do_bad,               SIGBUS,  0,             "unknown 59"                    },
        { do_bad,               SIGBUS,  0,             "unknown 60"                    },
-       { do_bad,               SIGBUS,  0,             "unknown 61"                    },
-       { do_bad,               SIGBUS,  0,             "unknown 62"                    },
+       { do_bad,               SIGBUS,  0,             "section domain fault"          },
+       { do_bad,               SIGBUS,  0,             "page domain fault"             },
        { do_bad,               SIGBUS,  0,             "unknown 63"                    },
 };
 
index abb66f84d4ac896c0978b3c2584470d5db15a8ba..873e363048c6c661eda620bbd4f826ba568c5ba7 100644 (file)
@@ -64,8 +64,12 @@ EXPORT_SYMBOL(phys_mem_access_prot);
 
 static void __init *early_alloc(unsigned long sz)
 {
-       void *ptr = __va(memblock_alloc(sz, sz));
-       BUG_ON(!ptr);
+       phys_addr_t phys;
+       void *ptr;
+
+       phys = memblock_alloc(sz, sz);
+       BUG_ON(!phys);
+       ptr = __va(phys);
        memset(ptr, 0, sz);
        return ptr;
 }
@@ -81,55 +85,19 @@ static void split_pmd(pmd_t *pmd, pte_t *pte)
        do {
                /*
                 * Need to have the least restrictive permissions available
-                * permissions will be fixed up later. Default the new page
-                * range as contiguous ptes.
+                * permissions will be fixed up later
                 */
-               set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC_CONT));
+               set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC));
                pfn++;
        } while (pte++, i++, i < PTRS_PER_PTE);
 }
 
-/*
- * Given a PTE with the CONT bit set, determine where the CONT range
- * starts, and clear the entire range of PTE CONT bits.
- */
-static void clear_cont_pte_range(pte_t *pte, unsigned long addr)
-{
-       int i;
-
-       pte -= CONT_RANGE_OFFSET(addr);
-       for (i = 0; i < CONT_PTES; i++) {
-               set_pte(pte, pte_mknoncont(*pte));
-               pte++;
-       }
-       flush_tlb_all();
-}
-
-/*
- * Given a range of PTEs set the pfn and provided page protection flags
- */
-static void __populate_init_pte(pte_t *pte, unsigned long addr,
-                               unsigned long end, phys_addr_t phys,
-                               pgprot_t prot)
-{
-       unsigned long pfn = __phys_to_pfn(phys);
-
-       do {
-               /* clear all the bits except the pfn, then apply the prot */
-               set_pte(pte, pfn_pte(pfn, prot));
-               pte++;
-               pfn++;
-               addr += PAGE_SIZE;
-       } while (addr != end);
-}
-
 static void alloc_init_pte(pmd_t *pmd, unsigned long addr,
-                                 unsigned long end, phys_addr_t phys,
+                                 unsigned long end, unsigned long pfn,
                                  pgprot_t prot,
                                  void *(*alloc)(unsigned long size))
 {
        pte_t *pte;
-       unsigned long next;
 
        if (pmd_none(*pmd) || pmd_sect(*pmd)) {
                pte = alloc(PTRS_PER_PTE * sizeof(pte_t));
@@ -142,27 +110,9 @@ static void alloc_init_pte(pmd_t *pmd, unsigned long addr,
 
        pte = pte_offset_kernel(pmd, addr);
        do {
-               next = min(end, (addr + CONT_SIZE) & CONT_MASK);
-               if (((addr | next | phys) & ~CONT_MASK) == 0) {
-                       /* a block of CONT_PTES  */
-                       __populate_init_pte(pte, addr, next, phys,
-                                           __pgprot(pgprot_val(prot) | PTE_CONT));
-               } else {
-                       /*
-                        * If the range being split is already inside of a
-                        * contiguous range but this PTE isn't going to be
-                        * contiguous, then we want to unmark the adjacent
-                        * ranges, then update the portion of the range we
-                        * are interrested in.
-                        */
-                        clear_cont_pte_range(pte, addr);
-                        __populate_init_pte(pte, addr, next, phys, prot);
-               }
-
-               pte += (next - addr) >> PAGE_SHIFT;
-               phys += next - addr;
-               addr = next;
-       } while (addr != end);
+               set_pte(pte, pfn_pte(pfn, prot));
+               pfn++;
+       } while (pte++, addr += PAGE_SIZE, addr != end);
 }
 
 static void split_pud(pud_t *old_pud, pmd_t *pmd)
@@ -223,7 +173,8 @@ static void alloc_init_pmd(struct mm_struct *mm, pud_t *pud,
                                }
                        }
                } else {
-                       alloc_init_pte(pmd, addr, next, phys, prot, alloc);
+                       alloc_init_pte(pmd, addr, next, __phys_to_pfn(phys),
+                                      prot, alloc);
                }
                phys += next - addr;
        } while (pmd++, addr = next, addr != end);
index f7836c6a6b60eb24981a5f9f53207a96bff7a6dc..c32f76791f488ae12e7264960433c70d0fbd4315 100644 (file)
@@ -98,7 +98,7 @@ static void __init mcf54xx_bootmem_alloc(void)
        memstart = PAGE_ALIGN(_ramstart);
        min_low_pfn = PFN_DOWN(_rambase);
        start_pfn = PFN_DOWN(memstart);
-       max_low_pfn = PFN_DOWN(_ramend);
+       max_pfn = max_low_pfn = PFN_DOWN(_ramend);
        high_memory = (void *)_ramend;
 
        m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
index 0793a7f174176e6d590ca4d9567a9e3523c42c50..f9d96bf869109c028e5a9f1f12ad3e9fe8b933ba 100644 (file)
@@ -4,7 +4,7 @@
 #include <uapi/asm/unistd.h>
 
 
-#define NR_syscalls            375
+#define NR_syscalls            376
 
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_OLD_STAT
index 5e6fae6c275f9b110464cb80bbb47187c2251dcd..36cf129de663a7ca22f1bf1bba5a6245b7b04c03 100644 (file)
 #define __NR_sendmmsg          372
 #define __NR_userfaultfd       373
 #define __NR_membarrier                374
+#define __NR_mlock2            375
 
 #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
index 88c27d94a7214c959c6d75a3ac992a4c95b13b2e..76b9113f30922df74e8dac0d8dccca9d7c48fd6b 100644 (file)
@@ -238,11 +238,14 @@ void __init setup_arch(char **cmdline_p)
         * Give all the memory to the bootmap allocator, tell it to put the
         * boot mem_map at the start of memory.
         */
+       min_low_pfn = PFN_DOWN(memory_start);
+       max_pfn = max_low_pfn = PFN_DOWN(memory_end);
+
        bootmap_size = init_bootmem_node(
                        NODE_DATA(0),
-                       memory_start >> PAGE_SHIFT, /* map goes here */
-                       PAGE_OFFSET >> PAGE_SHIFT,      /* 0 on coldfire */
-                       memory_end >> PAGE_SHIFT);
+                       min_low_pfn,            /* map goes here */
+                       PFN_DOWN(PAGE_OFFSET),
+                       max_pfn);
        /*
         * Free the usable memory, we have to make sure we do not free
         * the bootmem bitmap so we then reserve it after freeing it :-)
index 5dd0e80042f51107e63e0fcd832f4c46c85b826c..282cd903f4c469197738eb9e840eaa75c77ec11a 100644 (file)
@@ -395,3 +395,4 @@ ENTRY(sys_call_table)
        .long sys_sendmmsg
        .long sys_userfaultfd
        .long sys_membarrier
+       .long sys_mlock2                /* 375 */
index b958916e5eac96b250ef08e556983e059d7d0850..8f37fdd80be9e9ccec99b1d4509f3c97a94f0899 100644 (file)
@@ -250,7 +250,7 @@ void __init paging_init(void)
        high_memory = phys_to_virt(max_addr);
 
        min_low_pfn = availmem >> PAGE_SHIFT;
-       max_low_pfn = max_addr >> PAGE_SHIFT;
+       max_pfn = max_low_pfn = max_addr >> PAGE_SHIFT;
 
        for (i = 0; i < m68k_num_memory; i++) {
                addr = m68k_memory[i].addr;
index a8b942bf71638c9778dd8fff05c63797202edd61..2a5f43a68ae3d73d22dd822a4da4996208543e7c 100644 (file)
@@ -118,13 +118,13 @@ static void __init sun3_bootmem_alloc(unsigned long memory_start,
        memory_end = memory_end & PAGE_MASK;
 
        start_page = __pa(memory_start) >> PAGE_SHIFT;
-       num_pages = __pa(memory_end) >> PAGE_SHIFT;
+       max_pfn = num_pages = __pa(memory_end) >> PAGE_SHIFT;
 
        high_memory = (void *)memory_end;
        availmem = memory_start;
 
        m68k_setup_node(0);
-       availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages);
+       availmem += init_bootmem(start_page, num_pages);
        availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK;
 
        free_bootmem(__pa(availmem), memory_end - (availmem));
index d5fa3eaf39a106546f52d82ec3e5391302ef8dec..41b1b090f56f6b73afc50240318634a4988ef427 100644 (file)
@@ -1581,7 +1581,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
 
        base = (inst >> 21) & 0x1f;
        op_inst = (inst >> 16) & 0x1f;
-       offset = inst & 0xffff;
+       offset = (int16_t)inst;
        cache = (inst >> 16) & 0x3;
        op = (inst >> 18) & 0x7;
 
index 7bab3a4e8f7d90b541b457f4f66138899db6db8a..7e2210846b8b9d1519f679e6a0950fcaf1e6dfd5 100644 (file)
@@ -157,9 +157,11 @@ FEXPORT(__kvm_mips_vcpu_run)
 
 FEXPORT(__kvm_mips_load_asid)
        /* Set the ASID for the Guest Kernel */
-       INT_SLL t0, t0, 1       /* with kseg0 @ 0x40000000, kernel */
-                               /* addresses shift to 0x80000000 */
-       bltz    t0, 1f          /* If kernel */
+       PTR_L   t0, VCPU_COP0(k1)
+       LONG_L  t0, COP0_STATUS(t0)
+       andi    t0, KSU_USER | ST0_ERL | ST0_EXL
+       xori    t0, KSU_USER
+       bnez    t0, 1f          /* If kernel */
         INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID  /* (BD)  */
        INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID    /* else user */
 1:
@@ -474,9 +476,11 @@ __kvm_mips_return_to_guest:
        mtc0    t0, CP0_EPC
 
        /* Set the ASID for the Guest Kernel */
-       INT_SLL t0, t0, 1       /* with kseg0 @ 0x40000000, kernel */
-                               /* addresses shift to 0x80000000 */
-       bltz    t0, 1f          /* If kernel */
+       PTR_L   t0, VCPU_COP0(k1)
+       LONG_L  t0, COP0_STATUS(t0)
+       andi    t0, KSU_USER | ST0_ERL | ST0_EXL
+       xori    t0, KSU_USER
+       bnez    t0, 1f          /* If kernel */
         INT_ADDIU t1, k1, VCPU_GUEST_KERNEL_ASID  /* (BD)  */
        INT_ADDIU t1, k1, VCPU_GUEST_USER_ASID    /* else user */
 1:
index 49ff3bfc007e534529d0f61d21b6fddd6578d145..b9b803facdbf7594dc700ca828a2ced604e617aa 100644 (file)
@@ -279,7 +279,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
 
        if (!gebase) {
                err = -ENOMEM;
-               goto out_free_cpu;
+               goto out_uninit_cpu;
        }
        kvm_debug("Allocated %d bytes for KVM Exception Handlers @ %p\n",
                  ALIGN(size, PAGE_SIZE), gebase);
@@ -343,6 +343,9 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
 out_free_gebase:
        kfree(gebase);
 
+out_uninit_cpu:
+       kvm_vcpu_uninit(vcpu);
+
 out_free_cpu:
        kfree(vcpu);
 
index 8a978022630b252fa0547dd137805d6b3c35ec3b..dbbeccc3d714add203aae3ebb5b3a0cd1522f0ae 100644 (file)
@@ -11,6 +11,7 @@
  *  by the Free Software Foundation.
  */
 
+#include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/pci.h>
 #include <linux/io.h>
@@ -232,8 +233,7 @@ static int rt288x_pci_probe(struct platform_device *pdev)
        ioport_resource.end = RT2880_PCI_IO_BASE + RT2880_PCI_IO_SIZE - 1;
 
        rt2880_pci_reg_write(0, RT2880_PCI_REG_PCICFG_ADDR);
-       for (i = 0; i < 0xfffff; i++)
-               ;
+       udelay(1);
 
        rt2880_pci_reg_write(0x79, RT2880_PCI_REG_ARBCTL);
        rt2880_pci_reg_write(0x07FF0001, RT2880_PCI_REG_BAR0SETUP_ADDR);
index 4f925e06c414663023765630cd84211d62679e16..78b2ef49dbc7a45adc720264f66cc9922453ceb2 100644 (file)
@@ -10,6 +10,8 @@
  * option) any later version.
  */
 
+#include <linux/delay.h>
+
 #include <asm/bootinfo.h>
 #include <asm/cacheflush.h>
 #include <asm/idle.h>
@@ -77,7 +79,7 @@ void msp7120_reset(void)
         */
 
        /* Wait a bit for the DDRC to settle */
-       for (i = 0; i < 100000000; i++);
+       mdelay(125);
 
 #if defined(CONFIG_PMC_MSP7120_GW)
        /*
index 244f9427625b5873003cc92132c96a32d99663eb..db8f88b6a3af9cb52dcb2a2a23df94a49cc0eccd 100644 (file)
@@ -3,6 +3,8 @@
  *
  *  Reset a SNI machine.
  */
+#include <linux/delay.h>
+
 #include <asm/io.h>
 #include <asm/reboot.h>
 #include <asm/sni.h>
@@ -32,9 +34,9 @@ void sni_machine_restart(char *command)
        for (;;) {
                for (i = 0; i < 100; i++) {
                        kb_wait();
-                       for (j = 0; j < 100000 ; j++)
-                               /* nothing */;
+                       udelay(50);
                        outb_p(0xfe, 0x64);      /* pulse reset low */
+                       udelay(50);
                }
        }
 }
index 223cdcc8203f566483c15051c1ce5cfdfe608791..87bf88ed04c6c0a13220e2b3588b7fedbb6145f3 100644 (file)
@@ -23,22 +23,6 @@ static void __flush_dcache(unsigned long start, unsigned long end)
        end += (cpuinfo.dcache_line_size - 1);
        end &= ~(cpuinfo.dcache_line_size - 1);
 
-       for (addr = start; addr < end; addr += cpuinfo.dcache_line_size) {
-               __asm__ __volatile__ ("   flushda 0(%0)\n"
-                                       : /* Outputs */
-                                       : /* Inputs  */ "r"(addr)
-                                       /* : No clobber */);
-       }
-}
-
-static void __flush_dcache_all(unsigned long start, unsigned long end)
-{
-       unsigned long addr;
-
-       start &= ~(cpuinfo.dcache_line_size - 1);
-       end += (cpuinfo.dcache_line_size - 1);
-       end &= ~(cpuinfo.dcache_line_size - 1);
-
        if (end > start + cpuinfo.dcache_size)
                end = start + cpuinfo.dcache_size;
 
@@ -112,7 +96,7 @@ static void flush_aliases(struct address_space *mapping, struct page *page)
 
 void flush_cache_all(void)
 {
-       __flush_dcache_all(0, cpuinfo.dcache_size);
+       __flush_dcache(0, cpuinfo.dcache_size);
        __flush_icache(0, cpuinfo.icache_size);
 }
 
@@ -182,7 +166,7 @@ void __flush_dcache_page(struct address_space *mapping, struct page *page)
         */
        unsigned long start = (unsigned long)page_address(page);
 
-       __flush_dcache_all(start, start + PAGE_SIZE);
+       __flush_dcache(start, start + PAGE_SIZE);
 }
 
 void flush_dcache_page(struct page *page)
@@ -268,7 +252,7 @@ void copy_from_user_page(struct vm_area_struct *vma, struct page *page,
 {
        flush_cache_page(vma, user_vaddr, page_to_pfn(page));
        memcpy(dst, src, len);
-       __flush_dcache_all((unsigned long)src, (unsigned long)src + len);
+       __flush_dcache((unsigned long)src, (unsigned long)src + len);
        if (vma->vm_flags & VM_EXEC)
                __flush_icache((unsigned long)src, (unsigned long)src + len);
 }
@@ -279,7 +263,7 @@ void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
 {
        flush_cache_page(vma, user_vaddr, page_to_pfn(page));
        memcpy(dst, src, len);
-       __flush_dcache_all((unsigned long)dst, (unsigned long)dst + len);
+       __flush_dcache((unsigned long)dst, (unsigned long)dst + len);
        if (vma->vm_flags & VM_EXEC)
                __flush_icache((unsigned long)dst, (unsigned long)dst + len);
 }
index a908ada8e0a5353f5fce19af6ad3e59779ce2e0e..2220f7a60def314be5c8f23e18ceb8982061cb18 100644 (file)
 #define MSR_TS_T       __MASK(MSR_TS_T_LG)     /*  Transaction Transactional */
 #define MSR_TS_MASK    (MSR_TS_T | MSR_TS_S)   /* Transaction State bits */
 #define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */
+#define MSR_TM_RESV(x) (((x) & MSR_TS_MASK) == MSR_TS_MASK) /* Reserved */
 #define MSR_TM_TRANSACTIONAL(x)        (((x) & MSR_TS_MASK) == MSR_TS_T)
 #define MSR_TM_SUSPENDED(x)    (((x) & MSR_TS_MASK) == MSR_TS_S)
 
index 75b6676c1a0b911b72b7af5a8dc7761173e638e8..646bf4d222c1caeda5c7851de74fbbe0ad0d65d9 100644 (file)
@@ -551,6 +551,24 @@ static void tm_reclaim_thread(struct thread_struct *thr,
                msr_diff &= MSR_FP | MSR_VEC | MSR_VSX | MSR_FE0 | MSR_FE1;
        }
 
+       /*
+        * Use the current MSR TM suspended bit to track if we have
+        * checkpointed state outstanding.
+        * On signal delivery, we'd normally reclaim the checkpointed
+        * state to obtain stack pointer (see:get_tm_stackpointer()).
+        * This will then directly return to userspace without going
+        * through __switch_to(). However, if the stack frame is bad,
+        * we need to exit this thread which calls __switch_to() which
+        * will again attempt to reclaim the already saved tm state.
+        * Hence we need to check that we've not already reclaimed
+        * this state.
+        * We do this using the current MSR, rather tracking it in
+        * some specific thread_struct bit, as it has the additional
+        * benifit of checking for a potential TM bad thing exception.
+        */
+       if (!MSR_TM_SUSPENDED(mfmsr()))
+               return;
+
        tm_reclaim(thr, thr->regs->msr, cause);
 
        /* Having done the reclaim, we now have the checkpointed
index 0dbee465af7a70e6c1ce0b7f1f667a577a7ebed0..ef7c24e84a623882c8f98dbc93aa7ab318a4ff68 100644 (file)
@@ -875,6 +875,15 @@ static long restore_tm_user_regs(struct pt_regs *regs,
                return 1;
 #endif /* CONFIG_SPE */
 
+       /* Get the top half of the MSR from the user context */
+       if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
+               return 1;
+       msr_hi <<= 32;
+       /* If TM bits are set to the reserved value, it's an invalid context */
+       if (MSR_TM_RESV(msr_hi))
+               return 1;
+       /* Pull in the MSR TM bits from the user context */
+       regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
        /* Now, recheckpoint.  This loads up all of the checkpointed (older)
         * registers, including FP and V[S]Rs.  After recheckpointing, the
         * transactional versions should be loaded.
@@ -884,11 +893,6 @@ static long restore_tm_user_regs(struct pt_regs *regs,
        current->thread.tm_texasr |= TEXASR_FS;
        /* This loads the checkpointed FP/VEC state, if used */
        tm_recheckpoint(&current->thread, msr);
-       /* Get the top half of the MSR */
-       if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
-               return 1;
-       /* Pull in MSR TM from user context */
-       regs->msr = (regs->msr & ~MSR_TS_MASK) | ((msr_hi<<32) & MSR_TS_MASK);
 
        /* This loads the speculative FP/VEC state, if used */
        if (msr & MSR_FP) {
index 20756dfb9f34620ac254577458ac2aa8ff804835..c676ecec0869b26216e87483f54c2c6906ea6d01 100644 (file)
@@ -438,6 +438,10 @@ static long restore_tm_sigcontexts(struct pt_regs *regs,
 
        /* get MSR separately, transfer the LE bit if doing signal return */
        err |= __get_user(msr, &sc->gp_regs[PT_MSR]);
+       /* Don't allow reserved mode. */
+       if (MSR_TM_RESV(msr))
+               return -EINVAL;
+
        /* pull in MSR TM from user context */
        regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
 
index 373e32346d68d6c3ae270ca39b96b09fe66b0a6e..6a75352f453c1a46775112c2749b8cff31d62ed1 100644 (file)
@@ -1030,8 +1030,7 @@ static int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
                                   src_id, 0);
 
        /* sending vcpu invalid */
-       if (src_id >= KVM_MAX_VCPUS ||
-           kvm_get_vcpu(vcpu->kvm, src_id) == NULL)
+       if (kvm_get_vcpu_by_id(vcpu->kvm, src_id) == NULL)
                return -EINVAL;
 
        if (sclp.has_sigpif)
@@ -1110,6 +1109,10 @@ static int __inject_sigp_emergency(struct kvm_vcpu *vcpu,
        trace_kvm_s390_inject_vcpu(vcpu->vcpu_id, KVM_S390_INT_EMERGENCY,
                                   irq->u.emerg.code, 0);
 
+       /* sending vcpu invalid */
+       if (kvm_get_vcpu_by_id(vcpu->kvm, irq->u.emerg.code) == NULL)
+               return -EINVAL;
+
        set_bit(irq->u.emerg.code, li->sigp_emerg_pending);
        set_bit(IRQ_PEND_EXT_EMERGENCY, &li->pending_irqs);
        atomic_or(CPUSTAT_EXT_INT, li->cpuflags);
index 8fe2f1c722dcabe22b3b3731bdce5e22092703db..846589281b046f414837cbd3f7ab9f4d0c675a51 100644 (file)
@@ -342,12 +342,16 @@ static int kvm_vm_ioctl_enable_cap(struct kvm *kvm, struct kvm_enable_cap *cap)
                r = 0;
                break;
        case KVM_CAP_S390_VECTOR_REGISTERS:
-               if (MACHINE_HAS_VX) {
+               mutex_lock(&kvm->lock);
+               if (atomic_read(&kvm->online_vcpus)) {
+                       r = -EBUSY;
+               } else if (MACHINE_HAS_VX) {
                        set_kvm_facility(kvm->arch.model.fac->mask, 129);
                        set_kvm_facility(kvm->arch.model.fac->list, 129);
                        r = 0;
                } else
                        r = -EINVAL;
+               mutex_unlock(&kvm->lock);
                VM_EVENT(kvm, 3, "ENABLE: CAP_S390_VECTOR_REGISTERS %s",
                         r ? "(not available)" : "(success)");
                break;
index 77191b85ea7af4dd96dc6a1ae819f27faa25233b..d76b51cb4b6207261e495bad832ec07444ec11a5 100644 (file)
@@ -660,7 +660,7 @@ static int handle_pfmf(struct kvm_vcpu *vcpu)
 
        kvm_s390_get_regs_rre(vcpu, &reg1, &reg2);
 
-       if (!MACHINE_HAS_PFMF)
+       if (!test_kvm_facility(vcpu->kvm, 8))
                return kvm_s390_inject_program_int(vcpu, PGM_OPERATION);
 
        if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
index da690b69f9fe17a89c3f1dc3cd1b1119b832bd25..77c22d685c7a150a8ecfdccbfca1ec60f08698af 100644 (file)
@@ -291,12 +291,8 @@ static int handle_sigp_dst(struct kvm_vcpu *vcpu, u8 order_code,
                           u16 cpu_addr, u32 parameter, u64 *status_reg)
 {
        int rc;
-       struct kvm_vcpu *dst_vcpu;
+       struct kvm_vcpu *dst_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, cpu_addr);
 
-       if (cpu_addr >= KVM_MAX_VCPUS)
-               return SIGP_CC_NOT_OPERATIONAL;
-
-       dst_vcpu = kvm_get_vcpu(vcpu->kvm, cpu_addr);
        if (!dst_vcpu)
                return SIGP_CC_NOT_OPERATIONAL;
 
@@ -478,7 +474,7 @@ int kvm_s390_handle_sigp_pei(struct kvm_vcpu *vcpu)
        trace_kvm_s390_handle_sigp_pei(vcpu, order_code, cpu_addr);
 
        if (order_code == SIGP_EXTERNAL_CALL) {
-               dest_vcpu = kvm_get_vcpu(vcpu->kvm, cpu_addr);
+               dest_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, cpu_addr);
                BUG_ON(dest_vcpu == NULL);
 
                kvm_s390_vcpu_wakeup(dest_vcpu);
index 87acc5221740a588d256f9f0ed4059d366165872..af823a388c1994ba244e3ef0098f1a578408101e 100644 (file)
@@ -7394,11 +7394,6 @@ static int handle_invvpid(struct kvm_vcpu *vcpu)
 
        switch (type) {
        case VMX_VPID_EXTENT_ALL_CONTEXT:
-               if (get_vmcs12(vcpu)->virtual_processor_id == 0) {
-                       nested_vmx_failValid(vcpu,
-                               VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
-                       return 1;
-               }
                __vmx_flush_tlb(vcpu, to_vmx(vcpu)->nested.vpid02);
                nested_vmx_succeed(vcpu);
                break;
index 00462bd63129cfbde2c6b7e7bdf50eb073cc31b8..eed32283d22cc0cafbff75e8f2a246887d4cbb5f 100644 (file)
@@ -2763,6 +2763,26 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu,
        return 0;
 }
 
+static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
+{
+       return (!lapic_in_kernel(vcpu) ||
+               kvm_apic_accept_pic_intr(vcpu));
+}
+
+/*
+ * if userspace requested an interrupt window, check that the
+ * interrupt window is open.
+ *
+ * No need to exit to userspace if we already have an interrupt queued.
+ */
+static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
+{
+       return kvm_arch_interrupt_allowed(vcpu) &&
+               !kvm_cpu_has_interrupt(vcpu) &&
+               !kvm_event_needs_reinjection(vcpu) &&
+               kvm_cpu_accept_dm_intr(vcpu);
+}
+
 static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
                                    struct kvm_interrupt *irq)
 {
@@ -2786,6 +2806,7 @@ static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
                return -EEXIST;
 
        vcpu->arch.pending_external_vector = irq->irq;
+       kvm_make_request(KVM_REQ_EVENT, vcpu);
        return 0;
 }
 
@@ -5910,23 +5931,10 @@ static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt)
        return emulator_write_emulated(ctxt, rip, instruction, 3, NULL);
 }
 
-/*
- * Check if userspace requested an interrupt window, and that the
- * interrupt window is open.
- *
- * No need to exit to userspace if we already have an interrupt queued.
- */
 static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu)
 {
-       if (!vcpu->run->request_interrupt_window || pic_in_kernel(vcpu->kvm))
-               return false;
-
-       if (kvm_cpu_has_interrupt(vcpu))
-               return false;
-
-       return (irqchip_split(vcpu->kvm)
-               ? kvm_apic_accept_pic_intr(vcpu)
-               : kvm_arch_interrupt_allowed(vcpu));
+       return vcpu->run->request_interrupt_window &&
+               likely(!pic_in_kernel(vcpu->kvm));
 }
 
 static void post_kvm_run_save(struct kvm_vcpu *vcpu)
@@ -5937,17 +5945,9 @@ static void post_kvm_run_save(struct kvm_vcpu *vcpu)
        kvm_run->flags = is_smm(vcpu) ? KVM_RUN_X86_SMM : 0;
        kvm_run->cr8 = kvm_get_cr8(vcpu);
        kvm_run->apic_base = kvm_get_apic_base(vcpu);
-       if (!irqchip_in_kernel(vcpu->kvm))
-               kvm_run->ready_for_interrupt_injection =
-                       kvm_arch_interrupt_allowed(vcpu) &&
-                       !kvm_cpu_has_interrupt(vcpu) &&
-                       !kvm_event_needs_reinjection(vcpu);
-       else if (!pic_in_kernel(vcpu->kvm))
-               kvm_run->ready_for_interrupt_injection =
-                       kvm_apic_accept_pic_intr(vcpu) &&
-                       !kvm_cpu_has_interrupt(vcpu);
-       else
-               kvm_run->ready_for_interrupt_injection = 1;
+       kvm_run->ready_for_interrupt_injection =
+               pic_in_kernel(vcpu->kvm) ||
+               kvm_vcpu_ready_for_interrupt_injection(vcpu);
 }
 
 static void update_cr8_intercept(struct kvm_vcpu *vcpu)
@@ -6360,8 +6360,10 @@ void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm,
 static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 {
        int r;
-       bool req_int_win = !lapic_in_kernel(vcpu) &&
-               vcpu->run->request_interrupt_window;
+       bool req_int_win =
+               dm_request_for_irq_injection(vcpu) &&
+               kvm_cpu_accept_dm_intr(vcpu);
+
        bool req_immediate_exit = false;
 
        if (vcpu->requests) {
@@ -6663,7 +6665,8 @@ static int vcpu_run(struct kvm_vcpu *vcpu)
                if (kvm_cpu_has_pending_timer(vcpu))
                        kvm_inject_pending_timer_irqs(vcpu);
 
-               if (dm_request_for_irq_injection(vcpu)) {
+               if (dm_request_for_irq_injection(vcpu) &&
+                       kvm_vcpu_ready_for_interrupt_injection(vcpu)) {
                        r = 0;
                        vcpu->run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN;
                        ++vcpu->stat.request_irq_exits;
index de5716d8e525969e7849767a775aabec9e4d8b96..41a55ba0d78e8a97b5707a9194cce3b6ebd1c811 100644 (file)
@@ -76,6 +76,9 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
        struct bio_vec bv, bvprv, *bvprvp = NULL;
        struct bvec_iter iter;
        unsigned seg_size = 0, nsegs = 0, sectors = 0;
+       unsigned front_seg_size = bio->bi_seg_front_size;
+       bool do_split = true;
+       struct bio *new = NULL;
 
        bio_for_each_segment(bv, bio, iter) {
                if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q))
@@ -98,7 +101,7 @@ static struct bio *blk_bio_segment_split(struct request_queue *q,
 
                        seg_size += bv.bv_len;
                        bvprv = bv;
-                       bvprvp = &bv;
+                       bvprvp = &bvprv;
                        sectors += bv.bv_len >> 9;
                        continue;
                }
@@ -108,16 +111,29 @@ new_segment:
 
                nsegs++;
                bvprv = bv;
-               bvprvp = &bv;
+               bvprvp = &bvprv;
                seg_size = bv.bv_len;
                sectors += bv.bv_len >> 9;
+
+               if (nsegs == 1 && seg_size > front_seg_size)
+                       front_seg_size = seg_size;
        }
 
-       *segs = nsegs;
-       return NULL;
+       do_split = false;
 split:
        *segs = nsegs;
-       return bio_split(bio, sectors, GFP_NOIO, bs);
+
+       if (do_split) {
+               new = bio_split(bio, sectors, GFP_NOIO, bs);
+               if (new)
+                       bio = new;
+       }
+
+       bio->bi_seg_front_size = front_seg_size;
+       if (seg_size > bio->bi_seg_back_size)
+               bio->bi_seg_back_size = seg_size;
+
+       return do_split ? new : NULL;
 }
 
 void blk_queue_split(struct request_queue *q, struct bio **bio,
@@ -412,6 +428,12 @@ int blk_rq_map_sg(struct request_queue *q, struct request *rq,
        if (sg)
                sg_mark_end(sg);
 
+       /*
+        * Something must have been wrong if the figured number of
+        * segment is bigger than number of req's physical segments
+        */
+       WARN_ON(nsegs > rq->nr_phys_segments);
+
        return nsegs;
 }
 EXPORT_SYMBOL(blk_rq_map_sg);
index 3ae09de62f19ce2ca230a89ae6137a511fc9ae16..6d6f8feb48c08ab875e67c496193a743709b0621 100644 (file)
@@ -1291,15 +1291,16 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
                blk_mq_bio_to_request(rq, bio);
 
                /*
-                * we do limited pluging. If bio can be merged, do merge.
+                * We do limited pluging. If the bio can be merged, do that.
                 * Otherwise the existing request in the plug list will be
                 * issued. So the plug list will have one request at most
                 */
                if (plug) {
                        /*
                         * The plug list might get flushed before this. If that
-                        * happens, same_queue_rq is invalid and plug list is empty
-                        **/
+                        * happens, same_queue_rq is invalid and plug list is
+                        * empty
+                        */
                        if (same_queue_rq && !list_empty(&plug->mq_list)) {
                                old_rq = same_queue_rq;
                                list_del_init(&old_rq->queuelist);
@@ -1380,12 +1381,15 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
                blk_mq_bio_to_request(rq, bio);
                if (!request_count)
                        trace_block_plug(q);
-               else if (request_count >= BLK_MAX_REQUEST_COUNT) {
+
+               blk_mq_put_ctx(data.ctx);
+
+               if (request_count >= BLK_MAX_REQUEST_COUNT) {
                        blk_flush_plug_list(plug, false);
                        trace_block_plug(q);
                }
+
                list_add_tail(&rq->queuelist, &plug->mq_list);
-               blk_mq_put_ctx(data.ctx);
                return cookie;
        }
 
index 246dfb16c3d988c4f84749065a66977b825c98b5..aa40aa93381b661b73d5aa0f531e247e148c56a0 100644 (file)
@@ -158,11 +158,13 @@ void blk_abort_request(struct request *req)
 {
        if (blk_mark_rq_complete(req))
                return;
-       blk_delete_timer(req);
-       if (req->q->mq_ops)
+
+       if (req->q->mq_ops) {
                blk_mq_rq_timed_out(req, false);
-       else
+       } else {
+               blk_delete_timer(req);
                blk_rq_timed_out(req);
+       }
 }
 EXPORT_SYMBOL_GPL(blk_abort_request);
 
index 3de89d4690f3bf3e0d9abec1976a379b5dc171e5..a163c487cf38c8250ccbf0ec7beac913672796f0 100644 (file)
@@ -21,10 +21,10 @@ static void noop_merged_requests(struct request_queue *q, struct request *rq,
 static int noop_dispatch(struct request_queue *q, int force)
 {
        struct noop_data *nd = q->elevator->elevator_data;
+       struct request *rq;
 
-       if (!list_empty(&nd->queue)) {
-               struct request *rq;
-               rq = list_entry(nd->queue.next, struct request, queuelist);
+       rq = list_first_entry_or_null(&nd->queue, struct request, queuelist);
+       if (rq) {
                list_del_init(&rq->queuelist);
                elv_dispatch_sort(q, rq);
                return 1;
@@ -46,7 +46,7 @@ noop_former_request(struct request_queue *q, struct request *rq)
 
        if (rq->queuelist.prev == &nd->queue)
                return NULL;
-       return list_entry(rq->queuelist.prev, struct request, queuelist);
+       return list_prev_entry(rq, queuelist);
 }
 
 static struct request *
@@ -56,7 +56,7 @@ noop_latter_request(struct request_queue *q, struct request *rq)
 
        if (rq->queuelist.next == &nd->queue)
                return NULL;
-       return list_entry(rq->queuelist.next, struct request, queuelist);
+       return list_next_entry(rq, queuelist);
 }
 
 static int noop_init_queue(struct request_queue *q, struct elevator_type *e)
index c2c48ec64b2709c5f252e164bc3397df0c439210..621317ac4d59f5fd75e433718a194bad7b1c2a56 100644 (file)
@@ -32,7 +32,7 @@ int mac_partition(struct parsed_partitions *state)
        Sector sect;
        unsigned char *data;
        int slot, blocks_in_map;
-       unsigned secsize;
+       unsigned secsize, datasize, partoffset;
 #ifdef CONFIG_PPC_PMAC
        int found_root = 0;
        int found_root_goodness = 0;
@@ -50,10 +50,14 @@ int mac_partition(struct parsed_partitions *state)
        }
        secsize = be16_to_cpu(md->block_size);
        put_dev_sector(sect);
-       data = read_part_sector(state, secsize/512, &sect);
+       datasize = round_down(secsize, 512);
+       data = read_part_sector(state, datasize / 512, &sect);
        if (!data)
                return -1;
-       part = (struct mac_partition *) (data + secsize%512);
+       partoffset = secsize % 512;
+       if (partoffset + sizeof(*part) > datasize)
+               return -1;
+       part = (struct mac_partition *) (data + partoffset);
        if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) {
                put_dev_sector(sect);
                return 0;               /* not a MacOS disk */
index 73d039156ea7694f14a444dea3ccbeda6c45a564..795d0ca714bfe45f25b97d3e6f566088925f5875 100644 (file)
@@ -63,6 +63,7 @@ obj-$(CONFIG_FB_I810)           += video/fbdev/i810/
 obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 
 obj-$(CONFIG_PARPORT)          += parport/
+obj-$(CONFIG_NVM)              += lightnvm/
 obj-y                          += base/ block/ misc/ mfd/ nfc/
 obj-$(CONFIG_LIBNVDIMM)                += nvdimm/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
@@ -70,7 +71,6 @@ obj-$(CONFIG_NUBUS)           += nubus/
 obj-y                          += macintosh/
 obj-$(CONFIG_IDE)              += ide/
 obj-$(CONFIG_SCSI)             += scsi/
-obj-$(CONFIG_NVM)              += lightnvm/
 obj-y                          += nvme/
 obj-$(CONFIG_ATA)              += ata/
 obj-$(CONFIG_TARGET_CORE)      += target/
index a28a562f7b7f245355db7d536e0558c78cc7e374..3457ac8c03e2f3cfe10c8a2ccc26f9a706039831 100644 (file)
@@ -3810,7 +3810,6 @@ static int mtip_block_initialize(struct driver_data *dd)
        sector_t capacity;
        unsigned int index = 0;
        struct kobject *kobj;
-       unsigned char thd_name[16];
 
        if (dd->disk)
                goto skip_create_disk; /* hw init done, before rebuild */
@@ -3958,10 +3957,9 @@ skip_create_disk:
        }
 
 start_service_thread:
-       sprintf(thd_name, "mtip_svc_thd_%02d", index);
        dd->mtip_svc_handler = kthread_create_on_node(mtip_service_thread,
-                                               dd, dd->numa_node, "%s",
-                                               thd_name);
+                                               dd, dd->numa_node,
+                                               "mtip_svc_thd_%02d", index);
 
        if (IS_ERR(dd->mtip_svc_handler)) {
                dev_err(&dd->pdev->dev, "service thread failed to start\n");
index 6255d1c4bba46c802548806ff95ee213ffd3f0e6..5c8ba5484d86b14edaaf20cfd215591950826a76 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/slab.h>
 #include <linux/blk-mq.h>
 #include <linux/hrtimer.h>
+#include <linux/lightnvm.h>
 
 struct nullb_cmd {
        struct list_head list;
@@ -39,12 +40,14 @@ struct nullb {
 
        struct nullb_queue *queues;
        unsigned int nr_queues;
+       char disk_name[DISK_NAME_LEN];
 };
 
 static LIST_HEAD(nullb_list);
 static struct mutex lock;
 static int null_major;
 static int nullb_indexes;
+static struct kmem_cache *ppa_cache;
 
 struct completion_queue {
        struct llist_head list;
@@ -119,6 +122,10 @@ static int nr_devices = 2;
 module_param(nr_devices, int, S_IRUGO);
 MODULE_PARM_DESC(nr_devices, "Number of devices to register");
 
+static bool use_lightnvm;
+module_param(use_lightnvm, bool, S_IRUGO);
+MODULE_PARM_DESC(use_lightnvm, "Register as a LightNVM device");
+
 static int irqmode = NULL_IRQ_SOFTIRQ;
 
 static int null_set_irqmode(const char *str, const struct kernel_param *kp)
@@ -427,15 +434,156 @@ static void null_del_dev(struct nullb *nullb)
 {
        list_del_init(&nullb->list);
 
-       del_gendisk(nullb->disk);
+       if (use_lightnvm)
+               nvm_unregister(nullb->disk_name);
+       else
+               del_gendisk(nullb->disk);
        blk_cleanup_queue(nullb->q);
        if (queue_mode == NULL_Q_MQ)
                blk_mq_free_tag_set(&nullb->tag_set);
-       put_disk(nullb->disk);
+       if (!use_lightnvm)
+               put_disk(nullb->disk);
        cleanup_queues(nullb);
        kfree(nullb);
 }
 
+#ifdef CONFIG_NVM
+
+static void null_lnvm_end_io(struct request *rq, int error)
+{
+       struct nvm_rq *rqd = rq->end_io_data;
+       struct nvm_dev *dev = rqd->dev;
+
+       dev->mt->end_io(rqd, error);
+
+       blk_put_request(rq);
+}
+
+static int null_lnvm_submit_io(struct request_queue *q, struct nvm_rq *rqd)
+{
+       struct request *rq;
+       struct bio *bio = rqd->bio;
+
+       rq = blk_mq_alloc_request(q, bio_rw(bio), GFP_KERNEL, 0);
+       if (IS_ERR(rq))
+               return -ENOMEM;
+
+       rq->cmd_type = REQ_TYPE_DRV_PRIV;
+       rq->__sector = bio->bi_iter.bi_sector;
+       rq->ioprio = bio_prio(bio);
+
+       if (bio_has_data(bio))
+               rq->nr_phys_segments = bio_phys_segments(q, bio);
+
+       rq->__data_len = bio->bi_iter.bi_size;
+       rq->bio = rq->biotail = bio;
+
+       rq->end_io_data = rqd;
+
+       blk_execute_rq_nowait(q, NULL, rq, 0, null_lnvm_end_io);
+
+       return 0;
+}
+
+static int null_lnvm_id(struct request_queue *q, struct nvm_id *id)
+{
+       sector_t size = gb * 1024 * 1024 * 1024ULL;
+       sector_t blksize;
+       struct nvm_id_group *grp;
+
+       id->ver_id = 0x1;
+       id->vmnt = 0;
+       id->cgrps = 1;
+       id->cap = 0x3;
+       id->dom = 0x1;
+
+       id->ppaf.blk_offset = 0;
+       id->ppaf.blk_len = 16;
+       id->ppaf.pg_offset = 16;
+       id->ppaf.pg_len = 16;
+       id->ppaf.sect_offset = 32;
+       id->ppaf.sect_len = 8;
+       id->ppaf.pln_offset = 40;
+       id->ppaf.pln_len = 8;
+       id->ppaf.lun_offset = 48;
+       id->ppaf.lun_len = 8;
+       id->ppaf.ch_offset = 56;
+       id->ppaf.ch_len = 8;
+
+       do_div(size, bs); /* convert size to pages */
+       do_div(size, 256); /* concert size to pgs pr blk */
+       grp = &id->groups[0];
+       grp->mtype = 0;
+       grp->fmtype = 0;
+       grp->num_ch = 1;
+       grp->num_pg = 256;
+       blksize = size;
+       do_div(size, (1 << 16));
+       grp->num_lun = size + 1;
+       do_div(blksize, grp->num_lun);
+       grp->num_blk = blksize;
+       grp->num_pln = 1;
+
+       grp->fpg_sz = bs;
+       grp->csecs = bs;
+       grp->trdt = 25000;
+       grp->trdm = 25000;
+       grp->tprt = 500000;
+       grp->tprm = 500000;
+       grp->tbet = 1500000;
+       grp->tbem = 1500000;
+       grp->mpos = 0x010101; /* single plane rwe */
+       grp->cpar = hw_queue_depth;
+
+       return 0;
+}
+
+static void *null_lnvm_create_dma_pool(struct request_queue *q, char *name)
+{
+       mempool_t *virtmem_pool;
+
+       virtmem_pool = mempool_create_slab_pool(64, ppa_cache);
+       if (!virtmem_pool) {
+               pr_err("null_blk: Unable to create virtual memory pool\n");
+               return NULL;
+       }
+
+       return virtmem_pool;
+}
+
+static void null_lnvm_destroy_dma_pool(void *pool)
+{
+       mempool_destroy(pool);
+}
+
+static void *null_lnvm_dev_dma_alloc(struct request_queue *q, void *pool,
+                               gfp_t mem_flags, dma_addr_t *dma_handler)
+{
+       return mempool_alloc(pool, mem_flags);
+}
+
+static void null_lnvm_dev_dma_free(void *pool, void *entry,
+                                                       dma_addr_t dma_handler)
+{
+       mempool_free(entry, pool);
+}
+
+static struct nvm_dev_ops null_lnvm_dev_ops = {
+       .identity               = null_lnvm_id,
+       .submit_io              = null_lnvm_submit_io,
+
+       .create_dma_pool        = null_lnvm_create_dma_pool,
+       .destroy_dma_pool       = null_lnvm_destroy_dma_pool,
+       .dev_dma_alloc          = null_lnvm_dev_dma_alloc,
+       .dev_dma_free           = null_lnvm_dev_dma_free,
+
+       /* Simulate nvme protocol restriction */
+       .max_phys_sect          = 64,
+};
+#else
+static struct nvm_dev_ops null_lnvm_dev_ops;
+#endif /* CONFIG_NVM */
+
 static int null_open(struct block_device *bdev, fmode_t mode)
 {
        return 0;
@@ -575,11 +723,6 @@ static int null_add_dev(void)
        queue_flag_set_unlocked(QUEUE_FLAG_NONROT, nullb->q);
        queue_flag_clear_unlocked(QUEUE_FLAG_ADD_RANDOM, nullb->q);
 
-       disk = nullb->disk = alloc_disk_node(1, home_node);
-       if (!disk) {
-               rv = -ENOMEM;
-               goto out_cleanup_blk_queue;
-       }
 
        mutex_lock(&lock);
        list_add_tail(&nullb->list, &nullb_list);
@@ -589,6 +732,21 @@ static int null_add_dev(void)
        blk_queue_logical_block_size(nullb->q, bs);
        blk_queue_physical_block_size(nullb->q, bs);
 
+       sprintf(nullb->disk_name, "nullb%d", nullb->index);
+
+       if (use_lightnvm) {
+               rv = nvm_register(nullb->q, nullb->disk_name,
+                                                       &null_lnvm_dev_ops);
+               if (rv)
+                       goto out_cleanup_blk_queue;
+               goto done;
+       }
+
+       disk = nullb->disk = alloc_disk_node(1, home_node);
+       if (!disk) {
+               rv = -ENOMEM;
+               goto out_cleanup_lightnvm;
+       }
        size = gb * 1024 * 1024 * 1024ULL;
        set_capacity(disk, size >> 9);
 
@@ -598,10 +756,15 @@ static int null_add_dev(void)
        disk->fops              = &null_fops;
        disk->private_data      = nullb;
        disk->queue             = nullb->q;
-       sprintf(disk->disk_name, "nullb%d", nullb->index);
+       strncpy(disk->disk_name, nullb->disk_name, DISK_NAME_LEN);
+
        add_disk(disk);
+done:
        return 0;
 
+out_cleanup_lightnvm:
+       if (use_lightnvm)
+               nvm_unregister(nullb->disk_name);
 out_cleanup_blk_queue:
        blk_cleanup_queue(nullb->q);
 out_cleanup_tags:
@@ -625,6 +788,18 @@ static int __init null_init(void)
                bs = PAGE_SIZE;
        }
 
+       if (use_lightnvm && bs != 4096) {
+               pr_warn("null_blk: LightNVM only supports 4k block size\n");
+               pr_warn("null_blk: defaults block size to 4k\n");
+               bs = 4096;
+       }
+
+       if (use_lightnvm && queue_mode != NULL_Q_MQ) {
+               pr_warn("null_blk: LightNVM only supported for blk-mq\n");
+               pr_warn("null_blk: defaults queue mode to blk-mq\n");
+               queue_mode = NULL_Q_MQ;
+       }
+
        if (queue_mode == NULL_Q_MQ && use_per_node_hctx) {
                if (submit_queues < nr_online_nodes) {
                        pr_warn("null_blk: submit_queues param is set to %u.",
@@ -655,15 +830,27 @@ static int __init null_init(void)
        if (null_major < 0)
                return null_major;
 
+       if (use_lightnvm) {
+               ppa_cache = kmem_cache_create("ppa_cache", 64 * sizeof(u64),
+                                                               0, 0, NULL);
+               if (!ppa_cache) {
+                       pr_err("null_blk: unable to create ppa cache\n");
+                       return -ENOMEM;
+               }
+       }
+
        for (i = 0; i < nr_devices; i++) {
                if (null_add_dev()) {
                        unregister_blkdev(null_major, "nullb");
-                       return -EINVAL;
+                       goto err_ppa;
                }
        }
 
        pr_info("null: module loaded\n");
        return 0;
+err_ppa:
+       kmem_cache_destroy(ppa_cache);
+       return -EINVAL;
 }
 
 static void __exit null_exit(void)
@@ -678,6 +865,8 @@ static void __exit null_exit(void)
                null_del_dev(nullb);
        }
        mutex_unlock(&lock);
+
+       kmem_cache_destroy(ppa_cache);
 }
 
 module_init(null_init);
index 9f185694875850427e9613aaf725859c7efbfc63..bf500e0e7362baf72f7a4321e5fda55dc4355f9b 100644 (file)
@@ -117,7 +117,7 @@ static struct platform_driver omap_ocp2scp_driver = {
 
 module_platform_driver(omap_ocp2scp_driver);
 
-MODULE_ALIAS("platform: omap-ocp2scp");
+MODULE_ALIAS("platform:omap-ocp2scp");
 MODULE_AUTHOR("Texas Instruments Inc.");
 MODULE_DESCRIPTION("OMAP OCP2SCP driver");
 MODULE_LICENSE("GPL v2");
index 85260fb96b36547659bda0cd0f8430c682d1d781..f2878459199abf505ba1e761187eb1f5f956d7ad 100644 (file)
@@ -1,3 +1,13 @@
+config CLK_BCM_63XX
+       bool "Broadcom BCM63xx clock support"
+       depends on ARCH_BCM_63XX || COMPILE_TEST
+       depends on COMMON_CLK
+       select COMMON_CLK_IPROC
+       default ARCH_BCM_63XX
+       help
+         Enable common clock framework support for Broadcom BCM63xx DSL SoCs
+         based on the ARM architecture
+
 config CLK_BCM_KONA
        bool "Broadcom Kona CCU clock support"
        depends on ARCH_BCM_MOBILE || COMPILE_TEST
index 3fc95060d875e8607696c61bece2020613f4fdb1..247c26750d8bf38e28d179d8a2bc15b8863e7476 100644 (file)
@@ -1,3 +1,4 @@
+obj-$(CONFIG_CLK_BCM_63XX)     += clk-bcm63xx.o
 obj-$(CONFIG_CLK_BCM_KONA)     += clk-kona.o
 obj-$(CONFIG_CLK_BCM_KONA)     += clk-kona-setup.o
 obj-$(CONFIG_CLK_BCM_KONA)     += clk-bcm281xx.o
diff --git a/drivers/clk/bcm/clk-bcm63xx.c b/drivers/clk/bcm/clk-bcm63xx.c
new file mode 100644 (file)
index 0000000..fbc17ae
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2015 Broadcom Corporation
+ *
+ * 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.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include <linux/init.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+#include "clk-iproc.h"
+
+static void __init bcm63138_armpll_init(struct device_node *node)
+{
+       iproc_armpll_setup(node);
+}
+CLK_OF_DECLARE(bcm63138_armpll, "brcm,bcm63138-armpll", bcm63138_armpll_init);
index c4c141cab444489353be4ececa284ba789555c0c..23686f756b5e4ede70e94e8457fe8c24d951ec61 100644 (file)
@@ -96,13 +96,11 @@ static struct clk ** const uart_clks[] __initconst = {
        NULL
 };
 
-static int __init __mx25_clocks_init(unsigned long osc_rate,
-                                    void __iomem *ccm_base)
+static int __init __mx25_clocks_init(void __iomem *ccm_base)
 {
        BUG_ON(!ccm_base);
 
        clk[dummy] = imx_clk_fixed("dummy", 0);
-       clk[osc] = imx_clk_fixed("osc", osc_rate);
        clk[mpll] = imx_clk_pllv1(IMX_PLLV1_IMX25, "mpll", "osc", ccm(CCM_MPCTL));
        clk[upll] = imx_clk_pllv1(IMX_PLLV1_IMX25, "upll", "osc", ccm(CCM_UPCTL));
        clk[mpll_cpu_3_4] = imx_clk_fixed_factor("mpll_cpu_3_4", "mpll", 3, 4);
@@ -250,22 +248,10 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
 
 static void __init mx25_clocks_init_dt(struct device_node *np)
 {
-       struct device_node *refnp;
-       unsigned long osc_rate = 24000000;
        void __iomem *ccm;
 
-       /* retrieve the freqency of fixed clocks from device tree */
-       for_each_compatible_node(refnp, NULL, "fixed-clock") {
-               u32 rate;
-               if (of_property_read_u32(refnp, "clock-frequency", &rate))
-                       continue;
-
-               if (of_device_is_compatible(refnp, "fsl,imx-osc"))
-                       osc_rate = rate;
-       }
-
        ccm = of_iomap(np, 0);
-       __mx25_clocks_init(osc_rate, ccm);
+       __mx25_clocks_init(ccm);
 
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
index c6770348d2abc764b19208f3b2228c0d23d10e42..29d4c44ef3563d81542eb6dbbea184a435fc9bb9 100644 (file)
@@ -519,10 +519,10 @@ static void __init mx53_clocks_init(struct device_node *np)
                                                mx53_ldb_di0_sel, ARRAY_SIZE(mx53_ldb_di0_sel), CLK_SET_RATE_PARENT);
        clk[IMX5_CLK_LDB_DI0_GATE]      = imx_clk_gate2("ldb_di0_gate", "ldb_di0_div", MXC_CCM_CCGR6, 28);
        clk[IMX5_CLK_LDB_DI1_GATE]      = imx_clk_gate2("ldb_di1_gate", "ldb_di1_div", MXC_CCM_CCGR6, 30);
-       clk[IMX5_CLK_IPU_DI0_SEL]       = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3,
-                                               mx53_ipu_di0_sel, ARRAY_SIZE(mx53_ipu_di0_sel));
-       clk[IMX5_CLK_IPU_DI1_SEL]       = imx_clk_mux("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3,
-                                               mx53_ipu_di1_sel, ARRAY_SIZE(mx53_ipu_di1_sel));
+       clk[IMX5_CLK_IPU_DI0_SEL]       = imx_clk_mux_flags("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3,
+                                               mx53_ipu_di0_sel, ARRAY_SIZE(mx53_ipu_di0_sel), CLK_SET_RATE_PARENT);
+       clk[IMX5_CLK_IPU_DI1_SEL]       = imx_clk_mux_flags("ipu_di1_sel", MXC_CCM_CSCMR2, 29, 3,
+                                               mx53_ipu_di1_sel, ARRAY_SIZE(mx53_ipu_di1_sel), CLK_SET_RATE_PARENT);
        clk[IMX5_CLK_TVE_EXT_SEL]       = imx_clk_mux_flags("tve_ext_sel", MXC_CCM_CSCMR1, 6, 1,
                                                mx53_tve_ext_sel, ARRAY_SIZE(mx53_tve_ext_sel), CLK_SET_RATE_PARENT);
        clk[IMX5_CLK_TVE_GATE]          = imx_clk_gate2("tve_gate", "tve_pred", MXC_CCM_CCGR2, 30);
index c1935081d34aee3403d0ee5d6904b117bd5dfa12..f0efc6feeec2b5d5b12bb11739e990ba3ed10e9b 100644 (file)
@@ -70,7 +70,8 @@ static const char *cko_sels[] = { "cko1", "cko2", };
 static const char *lvds_sels[] = {
        "dummy", "dummy", "dummy", "dummy", "dummy", "dummy",
        "pll4_audio", "pll5_video", "pll8_mlb", "enet_ref",
-       "pcie_ref_125m", "sata_ref_100m",
+       "pcie_ref_125m", "sata_ref_100m",  "usbphy1", "usbphy2",
+       "dummy", "dummy", "dummy", "dummy", "osc",
 };
 static const char *pll_bypass_src_sels[] = { "osc", "lvds1_in", "lvds2_in", "dummy", };
 static const char *pll1_bypass_sels[] = { "pll1", "pll1_bypass_src", };
index 01718d05e95221eaf8a96e4b69bb994275ad82da..08692d74b8847d0dfb2bb09f9b006a902425f335 100644 (file)
@@ -399,9 +399,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node)
        /* mask handshake of mmdc */
        writel_relaxed(BM_CCM_CCDR_MMDC_CH0_MASK, base + CCDR);
 
-       for (i = 0; i < ARRAY_SIZE(clks); i++)
-               if (IS_ERR(clks[i]))
-                       pr_err("i.MX6UL clk %d: register failed with %ld\n", i, PTR_ERR(clks[i]));
+       imx_check_clocks(clks, ARRAY_SIZE(clks));
 
        clk_data.clks = clks;
        clk_data.clk_num = ARRAY_SIZE(clks);
index 448ef321948b1c1d5e0b4c614b9875728b133d58..fbb6a8c8653dcb1045640dd178eef02669ab9950 100644 (file)
@@ -833,10 +833,13 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node)
 
        clks[IMX7D_GPT_3M_CLK] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8);
 
-       for (i = 0; i < ARRAY_SIZE(clks); i++)
-               if (IS_ERR(clks[i]))
-                       pr_err("i.MX7D clk %d: register failed with %ld\n",
-                                       i, PTR_ERR(clks[i]));
+       clks[IMX7D_CLK_ARM] = imx_clk_cpu("arm", "arm_a7_root_clk",
+                                        clks[IMX7D_ARM_A7_ROOT_CLK],
+                                        clks[IMX7D_ARM_A7_ROOT_SRC],
+                                        clks[IMX7D_PLL_ARM_MAIN_CLK],
+                                        clks[IMX7D_PLL_SYS_MAIN_CLK]);
+
+       imx_check_clocks(clks, ARRAY_SIZE(clks));
 
        clk_data.clks = clks;
        clk_data.clk_num = ARRAY_SIZE(clks);
index 6addf8f58b975d9696f91e003b4775afa0da4397..c05c43d56a9425f4450ef1a3fbc64f3de3729743 100644 (file)
@@ -97,6 +97,16 @@ static void clk_pllv3_unprepare(struct clk_hw *hw)
        writel_relaxed(val, pll->base);
 }
 
+static int clk_pllv3_is_prepared(struct clk_hw *hw)
+{
+       struct clk_pllv3 *pll = to_clk_pllv3(hw);
+
+       if (readl_relaxed(pll->base) & BM_PLL_LOCK)
+               return 1;
+
+       return 0;
+}
+
 static unsigned long clk_pllv3_recalc_rate(struct clk_hw *hw,
                                           unsigned long parent_rate)
 {
@@ -139,6 +149,7 @@ static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate,
 static const struct clk_ops clk_pllv3_ops = {
        .prepare        = clk_pllv3_prepare,
        .unprepare      = clk_pllv3_unprepare,
+       .is_prepared    = clk_pllv3_is_prepared,
        .recalc_rate    = clk_pllv3_recalc_rate,
        .round_rate     = clk_pllv3_round_rate,
        .set_rate       = clk_pllv3_set_rate,
@@ -193,6 +204,7 @@ static int clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate,
 static const struct clk_ops clk_pllv3_sys_ops = {
        .prepare        = clk_pllv3_prepare,
        .unprepare      = clk_pllv3_unprepare,
+       .is_prepared    = clk_pllv3_is_prepared,
        .recalc_rate    = clk_pllv3_sys_recalc_rate,
        .round_rate     = clk_pllv3_sys_round_rate,
        .set_rate       = clk_pllv3_sys_set_rate,
@@ -265,6 +277,7 @@ static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate,
 static const struct clk_ops clk_pllv3_av_ops = {
        .prepare        = clk_pllv3_prepare,
        .unprepare      = clk_pllv3_unprepare,
+       .is_prepared    = clk_pllv3_is_prepared,
        .recalc_rate    = clk_pllv3_av_recalc_rate,
        .round_rate     = clk_pllv3_av_round_rate,
        .set_rate       = clk_pllv3_av_set_rate,
@@ -279,6 +292,7 @@ static unsigned long clk_pllv3_enet_recalc_rate(struct clk_hw *hw,
 static const struct clk_ops clk_pllv3_enet_ops = {
        .prepare        = clk_pllv3_prepare,
        .unprepare      = clk_pllv3_unprepare,
+       .is_prepared    = clk_pllv3_is_prepared,
        .recalc_rate    = clk_pllv3_enet_recalc_rate,
 };
 
index d1b1c95177bbeb577c88bf06c06121db76477f24..0a94d9661d9123551b5b84cd5764cb9b91a6c176 100644 (file)
@@ -335,22 +335,22 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
        clk[VF610_CLK_SAI0_SEL] = imx_clk_mux("sai0_sel", CCM_CSCMR1, 0, 2, sai_sels, 4);
        clk[VF610_CLK_SAI0_EN] = imx_clk_gate("sai0_en", "sai0_sel", CCM_CSCDR1, 16);
        clk[VF610_CLK_SAI0_DIV] = imx_clk_divider("sai0_div", "sai0_en", CCM_CSCDR1, 0, 4);
-       clk[VF610_CLK_SAI0] = imx_clk_gate2("sai0", "sai0_div", CCM_CCGR0, CCM_CCGRx_CGn(15));
+       clk[VF610_CLK_SAI0] = imx_clk_gate2("sai0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(15));
 
        clk[VF610_CLK_SAI1_SEL] = imx_clk_mux("sai1_sel", CCM_CSCMR1, 2, 2, sai_sels, 4);
        clk[VF610_CLK_SAI1_EN] = imx_clk_gate("sai1_en", "sai1_sel", CCM_CSCDR1, 17);
        clk[VF610_CLK_SAI1_DIV] = imx_clk_divider("sai1_div", "sai1_en", CCM_CSCDR1, 4, 4);
-       clk[VF610_CLK_SAI1] = imx_clk_gate2("sai1", "sai1_div", CCM_CCGR1, CCM_CCGRx_CGn(0));
+       clk[VF610_CLK_SAI1] = imx_clk_gate2("sai1", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(0));
 
        clk[VF610_CLK_SAI2_SEL] = imx_clk_mux("sai2_sel", CCM_CSCMR1, 4, 2, sai_sels, 4);
        clk[VF610_CLK_SAI2_EN] = imx_clk_gate("sai2_en", "sai2_sel", CCM_CSCDR1, 18);
        clk[VF610_CLK_SAI2_DIV] = imx_clk_divider("sai2_div", "sai2_en", CCM_CSCDR1, 8, 4);
-       clk[VF610_CLK_SAI2] = imx_clk_gate2("sai2", "sai2_div", CCM_CCGR1, CCM_CCGRx_CGn(1));
+       clk[VF610_CLK_SAI2] = imx_clk_gate2("sai2", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(1));
 
        clk[VF610_CLK_SAI3_SEL] = imx_clk_mux("sai3_sel", CCM_CSCMR1, 6, 2, sai_sels, 4);
        clk[VF610_CLK_SAI3_EN] = imx_clk_gate("sai3_en", "sai3_sel", CCM_CSCDR1, 19);
        clk[VF610_CLK_SAI3_DIV] = imx_clk_divider("sai3_div", "sai3_en", CCM_CSCDR1, 12, 4);
-       clk[VF610_CLK_SAI3] = imx_clk_gate2("sai3", "sai3_div", CCM_CCGR1, CCM_CCGRx_CGn(2));
+       clk[VF610_CLK_SAI3] = imx_clk_gate2("sai3", "ipg_bus", CCM_CCGR1, CCM_CCGRx_CGn(2));
 
        clk[VF610_CLK_NFC_SEL] = imx_clk_mux("nfc_sel", CCM_CSCMR1, 12, 2, nfc_sels, 4);
        clk[VF610_CLK_NFC_EN] = imx_clk_gate("nfc_en", "nfc_sel", CCM_CSCDR2, 9);
index 8014c2307332cc803a73baec42c297c079d61974..235a1ba73d92d577bbf605f5dab9d737fe246797 100644 (file)
@@ -202,7 +202,7 @@ config ARM_SA1110_CPUFREQ
 
 config ARM_SCPI_CPUFREQ
         tristate "SCPI based CPUfreq driver"
-       depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL
+       depends on ARM_BIG_LITTLE_CPUFREQ && ARM_SCPI_PROTOCOL && COMMON_CLK_SCPI
         help
          This adds the CPUfreq driver support for ARM big.LITTLE platforms
          using SCPI protocol for CPU power management.
index e8cb334094b0d5d89df7d8f482515f7901ac28f5..7c0bdfb1a2ca47ea9dcd0b36ef892274edd929b4 100644 (file)
@@ -98,10 +98,11 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
        policy->max = cpu->perf_caps.highest_perf;
        policy->cpuinfo.min_freq = policy->min;
        policy->cpuinfo.max_freq = policy->max;
+       policy->shared_type = cpu->shared_type;
 
        if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
                cpumask_copy(policy->cpus, cpu->shared_cpu_map);
-       else {
+       else if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL) {
                /* Support only SW_ANY for now. */
                pr_debug("Unsupported CPU co-ord type\n");
                return -EFAULT;
index 7c48e7316d91e23cd8374852c477375ae65e1ccb..a83c995a62dfed9173823289d4cc3bbd3199cf12 100644 (file)
@@ -1401,13 +1401,10 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
        }
 
        cpumask_clear_cpu(cpu, policy->real_cpus);
+       remove_cpu_dev_symlink(policy, cpu);
 
-       if (cpumask_empty(policy->real_cpus)) {
+       if (cpumask_empty(policy->real_cpus))
                cpufreq_policy_free(policy, true);
-               return;
-       }
-
-       remove_cpu_dev_symlink(policy, cpu);
 }
 
 static void handle_update(struct work_struct *work)
index 001a532e342e818d6093f50fc2eca3bd15a335b7..4d07cbd2b23cfb80ddc40fc0822ce37464991498 100644 (file)
@@ -1101,6 +1101,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
            policy->max >= policy->cpuinfo.max_freq) {
                pr_debug("intel_pstate: set performance\n");
                limits = &performance_limits;
+               if (hwp_active)
+                       intel_pstate_hwp_set();
                return 0;
        }
 
@@ -1108,7 +1110,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
        limits = &powersave_limits;
        limits->min_policy_pct = (policy->min * 100) / policy->cpuinfo.max_freq;
        limits->min_policy_pct = clamp_t(int, limits->min_policy_pct, 0 , 100);
-       limits->max_policy_pct = (policy->max * 100) / policy->cpuinfo.max_freq;
+       limits->max_policy_pct = DIV_ROUND_UP(policy->max * 100,
+                                             policy->cpuinfo.max_freq);
        limits->max_policy_pct = clamp_t(int, limits->max_policy_pct, 0 , 100);
 
        /* Normalize user input to [min_policy_pct, max_policy_pct] */
@@ -1120,6 +1123,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
                                   limits->max_sysfs_pct);
        limits->max_perf_pct = max(limits->min_policy_pct,
                                   limits->max_perf_pct);
+       limits->max_perf = round_up(limits->max_perf, 8);
 
        /* Make sure min_perf_pct <= max_perf_pct */
        limits->min_perf_pct = min(limits->max_perf_pct, limits->min_perf_pct);
index 0675e268d5777967489bf25b30f5d217290fa441..16fe773fb846b5e9c9cb70b625715a5f5f888237 100644 (file)
@@ -1752,16 +1752,14 @@ static enum dma_status edma_tx_status(struct dma_chan *chan,
        return ret;
 }
 
-static bool edma_is_memcpy_channel(int ch_num, u16 *memcpy_channels)
+static bool edma_is_memcpy_channel(int ch_num, s32 *memcpy_channels)
 {
-       s16 *memcpy_ch = memcpy_channels;
-
        if (!memcpy_channels)
                return false;
-       while (*memcpy_ch != -1) {
-               if (*memcpy_ch == ch_num)
+       while (*memcpy_channels != -1) {
+               if (*memcpy_channels == ch_num)
                        return true;
-               memcpy_ch++;
+               memcpy_channels++;
        }
        return false;
 }
@@ -1775,7 +1773,7 @@ static void edma_dma_init(struct edma_cc *ecc, bool legacy_mode)
 {
        struct dma_device *s_ddev = &ecc->dma_slave;
        struct dma_device *m_ddev = NULL;
-       s16 *memcpy_channels = ecc->info->memcpy_channels;
+       s32 *memcpy_channels = ecc->info->memcpy_channels;
        int i, j;
 
        dma_cap_zero(s_ddev->cap_mask);
@@ -1996,16 +1994,16 @@ static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
        prop = of_find_property(dev->of_node, "ti,edma-memcpy-channels", &sz);
        if (prop) {
                const char pname[] = "ti,edma-memcpy-channels";
-               size_t nelm = sz / sizeof(s16);
-               s16 *memcpy_ch;
+               size_t nelm = sz / sizeof(s32);
+               s32 *memcpy_ch;
 
-               memcpy_ch = devm_kcalloc(dev, nelm + 1, sizeof(s16),
+               memcpy_ch = devm_kcalloc(dev, nelm + 1, sizeof(s32),
                                         GFP_KERNEL);
                if (!memcpy_ch)
                        return ERR_PTR(-ENOMEM);
 
-               ret = of_property_read_u16_array(dev->of_node, pname,
-                                                (u16 *)memcpy_ch, nelm);
+               ret = of_property_read_u32_array(dev->of_node, pname,
+                                                (u32 *)memcpy_ch, nelm);
                if (ret)
                        return ERR_PTR(ret);
 
@@ -2017,31 +2015,50 @@ static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
                                &sz);
        if (prop) {
                const char pname[] = "ti,edma-reserved-slot-ranges";
+               u32 (*tmp)[2];
                s16 (*rsv_slots)[2];
-               size_t nelm = sz / sizeof(*rsv_slots);
+               size_t nelm = sz / sizeof(*tmp);
                struct edma_rsv_info *rsv_info;
+               int i;
 
                if (!nelm)
                        return info;
 
+               tmp = kcalloc(nelm, sizeof(*tmp), GFP_KERNEL);
+               if (!tmp)
+                       return ERR_PTR(-ENOMEM);
+
                rsv_info = devm_kzalloc(dev, sizeof(*rsv_info), GFP_KERNEL);
-               if (!rsv_info)
+               if (!rsv_info) {
+                       kfree(tmp);
                        return ERR_PTR(-ENOMEM);
+               }
 
                rsv_slots = devm_kcalloc(dev, nelm + 1, sizeof(*rsv_slots),
                                         GFP_KERNEL);
-               if (!rsv_slots)
+               if (!rsv_slots) {
+                       kfree(tmp);
                        return ERR_PTR(-ENOMEM);
+               }
 
-               ret = of_property_read_u16_array(dev->of_node, pname,
-                                                (u16 *)rsv_slots, nelm * 2);
-               if (ret)
+               ret = of_property_read_u32_array(dev->of_node, pname,
+                                                (u32 *)tmp, nelm * 2);
+               if (ret) {
+                       kfree(tmp);
                        return ERR_PTR(ret);
+               }
 
+               for (i = 0; i < nelm; i++) {
+                       rsv_slots[i][0] = tmp[i][0];
+                       rsv_slots[i][1] = tmp[i][1];
+               }
                rsv_slots[nelm][0] = -1;
                rsv_slots[nelm][1] = -1;
+
                info->rsv = rsv_info;
                info->rsv->rsv_slots = (const s16 (*)[2])rsv_slots;
+
+               kfree(tmp);
        }
 
        return info;
index 306f75700bf8e1fa5b5c6a7731645ad4a4d86f60..251b14736de92b7ff429d01f9d257c3b918b6547 100644 (file)
@@ -496,6 +496,7 @@ struct amdgpu_bo_va_mapping {
 
 /* bo virtual addresses in a specific vm */
 struct amdgpu_bo_va {
+       struct mutex                    mutex;
        /* protected by bo being reserved */
        struct list_head                bo_list;
        struct fence                    *last_pt_update;
@@ -928,8 +929,6 @@ struct amdgpu_vm_id {
 };
 
 struct amdgpu_vm {
-       struct mutex            mutex;
-
        struct rb_root          va;
 
        /* protecting invalidated */
index 3afcf0237c25474c662f499d4583c7743f6067f9..1d44d508d4d4f50b249104b4aabc9a6cbab83e61 100644 (file)
@@ -784,8 +784,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 {
        struct amdgpu_device *adev = dev->dev_private;
        union drm_amdgpu_cs *cs = data;
-       struct amdgpu_fpriv *fpriv = filp->driver_priv;
-       struct amdgpu_vm *vm = &fpriv->vm;
        struct amdgpu_cs_parser parser = {};
        bool reserved_buffers = false;
        int i, r;
@@ -803,7 +801,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
                r = amdgpu_cs_handle_lockup(adev, r);
                return r;
        }
-       mutex_lock(&vm->mutex);
        r = amdgpu_cs_parser_relocs(&parser);
        if (r == -ENOMEM)
                DRM_ERROR("Not enough memory for command submission!\n");
@@ -888,7 +885,6 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
 
 out:
        amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
-       mutex_unlock(&vm->mutex);
        r = amdgpu_cs_handle_lockup(adev, r);
        return r;
 }
index 00c5b580f56c6e512a6eaea107130b353c66bc93..fc32fc01a64ba8f1d68ae8621af29195287881c8 100644 (file)
@@ -115,12 +115,9 @@ int amdgpu_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_pri
        struct amdgpu_vm *vm = &fpriv->vm;
        struct amdgpu_bo_va *bo_va;
        int r;
-       mutex_lock(&vm->mutex);
        r = amdgpu_bo_reserve(rbo, false);
-       if (r) {
-               mutex_unlock(&vm->mutex);
+       if (r)
                return r;
-       }
 
        bo_va = amdgpu_vm_bo_find(vm, rbo);
        if (!bo_va) {
@@ -129,7 +126,6 @@ int amdgpu_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_pri
                ++bo_va->ref_count;
        }
        amdgpu_bo_unreserve(rbo);
-       mutex_unlock(&vm->mutex);
        return 0;
 }
 
@@ -142,10 +138,8 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,
        struct amdgpu_vm *vm = &fpriv->vm;
        struct amdgpu_bo_va *bo_va;
        int r;
-       mutex_lock(&vm->mutex);
        r = amdgpu_bo_reserve(rbo, true);
        if (r) {
-               mutex_unlock(&vm->mutex);
                dev_err(adev->dev, "leaking bo va because "
                        "we fail to reserve bo (%d)\n", r);
                return;
@@ -157,7 +151,6 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj,
                }
        }
        amdgpu_bo_unreserve(rbo);
-       mutex_unlock(&vm->mutex);
 }
 
 static int amdgpu_gem_handle_lockup(struct amdgpu_device *adev, int r)
@@ -553,7 +546,6 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        gobj = drm_gem_object_lookup(dev, filp, args->handle);
        if (gobj == NULL)
                return -ENOENT;
-       mutex_lock(&fpriv->vm.mutex);
        rbo = gem_to_amdgpu_bo(gobj);
        INIT_LIST_HEAD(&list);
        INIT_LIST_HEAD(&duplicates);
@@ -568,7 +560,6 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        }
        r = ttm_eu_reserve_buffers(&ticket, &list, true, &duplicates);
        if (r) {
-               mutex_unlock(&fpriv->vm.mutex);
                drm_gem_object_unreference_unlocked(gobj);
                return r;
        }
@@ -577,7 +568,6 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        if (!bo_va) {
                ttm_eu_backoff_reservation(&ticket, &list);
                drm_gem_object_unreference_unlocked(gobj);
-               mutex_unlock(&fpriv->vm.mutex);
                return -ENOENT;
        }
 
@@ -602,7 +592,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
        ttm_eu_backoff_reservation(&ticket, &list);
        if (!r && !(args->flags & AMDGPU_VM_DELAY_UPDATE))
                amdgpu_gem_va_update_vm(adev, bo_va, args->operation);
-       mutex_unlock(&fpriv->vm.mutex);
+
        drm_gem_object_unreference_unlocked(gobj);
        return r;
 }
index 03f0c3bae516899aa81ac9b5d4dc6a9c7c1d9660..a745eeeb5d8200f6b92e259c655b10b658c4cad5 100644 (file)
@@ -392,7 +392,10 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
        ib->ptr[ib->length_dw++] = 0x00000001; /* session cmd */
        ib->ptr[ib->length_dw++] = handle;
 
-       ib->ptr[ib->length_dw++] = 0x00000030; /* len */
+       if ((ring->adev->vce.fw_version >> 24) >= 52)
+               ib->ptr[ib->length_dw++] = 0x00000040; /* len */
+       else
+               ib->ptr[ib->length_dw++] = 0x00000030; /* len */
        ib->ptr[ib->length_dw++] = 0x01000001; /* create cmd */
        ib->ptr[ib->length_dw++] = 0x00000000;
        ib->ptr[ib->length_dw++] = 0x00000042;
@@ -404,6 +407,12 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
        ib->ptr[ib->length_dw++] = 0x00000100;
        ib->ptr[ib->length_dw++] = 0x0000000c;
        ib->ptr[ib->length_dw++] = 0x00000000;
+       if ((ring->adev->vce.fw_version >> 24) >= 52) {
+               ib->ptr[ib->length_dw++] = 0x00000000;
+               ib->ptr[ib->length_dw++] = 0x00000000;
+               ib->ptr[ib->length_dw++] = 0x00000000;
+               ib->ptr[ib->length_dw++] = 0x00000000;
+       }
 
        ib->ptr[ib->length_dw++] = 0x00000014; /* len */
        ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
index 159ce54bbd8d42137b1b47a4797b88aec3a6fd5e..ae037e5b6ad016d6ee70545b814d082da84f22c3 100644 (file)
@@ -922,8 +922,9 @@ int amdgpu_vm_clear_invalids(struct amdgpu_device *adev,
                bo_va = list_first_entry(&vm->invalidated,
                        struct amdgpu_bo_va, vm_status);
                spin_unlock(&vm->status_lock);
-
+               mutex_lock(&bo_va->mutex);
                r = amdgpu_vm_bo_update(adev, bo_va, NULL);
+               mutex_unlock(&bo_va->mutex);
                if (r)
                        return r;
 
@@ -967,7 +968,7 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
        INIT_LIST_HEAD(&bo_va->valids);
        INIT_LIST_HEAD(&bo_va->invalids);
        INIT_LIST_HEAD(&bo_va->vm_status);
-
+       mutex_init(&bo_va->mutex);
        list_add_tail(&bo_va->bo_list, &bo->va);
 
        return bo_va;
@@ -1045,7 +1046,9 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
        mapping->offset = offset;
        mapping->flags = flags;
 
+       mutex_lock(&bo_va->mutex);
        list_add(&mapping->list, &bo_va->invalids);
+       mutex_unlock(&bo_va->mutex);
        spin_lock(&vm->it_lock);
        interval_tree_insert(&mapping->it, &vm->va);
        spin_unlock(&vm->it_lock);
@@ -1121,7 +1124,7 @@ int amdgpu_vm_bo_unmap(struct amdgpu_device *adev,
        bool valid = true;
 
        saddr /= AMDGPU_GPU_PAGE_SIZE;
-
+       mutex_lock(&bo_va->mutex);
        list_for_each_entry(mapping, &bo_va->valids, list) {
                if (mapping->it.start == saddr)
                        break;
@@ -1135,10 +1138,12 @@ int amdgpu_vm_bo_unmap(struct amdgpu_device *adev,
                                break;
                }
 
-               if (&mapping->list == &bo_va->invalids)
+               if (&mapping->list == &bo_va->invalids) {
+                       mutex_unlock(&bo_va->mutex);
                        return -ENOENT;
+               }
        }
-
+       mutex_unlock(&bo_va->mutex);
        list_del(&mapping->list);
        spin_lock(&vm->it_lock);
        interval_tree_remove(&mapping->it, &vm->va);
@@ -1190,8 +1195,8 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
                spin_unlock(&vm->it_lock);
                kfree(mapping);
        }
-
        fence_put(bo_va->last_pt_update);
+       mutex_destroy(&bo_va->mutex);
        kfree(bo_va);
 }
 
@@ -1236,7 +1241,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm)
                vm->ids[i].id = 0;
                vm->ids[i].flushed_updates = NULL;
        }
-       mutex_init(&vm->mutex);
        vm->va = RB_ROOT;
        spin_lock_init(&vm->status_lock);
        INIT_LIST_HEAD(&vm->invalidated);
@@ -1320,7 +1324,6 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm)
                fence_put(vm->ids[i].flushed_updates);
        }
 
-       mutex_destroy(&vm->mutex);
 }
 
 /**
index 6a52db6ad8d779afe7a82f29a731a4e912183bcb..370c6c9d81c26550302b974a4b794ed464090b65 100644 (file)
@@ -40,6 +40,9 @@
 
 #define GRBM_GFX_INDEX__VCE_INSTANCE__SHIFT    0x04
 #define GRBM_GFX_INDEX__VCE_INSTANCE_MASK      0x10
+#define mmVCE_LMI_VCPU_CACHE_40BIT_BAR0        0x8616
+#define mmVCE_LMI_VCPU_CACHE_40BIT_BAR1        0x8617
+#define mmVCE_LMI_VCPU_CACHE_40BIT_BAR2        0x8618
 
 #define VCE_V3_0_FW_SIZE       (384 * 1024)
 #define VCE_V3_0_STACK_SIZE    (64 * 1024)
@@ -130,9 +133,11 @@ static int vce_v3_0_start(struct amdgpu_device *adev)
 
                /* set BUSY flag */
                WREG32_P(mmVCE_STATUS, 1, ~1);
-
-               WREG32_P(mmVCE_VCPU_CNTL, VCE_VCPU_CNTL__CLK_EN_MASK,
-                       ~VCE_VCPU_CNTL__CLK_EN_MASK);
+               if (adev->asic_type >= CHIP_STONEY)
+                       WREG32_P(mmVCE_VCPU_CNTL, 1, ~0x200001);
+               else
+                       WREG32_P(mmVCE_VCPU_CNTL, VCE_VCPU_CNTL__CLK_EN_MASK,
+                               ~VCE_VCPU_CNTL__CLK_EN_MASK);
 
                WREG32_P(mmVCE_SOFT_RESET,
                         VCE_SOFT_RESET__ECPU_SOFT_RESET_MASK,
@@ -391,8 +396,12 @@ static void vce_v3_0_mc_resume(struct amdgpu_device *adev, int idx)
        WREG32(mmVCE_LMI_SWAP_CNTL, 0);
        WREG32(mmVCE_LMI_SWAP_CNTL1, 0);
        WREG32(mmVCE_LMI_VM_CTRL, 0);
-
-       WREG32(mmVCE_LMI_VCPU_CACHE_40BIT_BAR, (adev->vce.gpu_addr >> 8));
+       if (adev->asic_type >= CHIP_STONEY) {
+               WREG32(mmVCE_LMI_VCPU_CACHE_40BIT_BAR0, (adev->vce.gpu_addr >> 8));
+               WREG32(mmVCE_LMI_VCPU_CACHE_40BIT_BAR1, (adev->vce.gpu_addr >> 8));
+               WREG32(mmVCE_LMI_VCPU_CACHE_40BIT_BAR2, (adev->vce.gpu_addr >> 8));
+       } else
+               WREG32(mmVCE_LMI_VCPU_CACHE_40BIT_BAR, (adev->vce.gpu_addr >> 8));
        offset = AMDGPU_VCE_FIRMWARE_OFFSET;
        size = VCE_V3_0_FW_SIZE;
        WREG32(mmVCE_VCPU_CACHE_OFFSET0, offset & 0x7fffffff);
@@ -576,6 +585,11 @@ static int vce_v3_0_process_interrupt(struct amdgpu_device *adev,
                                      struct amdgpu_iv_entry *entry)
 {
        DRM_DEBUG("IH: VCE\n");
+
+       WREG32_P(mmVCE_SYS_INT_STATUS,
+               VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK,
+               ~VCE_SYS_INT_STATUS__VCE_SYS_INT_TRAP_INTERRUPT_INT_MASK);
+
        switch (entry->src_data) {
        case 0:
                amdgpu_fence_process(&adev->vce.ring[0]);
index ea30d6ad4c137e60e6f9c1ce4265305d60f85cc9..651129f2ec1d1eac5228d0e0e4c8f0095ad5a35a 100644 (file)
@@ -30,8 +30,7 @@
 #define CREATE_TRACE_POINTS
 #include "gpu_sched_trace.h"
 
-static struct amd_sched_job *
-amd_sched_entity_pop_job(struct amd_sched_entity *entity);
+static bool amd_sched_entity_is_ready(struct amd_sched_entity *entity);
 static void amd_sched_wakeup(struct amd_gpu_scheduler *sched);
 
 struct kmem_cache *sched_fence_slab;
@@ -64,36 +63,36 @@ static void amd_sched_rq_remove_entity(struct amd_sched_rq *rq,
 }
 
 /**
- * Select next job from a specified run queue with round robin policy.
- * Return NULL if nothing available.
+ * Select an entity which could provide a job to run
+ *
+ * @rq         The run queue to check.
+ *
+ * Try to find a ready entity, returns NULL if none found.
  */
-static struct amd_sched_job *
-amd_sched_rq_select_job(struct amd_sched_rq *rq)
+static struct amd_sched_entity *
+amd_sched_rq_select_entity(struct amd_sched_rq *rq)
 {
        struct amd_sched_entity *entity;
-       struct amd_sched_job *sched_job;
 
        spin_lock(&rq->lock);
 
        entity = rq->current_entity;
        if (entity) {
                list_for_each_entry_continue(entity, &rq->entities, list) {
-                       sched_job = amd_sched_entity_pop_job(entity);
-                       if (sched_job) {
+                       if (amd_sched_entity_is_ready(entity)) {
                                rq->current_entity = entity;
                                spin_unlock(&rq->lock);
-                               return sched_job;
+                               return entity;
                        }
                }
        }
 
        list_for_each_entry(entity, &rq->entities, list) {
 
-               sched_job = amd_sched_entity_pop_job(entity);
-               if (sched_job) {
+               if (amd_sched_entity_is_ready(entity)) {
                        rq->current_entity = entity;
                        spin_unlock(&rq->lock);
-                       return sched_job;
+                       return entity;
                }
 
                if (entity == rq->current_entity)
@@ -176,6 +175,24 @@ static bool amd_sched_entity_is_idle(struct amd_sched_entity *entity)
        return false;
 }
 
+/**
+ * Check if entity is ready
+ *
+ * @entity     The pointer to a valid scheduler entity
+ *
+ * Return true if entity could provide a job.
+ */
+static bool amd_sched_entity_is_ready(struct amd_sched_entity *entity)
+{
+       if (kfifo_is_empty(&entity->job_queue))
+               return false;
+
+       if (ACCESS_ONCE(entity->dependency))
+               return false;
+
+       return true;
+}
+
 /**
  * Destroy a context entity
  *
@@ -211,32 +228,53 @@ static void amd_sched_entity_wakeup(struct fence *f, struct fence_cb *cb)
        amd_sched_wakeup(entity->sched);
 }
 
+static bool amd_sched_entity_add_dependency_cb(struct amd_sched_entity *entity)
+{
+       struct amd_gpu_scheduler *sched = entity->sched;
+       struct fence * fence = entity->dependency;
+       struct amd_sched_fence *s_fence;
+
+       if (fence->context == entity->fence_context) {
+               /* We can ignore fences from ourself */
+               fence_put(entity->dependency);
+               return false;
+       }
+
+       s_fence = to_amd_sched_fence(fence);
+       if (s_fence && s_fence->sched == sched) {
+               /* Fence is from the same scheduler */
+               if (test_bit(AMD_SCHED_FENCE_SCHEDULED_BIT, &fence->flags)) {
+                       /* Ignore it when it is already scheduled */
+                       fence_put(entity->dependency);
+                       return false;
+               }
+
+               /* Wait for fence to be scheduled */
+               entity->cb.func = amd_sched_entity_wakeup;
+               list_add_tail(&entity->cb.node, &s_fence->scheduled_cb);
+               return true;
+       }
+
+       if (!fence_add_callback(entity->dependency, &entity->cb,
+                               amd_sched_entity_wakeup))
+               return true;
+
+       fence_put(entity->dependency);
+       return false;
+}
+
 static struct amd_sched_job *
 amd_sched_entity_pop_job(struct amd_sched_entity *entity)
 {
        struct amd_gpu_scheduler *sched = entity->sched;
        struct amd_sched_job *sched_job;
 
-       if (ACCESS_ONCE(entity->dependency))
-               return NULL;
-
        if (!kfifo_out_peek(&entity->job_queue, &sched_job, sizeof(sched_job)))
                return NULL;
 
-       while ((entity->dependency = sched->ops->dependency(sched_job))) {
-
-               if (entity->dependency->context == entity->fence_context) {
-                       /* We can ignore fences from ourself */
-                       fence_put(entity->dependency);
-                       continue;
-               }
-
-               if (fence_add_callback(entity->dependency, &entity->cb,
-                                      amd_sched_entity_wakeup))
-                       fence_put(entity->dependency);
-               else
+       while ((entity->dependency = sched->ops->dependency(sched_job)))
+               if (amd_sched_entity_add_dependency_cb(entity))
                        return NULL;
-       }
 
        return sched_job;
 }
@@ -304,22 +342,22 @@ static void amd_sched_wakeup(struct amd_gpu_scheduler *sched)
 }
 
 /**
- * Select next to run
+ * Select next entity to process
 */
-static struct amd_sched_job *
-amd_sched_select_job(struct amd_gpu_scheduler *sched)
+static struct amd_sched_entity *
+amd_sched_select_entity(struct amd_gpu_scheduler *sched)
 {
-       struct amd_sched_job *sched_job;
+       struct amd_sched_entity *entity;
 
        if (!amd_sched_ready(sched))
                return NULL;
 
        /* Kernel run queue has higher priority than normal run queue*/
-       sched_job = amd_sched_rq_select_job(&sched->kernel_rq);
-       if (sched_job == NULL)
-               sched_job = amd_sched_rq_select_job(&sched->sched_rq);
+       entity = amd_sched_rq_select_entity(&sched->kernel_rq);
+       if (entity == NULL)
+               entity = amd_sched_rq_select_entity(&sched->sched_rq);
 
-       return sched_job;
+       return entity;
 }
 
 static void amd_sched_process_job(struct fence *f, struct fence_cb *cb)
@@ -381,13 +419,16 @@ static int amd_sched_main(void *param)
                unsigned long flags;
 
                wait_event_interruptible(sched->wake_up_worker,
-                       kthread_should_stop() ||
-                       (sched_job = amd_sched_select_job(sched)));
+                       (entity = amd_sched_select_entity(sched)) ||
+                       kthread_should_stop());
 
+               if (!entity)
+                       continue;
+
+               sched_job = amd_sched_entity_pop_job(entity);
                if (!sched_job)
                        continue;
 
-               entity = sched_job->s_entity;
                s_fence = sched_job->s_fence;
 
                if (sched->timeout != MAX_SCHEDULE_TIMEOUT) {
@@ -400,6 +441,7 @@ static int amd_sched_main(void *param)
 
                atomic_inc(&sched->hw_rq_count);
                fence = sched->ops->run_job(sched_job);
+               amd_sched_fence_scheduled(s_fence);
                if (fence) {
                        r = fence_add_callback(fence, &s_fence->cb,
                                               amd_sched_process_job);
index 939692b14f4b10ca3434f537f8ee2e214b2bec2e..a0f0ae53aacdefacc6a80f2506b5bd9f2a4cea9c 100644 (file)
@@ -27,6 +27,8 @@
 #include <linux/kfifo.h>
 #include <linux/fence.h>
 
+#define AMD_SCHED_FENCE_SCHEDULED_BIT  FENCE_FLAG_USER_BITS
+
 struct amd_gpu_scheduler;
 struct amd_sched_rq;
 
@@ -68,6 +70,7 @@ struct amd_sched_rq {
 struct amd_sched_fence {
        struct fence                    base;
        struct fence_cb                 cb;
+       struct list_head                scheduled_cb;
        struct amd_gpu_scheduler        *sched;
        spinlock_t                      lock;
        void                            *owner;
@@ -134,7 +137,7 @@ void amd_sched_entity_push_job(struct amd_sched_job *sched_job);
 
 struct amd_sched_fence *amd_sched_fence_create(
        struct amd_sched_entity *s_entity, void *owner);
+void amd_sched_fence_scheduled(struct amd_sched_fence *fence);
 void amd_sched_fence_signal(struct amd_sched_fence *fence);
 
-
 #endif
index 8d2130b9ff05c4cea8823a8461f9e63bcb80c390..87c78eecea649a2112035db7fb66bb467cf6f457 100644 (file)
@@ -35,6 +35,8 @@ struct amd_sched_fence *amd_sched_fence_create(struct amd_sched_entity *s_entity
        fence = kmem_cache_zalloc(sched_fence_slab, GFP_KERNEL);
        if (fence == NULL)
                return NULL;
+
+       INIT_LIST_HEAD(&fence->scheduled_cb);
        fence->owner = owner;
        fence->sched = s_entity->sched;
        spin_lock_init(&fence->lock);
@@ -55,6 +57,17 @@ void amd_sched_fence_signal(struct amd_sched_fence *fence)
                FENCE_TRACE(&fence->base, "was already signaled\n");
 }
 
+void amd_sched_fence_scheduled(struct amd_sched_fence *s_fence)
+{
+       struct fence_cb *cur, *tmp;
+
+       set_bit(AMD_SCHED_FENCE_SCHEDULED_BIT, &s_fence->base.flags);
+       list_for_each_entry_safe(cur, tmp, &s_fence->scheduled_cb, node) {
+               list_del_init(&cur->node);
+               cur->func(&s_fence->base, cur);
+       }
+}
+
 static const char *amd_sched_fence_get_driver_name(struct fence *fence)
 {
        return "amd_sched";
index 28bc202f9753e9fde7777461b5640a77a757a60b..40f845e312723744c52330bdc29b24666281b9f0 100644 (file)
@@ -7,6 +7,7 @@ struct nvkm_instmem {
        const struct nvkm_instmem_func *func;
        struct nvkm_subdev subdev;
 
+       spinlock_t lock;
        struct list_head list;
        u32 reserved;
 
index 8b8332e46f24059f561ca5b1f814ed849d51aa7b..d5e6938cc6bc06e9e2903a81da002289ae9e5688 100644 (file)
@@ -367,6 +367,7 @@ static int nouveau_rom_call(acpi_handle rom_handle, uint8_t *bios,
                return -ENODEV;
        }
        obj = (union acpi_object *)buffer.pointer;
+       len = min(len, (int)obj->buffer.length);
        memcpy(bios+offset, obj->buffer.pointer, len);
        kfree(buffer.pointer);
        return len;
index 3050042e6c6d54b6fb1a07b48b66d23994e8d0ae..a02813e994ec574d57b695c310f6c60e443584f2 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <nvif/client.h>
 #include <nvif/device.h>
+#include <nvif/ioctl.h>
 
 #include <drmP.h>
 
@@ -65,9 +66,10 @@ struct nouveau_drm_tile {
 };
 
 enum nouveau_drm_object_route {
-       NVDRM_OBJECT_NVIF = 0,
+       NVDRM_OBJECT_NVIF = NVIF_IOCTL_V0_OWNER_NVIF,
        NVDRM_OBJECT_USIF,
        NVDRM_OBJECT_ABI16,
+       NVDRM_OBJECT_ANY = NVIF_IOCTL_V0_OWNER_ANY,
 };
 
 enum nouveau_drm_notify_route {
index 89dc4ce63490e4d67d554b00ef44d18955479c7f..6ae1b3494bcd16a8492d65cffa95554d4125bfbc 100644 (file)
@@ -313,7 +313,10 @@ usif_ioctl(struct drm_file *filp, void __user *user, u32 argc)
        if (nvif_unpack(argv->v0, 0, 0, true)) {
                /* block access to objects not created via this interface */
                owner = argv->v0.owner;
-               argv->v0.owner = NVDRM_OBJECT_USIF;
+               if (argv->v0.object == 0ULL)
+                       argv->v0.owner = NVDRM_OBJECT_ANY; /* except client */
+               else
+                       argv->v0.owner = NVDRM_OBJECT_USIF;
        } else
                goto done;
 
index e3c783d0e2ab486abc37e09e5430b5013155392a..caf22b589edc3389247abaa724fdb41d7407c2f9 100644 (file)
@@ -278,6 +278,12 @@ nvkm_device_pci_10de_0fe3[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_0fe4[] = {
+       { 0x144d, 0xc740, NULL, { .War00C800_0 = true } },
+       {}
+};
+
 static const struct nvkm_device_pci_vendor
 nvkm_device_pci_10de_104b[] = {
        { 0x1043, 0x844c, "GeForce GT 625" },
@@ -688,6 +694,12 @@ nvkm_device_pci_10de_1199[] = {
        {}
 };
 
+static const struct nvkm_device_pci_vendor
+nvkm_device_pci_10de_11e0[] = {
+       { 0x1558, 0x5106, NULL, { .War00C800_0 = true } },
+       {}
+};
+
 static const struct nvkm_device_pci_vendor
 nvkm_device_pci_10de_11e3[] = {
        { 0x17aa, 0x3683, "GeForce GTX 760A" },
@@ -1370,7 +1382,7 @@ nvkm_device_pci_10de[] = {
        { 0x0fe1, "GeForce GT 730M" },
        { 0x0fe2, "GeForce GT 745M" },
        { 0x0fe3, "GeForce GT 745M", nvkm_device_pci_10de_0fe3 },
-       { 0x0fe4, "GeForce GT 750M" },
+       { 0x0fe4, "GeForce GT 750M", nvkm_device_pci_10de_0fe4 },
        { 0x0fe9, "GeForce GT 750M" },
        { 0x0fea, "GeForce GT 755M" },
        { 0x0fec, "GeForce 710A" },
@@ -1485,7 +1497,7 @@ nvkm_device_pci_10de[] = {
        { 0x11c6, "GeForce GTX 650 Ti" },
        { 0x11c8, "GeForce GTX 650" },
        { 0x11cb, "GeForce GT 740" },
-       { 0x11e0, "GeForce GTX 770M" },
+       { 0x11e0, "GeForce GTX 770M", nvkm_device_pci_10de_11e0 },
        { 0x11e1, "GeForce GTX 765M" },
        { 0x11e2, "GeForce GTX 765M" },
        { 0x11e3, "GeForce GTX 760M", nvkm_device_pci_10de_11e3 },
index b5b875928abad24ad1350a9f342526680660a2b9..74de7a96c22afea939059db4a20ebc5adef162e1 100644 (file)
@@ -207,6 +207,8 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
                        const u32 b =  beta * gr->ppc_tpc_nr[gpc][ppc];
                        const u32 t = timeslice_mode;
                        const u32 o = PPC_UNIT(gpc, ppc, 0);
+                       if (!(gr->ppc_mask[gpc] & (1 << ppc)))
+                               continue;
                        mmio_skip(info, o + 0xc0, (t << 28) | (b << 16) | ++bo);
                        mmio_wr32(info, o + 0xc0, (t << 28) | (b << 16) | --bo);
                        bo += grctx->attrib_nr_max * gr->ppc_tpc_nr[gpc][ppc];
index 194afe910d212885d01771a0355e4e8b009ab871..7dacb3cc0668afbce3841fecb99a189b15f780d6 100644 (file)
@@ -52,10 +52,12 @@ mmio_list_base:
 #endif
 
 #ifdef INCLUDE_CODE
+#define gpc_addr(reg,addr)                                                    /*
+*/     imm32(reg,addr)                                                       /*
+*/     or reg NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE
 #define gpc_wr32(addr,reg)                                                    /*
+*/     gpc_addr($r14,addr)                                                   /*
 */     mov b32 $r15 reg                                                      /*
-*/     imm32($r14, addr)                                                     /*
-*/     or $r14 NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE                    /*
 */     call(nv_wr32)
 
 // reports an exception to the host
@@ -161,7 +163,7 @@ init:
 
 #if NV_PGRAPH_GPCX_UNK__SIZE > 0
        // figure out which, and how many, UNKs are actually present
-       imm32($r14, 0x500c30)
+       gpc_addr($r14, 0x500c30)
        clear b32 $r2
        clear b32 $r3
        clear b32 $r4
index 64d07df4b8b14e3dd805948a783c41751adb8964..bb820ff28621f4e8c7dbb22cb6ac7f020dfafdfe 100644 (file)
@@ -314,7 +314,7 @@ uint32_t gf117_grgpc_code[] = {
        0x03f01200,
        0x0002d000,
        0x17f104bd,
-       0x10fe0542,
+       0x10fe0545,
        0x0007f100,
        0x0003f007,
        0xbd0000d0,
@@ -338,184 +338,184 @@ uint32_t gf117_grgpc_code[] = {
        0x02d00103,
        0xf104bd00,
        0xf00c30e7,
-       0x24bd50e3,
-       0x44bd34bd,
-/* 0x0430: init_unk_loop */
-       0xb06821f4,
-       0x0bf400f6,
-       0x01f7f00f,
-       0xfd04f2bb,
-       0x30b6054f,
-/* 0x0445: init_unk_next */
-       0x0120b601,
-       0xb004e0b6,
-       0x1bf40126,
-/* 0x0451: init_unk_done */
-       0x070380e2,
-       0xf1080480,
-       0xf0010027,
-       0x22cf0223,
-       0x9534bd00,
-       0x07f10825,
-       0x03f0c000,
-       0x0005d001,
-       0x07f104bd,
-       0x03f0c100,
-       0x0005d001,
-       0x0e9804bd,
-       0x010f9800,
-       0x015021f5,
-       0xbb002fbb,
-       0x0e98003f,
-       0x020f9801,
-       0x015021f5,
-       0xfd050e98,
-       0x2ebb00ef,
-       0x003ebb00,
-       0x98020e98,
-       0x21f5030f,
-       0x0e980150,
-       0x00effd07,
-       0xbb002ebb,
-       0x35b6003e,
-       0x0007f102,
-       0x0103f0d3,
-       0xbd0003d0,
-       0x0825b604,
-       0xb60635b6,
-       0x30b60120,
-       0x0824b601,
-       0xb90834b6,
-       0x21f5022f,
-       0x2fbb02d3,
-       0x003fbb00,
-       0x010007f1,
-       0xd00203f0,
+       0xe5f050e3,
+       0xbd24bd01,
+/* 0x0433: init_unk_loop */
+       0xf444bd34,
+       0xf6b06821,
+       0x0f0bf400,
+       0xbb01f7f0,
+       0x4ffd04f2,
+       0x0130b605,
+/* 0x0448: init_unk_next */
+       0xb60120b6,
+       0x26b004e0,
+       0xe21bf401,
+/* 0x0454: init_unk_done */
+       0x80070380,
+       0x27f10804,
+       0x23f00100,
+       0x0022cf02,
+       0x259534bd,
+       0x0007f108,
+       0x0103f0c0,
+       0xbd0005d0,
+       0x0007f104,
+       0x0103f0c1,
+       0xbd0005d0,
+       0x000e9804,
+       0xf5010f98,
+       0xbb015021,
+       0x3fbb002f,
+       0x010e9800,
+       0xf5020f98,
+       0x98015021,
+       0xeffd050e,
+       0x002ebb00,
+       0x98003ebb,
+       0x0f98020e,
+       0x5021f503,
+       0x070e9801,
+       0xbb00effd,
+       0x3ebb002e,
+       0x0235b600,
+       0xd30007f1,
+       0xd00103f0,
        0x04bd0003,
-       0x29f024bd,
-       0x0007f11f,
-       0x0203f008,
-       0xbd0002d0,
-/* 0x0505: main */
-       0x0031f404,
-       0xf00028f4,
-       0x21f424d7,
-       0xf401f439,
-       0xf404e4b0,
-       0x81fe1e18,
-       0x0627f001,
-       0x12fd20bd,
-       0x01e4b604,
-       0xfe051efd,
-       0x21f50018,
-       0x0ef405fa,
-/* 0x0535: main_not_ctx_xfer */
-       0x10ef94d3,
-       0xf501f5f0,
-       0xf4037e21,
-/* 0x0542: ih */
-       0x80f9c60e,
-       0xf90188fe,
-       0xf990f980,
-       0xf9b0f9a0,
-       0xf9e0f9d0,
-       0xf104bdf0,
-       0xf00200a7,
-       0xaacf00a3,
-       0x04abc400,
-       0xf02c0bf4,
-       0xe7f124d7,
-       0xe3f01a00,
-       0x00eecf00,
-       0x1900f7f1,
-       0xcf00f3f0,
-       0x21f400ff,
-       0x01e7f004,
-       0x1d0007f1,
-       0xd00003f0,
-       0x04bd000e,
-/* 0x0590: ih_no_fifo */
-       0x010007f1,
-       0xd00003f0,
-       0x04bd000a,
-       0xe0fcf0fc,
-       0xb0fcd0fc,
-       0x90fca0fc,
-       0x88fe80fc,
-       0xf480fc00,
-       0x01f80032,
-/* 0x05b4: hub_barrier_done */
-       0x9801f7f0,
-       0xfebb040e,
-       0x02ffb904,
-       0x9418e7f1,
-       0xf440e3f0,
-       0x00f89d21,
-/* 0x05cc: ctx_redswitch */
-       0xf120f7f0,
+       0xb60825b6,
+       0x20b60635,
+       0x0130b601,
+       0xb60824b6,
+       0x2fb90834,
+       0xd321f502,
+       0x002fbb02,
+       0xf1003fbb,
+       0xf0010007,
+       0x03d00203,
+       0xbd04bd00,
+       0x1f29f024,
+       0x080007f1,
+       0xd00203f0,
+       0x04bd0002,
+/* 0x0508: main */
+       0xf40031f4,
+       0xd7f00028,
+       0x3921f424,
+       0xb0f401f4,
+       0x18f404e4,
+       0x0181fe1e,
+       0xbd0627f0,
+       0x0412fd20,
+       0xfd01e4b6,
+       0x18fe051e,
+       0xfd21f500,
+       0xd30ef405,
+/* 0x0538: main_not_ctx_xfer */
+       0xf010ef94,
+       0x21f501f5,
+       0x0ef4037e,
+/* 0x0545: ih */
+       0xfe80f9c6,
+       0x80f90188,
+       0xa0f990f9,
+       0xd0f9b0f9,
+       0xf0f9e0f9,
+       0xa7f104bd,
+       0xa3f00200,
+       0x00aacf00,
+       0xf404abc4,
+       0xd7f02c0b,
+       0x00e7f124,
+       0x00e3f01a,
+       0xf100eecf,
+       0xf01900f7,
+       0xffcf00f3,
+       0x0421f400,
+       0xf101e7f0,
+       0xf01d0007,
+       0x0ed00003,
+/* 0x0593: ih_no_fifo */
+       0xf104bd00,
+       0xf0010007,
+       0x0ad00003,
+       0xfc04bd00,
+       0xfce0fcf0,
+       0xfcb0fcd0,
+       0xfc90fca0,
+       0x0088fe80,
+       0x32f480fc,
+/* 0x05b7: hub_barrier_done */
+       0xf001f800,
+       0x0e9801f7,
+       0x04febb04,
+       0xf102ffb9,
+       0xf09418e7,
+       0x21f440e3,
+/* 0x05cf: ctx_redswitch */
+       0xf000f89d,
+       0x07f120f7,
+       0x03f08500,
+       0x000fd001,
+       0xe7f004bd,
+/* 0x05e1: ctx_redswitch_delay */
+       0x01e2b608,
+       0xf1fd1bf4,
+       0xf10800f5,
+       0xf10200f5,
        0xf0850007,
        0x0fd00103,
-       0xf004bd00,
-/* 0x05de: ctx_redswitch_delay */
-       0xe2b608e7,
-       0xfd1bf401,
-       0x0800f5f1,
-       0x0200f5f1,
-       0x850007f1,
-       0xd00103f0,
-       0x04bd000f,
-/* 0x05fa: ctx_xfer */
-       0x07f100f8,
-       0x03f08100,
-       0x000fd002,
-       0x11f404bd,
-       0xcc21f507,
-/* 0x060d: ctx_xfer_not_load */
-       0x6a21f505,
-       0xf124bd02,
-       0xf047fc07,
-       0x02d00203,
-       0xf004bd00,
-       0x20b6012c,
-       0xfc07f103,
-       0x0203f04a,
-       0xbd0002d0,
-       0x01acf004,
-       0xf102a5f0,
-       0xf00000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98000c,
-       0x00e7f001,
-       0x016f21f5,
-       0xf101acf0,
-       0xf04000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98010c,
-       0x060f9802,
-       0x0800e7f1,
-       0x016f21f5,
+       0xf804bd00,
+/* 0x05fd: ctx_xfer */
+       0x0007f100,
+       0x0203f081,
+       0xbd000fd0,
+       0x0711f404,
+       0x05cf21f5,
+/* 0x0610: ctx_xfer_not_load */
+       0x026a21f5,
+       0x07f124bd,
+       0x03f047fc,
+       0x0002d002,
+       0x2cf004bd,
+       0x0320b601,
+       0x4afc07f1,
+       0xd00203f0,
+       0x04bd0002,
        0xf001acf0,
-       0xb7f104a5,
-       0xb3f03000,
+       0xb7f102a5,
+       0xb3f00000,
        0x040c9850,
        0xbb0fc4b6,
        0x0c9800bc,
-       0x030d9802,
-       0xf1080f98,
-       0xf50200e7,
-       0xf5016f21,
-       0xf4025e21,
-       0x12f40601,
-/* 0x06a9: ctx_xfer_post */
-       0x7f21f507,
-/* 0x06ad: ctx_xfer_done */
-       0xb421f502,
-       0x0000f805,
-       0x00000000,
+       0x010d9800,
+       0xf500e7f0,
+       0xf0016f21,
+       0xb7f101ac,
+       0xb3f04000,
+       0x040c9850,
+       0xbb0fc4b6,
+       0x0c9800bc,
+       0x020d9801,
+       0xf1060f98,
+       0xf50800e7,
+       0xf0016f21,
+       0xa5f001ac,
+       0x00b7f104,
+       0x50b3f030,
+       0xb6040c98,
+       0xbcbb0fc4,
+       0x020c9800,
+       0x98030d98,
+       0xe7f1080f,
+       0x21f50200,
+       0x21f5016f,
+       0x01f4025e,
+       0x0712f406,
+/* 0x06ac: ctx_xfer_post */
+       0x027f21f5,
+/* 0x06b0: ctx_xfer_done */
+       0x05b721f5,
+       0x000000f8,
        0x00000000,
        0x00000000,
        0x00000000,
index 2f596433c2220048fd55a7ee252f74619f7e041e..911976d209400fb565d84761875ba8ed0db94d3b 100644 (file)
@@ -314,7 +314,7 @@ uint32_t gk104_grgpc_code[] = {
        0x03f01200,
        0x0002d000,
        0x17f104bd,
-       0x10fe0542,
+       0x10fe0545,
        0x0007f100,
        0x0003f007,
        0xbd0000d0,
@@ -338,184 +338,184 @@ uint32_t gk104_grgpc_code[] = {
        0x02d00103,
        0xf104bd00,
        0xf00c30e7,
-       0x24bd50e3,
-       0x44bd34bd,
-/* 0x0430: init_unk_loop */
-       0xb06821f4,
-       0x0bf400f6,
-       0x01f7f00f,
-       0xfd04f2bb,
-       0x30b6054f,
-/* 0x0445: init_unk_next */
-       0x0120b601,
-       0xb004e0b6,
-       0x1bf40126,
-/* 0x0451: init_unk_done */
-       0x070380e2,
-       0xf1080480,
-       0xf0010027,
-       0x22cf0223,
-       0x9534bd00,
-       0x07f10825,
-       0x03f0c000,
-       0x0005d001,
-       0x07f104bd,
-       0x03f0c100,
-       0x0005d001,
-       0x0e9804bd,
-       0x010f9800,
-       0x015021f5,
-       0xbb002fbb,
-       0x0e98003f,
-       0x020f9801,
-       0x015021f5,
-       0xfd050e98,
-       0x2ebb00ef,
-       0x003ebb00,
-       0x98020e98,
-       0x21f5030f,
-       0x0e980150,
-       0x00effd07,
-       0xbb002ebb,
-       0x35b6003e,
-       0x0007f102,
-       0x0103f0d3,
-       0xbd0003d0,
-       0x0825b604,
-       0xb60635b6,
-       0x30b60120,
-       0x0824b601,
-       0xb90834b6,
-       0x21f5022f,
-       0x2fbb02d3,
-       0x003fbb00,
-       0x010007f1,
-       0xd00203f0,
+       0xe5f050e3,
+       0xbd24bd01,
+/* 0x0433: init_unk_loop */
+       0xf444bd34,
+       0xf6b06821,
+       0x0f0bf400,
+       0xbb01f7f0,
+       0x4ffd04f2,
+       0x0130b605,
+/* 0x0448: init_unk_next */
+       0xb60120b6,
+       0x26b004e0,
+       0xe21bf401,
+/* 0x0454: init_unk_done */
+       0x80070380,
+       0x27f10804,
+       0x23f00100,
+       0x0022cf02,
+       0x259534bd,
+       0x0007f108,
+       0x0103f0c0,
+       0xbd0005d0,
+       0x0007f104,
+       0x0103f0c1,
+       0xbd0005d0,
+       0x000e9804,
+       0xf5010f98,
+       0xbb015021,
+       0x3fbb002f,
+       0x010e9800,
+       0xf5020f98,
+       0x98015021,
+       0xeffd050e,
+       0x002ebb00,
+       0x98003ebb,
+       0x0f98020e,
+       0x5021f503,
+       0x070e9801,
+       0xbb00effd,
+       0x3ebb002e,
+       0x0235b600,
+       0xd30007f1,
+       0xd00103f0,
        0x04bd0003,
-       0x29f024bd,
-       0x0007f11f,
-       0x0203f008,
-       0xbd0002d0,
-/* 0x0505: main */
-       0x0031f404,
-       0xf00028f4,
-       0x21f424d7,
-       0xf401f439,
-       0xf404e4b0,
-       0x81fe1e18,
-       0x0627f001,
-       0x12fd20bd,
-       0x01e4b604,
-       0xfe051efd,
-       0x21f50018,
-       0x0ef405fa,
-/* 0x0535: main_not_ctx_xfer */
-       0x10ef94d3,
-       0xf501f5f0,
-       0xf4037e21,
-/* 0x0542: ih */
-       0x80f9c60e,
-       0xf90188fe,
-       0xf990f980,
-       0xf9b0f9a0,
-       0xf9e0f9d0,
-       0xf104bdf0,
-       0xf00200a7,
-       0xaacf00a3,
-       0x04abc400,
-       0xf02c0bf4,
-       0xe7f124d7,
-       0xe3f01a00,
-       0x00eecf00,
-       0x1900f7f1,
-       0xcf00f3f0,
-       0x21f400ff,
-       0x01e7f004,
-       0x1d0007f1,
-       0xd00003f0,
-       0x04bd000e,
-/* 0x0590: ih_no_fifo */
-       0x010007f1,
-       0xd00003f0,
-       0x04bd000a,
-       0xe0fcf0fc,
-       0xb0fcd0fc,
-       0x90fca0fc,
-       0x88fe80fc,
-       0xf480fc00,
-       0x01f80032,
-/* 0x05b4: hub_barrier_done */
-       0x9801f7f0,
-       0xfebb040e,
-       0x02ffb904,
-       0x9418e7f1,
-       0xf440e3f0,
-       0x00f89d21,
-/* 0x05cc: ctx_redswitch */
-       0xf120f7f0,
+       0xb60825b6,
+       0x20b60635,
+       0x0130b601,
+       0xb60824b6,
+       0x2fb90834,
+       0xd321f502,
+       0x002fbb02,
+       0xf1003fbb,
+       0xf0010007,
+       0x03d00203,
+       0xbd04bd00,
+       0x1f29f024,
+       0x080007f1,
+       0xd00203f0,
+       0x04bd0002,
+/* 0x0508: main */
+       0xf40031f4,
+       0xd7f00028,
+       0x3921f424,
+       0xb0f401f4,
+       0x18f404e4,
+       0x0181fe1e,
+       0xbd0627f0,
+       0x0412fd20,
+       0xfd01e4b6,
+       0x18fe051e,
+       0xfd21f500,
+       0xd30ef405,
+/* 0x0538: main_not_ctx_xfer */
+       0xf010ef94,
+       0x21f501f5,
+       0x0ef4037e,
+/* 0x0545: ih */
+       0xfe80f9c6,
+       0x80f90188,
+       0xa0f990f9,
+       0xd0f9b0f9,
+       0xf0f9e0f9,
+       0xa7f104bd,
+       0xa3f00200,
+       0x00aacf00,
+       0xf404abc4,
+       0xd7f02c0b,
+       0x00e7f124,
+       0x00e3f01a,
+       0xf100eecf,
+       0xf01900f7,
+       0xffcf00f3,
+       0x0421f400,
+       0xf101e7f0,
+       0xf01d0007,
+       0x0ed00003,
+/* 0x0593: ih_no_fifo */
+       0xf104bd00,
+       0xf0010007,
+       0x0ad00003,
+       0xfc04bd00,
+       0xfce0fcf0,
+       0xfcb0fcd0,
+       0xfc90fca0,
+       0x0088fe80,
+       0x32f480fc,
+/* 0x05b7: hub_barrier_done */
+       0xf001f800,
+       0x0e9801f7,
+       0x04febb04,
+       0xf102ffb9,
+       0xf09418e7,
+       0x21f440e3,
+/* 0x05cf: ctx_redswitch */
+       0xf000f89d,
+       0x07f120f7,
+       0x03f08500,
+       0x000fd001,
+       0xe7f004bd,
+/* 0x05e1: ctx_redswitch_delay */
+       0x01e2b608,
+       0xf1fd1bf4,
+       0xf10800f5,
+       0xf10200f5,
        0xf0850007,
        0x0fd00103,
-       0xf004bd00,
-/* 0x05de: ctx_redswitch_delay */
-       0xe2b608e7,
-       0xfd1bf401,
-       0x0800f5f1,
-       0x0200f5f1,
-       0x850007f1,
-       0xd00103f0,
-       0x04bd000f,
-/* 0x05fa: ctx_xfer */
-       0x07f100f8,
-       0x03f08100,
-       0x000fd002,
-       0x11f404bd,
-       0xcc21f507,
-/* 0x060d: ctx_xfer_not_load */
-       0x6a21f505,
-       0xf124bd02,
-       0xf047fc07,
-       0x02d00203,
-       0xf004bd00,
-       0x20b6012c,
-       0xfc07f103,
-       0x0203f04a,
-       0xbd0002d0,
-       0x01acf004,
-       0xf102a5f0,
-       0xf00000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98000c,
-       0x00e7f001,
-       0x016f21f5,
-       0xf101acf0,
-       0xf04000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98010c,
-       0x060f9802,
-       0x0800e7f1,
-       0x016f21f5,
+       0xf804bd00,
+/* 0x05fd: ctx_xfer */
+       0x0007f100,
+       0x0203f081,
+       0xbd000fd0,
+       0x0711f404,
+       0x05cf21f5,
+/* 0x0610: ctx_xfer_not_load */
+       0x026a21f5,
+       0x07f124bd,
+       0x03f047fc,
+       0x0002d002,
+       0x2cf004bd,
+       0x0320b601,
+       0x4afc07f1,
+       0xd00203f0,
+       0x04bd0002,
        0xf001acf0,
-       0xb7f104a5,
-       0xb3f03000,
+       0xb7f102a5,
+       0xb3f00000,
        0x040c9850,
        0xbb0fc4b6,
        0x0c9800bc,
-       0x030d9802,
-       0xf1080f98,
-       0xf50200e7,
-       0xf5016f21,
-       0xf4025e21,
-       0x12f40601,
-/* 0x06a9: ctx_xfer_post */
-       0x7f21f507,
-/* 0x06ad: ctx_xfer_done */
-       0xb421f502,
-       0x0000f805,
-       0x00000000,
+       0x010d9800,
+       0xf500e7f0,
+       0xf0016f21,
+       0xb7f101ac,
+       0xb3f04000,
+       0x040c9850,
+       0xbb0fc4b6,
+       0x0c9800bc,
+       0x020d9801,
+       0xf1060f98,
+       0xf50800e7,
+       0xf0016f21,
+       0xa5f001ac,
+       0x00b7f104,
+       0x50b3f030,
+       0xb6040c98,
+       0xbcbb0fc4,
+       0x020c9800,
+       0x98030d98,
+       0xe7f1080f,
+       0x21f50200,
+       0x21f5016f,
+       0x01f4025e,
+       0x0712f406,
+/* 0x06ac: ctx_xfer_post */
+       0x027f21f5,
+/* 0x06b0: ctx_xfer_done */
+       0x05b721f5,
+       0x000000f8,
        0x00000000,
        0x00000000,
        0x00000000,
index ee8e54db8fc9ed83bd5da4c176de4e4fbe6bed73..1c6e11b05df2e910685b76ebfbe37b046718d0bb 100644 (file)
@@ -314,7 +314,7 @@ uint32_t gk110_grgpc_code[] = {
        0x03f01200,
        0x0002d000,
        0x17f104bd,
-       0x10fe0542,
+       0x10fe0545,
        0x0007f100,
        0x0003f007,
        0xbd0000d0,
@@ -338,184 +338,184 @@ uint32_t gk110_grgpc_code[] = {
        0x02d00103,
        0xf104bd00,
        0xf00c30e7,
-       0x24bd50e3,
-       0x44bd34bd,
-/* 0x0430: init_unk_loop */
-       0xb06821f4,
-       0x0bf400f6,
-       0x01f7f00f,
-       0xfd04f2bb,
-       0x30b6054f,
-/* 0x0445: init_unk_next */
-       0x0120b601,
-       0xb004e0b6,
-       0x1bf40226,
-/* 0x0451: init_unk_done */
-       0x070380e2,
-       0xf1080480,
-       0xf0010027,
-       0x22cf0223,
-       0x9534bd00,
-       0x07f10825,
-       0x03f0c000,
-       0x0005d001,
-       0x07f104bd,
-       0x03f0c100,
-       0x0005d001,
-       0x0e9804bd,
-       0x010f9800,
-       0x015021f5,
-       0xbb002fbb,
-       0x0e98003f,
-       0x020f9801,
-       0x015021f5,
-       0xfd050e98,
-       0x2ebb00ef,
-       0x003ebb00,
-       0x98020e98,
-       0x21f5030f,
-       0x0e980150,
-       0x00effd07,
-       0xbb002ebb,
-       0x35b6003e,
-       0x0007f102,
-       0x0103f0d3,
-       0xbd0003d0,
-       0x0825b604,
-       0xb60635b6,
-       0x30b60120,
-       0x0824b601,
-       0xb90834b6,
-       0x21f5022f,
-       0x2fbb02d3,
-       0x003fbb00,
-       0x010007f1,
-       0xd00203f0,
+       0xe5f050e3,
+       0xbd24bd01,
+/* 0x0433: init_unk_loop */
+       0xf444bd34,
+       0xf6b06821,
+       0x0f0bf400,
+       0xbb01f7f0,
+       0x4ffd04f2,
+       0x0130b605,
+/* 0x0448: init_unk_next */
+       0xb60120b6,
+       0x26b004e0,
+       0xe21bf402,
+/* 0x0454: init_unk_done */
+       0x80070380,
+       0x27f10804,
+       0x23f00100,
+       0x0022cf02,
+       0x259534bd,
+       0x0007f108,
+       0x0103f0c0,
+       0xbd0005d0,
+       0x0007f104,
+       0x0103f0c1,
+       0xbd0005d0,
+       0x000e9804,
+       0xf5010f98,
+       0xbb015021,
+       0x3fbb002f,
+       0x010e9800,
+       0xf5020f98,
+       0x98015021,
+       0xeffd050e,
+       0x002ebb00,
+       0x98003ebb,
+       0x0f98020e,
+       0x5021f503,
+       0x070e9801,
+       0xbb00effd,
+       0x3ebb002e,
+       0x0235b600,
+       0xd30007f1,
+       0xd00103f0,
        0x04bd0003,
-       0x29f024bd,
-       0x0007f11f,
-       0x0203f030,
-       0xbd0002d0,
-/* 0x0505: main */
-       0x0031f404,
-       0xf00028f4,
-       0x21f424d7,
-       0xf401f439,
-       0xf404e4b0,
-       0x81fe1e18,
-       0x0627f001,
-       0x12fd20bd,
-       0x01e4b604,
-       0xfe051efd,
-       0x21f50018,
-       0x0ef405fa,
-/* 0x0535: main_not_ctx_xfer */
-       0x10ef94d3,
-       0xf501f5f0,
-       0xf4037e21,
-/* 0x0542: ih */
-       0x80f9c60e,
-       0xf90188fe,
-       0xf990f980,
-       0xf9b0f9a0,
-       0xf9e0f9d0,
-       0xf104bdf0,
-       0xf00200a7,
-       0xaacf00a3,
-       0x04abc400,
-       0xf02c0bf4,
-       0xe7f124d7,
-       0xe3f01a00,
-       0x00eecf00,
-       0x1900f7f1,
-       0xcf00f3f0,
-       0x21f400ff,
-       0x01e7f004,
-       0x1d0007f1,
-       0xd00003f0,
-       0x04bd000e,
-/* 0x0590: ih_no_fifo */
-       0x010007f1,
-       0xd00003f0,
-       0x04bd000a,
-       0xe0fcf0fc,
-       0xb0fcd0fc,
-       0x90fca0fc,
-       0x88fe80fc,
-       0xf480fc00,
-       0x01f80032,
-/* 0x05b4: hub_barrier_done */
-       0x9801f7f0,
-       0xfebb040e,
-       0x02ffb904,
-       0x9418e7f1,
-       0xf440e3f0,
-       0x00f89d21,
-/* 0x05cc: ctx_redswitch */
-       0xf120f7f0,
+       0xb60825b6,
+       0x20b60635,
+       0x0130b601,
+       0xb60824b6,
+       0x2fb90834,
+       0xd321f502,
+       0x002fbb02,
+       0xf1003fbb,
+       0xf0010007,
+       0x03d00203,
+       0xbd04bd00,
+       0x1f29f024,
+       0x300007f1,
+       0xd00203f0,
+       0x04bd0002,
+/* 0x0508: main */
+       0xf40031f4,
+       0xd7f00028,
+       0x3921f424,
+       0xb0f401f4,
+       0x18f404e4,
+       0x0181fe1e,
+       0xbd0627f0,
+       0x0412fd20,
+       0xfd01e4b6,
+       0x18fe051e,
+       0xfd21f500,
+       0xd30ef405,
+/* 0x0538: main_not_ctx_xfer */
+       0xf010ef94,
+       0x21f501f5,
+       0x0ef4037e,
+/* 0x0545: ih */
+       0xfe80f9c6,
+       0x80f90188,
+       0xa0f990f9,
+       0xd0f9b0f9,
+       0xf0f9e0f9,
+       0xa7f104bd,
+       0xa3f00200,
+       0x00aacf00,
+       0xf404abc4,
+       0xd7f02c0b,
+       0x00e7f124,
+       0x00e3f01a,
+       0xf100eecf,
+       0xf01900f7,
+       0xffcf00f3,
+       0x0421f400,
+       0xf101e7f0,
+       0xf01d0007,
+       0x0ed00003,
+/* 0x0593: ih_no_fifo */
+       0xf104bd00,
+       0xf0010007,
+       0x0ad00003,
+       0xfc04bd00,
+       0xfce0fcf0,
+       0xfcb0fcd0,
+       0xfc90fca0,
+       0x0088fe80,
+       0x32f480fc,
+/* 0x05b7: hub_barrier_done */
+       0xf001f800,
+       0x0e9801f7,
+       0x04febb04,
+       0xf102ffb9,
+       0xf09418e7,
+       0x21f440e3,
+/* 0x05cf: ctx_redswitch */
+       0xf000f89d,
+       0x07f120f7,
+       0x03f08500,
+       0x000fd001,
+       0xe7f004bd,
+/* 0x05e1: ctx_redswitch_delay */
+       0x01e2b608,
+       0xf1fd1bf4,
+       0xf10800f5,
+       0xf10200f5,
        0xf0850007,
        0x0fd00103,
-       0xf004bd00,
-/* 0x05de: ctx_redswitch_delay */
-       0xe2b608e7,
-       0xfd1bf401,
-       0x0800f5f1,
-       0x0200f5f1,
-       0x850007f1,
-       0xd00103f0,
-       0x04bd000f,
-/* 0x05fa: ctx_xfer */
-       0x07f100f8,
-       0x03f08100,
-       0x000fd002,
-       0x11f404bd,
-       0xcc21f507,
-/* 0x060d: ctx_xfer_not_load */
-       0x6a21f505,
-       0xf124bd02,
-       0xf047fc07,
-       0x02d00203,
-       0xf004bd00,
-       0x20b6012c,
-       0xfc07f103,
-       0x0203f04a,
-       0xbd0002d0,
-       0x01acf004,
-       0xf102a5f0,
-       0xf00000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98000c,
-       0x00e7f001,
-       0x016f21f5,
-       0xf101acf0,
-       0xf04000b7,
-       0x0c9850b3,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98010c,
-       0x060f9802,
-       0x0800e7f1,
-       0x016f21f5,
+       0xf804bd00,
+/* 0x05fd: ctx_xfer */
+       0x0007f100,
+       0x0203f081,
+       0xbd000fd0,
+       0x0711f404,
+       0x05cf21f5,
+/* 0x0610: ctx_xfer_not_load */
+       0x026a21f5,
+       0x07f124bd,
+       0x03f047fc,
+       0x0002d002,
+       0x2cf004bd,
+       0x0320b601,
+       0x4afc07f1,
+       0xd00203f0,
+       0x04bd0002,
        0xf001acf0,
-       0xb7f104a5,
-       0xb3f03000,
+       0xb7f102a5,
+       0xb3f00000,
        0x040c9850,
        0xbb0fc4b6,
        0x0c9800bc,
-       0x030d9802,
-       0xf1080f98,
-       0xf50200e7,
-       0xf5016f21,
-       0xf4025e21,
-       0x12f40601,
-/* 0x06a9: ctx_xfer_post */
-       0x7f21f507,
-/* 0x06ad: ctx_xfer_done */
-       0xb421f502,
-       0x0000f805,
-       0x00000000,
+       0x010d9800,
+       0xf500e7f0,
+       0xf0016f21,
+       0xb7f101ac,
+       0xb3f04000,
+       0x040c9850,
+       0xbb0fc4b6,
+       0x0c9800bc,
+       0x020d9801,
+       0xf1060f98,
+       0xf50800e7,
+       0xf0016f21,
+       0xa5f001ac,
+       0x00b7f104,
+       0x50b3f030,
+       0xb6040c98,
+       0xbcbb0fc4,
+       0x020c9800,
+       0x98030d98,
+       0xe7f1080f,
+       0x21f50200,
+       0x21f5016f,
+       0x01f4025e,
+       0x0712f406,
+/* 0x06ac: ctx_xfer_post */
+       0x027f21f5,
+/* 0x06b0: ctx_xfer_done */
+       0x05b721f5,
+       0x000000f8,
        0x00000000,
        0x00000000,
        0x00000000,
index fbcc342f896f144708e059093156c0e99210e952..84af7ec6a78ea7df9f0f5e86e5a0e3764790a4d0 100644 (file)
@@ -276,7 +276,7 @@ uint32_t gk208_grgpc_code[] = {
        0x02020014,
        0xf6120040,
        0x04bd0002,
-       0xfe048141,
+       0xfe048441,
        0x00400010,
        0x0000f607,
        0x040204bd,
@@ -295,165 +295,165 @@ uint32_t gk208_grgpc_code[] = {
        0x01c90080,
        0xbd0002f6,
        0x0c308e04,
-       0xbd24bd50,
-/* 0x0383: init_unk_loop */
-       0x7e44bd34,
-       0xb0000065,
-       0x0bf400f6,
-       0xbb010f0e,
-       0x4ffd04f2,
-       0x0130b605,
-/* 0x0398: init_unk_next */
-       0xb60120b6,
-       0x26b004e0,
-       0xe21bf401,
-/* 0x03a4: init_unk_done */
-       0xb50703b5,
-       0x00820804,
-       0x22cf0201,
-       0x9534bd00,
-       0x00800825,
-       0x05f601c0,
-       0x8004bd00,
-       0xf601c100,
-       0x04bd0005,
-       0x98000e98,
-       0x207e010f,
-       0x2fbb0001,
-       0x003fbb00,
-       0x98010e98,
-       0x207e020f,
-       0x0e980001,
-       0x00effd05,
-       0xbb002ebb,
-       0x0e98003e,
-       0x030f9802,
-       0x0001207e,
-       0xfd070e98,
-       0x2ebb00ef,
-       0x003ebb00,
-       0x800235b6,
-       0xf601d300,
-       0x04bd0003,
-       0xb60825b6,
-       0x20b60635,
-       0x0130b601,
-       0xb60824b6,
-       0x2fb20834,
-       0x0002687e,
-       0xbb002fbb,
-       0x0080003f,
-       0x03f60201,
-       0xbd04bd00,
-       0x1f29f024,
-       0x02300080,
-       0xbd0002f6,
-/* 0x0445: main */
-       0x0031f404,
-       0x0d0028f4,
-       0x00377e24,
-       0xf401f400,
-       0xf404e4b0,
-       0x81fe1d18,
-       0xbd060201,
-       0x0412fd20,
-       0xfd01e4b6,
-       0x18fe051e,
-       0x05187e00,
-       0xd40ef400,
-/* 0x0474: main_not_ctx_xfer */
-       0xf010ef94,
-       0xf87e01f5,
-       0x0ef40002,
-/* 0x0481: ih */
-       0xfe80f9c7,
-       0x80f90188,
-       0xa0f990f9,
-       0xd0f9b0f9,
-       0xf0f9e0f9,
-       0x004a04bd,
-       0x00aacf02,
-       0xf404abc4,
-       0x240d1f0b,
-       0xcf1a004e,
-       0x004f00ee,
-       0x00ffcf19,
-       0x0000047e,
-       0x0040010e,
-       0x000ef61d,
-/* 0x04be: ih_no_fifo */
-       0x004004bd,
-       0x000af601,
-       0xf0fc04bd,
-       0xd0fce0fc,
-       0xa0fcb0fc,
-       0x80fc90fc,
-       0xfc0088fe,
-       0x0032f480,
-/* 0x04de: hub_barrier_done */
-       0x010f01f8,
-       0xbb040e98,
-       0xffb204fe,
-       0x4094188e,
-       0x00008f7e,
-/* 0x04f2: ctx_redswitch */
-       0x200f00f8,
+       0x01e5f050,
+       0x34bd24bd,
+/* 0x0386: init_unk_loop */
+       0x657e44bd,
+       0xf6b00000,
+       0x0e0bf400,
+       0xf2bb010f,
+       0x054ffd04,
+/* 0x039b: init_unk_next */
+       0xb60130b6,
+       0xe0b60120,
+       0x0126b004,
+/* 0x03a7: init_unk_done */
+       0xb5e21bf4,
+       0x04b50703,
+       0x01008208,
+       0x0022cf02,
+       0x259534bd,
+       0xc0008008,
+       0x0005f601,
+       0x008004bd,
+       0x05f601c1,
+       0x9804bd00,
+       0x0f98000e,
+       0x01207e01,
+       0x002fbb00,
+       0x98003fbb,
+       0x0f98010e,
+       0x01207e02,
+       0x050e9800,
+       0xbb00effd,
+       0x3ebb002e,
+       0x020e9800,
+       0x7e030f98,
+       0x98000120,
+       0xeffd070e,
+       0x002ebb00,
+       0xb6003ebb,
+       0x00800235,
+       0x03f601d3,
+       0xb604bd00,
+       0x35b60825,
+       0x0120b606,
+       0xb60130b6,
+       0x34b60824,
+       0x7e2fb208,
+       0xbb000268,
+       0x3fbb002f,
+       0x01008000,
+       0x0003f602,
+       0x24bd04bd,
+       0x801f29f0,
+       0xf6023000,
+       0x04bd0002,
+/* 0x0448: main */
+       0xf40031f4,
+       0x240d0028,
+       0x0000377e,
+       0xb0f401f4,
+       0x18f404e4,
+       0x0181fe1d,
+       0x20bd0602,
+       0xb60412fd,
+       0x1efd01e4,
+       0x0018fe05,
+       0x00051b7e,
+/* 0x0477: main_not_ctx_xfer */
+       0x94d40ef4,
+       0xf5f010ef,
+       0x02f87e01,
+       0xc70ef400,
+/* 0x0484: ih */
+       0x88fe80f9,
+       0xf980f901,
+       0xf9a0f990,
+       0xf9d0f9b0,
+       0xbdf0f9e0,
+       0x02004a04,
+       0xc400aacf,
+       0x0bf404ab,
+       0x4e240d1f,
+       0xeecf1a00,
+       0x19004f00,
+       0x7e00ffcf,
+       0x0e000004,
+       0x1d004001,
+       0xbd000ef6,
+/* 0x04c1: ih_no_fifo */
+       0x01004004,
+       0xbd000af6,
+       0xfcf0fc04,
+       0xfcd0fce0,
+       0xfca0fcb0,
+       0xfe80fc90,
+       0x80fc0088,
+       0xf80032f4,
+/* 0x04e1: hub_barrier_done */
+       0x98010f01,
+       0xfebb040e,
+       0x8effb204,
+       0x7e409418,
+       0xf800008f,
+/* 0x04f5: ctx_redswitch */
+       0x80200f00,
+       0xf6018500,
+       0x04bd000f,
+/* 0x0502: ctx_redswitch_delay */
+       0xe2b6080e,
+       0xfd1bf401,
+       0x0800f5f1,
+       0x0200f5f1,
        0x01850080,
        0xbd000ff6,
-/* 0x04ff: ctx_redswitch_delay */
-       0xb6080e04,
-       0x1bf401e2,
-       0x00f5f1fd,
-       0x00f5f108,
-       0x85008002,
-       0x000ff601,
-       0x00f804bd,
-/* 0x0518: ctx_xfer */
-       0x02810080,
-       0xbd000ff6,
-       0x0711f404,
-       0x0004f27e,
-/* 0x0528: ctx_xfer_not_load */
-       0x0002167e,
-       0xfc8024bd,
-       0x02f60247,
-       0xf004bd00,
-       0x20b6012c,
-       0x4afc8003,
+/* 0x051b: ctx_xfer */
+       0x8000f804,
+       0xf6028100,
+       0x04bd000f,
+       0x7e0711f4,
+/* 0x052b: ctx_xfer_not_load */
+       0x7e0004f5,
+       0xbd000216,
+       0x47fc8024,
        0x0002f602,
-       0xacf004bd,
-       0x02a5f001,
-       0x5000008b,
-       0xb6040c98,
-       0xbcbb0fc4,
-       0x000c9800,
-       0x0e010d98,
-       0x013d7e00,
-       0x01acf000,
-       0x5040008b,
-       0xb6040c98,
-       0xbcbb0fc4,
-       0x010c9800,
-       0x98020d98,
-       0x004e060f,
-       0x013d7e08,
-       0x01acf000,
-       0x8b04a5f0,
-       0x98503000,
+       0x2cf004bd,
+       0x0320b601,
+       0x024afc80,
+       0xbd0002f6,
+       0x01acf004,
+       0x8b02a5f0,
+       0x98500000,
        0xc4b6040c,
        0x00bcbb0f,
-       0x98020c98,
-       0x0f98030d,
-       0x02004e08,
+       0x98000c98,
+       0x000e010d,
        0x00013d7e,
-       0x00020a7e,
-       0xf40601f4,
-/* 0x05b2: ctx_xfer_post */
-       0x277e0712,
-/* 0x05b6: ctx_xfer_done */
-       0xde7e0002,
-       0x00f80004,
-       0x00000000,
+       0x8b01acf0,
+       0x98504000,
+       0xc4b6040c,
+       0x00bcbb0f,
+       0x98010c98,
+       0x0f98020d,
+       0x08004e06,
+       0x00013d7e,
+       0xf001acf0,
+       0x008b04a5,
+       0x0c985030,
+       0x0fc4b604,
+       0x9800bcbb,
+       0x0d98020c,
+       0x080f9803,
+       0x7e02004e,
+       0x7e00013d,
+       0xf400020a,
+       0x12f40601,
+/* 0x05b5: ctx_xfer_post */
+       0x02277e07,
+/* 0x05b9: ctx_xfer_done */
+       0x04e17e00,
+       0x0000f800,
        0x00000000,
        0x00000000,
        0x00000000,
index 51f5c3c6e96607914f5f7ffcc0973f7f4e347bcc..11bf363a6ae95842634853ca9b4418c00a6c660b 100644 (file)
@@ -289,7 +289,7 @@ uint32_t gm107_grgpc_code[] = {
        0x020014fe,
        0x12004002,
        0xbd0002f6,
-       0x05b04104,
+       0x05b34104,
        0x400010fe,
        0x00f60700,
        0x0204bd00,
@@ -308,259 +308,259 @@ uint32_t gm107_grgpc_code[] = {
        0xc900800f,
        0x0002f601,
        0x308e04bd,
-       0x24bd500c,
-       0x44bd34bd,
-/* 0x03b0: init_unk_loop */
-       0x0000657e,
-       0xf400f6b0,
-       0x010f0e0b,
-       0xfd04f2bb,
-       0x30b6054f,
-/* 0x03c5: init_unk_next */
-       0x0120b601,
-       0xb004e0b6,
-       0x1bf40226,
-/* 0x03d1: init_unk_done */
-       0x0703b5e2,
-       0x820804b5,
-       0xcf020100,
-       0x34bd0022,
-       0x80082595,
-       0xf601c000,
+       0xe5f0500c,
+       0xbd24bd01,
+/* 0x03b3: init_unk_loop */
+       0x7e44bd34,
+       0xb0000065,
+       0x0bf400f6,
+       0xbb010f0e,
+       0x4ffd04f2,
+       0x0130b605,
+/* 0x03c8: init_unk_next */
+       0xb60120b6,
+       0x26b004e0,
+       0xe21bf402,
+/* 0x03d4: init_unk_done */
+       0xb50703b5,
+       0x00820804,
+       0x22cf0201,
+       0x9534bd00,
+       0x00800825,
+       0x05f601c0,
+       0x8004bd00,
+       0xf601c100,
        0x04bd0005,
-       0x01c10080,
-       0xbd0005f6,
-       0x000e9804,
-       0x7e010f98,
-       0xbb000120,
-       0x3fbb002f,
-       0x010e9800,
-       0x7e020f98,
-       0x98000120,
-       0xeffd050e,
-       0x002ebb00,
-       0x98003ebb,
-       0x0f98020e,
-       0x01207e03,
-       0x070e9800,
-       0xbb00effd,
-       0x3ebb002e,
-       0x0235b600,
-       0x01d30080,
-       0xbd0003f6,
-       0x0825b604,
-       0xb60635b6,
-       0x30b60120,
-       0x0824b601,
-       0xb20834b6,
-       0x02687e2f,
-       0x002fbb00,
-       0x0f003fbb,
-       0x8effb23f,
-       0xf0501d60,
-       0x8f7e01e5,
-       0x0c0f0000,
-       0xa88effb2,
-       0xe5f0501d,
-       0x008f7e01,
-       0x03147e00,
-       0xb23f0f00,
-       0x1d608eff,
-       0x01e5f050,
-       0x00008f7e,
-       0xffb2000f,
-       0x501d9c8e,
-       0x7e01e5f0,
-       0x0f00008f,
-       0x03147e01,
-       0x8effb200,
+       0x98000e98,
+       0x207e010f,
+       0x2fbb0001,
+       0x003fbb00,
+       0x98010e98,
+       0x207e020f,
+       0x0e980001,
+       0x00effd05,
+       0xbb002ebb,
+       0x0e98003e,
+       0x030f9802,
+       0x0001207e,
+       0xfd070e98,
+       0x2ebb00ef,
+       0x003ebb00,
+       0x800235b6,
+       0xf601d300,
+       0x04bd0003,
+       0xb60825b6,
+       0x20b60635,
+       0x0130b601,
+       0xb60824b6,
+       0x2fb20834,
+       0x0002687e,
+       0xbb002fbb,
+       0x3f0f003f,
+       0x501d608e,
+       0xb201e5f0,
+       0x008f7eff,
+       0x8e0c0f00,
        0xf0501da8,
-       0x8f7e01e5,
-       0xff0f0000,
-       0x988effb2,
+       0xffb201e5,
+       0x00008f7e,
+       0x0003147e,
+       0x608e3f0f,
        0xe5f0501d,
-       0x008f7e01,
-       0xb2020f00,
-       0x1da88eff,
+       0x7effb201,
+       0x0f00008f,
+       0x1d9c8e00,
        0x01e5f050,
-       0x00008f7e,
+       0x8f7effb2,
+       0x010f0000,
        0x0003147e,
-       0x85050498,
-       0x98504000,
-       0x64b60406,
-       0x0056bb0f,
-/* 0x04e0: tpc_strand_init_tpc_loop */
-       0x05705eb8,
-       0x00657e00,
-       0xbdf6b200,
-/* 0x04ed: tpc_strand_init_idx_loop */
-       0x605eb874,
-       0x7fb20005,
-       0x00008f7e,
-       0x05885eb8,
-       0x082f9500,
-       0x00008f7e,
-       0x058c5eb8,
-       0x082f9500,
+       0x501da88e,
+       0xb201e5f0,
+       0x008f7eff,
+       0x8eff0f00,
+       0xf0501d98,
+       0xffb201e5,
        0x00008f7e,
-       0x05905eb8,
-       0x00657e00,
-       0x06f5b600,
-       0xb601f0b6,
-       0x2fbb08f4,
-       0x003fbb00,
-       0xb60170b6,
-       0x1bf40162,
-       0x0050b7bf,
-       0x0142b608,
-       0x0fa81bf4,
-       0x8effb23f,
-       0xf0501d60,
-       0x8f7e01e5,
-       0x0d0f0000,
-       0xa88effb2,
+       0xa88e020f,
        0xe5f0501d,
-       0x008f7e01,
-       0x03147e00,
-       0x01008000,
-       0x0003f602,
-       0x24bd04bd,
-       0x801f29f0,
-       0xf6023000,
-       0x04bd0002,
-/* 0x0574: main */
-       0xf40031f4,
-       0x240d0028,
-       0x0000377e,
-       0xb0f401f4,
-       0x18f404e4,
-       0x0181fe1d,
-       0x20bd0602,
-       0xb60412fd,
-       0x1efd01e4,
-       0x0018fe05,
-       0x0006477e,
-/* 0x05a3: main_not_ctx_xfer */
-       0x94d40ef4,
-       0xf5f010ef,
-       0x02f87e01,
-       0xc70ef400,
-/* 0x05b0: ih */
-       0x88fe80f9,
-       0xf980f901,
-       0xf9a0f990,
-       0xf9d0f9b0,
-       0xbdf0f9e0,
-       0x02004a04,
-       0xc400aacf,
-       0x0bf404ab,
-       0x4e240d1f,
-       0xeecf1a00,
-       0x19004f00,
-       0x7e00ffcf,
-       0x0e000004,
-       0x1d004001,
-       0xbd000ef6,
-/* 0x05ed: ih_no_fifo */
-       0x01004004,
-       0xbd000af6,
-       0xfcf0fc04,
-       0xfcd0fce0,
-       0xfca0fcb0,
-       0xfe80fc90,
-       0x80fc0088,
-       0xf80032f4,
-/* 0x060d: hub_barrier_done */
-       0x98010f01,
-       0xfebb040e,
-       0x8effb204,
-       0x7e409418,
-       0xf800008f,
-/* 0x0621: ctx_redswitch */
-       0x80200f00,
+       0x7effb201,
+       0x7e00008f,
+       0x98000314,
+       0x00850504,
+       0x06985040,
+       0x0f64b604,
+/* 0x04e3: tpc_strand_init_tpc_loop */
+       0xb80056bb,
+       0x0005705e,
+       0x0000657e,
+       0x74bdf6b2,
+/* 0x04f0: tpc_strand_init_idx_loop */
+       0x05605eb8,
+       0x7e7fb200,
+       0xb800008f,
+       0x0005885e,
+       0x7e082f95,
+       0xb800008f,
+       0x00058c5e,
+       0x7e082f95,
+       0xb800008f,
+       0x0005905e,
+       0x0000657e,
+       0xb606f5b6,
+       0xf4b601f0,
+       0x002fbb08,
+       0xb6003fbb,
+       0x62b60170,
+       0xbf1bf401,
+       0x080050b7,
+       0xf40142b6,
+       0x3f0fa81b,
+       0x501d608e,
+       0xb201e5f0,
+       0x008f7eff,
+       0x8e0d0f00,
+       0xf0501da8,
+       0xffb201e5,
+       0x00008f7e,
+       0x0003147e,
+       0x02010080,
+       0xbd0003f6,
+       0xf024bd04,
+       0x00801f29,
+       0x02f60230,
+/* 0x0577: main */
+       0xf404bd00,
+       0x28f40031,
+       0x7e240d00,
+       0xf4000037,
+       0xe4b0f401,
+       0x1d18f404,
+       0x020181fe,
+       0xfd20bd06,
+       0xe4b60412,
+       0x051efd01,
+       0x7e0018fe,
+       0xf400064a,
+/* 0x05a6: main_not_ctx_xfer */
+       0xef94d40e,
+       0x01f5f010,
+       0x0002f87e,
+/* 0x05b3: ih */
+       0xf9c70ef4,
+       0x0188fe80,
+       0x90f980f9,
+       0xb0f9a0f9,
+       0xe0f9d0f9,
+       0x04bdf0f9,
+       0xcf02004a,
+       0xabc400aa,
+       0x1f0bf404,
+       0x004e240d,
+       0x00eecf1a,
+       0xcf19004f,
+       0x047e00ff,
+       0x010e0000,
+       0xf61d0040,
+       0x04bd000e,
+/* 0x05f0: ih_no_fifo */
+       0xf6010040,
+       0x04bd000a,
+       0xe0fcf0fc,
+       0xb0fcd0fc,
+       0x90fca0fc,
+       0x88fe80fc,
+       0xf480fc00,
+       0x01f80032,
+/* 0x0610: hub_barrier_done */
+       0x0e98010f,
+       0x04febb04,
+       0x188effb2,
+       0x8f7e4094,
+       0x00f80000,
+/* 0x0624: ctx_redswitch */
+       0x0080200f,
+       0x0ff60185,
+       0x0e04bd00,
+/* 0x0631: ctx_redswitch_delay */
+       0x01e2b608,
+       0xf1fd1bf4,
+       0xf10800f5,
+       0x800200f5,
        0xf6018500,
        0x04bd000f,
-/* 0x062e: ctx_redswitch_delay */
-       0xe2b6080e,
-       0xfd1bf401,
-       0x0800f5f1,
-       0x0200f5f1,
-       0x01850080,
-       0xbd000ff6,
-/* 0x0647: ctx_xfer */
-       0x8000f804,
-       0xf6028100,
-       0x04bd000f,
-       0xc48effb2,
-       0xe5f0501d,
-       0x008f7e01,
-       0x0711f400,
-       0x0006217e,
-/* 0x0664: ctx_xfer_not_load */
-       0x0002167e,
-       0xfc8024bd,
-       0x02f60247,
-       0xf004bd00,
-       0x20b6012c,
-       0x4afc8003,
+/* 0x064a: ctx_xfer */
+       0x008000f8,
+       0x0ff60281,
+       0x8e04bd00,
+       0xf0501dc4,
+       0xffb201e5,
+       0x00008f7e,
+       0x7e0711f4,
+/* 0x0667: ctx_xfer_not_load */
+       0x7e000624,
+       0xbd000216,
+       0x47fc8024,
        0x0002f602,
-       0x0c0f04bd,
-       0xa88effb2,
-       0xe5f0501d,
-       0x008f7e01,
-       0x03147e00,
-       0xb23f0f00,
-       0x1d608eff,
-       0x01e5f050,
+       0x2cf004bd,
+       0x0320b601,
+       0x024afc80,
+       0xbd0002f6,
+       0x8e0c0f04,
+       0xf0501da8,
+       0xffb201e5,
        0x00008f7e,
-       0xffb2000f,
-       0x501d9c8e,
-       0x7e01e5f0,
+       0x0003147e,
+       0x608e3f0f,
+       0xe5f0501d,
+       0x7effb201,
        0x0f00008f,
-       0x03147e01,
-       0x01fcf000,
-       0xb203f0b6,
-       0x1da88eff,
+       0x1d9c8e00,
        0x01e5f050,
-       0x00008f7e,
-       0xf001acf0,
-       0x008b02a5,
-       0x0c985000,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98000c,
-       0x7e000e01,
-       0xf000013d,
-       0x008b01ac,
-       0x0c985040,
-       0x0fc4b604,
-       0x9800bcbb,
-       0x0d98010c,
-       0x060f9802,
-       0x7e08004e,
-       0xf000013d,
+       0x8f7effb2,
+       0x010f0000,
+       0x0003147e,
+       0xb601fcf0,
+       0xa88e03f0,
+       0xe5f0501d,
+       0x7effb201,
+       0xf000008f,
        0xa5f001ac,
-       0x30008b04,
+       0x00008b02,
        0x040c9850,
        0xbb0fc4b6,
        0x0c9800bc,
-       0x030d9802,
-       0x4e080f98,
-       0x3d7e0200,
-       0x0a7e0001,
-       0x147e0002,
-       0x01f40003,
-       0x1a12f406,
-/* 0x073c: ctx_xfer_post */
-       0x0002277e,
-       0xffb20d0f,
-       0x501da88e,
-       0x7e01e5f0,
-       0x7e00008f,
-/* 0x0753: ctx_xfer_done */
-       0x7e000314,
-       0xf800060d,
-       0x00000000,
+       0x010d9800,
+       0x3d7e000e,
+       0xacf00001,
+       0x40008b01,
+       0x040c9850,
+       0xbb0fc4b6,
+       0x0c9800bc,
+       0x020d9801,
+       0x4e060f98,
+       0x3d7e0800,
+       0xacf00001,
+       0x04a5f001,
+       0x5030008b,
+       0xb6040c98,
+       0xbcbb0fc4,
+       0x020c9800,
+       0x98030d98,
+       0x004e080f,
+       0x013d7e02,
+       0x020a7e00,
+       0x03147e00,
+       0x0601f400,
+/* 0x073f: ctx_xfer_post */
+       0x7e1a12f4,
+       0x0f000227,
+       0x1da88e0d,
+       0x01e5f050,
+       0x8f7effb2,
+       0x147e0000,
+/* 0x0756: ctx_xfer_done */
+       0x107e0003,
+       0x00f80006,
        0x00000000,
        0x00000000,
        0x00000000,
index dda7a7d224c9b9d22a5894e4930bc712644e157a..9f5dfc85147a50df62f30fdb84453c18a622380e 100644 (file)
@@ -143,7 +143,7 @@ gf100_gr_zbc_depth_get(struct gf100_gr *gr, int format,
 static int
 gf100_fermi_mthd_zbc_color(struct nvkm_object *object, void *data, u32 size)
 {
-       struct gf100_gr *gr = (void *)object->engine;
+       struct gf100_gr *gr = gf100_gr(nvkm_gr(object->engine));
        union {
                struct fermi_a_zbc_color_v0 v0;
        } *args = data;
@@ -189,7 +189,7 @@ gf100_fermi_mthd_zbc_color(struct nvkm_object *object, void *data, u32 size)
 static int
 gf100_fermi_mthd_zbc_depth(struct nvkm_object *object, void *data, u32 size)
 {
-       struct gf100_gr *gr = (void *)object->engine;
+       struct gf100_gr *gr = gf100_gr(nvkm_gr(object->engine));
        union {
                struct fermi_a_zbc_depth_v0 v0;
        } *args = data;
@@ -1530,6 +1530,8 @@ gf100_gr_oneinit(struct nvkm_gr *base)
                gr->ppc_nr[i]  = gr->func->ppc_nr;
                for (j = 0; j < gr->ppc_nr[i]; j++) {
                        u8 mask = nvkm_rd32(device, GPC_UNIT(i, 0x0c30 + (j * 4)));
+                       if (mask)
+                               gr->ppc_mask[i] |= (1 << j);
                        gr->ppc_tpc_nr[i][j] = hweight8(mask);
                }
        }
index 4611961b118743c304f6b40f545ffeb27ef0cb91..02e78b8d93f6743b67baee2a6c68757277ccf489 100644 (file)
@@ -97,6 +97,7 @@ struct gf100_gr {
        u8 tpc_nr[GPC_MAX];
        u8 tpc_total;
        u8 ppc_nr[GPC_MAX];
+       u8 ppc_mask[GPC_MAX];
        u8 ppc_tpc_nr[GPC_MAX][4];
 
        struct nvkm_memory *unk4188b4;
index 895ba74057d4aab45fb44ddfc707243b3252fbdb..1d7dd38292b375bd73ec35ff4e844cd2ae1defe7 100644 (file)
@@ -97,7 +97,9 @@ static void *
 nvkm_instobj_dtor(struct nvkm_memory *memory)
 {
        struct nvkm_instobj *iobj = nvkm_instobj(memory);
+       spin_lock(&iobj->imem->lock);
        list_del(&iobj->head);
+       spin_unlock(&iobj->imem->lock);
        nvkm_memory_del(&iobj->parent);
        return iobj;
 }
@@ -190,7 +192,9 @@ nvkm_instobj_new(struct nvkm_instmem *imem, u32 size, u32 align, bool zero,
                nvkm_memory_ctor(&nvkm_instobj_func_slow, &iobj->memory);
                iobj->parent = memory;
                iobj->imem = imem;
+               spin_lock(&iobj->imem->lock);
                list_add_tail(&iobj->head, &imem->list);
+               spin_unlock(&iobj->imem->lock);
                memory = &iobj->memory;
        }
 
@@ -309,5 +313,6 @@ nvkm_instmem_ctor(const struct nvkm_instmem_func *func,
 {
        nvkm_subdev_ctor(&nvkm_instmem, device, index, 0, &imem->subdev);
        imem->func = func;
+       spin_lock_init(&imem->lock);
        INIT_LIST_HEAD(&imem->list);
 }
index b61509e26ec9f5d5192540c624e5c4ebdc96e087..b735173a18ff3d055dcfafcae2cd17c58b6a6c4a 100644 (file)
@@ -59,7 +59,7 @@ gk104_volt_set(struct nvkm_volt *base, u32 uv)
        duty = (uv - bios->base) * div / bios->pwm_range;
 
        nvkm_wr32(device, 0x20340, div);
-       nvkm_wr32(device, 0x20344, 0x8000000 | duty);
+       nvkm_wr32(device, 0x20344, 0x80000000 | duty);
 
        return 0;
 }
index 3f5e1cf138ba46a2b0385f979a67fc4bac98ceee..d37ba2cb886e90f54093ca8069c6732994535b8e 100644 (file)
@@ -464,7 +464,7 @@ void rv730_stop_dpm(struct radeon_device *rdev)
        result = rv770_send_msg_to_smc(rdev, PPSMC_MSG_TwoLevelsDisabled);
 
        if (result != PPSMC_Result_OK)
-               DRM_ERROR("Could not force DPM to low\n");
+               DRM_DEBUG("Could not force DPM to low\n");
 
        WREG32_P(GENERAL_PWRMGT, 0, ~GLOBAL_PWRMGT_EN);
 
index b9c770745a7a1f717cb9c894a6882c090fd8153c..e830c8935db0d9f1a7455a5c4df4c54727241dbc 100644 (file)
@@ -193,7 +193,7 @@ void rv770_stop_dpm(struct radeon_device *rdev)
        result = rv770_send_msg_to_smc(rdev, PPSMC_MSG_TwoLevelsDisabled);
 
        if (result != PPSMC_Result_OK)
-               DRM_ERROR("Could not force DPM to low.\n");
+               DRM_DEBUG("Could not force DPM to low.\n");
 
        WREG32_P(GENERAL_PWRMGT, 0, ~GLOBAL_PWRMGT_EN);
 
@@ -1418,7 +1418,7 @@ int rv770_resume_smc(struct radeon_device *rdev)
 int rv770_set_sw_state(struct radeon_device *rdev)
 {
        if (rv770_send_msg_to_smc(rdev, PPSMC_MSG_SwitchToSwState) != PPSMC_Result_OK)
-               return -EINVAL;
+               DRM_DEBUG("rv770_set_sw_state failed\n");
        return 0;
 }
 
index f659e605a4067bed3489723470e32cc9ae02b791..5178645ac42bcb85ddd7130ee81eb07fa45c2818 100644 (file)
@@ -160,11 +160,6 @@ int nvm_erase_blk(struct nvm_dev *dev, struct nvm_block *blk)
 }
 EXPORT_SYMBOL(nvm_erase_blk);
 
-static void nvm_core_free(struct nvm_dev *dev)
-{
-       kfree(dev);
-}
-
 static int nvm_core_init(struct nvm_dev *dev)
 {
        struct nvm_id *id = &dev->identity;
@@ -179,12 +174,21 @@ static int nvm_core_init(struct nvm_dev *dev)
        dev->sec_size = grp->csecs;
        dev->oob_size = grp->sos;
        dev->sec_per_pg = grp->fpg_sz / grp->csecs;
-       dev->addr_mode = id->ppat;
-       dev->addr_format = id->ppaf;
+       memcpy(&dev->ppaf, &id->ppaf, sizeof(struct nvm_addr_format));
 
        dev->plane_mode = NVM_PLANE_SINGLE;
        dev->max_rq_size = dev->ops->max_phys_sect * dev->sec_size;
 
+       if (grp->mtype != 0) {
+               pr_err("nvm: memory type not supported\n");
+               return -EINVAL;
+       }
+
+       if (grp->fmtype != 0 && grp->fmtype != 1) {
+               pr_err("nvm: flash type not supported\n");
+               return -EINVAL;
+       }
+
        if (grp->mpos & 0x020202)
                dev->plane_mode = NVM_PLANE_DOUBLE;
        if (grp->mpos & 0x040404)
@@ -213,21 +217,18 @@ static void nvm_free(struct nvm_dev *dev)
 
        if (dev->mt)
                dev->mt->unregister_mgr(dev);
-
-       nvm_core_free(dev);
 }
 
 static int nvm_init(struct nvm_dev *dev)
 {
        struct nvmm_type *mt;
-       int ret = 0;
+       int ret = -EINVAL;
 
        if (!dev->q || !dev->ops)
-               return -EINVAL;
+               return ret;
 
        if (dev->ops->identity(dev->q, &dev->identity)) {
                pr_err("nvm: device could not be identified\n");
-               ret = -EINVAL;
                goto err;
        }
 
@@ -273,7 +274,6 @@ static int nvm_init(struct nvm_dev *dev)
                        dev->nr_chnls);
        return 0;
 err:
-       nvm_free(dev);
        pr_err("nvm: failed to initialize nvm\n");
        return ret;
 }
@@ -308,22 +308,24 @@ int nvm_register(struct request_queue *q, char *disk_name,
        if (ret)
                goto err_init;
 
-       down_write(&nvm_lock);
-       list_add(&dev->devices, &nvm_devices);
-       up_write(&nvm_lock);
-
        if (dev->ops->max_phys_sect > 1) {
                dev->ppalist_pool = dev->ops->create_dma_pool(dev->q,
                                                                "ppalist");
                if (!dev->ppalist_pool) {
                        pr_err("nvm: could not create ppa pool\n");
-                       return -ENOMEM;
+                       ret = -ENOMEM;
+                       goto err_init;
                }
        } else if (dev->ops->max_phys_sect > 256) {
                pr_info("nvm: max sectors supported is 256.\n");
-               return -EINVAL;
+               ret = -EINVAL;
+               goto err_init;
        }
 
+       down_write(&nvm_lock);
+       list_add(&dev->devices, &nvm_devices);
+       up_write(&nvm_lock);
+
        return 0;
 err_init:
        kfree(dev);
@@ -341,11 +343,12 @@ void nvm_unregister(char *disk_name)
                return;
        }
 
-       nvm_exit(dev);
-
        down_write(&nvm_lock);
        list_del(&dev->devices);
        up_write(&nvm_lock);
+
+       nvm_exit(dev);
+       kfree(dev);
 }
 EXPORT_SYMBOL(nvm_unregister);
 
@@ -457,11 +460,11 @@ static void nvm_remove_target(struct nvm_target *t)
        lockdep_assert_held(&nvm_lock);
 
        del_gendisk(tdisk);
+       blk_cleanup_queue(q);
+
        if (tt->exit)
                tt->exit(tdisk->private_data);
 
-       blk_cleanup_queue(q);
-
        put_disk(tdisk);
 
        list_del(&t->list);
@@ -541,7 +544,7 @@ static int nvm_configure_show(const char *val)
        if (!dev->mt)
                return 0;
 
-       dev->mt->free_blocks_print(dev);
+       dev->mt->lun_info_print(dev);
 
        return 0;
 }
index ae1fb2bdc5f44b25aecdf010afdf9894de0dfede..e20e74ec6b9163dc401149030c7432b4cca12a22 100644 (file)
@@ -60,23 +60,28 @@ static int gennvm_luns_init(struct nvm_dev *dev, struct gen_nvm *gn)
                lun->vlun.lun_id = i % dev->luns_per_chnl;
                lun->vlun.chnl_id = i / dev->luns_per_chnl;
                lun->vlun.nr_free_blocks = dev->blks_per_lun;
+               lun->vlun.nr_inuse_blocks = 0;
+               lun->vlun.nr_bad_blocks = 0;
        }
        return 0;
 }
 
-static int gennvm_block_bb(u32 lun_id, void *bb_bitmap, unsigned int nr_blocks,
+static int gennvm_block_bb(struct ppa_addr ppa, int nr_blocks, u8 *blks,
                                                                void *private)
 {
        struct gen_nvm *gn = private;
-       struct gen_lun *lun = &gn->luns[lun_id];
+       struct nvm_dev *dev = gn->dev;
+       struct gen_lun *lun;
        struct nvm_block *blk;
        int i;
 
-       if (unlikely(bitmap_empty(bb_bitmap, nr_blocks)))
-               return 0;
+       ppa = dev_to_generic_addr(gn->dev, ppa);
+       lun = &gn->luns[(dev->nr_luns * ppa.g.ch) + ppa.g.lun];
+
+       for (i = 0; i < nr_blocks; i++) {
+               if (blks[i] == 0)
+                       continue;
 
-       i = -1;
-       while ((i = find_next_bit(bb_bitmap, nr_blocks, i + 1)) < nr_blocks) {
                blk = &lun->vlun.blocks[i];
                if (!blk) {
                        pr_err("gennvm: BB data is out of bounds.\n");
@@ -84,6 +89,7 @@ static int gennvm_block_bb(u32 lun_id, void *bb_bitmap, unsigned int nr_blocks,
                }
 
                list_move_tail(&blk->list, &lun->bb_list);
+               lun->vlun.nr_bad_blocks++;
        }
 
        return 0;
@@ -136,6 +142,7 @@ static int gennvm_block_map(u64 slba, u32 nlb, __le64 *entries, void *private)
                        list_move_tail(&blk->list, &lun->used_list);
                        blk->type = 1;
                        lun->vlun.nr_free_blocks--;
+                       lun->vlun.nr_inuse_blocks++;
                }
        }
 
@@ -164,15 +171,25 @@ static int gennvm_blocks_init(struct nvm_dev *dev, struct gen_nvm *gn)
                        block->id = cur_block_id++;
 
                        /* First block is reserved for device */
-                       if (unlikely(lun_iter == 0 && blk_iter == 0))
+                       if (unlikely(lun_iter == 0 && blk_iter == 0)) {
+                               lun->vlun.nr_free_blocks--;
                                continue;
+                       }
 
                        list_add_tail(&block->list, &lun->free_list);
                }
 
                if (dev->ops->get_bb_tbl) {
-                       ret = dev->ops->get_bb_tbl(dev->q, lun->vlun.id,
-                                       dev->blks_per_lun, gennvm_block_bb, gn);
+                       struct ppa_addr ppa;
+
+                       ppa.ppa = 0;
+                       ppa.g.ch = lun->vlun.chnl_id;
+                       ppa.g.lun = lun->vlun.id;
+                       ppa = generic_to_dev_addr(dev, ppa);
+
+                       ret = dev->ops->get_bb_tbl(dev->q, ppa,
+                                               dev->blks_per_lun,
+                                               gennvm_block_bb, gn);
                        if (ret)
                                pr_err("gennvm: could not read BB table\n");
                }
@@ -199,6 +216,7 @@ static int gennvm_register(struct nvm_dev *dev)
        if (!gn)
                return -ENOMEM;
 
+       gn->dev = dev;
        gn->nr_luns = dev->nr_luns;
        dev->mp = gn;
 
@@ -254,6 +272,7 @@ static struct nvm_block *gennvm_get_blk(struct nvm_dev *dev,
        blk->type = 1;
 
        lun->vlun.nr_free_blocks--;
+       lun->vlun.nr_inuse_blocks++;
 
        spin_unlock(&vlun->lock);
 out:
@@ -271,16 +290,21 @@ static void gennvm_put_blk(struct nvm_dev *dev, struct nvm_block *blk)
        case 1:
                list_move_tail(&blk->list, &lun->free_list);
                lun->vlun.nr_free_blocks++;
+               lun->vlun.nr_inuse_blocks--;
                blk->type = 0;
                break;
        case 2:
                list_move_tail(&blk->list, &lun->bb_list);
+               lun->vlun.nr_bad_blocks++;
+               lun->vlun.nr_inuse_blocks--;
                break;
        default:
                WARN_ON_ONCE(1);
                pr_err("gennvm: erroneous block type (%lu -> %u)\n",
                                                        blk->id, blk->type);
                list_move_tail(&blk->list, &lun->bb_list);
+               lun->vlun.nr_bad_blocks++;
+               lun->vlun.nr_inuse_blocks--;
        }
 
        spin_unlock(&vlun->lock);
@@ -292,10 +316,10 @@ static void gennvm_addr_to_generic_mode(struct nvm_dev *dev, struct nvm_rq *rqd)
 
        if (rqd->nr_pages > 1) {
                for (i = 0; i < rqd->nr_pages; i++)
-                       rqd->ppa_list[i] = addr_to_generic_mode(dev,
+                       rqd->ppa_list[i] = dev_to_generic_addr(dev,
                                                        rqd->ppa_list[i]);
        } else {
-               rqd->ppa_addr = addr_to_generic_mode(dev, rqd->ppa_addr);
+               rqd->ppa_addr = dev_to_generic_addr(dev, rqd->ppa_addr);
        }
 }
 
@@ -305,10 +329,10 @@ static void gennvm_generic_to_addr_mode(struct nvm_dev *dev, struct nvm_rq *rqd)
 
        if (rqd->nr_pages > 1) {
                for (i = 0; i < rqd->nr_pages; i++)
-                       rqd->ppa_list[i] = generic_to_addr_mode(dev,
+                       rqd->ppa_list[i] = generic_to_dev_addr(dev,
                                                        rqd->ppa_list[i]);
        } else {
-               rqd->ppa_addr = generic_to_addr_mode(dev, rqd->ppa_addr);
+               rqd->ppa_addr = generic_to_dev_addr(dev, rqd->ppa_addr);
        }
 }
 
@@ -354,10 +378,10 @@ static void gennvm_mark_blk_bad(struct nvm_dev *dev, struct nvm_rq *rqd)
 {
        int i;
 
-       if (!dev->ops->set_bb)
+       if (!dev->ops->set_bb_tbl)
                return;
 
-       if (dev->ops->set_bb(dev->q, rqd, 1))
+       if (dev->ops->set_bb_tbl(dev->q, rqd, 1))
                return;
 
        gennvm_addr_to_generic_mode(dev, rqd);
@@ -440,15 +464,24 @@ static struct nvm_lun *gennvm_get_lun(struct nvm_dev *dev, int lunid)
        return &gn->luns[lunid].vlun;
 }
 
-static void gennvm_free_blocks_print(struct nvm_dev *dev)
+static void gennvm_lun_info_print(struct nvm_dev *dev)
 {
        struct gen_nvm *gn = dev->mp;
        struct gen_lun *lun;
        unsigned int i;
 
-       gennvm_for_each_lun(gn, lun, i)
-               pr_info("%s: lun%8u\t%u\n",
-                                       dev->name, i, lun->vlun.nr_free_blocks);
+
+       gennvm_for_each_lun(gn, lun, i) {
+               spin_lock(&lun->vlun.lock);
+
+               pr_info("%s: lun%8u\t%u\t%u\t%u\n",
+                               dev->name, i,
+                               lun->vlun.nr_free_blocks,
+                               lun->vlun.nr_inuse_blocks,
+                               lun->vlun.nr_bad_blocks);
+
+               spin_unlock(&lun->vlun.lock);
+       }
 }
 
 static struct nvmm_type gennvm = {
@@ -466,7 +499,7 @@ static struct nvmm_type gennvm = {
        .erase_blk      = gennvm_erase_blk,
 
        .get_lun        = gennvm_get_lun,
-       .free_blocks_print = gennvm_free_blocks_print,
+       .lun_info_print = gennvm_lun_info_print,
 };
 
 static int __init gennvm_module_init(void)
index d23bd3501ddc4e56abc8ce177e0fd82aa94fec13..9c24b5b32dac2cb37acc39a5d7c54449296fe231 100644 (file)
@@ -35,6 +35,8 @@ struct gen_lun {
 };
 
 struct gen_nvm {
+       struct nvm_dev *dev;
+
        int nr_luns;
        struct gen_lun *luns;
 };
index 7ba64c87ba1c10306c9b96d132f0d2f869a628da..75e59c3a3f96d821d93600f2ca698a50e2874182 100644 (file)
@@ -123,12 +123,42 @@ static u64 block_to_addr(struct rrpc *rrpc, struct rrpc_block *rblk)
        return blk->id * rrpc->dev->pgs_per_blk;
 }
 
+static struct ppa_addr linear_to_generic_addr(struct nvm_dev *dev,
+                                                       struct ppa_addr r)
+{
+       struct ppa_addr l;
+       int secs, pgs, blks, luns;
+       sector_t ppa = r.ppa;
+
+       l.ppa = 0;
+
+       div_u64_rem(ppa, dev->sec_per_pg, &secs);
+       l.g.sec = secs;
+
+       sector_div(ppa, dev->sec_per_pg);
+       div_u64_rem(ppa, dev->sec_per_blk, &pgs);
+       l.g.pg = pgs;
+
+       sector_div(ppa, dev->pgs_per_blk);
+       div_u64_rem(ppa, dev->blks_per_lun, &blks);
+       l.g.blk = blks;
+
+       sector_div(ppa, dev->blks_per_lun);
+       div_u64_rem(ppa, dev->luns_per_chnl, &luns);
+       l.g.lun = luns;
+
+       sector_div(ppa, dev->luns_per_chnl);
+       l.g.ch = ppa;
+
+       return l;
+}
+
 static struct ppa_addr rrpc_ppa_to_gaddr(struct nvm_dev *dev, u64 addr)
 {
        struct ppa_addr paddr;
 
        paddr.ppa = addr;
-       return __linear_to_generic_addr(dev, paddr);
+       return linear_to_generic_addr(dev, paddr);
 }
 
 /* requires lun->lock taken */
index 917d47e290ae08be08f4c964a3326f1f67acd077..3147c8d09ea84a0a76d0fd7ead35931a89e29aed 100644 (file)
@@ -112,7 +112,8 @@ struct iv_tcw_private {
  * and encrypts / decrypts at the same time.
  */
 enum flags { DM_CRYPT_SUSPENDED, DM_CRYPT_KEY_VALID,
-            DM_CRYPT_SAME_CPU, DM_CRYPT_NO_OFFLOAD };
+            DM_CRYPT_SAME_CPU, DM_CRYPT_NO_OFFLOAD,
+            DM_CRYPT_EXIT_THREAD};
 
 /*
  * The fields in here must be read only after initialization.
@@ -1203,20 +1204,18 @@ continue_locked:
                if (!RB_EMPTY_ROOT(&cc->write_tree))
                        goto pop_from_list;
 
+               if (unlikely(test_bit(DM_CRYPT_EXIT_THREAD, &cc->flags))) {
+                       spin_unlock_irq(&cc->write_thread_wait.lock);
+                       break;
+               }
+
                __set_current_state(TASK_INTERRUPTIBLE);
                __add_wait_queue(&cc->write_thread_wait, &wait);
 
                spin_unlock_irq(&cc->write_thread_wait.lock);
 
-               if (unlikely(kthread_should_stop())) {
-                       set_task_state(current, TASK_RUNNING);
-                       remove_wait_queue(&cc->write_thread_wait, &wait);
-                       break;
-               }
-
                schedule();
 
-               set_task_state(current, TASK_RUNNING);
                spin_lock_irq(&cc->write_thread_wait.lock);
                __remove_wait_queue(&cc->write_thread_wait, &wait);
                goto continue_locked;
@@ -1531,8 +1530,13 @@ static void crypt_dtr(struct dm_target *ti)
        if (!cc)
                return;
 
-       if (cc->write_thread)
+       if (cc->write_thread) {
+               spin_lock_irq(&cc->write_thread_wait.lock);
+               set_bit(DM_CRYPT_EXIT_THREAD, &cc->flags);
+               wake_up_locked(&cc->write_thread_wait);
+               spin_unlock_irq(&cc->write_thread_wait.lock);
                kthread_stop(cc->write_thread);
+       }
 
        if (cc->io_queue)
                destroy_workqueue(cc->io_queue);
index aaa6caa46a9f2dbceaf3d9c1aac92037b3b731b2..cfa29f574c2a9e1454788a5757471835b254d857 100644 (file)
@@ -1537,32 +1537,34 @@ static int multipath_prepare_ioctl(struct dm_target *ti,
                struct block_device **bdev, fmode_t *mode)
 {
        struct multipath *m = ti->private;
-       struct pgpath *pgpath;
        unsigned long flags;
        int r;
 
-       r = 0;
-
        spin_lock_irqsave(&m->lock, flags);
 
        if (!m->current_pgpath)
                __choose_pgpath(m, 0);
 
-       pgpath = m->current_pgpath;
-
-       if (pgpath) {
-               *bdev = pgpath->path.dev->bdev;
-               *mode = pgpath->path.dev->mode;
+       if (m->current_pgpath) {
+               if (!m->queue_io) {
+                       *bdev = m->current_pgpath->path.dev->bdev;
+                       *mode = m->current_pgpath->path.dev->mode;
+                       r = 0;
+               } else {
+                       /* pg_init has not started or completed */
+                       r = -ENOTCONN;
+               }
+       } else {
+               /* No path is available */
+               if (m->queue_if_no_path)
+                       r = -ENOTCONN;
+               else
+                       r = -EIO;
        }
 
-       if ((pgpath && m->queue_io) || (!pgpath && m->queue_if_no_path))
-               r = -ENOTCONN;
-       else if (!*bdev)
-               r = -EIO;
-
        spin_unlock_irqrestore(&m->lock, flags);
 
-       if (r == -ENOTCONN && !fatal_signal_pending(current)) {
+       if (r == -ENOTCONN) {
                spin_lock_irqsave(&m->lock, flags);
                if (!m->current_pg) {
                        /* Path status changed, redo selection */
index 3897b90bd462d852e0aec27a792be14655efa150..63903a5a5d9ee3b580d552673b42b9716b99322c 100644 (file)
@@ -2432,6 +2432,7 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode)
        case PM_WRITE:
                if (old_mode != new_mode)
                        notify_of_pool_mode_change(pool, "write");
+               pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space;
                dm_pool_metadata_read_write(pool->pmd);
                pool->process_bio = process_bio;
                pool->process_discard = process_discard_bio;
@@ -4249,10 +4250,9 @@ static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits)
 {
        struct thin_c *tc = ti->private;
        struct pool *pool = tc->pool;
-       struct queue_limits *pool_limits = dm_get_queue_limits(pool->pool_md);
 
-       if (!pool_limits->discard_granularity)
-               return; /* pool's discard support is disabled */
+       if (!pool->pf.discard_enabled)
+               return;
 
        limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
        limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */
index 6e15f3565892fce8315cef992e0b2721e8c20088..5df40480228b7a26e3c73ac78e963ce47ed25448 100644 (file)
@@ -591,7 +591,7 @@ retry:
 
 out:
        dm_put_live_table(md, *srcu_idx);
-       if (r == -ENOTCONN) {
+       if (r == -ENOTCONN && !fatal_signal_pending(current)) {
                msleep(10);
                goto retry;
        }
@@ -603,9 +603,10 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
 {
        struct mapped_device *md = bdev->bd_disk->private_data;
        struct dm_target *tgt;
+       struct block_device *tgt_bdev = NULL;
        int srcu_idx, r;
 
-       r = dm_get_live_table_for_ioctl(md, &tgt, &bdev, &mode, &srcu_idx);
+       r = dm_get_live_table_for_ioctl(md, &tgt, &tgt_bdev, &mode, &srcu_idx);
        if (r < 0)
                return r;
 
@@ -620,7 +621,7 @@ static int dm_blk_ioctl(struct block_device *bdev, fmode_t mode,
                        goto out;
        }
 
-       r =  __blkdev_driver_ioctl(bdev, mode, cmd, arg);
+       r =  __blkdev_driver_ioctl(tgt_bdev, mode, cmd, arg);
 out:
        dm_put_live_table(md, srcu_idx);
        return r;
index e0b7b95813bc98e1fc7f25fd422fad87690ec2e4..9202d1a468d049f30284f39e6c2894e0711b3add 100644 (file)
@@ -93,7 +93,7 @@ struct nvme_nvm_l2ptbl {
        __le16                  cdw14[6];
 };
 
-struct nvme_nvm_bbtbl {
+struct nvme_nvm_getbbtbl {
        __u8                    opcode;
        __u8                    flags;
        __u16                   command_id;
@@ -101,10 +101,23 @@ struct nvme_nvm_bbtbl {
        __u64                   rsvd[2];
        __le64                  prp1;
        __le64                  prp2;
-       __le32                  prp1_len;
-       __le32                  prp2_len;
-       __le32                  lbb;
-       __u32                   rsvd11[3];
+       __le64                  spba;
+       __u32                   rsvd4[4];
+};
+
+struct nvme_nvm_setbbtbl {
+       __u8                    opcode;
+       __u8                    flags;
+       __u16                   command_id;
+       __le32                  nsid;
+       __le64                  rsvd[2];
+       __le64                  prp1;
+       __le64                  prp2;
+       __le64                  spba;
+       __le16                  nlb;
+       __u8                    value;
+       __u8                    rsvd3;
+       __u32                   rsvd4[3];
 };
 
 struct nvme_nvm_erase_blk {
@@ -129,8 +142,8 @@ struct nvme_nvm_command {
                struct nvme_nvm_hb_rw hb_rw;
                struct nvme_nvm_ph_rw ph_rw;
                struct nvme_nvm_l2ptbl l2p;
-               struct nvme_nvm_bbtbl get_bb;
-               struct nvme_nvm_bbtbl set_bb;
+               struct nvme_nvm_getbbtbl get_bb;
+               struct nvme_nvm_setbbtbl set_bb;
                struct nvme_nvm_erase_blk erase;
        };
 };
@@ -142,11 +155,13 @@ struct nvme_nvm_id_group {
        __u8                    num_ch;
        __u8                    num_lun;
        __u8                    num_pln;
+       __u8                    rsvd1;
        __le16                  num_blk;
        __le16                  num_pg;
        __le16                  fpg_sz;
        __le16                  csecs;
        __le16                  sos;
+       __le16                  rsvd2;
        __le32                  trdt;
        __le32                  trdm;
        __le32                  tprt;
@@ -154,8 +169,9 @@ struct nvme_nvm_id_group {
        __le32                  tbet;
        __le32                  tbem;
        __le32                  mpos;
+       __le32                  mccap;
        __le16                  cpar;
-       __u8                    reserved[913];
+       __u8                    reserved[906];
 } __packed;
 
 struct nvme_nvm_addr_format {
@@ -178,15 +194,28 @@ struct nvme_nvm_id {
        __u8                    ver_id;
        __u8                    vmnt;
        __u8                    cgrps;
-       __u8                    res[5];
+       __u8                    res;
        __le32                  cap;
        __le32                  dom;
        struct nvme_nvm_addr_format ppaf;
-       __u8                    ppat;
-       __u8                    resv[223];
+       __u8                    resv[228];
        struct nvme_nvm_id_group groups[4];
 } __packed;
 
+struct nvme_nvm_bb_tbl {
+       __u8    tblid[4];
+       __le16  verid;
+       __le16  revid;
+       __le32  rvsd1;
+       __le32  tblks;
+       __le32  tfact;
+       __le32  tgrown;
+       __le32  tdresv;
+       __le32  thresv;
+       __le32  rsvd2[8];
+       __u8    blk[0];
+};
+
 /*
  * Check we didn't inadvertently grow the command struct
  */
@@ -195,12 +224,14 @@ static inline void _nvme_nvm_check_size(void)
        BUILD_BUG_ON(sizeof(struct nvme_nvm_identity) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_hb_rw) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_ph_rw) != 64);
-       BUILD_BUG_ON(sizeof(struct nvme_nvm_bbtbl) != 64);
+       BUILD_BUG_ON(sizeof(struct nvme_nvm_getbbtbl) != 64);
+       BUILD_BUG_ON(sizeof(struct nvme_nvm_setbbtbl) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_l2ptbl) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_erase_blk) != 64);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_id_group) != 960);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_addr_format) != 128);
        BUILD_BUG_ON(sizeof(struct nvme_nvm_id) != 4096);
+       BUILD_BUG_ON(sizeof(struct nvme_nvm_bb_tbl) != 512);
 }
 
 static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
@@ -234,6 +265,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
                dst->tbet = le32_to_cpu(src->tbet);
                dst->tbem = le32_to_cpu(src->tbem);
                dst->mpos = le32_to_cpu(src->mpos);
+               dst->mccap = le32_to_cpu(src->mccap);
 
                dst->cpar = le16_to_cpu(src->cpar);
        }
@@ -244,6 +276,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id)
 static int nvme_nvm_identity(struct request_queue *q, struct nvm_id *nvm_id)
 {
        struct nvme_ns *ns = q->queuedata;
+       struct nvme_dev *dev = ns->dev;
        struct nvme_nvm_id *nvme_nvm_id;
        struct nvme_nvm_command c = {};
        int ret;
@@ -256,8 +289,8 @@ static int nvme_nvm_identity(struct request_queue *q, struct nvm_id *nvm_id)
        if (!nvme_nvm_id)
                return -ENOMEM;
 
-       ret = nvme_submit_sync_cmd(q, (struct nvme_command *)&c, nvme_nvm_id,
-                                               sizeof(struct nvme_nvm_id));
+       ret = nvme_submit_sync_cmd(dev->admin_q, (struct nvme_command *)&c,
+                               nvme_nvm_id, sizeof(struct nvme_nvm_id));
        if (ret) {
                ret = -EIO;
                goto out;
@@ -268,6 +301,8 @@ static int nvme_nvm_identity(struct request_queue *q, struct nvm_id *nvm_id)
        nvm_id->cgrps = nvme_nvm_id->cgrps;
        nvm_id->cap = le32_to_cpu(nvme_nvm_id->cap);
        nvm_id->dom = le32_to_cpu(nvme_nvm_id->dom);
+       memcpy(&nvm_id->ppaf, &nvme_nvm_id->ppaf,
+                                       sizeof(struct nvme_nvm_addr_format));
 
        ret = init_grps(nvm_id, nvme_nvm_id);
 out:
@@ -281,7 +316,7 @@ static int nvme_nvm_get_l2p_tbl(struct request_queue *q, u64 slba, u32 nlb,
        struct nvme_ns *ns = q->queuedata;
        struct nvme_dev *dev = ns->dev;
        struct nvme_nvm_command c = {};
-       u32 len = queue_max_hw_sectors(q) << 9;
+       u32 len = queue_max_hw_sectors(dev->admin_q) << 9;
        u32 nlb_pr_rq = len / sizeof(u64);
        u64 cmd_slba = slba;
        void *entries;
@@ -299,8 +334,8 @@ static int nvme_nvm_get_l2p_tbl(struct request_queue *q, u64 slba, u32 nlb,
                c.l2p.slba = cpu_to_le64(cmd_slba);
                c.l2p.nlb = cpu_to_le32(cmd_nlb);
 
-               ret = nvme_submit_sync_cmd(q, (struct nvme_command *)&c,
-                                                               entries, len);
+               ret = nvme_submit_sync_cmd(dev->admin_q,
+                               (struct nvme_command *)&c, entries, len);
                if (ret) {
                        dev_err(dev->dev, "L2P table transfer failed (%d)\n",
                                                                        ret);
@@ -322,43 +357,82 @@ out:
        return ret;
 }
 
-static int nvme_nvm_get_bb_tbl(struct request_queue *q, int lunid,
-                               unsigned int nr_blocks,
-                               nvm_bb_update_fn *update_bbtbl, void *priv)
+static int nvme_nvm_get_bb_tbl(struct request_queue *q, struct ppa_addr ppa,
+                               int nr_blocks, nvm_bb_update_fn *update_bbtbl,
+                               void *priv)
 {
        struct nvme_ns *ns = q->queuedata;
        struct nvme_dev *dev = ns->dev;
        struct nvme_nvm_command c = {};
-       void *bb_bitmap;
-       u16 bb_bitmap_size;
+       struct nvme_nvm_bb_tbl *bb_tbl;
+       int tblsz = sizeof(struct nvme_nvm_bb_tbl) + nr_blocks;
        int ret = 0;
 
        c.get_bb.opcode = nvme_nvm_admin_get_bb_tbl;
        c.get_bb.nsid = cpu_to_le32(ns->ns_id);
-       c.get_bb.lbb = cpu_to_le32(lunid);
-       bb_bitmap_size = ((nr_blocks >> 15) + 1) * PAGE_SIZE;
-       bb_bitmap = kmalloc(bb_bitmap_size, GFP_KERNEL);
-       if (!bb_bitmap)
-               return -ENOMEM;
+       c.get_bb.spba = cpu_to_le64(ppa.ppa);
 
-       bitmap_zero(bb_bitmap, nr_blocks);
+       bb_tbl = kzalloc(tblsz, GFP_KERNEL);
+       if (!bb_tbl)
+               return -ENOMEM;
 
-       ret = nvme_submit_sync_cmd(q, (struct nvme_command *)&c, bb_bitmap,
-                                                               bb_bitmap_size);
+       ret = nvme_submit_sync_cmd(dev->admin_q, (struct nvme_command *)&c,
+                                                               bb_tbl, tblsz);
        if (ret) {
                dev_err(dev->dev, "get bad block table failed (%d)\n", ret);
                ret = -EIO;
                goto out;
        }
 
-       ret = update_bbtbl(lunid, bb_bitmap, nr_blocks, priv);
+       if (bb_tbl->tblid[0] != 'B' || bb_tbl->tblid[1] != 'B' ||
+               bb_tbl->tblid[2] != 'L' || bb_tbl->tblid[3] != 'T') {
+               dev_err(dev->dev, "bbt format mismatch\n");
+               ret = -EINVAL;
+               goto out;
+       }
+
+       if (le16_to_cpu(bb_tbl->verid) != 1) {
+               ret = -EINVAL;
+               dev_err(dev->dev, "bbt version not supported\n");
+               goto out;
+       }
+
+       if (le32_to_cpu(bb_tbl->tblks) != nr_blocks) {
+               ret = -EINVAL;
+               dev_err(dev->dev, "bbt unsuspected blocks returned (%u!=%u)",
+                                       le32_to_cpu(bb_tbl->tblks), nr_blocks);
+               goto out;
+       }
+
+       ret = update_bbtbl(ppa, nr_blocks, bb_tbl->blk, priv);
        if (ret) {
                ret = -EINTR;
                goto out;
        }
 
 out:
-       kfree(bb_bitmap);
+       kfree(bb_tbl);
+       return ret;
+}
+
+static int nvme_nvm_set_bb_tbl(struct request_queue *q, struct nvm_rq *rqd,
+                                                               int type)
+{
+       struct nvme_ns *ns = q->queuedata;
+       struct nvme_dev *dev = ns->dev;
+       struct nvme_nvm_command c = {};
+       int ret = 0;
+
+       c.set_bb.opcode = nvme_nvm_admin_set_bb_tbl;
+       c.set_bb.nsid = cpu_to_le32(ns->ns_id);
+       c.set_bb.spba = cpu_to_le64(rqd->ppa_addr.ppa);
+       c.set_bb.nlb = cpu_to_le16(rqd->nr_pages - 1);
+       c.set_bb.value = type;
+
+       ret = nvme_submit_sync_cmd(dev->admin_q, (struct nvme_command *)&c,
+                                                               NULL, 0);
+       if (ret)
+               dev_err(dev->dev, "set bad block table failed (%d)\n", ret);
        return ret;
 }
 
@@ -474,6 +548,7 @@ static struct nvm_dev_ops nvme_nvm_dev_ops = {
        .get_l2p_tbl            = nvme_nvm_get_l2p_tbl,
 
        .get_bb_tbl             = nvme_nvm_get_bb_tbl,
+       .set_bb_tbl             = nvme_nvm_set_bb_tbl,
 
        .submit_io              = nvme_nvm_submit_io,
        .erase_block            = nvme_nvm_erase_block,
index 8187df20469535023ae9966aecfb1542260b4270..f3b53af789efccbddfedc0b37319dcaa1c264bfd 100644 (file)
@@ -896,19 +896,28 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
                        goto retry_cmd;
                }
                if (blk_integrity_rq(req)) {
-                       if (blk_rq_count_integrity_sg(req->q, req->bio) != 1)
+                       if (blk_rq_count_integrity_sg(req->q, req->bio) != 1) {
+                               dma_unmap_sg(dev->dev, iod->sg, iod->nents,
+                                               dma_dir);
                                goto error_cmd;
+                       }
 
                        sg_init_table(iod->meta_sg, 1);
                        if (blk_rq_map_integrity_sg(
-                                       req->q, req->bio, iod->meta_sg) != 1)
+                                       req->q, req->bio, iod->meta_sg) != 1) {
+                               dma_unmap_sg(dev->dev, iod->sg, iod->nents,
+                                               dma_dir);
                                goto error_cmd;
+                       }
 
                        if (rq_data_dir(req))
                                nvme_dif_remap(req, nvme_dif_prep);
 
-                       if (!dma_map_sg(nvmeq->q_dmadev, iod->meta_sg, 1, dma_dir))
+                       if (!dma_map_sg(nvmeq->q_dmadev, iod->meta_sg, 1, dma_dir)) {
+                               dma_unmap_sg(dev->dev, iod->sg, iod->nents,
+                                               dma_dir);
                                goto error_cmd;
+                       }
                }
        }
 
@@ -968,7 +977,8 @@ static void __nvme_process_cq(struct nvme_queue *nvmeq, unsigned int *tag)
        if (head == nvmeq->cq_head && phase == nvmeq->cq_phase)
                return;
 
-       writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
+       if (likely(nvmeq->cq_vector >= 0))
+               writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
        nvmeq->cq_head = head;
        nvmeq->cq_phase = phase;
 
@@ -1727,9 +1737,13 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
        u32 aqa;
        u64 cap = lo_hi_readq(&dev->bar->cap);
        struct nvme_queue *nvmeq;
-       unsigned page_shift = PAGE_SHIFT;
+       /*
+        * default to a 4K page size, with the intention to update this
+        * path in the future to accomodate architectures with differing
+        * kernel and IO page sizes.
+        */
+       unsigned page_shift = 12;
        unsigned dev_page_min = NVME_CAP_MPSMIN(cap) + 12;
-       unsigned dev_page_max = NVME_CAP_MPSMAX(cap) + 12;
 
        if (page_shift < dev_page_min) {
                dev_err(dev->dev,
@@ -1738,13 +1752,6 @@ static int nvme_configure_admin_queue(struct nvme_dev *dev)
                                1 << page_shift);
                return -ENODEV;
        }
-       if (page_shift > dev_page_max) {
-               dev_info(dev->dev,
-                               "Device maximum page size (%u) smaller than "
-                               "host (%u); enabling work-around\n",
-                               1 << dev_page_max, 1 << page_shift);
-               page_shift = dev_page_max;
-       }
 
        dev->subsystem = readl(&dev->bar->vs) >= NVME_VS(1, 1) ?
                                                NVME_CAP_NSSRC(cap) : 0;
@@ -2268,7 +2275,7 @@ static void nvme_alloc_ns(struct nvme_dev *dev, unsigned nsid)
        if (dev->max_hw_sectors) {
                blk_queue_max_hw_sectors(ns->queue, dev->max_hw_sectors);
                blk_queue_max_segments(ns->queue,
-                       ((dev->max_hw_sectors << 9) / dev->page_size) + 1);
+                       (dev->max_hw_sectors / (dev->page_size >> 9)) + 1);
        }
        if (dev->stripe_size)
                blk_queue_chunk_sectors(ns->queue, dev->stripe_size >> 9);
@@ -2787,6 +2794,10 @@ static void nvme_del_queue_end(struct nvme_queue *nvmeq)
 {
        struct nvme_delq_ctx *dq = nvmeq->cmdinfo.ctx;
        nvme_put_dq(dq);
+
+       spin_lock_irq(&nvmeq->q_lock);
+       nvme_process_cq(nvmeq);
+       spin_unlock_irq(&nvmeq->q_lock);
 }
 
 static int adapter_async_del_queue(struct nvme_queue *nvmeq, u8 opcode,
index 540f077c37eae7b59b983c31fa6ddce51d8bda6e..02a7452bdf235cf52731b3a822066c27d33e8a76 100644 (file)
@@ -440,7 +440,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
                                         ret, pp->io);
                                continue;
                        }
-                       pp->io_base = pp->io->start;
                        break;
                case IORESOURCE_MEM:
                        pp->mem = win->res;
index 35457ecd8e70f4d6f856573f45f8bbc2991d1f6d..163671a4f798dfc18bb24f3490ad7138753efac1 100644 (file)
@@ -111,7 +111,7 @@ static struct pcie_host_ops hisi_pcie_host_ops = {
        .link_up = hisi_pcie_link_up,
 };
 
-static int __init hisi_add_pcie_port(struct pcie_port *pp,
+static int hisi_add_pcie_port(struct pcie_port *pp,
                                     struct platform_device *pdev)
 {
        int ret;
@@ -139,7 +139,7 @@ static int __init hisi_add_pcie_port(struct pcie_port *pp,
        return 0;
 }
 
-static int __init hisi_pcie_probe(struct platform_device *pdev)
+static int hisi_pcie_probe(struct platform_device *pdev)
 {
        struct hisi_pcie *hisi_pcie;
        struct pcie_port *pp;
index 92618686604cb9d314aa1e6bf833363cfbaaa1b5..eead54cd01b2bfad6a5514f53067429e616db6b7 100644 (file)
@@ -216,7 +216,10 @@ static ssize_t numa_node_store(struct device *dev,
        if (ret)
                return ret;
 
-       if (node >= MAX_NUMNODES || !node_online(node))
+       if ((node < 0 && node != NUMA_NO_NODE) || node >= MAX_NUMNODES)
+               return -EINVAL;
+
+       if (node != NUMA_NO_NODE && !node_online(node))
                return -EINVAL;
 
        add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
index fd2f03fa53f33a34977fc8713fd8cf6759cad2d5..d390fc1475eccf9f77491b5b401a823067b2995b 100644 (file)
@@ -337,6 +337,4 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
 }
 #endif
 
-struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
-
 #endif /* DRIVERS_PCI_H */
index 188006c55ce0708771709199b183aff93c16c3b1..aa705bb4748c08ac302d45775ef698cf26c69d5b 100644 (file)
@@ -15,9 +15,6 @@
 #include <linux/i2c.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
-#include <linux/of_irq.h>
-#include <linux/pm_wakeirq.h>
 #include <linux/rtc/ds1307.h>
 #include <linux/rtc.h>
 #include <linux/slab.h>
@@ -117,7 +114,6 @@ struct ds1307 {
 #define HAS_ALARM      1               /* bit 1 == irq claimed */
        struct i2c_client       *client;
        struct rtc_device       *rtc;
-       int                     wakeirq;
        s32 (*read_block_data)(const struct i2c_client *client, u8 command,
                               u8 length, u8 *values);
        s32 (*write_block_data)(const struct i2c_client *client, u8 command,
@@ -1138,7 +1134,10 @@ read_rtc:
                                bin2bcd(tmp));
        }
 
-       device_set_wakeup_capable(&client->dev, want_irq);
+       if (want_irq) {
+               device_set_wakeup_capable(&client->dev, true);
+               set_bit(HAS_ALARM, &ds1307->flags);
+       }
        ds1307->rtc = devm_rtc_device_register(&client->dev, client->name,
                                rtc_ops, THIS_MODULE);
        if (IS_ERR(ds1307->rtc)) {
@@ -1146,43 +1145,19 @@ read_rtc:
        }
 
        if (want_irq) {
-               struct device_node *node = client->dev.of_node;
-
                err = devm_request_threaded_irq(&client->dev,
                                                client->irq, NULL, irq_handler,
                                                IRQF_SHARED | IRQF_ONESHOT,
                                                ds1307->rtc->name, client);
                if (err) {
                        client->irq = 0;
+                       device_set_wakeup_capable(&client->dev, false);
+                       clear_bit(HAS_ALARM, &ds1307->flags);
                        dev_err(&client->dev, "unable to request IRQ!\n");
-                       goto no_irq;
-               }
-
-               set_bit(HAS_ALARM, &ds1307->flags);
-               dev_dbg(&client->dev, "got IRQ %d\n", client->irq);
-
-               /* Currently supported by OF code only! */
-               if (!node)
-                       goto no_irq;
-
-               err = of_irq_get(node, 1);
-               if (err <= 0) {
-                       if (err == -EPROBE_DEFER)
-                               goto exit;
-                       goto no_irq;
-               }
-               ds1307->wakeirq = err;
-
-               err = dev_pm_set_dedicated_wake_irq(&client->dev,
-                                                   ds1307->wakeirq);
-               if (err) {
-                       dev_err(&client->dev, "unable to setup wakeIRQ %d!\n",
-                               err);
-                       goto exit;
-               }
+               } else
+                       dev_dbg(&client->dev, "got IRQ %d\n", client->irq);
        }
 
-no_irq:
        if (chip->nvram_size) {
 
                ds1307->nvram = devm_kzalloc(&client->dev,
@@ -1226,9 +1201,6 @@ static int ds1307_remove(struct i2c_client *client)
 {
        struct ds1307 *ds1307 = i2c_get_clientdata(client);
 
-       if (ds1307->wakeirq)
-               dev_pm_clear_wake_irq(&client->dev);
-
        if (test_and_clear_bit(HAS_NVRAM, &ds1307->flags))
                sysfs_remove_bin_file(&client->dev.kobj, ds1307->nvram);
 
index 3ba2e9564b9a78f000c234fa1be7bb05e24eaebd..81af294f15a7d4deb557b162dc51ca676df9618a 100644 (file)
@@ -902,7 +902,7 @@ static ssize_t tcm_qla2xxx_tpg_fabric_prot_type_show(struct config_item *item,
        return sprintf(page, "%d\n", tpg->tpg_attrib.fabric_prot_type);
 }
 
-CONFIGFS_ATTR_WO(tcm_qla2xxx_tpg_, enable);
+CONFIGFS_ATTR(tcm_qla2xxx_tpg_, enable);
 CONFIGFS_ATTR_RO(tcm_qla2xxx_tpg_, dynamic_sessions);
 CONFIGFS_ATTR(tcm_qla2xxx_tpg_, fabric_prot_type);
 
index 9d5068248aa0486f147bbbc90f1f2ac495ad0378..0a4ea809a61b0cddb37fd6fc2b72e6047a343bf4 100644 (file)
@@ -23,6 +23,7 @@ config MTK_PMIC_WRAP
 config MTK_SCPSYS
        bool "MediaTek SCPSYS Support"
        depends on ARCH_MEDIATEK || COMPILE_TEST
+       default ARM64 && ARCH_MEDIATEK
        select REGMAP
        select MTK_INFRACFG
        select PM_GENERIC_DOMAINS if PM
index f3a0b6a4b54ef8093f2dbbabbcdd7c07de1cddbe..8c03a80b482ddac7c1e22ac4178772f7d29819ff 100644 (file)
@@ -1179,7 +1179,7 @@ static int knav_queue_setup_link_ram(struct knav_device *kdev)
 
                block++;
                if (!block->size)
-                       return 0;
+                       continue;
 
                dev_dbg(kdev->dev, "linkram1: phys:%x, virt:%p, size:%x\n",
                        block->phys, block->virt, block->size);
@@ -1519,9 +1519,9 @@ static int knav_queue_load_pdsp(struct knav_device *kdev,
 
        for (i = 0; i < ARRAY_SIZE(knav_acc_firmwares); i++) {
                if (knav_acc_firmwares[i]) {
-                       ret = request_firmware(&fw,
-                                              knav_acc_firmwares[i],
-                                              kdev->dev);
+                       ret = request_firmware_direct(&fw,
+                                                     knav_acc_firmwares[i],
+                                                     kdev->dev);
                        if (!ret) {
                                found = true;
                                break;
index 342a07c58d89400643b26236875d6ffa6a91062e..72204fbf2bb13be5cdb7211ca6001b58f0c4fbc6 100644 (file)
@@ -4074,6 +4074,17 @@ reject:
        return iscsit_add_reject(conn, ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
 }
 
+static bool iscsi_target_check_conn_state(struct iscsi_conn *conn)
+{
+       bool ret;
+
+       spin_lock_bh(&conn->state_lock);
+       ret = (conn->conn_state != TARG_CONN_STATE_LOGGED_IN);
+       spin_unlock_bh(&conn->state_lock);
+
+       return ret;
+}
+
 int iscsi_target_rx_thread(void *arg)
 {
        int ret, rc;
@@ -4091,7 +4102,7 @@ int iscsi_target_rx_thread(void *arg)
         * incoming iscsi/tcp socket I/O, and/or failing the connection.
         */
        rc = wait_for_completion_interruptible(&conn->rx_login_comp);
-       if (rc < 0)
+       if (rc < 0 || iscsi_target_check_conn_state(conn))
                return 0;
 
        if (conn->conn_transport->transport_type == ISCSI_INFINIBAND) {
index 5c964c09c89ff25e6076b272d4afff1a0466a372..9fc9117d0f226a9e3f559d73697de025fc30fd72 100644 (file)
@@ -388,6 +388,7 @@ err:
        if (login->login_complete) {
                if (conn->rx_thread && conn->rx_thread_active) {
                        send_sig(SIGINT, conn->rx_thread, 1);
+                       complete(&conn->rx_login_comp);
                        kthread_stop(conn->rx_thread);
                }
                if (conn->tx_thread && conn->tx_thread_active) {
index 51d1734d5390409e2c98a34c4ad9fc787c1fc362..2cbea2af7cd032512572a07275f713aef366475b 100644 (file)
@@ -208,7 +208,7 @@ int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
        if (!pl) {
                pr_err("Unable to allocate memory for"
                                " struct iscsi_param_list.\n");
-               return -;
+               return -ENOMEM;
        }
        INIT_LIST_HEAD(&pl->param_list);
        INIT_LIST_HEAD(&pl->extra_response_list);
@@ -578,7 +578,7 @@ int iscsi_copy_param_list(
        param_list = kzalloc(sizeof(struct iscsi_param_list), GFP_KERNEL);
        if (!param_list) {
                pr_err("Unable to allocate memory for struct iscsi_param_list.\n");
-               return -1;
+               return -ENOMEM;
        }
        INIT_LIST_HEAD(&param_list->param_list);
        INIT_LIST_HEAD(&param_list->extra_response_list);
@@ -629,7 +629,7 @@ int iscsi_copy_param_list(
 
 err_out:
        iscsi_release_param_list(param_list);
-       return -1;
+       return -ENOMEM;
 }
 
 static void iscsi_release_extra_responses(struct iscsi_param_list *param_list)
@@ -729,7 +729,7 @@ static int iscsi_add_notunderstood_response(
        if (!extra_response) {
                pr_err("Unable to allocate memory for"
                        " struct iscsi_extra_response.\n");
-               return -1;
+               return -ENOMEM;
        }
        INIT_LIST_HEAD(&extra_response->er_list);
 
@@ -1370,7 +1370,7 @@ int iscsi_decode_text_input(
        tmpbuf = kzalloc(length + 1, GFP_KERNEL);
        if (!tmpbuf) {
                pr_err("Unable to allocate %u + 1 bytes for tmpbuf.\n", length);
-               return -1;
+               return -ENOMEM;
        }
 
        memcpy(tmpbuf, textbuf, length);
index 0b4b2a67d9f9ed597479f1f2c0ea356126f55006..98698d87574262226bcf893da2cb3d3849e6df32 100644 (file)
@@ -371,7 +371,8 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char *flags, struct sbc_ops *o
        return 0;
 }
 
-static sense_reason_t xdreadwrite_callback(struct se_cmd *cmd, bool success)
+static sense_reason_t xdreadwrite_callback(struct se_cmd *cmd, bool success,
+                                          int *post_ret)
 {
        unsigned char *buf, *addr;
        struct scatterlist *sg;
@@ -437,7 +438,8 @@ sbc_execute_rw(struct se_cmd *cmd)
                               cmd->data_direction);
 }
 
-static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success)
+static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success,
+                                            int *post_ret)
 {
        struct se_device *dev = cmd->se_dev;
 
@@ -447,8 +449,10 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success)
         * sent to the backend driver.
         */
        spin_lock_irq(&cmd->t_state_lock);
-       if ((cmd->transport_state & CMD_T_SENT) && !cmd->scsi_status)
+       if ((cmd->transport_state & CMD_T_SENT) && !cmd->scsi_status) {
                cmd->se_cmd_flags |= SCF_COMPARE_AND_WRITE_POST;
+               *post_ret = 1;
+       }
        spin_unlock_irq(&cmd->t_state_lock);
 
        /*
@@ -460,7 +464,8 @@ static sense_reason_t compare_and_write_post(struct se_cmd *cmd, bool success)
        return TCM_NO_SENSE;
 }
 
-static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool success)
+static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool success,
+                                                int *post_ret)
 {
        struct se_device *dev = cmd->se_dev;
        struct scatterlist *write_sg = NULL, *sg;
@@ -556,11 +561,11 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd, bool succes
 
                if (block_size < PAGE_SIZE) {
                        sg_set_page(&write_sg[i], m.page, block_size,
-                                   block_size);
+                                   m.piter.sg->offset + block_size);
                } else {
                        sg_miter_next(&m);
                        sg_set_page(&write_sg[i], m.page, block_size,
-                                   0);
+                                   m.piter.sg->offset);
                }
                len -= block_size;
                i++;
index 273c72b2b83dc016b2a317b778a8c391eebcb9c8..81a6b3e07687232df9b2bba5d77c1caf01d6c6e8 100644 (file)
@@ -246,7 +246,7 @@ static ssize_t target_stat_lu_prod_show(struct config_item *item, char *page)
        char str[sizeof(dev->t10_wwn.model)+1];
 
        /* scsiLuProductId */
-       for (i = 0; i < sizeof(dev->t10_wwn.vendor); i++)
+       for (i = 0; i < sizeof(dev->t10_wwn.model); i++)
                str[i] = ISPRINT(dev->t10_wwn.model[i]) ?
                        dev->t10_wwn.model[i] : ' ';
        str[i] = '\0';
index 5b2820312310ec21bf83824efa318caab132e046..28fb3016370faf1048bd361c1b98d2c3855483c8 100644 (file)
@@ -130,6 +130,9 @@ void core_tmr_abort_task(
                if (tmr->ref_task_tag != ref_tag)
                        continue;
 
+               if (!kref_get_unless_zero(&se_cmd->cmd_kref))
+                       continue;
+
                printk("ABORT_TASK: Found referenced %s task_tag: %llu\n",
                        se_cmd->se_tfo->get_fabric_name(), ref_tag);
 
@@ -139,13 +142,15 @@ void core_tmr_abort_task(
                               " skipping\n", ref_tag);
                        spin_unlock(&se_cmd->t_state_lock);
                        spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
+
+                       target_put_sess_cmd(se_cmd);
+
                        goto out;
                }
                se_cmd->transport_state |= CMD_T_ABORTED;
                spin_unlock(&se_cmd->t_state_lock);
 
                list_del_init(&se_cmd->se_cmd_list);
-               kref_get(&se_cmd->cmd_kref);
                spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
 
                cancel_work_sync(&se_cmd->work);
index 5bacc7b5ed6d85cf54d6d8fe445dcac08ee8081b..4fdcee2006d1698f4b4e8689c7976ea161a34685 100644 (file)
@@ -1658,7 +1658,7 @@ bool target_stop_cmd(struct se_cmd *cmd, unsigned long *flags)
 void transport_generic_request_failure(struct se_cmd *cmd,
                sense_reason_t sense_reason)
 {
-       int ret = 0;
+       int ret = 0, post_ret = 0;
 
        pr_debug("-----[ Storage Engine Exception for cmd: %p ITT: 0x%08llx"
                " CDB: 0x%02x\n", cmd, cmd->tag, cmd->t_task_cdb[0]);
@@ -1680,7 +1680,7 @@ void transport_generic_request_failure(struct se_cmd *cmd,
         */
        if ((cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE) &&
             cmd->transport_complete_callback)
-               cmd->transport_complete_callback(cmd, false);
+               cmd->transport_complete_callback(cmd, false, &post_ret);
 
        switch (sense_reason) {
        case TCM_NON_EXISTENT_LUN:
@@ -2068,11 +2068,13 @@ static void target_complete_ok_work(struct work_struct *work)
         */
        if (cmd->transport_complete_callback) {
                sense_reason_t rc;
+               bool caw = (cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE);
+               bool zero_dl = !(cmd->data_length);
+               int post_ret = 0;
 
-               rc = cmd->transport_complete_callback(cmd, true);
-               if (!rc && !(cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE_POST)) {
-                       if ((cmd->se_cmd_flags & SCF_COMPARE_AND_WRITE) &&
-                           !cmd->data_length)
+               rc = cmd->transport_complete_callback(cmd, true, &post_ret);
+               if (!rc && !post_ret) {
+                       if (caw && zero_dl)
                                goto queue_rsp;
 
                        return;
@@ -2507,23 +2509,24 @@ out:
 EXPORT_SYMBOL(target_get_sess_cmd);
 
 static void target_release_cmd_kref(struct kref *kref)
-               __releases(&se_cmd->se_sess->sess_cmd_lock)
 {
        struct se_cmd *se_cmd = container_of(kref, struct se_cmd, cmd_kref);
        struct se_session *se_sess = se_cmd->se_sess;
+       unsigned long flags;
 
+       spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
        if (list_empty(&se_cmd->se_cmd_list)) {
-               spin_unlock(&se_sess->sess_cmd_lock);
+               spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
                se_cmd->se_tfo->release_cmd(se_cmd);
                return;
        }
        if (se_sess->sess_tearing_down && se_cmd->cmd_wait_set) {
-               spin_unlock(&se_sess->sess_cmd_lock);
+               spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
                complete(&se_cmd->cmd_wait_comp);
                return;
        }
        list_del(&se_cmd->se_cmd_list);
-       spin_unlock(&se_sess->sess_cmd_lock);
+       spin_unlock_irqrestore(&se_sess->sess_cmd_lock, flags);
 
        se_cmd->se_tfo->release_cmd(se_cmd);
 }
@@ -2539,8 +2542,7 @@ int target_put_sess_cmd(struct se_cmd *se_cmd)
                se_cmd->se_tfo->release_cmd(se_cmd);
                return 1;
        }
-       return kref_put_spinlock_irqsave(&se_cmd->cmd_kref, target_release_cmd_kref,
-                       &se_sess->sess_cmd_lock);
+       return kref_put(&se_cmd->cmd_kref, target_release_cmd_kref);
 }
 EXPORT_SYMBOL(target_put_sess_cmd);
 
index 937cebf7663324b53a7fa773f519403a3953b87d..5e6d6cb348fc1c902ea74079357430d5dfb0d44a 100644 (file)
@@ -638,7 +638,7 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data)
        if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags))
                return 0;
 
-       if (!time_after(cmd->deadline, jiffies))
+       if (!time_after(jiffies, cmd->deadline))
                return 0;
 
        set_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags);
@@ -1101,8 +1101,6 @@ tcmu_parse_cdb(struct se_cmd *cmd)
 
 static const struct target_backend_ops tcmu_ops = {
        .name                   = "user",
-       .inquiry_prod           = "USER",
-       .inquiry_rev            = TCMU_VERSION,
        .owner                  = THIS_MODULE,
        .transport_flags        = TRANSPORT_FLAG_PASSTHROUGH,
        .attach_hba             = tcmu_attach_hba,
index c463c89b90efd89c9cf1a29b8472b25e41bf6c17..8cc4ac64a91c36347b9307addb88ae99d545d2b7 100644 (file)
@@ -382,7 +382,7 @@ endmenu
 
 config QCOM_SPMI_TEMP_ALARM
        tristate "Qualcomm SPMI PMIC Temperature Alarm"
-       depends on OF && (SPMI || COMPILE_TEST) && IIO
+       depends on OF && SPMI && IIO
        select REGMAP_SPMI
        help
          This enables a thermal sysfs driver for Qualcomm plug-and-play (QPNP)
index c8fe3cac2e0e04d8196694f264b6d9f4fcd5cc5d..c5547bd711dbe2b4d681e54213e25e992afb51af 100644 (file)
@@ -55,6 +55,7 @@
 #define TEMPSENSE2_PANIC_VALUE_SHIFT   16
 #define TEMPSENSE2_PANIC_VALUE_MASK    0xfff0000
 
+#define OCOTP_MEM0                     0x0480
 #define OCOTP_ANA1                     0x04e0
 
 /* The driver supports 1 passive trip point and 1 critical trip point */
@@ -64,12 +65,6 @@ enum imx_thermal_trip {
        IMX_TRIP_NUM,
 };
 
-/*
- * It defines the temperature in millicelsius for passive trip point
- * that will trigger cooling action when crossed.
- */
-#define IMX_TEMP_PASSIVE               85000
-
 #define IMX_POLLING_DELAY              2000 /* millisecond */
 #define IMX_PASSIVE_DELAY              1000
 
@@ -100,12 +95,14 @@ struct imx_thermal_data {
        u32 c1, c2; /* See formula in imx_get_sensor_data() */
        int temp_passive;
        int temp_critical;
+       int temp_max;
        int alarm_temp;
        int last_temp;
        bool irq_enabled;
        int irq;
        struct clk *thermal_clk;
        const struct thermal_soc_data *socdata;
+       const char *temp_grade;
 };
 
 static void imx_set_panic_temp(struct imx_thermal_data *data,
@@ -285,10 +282,12 @@ static int imx_set_trip_temp(struct thermal_zone_device *tz, int trip,
 {
        struct imx_thermal_data *data = tz->devdata;
 
+       /* do not allow changing critical threshold */
        if (trip == IMX_TRIP_CRITICAL)
                return -EPERM;
 
-       if (temp < 0 || temp > IMX_TEMP_PASSIVE)
+       /* do not allow passive to be set higher than critical */
+       if (temp < 0 || temp > data->temp_critical)
                return -EINVAL;
 
        data->temp_passive = temp;
@@ -404,17 +403,39 @@ static int imx_get_sensor_data(struct platform_device *pdev)
        data->c1 = temp64;
        data->c2 = n1 * data->c1 + 1000 * t1;
 
-       /*
-        * Set the default passive cooling trip point,
-        * can be changed from userspace.
-        */
-       data->temp_passive = IMX_TEMP_PASSIVE;
+       /* use OTP for thermal grade */
+       ret = regmap_read(map, OCOTP_MEM0, &val);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to read temp grade: %d\n", ret);
+               return ret;
+       }
+
+       /* The maximum die temp is specified by the Temperature Grade */
+       switch ((val >> 6) & 0x3) {
+       case 0: /* Commercial (0 to 95C) */
+               data->temp_grade = "Commercial";
+               data->temp_max = 95000;
+               break;
+       case 1: /* Extended Commercial (-20 to 105C) */
+               data->temp_grade = "Extended Commercial";
+               data->temp_max = 105000;
+               break;
+       case 2: /* Industrial (-40 to 105C) */
+               data->temp_grade = "Industrial";
+               data->temp_max = 105000;
+               break;
+       case 3: /* Automotive (-40 to 125C) */
+               data->temp_grade = "Automotive";
+               data->temp_max = 125000;
+               break;
+       }
 
        /*
-        * The maximum die temperature set to 20 C higher than
-        * IMX_TEMP_PASSIVE.
+        * Set the critical trip point at 5C under max
+        * Set the passive trip point at 10C under max (can change via sysfs)
         */
-       data->temp_critical = 1000 * 20 + data->temp_passive;
+       data->temp_critical = data->temp_max - (1000 * 5);
+       data->temp_passive = data->temp_max - (1000 * 10);
 
        return 0;
 }
@@ -551,6 +572,11 @@ static int imx_thermal_probe(struct platform_device *pdev)
                return ret;
        }
 
+       dev_info(&pdev->dev, "%s CPU temperature grade - max:%dC"
+                " critical:%dC passive:%dC\n", data->temp_grade,
+                data->temp_max / 1000, data->temp_critical / 1000,
+                data->temp_passive / 1000);
+
        /* Enable measurements at ~ 10 Hz */
        regmap_write(map, TEMPSENSE1 + REG_CLR, TEMPSENSE1_MEASURE_FREQ);
        measure_freq = DIV_ROUND_UP(32768, 10); /* 10 Hz */
index 42b7d4253b9446511150c6b599ac548f82e04f1a..be4eedcb839ac22158fe180c2abc37df712d9511 100644 (file)
@@ -964,7 +964,7 @@ void of_thermal_destroy_zones(void)
 
        np = of_find_node_by_name(NULL, "thermal-zones");
        if (!np) {
-               pr_err("unable to find thermal zones\n");
+               pr_debug("unable to find thermal zones\n");
                return;
        }
 
index f0fbea386869a66d9ab60fdcc7f74d7e0179b095..1246aa6fcab0caeda03ace6806c4df2d46c1f164 100644 (file)
@@ -174,7 +174,6 @@ static void estimate_pid_constants(struct thermal_zone_device *tz,
 /**
  * pid_controller() - PID controller
  * @tz:        thermal zone we are operating in
- * @current_temp:      the current temperature in millicelsius
  * @control_temp:      the target temperature in millicelsius
  * @max_allocatable_power:     maximum allocatable power for this thermal zone
  *
@@ -191,7 +190,6 @@ static void estimate_pid_constants(struct thermal_zone_device *tz,
  * Return: The power budget for the next period.
  */
 static u32 pid_controller(struct thermal_zone_device *tz,
-                         int current_temp,
                          int control_temp,
                          u32 max_allocatable_power)
 {
@@ -211,7 +209,7 @@ static u32 pid_controller(struct thermal_zone_device *tz,
                                       true);
        }
 
-       err = control_temp - current_temp;
+       err = control_temp - tz->temperature;
        err = int_to_frac(err);
 
        /* Calculate the proportional term */
@@ -332,7 +330,6 @@ static void divvy_up_power(u32 *req_power, u32 *max_power, int num_actors,
 }
 
 static int allocate_power(struct thermal_zone_device *tz,
-                         int current_temp,
                          int control_temp)
 {
        struct thermal_instance *instance;
@@ -418,8 +415,7 @@ static int allocate_power(struct thermal_zone_device *tz,
                i++;
        }
 
-       power_range = pid_controller(tz, current_temp, control_temp,
-                                    max_allocatable_power);
+       power_range = pid_controller(tz, control_temp, max_allocatable_power);
 
        divvy_up_power(weighted_req_power, max_power, num_actors,
                       total_weighted_req_power, power_range, granted_power,
@@ -444,8 +440,8 @@ static int allocate_power(struct thermal_zone_device *tz,
        trace_thermal_power_allocator(tz, req_power, total_req_power,
                                      granted_power, total_granted_power,
                                      num_actors, power_range,
-                                     max_allocatable_power, current_temp,
-                                     control_temp - current_temp);
+                                     max_allocatable_power, tz->temperature,
+                                     control_temp - tz->temperature);
 
        kfree(req_power);
 unlock:
@@ -612,7 +608,7 @@ static void power_allocator_unbind(struct thermal_zone_device *tz)
 static int power_allocator_throttle(struct thermal_zone_device *tz, int trip)
 {
        int ret;
-       int switch_on_temp, control_temp, current_temp;
+       int switch_on_temp, control_temp;
        struct power_allocator_params *params = tz->governor_data;
 
        /*
@@ -622,15 +618,9 @@ static int power_allocator_throttle(struct thermal_zone_device *tz, int trip)
        if (trip != params->trip_max_desired_temperature)
                return 0;
 
-       ret = thermal_zone_get_temp(tz, &current_temp);
-       if (ret) {
-               dev_warn(&tz->device, "Failed to get temperature: %d\n", ret);
-               return ret;
-       }
-
        ret = tz->ops->get_trip_temp(tz, params->trip_switch_on,
                                     &switch_on_temp);
-       if (!ret && (current_temp < switch_on_temp)) {
+       if (!ret && (tz->temperature < switch_on_temp)) {
                tz->passive = 0;
                reset_pid_controller(params);
                allow_maximum_power(tz);
@@ -648,7 +638,7 @@ static int power_allocator_throttle(struct thermal_zone_device *tz, int trip)
                return ret;
        }
 
-       return allocate_power(tz, current_temp, control_temp);
+       return allocate_power(tz, control_temp);
 }
 
 static struct thermal_governor thermal_gov_power_allocator = {
index 5d4ae7d705e0024528c8d52d56134bd92e280ea1..13d01edc7a043812611719bf7a342260f09ababa 100644 (file)
@@ -361,6 +361,24 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
 /*
  *             platform functions
  */
+static int rcar_thermal_remove(struct platform_device *pdev)
+{
+       struct rcar_thermal_common *common = platform_get_drvdata(pdev);
+       struct device *dev = &pdev->dev;
+       struct rcar_thermal_priv *priv;
+
+       rcar_thermal_for_each_priv(priv, common) {
+               if (rcar_has_irq_support(priv))
+                       rcar_thermal_irq_disable(priv);
+               thermal_zone_device_unregister(priv->zone);
+       }
+
+       pm_runtime_put(dev);
+       pm_runtime_disable(dev);
+
+       return 0;
+}
+
 static int rcar_thermal_probe(struct platform_device *pdev)
 {
        struct rcar_thermal_common *common;
@@ -377,6 +395,8 @@ static int rcar_thermal_probe(struct platform_device *pdev)
        if (!common)
                return -ENOMEM;
 
+       platform_set_drvdata(pdev, common);
+
        INIT_LIST_HEAD(&common->head);
        spin_lock_init(&common->lock);
        common->dev = dev;
@@ -454,43 +474,16 @@ static int rcar_thermal_probe(struct platform_device *pdev)
                rcar_thermal_common_write(common, ENR, enr_bits);
        }
 
-       platform_set_drvdata(pdev, common);
-
        dev_info(dev, "%d sensor probed\n", i);
 
        return 0;
 
 error_unregister:
-       rcar_thermal_for_each_priv(priv, common) {
-               if (rcar_has_irq_support(priv))
-                       rcar_thermal_irq_disable(priv);
-               thermal_zone_device_unregister(priv->zone);
-       }
-
-       pm_runtime_put(dev);
-       pm_runtime_disable(dev);
+       rcar_thermal_remove(pdev);
 
        return ret;
 }
 
-static int rcar_thermal_remove(struct platform_device *pdev)
-{
-       struct rcar_thermal_common *common = platform_get_drvdata(pdev);
-       struct device *dev = &pdev->dev;
-       struct rcar_thermal_priv *priv;
-
-       rcar_thermal_for_each_priv(priv, common) {
-               if (rcar_has_irq_support(priv))
-                       rcar_thermal_irq_disable(priv);
-               thermal_zone_device_unregister(priv->zone);
-       }
-
-       pm_runtime_put(dev);
-       pm_runtime_disable(dev);
-
-       return 0;
-}
-
 static const struct of_device_id rcar_thermal_dt_ids[] = {
        { .compatible = "renesas,rcar-thermal", },
        {},
index 9787e8aa509fc406ab4fe5c8ff46811bac19b2de..e845841ab036cc82033d0a6829058a0f15f2543e 100644 (file)
@@ -1,6 +1,9 @@
 /*
  * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
  *
+ * Copyright (c) 2015, Fuzhou Rockchip Electronics Co., Ltd
+ * Caesar Wang <wxt@rock-chips.com>
+ *
  * 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.
@@ -45,17 +48,50 @@ enum tshut_polarity {
 };
 
 /**
- * The system has three Temperature Sensors.  channel 0 is reserved,
- * channel 1 is for CPU, and channel 2 is for GPU.
+ * The system has two Temperature Sensors.
+ * sensor0 is for CPU, and sensor1 is for GPU.
  */
 enum sensor_id {
-       SENSOR_CPU = 1,
+       SENSOR_CPU = 0,
        SENSOR_GPU,
 };
 
+/**
+* The conversion table has the adc value and temperature.
+* ADC_DECREMENT is the adc value decremnet.(e.g. v2_code_table)
+* ADC_INCREMNET is the adc value incremnet.(e.g. v3_code_table)
+*/
+enum adc_sort_mode {
+       ADC_DECREMENT = 0,
+       ADC_INCREMENT,
+};
+
+/**
+ * The max sensors is two in rockchip SoCs.
+ * Two sensors: CPU and GPU sensor.
+ */
+#define SOC_MAX_SENSORS        2
+
+struct chip_tsadc_table {
+       const struct tsadc_table *id;
+
+       /* the array table size*/
+       unsigned int length;
+
+       /* that analogic mask data */
+       u32 data_mask;
+
+       /* the sort mode is adc value that increment or decrement in table */
+       enum adc_sort_mode mode;
+};
+
 struct rockchip_tsadc_chip {
+       /* The sensor id of chip correspond to the ADC channel */
+       int chn_id[SOC_MAX_SENSORS];
+       int chn_num;
+
        /* The hardware-controlled tshut property */
-       long tshut_temp;
+       int tshut_temp;
        enum tshut_mode tshut_mode;
        enum tshut_polarity tshut_polarity;
 
@@ -65,37 +101,40 @@ struct rockchip_tsadc_chip {
        void (*control)(void __iomem *reg, bool on);
 
        /* Per-sensor methods */
-       int (*get_temp)(int chn, void __iomem *reg, int *temp);
-       void (*set_tshut_temp)(int chn, void __iomem *reg, long temp);
+       int (*get_temp)(struct chip_tsadc_table table,
+                       int chn, void __iomem *reg, int *temp);
+       void (*set_tshut_temp)(struct chip_tsadc_table table,
+                              int chn, void __iomem *reg, int temp);
        void (*set_tshut_mode)(int chn, void __iomem *reg, enum tshut_mode m);
+
+       /* Per-table methods */
+       struct chip_tsadc_table table;
 };
 
 struct rockchip_thermal_sensor {
        struct rockchip_thermal_data *thermal;
        struct thermal_zone_device *tzd;
-       enum sensor_id id;
+       int id;
 };
 
-#define NUM_SENSORS    2 /* Ignore unused sensor 0 */
-
 struct rockchip_thermal_data {
        const struct rockchip_tsadc_chip *chip;
        struct platform_device *pdev;
        struct reset_control *reset;
 
-       struct rockchip_thermal_sensor sensors[NUM_SENSORS];
+       struct rockchip_thermal_sensor sensors[SOC_MAX_SENSORS];
 
        struct clk *clk;
        struct clk *pclk;
 
        void __iomem *regs;
 
-       long tshut_temp;
+       int tshut_temp;
        enum tshut_mode tshut_mode;
        enum tshut_polarity tshut_polarity;
 };
 
-/* TSADC V2 Sensor info define: */
+/* TSADC Sensor info define: */
 #define TSADCV2_AUTO_CON                       0x04
 #define TSADCV2_INT_EN                         0x08
 #define TSADCV2_INT_PD                         0x0c
@@ -117,6 +156,8 @@ struct rockchip_thermal_data {
 #define TSADCV2_INT_PD_CLEAR_MASK              ~BIT(8)
 
 #define TSADCV2_DATA_MASK                      0xfff
+#define TSADCV3_DATA_MASK                      0x3ff
+
 #define TSADCV2_HIGHT_INT_DEBOUNCE_COUNT       4
 #define TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT     4
 #define TSADCV2_AUTO_PERIOD_TIME               250 /* msec */
@@ -124,7 +165,7 @@ struct rockchip_thermal_data {
 
 struct tsadc_table {
        u32 code;
-       long temp;
+       int temp;
 };
 
 static const struct tsadc_table v2_code_table[] = {
@@ -165,21 +206,61 @@ static const struct tsadc_table v2_code_table[] = {
        {3421, 125000},
 };
 
-static u32 rk_tsadcv2_temp_to_code(long temp)
+static const struct tsadc_table v3_code_table[] = {
+       {0, -40000},
+       {106, -40000},
+       {108, -35000},
+       {110, -30000},
+       {112, -25000},
+       {114, -20000},
+       {116, -15000},
+       {118, -10000},
+       {120, -5000},
+       {122, 0},
+       {124, 5000},
+       {126, 10000},
+       {128, 15000},
+       {130, 20000},
+       {132, 25000},
+       {134, 30000},
+       {136, 35000},
+       {138, 40000},
+       {140, 45000},
+       {142, 50000},
+       {144, 55000},
+       {146, 60000},
+       {148, 65000},
+       {150, 70000},
+       {152, 75000},
+       {154, 80000},
+       {156, 85000},
+       {158, 90000},
+       {160, 95000},
+       {162, 100000},
+       {163, 105000},
+       {165, 110000},
+       {167, 115000},
+       {169, 120000},
+       {171, 125000},
+       {TSADCV3_DATA_MASK, 125000},
+};
+
+static u32 rk_tsadcv2_temp_to_code(struct chip_tsadc_table table,
+                                  int temp)
 {
        int high, low, mid;
 
        low = 0;
-       high = ARRAY_SIZE(v2_code_table) - 1;
+       high = table.length - 1;
        mid = (high + low) / 2;
 
-       if (temp < v2_code_table[low].temp || temp > v2_code_table[high].temp)
+       if (temp < table.id[low].temp || temp > table.id[high].temp)
                return 0;
 
        while (low <= high) {
-               if (temp == v2_code_table[mid].temp)
-                       return v2_code_table[mid].code;
-               else if (temp < v2_code_table[mid].temp)
+               if (temp == table.id[mid].temp)
+                       return table.id[mid].code;
+               else if (temp < table.id[mid].temp)
                        high = mid - 1;
                else
                        low = mid + 1;
@@ -189,29 +270,54 @@ static u32 rk_tsadcv2_temp_to_code(long temp)
        return 0;
 }
 
-static int rk_tsadcv2_code_to_temp(u32 code, int *temp)
+static int rk_tsadcv2_code_to_temp(struct chip_tsadc_table table, u32 code,
+                                  int *temp)
 {
        unsigned int low = 1;
-       unsigned int high = ARRAY_SIZE(v2_code_table) - 1;
+       unsigned int high = table.length - 1;
        unsigned int mid = (low + high) / 2;
        unsigned int num;
        unsigned long denom;
 
-       BUILD_BUG_ON(ARRAY_SIZE(v2_code_table) < 2);
-
-       code &= TSADCV2_DATA_MASK;
-       if (code < v2_code_table[high].code)
-               return -EAGAIN;         /* Incorrect reading */
-
-       while (low <= high) {
-               if (code >= v2_code_table[mid].code &&
-                   code < v2_code_table[mid - 1].code)
-                       break;
-               else if (code < v2_code_table[mid].code)
-                       low = mid + 1;
-               else
-                       high = mid - 1;
-               mid = (low + high) / 2;
+       WARN_ON(table.length < 2);
+
+       switch (table.mode) {
+       case ADC_DECREMENT:
+               code &= table.data_mask;
+               if (code < table.id[high].code)
+                       return -EAGAIN;         /* Incorrect reading */
+
+               while (low <= high) {
+                       if (code >= table.id[mid].code &&
+                           code < table.id[mid - 1].code)
+                               break;
+                       else if (code < table.id[mid].code)
+                               low = mid + 1;
+                       else
+                               high = mid - 1;
+
+                       mid = (low + high) / 2;
+               }
+               break;
+       case ADC_INCREMENT:
+               code &= table.data_mask;
+               if (code < table.id[low].code)
+                       return -EAGAIN;         /* Incorrect reading */
+
+               while (low <= high) {
+                       if (code >= table.id[mid - 1].code &&
+                           code < table.id[mid].code)
+                               break;
+                       else if (code > table.id[mid].code)
+                               low = mid + 1;
+                       else
+                               high = mid - 1;
+
+                       mid = (low + high) / 2;
+               }
+               break;
+       default:
+               pr_err("Invalid the conversion table\n");
        }
 
        /*
@@ -220,24 +326,28 @@ static int rk_tsadcv2_code_to_temp(u32 code, int *temp)
         * temperature between 2 table entries is linear and interpolate
         * to produce less granular result.
         */
-       num = v2_code_table[mid].temp - v2_code_table[mid - 1].temp;
-       num *= v2_code_table[mid - 1].code - code;
-       denom = v2_code_table[mid - 1].code - v2_code_table[mid].code;
-       *temp = v2_code_table[mid - 1].temp + (num / denom);
+       num = table.id[mid].temp - v2_code_table[mid - 1].temp;
+       num *= abs(table.id[mid - 1].code - code);
+       denom = abs(table.id[mid - 1].code - table.id[mid].code);
+       *temp = table.id[mid - 1].temp + (num / denom);
 
        return 0;
 }
 
 /**
- * rk_tsadcv2_initialize - initialize TASDC Controller
- * (1) Set TSADCV2_AUTO_PERIOD, configure the interleave between
- * every two accessing of TSADC in normal operation.
- * (2) Set TSADCV2_AUTO_PERIOD_HT, configure the interleave between
- * every two accessing of TSADC after the temperature is higher
- * than COM_SHUT or COM_INT.
- * (3) Set TSADCV2_HIGH_INT_DEBOUNCE and TSADC_HIGHT_TSHUT_DEBOUNCE,
- * if the temperature is higher than COMP_INT or COMP_SHUT for
- * "debounce" times, TSADC controller will generate interrupt or TSHUT.
+ * rk_tsadcv2_initialize - initialize TASDC Controller.
+ *
+ * (1) Set TSADC_V2_AUTO_PERIOD:
+ *     Configure the interleave between every two accessing of
+ *     TSADC in normal operation.
+ *
+ * (2) Set TSADCV2_AUTO_PERIOD_HT:
+ *     Configure the interleave between every two accessing of
+ *     TSADC after the temperature is higher than COM_SHUT or COM_INT.
+ *
+ * (3) Set TSADCV2_HIGH_INT_DEBOUNCE and TSADC_HIGHT_TSHUT_DEBOUNCE:
+ *     If the temperature is higher than COMP_INT or COMP_SHUT for
+ *     "debounce" times, TSADC controller will generate interrupt or TSHUT.
  */
 static void rk_tsadcv2_initialize(void __iomem *regs,
                                  enum tshut_polarity tshut_polarity)
@@ -279,20 +389,22 @@ static void rk_tsadcv2_control(void __iomem *regs, bool enable)
        writel_relaxed(val, regs + TSADCV2_AUTO_CON);
 }
 
-static int rk_tsadcv2_get_temp(int chn, void __iomem *regs, int *temp)
+static int rk_tsadcv2_get_temp(struct chip_tsadc_table table,
+                              int chn, void __iomem *regs, int *temp)
 {
        u32 val;
 
        val = readl_relaxed(regs + TSADCV2_DATA(chn));
 
-       return rk_tsadcv2_code_to_temp(val, temp);
+       return rk_tsadcv2_code_to_temp(table, val, temp);
 }
 
-static void rk_tsadcv2_tshut_temp(int chn, void __iomem *regs, long temp)
+static void rk_tsadcv2_tshut_temp(struct chip_tsadc_table table,
+                                 int chn, void __iomem *regs, int temp)
 {
        u32 tshut_value, val;
 
-       tshut_value = rk_tsadcv2_temp_to_code(temp);
+       tshut_value = rk_tsadcv2_temp_to_code(table, temp);
        writel_relaxed(tshut_value, regs + TSADCV2_COMP_SHUT(chn));
 
        /* TSHUT will be valid */
@@ -318,6 +430,10 @@ static void rk_tsadcv2_tshut_mode(int chn, void __iomem *regs,
 }
 
 static const struct rockchip_tsadc_chip rk3288_tsadc_data = {
+       .chn_id[SENSOR_CPU] = 1, /* cpu sensor is channel 1 */
+       .chn_id[SENSOR_GPU] = 2, /* gpu sensor is channel 2 */
+       .chn_num = 2, /* two channels for tsadc */
+
        .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give PMIC */
        .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */
        .tshut_temp = 95000,
@@ -328,6 +444,37 @@ static const struct rockchip_tsadc_chip rk3288_tsadc_data = {
        .get_temp = rk_tsadcv2_get_temp,
        .set_tshut_temp = rk_tsadcv2_tshut_temp,
        .set_tshut_mode = rk_tsadcv2_tshut_mode,
+
+       .table = {
+               .id = v2_code_table,
+               .length = ARRAY_SIZE(v2_code_table),
+               .data_mask = TSADCV2_DATA_MASK,
+               .mode = ADC_DECREMENT,
+       },
+};
+
+static const struct rockchip_tsadc_chip rk3368_tsadc_data = {
+       .chn_id[SENSOR_CPU] = 0, /* cpu sensor is channel 0 */
+       .chn_id[SENSOR_GPU] = 1, /* gpu sensor is channel 1 */
+       .chn_num = 2, /* two channels for tsadc */
+
+       .tshut_mode = TSHUT_MODE_GPIO, /* default TSHUT via GPIO give PMIC */
+       .tshut_polarity = TSHUT_LOW_ACTIVE, /* default TSHUT LOW ACTIVE */
+       .tshut_temp = 95000,
+
+       .initialize = rk_tsadcv2_initialize,
+       .irq_ack = rk_tsadcv2_irq_ack,
+       .control = rk_tsadcv2_control,
+       .get_temp = rk_tsadcv2_get_temp,
+       .set_tshut_temp = rk_tsadcv2_tshut_temp,
+       .set_tshut_mode = rk_tsadcv2_tshut_mode,
+
+       .table = {
+               .id = v3_code_table,
+               .length = ARRAY_SIZE(v3_code_table),
+               .data_mask = TSADCV3_DATA_MASK,
+               .mode = ADC_INCREMENT,
+       },
 };
 
 static const struct of_device_id of_rockchip_thermal_match[] = {
@@ -335,6 +482,10 @@ static const struct of_device_id of_rockchip_thermal_match[] = {
                .compatible = "rockchip,rk3288-tsadc",
                .data = (void *)&rk3288_tsadc_data,
        },
+       {
+               .compatible = "rockchip,rk3368-tsadc",
+               .data = (void *)&rk3368_tsadc_data,
+       },
        { /* end */ },
 };
 MODULE_DEVICE_TABLE(of, of_rockchip_thermal_match);
@@ -357,7 +508,7 @@ static irqreturn_t rockchip_thermal_alarm_irq_thread(int irq, void *dev)
 
        thermal->chip->irq_ack(thermal->regs);
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
+       for (i = 0; i < thermal->chip->chn_num; i++)
                thermal_zone_device_update(thermal->sensors[i].tzd);
 
        return IRQ_HANDLED;
@@ -370,7 +521,8 @@ static int rockchip_thermal_get_temp(void *_sensor, int *out_temp)
        const struct rockchip_tsadc_chip *tsadc = sensor->thermal->chip;
        int retval;
 
-       retval = tsadc->get_temp(sensor->id, thermal->regs, out_temp);
+       retval = tsadc->get_temp(tsadc->table,
+                                sensor->id, thermal->regs, out_temp);
        dev_dbg(&thermal->pdev->dev, "sensor %d - temp: %d, retval: %d\n",
                sensor->id, *out_temp, retval);
 
@@ -389,7 +541,7 @@ static int rockchip_configure_from_dt(struct device *dev,
 
        if (of_property_read_u32(np, "rockchip,hw-tshut-temp", &shut_temp)) {
                dev_warn(dev,
-                        "Missing tshut temp property, using default %ld\n",
+                        "Missing tshut temp property, using default %d\n",
                         thermal->chip->tshut_temp);
                thermal->tshut_temp = thermal->chip->tshut_temp;
        } else {
@@ -397,7 +549,7 @@ static int rockchip_configure_from_dt(struct device *dev,
        }
 
        if (thermal->tshut_temp > INT_MAX) {
-               dev_err(dev, "Invalid tshut temperature specified: %ld\n",
+               dev_err(dev, "Invalid tshut temperature specified: %d\n",
                        thermal->tshut_temp);
                return -ERANGE;
        }
@@ -442,13 +594,14 @@ static int
 rockchip_thermal_register_sensor(struct platform_device *pdev,
                                 struct rockchip_thermal_data *thermal,
                                 struct rockchip_thermal_sensor *sensor,
-                                enum sensor_id id)
+                                int id)
 {
        const struct rockchip_tsadc_chip *tsadc = thermal->chip;
        int error;
 
        tsadc->set_tshut_mode(id, thermal->regs, thermal->tshut_mode);
-       tsadc->set_tshut_temp(id, thermal->regs, thermal->tshut_temp);
+       tsadc->set_tshut_temp(tsadc->table, id, thermal->regs,
+                             thermal->tshut_temp);
 
        sensor->thermal = thermal;
        sensor->id = id;
@@ -481,7 +634,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
        const struct of_device_id *match;
        struct resource *res;
        int irq;
-       int i;
+       int i, j;
        int error;
 
        match = of_match_node(of_rockchip_thermal_match, np);
@@ -556,22 +709,19 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
 
        thermal->chip->initialize(thermal->regs, thermal->tshut_polarity);
 
-       error = rockchip_thermal_register_sensor(pdev, thermal,
-                                                &thermal->sensors[0],
-                                                SENSOR_CPU);
-       if (error) {
-               dev_err(&pdev->dev,
-                       "failed to register CPU thermal sensor: %d\n", error);
-               goto err_disable_pclk;
-       }
-
-       error = rockchip_thermal_register_sensor(pdev, thermal,
-                                                &thermal->sensors[1],
-                                                SENSOR_GPU);
-       if (error) {
-               dev_err(&pdev->dev,
-                       "failed to register GPU thermal sensor: %d\n", error);
-               goto err_unregister_cpu_sensor;
+       for (i = 0; i < thermal->chip->chn_num; i++) {
+               error = rockchip_thermal_register_sensor(pdev, thermal,
+                                               &thermal->sensors[i],
+                                               thermal->chip->chn_id[i]);
+               if (error) {
+                       dev_err(&pdev->dev,
+                               "failed to register sensor[%d] : error = %d\n",
+                               i, error);
+                       for (j = 0; j < i; j++)
+                               thermal_zone_of_sensor_unregister(&pdev->dev,
+                                               thermal->sensors[j].tzd);
+                       goto err_disable_pclk;
+               }
        }
 
        error = devm_request_threaded_irq(&pdev->dev, irq, NULL,
@@ -581,22 +731,23 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
        if (error) {
                dev_err(&pdev->dev,
                        "failed to request tsadc irq: %d\n", error);
-               goto err_unregister_gpu_sensor;
+               goto err_unregister_sensor;
        }
 
        thermal->chip->control(thermal->regs, true);
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
+       for (i = 0; i < thermal->chip->chn_num; i++)
                rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
 
        platform_set_drvdata(pdev, thermal);
 
        return 0;
 
-err_unregister_gpu_sensor:
-       thermal_zone_of_sensor_unregister(&pdev->dev, thermal->sensors[1].tzd);
-err_unregister_cpu_sensor:
-       thermal_zone_of_sensor_unregister(&pdev->dev, thermal->sensors[0].tzd);
+err_unregister_sensor:
+       while (i--)
+               thermal_zone_of_sensor_unregister(&pdev->dev,
+                                                 thermal->sensors[i].tzd);
+
 err_disable_pclk:
        clk_disable_unprepare(thermal->pclk);
 err_disable_clk:
@@ -610,7 +761,7 @@ static int rockchip_thermal_remove(struct platform_device *pdev)
        struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev);
        int i;
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++) {
+       for (i = 0; i < thermal->chip->chn_num; i++) {
                struct rockchip_thermal_sensor *sensor = &thermal->sensors[i];
 
                rockchip_thermal_toggle_sensor(sensor, false);
@@ -631,7 +782,7 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
        struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev);
        int i;
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
+       for (i = 0; i < thermal->chip->chn_num; i++)
                rockchip_thermal_toggle_sensor(&thermal->sensors[i], false);
 
        thermal->chip->control(thermal->regs, false);
@@ -663,18 +814,19 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
 
        thermal->chip->initialize(thermal->regs, thermal->tshut_polarity);
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++) {
-               enum sensor_id id = thermal->sensors[i].id;
+       for (i = 0; i < thermal->chip->chn_num; i++) {
+               int id = thermal->sensors[i].id;
 
                thermal->chip->set_tshut_mode(id, thermal->regs,
                                              thermal->tshut_mode);
-               thermal->chip->set_tshut_temp(id, thermal->regs,
+               thermal->chip->set_tshut_temp(thermal->chip->table,
+                                             id, thermal->regs,
                                              thermal->tshut_temp);
        }
 
        thermal->chip->control(thermal->regs, true);
 
-       for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
+       for (i = 0; i < thermal->chip->chn_num; i++)
                rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
 
        pinctrl_pm_select_default_state(dev);
index 7a8a6c6952e92b7fd2b659e1e2e0f4cbd2c39919..1c427beffadd97b3e95522fc9236193006d58fcc 100644 (file)
@@ -446,7 +446,7 @@ config MAX63XX_WATCHDOG
 
 config IMX2_WDT
        tristate "IMX2+ Watchdog"
-       depends on ARCH_MXC
+       depends on ARCH_MXC || ARCH_LAYERSCAPE
        select REGMAP_MMIO
        select WATCHDOG_CORE
        help
index 6ad9df948711080ca3c87464d0195bdd3c0d9feb..b751f43d76ed5c9d8e168389a1238b9218bee46f 100644 (file)
@@ -123,6 +123,7 @@ static int mtk_wdt_stop(struct watchdog_device *wdt_dev)
 
        reg = readl(wdt_base + WDT_MODE);
        reg &= ~WDT_MODE_EN;
+       reg |= WDT_MODE_KEY;
        iowrite32(reg, wdt_base + WDT_MODE);
 
        return 0;
index d96bee017fd3caa2fbcde961cc3ba9941b34c341..6f17c935a6cf86b1fcb47856532a8d6374bd0d82 100644 (file)
@@ -205,7 +205,7 @@ static int omap_wdt_set_timeout(struct watchdog_device *wdog,
 
 static unsigned int omap_wdt_get_timeleft(struct watchdog_device *wdog)
 {
-       struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
+       struct omap_wdt_dev *wdev = to_omap_wdt_dev(wdog);
        void __iomem *base = wdev->base;
        u32 value;
 
index 4224b3ec83a5515dc76a57507ec81122dd9316e1..313cd1c6fda0efcfa03897f1d23fc18b138e3779 100644 (file)
@@ -80,7 +80,7 @@ static unsigned int heartbeat = DEFAULT_HEARTBEAT;
 
 static DEFINE_SPINLOCK(io_lock);
 static void __iomem    *wdt_base;
-struct clk             *wdt_clk;
+static struct clk      *wdt_clk;
 
 static int pnx4008_wdt_start(struct watchdog_device *wdd)
 {
@@ -161,7 +161,7 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
        if (IS_ERR(wdt_clk))
                return PTR_ERR(wdt_clk);
 
-       ret = clk_enable(wdt_clk);
+       ret = clk_prepare_enable(wdt_clk);
        if (ret)
                return ret;
 
@@ -184,7 +184,7 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
        return 0;
 
 disable_clk:
-       clk_disable(wdt_clk);
+       clk_disable_unprepare(wdt_clk);
        return ret;
 }
 
@@ -192,7 +192,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
 {
        watchdog_unregister_device(&pnx4008_wdd);
 
-       clk_disable(wdt_clk);
+       clk_disable_unprepare(wdt_clk);
 
        return 0;
 }
index 7f97cdd53f29624f6c732b0e44c0448a856c8a5c..9ec57608da82931e6f2a913246825ff9be11e034 100644 (file)
@@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
 {
        wdd->timeout = timeout;
 
-       if (watchdog_active(wdd))
+       if (watchdog_active(wdd)) {
+               tegra_wdt_stop(wdd);
                return tegra_wdt_start(wdd);
+       }
 
        return 0;
 }
index 91bf55a2002497eca6de68258515484ba9f13efa..20e2bba10400910cfbd86a68d3d6f988b9d77dec 100644 (file)
@@ -224,7 +224,7 @@ static int wdt_keepalive(void)
 
 static int wdt_set_timeout(int t)
 {
-       int tmrval;
+       unsigned int tmrval;
 
        /*
         * Convert seconds to watchdog counter time units, rounding up.
index 849500e4e14d14af7dd29fe7737d77d62f87a36d..524c22146429d7c87acc8682976031c2f8a727d6 100644 (file)
@@ -39,6 +39,7 @@
 #include <asm/irq.h>
 #include <asm/idle.h>
 #include <asm/io_apic.h>
+#include <asm/i8259.h>
 #include <asm/xen/pci.h>
 #endif
 #include <asm/sync_bitops.h>
@@ -420,7 +421,7 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi)
                return xen_allocate_irq_dynamic();
 
        /* Legacy IRQ descriptors are already allocated by the arch. */
-       if (gsi < NR_IRQS_LEGACY)
+       if (gsi < nr_legacy_irqs())
                irq = gsi;
        else
                irq = irq_alloc_desc_at(gsi, -1);
@@ -446,7 +447,7 @@ static void xen_free_irq(unsigned irq)
        kfree(info);
 
        /* Legacy IRQ descriptors are managed by the arch. */
-       if (irq < NR_IRQS_LEGACY)
+       if (irq < nr_legacy_irqs())
                return;
 
        irq_free_desc(irq);
index 00f40f051d95668b01ebf6b4c17e6f0e90912198..38272ad245516c272ab571bed1a5c962f4a0e808 100644 (file)
@@ -49,6 +49,8 @@
 #include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/cpu.h>
+#include <linux/mm.h>
+#include <linux/vmalloc.h>
 
 #include <xen/xen.h>
 #include <xen/events.h>
 struct per_user_data {
        struct mutex bind_mutex; /* serialize bind/unbind operations */
        struct rb_root evtchns;
+       unsigned int nr_evtchns;
 
        /* Notification ring, accessed via /dev/xen/evtchn. */
-#define EVTCHN_RING_SIZE     (PAGE_SIZE / sizeof(evtchn_port_t))
-#define EVTCHN_RING_MASK(_i) ((_i)&(EVTCHN_RING_SIZE-1))
+       unsigned int ring_size;
        evtchn_port_t *ring;
        unsigned int ring_cons, ring_prod, ring_overflow;
        struct mutex ring_cons_mutex; /* protect against concurrent readers */
@@ -80,10 +82,41 @@ struct user_evtchn {
        bool enabled;
 };
 
+static evtchn_port_t *evtchn_alloc_ring(unsigned int size)
+{
+       evtchn_port_t *ring;
+       size_t s = size * sizeof(*ring);
+
+       ring = kmalloc(s, GFP_KERNEL);
+       if (!ring)
+               ring = vmalloc(s);
+
+       return ring;
+}
+
+static void evtchn_free_ring(evtchn_port_t *ring)
+{
+       kvfree(ring);
+}
+
+static unsigned int evtchn_ring_offset(struct per_user_data *u,
+                                      unsigned int idx)
+{
+       return idx & (u->ring_size - 1);
+}
+
+static evtchn_port_t *evtchn_ring_entry(struct per_user_data *u,
+                                       unsigned int idx)
+{
+       return u->ring + evtchn_ring_offset(u, idx);
+}
+
 static int add_evtchn(struct per_user_data *u, struct user_evtchn *evtchn)
 {
        struct rb_node **new = &(u->evtchns.rb_node), *parent = NULL;
 
+       u->nr_evtchns++;
+
        while (*new) {
                struct user_evtchn *this;
 
@@ -107,6 +140,7 @@ static int add_evtchn(struct per_user_data *u, struct user_evtchn *evtchn)
 
 static void del_evtchn(struct per_user_data *u, struct user_evtchn *evtchn)
 {
+       u->nr_evtchns--;
        rb_erase(&evtchn->node, &u->evtchns);
        kfree(evtchn);
 }
@@ -144,8 +178,8 @@ static irqreturn_t evtchn_interrupt(int irq, void *data)
 
        spin_lock(&u->ring_prod_lock);
 
-       if ((u->ring_prod - u->ring_cons) < EVTCHN_RING_SIZE) {
-               u->ring[EVTCHN_RING_MASK(u->ring_prod)] = evtchn->port;
+       if ((u->ring_prod - u->ring_cons) < u->ring_size) {
+               *evtchn_ring_entry(u, u->ring_prod) = evtchn->port;
                wmb(); /* Ensure ring contents visible */
                if (u->ring_cons == u->ring_prod++) {
                        wake_up_interruptible(&u->evtchn_wait);
@@ -200,10 +234,10 @@ static ssize_t evtchn_read(struct file *file, char __user *buf,
        }
 
        /* Byte lengths of two chunks. Chunk split (if any) is at ring wrap. */
-       if (((c ^ p) & EVTCHN_RING_SIZE) != 0) {
-               bytes1 = (EVTCHN_RING_SIZE - EVTCHN_RING_MASK(c)) *
+       if (((c ^ p) & u->ring_size) != 0) {
+               bytes1 = (u->ring_size - evtchn_ring_offset(u, c)) *
                        sizeof(evtchn_port_t);
-               bytes2 = EVTCHN_RING_MASK(p) * sizeof(evtchn_port_t);
+               bytes2 = evtchn_ring_offset(u, p) * sizeof(evtchn_port_t);
        } else {
                bytes1 = (p - c) * sizeof(evtchn_port_t);
                bytes2 = 0;
@@ -219,7 +253,7 @@ static ssize_t evtchn_read(struct file *file, char __user *buf,
 
        rc = -EFAULT;
        rmb(); /* Ensure that we see the port before we copy it. */
-       if (copy_to_user(buf, &u->ring[EVTCHN_RING_MASK(c)], bytes1) ||
+       if (copy_to_user(buf, evtchn_ring_entry(u, c), bytes1) ||
            ((bytes2 != 0) &&
             copy_to_user(&buf[bytes1], &u->ring[0], bytes2)))
                goto unlock_out;
@@ -278,6 +312,66 @@ static ssize_t evtchn_write(struct file *file, const char __user *buf,
        return rc;
 }
 
+static int evtchn_resize_ring(struct per_user_data *u)
+{
+       unsigned int new_size;
+       evtchn_port_t *new_ring, *old_ring;
+       unsigned int p, c;
+
+       /*
+        * Ensure the ring is large enough to capture all possible
+        * events. i.e., one free slot for each bound event.
+        */
+       if (u->nr_evtchns <= u->ring_size)
+               return 0;
+
+       if (u->ring_size == 0)
+               new_size = 64;
+       else
+               new_size = 2 * u->ring_size;
+
+       new_ring = evtchn_alloc_ring(new_size);
+       if (!new_ring)
+               return -ENOMEM;
+
+       old_ring = u->ring;
+
+       /*
+        * Access to the ring contents is serialized by either the
+        * prod /or/ cons lock so take both when resizing.
+        */
+       mutex_lock(&u->ring_cons_mutex);
+       spin_lock_irq(&u->ring_prod_lock);
+
+       /*
+        * Copy the old ring contents to the new ring.
+        *
+        * If the ring contents crosses the end of the current ring,
+        * it needs to be copied in two chunks.
+        *
+        * +---------+    +------------------+
+        * |34567  12| -> |       1234567    |
+        * +-----p-c-+    +------------------+
+        */
+       p = evtchn_ring_offset(u, u->ring_prod);
+       c = evtchn_ring_offset(u, u->ring_cons);
+       if (p < c) {
+               memcpy(new_ring + c, u->ring + c, (u->ring_size - c) * sizeof(*u->ring));
+               memcpy(new_ring + u->ring_size, u->ring, p * sizeof(*u->ring));
+       } else
+               memcpy(new_ring + c, u->ring + c, (p - c) * sizeof(*u->ring));
+
+       u->ring = new_ring;
+       u->ring_size = new_size;
+
+       spin_unlock_irq(&u->ring_prod_lock);
+       mutex_unlock(&u->ring_cons_mutex);
+
+       evtchn_free_ring(old_ring);
+
+       return 0;
+}
+
 static int evtchn_bind_to_user(struct per_user_data *u, int port)
 {
        struct user_evtchn *evtchn;
@@ -305,6 +399,10 @@ static int evtchn_bind_to_user(struct per_user_data *u, int port)
        if (rc < 0)
                goto err;
 
+       rc = evtchn_resize_ring(u);
+       if (rc < 0)
+               goto err;
+
        rc = bind_evtchn_to_irqhandler(port, evtchn_interrupt, 0,
                                       u->name, evtchn);
        if (rc < 0)
@@ -503,13 +601,6 @@ static int evtchn_open(struct inode *inode, struct file *filp)
 
        init_waitqueue_head(&u->evtchn_wait);
 
-       u->ring = (evtchn_port_t *)__get_free_page(GFP_KERNEL);
-       if (u->ring == NULL) {
-               kfree(u->name);
-               kfree(u);
-               return -ENOMEM;
-       }
-
        mutex_init(&u->bind_mutex);
        mutex_init(&u->ring_cons_mutex);
        spin_lock_init(&u->ring_prod_lock);
@@ -532,7 +623,7 @@ static int evtchn_release(struct inode *inode, struct file *filp)
                evtchn_unbind_from_user(u, evtchn);
        }
 
-       free_page((unsigned long)u->ring);
+       evtchn_free_ring(u->ring);
        kfree(u->name);
        kfree(u);
 
index 2ea0b3b2a91d2585a2d37f8ead07f08f32c79826..1be5dd048622f6c8c4f9aa805514b9fd5b5c5d7b 100644 (file)
@@ -804,7 +804,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)
 
        vma->vm_ops = &gntdev_vmops;
 
-       vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+       vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO;
 
        if (use_ptemod)
                vma->vm_flags |= VM_DONTCOPY;
index 6dcdb2ec921185ae350aa0f2ff49cd65eaa0d500..d453d62ab0c6e322b3c0df0a05b20daa6751d5ad 100644 (file)
@@ -355,7 +355,7 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
 
        index = srcu_read_lock(&fs_info->subvol_srcu);
 
-       root = btrfs_read_fs_root_no_name(fs_info, &root_key);
+       root = btrfs_get_fs_root(fs_info, &root_key, false);
        if (IS_ERR(root)) {
                srcu_read_unlock(&fs_info->subvol_srcu, index);
                ret = PTR_ERR(root);
index 8c58191249cc14c33c376bb0c8c0a469cb95b894..35489e7129a7e8de9d0232279d41d3bbd19ae1df 100644 (file)
@@ -3416,6 +3416,7 @@ int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans,
 struct btrfs_block_group_cache *btrfs_lookup_block_group(
                                                 struct btrfs_fs_info *info,
                                                 u64 bytenr);
+void btrfs_get_block_group(struct btrfs_block_group_cache *cache);
 void btrfs_put_block_group(struct btrfs_block_group_cache *cache);
 int get_block_group_index(struct btrfs_block_group_cache *cache);
 struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
@@ -3479,6 +3480,9 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
                           struct btrfs_root *root, u64 bytes_used,
                           u64 type, u64 chunk_objectid, u64 chunk_offset,
                           u64 size);
+struct btrfs_trans_handle *btrfs_start_trans_remove_block_group(
+                               struct btrfs_fs_info *fs_info,
+                               const u64 chunk_offset);
 int btrfs_remove_block_group(struct btrfs_trans_handle *trans,
                             struct btrfs_root *root, u64 group_start,
                             struct extent_map *em);
index acf3ed11cfb60e95b685aeb009e4d72fbdba3c3b..4b89680a192338c7a70a4c909e3c4374abe41284 100644 (file)
@@ -124,7 +124,7 @@ static int block_group_bits(struct btrfs_block_group_cache *cache, u64 bits)
        return (cache->flags & bits) == bits;
 }
 
-static void btrfs_get_block_group(struct btrfs_block_group_cache *cache)
+void btrfs_get_block_group(struct btrfs_block_group_cache *cache)
 {
        atomic_inc(&cache->count);
 }
@@ -5915,19 +5915,6 @@ static int update_block_group(struct btrfs_trans_handle *trans,
                        set_extent_dirty(info->pinned_extents,
                                         bytenr, bytenr + num_bytes - 1,
                                         GFP_NOFS | __GFP_NOFAIL);
-                       /*
-                        * No longer have used bytes in this block group, queue
-                        * it for deletion.
-                        */
-                       if (old_val == 0) {
-                               spin_lock(&info->unused_bgs_lock);
-                               if (list_empty(&cache->bg_list)) {
-                                       btrfs_get_block_group(cache);
-                                       list_add_tail(&cache->bg_list,
-                                                     &info->unused_bgs);
-                               }
-                               spin_unlock(&info->unused_bgs_lock);
-                       }
                }
 
                spin_lock(&trans->transaction->dirty_bgs_lock);
@@ -5939,6 +5926,22 @@ static int update_block_group(struct btrfs_trans_handle *trans,
                }
                spin_unlock(&trans->transaction->dirty_bgs_lock);
 
+               /*
+                * No longer have used bytes in this block group, queue it for
+                * deletion. We do this after adding the block group to the
+                * dirty list to avoid races between cleaner kthread and space
+                * cache writeout.
+                */
+               if (!alloc && old_val == 0) {
+                       spin_lock(&info->unused_bgs_lock);
+                       if (list_empty(&cache->bg_list)) {
+                               btrfs_get_block_group(cache);
+                               list_add_tail(&cache->bg_list,
+                                             &info->unused_bgs);
+                       }
+                       spin_unlock(&info->unused_bgs_lock);
+               }
+
                btrfs_put_block_group(cache);
                total -= num_bytes;
                bytenr += num_bytes;
@@ -8105,21 +8108,47 @@ reada:
 }
 
 /*
- * TODO: Modify related function to add related node/leaf to dirty_extent_root,
- * for later qgroup accounting.
- *
- * Current, this function does nothing.
+ * These may not be seen by the usual inc/dec ref code so we have to
+ * add them here.
  */
+static int record_one_subtree_extent(struct btrfs_trans_handle *trans,
+                                    struct btrfs_root *root, u64 bytenr,
+                                    u64 num_bytes)
+{
+       struct btrfs_qgroup_extent_record *qrecord;
+       struct btrfs_delayed_ref_root *delayed_refs;
+
+       qrecord = kmalloc(sizeof(*qrecord), GFP_NOFS);
+       if (!qrecord)
+               return -ENOMEM;
+
+       qrecord->bytenr = bytenr;
+       qrecord->num_bytes = num_bytes;
+       qrecord->old_roots = NULL;
+
+       delayed_refs = &trans->transaction->delayed_refs;
+       spin_lock(&delayed_refs->lock);
+       if (btrfs_qgroup_insert_dirty_extent(delayed_refs, qrecord))
+               kfree(qrecord);
+       spin_unlock(&delayed_refs->lock);
+
+       return 0;
+}
+
 static int account_leaf_items(struct btrfs_trans_handle *trans,
                              struct btrfs_root *root,
                              struct extent_buffer *eb)
 {
        int nr = btrfs_header_nritems(eb);
-       int i, extent_type;
+       int i, extent_type, ret;
        struct btrfs_key key;
        struct btrfs_file_extent_item *fi;
        u64 bytenr, num_bytes;
 
+       /* We can be called directly from walk_up_proc() */
+       if (!root->fs_info->quota_enabled)
+               return 0;
+
        for (i = 0; i < nr; i++) {
                btrfs_item_key_to_cpu(eb, &key, i);
 
@@ -8138,6 +8167,10 @@ static int account_leaf_items(struct btrfs_trans_handle *trans,
                        continue;
 
                num_bytes = btrfs_file_extent_disk_num_bytes(eb, fi);
+
+               ret = record_one_subtree_extent(trans, root, bytenr, num_bytes);
+               if (ret)
+                       return ret;
        }
        return 0;
 }
@@ -8206,8 +8239,6 @@ static int adjust_slots_upwards(struct btrfs_root *root,
 
 /*
  * root_eb is the subtree root and is locked before this function is called.
- * TODO: Modify this function to mark all (including complete shared node)
- * to dirty_extent_root to allow it get accounted in qgroup.
  */
 static int account_shared_subtree(struct btrfs_trans_handle *trans,
                                  struct btrfs_root *root,
@@ -8285,6 +8316,11 @@ walk_down:
                        btrfs_tree_read_lock(eb);
                        btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
                        path->locks[level] = BTRFS_READ_LOCK_BLOCKING;
+
+                       ret = record_one_subtree_extent(trans, root, child_bytenr,
+                                                       root->nodesize);
+                       if (ret)
+                               goto out;
                }
 
                if (level == 0) {
@@ -10256,6 +10292,47 @@ out:
        return ret;
 }
 
+struct btrfs_trans_handle *
+btrfs_start_trans_remove_block_group(struct btrfs_fs_info *fs_info,
+                                    const u64 chunk_offset)
+{
+       struct extent_map_tree *em_tree = &fs_info->mapping_tree.map_tree;
+       struct extent_map *em;
+       struct map_lookup *map;
+       unsigned int num_items;
+
+       read_lock(&em_tree->lock);
+       em = lookup_extent_mapping(em_tree, chunk_offset, 1);
+       read_unlock(&em_tree->lock);
+       ASSERT(em && em->start == chunk_offset);
+
+       /*
+        * We need to reserve 3 + N units from the metadata space info in order
+        * to remove a block group (done at btrfs_remove_chunk() and at
+        * btrfs_remove_block_group()), which are used for:
+        *
+        * 1 unit for adding the free space inode's orphan (located in the tree
+        * of tree roots).
+        * 1 unit for deleting the block group item (located in the extent
+        * tree).
+        * 1 unit for deleting the free space item (located in tree of tree
+        * roots).
+        * N units for deleting N device extent items corresponding to each
+        * stripe (located in the device tree).
+        *
+        * In order to remove a block group we also need to reserve units in the
+        * system space info in order to update the chunk tree (update one or
+        * more device items and remove one chunk item), but this is done at
+        * btrfs_remove_chunk() through a call to check_system_chunk().
+        */
+       map = (struct map_lookup *)em->bdev;
+       num_items = 3 + map->num_stripes;
+       free_extent_map(em);
+
+       return btrfs_start_transaction_fallback_global_rsv(fs_info->extent_root,
+                                                          num_items, 1);
+}
+
 /*
  * Process the unused_bgs list and remove any that don't have any allocated
  * space inside of them.
@@ -10322,8 +10399,8 @@ void btrfs_delete_unused_bgs(struct btrfs_fs_info *fs_info)
                 * Want to do this before we do anything else so we can recover
                 * properly if we fail to join the transaction.
                 */
-               /* 1 for btrfs_orphan_reserve_metadata() */
-               trans = btrfs_start_transaction(root, 1);
+               trans = btrfs_start_trans_remove_block_group(fs_info,
+                                                    block_group->key.objectid);
                if (IS_ERR(trans)) {
                        btrfs_dec_block_group_ro(root, block_group);
                        ret = PTR_ERR(trans);
index 977e715f0bf21a4ea8908700cfe4207dee1fe95d..72e73461c0643bbf128504c93a9c47dd377784aa 100644 (file)
@@ -1882,8 +1882,13 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
        struct btrfs_log_ctx ctx;
        int ret = 0;
        bool full_sync = 0;
-       const u64 len = end - start + 1;
+       u64 len;
 
+       /*
+        * The range length can be represented by u64, we have to do the typecasts
+        * to avoid signed overflow if it's [0, LLONG_MAX] eg. from fsync()
+        */
+       len = (u64)end - (u64)start + 1;
        trace_btrfs_sync_file(file, datasync);
 
        /*
@@ -2071,8 +2076,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
                        }
                }
                if (!full_sync) {
-                       ret = btrfs_wait_ordered_range(inode, start,
-                                                      end - start + 1);
+                       ret = btrfs_wait_ordered_range(inode, start, len);
                        if (ret) {
                                btrfs_end_transaction(trans, root);
                                goto out;
index 994490d5fa6423dee4971e0ff013777d853fe6a6..a70c5790f8f5908f08f606d097fe33e6966af36b 100644 (file)
@@ -4046,9 +4046,7 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
  */
 static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir)
 {
-       struct btrfs_trans_handle *trans;
        struct btrfs_root *root = BTRFS_I(dir)->root;
-       int ret;
 
        /*
         * 1 for the possible orphan item
@@ -4057,27 +4055,7 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir)
         * 1 for the inode ref
         * 1 for the inode
         */
-       trans = btrfs_start_transaction(root, 5);
-       if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC)
-               return trans;
-
-       if (PTR_ERR(trans) == -ENOSPC) {
-               u64 num_bytes = btrfs_calc_trans_metadata_size(root, 5);
-
-               trans = btrfs_start_transaction(root, 0);
-               if (IS_ERR(trans))
-                       return trans;
-               ret = btrfs_cond_migrate_bytes(root->fs_info,
-                                              &root->fs_info->trans_block_rsv,
-                                              num_bytes, 5);
-               if (ret) {
-                       btrfs_end_transaction(trans, root);
-                       return ERR_PTR(ret);
-               }
-               trans->block_rsv = &root->fs_info->trans_block_rsv;
-               trans->bytes_reserved = num_bytes;
-       }
-       return trans;
+       return btrfs_start_transaction_fallback_global_rsv(root, 5, 5);
 }
 
 static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
index 93e12c18ffd736ec77351ecb0443bbfec606a938..5279fdae7142fbe3177a556a020ed1af3a7aa8f1 100644 (file)
@@ -993,9 +993,10 @@ int btrfs_quota_disable(struct btrfs_trans_handle *trans,
        mutex_lock(&fs_info->qgroup_ioctl_lock);
        if (!fs_info->quota_root)
                goto out;
-       spin_lock(&fs_info->qgroup_lock);
        fs_info->quota_enabled = 0;
        fs_info->pending_quota_state = 0;
+       btrfs_qgroup_wait_for_completion(fs_info);
+       spin_lock(&fs_info->qgroup_lock);
        quota_root = fs_info->quota_root;
        fs_info->quota_root = NULL;
        fs_info->qgroup_flags &= ~BTRFS_QGROUP_STATUS_FLAG_ON;
@@ -1461,6 +1462,8 @@ struct btrfs_qgroup_extent_record
        struct btrfs_qgroup_extent_record *entry;
        u64 bytenr = record->bytenr;
 
+       assert_spin_locked(&delayed_refs->lock);
+
        while (*p) {
                parent_node = *p;
                entry = rb_entry(parent_node, struct btrfs_qgroup_extent_record,
index 2907a77fb1f6f4670885a7985ab40ed3e79c4925..b091d94ceef68013e992161b0aaf31b47cc645dc 100644 (file)
@@ -3432,7 +3432,9 @@ out:
 static noinline_for_stack int scrub_chunk(struct scrub_ctx *sctx,
                                          struct btrfs_device *scrub_dev,
                                          u64 chunk_offset, u64 length,
-                                         u64 dev_offset, int is_dev_replace)
+                                         u64 dev_offset,
+                                         struct btrfs_block_group_cache *cache,
+                                         int is_dev_replace)
 {
        struct btrfs_mapping_tree *map_tree =
                &sctx->dev_root->fs_info->mapping_tree;
@@ -3445,8 +3447,18 @@ static noinline_for_stack int scrub_chunk(struct scrub_ctx *sctx,
        em = lookup_extent_mapping(&map_tree->map_tree, chunk_offset, 1);
        read_unlock(&map_tree->map_tree.lock);
 
-       if (!em)
-               return -EINVAL;
+       if (!em) {
+               /*
+                * Might have been an unused block group deleted by the cleaner
+                * kthread or relocation.
+                */
+               spin_lock(&cache->lock);
+               if (!cache->removed)
+                       ret = -EINVAL;
+               spin_unlock(&cache->lock);
+
+               return ret;
+       }
 
        map = (struct map_lookup *)em->bdev;
        if (em->start != chunk_offset)
@@ -3483,6 +3495,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
        u64 length;
        u64 chunk_offset;
        int ret = 0;
+       int ro_set;
        int slot;
        struct extent_buffer *l;
        struct btrfs_key key;
@@ -3568,7 +3581,21 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
                scrub_pause_on(fs_info);
                ret = btrfs_inc_block_group_ro(root, cache);
                scrub_pause_off(fs_info);
-               if (ret) {
+
+               if (ret == 0) {
+                       ro_set = 1;
+               } else if (ret == -ENOSPC) {
+                       /*
+                        * btrfs_inc_block_group_ro return -ENOSPC when it
+                        * failed in creating new chunk for metadata.
+                        * It is not a problem for scrub/replace, because
+                        * metadata are always cowed, and our scrub paused
+                        * commit_transactions.
+                        */
+                       ro_set = 0;
+               } else {
+                       btrfs_warn(fs_info, "failed setting block group ro, ret=%d\n",
+                                  ret);
                        btrfs_put_block_group(cache);
                        break;
                }
@@ -3577,7 +3604,7 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
                dev_replace->cursor_left = found_key.offset;
                dev_replace->item_needs_writeback = 1;
                ret = scrub_chunk(sctx, scrub_dev, chunk_offset, length,
-                                 found_key.offset, is_dev_replace);
+                                 found_key.offset, cache, is_dev_replace);
 
                /*
                 * flush, submit all pending read and write bios, afterwards
@@ -3611,7 +3638,30 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
 
                scrub_pause_off(fs_info);
 
-               btrfs_dec_block_group_ro(root, cache);
+               if (ro_set)
+                       btrfs_dec_block_group_ro(root, cache);
+
+               /*
+                * We might have prevented the cleaner kthread from deleting
+                * this block group if it was already unused because we raced
+                * and set it to RO mode first. So add it back to the unused
+                * list, otherwise it might not ever be deleted unless a manual
+                * balance is triggered or it becomes used and unused again.
+                */
+               spin_lock(&cache->lock);
+               if (!cache->removed && !cache->ro && cache->reserved == 0 &&
+                   btrfs_block_group_used(&cache->item) == 0) {
+                       spin_unlock(&cache->lock);
+                       spin_lock(&fs_info->unused_bgs_lock);
+                       if (list_empty(&cache->bg_list)) {
+                               btrfs_get_block_group(cache);
+                               list_add_tail(&cache->bg_list,
+                                             &fs_info->unused_bgs);
+                       }
+                       spin_unlock(&fs_info->unused_bgs_lock);
+               } else {
+                       spin_unlock(&cache->lock);
+               }
 
                btrfs_put_block_group(cache);
                if (ret)
index c8c3d70c31ffad4e02acd04e0f7dcaa54ad0fe2b..8b72b005bfb9a212518a711a2e476c2d70b47b24 100644 (file)
@@ -898,8 +898,10 @@ int btrfs_test_free_space_cache(void)
        }
 
        root = btrfs_alloc_dummy_root();
-       if (!root)
+       if (IS_ERR(root)) {
+               ret = PTR_ERR(root);
                goto out;
+       }
 
        root->fs_info = btrfs_alloc_dummy_fs_info();
        if (!root->fs_info)
index 418c6a2ad7d88658f8624d99a1ba0e9e84c13d45..3367a3c6f214f5ca248a79fff36c6404a49fbf4f 100644 (file)
@@ -592,6 +592,38 @@ struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
        return start_transaction(root, num_items, TRANS_START,
                                 BTRFS_RESERVE_FLUSH_ALL);
 }
+struct btrfs_trans_handle *btrfs_start_transaction_fallback_global_rsv(
+                                       struct btrfs_root *root,
+                                       unsigned int num_items,
+                                       int min_factor)
+{
+       struct btrfs_trans_handle *trans;
+       u64 num_bytes;
+       int ret;
+
+       trans = btrfs_start_transaction(root, num_items);
+       if (!IS_ERR(trans) || PTR_ERR(trans) != -ENOSPC)
+               return trans;
+
+       trans = btrfs_start_transaction(root, 0);
+       if (IS_ERR(trans))
+               return trans;
+
+       num_bytes = btrfs_calc_trans_metadata_size(root, num_items);
+       ret = btrfs_cond_migrate_bytes(root->fs_info,
+                                      &root->fs_info->trans_block_rsv,
+                                      num_bytes,
+                                      min_factor);
+       if (ret) {
+               btrfs_end_transaction(trans, root);
+               return ERR_PTR(ret);
+       }
+
+       trans->block_rsv = &root->fs_info->trans_block_rsv;
+       trans->bytes_reserved = num_bytes;
+
+       return trans;
+}
 
 struct btrfs_trans_handle *btrfs_start_transaction_lflush(
                                        struct btrfs_root *root,
index b05b2f64d9133313f1af231c4a4254ff16972f00..0da21ca9b3fb312a7ec77b4e8314a9e4b3410075 100644 (file)
@@ -185,6 +185,10 @@ int btrfs_end_transaction(struct btrfs_trans_handle *trans,
                          struct btrfs_root *root);
 struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
                                                   unsigned int num_items);
+struct btrfs_trans_handle *btrfs_start_transaction_fallback_global_rsv(
+                                       struct btrfs_root *root,
+                                       unsigned int num_items,
+                                       int min_factor);
 struct btrfs_trans_handle *btrfs_start_transaction_lflush(
                                        struct btrfs_root *root,
                                        unsigned int num_items);
index a6df8fdc1312ce78e97f9f90037ff5b236a58a92..45645220660996773b1f76cd1d526d4aeae33dac 100644 (file)
@@ -1973,8 +1973,7 @@ void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_fs_info *fs_info,
        if (srcdev->writeable) {
                fs_devices->rw_devices--;
                /* zero out the old super if it is writable */
-               btrfs_scratch_superblocks(srcdev->bdev,
-                                       rcu_str_deref(srcdev->name));
+               btrfs_scratch_superblocks(srcdev->bdev, srcdev->name->str);
        }
 
        if (srcdev->bdev)
@@ -2024,8 +2023,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_fs_info *fs_info,
        btrfs_sysfs_rm_device_link(fs_info->fs_devices, tgtdev);
 
        if (tgtdev->bdev) {
-               btrfs_scratch_superblocks(tgtdev->bdev,
-                                       rcu_str_deref(tgtdev->name));
+               btrfs_scratch_superblocks(tgtdev->bdev, tgtdev->name->str);
                fs_info->fs_devices->open_devices--;
        }
        fs_info->fs_devices->num_devices--;
@@ -2853,7 +2851,8 @@ static int btrfs_relocate_chunk(struct btrfs_root *root, u64 chunk_offset)
        if (ret)
                return ret;
 
-       trans = btrfs_start_transaction(root, 0);
+       trans = btrfs_start_trans_remove_block_group(root->fs_info,
+                                                    chunk_offset);
        if (IS_ERR(trans)) {
                ret = PTR_ERR(trans);
                btrfs_std_error(root->fs_info, ret, NULL);
@@ -3123,7 +3122,7 @@ static int chunk_profiles_filter(u64 chunk_type,
        return 1;
 }
 
-static int chunk_usage_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset,
+static int chunk_usage_range_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset,
                              struct btrfs_balance_args *bargs)
 {
        struct btrfs_block_group_cache *cache;
@@ -3156,7 +3155,7 @@ static int chunk_usage_filter(struct btrfs_fs_info *fs_info, u64 chunk_offset,
        return ret;
 }
 
-static int chunk_usage_range_filter(struct btrfs_fs_info *fs_info,
+static int chunk_usage_filter(struct btrfs_fs_info *fs_info,
                u64 chunk_offset, struct btrfs_balance_args *bargs)
 {
        struct btrfs_block_group_cache *cache;
index ec571237273208fcb87f7be1c473b0c6a1392b50..d5c84f6b13538a338d90560b6520be4fe56c3125 100644 (file)
@@ -382,7 +382,7 @@ struct map_lookup {
 #define BTRFS_BALANCE_ARGS_LIMIT       (1ULL << 5)
 #define BTRFS_BALANCE_ARGS_LIMIT_RANGE (1ULL << 6)
 #define BTRFS_BALANCE_ARGS_STRIPES_RANGE (1ULL << 7)
-#define BTRFS_BALANCE_ARGS_USAGE_RANGE (1ULL << 8)
+#define BTRFS_BALANCE_ARGS_USAGE_RANGE (1ULL << 10)
 
 #define BTRFS_BALANCE_ARGS_MASK                        \
        (BTRFS_BALANCE_ARGS_PROFILES |          \
index 646cdac73488e96041f2bcad33b4220b096da684..beac58b0e09cbbb0a3cc74fbb55bfe6853c1d616 100644 (file)
@@ -78,7 +78,8 @@ static __be32 *read_buf(struct xdr_stream *xdr, int nbytes)
 
        p = xdr_inline_decode(xdr, nbytes);
        if (unlikely(p == NULL))
-               printk(KERN_WARNING "NFS: NFSv4 callback reply buffer overflowed!\n");
+               printk(KERN_WARNING "NFS: NFSv4 callback reply buffer overflowed "
+                                                       "or truncated request.\n");
        return p;
 }
 
@@ -889,6 +890,7 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
        struct cb_compound_hdr_arg hdr_arg = { 0 };
        struct cb_compound_hdr_res hdr_res = { NULL };
        struct xdr_stream xdr_in, xdr_out;
+       struct xdr_buf *rq_arg = &rqstp->rq_arg;
        __be32 *p, status;
        struct cb_process_state cps = {
                .drc_status = 0,
@@ -900,7 +902,8 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
 
        dprintk("%s: start\n", __func__);
 
-       xdr_init_decode(&xdr_in, &rqstp->rq_arg, rqstp->rq_arg.head[0].iov_base);
+       rq_arg->len = rq_arg->head[0].iov_len + rq_arg->page_len;
+       xdr_init_decode(&xdr_in, rq_arg, rq_arg->head[0].iov_base);
 
        p = (__be32*)((char *)rqstp->rq_res.head[0].iov_base + rqstp->rq_res.head[0].iov_len);
        xdr_init_encode(&xdr_out, &rqstp->rq_res, p);
index 326d9e10d83370f56061220c51e72a42de0595b2..31b0a52223a73758c385d18bea4ec22ed63c2884 100644 (file)
@@ -618,7 +618,10 @@ void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr,
                nfs_inc_stats(inode, NFSIOS_SETATTRTRUNC);
                nfs_vmtruncate(inode, attr->ia_size);
        }
-       nfs_update_inode(inode, fattr);
+       if (fattr->valid)
+               nfs_update_inode(inode, fattr);
+       else
+               NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR;
        spin_unlock(&inode->i_lock);
 }
 EXPORT_SYMBOL_GPL(nfs_setattr_update_inode);
@@ -1824,7 +1827,11 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
                if ((long)fattr->gencount - (long)nfsi->attr_gencount > 0)
                        nfsi->attr_gencount = fattr->gencount;
        }
-       invalid &= ~NFS_INO_INVALID_ATTR;
+
+       /* Don't declare attrcache up to date if there were no attrs! */
+       if (fattr->valid != 0)
+               invalid &= ~NFS_INO_INVALID_ATTR;
+
        /* Don't invalidate the data if we were to blame */
        if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
                                || S_ISLNK(inode->i_mode)))
index 3e92a3cde15d8b61878a7c2ce7d13da1cf01b290..6b1ce9825430c7c9659b49ac9bff545b620bd7bb 100644 (file)
@@ -14,7 +14,7 @@
 #include "pnfs.h"
 #include "internal.h"
 
-#define NFSDBG_FACILITY NFSDBG_PNFS
+#define NFSDBG_FACILITY NFSDBG_PROC
 
 static int nfs42_set_rw_stateid(nfs4_stateid *dst, struct file *file,
                                fmode_t fmode)
@@ -284,6 +284,7 @@ static int _nfs42_proc_clone(struct rpc_message *msg, struct file *src_f,
                .dst_fh = NFS_FH(dst_inode),
                .src_offset = src_offset,
                .dst_offset = dst_offset,
+               .count = count,
                .dst_bitmask = server->cache_consistency_bitmask,
        };
        struct nfs42_clone_res res = {
index 223bedda64ae49f3d94226677e652e31da4c8d84..10410e8b58530389d7efb18352e8a6253d12b267 100644 (file)
@@ -33,7 +33,7 @@ static int nfs_get_cb_ident_idr(struct nfs_client *clp, int minorversion)
                return ret;
        idr_preload(GFP_KERNEL);
        spin_lock(&nn->nfs_client_lock);
-       ret = idr_alloc(&nn->cb_ident_idr, clp, 0, 0, GFP_NOWAIT);
+       ret = idr_alloc(&nn->cb_ident_idr, clp, 1, 0, GFP_NOWAIT);
        if (ret >= 0)
                clp->cl_cb_ident = ret;
        spin_unlock(&nn->nfs_client_lock);
index 4aa571956cd618499df260f6bcf6a0f7c2df8045..db9b5fea5b3ef12f6eacf36cd2154c2db7d4d9f2 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/file.h>
 #include <linux/falloc.h>
 #include <linux/nfs_fs.h>
+#include <uapi/linux/btrfs.h>  /* BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE */
 #include "delegation.h"
 #include "internal.h"
 #include "iostat.h"
@@ -203,6 +204,7 @@ nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
        struct fd src_file;
        struct inode *src_inode;
        unsigned int bs = server->clone_blksize;
+       bool same_inode = false;
        int ret;
 
        /* dst file must be opened for writing */
@@ -221,10 +223,8 @@ nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
 
        src_inode = file_inode(src_file.file);
 
-       /* src and dst must be different files */
-       ret = -EINVAL;
        if (src_inode == dst_inode)
-               goto out_fput;
+               same_inode = true;
 
        /* src file must be opened for reading */
        if (!(src_file.file->f_mode & FMODE_READ))
@@ -249,8 +249,16 @@ nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
                        goto out_fput;
        }
 
+       /* verify if ranges are overlapped within the same file */
+       if (same_inode) {
+               if (dst_off + count > src_off && dst_off < src_off + count)
+                       goto out_fput;
+       }
+
        /* XXX: do we lock at all? what if server needs CB_RECALL_LAYOUT? */
-       if (dst_inode < src_inode) {
+       if (same_inode) {
+               mutex_lock(&src_inode->i_mutex);
+       } else if (dst_inode < src_inode) {
                mutex_lock_nested(&dst_inode->i_mutex, I_MUTEX_PARENT);
                mutex_lock_nested(&src_inode->i_mutex, I_MUTEX_CHILD);
        } else {
@@ -275,7 +283,9 @@ nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
                truncate_inode_pages_range(&dst_inode->i_data, dst_off, dst_off + count - 1);
 
 out_unlock:
-       if (dst_inode < src_inode) {
+       if (same_inode) {
+               mutex_unlock(&src_inode->i_mutex);
+       } else if (dst_inode < src_inode) {
                mutex_unlock(&src_inode->i_mutex);
                mutex_unlock(&dst_inode->i_mutex);
        } else {
@@ -291,46 +301,31 @@ out_drop_write:
 
 static long nfs42_ioctl_clone_range(struct file *dst_file, void __user *argp)
 {
-       struct nfs_ioctl_clone_range_args args;
+       struct btrfs_ioctl_clone_range_args args;
 
        if (copy_from_user(&args, argp, sizeof(args)))
                return -EFAULT;
 
-       return nfs42_ioctl_clone(dst_file, args.src_fd, args.src_off, args.dst_off, args.count);
-}
-#else
-static long nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
-               u64 src_off, u64 dst_off, u64 count)
-{
-       return -ENOTTY;
-}
-
-static long nfs42_ioctl_clone_range(struct file *dst_file, void __user *argp)
-{
-       return -ENOTTY;
+       return nfs42_ioctl_clone(dst_file, args.src_fd, args.src_offset,
+                                args.dest_offset, args.src_length);
 }
-#endif /* CONFIG_NFS_V4_2 */
 
 long nfs4_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
        void __user *argp = (void __user *)arg;
 
        switch (cmd) {
-       case NFS_IOC_CLONE:
+       case BTRFS_IOC_CLONE:
                return nfs42_ioctl_clone(file, arg, 0, 0, 0);
-       case NFS_IOC_CLONE_RANGE:
+       case BTRFS_IOC_CLONE_RANGE:
                return nfs42_ioctl_clone_range(file, argp);
        }
 
        return -ENOTTY;
 }
+#endif /* CONFIG_NFS_V4_2 */
 
 const struct file_operations nfs4_file_operations = {
-#ifdef CONFIG_NFS_V4_2
-       .llseek         = nfs4_file_llseek,
-#else
-       .llseek         = nfs_file_llseek,
-#endif
        .read_iter      = nfs_file_read,
        .write_iter     = nfs_file_write,
        .mmap           = nfs_file_mmap,
@@ -342,14 +337,14 @@ const struct file_operations nfs4_file_operations = {
        .flock          = nfs_flock,
        .splice_read    = nfs_file_splice_read,
        .splice_write   = iter_file_splice_write,
-#ifdef CONFIG_NFS_V4_2
-       .fallocate      = nfs42_fallocate,
-#endif /* CONFIG_NFS_V4_2 */
        .check_flags    = nfs_check_flags,
        .setlease       = simple_nosetlease,
-#ifdef CONFIG_COMPAT
+#ifdef CONFIG_NFS_V4_2
+       .llseek         = nfs4_file_llseek,
+       .fallocate      = nfs42_fallocate,
        .unlocked_ioctl = nfs4_ioctl,
-#else
        .compat_ioctl   = nfs4_ioctl,
-#endif /* CONFIG_COMPAT */
+#else
+       .llseek         = nfs_file_llseek,
+#endif
 };
index 765a035593638cfd17b4aedd646c0362068343c6..89818036f035b01eaaa4e45797205d53f48e9934 100644 (file)
@@ -7866,7 +7866,7 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
                        spin_unlock(&inode->i_lock);
                goto out_restart;
        }
-       if (nfs4_async_handle_error(task, server, state, NULL) == -EAGAIN)
+       if (nfs4_async_handle_error(task, server, state, &lgp->timeout) == -EAGAIN)
                goto out_restart;
 out:
        dprintk("<-- %s\n", __func__);
index dfed4f5c8fccf91a91b5669461d4a3f490b12cb2..4e4441216804ec550f2c135ef0f393f4f7a1426c 100644 (file)
@@ -3615,6 +3615,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st
        status = 0;
        if (unlikely(!(bitmap[0] & FATTR4_WORD0_FS_LOCATIONS)))
                goto out;
+       bitmap[0] &= ~FATTR4_WORD0_FS_LOCATIONS;
        status = -EIO;
        /* Ignore borken servers that return unrequested attrs */
        if (unlikely(res == NULL))
index 93496c0598375409876f4a25f95d90ef7feb7334..5a8ae2125b50855d6f9f304ffd737fbbb57bb02a 100644 (file)
@@ -872,33 +872,38 @@ send_layoutget(struct pnfs_layout_hdr *lo,
 
        dprintk("--> %s\n", __func__);
 
-       lgp = kzalloc(sizeof(*lgp), gfp_flags);
-       if (lgp == NULL)
-               return NULL;
+       /*
+        * Synchronously retrieve layout information from server and
+        * store in lseg. If we race with a concurrent seqid morphing
+        * op, then re-send the LAYOUTGET.
+        */
+       do {
+               lgp = kzalloc(sizeof(*lgp), gfp_flags);
+               if (lgp == NULL)
+                       return NULL;
+
+               i_size = i_size_read(ino);
+
+               lgp->args.minlength = PAGE_CACHE_SIZE;
+               if (lgp->args.minlength > range->length)
+                       lgp->args.minlength = range->length;
+               if (range->iomode == IOMODE_READ) {
+                       if (range->offset >= i_size)
+                               lgp->args.minlength = 0;
+                       else if (i_size - range->offset < lgp->args.minlength)
+                               lgp->args.minlength = i_size - range->offset;
+               }
+               lgp->args.maxcount = PNFS_LAYOUT_MAXSIZE;
+               lgp->args.range = *range;
+               lgp->args.type = server->pnfs_curr_ld->id;
+               lgp->args.inode = ino;
+               lgp->args.ctx = get_nfs_open_context(ctx);
+               lgp->gfp_flags = gfp_flags;
+               lgp->cred = lo->plh_lc_cred;
 
-       i_size = i_size_read(ino);
+               lseg = nfs4_proc_layoutget(lgp, gfp_flags);
+       } while (lseg == ERR_PTR(-EAGAIN));
 
-       lgp->args.minlength = PAGE_CACHE_SIZE;
-       if (lgp->args.minlength > range->length)
-               lgp->args.minlength = range->length;
-       if (range->iomode == IOMODE_READ) {
-               if (range->offset >= i_size)
-                       lgp->args.minlength = 0;
-               else if (i_size - range->offset < lgp->args.minlength)
-                       lgp->args.minlength = i_size - range->offset;
-       }
-       lgp->args.maxcount = PNFS_LAYOUT_MAXSIZE;
-       lgp->args.range = *range;
-       lgp->args.type = server->pnfs_curr_ld->id;
-       lgp->args.inode = ino;
-       lgp->args.ctx = get_nfs_open_context(ctx);
-       lgp->gfp_flags = gfp_flags;
-       lgp->cred = lo->plh_lc_cred;
-
-       /* Synchronously retrieve layout information from server and
-        * store in lseg.
-        */
-       lseg = nfs4_proc_layoutget(lgp, gfp_flags);
        if (IS_ERR(lseg)) {
                switch (PTR_ERR(lseg)) {
                case -ENOMEM:
@@ -1687,6 +1692,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
                /* existing state ID, make sure the sequence number matches. */
                if (pnfs_layout_stateid_blocked(lo, &res->stateid)) {
                        dprintk("%s forget reply due to sequence\n", __func__);
+                       status = -EAGAIN;
                        goto out_forget_reply;
                }
                pnfs_set_layout_stateid(lo, &res->stateid, false);
index 801c21cd77fe4f1d344aed6fa7b28369972d82b2..4cf700d50b4037e6c334b0647cdb81b816f9ef65 100644 (file)
@@ -809,6 +809,13 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des
  */
 static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
 {
+       /*
+        * Check for signal early to make process killable when there are
+        * always buffers available
+        */
+       if (signal_pending(current))
+               return -ERESTARTSYS;
+
        while (!pipe->nrbufs) {
                if (!pipe->writers)
                        return 0;
@@ -884,6 +891,7 @@ ssize_t __splice_from_pipe(struct pipe_inode_info *pipe, struct splice_desc *sd,
 
        splice_from_pipe_begin(sd);
        do {
+               cond_resched();
                ret = splice_from_pipe_next(pipe, sd);
                if (ret > 0)
                        ret = splice_from_pipe_feed(pipe, sd, actor);
index 590ad9206e3f4e761d2c2ad95cfaedfa76b47e16..02fa1dcc5969f6b596a6c527170fcf9193c437e5 100644 (file)
@@ -162,15 +162,8 @@ void sysv_set_inode(struct inode *inode, dev_t rdev)
                inode->i_fop = &sysv_dir_operations;
                inode->i_mapping->a_ops = &sysv_aops;
        } else if (S_ISLNK(inode->i_mode)) {
-               if (inode->i_blocks) {
-                       inode->i_op = &sysv_symlink_inode_operations;
-                       inode->i_mapping->a_ops = &sysv_aops;
-               } else {
-                       inode->i_op = &simple_symlink_inode_operations;
-                       inode->i_link = (char *)SYSV_I(inode)->i_data;
-                       nd_terminate_link(inode->i_link, inode->i_size,
-                               sizeof(SYSV_I(inode)->i_data) - 1);
-               }
+               inode->i_op = &sysv_symlink_inode_operations;
+               inode->i_mapping->a_ops = &sysv_aops;
        } else
                init_special_inode(inode, inode->i_mode, rdev);
 }
index a4a7a9ce345737fc39e0f55f5b850b34dc828ce1..edca8985c50e82e3d1d495d773194ef045f6f036 100644 (file)
 #define IMX7D_SEMA4_HS_ROOT_CLK                434
 #define IMX7D_PLL_DRAM_TEST_DIV                435
 #define IMX7D_ADC_ROOT_CLK             436
-#define IMX7D_CLK_END                  437
+#define IMX7D_CLK_ARM                  437
+#define IMX7D_CLK_END                  438
 #endif /* __DT_BINDINGS_CLOCK_IMX7D_H */
index dd09b73c4aaf13887a7ac38217548ae7fc9e2df1..ffa11379b3f0ade901ff7d293695ca5f593cb066 100644 (file)
 #define R8A7791_CLK_VIN2               9
 #define R8A7791_CLK_VIN1               10
 #define R8A7791_CLK_VIN0               11
+#define R8A7791_CLK_ETHERAVB           12
 #define R8A7791_CLK_ETHER              13
 #define R8A7791_CLK_SATA1              14
 #define R8A7791_CLK_SATA0              15
index 09da38a58776b4039e0c205d8c9bb1ed7751daab..a7a7e0370968d9b4e38c25ecd437c2d8a75beba1 100644 (file)
@@ -79,6 +79,7 @@
 #define R8A7794_CLK_SCIF2              19
 #define R8A7794_CLK_SCIF1              20
 #define R8A7794_CLK_SCIF0              21
+#define R8A7794_CLK_DU0                        24
 
 /* MSTP8 */
 #define R8A7794_CLK_VIN1               10
diff --git a/include/dt-bindings/clock/rk3036-cru.h b/include/dt-bindings/clock/rk3036-cru.h
new file mode 100644 (file)
index 0000000..ebc7a7b
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
+ * Author: Xing Zheng <zhengxing@rock-chips.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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3036_H
+#define _DT_BINDINGS_CLK_ROCKCHIP_RK3036_H
+
+/* core clocks */
+#define PLL_APLL               1
+#define PLL_DPLL               2
+#define PLL_GPLL               3
+#define ARMCLK                 4
+
+/* sclk gates (special clocks) */
+#define SCLK_GPU               64
+#define SCLK_SPI               65
+#define SCLK_SDMMC             68
+#define SCLK_SDIO              69
+#define SCLK_EMMC              71
+#define SCLK_NANDC             76
+#define SCLK_UART0             77
+#define SCLK_UART1             78
+#define SCLK_UART2             79
+#define SCLK_I2S               82
+#define SCLK_SPDIF             83
+#define SCLK_TIMER0            85
+#define SCLK_TIMER1            86
+#define SCLK_TIMER2            87
+#define SCLK_TIMER3            88
+#define SCLK_OTGPHY0           93
+#define SCLK_LCDC              100
+#define SCLK_HDMI              109
+#define SCLK_HEVC              111
+#define SCLK_I2S_OUT           113
+#define SCLK_SDMMC_DRV         114
+#define SCLK_SDIO_DRV          115
+#define SCLK_EMMC_DRV          117
+#define SCLK_SDMMC_SAMPLE      118
+#define SCLK_SDIO_SAMPLE       119
+#define SCLK_EMMC_SAMPLE       121
+#define SCLK_PVTM_CORE         123
+#define SCLK_PVTM_GPU          124
+#define SCLK_PVTM_VIDEO                125
+#define SCLK_MAC               151
+#define SCLK_MACREF            152
+#define SCLK_SFC               160
+
+/* aclk gates */
+#define ACLK_DMAC2             194
+#define ACLK_LCDC              197
+#define ACLK_VIO               203
+#define ACLK_VCODEC            208
+#define ACLK_CPU               209
+#define ACLK_PERI              210
+
+/* pclk gates */
+#define PCLK_GPIO0             320
+#define PCLK_GPIO1             321
+#define PCLK_GPIO2             322
+#define PCLK_GRF               329
+#define PCLK_I2C0              332
+#define PCLK_I2C1              333
+#define PCLK_I2C2              334
+#define PCLK_SPI               338
+#define PCLK_UART0             341
+#define PCLK_UART1             342
+#define PCLK_UART2             343
+#define PCLK_PWM               350
+#define PCLK_TIMER             353
+#define PCLK_HDMI              360
+#define PCLK_CPU               362
+#define PCLK_PERI              363
+#define PCLK_DDRUPCTL          364
+#define PCLK_WDT               368
+#define PCLK_ACODEC            369
+
+/* hclk gates */
+#define HCLK_OTG0              449
+#define HCLK_OTG1              450
+#define HCLK_NANDC             453
+#define HCLK_SDMMC             456
+#define HCLK_SDIO              457
+#define HCLK_EMMC              459
+#define HCLK_I2S               462
+#define HCLK_LCDC              465
+#define HCLK_ROM               467
+#define HCLK_VIO_BUS           472
+#define HCLK_VCODEC            476
+#define HCLK_CPU               477
+#define HCLK_PERI              478
+
+#define CLK_NR_CLKS            (HCLK_PERI + 1)
+
+/* soft-reset indices */
+#define SRST_CORE0             0
+#define SRST_CORE1             1
+#define SRST_CORE0_DBG         4
+#define SRST_CORE1_DBG         5
+#define SRST_CORE0_POR         8
+#define SRST_CORE1_POR         9
+#define SRST_L2C               12
+#define SRST_TOPDBG            13
+#define SRST_STRC_SYS_A                14
+#define SRST_PD_CORE_NIU       15
+
+#define SRST_TIMER2            16
+#define SRST_CPUSYS_H          17
+#define SRST_AHB2APB_H         19
+#define SRST_TIMER3            20
+#define SRST_INTMEM            21
+#define SRST_ROM               22
+#define SRST_PERI_NIU          23
+#define SRST_I2S               24
+#define SRST_DDR_PLL           25
+#define SRST_GPU_DLL           26
+#define SRST_TIMER0            27
+#define SRST_TIMER1            28
+#define SRST_CORE_DLL          29
+#define SRST_EFUSE_P           30
+#define SRST_ACODEC_P          31
+
+#define SRST_GPIO0             32
+#define SRST_GPIO1             33
+#define SRST_GPIO2             34
+#define SRST_UART0             39
+#define SRST_UART1             40
+#define SRST_UART2             41
+#define SRST_I2C0              43
+#define SRST_I2C1              44
+#define SRST_I2C2              45
+#define SRST_SFC               47
+
+#define SRST_PWM0              48
+#define SRST_DAP               51
+#define SRST_DAP_SYS           52
+#define SRST_GRF               55
+#define SRST_PERIPHSYS_A       57
+#define SRST_PERIPHSYS_H       58
+#define SRST_PERIPHSYS_P       59
+#define SRST_CPU_PERI          61
+#define SRST_EMEM_PERI         62
+#define SRST_USB_PERI          63
+
+#define SRST_DMA2              64
+#define SRST_MAC               66
+#define SRST_NANDC             68
+#define SRST_USBOTG0           69
+#define SRST_OTGC0             71
+#define SRST_USBOTG1           72
+#define SRST_OTGC1             74
+#define SRST_DDRMSCH           79
+
+#define SRST_MMC0              81
+#define SRST_SDIO              82
+#define SRST_EMMC              83
+#define SRST_SPI0              84
+#define SRST_WDT               86
+#define SRST_DDRPHY            88
+#define SRST_DDRPHY_P          89
+#define SRST_DDRCTRL           90
+#define SRST_DDRCTRL_P         91
+
+#define SRST_HDMI_P            96
+#define SRST_VIO_BUS_H         99
+#define SRST_UTMI0             103
+#define SRST_UTMI1             104
+#define SRST_USBPOR            105
+
+#define SRST_VCODEC_A          112
+#define SRST_VCODEC_H          113
+#define SRST_VIO1_A            114
+#define SRST_HEVC              115
+#define SRST_VCODEC_NIU_A      116
+#define SRST_LCDC1_A           117
+#define SRST_LCDC1_H           118
+#define SRST_LCDC1_D           119
+#define SRST_GPU               120
+#define SRST_GPU_NIU_A         122
+
+#define SRST_DBG_P             131
+
+#endif
diff --git a/include/dt-bindings/clock/rk3228-cru.h b/include/dt-bindings/clock/rk3228-cru.h
new file mode 100644 (file)
index 0000000..a78dd89
--- /dev/null
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2015 Rockchip Electronics Co. Ltd.
+ * Author: Jeffy Chen <jeffy.chen@rock-chips.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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ */
+
+#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RK3228_H
+#define _DT_BINDINGS_CLK_ROCKCHIP_RK3228_H
+
+/* core clocks */
+#define PLL_APLL               1
+#define PLL_DPLL               2
+#define PLL_CPLL               3
+#define PLL_GPLL               4
+#define ARMCLK                 5
+
+/* sclk gates (special clocks) */
+#define SCLK_SPI0              65
+#define SCLK_NANDC             67
+#define SCLK_SDMMC             68
+#define SCLK_SDIO              69
+#define SCLK_EMMC              71
+#define SCLK_UART0             77
+#define SCLK_UART1             78
+#define SCLK_UART2             79
+#define SCLK_I2S0              80
+#define SCLK_I2S1              81
+#define SCLK_I2S2              82
+#define SCLK_SPDIF             83
+#define SCLK_TIMER0            85
+#define SCLK_TIMER1            86
+#define SCLK_TIMER2            87
+#define SCLK_TIMER3            88
+#define SCLK_TIMER4            89
+#define SCLK_TIMER5            90
+#define SCLK_I2S_OUT           113
+#define SCLK_SDMMC_DRV         114
+#define SCLK_SDIO_DRV          115
+#define SCLK_EMMC_DRV          117
+#define SCLK_SDMMC_SAMPLE      118
+#define SCLK_SDIO_SAMPLE       119
+#define SCLK_EMMC_SAMPLE       121
+
+/* aclk gates */
+#define ACLK_DMAC              194
+#define ACLK_PERI              210
+
+/* pclk gates */
+#define PCLK_GPIO0             320
+#define PCLK_GPIO1             321
+#define PCLK_GPIO2             322
+#define PCLK_GPIO3             323
+#define PCLK_GRF               329
+#define PCLK_I2C0              332
+#define PCLK_I2C1              333
+#define PCLK_I2C2              334
+#define PCLK_I2C3              335
+#define PCLK_SPI0              338
+#define PCLK_UART0             341
+#define PCLK_UART1             342
+#define PCLK_UART2             343
+#define PCLK_PWM               350
+#define PCLK_TIMER             353
+#define PCLK_PERI              363
+
+/* hclk gates */
+#define HCLK_NANDC             453
+#define HCLK_SDMMC             456
+#define HCLK_SDIO              457
+#define HCLK_EMMC              459
+#define HCLK_PERI              478
+
+#define CLK_NR_CLKS            (HCLK_PERI + 1)
+
+/* soft-reset indices */
+#define SRST_CORE0_PO          0
+#define SRST_CORE1_PO          1
+#define SRST_CORE2_PO          2
+#define SRST_CORE3_PO          3
+#define SRST_CORE0             4
+#define SRST_CORE1             5
+#define SRST_CORE2             6
+#define SRST_CORE3             7
+#define SRST_CORE0_DBG         8
+#define SRST_CORE1_DBG         9
+#define SRST_CORE2_DBG         10
+#define SRST_CORE3_DBG         11
+#define SRST_TOPDBG            12
+#define SRST_ACLK_CORE         13
+#define SRST_NOC               14
+#define SRST_L2C               15
+
+#define SRST_CPUSYS_H          18
+#define SRST_BUSSYS_H          19
+#define SRST_SPDIF             20
+#define SRST_INTMEM            21
+#define SRST_ROM               22
+#define SRST_OTG_ADP           23
+#define SRST_I2S0              24
+#define SRST_I2S1              25
+#define SRST_I2S2              26
+#define SRST_ACODEC_P          27
+#define SRST_DFIMON            28
+#define SRST_MSCH              29
+#define SRST_EFUSE1024         30
+#define SRST_EFUSE256          31
+
+#define SRST_GPIO0             32
+#define SRST_GPIO1             33
+#define SRST_GPIO2             34
+#define SRST_GPIO3             35
+#define SRST_PERIPH_NOC_A      36
+#define SRST_PERIPH_NOC_BUS_H  37
+#define SRST_PERIPH_NOC_P      38
+#define SRST_UART0             39
+#define SRST_UART1             40
+#define SRST_UART2             41
+#define SRST_PHYNOC            42
+#define SRST_I2C0              43
+#define SRST_I2C1              44
+#define SRST_I2C2              45
+#define SRST_I2C3              46
+
+#define SRST_PWM               48
+#define SRST_A53_GIC           49
+#define SRST_DAP               51
+#define SRST_DAP_NOC           52
+#define SRST_CRYPTO            53
+#define SRST_SGRF              54
+#define SRST_GRF               55
+#define SRST_GMAC              56
+#define SRST_PERIPH_NOC_H      58
+#define SRST_MACPHY            63
+
+#define SRST_DMA               64
+#define SRST_NANDC             68
+#define SRST_USBOTG            69
+#define SRST_OTGC              70
+#define SRST_USBHOST0          71
+#define SRST_HOST_CTRL0                72
+#define SRST_USBHOST1          73
+#define SRST_HOST_CTRL1                74
+#define SRST_USBHOST2          75
+#define SRST_HOST_CTRL2                76
+#define SRST_USBPOR0           77
+#define SRST_USBPOR1           78
+#define SRST_DDRMSCH           79
+
+#define SRST_SMART_CARD                80
+#define SRST_SDMMC             81
+#define SRST_SDIO              82
+#define SRST_EMMC              83
+#define SRST_SPI               84
+#define SRST_TSP_H             85
+#define SRST_TSP               86
+#define SRST_TSADC             87
+#define SRST_DDRPHY            88
+#define SRST_DDRPHY_P          89
+#define SRST_DDRCTRL           90
+#define SRST_DDRCTRL_P         91
+#define SRST_HOST0_ECHI                92
+#define SRST_HOST1_ECHI                93
+#define SRST_HOST2_ECHI                94
+#define SRST_VOP_NOC_A         95
+
+#define SRST_HDMI_P            96
+#define SRST_VIO_ARBI_H                97
+#define SRST_IEP_NOC_A         98
+#define SRST_VIO_NOC_H         99
+#define SRST_VOP_A             100
+#define SRST_VOP_H             101
+#define SRST_VOP_D             102
+#define SRST_UTMI0             103
+#define SRST_UTMI1             104
+#define SRST_UTMI2             105
+#define SRST_UTMI3             106
+#define SRST_RGA               107
+#define SRST_RGA_NOC_A         108
+#define SRST_RGA_A             109
+#define SRST_RGA_H             110
+#define SRST_HDCP_A            111
+
+#define SRST_VPU_A             112
+#define SRST_VPU_H             113
+#define SRST_VPU_NOC_A         116
+#define SRST_VPU_NOC_H         117
+#define SRST_RKVDEC_A          118
+#define SRST_RKVDEC_NOC_A      119
+#define SRST_RKVDEC_H          120
+#define SRST_RKVDEC_NOC_H      121
+#define SRST_RKVDEC_CORE       122
+#define SRST_RKVDEC_CABAC      123
+#define SRST_IEP_A             124
+#define SRST_IEP_H             125
+#define SRST_GPU_A             126
+#define SRST_GPU_NOC_A         127
+
+#define SRST_CORE_DBG          128
+#define SRST_DBG_P             129
+#define SRST_TIMER0            130
+#define SRST_TIMER1            131
+#define SRST_TIMER2            132
+#define SRST_TIMER3            133
+#define SRST_TIMER4            134
+#define SRST_TIMER5            135
+#define SRST_VIO_H2P           136
+#define SRST_HDMIPHY           139
+#define SRST_VDAC              140
+#define SRST_TIMER_6CH_P       141
+
+#endif
index c719aacef14fb84f030603d5435a733f7dc2b1ba..9a586e2d9c91fd3c81c74a3d927a2cd2973af563 100644 (file)
@@ -86,6 +86,8 @@
 #define SCLK_USBPHY480M_SRC    122
 #define SCLK_PVTM_CORE         123
 #define SCLK_PVTM_GPU          124
+#define SCLK_CRYPTO            125
+#define SCLK_MIPIDSI_24M       126
 
 #define SCLK_MAC               151
 #define SCLK_MACREF_OUT                152
 #define PCLK_DDRUPCTL1         366
 #define PCLK_PUBL1             367
 #define PCLK_WDT               368
+#define PCLK_EFUSE256          369
+#define PCLK_EFUSE1024         370
 
 /* hclk gates */
 #define HCLK_GPS               448
index 53369568c24c5dc6055f34c34e5babc318397d3f..2eca353a29d74bc6fb8d8983473b13b4752c3866 100644 (file)
@@ -28,7 +28,8 @@
 #define SH73A0_CLK_HP          14
 
 /* MSTP0 */
-#define SH73A0_CLK_IIC2        1
+#define SH73A0_CLK_IIC2                1
+#define SH73A0_CLK_MSIOF0      0
 
 /* MSTP1 */
 #define SH73A0_CLK_CEU1                29
 #define SH73A0_CLK_SCIFA7      19
 #define SH73A0_CLK_SY_DMAC     18
 #define SH73A0_CLK_MP_DMAC     17
+#define SH73A0_CLK_MSIOF3      15
+#define SH73A0_CLK_MSIOF1      8
 #define SH73A0_CLK_SCIFA5      7
 #define SH73A0_CLK_SCIFB       6
+#define SH73A0_CLK_MSIOF2      5
 #define SH73A0_CLK_SCIFA0      4
 #define SH73A0_CLK_SCIFA1      3
 #define SH73A0_CLK_SCIFA2      2
index 774dc1e843c5b649a48aebe1cb9476678c495c97..344bd1eb3386bad14425861485a66dc25927cd54 100644 (file)
 #define PIN_INPUT_PULLUP       (INPUT_EN | PULL_UP)
 #define PIN_INPUT_PULLDOWN     (INPUT_EN)
 
+/*
+ * Macro to allow using the absolute physical address instead of the
+ * padconf registers instead of the offset from padconf base.
+ */
+#define AM4372_IOPAD(pa, val)  (((pa) & 0xffff) - 0x0800) (val)
+
 #endif
 
index 4379e29f0460c10bfc466ca3ecc5beb783af5b2d..5c75e80915fcdc5b4411984cd57b8308eb388bfb 100644 (file)
 #define PIN_INPUT_PULLUP       (PULL_ENA | INPUT_EN | PULL_UP)
 #define PIN_INPUT_PULLDOWN     (PULL_ENA | INPUT_EN)
 
+/*
+ * Macro to allow using the absolute physical address instead of the
+ * padconf registers instead of the offset from padconf base.
+ */
+#define DRA7XX_CORE_IOPAD(pa, val)     (((pa) & 0xffff) - 0x3400) (val)
+
 #endif
 
index d1e1512ac0f1fbcd9a8f9d6f32cf271154cb7bf3..effadd05695bda61001375128f1743ed7af256e2 100644 (file)
@@ -64,8 +64,6 @@
 #define DM814X_IOPAD(pa, val)          OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
 #define DM816X_IOPAD(pa, val)          OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
 #define AM33XX_IOPAD(pa, val)          OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
-#define AM4372_IOPAD(pa, val)          OMAP_IOPAD_OFFSET((pa), 0x0800) (val)
-#define DRA7XX_CORE_IOPAD(pa, val)     OMAP_IOPAD_OFFSET((pa), 0x3400) (val)
 
 /*
  * Macros to allow using the offset from the padconf physical address
index 9c747cb14ad88809b9c77df72d8c0563f0230319..d2f41477f8ae77600a8683890b3615766b9a3701 100644 (file)
@@ -342,10 +342,10 @@ int kvm_vgic_inject_mapped_irq(struct kvm *kvm, int cpuid,
                               struct irq_phys_map *map, bool level);
 void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg);
 int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu);
-int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu);
 struct irq_phys_map *kvm_vgic_map_phys_irq(struct kvm_vcpu *vcpu,
                                           int virt_irq, int irq);
 int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, struct irq_phys_map *map);
+bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, struct irq_phys_map *map);
 
 #define irqchip_in_kernel(k)   (!!((k)->arch.vgic.in_kernel))
 #define vgic_initialized(k)    (!!((k)->arch.vgic.nr_cpus))
index 484604d184be7380807868d9a12edc80e9064db3..e15828fd71f1b589780b933549e3b07c9652c1e9 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/atomic.h>
 #include <linux/kernel.h>
 #include <linux/mutex.h>
-#include <linux/spinlock.h>
 
 struct kref {
        atomic_t refcount;
@@ -99,38 +98,6 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)
        return kref_sub(kref, 1, release);
 }
 
-/**
- * kref_put_spinlock_irqsave - decrement refcount for object.
- * @kref: object.
- * @release: pointer to the function that will clean up the object when the
- *          last reference to the object is released.
- *          This pointer is required, and it is not acceptable to pass kfree
- *          in as this function.
- * @lock: lock to take in release case
- *
- * Behaves identical to kref_put with one exception.  If the reference count
- * drops to zero, the lock will be taken atomically wrt dropping the reference
- * count.  The release function has to call spin_unlock() without _irqrestore.
- */
-static inline int kref_put_spinlock_irqsave(struct kref *kref,
-               void (*release)(struct kref *kref),
-               spinlock_t *lock)
-{
-       unsigned long flags;
-
-       WARN_ON(release == NULL);
-       if (atomic_add_unless(&kref->refcount, -1, 1))
-               return 0;
-       spin_lock_irqsave(lock, flags);
-       if (atomic_dec_and_test(&kref->refcount)) {
-               release(kref);
-               local_irq_restore(flags);
-               return 1;
-       }
-       spin_unlock_irqrestore(lock, flags);
-       return 0;
-}
-
 static inline int kref_put_mutex(struct kref *kref,
                                 void (*release)(struct kref *kref),
                                 struct mutex *lock)
index 5706a2108f0a67826ed644dce761edd21a6a05c0..c923350ca20a5a53453576f360e52498de232abe 100644 (file)
@@ -460,6 +460,17 @@ static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
             (vcpup = kvm_get_vcpu(kvm, idx)) != NULL; \
             idx++)
 
+static inline struct kvm_vcpu *kvm_get_vcpu_by_id(struct kvm *kvm, int id)
+{
+       struct kvm_vcpu *vcpu;
+       int i;
+
+       kvm_for_each_vcpu(i, vcpu, kvm)
+               if (vcpu->vcpu_id == id)
+                       return vcpu;
+       return NULL;
+}
+
 #define kvm_for_each_memslot(memslot, slots)   \
        for (memslot = &slots->memslots[0];     \
              memslot < slots->memslots + KVM_MEM_SLOTS_NUM && memslot->npages;\
index 69c9057e1ab89330b1ed22cd0681bf5440ce0096..3db5552b17d5b5e489eb3d5bb3c6a12fcb779b29 100644 (file)
@@ -58,7 +58,6 @@ enum {
 struct nvm_id_group {
        u8      mtype;
        u8      fmtype;
-       u16     res16;
        u8      num_ch;
        u8      num_lun;
        u8      num_pln;
@@ -74,9 +73,9 @@ struct nvm_id_group {
        u32     tbet;
        u32     tbem;
        u32     mpos;
+       u32     mccap;
        u16     cpar;
-       u8      res[913];
-} __packed;
+};
 
 struct nvm_addr_format {
        u8      ch_offset;
@@ -91,19 +90,15 @@ struct nvm_addr_format {
        u8      pg_len;
        u8      sect_offset;
        u8      sect_len;
-       u8      res[4];
 };
 
 struct nvm_id {
        u8      ver_id;
        u8      vmnt;
        u8      cgrps;
-       u8      res[5];
        u32     cap;
        u32     dom;
        struct nvm_addr_format ppaf;
-       u8      ppat;
-       u8      resv[224];
        struct nvm_id_group groups[4];
 } __packed;
 
@@ -123,39 +118,28 @@ struct nvm_tgt_instance {
 #define NVM_VERSION_MINOR 0
 #define NVM_VERSION_PATCH 0
 
-#define NVM_SEC_BITS (8)
-#define NVM_PL_BITS  (6)
-#define NVM_PG_BITS  (16)
 #define NVM_BLK_BITS (16)
-#define NVM_LUN_BITS (10)
+#define NVM_PG_BITS  (16)
+#define NVM_SEC_BITS (8)
+#define NVM_PL_BITS  (8)
+#define NVM_LUN_BITS (8)
 #define NVM_CH_BITS  (8)
 
 struct ppa_addr {
+       /* Generic structure for all addresses */
        union {
-               /* Channel-based PPA format in nand 4x2x2x2x8x10 */
-               struct {
-                       u64 ch          : 4;
-                       u64 sec         : 2; /* 4 sectors per page */
-                       u64 pl          : 2; /* 4 planes per LUN */
-                       u64 lun         : 2; /* 4 LUNs per channel */
-                       u64 pg          : 8; /* 256 pages per block */
-                       u64 blk         : 10;/* 1024 blocks per plane */
-                       u64 resved              : 36;
-               } chnl;
-
-               /* Generic structure for all addresses */
                struct {
+                       u64 blk         : NVM_BLK_BITS;
+                       u64 pg          : NVM_PG_BITS;
                        u64 sec         : NVM_SEC_BITS;
                        u64 pl          : NVM_PL_BITS;
-                       u64 pg          : NVM_PG_BITS;
-                       u64 blk         : NVM_BLK_BITS;
                        u64 lun         : NVM_LUN_BITS;
                        u64 ch          : NVM_CH_BITS;
                } g;
 
                u64 ppa;
        };
-} __packed;
+};
 
 struct nvm_rq {
        struct nvm_tgt_instance *ins;
@@ -191,11 +175,11 @@ static inline void *nvm_rq_to_pdu(struct nvm_rq *rqdata)
 struct nvm_block;
 
 typedef int (nvm_l2p_update_fn)(u64, u32, __le64 *, void *);
-typedef int (nvm_bb_update_fn)(u32, void *, unsigned int, void *);
+typedef int (nvm_bb_update_fn)(struct ppa_addr, int, u8 *, void *);
 typedef int (nvm_id_fn)(struct request_queue *, struct nvm_id *);
 typedef int (nvm_get_l2p_tbl_fn)(struct request_queue *, u64, u32,
                                nvm_l2p_update_fn *, void *);
-typedef int (nvm_op_bb_tbl_fn)(struct request_queue *, int, unsigned int,
+typedef int (nvm_op_bb_tbl_fn)(struct request_queue *, struct ppa_addr, int,
                                nvm_bb_update_fn *, void *);
 typedef int (nvm_op_set_bb_fn)(struct request_queue *, struct nvm_rq *, int);
 typedef int (nvm_submit_io_fn)(struct request_queue *, struct nvm_rq *);
@@ -210,7 +194,7 @@ struct nvm_dev_ops {
        nvm_id_fn               *identity;
        nvm_get_l2p_tbl_fn      *get_l2p_tbl;
        nvm_op_bb_tbl_fn        *get_bb_tbl;
-       nvm_op_set_bb_fn        *set_bb;
+       nvm_op_set_bb_fn        *set_bb_tbl;
 
        nvm_submit_io_fn        *submit_io;
        nvm_erase_blk_fn        *erase_block;
@@ -220,7 +204,7 @@ struct nvm_dev_ops {
        nvm_dev_dma_alloc_fn    *dev_dma_alloc;
        nvm_dev_dma_free_fn     *dev_dma_free;
 
-       uint8_t                 max_phys_sect;
+       unsigned int            max_phys_sect;
 };
 
 struct nvm_lun {
@@ -229,7 +213,9 @@ struct nvm_lun {
        int lun_id;
        int chnl_id;
 
+       unsigned int nr_inuse_blocks;   /* Number of used blocks */
        unsigned int nr_free_blocks;    /* Number of unused blocks */
+       unsigned int nr_bad_blocks;     /* Number of bad blocks */
        struct nvm_block *blocks;
 
        spinlock_t lock;
@@ -263,8 +249,7 @@ struct nvm_dev {
        int blks_per_lun;
        int sec_size;
        int oob_size;
-       int addr_mode;
-       struct nvm_addr_format addr_format;
+       struct nvm_addr_format ppaf;
 
        /* Calculated/Cached values. These do not reflect the actual usable
         * blocks at run-time.
@@ -290,118 +275,45 @@ struct nvm_dev {
        char name[DISK_NAME_LEN];
 };
 
-/* fallback conversion */
-static struct ppa_addr __generic_to_linear_addr(struct nvm_dev *dev,
-                                                       struct ppa_addr r)
-{
-       struct ppa_addr l;
-
-       l.ppa = r.g.sec +
-               r.g.pg  * dev->sec_per_pg +
-               r.g.blk * (dev->pgs_per_blk *
-                               dev->sec_per_pg) +
-               r.g.lun * (dev->blks_per_lun *
-                               dev->pgs_per_blk *
-                               dev->sec_per_pg) +
-               r.g.ch * (dev->blks_per_lun *
-                               dev->pgs_per_blk *
-                               dev->luns_per_chnl *
-                               dev->sec_per_pg);
-
-       return l;
-}
-
-/* fallback conversion */
-static struct ppa_addr __linear_to_generic_addr(struct nvm_dev *dev,
-                                                       struct ppa_addr r)
+static inline struct ppa_addr generic_to_dev_addr(struct nvm_dev *dev,
+                                               struct ppa_addr r)
 {
        struct ppa_addr l;
-       int secs, pgs, blks, luns;
-       sector_t ppa = r.ppa;
 
-       l.ppa = 0;
-
-       div_u64_rem(ppa, dev->sec_per_pg, &secs);
-       l.g.sec = secs;
-
-       sector_div(ppa, dev->sec_per_pg);
-       div_u64_rem(ppa, dev->sec_per_blk, &pgs);
-       l.g.pg = pgs;
-
-       sector_div(ppa, dev->pgs_per_blk);
-       div_u64_rem(ppa, dev->blks_per_lun, &blks);
-       l.g.blk = blks;
-
-       sector_div(ppa, dev->blks_per_lun);
-       div_u64_rem(ppa, dev->luns_per_chnl, &luns);
-       l.g.lun = luns;
-
-       sector_div(ppa, dev->luns_per_chnl);
-       l.g.ch = ppa;
+       l.ppa = ((u64)r.g.blk) << dev->ppaf.blk_offset;
+       l.ppa |= ((u64)r.g.pg) << dev->ppaf.pg_offset;
+       l.ppa |= ((u64)r.g.sec) << dev->ppaf.sect_offset;
+       l.ppa |= ((u64)r.g.pl) << dev->ppaf.pln_offset;
+       l.ppa |= ((u64)r.g.lun) << dev->ppaf.lun_offset;
+       l.ppa |= ((u64)r.g.ch) << dev->ppaf.ch_offset;
 
        return l;
 }
 
-static struct ppa_addr __generic_to_chnl_addr(struct ppa_addr r)
+static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
+                                               struct ppa_addr r)
 {
        struct ppa_addr l;
 
-       l.ppa = 0;
-
-       l.chnl.sec = r.g.sec;
-       l.chnl.pl = r.g.pl;
-       l.chnl.pg = r.g.pg;
-       l.chnl.blk = r.g.blk;
-       l.chnl.lun = r.g.lun;
-       l.chnl.ch = r.g.ch;
-
-       return l;
-}
-
-static struct ppa_addr __chnl_to_generic_addr(struct ppa_addr r)
-{
-       struct ppa_addr l;
-
-       l.ppa = 0;
-
-       l.g.sec = r.chnl.sec;
-       l.g.pl = r.chnl.pl;
-       l.g.pg = r.chnl.pg;
-       l.g.blk = r.chnl.blk;
-       l.g.lun = r.chnl.lun;
-       l.g.ch = r.chnl.ch;
+       /*
+        * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc.
+        */
+       l.g.blk = (r.ppa >> dev->ppaf.blk_offset) &
+                                       (((1 << dev->ppaf.blk_len) - 1));
+       l.g.pg |= (r.ppa >> dev->ppaf.pg_offset) &
+                                       (((1 << dev->ppaf.pg_len) - 1));
+       l.g.sec |= (r.ppa >> dev->ppaf.sect_offset) &
+                                       (((1 << dev->ppaf.sect_len) - 1));
+       l.g.pl |= (r.ppa >> dev->ppaf.pln_offset) &
+                                       (((1 << dev->ppaf.pln_len) - 1));
+       l.g.lun |= (r.ppa >> dev->ppaf.lun_offset) &
+                                       (((1 << dev->ppaf.lun_len) - 1));
+       l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) &
+                                       (((1 << dev->ppaf.ch_len) - 1));
 
        return l;
 }
 
-static inline struct ppa_addr addr_to_generic_mode(struct nvm_dev *dev,
-                                               struct ppa_addr gppa)
-{
-       switch (dev->addr_mode) {
-       case NVM_ADDRMODE_LINEAR:
-               return __linear_to_generic_addr(dev, gppa);
-       case NVM_ADDRMODE_CHANNEL:
-               return __chnl_to_generic_addr(gppa);
-       default:
-               BUG();
-       }
-       return gppa;
-}
-
-static inline struct ppa_addr generic_to_addr_mode(struct nvm_dev *dev,
-                                               struct ppa_addr gppa)
-{
-       switch (dev->addr_mode) {
-       case NVM_ADDRMODE_LINEAR:
-               return __generic_to_linear_addr(dev, gppa);
-       case NVM_ADDRMODE_CHANNEL:
-               return __generic_to_chnl_addr(gppa);
-       default:
-               BUG();
-       }
-       return gppa;
-}
-
 static inline int ppa_empty(struct ppa_addr ppa_addr)
 {
        return (ppa_addr.ppa == ADDR_EMPTY);
@@ -468,7 +380,7 @@ typedef int (nvmm_end_io_fn)(struct nvm_rq *, int);
 typedef int (nvmm_erase_blk_fn)(struct nvm_dev *, struct nvm_block *,
                                                                unsigned long);
 typedef struct nvm_lun *(nvmm_get_lun_fn)(struct nvm_dev *, int);
-typedef void (nvmm_free_blocks_print_fn)(struct nvm_dev *);
+typedef void (nvmm_lun_info_print_fn)(struct nvm_dev *);
 
 struct nvmm_type {
        const char *name;
@@ -492,7 +404,7 @@ struct nvmm_type {
        nvmm_get_lun_fn *get_lun;
 
        /* Statistics */
-       nvmm_free_blocks_print_fn *free_blocks_print;
+       nvmm_lun_info_print_fn *lun_info_print;
        struct list_head list;
 };
 
index 570d630f98ae53a34b4c9420f037d87c4b97a3cc..11bbae44f4cbf91dd3ed62aa9d2e1849b14a8839 100644 (file)
@@ -251,6 +251,7 @@ struct nfs4_layoutget {
        struct nfs4_layoutget_res res;
        struct rpc_cred *cred;
        gfp_t gfp_flags;
+       long timeout;
 };
 
 struct nfs4_getdeviceinfo_args {
index e828e7b4afec67a4b9f083cfa65c2ff3cffe8571..6ae25aae88fd1254f40227341ca20b73a2e08ce2 100644 (file)
@@ -412,9 +412,18 @@ struct pci_host_bridge {
        void (*release_fn)(struct pci_host_bridge *);
        void *release_data;
        unsigned int ignore_reset_delay:1;      /* for entire hierarchy */
+       /* Resource alignment requirements */
+       resource_size_t (*align_resource)(struct pci_dev *dev,
+                       const struct resource *res,
+                       resource_size_t start,
+                       resource_size_t size,
+                       resource_size_t align);
 };
 
 #define        to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
+
+struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
+
 void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
                     void (*release_fn)(struct pci_host_bridge *),
                     void *release_data);
index e2878baeb90e8c804a27d90c37c7d79f14e95942..4299f4ba03bdde8a8eae4209f1cf537b63f0171f 100644 (file)
@@ -72,7 +72,7 @@ struct edma_soc_info {
        struct edma_rsv_info    *rsv;
 
        /* List of channels allocated for memcpy, terminated with -1 */
-       s16                     *memcpy_channels;
+       s32                     *memcpy_channels;
 
        s8      (*queue_priority_mapping)[2];
        const s16       (*xbar_chans)[2];
index 80af3cd35ae4edf30dc05e1148cf8ee75033fcb3..72ce932c69b28b3bf240e9782d00c5555bf6a97d 100644 (file)
@@ -71,7 +71,7 @@ struct scpi_ops {
        int (*sensor_get_value)(u16, u32 *);
 };
 
-#if IS_ENABLED(CONFIG_ARM_SCPI_PROTOCOL)
+#if IS_REACHABLE(CONFIG_ARM_SCPI_PROTOCOL)
 struct scpi_ops *get_scpi_ops(void);
 #else
 static inline struct scpi_ops *get_scpi_ops(void) { return NULL; }
index a156b82dd14cbad0b6f2867d07fc883fbc685c1e..c2b66a277e9807de8a224879793c121df63f7d69 100644 (file)
@@ -524,7 +524,7 @@ asmlinkage long sys_chown(const char __user *filename,
 asmlinkage long sys_lchown(const char __user *filename,
                                uid_t user, gid_t group);
 asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group);
-#ifdef CONFIG_UID16
+#ifdef CONFIG_HAVE_UID16
 asmlinkage long sys_chown16(const char __user *filename,
                                old_uid_t user, old_gid_t group);
 asmlinkage long sys_lchown16(const char __user *filename,
index 4014a59828fcba8142e27f6feb1feaf4f64d3171..613c29bd6baf4763e57530b794df843d9cea61ee 100644 (file)
@@ -438,7 +438,8 @@ static inline void thermal_zone_device_unregister(
 static inline int thermal_zone_bind_cooling_device(
        struct thermal_zone_device *tz, int trip,
        struct thermal_cooling_device *cdev,
-       unsigned long upper, unsigned long lower)
+       unsigned long upper, unsigned long lower,
+       unsigned int weight)
 { return -ENODEV; }
 static inline int thermal_zone_unbind_cooling_device(
        struct thermal_zone_device *tz, int trip,
index 70d8500bddf15e9c68bc5149b29c487e28e5f201..70dd3dfde6319e661069f6b8c2d5a6b15804f27f 100644 (file)
@@ -35,7 +35,7 @@ typedef __kernel_gid16_t        gid16_t;
 
 typedef unsigned long          uintptr_t;
 
-#ifdef CONFIG_UID16
+#ifdef CONFIG_HAVE_UID16
 /* This is defined by include/asm-{arch}/posix_types.h */
 typedef __kernel_old_uid_t     old_uid_t;
 typedef __kernel_old_gid_t     old_gid_t;
index 0a2c74008e5388f6d817272735882f40abc3a013..aabf0aca017157a72dd84accb5975c87fe98e79b 100644 (file)
@@ -474,7 +474,7 @@ struct se_cmd {
        struct completion       cmd_wait_comp;
        const struct target_core_fabric_ops *se_tfo;
        sense_reason_t          (*execute_cmd)(struct se_cmd *);
-       sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool);
+       sense_reason_t (*transport_complete_callback)(struct se_cmd *, bool, int *);
        void                    *protocol_data;
 
        unsigned char           *t_task_cdb;
index 654bae3f1a389a4fcff05ba6098fcdd6d6b3204a..5e6296160361cc7b7a7b9d80411ef172c3a453c7 100644 (file)
 
 #define NFS_PIPE_DIRNAME "nfs"
 
-/* NFS ioctls */
-/* Let's follow btrfs lead on CLONE to avoid messing userspace */
-#define NFS_IOC_CLONE          _IOW(0x94, 9, int)
-#define NFS_IOC_CLONE_RANGE    _IOW(0x94, 13, int)
-
-struct nfs_ioctl_clone_range_args {
-       __s64 src_fd;
-       __u64 src_off, count;
-       __u64 dst_off;
-};
-
 /*
  * NFS stats. The good thing with these values is that NFSv3 errors are
  * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which
index ca368793808e37688f7b0219b54d458fede30765..78b3d9f80d443fb4fa601e41088eb2041385ab20 100644 (file)
@@ -467,7 +467,7 @@ struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
        rcu_read_lock();
        if (type != PIDTYPE_PID)
                task = task->group_leader;
-       pid = get_pid(task->pids[type].pid);
+       pid = get_pid(rcu_dereference(task->pids[type].pid));
        rcu_read_unlock();
        return pid;
 }
@@ -528,7 +528,7 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
        if (likely(pid_alive(task))) {
                if (type != PIDTYPE_PID)
                        task = task->group_leader;
-               nr = pid_nr_ns(task->pids[type].pid, ns);
+               nr = pid_nr_ns(rcu_dereference(task->pids[type].pid), ns);
        }
        rcu_read_unlock();
 
index 229956bf84577f81d380536b76d1e57d16de53ae..95f82d8d488871e5cc8337acc9073e2aa569b4e6 100644 (file)
@@ -353,12 +353,20 @@ void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied)
 {
        struct rpc_xprt *xprt = req->rq_xprt;
        struct svc_serv *bc_serv = xprt->bc_serv;
+       struct xdr_buf *rq_rcv_buf = &req->rq_rcv_buf;
 
        spin_lock(&xprt->bc_pa_lock);
        list_del(&req->rq_bc_pa_list);
        xprt_dec_alloc_count(xprt, 1);
        spin_unlock(&xprt->bc_pa_lock);
 
+       if (copied <= rq_rcv_buf->head[0].iov_len) {
+               rq_rcv_buf->head[0].iov_len = copied;
+               rq_rcv_buf->page_len = 0;
+       } else {
+               rq_rcv_buf->page_len = copied - rq_rcv_buf->head[0].iov_len;
+       }
+
        req->rq_private_buf.len = copied;
        set_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state);
 
index bc5b7b5032ca54ce95b17de76bb22cbebc8a001a..7fccf9675df8c238e4cc1d1f437540e48a3df9d2 100644 (file)
@@ -1363,6 +1363,7 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
        memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
        memcpy(&rqstp->rq_arg, &req->rq_rcv_buf, sizeof(rqstp->rq_arg));
        memcpy(&rqstp->rq_res, &req->rq_snd_buf, sizeof(rqstp->rq_res));
+       rqstp->rq_arg.len = req->rq_private_buf.len;
 
        /* reset result send buffer "put" position */
        resv->iov_len = 0;
index 927db9f35ad6f1bddeb51169e84c1bb526f85f21..696ccfa08d103cd29ae56ac38c117bbd7725da06 100644 (file)
@@ -845,6 +845,8 @@ static int encrypted_update(struct key *key, struct key_preparsed_payload *prep)
        size_t datalen = prep->datalen;
        int ret = 0;
 
+       if (test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+               return -ENOKEY;
        if (datalen <= 0 || datalen > 32767 || !prep->data)
                return -EINVAL;
 
index 903dace648a1731b2afbb2dc8b40b8169a05aba2..16dec53184b663f745c010d11e78128ca995bf58 100644 (file)
@@ -1007,13 +1007,16 @@ static void trusted_rcu_free(struct rcu_head *rcu)
  */
 static int trusted_update(struct key *key, struct key_preparsed_payload *prep)
 {
-       struct trusted_key_payload *p = key->payload.data[0];
+       struct trusted_key_payload *p;
        struct trusted_key_payload *new_p;
        struct trusted_key_options *new_o;
        size_t datalen = prep->datalen;
        char *datablob;
        int ret = 0;
 
+       if (test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+               return -ENOKEY;
+       p = key->payload.data[0];
        if (!p->migratable)
                return -EPERM;
        if (datalen <= 0 || datalen > 32767 || !prep->data)
index 28cb30f80256911cf9ee41631659b9e8f5a6b5dd..8705d79b2c6f289736fde21fd38e6013a4e4ae3c 100644 (file)
@@ -120,7 +120,10 @@ int user_update(struct key *key, struct key_preparsed_payload *prep)
 
        if (ret == 0) {
                /* attach the new data, displacing the old */
-               zap = key->payload.data[0];
+               if (!test_bit(KEY_FLAG_NEGATIVE, &key->flags))
+                       zap = key->payload.data[0];
+               else
+                       zap = NULL;
                rcu_assign_keypointer(key, upayload);
                key->expiry = 0;
        }
index 18643bf9894d5e393bdb51b0d7b0740f34960e75..456e1a9bcfde14e594789de0b1055c63f8dd549e 100644 (file)
@@ -638,7 +638,7 @@ void cond_compute_av(struct avtab *ctab, struct avtab_key *key,
 {
        struct avtab_node *node;
 
-       if (!ctab || !key || !avd || !xperms)
+       if (!ctab || !key || !avd)
                return;
 
        for (node = avtab_search_node(ctab, key); node;
@@ -657,7 +657,7 @@ void cond_compute_av(struct avtab *ctab, struct avtab_key *key,
                if ((u16)(AVTAB_AUDITALLOW|AVTAB_ENABLED) ==
                    (node->key.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED)))
                        avd->auditallow |= node->datum.u.data;
-               if ((node->key.specified & AVTAB_ENABLED) &&
+               if (xperms && (node->key.specified & AVTAB_ENABLED) &&
                                (node->key.specified & AVTAB_XPERMS))
                        services_compute_xperms_drivers(xperms, node);
        }
index 5d99436dfcaee5e70f3957a8f8b59be3d9e213d3..0cda05c72f504383a5031e06aa956e2544ef93c8 100644 (file)
@@ -12,9 +12,11 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
 MODULE_LICENSE("GPL v2");
 
 #define OUI_WEISS              0x001c6a
+#define OUI_LOUD               0x000ff2
 
 #define DICE_CATEGORY_ID       0x04
 #define WEISS_CATEGORY_ID      0x00
+#define LOUD_CATEGORY_ID       0x10
 
 static int dice_interface_check(struct fw_unit *unit)
 {
@@ -57,6 +59,8 @@ static int dice_interface_check(struct fw_unit *unit)
        }
        if (vendor == OUI_WEISS)
                category = WEISS_CATEGORY_ID;
+       else if (vendor == OUI_LOUD)
+               category = LOUD_CATEGORY_ID;
        else
                category = DICE_CATEGORY_ID;
        if (device->config_rom[3] != ((vendor << 8) | category) ||
index 8a7fbdcb4072f6a35f956ba51a5820f3d3054eaf..963f82430938a976826074bfe41f33f286e3fbe1 100644 (file)
@@ -312,6 +312,10 @@ enum {
        (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG |\
         AZX_DCAPS_I915_POWERWELL)
 
+#define AZX_DCAPS_INTEL_BROXTON \
+       (AZX_DCAPS_INTEL_PCH | AZX_DCAPS_SEPARATE_STREAM_TAG |\
+        AZX_DCAPS_I915_POWERWELL)
+
 /* quirks for ATI SB / AMD Hudson */
 #define AZX_DCAPS_PRESET_ATI_SB \
        (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB |\
@@ -2124,6 +2128,9 @@ static const struct pci_device_id azx_ids[] = {
        /* Sunrise Point-LP */
        { PCI_DEVICE(0x8086, 0x9d70),
          .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE },
+       /* Broxton-P(Apollolake) */
+       { PCI_DEVICE(0x8086, 0x5a98),
+         .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_BROXTON },
        /* Haswell */
        { PCI_DEVICE(0x8086, 0x0a0c),
          .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
index 60cd9e70090981076fcaec5bcb55cfd92ececdc9..bdb6f226d00686f67e29cbcf29f6259df0431145 100644 (file)
@@ -2378,7 +2378,8 @@ static int patch_generic_hdmi(struct hda_codec *codec)
         * can cover the codec power request, and so need not set this flag.
         * For previous platforms, there is no such power well feature.
         */
-       if (is_valleyview_plus(codec) || is_skylake(codec))
+       if (is_valleyview_plus(codec) || is_skylake(codec) ||
+                       is_broxton(codec))
                codec->core.link_power_control = 1;
 
        if (is_haswell_plus(codec) || is_valleyview_plus(codec)) {
index 2f7b065f9ac43e88ee19b6845506c066485c679a..9bedf7c85e295d6dab65c04093abf7a58cab1a5a 100644 (file)
@@ -1759,6 +1759,7 @@ enum {
        ALC882_FIXUP_NO_PRIMARY_HP,
        ALC887_FIXUP_ASUS_BASS,
        ALC887_FIXUP_BASS_CHMAP,
+       ALC882_FIXUP_DISABLE_AAMIX,
 };
 
 static void alc889_fixup_coef(struct hda_codec *codec,
@@ -1920,6 +1921,8 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
 
 static void alc_fixup_bass_chmap(struct hda_codec *codec,
                                 const struct hda_fixup *fix, int action);
+static void alc_fixup_disable_aamix(struct hda_codec *codec,
+                                   const struct hda_fixup *fix, int action);
 
 static const struct hda_fixup alc882_fixups[] = {
        [ALC882_FIXUP_ABIT_AW9D_MAX] = {
@@ -2151,6 +2154,10 @@ static const struct hda_fixup alc882_fixups[] = {
                .type = HDA_FIXUP_FUNC,
                .v.func = alc_fixup_bass_chmap,
        },
+       [ALC882_FIXUP_DISABLE_AAMIX] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = alc_fixup_disable_aamix,
+       },
 };
 
 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -2218,6 +2225,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1462, 0x7350, "MSI-7350", ALC889_FIXUP_CD),
        SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
        SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
+       SND_PCI_QUIRK(0x1458, 0xa182, "Gigabyte Z170X-UD3", ALC882_FIXUP_DISABLE_AAMIX),
        SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
        SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
        SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
@@ -4587,6 +4595,7 @@ enum {
        ALC292_FIXUP_DISABLE_AAMIX,
        ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
        ALC275_FIXUP_DELL_XPS,
+       ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -5167,6 +5176,17 @@ static const struct hda_fixup alc269_fixups[] = {
                        {}
                }
        },
+       [ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE] = {
+               .type = HDA_FIXUP_VERBS,
+               .v.verbs = (const struct hda_verb[]) {
+                       /* Disable pass-through path for FRONT 14h */
+                       {0x20, AC_VERB_SET_COEF_INDEX, 0x36},
+                       {0x20, AC_VERB_SET_PROC_COEF, 0x1737},
+                       {}
+               },
+               .chained = true,
+               .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
+       },
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5180,8 +5200,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
        SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572),
        SND_PCI_QUIRK(0x1025, 0x079b, "Acer Aspire V5-573G", ALC282_FIXUP_ASPIRE_V5_PINS),
+       SND_PCI_QUIRK(0x1025, 0x106d, "Acer Cloudbook 14", ALC283_FIXUP_CHROME_BOOK),
        SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
        SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
+       SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
        SND_PCI_QUIRK(0x1028, 0x05ca, "Dell Latitude E7240", ALC292_FIXUP_DELL_E7X),
        SND_PCI_QUIRK(0x1028, 0x05cb, "Dell Latitude E7440", ALC292_FIXUP_DELL_E7X),
        SND_PCI_QUIRK(0x1028, 0x05da, "Dell Vostro 5460", ALC290_FIXUP_SUBWOOFER),
@@ -5204,6 +5226,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
        SND_PCI_QUIRK(0x1028, 0x06df, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
        SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
+       SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13", ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
        SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
        SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
        SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
index 826122d8aceec4a931e64e99875dcd8cef661736..2c7c5eb8b1e9514779b78bc278412803862062e9 100644 (file)
@@ -3110,6 +3110,29 @@ static void stac92hd71bxx_fixup_hp_hdx(struct hda_codec *codec,
        spec->gpio_led = 0x08;
 }
 
+static bool is_hp_output(struct hda_codec *codec, hda_nid_t pin)
+{
+       unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin);
+
+       /* count line-out, too, as BIOS sets often so */
+       return get_defcfg_connect(pin_cfg) != AC_JACK_PORT_NONE &&
+               (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT ||
+                get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT);
+}
+
+static void fixup_hp_headphone(struct hda_codec *codec, hda_nid_t pin)
+{
+       unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, pin);
+
+       /* It was changed in the BIOS to just satisfy MS DTM.
+        * Lets turn it back into slaved HP
+        */
+       pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE)) |
+               (AC_JACK_HP_OUT << AC_DEFCFG_DEVICE_SHIFT);
+       pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC | AC_DEFCFG_SEQUENCE))) |
+               0x1f;
+       snd_hda_codec_set_pincfg(codec, pin, pin_cfg);
+}
 
 static void stac92hd71bxx_fixup_hp(struct hda_codec *codec,
                                   const struct hda_fixup *fix, int action)
@@ -3119,22 +3142,12 @@ static void stac92hd71bxx_fixup_hp(struct hda_codec *codec,
        if (action != HDA_FIXUP_ACT_PRE_PROBE)
                return;
 
-       if (hp_blike_system(codec->core.subsystem_id)) {
-               unsigned int pin_cfg = snd_hda_codec_get_pincfg(codec, 0x0f);
-               if (get_defcfg_device(pin_cfg) == AC_JACK_LINE_OUT ||
-                       get_defcfg_device(pin_cfg) == AC_JACK_SPEAKER  ||
-                       get_defcfg_device(pin_cfg) == AC_JACK_HP_OUT) {
-                       /* It was changed in the BIOS to just satisfy MS DTM.
-                        * Lets turn it back into slaved HP
-                        */
-                       pin_cfg = (pin_cfg & (~AC_DEFCFG_DEVICE))
-                                       | (AC_JACK_HP_OUT <<
-                                               AC_DEFCFG_DEVICE_SHIFT);
-                       pin_cfg = (pin_cfg & (~(AC_DEFCFG_DEF_ASSOC
-                                                       | AC_DEFCFG_SEQUENCE)))
-                                                               | 0x1f;
-                       snd_hda_codec_set_pincfg(codec, 0x0f, pin_cfg);
-               }
+       /* when both output A and F are assigned, these are supposedly
+        * dock and built-in headphones; fix both pin configs
+        */
+       if (is_hp_output(codec, 0x0a) && is_hp_output(codec, 0x0f)) {
+               fixup_hp_headphone(codec, 0x0a);
+               fixup_hp_headphone(codec, 0x0f);
        }
 
        if (find_mute_led_cfg(codec, 1))
index 7661616f36361d142144842bd6595994829edec4..5b4c58c3e2c5f6115d55ad194cd06f971e3fdb70 100644 (file)
@@ -174,6 +174,8 @@ struct snd_usb_midi_in_endpoint {
                u8 running_status_length;
        } ports[0x10];
        u8 seen_f5;
+       bool in_sysex;
+       u8 last_cin;
        u8 error_resubmit;
        int current_port;
 };
@@ -467,6 +469,39 @@ static void snd_usbmidi_maudio_broken_running_status_input(
                }
 }
 
+/*
+ * QinHeng CH345 is buggy: every second packet inside a SysEx has not CIN 4
+ * but the previously seen CIN, but still with three data bytes.
+ */
+static void ch345_broken_sysex_input(struct snd_usb_midi_in_endpoint *ep,
+                                    uint8_t *buffer, int buffer_length)
+{
+       unsigned int i, cin, length;
+
+       for (i = 0; i + 3 < buffer_length; i += 4) {
+               if (buffer[i] == 0 && i > 0)
+                       break;
+               cin = buffer[i] & 0x0f;
+               if (ep->in_sysex &&
+                   cin == ep->last_cin &&
+                   (buffer[i + 1 + (cin == 0x6)] & 0x80) == 0)
+                       cin = 0x4;
+#if 0
+               if (buffer[i + 1] == 0x90) {
+                       /*
+                        * Either a corrupted running status or a real note-on
+                        * message; impossible to detect reliably.
+                        */
+               }
+#endif
+               length = snd_usbmidi_cin_length[cin];
+               snd_usbmidi_input_data(ep, 0, &buffer[i + 1], length);
+               ep->in_sysex = cin == 0x4;
+               if (!ep->in_sysex)
+                       ep->last_cin = cin;
+       }
+}
+
 /*
  * CME protocol: like the standard protocol, but SysEx commands are sent as a
  * single USB packet preceded by a 0x0F byte.
@@ -660,6 +695,12 @@ static struct usb_protocol_ops snd_usbmidi_cme_ops = {
        .output_packet = snd_usbmidi_output_standard_packet,
 };
 
+static struct usb_protocol_ops snd_usbmidi_ch345_broken_sysex_ops = {
+       .input = ch345_broken_sysex_input,
+       .output = snd_usbmidi_standard_output,
+       .output_packet = snd_usbmidi_output_standard_packet,
+};
+
 /*
  * AKAI MPD16 protocol:
  *
@@ -1341,6 +1382,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
                 * Various chips declare a packet size larger than 4 bytes, but
                 * do not actually work with larger packets:
                 */
+       case USB_ID(0x0a67, 0x5011): /* Medeli DD305 */
        case USB_ID(0x0a92, 0x1020): /* ESI M4U */
        case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */
        case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */
@@ -2376,6 +2418,10 @@ int snd_usbmidi_create(struct snd_card *card,
                if (err < 0)
                        break;
 
+               err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
+               break;
+       case QUIRK_MIDI_CH345:
+               umidi->usb_protocol_ops = &snd_usbmidi_ch345_broken_sysex_ops;
                err = snd_usbmidi_detect_per_port_endpoints(umidi, endpoints);
                break;
        default:
index 1a1e2e4df35e5809e7f7d81b405ca6dddf2f4311..c60a776e815d72f14b9b6345f2e8a0266f8ec1b6 100644 (file)
@@ -2829,6 +2829,17 @@ YAMAHA_DEVICE(0x7010, "UB99"),
        .idProduct = 0x1020,
 },
 
+/* QinHeng devices */
+{
+       USB_DEVICE(0x1a86, 0x752d),
+       .driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+               .vendor_name = "QinHeng",
+               .product_name = "CH345",
+               .ifnum = 1,
+               .type = QUIRK_MIDI_CH345
+       }
+},
+
 /* KeithMcMillen Stringport */
 {
        USB_DEVICE(0x1f38, 0x0001),
index 5ca80e7d30cd25bcc67cdf88509f46d39eec42e6..7016ad8981873ca046000d631ac112c12ed62dc1 100644 (file)
@@ -538,6 +538,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
                [QUIRK_MIDI_CME] = create_any_midi_quirk,
                [QUIRK_MIDI_AKAI] = create_any_midi_quirk,
                [QUIRK_MIDI_FTDI] = create_any_midi_quirk,
+               [QUIRK_MIDI_CH345] = create_any_midi_quirk,
                [QUIRK_AUDIO_STANDARD_INTERFACE] = create_standard_audio_quirk,
                [QUIRK_AUDIO_FIXED_ENDPOINT] = create_fixed_stream_quirk,
                [QUIRK_AUDIO_EDIROL_UAXX] = create_uaxx_quirk,
index 15a12715bd05154bd9c0b4bbe7084f3df15022b2..b665d85555cb3aad0c9a621232f28d8e1f75344a 100644 (file)
@@ -95,6 +95,7 @@ enum quirk_type {
        QUIRK_MIDI_AKAI,
        QUIRK_MIDI_US122L,
        QUIRK_MIDI_FTDI,
+       QUIRK_MIDI_CH345,
        QUIRK_AUDIO_STANDARD_INTERFACE,
        QUIRK_AUDIO_FIXED_ENDPOINT,
        QUIRK_AUDIO_EDIROL_UAXX,
index 3224a049b196e87fd9fe23e0f20ea09c6ea04031..0558bb9ce0a6eadb92aba3a4880aadfa277e0d2c 100644 (file)
@@ -27,7 +27,7 @@ o The build system shall remain as simple as possible, avoiding any archive or
 o Where possible, any helper functions or other package-wide code shall be
   implemented in header files, avoiding the need to compile intermediate object
   files.
-o External dependendencies shall remain as minimal as possible. Currently gcc
+o External dependencies shall remain as minimal as possible. Currently gcc
   and glibc are the only dependencies.
 o Tests return 0 for success and < 0 for failure.
 
index e38cc54942dbf298dd1b880e3eabf5a9f2af29e6..882fe83a355442930a5fc1007a294eee6744b7cc 100644 (file)
@@ -492,6 +492,9 @@ TEST_SIGNAL(KILL_one_arg_six, SIGSYS)
        pid_t parent = getppid();
        int fd;
        void *map1, *map2;
+       int page_size = sysconf(_SC_PAGESIZE);
+
+       ASSERT_LT(0, page_size);
 
        ret = prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
        ASSERT_EQ(0, ret);
@@ -504,16 +507,16 @@ TEST_SIGNAL(KILL_one_arg_six, SIGSYS)
 
        EXPECT_EQ(parent, syscall(__NR_getppid));
        map1 = (void *)syscall(sysno,
-               NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, PAGE_SIZE);
+               NULL, page_size, PROT_READ, MAP_PRIVATE, fd, page_size);
        EXPECT_NE(MAP_FAILED, map1);
        /* mmap2() should never return. */
        map2 = (void *)syscall(sysno,
-                NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd, 0x0C0FFEE);
+                NULL, page_size, PROT_READ, MAP_PRIVATE, fd, 0x0C0FFEE);
        EXPECT_EQ(MAP_FAILED, map2);
 
        /* The test failed, so clean up the resources. */
-       munmap(map1, PAGE_SIZE);
-       munmap(map2, PAGE_SIZE);
+       munmap(map1, page_size);
+       munmap(map2, page_size);
        close(fd);
 }
 
index 21a0ab2d891949768d25ff45796f189bad0881e5..69bca185c471d1dec971f02403ae9fd60851f5bd 100644 (file)
@@ -221,17 +221,23 @@ void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu)
        kvm_timer_update_state(vcpu);
 
        /*
-        * If we enter the guest with the virtual input level to the VGIC
-        * asserted, then we have already told the VGIC what we need to, and
-        * we don't need to exit from the guest until the guest deactivates
-        * the already injected interrupt, so therefore we should set the
-        * hardware active state to prevent unnecessary exits from the guest.
-        *
-        * Conversely, if the virtual input level is deasserted, then always
-        * clear the hardware active state to ensure that hardware interrupts
-        * from the timer triggers a guest exit.
-        */
-       if (timer->irq.level)
+       * If we enter the guest with the virtual input level to the VGIC
+       * asserted, then we have already told the VGIC what we need to, and
+       * we don't need to exit from the guest until the guest deactivates
+       * the already injected interrupt, so therefore we should set the
+       * hardware active state to prevent unnecessary exits from the guest.
+       *
+       * Also, if we enter the guest with the virtual timer interrupt active,
+       * then it must be active on the physical distributor, because we set
+       * the HW bit and the guest must be able to deactivate the virtual and
+       * physical interrupt at the same time.
+       *
+       * Conversely, if the virtual input level is deasserted and the virtual
+       * interrupt is not active, then always clear the hardware active state
+       * to ensure that hardware interrupts from the timer triggers a guest
+       * exit.
+       */
+       if (timer->irq.level || kvm_vgic_map_is_active(vcpu, timer->map))
                phys_active = true;
        else
                phys_active = false;
index 533538385d5d294ce16bae446cc7e2b1578d9b7d..65461f821a75a7ffd3d0bdab471052e7061c8824 100644 (file)
@@ -1096,6 +1096,27 @@ static void vgic_retire_lr(int lr_nr, struct kvm_vcpu *vcpu)
        vgic_set_lr(vcpu, lr_nr, vlr);
 }
 
+static bool dist_active_irq(struct kvm_vcpu *vcpu)
+{
+       struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
+
+       return test_bit(vcpu->vcpu_id, dist->irq_active_on_cpu);
+}
+
+bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, struct irq_phys_map *map)
+{
+       int i;
+
+       for (i = 0; i < vcpu->arch.vgic_cpu.nr_lr; i++) {
+               struct vgic_lr vlr = vgic_get_lr(vcpu, i);
+
+               if (vlr.irq == map->virt_irq && vlr.state & LR_STATE_ACTIVE)
+                       return true;
+       }
+
+       return dist_active_irq(vcpu);
+}
+
 /*
  * An interrupt may have been disabled after being made pending on the
  * CPU interface (the classic case is a timer running while we're
@@ -1248,7 +1269,7 @@ static void __kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu)
         * may have been serviced from another vcpu. In all cases,
         * move along.
         */
-       if (!kvm_vgic_vcpu_pending_irq(vcpu) && !kvm_vgic_vcpu_active_irq(vcpu))
+       if (!kvm_vgic_vcpu_pending_irq(vcpu) && !dist_active_irq(vcpu))
                goto epilog;
 
        /* SGIs */
@@ -1396,25 +1417,13 @@ static bool vgic_process_maintenance(struct kvm_vcpu *vcpu)
 static bool vgic_sync_hwirq(struct kvm_vcpu *vcpu, int lr, struct vgic_lr vlr)
 {
        struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
-       struct irq_phys_map *map;
-       bool phys_active;
        bool level_pending;
-       int ret;
 
        if (!(vlr.state & LR_HW))
                return false;
 
-       map = vgic_irq_map_search(vcpu, vlr.irq);
-       BUG_ON(!map);
-
-       ret = irq_get_irqchip_state(map->irq,
-                                   IRQCHIP_STATE_ACTIVE,
-                                   &phys_active);
-
-       WARN_ON(ret);
-
-       if (phys_active)
-               return 0;
+       if (vlr.state & LR_STATE_ACTIVE)
+               return false;
 
        spin_lock(&dist->lock);
        level_pending = process_queued_irq(vcpu, lr, vlr);
@@ -1479,17 +1488,6 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu)
        return test_bit(vcpu->vcpu_id, dist->irq_pending_on_cpu);
 }
 
-int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu)
-{
-       struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
-
-       if (!irqchip_in_kernel(vcpu->kvm))
-               return 0;
-
-       return test_bit(vcpu->vcpu_id, dist->irq_active_on_cpu);
-}
-
-
 void vgic_kick_vcpus(struct kvm *kvm)
 {
        struct kvm_vcpu *vcpu;