Merge tag 'samsung-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
authorOlof Johansson <olof@lixom.net>
Fri, 1 Aug 2014 03:17:53 +0000 (20:17 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 1 Aug 2014 03:17:53 +0000 (20:17 -0700)
Merge "Samsung DT 2nd updates for v3.17" from Kukjin Kim:

This is based on tags/exynos-power because this DT changes
are depending PMU cleanup.

Fixes boot for exynos5260 and exynos5410,
- Since exynos cannot boot without obtaining PMU address via
  DT from now on, add PMU node for exynos5260 and exynos5410

For preparing exynos5250-spring,
- move max77686 and cypress,cyapa trackpad from exynos5250-
  cros-common to exynos5250-snow DT file
(Note exynos5250-spring is not included in this branch yet)

For exynos3250,
- add TMU node and remove duplicated interrupt-parent
- add missing pinctrl property for uart0 and uart1

For exynos5250-smdk5250 board
- add max77686 pmic interrupt property which is connected to
  gpx3

* tag 'samsung-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (28 commits)
  ARM: dts: Add missing pinctrl for uart0/1 for exynos3250
  ARM: dts: Remove duplicate 'interrput-parent' property for exynos3250
  ARM: dts: Add TMU dt node to monitor the temperature for exynos3250
  ARM: dts: Specify MAX77686 pmic interrupt for exynos5250-smdk5250
  ARM: dts: cypress,cyapa trackpad is exynos5250-Snow only
  ARM: dts: max77686 is exynos5250-snow only
  ARM: EXYNOS: Add exynos5260 PMU compatible string to DT match table
  ARM: dts: Add PMU DT node for exynos5260 SoC
  ARM: EXYNOS: Add support for Exynos5410 PMU
  ARM: dts: Add PMU to exynos5410
  ARM: dts: Document exynos5410 PMU
  ARM: EXYNOS: Move cpufreq and cpuidle device registration to init_machine
  ARM: EXYNOS: Refactored code for using PMU address via DT
  ARM: EXYNOS: Support cluster power off on exynos5420/5800
  ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm
  ARM: EXYNOS: do not allow cpuidle registration for exynos5420
  cpuidle: big.LITTLE: init driver for exynos5420
  cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config
  ARM: EXYNOS: add generic function to calculate cpu number
  cpuidle: big.LITTLE: add of_device_id structure
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
470 files changed:
Documentation/ABI/testing/sysfs-driver-tegra-fuse [new file with mode: 0644]
Documentation/devicetree/bindings/arm/adapteva.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/atmel-pmc.txt
Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method [new file with mode: 0644]
Documentation/devicetree/bindings/arm/brcm-brcmstb.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp [new file with mode: 0644]
Documentation/devicetree/bindings/arm/cpus.txt
Documentation/devicetree/bindings/arm/gic.txt
Documentation/devicetree/bindings/arm/marvell,berlin.txt
Documentation/devicetree/bindings/arm/omap/crossbar.txt
Documentation/devicetree/bindings/arm/omap/omap.txt
Documentation/devicetree/bindings/arm/omap/prcm.txt [new file with mode: 0644]
Documentation/devicetree/bindings/arm/tegra.txt
Documentation/devicetree/bindings/arm/xilinx.txt
Documentation/devicetree/bindings/clock/imx1-clock.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/imx21-clock.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/imx27-clock.txt
Documentation/devicetree/bindings/clock/imx6q-clock.txt
Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt [new file with mode: 0644]
Documentation/devicetree/bindings/clock/rockchip.txt
Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt [new file with mode: 0644]
Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt [new file with mode: 0644]
Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt [new file with mode: 0644]
Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt [new file with mode: 0644]
Documentation/devicetree/bindings/serial/cdns,uart.txt [new file with mode: 0644]
Documentation/devicetree/bindings/vendor-prefixes.txt
arch/arm/Kconfig
arch/arm/Kconfig.debug
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/aks-cdu.dts
arch/arm/boot/dts/am335x-evmsk.dts
arch/arm/boot/dts/am335x-pepper.dts [new file with mode: 0644]
arch/arm/boot/dts/am4372.dtsi
arch/arm/boot/dts/am437x-gp-evm.dts
arch/arm/boot/dts/am437x-sk-evm.dts [new file with mode: 0644]
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/animeo_ip.dts
arch/arm/boot/dts/armada-375-db.dts
arch/arm/boot/dts/armada-375.dtsi
arch/arm/boot/dts/armada-38x.dtsi
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts [new file with mode: 0644]
arch/arm/boot/dts/armada-xp-mv78230.dtsi
arch/arm/boot/dts/armada-xp-mv78260.dtsi
arch/arm/boot/dts/armada-xp-mv78460.dtsi
arch/arm/boot/dts/armada-xp.dtsi
arch/arm/boot/dts/at91-ariag25.dts
arch/arm/boot/dts/at91-cosino.dtsi
arch/arm/boot/dts/at91-foxg20.dts
arch/arm/boot/dts/at91-qil_a9260.dts
arch/arm/boot/dts/at91-sama5d3_xplained.dts
arch/arm/boot/dts/at91rm9200.dtsi
arch/arm/boot/dts/at91rm9200ek.dts
arch/arm/boot/dts/at91sam9260.dtsi
arch/arm/boot/dts/at91sam9261.dtsi
arch/arm/boot/dts/at91sam9261ek.dts
arch/arm/boot/dts/at91sam9263.dtsi
arch/arm/boot/dts/at91sam9263ek.dts
arch/arm/boot/dts/at91sam9g20.dtsi
arch/arm/boot/dts/at91sam9g20ek_common.dtsi
arch/arm/boot/dts/at91sam9g45.dtsi
arch/arm/boot/dts/at91sam9m10g45ek.dts
arch/arm/boot/dts/at91sam9n12.dtsi
arch/arm/boot/dts/at91sam9n12ek.dts
arch/arm/boot/dts/at91sam9rl.dtsi
arch/arm/boot/dts/at91sam9rlek.dts
arch/arm/boot/dts/at91sam9x5.dtsi
arch/arm/boot/dts/at91sam9x5cm.dtsi
arch/arm/boot/dts/bcm11351.dtsi
arch/arm/boot/dts/bcm21664.dtsi
arch/arm/boot/dts/bcm7445-bcm97445svmb.dts [new file with mode: 0644]
arch/arm/boot/dts/bcm7445.dtsi [new file with mode: 0644]
arch/arm/boot/dts/berlin2.dtsi
arch/arm/boot/dts/berlin2q-marvell-dmp.dts
arch/arm/boot/dts/berlin2q.dtsi
arch/arm/boot/dts/cros-ec-keyboard.dtsi [new file with mode: 0644]
arch/arm/boot/dts/dove-cubox-es.dts [new file with mode: 0644]
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/dra7xx-clocks.dtsi
arch/arm/boot/dts/ethernut5.dts
arch/arm/boot/dts/evk-pro3.dts
arch/arm/boot/dts/exynos5250-snow.dts
arch/arm/boot/dts/ge863-pro3.dtsi
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts [new file with mode: 0644]
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts [new file with mode: 0644]
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts [new file with mode: 0644]
arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard.dts
arch/arm/boot/dts/imx25-pdk.dts
arch/arm/boot/dts/imx25.dtsi
arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts [new file with mode: 0644]
arch/arm/boot/dts/imx27-pdk.dts
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi
arch/arm/boot/dts/imx27.dtsi
arch/arm/boot/dts/imx28-cfa10036.dts
arch/arm/boot/dts/imx28-m28.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx28-m28evk.dts
arch/arm/boot/dts/imx35-eukrea-mbimxsd35-baseboard.dts
arch/arm/boot/dts/imx35.dtsi
arch/arm/boot/dts/imx50.dtsi
arch/arm/boot/dts/imx51-babbage.dts
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts
arch/arm/boot/dts/imx51.dtsi
arch/arm/boot/dts/imx53-m53.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx53-m53evk.dts
arch/arm/boot/dts/imx53-mba53.dts
arch/arm/boot/dts/imx53-qsb-common.dtsi
arch/arm/boot/dts/imx53-tx53.dtsi
arch/arm/boot/dts/imx53-voipac-bsb.dts
arch/arm/boot/dts/imx53.dtsi
arch/arm/boot/dts/imx6dl-aristainetos_4.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-aristainetos_7.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-gw51xx.dts
arch/arm/boot/dts/imx6dl-gw52xx.dts
arch/arm/boot/dts/imx6dl-gw53xx.dts
arch/arm/boot/dts/imx6dl-gw54xx.dts
arch/arm/boot/dts/imx6dl-rex-basic.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-riotboard.dts
arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-tx6u-801x.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-tx6u-811x.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-wandboard-revb1.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6dl-wandboard.dts
arch/arm/boot/dts/imx6dl.dtsi
arch/arm/boot/dts/imx6q-cubox-i.dts
arch/arm/boot/dts/imx6q-dmo-edmqmx6.dts
arch/arm/boot/dts/imx6q-gw51xx.dts
arch/arm/boot/dts/imx6q-gw52xx.dts
arch/arm/boot/dts/imx6q-gw53xx.dts
arch/arm/boot/dts/imx6q-gw5400-a.dts
arch/arm/boot/dts/imx6q-gw54xx.dts
arch/arm/boot/dts/imx6q-rex-pro.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-tx6q-1010.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-tx6q-1020.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-tx6q-1110.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-udoo.dts
arch/arm/boot/dts/imx6q-wandboard-revb1.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6q-wandboard.dts
arch/arm/boot/dts/imx6q.dtsi
arch/arm/boot/dts/imx6qdl-aristainetos.dtsi [new file with mode: 0644]
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-nitrogen6x.dtsi
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
arch/arm/boot/dts/imx6qdl-rex.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
arch/arm/boot/dts/imx6qdl-sabresd.dtsi
arch/arm/boot/dts/imx6qdl-tx6.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-wandboard-revb1.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-wandboard-revc1.dtsi [new file with mode: 0644]
arch/arm/boot/dts/imx6qdl-wandboard.dtsi
arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6sl-evk.dts
arch/arm/boot/dts/imx6sl.dtsi
arch/arm/boot/dts/imx6sx-pinfunc.h [new file with mode: 0644]
arch/arm/boot/dts/imx6sx-sdb.dts [new file with mode: 0644]
arch/arm/boot/dts/imx6sx.dtsi [new file with mode: 0644]
arch/arm/boot/dts/k2e-clocks.dtsi
arch/arm/boot/dts/k2hk-clocks.dtsi
arch/arm/boot/dts/k2hk-evm.dts
arch/arm/boot/dts/k2l-clocks.dtsi
arch/arm/boot/dts/keystone-clocks.dtsi
arch/arm/boot/dts/keystone.dtsi
arch/arm/boot/dts/kirkwood-d2net.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-net2big.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-net5big.dts [new file with mode: 0644]
arch/arm/boot/dts/kirkwood-netxbig.dtsi [new file with mode: 0644]
arch/arm/boot/dts/kizbox.dts
arch/arm/boot/dts/mpa1600.dts
arch/arm/boot/dts/omap2420.dtsi
arch/arm/boot/dts/omap2430.dtsi
arch/arm/boot/dts/omap5-uevm.dts
arch/arm/boot/dts/pm9g45.dts
arch/arm/boot/dts/r7s72100-genmai.dts
arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
arch/arm/boot/dts/r8a73a4.dtsi
arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
arch/arm/boot/dts/r8a7740.dtsi
arch/arm/boot/dts/r8a7778-bockw-reference.dts
arch/arm/boot/dts/r8a7778.dtsi
arch/arm/boot/dts/r8a7779-marzen.dts
arch/arm/boot/dts/r8a7779.dtsi
arch/arm/boot/dts/r8a7790-lager.dts
arch/arm/boot/dts/r8a7790.dtsi
arch/arm/boot/dts/r8a7791-henninger.dts
arch/arm/boot/dts/r8a7791-koelsch.dts
arch/arm/boot/dts/r8a7791.dtsi
arch/arm/boot/dts/rk3066a-bqcurie2.dts
arch/arm/boot/dts/rk3066a-clocks.dtsi [deleted file]
arch/arm/boot/dts/rk3066a.dtsi
arch/arm/boot/dts/rk3188-clocks.dtsi [deleted file]
arch/arm/boot/dts/rk3188-radxarock.dts
arch/arm/boot/dts/rk3188.dtsi
arch/arm/boot/dts/rk3288-evb-act8846.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3288-evb-rk808.dts [new file with mode: 0644]
arch/arm/boot/dts/rk3288-evb.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3288.dtsi [new file with mode: 0644]
arch/arm/boot/dts/rk3xxx.dtsi
arch/arm/boot/dts/sama5d3.dtsi
arch/arm/boot/dts/sama5d3xcm.dtsi
arch/arm/boot/dts/sama5d3xmb.dtsi
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
arch/arm/boot/dts/sh73a0.dtsi
arch/arm/boot/dts/socfpga.dtsi
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-snowball.dts
arch/arm/boot/dts/sun4i-a10-a1000.dts
arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts [new file with mode: 0644]
arch/arm/boot/dts/sun4i-a10-cubieboard.dts
arch/arm/boot/dts/sun4i-a10-hackberry.dts
arch/arm/boot/dts/sun4i-a10-inet97fv2.dts
arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
arch/arm/boot/dts/sun4i-a10-olinuxino-lime.dts
arch/arm/boot/dts/sun4i-a10-pcduino.dts
arch/arm/boot/dts/sun4i-a10.dtsi
arch/arm/boot/dts/sun5i-a10s.dtsi
arch/arm/boot/dts/sun5i-a13.dtsi
arch/arm/boot/dts/sun6i-a31-hummingbird.dts [new file with mode: 0644]
arch/arm/boot/dts/sun6i-a31.dtsi
arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
arch/arm/boot/dts/sun7i-a20-cubietruck.dts
arch/arm/boot/dts/sun7i-a20-i12-tvbox.dts
arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
arch/arm/boot/dts/sun7i-a20-pcduino3.dts [new file with mode: 0644]
arch/arm/boot/dts/sun7i-a20.dtsi
arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts [new file with mode: 0644]
arch/arm/boot/dts/sun8i-a23.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tegra114-roth.dts
arch/arm/boot/dts/tegra114.dtsi
arch/arm/boot/dts/tegra124-jetson-tk1.dts
arch/arm/boot/dts/tegra124-venice2.dts
arch/arm/boot/dts/tegra124.dtsi
arch/arm/boot/dts/tegra20-medcom-wide.dts
arch/arm/boot/dts/tegra20-paz00.dts
arch/arm/boot/dts/tegra20-plutux.dts
arch/arm/boot/dts/tegra20-tamonten.dtsi
arch/arm/boot/dts/tegra20-tec.dts
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30-apalis-eval.dts [new file with mode: 0644]
arch/arm/boot/dts/tegra30-apalis.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tegra30.dtsi
arch/arm/boot/dts/tny_a9260_common.dtsi
arch/arm/boot/dts/tny_a9263.dts
arch/arm/boot/dts/usb_a9260_common.dtsi
arch/arm/boot/dts/usb_a9263.dts
arch/arm/boot/dts/vf610.dtsi
arch/arm/boot/dts/zynq-7000.dtsi
arch/arm/boot/dts/zynq-parallella.dts [new file with mode: 0644]
arch/arm/boot/dts/zynq-zc702.dts
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/configs/imx_v6_v7_defconfig
arch/arm/configs/multi_v7_defconfig
arch/arm/configs/mxs_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-imx/Kconfig
arch/arm/mach-imx/Makefile
arch/arm/mach-imx/clk-imx1.c
arch/arm/mach-imx/clk-imx21.c
arch/arm/mach-imx/clk-imx25.c
arch/arm/mach-imx/clk-imx27.c
arch/arm/mach-imx/clk-imx31.c
arch/arm/mach-imx/clk-imx35.c
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-imx/clk-imx6q.c
arch/arm/mach-imx/clk-imx6sl.c
arch/arm/mach-imx/clk-imx6sx.c
arch/arm/mach-imx/clk-vf610.c
arch/arm/mach-imx/clk.c
arch/arm/mach-imx/clk.h
arch/arm/mach-imx/common.h
arch/arm/mach-imx/cpu-imx5.c
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/cpuidle-imx6q.c
arch/arm/mach-imx/crm-regs-imx5.h [deleted file]
arch/arm/mach-imx/devices-imx51.h [deleted file]
arch/arm/mach-imx/devices/Kconfig
arch/arm/mach-imx/devices/Makefile
arch/arm/mach-imx/devices/devices-common.h
arch/arm/mach-imx/devices/platform-fec.c
arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
arch/arm/mach-imx/devices/platform-imx-i2c.c
arch/arm/mach-imx/devices/platform-imx-keypad.c
arch/arm/mach-imx/devices/platform-imx-ssi.c
arch/arm/mach-imx/devices/platform-imx-uart.c
arch/arm/mach-imx/devices/platform-imx2-wdt.c
arch/arm/mach-imx/devices/platform-imx_udc.c [deleted file]
arch/arm/mach-imx/devices/platform-mx1-camera.c [deleted file]
arch/arm/mach-imx/devices/platform-mxc-ehci.c
arch/arm/mach-imx/devices/platform-mxc_nand.c
arch/arm/mach-imx/devices/platform-mxc_rnga.c
arch/arm/mach-imx/devices/platform-pata_imx.c
arch/arm/mach-imx/devices/platform-sdhci-esdhc-imx.c
arch/arm/mach-imx/devices/platform-spi_imx.c
arch/arm/mach-imx/ehci-imx25.c
arch/arm/mach-imx/ehci-imx27.c
arch/arm/mach-imx/ehci-imx31.c
arch/arm/mach-imx/ehci-imx35.c
arch/arm/mach-imx/ehci-imx5.c [deleted file]
arch/arm/mach-imx/ehci.h [new file with mode: 0644]
arch/arm/mach-imx/gpc.c
arch/arm/mach-imx/hardware.h
arch/arm/mach-imx/imx25-dt.c
arch/arm/mach-imx/imx27-dt.c
arch/arm/mach-imx/imx31-dt.c
arch/arm/mach-imx/imx35-dt.c
arch/arm/mach-imx/imx51-dt.c [deleted file]
arch/arm/mach-imx/iomux-mx51.h [deleted file]
arch/arm/mach-imx/mach-armadillo5x0.c
arch/arm/mach-imx/mach-cpuimx27.c
arch/arm/mach-imx/mach-cpuimx35.c
arch/arm/mach-imx/mach-eukrea_cpuimx25.c
arch/arm/mach-imx/mach-imx27_visstrim_m10.c
arch/arm/mach-imx/mach-imx27ipcam.c [deleted file]
arch/arm/mach-imx/mach-imx27lite.c [deleted file]
arch/arm/mach-imx/mach-imx50.c
arch/arm/mach-imx/mach-imx51.c [new file with mode: 0644]
arch/arm/mach-imx/mach-imx53.c
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sl.c
arch/arm/mach-imx/mach-imx6sx.c
arch/arm/mach-imx/mach-mx25_3ds.c
arch/arm/mach-imx/mach-mx27_3ds.c
arch/arm/mach-imx/mach-mx31_3ds.c
arch/arm/mach-imx/mach-mx31lilly.c
arch/arm/mach-imx/mach-mx31lite.c
arch/arm/mach-imx/mach-mx31moboard.c
arch/arm/mach-imx/mach-mx35_3ds.c
arch/arm/mach-imx/mach-pca100.c
arch/arm/mach-imx/mach-pcm037.c
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mach-pcm043.c
arch/arm/mach-imx/mach-vf610.c
arch/arm/mach-imx/mach-vpr200.c
arch/arm/mach-imx/mm-imx5.c [deleted file]
arch/arm/mach-imx/mx1-camera-fiq-ksym.c [deleted file]
arch/arm/mach-imx/mx1-camera-fiq.S [deleted file]
arch/arm/mach-imx/mx31moboard-devboard.c
arch/arm/mach-imx/mx31moboard-marxbot.c
arch/arm/mach-imx/mx31moboard-smartbot.c
arch/arm/mach-imx/mx51.h [deleted file]
arch/arm/mach-imx/mx53.h [deleted file]
arch/arm/mach-imx/mxc.h
arch/arm/mach-imx/pm-imx5.c
arch/arm/mach-imx/pm-imx6.c
arch/arm/mach-imx/system.c
arch/arm/mach-imx/time.c
arch/arm/mach-imx/tzic.c
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/cclock2420_data.c [deleted file]
arch/arm/mach-omap2/cclock2430_data.c [deleted file]
arch/arm/mach-omap2/clkt2xxx_osc.c [deleted file]
arch/arm/mach-omap2/clkt2xxx_sys.c [deleted file]
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock2xxx.h
arch/arm/mach-omap2/cm-regbits-24xx.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/prm_common.c
arch/arm/mach-rockchip/Kconfig
arch/arm/mach-rockchip/rockchip.c
arch/arm/mach-shmobile/clock-r8a73a4.c
arch/arm/mach-shmobile/clock-r8a7740.c
arch/arm/mach-shmobile/clock-r8a7778.c
arch/arm/mach-shmobile/clock-sh73a0.c
arch/arm/mach-shmobile/setup-r8a73a4.c
arch/arm/mach-shmobile/setup-r8a7740.c
arch/arm/mach-shmobile/setup-r8a7778.c
arch/arm/mach-shmobile/setup-sh73a0.c
arch/arm/mach-shmobile/timer.c
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/apbio.c [deleted file]
arch/arm/mach-tegra/apbio.h [deleted file]
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/cpuidle-tegra114.c
arch/arm/mach-tegra/cpuidle-tegra20.c
arch/arm/mach-tegra/cpuidle-tegra30.c
arch/arm/mach-tegra/cpuidle.c
arch/arm/mach-tegra/flowctrl.c
arch/arm/mach-tegra/fuse.c [deleted file]
arch/arm/mach-tegra/fuse.h [deleted file]
arch/arm/mach-tegra/hotplug.c
arch/arm/mach-tegra/io.c
arch/arm/mach-tegra/irq.c
arch/arm/mach-tegra/platsmp.c
arch/arm/mach-tegra/pm-tegra20.c
arch/arm/mach-tegra/pm-tegra30.c
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pmc.c
arch/arm/mach-tegra/powergate.c
arch/arm/mach-tegra/reset-handler.S
arch/arm/mach-tegra/reset.c
arch/arm/mach-tegra/sleep-tegra30.S
arch/arm/mach-tegra/tegra.c
arch/arm/mach-tegra/tegra114_speedo.c [deleted file]
arch/arm/mach-tegra/tegra20_speedo.c [deleted file]
arch/arm/mach-tegra/tegra30_speedo.c [deleted file]
drivers/amba/tegra-ahb.c
drivers/bus/imx-weim.c
drivers/clk/clk-composite.c
drivers/clk/rockchip/Makefile
drivers/clk/rockchip/clk-pll.c [new file with mode: 0644]
drivers/clk/rockchip/clk-rk3188.c [new file with mode: 0644]
drivers/clk/rockchip/clk-rk3288.c [new file with mode: 0644]
drivers/clk/rockchip/clk.c [new file with mode: 0644]
drivers/clk/rockchip/clk.h [new file with mode: 0644]
drivers/clk/rockchip/softrst.c [new file with mode: 0644]
drivers/clk/tegra/clk-periph-gate.c
drivers/clk/tegra/clk-tegra30.c
drivers/clk/tegra/clk.c
drivers/gpu/drm/tegra/gr3d.c
drivers/gpu/drm/tegra/sor.c
drivers/iommu/tegra-smmu.c
drivers/irqchip/irq-crossbar.c
drivers/misc/fuse/Makefile [new file with mode: 0644]
drivers/pci/host/pci-tegra.c
drivers/pinctrl/Kconfig
drivers/pinctrl/Makefile
drivers/pinctrl/pinctrl-tegra-xusb.c [new file with mode: 0644]
drivers/soc/Makefile
drivers/soc/tegra/Makefile [new file with mode: 0644]
drivers/soc/tegra/fuse/Makefile [new file with mode: 0644]
drivers/soc/tegra/fuse/fuse-tegra.c [new file with mode: 0644]
drivers/soc/tegra/fuse/fuse-tegra20.c [new file with mode: 0644]
drivers/soc/tegra/fuse/fuse-tegra30.c [new file with mode: 0644]
drivers/soc/tegra/fuse/fuse.h [new file with mode: 0644]
drivers/soc/tegra/fuse/speedo-tegra114.c [new file with mode: 0644]
drivers/soc/tegra/fuse/speedo-tegra124.c [new file with mode: 0644]
drivers/soc/tegra/fuse/speedo-tegra20.c [new file with mode: 0644]
drivers/soc/tegra/fuse/speedo-tegra30.c [new file with mode: 0644]
drivers/soc/tegra/fuse/tegra-apbmisc.c [new file with mode: 0644]
include/dt-bindings/clock/imx1-clock.h [new file with mode: 0644]
include/dt-bindings/clock/imx21-clock.h [new file with mode: 0644]
include/dt-bindings/clock/imx27-clock.h [new file with mode: 0644]
include/dt-bindings/clock/imx6qdl-clock.h [new file with mode: 0644]
include/dt-bindings/clock/r8a7790-clock.h
include/dt-bindings/clock/r8a7791-clock.h
include/dt-bindings/clock/rk3066a-cru.h [new file with mode: 0644]
include/dt-bindings/clock/rk3188-cru-common.h [new file with mode: 0644]
include/dt-bindings/clock/rk3188-cru.h [new file with mode: 0644]
include/dt-bindings/clock/rk3288-cru.h [new file with mode: 0644]
include/dt-bindings/clock/vf610-clock.h
include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h [new file with mode: 0644]
include/linux/platform_data/camera-mx1.h [deleted file]
include/linux/platform_data/usb-ehci-mxc.h
include/linux/platform_data/usb-imx_udc.h [deleted file]
include/linux/tegra-ahb.h [deleted file]
include/linux/tegra-cpuidle.h [deleted file]
include/linux/tegra-powergate.h [deleted file]
include/linux/tegra-soc.h [deleted file]
include/soc/tegra/ahb.h [new file with mode: 0644]
include/soc/tegra/cpuidle.h [new file with mode: 0644]
include/soc/tegra/fuse.h [new file with mode: 0644]
include/soc/tegra/powergate.h [new file with mode: 0644]

diff --git a/Documentation/ABI/testing/sysfs-driver-tegra-fuse b/Documentation/ABI/testing/sysfs-driver-tegra-fuse
new file mode 100644 (file)
index 0000000..69f5af6
--- /dev/null
@@ -0,0 +1,11 @@
+What:          /sys/devices/*/<our-device>/fuse
+Date:          February 2014
+Contact:       Peter De Schrijver <pdeschrijver@nvidia.com>
+Description:   read-only access to the efuses on Tegra20, Tegra30, Tegra114
+               and Tegra124 SoC's from NVIDIA. The efuses contain write once
+               data programmed at the factory. The data is layed out in 32bit
+               words in LSB first format. Each bit represents a single value
+               as decoded from the fuse registers. Bits order/assignment
+               exactly matches the HW registers, including any unused bits.
+Users:         any user space application which wants to read the efuses on
+               Tegra SoC's
diff --git a/Documentation/devicetree/bindings/arm/adapteva.txt b/Documentation/devicetree/bindings/arm/adapteva.txt
new file mode 100644 (file)
index 0000000..1d8af9e
--- /dev/null
@@ -0,0 +1,7 @@
+Adapteva Platforms Device Tree Bindings
+---------------------------------------
+
+Parallella board
+
+Required root node properties:
+    - compatible = "adapteva,parallella";
diff --git a/Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt b/Documentation/devicetree/bindings/arm/armada-380-mpcore-soc-ctrl.txt
new file mode 100644 (file)
index 0000000..8781073
--- /dev/null
@@ -0,0 +1,14 @@
+Marvell Armada 38x CA9 MPcore SoC Controller
+============================================
+
+Required properties:
+
+- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl".
+
+- reg: should be the register base and length as documented in the
+  datasheet for the CA9 MPcore SoC Control registers
+
+mpcore-soc-ctrl@20d20 {
+       compatible = "marvell,armada-380-mpcore-soc-ctrl";
+       reg = <0x20d20 0x6c>;
+};
index 389bed5..795cc78 100644 (file)
@@ -1,7 +1,10 @@
 * Power Management Controller (PMC)
 
 Required properties:
-- compatible: Should be "atmel,at91rm9200-pmc"
+- compatible: Should be "atmel,<chip>-pmc".
+       <chip> can be: at91rm9200, at91sam9260, at91sam9g45, at91sam9n12,
+       at91sam9x5, sama5d3
+
 - reg: Should contain PMC registers location and length
 
 Examples:
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm11351-cpu-method
new file mode 100644 (file)
index 0000000..8240c02
--- /dev/null
@@ -0,0 +1,36 @@
+Broadcom Kona Family CPU Enable Method
+--------------------------------------
+This binding defines the enable method used for starting secondary
+CPUs in the following Broadcom SoCs:
+  BCM11130, BCM11140, BCM11351, BCM28145, BCM28155, BCM21664
+
+The enable method is specified by defining the following required
+properties in the "cpus" device tree node:
+  - enable-method = "brcm,bcm11351-cpu-method";
+  - secondary-boot-reg = <...>;
+
+The secondary-boot-reg property is a u32 value that specifies the
+physical address of the register used to request the ROM holding pen
+code release a secondary CPU.  The value written to the register is
+formed by encoding the target CPU id into the low bits of the
+physical start address it should jump to.
+
+Example:
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "brcm,bcm11351-cpu-method";
+               secondary-boot-reg = <0x3500417c>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <0>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <1>;
+               };
+       };
diff --git a/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt b/Documentation/devicetree/bindings/arm/brcm-brcmstb.txt
new file mode 100644 (file)
index 0000000..3c436cc
--- /dev/null
@@ -0,0 +1,95 @@
+ARM Broadcom STB platforms Device Tree Bindings
+-----------------------------------------------
+Boards with Broadcom Brahma15 ARM-based BCMxxxx (generally BCM7xxx variants)
+SoC shall have the following DT organization:
+
+Required root node properties:
+    - compatible: "brcm,bcm<chip_id>", "brcm,brcmstb"
+
+example:
+/ {
+    #address-cells = <2>;
+    #size-cells = <2>;
+    model = "Broadcom STB (bcm7445)";
+    compatible = "brcm,bcm7445", "brcm,brcmstb";
+
+Further, syscon nodes that map platform-specific registers used for general
+system control is required:
+
+    - compatible: "brcm,bcm<chip_id>-sun-top-ctrl", "syscon"
+    - compatible: "brcm,bcm<chip_id>-hif-cpubiuctrl", "syscon"
+    - compatible: "brcm,bcm<chip_id>-hif-continuation", "syscon"
+
+example:
+    rdb {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        compatible = "simple-bus";
+        ranges = <0 0x00 0xf0000000 0x1000000>;
+
+        sun_top_ctrl: syscon@404000 {
+            compatible = "brcm,bcm7445-sun-top-ctrl", "syscon";
+            reg = <0x404000 0x51c>;
+        };
+
+        hif_cpubiuctrl: syscon@3e2400 {
+            compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon";
+            reg = <0x3e2400 0x5b4>;
+        };
+
+        hif_continuation: syscon@452000 {
+            compatible = "brcm,bcm7445-hif-continuation", "syscon";
+            reg = <0x452000 0x100>;
+        };
+    };
+
+Lastly, nodes that allow for support of SMP initialization and reboot are
+required:
+
+smpboot
+-------
+Required properties:
+
+    - compatible
+        The string "brcm,brcmstb-smpboot".
+
+    - syscon-cpu
+        A phandle / integer array property which lets the BSP know the location
+        of certain CPU power-on registers.
+
+        The layout of the property is as follows:
+            o a phandle to the "hif_cpubiuctrl" syscon node
+            o offset to the base CPU power zone register
+            o offset to the base CPU reset register
+
+    - syscon-cont
+        A phandle pointing to the syscon node which describes the CPU boot
+        continuation registers.
+            o a phandle to the "hif_continuation" syscon node
+
+example:
+    smpboot {
+        compatible = "brcm,brcmstb-smpboot";
+        syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>;
+        syscon-cont = <&hif_continuation>;
+    };
+
+reboot
+-------
+Required properties
+
+    - compatible
+        The string property "brcm,brcmstb-reboot".
+
+    - syscon
+        A phandle / integer array that points to the syscon node which describes
+        the general system reset registers.
+            o a phandle to "sun_top_ctrl"
+            o offset to the "reset source enable" register
+            o offset to the "software master reset" register
+
+example:
+    reboot {
+        compatible = "brcm,brcmstb-reboot";
+        syscon = <&sun_top_ctrl 0x304 0x308>;
+    };
diff --git a/Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp b/Documentation/devicetree/bindings/arm/cpu-enable-method/marvell,berlin-smp
new file mode 100644 (file)
index 0000000..cd236b7
--- /dev/null
@@ -0,0 +1,41 @@
+========================================================
+Secondary CPU enable-method "marvell,berlin-smp" binding
+========================================================
+
+This document describes the "marvell,berlin-smp" method for enabling secondary
+CPUs. To apply to all CPUs, a single "marvell,berlin-smp" enable method should
+be defined in the "cpus" node.
+
+Enable method name:    "marvell,berlin-smp"
+Compatible machines:   "marvell,berlin2" and "marvell,berlin2q"
+Compatible CPUs:       "marvell,pj4b" and "arm,cortex-a9"
+Related properties:    (none)
+
+Note:
+This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and
+"marvell,berlin-cpu-ctrl"[1].
+
+Example:
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "marvell,berlin-smp";
+
+               cpu@0 {
+                       compatible = "marvell,pj4b";
+                       device_type = "cpu";
+                       next-level-cache = <&l2>;
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       compatible = "marvell,pj4b";
+                       device_type = "cpu";
+                       next-level-cache = <&l2>;
+                       reg = <1>;
+               };
+       };
+
+--
+[1] arm/marvell,berlin.txt
index 1fe72a0..298e2f6 100644 (file)
@@ -152,7 +152,9 @@ nodes to be present and contain the properties described below.
                            "arm,cortex-a7"
                            "arm,cortex-a8"
                            "arm,cortex-a9"
+                           "arm,cortex-a12"
                            "arm,cortex-a15"
+                           "arm,cortex-a17"
                            "arm,cortex-a53"
                            "arm,cortex-a57"
                            "arm,cortex-m0"
@@ -163,6 +165,7 @@ nodes to be present and contain the properties described below.
                            "arm,cortex-r4"
                            "arm,cortex-r5"
                            "arm,cortex-r7"
+                           "brcm,brahma-b15"
                            "faraday,fa526"
                            "intel,sa110"
                            "intel,sa1100"
@@ -184,6 +187,7 @@ nodes to be present and contain the properties described below.
                          can be one of:
                            "allwinner,sun6i-a31"
                            "arm,psci"
+                           "brcm,brahma-b15"
                            "marvell,armada-375-smp"
                            "marvell,armada-380-smp"
                            "marvell,armada-xp-smp"
index 5573c08..c7d2fa1 100644 (file)
@@ -16,6 +16,7 @@ Main node required properties:
        "arm,cortex-a9-gic"
        "arm,cortex-a7-gic"
        "arm,arm11mp-gic"
+       "brcm,brahma-b15-gic"
 - interrupt-controller : Identifies the node as an interrupt controller
 - #interrupt-cells : Specifies the number of cells needed to encode an
   interrupt source.  The type shall be a <u32> and the value shall be 3.
index 94013a9..904de57 100644 (file)
@@ -24,6 +24,22 @@ SoC and board used. Currently known SoC compatibles are:
        ...
 }
 
+* Marvell Berlin CPU control bindings
+
+CPU control register allows various operations on CPUs, like resetting them
+independently.
+
+Required properties:
+- compatible: should be "marvell,berlin-cpu-ctrl"
+- reg: address and length of the register set
+
+Example:
+
+cpu-ctrl@f7dd0000 {
+       compatible = "marvell,berlin-cpu-ctrl";
+       reg = <0xf7dd0000 0x10000>;
+};
+
 * Marvell Berlin2 chip control binding
 
 Marvell Berlin SoCs have a chip control register set providing several
index fb88585..4139db3 100644 (file)
@@ -10,6 +10,7 @@ Required properties:
 - compatible : Should be "ti,irq-crossbar"
 - reg: Base address and the size of the crossbar registers.
 - ti,max-irqs: Total number of irqs available at the interrupt controller.
+- ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed.
 - ti,reg-size: Size of a individual register in bytes. Every individual
            register is assumed to be of same size. Valid sizes are 1, 2, 4.
 - ti,irqs-reserved: List of the reserved irq lines that are not muxed using
@@ -17,11 +18,46 @@ Required properties:
                 so crossbar bar driver should not consider them as free
                 lines.
 
+Optional properties:
+- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
+  SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
+  crossbar. These irqs have a crossbar register, but still cannot be used.
+
+- ti,irqs-safe-map: integer which maps to a safe configuration to use
+  when the interrupt controller irq is unused (when not provided, default is 0)
+
 Examples:
                crossbar_mpu: @4a020000 {
                        compatible = "ti,irq-crossbar";
                        reg = <0x4a002a48 0x130>;
                        ti,max-irqs = <160>;
+                       ti,max-crossbar-sources = <400>;
                        ti,reg-size = <2>;
                        ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>;
+                       ti,irqs-skip = <10 133 139 140>;
                };
+
+Consumer:
+========
+See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and
+Documentation/devicetree/bindings/arm/gic.txt for further details.
+
+An interrupt consumer on an SoC using crossbar will use:
+       interrupts = <GIC_SPI request_number interrupt_level>
+When the request number is between 0 to that described by
+"ti,max-crossbar-sources", it is assumed to be a crossbar mapping. If the
+request_number is greater than "ti,max-crossbar-sources", then it is mapped as a
+quirky hardware mapping direct to GIC.
+
+Example:
+       device_x@0x4a023000 {
+               /* Crossbar 8 used */
+               interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+               ...
+       };
+
+       device_y@0x4a033000 {
+               /* Direct mapped GIC SPI 1 used */
+               interrupts = <GIC_SPI DIRECT_IRQ(1) IRQ_TYPE_LEVEL_HIGH>;
+               ...
+       };
index d22b216..0edc903 100644 (file)
@@ -129,6 +129,9 @@ Boards:
 - AM437x GP EVM
   compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43"
 
+- AM437x SK EVM: AM437x StarterKit Evaluation Module
+  compatible = "ti,am437x-sk-evm", "ti,am4372", "ti,am43"
+
 - DRA742 EVM:  Software Development Board for DRA742
   compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
 
diff --git a/Documentation/devicetree/bindings/arm/omap/prcm.txt b/Documentation/devicetree/bindings/arm/omap/prcm.txt
new file mode 100644 (file)
index 0000000..79074da
--- /dev/null
@@ -0,0 +1,65 @@
+OMAP PRCM bindings
+
+Power Reset and Clock Manager lists the device clocks and clockdomains under
+a DT hierarchy. Each TI SoC can have multiple PRCM entities listed for it,
+each describing one module and the clock hierarchy under it. see [1] for
+documentation about the individual clock/clockdomain nodes.
+
+[1] Documentation/devicetree/bindings/clock/ti/*
+
+Required properties:
+- compatible:  Must be one of:
+               "ti,am3-prcm"
+               "ti,am3-scrm"
+               "ti,am4-prcm"
+               "ti,am4-scrm"
+               "ti,omap2-prcm"
+               "ti,omap2-scrm"
+               "ti,omap3-prm"
+               "ti,omap3-cm"
+               "ti,omap3-scrm"
+               "ti,omap4-cm1"
+               "ti,omap4-prm"
+               "ti,omap4-cm2"
+               "ti,omap4-scrm"
+               "ti,omap5-prm"
+               "ti,omap5-cm-core-aon"
+               "ti,omap5-scrm"
+               "ti,omap5-cm-core"
+               "ti,dra7-prm"
+               "ti,dra7-cm-core-aon"
+               "ti,dra7-cm-core"
+- reg:         Contains PRCM module register address range
+               (base address and length)
+- clocks:      clocks for this module
+- clockdomains:        clockdomains for this module
+
+Example:
+
+cm: cm@48004000 {
+       compatible = "ti,omap3-cm";
+       reg = <0x48004000 0x4000>;
+
+       cm_clocks: clocks {
+               #address-cells = <1>;
+               #size-cells = <0>;
+       };
+
+       cm_clockdomains: clockdomains {
+       };
+}
+
+&cm_clocks {
+       omap2_32k_fck: omap_32k_fck {
+               #clock-cells = <0>;
+               compatible = "fixed-clock";
+               clock-frequency = <32768>;
+       };
+};
+
+&cm_clockdomains {
+       core_l3_clkdm: core_l3_clkdm {
+               compatible = "ti,clockdomain";
+               clocks = <&sdrc_ick>;
+       };
+};
index 558ed4b..73278c6 100644 (file)
@@ -30,6 +30,8 @@ board-specific compatible values:
   nvidia,seaboard
   nvidia,ventana
   nvidia,whistler
+  toradex,apalis_t30
+  toradex,apalis_t30-eval
   toradex,colibri_t20-512
   toradex,iris
 
index 6f1ed83..1f79953 100644 (file)
@@ -1,7 +1,7 @@
-Xilinx Zynq EP107 Emulation Platform board
+Xilinx Zynq Platforms Device Tree Bindings
 
-This board is an emulation platform for the Zynq product which is
-based on an ARM Cortex A9 processor.
+Boards with Zynq-7000 SOC based on an ARM Cortex A9 processor
+shall have the following properties.
 
 Required root node properties:
-    - compatible = "xlnx,zynq-ep107";
+    - compatible = "xlnx,zynq-7000";
diff --git a/Documentation/devicetree/bindings/clock/imx1-clock.txt b/Documentation/devicetree/bindings/clock/imx1-clock.txt
new file mode 100644 (file)
index 0000000..b7adf4e
--- /dev/null
@@ -0,0 +1,26 @@
+* Clock bindings for Freescale i.MX1 CPUs
+
+Required properties:
+- compatible: Should be "fsl,imx1-ccm".
+- reg: Address and length of the register set.
+- #clock-cells: Should be <1>.
+
+The clock consumer should specify the desired clock by having the clock
+ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx1-clock.h
+for the full list of i.MX1 clock IDs.
+
+Examples:
+       clks: ccm@0021b000 {
+               #clock-cells = <1>;
+               compatible = "fsl,imx1-ccm";
+               reg = <0x0021b000 0x1000>;
+       };
+
+       pwm: pwm@00208000 {
+               #pwm-cells = <2>;
+               compatible = "fsl,imx1-pwm";
+               reg = <0x00208000 0x1000>;
+               interrupts = <34>;
+               clocks = <&clks IMX1_CLK_DUMMY>, <&clks IMX1_CLK_PER1>;
+               clock-names = "ipg", "per";
+       };
diff --git a/Documentation/devicetree/bindings/clock/imx21-clock.txt b/Documentation/devicetree/bindings/clock/imx21-clock.txt
new file mode 100644 (file)
index 0000000..c3b0db4
--- /dev/null
@@ -0,0 +1,28 @@
+* Clock bindings for Freescale i.MX21
+
+Required properties:
+- compatible  : Should be "fsl,imx21-ccm".
+- reg         : Address and length of the register set.
+- interrupts  : Should contain CCM interrupt.
+- #clock-cells: Should be <1>.
+
+The clock consumer should specify the desired clock by having the clock
+ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx21-clock.h
+for the full list of i.MX21 clock IDs.
+
+Examples:
+       clks: ccm@10027000{
+               compatible = "fsl,imx21-ccm";
+               reg = <0x10027000 0x800>;
+               #clock-cells = <1>;
+       };
+
+       uart1: serial@1000a000 {
+               compatible = "fsl,imx21-uart";
+               reg = <0x1000a000 0x1000>;
+               interrupts = <20>;
+               clocks = <&clks IMX21_CLK_UART1_IPG_GATE>,
+                        <&clks IMX21_CLK_PER1>;
+               clock-names = "ipg", "per";
+               status = "disabled";
+       };
index 6bc9fd2..cc05de9 100644 (file)
@@ -7,117 +7,22 @@ Required properties:
 - #clock-cells: Should be <1>
 
 The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell.  The following is a full list of i.MX27
-clocks and IDs.
-
-       Clock               ID
-       -----------------------
-       dummy                0
-       ckih                 1
-       ckil                 2
-       mpll                 3
-       spll                 4
-       mpll_main2           5
-       ahb                  6
-       ipg                  7
-       nfc_div              8
-       per1_div             9
-       per2_div             10
-       per3_div             11
-       per4_div             12
-       vpu_sel              13
-       vpu_div              14
-       usb_div              15
-       cpu_sel              16
-       clko_sel             17
-       cpu_div              18
-       clko_div             19
-       ssi1_sel             20
-       ssi2_sel             21
-       ssi1_div             22
-       ssi2_div             23
-       clko_en              24
-       ssi2_ipg_gate        25
-       ssi1_ipg_gate        26
-       slcdc_ipg_gate       27
-       sdhc3_ipg_gate       28
-       sdhc2_ipg_gate       29
-       sdhc1_ipg_gate       30
-       scc_ipg_gate         31
-       sahara_ipg_gate      32
-       rtc_ipg_gate         33
-       pwm_ipg_gate         34
-       owire_ipg_gate       35
-       lcdc_ipg_gate        36
-       kpp_ipg_gate         37
-       iim_ipg_gate         38
-       i2c2_ipg_gate        39
-       i2c1_ipg_gate        40
-       gpt6_ipg_gate        41
-       gpt5_ipg_gate        42
-       gpt4_ipg_gate        43
-       gpt3_ipg_gate        44
-       gpt2_ipg_gate        45
-       gpt1_ipg_gate        46
-       gpio_ipg_gate        47
-       fec_ipg_gate         48
-       emma_ipg_gate        49
-       dma_ipg_gate         50
-       cspi3_ipg_gate       51
-       cspi2_ipg_gate       52
-       cspi1_ipg_gate       53
-       nfc_baud_gate        54
-       ssi2_baud_gate       55
-       ssi1_baud_gate       56
-       vpu_baud_gate        57
-       per4_gate            58
-       per3_gate            59
-       per2_gate            60
-       per1_gate            61
-       usb_ahb_gate         62
-       slcdc_ahb_gate       63
-       sahara_ahb_gate      64
-       lcdc_ahb_gate        65
-       vpu_ahb_gate         66
-       fec_ahb_gate         67
-       emma_ahb_gate        68
-       emi_ahb_gate         69
-       dma_ahb_gate         70
-       csi_ahb_gate         71
-       brom_ahb_gate        72
-       ata_ahb_gate         73
-       wdog_ipg_gate        74
-       usb_ipg_gate         75
-       uart6_ipg_gate       76
-       uart5_ipg_gate       77
-       uart4_ipg_gate       78
-       uart3_ipg_gate       79
-       uart2_ipg_gate       80
-       uart1_ipg_gate       81
-       ckih_div1p5          82
-       fpm                  83
-       mpll_osc_sel         84
-       mpll_sel             85
-       spll_gate            86
-       mshc_div             87
-       rtic_ipg_gate        88
-       mshc_ipg_gate        89
-       rtic_ahb_gate        90
-       mshc_baud_gate       91
+ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx27-clock.h
+for the full list of i.MX27 clock IDs.
 
 Examples:
+       clks: ccm@10027000{
+               compatible = "fsl,imx27-ccm";
+               reg = <0x10027000 0x1000>;
+               #clock-cells = <1>;
+       };
 
-clks: ccm@10027000{
-       compatible = "fsl,imx27-ccm";
-       reg = <0x10027000 0x1000>;
-       #clock-cells = <1>;
-};
-
-uart1: serial@1000a000 {
-       compatible = "fsl,imx27-uart", "fsl,imx21-uart";
-       reg = <0x1000a000 0x1000>;
-       interrupts = <20>;
-       clocks = <&clks 81>, <&clks 61>;
-       clock-names = "ipg", "per";
-       status = "disabled";
-};
+       uart1: serial@1000a000 {
+               compatible = "fsl,imx27-uart", "fsl,imx21-uart";
+               reg = <0x1000a000 0x1000>;
+               interrupts = <20>;
+               clocks = <&clks IMX27_CLK_UART1_IPG_GATE>,
+                        <&clks IMX27_CLK_PER1_GATE>;
+               clock-names = "ipg", "per";
+               status = "disabled";
+       };
index 90ec91f..9252912 100644 (file)
@@ -7,223 +7,13 @@ Required properties:
 - #clock-cells: Should be <1>
 
 The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell.  The following is a full list of i.MX6Q
-clocks and IDs.
-
-       Clock                   ID
-       ---------------------------
-       dummy                   0
-       ckil                    1
-       ckih                    2
-       osc                     3
-       pll2_pfd0_352m          4
-       pll2_pfd1_594m          5
-       pll2_pfd2_396m          6
-       pll3_pfd0_720m          7
-       pll3_pfd1_540m          8
-       pll3_pfd2_508m          9
-       pll3_pfd3_454m          10
-       pll2_198m               11
-       pll3_120m               12
-       pll3_80m                13
-       pll3_60m                14
-       twd                     15
-       step                    16
-       pll1_sw                 17
-       periph_pre              18
-       periph2_pre             19
-       periph_clk2_sel         20
-       periph2_clk2_sel        21
-       axi_sel                 22
-       esai_sel                23
-       asrc_sel                24
-       spdif_sel               25
-       gpu2d_axi               26
-       gpu3d_axi               27
-       gpu2d_core_sel          28
-       gpu3d_core_sel          29
-       gpu3d_shader_sel        30
-       ipu1_sel                31
-       ipu2_sel                32
-       ldb_di0_sel             33
-       ldb_di1_sel             34
-       ipu1_di0_pre_sel        35
-       ipu1_di1_pre_sel        36
-       ipu2_di0_pre_sel        37
-       ipu2_di1_pre_sel        38
-       ipu1_di0_sel            39
-       ipu1_di1_sel            40
-       ipu2_di0_sel            41
-       ipu2_di1_sel            42
-       hsi_tx_sel              43
-       pcie_axi_sel            44
-       ssi1_sel                45
-       ssi2_sel                46
-       ssi3_sel                47
-       usdhc1_sel              48
-       usdhc2_sel              49
-       usdhc3_sel              50
-       usdhc4_sel              51
-       enfc_sel                52
-       emi_sel                 53
-       emi_slow_sel            54
-       vdo_axi_sel             55
-       vpu_axi_sel             56
-       cko1_sel                57
-       periph                  58
-       periph2                 59
-       periph_clk2             60
-       periph2_clk2            61
-       ipg                     62
-       ipg_per                 63
-       esai_pred               64
-       esai_podf               65
-       asrc_pred               66
-       asrc_podf               67
-       spdif_pred              68
-       spdif_podf              69
-       can_root                70
-       ecspi_root              71
-       gpu2d_core_podf         72
-       gpu3d_core_podf         73
-       gpu3d_shader            74
-       ipu1_podf               75
-       ipu2_podf               76
-       ldb_di0_podf            77
-       ldb_di1_podf            78
-       ipu1_di0_pre            79
-       ipu1_di1_pre            80
-       ipu2_di0_pre            81
-       ipu2_di1_pre            82
-       hsi_tx_podf             83
-       ssi1_pred               84
-       ssi1_podf               85
-       ssi2_pred               86
-       ssi2_podf               87
-       ssi3_pred               88
-       ssi3_podf               89
-       uart_serial_podf        90
-       usdhc1_podf             91
-       usdhc2_podf             92
-       usdhc3_podf             93
-       usdhc4_podf             94
-       enfc_pred               95
-       enfc_podf               96
-       emi_podf                97
-       emi_slow_podf           98
-       vpu_axi_podf            99
-       cko1_podf               100
-       axi                     101
-       mmdc_ch0_axi_podf       102
-       mmdc_ch1_axi_podf       103
-       arm                     104
-       ahb                     105
-       apbh_dma                106
-       asrc                    107
-       can1_ipg                108
-       can1_serial             109
-       can2_ipg                110
-       can2_serial             111
-       ecspi1                  112
-       ecspi2                  113
-       ecspi3                  114
-       ecspi4                  115
-       ecspi5                  116
-       enet                    117
-       esai                    118
-       gpt_ipg                 119
-       gpt_ipg_per             120
-       gpu2d_core              121
-       gpu3d_core              122
-       hdmi_iahb               123
-       hdmi_isfr               124
-       i2c1                    125
-       i2c2                    126
-       i2c3                    127
-       iim                     128
-       enfc                    129
-       ipu1                    130
-       ipu1_di0                131
-       ipu1_di1                132
-       ipu2                    133
-       ipu2_di0                134
-       ldb_di0                 135
-       ldb_di1                 136
-       ipu2_di1                137
-       hsi_tx                  138
-       mlb                     139
-       mmdc_ch0_axi            140
-       mmdc_ch1_axi            141
-       ocram                   142
-       openvg_axi              143
-       pcie_axi                144
-       pwm1                    145
-       pwm2                    146
-       pwm3                    147
-       pwm4                    148
-       per1_bch                149
-       gpmi_bch_apb            150
-       gpmi_bch                151
-       gpmi_io                 152
-       gpmi_apb                153
-       sata                    154
-       sdma                    155
-       spba                    156
-       ssi1                    157
-       ssi2                    158
-       ssi3                    159
-       uart_ipg                160
-       uart_serial             161
-       usboh3                  162
-       usdhc1                  163
-       usdhc2                  164
-       usdhc3                  165
-       usdhc4                  166
-       vdo_axi                 167
-       vpu_axi                 168
-       cko1                    169
-       pll1_sys                170
-       pll2_bus                171
-       pll3_usb_otg            172
-       pll4_audio              173
-       pll5_video              174
-       pll8_mlb                175
-       pll7_usb_host           176
-       pll6_enet               177
-       ssi1_ipg                178
-       ssi2_ipg                179
-       ssi3_ipg                180
-       rom                     181
-       usbphy1                 182
-       usbphy2                 183
-       ldb_di0_div_3_5         184
-       ldb_di1_div_3_5         185
-       sata_ref                186
-       sata_ref_100m           187
-       pcie_ref                188
-       pcie_ref_125m           189
-       enet_ref                190
-       usbphy1_gate            191
-       usbphy2_gate            192
-       pll4_post_div           193
-       pll5_post_div           194
-       pll5_video_div          195
-       eim_slow                196
-       spdif                   197
-       cko2_sel                198
-       cko2_podf               199
-       cko2                    200
-       cko                     201
-       vdoa                    202
-       pll4_audio_div          203
-       lvds1_sel               204
-       lvds2_sel               205
-       lvds1_gate              206
-       lvds2_gate              207
-       esai_ahb                208
+ID in its "clocks" phandle cell.  See include/dt-bindings/clock/imx6qdl-clock.h
+for the full list of i.MX6 Quad and DualLite clock IDs.
 
 Examples:
 
+#include <dt-bindings/clock/imx6qdl-clock.h>
+
 clks: ccm@020c4000 {
        compatible = "fsl,imx6q-ccm";
        reg = <0x020c4000 0x4000>;
@@ -235,7 +25,7 @@ uart1: serial@02020000 {
        compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
        reg = <0x02020000 0x4000>;
        interrupts = <0 26 0x04>;
-       clocks = <&clks 160>, <&clks 161>;
+       clocks = <&clks IMX6QDL_CLK_UART_IPG>, <&clks IMX6QDL_CLK_UART_SERIAL>;
        clock-names = "ipg", "per";
        status = "disabled";
 };
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
new file mode 100644 (file)
index 0000000..0c2bf5e
--- /dev/null
@@ -0,0 +1,61 @@
+* Rockchip RK3188/RK3066 Clock and Reset Unit
+
+The RK3188/RK3066 clock controller generates and supplies clock to various
+controllers within the SoC and also implements a reset controller for SoC
+peripherals.
+
+Required Properties:
+
+- compatible: should be "rockchip,rk3188-cru", "rockchip,rk3188a-cru" or
+                       "rockchip,rk3066a-cru"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+Optional Properties:
+
+- rockchip,grf: phandle to the syscon managing the "general register files"
+  If missing pll rates are not changable, due to the missing pll lock status.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. All available clocks are defined as
+preprocessor macros in the dt-bindings/clock/rk3188-cru.h and
+dt-bindings/clock/rk3066-cru.h headers and can be used in device tree sources.
+Similar macros exist for the reset sources in these files.
+
+External clocks:
+
+There are several clocks that are generated outside the SoC. It is expected
+that they are defined using standard clock bindings with following
+clock-output-names:
+ - "xin24m" - crystal input - required,
+ - "xin32k" - rtc clock - optional,
+ - "xin27m" - 27mhz crystal input on rk3066 - optional,
+ - "ext_hsadc" - external HSADC clock - optional,
+ - "ext_cif0" - external camera clock - optional,
+ - "ext_rmii" - external RMII clock - optional,
+ - "ext_jtag" - externalJTAG clock - optional
+
+Example: Clock controller node:
+
+       cru: cru@20000000 {
+               compatible = "rockchip,rk3188-cru";
+               reg = <0x20000000 0x1000>;
+               rockchip,grf = <&grf>;
+
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+Example: UART controller node that consumes the clock generated by the clock
+  controller:
+
+       uart0: serial@10124000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x10124000 0x400>;
+               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clocks = <&cru SCLK_UART0>;
+       };
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3288-cru.txt
new file mode 100644 (file)
index 0000000..c9fbb76
--- /dev/null
@@ -0,0 +1,61 @@
+* Rockchip RK3288 Clock and Reset Unit
+
+The RK3288 clock controller generates and supplies clock to various
+controllers within the SoC and also implements a reset controller for SoC
+peripherals.
+
+Required Properties:
+
+- compatible: should be "rockchip,rk3288-cru"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+Optional Properties:
+
+- rockchip,grf: phandle to the syscon managing the "general register files"
+  If missing pll rates are not changable, due to the missing pll lock status.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. All available clocks are defined as
+preprocessor macros in the dt-bindings/clock/rk3288-cru.h headers and can be
+used in device tree sources. Similar macros exist for the reset sources in
+these files.
+
+External clocks:
+
+There are several clocks that are generated outside the SoC. It is expected
+that they are defined using standard clock bindings with following
+clock-output-names:
+ - "xin24m" - crystal input - required,
+ - "xin32k" - rtc clock - optional,
+ - "ext_i2s" - external I2S clock - optional,
+ - "ext_hsadc" - external HSADC clock - optional,
+ - "ext_edp_24m" - external display port clock - optional,
+ - "ext_vip" - external VIP clock - optional,
+ - "ext_isp" - external ISP clock - optional,
+ - "ext_jtag" - external JTAG clock - optional
+
+Example: Clock controller node:
+
+       cru: cru@20000000 {
+               compatible = "rockchip,rk3188-cru";
+               reg = <0x20000000 0x1000>;
+               rockchip,grf = <&grf>;
+
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+Example: UART controller node that consumes the clock generated by the clock
+  controller:
+
+       uart0: serial@10124000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x10124000 0x400>;
+               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clocks = <&cru SCLK_UART0>;
+       };
index a891c82..22f6769 100644 (file)
@@ -6,6 +6,9 @@ This binding uses the common clock binding[1].
 
 == Gate clocks ==
 
+These bindings are deprecated!
+Please use the soc specific CRU bindings instead.
+
 The gate registers form a continuos block which makes the dt node
 structure a matter of taste, as either all gates can be put into
 one gate clock spanning all registers or they can be divided into
diff --git a/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
new file mode 100644 (file)
index 0000000..d8c98c7
--- /dev/null
@@ -0,0 +1,40 @@
+NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 fuse block.
+
+Required properties:
+- compatible : should be:
+       "nvidia,tegra20-efuse"
+       "nvidia,tegra30-efuse"
+       "nvidia,tegra114-efuse"
+       "nvidia,tegra124-efuse"
+  Details:
+  nvidia,tegra20-efuse: Tegra20 requires using APB DMA to read the fuse data
+       due to a hardware bug. Tegra20 also lacks certain information which is
+       available in later generations such as fab code, lot code, wafer id,..
+  nvidia,tegra30-efuse, nvidia,tegra114-efuse and nvidia,tegra124-efuse:
+       The differences between these SoCs are the size of the efuse array,
+       the location of the spare (OEM programmable) bits and the location of
+       the speedo data.
+- reg: Should contain 1 entry: the entry gives the physical address and length
+       of the fuse registers.
+- clocks: Must contain an entry for each entry in clock-names.
+  See ../clocks/clock-bindings.txt for details.
+- clock-names: Must include the following entries:
+  - fuse
+- resets: Must contain an entry for each entry in reset-names.
+  See ../reset/reset.txt for details.
+- reset-names: Must include the following entries:
+ - fuse
+
+Example:
+
+       fuse@7000f800 {
+               compatible = "nvidia,tegra20-efuse";
+               reg = <0x7000F800 0x400>,
+                     <0x70000000 0x400>;
+               clocks = <&tegra_car TEGRA20_CLK_FUSE>;
+               clock-names = "fuse";
+               resets = <&tegra_car 39>;
+               reset-names = "fuse";
+       };
+
+
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt b/Documentation/devicetree/bindings/gpu/nvidia,gk20a.txt
new file mode 100644 (file)
index 0000000..23bfe8e
--- /dev/null
@@ -0,0 +1,43 @@
+NVIDIA GK20A Graphics Processing Unit
+
+Required properties:
+- compatible: "nvidia,<chip>-<gpu>"
+  Currently recognized values:
+  - nvidia,tegra124-gk20a
+- reg: Physical base address and length of the controller's registers.
+  Must contain two entries:
+  - first entry for bar0
+  - second entry for bar1
+- interrupts: Must contain an entry for each entry in interrupt-names.
+  See ../interrupt-controller/interrupts.txt for details.
+- interrupt-names: Must include the following entries:
+  - stall
+  - nonstall
+- vdd-supply: regulator for supply voltage.
+- clocks: Must contain an entry for each entry in clock-names.
+  See ../clocks/clock-bindings.txt for details.
+- clock-names: Must include the following entries:
+  - gpu
+  - pwr
+- resets: Must contain an entry for each entry in reset-names.
+  See ../reset/reset.txt for details.
+- reset-names: Must include the following entries:
+  - gpu
+
+Example:
+
+       gpu@0,57000000 {
+               compatible = "nvidia,gk20a";
+               reg = <0x0 0x57000000 0x0 0x01000000>,
+                     <0x0 0x58000000 0x0 0x01000000>;
+               interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "stall", "nonstall";
+               vdd-supply = <&vdd_gpu>;
+               clocks = <&tegra_car TEGRA124_CLK_GPU>,
+                        <&tegra_car TEGRA124_CLK_PLL_P_OUT5>;
+               clock-names = "gpu", "pwr";
+               resets = <&tegra_car 184>;
+               reset-names = "gpu";
+               status = "disabled";
+       };
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
new file mode 100644 (file)
index 0000000..b97b8be
--- /dev/null
@@ -0,0 +1,13 @@
+NVIDIA Tegra20/Tegra30/Tegr114/Tegra124 apbmisc block
+
+Required properties:
+- compatible : should be:
+       "nvidia,tegra20-apbmisc"
+       "nvidia,tegra30-apbmisc"
+       "nvidia,tegra114-apbmisc"
+       "nvidia,tegra124-apbmisc"
+- reg: Should contain 2 entries: the first entry gives the physical address
+       and length of the registers which contain revision and debug features.
+       The second entry gives the physical address and length of the
+       registers indicating the strapping options.
+
diff --git a/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt b/Documentation/devicetree/bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt
new file mode 100644 (file)
index 0000000..2f9c0bd
--- /dev/null
@@ -0,0 +1,127 @@
+Device tree binding for NVIDIA Tegra XUSB pad controller
+========================================================
+
+The Tegra XUSB pad controller manages a set of lanes, each of which can be
+assigned to one out of a set of different pads. Some of these pads have an
+associated PHY that must be powered up before the pad can be used.
+
+This document defines the device-specific binding for the XUSB pad controller.
+
+Refer to pinctrl-bindings.txt in this directory for generic information about
+pin controller device tree bindings and ../phy/phy-bindings.txt for details on
+how to describe and reference PHYs in device trees.
+
+Required properties:
+--------------------
+- compatible: should be "nvidia,tegra124-xusb-padctl"
+- reg: Physical base address and length of the controller's registers.
+- resets: Must contain an entry for each entry in reset-names.
+  See ../reset/reset.txt for details.
+- reset-names: Must include the following entries:
+  - padctl
+- #phy-cells: Should be 1. The specifier is the index of the PHY to reference.
+  See <dt-bindings/pinctrl/pinctrl-tegra-xusb.h> for the list of valid values.
+
+Lane muxing:
+------------
+
+Child nodes contain the pinmux configurations following the conventions from
+the pinctrl-bindings.txt document. Typically a single, static configuration is
+given and applied at boot time.
+
+Each subnode describes groups of lanes along with parameters and pads that
+they should be assigned to. The name of these subnodes is not important. All
+subnodes should be parsed solely based on their content.
+
+Each subnode only applies the parameters that are explicitly listed. In other
+words, if a subnode that lists a function but no pin configuration parameters
+implies no information about any pin configuration parameters. Similarly, a
+subnode that describes only an IDDQ parameter implies no information about
+what function the pins are assigned to. For this reason even seemingly boolean
+values are actually tristates in this binding: unspecified, off or on.
+Unspecified is represented as an absent property, and off/on are represented
+as integer values 0 and 1.
+
+Required properties:
+- nvidia,lanes: An array of strings. Each string is the name of a lane.
+
+Optional properties:
+- nvidia,function: A string that is the name of the function (pad) that the
+  pin or group should be assigned to. Valid values for function names are
+  listed below.
+- nvidia,iddq: Enables IDDQ mode of the lane. (0: no, 1: yes)
+
+Note that not all of these properties are valid for all lanes. Lanes can be
+divided into three groups:
+
+  - otg-0, otg-1, otg-2:
+
+    Valid functions for this group are: "snps", "xusb", "uart", "rsvd".
+
+    The nvidia,iddq property does not apply to this group.
+
+  - ulpi-0, hsic-0, hsic-1:
+
+    Valid functions for this group are: "snps", "xusb".
+
+    The nvidia,iddq property does not apply to this group.
+
+  - pcie-0, pcie-1, pcie-2, pcie-3, pcie-4, sata-0:
+
+    Valid functions for this group are: "pcie", "usb3", "sata", "rsvd".
+
+
+Example:
+========
+
+SoC file extract:
+-----------------
+
+       padctl@0,7009f000 {
+               compatible = "nvidia,tegra124-xusb-padctl";
+               reg = <0x0 0x7009f000 0x0 0x1000>;
+               resets = <&tegra_car 142>;
+               reset-names = "padctl";
+
+               #phy-cells = <1>;
+       };
+
+Board file extract:
+-------------------
+
+       pcie-controller@0,01003000 {
+               ...
+
+               phys = <&padctl 0>;
+               phy-names = "pcie";
+
+               ...
+       };
+
+       ...
+
+       padctl: padctl@0,7009f000 {
+               pinctrl-0 = <&padctl_default>;
+               pinctrl-names = "default";
+
+               padctl_default: pinmux {
+                       usb3 {
+                               nvidia,lanes = "pcie-0", "pcie-1";
+                               nvidia,function = "usb3";
+                               nvidia,iddq = <0>;
+                       };
+
+                       pcie {
+                               nvidia,lanes = "pcie-2", "pcie-3",
+                                              "pcie-4";
+                               nvidia,function = "pcie";
+                               nvidia,iddq = <0>;
+                       };
+
+                       sata {
+                               nvidia,lanes = "sata-0";
+                               nvidia,function = "sata";
+                               nvidia,iddq = <0>;
+                       };
+               };
+       };
diff --git a/Documentation/devicetree/bindings/serial/cdns,uart.txt b/Documentation/devicetree/bindings/serial/cdns,uart.txt
new file mode 100644 (file)
index 0000000..a3eb154
--- /dev/null
@@ -0,0 +1,20 @@
+Binding for Cadence UART Controller
+
+Required properties:
+- compatible : should be "cdns,uart-r1p8", or "xlnx,xuartps"
+- reg: Should contain UART controller registers location and length.
+- interrupts: Should contain UART controller interrupts.
+- clocks: Must contain phandles to the UART clocks
+  See ../clocks/clock-bindings.txt for details.
+- clock-names: Tuple to identify input clocks, must contain "uart_clk" and "pclk"
+  See ../clocks/clock-bindings.txt for details.
+
+
+Example:
+       uart@e0000000 {
+               compatible = "cdns,uart-r1p8";
+               clocks = <&clkc 23>, <&clkc 40>;
+               clock-names = "uart_clk", "pclk";
+               reg = <0xE0000000 0x1000>;
+               interrupts = <0 27 4>;
+       };
index 46a311e..4257f3f 100644 (file)
@@ -6,6 +6,7 @@ using them to avoid name-space collisions.
 abilis Abilis Systems
 active-semi    Active-Semi International Inc
 ad     Avionic Design GmbH
+adapteva       Adapteva, Inc.
 adi    Analog Devices, Inc.
 aeroflexgaisler        Aeroflex Gaisler AB
 ak     Asahi Kasei Corp.
@@ -71,6 +72,7 @@ karo  Ka-Ro electronics GmbH
 keymile        Keymile GmbH
 lacie  LaCie
 lantiq Lantiq Semiconductor
+lenovo Lenovo Group Ltd.
 lg     LG Corporation
 linux  Linux-specific binding
 lsi    LSI Corp. (LSI Logic)
@@ -122,6 +124,7 @@ sii Seiko Instruments, Inc.
 sirf   SiRF Technology, Inc.
 smsc   Standard Microsystems Corporation
 snps   Synopsys, Inc.
+solidrun       SolidRun
 spansion       Spansion Inc.
 st     STMicroelectronics
 ste    ST-Ericsson
index 88acf8b..2cc99bf 100644 (file)
@@ -1559,6 +1559,7 @@ config ARCH_NR_GPIO
        default 416 if ARCH_SUNXI
        default 392 if ARCH_U8500
        default 352 if ARCH_VT8500
+       default 288 if ARCH_ROCKCHIP
        default 264 if MACH_H4700
        default 0
        help
index b7acfa3..e43b838 100644 (file)
@@ -582,7 +582,7 @@ choice
                  on Rockchip based platforms.
 
        config DEBUG_RK3X_UART0
-               bool "Kernel low-level debugging messages via Rockchip RK3X UART0"
+               bool "Kernel low-level debugging messages via Rockchip RK30/RK31 UART0"
                depends on ARCH_ROCKCHIP
                select DEBUG_UART_8250
                help
@@ -590,7 +590,7 @@ choice
                  on Rockchip based platforms.
 
        config DEBUG_RK3X_UART1
-               bool "Kernel low-level debugging messages via Rockchip RK3X UART1"
+               bool "Kernel low-level debugging messages via Rockchip RK30/RK31 UART1"
                depends on ARCH_ROCKCHIP
                select DEBUG_UART_8250
                help
@@ -598,7 +598,7 @@ choice
                  on Rockchip based platforms.
 
        config DEBUG_RK3X_UART2
-               bool "Kernel low-level debugging messages via Rockchip RK3X UART2"
+               bool "Kernel low-level debugging messages via Rockchip RK30/RK31 UART2"
                depends on ARCH_ROCKCHIP
                select DEBUG_UART_8250
                help
@@ -606,13 +606,21 @@ choice
                  on Rockchip based platforms.
 
        config DEBUG_RK3X_UART3
-               bool "Kernel low-level debugging messages via Rockchip RK3X UART3"
+               bool "Kernel low-level debugging messages via Rockchip RK30/RK31 UART3"
                depends on ARCH_ROCKCHIP
                select DEBUG_UART_8250
                help
                  Say Y here if you want kernel low-level debugging support
                  on Rockchip based platforms.
 
+       config DEBUG_RK32_UART2
+               bool "Kernel low-level debugging messages via Rockchip RK32 UART2"
+               depends on ARCH_ROCKCHIP
+               select DEBUG_UART_8250
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on Rockchip RK32xx based platforms.
+
        config DEBUG_S3C_UART0
                depends on PLAT_SAMSUNG
                select DEBUG_EXYNOS_UART if ARCH_EXYNOS
@@ -1084,6 +1092,7 @@ config DEBUG_UART_PHYS
        default 0xf991e000 if DEBUG_QCOM_UARTDM
        default 0xfcb00000 if DEBUG_HI3620_UART
        default 0xfe800000 if ARCH_IOP32X
+       default 0xff690000 if DEBUG_RK32_UART2
        default 0xffc02000 if DEBUG_SOCFPGA_UART
        default 0xffd82340 if ARCH_IOP13XX
        default 0xfff36000 if DEBUG_HIGHBANK_UART
@@ -1140,6 +1149,7 @@ config DEBUG_UART_VIRT
        default 0xfec02000 if DEBUG_SOCFPGA_UART
        default 0xfec12000 if DEBUG_MVEBU_UART || DEBUG_MVEBU_UART_ALTERNATE
        default 0xfec20000 if DEBUG_DAVINCI_DMx_UART0
+       default 0xfec90000 if DEBUG_RK32_UART2
        default 0xfed0c000 if DEBUG_DAVINCI_DA8XX_UART1
        default 0xfed0d000 if DEBUG_DAVINCI_DA8XX_UART2
        default 0xfed12000 if ARCH_KIRKWOOD
@@ -1174,7 +1184,7 @@ config DEBUG_UART_8250_WORD
                ARCH_KEYSTONE || \
                DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
                DEBUG_DAVINCI_DA8XX_UART2 || \
-               DEBUG_BCM_KONA_UART
+               DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
 
 config DEBUG_UART_8250_FLOW_CONTROL
        bool "Enable flow control for 8250 UART"
index ed2f4e1..0afe09a 100644 (file)
@@ -59,6 +59,8 @@ dtb-$(CONFIG_ARCH_BERLIN) += \
        berlin2-sony-nsz-gs7.dtb        \
        berlin2cd-google-chromecast.dtb \
        berlin2q-marvell-dmp.dtb
+dtb-$(CONFIG_ARCH_BRCMSTB) += \
+       bcm7445-bcm97445svmb.dtb
 dtb-$(CONFIG_ARCH_DAVINCI) += da850-enbw-cmc.dtb \
        da850-evm.dtb
 dtb-$(CONFIG_ARCH_EFM32) += efm32gg-dk3750.dtb
@@ -95,6 +97,7 @@ dtb-$(CONFIG_ARCH_KEYSTONE) += k2hk-evm.dtb \
 kirkwood := \
        kirkwood-b3.dtb \
        kirkwood-cloudbox.dtb \
+       kirkwood-d2net.dtb \
        kirkwood-db-88f6281.dtb \
        kirkwood-db-88f6282.dtb \
        kirkwood-dns320.dtb \
@@ -125,6 +128,8 @@ kirkwood := \
        kirkwood-lsxhl.dtb \
        kirkwood-mplcec4.dtb \
        kirkwood-mv88f6281gtw-ge.dtb \
+       kirkwood-net2big.dtb \
+       kirkwood-net5big.dtb \
        kirkwood-netgear_readynas_duo_v2.dtb \
        kirkwood-netgear_readynas_nv+_v2.dtb \
        kirkwood-ns2.dtb \
@@ -159,10 +164,14 @@ dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb
 dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb
 dtb-$(CONFIG_ARCH_MXC) += \
        imx25-eukrea-mbimxsd25-baseboard.dtb \
+       imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dtb \
+       imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dtb \
+       imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dtb \
        imx25-karo-tx25.dtb \
        imx25-pdk.dtb \
        imx27-apf27.dtb \
        imx27-apf27dev.dtb \
+       imx27-eukrea-mbimxsd27-baseboard.dtb \
        imx27-pdk.dtb \
        imx27-phytec-phycore-rdk.dtb \
        imx27-phytec-phycard-s-rdk.dtb \
@@ -184,6 +193,8 @@ dtb-$(CONFIG_ARCH_MXC) += \
        imx53-tx53-x03x.dtb \
        imx53-tx53-x13x.dtb \
        imx53-voipac-bsb.dtb \
+       imx6dl-aristainetos_4.dtb \
+       imx6dl-aristainetos_7.dtb \
        imx6dl-cubox-i.dtb \
        imx6dl-dfi-fs700-m60.dtb \
        imx6dl-gw51xx.dtb \
@@ -193,11 +204,16 @@ dtb-$(CONFIG_ARCH_MXC) += \
        imx6dl-hummingboard.dtb \
        imx6dl-nitrogen6x.dtb \
        imx6dl-phytec-pbab01.dtb \
+       imx6dl-rex-basic.dtb \
        imx6dl-riotboard.dtb \
        imx6dl-sabreauto.dtb \
        imx6dl-sabrelite.dtb \
        imx6dl-sabresd.dtb \
+       imx6dl-tx6dl-comtft.dtb \
+       imx6dl-tx6u-801x.dtb \
+       imx6dl-tx6u-811x.dtb \
        imx6dl-wandboard.dtb \
+       imx6dl-wandboard-revb1.dtb \
        imx6q-arm2.dtb \
        imx6q-cm-fx6.dtb \
        imx6q-cubox-i.dtb \
@@ -211,13 +227,21 @@ dtb-$(CONFIG_ARCH_MXC) += \
        imx6q-gw54xx.dtb \
        imx6q-nitrogen6x.dtb \
        imx6q-phytec-pbab01.dtb \
+       imx6q-rex-pro.dtb \
        imx6q-sabreauto.dtb \
        imx6q-sabrelite.dtb \
        imx6q-sabresd.dtb \
        imx6q-sbc6x.dtb \
        imx6q-udoo.dtb \
        imx6q-wandboard.dtb \
+       imx6q-wandboard-revb1.dtb \
+       imx6q-tx6q-1010.dtb \
+       imx6q-tx6q-1010-comtft.dtb \
+       imx6q-tx6q-1020.dtb \
+       imx6q-tx6q-1020-comtft.dtb \
+       imx6q-tx6q-1110.dtb \
        imx6sl-evk.dtb \
+       imx6sx-sdb.dtb \
        vf610-colibri.dtb \
        vf610-cosmic.dtb \
        vf610-twr.dtb
@@ -293,7 +317,8 @@ dtb-$(CONFIG_SOC_AM33XX) += am335x-base0033.dtb \
        am335x-boneblack.dtb \
        am335x-evm.dtb \
        am335x-evmsk.dtb \
-       am335x-nano.dtb
+       am335x-nano.dtb \
+       am335x-pepper.dtb
 dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \
        omap4-panda.dtb \
        omap4-panda-a4.dtb \
@@ -303,6 +328,7 @@ dtb-$(CONFIG_ARCH_OMAP4) += omap4-duovero-parlor.dtb \
        omap4-var-dvk-om44.dtb \
        omap4-var-stk-om44.dtb
 dtb-$(CONFIG_SOC_AM43XX) += am43x-epos-evm.dtb \
+       am437x-sk-evm.dtb \
        am437x-gp-evm.dtb
 dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \
        omap5-sbc-t54.dtb \
@@ -320,6 +346,11 @@ dtb-$(CONFIG_ARCH_QCOM) += \
        qcom-apq8084-mtp.dtb \
        qcom-msm8660-surf.dtb \
        qcom-msm8960-cdp.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += \
+       rk3066a-bqcurie2.dtb \
+       rk3188-radxarock.dtb \
+       rk3288-evb-act8846.dtb \
+       rk3288-evb-rk808.dtb
 dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
 dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
        s3c6410-smdk6410.dtb
@@ -362,6 +393,7 @@ dtb-$(CONFIG_ARCH_STI)+= stih407-b2120.dtb \
        stih416-b2020e.dtb
 dtb-$(CONFIG_MACH_SUN4I) += \
        sun4i-a10-a1000.dtb \
+       sun4i-a10-ba10-tvbox.dtb \
        sun4i-a10-cubieboard.dtb \
        sun4i-a10-mini-xplus.dtb \
        sun4i-a10-hackberry.dtb \
@@ -376,12 +408,16 @@ dtb-$(CONFIG_MACH_SUN5I) += \
 dtb-$(CONFIG_MACH_SUN6I) += \
        sun6i-a31-app4-evb1.dtb \
        sun6i-a31-colombus.dtb \
+       sun6i-a31-hummingbird.dtb \
        sun6i-a31-m9.dtb
 dtb-$(CONFIG_MACH_SUN7I) += \
        sun7i-a20-cubieboard2.dtb \
        sun7i-a20-cubietruck.dtb \
        sun7i-a20-i12-tvbox.dtb \
-       sun7i-a20-olinuxino-micro.dtb
+       sun7i-a20-olinuxino-micro.dtb \
+       sun7i-a20-pcduino3.dtb
+dtb-$(CONFIG_MACH_SUN8I) += \
+       sun8i-a23-ippo-q8h-v5.dtb
 dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
        tegra20-iris-512.dtb \
        tegra20-medcom-wide.dtb \
@@ -392,6 +428,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
        tegra20-trimslice.dtb \
        tegra20-ventana.dtb \
        tegra20-whistler.dtb \
+       tegra30-apalis-eval.dtb \
        tegra30-beaver.dtb \
        tegra30-cardhu-a02.dtb \
        tegra30-cardhu-a04.dtb \
@@ -421,7 +458,9 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
        wm8650-mid.dtb \
        wm8750-apc8750.dtb \
        wm8850-w70v2.dtb
-dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
+dtb-$(CONFIG_ARCH_ZYNQ) += \
+       zynq-parallella.dtb \
+       zynq-zc702.dtb \
        zynq-zc706.dtb \
        zynq-zed.dtb
 dtb-$(CONFIG_MACH_ARMADA_370) += \
@@ -439,11 +478,13 @@ dtb-$(CONFIG_MACH_ARMADA_XP) += \
        armada-xp-axpwifiap.dtb \
        armada-xp-db.dtb \
        armada-xp-gp.dtb \
-       armada-xp-netgear-rn2120.dtb \
+       armada-xp-lenovo-ix4-300d.dtb \
        armada-xp-matrix.dtb \
+       armada-xp-netgear-rn2120.dtb \
        armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \
        dove-cubox.dtb \
+       dove-cubox-es.dtb \
        dove-d2plug.dtb \
        dove-d3plug.dtb \
        dove-dove-db.dtb
index 54cb5cf..d9c50fb 100644 (file)
                bootargs = "console=ttyS0,115200 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs";
        };
 
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+       };
+
        ahb {
                apb {
                        usart0: serial@fffb0000 {
index 80a3b21..df5fee6 100644 (file)
                        "Headphone Jack",       "HPLOUT",
                        "Headphone Jack",       "HPROUT";
        };
+
+       panel {
+               compatible = "ti,tilcdc,panel";
+               pinctrl-names = "default", "sleep";
+               pinctrl-0 = <&lcd_pins_default>;
+               pinctrl-1 = <&lcd_pins_sleep>;
+               status = "okay";
+               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 {
+                       480x272 {
+                               hactive         = <480>;
+                               vactive         = <272>;
+                               hback-porch     = <43>;
+                               hfront-porch    = <8>;
+                               hsync-len       = <4>;
+                               vback-porch     = <12>;
+                               vfront-porch    = <4>;
+                               vsync-len       = <10>;
+                               clock-frequency = <9000000>;
+                               hsync-active    = <0>;
+                               vsync-active    = <0>;
+                       };
+               };
+       };
 };
 
 &am33xx_pinmux {
        pinctrl-names = "default";
        pinctrl-0 = <&gpio_keys_s0 &clkout2_pin>;
 
+       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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+
        user_leds_s0: user_leds_s0 {
                pinctrl-single,pins = <
                        0x10 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_ad4.gpio1_4 */
                ti,wire-config = <0x00 0x11 0x22 0x33>;
        };
 };
+
+&lcdc {
+      status = "okay";
+};
diff --git a/arch/arm/boot/dts/am335x-pepper.dts b/arch/arm/boot/dts/am335x-pepper.dts
new file mode 100644 (file)
index 0000000..0d35ab6
--- /dev/null
@@ -0,0 +1,653 @@
+/*
+ * Copyright (C) 2014 Gumstix, Inc. - https://www.gumstix.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.
+ */
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "am33xx.dtsi"
+
+/ {
+       model = "Gumstix Pepper";
+       compatible = "gumstix,am335x-pepper", "ti,am33xx";
+
+       cpus {
+               cpu@0 {
+                       cpu0-supply = <&dcdc3_reg>;
+               };
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0x80000000 0x20000000>; /* 512 MB */
+       };
+
+       buttons: user_buttons {
+               compatible = "gpio-keys";
+       };
+
+       leds: user_leds {
+               compatible = "gpio-leds";
+       };
+
+       panel: lcd_panel {
+               compatible = "ti,tilcdc,panel";
+       };
+
+       sound: sound_iface {
+               compatible = "ti,da830-evm-audio";
+       };
+
+       vbat: fixedregulator@0 {
+               compatible = "regulator-fixed";
+       };
+
+       v3v3c_reg: fixedregulator@1 {
+               compatible = "regulator-fixed";
+       };
+
+       vdd5_reg: fixedregulator@2 {
+               compatible = "regulator-fixed";
+       };
+};
+
+/* I2C Busses */
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+
+       clock-frequency = <400000>;
+
+       tps: tps@24 {
+               reg = <0x24>;
+       };
+
+       eeprom: eeprom@50 {
+               compatible = "at,24c256";
+               reg = <0x50>;
+       };
+
+       audio_codec: tlv320aic3106@1b {
+               compatible = "ti,tlv320aic3106";
+               reg = <0x1b>;
+       };
+
+       accel: lis331dlh@1d {
+               compatible = "st,lis3lv02d";
+               reg = <0x1d>;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+       clock-frequency = <400000>;
+};
+
+&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 */
+               >;
+       };
+       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 */
+               >;
+       };
+};
+
+/* Accelerometer */
+&accel {
+       pinctrl-names = "default";
+       pinctrl-0 = <&accel_pins>;
+
+       Vdd-supply = <&ldo3_reg>;
+       Vdd_IO-supply = <&ldo3_reg>;
+       st,irq1-click;
+       st,wakeup-x-lo;
+       st,wakeup-x-hi;
+       st,wakeup-y-lo;
+       st,wakeup-y-hi;
+       st,wakeup-z-lo;
+       st,wakeup-z-hi;
+       st,min-limit-x = <92>;
+       st,max-limit-x = <14>;
+       st,min-limit-y = <14>;
+       st,max-limit-y = <92>;
+       st,min-limit-z = <92>;
+       st,max-limit-z = <14>;
+};
+
+&am33xx_pinmux {
+       accel_pins: pinmux_accel {
+               pinctrl-single,pins = <
+                       0x98 (PIN_INPUT | MUX_MODE7)   /* gpmc_wen.gpio2_4 */
+               >;
+       };
+};
+
+/* Audio */
+&audio_codec {
+       status = "okay";
+
+       gpio-reset = <&gpio1 16 GPIO_ACTIVE_LOW>;
+       AVDD-supply = <&ldo3_reg>;
+       IOVDD-supply = <&ldo3_reg>;
+       DRVDD-supply = <&ldo3_reg>;
+       DVDD-supply = <&dcdc1_reg>;
+};
+
+&sound {
+       ti,model = "AM335x-EVM";
+       ti,audio-codec = <&audio_codec>;
+       ti,mcasp-controller = <&mcasp0>;
+       ti,codec-clock-rate = <12000000>;
+       ti,audio-routing =
+               "Headphone Jack",       "HPLOUT",
+               "Headphone Jack",       "HPROUT",
+               "LINE1L",               "Line In";
+};
+
+&mcasp0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&audio_pins>;
+
+       op-mode = <0>;  /* MCASP_ISS_MODE */
+       tdm-slots = <2>;
+       serial-dir = <
+               1 2 0 0
+               0 0 0 0
+               0 0 0 0
+               0 0 0 0
+       >;
+       tx-num-evt = <1>;
+       rx-num-evt = <1>;
+};
+
+&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 */
+               >;
+       };
+};
+
+/* Display: 24-bit LCD Screen */
+&panel {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&lcd_pins>;
+       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 {
+               native-mode = <&timing0>;
+               timing0: 480x272 {
+                       clock-frequency = <18400000>;
+                       hactive = <480>;
+                       vactive = <272>;
+                       hfront-porch = <8>;
+                       hback-porch = <4>;
+                       hsync-len = <41>;
+                       vfront-porch = <4>;
+                       vback-porch = <2>;
+                       vsync-len = <10>;
+                       hsync-active = <1>;
+                       vsync-active = <1>;
+               };
+       };
+};
+
+&lcdc {
+       status = "okay";
+};
+
+&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 */
+                       /* Display Enable */
+                       0x6c (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a11.gpio1_27 */
+               >;
+       };
+};
+
+/* Ethernet */
+&cpsw_emac0 {
+       status = "okay";
+       phy_id = <&davinci_mdio>, <0>;
+       phy-mode = "rgmii";
+};
+
+&cpsw_emac1 {
+       status = "okay";
+       phy_id = <&davinci_mdio>, <1>;
+       phy-mode = "rgmii";
+};
+
+&davinci_mdio {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mdio_pins>;
+};
+
+&mac {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&ethernet_pins>;
+};
+
+
+&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 */
+                       /* ethernet interrupt */
+                       0x144 (PIN_INPUT_PULLUP | MUX_MODE7)    /* rmii2_refclk.gpio0_29 */
+                       /* ethernet PHY nReset */
+                       0x108 (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 */
+               >;
+       };
+};
+
+/* MMC */
+&mmc1 {
+       /* Bootable SD card slot */
+       status = "okay";
+       vmmc-supply = <&ldo3_reg>;
+       bus-width = <4>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd_pins>;
+       cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+};
+
+&mmc2 {
+       /* eMMC (not populated) on MMC #2 */
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&emmc_pins>;
+       vmmc-supply = <&ldo3_reg>;
+       bus-width = <8>;
+       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";
+       pinctrl-names = "default";
+       pinctrl-0 = <&wireless_pins>;
+       vmmmc-supply = <&v3v3c_reg>;
+       bus-width = <4>;
+       ti,non-removable;
+       dmas = <&edma 12
+               &edma 13>;
+       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 */
+               >;
+       };
+       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 */
+                       /* EMMC nReset */
+                       0x74 (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 */
+                       /* WLAN nReset */
+                       0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
+                       /* WLAN nPower down */
+                       0x70 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_wait0.gpio0_30 */
+                       /* 32kHz Clock */
+                       0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
+               >;
+       };
+};
+
+/* Power */
+&vbat {
+       regulator-name = "vbat";
+       regulator-min-microvolt = <5000000>;
+       regulator-max-microvolt = <5000000>;
+};
+
+&v3v3c_reg {
+       regulator-name = "v3v3c_reg";
+       regulator-min-microvolt = <3300000>;
+       regulator-max-microvolt = <3300000>;
+       vin-supply = <&vbat>;
+};
+
+&vdd5_reg {
+       regulator-name = "vdd5_reg";
+       regulator-min-microvolt = <5000000>;
+       regulator-max-microvolt = <5000000>;
+       vin-supply = <&vbat>;
+};
+
+/include/ "tps65217.dtsi"
+
+&tps {
+       backlight {
+               isel = <1>; /* ISET1 */
+               fdim = <200>; /* TPS65217_BL_FDIM_200HZ */
+               default-brightness = <80>;
+       };
+
+       regulators {
+               dcdc1_reg: regulator@0 {
+                       /* VDD_1V8 system supply */
+               };
+
+               dcdc2_reg: regulator@1 {
+                       /* VDD_CORE voltage limits 0.95V - 1.26V with +/-4% tolerance */
+                       regulator-name = "vdd_core";
+                       regulator-min-microvolt = <925000>;
+                       regulator-max-microvolt = <1325000>;
+                       regulator-boot-on;
+               };
+
+               dcdc3_reg: regulator@2 {
+                       /* VDD_MPU voltage limits 0.95V - 1.1V with +/-4% tolerance */
+                       regulator-name = "vdd_mpu";
+                       regulator-min-microvolt = <925000>;
+                       regulator-max-microvolt = <1150000>;
+                       regulator-boot-on;
+               };
+
+               ldo1_reg: regulator@3 {
+                       /* VRTC 1.8V always-on supply */
+                       regulator-always-on;
+               };
+
+               ldo2_reg: regulator@4 {
+                       /* 3.3V rail */
+               };
+
+               ldo3_reg: regulator@5 {
+                       /* VDD_3V3A 3.3V rail */
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+               };
+
+               ldo4_reg: regulator@6 {
+                       /* VDD_3V3B 3.3V rail */
+               };
+       };
+};
+
+/* SPI Busses */
+&spi0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pins>;
+};
+
+&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 */
+               >;
+       };
+};
+
+/* Touch Screen */
+&tscadc {
+       status = "okay";
+       tsc {
+               ti,wires = <4>;
+               ti,x-plate-resistance = <200>;
+               ti,coordinate-readouts = <5>;
+               ti,wire-config = <0x00 0x11 0x22 0x33>;
+       };
+
+       adc {
+               ti,adc-channels = <4 5 6 7>;
+       };
+};
+
+/* UARTs */
+&uart0 {
+       /* Serial Console */
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
+};
+
+&uart1 {
+       /* Broken out to J6 header */
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_pins>;
+};
+
+&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 */
+               >;
+       };
+       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 */
+               >;
+       };
+};
+
+/* USB */
+&usb {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&usb_pins>;
+};
+
+&usb_ctrl_mod {
+       status = "okay";
+};
+
+&usb0_phy {
+       status = "okay";
+};
+
+&usb1_phy {
+       status = "okay";
+};
+
+&usb0 {
+       status = "okay";
+        dr_mode = "host";
+};
+
+&usb1 {
+       status = "okay";
+        dr_mode = "host";
+};
+
+&cppi41dma {
+       status = "okay";
+};
+
+&am33xx_pinmux {
+       usb_pins: pinmux_usb {
+               pinctrl-single,pins = <
+                       /* USB0 Over-Current (active low) */
+                       0x64 (PIN_INPUT | MUX_MODE7)    /* gpmc_a9.gpio1_25 */
+                       /* USB1 Over-Current (active low) */
+                       0x68 (PIN_INPUT | MUX_MODE7)    /* gpmc_a10.gpio1_26 */
+               >;
+       };
+};
+
+/* User IO */
+&leds {
+       pinctrl-names = "default";
+       pinctrl-0 = <&user_leds_pins>;
+
+       led@0 {
+               label = "pepper:user0:blue";
+               gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
+               linux,default-trigger = "none";
+               default-state = "off";
+       };
+
+       led@1 {
+               label = "pepper:user1:red";
+               gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+               linux,default-trigger = "none";
+               default-state = "off";
+       };
+};
+
+&buttons {
+       pinctrl-names = "default";
+       pinctrl-0 = <&user_buttons_pins>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       button@0 {
+               label = "home";
+               linux,code = <KEY_HOME>;
+               gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
+               gpio-key,wakeup;
+       };
+
+       button@1 {
+               label = "menu";
+               linux,code = <KEY_MENU>;
+               gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
+               gpio-key,wakeup;
+       };
+
+       buttons@2 {
+               label = "power";
+               linux,code = <KEY_POWER>;
+               gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+               gpio-key,wakeup;
+       };
+};
+
+&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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+};
index 49fa596..8d3c163 100644 (file)
@@ -30,7 +30,7 @@
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
-               cpu@0 {
+               cpu: cpu@0 {
                        compatible = "arm,cortex-a9";
                        device_type = "cpu";
                        reg = <0>;
                        ti,hwmods = "counter_32k";
                };
 
-               rtc@44e3e000 {
+               rtc: rtc@44e3e000 {
                        compatible = "ti,am4372-rtc","ti,da830-rtc";
                        reg = <0x44e3e000 0x1000>;
                        interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
                        status = "disabled";
                };
 
-               wdt@44e35000 {
+               wdt: wdt@44e35000 {
                        compatible = "ti,am4372-wdt","ti,omap3-wdt";
                        reg = <0x44e35000 0x1000>;
                        interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
                        #size-cells = <1>;
                        ranges;
 
-                       dispc@4832a400 {
+                       dispc: dispc@4832a400 {
                                compatible = "ti,omap3-dispc";
                                reg = <0x4832a400 0x400>;
                                interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
index 003766c..f0422c2 100644 (file)
 };
 
 &i2c0 {
-        status = "okay";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c0_pins>;
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       clock-frequency = <400000>;
+
+       tps65218: tps65218@24 {
+               reg = <0x24>;
+               compatible = "ti,tps65218";
+               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-min-microvolt = <1350000>;
+                       regulator-max-microvolt = <1350000>;
+                       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>;
+               };
+
+               dcdc6: regulator-dcdc6 {
+                       compatible = "ti,tps65218-dcdc6";
+                       regulator-name = "v1_8bat";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               ldo1: regulator-ldo1 {
+                       compatible = "ti,tps65218-ldo1";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+       };
 };
 
 &i2c1 {
-        status = "okay";
-        pinctrl-names = "default";
-        pinctrl-0 = <&i2c1_pins>;
-
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
        pixcir_ts@5c {
                compatible = "pixcir,pixcir_tangoc";
                pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts b/arch/arm/boot/dts/am437x-sk-evm.dts
new file mode 100644 (file)
index 0000000..859ff3d
--- /dev/null
@@ -0,0 +1,613 @@
+/*
+ * Copyright (C) 2014 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.
+ */
+
+/* AM437x SK EVM */
+
+/dts-v1/;
+
+#include "am4372.dtsi"
+#include <dt-bindings/pinctrl/am43xx.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "TI AM437x SK EVM";
+       compatible = "ti,am437x-sk-evm","ti,am4372","ti,am43";
+
+       aliases {
+               display0 = &lcd0;
+       };
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
+               brightness-levels = <0 51 53 56 62 75 101 152 255>;
+               default-brightness-level = <8>;
+       };
+
+       sound {
+               compatible = "ti,da830-evm-audio";
+               ti,model = "AM437x-SK-EVM";
+               ti,audio-codec = <&tlv320aic3106>;
+               ti,mcasp-controller = <&mcasp1>;
+               ti,codec-clock-rate = <24000000>;
+               ti,audio-routing =
+                       "Headphone Jack",       "HPLOUT",
+                       "Headphone Jack",       "HPROUT";
+       };
+
+       matrix_keypad: matrix_keypad@0 {
+               compatible = "gpio-matrix-keypad";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&matrix_keypad_pins>;
+
+               debounce-delay-ms = <5>;
+               col-scan-delay-us = <1500>;
+
+               row-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH          /* Bank5, pin5 */
+                               &gpio5 6 GPIO_ACTIVE_HIGH>;     /* Bank5, pin6 */
+
+               col-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH         /* Bank5, pin13 */
+                               &gpio5 4 GPIO_ACTIVE_HIGH>;     /* Bank5, pin4 */
+
+               linux,keymap = <
+                               MATRIX_KEY(0, 0, KEY_DOWN)
+                               MATRIX_KEY(0, 1, KEY_RIGHT)
+                               MATRIX_KEY(1, 0, KEY_LEFT)
+                               MATRIX_KEY(1, 1, KEY_UP)
+                       >;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&leds_pins>;
+
+               led@0 {
+                       label = "am437x-sk:red:heartbeat";
+                       gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>;    /* Bank 5, pin 0 */
+                       linux,default-trigger = "heartbeat";
+                       default-state = "off";
+               };
+
+               led@1 {
+                       label = "am437x-sk:green:mmc1";
+                       gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;    /* Bank 5, pin 1 */
+                       linux,default-trigger = "mmc0";
+                       default-state = "off";
+               };
+
+               led@2 {
+                       label = "am437x-sk:blue:cpu0";
+                       gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;    /* Bank 5, pin 2 */
+                       linux,default-trigger = "cpu0";
+                       default-state = "off";
+               };
+
+               led@3 {
+                       label = "am437x-sk:blue:usr3";
+                       gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>;    /* Bank 5, pin 3 */
+                       default-state = "off";
+               };
+       };
+
+       lcd0: display {
+               compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
+               label = "lcd";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcd_pins>;
+
+               enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+
+               panel-timing {
+                       clock-frequency = <9000000>;
+                       hactive = <480>;
+                       vactive = <272>;
+                       hfront-porch = <8>;
+                       hback-porch = <43>;
+                       hsync-len = <4>;
+                       vback-porch = <12>;
+                       vfront-porch = <4>;
+                       vsync-len = <10>;
+                       hsync-active = <0>;
+                       vsync-active = <0>;
+                       de-active = <1>;
+                       pixelclk-active = <1>;
+               };
+
+               port {
+                       lcd_in: endpoint {
+                               remote-endpoint = <&dpi_out>;
+                       };
+               };
+       };
+};
+
+&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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+       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  */
+               >;
+       };
+
+       mmc1_pins: pinmux_mmc1_pins {
+               pinctrl-single,pins = <
+                       0x160 (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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+       cpsw_default: cpsw_default {
+               pinctrl-single,pins = <
+                       /* Slave 1 */
+                       0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rmii1_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 */
+
+                       /* Slave 2 */
+                       0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
+                       0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
+                       0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
+                       0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
+                       0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
+                       0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
+                       0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
+                       0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rtcl */
+                       0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
+                       0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
+                       0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
+                       0x60 (PIN_INPUT_PULLDOWN | 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)
+
+                       /* 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)
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+       davinci_mdio_sleep: davinci_mdio_sleep {
+               pinctrl-single,pins = <
+                       /* MDIO reset value */
+                       0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+                       0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+               >;
+       };
+
+       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 */
+
+               >;
+       };
+
+       qspi_pins: qspi_pins {
+               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 */
+               >;
+       };
+
+       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 */
+               >;
+       };
+
+       lcd_pins: lcd_pins {
+               pinctrl-single,pins = <
+                       /* GPIO 5_8 to select LCD / HDMI */
+                       0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
+               >;
+       };
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_pins>;
+       clock-frequency = <400000>;
+
+       tps@24 {
+               compatible = "ti,tps65218";
+               reg = <0x24>;
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-controller;
+               #interrupt-cells = <2>;
+
+               dcdc1: regulator-dcdc1 {
+                       compatible = "ti,tps65218-dcdc1";
+                       /* VDD_CORE limits min of OPP50 and max of OPP100 */
+                       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";
+                       /* VDD_MPU limits min of OPP50 and max of OPP_NITRO */
+                       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 = "vdds_ddr";
+                       regulator-min-microvolt = <1350000>;
+                       regulator-max-microvolt = <1350000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               dcdc4: regulator-dcdc4 {
+                       compatible = "ti,tps65218-dcdc4";
+                       regulator-name = "v3_3d";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               ldo1: regulator-ldo1 {
+                       compatible = "ti,tps65218-ldo1";
+                       regulator-name = "v1_8d";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+       };
+
+       at24@50 {
+               compatible = "at24,24c256";
+               pagesize = <64>;
+               reg = <0x50>;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins>;
+       clock-frequency = <400000>;
+
+       edt-ft5306@38 {
+               status = "okay";
+               compatible = "edt,edt-ft5306", "edt,edt-ft5x06";
+               pinctrl-names = "default";
+               pinctrl-0 = <&edt_ft5306_ts_pins>;
+
+               reg = <0x38>;
+               interrupt-parent = <&gpio0>;
+               interrupts = <31 0>;
+
+               wake-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
+
+               touchscreen-size-x = <480>;
+               touchscreen-size-y = <272>;
+       };
+
+       tlv320aic3106: tlv320aic3106@1b {
+               compatible = "ti,tlv320aic3106";
+               reg = <0x1b>;
+               status = "okay";
+
+               /* Regulators */
+               AVDD-supply = <&dcdc4>;
+               IOVDD-supply = <&dcdc4>;
+               DRVDD-supply = <&dcdc4>;
+               DVDD-supply = <&ldo1>;
+       };
+
+       lis331dlh@18 {
+               compatible = "st,lis331dlh";
+               reg = <0x18>;
+               status = "okay";
+
+               Vdd-supply = <&dcdc4>;
+               Vdd_IO-supply = <&dcdc4>;
+               interrupts-extended = <&gpio1 6 0>, <&gpio2 1 0>;
+       };
+};
+
+&epwmss0 {
+       status = "okay";
+};
+
+&ecap0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&ecap0_pins>;
+};
+
+&gpio0 {
+       status = "okay";
+};
+
+&gpio1 {
+       status = "okay";
+};
+
+&gpio5 {
+       status = "okay";
+};
+
+&mmc1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc1_pins>;
+
+       vmmc-supply = <&dcdc4>;
+       bus-width = <4>;
+       cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+};
+
+&usb2_phy1 {
+       status = "okay";
+};
+
+&usb1 {
+       dr_mode = "peripheral";
+       status = "okay";
+};
+
+&usb2_phy2 {
+       status = "okay";
+};
+
+&usb2 {
+       dr_mode = "host";
+       status = "okay";
+};
+
+&qspi {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&qspi_pins>;
+
+       spi-max-frequency = <48000000>;
+       m25p80@0 {
+               compatible = "mx66l51235l";
+               spi-max-frequency = <48000000>;
+               reg = <0>;
+               spi-cpol;
+               spi-cpha;
+               spi-tx-bus-width = <1>;
+               spi-rx-bus-width = <4>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               /* MTD partition table.
+                * The ROM checks the first 512KiB
+                * for a valid file to boot(XIP).
+                */
+               partition@0 {
+                       label = "QSPI.U_BOOT";
+                       reg = <0x00000000 0x000080000>;
+               };
+               partition@1 {
+                       label = "QSPI.U_BOOT.backup";
+                       reg = <0x00080000 0x00080000>;
+               };
+               partition@2 {
+                       label = "QSPI.U-BOOT-SPL_OS";
+                       reg = <0x00100000 0x00010000>;
+               };
+               partition@3 {
+                       label = "QSPI.U_BOOT_ENV";
+                       reg = <0x00110000 0x00010000>;
+               };
+               partition@4 {
+                       label = "QSPI.U-BOOT-ENV.backup";
+                       reg = <0x00120000 0x00010000>;
+               };
+               partition@5 {
+                       label = "QSPI.KERNEL";
+                       reg = <0x00130000 0x0800000>;
+               };
+               partition@6 {
+                       label = "QSPI.FILESYSTEM";
+                       reg = <0x00930000 0x36D0000>;
+               };
+       };
+};
+
+&mac {
+       pinctrl-names = "default", "sleep";
+       pinctrl-0 = <&cpsw_default>;
+       pinctrl-1 = <&cpsw_sleep>;
+       dual_emac = <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>, <4>;
+       phy-mode = "rgmii";
+       dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+       phy_id = <&davinci_mdio>, <5>;
+       phy-mode = "rgmii";
+       dual_emac_res_vlan = <2>;
+};
+
+&elm {
+       status = "okay";
+};
+
+&mcasp1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcasp1_pins>;
+
+       status = "okay";
+
+       op-mode = <0>;
+       tdm-slots = <2>;
+       serial-dir = <
+               0 0 1 2
+       >;
+
+       tx-num-evt = <1>;
+       rx-num-evt = <1>;
+};
+
+&dss {
+       status = "okay";
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&dss_pins>;
+
+       port {
+               dpi_out: endpoint@0 {
+                       remote-endpoint = <&lcd_in>;
+                       data-lines = <24>;
+               };
+       };
+};
+
+&rtc {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
index 90098f9..f1ee749 100644 (file)
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins>;
+       clock-frequency = <400000>;
+
+       tps65218: tps65218@24 {
+               reg = <0x24>;
+               compatible = "ti,tps65218";
+               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-min-microvolt = <1350000>;
+                       regulator-max-microvolt = <1350000>;
+                       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>;
+               };
+
+               dcdc6: regulator-dcdc6 {
+                       compatible = "ti,tps65218-dcdc6";
+                       regulator-name = "v1_8bat";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+               };
+
+               ldo1: regulator-ldo1 {
+                       compatible = "ti,tps65218-ldo1";
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+       };
 
        at24@50 {
                compatible = "at24,24c256";
index 3c4f6d9..4e0ad3b 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index 1e2919d..929ae00 100644 (file)
                                cd-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
                                wp-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
                        };
+
+                       mdio {
+                               phy0: ethernet-phy@0 {
+                                       reg = <0>;
+                               };
+
+                               phy3: ethernet-phy@3 {
+                                       reg = <3>;
+                               };
+                       };
+
+                       ethernet@f0000 {
+                               status = "okay";
+
+                               eth0@c4000 {
+                                       status = "okay";
+                                       phy = <&phy0>;
+                                       phy-mode = "rgmii-id";
+                               };
+
+                               eth1@c5000 {
+                                       status = "okay";
+                                       phy = <&phy3>;
+                                       phy-mode = "gmii";
+                               };
+                       };
                };
 
                pcie-controller {
index fb92551..c1e49e7 100644 (file)
@@ -25,6 +25,8 @@
                gpio0 = &gpio0;
                gpio1 = &gpio1;
                gpio2 = &gpio2;
+               ethernet0 = &eth0;
+               ethernet1 = &eth1;
        };
 
        clocks {
                                      <0xc100 0x100>;
                        };
 
+                       mdio {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "marvell,orion-mdio";
+                               reg = <0xc0054 0x4>;
+                               clocks = <&gateclk 19>;
+                       };
+
+                       /* Network controller */
+                       ethernet@f0000 {
+                               compatible = "marvell,armada-375-pp2";
+                               reg = <0xf0000 0xa000>, /* Packet Processor regs */
+                                     <0xc0000 0x3060>, /* LMS regs */
+                                     <0xc4000 0x100>,  /* eth0 regs */
+                                     <0xc5000 0x100>;  /* eth1 regs */
+                               clocks = <&gateclk 3>, <&gateclk 19>;
+                               clock-names = "pp_clk", "gop_clk";
+                               status = "disabled";
+
+                               eth0: eth0@c4000 {
+                                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                                       port-id = <0>;
+                                       status = "disabled";
+                               };
+
+                               eth1: eth1@c5000 {
+                                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+                                       port-id = <1>;
+                                       status = "disabled";
+                               };
+                       };
+
                        spi0: spi@10600 {
                                compatible = "marvell,orion-spi";
                                reg = <0x10600 0x50>;
index 689fa1a..242d0ec 100644 (file)
                                reg = <0x20800 0x10>;
                        };
 
+                       mpcore-soc-ctrl@20d20 {
+                               compatible = "marvell,armada-380-mpcore-soc-ctrl";
+                               reg = <0x20d20 0x6c>;
+                       };
+
                        coherency-fabric@21010 {
                                compatible = "marvell,armada-380-coherency-fabric";
                                reg = <0x21010 0x1c>;
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
new file mode 100644 (file)
index 0000000..469cf71
--- /dev/null
@@ -0,0 +1,284 @@
+/*
+ * Device Tree file for Lenovo Iomega ix4-300d
+ *
+ * Copyright (C) 2014, Benoit Masson <yahoo@perenite.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.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "armada-xp-mv78230.dtsi"
+
+/ {
+       model = "Lenovo Iomega ix4-300d";
+       compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230",
+                    "marvell,armadaxp", "marvell,armada-370-xp";
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk";
+               stdout-path = "/soc/internal-regs/serial@12000";
+       };
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x00000000 0 0x20000000>; /* 512MB */
+       };
+
+       soc {
+               ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
+                       MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
+
+               pcie-controller {
+                       status = "okay";
+
+                       /* Quad port sata: Marvell 88SX7042 */
+                       pcie@1,0 {
+                               /* Port 0, Lane 0 */
+                               status = "okay";
+                       };
+
+                       /* USB 3.0 xHCI controller: NEC D720200F1 */
+                       pcie@5,0 {
+                               /* Port 1, Lane 0 */
+                               status = "okay";
+                       };
+               };
+
+               internal-regs {
+                       pinctrl {
+                               poweroff_pin: poweroff-pin {
+                                       marvell,pins = "mpp24";
+                                       marvell,function = "gpio";
+                               };
+
+                               power_button_pin: power-button-pin {
+                                       marvell,pins = "mpp44";
+                                       marvell,function = "gpio";
+                               };
+
+                               reset_button_pin: reset-button-pin {
+                                       marvell,pins = "mpp45";
+                                       marvell,function = "gpio";
+                               };
+                               select_button_pin: select-button-pin {
+                                       marvell,pins = "mpp41";
+                                       marvell,function = "gpio";
+                               };
+
+                               scroll_button_pin: scroll-button-pin {
+                                       marvell,pins = "mpp42";
+                                       marvell,function = "gpio";
+                               };
+
+                               hdd_led_pin: hdd-led-pin {
+                                       marvell,pins = "mpp26";
+                                       marvell,function = "gpio";
+                               };
+                       };
+
+                       serial@12000 {
+                               status = "okay";
+                       };
+
+                       mdio {
+                               phy0: ethernet-phy@0 { /* Marvell 88E1318 */
+                                       reg = <0>;
+                               };
+
+                               phy1: ethernet-phy@1 { /* Marvell 88E1318 */
+                                       reg = <1>;
+                               };
+                       };
+
+                       ethernet@70000 {
+                               status = "okay";
+                               phy = <&phy0>;
+                               phy-mode = "rgmii-id";
+                       };
+
+                       ethernet@74000 {
+                               status = "okay";
+                               phy = <&phy1>;
+                               phy-mode = "rgmii-id";
+                       };
+
+                       usb@50000 {
+                               status = "okay";
+                       };
+
+                       usb@51000 {
+                               status = "okay";
+                       };
+
+                       i2c@11000 {
+                               clock-frequency = <400000>;
+                               status = "okay";
+
+                               adt7473@2e {
+                                       compatible = "adi,adt7473";
+                                       reg = <0x2e>;
+                               };
+
+                               pcf8563@51 {
+                                       compatible = "nxp,pcf8563";
+                                       reg = <0x51>;
+                               };
+
+                       };
+
+                       nand@d0000 {
+                               status = "okay";
+                               num-cs = <1>;
+                               marvell,nand-keep-config;
+                               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>;
+                               };
+                       };
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-0 = <&power_button_pin &reset_button_pin
+                       &select_button_pin &scroll_button_pin>;
+               pinctrl-names = "default";
+
+               power-button {
+                       label = "Power Button";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+               };
+
+               reset-button {
+                       label = "Reset Button";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
+               };
+
+               select-button {
+                       label = "Select Button";
+                       linux,code = <BTN_SELECT>;
+                       gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+               };
+
+               scroll-button {
+                       label = "Scroll Button";
+                       linux,code = <KEY_SCROLLDOWN>;
+                       gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       spi3 {
+               compatible = "spi-gpio";
+               status = "okay";
+               gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
+               gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
+               cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
+               num-chipselects = <1>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               gpio_spi: gpio_spi@0 {
+                       compatible = "fairchild,74hc595";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       reg = <0>;
+                       registers-number = <2>;
+                       spi-max-frequency = <100000>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&hdd_led_pin>;
+               pinctrl-names = "default";
+
+               hdd-led {
+                       label = "ix4-300d:hdd:blue";
+                       gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               power-led {
+                       label = "ix4-300d:power:white";
+                       gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
+                       /* init blinking while booting */
+                       linux,default-trigger = "timer";
+                       default-state = "on";
+               };
+
+               sysfail-led {
+                       label = "ix4-300d:sysfail:red";
+                       gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               sys-led {
+                       label = "ix4-300d:sys:blue";
+                       gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+               hddfail-led {
+                       label = "ix4-300d:hddfail:red";
+                       gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
+                       default-state = "off";
+               };
+
+       };
+
+       /*
+        * Warning: you need both eth1 & 0 PHY initialized (i.e having
+        * them up does the tweak) for poweroff to shutdown otherwise it
+        * reboots
+        */
+       gpio-poweroff {
+               compatible = "gpio-poweroff";
+               pinctrl-0 = <&poweroff_pin>;
+               pinctrl-names = "default";
+               gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
+       };
+};
index 1257ff1..2592e1c 100644 (file)
@@ -34,6 +34,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <0>;
                        clocks = <&cpuclk 0>;
+                       clock-latency = <1000000>;
                };
 
                cpu@1 {
@@ -41,6 +42,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <1>;
                        clocks = <&cpuclk 1>;
+                       clock-latency = <1000000>;
                };
        };
 
index 3396b25..480e237 100644 (file)
@@ -36,6 +36,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <0>;
                        clocks = <&cpuclk 0>;
+                       clock-latency = <1000000>;
                };
 
                cpu@1 {
@@ -43,6 +44,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <1>;
                        clocks = <&cpuclk 1>;
+                       clock-latency = <1000000>;
                };
        };
 
index 6da84bf..2c7b1fe 100644 (file)
@@ -37,6 +37,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <0>;
                        clocks = <&cpuclk 0>;
+                       clock-latency = <1000000>;
                };
 
                cpu@1 {
@@ -44,6 +45,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <1>;
                        clocks = <&cpuclk 1>;
+                       clock-latency = <1000000>;
                };
 
                cpu@2 {
@@ -51,6 +53,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <2>;
                        clocks = <&cpuclk 2>;
+                       clock-latency = <1000000>;
                };
 
                cpu@3 {
@@ -58,6 +61,7 @@
                        compatible = "marvell,sheeva-v7";
                        reg = <3>;
                        clocks = <&cpuclk 3>;
+                       clock-latency = <1000000>;
                };
        };
 
index 5902e83..bff9f6c 100644 (file)
@@ -99,7 +99,7 @@
                        cpuclk: clock-complex@18700 {
                                #clock-cells = <1>;
                                compatible = "marvell,armada-xp-cpu-clock";
-                               reg = <0x18700 0xA0>;
+                               reg = <0x18700 0xA0>, <0x1c054 0x10>;
                                clocks = <&coreclk 1>;
                        };
 
index 55ab618..e9ced30 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index df4b786..b6ea3f4 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index cbe9673..f89598a 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index 5576ae8..a9aef53 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 5b8e404..fec1fca 100644 (file)
                reg = <0x20000000 0x10000000>;
        };
 
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
 
-       main_xtal {
-               clock-frequency = <12000000>;
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index c61b16f..65ccf56 100644 (file)
@@ -14,6 +14,7 @@
 #include <dt-bindings/pinctrl/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
 
 / {
        model = "Atmel AT91RM9200 family SoC";
                reg = <0x20000000 0x04000000>;
        };
 
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+       };
+
        ahb {
                compatible = "simple-bus";
                #address-cells = <1>;
                        pmc: pmc@fffffc00 {
                                compatible = "atmel,at91rm9200-pmc";
                                reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <3>;
+                                       atmel,pll-clk-output-ranges = <80000000 160000000 0>,
+                                                               <150000000 180000000 2>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <3>;
+                                       atmel,pll-clk-output-ranges = <80000000 160000000 0>,
+                                                               <150000000 180000000 2>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 80000000>;
+                                       atmel,clk-divisors = <1 2 3 4>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: prog2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+
+                                       prog3: prog3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               interrupts = <AT91_PMC_PCKRDY(3)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck2 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+
+                                       pck3: pck3 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                               clocks = <&prog3>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioC_clk: pioC_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       pioD_clk: pioD_clk {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       usart3_clk: usart3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               reg = <12>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       ssc2_clk: ssc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       tc0_clk: tc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tc1_clk: tc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tc2_clk: tc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       tc3_clk: tc3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       tc4_clk: tc4_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       tc5_clk: tc5_clk {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+                               };
                        };
 
                        st: timer@fffffd00 {
                                interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
                                              18 IRQ_TYPE_LEVEL_HIGH 0
                                              19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        tcb1: timer@fffa4000 {
                                interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0
                                              21 IRQ_TYPE_LEVEL_HIGH 0
                                              22 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc3_clk>, <&tc4_clk>, <&tc5_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        i2c0: i2c@fffb8000 {
                                interrupts = <12 IRQ_TYPE_LEVEL_HIGH 6>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_twi>;
+                               clocks = <&twi0_clk>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                                status = "disabled";
                                compatible = "atmel,hsmci";
                                reg = <0xfffb4000 0x4000>;
                                interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
                                #address-cells = <1>;
                                #size-cells = <0>;
                                pinctrl-names = "default";
                                interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
                                status = "disable";
                        };
 
                                interrupts = <15 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
                                status = "disable";
                        };
 
                                interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc2_tx &pinctrl_ssc2_rx>;
+                               clocks = <&ssc2_clk>;
+                               clock-names = "pclk";
                                status = "disable";
                        };
 
                                phy-mode = "rmii";
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>;
+                               clock-names = "ether_clk";
                                status = "disabled";
                        };
 
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
                                };
 
                                pioB: gpio@fffff600 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
                                };
 
                                pioC: gpio@fffff800 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioC_clk>;
                                };
 
                                pioD: gpio@fffffa00 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioD_clk>;
                                };
                        };
 
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                compatible = "atmel,at91rm9200-udc";
                                reg = <0xfffb0000 0x4000>;
                                interrupts = <11 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
                                status = "disabled";
                        };
 
                                interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
                };
                        compatible = "atmel,at91rm9200-ohci", "usb-ohci";
                        reg = <0x00300000 0x100000>;
                        interrupts = <23 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&usb>, <&ohci_clk>, <&ohci_clk>, <&uhpck>;
+                       clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
                        status = "disabled";
                };
        };
index df6b0aa..43eb779 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index c0e0eae..cb100b0 100644 (file)
@@ -12,6 +12,7 @@
 #include <dt-bindings/pinctrl/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
 
 / {
        model = "Atmel AT91SAM9260 family SoC";
                reg = <0x20000000 0x04000000>;
        };
 
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <5000000>;
+               };
+       };
+
        ahb {
                compatible = "simple-bus";
                #address-cells = <1>;
                        };
 
                        pmc: pmc@fffffc00 {
-                               compatible = "atmel,at91rm9200-pmc";
+                               compatible = "atmel,at91sam9260-pmc";
                                reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               slow_rc_osc: slow_rc_osc {
+                                       compatible = "fixed-clock";
+                                       #clock-cells = <0>;
+                                       clock-frequency = <32768>;
+                                       clock-accuracy = <50000000>;
+                               };
+
+                               clk32k: slck {
+                                       compatible = "atmel,at91sam9260-clk-slow";
+                                       #clock-cells = <0>;
+                                       clocks = <&slow_rc_osc>, <&slow_xtal>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 160000000 0 1>,
+                                                               <150000000 240000000 2 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 5000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 105000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&clk32k>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioC_clk: pioC_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       adc_clk: adc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               reg = <11>;
+                                               #clock-cells = <0>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       tc0_clk: tc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tc1_clk: tc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tc2_clk: tc2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       isi_clk: isi_clk {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       usart3_clk: usart3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       uart0_clk: uart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       uart1_clk: uart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       tc3_clk: tc3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       tc4_clk: tc4_clk {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       tc5_clk: tc5_clk {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+                               };
                        };
 
                        rstc@fffffd00 {
                                compatible = "atmel,at91sam9260-pit";
                                reg = <0xfffffd30 0xf>;
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
                        };
 
                        tcb0: timer@fffa0000 {
                                interrupts = <17 IRQ_TYPE_LEVEL_HIGH 0
                                              18 IRQ_TYPE_LEVEL_HIGH 0
                                              19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc0_clk>, <&tc1_clk>, <&tc2_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        tcb1: timer@fffdc000 {
                                interrupts = <26 IRQ_TYPE_LEVEL_HIGH 0
                                              27 IRQ_TYPE_LEVEL_HIGH 0
                                              28 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tc3_clk>, <&tc4_clk>, <&tc5_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        pinctrl@fffff400 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
                                };
 
                                pioB: gpio@fffff600 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
                                };
 
                                pioC: gpio@fffff800 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioC_clk>;
                                };
                        };
 
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart0>;
+                               clocks = <&uart0_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_uart1>;
+                               clocks = <&uart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
                                status = "disabled";
                        };
 
                                compatible = "atmel,at91rm9200-udc";
                                reg = <0xfffa4000 0x4000>;
                                interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
                                status = "disabled";
                        };
 
                                interrupts = <11 IRQ_TYPE_LEVEL_HIGH 6>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&twi0_clk>;
                                status = "disabled";
                        };
 
                                #address-cells = <1>;
                                #size-cells = <0>;
                                pinctrl-names = "default";
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
                                status = "disabled";
                        };
 
                                interrupts = <14 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
                                status = "disabled";
                        };
 
                                interrupts = <12 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                compatible = "atmel,at91sam9260-adc";
                                reg = <0xfffe0000 0x100>;
                                interrupts = <5 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&adc_clk>, <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
                                atmel,adc-use-external-triggers;
                                atmel,adc-channels-used = <0xf>;
                                atmel,adc-vref = <3300>;
                        compatible = "atmel,at91rm9200-ohci", "usb-ohci";
                        reg = <0x00500000 0x100000>;
                        interrupts = <20 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&usb>, <&ohci_clk>, <&ohci_clk>, <&uhpck>;
+                       clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
                        status = "disabled";
                };
        };
index 04927db..a81aab4 100644 (file)
                reg = <0x20000000 0x08000000>;
        };
 
-       main_xtal: main_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+       clocks {
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       slow_xtal: slow_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
        };
 
        ahb {
index aa35a7a..f4a7657 100644 (file)
                reg = <0x20000000 0x4000000>;
        };
 
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
-
-       main_xtal {
-               clock-frequency = <18432000>;
-       };
-
        clocks {
                #address-cells = <1>;
                #size-cells = <1>;
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index fece866..bb23c2d 100644 (file)
@@ -10,6 +10,7 @@
 #include <dt-bindings/pinctrl/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
 
 / {
        model = "Atmel AT91SAM9263 family SoC";
@@ -32,6 +33,7 @@
                ssc1 = &ssc1;
                pwm0 = &pwm0;
        };
+
        cpus {
                #address-cells = <0>;
                #size-cells = <0>;
                reg = <0x20000000 0x08000000>;
        };
 
+       clocks {
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+       };
+
        ahb {
                compatible = "simple-bus";
                #address-cells = <1>;
                        pmc: pmc@fffffc00 {
                                compatible = "atmel,at91rm9200-pmc";
                                reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <1000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <80000000 200000000 0 1>,
+                                                               <190000000 240000000 2 1>;
+                               };
+
+                               pllb: pllbck {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKB>;
+                                       clocks = <&main>;
+                                       reg = <1>;
+                                       atmel,clk-input-range = <1000000 5000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <70000000 130000000 1 1>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+                                       atmel,clk-output-range = <0 120000000>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91rm9200-clk-usb";
+                                       #clock-cells = <0>;
+                                       atmel,clk-divisors = <1 2 4 0>;
+                                       clocks = <&pllb>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91rm9200-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&slow_xtal>, <&main>, <&plla>, <&pllb>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+
+                                       prog2: prog2 {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               interrupts = <AT91_PMC_PCKRDY(2)>;
+                                       };
+
+                                       prog3: prog3 {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                               interrupts = <AT91_PMC_PCKRDY(3)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       udpck: udpck {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+
+                                       pck2: pck2 {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                               clocks = <&prog2>;
+                                       };
+
+                                       pck3: pck3 {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                               clocks = <&prog3>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioCDE_clk: pioCDE_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       mci1_clk: mci1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       can_clk: can_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       ac91_clk: ac97_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       tcb_clk: tcb_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       pwm_clk: pwm_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       g2de_clk: g2de_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       udc_clk: udc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       isi_clk: isi_clk {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       lcd_clk: lcd_clk {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       dma_clk: dma_clk {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       ohci_clk: ohci_clk {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+                               };
                        };
 
                        ramc: ramc@ffffe200 {
                                compatible = "atmel,at91sam9260-pit";
                                reg = <0xfffffd30 0xf>;
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
                        };
 
                        tcb0: timer@fff7c000 {
                                compatible = "atmel,at91rm9200-tcb";
                                reg = <0xfff7c000 0x100>;
                                interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb_clk>;
+                               clock-names = "t0_clk";
                        };
 
                        rstc@fffffd00 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
                                };
 
                                pioB: gpio@fffff400 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
                                };
 
                                pioC: gpio@fffff600 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
                                };
 
                                pioD: gpio@fffff800 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
                                };
 
                                pioE: gpio@fffffa00 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioCDE_clk>;
                                };
                        };
 
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
                                status = "disabled";
                        };
 
                                interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
                                status = "disabled";
                        };
 
                                interrupts = <21 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
                                status = "disabled";
                        };
 
                                compatible = "atmel,at91rm9200-udc";
                                reg = <0xfff78000 0x4000>;
                                interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>;
+                               clocks = <&udc_clk>, <&udpck>;
+                               clock-names = "pclk", "hclk";
                                status = "disabled";
                        };
 
                                interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&twi0_clk>;
                                status = "disabled";
                        };
 
                                interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
                                status = "disabled";
                        };
 
                                interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
                                status = "disabled";
                        };
 
                                interrupts = <14 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                interrupts = <15 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                reg = <0xfffb8000 0x300>;
                                interrupts = <20 IRQ_TYPE_LEVEL_HIGH 4>;
                                #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
+                               clock-names = "pwm_clk";
                                status = "disabled";
                        };
                };
                        compatible = "atmel,at91rm9200-ohci", "usb-ohci";
                        reg = <0x00a00000 0x100000>;
                        interrupts = <29 IRQ_TYPE_LEVEL_HIGH 2>;
+                       clocks = <&usb>, <&ohci_clk>, <&ohci_clk>, <&uhpck>;
+                       clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
                        status = "disabled";
                };
        };
index 15009c9..5cf93ee 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <16367660>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <16367660>;
+               };
        };
 
        ahb {
index b8e7946..31f7652 100644 (file)
                        adc0: adc@fffe0000 {
                                atmel,adc-startup-time = <40>;
                        };
+
+                       pmc: pmc@fffffc00 {
+                               plla: pllack {
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       atmel,pll-clk-output-ranges = <745000000 800000000 0 0>,
+                                                               <695000000 750000000 1 0>,
+                                                               <645000000 700000000 2 0>,
+                                                               <595000000 650000000 3 0>,
+                                                               <545000000 600000000 0 1>,
+                                                               <495000000 550000000 1 1>,
+                                                               <445000000 500000000 2 1>,
+                                                               <400000000 450000000 3 1>;
+                               };
+
+                               pllb: pllbck {
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       atmel,pll-clk-output-ranges = <30000000 100000000 0 0>;
+                               };
+
+                               mck: masterck {
+                                       atmel,clk-output-range = <0 133000000>;
+                                       atmel,clk-divisors = <1 2 4 6>;
+                               };
+                       };
                };
        };
 };
index cb2c010..d291910 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index ace6bf1..932a669 100644 (file)
@@ -14,6 +14,7 @@
 #include <dt-bindings/pinctrl/at91.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/clock/at91.h>
 
 / {
        model = "Atmel AT91SAM9G45 family SoC";
                reg = <0x70000000 0x10000000>;
        };
 
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
+
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <300000>;
+               };
+       };
+
        ahb {
                compatible = "simple-bus";
                #address-cells = <1>;
                                compatible = "atmel,at91sam9g45-ddramc";
                                reg = <0xffffe400 0x200
                                       0xffffe600 0x200>;
+                               clocks = <&ddrck>;
+                               clock-names = "ddrck";
                        };
 
                        pmc: pmc@fffffc00 {
-                               compatible = "atmel,at91rm9200-pmc";
+                               compatible = "atmel,at91sam9g45-pmc";
                                reg = <0xfffffc00 0x100>;
+                               interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               interrupt-controller;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               #interrupt-cells = <1>;
+
+                               main_osc: main_osc {
+                                       compatible = "atmel,at91rm9200-clk-main-osc";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MOSCS>;
+                                       clocks = <&main_xtal>;
+                               };
+
+                               main: mainck {
+                                       compatible = "atmel,at91rm9200-clk-main";
+                                       #clock-cells = <0>;
+                                       clocks = <&main_osc>;
+                               };
+
+                               plla: pllack {
+                                       compatible = "atmel,at91rm9200-clk-pll";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKA>;
+                                       clocks = <&main>;
+                                       reg = <0>;
+                                       atmel,clk-input-range = <2000000 32000000>;
+                                       #atmel,pll-clk-output-range-cells = <4>;
+                                       atmel,pll-clk-output-ranges = <745000000 800000000 0 0
+                                                                      695000000 750000000 1 0
+                                                                      645000000 700000000 2 0
+                                                                      595000000 650000000 3 0
+                                                                      545000000 600000000 0 1
+                                                                      495000000 555000000 1 1
+                                                                      445000000 500000000 2 1
+                                                                      400000000 450000000 3 1>;
+                               };
+
+                               plladiv: plladivck {
+                                       compatible = "atmel,at91sam9x5-clk-plldiv";
+                                       #clock-cells = <0>;
+                                       clocks = <&plla>;
+                               };
+
+                               utmi: utmick {
+                                       compatible = "atmel,at91sam9x5-clk-utmi";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_LOCKU>;
+                                       clocks = <&main>;
+                               };
+
+                               mck: masterck {
+                                       compatible = "atmel,at91rm9200-clk-master";
+                                       #clock-cells = <0>;
+                                       interrupts-extended = <&pmc AT91_PMC_MCKRDY>;
+                                       clocks = <&slow_xtal>, <&main>, <&plladiv>, <&utmi>;
+                                       atmel,clk-output-range = <0 133333333>;
+                                       atmel,clk-divisors = <1 2 4 3>;
+                               };
+
+                               usb: usbck {
+                                       compatible = "atmel,at91sam9x5-clk-usb";
+                                       #clock-cells = <0>;
+                                       clocks = <&plladiv>, <&utmi>;
+                               };
+
+                               prog: progck {
+                                       compatible = "atmel,at91sam9g45-clk-programmable";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       interrupt-parent = <&pmc>;
+                                       clocks = <&slow_xtal>, <&main>, <&plladiv>, <&utmi>, <&mck>;
+
+                                       prog0: prog0 {
+                                               #clock-cells = <0>;
+                                               reg = <0>;
+                                               interrupts = <AT91_PMC_PCKRDY(0)>;
+                                       };
+
+                                       prog1: prog1 {
+                                               #clock-cells = <0>;
+                                               reg = <1>;
+                                               interrupts = <AT91_PMC_PCKRDY(1)>;
+                                       };
+                               };
+
+                               systemck {
+                                       compatible = "atmel,at91rm9200-clk-system";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       ddrck: ddrck {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                               clocks = <&mck>;
+                                       };
+
+                                       uhpck: uhpck {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                               clocks = <&usb>;
+                                       };
+
+                                       pck0: pck0 {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                               clocks = <&prog0>;
+                                       };
+
+                                       pck1: pck1 {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                               clocks = <&prog1>;
+                                       };
+                               };
+
+                               periphck {
+                                       compatible = "atmel,at91rm9200-clk-peripheral";
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       clocks = <&mck>;
+
+                                       pioA_clk: pioA_clk {
+                                               #clock-cells = <0>;
+                                               reg = <2>;
+                                       };
+
+                                       pioB_clk: pioB_clk {
+                                               #clock-cells = <0>;
+                                               reg = <3>;
+                                       };
+
+                                       pioC_clk: pioC_clk {
+                                               #clock-cells = <0>;
+                                               reg = <4>;
+                                       };
+
+                                       pioDE_clk: pioDE_clk {
+                                               #clock-cells = <0>;
+                                               reg = <5>;
+                                       };
+
+                                       trng_clk: trng_clk {
+                                               #clock-cells = <0>;
+                                               reg = <6>;
+                                       };
+
+                                       usart0_clk: usart0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <7>;
+                                       };
+
+                                       usart1_clk: usart1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <8>;
+                                       };
+
+                                       usart2_clk: usart2_clk {
+                                               #clock-cells = <0>;
+                                               reg = <9>;
+                                       };
+
+                                       usart3_clk: usart3_clk {
+                                               #clock-cells = <0>;
+                                               reg = <10>;
+                                       };
+
+                                       mci0_clk: mci0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <11>;
+                                       };
+
+                                       twi0_clk: twi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <12>;
+                                       };
+
+                                       twi1_clk: twi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <13>;
+                                       };
+
+                                       spi0_clk: spi0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <14>;
+                                       };
+
+                                       spi1_clk: spi1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <15>;
+                                       };
+
+                                       ssc0_clk: ssc0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <16>;
+                                       };
+
+                                       ssc1_clk: ssc1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <17>;
+                                       };
+
+                                       tcb0_clk: tcb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <18>;
+                                       };
+
+                                       pwm_clk: pwm_clk {
+                                               #clock-cells = <0>;
+                                               reg = <19>;
+                                       };
+
+                                       adc_clk: adc_clk {
+                                               #clock-cells = <0>;
+                                               reg = <20>;
+                                       };
+
+                                       dma0_clk: dma0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <21>;
+                                       };
+
+                                       uhphs_clk: uhphs_clk {
+                                               #clock-cells = <0>;
+                                               reg = <22>;
+                                       };
+
+                                       lcd_clk: lcd_clk {
+                                               #clock-cells = <0>;
+                                               reg = <23>;
+                                       };
+
+                                       ac97_clk: ac97_clk {
+                                               #clock-cells = <0>;
+                                               reg = <24>;
+                                       };
+
+                                       macb0_clk: macb0_clk {
+                                               #clock-cells = <0>;
+                                               reg = <25>;
+                                       };
+
+                                       isi_clk: isi_clk {
+                                               #clock-cells = <0>;
+                                               reg = <26>;
+                                       };
+
+                                       udphs_clk: udphs_clk {
+                                               #clock-cells = <0>;
+                                               reg = <27>;
+                                       };
+
+                                       aestdessha_clk: aestdessha_clk {
+                                               #clock-cells = <0>;
+                                               reg = <28>;
+                                       };
+
+                                       mci1_clk: mci1_clk {
+                                               #clock-cells = <0>;
+                                               reg = <29>;
+                                       };
+
+                                       vdec_clk: vdec_clk {
+                                               #clock-cells = <0>;
+                                               reg = <30>;
+                                       };
+                               };
                        };
 
                        rstc@fffffd00 {
                                compatible = "atmel,at91sam9260-pit";
                                reg = <0xfffffd30 0xf>;
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
+                               clocks = <&mck>;
                        };
 
 
                                compatible = "atmel,at91rm9200-tcb";
                                reg = <0xfff7c000 0x100>;
                                interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&tcb0_clk>, <&tcb0_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        tcb1: timer@fffd4000 {
                                compatible = "atmel,at91rm9200-tcb";
                                reg = <0xfffd4000 0x100>;
                                interrupts = <18 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&tcb0_clk>, <&tcb0_clk>, <&tcb0_clk>;
+                               clock-names = "t0_clk", "t1_clk", "t2_clk";
                        };
 
                        dma: dma-controller@ffffec00 {
                                reg = <0xffffec00 0x200>;
                                interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
                                #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
                        };
 
                        pinctrl@fffff200 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioA_clk>;
                                };
 
                                pioB: gpio@fffff400 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioB_clk>;
                                };
 
                                pioC: gpio@fffff600 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioC_clk>;
                                };
 
                                pioD: gpio@fffff800 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioDE_clk>;
                                };
 
                                pioE: gpio@fffffa00 {
                                        gpio-controller;
                                        interrupt-controller;
                                        #interrupt-cells = <2>;
+                                       clocks = <&pioDE_clk>;
                                };
                        };
 
                                interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_dbgu>;
+                               clocks = <&mck>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart0>;
+                               clocks = <&usart0_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart1>;
+                               clocks = <&usart1_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart2>;
+                               clocks = <&usart2_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                atmel,use-dma-tx;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_usart3>;
+                               clocks = <&usart3_clk>;
+                               clock-names = "usart";
                                status = "disabled";
                        };
 
                                interrupts = <25 IRQ_TYPE_LEVEL_HIGH 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_macb_rmii>;
+                               clocks = <&macb0_clk>, <&macb0_clk>;
+                               clock-names = "hclk", "pclk";
                                status = "disabled";
                        };
 
                                pinctrl-0 = <&pinctrl_i2c0>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&twi0_clk>;
                                status = "disabled";
                        };
 
                                pinctrl-0 = <&pinctrl_i2c1>;
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&twi1_clk>;
                                status = "disabled";
                        };
 
                                interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
+                               clocks = <&ssc0_clk>;
+                               clock-names = "pclk";
                                status = "disabled";
                        };
 
                                interrupts = <17 IRQ_TYPE_LEVEL_HIGH 5>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
+                               clocks = <&ssc1_clk>;
+                               clock-names = "pclk";
                                status = "disabled";
                        };
 
                                compatible = "atmel,at91sam9g45-adc";
                                reg = <0xfffb0000 0x100>;
                                interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&adc_clk>, <&adc_op_clk>;
+                               clock-names = "adc_clk", "adc_op_clk";
                                atmel,adc-channels-used = <0xff>;
                                atmel,adc-vref = <3300>;
                                atmel,adc-startup-time = <40>;
                                reg = <0xfffb8000 0x300>;
                                interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>;
                                #pwm-cells = <3>;
+                               clocks = <&pwm_clk>;
                                status = "disabled";
                        };
 
                                dma-names = "rxtx";
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&mci0_clk>;
+                               clock-names = "mci_clk";
                                status = "disabled";
                        };
 
                                dma-names = "rxtx";
                                #address-cells = <1>;
                                #size-cells = <0>;
+                               clocks = <&mci1_clk>;
+                               clock-names = "mci_clk";
                                status = "disabled";
                        };
 
                                interrupts = <14 4 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi0>;
+                               clocks = <&spi0_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                interrupts = <15 4 3>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_spi1>;
+                               clocks = <&spi1_clk>;
+                               clock-names = "spi_clk";
                                status = "disabled";
                        };
 
                                reg = <0x00600000 0x80000
                                       0xfff78000 0x400>;
                                interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
+                               clocks = <&udphs_clk>, <&utmi>;
+                               clock-names = "pclk", "hclk";
                                status = "disabled";
 
                                ep0 {
                        interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_fb>;
+                       clocks = <&lcd_clk>, <&lcd_clk>;
+                       clock-names = "hclk", "lcdc_clk";
                        status = "disabled";
                };
 
                        compatible = "atmel,at91rm9200-ohci", "usb-ohci";
                        reg = <0x00700000 0x100000>;
                        interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                       //TODO
+                       clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck";
                        status = "disabled";
                };
 
                        compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
                        reg = <0x00800000 0x100000>;
                        interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
+                       //TODO
+                       clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
+                       clock-names = "usb_clk", "ehci_clk", "hclk", "uhpck";
                        status = "disabled";
                };
        };
index 9f5b0a6..96ccc7d 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                     clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                     clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index b84bac5..2bfac31 100644 (file)
                reg = <0x20000000 0x10000000>;
        };
 
-       slow_xtal: slow_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       main_xtal: main_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
        };
 
        ahb {
index 64bbe46..83d7237 100644 (file)
                reg = <0x20000000 0x8000000>;
        };
 
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
-
-       main_xtal {
-               clock-frequency = <16000000>;
-       };
-
        clocks {
                #address-cells = <1>;
                #size-cells = <1>;
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <16000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <16000000>;
+               };
        };
 
        ahb {
@@ -56,6 +56,8 @@
                                wm8904: codec@1a {
                                        compatible = "wm8904";
                                        reg = <0x1a>;
+                                       clocks = <&pck0>;
+                                       clock-names = "mclk";
                                };
 
                                qt1070: keyboard@1b {
index 1da1831..ab56c8b 100644 (file)
                reg = <0x20000000 0x04000000>;
        };
 
-       slow_xtal: slow_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       main_xtal: main_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       clocks {
                adc_op_clk: adc_op_clk{
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
@@ -95,6 +95,7 @@
                              <0xffffe800 0x200>;
                        atmel,nand-addr-offset = <21>;
                        atmel,nand-cmd-offset = <22>;
+                       atmel,nand-has-dma;
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_nand>;
                        gpios = <&pioD 17 GPIO_ACTIVE_HIGH>,
                                };
                        };
 
+                       dma0: dma-controller@ffffe600 {
+                               compatible = "atmel,at91sam9rl-dma";
+                               reg = <0xffffe600 0x200>;
+                               interrupts = <21 IRQ_TYPE_LEVEL_HIGH 0>;
+                               #dma-cells = <2>;
+                               clocks = <&dma0_clk>;
+                               clock-names = "dma_clk";
+                       };
+
                        ramc0: ramc@ffffea00 {
                                compatible = "atmel,at91sam9260-sdramc";
                                reg = <0xffffea00 0x200>;
index d4a010e..9be5b54 100644 (file)
                reg = <0x20000000 0x4000000>;
        };
 
-
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
-
-       main_xtal {
-               clock-frequency = <12000000>;
-       };
-
        clocks {
                #address-cells = <1>;
                #size-cells = <1>;
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 2c0d6ea..e1a5c70 100644 (file)
                reg = <0x20000000 0x10000000>;
        };
 
-       slow_xtal: slow_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       main_xtal: main_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       adc_op_clk: adc_op_clk{
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <5000000>;
+               adc_op_clk: adc_op_clk{
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <5000000>;
+               };
        };
 
        ahb {
index 8413e21..229d6c2 100644 (file)
                };
        };
 
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
 
-       main_xtal {
-               clock-frequency = <12000000>;
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 6b05ae6..2ddaa51 100644 (file)
                bootargs = "console=ttyS0,115200n8";
        };
 
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "brcm,bcm11351-cpu-method";
+               secondary-boot-reg = <0x3500417c>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <0>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <1>;
+               };
+       };
+
        gic: interrupt-controller@3ff00100 {
                compatible = "arm,cortex-a9-gic";
                #interrupt-cells = <3>;
index 8b36682..2016b72 100644 (file)
                bootargs = "console=ttyS0,115200n8";
        };
 
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               enable-method = "brcm,bcm11351-cpu-method";
+               secondary-boot-reg = <0x35004178>;
+
+               cpu0: cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <0>;
+               };
+
+               cpu1: cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a9";
+                       reg = <1>;
+               };
+       };
+
        gic: interrupt-controller@3ff00100 {
                compatible = "arm,cortex-a9-gic";
                #interrupt-cells = <3>;
diff --git a/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts b/arch/arm/boot/dts/bcm7445-bcm97445svmb.dts
new file mode 100644 (file)
index 0000000..9eec2ac
--- /dev/null
@@ -0,0 +1,14 @@
+/dts-v1/;
+#include "bcm7445.dtsi"
+
+/ {
+       model = "Broadcom STB (bcm7445), SVMB reference board";
+       compatible = "brcm,bcm7445", "brcm,brcmstb";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00 0x00000000 0x00 0x40000000>,
+                     <0x00 0x40000000 0x00 0x40000000>,
+                     <0x00 0x80000000 0x00 0x40000000>;
+       };
+};
diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi
new file mode 100644 (file)
index 0000000..0ca0f4e
--- /dev/null
@@ -0,0 +1,111 @@
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+#include "skeleton.dtsi"
+
+/ {
+       #address-cells = <2>;
+       #size-cells = <2>;
+       model = "Broadcom STB (bcm7445)";
+       compatible = "brcm,bcm7445", "brcm,brcmstb";
+       interrupt-parent = <&gic>;
+
+       chosen {
+               bootargs = "console=ttyS0,115200 earlyprintk";
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@0 {
+                       compatible = "brcm,brahma-b15";
+                       device_type = "cpu";
+                       enable-method = "brcm,brahma-b15";
+                       reg = <0>;
+               };
+
+               cpu@1 {
+                       compatible = "brcm,brahma-b15";
+                       device_type = "cpu";
+                       enable-method = "brcm,brahma-b15";
+                       reg = <1>;
+               };
+
+               cpu@2 {
+                       compatible = "brcm,brahma-b15";
+                       device_type = "cpu";
+                       enable-method = "brcm,brahma-b15";
+                       reg = <2>;
+               };
+
+               cpu@3 {
+                       compatible = "brcm,brahma-b15";
+                       device_type = "cpu";
+                       enable-method = "brcm,brahma-b15";
+                       reg = <3>;
+               };
+       };
+
+       gic: interrupt-controller@ffd00000 {
+               compatible = "brcm,brahma-b15-gic", "arm,cortex-a15-gic";
+               reg = <0x00 0xffd01000 0x00 0x1000>,
+                     <0x00 0xffd02000 0x00 0x2000>,
+                     <0x00 0xffd04000 0x00 0x2000>,
+                     <0x00 0xffd06000 0x00 0x2000>;
+               interrupt-controller;
+               #interrupt-cells = <3>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(15) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_RAW(15) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_RAW(15) | IRQ_TYPE_LEVEL_LOW)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_RAW(15) | IRQ_TYPE_LEVEL_LOW)>;
+       };
+
+       rdb {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               ranges = <0 0x00 0xf0000000 0x1000000>;
+
+               serial@40ab00 {
+                       compatible = "ns16550a";
+                       reg = <0x40ab00 0x20>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+                       clock-frequency = <0x4d3f640>;
+               };
+
+               sun_top_ctrl: syscon@404000 {
+                       compatible = "brcm,bcm7445-sun-top-ctrl",
+                                    "syscon";
+                       reg = <0x404000 0x51c>;
+               };
+
+               hif_cpubiuctrl: syscon@3e2400 {
+                       compatible = "brcm,bcm7445-hif-cpubiuctrl",
+                                    "syscon";
+                       reg = <0x3e2400 0x5b4>;
+               };
+
+               hif_continuation: syscon@452000 {
+                       compatible = "brcm,bcm7445-hif-continuation",
+                                    "syscon";
+                       reg = <0x452000 0x100>;
+               };
+       };
+
+       smpboot {
+               compatible = "brcm,brcmstb-smpboot";
+               syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>;
+               syscon-cont = <&hif_continuation>;
+       };
+
+       reboot {
+               compatible = "brcm,brcmstb-reboot";
+               syscon = <&sun_top_ctrl 0x304 0x308>;
+       };
+};
index 2477dac..9d7c810 100644 (file)
@@ -22,6 +22,7 @@
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
+               enable-method = "marvell,berlin-smp";
 
                cpu@0 {
                        compatible = "marvell,pj4b";
                        clocks = <&chip CLKID_TWD>;
                };
 
+               cpu-ctrl@dd0000 {
+                       compatible = "marvell,berlin-cpu-ctrl";
+                       reg = <0xdd0000 0x10000>;
+               };
+
                apb@e80000 {
                        compatible = "simple-bus";
                        #address-cells = <1>;
index 995150f..a357ce0 100644 (file)
        status = "okay";
 };
 
+&i2c0 {
+       status = "okay";
+};
+
+&i2c2 {
+       status = "okay";
+};
+
 &uart0 {
        status = "okay";
 };
index 635a16a..400c40f 100644 (file)
@@ -18,6 +18,7 @@
        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
+               enable-method = "marvell,berlin-smp";
 
                cpu@0 {
                        compatible = "arm,cortex-a9";
@@ -90,6 +91,8 @@
                        compatible = "arm,pl310-cache";
                        reg = <0xac0000 0x1000>;
                        cache-level = <2>;
+                       arm,data-latency = <2 2 2>;
+                       arm,tag-latency = <2 2 2>;
                };
 
                scu: snoop-control-unit@ad0000 {
                        #interrupt-cells = <3>;
                };
 
+               cpu-ctrl@dd0000 {
+                       compatible = "marvell,berlin-cpu-ctrl";
+                       reg = <0xdd0000 0x10000>;
+               };
+
                apb@e80000 {
                        compatible = "simple-bus";
                        #address-cells = <1>;
                                };
                        };
 
+                       i2c0: i2c@1400 {
+                               compatible = "snps,designware-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x1400 0x100>;
+                               interrupt-parent = <&aic>;
+                               interrupts = <4>;
+                               clocks = <&chip CLKID_CFG>;
+                               pinctrl-0 = <&twsi0_pmux>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@1800 {
+                               compatible = "snps,designware-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x1800 0x100>;
+                               interrupt-parent = <&aic>;
+                               interrupts = <5>;
+                               clocks = <&chip CLKID_CFG>;
+                               pinctrl-0 = <&twsi1_pmux>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
                        timer0: timer@2c00 {
                                compatible = "snps,dw-apb-timer";
                                reg = <0x2c00 0x14>;
                        reg = <0xea0000 0x400>, <0xdd0170 0x10>;
                        clocks = <&refclk>;
                        clock-names = "refclk";
+
+                       twsi0_pmux: twsi0-pmux {
+                               groups = "G6";
+                               function = "twsi0";
+                       };
+
+                       twsi1_pmux: twsi1-pmux {
+                               groups = "G7";
+                               function = "twsi1";
+                       };
                };
 
                apb@fc0000 {
                        ranges = <0 0xfc0000 0x10000>;
                        interrupt-parent = <&sic>;
 
+                       i2c2: i2c@7000 {
+                               compatible = "snps,designware-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x7000 0x100>;
+                               interrupt-parent = <&sic>;
+                               interrupts = <6>;
+                               clocks = <&refclk>;
+                               pinctrl-0 = <&twsi2_pmux>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
+                       i2c3: i2c@8000 {
+                               compatible = "snps,designware-i2c";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               reg = <0x8000 0x100>;
+                               interrupt-parent = <&sic>;
+                               interrupts = <7>;
+                               clocks = <&refclk>;
+                               pinctrl-0 = <&twsi3_pmux>;
+                               pinctrl-names = "default";
+                               status = "disabled";
+                       };
+
                        uart0: uart@9000 {
                                compatible = "snps,dw-apb-uart";
                                reg = <0x9000 0x100>;
                                        groups = "GSM14";
                                        function = "uart1";
                                };
+
+                               twsi2_pmux: twsi2-pmux {
+                                       groups = "GSM13";
+                                       function = "twsi2";
+                               };
+
+                               twsi3_pmux: twsi3-pmux {
+                                       groups = "GSM14";
+                                       function = "twsi3";
+                               };
                        };
 
                        sic: interrupt-controller@e000 {
diff --git a/arch/arm/boot/dts/cros-ec-keyboard.dtsi b/arch/arm/boot/dts/cros-ec-keyboard.dtsi
new file mode 100644 (file)
index 0000000..9c7fb0a
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Keyboard dts fragment for devices that use cros-ec-keyboard
+ *
+ * Copyright (c) 2014 Google, Inc
+ *
+ * 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 <dt-bindings/input/input.h>
+
+&cros_ec {
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb";
+               keypad,num-rows = <8>;
+               keypad,num-columns = <13>;
+               google,needs-ghost-filter;
+
+               linux,keymap = <
+                       MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
+                       MATRIX_KEY(0x00, 0x02, KEY_F1)
+                       MATRIX_KEY(0x00, 0x03, KEY_B)
+                       MATRIX_KEY(0x00, 0x04, KEY_F10)
+                       MATRIX_KEY(0x00, 0x06, KEY_N)
+                       MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
+                       MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
+
+                       MATRIX_KEY(0x01, 0x01, KEY_ESC)
+                       MATRIX_KEY(0x01, 0x02, KEY_F4)
+                       MATRIX_KEY(0x01, 0x03, KEY_G)
+                       MATRIX_KEY(0x01, 0x04, KEY_F7)
+                       MATRIX_KEY(0x01, 0x06, KEY_H)
+                       MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
+                       MATRIX_KEY(0x01, 0x09, KEY_F9)
+                       MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
+
+                       MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
+                       MATRIX_KEY(0x02, 0x01, KEY_TAB)
+                       MATRIX_KEY(0x02, 0x02, KEY_F3)
+                       MATRIX_KEY(0x02, 0x03, KEY_T)
+                       MATRIX_KEY(0x02, 0x04, KEY_F6)
+                       MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
+                       MATRIX_KEY(0x02, 0x06, KEY_Y)
+                       MATRIX_KEY(0x02, 0x07, KEY_102ND)
+                       MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
+                       MATRIX_KEY(0x02, 0x09, KEY_F8)
+
+                       MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
+                       MATRIX_KEY(0x03, 0x02, KEY_F2)
+                       MATRIX_KEY(0x03, 0x03, KEY_5)
+                       MATRIX_KEY(0x03, 0x04, KEY_F5)
+                       MATRIX_KEY(0x03, 0x06, KEY_6)
+                       MATRIX_KEY(0x03, 0x08, KEY_MINUS)
+                       MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
+
+                       MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
+                       MATRIX_KEY(0x04, 0x01, KEY_A)
+                       MATRIX_KEY(0x04, 0x02, KEY_D)
+                       MATRIX_KEY(0x04, 0x03, KEY_F)
+                       MATRIX_KEY(0x04, 0x04, KEY_S)
+                       MATRIX_KEY(0x04, 0x05, KEY_K)
+                       MATRIX_KEY(0x04, 0x06, KEY_J)
+                       MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
+                       MATRIX_KEY(0x04, 0x09, KEY_L)
+                       MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
+                       MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
+
+                       MATRIX_KEY(0x05, 0x01, KEY_Z)
+                       MATRIX_KEY(0x05, 0x02, KEY_C)
+                       MATRIX_KEY(0x05, 0x03, KEY_V)
+                       MATRIX_KEY(0x05, 0x04, KEY_X)
+                       MATRIX_KEY(0x05, 0x05, KEY_COMMA)
+                       MATRIX_KEY(0x05, 0x06, KEY_M)
+                       MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
+                       MATRIX_KEY(0x05, 0x08, KEY_SLASH)
+                       MATRIX_KEY(0x05, 0x09, KEY_DOT)
+                       MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
+
+                       MATRIX_KEY(0x06, 0x01, KEY_1)
+                       MATRIX_KEY(0x06, 0x02, KEY_3)
+                       MATRIX_KEY(0x06, 0x03, KEY_4)
+                       MATRIX_KEY(0x06, 0x04, KEY_2)
+                       MATRIX_KEY(0x06, 0x05, KEY_8)
+                       MATRIX_KEY(0x06, 0x06, KEY_7)
+                       MATRIX_KEY(0x06, 0x08, KEY_0)
+                       MATRIX_KEY(0x06, 0x09, KEY_9)
+                       MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
+                       MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
+                       MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
+
+                       MATRIX_KEY(0x07, 0x01, KEY_Q)
+                       MATRIX_KEY(0x07, 0x02, KEY_E)
+                       MATRIX_KEY(0x07, 0x03, KEY_R)
+                       MATRIX_KEY(0x07, 0x04, KEY_W)
+                       MATRIX_KEY(0x07, 0x05, KEY_I)
+                       MATRIX_KEY(0x07, 0x06, KEY_U)
+                       MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
+                       MATRIX_KEY(0x07, 0x08, KEY_P)
+                       MATRIX_KEY(0x07, 0x09, KEY_O)
+                       MATRIX_KEY(0x07, 0x0b, KEY_UP)
+                       MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
+               >;
+       };
+};
diff --git a/arch/arm/boot/dts/dove-cubox-es.dts b/arch/arm/boot/dts/dove-cubox-es.dts
new file mode 100644 (file)
index 0000000..e28ef05
--- /dev/null
@@ -0,0 +1,12 @@
+#include "dove-cubox.dts"
+
+/ {
+       model = "SolidRun CuBox (Engineering Sample)";
+       compatible = "solidrun,cubox-es", "solidrun,cubox", "marvell,dove";
+};
+
+&sdio0 {
+       /* sdio0 card detect is connected to wrong pin on CuBox ES */
+       cd-gpios = <&gpio0 12 1>;
+       pinctrl-0 = <&pmx_sdio0 &pmx_gpio_12>;
+};
index 7a70f4c..aae7efc 100644 (file)
 
 &sdio0 {
        status = "okay";
-       /* sdio0 card detect is connected to wrong pin on CuBox */
-       cd-gpios = <&gpio0 12 1>;
-       pinctrl-0 = <&pmx_sdio0 &pmx_gpio_12>;
 };
 
 &spi0 {
index 3b891dd..a5441d5 100644 (file)
                                reg = <0xe8400 0x0c>;
                                ngpios = <8>;
                        };
+
+                       lcd1: lcd-controller@810000 {
+                               compatible = "marvell,dove-lcd";
+                               reg = <0x810000 0x1000>;
+                               interrupts = <46>;
+                               status = "disabled";
+                       };
+
+                       lcd0: lcd-controller@820000 {
+                               compatible = "marvell,dove-lcd";
+                               reg = <0x820000 0x1000>;
+                               interrupts = <47>;
+                               status = "disabled";
+                       };
                };
        };
 };
index 8308954..50f8022 100644 (file)
                };
        };
 };
+
+&usb2_phy1 {
+       phy-supply = <&ldousb_reg>;
+};
+
+&usb2_phy2 {
+       phy-supply = <&ldousb_reg>;
+};
index 8012763..6563b98 100644 (file)
@@ -12,6 +12,9 @@
 
 #include "skeleton.dtsi"
 
+#define MAX_SOURCES 400
+#define DIRECT_IRQ(irq) (MAX_SOURCES + irq)
+
 / {
        #address-cells = <1>;
        #size-cells = <1>;
@@ -45,6 +48,7 @@
                compatible = "arm,cortex-a15-gic";
                interrupt-controller;
                #interrupt-cells = <3>;
+               arm,routable-irqs = <192>;
                reg = <0x48211000 0x1000>,
                      <0x48212000 0x1000>,
                      <0x48214000 0x2000>,
@@ -79,8 +83,8 @@
                ti,hwmods = "l3_main_1", "l3_main_2";
                reg = <0x44000000 0x1000000>,
                      <0x45000000 0x1000>;
-               interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
-                            <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI DIRECT_IRQ(10) IRQ_TYPE_LEVEL_HIGH>;
 
                prm: prm@4ae06000 {
                        compatible = "ti,dra7-prm";
                        };
                };
 
+               axi@0 {
+                       compatible = "simple-bus";
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+                       ranges = <0x51000000 0x51000000 0x3000
+                                 0x0        0x20000000 0x10000000>;
+                       pcie@51000000 {
+                               compatible = "ti,dra7-pcie";
+                               reg = <0x51000000 0x2000>, <0x51002000 0x14c>, <0x1000 0x2000>;
+                               reg-names = "rc_dbics", "ti_conf", "config";
+                               interrupts = <0 232 0x4>, <0 233 0x4>;
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               device_type = "pci";
+                               ranges = <0x81000000 0 0          0x03000 0 0x00010000
+                                         0x82000000 0 0x20013000 0x13000 0 0xffed000>;
+                               #interrupt-cells = <1>;
+                               num-lanes = <1>;
+                               ti,hwmods = "pcie1";
+                               phys = <&pcie1_phy>;
+                               phy-names = "pcie-phy0";
+                               interrupt-map-mask = <0 0 0 7>;
+                               interrupt-map = <0 0 0 1 &pcie1_intc 1>,
+                                               <0 0 0 2 &pcie1_intc 2>,
+                                               <0 0 0 3 &pcie1_intc 3>,
+                                               <0 0 0 4 &pcie1_intc 4>;
+                               pcie1_intc: interrupt-controller {
+                                       interrupt-controller;
+                                       #address-cells = <0>;
+                                       #interrupt-cells = <1>;
+                               };
+                       };
+               };
+
+               axi@1 {
+                       compatible = "simple-bus";
+                       #size-cells = <1>;
+                       #address-cells = <1>;
+                       ranges = <0x51800000 0x51800000 0x3000
+                                 0x0        0x30000000 0x10000000>;
+                       status = "disabled";
+                       pcie@51000000 {
+                               compatible = "ti,dra7-pcie";
+                               reg = <0x51800000 0x2000>, <0x51802000 0x14c>, <0x1000 0x2000>;
+                               reg-names = "rc_dbics", "ti_conf", "config";
+                               interrupts = <0 355 0x4>, <0 356 0x4>;
+                               #address-cells = <3>;
+                               #size-cells = <2>;
+                               device_type = "pci";
+                               ranges = <0x81000000 0 0          0x03000 0 0x00010000
+                                         0x82000000 0 0x30013000 0x13000 0 0xffed000>;
+                               #interrupt-cells = <1>;
+                               num-lanes = <1>;
+                               ti,hwmods = "pcie2";
+                               phys = <&pcie2_phy>;
+                               phy-names = "pcie-phy0";
+                               interrupt-map-mask = <0 0 0 7>;
+                               interrupt-map = <0 0 0 1 &pcie2_intc 1>,
+                                               <0 0 0 2 &pcie2_intc 2>,
+                                               <0 0 0 3 &pcie2_intc 3>,
+                                               <0 0 0 4 &pcie2_intc 4>;
+                               pcie2_intc: interrupt-controller {
+                                       interrupt-controller;
+                                       #address-cells = <0>;
+                                       #interrupt-cells = <1>;
+                               };
+                       };
+               };
+
                cm_core_aon: cm_core_aon@4a005000 {
                        compatible = "ti,dra7-cm-core-aon";
                        reg = <0x4a005000 0x2000>;
                sdma: dma-controller@4a056000 {
                        compatible = "ti,omap4430-sdma";
                        reg = <0x4a056000 0x1000>;
-                       interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
                        #dma-channels = <32>;
                        #dma-requests = <127>;
                gpio1: gpio@4ae10000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x4ae10000 0x200>;
-                       interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio1";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio2: gpio@48055000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x48055000 0x200>;
-                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio2";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio3: gpio@48057000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x48057000 0x200>;
-                       interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio3";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio4: gpio@48059000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x48059000 0x200>;
-                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio4";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio5: gpio@4805b000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x4805b000 0x200>;
-                       interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio5";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio6: gpio@4805d000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x4805d000 0x200>;
-                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio6";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio7: gpio@48051000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x48051000 0x200>;
-                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio7";
                        gpio-controller;
                        #gpio-cells = <2>;
                gpio8: gpio@48053000 {
                        compatible = "ti,omap4-gpio";
                        reg = <0x48053000 0x200>;
-                       interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "gpio8";
                        gpio-controller;
                        #gpio-cells = <2>;
                uart1: serial@4806a000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4806a000 0x100>;
-                       interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart1";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart2: serial@4806c000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4806c000 0x100>;
-                       interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart2";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart3: serial@48020000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48020000 0x100>;
-                       interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart3";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart4: serial@4806e000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4806e000 0x100>;
-                       interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart4";
                        clock-frequency = <48000000>;
                         status = "disabled";
                uart5: serial@48066000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48066000 0x100>;
-                       interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart5";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart6: serial@48068000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48068000 0x100>;
-                       interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart6";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart7: serial@48420000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48420000 0x100>;
+                       interrupts = <GIC_SPI 218 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart7";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart8: serial@48422000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48422000 0x100>;
+                       interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart8";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart9: serial@48424000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x48424000 0x100>;
+                       interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart9";
                        clock-frequency = <48000000>;
                        status = "disabled";
                uart10: serial@4ae2b000 {
                        compatible = "ti,omap4-uart";
                        reg = <0x4ae2b000 0x100>;
+                       interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "uart10";
                        clock-frequency = <48000000>;
                        status = "disabled";
                timer1: timer@4ae18000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x4ae18000 0x80>;
-                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer1";
                        ti,timer-alwon;
                };
                timer2: timer@48032000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48032000 0x80>;
-                       interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer2";
                };
 
                timer3: timer@48034000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48034000 0x80>;
-                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer3";
                };
 
                timer4: timer@48036000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48036000 0x80>;
-                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer4";
                };
 
                timer5: timer@48820000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48820000 0x80>;
-                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer5";
                        ti,timer-dsp;
                };
                timer6: timer@48822000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48822000 0x80>;
-                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer6";
                        ti,timer-dsp;
                        ti,timer-pwm;
                timer7: timer@48824000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48824000 0x80>;
-                       interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer7";
                        ti,timer-dsp;
                };
                timer8: timer@48826000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48826000 0x80>;
-                       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer8";
                        ti,timer-dsp;
                        ti,timer-pwm;
                timer9: timer@4803e000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x4803e000 0x80>;
-                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer9";
                };
 
                timer10: timer@48086000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48086000 0x80>;
-                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer10";
                };
 
                timer11: timer@48088000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48088000 0x80>;
-                       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer11";
                        ti,timer-pwm;
                };
                timer13: timer@48828000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x48828000 0x80>;
+                       interrupts = <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer13";
                        status = "disabled";
                };
                timer14: timer@4882a000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x4882a000 0x80>;
+                       interrupts = <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer14";
                        status = "disabled";
                };
                timer15: timer@4882c000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x4882c000 0x80>;
+                       interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer15";
                        status = "disabled";
                };
                timer16: timer@4882e000 {
                        compatible = "ti,omap5430-timer";
                        reg = <0x4882e000 0x80>;
+                       interrupts = <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "timer16";
                        status = "disabled";
                };
                wdt2: wdt@4ae14000 {
                        compatible = "ti,omap4-wdt";
                        reg = <0x4ae14000 0x80>;
-                       interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "wd_timer2";
                };
 
                dmm@4e000000 {
                        compatible = "ti,omap5-dmm";
                        reg = <0x4e000000 0x800>;
-                       interrupts = <0 113 0x4>;
+                       interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "dmm";
                };
 
                i2c1: i2c@48070000 {
                        compatible = "ti,omap4-i2c";
                        reg = <0x48070000 0x100>;
-                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "i2c1";
                i2c2: i2c@48072000 {
                        compatible = "ti,omap4-i2c";
                        reg = <0x48072000 0x100>;
-                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "i2c2";
                i2c3: i2c@48060000 {
                        compatible = "ti,omap4-i2c";
                        reg = <0x48060000 0x100>;
-                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "i2c3";
                i2c4: i2c@4807a000 {
                        compatible = "ti,omap4-i2c";
                        reg = <0x4807a000 0x100>;
-                       interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "i2c4";
                i2c5: i2c@4807c000 {
                        compatible = "ti,omap4-i2c";
                        reg = <0x4807c000 0x100>;
-                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "i2c5";
                mmc1: mmc@4809c000 {
                        compatible = "ti,omap4-hsmmc";
                        reg = <0x4809c000 0x400>;
-                       interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "mmc1";
                        ti,dual-volt;
                        ti,needs-special-reset;
                mmc2: mmc@480b4000 {
                        compatible = "ti,omap4-hsmmc";
                        reg = <0x480b4000 0x400>;
-                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "mmc2";
                        ti,needs-special-reset;
                        dmas = <&sdma 47>, <&sdma 48>;
                mmc3: mmc@480ad000 {
                        compatible = "ti,omap4-hsmmc";
                        reg = <0x480ad000 0x400>;
-                       interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "mmc3";
                        ti,needs-special-reset;
                        dmas = <&sdma 77>, <&sdma 78>;
                mmc4: mmc@480d1000 {
                        compatible = "ti,omap4-hsmmc";
                        reg = <0x480d1000 0x400>;
-                       interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "mmc4";
                        ti,needs-special-reset;
                        dmas = <&sdma 57>, <&sdma 58>;
                mcspi1: spi@48098000 {
                        compatible = "ti,omap4-mcspi";
                        reg = <0x48098000 0x200>;
-                       interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "mcspi1";
                mcspi2: spi@4809a000 {
                        compatible = "ti,omap4-mcspi";
                        reg = <0x4809a000 0x200>;
-                       interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "mcspi2";
                mcspi3: spi@480b8000 {
                        compatible = "ti,omap4-mcspi";
                        reg = <0x480b8000 0x200>;
-                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "mcspi3";
                mcspi4: spi@480ba000 {
                        compatible = "ti,omap4-mcspi";
                        reg = <0x480ba000 0x200>;
-                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <0>;
                        ti,hwmods = "mcspi4";
                        clocks = <&qspi_gfclk_div>;
                        clock-names = "fck";
                        num-cs = <4>;
+                       interrupts = <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
                                clock-names = "sysclk";
                                #phy-cells = <0>;
                        };
+
+                       pcie1_phy: pciephy@4a094000 {
+                               compatible = "ti,phy-pipe3-pcie";
+                               reg = <0x4a094000 0x80>, /* phy_rx */
+                                     <0x4a094400 0x64>; /* phy_tx */
+                               reg-names = "phy_rx", "phy_tx";
+                               ctrl-module = <&omap_control_pcie1phy>;
+                               clocks = <&dpll_pcie_ref_ck>,
+                                        <&dpll_pcie_ref_m2ldo_ck>,
+                                        <&optfclk_pciephy1_32khz>,
+                                        <&optfclk_pciephy1_clk>,
+                                        <&optfclk_pciephy1_div_clk>,
+                                        <&optfclk_pciephy_div>;
+                               clock-names = "dpll_ref", "dpll_ref_m2",
+                                             "wkupclk", "refclk",
+                                             "div-clk", "phy-div";
+                               #phy-cells = <0>;
+                               id = <1>;
+                               ti,hwmods = "pcie1-phy";
+                       };
+
+                       pcie2_phy: pciephy@4a095000 {
+                               compatible = "ti,phy-pipe3-pcie";
+                               reg = <0x4a095000 0x80>, /* phy_rx */
+                                     <0x4a095400 0x64>; /* phy_tx */
+                               reg-names = "phy_rx", "phy_tx";
+                               ctrl-module = <&omap_control_pcie2phy>;
+                               clocks = <&dpll_pcie_ref_ck>,
+                                        <&dpll_pcie_ref_m2ldo_ck>,
+                                        <&optfclk_pciephy2_32khz>,
+                                        <&optfclk_pciephy2_clk>,
+                                        <&optfclk_pciephy2_div_clk>,
+                                        <&optfclk_pciephy_div>;
+                               clock-names = "dpll_ref", "dpll_ref_m2",
+                                             "wkupclk", "refclk",
+                                             "div-clk", "phy-div";
+                               #phy-cells = <0>;
+                               ti,hwmods = "pcie2-phy";
+                               id = <2>;
+                               status = "disabled";
+                       };
                };
 
                sata: sata@4a141100 {
                        compatible = "snps,dwc-ahci";
                        reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
-                       interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
                        phys = <&sata_phy>;
                        phy-names = "sata-phy";
                        clocks = <&sata_ref_clk>;
                        ti,hwmods = "sata";
                };
 
+               omap_control_pcie1phy: control-phy@0x4a003c40 {
+                       compatible = "ti,control-phy-pcie";
+                       reg = <0x4a003c40 0x4>, <0x4a003c14 0x4>, <0x4a003c34 0x4>;
+                       reg-names = "power", "control_sma", "pcie_pcs";
+                       clocks = <&sys_clkin1>;
+                       clock-names = "sysclk";
+               };
+
+               omap_control_pcie2phy: control-pcie@0x4a003c44 {
+                       compatible = "ti,control-phy-pcie";
+                       reg = <0x4a003c44 0x4>, <0x4a003c14 0x4>, <0x4a003c34 0x4>;
+                       reg-names = "power", "control_sma", "pcie_pcs";
+                       clocks = <&sys_clkin1>;
+                       clock-names = "sysclk";
+                       status = "disabled";
+               };
+
                omap_control_usb2phy1: control-phy@4a002300 {
                        compatible = "ti,control-phy-usb2";
                        reg = <0x4a002300 0x4>;
                        compatible = "ti,dwc3";
                        ti,hwmods = "usb_otg_ss1";
                        reg = <0x48880000 0x10000>;
-                       interrupts = <0 77 4>;
+                       interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        utmi-mode = <2>;
                        usb1: usb@48890000 {
                                compatible = "snps,dwc3";
                                reg = <0x48890000 0x17000>;
-                               interrupts = <0 76 4>;
+                               interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
                                phys = <&usb2_phy1>, <&usb3_phy1>;
                                phy-names = "usb2-phy", "usb3-phy";
                                tx-fifo-resize;
                        compatible = "ti,dwc3";
                        ti,hwmods = "usb_otg_ss2";
                        reg = <0x488c0000 0x10000>;
-                       interrupts = <0 92 4>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        utmi-mode = <2>;
                        usb2: usb@488d0000 {
                                compatible = "snps,dwc3";
                                reg = <0x488d0000 0x17000>;
-                               interrupts = <0 78 4>;
+                               interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
                                phys = <&usb2_phy2>;
                                phy-names = "usb2-phy";
                                tx-fifo-resize;
                        compatible = "ti,dwc3";
                        ti,hwmods = "usb_otg_ss3";
                        reg = <0x48900000 0x10000>;
-               /*      interrupts = <0 TBD 4>; */
+                       interrupts = <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        utmi-mode = <2>;
                        usb3: usb@48910000 {
                                compatible = "snps,dwc3";
                                reg = <0x48910000 0x17000>;
-               /*              interrupts = <0 93 4>; */
+                               interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
                                tx-fifo-resize;
                                maximum-speed = "high-speed";
                                dr_mode = "otg";
                        compatible = "ti,dwc3";
                        ti,hwmods = "usb_otg_ss4";
                        reg = <0x48940000 0x10000>;
-               /*      interrupts = <0 TBD 4>; */
+                       interrupts = <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        utmi-mode = <2>;
                        usb4: usb@48950000 {
                                compatible = "snps,dwc3";
                                reg = <0x48950000 0x17000>;
-               /*              interrupts = <0 TBD 4>; */
+                               interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
                                tx-fifo-resize;
                                maximum-speed = "high-speed";
                                dr_mode = "otg";
                elm: elm@48078000 {
                        compatible = "ti,am3352-elm";
                        reg = <0x48078000 0xfc0>;      /* device IO registers */
-                       interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
                        ti,hwmods = "elm";
                        status = "disabled";
                };
                        compatible = "ti,am3352-gpmc";
                        ti,hwmods = "gpmc";
                        reg = <0x50000000 0x37c>;      /* device IO registers */
-                       interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
                        gpmc,num-cs = <8>;
                        gpmc,num-waitpins = <2>;
                        #address-cells = <2>;
                        clock-names = "fck";
                        status = "disabled";
                };
+
+               crossbar_mpu: crossbar@4a020000 {
+                       compatible = "ti,irq-crossbar";
+                       reg = <0x4a002a48 0x130>;
+                       ti,max-irqs = <160>;
+                       ti,max-crossbar-sources = <MAX_SOURCES>;
+                       ti,reg-size = <2>;
+                       ti,irqs-reserved = <0 1 2 3 5 6 131 132>;
+                       ti,irqs-skip = <10 133 139 140>;
+                       ti,irqs-safe-map = <0>;
+               };
        };
 };
 
index dc7a292..2c05b3f 100644 (file)
 
        apll_pcie_in_clk_mux: apll_pcie_in_clk_mux@4ae06118 {
                compatible = "ti,mux-clock";
-               clocks = <&dpll_pcie_ref_ck>, <&pciesref_acs_clk_ck>;
+               clocks = <&dpll_pcie_ref_m2ldo_ck>, <&pciesref_acs_clk_ck>;
                #clock-cells = <0>;
                reg = <0x021c 0x4>;
                ti,bit-shift = <7>;
                reg = <0x021c>, <0x0220>;
        };
 
+       optfclk_pciephy1_32khz: optfclk_pciephy1_32khz@4a0093b0 {
+               compatible = "ti,gate-clock";
+               clocks = <&sys_32k_ck>;
+               #clock-cells = <0>;
+               reg = <0x13b0>;
+               ti,bit-shift = <8>;
+       };
+
+       optfclk_pciephy2_32khz: optfclk_pciephy2_32khz@4a0093b8 {
+               compatible = "ti,gate-clock";
+               clocks = <&sys_32k_ck>;
+               #clock-cells = <0>;
+               reg = <0x13b8>;
+               ti,bit-shift = <8>;
+       };
+
        optfclk_pciephy_div: optfclk_pciephy_div@4a00821c {
                compatible = "ti,divider-clock";
                clocks = <&apll_pcie_ck>;
                #clock-cells = <0>;
                reg = <0x021c>;
+               ti,dividers = <2>, <1>;
                ti,bit-shift = <8>;
                ti,max-div = <2>;
        };
 
-       optfclk_pciephy_clk: optfclk_pciephy_clk@4a0093b0 {
+       optfclk_pciephy1_clk: optfclk_pciephy1_clk@4a0093b0 {
                compatible = "ti,gate-clock";
                clocks = <&apll_pcie_ck>;
                #clock-cells = <0>;
                ti,bit-shift = <9>;
        };
 
-       optfclk_pciephy_div_clk: optfclk_pciephy_div_clk@4a0093b0 {
+       optfclk_pciephy2_clk: optfclk_pciephy2_clk@4a0093b8 {
+               compatible = "ti,gate-clock";
+               clocks = <&apll_pcie_ck>;
+               #clock-cells = <0>;
+               reg = <0x13b8>;
+               ti,bit-shift = <9>;
+       };
+
+       optfclk_pciephy1_div_clk: optfclk_pciephy1_div_clk@4a0093b0 {
                compatible = "ti,gate-clock";
                clocks = <&optfclk_pciephy_div>;
                #clock-cells = <0>;
                ti,bit-shift = <10>;
        };
 
+       optfclk_pciephy2_div_clk: optfclk_pciephy2_div_clk@4a0093b8 {
+               compatible = "ti,gate-clock";
+               clocks = <&optfclk_pciephy_div>;
+               #clock-cells = <0>;
+               reg = <0x13b8>;
+               ti,bit-shift = <10>;
+       };
+
        apll_pcie_clkvcoldo: apll_pcie_clkvcoldo {
                #clock-cells = <0>;
                compatible = "fixed-factor-clock";
index 143b6d2..8f941c2 100644 (file)
                reg = <0x20000000 0x08000000>;
        };
 
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
+       };
+
        ahb {
                apb {
                        dbgu: serial@fffff200 {
index 4d82968..f72969e 100644 (file)
        model = "Telit EVK-PRO3 for Telit GE863-PRO3";
        compatible = "telit,evk-pro3", "atmel,at91sam9260", "atmel,at91sam9";
 
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+       };
+
        ahb {
                apb {
                        macb0: ethernet@fffc4000 {
index 7c4bdaa..f2b8c41 100644 (file)
                                sbs,poll-retry-count = <1>;
                        };
 
-                       ec: embedded-controller {
+                       cros_ec: embedded-controller {
                                compatible = "google,cros-ec-i2c";
                                reg = <0x1e>;
                                interrupts = <6 0>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&ec_irq>;
                                wakeup-source;
-
-                               keyboard-controller {
-                                       compatible = "google,cros-ec-keyb";
-                                       keypad,num-rows = <8>;
-                                       keypad,num-columns = <13>;
-                                       google,needs-ghost-filter;
-                                       linux,keymap = <0x0001007d      /* L_META */
-                                                       0x0002003b      /* F1 */
-                                                       0x00030030      /* B */
-                                                       0x00040044      /* F10 */
-                                                       0x00060031      /* N */
-                                                       0x0008000d      /* = */
-                                                       0x000a0064      /* R_ALT */
-
-                                                       0x01010001      /* ESC */
-                                                       0x0102003e      /* F4 */
-                                                       0x01030022      /* G */
-                                                       0x01040041      /* F7 */
-                                                       0x01060023      /* H */
-                                                       0x01080028      /* ' */
-                                                       0x01090043      /* F9 */
-                                                       0x010b000e      /* BKSPACE */
-
-                                                       0x0200001d      /* L_CTRL */
-                                                       0x0201000f      /* TAB */
-                                                       0x0202003d      /* F3 */
-                                                       0x02030014      /* T */
-                                                       0x02040040      /* F6 */
-                                                       0x0205001b      /* ] */
-                                                       0x02060015      /* Y */
-                                                       0x02070056      /* 102ND */
-                                                       0x0208001a      /* [ */
-                                                       0x02090042      /* F8 */
-
-                                                       0x03010029      /* GRAVE */
-                                                       0x0302003c      /* F2 */
-                                                       0x03030006      /* 5 */
-                                                       0x0304003f      /* F5 */
-                                                       0x03060007      /* 6 */
-                                                       0x0308000c      /* - */
-                                                       0x030b002b      /* \ */
-
-                                                       0x04000061      /* R_CTRL */
-                                                       0x0401001e      /* A */
-                                                       0x04020020      /* D */
-                                                       0x04030021      /* F */
-                                                       0x0404001f      /* S */
-                                                       0x04050025      /* K */
-                                                       0x04060024      /* J */
-                                                       0x04080027      /* ; */
-                                                       0x04090026      /* L */
-                                                       0x040a002b      /* \ */
-                                                       0x040b001c      /* ENTER */
-
-                                                       0x0501002c      /* Z */
-                                                       0x0502002e      /* C */
-                                                       0x0503002f      /* V */
-                                                       0x0504002d      /* X */
-                                                       0x05050033      /* , */
-                                                       0x05060032      /* M */
-                                                       0x0507002a      /* L_SHIFT */
-                                                       0x05080035      /* / */
-                                                       0x05090034      /* . */
-                                                       0x050B0039      /* SPACE */
-
-                                                       0x06010002      /* 1 */
-                                                       0x06020004      /* 3 */
-                                                       0x06030005      /* 4 */
-                                                       0x06040003      /* 2 */
-                                                       0x06050009      /* 8 */
-                                                       0x06060008      /* 7 */
-                                                       0x0608000b      /* 0 */
-                                                       0x0609000a      /* 9 */
-                                                       0x060a0038      /* L_ALT */
-                                                       0x060b006c      /* DOWN */
-                                                       0x060c006a      /* RIGHT */
-
-                                                       0x07010010      /* Q */
-                                                       0x07020012      /* E */
-                                                       0x07030013      /* R */
-                                                       0x07040011      /* W */
-                                                       0x07050017      /* I */
-                                                       0x07060016      /* U */
-                                                       0x07070036      /* R_SHIFT */
-                                                       0x07080019      /* P */
-                                                       0x07090018      /* O */
-                                                       0x070b0067      /* UP */
-                                                       0x070c0069>;    /* LEFT */
-                               };
                        };
 
                        power-regulator {
                samsung,pin-drv = <0>;
        };
 };
+
+#include "cros-ec-keyboard.dtsi"
index 230099b..0d0e624 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <6000000>;
                };
+
+               main_xtal {
+                       clock-frequency = <6000000>;
+               };
        };
 
        ahb {
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts
new file mode 100644 (file)
index 0000000..68d0834
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2013 Eukréa Electromatique <denis@eukrea.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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+       model = "Eukrea MBIMXSD25 with the CMO-QVGA Display";
+       compatible = "eukrea,mbimxsd25-baseboard-cmo-qvga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+       cmo_qvga: display {
+               model = "CMO-QVGA";
+               bits-per-pixel = <16>;
+               fsl,pcr = <0xcad08b80>;
+               bus-width = <18>;
+               native-mode = <&qvga_timings>;
+               display-timings {
+                       qvga_timings: 320x240 {
+                               clock-frequency = <6500000>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <30>;
+                               hfront-porch = <38>;
+                               vback-porch = <20>;
+                               vfront-porch = <3>;
+                               hsync-len = <15>;
+                               vsync-len = <4>;
+                       };
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_lcd_3v3: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_reg_lcd_3v3>;
+                       regulator-name = "lcd-3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+};
+
+&iomuxc {
+       imx25-eukrea-mbimxsd25-baseboard-cmo-qvga {
+               pinctrl_reg_lcd_3v3: reg_lcd_3v3 {
+                       fsl,pins = <MX25_PAD_PWM__GPIO_1_26 0x80000000>;
+               };
+       };
+};
+
+&lcdc {
+       display = <&cmo_qvga>;
+       fsl,lpccr = <0x00a903ff>;
+       lcd-supply = <&reg_lcd_3v3>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts
new file mode 100644 (file)
index 0000000..8eee2f6
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2013 Eukréa Electromatique <denis@eukrea.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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+       model = "Eukrea MBIMXSD25 with the DVI-SVGA Display";
+       compatible = "eukrea,mbimxsd25-baseboard-dvi-svga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+       dvi_svga: display {
+               model = "DVI-SVGA";
+               bits-per-pixel = <16>;
+               fsl,pcr = <0xfa208b80>;
+               bus-width = <18>;
+               native-mode = <&dvi_svga_timings>;
+               display-timings {
+                       dvi_svga_timings: 800x600 {
+                               clock-frequency = <40000000>;
+                               hactive = <800>;
+                               vactive = <600>;
+                               hback-porch = <75>;
+                               hfront-porch = <75>;
+                               vback-porch = <7>;
+                               vfront-porch = <75>;
+                               hsync-len = <7>;
+                               vsync-len = <7>;
+                       };
+               };
+       };
+};
+
+&lcdc {
+       display = <&dvi_svga>;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts b/arch/arm/boot/dts/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts
new file mode 100644 (file)
index 0000000..447da62
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2013 Eukréa Electromatique <denis@eukrea.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.
+ */
+
+#include "imx25-eukrea-mbimxsd25-baseboard.dts"
+
+/ {
+       model = "Eukrea MBIMXSD25 with the DVI-VGA Display";
+       compatible = "eukrea,mbimxsd25-baseboard-dvi-vga", "eukrea,mbimxsd25-baseboard", "eukrea,cpuimx25", "fsl,imx25";
+
+       dvi_vga: display {
+               model = "DVI-VGA";
+               bits-per-pixel = <16>;
+               fsl,pcr = <0xfa208b80>;
+               bus-width = <18>;
+               native-mode = <&dvi_vga_timings>;
+               display-timings {
+                       dvi_vga_timings: 640x480 {
+                               clock-frequency = <31250000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <100>;
+                               hfront-porch = <100>;
+                               vback-porch = <7>;
+                               vfront-porch = <100>;
+                               hsync-len = <7>;
+                               vsync-len = <7>;
+                       };
+               };
+       };
+};
+
+&lcdc {
+       display = <&dvi_vga>;
+       status = "okay";
+};
index ad12da3..ed1d0b4 100644 (file)
 
 &ssi1 {
        codec-handle = <&tlv320aic23>;
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index c608942..9c21b15 100644 (file)
 
 &ssi1 {
        codec-handle = <&codec>;
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
        dr_mode = "host";
        status = "okay";
 };
+
+&usbotg {
+       phy_type = "utmi";
+       dr_mode = "otg";
+       external-vbus-divider;
+       status = "okay";
+};
index bb74d95..c174039 100644 (file)
                        gpt4: timer@53f84000 {
                                compatible = "fsl,imx25-gpt", "fsl,imx31-gpt";
                                reg = <0x53f84000 0x4000>;
-                               clocks = <&clks 9>, <&clks 45>;
+                               clocks = <&clks 95>, <&clks 47>;
                                clock-names = "ipg", "per";
                                interrupts = <1>;
                        };
                        gpt3: timer@53f88000 {
                                compatible = "fsl,imx25-gpt", "fsl,imx31-gpt";
                                reg = <0x53f88000 0x4000>;
-                               clocks = <&clks 9>, <&clks 47>;
+                               clocks = <&clks 94>, <&clks 47>;
                                clock-names = "ipg", "per";
                                interrupts = <29>;
                        };
                        gpt2: timer@53f8c000 {
                                compatible = "fsl,imx25-gpt", "fsl,imx31-gpt";
                                reg = <0x53f8c000 0x4000>;
-                               clocks = <&clks 9>, <&clks 47>;
+                               clocks = <&clks 93>, <&clks 47>;
                                clock-names = "ipg", "per";
                                interrupts = <53>;
                        };
                        gpt1: timer@53f90000 {
                                compatible = "fsl,imx25-gpt", "fsl,imx31-gpt";
                                reg = <0x53f90000 0x4000>;
-                               clocks = <&clks 9>, <&clks 47>;
+                               clocks = <&clks 92>, <&clks 47>;
                                clock-names = "ipg", "per";
                                interrupts = <54>;
                        };
diff --git a/arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi b/arch/arm/boot/dts/imx27-eukrea-cpuimx27.dtsi
new file mode 100644 (file)
index 0000000..e224263
--- /dev/null
@@ -0,0 +1,296 @@
+/*
+ * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
+ *
+ * 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 "imx27.dtsi"
+
+/ {
+       model = "Eukrea CPUIMX27";
+       compatible = "eukrea,cpuimx27", "fsl,imx27";
+
+       memory {
+               reg = <0xa0000000 0x04000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "simple-bus";
+
+               clk14745600: clock@0 {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <14745600>;
+                       reg = <0>;
+               };
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_fec>;
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       pcf8563@51 {
+               compatible = "nxp,pcf8563";
+               reg = <0x51>;
+       };
+};
+
+&nfc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_nfc>;
+       nand-bus-width = <8>;
+       nand-ecc-mode = "hw";
+       nand-on-flash-bbt;
+       status = "okay";
+};
+
+&owire {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_owire>;
+       status = "okay";
+};
+
+&sdhci2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_sdhc2>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+};
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       fsl,uart-has-rtscts;
+       status = "okay";
+};
+
+&usbh2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh2>;
+       dr_mode = "host";
+       phy_type = "ulpi";
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       dr_mode = "otg";
+       phy_type = "ulpi";
+       disable-over-current;
+       status = "okay";
+};
+
+&weim {
+       status = "okay";
+
+       nor: nor@0,0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "cfi-flash";
+               reg = <0 0x00000000 0x04000000>;
+               bank-width = <2>;
+               linux,mtd-name = "physmap-flash.0";
+               fsl,weim-cs-timing = <0x00008f03 0xa0330d01 0x002208c0>;
+       };
+
+       uart8250@3,200000 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_uart8250_1>;
+               compatible = "ns8250";
+               clocks = <&clk14745600>;
+               fsl,weim-cs-timing = <0x0000d603 0x0d1d0d01 0x00d20000>;
+               interrupts = <&gpio2 23 IRQ_TYPE_LEVEL_LOW>;
+               reg = <3 0x200000 0x1000>;
+               reg-shift = <1>;
+               reg-io-width = <1>;
+               no-loopback-test;
+       };
+
+       uart8250@3,400000 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_uart8250_2>;
+               compatible = "ns8250";
+               clocks = <&clk14745600>;
+               fsl,weim-cs-timing = <0x0000d603 0x0d1d0d01 0x00d20000>;
+               interrupts = <&gpio2 22 IRQ_TYPE_LEVEL_LOW>;
+               reg = <3 0x400000 0x1000>;
+               reg-shift = <1>;
+               reg-io-width = <1>;
+               no-loopback-test;
+       };
+
+       uart8250@3,800000 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_uart8250_3>;
+               compatible = "ns8250";
+               clocks = <&clk14745600>;
+               fsl,weim-cs-timing = <0x0000d603 0x0d1d0d01 0x00d20000>;
+               interrupts = <&gpio2 27 IRQ_TYPE_LEVEL_LOW>;
+               reg = <3 0x800000 0x1000>;
+               reg-shift = <1>;
+               reg-io-width = <1>;
+               no-loopback-test;
+       };
+
+       uart8250@3,1000000 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_uart8250_4>;
+               compatible = "ns8250";
+               clocks = <&clk14745600>;
+               fsl,weim-cs-timing = <0x0000d603 0x0d1d0d01 0x00d20000>;
+               interrupts = <&gpio2 30 IRQ_TYPE_LEVEL_LOW>;
+               reg = <3 0x1000000 0x1000>;
+               reg-shift = <1>;
+               reg-io-width = <1>;
+               no-loopback-test;
+       };
+};
+
+&iomuxc {
+       imx27-eukrea-cpuimx27 {
+               pinctrl_fec: fecgrp {
+                       fsl,pins = <
+                               MX27_PAD_SD3_CMD__FEC_TXD0              0x0
+                               MX27_PAD_SD3_CLK__FEC_TXD1              0x0
+                               MX27_PAD_ATA_DATA0__FEC_TXD2            0x0
+                               MX27_PAD_ATA_DATA1__FEC_TXD3            0x0
+                               MX27_PAD_ATA_DATA2__FEC_RX_ER           0x0
+                               MX27_PAD_ATA_DATA3__FEC_RXD1            0x0
+                               MX27_PAD_ATA_DATA4__FEC_RXD2            0x0
+                               MX27_PAD_ATA_DATA5__FEC_RXD3            0x0
+                               MX27_PAD_ATA_DATA6__FEC_MDIO            0x0
+                               MX27_PAD_ATA_DATA7__FEC_MDC             0x0
+                               MX27_PAD_ATA_DATA8__FEC_CRS             0x0
+                               MX27_PAD_ATA_DATA9__FEC_TX_CLK          0x0
+                               MX27_PAD_ATA_DATA10__FEC_RXD0           0x0
+                               MX27_PAD_ATA_DATA11__FEC_RX_DV          0x0
+                               MX27_PAD_ATA_DATA12__FEC_RX_CLK         0x0
+                               MX27_PAD_ATA_DATA13__FEC_COL            0x0
+                               MX27_PAD_ATA_DATA14__FEC_TX_ER          0x0
+                               MX27_PAD_ATA_DATA15__FEC_TX_EN          0x0
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX27_PAD_I2C_DATA__I2C_DATA             0x0
+                               MX27_PAD_I2C_CLK__I2C_CLK               0x0
+                       >;
+               };
+
+               pinctrl_nfc: nfcgrp {
+                       fsl,pins = <
+                               MX27_PAD_NFRB__NFRB                     0x0
+                               MX27_PAD_NFCLE__NFCLE                   0x0
+                               MX27_PAD_NFWP_B__NFWP_B                 0x0
+                               MX27_PAD_NFCE_B__NFCE_B                 0x0
+                               MX27_PAD_NFALE__NFALE                   0x0
+                               MX27_PAD_NFRE_B__NFRE_B                 0x0
+                               MX27_PAD_NFWE_B__NFWE_B                 0x0
+                       >;
+               };
+
+               pinctrl_owire: owiregrp {
+                       fsl,pins = <
+                               MX27_PAD_RTCK__OWIRE                    0x0
+                       >;
+               };
+
+               pinctrl_sdhc2: sdhc2grp {
+                       fsl,pins = <
+                               MX27_PAD_SD2_CLK__SD2_CLK               0x0
+                               MX27_PAD_SD2_CMD__SD2_CMD               0x0
+                               MX27_PAD_SD2_D0__SD2_D0                 0x0
+                               MX27_PAD_SD2_D1__SD2_D1                 0x0
+                               MX27_PAD_SD2_D2__SD2_D2                 0x0
+                               MX27_PAD_SD2_D3__SD2_D3                 0x0
+                       >;
+               };
+
+               pinctrl_uart4: uart4grp {
+                       fsl,pins = <
+                               MX27_PAD_USBH1_TXDM__UART4_TXD          0x0
+                               MX27_PAD_USBH1_RXDP__UART4_RXD          0x0
+                               MX27_PAD_USBH1_TXDP__UART4_CTS          0x0
+                               MX27_PAD_USBH1_FS__UART4_RTS            0x0
+                       >;
+               };
+
+               pinctrl_uart8250_1: uart82501grp {
+                       fsl,pins = <
+                               MX27_PAD_USB_PWR__GPIO2_23              0x0
+                       >;
+               };
+
+               pinctrl_uart8250_2: uart82502grp {
+                       fsl,pins = <
+                               MX27_PAD_USBH1_SUSP__GPIO2_22           0x0
+                       >;
+               };
+
+               pinctrl_uart8250_3: uart82503grp {
+                       fsl,pins = <
+                               MX27_PAD_USBH1_OE_B__GPIO2_27           0x0
+                       >;
+               };
+
+               pinctrl_uart8250_4: uart82504grp {
+                       fsl,pins = <
+                               MX27_PAD_USBH1_RXDM__GPIO2_30           0x0
+                       >;
+               };
+
+               pinctrl_usbh2: usbh2grp {
+                       fsl,pins = <
+                               MX27_PAD_USBH2_CLK__USBH2_CLK           0x0
+                               MX27_PAD_USBH2_DIR__USBH2_DIR           0x0
+                               MX27_PAD_USBH2_NXT__USBH2_NXT           0x0
+                               MX27_PAD_USBH2_STP__USBH2_STP           0x0
+                               MX27_PAD_CSPI2_SCLK__USBH2_DATA0        0x0
+                               MX27_PAD_CSPI2_MOSI__USBH2_DATA1        0x0
+                               MX27_PAD_CSPI2_MISO__USBH2_DATA2        0x0
+                               MX27_PAD_CSPI2_SS1__USBH2_DATA3         0x0
+                               MX27_PAD_CSPI2_SS2__USBH2_DATA4         0x0
+                               MX27_PAD_CSPI1_SS2__USBH2_DATA5         0x0
+                               MX27_PAD_CSPI2_SS0__USBH2_DATA6         0x0
+                               MX27_PAD_USBH2_DATA7__USBH2_DATA7       0x0
+                       >;
+               };
+
+               pinctrl_usbotg: usbotggrp {
+                       fsl,pins = <
+                               MX27_PAD_USBOTG_CLK__USBOTG_CLK         0x0
+                               MX27_PAD_USBOTG_DIR__USBOTG_DIR         0x0
+                               MX27_PAD_USBOTG_NXT__USBOTG_NXT         0x0
+                               MX27_PAD_USBOTG_STP__USBOTG_STP         0x0
+                               MX27_PAD_USBOTG_DATA0__USBOTG_DATA0     0x0
+                               MX27_PAD_USBOTG_DATA1__USBOTG_DATA1     0x0
+                               MX27_PAD_USBOTG_DATA2__USBOTG_DATA2     0x0
+                               MX27_PAD_USBOTG_DATA3__USBOTG_DATA3     0x0
+                               MX27_PAD_USBOTG_DATA4__USBOTG_DATA4     0x0
+                               MX27_PAD_USBOTG_DATA5__USBOTG_DATA5     0x0
+                               MX27_PAD_USBOTG_DATA6__USBOTG_DATA6     0x0
+                               MX27_PAD_USBOTG_DATA7__USBOTG_DATA7     0x0
+                       >;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts b/arch/arm/boot/dts/imx27-eukrea-mbimxsd27-baseboard.dts
new file mode 100644 (file)
index 0000000..2ab65fc
--- /dev/null
@@ -0,0 +1,273 @@
+/*
+ * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
+ *
+ * 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 "imx27-eukrea-cpuimx27.dtsi"
+
+/ {
+       model = "Eukrea MBIMXSD27";
+       compatible = "eukrea,mbimxsd27-baseboard", "eukrea,cpuimx27", "fsl,imx27";
+
+       display0: CMO-QVGA {
+               model = "CMO-QVGA";
+               native-mode = <&timing0>;
+               bits-per-pixel = <16>;
+               fsl,pcr = <0xfad08b80>;
+
+               display-timings {
+                       timing0: 320x240 {
+                               clock-frequency = <6500000>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <20>;
+                               hsync-len = <30>;
+                               hfront-porch = <38>;
+                               vback-porch = <4>;
+                               vsync-len = <3>;
+                               vfront-porch = <15>;
+                       };
+               };
+       };
+
+       backlight {
+               compatible = "gpio-backlight";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight>;
+               gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpioleds>;
+
+               led1 {
+                       label = "system::live";
+                       gpios = <&gpio6 16 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               led2 {
+                       label = "system::user";
+                       gpios = <&gpio6 19 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       regulators {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "simple-bus";
+
+               reg_lcd: regulator@0 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_lcdreg>;
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "LCD";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+};
+
+&cspi1 {
+       pinctrl-0 = <&pinctrl_cspi1>;
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
+       status = "okay";
+
+       ads7846 {
+               compatible = "ti,ads7846";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_touch>;
+               reg = <0>;
+               interrupts = <&gpio4 25 IRQ_TYPE_LEVEL_LOW>;
+               spi-cpol;
+               spi-max-frequency = <1500000>;
+               ti,keep-vref-on;
+       };
+};
+
+&fb {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_imxfb>;
+       display = <&display0>;
+       lcd-supply = <&reg_lcd>;
+       fsl,dmacr = <0x00040060>;
+       fsl,lscr1 = <0x00120300>;
+       fsl,lpccr = <0x00a903ff>;
+       status = "okay";
+};
+
+&i2c1 {
+       codec: codec@1a {
+               compatible = "ti,tlv320aic23";
+               reg = <0x1a>;
+       };
+};
+
+&kpp {
+       linux,keymap = <
+               MATRIX_KEY(0, 0, KEY_UP)
+               MATRIX_KEY(0, 1, KEY_DOWN)
+               MATRIX_KEY(1, 0, KEY_RIGHT)
+               MATRIX_KEY(1, 1, KEY_LEFT)
+       >;
+       status = "okay";
+};
+
+&sdhci1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_sdhc1>;
+       bus-width = <4>;
+       status = "okay";
+};
+
+&ssi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ssi1>;
+       codec-handle = <&codec>;
+       status = "okay";
+};
+
+&uart1 {
+       fsl,uart-has-rtscts;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       fsl,uart-has-rtscts;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&uart3 {
+       fsl,uart-has-rtscts;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3>;
+       status = "okay";
+};
+
+&iomuxc {
+       imx27-eukrea-cpuimx27-baseboard {
+               pinctrl_cspi1: cspi1grp {
+                       fsl,pins = <
+                               MX27_PAD_CSPI1_MISO__CSPI1_MISO 0x0
+                               MX27_PAD_CSPI1_MOSI__CSPI1_MOSI 0x0
+                               MX27_PAD_CSPI1_SCLK__CSPI1_SCLK 0x0
+                               MX27_PAD_CSPI1_SS0__GPIO4_28    0x0 /* CS0 */
+                       >;
+               };
+
+               pinctrl_backlight: backlightgrp {
+                       fsl,pins = <
+                               MX27_PAD_PWMO__GPIO5_5          0x0
+                       >;
+               };
+
+               pinctrl_gpioleds: gpioledsgrp {
+                       fsl,pins = <
+                               MX27_PAD_PC_PWRON__GPIO6_16     0x0
+                               MX27_PAD_PC_CD2_B__GPIO6_19     0x0
+                       >;
+               };
+
+               pinctrl_imxfb: imxfbgrp {
+                       fsl,pins = <
+                               MX27_PAD_LD0__LD0               0x0
+                               MX27_PAD_LD1__LD1               0x0
+                               MX27_PAD_LD2__LD2               0x0
+                               MX27_PAD_LD3__LD3               0x0
+                               MX27_PAD_LD4__LD4               0x0
+                               MX27_PAD_LD5__LD5               0x0
+                               MX27_PAD_LD6__LD6               0x0
+                               MX27_PAD_LD7__LD7               0x0
+                               MX27_PAD_LD8__LD8               0x0
+                               MX27_PAD_LD9__LD9               0x0
+                               MX27_PAD_LD10__LD10             0x0
+                               MX27_PAD_LD11__LD11             0x0
+                               MX27_PAD_LD12__LD12             0x0
+                               MX27_PAD_LD13__LD13             0x0
+                               MX27_PAD_LD14__LD14             0x0
+                               MX27_PAD_LD15__LD15             0x0
+                               MX27_PAD_LD16__LD16             0x0
+                               MX27_PAD_LD17__LD17             0x0
+                               MX27_PAD_CONTRAST__CONTRAST     0x0
+                               MX27_PAD_OE_ACD__OE_ACD         0x0
+                               MX27_PAD_HSYNC__HSYNC           0x0
+                               MX27_PAD_VSYNC__VSYNC           0x0
+                       >;
+               };
+
+               pinctrl_lcdreg: lcdreggrp {
+                       fsl,pins = <
+                               MX27_PAD_CLS__GPIO1_25          0x0
+                       >;
+               };
+
+               pinctrl_sdhc1: sdhc1grp {
+                       fsl,pins = <
+                               MX27_PAD_SD1_CLK__SD1_CLK       0x0
+                               MX27_PAD_SD1_CMD__SD1_CMD       0x0
+                               MX27_PAD_SD1_D0__SD1_D0         0x0
+                               MX27_PAD_SD1_D1__SD1_D1         0x0
+                               MX27_PAD_SD1_D2__SD1_D2         0x0
+                               MX27_PAD_SD1_D3__SD1_D3         0x0
+                       >;
+               };
+
+               pinctrl_ssi1: ssi1grp {
+                       fsl,pins = <
+                               MX27_PAD_SSI4_CLK__SSI4_CLK     0x0
+                               MX27_PAD_SSI4_FS__SSI4_FS       0x0
+                               MX27_PAD_SSI4_RXDAT__SSI4_RXDAT 0x1
+                               MX27_PAD_SSI4_TXDAT__SSI4_TXDAT 0x1
+                       >;
+               };
+
+               pinctrl_touch: touchgrp {
+                       fsl,pins = <
+                               MX27_PAD_CSPI1_RDY__GPIO4_25    0x0 /* IRQ */
+                       >;
+               };
+
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX27_PAD_UART1_TXD__UART1_TXD   0x0
+                               MX27_PAD_UART1_RXD__UART1_RXD   0x0
+                               MX27_PAD_UART1_CTS__UART1_CTS   0x0
+                               MX27_PAD_UART1_RTS__UART1_RTS   0x0
+                       >;
+               };
+
+               pinctrl_uart2: uart2grp {
+                       fsl,pins = <
+                               MX27_PAD_UART2_TXD__UART2_TXD   0x0
+                               MX27_PAD_UART2_RXD__UART2_RXD   0x0
+                               MX27_PAD_UART2_CTS__UART2_CTS   0x0
+                               MX27_PAD_UART2_RTS__UART2_RTS   0x0
+                       >;
+               };
+
+               pinctrl_uart3: uart3grp {
+                       fsl,pins = <
+                               MX27_PAD_UART3_TXD__UART3_TXD   0x0
+                               MX27_PAD_UART3_RXD__UART3_RXD   0x0
+                               MX27_PAD_UART3_CTS__UART3_CTS   0x0
+                               MX27_PAD_UART3_RTS__UART3_RTS   0x0
+                       >;
+               };
+       };
+};
index 4c31771..49450db 100644 (file)
@@ -28,7 +28,7 @@
                usbphy0: usbphy@0 {
                        compatible = "usb-nop-xceiv";
                        reg = <0>;
-                       clocks = <&clks 0>;
+                       clocks = <&clks IMX27_CLK_DUMMY>;
                        clock-names = "main_clk";
                };
        };
index fe02bc7..538568b 100644 (file)
@@ -61,7 +61,7 @@
                        compatible = "usb-nop-xceiv";
                        reg = <2>;
                        vcc-supply = <&reg_5v0>;
-                       clocks = <&clks 0>;
+                       clocks = <&clks IMX27_CLK_DUMMY>;
                        clock-names = "main_clk";
                };
        };
index 31e9f70..b4e955e 100644 (file)
@@ -51,7 +51,7 @@
                        compatible = "usb-nop-xceiv";
                        reg = <0>;
                        vcc-supply = <&sw3_reg>;
-                       clocks = <&clks 0>;
+                       clocks = <&clks IMX27_CLK_DUMMY>;
                        clock-names = "main_clk";
                };
        };
 &ssi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ssi1>;
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index a75555c..107d713 100644 (file)
 
 #include "skeleton.dtsi"
 #include "imx27-pinfunc.h"
+
+#include <dt-bindings/clock/imx27-clock.h>
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/gpio/gpio.h>
 
 / {
        aliases {
@@ -68,7 +70,7 @@
                                399000 1450000
                        >;
                        clock-latency = <62500>;
-                       clocks = <&clks 18>;
+                       clocks = <&clks IMX27_CLK_CPU_DIV>;
                        voltage-tolerance = <5>;
                };
        };
@@ -91,7 +93,8 @@
                                compatible = "fsl,imx27-dma";
                                reg = <0x10001000 0x1000>;
                                interrupts = <32>;
-                               clocks = <&clks 50>, <&clks 70>;
+                               clocks = <&clks IMX27_CLK_DMA_IPG_GATE>,
+                                        <&clks IMX27_CLK_DMA_AHB_GATE>;
                                clock-names = "ipg", "ahb";
                                #dma-cells = <1>;
                                #dma-channels = <16>;
                                compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
                                reg = <0x10002000 0x1000>;
                                interrupts = <27>;
-                               clocks = <&clks 74>;
+                               clocks = <&clks IMX27_CLK_WDOG_IPG_GATE>;
                        };
 
                        gpt1: timer@10003000 {
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x10003000 0x1000>;
                                interrupts = <26>;
-                               clocks = <&clks 46>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT1_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x10004000 0x1000>;
                                interrupts = <25>;
-                               clocks = <&clks 45>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT2_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x10005000 0x1000>;
                                interrupts = <24>;
-                               clocks = <&clks 44>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT3_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-pwm";
                                reg = <0x10006000 0x1000>;
                                interrupts = <23>;
-                               clocks = <&clks 34>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_PWM_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-kpp", "fsl,imx21-kpp";
                                reg = <0x10008000 0x1000>;
                                interrupts = <21>;
-                               clocks = <&clks 37>;
+                               clocks = <&clks IMX27_CLK_KPP_IPG_GATE>;
                                status = "disabled";
                        };
 
                        owire: owire@10009000 {
                                compatible = "fsl,imx27-owire", "fsl,imx21-owire";
                                reg = <0x10009000 0x1000>;
-                               clocks = <&clks 35>;
+                               clocks = <&clks IMX27_CLK_OWIRE_IPG_GATE>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1000a000 0x1000>;
                                interrupts = <20>;
-                               clocks = <&clks 81>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART1_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1000b000 0x1000>;
                                interrupts = <19>;
-                               clocks = <&clks 80>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART2_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1000c000 0x1000>;
                                interrupts = <18>;
-                               clocks = <&clks 79>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART3_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1000d000 0x1000>;
                                interrupts = <17>;
-                               clocks = <&clks 78>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART4_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-cspi";
                                reg = <0x1000e000 0x1000>;
                                interrupts = <16>;
-                               clocks = <&clks 53>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_CSPI1_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-cspi";
                                reg = <0x1000f000 0x1000>;
                                interrupts = <15>;
-                               clocks = <&clks 52>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_CSPI2_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-ssi", "fsl,imx21-ssi";
                                reg = <0x10010000 0x1000>;
                                interrupts = <14>;
-                               clocks = <&clks 26>;
+                               clocks = <&clks IMX27_CLK_SSI1_IPG_GATE>;
                                dmas = <&dma 12>, <&dma 13>, <&dma 14>, <&dma 15>;
                                dma-names = "rx0", "tx0", "rx1", "tx1";
                                fsl,fifo-depth = <8>;
                                compatible = "fsl,imx27-ssi", "fsl,imx21-ssi";
                                reg = <0x10011000 0x1000>;
                                interrupts = <13>;
-                               clocks = <&clks 25>;
+                               clocks = <&clks IMX27_CLK_SSI2_IPG_GATE>;
                                dmas = <&dma 8>, <&dma 9>, <&dma 10>, <&dma 11>;
                                dma-names = "rx0", "tx0", "rx1", "tx1";
                                fsl,fifo-depth = <8>;
                                compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
                                reg = <0x10012000 0x1000>;
                                interrupts = <12>;
-                               clocks = <&clks 40>;
+                               clocks = <&clks IMX27_CLK_I2C1_IPG_GATE>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
                                reg = <0x10013000 0x1000>;
                                interrupts = <11>;
-                               clocks = <&clks 30>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_SDHC1_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&dma 7>;
                                dma-names = "rx-tx";
                                compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
                                reg = <0x10014000 0x1000>;
                                interrupts = <10>;
-                               clocks = <&clks 29>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_SDHC2_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&dma 6>;
                                dma-names = "rx-tx";
                                gpio1: gpio@10015000 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015000 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                                gpio2: gpio@10015100 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015100 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                                gpio3: gpio@10015200 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015200 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                                gpio4: gpio@10015300 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015300 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                                gpio5: gpio@10015400 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015400 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                                gpio6: gpio@10015500 {
                                        compatible = "fsl,imx27-gpio", "fsl,imx21-gpio";
                                        reg = <0x10015500 0x100>;
+                                       clocks = <&clks IMX27_CLK_GPIO_IPG_GATE>;
                                        interrupts = <8>;
                                        gpio-controller;
                                        #gpio-cells = <2>;
                        audmux: audmux@10016000 {
                                compatible = "fsl,imx27-audmux", "fsl,imx21-audmux";
                                reg = <0x10016000 0x1000>;
-                               clocks = <&clks 0>;
+                               clocks = <&clks IMX27_CLK_DUMMY>;
                                clock-names = "audmux";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-cspi";
                                reg = <0x10017000 0x1000>;
                                interrupts = <6>;
-                               clocks = <&clks 51>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_CSPI3_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x10019000 0x1000>;
                                interrupts = <4>;
-                               clocks = <&clks 43>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT4_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x1001a000 0x1000>;
                                interrupts = <3>;
-                               clocks = <&clks 42>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT5_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1001b000 0x1000>;
                                interrupts = <49>;
-                               clocks = <&clks 77>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART5_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-uart", "fsl,imx21-uart";
                                reg = <0x1001c000 0x1000>;
                                interrupts = <48>;
-                               clocks = <&clks 78>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_UART6_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-i2c", "fsl,imx21-i2c";
                                reg = <0x1001d000 0x1000>;
                                interrupts = <1>;
-                               clocks = <&clks 39>;
+                               clocks = <&clks IMX27_CLK_I2C2_IPG_GATE>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx27-mmc", "fsl,imx21-mmc";
                                reg = <0x1001e000 0x1000>;
                                interrupts = <9>;
-                               clocks = <&clks 28>, <&clks 60>;
+                               clocks = <&clks IMX27_CLK_SDHC3_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER2_GATE>;
                                clock-names = "ipg", "per";
                                dmas = <&dma 36>;
                                dma-names = "rx-tx";
                                compatible = "fsl,imx27-gpt", "fsl,imx1-gpt";
                                reg = <0x1001f000 0x1000>;
                                interrupts = <2>;
-                               clocks = <&clks 41>, <&clks 61>;
+                               clocks = <&clks IMX27_CLK_GPT6_IPG_GATE>,
+                                        <&clks IMX27_CLK_PER1_GATE>;
                                clock-names = "ipg", "per";
                        };
                };
                                compatible = "fsl,imx27-fb", "fsl,imx21-fb";
                                interrupts = <61>;
                                reg = <0x10021000 0x1000>;
-                               clocks = <&clks 36>, <&clks 65>, <&clks 59>;
+                               clocks = <&clks IMX27_CLK_LCDC_IPG_GATE>,
+                                        <&clks IMX27_CLK_LCDC_AHB_GATE>,
+                                        <&clks IMX27_CLK_PER3_GATE>;
                                clock-names = "ipg", "ahb", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-vpu";
                                reg = <0x10023000 0x0200>;
                                interrupts = <53>;
-                               clocks = <&clks 57>, <&clks 66>;
+                               clocks = <&clks IMX27_CLK_VPU_BAUD_GATE>,
+                                        <&clks IMX27_CLK_VPU_AHB_GATE>;
                                clock-names = "per", "ahb";
                                iram = <&iram>;
                        };
                                compatible = "fsl,imx27-usb";
                                reg = <0x10024000 0x200>;
                                interrupts = <56>;
-                               clocks = <&clks 75>;
+                               clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
                                fsl,usbmisc = <&usbmisc 0>;
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-usb";
                                reg = <0x10024200 0x200>;
                                interrupts = <54>;
-                               clocks = <&clks 75>;
+                               clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
                                fsl,usbmisc = <&usbmisc 1>;
                                status = "disabled";
                        };
                                compatible = "fsl,imx27-usb";
                                reg = <0x10024400 0x200>;
                                interrupts = <55>;
-                               clocks = <&clks 75>;
+                               clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
                                fsl,usbmisc = <&usbmisc 2>;
                                status = "disabled";
                        };
                                #index-cells = <1>;
                                compatible = "fsl,imx27-usbmisc";
                                reg = <0x10024600 0x200>;
-                               clocks = <&clks 62>;
+                               clocks = <&clks IMX27_CLK_USB_AHB_GATE>;
                        };
 
                        sahara2: sahara@10025000 {
                                compatible = "fsl,imx27-sahara";
                                reg = <0x10025000 0x1000>;
                                interrupts = <59>;
-                               clocks = <&clks 32>, <&clks 64>;
+                               clocks = <&clks IMX27_CLK_SAHARA_IPG_GATE>,
+                                        <&clks IMX27_CLK_SAHARA_AHB_GATE>;
                                clock-names = "ipg", "ahb";
                        };
 
                                compatible = "fsl,imx27-iim";
                                reg = <0x10028000 0x1000>;
                                interrupts = <62>;
-                               clocks = <&clks 38>;
+                               clocks = <&clks IMX27_CLK_IIM_IPG_GATE>;
                        };
 
                        fec: ethernet@1002b000 {
                                compatible = "fsl,imx27-fec";
                                reg = <0x1002b000 0x4000>;
                                interrupts = <50>;
-                               clocks = <&clks 48>, <&clks 67>;
+                               clocks = <&clks IMX27_CLK_FEC_IPG_GATE>,
+                                        <&clks IMX27_CLK_FEC_AHB_GATE>;
                                clock-names = "ipg", "ahb";
                                status = "disabled";
                        };
                        compatible = "fsl,imx27-nand";
                        reg = <0xd8000000 0x1000>;
                        interrupts = <29>;
-                       clocks = <&clks 54>;
+                       clocks = <&clks IMX27_CLK_NFC_BAUD_GATE>;
                        status = "disabled";
                };
 
                        #size-cells = <1>;
                        compatible = "fsl,imx27-weim";
                        reg = <0xd8002000 0x1000>;
-                       clocks = <&clks 0>;
+                       clocks = <&clks IMX27_CLK_EMI_AHB_GATE>;
                        ranges = <
                                0 0 0xc0000000 0x08000000
                                1 0 0xc8000000 0x08000000
index ae7c339..b04b6b8 100644 (file)
                                        fsl,pull-up = <MXS_PULL_DISABLE>;
                                };
 
+                               mmc_pwr_cfa10036: mmc_pwr_cfa10036@0 {
+                                       reg = <0>;
+                                       fsl,pinmux-ids = <
+                                               0x31c3 /*
+                                               MX28_PAD_PWM3__GPIO_3_28 */
+                                       >;
+                                       fsl,drive-strength = <0>;
+                                       fsl,voltage = <1>;
+                                       fsl,pull-up = <0>;
+                               };
+
                        };
 
                        ssp0: ssp@80010000 {
@@ -60,6 +71,7 @@
                                pinctrl-names = "default";
                                pinctrl-0 = <&mmc0_4bit_pins_a
                                        &mmc0_cd_cfg &mmc0_sck_cfg>;
+                               vmmc-supply = <&reg_vddio_sd0>;
                                bus-width = <4>;
                                status = "okay";
                        };
                        default-state = "on";
                };
        };
+
+       reg_vddio_sd0: vddio-sd0 {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&mmc_pwr_cfa10036>;
+               regulator-name = "vddio-sd0";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio3 28 0>;
+       };
 };
diff --git a/arch/arm/boot/dts/imx28-m28.dtsi b/arch/arm/boot/dts/imx28-m28.dtsi
new file mode 100644 (file)
index 0000000..759cc56
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2014 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 "imx28.dtsi"
+
+/ {
+       model = "DENX M28";
+       compatible = "denx,m28", "fsl,imx28";
+
+       memory {
+               reg = <0x40000000 0x08000000>;
+       };
+
+       apb@80000000 {
+               apbh@80000000 {
+                       gpmi-nand@8000c000 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
+                               status = "okay";
+
+                               partition@0 {
+                                       label = "bootloader";
+                                       reg = <0x00000000 0x00300000>;
+                                       read-only;
+                               };
+
+                               partition@1 {
+                                       label = "environment";
+                                       reg = <0x00300000 0x00080000>;
+                               };
+
+                               partition@2 {
+                                       label = "redundant-environment";
+                                       reg = <0x00380000 0x00080000>;
+                               };
+
+                               partition@3 {
+                                       label = "kernel";
+                                       reg = <0x00400000 0x00400000>;
+                               };
+
+                               partition@4 {
+                                       label = "filesystem";
+                                       reg = <0x00800000 0x0f800000>;
+                               };
+                       };
+               };
+
+               apbx@80040000 {
+                       i2c0: i2c@80058000 {
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&i2c0_pins_a>;
+                               status = "okay";
+
+                               rtc: rtc@68 {
+                                       compatible = "stm,m41t62";
+                                       reg = <0x68>;
+                               };
+                       };
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_3p3v: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "3P3V";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+       };
+};
index f0ad7b9..b3c09ae 100644 (file)
  */
 
 /dts-v1/;
-#include "imx28.dtsi"
+#include "imx28-m28.dtsi"
 
 / {
        model = "DENX M28EVK";
        compatible = "denx,m28evk", "fsl,imx28";
 
-       memory {
-               reg = <0x40000000 0x08000000>;
-       };
-
        apb@80000000 {
                apbh@80000000 {
-                       gpmi-nand@8000c000 {
-                               #address-cells = <1>;
-                               #size-cells = <1>;
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&gpmi_pins_a &gpmi_status_cfg>;
-                               status = "okay";
-
-                               partition@0 {
-                                       label = "bootloader";
-                                       reg = <0x00000000 0x00300000>;
-                                       read-only;
-                               };
-
-                               partition@1 {
-                                       label = "environment";
-                                       reg = <0x00300000 0x00080000>;
-                               };
-
-                               partition@2 {
-                                       label = "redundant-environment";
-                                       reg = <0x00380000 0x00080000>;
-                               };
-
-                               partition@3 {
-                                       label = "kernel";
-                                       reg = <0x00400000 0x00400000>;
-                               };
-
-                               partition@4 {
-                                       label = "filesystem";
-                                       reg = <0x00800000 0x0f800000>;
-                               };
-                       };
-
                        ssp0: ssp@80010000 {
                                compatible = "fsl,imx28-mmc";
                                pinctrl-names = "default";
                        };
 
                        i2c0: i2c@80058000 {
-                               pinctrl-names = "default";
-                               pinctrl-0 = <&i2c0_pins_a>;
-                               status = "okay";
-
                                sgtl5000: codec@0a {
                                        compatible = "fsl,sgtl5000";
                                        reg = <0x0a>;
                                        reg = <0x51>;
                                        pagesize = <32>;
                                };
-
-                               rtc: rtc@68 {
-                                       compatible = "stm,m41t62";
-                                       reg = <0x68>;
-                               };
                        };
 
                        lradc@80050000 {
        };
 
        regulators {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               reg_3p3v: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "3P3V";
-                       regulator-min-microvolt = <3300000>;
-                       regulator-max-microvolt = <3300000>;
-                       regulator-always-on;
-               };
-
                reg_vddio_sd0: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
index f04ae91..75b0367 100644 (file)
 
 &ssi1 {
        codec-handle = <&tlv320aic23>;
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 4759abb..442e216 100644 (file)
                                #clock-cells = <1>;
                        };
 
+                       gpt: timer@53f90000 {
+                               compatible = "fsl,imx35-gpt", "fsl,imx31-gpt";
+                               reg = <0x53f90000 0x4000>;
+                               interrupts = <29>;
+                               clocks = <&clks 9>, <&clks 50>;
+                               clock-names = "ipg", "per";
+                       };
+
                        gpio3: gpio@53fa4000 {
                                compatible = "fsl,imx35-gpio", "fsl,imx31-gpio";
                                reg = <0x53fa4000 0x4000>;
index 6a201cf..c0e0f60 100644 (file)
                                        reg = <0x50014000 0x4000>;
                                        interrupts = <30>;
                                        clocks = <&clks IMX5_CLK_SSI2_IPG_GATE>;
+                                       dmas = <&sdma 24 1 0>,
+                                              <&sdma 25 1 0>;
+                                       dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
                                        status = "disabled";
                                };
 
                                reg = <0x63fcc000 0x4000>;
                                interrupts = <29>;
                                clocks = <&clks IMX5_CLK_SSI1_IPG_GATE>;
+                               dmas = <&sdma 28 0 0>,
+                                      <&sdma 29 0 0>;
+                               dma-names = "rx", "tx";
                                fsl,fifo-depth = <15>;
-                               fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */
                                status = "disabled";
                        };
 
index 181d77f..56569ce 100644 (file)
                reg = <0>;
                interrupt-parent = <&gpio1>;
                interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+               fsl,mc13xxx-uses-rtc;
 
                regulators {
                        sw1_reg: sw1 {
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 31cfb7f..34599c5 100644 (file)
 
 &ssi2 {
        codec-handle = <&tlv320aic23>;
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index bebbf3b..17c05a6 100644 (file)
                                               <&sdma 25 1 0>;
                                        dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
                                        status = "disabled";
                                };
 
                                       <&sdma 29 0 0>;
                                dma-names = "rx", "tx";
                                fsl,fifo-depth = <15>;
-                               fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */
                                status = "disabled";
                        };
 
                                       <&sdma 47 0 0>;
                                dma-names = "rx", "tx";
                                fsl,fifo-depth = <15>;
-                               fsl,ssi-dma-events = <47 46 37 35>; /* TX0 RX0 TX1 RX1 */
                                status = "disabled";
                        };
 
diff --git a/arch/arm/boot/dts/imx53-m53.dtsi b/arch/arm/boot/dts/imx53-m53.dtsi
new file mode 100644 (file)
index 0000000..87a7fc7
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2014 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 "imx53.dtsi"
+
+/ {
+       model = "DENX M53";
+       compatible = "denx,imx53-m53", "fsl,imx53";
+
+       memory {
+               reg = <0x70000000 0x20000000>,
+                     <0xb0000000 0x20000000>;
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_3p2v: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "3P2V";
+                       regulator-min-microvolt = <3200000>;
+                       regulator-max-microvolt = <3200000>;
+                       regulator-always-on;
+               };
+
+               reg_backlight: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "lcd-supply";
+                       regulator-min-microvolt = <3200000>;
+                       regulator-max-microvolt = <3200000>;
+                       regulator-always-on;
+               };
+       };
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       clock-frequency = <400000>;
+       status = "okay";
+
+       stmpe610@41 {
+               compatible = "st,stmpe610";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               reg = <0x41>;
+               id = <0>;
+               blocks = <0x5>;
+               interrupts = <6 0x0>;
+               interrupt-parent = <&gpio7>;
+               irq-trigger = <0x1>;
+
+               stmpe_touchscreen {
+                       compatible = "st,stmpe-ts";
+                       reg = <0>;
+                       st,sample-time = <4>;
+                       st,mod-12b = <1>;
+                       st,ref-sel = <0>;
+                       st,adc-freq = <1>;
+                       st,ave-ctrl = <3>;
+                       st,touch-det-delay = <3>;
+                       st,settling = <4>;
+                       st,fraction-z = <7>;
+                       st,i-drive = <1>;
+               };
+       };
+
+       eeprom: eeprom@50 {
+               compatible = "atmel,24c128";
+               reg = <0x50>;
+               pagesize = <32>;
+       };
+
+       rtc: rtc@68 {
+               compatible = "stm,m41t62";
+               reg = <0x68>;
+       };
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx53-m53evk {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK       0x80000000
+                               MX53_PAD_EIM_EB3__GPIO2_31              0x80000000
+                               MX53_PAD_PATA_DA_0__GPIO7_6             0x80000000
+                       >;
+               };
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX53_PAD_EIM_D16__I2C2_SDA              0xc0000000
+                               MX53_PAD_EIM_EB2__I2C2_SCL              0xc0000000
+                       >;
+               };
+
+               pinctrl_nand: nandgrp {
+                       fsl,pins = <
+                               MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B     0x4
+                               MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B     0x4
+                               MX53_PAD_NANDF_CLE__EMI_NANDF_CLE       0x4
+                               MX53_PAD_NANDF_ALE__EMI_NANDF_ALE       0x4
+                               MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B     0xe0
+                               MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0      0xe0
+                               MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0      0x4
+                               MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
+                               MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
+                               MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
+                               MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
+                               MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
+                               MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
+                               MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
+                               MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
+                       >;
+               };
+       };
+};
+
+&nfc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_nand>;
+       nand-bus-width = <8>;
+       nand-ecc-mode = "hw";
+       status = "okay";
+};
index c4956b0..d0e0f57 100644 (file)
  */
 
 /dts-v1/;
-#include "imx53.dtsi"
+#include "imx53-m53.dtsi"
 
 / {
        model = "DENX M53EVK";
        compatible = "denx,imx53-m53evk", "fsl,imx53";
 
-       memory {
-               reg = <0x70000000 0x20000000>,
-                     <0xb0000000 0x20000000>;
-       };
-
        display1: display@di1 {
                compatible = "fsl,imx-parallel-display";
                interface-pix-fmt = "bgr666";
                #address-cells = <1>;
                #size-cells = <0>;
 
-               reg_3p2v: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "3P2V";
-                       regulator-min-microvolt = <3200000>;
-                       regulator-max-microvolt = <3200000>;
-                       regulator-always-on;
-               };
-
-
-               reg_backlight: regulator@1 {
-                       compatible = "regulator-fixed";
-                       reg = <1>;
-                       regulator-name = "lcd-supply";
-                       regulator-min-microvolt = <3200000>;
-                       regulator-max-microvolt = <3200000>;
-                       regulator-always-on;
-               };
-
                reg_usbh1_vbus: regulator@3 {
                        compatible = "regulator-fixed";
                        reg = <3>;
        };
 };
 
-&i2c2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_i2c2>;
-       clock-frequency = <400000>;
-       status = "okay";
-
-       stmpe610@41 {
-               compatible = "st,stmpe610";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               reg = <0x41>;
-               id = <0>;
-               blocks = <0x5>;
-               interrupts = <6 0x0>;
-               interrupt-parent = <&gpio7>;
-               irq-trigger = <0x1>;
-
-               stmpe_touchscreen {
-                       compatible = "st,stmpe-ts";
-                       reg = <0>;
-                       st,sample-time = <4>;
-                       st,mod-12b = <1>;
-                       st,ref-sel = <0>;
-                       st,adc-freq = <1>;
-                       st,ave-ctrl = <3>;
-                       st,touch-det-delay = <3>;
-                       st,settling = <4>;
-                       st,fraction-z = <7>;
-                       st,i-drive = <1>;
-               };
-       };
-
-       eeprom: eeprom@50 {
-               compatible = "atmel,24c128";
-               reg = <0x50>;
-               pagesize = <32>;
-       };
-
-       rtc: rtc@68 {
-               compatible = "stm,m41t62";
-               reg = <0x68>;
-       };
-};
-
 &i2c3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_i2c3>;
        pinctrl-0 = <&pinctrl_hog>;
 
        imx53-m53evk {
-               pinctrl_hog: hoggrp {
+               pinctrl_usb: usbgrp {
                        fsl,pins = <
-                               MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK       0x80000000
-                               MX53_PAD_EIM_EB3__GPIO2_31              0x80000000
-                               MX53_PAD_PATA_DA_0__GPIO7_6             0x80000000
                                MX53_PAD_GPIO_2__GPIO1_2                0x80000000
                                MX53_PAD_GPIO_3__USBOH3_USBH1_OC        0x80000000
                        >;
                        >;
                };
 
-               pinctrl_i2c2: i2c2grp {
-                       fsl,pins = <
-                               MX53_PAD_EIM_D16__I2C2_SDA              0xc0000000
-                               MX53_PAD_EIM_EB2__I2C2_SCL              0xc0000000
-                       >;
-               };
-
                pinctrl_i2c3: i2c3grp {
                        fsl,pins = <
                                MX53_PAD_GPIO_6__I2C3_SDA               0xc0000000
                        >;
                };
 
-               pinctrl_nand: nandgrp {
-                       fsl,pins = <
-                               MX53_PAD_NANDF_WE_B__EMI_NANDF_WE_B     0x4
-                               MX53_PAD_NANDF_RE_B__EMI_NANDF_RE_B     0x4
-                               MX53_PAD_NANDF_CLE__EMI_NANDF_CLE       0x4
-                               MX53_PAD_NANDF_ALE__EMI_NANDF_ALE       0x4
-                               MX53_PAD_NANDF_WP_B__EMI_NANDF_WP_B     0xe0
-                               MX53_PAD_NANDF_RB0__EMI_NANDF_RB_0      0xe0
-                               MX53_PAD_NANDF_CS0__EMI_NANDF_CS_0      0x4
-                               MX53_PAD_PATA_DATA0__EMI_NANDF_D_0      0xa4
-                               MX53_PAD_PATA_DATA1__EMI_NANDF_D_1      0xa4
-                               MX53_PAD_PATA_DATA2__EMI_NANDF_D_2      0xa4
-                               MX53_PAD_PATA_DATA3__EMI_NANDF_D_3      0xa4
-                               MX53_PAD_PATA_DATA4__EMI_NANDF_D_4      0xa4
-                               MX53_PAD_PATA_DATA5__EMI_NANDF_D_5      0xa4
-                               MX53_PAD_PATA_DATA6__EMI_NANDF_D_6      0xa4
-                               MX53_PAD_PATA_DATA7__EMI_NANDF_D_7      0xa4
-                       >;
-               };
-
                pinctrl_pwm1: pwm1grp {
                        fsl,pins = <
                                MX53_PAD_DISP0_DAT8__PWM1_PWMO          0x5
        remote-endpoint = <&display1_in>;
 };
 
-&nfc {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_nand>;
-       nand-bus-width = <8>;
-       nand-ecc-mode = "hw";
-       status = "okay";
-};
-
 &pwm1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm1>;
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
 };
 
 &usbh1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb>;
        vbus-supply = <&reg_usbh1_vbus>;
        phy_type = "utmi";
        status = "okay";
index 3e3f17a..2e44d2a 100644 (file)
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index fd8c60d..181ae5e 100644 (file)
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index e348796..704bd72 100644 (file)
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        codec-handle = <&sgtl5000>;
        status = "okay";
 };
index 7f6711a..c17d3ad 100644 (file)
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
index 6456a00..64fa27b 100644 (file)
                        clocks = <&clks IMX5_CLK_SATA_GATE>,
                                 <&clks IMX5_CLK_SATA_REF>,
                                 <&clks IMX5_CLK_AHB>;
-                       clock-names = "sata_gate", "sata_ref", "ahb";
+                       clock-names = "sata", "sata_ref", "ahb";
                        status = "disabled";
                };
 
                                               <&sdma 25 1 0>;
                                        dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
                                        status = "disabled";
                                };
 
                                };
                        };
 
+                       aipstz1: bridge@53f00000 {
+                               compatible = "fsl,imx53-aipstz";
+                               reg = <0x53f00000 0x60>;
+                       };
+
                        usbphy0: usbphy@0 {
                                compatible = "usb-nop-xceiv";
                                clocks = <&clks IMX5_CLK_USB_PHY1_GATE>;
                        reg = <0x60000000 0x10000000>;
                        ranges;
 
+                       aipstz2: bridge@63f00000 {
+                               compatible = "fsl,imx53-aipstz";
+                               reg = <0x63f00000 0x60>;
+                       };
+
                        iim: iim@63f98000 {
                                compatible = "fsl,imx53-iim", "fsl,imx27-iim";
                                reg = <0x63f98000 0x4000>;
                                       <&sdma 29 0 0>;
                                dma-names = "rx", "tx";
                                fsl,fifo-depth = <15>;
-                               fsl,ssi-dma-events = <29 28 27 26>; /* TX0 RX0 TX1 RX1 */
                                status = "disabled";
                        };
 
                                       <&sdma 47 0 0>;
                                dma-names = "rx", "tx";
                                fsl,fifo-depth = <15>;
-                               fsl,ssi-dma-events = <47 46 45 44>; /* TX0 RX0 TX1 RX1 */
                                status = "disabled";
                        };
 
diff --git a/arch/arm/boot/dts/imx6dl-aristainetos_4.dts b/arch/arm/boot/dts/imx6dl-aristainetos_4.dts
new file mode 100644 (file)
index 0000000..9cd06e5
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * support fot the imx6 based aristainetos board
+ *
+ * Copyright (C) 2014 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 "imx6dl.dtsi"
+#include "imx6qdl-aristainetos.dtsi"
+
+/ {
+       model = "aristainetos i.MX6 Dual Lite Board 4";
+       compatible = "fsl,imx6dl";
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 5000000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <7>;
+               enable-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight>;
+               status = "okay";
+       };
+
+       memory {
+               reg = <0x10000000 0x40000000>;
+       };
+
+       soc {
+               display0: display@di0 {
+                       compatible = "fsl,imx-parallel-display";
+                       interface-pix-fmt = "rgb24";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_ipu_disp>;
+                       status = "okay";
+
+                       display-timings {
+                               480x800p60 {
+                                       native-mode;
+                                       clock-frequency = <30000000>;
+                                       hactive = <480>;
+                                       vactive = <800>;
+                                       hfront-porch = <59>;
+                                       hback-porch = <10>;
+                                       hsync-len = <10>;
+                                       vback-porch = <15>;
+                                       vfront-porch = <15>;
+                                       vsync-len = <15>;
+                                       hsync-active = <1>;
+                                       vsync-active = <1>;
+                               };
+                       };
+
+                       port {
+                               display0_in: endpoint {
+                                       remote-endpoint = <&ipu1_di0_disp0>;
+                               };
+                       };
+               };
+       };
+};
+
+&ecspi2 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi2>;
+       status = "okay";
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
diff --git a/arch/arm/boot/dts/imx6dl-aristainetos_7.dts b/arch/arm/boot/dts/imx6dl-aristainetos_7.dts
new file mode 100644 (file)
index 0000000..b413e24
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * support fot the imx6 based aristainetos board
+ *
+ * Copyright (C) 2014 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 "imx6dl.dtsi"
+#include "imx6qdl-aristainetos.dtsi"
+
+/ {
+       model = "aristainetos i.MX6 Dual Lite Board 7";
+       compatible = "fsl,imx6dl";
+
+       memory {
+               reg = <0x10000000 0x40000000>;
+       };
+
+       soc {
+               display0: display@di0 {
+                       compatible = "fsl,imx-parallel-display";
+                       interface-pix-fmt = "rgb24";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_ipu_disp>;
+                       status = "okay";
+
+                       display-timings {
+                               800x480p60 {
+                                       native-mode;
+                                       clock-frequency = <33246000>;
+                                       hactive = <800>;
+                                       vactive = <480>;
+                                       hfront-porch = <88>;
+                                       hback-porch = <88>;
+                                       hsync-len = <80>;
+                                       vback-porch = <10>;
+                                       vfront-porch = <10>;
+                                       vsync-len = <25>;
+                                       vsync-active = <1>;
+                               };
+                       };
+
+                       port {
+                               display0_in: endpoint {
+                                       remote-endpoint = <&ipu1_di0_disp0>;
+                               };
+                       };
+               };
+       };
+
+       backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm3 0 3000>;
+               brightness-levels = <0 4 8 16 32 64 128 255>;
+               default-brightness-level = <6>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_backlight>;
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
index 4bd055f..b2bd022 100644 (file)
@@ -14,6 +14,6 @@
 #include "imx6qdl-gw51xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 DualLite GW51XX";
+       model = "Gateworks Ventana i.MX6 DualLite/Solo GW51XX";
        compatible = "gw,imx6dl-gw51xx", "gw,ventana", "fsl,imx6dl";
 };
index c913605..a2e0b73 100644 (file)
@@ -14,6 +14,6 @@
 #include "imx6qdl-gw52xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 DualLite GW52XX";
+       model = "Gateworks Ventana i.MX6 DualLite/Solo GW52XX";
        compatible = "gw,imx6dl-gw52xx", "gw,ventana", "fsl,imx6dl";
 };
index 61818a1..6844b70 100644 (file)
@@ -14,6 +14,6 @@
 #include "imx6qdl-gw53xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 DualLite GW53XX";
+       model = "Gateworks Ventana i.MX6 DualLite/Solo GW53XX";
        compatible = "gw,imx6dl-gw53xx", "gw,ventana", "fsl,imx6dl";
 };
index ab38b67..be91541 100644 (file)
@@ -14,6 +14,6 @@
 #include "imx6qdl-gw54xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 DualLite GW54XX";
+       model = "Gateworks Ventana i.MX6 DualLite/Solo GW54XX";
        compatible = "gw,imx6dl-gw54xx", "gw,ventana", "fsl,imx6dl";
 };
diff --git a/arch/arm/boot/dts/imx6dl-rex-basic.dts b/arch/arm/boot/dts/imx6dl-rex-basic.dts
new file mode 100644 (file)
index 0000000..b13845c
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2014 FEDEVEL, Inc.
+ *
+ * Author: Robert Nelson <robertcnelson@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-rex.dtsi"
+
+/ {
+       model = "Rex Basic i.MX6 Dual Lite Board";
+       compatible = "rex,imx6dl-rex-basic", "fsl,imx6dl";
+
+       memory {
+               reg = <0x10000000 0x20000000>;
+       };
+};
+
+&ecspi3 {
+       flash: m25p80@0 {
+               compatible = "sst,sst25vf016b";
+               spi-max-frequency = <20000000>;
+               reg = <0>;
+       };
+};
index 909fafc..43cb3fd 100644 (file)
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
        imx6-riotboard {
                pinctrl_audmux: audmuxgrp {
                        fsl,pins = <
-                               MX6QDL_PAD_CSI0_DAT7__AUD3_RXD          0x8000000
-                               MX6QDL_PAD_CSI0_DAT4__AUD3_TXC          0x8000000
-                               MX6QDL_PAD_CSI0_DAT5__AUD3_TXD          0x8000000
-                               MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS         0x8000000
+                               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
                                MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x130b0         /* CAM_MCLK */
                        >;
                };
                        fsl,pins = <
                                MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
                                MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
-                               MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x80000000
+                               MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b0b0
                                MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b0b0
                                MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b0b0
                                MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b0b0
                                MX6QDL_PAD_RGMII_RD2__RGMII_RD2         0x1b0b0         /* AR8035 pin strapping: MODE#1: pull up */
                                MX6QDL_PAD_RGMII_RD3__RGMII_RD3         0x1b0b0         /* AR8035 pin strapping: MODE#3: pull up */
                                MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL   0x130b0         /* AR8035 pin strapping: MODE#0: pull down */
-                               MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0xc0000000      /* GPIO16 -> AR8035 25MHz */
+                               MX6QDL_PAD_GPIO_16__ENET_REF_CLK        0x4001b0a8      /* GPIO16 -> AR8035 25MHz */
                                MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x130b0         /* RGMII_nRST */
-                               MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28       0x80000000      /* AR8035 interrupt */
+                               MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28       0x180b0         /* AR8035 interrupt */
                                MX6QDL_PAD_GPIO_6__ENET_IRQ             0x000b1
                        >;
                };
 
                pinctrl_led: ledgrp {
                        fsl,pins = <
-                               MX6QDL_PAD_EIM_A25__GPIO5_IO02          0x80000000      /* user led0 */
-                               MX6QDL_PAD_EIM_D28__GPIO3_IO28          0x80000000      /* user led1 */
+                               MX6QDL_PAD_EIM_A25__GPIO5_IO02          0x1b0b1 /* user led0 */
+                               MX6QDL_PAD_EIM_D28__GPIO3_IO28          0x1b0b1 /* user led1 */
                        >;
                };
 
                pinctrl_usbotg: usbotggrp {
                        fsl,pins = <
                                MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID       0x17059
-                               MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x80000000      /* MX6QDL_PAD_EIM_D22__USB_OTG_PWR */
-                               MX6QDL_PAD_EIM_D21__USB_OTG_OC          0x80000000
+                               MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x000b0 /* MX6QDL_PAD_EIM_D22__USB_OTG_PWR */
+                               MX6QDL_PAD_EIM_D21__USB_OTG_OC          0x1b0b0
                        >;
                };
 
                                MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17059
                                MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17059
                                MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x17059
-                               MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x80000000      /* SD2 CD */
-                               MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x80000000      /* SD2 WP */
+                               MX6QDL_PAD_GPIO_4__GPIO1_IO04           0x1b0b0 /* SD2 CD */
+                               MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1f0b0 /* SD2 WP */
                        >;
                };
 
                                MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
                                MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
                                MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
-                               MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0x80000000      /* SD3 CD */
-                               MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0x80000000      /* SD3 WP */
+                               MX6QDL_PAD_SD3_DAT5__GPIO7_IO00         0x1b0b0 /* SD3 CD */
+                               MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0x1f0b0 /* SD3 WP */
                        >;
                };
 
                                MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x17059
                                MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x17059
                                MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x17059
-                               MX6QDL_PAD_NANDF_ALE__GPIO6_IO08        0x80000000      /* SD4 RST (eMMC) */
+                               MX6QDL_PAD_NANDF_ALE__GPIO6_IO08        0x17059 /* SD4 RST (eMMC) */
                        >;
                };
        };
diff --git a/arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts b/arch/arm/boot/dts/imx6dl-tx6dl-comtft.dts
new file mode 100644 (file)
index 0000000..913bb9a
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6DL Module on CoMpact TFT";
+       compatible = "karo,imx6dl-tx6dl", "fsl,imx6dl";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 0>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       native-mode = <&ET070001DM6>;
+
+                       ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+        };
+};
+
+&can1 {
+       status = "disabled";
+};
+
+&can2 {
+       xceiver-supply = <&reg_3v3>;
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&kpp {
+       status = "disabled";
+};
+
+&reg_can_xcvr {
+       status = "disabled";
+};
+
+&touchscreen {
+       status = "disabled";
+};
diff --git a/arch/arm/boot/dts/imx6dl-tx6u-801x.dts b/arch/arm/boot/dts/imx6dl-tx6u-801x.dts
new file mode 100644 (file)
index 0000000..5fe465c
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6U-801x Module";
+       compatible = "karo,imx6dl-tx6dl", "fsl,imx6dl";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       VGA {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <48>;
+                               hsync-len = <96>;
+                               hfront-porch = <16>;
+                               vback-porch = <31>;
+                               vsync-len = <2>;
+                               vfront-porch = <12>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETV570 {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <114>;
+                               hsync-len = <30>;
+                               hfront-porch = <16>;
+                               vback-porch = <32>;
+                               vsync-len = <3>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0350 {
+                               clock-frequency = <6413760>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <34>;
+                               hsync-len = <34>;
+                               hfront-porch = <20>;
+                               vback-porch = <15>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0430 {
+                               clock-frequency = <9009000>;
+                               hactive = <480>;
+                               vactive = <272>;
+                               hback-porch = <2>;
+                               hsync-len = <41>;
+                               hfront-porch = <2>;
+                               vback-porch = <2>;
+                               vsync-len = <10>;
+                               vfront-porch = <2>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+
+                       ET0500 {
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0700 { /* same as ET0500 */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETQ570 {
+                               clock-frequency = <6596040>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <38>;
+                               hsync-len = <30>;
+                               hfront-porch = <30>;
+                               vback-porch = <16>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+               };
+        };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
diff --git a/arch/arm/boot/dts/imx6dl-tx6u-811x.dts b/arch/arm/boot/dts/imx6dl-tx6u-811x.dts
new file mode 100644 (file)
index 0000000..c275eec
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6U-811x Module";
+       compatible = "karo,imx6dl-tx6dl", "fsl,imx6dl";
+
+       aliases {
+               display = &lvds0;
+               lvds0 = &lvds0;
+               lvds1 = &lvds1;
+       };
+
+       backlight0: backlight0 {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 0>;
+               power-supply = <&reg_lcd0_pwr>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       backlight1: backlight1 {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 500000 0>;
+               power-supply = <&reg_lcd1_pwr>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+};
+
+&i2c3 {
+       polytouch2: eeti@04 {
+               compatible = "eeti,egalax_ts";
+               reg = <0x04>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_eeti>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <22 0>;
+               wakeup-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+               linux,wakeup;
+       };
+};
+
+&iomuxc {
+       imx6dl-tx6u-811x {
+               pinctrl_eeti: eetigrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b1 /* Interrupt */
+                       >;
+               };
+       };
+};
+
+&kpp {
+       status = "disabled"; /* pad conflict with backlight1 PWM */
+};
+
+&ldb {
+       status = "okay";
+
+       lvds0: lvds-channel@0 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "okay";
+
+               display-timings {
+                       native-mode = <&lvds_timing0>;
+                       lvds_timing0: hsd100pxn1 {
+                               clock-frequency = <65000000>;
+                               hactive = <1024>;
+                               vactive = <768>;
+                               hback-porch = <220>;
+                               hfront-porch = <40>;
+                               vback-porch = <21>;
+                               vfront-porch = <7>;
+                               hsync-len = <60>;
+                               vsync-len = <10>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+       };
+
+       lvds1: lvds-channel@1 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "disabled";
+
+               display-timings {
+                       native-mode = <&lvds_timing1>;
+                       lvds_timing1: hsd100pxn1 {
+                               clock-frequency = <65000000>;
+                               hactive = <1024>;
+                               vactive = <768>;
+                               hback-porch = <220>;
+                               hfront-porch = <40>;
+                               vback-porch = <21>;
+                               vfront-porch = <7>;
+                               hsync-len = <60>;
+                               vsync-len = <10>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+       };
+};
+
+&pwm1 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6dl-wandboard-revb1.dts b/arch/arm/boot/dts/imx6dl-wandboard-revb1.dts
new file mode 100644 (file)
index 0000000..f607d4f
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.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.
+ *
+ */
+/dts-v1/;
+#include "imx6dl.dtsi"
+#include "imx6qdl-wandboard-revb1.dtsi"
+
+/ {
+       model = "Wandboard i.MX6 Dual Lite Board";
+       compatible = "wand,imx6dl-wandboard", "fsl,imx6dl";
+
+       memory {
+               reg = <0x10000000 0x40000000>;
+       };
+};
index e672891..bbb6167 100644 (file)
@@ -10,7 +10,7 @@
  */
 /dts-v1/;
 #include "imx6dl.dtsi"
-#include "imx6qdl-wandboard.dtsi"
+#include "imx6qdl-wandboard-revc1.dtsi"
 
 / {
        model = "Wandboard i.MX6 Dual Lite Board";
index 0a9c49d..b453e0e 100644 (file)
                                396000  1175000
                        >;
                        clock-latency = <61036>; /* two CLK32 periods */
-                       clocks = <&clks 104>, <&clks 6>, <&clks 16>,
-                                <&clks 17>, <&clks 170>;
+                       clocks = <&clks IMX6QDL_CLK_ARM>,
+                                <&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
+                                <&clks IMX6QDL_CLK_STEP>,
+                                <&clks IMX6QDL_CLK_PLL1_SW>,
+                                <&clks IMX6QDL_CLK_PLL1_SYS>;
                        clock-names = "arm", "pll2_pfd2_396m", "step",
                                      "pll1_sw", "pll1_sys";
                        arm-supply = <&reg_arm>;
@@ -56,7 +59,7 @@
                ocram: sram@00900000 {
                        compatible = "mmio-sram";
                        reg = <0x00900000 0x20000>;
-                       clocks = <&clks 142>;
+                       clocks = <&clks IMX6QDL_CLK_OCRAM>;
                };
 
                aips1: aips-bus@02000000 {
@@ -87,7 +90,7 @@
                                compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
                                reg = <0x021f8000 0x4000>;
                                interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 116>;
+                               clocks = <&clks IMX6DL_CLK_I2C4>;
                                status = "disabled";
                        };
                };
 };
 
 &ldb {
-       clocks = <&clks 33>, <&clks 34>,
-                <&clks 39>, <&clks 40>,
-                <&clks 135>, <&clks 136>;
+       clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
+                <&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>,
+                <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>;
        clock-names = "di0_pll", "di1_pll",
                      "di0_sel", "di1_sel",
                      "di0", "di1";
index bc5f31e..9efd8b0 100644 (file)
@@ -13,4 +13,8 @@
 
 &sata {
        status = "okay";
+       fsl,transmit-level-mV = <1104>;
+       fsl,transmit-boost-mdB = <0>;
+       fsl,transmit-atten-16ths = <9>;
+       fsl,no-spread-spectrum;
 };
index e030263..8c1cb53 100644 (file)
        };
 };
 
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_can1>;
+       status = "okay";
+};
+
 &ecspi5 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi5>;
        status = "okay";
 };
 
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+};
+
 &i2c2 {
        clock-frequency = <100000>;
        pinctrl-names = "default";
        };
 };
 
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
 &iomuxc {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_hog>;
                        >;
                };
 
+               pinctrl_can1: can1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX        0x1b0b0
+                               MX6QDL_PAD_GPIO_7__FLEXCAN1_TX          0x1b0b0
+                       >;
+               };
+
                pinctrl_ecspi5: ecspi5rp-1 {
                        fsl,pins = <
                                MX6QDL_PAD_SD1_DAT0__ECSPI5_MISO        0x80000000
                        >;
                };
 
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
+                               MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       >;
+               };
+
                pinctrl_i2c2: i2c2grp {
                        fsl,pins = <
                                MX6QDL_PAD_EIM_EB2__I2C2_SCL            0x4001b8b1
                        >;
                };
 
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D17__I2C3_SCL            0x4001b8b1
+                               MX6QDL_PAD_GPIO_6__I2C3_SDA             0x4001b8b1
+                       >;
+               };
+
+               pinctrl_pcie: pciegrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL1__GPIO4_IO08         0x100b1
+                       >;
+               };
+
                pinctrl_pfuze: pfuze100grp1 {
                        fsl,pins = <
                                MX6QDL_PAD_EIM_D20__GPIO3_IO20          0x80000000
        };
 };
 
+&pcie {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pcie>;
+       reset-gpio = <&gpio4 8 0>;
+       status = "okay";
+};
+
 &sata {
        status = "okay";
 };
index 0e1406e..8e8bcd8 100644 (file)
@@ -14,6 +14,6 @@
 #include "imx6qdl-gw51xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 Quad GW51XX";
+       model = "Gateworks Ventana i.MX6 Dual/Quad GW51XX";
        compatible = "gw,imx6q-gw51xx", "gw,ventana", "fsl,imx6q";
 };
index 5f71ddb..a12c47e 100644 (file)
@@ -14,7 +14,7 @@
 #include "imx6qdl-gw52xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 Quad GW52XX";
+       model = "Gateworks Ventana i.MX6 Dual/Quad GW52XX";
        compatible = "gw,imx6q-gw52xx", "gw,ventana", "fsl,imx6q";
 };
 
index 360c316..d76aaa8 100644 (file)
@@ -14,7 +14,7 @@
 #include "imx6qdl-gw53xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 Quad GW53XX";
+       model = "Gateworks Ventana i.MX6 Dual/Quad GW53XX";
        compatible = "gw,imx6q-gw53xx", "gw,ventana", "fsl,imx6q";
 };
 
index 3689eaa..22e6f8e 100644 (file)
        };
 
        sound {
-               compatible = "fsl,imx6q-sabrelite-sgtl5000",
+               compatible = "fsl,imx6q-ventana-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
-               model = "imx6q-sabrelite-sgtl5000";
+               model = "sgtl5000-audio";
                ssi-controller = <&ssi1>;
                audio-codec = <&codec>;
                audio-routing =
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index ab518d6..6e8f53e 100644 (file)
@@ -14,7 +14,7 @@
 #include "imx6qdl-gw54xx.dtsi"
 
 / {
-       model = "Gateworks Ventana i.MX6 Quad GW54XX";
+       model = "Gateworks Ventana i.MX6 Dual/Quad GW54XX";
        compatible = "gw,imx6q-gw54xx", "gw,ventana", "fsl,imx6q";
 };
 
diff --git a/arch/arm/boot/dts/imx6q-rex-pro.dts b/arch/arm/boot/dts/imx6q-rex-pro.dts
new file mode 100644 (file)
index 0000000..3c2852b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2014 FEDEVEL, Inc.
+ *
+ * Author: Robert Nelson <robertcnelson@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-rex.dtsi"
+
+/ {
+       model = "Rex Pro i.MX6 Quad Board";
+       compatible = "rex,imx6q-rex-pro", "fsl,imx6q";
+
+       memory {
+               reg = <0x10000000 0x80000000>;
+       };
+};
+
+&ecspi3 {
+       flash: m25p80@0 {
+               compatible = "sst,sst25vf032b";
+               spi-max-frequency = <20000000>;
+               reg = <0>;
+       };
+};
+
+&sata {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts b/arch/arm/boot/dts/imx6q-tx6q-1010-comtft.dts
new file mode 100644 (file)
index 0000000..b18fae1
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6Q-1010 Module on CoMpact TFT";
+       compatible = "karo,imx6q-tx6q", "fsl,imx6q";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 0>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       native-mode = <&ET070001DM6>;
+
+                       ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+        };
+};
+
+&can1 {
+       status = "disabled";
+};
+
+&can2 {
+       xceiver-supply = <&reg_3v3>;
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&kpp {
+       status = "disabled";
+};
+
+&reg_can_xcvr {
+       status = "disabled";
+};
+
+&touchscreen {
+       status = "disabled";
+};
diff --git a/arch/arm/boot/dts/imx6q-tx6q-1010.dts b/arch/arm/boot/dts/imx6q-tx6q-1010.dts
new file mode 100644 (file)
index 0000000..b58ec9c
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6Q-1010 Module";
+       compatible = "karo,imx6q-tx6q", "fsl,imx6q";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       VGA {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <48>;
+                               hsync-len = <96>;
+                               hfront-porch = <16>;
+                               vback-porch = <31>;
+                               vsync-len = <2>;
+                               vfront-porch = <12>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETV570 {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <114>;
+                               hsync-len = <30>;
+                               hfront-porch = <16>;
+                               vback-porch = <32>;
+                               vsync-len = <3>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0350 {
+                               clock-frequency = <6413760>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <34>;
+                               hsync-len = <34>;
+                               hfront-porch = <20>;
+                               vback-porch = <15>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0430 {
+                               clock-frequency = <9009000>;
+                               hactive = <480>;
+                               vactive = <272>;
+                               hback-porch = <2>;
+                               hsync-len = <41>;
+                               hfront-porch = <2>;
+                               vback-porch = <2>;
+                               vsync-len = <10>;
+                               vfront-porch = <2>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+
+                       ET0500 {
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0700 { /* same as ET0500 */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETQ570 {
+                               clock-frequency = <6596040>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <38>;
+                               hsync-len = <30>;
+                               hfront-porch = <30>;
+                               vback-porch = <16>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+               };
+        };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
diff --git a/arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts b/arch/arm/boot/dts/imx6q-tx6q-1020-comtft.dts
new file mode 100644 (file)
index 0000000..0bb9a9d
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6Q-1020 Module on CoMpact TFT";
+       compatible = "karo,imx6q-tx6q", "fsl,imx6q";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 0>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       native-mode = <&ET070001DM6>;
+
+                       ET070001DM6: CoMTFT { /* same as ET0700 but with inverted pixel clock */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+        };
+};
+
+&can1 {
+       status = "disabled";
+};
+
+&can2 {
+       xceiver-supply = <&reg_3v3>;
+};
+
+&ds1339 {
+       status = "disabled";
+};
+
+&gpmi {
+       status = "disabled";
+};
+
+&iomuxc {
+       imx6qdl-tx6 {
+               pinctrl_usdhc4: usdhc4grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_CMD__SD4_CMD             0x070b1
+                               MX6QDL_PAD_SD4_CLK__SD4_CLK             0x070b1
+                               MX6QDL_PAD_SD4_DAT0__SD4_DATA0          0x070b1
+                               MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x070b1
+                               MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x070b1
+                               MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x070b1
+                               MX6QDL_PAD_NANDF_ALE__SD4_RESET         0x0b0b1
+                       >;
+               };
+       };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&kpp {
+       status = "disabled";
+};
+
+&reg_can_xcvr {
+       status = "disabled";
+};
+
+&touchscreen {
+       status = "disabled";
+};
+
+&usdhc4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc4>;
+       bus-width = <4>;
+       no-1-8-v;
+       fsl,wp-controller;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6q-tx6q-1020.dts b/arch/arm/boot/dts/imx6q-tx6q-1020.dts
new file mode 100644 (file)
index 0000000..b96d80a
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6Q-1020 Module";
+       compatible = "karo,imx6q-tx6q", "fsl,imx6q";
+
+       aliases {
+               display = &display;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 PWM_POLARITY_INVERTED>;
+               power-supply = <&reg_3v3>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       display: display@di0 {
+               compatible = "fsl,imx-parallel-display";
+               interface-pix-fmt = "rgb24";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_disp0_1>;
+               status = "okay";
+
+               port {
+                       display0_in: endpoint {
+                               remote-endpoint = <&ipu1_di0_disp0>;
+                       };
+               };
+
+               display-timings {
+                       VGA {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <48>;
+                               hsync-len = <96>;
+                               hfront-porch = <16>;
+                               vback-porch = <31>;
+                               vsync-len = <2>;
+                               vfront-porch = <12>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETV570 {
+                               clock-frequency = <25200000>;
+                               hactive = <640>;
+                               vactive = <480>;
+                               hback-porch = <114>;
+                               hsync-len = <30>;
+                               hfront-porch = <16>;
+                               vback-porch = <32>;
+                               vsync-len = <3>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0350 {
+                               clock-frequency = <6413760>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <34>;
+                               hsync-len = <34>;
+                               hfront-porch = <20>;
+                               vback-porch = <15>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0430 {
+                               clock-frequency = <9009000>;
+                               hactive = <480>;
+                               vactive = <272>;
+                               hback-porch = <2>;
+                               hsync-len = <41>;
+                               hfront-porch = <2>;
+                               vback-porch = <2>;
+                               vsync-len = <10>;
+                               vfront-porch = <2>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+
+                       ET0500 {
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ET0700 { /* same as ET0500 */
+                               clock-frequency = <33264000>;
+                               hactive = <800>;
+                               vactive = <480>;
+                               hback-porch = <88>;
+                               hsync-len = <128>;
+                               hfront-porch = <40>;
+                               vback-porch = <33>;
+                               vsync-len = <2>;
+                               vfront-porch = <10>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+
+                       ETQ570 {
+                               clock-frequency = <6596040>;
+                               hactive = <320>;
+                               vactive = <240>;
+                               hback-porch = <38>;
+                               hsync-len = <30>;
+                               hfront-porch = <30>;
+                               vback-porch = <16>;
+                               vsync-len = <3>;
+                               vfront-porch = <4>;
+                               hsync-active = <0>;
+                               vsync-active = <0>;
+                               de-active = <1>;
+                               pixelclk-active = <0>;
+                       };
+               };
+        };
+};
+
+&ds1339 {
+       status = "disabled";
+};
+
+&gpmi {
+       status = "disabled";
+};
+
+&iomuxc {
+       imx6qdl-tx6 {
+               pinctrl_usdhc4: usdhc4grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_CMD__SD4_CMD             0x070b1
+                               MX6QDL_PAD_SD4_CLK__SD4_CLK             0x070b1
+                               MX6QDL_PAD_SD4_DAT0__SD4_DATA0          0x070b1
+                               MX6QDL_PAD_SD4_DAT1__SD4_DATA1          0x070b1
+                               MX6QDL_PAD_SD4_DAT2__SD4_DATA2          0x070b1
+                               MX6QDL_PAD_SD4_DAT3__SD4_DATA3          0x070b1
+                               MX6QDL_PAD_NANDF_ALE__SD4_RESET         0x0b0b1
+                       >;
+               };
+       };
+};
+
+&ipu1_di0_disp0 {
+       remote-endpoint = <&display0_in>;
+};
+
+&usdhc4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc4>;
+       bus-width = <4>;
+       no-1-8-v;
+       fsl,wp-controller;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6q-tx6q-1110.dts b/arch/arm/boot/dts/imx6q-tx6q-1110.dts
new file mode 100644 (file)
index 0000000..88aa1e4
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-tx6.dtsi"
+
+/ {
+       model = "Ka-Ro electronics TX6Q-1110 Module";
+       compatible = "karo,imx6q-tx6q", "fsl,imx6q";
+
+       aliases {
+               display = &lvds0;
+               lvds0 = &lvds0;
+               lvds1 = &lvds1;
+       };
+
+       backlight0: backlight0 {
+               compatible = "pwm-backlight";
+               pwms = <&pwm2 0 500000 0>;
+               power-supply = <&reg_lcd0_pwr>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+
+       backlight1: backlight1 {
+               compatible = "pwm-backlight";
+               pwms = <&pwm1 0 500000 0>;
+               power-supply = <&reg_lcd1_pwr>;
+               /*
+                * a poor man's way to create a 1:1 relationship between
+                * the PWM value and the actual duty cycle
+                */
+               brightness-levels = < 0  1  2  3  4  5  6  7  8  9
+                                    10 11 12 13 14 15 16 17 18 19
+                                    20 21 22 23 24 25 26 27 28 29
+                                    30 31 32 33 34 35 36 37 38 39
+                                    40 41 42 43 44 45 46 47 48 49
+                                    50 51 52 53 54 55 56 57 58 59
+                                    60 61 62 63 64 65 66 67 68 69
+                                    70 71 72 73 74 75 76 77 78 79
+                                    80 81 82 83 84 85 86 87 88 89
+                                    90 91 92 93 94 95 96 97 98 99
+                                   100>;
+               default-brightness-level = <50>;
+       };
+};
+
+&i2c3 {
+       polytouch1: eeti@04 {
+               compatible = "eeti,egalax_ts";
+               reg = <0x04>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_eeti>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <22 0>;
+               wakeup-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+               linux,wakeup;
+       };
+};
+
+&iomuxc {
+       imx6q-tx6q-1110 {
+               pinctrl_eeti: eetigrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x1b0b1 /* Interrupt */
+                       >;
+               };
+       };
+};
+
+&kpp {
+       status = "disabled"; /* pad conflict with backlight1 PWM */
+};
+
+&ldb {
+       status = "okay";
+
+       lvds0: lvds-channel@0 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "okay";
+
+               display-timings {
+                       native-mode = <&lvds_timing0>;
+                       lvds_timing0: hsd100pxn1 {
+                               clock-frequency = <65000000>;
+                               hactive = <1024>;
+                               vactive = <768>;
+                               hback-porch = <220>;
+                               hfront-porch = <40>;
+                               vback-porch = <21>;
+                               vfront-porch = <7>;
+                               hsync-len = <60>;
+                               vsync-len = <10>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+       };
+
+       lvds1: lvds-channel@1 {
+               fsl,data-mapping = "spwg";
+               fsl,data-width = <18>;
+               status = "disabled";
+
+               display-timings {
+                       native-mode = <&lvds_timing1>;
+                       lvds_timing1: hsd100pxn1 {
+                               clock-frequency = <65000000>;
+                               hactive = <1024>;
+                               vactive = <768>;
+                               hback-porch = <220>;
+                               hfront-porch = <40>;
+                               vback-porch = <21>;
+                               vfront-porch = <7>;
+                               hsync-len = <60>;
+                               vsync-len = <10>;
+                               de-active = <1>;
+                               pixelclk-active = <1>;
+                       };
+               };
+       };
+};
+
+&pwm1 {
+       status = "okay";
+};
+
+&sata {
+       status = "okay";
+};
index 6c56106..e3bff2a 100644 (file)
        memory {
                reg = <0x10000000 0x40000000>;
        };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_usb_h1_vbus: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "usb_h1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       startup-delay-us = <2>; /* USB2415 requires a POR of 1 us minimum */
+                       gpio = <&gpio7 12 0>;
+               };
+       };
 };
 
 &fec {
                        >;
                };
 
+               pinctrl_usbh: usbhgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_17__GPIO7_IO12 0x80000000
+                               MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x130b0
+                       >;
+               };
+
                pinctrl_usdhc3: usdhc3grp {
                        fsl,pins = <
                                MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
        status = "okay";
 };
 
+&usbh1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh>;
+       vbus-supply = <&reg_usb_h1_vbus>;
+       clocks = <&clks 201>;
+       status = "okay";
+};
+
 &usdhc3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc3>;
diff --git a/arch/arm/boot/dts/imx6q-wandboard-revb1.dts b/arch/arm/boot/dts/imx6q-wandboard-revb1.dts
new file mode 100644 (file)
index 0000000..20bf3c2
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.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.
+ *
+ */
+/dts-v1/;
+#include "imx6q.dtsi"
+#include "imx6qdl-wandboard-revb1.dtsi"
+
+/ {
+       model = "Wandboard i.MX6 Quad Board";
+       compatible = "wand,imx6q-wandboard", "fsl,imx6q";
+
+       memory {
+               reg = <0x10000000 0x80000000>;
+       };
+};
+
+&sata {
+       status = "okay";
+};
index 36be17f..4a8a6ee 100644 (file)
@@ -10,7 +10,7 @@
  */
 /dts-v1/;
 #include "imx6q.dtsi"
-#include "imx6qdl-wandboard.dtsi"
+#include "imx6qdl-wandboard-revc1.dtsi"
 
 / {
        model = "Wandboard i.MX6 Quad Board";
index addd3f8..e9f3646 100644 (file)
                                396000  1175000
                        >;
                        clock-latency = <61036>; /* two CLK32 periods */
-                       clocks = <&clks 104>, <&clks 6>, <&clks 16>,
-                                <&clks 17>, <&clks 170>;
+                       clocks = <&clks IMX6QDL_CLK_ARM>,
+                                <&clks IMX6QDL_CLK_PLL2_PFD2_396M>,
+                                <&clks IMX6QDL_CLK_STEP>,
+                                <&clks IMX6QDL_CLK_PLL1_SW>,
+                                <&clks IMX6QDL_CLK_PLL1_SYS>;
                        clock-names = "arm", "pll2_pfd2_396m", "step",
                                      "pll1_sw", "pll1_sys";
                        arm-supply = <&reg_arm>;
@@ -78,7 +81,7 @@
                ocram: sram@00900000 {
                        compatible = "mmio-sram";
                        reg = <0x00900000 0x40000>;
-                       clocks = <&clks 142>;
+                       clocks = <&clks IMX6QDL_CLK_OCRAM>;
                };
 
                aips-bus@02000000 { /* AIPS1 */
@@ -89,7 +92,8 @@
                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
                                        reg = <0x02018000 0x4000>;
                                        interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 116>, <&clks 116>;
+                                       clocks = <&clks IMX6Q_CLK_ECSPI5>,
+                                                <&clks IMX6Q_CLK_ECSPI5>;
                                        clock-names = "ipg", "per";
                                        status = "disabled";
                                };
                        compatible = "fsl,imx6q-ahci";
                        reg = <0x02200000 0x4000>;
                        interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks =  <&clks 154>, <&clks 187>, <&clks 105>;
+                       clocks = <&clks IMX6QDL_CLK_SATA>,
+                                <&clks IMX6QDL_CLK_SATA_REF_100M>,
+                                <&clks IMX6QDL_CLK_AHB>;
                        clock-names = "sata", "sata_ref", "ahb";
                        status = "disabled";
                };
                        reg = <0x02800000 0x400000>;
                        interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>,
                                     <0 7 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clks 133>, <&clks 134>, <&clks 137>;
+                       clocks = <&clks IMX6QDL_CLK_IPU2>,
+                                <&clks IMX6QDL_CLK_IPU2_DI0>,
+                                <&clks IMX6QDL_CLK_IPU2_DI1>;
                        clock-names = "bus", "di0", "di1";
                        resets = <&src 4>;
 
+                       ipu2_csi0: port@0 {
+                               reg = <0>;
+                       };
+
+                       ipu2_csi1: port@1 {
+                               reg = <1>;
+                       };
+
                        ipu2_di0: port@2 {
                                #address-cells = <1>;
                                #size-cells = <0>;
 };
 
 &ldb {
-       clocks = <&clks 33>, <&clks 34>,
-                <&clks 39>, <&clks 40>, <&clks 41>, <&clks 42>,
-                <&clks 135>, <&clks 136>;
+       clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
+                <&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>,
+                <&clks IMX6QDL_CLK_IPU2_DI0_SEL>, <&clks IMX6QDL_CLK_IPU2_DI1_SEL>,
+                <&clks IMX6QDL_CLK_LDB_DI0>, <&clks IMX6QDL_CLK_LDB_DI1>;
        clock-names = "di0_pll", "di1_pll",
                      "di0_sel", "di1_sel", "di2_sel", "di3_sel",
                      "di0", "di1";
diff --git a/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi b/arch/arm/boot/dts/imx6qdl-aristainetos.dtsi
new file mode 100644 (file)
index 0000000..e6d9195
--- /dev/null
@@ -0,0 +1,418 @@
+/*
+ * support fot the imx6 based aristainetos board
+ *
+ * Copyright (C) 2014 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.
+ *
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_2p5v: regulator@0 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "2P5V";
+                       regulator-min-microvolt = <2500000>;
+                       regulator-max-microvolt = <2500000>;
+                       regulator-always-on;
+               };
+
+               reg_3p3v: regulator@1 {
+                       compatible = "regulator-fixed";
+                       regulator-name = "3P3V";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               reg_usbh1_vbus: regulator@2 {
+                       compatible = "regulator-fixed";
+                       enable-active-high;
+                       gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_aristainetos_usbh1_vbus>;
+                       regulator-name = "usb_h1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+               };
+
+               reg_usbotg_vbus: regulator@3 {
+                       compatible = "regulator-fixed";
+                       enable-active-high;
+                       gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_aristainetos_usbotg_vbus>;
+                       regulator-name = "usb_otg_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+               };
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux>;
+       status = "okay";
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       status = "okay";
+};
+
+&can2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       tmp103: tmp103@71 {
+               compatible = "ti,tmp103";
+               reg = <0x71>;
+       };
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+
+       rtc@68 {
+               compatible = "dallas,m41t00";
+               reg = <0x68>;
+       };
+};
+
+&ecspi4 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio3 20 0>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi4>;
+       status = "okay";
+
+       flash: m25p80@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "micron,n25q128a11";
+               spi-max-frequency = <20000000>;
+               reg = <0>;
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rmii";
+       phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&gpmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_gpmi_nand>;
+       status = "okay";
+};
+
+&pcie {
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+
+&uart4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart4>;
+       fsl,uart-has-rtscts;
+       status = "okay";
+};
+
+&uart5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart5>;
+       fsl,uart-has-rtscts;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usbh1_vbus>;
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usbotg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       disable-over-current;
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       vmmc-supply = <&reg_3p3v>;
+       cd-gpios = <&gpio4 7 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       vmmc-supply = <&reg_3p3v>;
+       cd-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog &pinctrl_gpio>;
+
+       imx6qdl-aristainetos {
+               pinctrl_aristainetos_usbh1_vbus: aristainetos-usbh1-vbus {
+                       fsl,pins = <MX6QDL_PAD_EIM_D31__GPIO3_IO31 0x130b0>;
+               };
+
+               pinctrl_aristainetos_usbotg_vbus: aristainetos-usbotg-vbus {
+                       fsl,pins = <MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x130b0>;
+               };
+
+               pinctrl_audmux: audmuxgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT7__AUD3_RXD  0x1b0b0
+                               MX6QDL_PAD_CSI0_DAT4__AUD3_TXC  0x1b0b0
+                               MX6QDL_PAD_CSI0_DAT5__AUD3_TXD  0x1b0b0
+                               MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x1b0b0
+                       >;
+               };
+
+               pinctrl_backlight: backlightgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_9__PWM1_OUT     0x1b0b0
+                               MX6QDL_PAD_SD4_DAT1__PWM3_OUT   0x1b0b0
+                               MX6QDL_PAD_GPIO_2__GPIO1_IO02   0x1b0b0
+                       >;
+               };
+
+               pinctrl_ecspi2: ecspi2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1
+                               MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1
+                               MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1
+                               MX6QDL_PAD_EIM_D24__GPIO3_IO24  0x100b1
+                       >;
+               };
+
+               pinctrl_ecspi4: ecspi4grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D21__ECSPI4_SCLK 0x100b1
+                               MX6QDL_PAD_EIM_D22__ECSPI4_MISO 0x100b1
+                               MX6QDL_PAD_EIM_D28__ECSPI4_MOSI 0x100b1
+                               MX6QDL_PAD_EIM_D20__GPIO3_IO20  0x100b1
+                               MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x1b0b0 /* WP pin */
+                       >;
+               };
+
+               pinctrl_enet: enetgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
+                               MX6QDL_PAD_ENET_MDIO__ENET_MDIO  0x1b0b0
+                               MX6QDL_PAD_ENET_MDC__ENET_MDC    0x1b0b0
+                               MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0
+                               MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0
+                               MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN   0x1b0b0
+                               MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER   0x1b0b0
+                               MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0
+                               MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0
+                               MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN  0x1b0b0
+                       >;
+               };
+
+               pinctrl_flexcan1: flexcan1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX        0x1b0b0
+                               MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX        0x1b0b0
+                       >;
+               };
+
+               pinctrl_flexcan2: flexcan2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_DAT0__FLEXCAN2_TX        0x1b0b0
+                               MX6QDL_PAD_SD3_DAT1__FLEXCAN2_RX        0x1b0b0
+                               >;
+               };
+
+               pinctrl_gpio: gpiogrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT2__GPIO2_IO10 0x1b0b0
+                               MX6QDL_PAD_SD4_DAT3__GPIO2_IO11 0x1b0b0
+                               MX6QDL_PAD_SD4_DAT4__GPIO2_IO12 0x1b0b0
+                               MX6QDL_PAD_SD4_DAT5__GPIO2_IO13 0x1b0b0
+                               MX6QDL_PAD_GPIO_3__GPIO1_IO03   0x1b0b0
+                               MX6QDL_PAD_GPIO_4__GPIO1_IO04   0x1b0b0
+                               MX6QDL_PAD_GPIO_5__GPIO1_IO05   0x1b0b0
+                               MX6QDL_PAD_GPIO_6__GPIO1_IO06   0x1b0b0
+                               MX6QDL_PAD_GPIO_7__GPIO1_IO07   0x1b0b0
+                               MX6QDL_PAD_GPIO_8__GPIO1_IO08   0x1b0b0
+                               MX6QDL_PAD_KEY_COL0__GPIO4_IO06 0x1b0b0
+                       >;
+               };
+
+               pinctrl_gpmi_nand: gpminandgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_NANDF_CLE__NAND_CLE     0xb0b1
+                               MX6QDL_PAD_NANDF_ALE__NAND_ALE     0xb0b1
+                               MX6QDL_PAD_NANDF_WP_B__NAND_WP_B   0xb0b1
+                               MX6QDL_PAD_NANDF_RB0__NAND_READY_B 0xb000
+                               MX6QDL_PAD_NANDF_CS0__NAND_CE0_B   0xb0b1
+                               MX6QDL_PAD_NANDF_CS1__NAND_CE1_B   0xb0b1
+                               MX6QDL_PAD_SD4_CMD__NAND_RE_B      0xb0b1
+                               MX6QDL_PAD_SD4_CLK__NAND_WE_B      0xb0b1
+                               MX6QDL_PAD_NANDF_D0__NAND_DATA00   0xb0b1
+                               MX6QDL_PAD_NANDF_D1__NAND_DATA01   0xb0b1
+                               MX6QDL_PAD_NANDF_D2__NAND_DATA02   0xb0b1
+                               MX6QDL_PAD_NANDF_D3__NAND_DATA03   0xb0b1
+                               MX6QDL_PAD_NANDF_D4__NAND_DATA04   0xb0b1
+                               MX6QDL_PAD_NANDF_D5__NAND_DATA05   0xb0b1
+                               MX6QDL_PAD_NANDF_D6__NAND_DATA06   0xb0b1
+                               MX6QDL_PAD_NANDF_D7__NAND_DATA07   0xb0b1
+                               MX6QDL_PAD_SD4_DAT0__NAND_DQS      0x00b1
+                       >;
+               };
+
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D29__GPIO3_IO29   0x10
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT8__I2C1_SDA 0x4001b8b1
+                               MX6QDL_PAD_CSI0_DAT9__I2C1_SCL 0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
+                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D17__I2C3_SCL 0x4001b8b1
+                               MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
+                       >;
+               };
+
+               pinctrl_ipu_disp: ipudisp1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK      0x10
+                               MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15            0x10
+                               MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02             0x10
+                               MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03             0x10
+                               MX6QDL_PAD_DI0_PIN4__GPIO4_IO20                 0x20000
+                               MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00        0x10
+                               MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01        0x10
+                               MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02        0x10
+                               MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03        0x10
+                               MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04        0x10
+                               MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05        0x10
+                               MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06        0x10
+                               MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07        0x10
+                               MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08        0x10
+                               MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09        0x10
+                               MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10       0x10
+                               MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11       0x10
+                               MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12       0x10
+                               MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13       0x10
+                               MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14       0x10
+                               MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15       0x10
+                               MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16       0x10
+                               MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17       0x10
+                               MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18       0x10
+                               MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19       0x10
+                               MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20       0x10
+                               MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21       0x10
+                               MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22       0x10
+                               MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23       0x10
+                               >;
+               };
+
+               pinctrl_uart2: uart2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
+                               MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart4: uart4grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
+                               MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
+                               MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
+                               MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart5: uart5grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT14__UART5_TX_DATA 0x1b0b1
+                               MX6QDL_PAD_CSI0_DAT15__UART5_RX_DATA 0x1b0b1
+                       >;
+               };
+
+               pinctrl_usbotg: usbotggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_1__USB_OTG_ID 0x17059
+                       >;
+               };
+
+               pinctrl_usdhc1: usdhc1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_CMD__SD1_CMD    0x17059
+                               MX6QDL_PAD_SD1_CLK__SD1_CLK    0x10059
+                               MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
+                               MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
+                               MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
+                               MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
+                               MX6QDL_PAD_KEY_ROW0__GPIO4_IO07 0x1b0b0
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD2_CMD__SD2_CMD    0x17059
+                               MX6QDL_PAD_SD2_CLK__SD2_CLK    0x10059
+                               MX6QDL_PAD_SD2_DAT0__SD2_DATA0 0x17059
+                               MX6QDL_PAD_SD2_DAT1__SD2_DATA1 0x17059
+                               MX6QDL_PAD_SD2_DAT2__SD2_DATA2 0x17059
+                               MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x17059
+                               MX6QDL_PAD_KEY_COL1__GPIO4_IO08 0x1b0b0
+                       >;
+               };
+       };
+};
index 744c8a2..234e7b7 100644 (file)
        };
 
        sound {
-               compatible = "fsl,imx6q-sabrelite-sgtl5000",
+               compatible = "fsl,imx6q-ventana-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
-               model = "imx6q-sabrelite-sgtl5000";
+               model = "sgtl5000-audio";
                ssi-controller = <&ssi1>;
                audio-codec = <&codec>;
                audio-routing =
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index adf150c..143f84f 100644 (file)
        };
 
        sound {
-               compatible = "fsl,imx6q-sabrelite-sgtl5000",
+               compatible = "fsl,imx6q-ventana-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
-               model = "imx6q-sabrelite-sgtl5000";
+               model = "sgtl5000-audio";
                ssi-controller = <&ssi1>;
                audio-codec = <&codec>;
                audio-routing =
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 698d306..16e7ad3 100644 (file)
        };
 
        sound {
-               compatible = "fsl,imx6q-sabrelite-sgtl5000",
+               compatible = "fsl,imx6q-ventana-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
-               model = "imx6q-sabrelite-sgtl5000";
+               model = "sgtl5000-audio";
                ssi-controller = <&ssi1>;
                audio-codec = <&codec>;
                audio-routing =
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 4c4b175..42ff525 100644 (file)
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index faa3494..2694aa8 100644 (file)
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii";
        phy-reset-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
+       phy-supply = <&vdd_eth_io_reg>;
        status = "disabled";
 };
 
diff --git a/arch/arm/boot/dts/imx6qdl-rex.dtsi b/arch/arm/boot/dts/imx6qdl-rex.dtsi
new file mode 100644 (file)
index 0000000..df7bcf8
--- /dev/null
@@ -0,0 +1,357 @@
+/*
+ * Copyright 2014 FEDEVEL, Inc.
+ *
+ * Author: Robert Nelson <robertcnelson@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_3p3v: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "3P3V";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               reg_usbh1_vbus: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usbh1>;
+                       regulator-name = "usbh1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_usb_otg_vbus: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usbotg>;
+                       regulator-name = "usb_otg_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_led>;
+
+               led0: usr {
+                       label = "usr";
+                       gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       sound {
+               compatible = "fsl,imx6-rex-sgtl5000",
+                            "fsl,imx-audio-sgtl5000";
+               model = "imx6-rex-sgtl5000";
+               ssi-controller = <&ssi1>;
+               audio-codec = <&codec>;
+               audio-routing =
+                       "MIC_IN", "Mic Jack",
+                       "Mic Jack", "Mic Bias",
+                       "Headphone Jack", "HP_OUT";
+               mux-int-port = <1>;
+               mux-ext-port = <3>;
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux>;
+       status = "okay";
+};
+
+&ecspi2 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi2>;
+       status = "okay";
+};
+
+&ecspi3 {
+       fsl,spi-num-chipselects = <1>;
+       cs-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi3>;
+       status = "okay";
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rgmii";
+       phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&hdmi {
+       ddc-i2c-bus = <&i2c2>;
+       status = "okay";
+};
+
+&i2c1 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       status = "okay";
+
+       codec: sgtl5000@0a {
+               compatible = "fsl,sgtl5000";
+               reg = <0x0a>;
+               clocks = <&clks 201>;
+               VDDA-supply = <&reg_3p3v>;
+               VDDIO-supply = <&reg_3p3v>;
+       };
+};
+
+&i2c2 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c2>;
+       status = "okay";
+
+       eeprom@57 {
+               compatible = "at,24c02";
+               reg = <0x57>;
+       };
+};
+
+&i2c3 {
+       clock-frequency = <100000>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx6qdl-rex {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               /* SGTL5000 sys_mclk */
+                               MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x030b0
+                       >;
+               };
+
+               pinctrl_audmux: audmuxgrp {
+                       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_ecspi2: ecspi2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_DISP0_DAT2__ECSPI3_MISO      0x100b1
+                               MX6QDL_PAD_DISP0_DAT1__ECSPI3_MOSI      0x100b1
+                               MX6QDL_PAD_DISP0_DAT0__ECSPI3_SCLK      0x100b1
+                               /* CS */
+                               MX6QDL_PAD_DISP0_DAT5__GPIO4_IO26       0x000b1
+                       >;
+               };
+
+               pinctrl_ecspi3: ecspi3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO     0x100b1
+                               MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI     0x100b1
+                               MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK     0x100b1
+                               /* CS */
+                               MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12      0x000b1
+                       >;
+               };
+
+               pinctrl_enet: enetgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                               MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                               MX6QDL_PAD_RGMII_TXC__RGMII_TXC         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD0__RGMII_TD0         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD1__RGMII_TD1         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD2__RGMII_TD2         0x1b0b0
+                               MX6QDL_PAD_RGMII_TD3__RGMII_TD3         0x1b0b0
+                               MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL   0x1b0b0
+                               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
+                               /* Phy reset */
+                               MX6QDL_PAD_ENET_CRS_DV__GPIO1_IO25      0x000b0
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT8__I2C1_SDA          0x4001b8b1
+                               MX6QDL_PAD_CSI0_DAT9__I2C1_SCL          0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c2: i2c2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL3__I2C2_SCL           0x4001b8b1
+                               MX6QDL_PAD_KEY_ROW3__I2C2_SDA           0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D17__I2C3_SCL            0x4001b8b1
+                               MX6QDL_PAD_EIM_D18__I2C3_SDA            0x4001b8b1
+                       >;
+               };
+
+               pinctrl_led: ledgrp {
+                       fsl,pins = <
+                               /* user led */
+                               MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x80000000
+                       >;
+               };
+
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA    0x1b0b1
+                               MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA    0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart2: uart2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
+                               MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
+                       >;
+               };
+
+               pinctrl_usbh1: usbh1grp {
+                       fsl,pins = <
+                               /* power enable, high active */
+                               MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x10b0
+                       >;
+               };
+
+               pinctrl_usbotg: usbotggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_1__USB_OTG_ID           0x17059
+                               MX6QDL_PAD_EIM_D21__USB_OTG_OC          0x1b0b0
+                               /* power enable, high active */
+                               MX6QDL_PAD_EIM_D22__GPIO3_IO22          0x10b0
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD2_CMD__SD2_CMD             0x17059
+                               MX6QDL_PAD_SD2_CLK__SD2_CLK             0x10059
+                               MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x17059
+                               MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17059
+                               MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17059
+                               MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x17059
+                               /* CD */
+                               MX6QDL_PAD_NANDF_D2__GPIO2_IO02         0x1b0b0
+                               /* WP */
+                               MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1f0b0
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_CMD__SD3_CMD             0x17059
+                               MX6QDL_PAD_SD3_CLK__SD3_CLK             0x10059
+                               MX6QDL_PAD_SD3_DAT0__SD3_DATA0          0x17059
+                               MX6QDL_PAD_SD3_DAT1__SD3_DATA1          0x17059
+                               MX6QDL_PAD_SD3_DAT2__SD3_DATA2          0x17059
+                               MX6QDL_PAD_SD3_DAT3__SD3_DATA3          0x17059
+                               /* CD */
+                               MX6QDL_PAD_NANDF_D0__GPIO2_IO00         0x1b0b0
+                               /* WP */
+                               MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1f0b0
+                       >;
+               };
+       };
+};
+
+&ssi1 {
+       fsl,mode = "i2s-slave";
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2>;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usbh1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbh1>;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usb_otg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       bus-width = <4>;
+       cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       bus-width = <4>;
+       cd-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+       status = "okay";
+};
index 6df6127..0a36129 100644 (file)
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 40ea365..ec43dde 100644 (file)
                                MX6QDL_PAD_KEY_COL1__ECSPI1_MISO        0x100b1
                                MX6QDL_PAD_KEY_ROW0__ECSPI1_MOSI        0x100b1
                                MX6QDL_PAD_KEY_COL0__ECSPI1_SCLK        0x100b1
+                               MX6QDL_PAD_KEY_ROW1__GPIO4_IO09         0x1b0b0
                        >;
                };
 
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
diff --git a/arch/arm/boot/dts/imx6qdl-tx6.dtsi b/arch/arm/boot/dts/imx6qdl-tx6.dtsi
new file mode 100644 (file)
index 0000000..f02b80b
--- /dev/null
@@ -0,0 +1,696 @@
+/*
+ * Copyright 2014 Lothar Waßmann <LW@KARO-electronics.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 at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pwm/pwm.h>
+
+/ {
+       aliases {
+               can0 = &can2;
+               can1 = &can1;
+               ethernet0 = &fec;
+               lcdif_23bit_pins_a = &pinctrl_disp0_1;
+               lcdif_24bit_pins_a = &pinctrl_disp0_2;
+               pwm0 = &pwm1;
+               pwm1 = &pwm2;
+               reg_can_xcvr = &reg_can_xcvr;
+               stk5led = &user_led;
+               usbotg = &usbotg;
+               sdhc0 = &usdhc1;
+               sdhc1 = &usdhc2;
+       };
+
+       memory {
+               reg = <0 0>; /* will be filled by U-Boot */
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               mclk: clock@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       #clock-cells = <0>;
+                       clock-frequency = <27000000>;
+               };
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "Power Button";
+                       gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_POWER>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               user_led: user {
+                       label = "Heartbeat";
+                       gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reg_3v3_etn: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       regulator-name = "3V3_ETN";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_etnphy_power>;
+                       gpio = <&gpio3 20 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_2v5: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "2V5";
+                       regulator-min-microvolt = <2500000>;
+                       regulator-max-microvolt = <2500000>;
+                       regulator-always-on;
+               };
+
+               reg_3v3: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "3V3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               reg_can_xcvr: regulator@3 {
+                       compatible = "regulator-fixed";
+                       reg = <3>;
+                       regulator-name = "CAN XCVR";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_flexcan_xcvr>;
+                       gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
+                       enable-active-low;
+               };
+
+               reg_lcd0_pwr: regulator@4 {
+                       compatible = "regulator-fixed";
+                       reg = <4>;
+                       regulator-name = "LCD0 POWER";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_lcd0_pwr>;
+                       gpio = <&gpio3 29 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               reg_lcd1_pwr: regulator@5 {
+                       compatible = "regulator-fixed";
+                       reg = <5>;
+                       regulator-name = "LCD1 POWER";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_lcd1_pwr>;
+                       gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       regulator-boot-on;
+                       regulator-always-on;
+               };
+
+               reg_usbh1_vbus: regulator@6 {
+                       compatible = "regulator-fixed";
+                       reg = <6>;
+                       regulator-name = "usbh1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usbh1_vbus>;
+                       gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_usbotg_vbus: regulator@7 {
+                       compatible = "regulator-fixed";
+                       reg = <7>;
+                       regulator-name = "usbotg_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usbotg_vbus>;
+                       gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+       };
+
+       sound {
+               compatible = "karo,imx6qdl-tx6qdl-sgtl5000",
+                            "fsl,imx-audio-sgtl5000";
+               model = "sgtl5000-audio";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_audmux>;
+               ssi-controller = <&ssi1>;
+               audio-codec = <&sgtl5000>;
+               audio-routing =
+                       "MIC_IN", "Mic Jack",
+                       "Mic Jack", "Mic Bias",
+                       "Headphone Jack", "HP_OUT";
+               mux-int-port = <1>;
+               mux-ext-port = <5>;
+       };
+};
+
+&audmux {
+       status = "okay";
+};
+
+&can1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       xceiver-supply = <&reg_can_xcvr>;
+       status = "okay";
+};
+
+&can2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan2>;
+       xceiver-supply = <&reg_can_xcvr>;
+       status = "okay";
+};
+
+&ecspi1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi1>;
+       fsl,spi-num-chipselects = <2>;
+       cs-gpios = <
+               &gpio2 30 GPIO_ACTIVE_HIGH
+               &gpio3 19 GPIO_ACTIVE_HIGH
+       >;
+       status = "okay";
+
+       spidev0: spi@0 {
+               compatible = "spidev";
+               reg = <0>;
+               spi-max-frequency = <54000000>;
+       };
+
+       spidev1: spi@1 {
+               compatible = "spidev";
+               reg = <1>;
+               spi-max-frequency = <54000000>;
+       };
+};
+
+&fec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet>;
+       phy-mode = "rmii";
+       phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_HIGH>;
+       phy-supply = <&reg_3v3_etn>;
+       status = "okay";
+};
+
+&gpmi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_gpmi_nand>;
+       nand-on-flash-bbt;
+       fsl,no-blockmark-swap;
+       status = "okay";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c1>;
+       clock-frequency = <400000>;
+       status = "okay";
+
+       ds1339: rtc@68 {
+               compatible = "dallas,ds1339";
+               reg = <0x68>;
+       };
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_i2c3>;
+       clock-frequency = <400000>;
+       status = "okay";
+
+       sgtl5000: sgtl5000@0a {
+               compatible = "fsl,sgtl5000";
+               reg = <0x0a>;
+               VDDA-supply = <&reg_2v5>;
+               VDDIO-supply = <&reg_3v3>;
+               clocks = <&mclk>;
+       };
+
+       polytouch: edt-ft5x06@38 {
+               compatible = "edt,edt-ft5x06";
+               reg = <0x38>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_edt_ft5x06>;
+               interrupt-parent = <&gpio6>;
+               interrupts = <15 0>;
+               reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
+               wake-gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
+               linux,wakeup;
+       };
+
+       touchscreen: tsc2007@48 {
+               compatible = "ti,tsc2007";
+               reg = <0x48>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_tsc2007>;
+               interrupt-parent = <&gpio3>;
+               interrupts = <26 0>;
+               gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
+               ti,x-plate-ohms = <660>;
+               linux,wakeup;
+       };
+};
+
+&iomuxc {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx6qdl-tx6 {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_A18__GPIO2_IO20          0x1b0b1 /* LED */
+                               MX6QDL_PAD_SD3_DAT2__GPIO7_IO06         0x1b0b1 /* ETN PHY RESET */
+                               MX6QDL_PAD_SD3_DAT4__GPIO7_IO01         0x1b0b1 /* ETN PHY INT */
+                               MX6QDL_PAD_EIM_A25__GPIO5_IO02          0x1b0b1 /* PWR BTN */
+                       >;
+               };
+
+               pinctrl_audmux: audmuxgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_ROW1__AUD5_RXD           0x130b0 /* SSI1_RXD */
+                               MX6QDL_PAD_KEY_ROW0__AUD5_TXD           0x110b0 /* SSI1_TXD */
+                               MX6QDL_PAD_KEY_COL0__AUD5_TXC           0x130b0 /* SSI1_CLK */
+                               MX6QDL_PAD_KEY_COL1__AUD5_TXFS          0x130b0 /* SSI1_FS */
+                       >;
+               };
+
+               pinctrl_disp0_1: disp0grp-1 {
+                       fsl,pins = <
+                               MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
+                               MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
+                               MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
+                               MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
+                               /* PAD DISP0_DAT0 is used for the Flexcan transceiver control */
+                               MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x10
+                               MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x10
+                               MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x10
+                               MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x10
+                               MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x10
+                               MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x10
+                               MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x10
+                               MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x10
+                               MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x10
+                               MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x10
+                               MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x10
+                               MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x10
+                               MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x10
+                               MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x10
+                               MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x10
+                               MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x10
+                               MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x10
+                               MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x10
+                               MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x10
+                               MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x10
+                               MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x10
+                               MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x10
+                               MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x10
+                       >;
+               };
+
+               pinctrl_disp0_2: disp0grp-2 {
+                       fsl,pins = <
+                               MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
+                               MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
+                               MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
+                               MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
+                               MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x10
+                               MX6QDL_PAD_DISP0_DAT1__IPU1_DISP0_DATA01   0x10
+                               MX6QDL_PAD_DISP0_DAT2__IPU1_DISP0_DATA02   0x10
+                               MX6QDL_PAD_DISP0_DAT3__IPU1_DISP0_DATA03   0x10
+                               MX6QDL_PAD_DISP0_DAT4__IPU1_DISP0_DATA04   0x10
+                               MX6QDL_PAD_DISP0_DAT5__IPU1_DISP0_DATA05   0x10
+                               MX6QDL_PAD_DISP0_DAT6__IPU1_DISP0_DATA06   0x10
+                               MX6QDL_PAD_DISP0_DAT7__IPU1_DISP0_DATA07   0x10
+                               MX6QDL_PAD_DISP0_DAT8__IPU1_DISP0_DATA08   0x10
+                               MX6QDL_PAD_DISP0_DAT9__IPU1_DISP0_DATA09   0x10
+                               MX6QDL_PAD_DISP0_DAT10__IPU1_DISP0_DATA10  0x10
+                               MX6QDL_PAD_DISP0_DAT11__IPU1_DISP0_DATA11  0x10
+                               MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12  0x10
+                               MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13  0x10
+                               MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14  0x10
+                               MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15  0x10
+                               MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16  0x10
+                               MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17  0x10
+                               MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18  0x10
+                               MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19  0x10
+                               MX6QDL_PAD_DISP0_DAT20__IPU1_DISP0_DATA20  0x10
+                               MX6QDL_PAD_DISP0_DAT21__IPU1_DISP0_DATA21  0x10
+                               MX6QDL_PAD_DISP0_DAT22__IPU1_DISP0_DATA22  0x10
+                               MX6QDL_PAD_DISP0_DAT23__IPU1_DISP0_DATA23  0x10
+                       >;
+               };
+
+               pinctrl_ecspi1: ecspi1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D18__ECSPI1_MOSI         0x0b0b0
+                               MX6QDL_PAD_EIM_D17__ECSPI1_MISO         0x0b0b0
+                               MX6QDL_PAD_EIM_D16__ECSPI1_SCLK         0x0b0b0
+                               MX6QDL_PAD_GPIO_19__ECSPI1_RDY          0x0b0b0
+                               MX6QDL_PAD_EIM_EB2__GPIO2_IO30          0x0b0b0 /* SPI CS0 */
+                               MX6QDL_PAD_EIM_D19__GPIO3_IO19          0x0b0b0 /* SPI CS1 */
+                       >;
+               };
+
+               pinctrl_edt_ft5x06: edt-ft5x06grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_NANDF_CS2__GPIO6_IO15        0x1b0b0 /* Interrupt */
+                               MX6QDL_PAD_EIM_A16__GPIO2_IO22          0x1b0b0 /* Reset */
+                               MX6QDL_PAD_EIM_A17__GPIO2_IO21          0x1b0b0 /* Wake */
+                       >;
+               };
+
+               pinctrl_enet: enetgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_ENET_MDC__ENET_MDC           0x1b0b0
+                               MX6QDL_PAD_ENET_MDIO__ENET_MDIO         0x1b0b0
+                               MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0     0x1b0b0
+                               MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1     0x1b0b0
+                               MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER       0x1b0b0
+                               MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN       0x1b0b0
+                               MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0     0x1b0b0
+                               MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1     0x1b0b0
+                               MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN      0x1b0b0
+                       >;
+               };
+
+               pinctrl_etnphy_power: etnphy-pwrgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D20__GPIO3_IO20          0x1b0b1 /* ETN PHY POWER */
+                       >;
+               };
+
+               pinctrl_flexcan1: flexcan1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_7__FLEXCAN1_TX          0x1b0b0
+                               MX6QDL_PAD_GPIO_8__FLEXCAN1_RX          0x1b0b0
+                       >;
+               };
+
+               pinctrl_flexcan2: flexcan2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_KEY_COL4__FLEXCAN2_TX        0x1b0b0
+                               MX6QDL_PAD_KEY_ROW4__FLEXCAN2_RX        0x1b0b0
+                       >;
+               };
+
+               pinctrl_flexcan_xcvr: flexcan-xcvrgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_DISP0_DAT0__GPIO4_IO21       0x1b0b0 /* Flexcan XCVR enable */
+                       >;
+               };
+
+               pinctrl_gpmi_nand: gpminandgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_NANDF_CLE__NAND_CLE          0x0b0b1
+                               MX6QDL_PAD_NANDF_ALE__NAND_ALE          0x0b0b1
+                               MX6QDL_PAD_NANDF_WP_B__NAND_WP_B        0x0b0b1
+                               MX6QDL_PAD_NANDF_RB0__NAND_READY_B      0x0b000
+                               MX6QDL_PAD_NANDF_CS0__NAND_CE0_B        0x0b0b1
+                               MX6QDL_PAD_SD4_CMD__NAND_RE_B           0x0b0b1
+                               MX6QDL_PAD_SD4_CLK__NAND_WE_B           0x0b0b1
+                               MX6QDL_PAD_NANDF_D0__NAND_DATA00        0x0b0b1
+                               MX6QDL_PAD_NANDF_D1__NAND_DATA01        0x0b0b1
+                               MX6QDL_PAD_NANDF_D2__NAND_DATA02        0x0b0b1
+                               MX6QDL_PAD_NANDF_D3__NAND_DATA03        0x0b0b1
+                               MX6QDL_PAD_NANDF_D4__NAND_DATA04        0x0b0b1
+                               MX6QDL_PAD_NANDF_D5__NAND_DATA05        0x0b0b1
+                               MX6QDL_PAD_NANDF_D6__NAND_DATA06        0x0b0b1
+                               MX6QDL_PAD_NANDF_D7__NAND_DATA07        0x0b0b1
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D21__I2C1_SCL            0x4001b8b1
+                               MX6QDL_PAD_EIM_D28__I2C1_SDA            0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c3: i2c3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_3__I2C3_SCL             0x4001b8b1
+                               MX6QDL_PAD_GPIO_6__I2C3_SDA             0x4001b8b1
+                       >;
+               };
+
+               pinctrl_kpp: kppgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_9__KEY_COL6             0x1b0b1
+                               MX6QDL_PAD_GPIO_4__KEY_COL7             0x1b0b1
+                               MX6QDL_PAD_KEY_COL2__KEY_COL2           0x1b0b1
+                               MX6QDL_PAD_KEY_COL3__KEY_COL3           0x1b0b1
+                               MX6QDL_PAD_GPIO_2__KEY_ROW6             0x1b0b1
+                               MX6QDL_PAD_GPIO_5__KEY_ROW7             0x1b0b1
+                               MX6QDL_PAD_KEY_ROW2__KEY_ROW2           0x1b0b1
+                               MX6QDL_PAD_KEY_ROW3__KEY_ROW3           0x1b0b1
+                       >;
+               };
+
+               pinctrl_lcd0_pwr: lcd0-pwrgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x1b0b1 /* LCD Reset */
+                       >;
+               };
+
+               pinctrl_lcd1_pwr: lcd1-pwrgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_EB3__GPIO2_IO31          0x1b0b1 /* LCD Power Enable */
+                       >;
+               };
+
+               pinctrl_pwm1: pwm1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_9__PWM1_OUT             0x1b0b1
+                       >;
+               };
+
+               pinctrl_pwm2: pwm2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_1__PWM2_OUT             0x1b0b1
+                       >;
+               };
+
+               pinctrl_tsc2007: tsc2007grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D26__GPIO3_IO26          0x1b0b0 /* Interrupt */
+                       >;
+               };
+
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA      0x1b0b1
+                               MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA      0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart1_rtscts: uart1_rtsctsgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_DAT1__UART1_RTS_B        0x1b0b1
+                               MX6QDL_PAD_SD3_DAT0__UART1_CTS_B        0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart2: uart2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA      0x1b0b1
+                               MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA      0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart2_rtscts: uart2_rtsctsgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD4_DAT5__UART2_RTS_B        0x1b0b1
+                               MX6QDL_PAD_SD4_DAT6__UART2_CTS_B        0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart3: uart3grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D24__UART3_TX_DATA       0x1b0b1
+                               MX6QDL_PAD_EIM_D25__UART3_RX_DATA       0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart3_rtscts: uart3_rtsctsgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD3_DAT3__UART3_CTS_B        0x1b0b1
+                               MX6QDL_PAD_SD3_RST__UART3_RTS_B         0x1b0b1
+                       >;
+               };
+
+               pinctrl_usbh1_vbus: usbh1-vbusgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D31__GPIO3_IO31          0x1b0b0 /* USBH1_VBUSEN */
+                       >;
+               };
+
+               pinctrl_usbotg: usbotggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_EIM_D23__GPIO3_IO23          0x17059
+                       >;
+               };
+
+               pinctrl_usbotg_vbus: usbotg-vbusgrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_7__GPIO1_IO07           0x1b0b0 /* USBOTG_VBUSEN */
+                       >;
+               };
+
+               pinctrl_usdhc1: usdhc1grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD1_CMD__SD1_CMD             0x070b1
+                               MX6QDL_PAD_SD1_CLK__SD1_CLK             0x070b1
+                               MX6QDL_PAD_SD1_DAT0__SD1_DATA0          0x070b1
+                               MX6QDL_PAD_SD1_DAT1__SD1_DATA1          0x070b1
+                               MX6QDL_PAD_SD1_DAT2__SD1_DATA2          0x070b1
+                               MX6QDL_PAD_SD1_DAT3__SD1_DATA3          0x070b1
+                               MX6QDL_PAD_SD3_CMD__GPIO7_IO02          0x170b0 /* SD1 CD */
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD2_CMD__SD2_CMD             0x070b1
+                               MX6QDL_PAD_SD2_CLK__SD2_CLK             0x070b1
+                               MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x070b1
+                               MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x070b1
+                               MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x070b1
+                               MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x070b1
+                               MX6QDL_PAD_SD3_CLK__GPIO7_IO03          0x170b0 /* SD2 CD */
+                       >;
+               };
+       };
+};
+
+&kpp {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_kpp>;
+       /* sample keymap */
+       /* row/col 0,1 are mapped to KPP row/col 6,7 */
+       linux,keymap = <
+               MATRIX_KEY(6, 6, KEY_POWER) /* 0x06060074 */
+               MATRIX_KEY(6, 7, KEY_KP0) /* 0x06070052 */
+               MATRIX_KEY(6, 2, KEY_KP1) /* 0x0602004f */
+               MATRIX_KEY(6, 3, KEY_KP2) /* 0x06030050 */
+               MATRIX_KEY(7, 6, KEY_KP3) /* 0x07060051 */
+               MATRIX_KEY(7, 7, KEY_KP4) /* 0x0707004b */
+               MATRIX_KEY(7, 2, KEY_KP5) /* 0x0702004c */
+               MATRIX_KEY(7, 3, KEY_KP6) /* 0x0703004d */
+               MATRIX_KEY(2, 6, KEY_KP7) /* 0x02060047 */
+               MATRIX_KEY(2, 7, KEY_KP8) /* 0x02070048 */
+               MATRIX_KEY(2, 2, KEY_KP9) /* 0x02020049 */
+       >;
+       status = "okay";
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm1>;
+       #pwm-cells = <3>;
+       status = "disabled";
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_pwm2>;
+       #pwm-cells = <3>;
+       status = "okay";
+};
+
+&ssi1 {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart2 &pinctrl_uart2_rtscts>;
+       status = "okay";
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart3 &pinctrl_uart3_rtscts>;
+       status = "okay";
+};
+
+&usbh1 {
+       vbus-supply = <&reg_usbh1_vbus>;
+       dr_mode = "host";
+       disable-over-current;
+       status = "okay";
+};
+
+&usbotg {
+       vbus-supply = <&reg_usbotg_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usbotg>;
+       dr_mode = "peripheral";
+       disable-over-current;
+       status = "okay";
+};
+
+&usdhc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc1>;
+       bus-width = <4>;
+       no-1-8-v;
+       cd-gpios = <&gpio7 2 0>;
+       fsl,wp-controller;
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       bus-width = <4>;
+       no-1-8-v;
+       cd-gpios = <&gpio7 3 0>;
+       fsl,wp-controller;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard-revb1.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard-revb1.dtsi
new file mode 100644 (file)
index 0000000..ef7fa62
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.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.
+ *
+ */
+
+#include "imx6qdl-wandboard.dtsi"
+
+&iomuxc {
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx6qdl-wandboard {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x130b0         /* GPIO_0_CLKO */
+                               MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x80000000      /* uSDHC1 CD */
+                               MX6QDL_PAD_EIM_DA9__GPIO3_IO09          0x80000000      /* uSDHC3 CD */
+                               MX6QDL_PAD_EIM_EB1__GPIO2_IO29          0x0f0b0         /* WL_REF_ON */
+                               MX6QDL_PAD_EIM_A25__GPIO5_IO02          0x0f0b0         /* WL_RST_N */
+                               MX6QDL_PAD_ENET_RXD1__GPIO1_IO26        0x000b0         /* WL_REG_ON */
+                               MX6QDL_PAD_ENET_TXD1__GPIO1_IO29        0x80000000      /* WL_HOST_WAKE */
+                               MX6QDL_PAD_ENET_TXD0__GPIO1_IO30        0x80000000      /* WL_WAKE */
+                               MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x80000000      /* RGMII_nRST */
+                               MX6QDL_PAD_EIM_DA13__GPIO3_IO13         0x80000000      /* BT_ON */
+                               MX6QDL_PAD_EIM_DA14__GPIO3_IO14         0x80000000      /* BT_WAKE */
+                               MX6QDL_PAD_EIM_DA15__GPIO3_IO15         0x80000000      /* BT_HOST_WAKE */                              
+                       >;
+               };
+       };
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       non-removable;
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard-revc1.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard-revc1.dtsi
new file mode 100644 (file)
index 0000000..8d893a7
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Fabio Estevam <fabio.estevam@freescale.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.
+ *
+ */
+
+#include "imx6qdl-wandboard.dtsi"
+
+&iomuxc {
+       pinctrl-0 = <&pinctrl_hog>;
+
+       imx6qdl-wandboard {
+               pinctrl_hog: hoggrp {
+                       fsl,pins = <
+                               MX6QDL_PAD_GPIO_0__CCM_CLKO1            0x130b0         /* GPIO_0_CLKO */
+                               MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x80000000      /* uSDHC1 CD */
+                               MX6QDL_PAD_EIM_DA9__GPIO3_IO09          0x80000000      /* uSDHC3 CD */
+                               MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00       0x0f0b0         /* WIFI_ON (reset, active low) */
+                               MX6QDL_PAD_ENET_RXD1__GPIO1_IO26        0x000b0         /* WL_REG_ON (unused) */
+                               MX6QDL_PAD_ENET_TXD1__GPIO1_IO29        0x80000000      /* WL_HOST_WAKE, input */
+                               MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31       0x0f0b0         /* GPIO5_IO31 (Wifi Power Enable) */
+                               MX6QDL_PAD_ENET_TXD0__GPIO1_IO30        0x80000000      /* WL_WAKE (unused) */
+                               MX6QDL_PAD_CSI0_VSYNC__GPIO5_IO21       0x80000000      /* BT_ON */
+                               MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30       0x80000000      /* BT_WAKE */
+                               MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20     0x80000000      /* BT_HOST_WAKE */
+                               MX6QDL_PAD_EIM_D29__GPIO3_IO29          0x80000000      /* RGMII_nRST */
+                       >;
+               };
+       };
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       status = "okay";
+};
index 5c6f10c..5fb0916 100644 (file)
 
 &iomuxc {
        pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_hog>;
 
        imx6qdl-wandboard {
-               pinctrl_hog: hoggrp {
-                       fsl,pins = <
-                               MX6QDL_PAD_GPIO_0__CCM_CLKO1     0x130b0
-                               MX6QDL_PAD_GPIO_2__GPIO1_IO02    0x80000000
-                               MX6QDL_PAD_EIM_DA9__GPIO3_IO09   0x80000000
-                               MX6QDL_PAD_EIM_EB1__GPIO2_IO29   0x80000000 /* WL_REF_ON */
-                               MX6QDL_PAD_EIM_A25__GPIO5_IO02   0x80000000 /* WL_RST_N */
-                               MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000 /* WL_REG_ON */
-                               MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000 /* WL_HOST_WAKE */
-                               MX6QDL_PAD_ENET_TXD0__GPIO1_IO30 0x80000000 /* WL_WAKE */
-                               MX6QDL_PAD_EIM_D29__GPIO3_IO29   0x80000000
-                       >;
-               };
 
                pinctrl_audmux: audmuxgrp {
                        fsl,pins = <
 };
 
 &ssi1 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
        status = "okay";
 };
 
-&usdhc2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_usdhc2>;
-       non-removable;
-       status = "okay";
-};
-
 &usdhc3 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_usdhc3>;
index ce05991..c701af9 100644 (file)
@@ -10,6 +10,7 @@
  * http://www.gnu.org/copyleft/gpl.html
  */
 
+#include <dt-bindings/clock/imx6qdl-clock.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 #include "skeleton.dtsi"
@@ -94,7 +95,7 @@
                        interrupt-names = "gpmi0", "gpmi1", "gpmi2", "gpmi3";
                        #dma-cells = <1>;
                        dma-channels = <4>;
-                       clocks = <&clks 106>;
+                       clocks = <&clks IMX6QDL_CLK_APBH_DMA>;
                };
 
                gpmi: gpmi-nand@00112000 {
                        reg-names = "gpmi-nand", "bch";
                        interrupts = <0 15 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "bch";
-                       clocks = <&clks 152>, <&clks 153>, <&clks 151>,
-                                <&clks 150>, <&clks 149>;
+                       clocks = <&clks IMX6QDL_CLK_GPMI_IO>,
+                                <&clks IMX6QDL_CLK_GPMI_APB>,
+                                <&clks IMX6QDL_CLK_GPMI_BCH>,
+                                <&clks IMX6QDL_CLK_GPMI_BCH_APB>,
+                                <&clks IMX6QDL_CLK_PER1_BCH>;
                        clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",
                                      "gpmi_bch_apb", "per1_bch";
                        dmas = <&dma_apbh 0>;
                        compatible = "arm,cortex-a9-twd-timer";
                        reg = <0x00a00600 0x20>;
                        interrupts = <1 13 0xf01>;
-                       clocks = <&clks 15>;
+                       clocks = <&clks IMX6QDL_CLK_TWD>;
                };
 
                L2: l2-cache@00a02000 {
                                        <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
                                        <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
                                        <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clks 144>, <&clks 206>, <&clks 189>;
+                       clocks = <&clks IMX6QDL_CLK_PCIE_AXI>,
+                                <&clks IMX6QDL_CLK_LVDS1_GATE>,
+                                <&clks IMX6QDL_CLK_PCIE_REF_125M>;
                        clock-names = "pcie", "pcie_bus", "pcie_phy";
                        status = "disabled";
                };
                                        dmas = <&sdma 14 18 0>,
                                               <&sdma 15 18 0>;
                                        dma-names = "rx", "tx";
-                                       clocks = <&clks 197>, <&clks 3>,
-                                                <&clks 197>, <&clks 107>,
-                                                <&clks 0>,   <&clks 118>,
-                                                <&clks 0>,  <&clks 139>,
-                                                <&clks 0>;
+                                       clocks = <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_OSC>,
+                                                <&clks IMX6QDL_CLK_SPDIF>, <&clks IMX6QDL_CLK_DUMMY>,
+                                                <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>,
+                                                <&clks IMX6QDL_CLK_DUMMY>, <&clks IMX6QDL_CLK_DUMMY>,
+                                                <&clks IMX6QDL_CLK_DUMMY>;
                                        clock-names = "core",  "rxtx0",
                                                      "rxtx1", "rxtx2",
                                                      "rxtx3", "rxtx4",
                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
                                        reg = <0x02008000 0x4000>;
                                        interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 112>, <&clks 112>;
+                                       clocks = <&clks IMX6QDL_CLK_ECSPI1>,
+                                                <&clks IMX6QDL_CLK_ECSPI1>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 3 7 1>, <&sdma 4 7 2>;
                                        dma-names = "rx", "tx";
                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
                                        reg = <0x0200c000 0x4000>;
                                        interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 113>, <&clks 113>;
+                                       clocks = <&clks IMX6QDL_CLK_ECSPI2>,
+                                                <&clks IMX6QDL_CLK_ECSPI2>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 5 7 1>, <&sdma 6 7 2>;
                                        dma-names = "rx", "tx";
                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
                                        reg = <0x02010000 0x4000>;
                                        interrupts = <0 33 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 114>, <&clks 114>;
+                                       clocks = <&clks IMX6QDL_CLK_ECSPI3>,
+                                                <&clks IMX6QDL_CLK_ECSPI3>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 7 7 1>, <&sdma 8 7 2>;
                                        dma-names = "rx", "tx";
                                        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
                                        reg = <0x02014000 0x4000>;
                                        interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 115>, <&clks 115>;
+                                       clocks = <&clks IMX6QDL_CLK_ECSPI4>,
+                                                <&clks IMX6QDL_CLK_ECSPI4>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 9 7 1>, <&sdma 10 7 2>;
                                        dma-names = "rx", "tx";
                                        compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
                                        reg = <0x02020000 0x4000>;
                                        interrupts = <0 26 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 160>, <&clks 161>;
+                                       clocks = <&clks IMX6QDL_CLK_UART_IPG>,
+                                                <&clks IMX6QDL_CLK_UART_SERIAL>;
                                        clock-names = "ipg", "per";
                                        dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;
                                        dma-names = "rx", "tx";
 
                                ssi1: ssi@02028000 {
                                        compatible = "fsl,imx6q-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x02028000 0x4000>;
                                        interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 178>;
+                                       clocks = <&clks IMX6QDL_CLK_SSI1_IPG>;
                                        dmas = <&sdma 37 1 0>,
                                               <&sdma 38 1 0>;
                                        dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <38 37>;
                                        status = "disabled";
                                };
 
                                ssi2: ssi@0202c000 {
                                        compatible = "fsl,imx6q-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x0202c000 0x4000>;
                                        interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 179>;
+                                       clocks = <&clks IMX6QDL_CLK_SSI2_IPG>;
                                        dmas = <&sdma 41 1 0>,
                                               <&sdma 42 1 0>;
                                        dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <42 41>;
                                        status = "disabled";
                                };
 
                                ssi3: ssi@02030000 {
                                        compatible = "fsl,imx6q-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x02030000 0x4000>;
                                        interrupts = <0 48 IRQ_TYPE_LEVEL_HIGH>;
-                                       clocks = <&clks 180>;
+                                       clocks = <&clks IMX6QDL_CLK_SSI3_IPG>;
                                        dmas = <&sdma 45 1 0>,
                                               <&sdma 46 1 0>;
                                        dma-names = "rx", "tx";
                                        fsl,fifo-depth = <15>;
-                                       fsl,ssi-dma-events = <46 45>;
                                        status = "disabled";
                                };
 
                                compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";
                                reg = <0x02080000 0x4000>;
                                interrupts = <0 83 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 62>, <&clks 145>;
+                               clocks = <&clks IMX6QDL_CLK_IPG>,
+                                        <&clks IMX6QDL_CLK_PWM1>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";
                                reg = <0x02084000 0x4000>;
                                interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 62>, <&clks 146>;
+                               clocks = <&clks IMX6QDL_CLK_IPG>,
+                                        <&clks IMX6QDL_CLK_PWM2>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";
                                reg = <0x02088000 0x4000>;
                                interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 62>, <&clks 147>;
+                               clocks = <&clks IMX6QDL_CLK_IPG>,
+                                        <&clks IMX6QDL_CLK_PWM3>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx6q-pwm", "fsl,imx27-pwm";
                                reg = <0x0208c000 0x4000>;
                                interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 62>, <&clks 148>;
+                               clocks = <&clks IMX6QDL_CLK_IPG>,
+                                        <&clks IMX6QDL_CLK_PWM4>;
                                clock-names = "ipg", "per";
                        };
 
                                compatible = "fsl,imx6q-flexcan";
                                reg = <0x02090000 0x4000>;
                                interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 108>, <&clks 109>;
+                               clocks = <&clks IMX6QDL_CLK_CAN1_IPG>,
+                                        <&clks IMX6QDL_CLK_CAN1_SERIAL>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx6q-flexcan";
                                reg = <0x02094000 0x4000>;
                                interrupts = <0 111 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 110>, <&clks 111>;
+                               clocks = <&clks IMX6QDL_CLK_CAN2_IPG>,
+                                        <&clks IMX6QDL_CLK_CAN2_SERIAL>;
                                clock-names = "ipg", "per";
                                status = "disabled";
                        };
                                compatible = "fsl,imx6q-gpt", "fsl,imx31-gpt";
                                reg = <0x02098000 0x4000>;
                                interrupts = <0 55 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 119>, <&clks 120>;
+                               clocks = <&clks IMX6QDL_CLK_GPT_IPG>,
+                                        <&clks IMX6QDL_CLK_GPT_IPG_PER>;
                                clock-names = "ipg", "per";
                        };
 
                        };
 
                        kpp: kpp@020b8000 {
+                               compatible = "fsl,imx6q-kpp", "fsl,imx21-kpp";
                                reg = <0x020b8000 0x4000>;
                                interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6QDL_CLK_IPG>;
+                               status = "disabled";
                        };
 
                        wdog1: wdog@020bc000 {
                                compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
                                reg = <0x020bc000 0x4000>;
                                interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 0>;
+                               clocks = <&clks IMX6QDL_CLK_DUMMY>;
                        };
 
                        wdog2: wdog@020c0000 {
                                compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
                                reg = <0x020c0000 0x4000>;
                                interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 0>;
+                               clocks = <&clks IMX6QDL_CLK_DUMMY>;
                                status = "disabled";
                        };
 
                                interrupts = <0 49 IRQ_TYPE_LEVEL_HIGH>;
                                fsl,tempmon = <&anatop>;
                                fsl,tempmon-data = <&ocotp>;
-                               clocks = <&clks 172>;
+                               clocks = <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
                        };
 
                        usbphy1: usbphy@020c9000 {
                                compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
                                reg = <0x020c9000 0x1000>;
                                interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 182>;
+                               clocks = <&clks IMX6QDL_CLK_USBPHY1>;
                                fsl,anatop = <&anatop>;
                        };
 
                                compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
                                reg = <0x020ca000 0x1000>;
                                interrupts = <0 45 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 183>;
+                               clocks = <&clks IMX6QDL_CLK_USBPHY2>;
                                fsl,anatop = <&anatop>;
                        };
 
                                reg = <0x00120000 0x9000>;
                                interrupts = <0 115 0x04>;
                                gpr = <&gpr>;
-                               clocks = <&clks 123>, <&clks 124>;
+                               clocks = <&clks IMX6QDL_CLK_HDMI_IAHB>,
+                                        <&clks IMX6QDL_CLK_HDMI_ISFR>;
                                clock-names = "iahb", "isfr";
                                status = "disabled";
 
                                compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
                                reg = <0x020ec000 0x4000>;
                                interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 155>, <&clks 155>;
+                               clocks = <&clks IMX6QDL_CLK_SDMA>,
+                                        <&clks IMX6QDL_CLK_SDMA>;
                                clock-names = "ipg", "ahb";
                                #dma-cells = <3>;
                                fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
                                compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
                                reg = <0x02184000 0x200>;
                                interrupts = <0 43 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 162>;
+                               clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy1>;
                                fsl,usbmisc = <&usbmisc 0>;
                                status = "disabled";
                                compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
                                reg = <0x02184200 0x200>;
                                interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 162>;
+                               clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbphy = <&usbphy2>;
                                fsl,usbmisc = <&usbmisc 1>;
                                status = "disabled";
                                compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
                                reg = <0x02184400 0x200>;
                                interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 162>;
+                               clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbmisc = <&usbmisc 2>;
                                status = "disabled";
                        };
                                compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
                                reg = <0x02184600 0x200>;
                                interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 162>;
+                               clocks = <&clks IMX6QDL_CLK_USBOH3>;
                                fsl,usbmisc = <&usbmisc 3>;
                                status = "disabled";
                        };
                                #index-cells = <1>;
                                compatible = "fsl,imx6q-usbmisc";
                                reg = <0x02184800 0x200>;
-                               clocks = <&clks 162>;
+                               clocks = <&clks IMX6QDL_CLK_USBOH3>;
                        };
 
                        fec: ethernet@02188000 {
                                interrupts-extended =
                                        <&intc 0 118 IRQ_TYPE_LEVEL_HIGH>,
                                        <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 117>, <&clks 117>, <&clks 190>;
+                               clocks = <&clks IMX6QDL_CLK_ENET>,
+                                        <&clks IMX6QDL_CLK_ENET>,
+                                        <&clks IMX6QDL_CLK_ENET_REF>;
                                clock-names = "ipg", "ahb", "ptp";
                                status = "disabled";
                        };
                                compatible = "fsl,imx6q-usdhc";
                                reg = <0x02190000 0x4000>;
                                interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 163>, <&clks 163>, <&clks 163>;
+                               clocks = <&clks IMX6QDL_CLK_USDHC1>,
+                                        <&clks IMX6QDL_CLK_USDHC1>,
+                                        <&clks IMX6QDL_CLK_USDHC1>;
                                clock-names = "ipg", "ahb", "per";
                                bus-width = <4>;
                                status = "disabled";
                                compatible = "fsl,imx6q-usdhc";
                                reg = <0x02194000 0x4000>;
                                interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 164>, <&clks 164>, <&clks 164>;
+                               clocks = <&clks IMX6QDL_CLK_USDHC2>,
+                                        <&clks IMX6QDL_CLK_USDHC2>,
+                                        <&clks IMX6QDL_CLK_USDHC2>;
                                clock-names = "ipg", "ahb", "per";
                                bus-width = <4>;
                                status = "disabled";
                                compatible = "fsl,imx6q-usdhc";
                                reg = <0x02198000 0x4000>;
                                interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 165>, <&clks 165>, <&clks 165>;
+                               clocks = <&clks IMX6QDL_CLK_USDHC3>,
+                                        <&clks IMX6QDL_CLK_USDHC3>,
+                                        <&clks IMX6QDL_CLK_USDHC3>;
                                clock-names = "ipg", "ahb", "per";
                                bus-width = <4>;
                                status = "disabled";
                                compatible = "fsl,imx6q-usdhc";
                                reg = <0x0219c000 0x4000>;
                                interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 166>, <&clks 166>, <&clks 166>;
+                               clocks = <&clks IMX6QDL_CLK_USDHC4>,
+                                        <&clks IMX6QDL_CLK_USDHC4>,
+                                        <&clks IMX6QDL_CLK_USDHC4>;
                                clock-names = "ipg", "ahb", "per";
                                bus-width = <4>;
                                status = "disabled";
                                compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
                                reg = <0x021a0000 0x4000>;
                                interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 125>;
+                               clocks = <&clks IMX6QDL_CLK_I2C1>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
                                reg = <0x021a4000 0x4000>;
                                interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 126>;
+                               clocks = <&clks IMX6QDL_CLK_I2C2>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx6q-i2c", "fsl,imx21-i2c";
                                reg = <0x021a8000 0x4000>;
                                interrupts = <0 38 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 127>;
+                               clocks = <&clks IMX6QDL_CLK_I2C3>;
                                status = "disabled";
                        };
 
                                compatible = "fsl,imx6q-weim";
                                reg = <0x021b8000 0x4000>;
                                interrupts = <0 14 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 196>;
+                               clocks = <&clks IMX6QDL_CLK_EIM_SLOW>;
                        };
 
                        ocotp: ocotp@021bc000 {
                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
                                reg = <0x021e8000 0x4000>;
                                interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 160>, <&clks 161>;
+                               clocks = <&clks IMX6QDL_CLK_UART_IPG>,
+                                        <&clks IMX6QDL_CLK_UART_SERIAL>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
                                dma-names = "rx", "tx";
                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
                                reg = <0x021ec000 0x4000>;
                                interrupts = <0 28 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 160>, <&clks 161>;
+                               clocks = <&clks IMX6QDL_CLK_UART_IPG>,
+                                        <&clks IMX6QDL_CLK_UART_SERIAL>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
                                dma-names = "rx", "tx";
                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
                                reg = <0x021f0000 0x4000>;
                                interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 160>, <&clks 161>;
+                               clocks = <&clks IMX6QDL_CLK_UART_IPG>,
+                                        <&clks IMX6QDL_CLK_UART_SERIAL>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
                                dma-names = "rx", "tx";
                                compatible = "fsl,imx6q-uart", "fsl,imx21-uart";
                                reg = <0x021f4000 0x4000>;
                                interrupts = <0 30 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks 160>, <&clks 161>;
+                               clocks = <&clks IMX6QDL_CLK_UART_IPG>,
+                                        <&clks IMX6QDL_CLK_UART_SERIAL>;
                                clock-names = "ipg", "per";
                                dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
                                dma-names = "rx", "tx";
                        reg = <0x02400000 0x400000>;
                        interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>,
                                     <0 5 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clks 130>, <&clks 131>, <&clks 132>;
+                       clocks = <&clks IMX6QDL_CLK_IPU1>,
+                                <&clks IMX6QDL_CLK_IPU1_DI0>,
+                                <&clks IMX6QDL_CLK_IPU1_DI1>;
                        clock-names = "bus", "di0", "di1";
                        resets = <&src 2>;
 
+                       ipu1_csi0: port@0 {
+                               reg = <0>;
+                       };
+
+                       ipu1_csi1: port@1 {
+                               reg = <1>;
+                       };
+
                        ipu1_di0: port@2 {
                                #address-cells = <1>;
                                #size-cells = <0>;
index a8d9a93..3f9e041 100644 (file)
 };
 
 &fec {
-       pinctrl-names = "default";
+       pinctrl-names = "default", "sleep";
        pinctrl-0 = <&pinctrl_fec>;
+       pinctrl-1 = <&pinctrl_fec_sleep>;
        phy-mode = "rmii";
        status = "okay";
 };
                        >;
                };
 
+               pinctrl_fec_sleep: fecgrp-sleep {
+                       fsl,pins = <
+                               MX6SL_PAD_FEC_MDC__GPIO4_IO23      0x3080
+                               MX6SL_PAD_FEC_CRS_DV__GPIO4_IO25   0x3080
+                               MX6SL_PAD_FEC_RXD0__GPIO4_IO17     0x3080
+                               MX6SL_PAD_FEC_RXD1__GPIO4_IO18     0x3080
+                               MX6SL_PAD_FEC_TX_EN__GPIO4_IO22    0x3080
+                               MX6SL_PAD_FEC_TXD0__GPIO4_IO24     0x3080
+                               MX6SL_PAD_FEC_TXD1__GPIO4_IO16     0x3080
+                               MX6SL_PAD_FEC_REF_CLK__GPIO4_IO26  0x3080
+                       >;
+               };
+
                pinctrl_i2c1: i2c1grp {
                        fsl,pins = <
                                MX6SL_PAD_I2C1_SCL__I2C1_SCL    0x4001b8b1
 };
 
 &ssi2 {
-       fsl,mode = "i2s-slave";
        status = "okay";
 };
 
index 57d4abe..c75800c 100644 (file)
 
                                ssi1: ssi@02028000 {
                                        compatible = "fsl,imx6sl-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x02028000 0x4000>;
                                        interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>;
                                        clocks = <&clks IMX6SL_CLK_SSI1>;
 
                                ssi2: ssi@0202c000 {
                                        compatible = "fsl,imx6sl-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x0202c000 0x4000>;
                                        interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
                                        clocks = <&clks IMX6SL_CLK_SSI2>;
 
                                ssi3: ssi@02030000 {
                                        compatible = "fsl,imx6sl-ssi",
-                                                       "fsl,imx51-ssi",
-                                                       "fsl,imx21-ssi";
+                                                       "fsl,imx51-ssi";
                                        reg = <0x02030000 0x4000>;
                                        interrupts = <0 48 IRQ_TYPE_LEVEL_HIGH>;
                                        clocks = <&clks IMX6SL_CLK_SSI3>;
                                reg = <0x020b8000 0x4000>;
                                interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6SL_CLK_DUMMY>;
+                               status = "disabled";
                        };
 
                        wdog1: wdog@020bc000 {
                        };
 
                        sdma: sdma@020ec000 {
-                               compatible = "fsl,imx6sl-sdma", "fsl,imx35-sdma";
+                               compatible = "fsl,imx6sl-sdma", "fsl,imx6q-sdma";
                                reg = <0x020ec000 0x4000>;
                                interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
                                clocks = <&clks IMX6SL_CLK_SDMA>,
diff --git a/arch/arm/boot/dts/imx6sx-pinfunc.h b/arch/arm/boot/dts/imx6sx-pinfunc.h
new file mode 100644 (file)
index 0000000..3e0b816
--- /dev/null
@@ -0,0 +1,1544 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ *
+ */
+
+#ifndef __DTS_IMX6SX_PINFUNC_H
+#define __DTS_IMX6SX_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * <mux_reg conf_reg input_reg mux_mode input_val>
+ */
+#define MX6SX_PAD_GPIO1_IO00__I2C1_SCL                            0x0014 0x035C 0x07A8 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO00__USDHC1_VSELECT                      0x0014 0x035C 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO00__SPDIF_LOCK                          0x0014 0x035C 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO00__CCM_WAIT                            0x0014 0x035C 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO00__WDOG1_WDOG_ANY                      0x0014 0x035C 0x0000 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO00__GPIO1_IO_0                          0x0014 0x035C 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO00__SNVS_HP_WRAPPER_VIO_5               0x0014 0x035C 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO00__PHY_DTB_1                           0x0014 0x035C 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO01__I2C1_SDA                            0x0018 0x0360 0x07AC 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO01__USDHC1_RESET_B                      0x0018 0x0360 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO01__SPDIF_SR_CLK                        0x0018 0x0360 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO01__CCM_STOP                            0x0018 0x0360 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO01__WDOG3_WDOG_B                        0x0018 0x0360 0x0000 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO01__GPIO1_IO_1                          0x0018 0x0360 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO01__SNVS_HP_WRAPPER_VIO_5_CTL           0x0018 0x0360 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO01__PHY_DTB_0                           0x0018 0x0360 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO02__I2C2_SCL                            0x001C 0x0364 0x07B0 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO02__USDHC1_CD_B                         0x001C 0x0364 0x0864 0x1 0x1
+#define MX6SX_PAD_GPIO1_IO02__CSI2_MCLK                           0x001C 0x0364 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO02__CCM_DI0_EXT_CLK                     0x001C 0x0364 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO02__WDOG1_WDOG_B                        0x001C 0x0364 0x0000 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO02__GPIO1_IO_2                          0x001C 0x0364 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO02__CCM_REF_EN_B                        0x001C 0x0364 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO02__PHY_TDI                             0x001C 0x0364 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO03__I2C2_SDA                            0x0020 0x0368 0x07B4 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO03__USDHC1_WP                           0x0020 0x0368 0x0868 0x1 0x1
+#define MX6SX_PAD_GPIO1_IO03__ENET1_REF_CLK_25M                   0x0020 0x0368 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO03__CCM_DI1_EXT_CLK                     0x0020 0x0368 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO03__WDOG2_WDOG_B                        0x0020 0x0368 0x0000 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO03__GPIO1_IO_3                          0x0020 0x0368 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO03__CCM_PLL3_BYP                        0x0020 0x0368 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO03__PHY_TCK                             0x0020 0x0368 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO04__UART1_RX                            0x0024 0x036C 0x0830 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO04__UART1_TX                            0x0024 0x036C 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO04__USDHC2_RESET_B                      0x0024 0x036C 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO04__ENET1_MDC                           0x0024 0x036C 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO04__OSC32K_32K_OUT                      0x0024 0x036C 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO04__ENET2_REF_CLK2                      0x0024 0x036C 0x076C 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO04__GPIO1_IO_4                          0x0024 0x036C 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO04__CCM_PLL2_BYP                        0x0024 0x036C 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO04__PHY_TMS                             0x0024 0x036C 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO05__UART1_RX                            0x0028 0x0370 0x0830 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO05__UART1_TX                            0x0028 0x0370 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO05__USDHC2_VSELECT                      0x0028 0x0370 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO05__ENET1_MDIO                          0x0028 0x0370 0x0764 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO05__ASRC_ASRC_EXT_CLK                   0x0028 0x0370 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO05__ENET1_REF_CLK1                      0x0028 0x0370 0x0760 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO05__GPIO1_IO_5                          0x0028 0x0370 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO05__SRC_TESTER_ACK                      0x0028 0x0370 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO05__PHY_TDO                             0x0028 0x0370 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO06__UART2_RX                            0x002C 0x0374 0x0838 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO06__UART2_TX                            0x002C 0x0374 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO06__USDHC2_CD_B                         0x002C 0x0374 0x086C 0x1 0x1
+#define MX6SX_PAD_GPIO1_IO06__ENET2_MDC                           0x002C 0x0374 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO06__CSI1_MCLK                           0x002C 0x0374 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO06__UART1_RTS_B                         0x002C 0x0374 0x082C 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO06__GPIO1_IO_6                          0x002C 0x0374 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO06__SRC_ANY_PU_RESET                    0x002C 0x0374 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO06__OCOTP_CTRL_WRAPPER_FUSE_LATCHED     0x002C 0x0374 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO07__UART2_RX                            0x0030 0x0378 0x0838 0x0 0x1
+#define MX6SX_PAD_GPIO1_IO07__UART2_TX                            0x0030 0x0378 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO07__USDHC2_WP                           0x0030 0x0378 0x0870 0x1 0x1
+#define MX6SX_PAD_GPIO1_IO07__ENET2_MDIO                          0x0030 0x0378 0x0770 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO07__AUDMUX_MCLK                         0x0030 0x0378 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO07__UART1_CTS_B                         0x0030 0x0378 0x082C 0x4 0x1
+#define MX6SX_PAD_GPIO1_IO07__GPIO1_IO_7                          0x0030 0x0378 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO07__SRC_EARLY_RESET                     0x0030 0x0378 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO07__DCIC2_OUT                           0x0030 0x0378 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO07__VDEC_DEBUG_44                       0x0030 0x0378 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO08__USB_OTG1_OC                         0x0034 0x037C 0x0860 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO08__WDOG1_WDOG_B                        0x0034 0x037C 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO08__SDMA_EXT_EVENT_0                    0x0034 0x037C 0x081C 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO08__CCM_PMIC_RDY                        0x0034 0x037C 0x069C 0x3 0x1
+#define MX6SX_PAD_GPIO1_IO08__UART2_RTS_B                         0x0034 0x037C 0x0834 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO08__GPIO1_IO_8                          0x0034 0x037C 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO08__SRC_SYSTEM_RESET                    0x0034 0x037C 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO08__DCIC1_OUT                           0x0034 0x037C 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO08__VDEC_DEBUG_43                       0x0034 0x037C 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO09__USB_OTG1_PWR                        0x0038 0x0380 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO09__WDOG2_WDOG_B                        0x0038 0x0380 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO09__SDMA_EXT_EVENT_1                    0x0038 0x0380 0x0820 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO09__CCM_OUT0                            0x0038 0x0380 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO09__UART2_CTS_B                         0x0038 0x0380 0x0834 0x4 0x1
+#define MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9                          0x0038 0x0380 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO09__SRC_INT_BOOT                        0x0038 0x0380 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO09__OBSERVE_MUX_OUT_4                   0x0038 0x0380 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO09__VDEC_DEBUG_42                       0x0038 0x0380 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO10__ANATOP_OTG1_ID                      0x003C 0x0384 0x0624 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO10__SPDIF_EXT_CLK                       0x003C 0x0384 0x0828 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO10__PWM1_OUT                            0x003C 0x0384 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO10__CCM_OUT1                            0x003C 0x0384 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO10__CSI1_FIELD                          0x003C 0x0384 0x070C 0x4 0x1
+#define MX6SX_PAD_GPIO1_IO10__GPIO1_IO_10                         0x003C 0x0384 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO10__CSU_CSU_INT_DEB                     0x003C 0x0384 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO10__OBSERVE_MUX_OUT_3                   0x003C 0x0384 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO10__VDEC_DEBUG_41                       0x003C 0x0384 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO11__USB_OTG2_OC                         0x0040 0x0388 0x085C 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO11__SPDIF_IN                            0x0040 0x0388 0x0824 0x1 0x2
+#define MX6SX_PAD_GPIO1_IO11__PWM2_OUT                            0x0040 0x0388 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO11__CCM_CLKO1                           0x0040 0x0388 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO11__MLB_DATA                            0x0040 0x0388 0x07EC 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO11__GPIO1_IO_11                         0x0040 0x0388 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO11__CSU_CSU_ALARM_AUT_0                 0x0040 0x0388 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO11__OBSERVE_MUX_OUT_2                   0x0040 0x0388 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO11__VDEC_DEBUG_40                       0x0040 0x0388 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO12__USB_OTG2_PWR                        0x0044 0x038C 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO12__SPDIF_OUT                           0x0044 0x038C 0x0000 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO12__PWM3_OUT                            0x0044 0x038C 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO12__CCM_CLKO2                           0x0044 0x038C 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO12__MLB_CLK                             0x0044 0x038C 0x07E8 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO12__GPIO1_IO_12                         0x0044 0x038C 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO12__CSU_CSU_ALARM_AUT_1                 0x0044 0x038C 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO12__OBSERVE_MUX_OUT_1                   0x0044 0x038C 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO12__VDEC_DEBUG_39                       0x0044 0x038C 0x0000 0x8 0x0
+#define MX6SX_PAD_GPIO1_IO13__WDOG1_WDOG_ANY                      0x0048 0x0390 0x0000 0x0 0x0
+#define MX6SX_PAD_GPIO1_IO13__ANATOP_OTG2_ID                      0x0048 0x0390 0x0628 0x1 0x0
+#define MX6SX_PAD_GPIO1_IO13__PWM4_OUT                            0x0048 0x0390 0x0000 0x2 0x0
+#define MX6SX_PAD_GPIO1_IO13__CCM_OUT2                            0x0048 0x0390 0x0000 0x3 0x0
+#define MX6SX_PAD_GPIO1_IO13__MLB_SIG                             0x0048 0x0390 0x07F0 0x4 0x0
+#define MX6SX_PAD_GPIO1_IO13__GPIO1_IO_13                         0x0048 0x0390 0x0000 0x5 0x0
+#define MX6SX_PAD_GPIO1_IO13__CSU_CSU_ALARM_AUT_2                 0x0048 0x0390 0x0000 0x6 0x0
+#define MX6SX_PAD_GPIO1_IO13__OBSERVE_MUX_OUT_0                   0x0048 0x0390 0x0000 0x7 0x0
+#define MX6SX_PAD_GPIO1_IO13__VDEC_DEBUG_38                       0x0048 0x0390 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA00__CSI1_DATA_2                         0x004C 0x0394 0x06A8 0x0 0x0
+#define MX6SX_PAD_CSI_DATA00__ESAI_TX_CLK                         0x004C 0x0394 0x078C 0x1 0x1
+#define MX6SX_PAD_CSI_DATA00__AUDMUX_AUD6_TXC                     0x004C 0x0394 0x0684 0x2 0x1
+#define MX6SX_PAD_CSI_DATA00__I2C1_SCL                            0x004C 0x0394 0x07A8 0x3 0x0
+#define MX6SX_PAD_CSI_DATA00__UART6_RI_B                          0x004C 0x0394 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA00__GPIO1_IO_14                         0x004C 0x0394 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA00__WEIM_DATA_23                        0x004C 0x0394 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA00__SAI1_TX_BCLK                        0x004C 0x0394 0x0800 0x7 0x0
+#define MX6SX_PAD_CSI_DATA00__VADC_DATA_4                         0x004C 0x0394 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA00__MMDC_DEBUG_37                       0x004C 0x0394 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA01__CSI1_DATA_3                         0x0050 0x0398 0x06AC 0x0 0x0
+#define MX6SX_PAD_CSI_DATA01__ESAI_TX_FS                          0x0050 0x0398 0x077C 0x1 0x1
+#define MX6SX_PAD_CSI_DATA01__AUDMUX_AUD6_TXFS                    0x0050 0x0398 0x0688 0x2 0x1
+#define MX6SX_PAD_CSI_DATA01__I2C1_SDA                            0x0050 0x0398 0x07AC 0x3 0x0
+#define MX6SX_PAD_CSI_DATA01__UART6_DSR_B                         0x0050 0x0398 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA01__GPIO1_IO_15                         0x0050 0x0398 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA01__WEIM_DATA_22                        0x0050 0x0398 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA01__SAI1_TX_SYNC                        0x0050 0x0398 0x0804 0x7 0x0
+#define MX6SX_PAD_CSI_DATA01__VADC_DATA_5                         0x0050 0x0398 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA01__MMDC_DEBUG_38                       0x0050 0x0398 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA02__CSI1_DATA_4                         0x0054 0x039C 0x06B0 0x0 0x0
+#define MX6SX_PAD_CSI_DATA02__ESAI_RX_CLK                         0x0054 0x039C 0x0788 0x1 0x1
+#define MX6SX_PAD_CSI_DATA02__AUDMUX_AUD6_RXC                     0x0054 0x039C 0x067C 0x2 0x1
+#define MX6SX_PAD_CSI_DATA02__KPP_COL_5                           0x0054 0x039C 0x07C8 0x3 0x0
+#define MX6SX_PAD_CSI_DATA02__UART6_DTR_B                         0x0054 0x039C 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA02__GPIO1_IO_16                         0x0054 0x039C 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA02__WEIM_DATA_21                        0x0054 0x039C 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA02__SAI1_RX_BCLK                        0x0054 0x039C 0x07F4 0x7 0x0
+#define MX6SX_PAD_CSI_DATA02__VADC_DATA_6                         0x0054 0x039C 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA02__MMDC_DEBUG_39                       0x0054 0x039C 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA03__CSI1_DATA_5                         0x0058 0x03A0 0x06B4 0x0 0x0
+#define MX6SX_PAD_CSI_DATA03__ESAI_RX_FS                          0x0058 0x03A0 0x0778 0x1 0x1
+#define MX6SX_PAD_CSI_DATA03__AUDMUX_AUD6_RXFS                    0x0058 0x03A0 0x0680 0x2 0x1
+#define MX6SX_PAD_CSI_DATA03__KPP_ROW_5                           0x0058 0x03A0 0x07D4 0x3 0x0
+#define MX6SX_PAD_CSI_DATA03__UART6_DCD_B                         0x0058 0x03A0 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA03__GPIO1_IO_17                         0x0058 0x03A0 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA03__WEIM_DATA_20                        0x0058 0x03A0 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA03__SAI1_RX_SYNC                        0x0058 0x03A0 0x07FC 0x7 0x0
+#define MX6SX_PAD_CSI_DATA03__VADC_DATA_7                         0x0058 0x03A0 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA03__MMDC_DEBUG_40                       0x0058 0x03A0 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA04__CSI1_DATA_6                         0x005C 0x03A4 0x06B8 0x0 0x0
+#define MX6SX_PAD_CSI_DATA04__ESAI_TX1                            0x005C 0x03A4 0x0794 0x1 0x1
+#define MX6SX_PAD_CSI_DATA04__SPDIF_OUT                           0x005C 0x03A4 0x0000 0x2 0x0
+#define MX6SX_PAD_CSI_DATA04__KPP_COL_6                           0x005C 0x03A4 0x07CC 0x3 0x0
+#define MX6SX_PAD_CSI_DATA04__UART6_RX                            0x005C 0x03A4 0x0858 0x4 0x0
+#define MX6SX_PAD_CSI_DATA04__UART6_TX                            0x005C 0x03A4 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA04__GPIO1_IO_18                         0x005C 0x03A4 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA04__WEIM_DATA_19                        0x005C 0x03A4 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA04__PWM5_OUT                            0x005C 0x03A4 0x0000 0x7 0x0
+#define MX6SX_PAD_CSI_DATA04__VADC_DATA_8                         0x005C 0x03A4 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA04__MMDC_DEBUG_41                       0x005C 0x03A4 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA05__CSI1_DATA_7                         0x0060 0x03A8 0x06BC 0x0 0x0
+#define MX6SX_PAD_CSI_DATA05__ESAI_TX4_RX1                        0x0060 0x03A8 0x07A0 0x1 0x1
+#define MX6SX_PAD_CSI_DATA05__SPDIF_IN                            0x0060 0x03A8 0x0824 0x2 0x1
+#define MX6SX_PAD_CSI_DATA05__KPP_ROW_6                           0x0060 0x03A8 0x07D8 0x3 0x0
+#define MX6SX_PAD_CSI_DATA05__UART6_RX                            0x0060 0x03A8 0x0858 0x4 0x1
+#define MX6SX_PAD_CSI_DATA05__UART6_TX                            0x0060 0x03A8 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_DATA05__GPIO1_IO_19                         0x0060 0x03A8 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA05__WEIM_DATA_18                        0x0060 0x03A8 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA05__PWM6_OUT                            0x0060 0x03A8 0x0000 0x7 0x0
+#define MX6SX_PAD_CSI_DATA05__VADC_DATA_9                         0x0060 0x03A8 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA05__MMDC_DEBUG_42                       0x0060 0x03A8 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA06__CSI1_DATA_8                         0x0064 0x03AC 0x06C0 0x0 0x0
+#define MX6SX_PAD_CSI_DATA06__ESAI_TX2_RX3                        0x0064 0x03AC 0x0798 0x1 0x1
+#define MX6SX_PAD_CSI_DATA06__I2C4_SCL                            0x0064 0x03AC 0x07C0 0x2 0x2
+#define MX6SX_PAD_CSI_DATA06__KPP_COL_7                           0x0064 0x03AC 0x07D0 0x3 0x0
+#define MX6SX_PAD_CSI_DATA06__UART6_RTS_B                         0x0064 0x03AC 0x0854 0x4 0x0
+#define MX6SX_PAD_CSI_DATA06__GPIO1_IO_20                         0x0064 0x03AC 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA06__WEIM_DATA_17                        0x0064 0x03AC 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA06__DCIC2_OUT                           0x0064 0x03AC 0x0000 0x7 0x0
+#define MX6SX_PAD_CSI_DATA06__VADC_DATA_10                        0x0064 0x03AC 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA06__MMDC_DEBUG_43                       0x0064 0x03AC 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_DATA07__CSI1_DATA_9                         0x0068 0x03B0 0x06C4 0x0 0x0
+#define MX6SX_PAD_CSI_DATA07__ESAI_TX3_RX2                        0x0068 0x03B0 0x079C 0x1 0x1
+#define MX6SX_PAD_CSI_DATA07__I2C4_SDA                            0x0068 0x03B0 0x07C4 0x2 0x2
+#define MX6SX_PAD_CSI_DATA07__KPP_ROW_7                           0x0068 0x03B0 0x07DC 0x3 0x0
+#define MX6SX_PAD_CSI_DATA07__UART6_CTS_B                         0x0068 0x03B0 0x0854 0x4 0x1
+#define MX6SX_PAD_CSI_DATA07__GPIO1_IO_21                         0x0068 0x03B0 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_DATA07__WEIM_DATA_16                        0x0068 0x03B0 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_DATA07__DCIC1_OUT                           0x0068 0x03B0 0x0000 0x7 0x0
+#define MX6SX_PAD_CSI_DATA07__VADC_DATA_11                        0x0068 0x03B0 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_DATA07__MMDC_DEBUG_44                       0x0068 0x03B0 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_HSYNC__CSI1_HSYNC                           0x006C 0x03B4 0x0700 0x0 0x0
+#define MX6SX_PAD_CSI_HSYNC__ESAI_TX0                             0x006C 0x03B4 0x0790 0x1 0x1
+#define MX6SX_PAD_CSI_HSYNC__AUDMUX_AUD6_TXD                      0x006C 0x03B4 0x0678 0x2 0x1
+#define MX6SX_PAD_CSI_HSYNC__UART4_RTS_B                          0x006C 0x03B4 0x0844 0x3 0x2
+#define MX6SX_PAD_CSI_HSYNC__MQS_LEFT                             0x006C 0x03B4 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_HSYNC__GPIO1_IO_22                          0x006C 0x03B4 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_HSYNC__WEIM_DATA_25                         0x006C 0x03B4 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_HSYNC__SAI1_TX_DATA_0                       0x006C 0x03B4 0x0000 0x7 0x0
+#define MX6SX_PAD_CSI_HSYNC__VADC_DATA_2                          0x006C 0x03B4 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_HSYNC__MMDC_DEBUG_35                        0x006C 0x03B4 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_MCLK__CSI1_MCLK                             0x0070 0x03B8 0x0000 0x0 0x0
+#define MX6SX_PAD_CSI_MCLK__ESAI_TX_HF_CLK                        0x0070 0x03B8 0x0784 0x1 0x1
+#define MX6SX_PAD_CSI_MCLK__OSC32K_32K_OUT                        0x0070 0x03B8 0x0000 0x2 0x0
+#define MX6SX_PAD_CSI_MCLK__UART4_RX                              0x0070 0x03B8 0x0848 0x3 0x2
+#define MX6SX_PAD_CSI_MCLK__UART4_TX                              0x0070 0x03B8 0x0000 0x3 0x0
+#define MX6SX_PAD_CSI_MCLK__ANATOP_32K_OUT                        0x0070 0x03B8 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_MCLK__GPIO1_IO_23                           0x0070 0x03B8 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_MCLK__WEIM_DATA_26                          0x0070 0x03B8 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_MCLK__CSI1_FIELD                            0x0070 0x03B8 0x070C 0x7 0x0
+#define MX6SX_PAD_CSI_MCLK__VADC_DATA_1                           0x0070 0x03B8 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_MCLK__MMDC_DEBUG_34                         0x0070 0x03B8 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_PIXCLK__CSI1_PIXCLK                         0x0074 0x03BC 0x0704 0x0 0x0
+#define MX6SX_PAD_CSI_PIXCLK__ESAI_RX_HF_CLK                      0x0074 0x03BC 0x0780 0x1 0x1
+#define MX6SX_PAD_CSI_PIXCLK__AUDMUX_MCLK                         0x0074 0x03BC 0x0000 0x2 0x0
+#define MX6SX_PAD_CSI_PIXCLK__UART4_RX                            0x0074 0x03BC 0x0848 0x3 0x3
+#define MX6SX_PAD_CSI_PIXCLK__UART4_TX                            0x0074 0x03BC 0x0000 0x3 0x0
+#define MX6SX_PAD_CSI_PIXCLK__ANATOP_24M_OUT                      0x0074 0x03BC 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_PIXCLK__GPIO1_IO_24                         0x0074 0x03BC 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_PIXCLK__WEIM_DATA_27                        0x0074 0x03BC 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_PIXCLK__ESAI_TX_HF_CLK                      0x0074 0x03BC 0x0784 0x7 0x2
+#define MX6SX_PAD_CSI_PIXCLK__VADC_CLK                            0x0074 0x03BC 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_PIXCLK__MMDC_DEBUG_33                       0x0074 0x03BC 0x0000 0x9 0x0
+#define MX6SX_PAD_CSI_VSYNC__CSI1_VSYNC                           0x0078 0x03C0 0x0708 0x0 0x0
+#define MX6SX_PAD_CSI_VSYNC__ESAI_TX5_RX0                         0x0078 0x03C0 0x07A4 0x1 0x1
+#define MX6SX_PAD_CSI_VSYNC__AUDMUX_AUD6_RXD                      0x0078 0x03C0 0x0674 0x2 0x1
+#define MX6SX_PAD_CSI_VSYNC__UART4_CTS_B                          0x0078 0x03C0 0x0844 0x3 0x3
+#define MX6SX_PAD_CSI_VSYNC__MQS_RIGHT                            0x0078 0x03C0 0x0000 0x4 0x0
+#define MX6SX_PAD_CSI_VSYNC__GPIO1_IO_25                          0x0078 0x03C0 0x0000 0x5 0x0
+#define MX6SX_PAD_CSI_VSYNC__WEIM_DATA_24                         0x0078 0x03C0 0x0000 0x6 0x0
+#define MX6SX_PAD_CSI_VSYNC__SAI1_RX_DATA_0                       0x0078 0x03C0 0x07F8 0x7 0x0
+#define MX6SX_PAD_CSI_VSYNC__VADC_DATA_3                          0x0078 0x03C0 0x0000 0x8 0x0
+#define MX6SX_PAD_CSI_VSYNC__MMDC_DEBUG_36                        0x0078 0x03C0 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET1_COL__ENET1_COL                            0x007C 0x03C4 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET1_COL__ENET2_MDC                            0x007C 0x03C4 0x0000 0x1 0x0
+#define MX6SX_PAD_ENET1_COL__AUDMUX_AUD4_TXC                      0x007C 0x03C4 0x0654 0x2 0x1
+#define MX6SX_PAD_ENET1_COL__UART1_RI_B                           0x007C 0x03C4 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_COL__SPDIF_EXT_CLK                        0x007C 0x03C4 0x0828 0x4 0x1
+#define MX6SX_PAD_ENET1_COL__GPIO2_IO_0                           0x007C 0x03C4 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_COL__CSI2_DATA_23                         0x007C 0x03C4 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET1_COL__LCDIF2_DATA_16                       0x007C 0x03C4 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_COL__VDEC_DEBUG_37                        0x007C 0x03C4 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET1_COL__PCIE_CTRL_DEBUG_31                   0x007C 0x03C4 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET1_CRS__ENET1_CRS                            0x0080 0x03C8 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET1_CRS__ENET2_MDIO                           0x0080 0x03C8 0x0770 0x1 0x1
+#define MX6SX_PAD_ENET1_CRS__AUDMUX_AUD4_TXD                      0x0080 0x03C8 0x0648 0x2 0x1
+#define MX6SX_PAD_ENET1_CRS__UART1_DCD_B                          0x0080 0x03C8 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_CRS__SPDIF_LOCK                           0x0080 0x03C8 0x0000 0x4 0x0
+#define MX6SX_PAD_ENET1_CRS__GPIO2_IO_1                           0x0080 0x03C8 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_CRS__CSI2_DATA_22                         0x0080 0x03C8 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET1_CRS__LCDIF2_DATA_17                       0x0080 0x03C8 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_CRS__VDEC_DEBUG_36                        0x0080 0x03C8 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET1_CRS__PCIE_CTRL_DEBUG_30                   0x0080 0x03C8 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET1_MDC__ENET1_MDC                            0x0084 0x03CC 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET1_MDC__ENET2_MDC                            0x0084 0x03CC 0x0000 0x1 0x0
+#define MX6SX_PAD_ENET1_MDC__AUDMUX_AUD3_RXFS                     0x0084 0x03CC 0x0638 0x2 0x1
+#define MX6SX_PAD_ENET1_MDC__ANATOP_24M_OUT                       0x0084 0x03CC 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_MDC__EPIT2_OUT                            0x0084 0x03CC 0x0000 0x4 0x0
+#define MX6SX_PAD_ENET1_MDC__GPIO2_IO_2                           0x0084 0x03CC 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_MDC__USB_OTG1_PWR                         0x0084 0x03CC 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET1_MDC__PWM7_OUT                             0x0084 0x03CC 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_MDIO__ENET1_MDIO                          0x0088 0x03D0 0x0764 0x0 0x1
+#define MX6SX_PAD_ENET1_MDIO__ENET2_MDIO                          0x0088 0x03D0 0x0770 0x1 0x2
+#define MX6SX_PAD_ENET1_MDIO__AUDMUX_MCLK                         0x0088 0x03D0 0x0000 0x2 0x0
+#define MX6SX_PAD_ENET1_MDIO__OSC32K_32K_OUT                      0x0088 0x03D0 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_MDIO__EPIT1_OUT                           0x0088 0x03D0 0x0000 0x4 0x0
+#define MX6SX_PAD_ENET1_MDIO__GPIO2_IO_3                          0x0088 0x03D0 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_MDIO__USB_OTG1_OC                         0x0088 0x03D0 0x0860 0x6 0x1
+#define MX6SX_PAD_ENET1_MDIO__PWM8_OUT                            0x0088 0x03D0 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__ENET1_RX_CLK                      0x008C 0x03D4 0x0768 0x0 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__ENET1_REF_CLK_25M                 0x008C 0x03D4 0x0000 0x1 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__AUDMUX_AUD4_TXFS                  0x008C 0x03D4 0x0658 0x2 0x1
+#define MX6SX_PAD_ENET1_RX_CLK__UART1_DSR_B                       0x008C 0x03D4 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__SPDIF_OUT                         0x008C 0x03D4 0x0000 0x4 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__GPIO2_IO_4                        0x008C 0x03D4 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__CSI2_DATA_21                      0x008C 0x03D4 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__LCDIF2_DATA_18                    0x008C 0x03D4 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__VDEC_DEBUG_35                     0x008C 0x03D4 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET1_RX_CLK__PCIE_CTRL_DEBUG_29                0x008C 0x03D4 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__ENET1_TX_CLK                      0x0090 0x03D8 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1                    0x0090 0x03D8 0x0760 0x1 0x1
+#define MX6SX_PAD_ENET1_TX_CLK__AUDMUX_AUD4_RXD                   0x0090 0x03D8 0x0644 0x2 0x1
+#define MX6SX_PAD_ENET1_TX_CLK__UART1_DTR_B                       0x0090 0x03D8 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__SPDIF_SR_CLK                      0x0090 0x03D8 0x0000 0x4 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__GPIO2_IO_5                        0x0090 0x03D8 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__CSI2_DATA_20                      0x0090 0x03D8 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__LCDIF2_DATA_19                    0x0090 0x03D8 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__VDEC_DEBUG_34                     0x0090 0x03D8 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET1_TX_CLK__PCIE_CTRL_DEBUG_28                0x0090 0x03D8 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET2_COL__ENET2_COL                            0x0094 0x03DC 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET2_COL__ENET1_MDC                            0x0094 0x03DC 0x0000 0x1 0x0
+#define MX6SX_PAD_ENET2_COL__AUDMUX_AUD4_RXC                      0x0094 0x03DC 0x064C 0x2 0x1
+#define MX6SX_PAD_ENET2_COL__UART1_RX                             0x0094 0x03DC 0x0830 0x3 0x2
+#define MX6SX_PAD_ENET2_COL__UART1_TX                             0x0094 0x03DC 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET2_COL__SPDIF_IN                             0x0094 0x03DC 0x0824 0x4 0x3
+#define MX6SX_PAD_ENET2_COL__GPIO2_IO_6                           0x0094 0x03DC 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET2_COL__ANATOP_OTG1_ID                       0x0094 0x03DC 0x0624 0x6 0x1
+#define MX6SX_PAD_ENET2_COL__LCDIF2_DATA_20                       0x0094 0x03DC 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET2_COL__VDEC_DEBUG_33                        0x0094 0x03DC 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET2_COL__PCIE_CTRL_DEBUG_27                   0x0094 0x03DC 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET2_CRS__ENET2_CRS                            0x0098 0x03E0 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET2_CRS__ENET1_MDIO                           0x0098 0x03E0 0x0764 0x1 0x2
+#define MX6SX_PAD_ENET2_CRS__AUDMUX_AUD4_RXFS                     0x0098 0x03E0 0x0650 0x2 0x1
+#define MX6SX_PAD_ENET2_CRS__UART1_RX                             0x0098 0x03E0 0x0830 0x3 0x3
+#define MX6SX_PAD_ENET2_CRS__UART1_TX                             0x0098 0x03E0 0x0000 0x3 0x0
+#define MX6SX_PAD_ENET2_CRS__MLB_SIG                              0x0098 0x03E0 0x07F0 0x4 0x1
+#define MX6SX_PAD_ENET2_CRS__GPIO2_IO_7                           0x0098 0x03E0 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET2_CRS__ANATOP_OTG2_ID                       0x0098 0x03E0 0x0628 0x6 0x1
+#define MX6SX_PAD_ENET2_CRS__LCDIF2_DATA_21                       0x0098 0x03E0 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET2_CRS__VDEC_DEBUG_32                        0x0098 0x03E0 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET2_CRS__PCIE_CTRL_DEBUG_26                   0x0098 0x03E0 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__ENET2_RX_CLK                      0x009C 0x03E4 0x0774 0x0 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M                 0x009C 0x03E4 0x0000 0x1 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__I2C3_SCL                          0x009C 0x03E4 0x07B8 0x2 0x1
+#define MX6SX_PAD_ENET2_RX_CLK__UART1_RTS_B                       0x009C 0x03E4 0x082C 0x3 0x2
+#define MX6SX_PAD_ENET2_RX_CLK__MLB_DATA                          0x009C 0x03E4 0x07EC 0x4 0x1
+#define MX6SX_PAD_ENET2_RX_CLK__GPIO2_IO_8                        0x009C 0x03E4 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__USB_OTG2_OC                       0x009C 0x03E4 0x085C 0x6 0x1
+#define MX6SX_PAD_ENET2_RX_CLK__LCDIF2_DATA_22                    0x009C 0x03E4 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__VDEC_DEBUG_31                     0x009C 0x03E4 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET2_RX_CLK__PCIE_CTRL_DEBUG_25                0x009C 0x03E4 0x0000 0x9 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__ENET2_TX_CLK                      0x00A0 0x03E8 0x0000 0x0 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__ENET2_REF_CLK2                    0x00A0 0x03E8 0x076C 0x1 0x1
+#define MX6SX_PAD_ENET2_TX_CLK__I2C3_SDA                          0x00A0 0x03E8 0x07BC 0x2 0x1
+#define MX6SX_PAD_ENET2_TX_CLK__UART1_CTS_B                       0x00A0 0x03E8 0x082C 0x3 0x3
+#define MX6SX_PAD_ENET2_TX_CLK__MLB_CLK                           0x00A0 0x03E8 0x07E8 0x4 0x1
+#define MX6SX_PAD_ENET2_TX_CLK__GPIO2_IO_9                        0x00A0 0x03E8 0x0000 0x5 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__USB_OTG2_PWR                      0x00A0 0x03E8 0x0000 0x6 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__LCDIF2_DATA_23                    0x00A0 0x03E8 0x0000 0x7 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__VDEC_DEBUG_30                     0x00A0 0x03E8 0x0000 0x8 0x0
+#define MX6SX_PAD_ENET2_TX_CLK__PCIE_CTRL_DEBUG_24                0x00A0 0x03E8 0x0000 0x9 0x0
+#define MX6SX_PAD_KEY_COL0__KPP_COL_0                             0x00A4 0x03EC 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_COL0__USDHC3_CD_B                           0x00A4 0x03EC 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_COL0__UART6_RTS_B                           0x00A4 0x03EC 0x0854 0x2 0x2
+#define MX6SX_PAD_KEY_COL0__ECSPI1_SCLK                           0x00A4 0x03EC 0x0710 0x3 0x0
+#define MX6SX_PAD_KEY_COL0__AUDMUX_AUD5_TXC                       0x00A4 0x03EC 0x066C 0x4 0x0
+#define MX6SX_PAD_KEY_COL0__GPIO2_IO_10                           0x00A4 0x03EC 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_COL0__SDMA_EXT_EVENT_1                      0x00A4 0x03EC 0x0820 0x6 0x1
+#define MX6SX_PAD_KEY_COL0__SAI2_TX_BCLK                          0x00A4 0x03EC 0x0814 0x7 0x0
+#define MX6SX_PAD_KEY_COL0__VADC_DATA_0                           0x00A4 0x03EC 0x0000 0x8 0x0
+#define MX6SX_PAD_KEY_COL1__KPP_COL_1                             0x00A8 0x03F0 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_COL1__USDHC3_RESET_B                        0x00A8 0x03F0 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_COL1__UART6_RX                              0x00A8 0x03F0 0x0858 0x2 0x2
+#define MX6SX_PAD_KEY_COL1__UART6_TX                              0x00A8 0x03F0 0x0000 0x2 0x0
+#define MX6SX_PAD_KEY_COL1__ECSPI1_MISO                           0x00A8 0x03F0 0x0714 0x3 0x0
+#define MX6SX_PAD_KEY_COL1__AUDMUX_AUD5_TXFS                      0x00A8 0x03F0 0x0670 0x4 0x0
+#define MX6SX_PAD_KEY_COL1__GPIO2_IO_11                           0x00A8 0x03F0 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_COL1__USDHC3_RESET                          0x00A8 0x03F0 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_COL1__SAI2_TX_SYNC                          0x00A8 0x03F0 0x0818 0x7 0x0
+#define MX6SX_PAD_KEY_COL2__KPP_COL_2                             0x00AC 0x03F4 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_COL2__USDHC4_CD_B                           0x00AC 0x03F4 0x0874 0x1 0x1
+#define MX6SX_PAD_KEY_COL2__UART5_RTS_B                           0x00AC 0x03F4 0x084C 0x2 0x2
+#define MX6SX_PAD_KEY_COL2__CAN1_TX                               0x00AC 0x03F4 0x0000 0x3 0x0
+#define MX6SX_PAD_KEY_COL2__CANFD_TX1                             0x00AC 0x03F4 0x0000 0x4 0x0
+#define MX6SX_PAD_KEY_COL2__GPIO2_IO_12                           0x00AC 0x03F4 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_COL2__WEIM_DATA_30                          0x00AC 0x03F4 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_COL2__ECSPI1_RDY                            0x00AC 0x03F4 0x0000 0x7 0x0
+#define MX6SX_PAD_KEY_COL3__KPP_COL_3                             0x00B0 0x03F8 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_COL3__USDHC4_LCTL                           0x00B0 0x03F8 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_COL3__UART5_RX                              0x00B0 0x03F8 0x0850 0x2 0x2
+#define MX6SX_PAD_KEY_COL3__UART5_TX                              0x00B0 0x03F8 0x0000 0x2 0x0
+#define MX6SX_PAD_KEY_COL3__CAN2_TX                               0x00B0 0x03F8 0x0000 0x3 0x0
+#define MX6SX_PAD_KEY_COL3__CANFD_TX2                             0x00B0 0x03F8 0x0000 0x4 0x0
+#define MX6SX_PAD_KEY_COL3__GPIO2_IO_13                           0x00B0 0x03F8 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_COL3__WEIM_DATA_28                          0x00B0 0x03F8 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_COL3__ECSPI1_SS2                            0x00B0 0x03F8 0x0000 0x7 0x0
+#define MX6SX_PAD_KEY_COL4__KPP_COL_4                             0x00B4 0x03FC 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_COL4__ENET2_MDC                             0x00B4 0x03FC 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_COL4__I2C3_SCL                              0x00B4 0x03FC 0x07B8 0x2 0x2
+#define MX6SX_PAD_KEY_COL4__USDHC2_LCTL                           0x00B4 0x03FC 0x0000 0x3 0x0
+#define MX6SX_PAD_KEY_COL4__AUDMUX_AUD5_RXC                       0x00B4 0x03FC 0x0664 0x4 0x0
+#define MX6SX_PAD_KEY_COL4__GPIO2_IO_14                           0x00B4 0x03FC 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_COL4__WEIM_CRE                              0x00B4 0x03FC 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_COL4__SAI2_RX_BCLK                          0x00B4 0x03FC 0x0808 0x7 0x0
+#define MX6SX_PAD_KEY_ROW0__KPP_ROW_0                             0x00B8 0x0400 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_ROW0__USDHC3_WP                             0x00B8 0x0400 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_ROW0__UART6_CTS_B                           0x00B8 0x0400 0x0854 0x2 0x3
+#define MX6SX_PAD_KEY_ROW0__ECSPI1_MOSI                           0x00B8 0x0400 0x0718 0x3 0x0
+#define MX6SX_PAD_KEY_ROW0__AUDMUX_AUD5_TXD                       0x00B8 0x0400 0x0660 0x4 0x0
+#define MX6SX_PAD_KEY_ROW0__GPIO2_IO_15                           0x00B8 0x0400 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_ROW0__SDMA_EXT_EVENT_0                      0x00B8 0x0400 0x081C 0x6 0x1
+#define MX6SX_PAD_KEY_ROW0__SAI2_TX_DATA_0                        0x00B8 0x0400 0x0000 0x7 0x0
+#define MX6SX_PAD_KEY_ROW0__GPU_IDLE                              0x00B8 0x0400 0x0000 0x8 0x0
+#define MX6SX_PAD_KEY_ROW1__KPP_ROW_1                             0x00BC 0x0404 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_ROW1__USDHC4_VSELECT                        0x00BC 0x0404 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_ROW1__UART6_RX                              0x00BC 0x0404 0x0858 0x2 0x3
+#define MX6SX_PAD_KEY_ROW1__UART6_TX                              0x00BC 0x0404 0x0000 0x2 0x0
+#define MX6SX_PAD_KEY_ROW1__ECSPI1_SS0                            0x00BC 0x0404 0x071C 0x3 0x0
+#define MX6SX_PAD_KEY_ROW1__AUDMUX_AUD5_RXD                       0x00BC 0x0404 0x065C 0x4 0x0
+#define MX6SX_PAD_KEY_ROW1__GPIO2_IO_16                           0x00BC 0x0404 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_ROW1__WEIM_DATA_31                          0x00BC 0x0404 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_ROW1__SAI2_RX_DATA_0                        0x00BC 0x0404 0x080C 0x7 0x0
+#define MX6SX_PAD_KEY_ROW1__M4_NMI                                0x00BC 0x0404 0x0000 0x8 0x0
+#define MX6SX_PAD_KEY_ROW2__KPP_ROW_2                             0x00C0 0x0408 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_ROW2__USDHC4_WP                             0x00C0 0x0408 0x0878 0x1 0x1
+#define MX6SX_PAD_KEY_ROW2__UART5_CTS_B                           0x00C0 0x0408 0x084C 0x2 0x3
+#define MX6SX_PAD_KEY_ROW2__CAN1_RX                               0x00C0 0x0408 0x068C 0x3 0x1
+#define MX6SX_PAD_KEY_ROW2__CANFD_RX1                             0x00C0 0x0408 0x0694 0x4 0x1
+#define MX6SX_PAD_KEY_ROW2__GPIO2_IO_17                           0x00C0 0x0408 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_ROW2__WEIM_DATA_29                          0x00C0 0x0408 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_ROW2__ECSPI1_SS3                            0x00C0 0x0408 0x0000 0x7 0x0
+#define MX6SX_PAD_KEY_ROW3__KPP_ROW_3                             0x00C4 0x040C 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_ROW3__USDHC3_LCTL                           0x00C4 0x040C 0x0000 0x1 0x0
+#define MX6SX_PAD_KEY_ROW3__UART5_RX                              0x00C4 0x040C 0x0850 0x2 0x3
+#define MX6SX_PAD_KEY_ROW3__UART5_TX                              0x00C4 0x040C 0x0000 0x2 0x0
+#define MX6SX_PAD_KEY_ROW3__CAN2_RX                               0x00C4 0x040C 0x0690 0x3 0x1
+#define MX6SX_PAD_KEY_ROW3__CANFD_RX2                             0x00C4 0x040C 0x0698 0x4 0x1
+#define MX6SX_PAD_KEY_ROW3__GPIO2_IO_18                           0x00C4 0x040C 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_ROW3__WEIM_DTACK_B                          0x00C4 0x040C 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_ROW3__ECSPI1_SS1                            0x00C4 0x040C 0x0000 0x7 0x0
+#define MX6SX_PAD_KEY_ROW4__KPP_ROW_4                             0x00C8 0x0410 0x0000 0x0 0x0
+#define MX6SX_PAD_KEY_ROW4__ENET2_MDIO                            0x00C8 0x0410 0x0770 0x1 0x3
+#define MX6SX_PAD_KEY_ROW4__I2C3_SDA                              0x00C8 0x0410 0x07BC 0x2 0x2
+#define MX6SX_PAD_KEY_ROW4__USDHC1_LCTL                           0x00C8 0x0410 0x0000 0x3 0x0
+#define MX6SX_PAD_KEY_ROW4__AUDMUX_AUD5_RXFS                      0x00C8 0x0410 0x0668 0x4 0x0
+#define MX6SX_PAD_KEY_ROW4__GPIO2_IO_19                           0x00C8 0x0410 0x0000 0x5 0x0
+#define MX6SX_PAD_KEY_ROW4__WEIM_ACLK_FREERUN                     0x00C8 0x0410 0x0000 0x6 0x0
+#define MX6SX_PAD_KEY_ROW4__SAI2_RX_SYNC                          0x00C8 0x0410 0x0810 0x7 0x0
+#define MX6SX_PAD_LCD1_CLK__LCDIF1_CLK                            0x00CC 0x0414 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_CLK__LCDIF1_WR_RWN                         0x00CC 0x0414 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_CLK__AUDMUX_AUD3_RXC                       0x00CC 0x0414 0x0634 0x2 0x1
+#define MX6SX_PAD_LCD1_CLK__ENET1_1588_EVENT2_IN                  0x00CC 0x0414 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_CLK__CSI1_DATA_16                          0x00CC 0x0414 0x06DC 0x4 0x0
+#define MX6SX_PAD_LCD1_CLK__GPIO3_IO_0                            0x00CC 0x0414 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_CLK__USDHC1_WP                             0x00CC 0x0414 0x0868 0x6 0x0
+#define MX6SX_PAD_LCD1_CLK__SIM_M_HADDR_16                        0x00CC 0x0414 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_CLK__VADC_TEST_0                           0x00CC 0x0414 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_CLK__MMDC_DEBUG_0                          0x00CC 0x0414 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0                      0x00D0 0x0418 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA00__WEIM_CS1_B                         0x00D0 0x0418 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA00__M4_TRACE_0                         0x00D0 0x0418 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA00__KITTEN_TRACE_0                     0x00D0 0x0418 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA00__CSI1_DATA_20                       0x00D0 0x0418 0x06EC 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA00__GPIO3_IO_1                         0x00D0 0x0418 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA00__SRC_BT_CFG_0                       0x00D0 0x0418 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA00__SIM_M_HADDR_21                     0x00D0 0x0418 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA00__VADC_TEST_5                        0x00D0 0x0418 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA00__MMDC_DEBUG_5                       0x00D0 0x0418 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1                      0x00D4 0x041C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA01__WEIM_CS2_B                         0x00D4 0x041C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA01__M4_TRACE_1                         0x00D4 0x041C 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA01__KITTEN_TRACE_1                     0x00D4 0x041C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA01__CSI1_DATA_21                       0x00D4 0x041C 0x06F0 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA01__GPIO3_IO_2                         0x00D4 0x041C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA01__SRC_BT_CFG_1                       0x00D4 0x041C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA01__SIM_M_HADDR_22                     0x00D4 0x041C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA01__VADC_TEST_6                        0x00D4 0x041C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA01__MMDC_DEBUG_6                       0x00D4 0x041C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2                      0x00D8 0x0420 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA02__WEIM_CS3_B                         0x00D8 0x0420 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA02__M4_TRACE_2                         0x00D8 0x0420 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA02__KITTEN_TRACE_2                     0x00D8 0x0420 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA02__CSI1_DATA_22                       0x00D8 0x0420 0x06F4 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA02__GPIO3_IO_3                         0x00D8 0x0420 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA02__SRC_BT_CFG_2                       0x00D8 0x0420 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA02__SIM_M_HADDR_23                     0x00D8 0x0420 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA02__VADC_TEST_7                        0x00D8 0x0420 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA02__MMDC_DEBUG_7                       0x00D8 0x0420 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3                      0x00DC 0x0424 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA03__WEIM_ADDR_24                       0x00DC 0x0424 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA03__M4_TRACE_3                         0x00DC 0x0424 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA03__KITTEN_TRACE_3                     0x00DC 0x0424 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA03__CSI1_DATA_23                       0x00DC 0x0424 0x06F8 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA03__GPIO3_IO_4                         0x00DC 0x0424 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA03__SRC_BT_CFG_3                       0x00DC 0x0424 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA03__SIM_M_HADDR_24                     0x00DC 0x0424 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA03__VADC_TEST_8                        0x00DC 0x0424 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA03__MMDC_DEBUG_8                       0x00DC 0x0424 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4                      0x00E0 0x0428 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA04__WEIM_ADDR_25                       0x00E0 0x0428 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA04__KITTEN_TRACE_4                     0x00E0 0x0428 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA04__CSI1_VSYNC                         0x00E0 0x0428 0x0708 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA04__GPIO3_IO_5                         0x00E0 0x0428 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA04__SRC_BT_CFG_4                       0x00E0 0x0428 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA04__SIM_M_HADDR_25                     0x00E0 0x0428 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA04__VADC_TEST_9                        0x00E0 0x0428 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA04__MMDC_DEBUG_9                       0x00E0 0x0428 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5                      0x00E4 0x042C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA05__WEIM_ADDR_26                       0x00E4 0x042C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA05__KITTEN_TRACE_5                     0x00E4 0x042C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA05__CSI1_HSYNC                         0x00E4 0x042C 0x0700 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA05__GPIO3_IO_6                         0x00E4 0x042C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA05__SRC_BT_CFG_5                       0x00E4 0x042C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA05__SIM_M_HADDR_26                     0x00E4 0x042C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA05__VADC_TEST_10                       0x00E4 0x042C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA05__MMDC_DEBUG_10                      0x00E4 0x042C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6                      0x00E8 0x0430 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA06__WEIM_EB_B_2                        0x00E8 0x0430 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA06__KITTEN_TRACE_6                     0x00E8 0x0430 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA06__CSI1_PIXCLK                        0x00E8 0x0430 0x0704 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA06__GPIO3_IO_7                         0x00E8 0x0430 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA06__SRC_BT_CFG_6                       0x00E8 0x0430 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA06__SIM_M_HADDR_27                     0x00E8 0x0430 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA06__VADC_TEST_11                       0x00E8 0x0430 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA06__MMDC_DEBUG_11                      0x00E8 0x0430 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7                      0x00EC 0x0434 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA07__WEIM_EB_B_3                        0x00EC 0x0434 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA07__KITTEN_TRACE_7                     0x00EC 0x0434 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA07__CSI1_MCLK                          0x00EC 0x0434 0x0000 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA07__GPIO3_IO_8                         0x00EC 0x0434 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA07__SRC_BT_CFG_7                       0x00EC 0x0434 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA07__SIM_M_HADDR_28                     0x00EC 0x0434 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA07__VADC_TEST_12                       0x00EC 0x0434 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA07__MMDC_DEBUG_12                      0x00EC 0x0434 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8                      0x00F0 0x0438 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA08__WEIM_AD_8                          0x00F0 0x0438 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA08__KITTEN_TRACE_8                     0x00F0 0x0438 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA08__CSI1_DATA_9                        0x00F0 0x0438 0x06C4 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA08__GPIO3_IO_9                         0x00F0 0x0438 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA08__SRC_BT_CFG_8                       0x00F0 0x0438 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA08__SIM_M_HADDR_29                     0x00F0 0x0438 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA08__VADC_TEST_13                       0x00F0 0x0438 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA08__MMDC_DEBUG_13                      0x00F0 0x0438 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9                      0x00F4 0x043C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA09__WEIM_AD_9                          0x00F4 0x043C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA09__KITTEN_TRACE_9                     0x00F4 0x043C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA09__CSI1_DATA_8                        0x00F4 0x043C 0x06C0 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA09__GPIO3_IO_10                        0x00F4 0x043C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA09__SRC_BT_CFG_9                       0x00F4 0x043C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA09__SIM_M_HADDR_30                     0x00F4 0x043C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA09__VADC_TEST_14                       0x00F4 0x043C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA09__MMDC_DEBUG_14                      0x00F4 0x043C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10                     0x00F8 0x0440 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA10__WEIM_AD_10                         0x00F8 0x0440 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA10__KITTEN_TRACE_10                    0x00F8 0x0440 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA10__CSI1_DATA_7                        0x00F8 0x0440 0x06BC 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA10__GPIO3_IO_11                        0x00F8 0x0440 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA10__SRC_BT_CFG_10                      0x00F8 0x0440 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA10__SIM_M_HADDR_31                     0x00F8 0x0440 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA10__VADC_TEST_15                       0x00F8 0x0440 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA10__MMDC_DEBUG_15                      0x00F8 0x0440 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11                     0x00FC 0x0444 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA11__WEIM_AD_11                         0x00FC 0x0444 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA11__KITTEN_TRACE_11                    0x00FC 0x0444 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA11__CSI1_DATA_6                        0x00FC 0x0444 0x06B8 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA11__GPIO3_IO_12                        0x00FC 0x0444 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA11__SRC_BT_CFG_11                      0x00FC 0x0444 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA11__SIM_M_HBURST_0                     0x00FC 0x0444 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA11__VADC_TEST_16                       0x00FC 0x0444 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA11__MMDC_DEBUG_16                      0x00FC 0x0444 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12                     0x0100 0x0448 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA12__WEIM_AD_12                         0x0100 0x0448 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA12__KITTEN_TRACE_12                    0x0100 0x0448 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA12__CSI1_DATA_5                        0x0100 0x0448 0x06B4 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA12__GPIO3_IO_13                        0x0100 0x0448 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA12__SRC_BT_CFG_12                      0x0100 0x0448 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA12__SIM_M_HBURST_1                     0x0100 0x0448 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA12__VADC_TEST_17                       0x0100 0x0448 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA12__MMDC_DEBUG_17                      0x0100 0x0448 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13                     0x0104 0x044C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA13__WEIM_AD_13                         0x0104 0x044C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA13__KITTEN_TRACE_13                    0x0104 0x044C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA13__CSI1_DATA_4                        0x0104 0x044C 0x06B0 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA13__GPIO3_IO_14                        0x0104 0x044C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA13__SRC_BT_CFG_13                      0x0104 0x044C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA13__SIM_M_HBURST_2                     0x0104 0x044C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA13__VADC_TEST_18                       0x0104 0x044C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA13__MMDC_DEBUG_18                      0x0104 0x044C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14                     0x0108 0x0450 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA14__WEIM_AD_14                         0x0108 0x0450 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA14__KITTEN_TRACE_14                    0x0108 0x0450 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA14__CSI1_DATA_3                        0x0108 0x0450 0x06AC 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA14__GPIO3_IO_15                        0x0108 0x0450 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA14__SRC_BT_CFG_14                      0x0108 0x0450 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA14__SIM_M_HMASTLOCK                    0x0108 0x0450 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA14__VADC_TEST_19                       0x0108 0x0450 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA14__MMDC_DEBUG_19                      0x0108 0x0450 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15                     0x010C 0x0454 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA15__WEIM_AD_15                         0x010C 0x0454 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA15__KITTEN_TRACE_15                    0x010C 0x0454 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA15__CSI1_DATA_2                        0x010C 0x0454 0x06A8 0x4 0x1
+#define MX6SX_PAD_LCD1_DATA15__GPIO3_IO_16                        0x010C 0x0454 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA15__SRC_BT_CFG_15                      0x010C 0x0454 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA15__SIM_M_HPROT_0                      0x010C 0x0454 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA15__VDEC_DEBUG_0                       0x010C 0x0454 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA15__MMDC_DEBUG_20                      0x010C 0x0454 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16                     0x0110 0x0458 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA16__WEIM_ADDR_16                       0x0110 0x0458 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA16__M4_TRACE_CLK                       0x0110 0x0458 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA16__KITTEN_TRACE_CLK                   0x0110 0x0458 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA16__CSI1_DATA_1                        0x0110 0x0458 0x06A4 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA16__GPIO3_IO_17                        0x0110 0x0458 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA16__SRC_BT_CFG_24                      0x0110 0x0458 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA16__SIM_M_HPROT_1                      0x0110 0x0458 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA16__VDEC_DEBUG_1                       0x0110 0x0458 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA16__MMDC_DEBUG_21                      0x0110 0x0458 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17                     0x0114 0x045C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA17__WEIM_ADDR_17                       0x0114 0x045C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA17__KITTEN_TRACE_CTL                   0x0114 0x045C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA17__CSI1_DATA_0                        0x0114 0x045C 0x06A0 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA17__GPIO3_IO_18                        0x0114 0x045C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA17__SRC_BT_CFG_25                      0x0114 0x045C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA17__SIM_M_HPROT_2                      0x0114 0x045C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA17__VDEC_DEBUG_2                       0x0114 0x045C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA17__MMDC_DEBUG_22                      0x0114 0x045C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA18__LCDIF1_DATA_18                     0x0118 0x0460 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA18__WEIM_ADDR_18                       0x0118 0x0460 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA18__M4_EVENTO                          0x0118 0x0460 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA18__KITTEN_EVENTO                      0x0118 0x0460 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA18__CSI1_DATA_15                       0x0118 0x0460 0x06D8 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA18__GPIO3_IO_19                        0x0118 0x0460 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA18__SRC_BT_CFG_26                      0x0118 0x0460 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA18__SIM_M_HPROT_3                      0x0118 0x0460 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA18__VDEC_DEBUG_3                       0x0118 0x0460 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA18__MMDC_DEBUG_23                      0x0118 0x0460 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA19__LCDIF1_DATA_19                     0x011C 0x0464 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA19__WEIM_ADDR_19                       0x011C 0x0464 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA19__M4_TRACE_SWO                       0x011C 0x0464 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA19__CSI1_DATA_14                       0x011C 0x0464 0x06D4 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA19__GPIO3_IO_20                        0x011C 0x0464 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA19__SRC_BT_CFG_27                      0x011C 0x0464 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA19__SIM_M_HREADYOUT                    0x011C 0x0464 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA19__VDEC_DEBUG_4                       0x011C 0x0464 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA19__MMDC_DEBUG_24                      0x011C 0x0464 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA20__LCDIF1_DATA_20                     0x0120 0x0468 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA20__WEIM_ADDR_20                       0x0120 0x0468 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA20__PWM8_OUT                           0x0120 0x0468 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA20__ENET1_1588_EVENT2_OUT              0x0120 0x0468 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA20__CSI1_DATA_13                       0x0120 0x0468 0x06D0 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA20__GPIO3_IO_21                        0x0120 0x0468 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA20__SRC_BT_CFG_28                      0x0120 0x0468 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA20__SIM_M_HRESP                        0x0120 0x0468 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA20__VDEC_DEBUG_5                       0x0120 0x0468 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA20__MMDC_DEBUG_25                      0x0120 0x0468 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA21__LCDIF1_DATA_21                     0x0124 0x046C 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA21__WEIM_ADDR_21                       0x0124 0x046C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA21__PWM7_OUT                           0x0124 0x046C 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA21__ENET1_1588_EVENT3_OUT              0x0124 0x046C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA21__CSI1_DATA_12                       0x0124 0x046C 0x06CC 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA21__GPIO3_IO_22                        0x0124 0x046C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA21__SRC_BT_CFG_29                      0x0124 0x046C 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA21__SIM_M_HSIZE_0                      0x0124 0x046C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA21__VDEC_DEBUG_6                       0x0124 0x046C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA21__MMDC_DEBUG_26                      0x0124 0x046C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA22__LCDIF1_DATA_22                     0x0128 0x0470 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA22__WEIM_ADDR_22                       0x0128 0x0470 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA22__PWM6_OUT                           0x0128 0x0470 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA22__ENET2_1588_EVENT2_OUT              0x0128 0x0470 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA22__CSI1_DATA_11                       0x0128 0x0470 0x06C8 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA22__GPIO3_IO_23                        0x0128 0x0470 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA22__SRC_BT_CFG_30                      0x0128 0x0470 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA22__SIM_M_HSIZE_1                      0x0128 0x0470 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA22__VDEC_DEBUG_7                       0x0128 0x0470 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA22__MMDC_DEBUG_27                      0x0128 0x0470 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_DATA23__LCDIF1_DATA_23                     0x012C 0x0474 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_DATA23__WEIM_ADDR_23                       0x012C 0x0474 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_DATA23__PWM5_OUT                           0x012C 0x0474 0x0000 0x2 0x0
+#define MX6SX_PAD_LCD1_DATA23__ENET2_1588_EVENT3_OUT              0x012C 0x0474 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_DATA23__CSI1_DATA_10                       0x012C 0x0474 0x06FC 0x4 0x0
+#define MX6SX_PAD_LCD1_DATA23__GPIO3_IO_24                        0x012C 0x0474 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_DATA23__SRC_BT_CFG_31                      0x012C 0x0474 0x0000 0x6 0x0
+#define MX6SX_PAD_LCD1_DATA23__SIM_M_HSIZE_2                      0x012C 0x0474 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_DATA23__VDEC_DEBUG_8                       0x012C 0x0474 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_DATA23__MMDC_DEBUG_28                      0x012C 0x0474 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE                      0x0130 0x0478 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_ENABLE__LCDIF1_RD_E                        0x0130 0x0478 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_ENABLE__AUDMUX_AUD3_TXC                    0x0130 0x0478 0x063C 0x2 0x1
+#define MX6SX_PAD_LCD1_ENABLE__ENET1_1588_EVENT3_IN               0x0130 0x0478 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_ENABLE__CSI1_DATA_17                       0x0130 0x0478 0x06E0 0x4 0x0
+#define MX6SX_PAD_LCD1_ENABLE__GPIO3_IO_25                        0x0130 0x0478 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_ENABLE__USDHC1_CD_B                        0x0130 0x0478 0x0864 0x6 0x0
+#define MX6SX_PAD_LCD1_ENABLE__SIM_M_HADDR_17                     0x0130 0x0478 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_ENABLE__VADC_TEST_1                        0x0130 0x0478 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_ENABLE__MMDC_DEBUG_1                       0x0130 0x0478 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC                        0x0134 0x047C 0x07E0 0x0 0x0
+#define MX6SX_PAD_LCD1_HSYNC__LCDIF1_RS                           0x0134 0x047C 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_HSYNC__AUDMUX_AUD3_TXD                     0x0134 0x047C 0x0630 0x2 0x1
+#define MX6SX_PAD_LCD1_HSYNC__ENET2_1588_EVENT2_IN                0x0134 0x047C 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_HSYNC__CSI1_DATA_18                        0x0134 0x047C 0x06E4 0x4 0x0
+#define MX6SX_PAD_LCD1_HSYNC__GPIO3_IO_26                         0x0134 0x047C 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_HSYNC__USDHC2_WP                           0x0134 0x047C 0x0870 0x6 0x0
+#define MX6SX_PAD_LCD1_HSYNC__SIM_M_HADDR_18                      0x0134 0x047C 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_HSYNC__VADC_TEST_2                         0x0134 0x047C 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_HSYNC__MMDC_DEBUG_2                        0x0134 0x047C 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_RESET__LCDIF1_RESET                        0x0138 0x0480 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_RESET__LCDIF1_CS                           0x0138 0x0480 0x0000 0x1 0x0
+#define MX6SX_PAD_LCD1_RESET__AUDMUX_AUD3_RXD                     0x0138 0x0480 0x062C 0x2 0x1
+#define MX6SX_PAD_LCD1_RESET__KITTEN_EVENTI                       0x0138 0x0480 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_RESET__M4_EVENTI                           0x0138 0x0480 0x0000 0x4 0x0
+#define MX6SX_PAD_LCD1_RESET__GPIO3_IO_27                         0x0138 0x0480 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_RESET__CCM_PMIC_RDY                        0x0138 0x0480 0x069C 0x6 0x0
+#define MX6SX_PAD_LCD1_RESET__SIM_M_HADDR_20                      0x0138 0x0480 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_RESET__VADC_TEST_4                         0x0138 0x0480 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_RESET__MMDC_DEBUG_4                        0x0138 0x0480 0x0000 0x9 0x0
+#define MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC                        0x013C 0x0484 0x0000 0x0 0x0
+#define MX6SX_PAD_LCD1_VSYNC__LCDIF1_BUSY                         0x013C 0x0484 0x07E0 0x1 0x1
+#define MX6SX_PAD_LCD1_VSYNC__AUDMUX_AUD3_TXFS                    0x013C 0x0484 0x0640 0x2 0x1
+#define MX6SX_PAD_LCD1_VSYNC__ENET2_1588_EVENT3_IN                0x013C 0x0484 0x0000 0x3 0x0
+#define MX6SX_PAD_LCD1_VSYNC__CSI1_DATA_19                        0x013C 0x0484 0x06E8 0x4 0x0
+#define MX6SX_PAD_LCD1_VSYNC__GPIO3_IO_28                         0x013C 0x0484 0x0000 0x5 0x0
+#define MX6SX_PAD_LCD1_VSYNC__USDHC2_CD_B                         0x013C 0x0484 0x086C 0x6 0x0
+#define MX6SX_PAD_LCD1_VSYNC__SIM_M_HADDR_19                      0x013C 0x0484 0x0000 0x7 0x0
+#define MX6SX_PAD_LCD1_VSYNC__VADC_TEST_3                         0x013C 0x0484 0x0000 0x8 0x0
+#define MX6SX_PAD_LCD1_VSYNC__MMDC_DEBUG_3                        0x013C 0x0484 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_ALE__RAWNAND_ALE                           0x0140 0x0488 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_ALE__I2C3_SDA                              0x0140 0x0488 0x07BC 0x1 0x0
+#define MX6SX_PAD_NAND_ALE__QSPI2_A_SS0_B                         0x0140 0x0488 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_ALE__ECSPI2_SS0                            0x0140 0x0488 0x072C 0x3 0x0
+#define MX6SX_PAD_NAND_ALE__ESAI_TX3_RX2                          0x0140 0x0488 0x079C 0x4 0x0
+#define MX6SX_PAD_NAND_ALE__GPIO4_IO_0                            0x0140 0x0488 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_ALE__WEIM_CS0_B                            0x0140 0x0488 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_ALE__TPSMP_HDATA_0                         0x0140 0x0488 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_ALE__ANATOP_USBPHY1_TSTI_TX_EN             0x0140 0x0488 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_ALE__SDMA_DEBUG_PC_12                      0x0140 0x0488 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_CE0_B__RAWNAND_CE0_B                       0x0144 0x048C 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_CE0_B__USDHC2_VSELECT                      0x0144 0x048C 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_CE0_B__QSPI2_A_DATA_2                      0x0144 0x048C 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_CE0_B__AUDMUX_AUD4_TXC                     0x0144 0x048C 0x0654 0x3 0x0
+#define MX6SX_PAD_NAND_CE0_B__ESAI_TX_CLK                         0x0144 0x048C 0x078C 0x4 0x0
+#define MX6SX_PAD_NAND_CE0_B__GPIO4_IO_1                          0x0144 0x048C 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_CE0_B__WEIM_LBA_B                          0x0144 0x048C 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_CE0_B__TPSMP_HDATA_3                       0x0144 0x048C 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_CE0_B__ANATOP_USBPHY1_TSTI_TX_HIZ          0x0144 0x048C 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_CE0_B__SDMA_DEBUG_PC_9                     0x0144 0x048C 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_CE1_B__RAWNAND_CE1_B                       0x0148 0x0490 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_CE1_B__USDHC3_RESET_B                      0x0148 0x0490 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_CE1_B__QSPI2_A_DATA_3                      0x0148 0x0490 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_CE1_B__AUDMUX_AUD4_TXD                     0x0148 0x0490 0x0648 0x3 0x0
+#define MX6SX_PAD_NAND_CE1_B__ESAI_TX0                            0x0148 0x0490 0x0790 0x4 0x0
+#define MX6SX_PAD_NAND_CE1_B__GPIO4_IO_2                          0x0148 0x0490 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_CE1_B__WEIM_OE                             0x0148 0x0490 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_CE1_B__TPSMP_HDATA_4                       0x0148 0x0490 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_CE1_B__ANATOP_USBPHY1_TSTI_TX_LS_MODE      0x0148 0x0490 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_CE1_B__SDMA_DEBUG_PC_8                     0x0148 0x0490 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_CLE__RAWNAND_CLE                           0x014C 0x0494 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_CLE__I2C3_SCL                              0x014C 0x0494 0x07B8 0x1 0x0
+#define MX6SX_PAD_NAND_CLE__QSPI2_A_SCLK                          0x014C 0x0494 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_CLE__ECSPI2_SCLK                           0x014C 0x0494 0x0720 0x3 0x0
+#define MX6SX_PAD_NAND_CLE__ESAI_TX2_RX3                          0x014C 0x0494 0x0798 0x4 0x0
+#define MX6SX_PAD_NAND_CLE__GPIO4_IO_3                            0x014C 0x0494 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_CLE__WEIM_BCLK                             0x014C 0x0494 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_CLE__TPSMP_CLK                             0x014C 0x0494 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_CLE__ANATOP_USBPHY1_TSTI_TX_DP             0x014C 0x0494 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_CLE__SDMA_DEBUG_PC_13                      0x014C 0x0494 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA00__RAWNAND_DATA00                     0x0150 0x0498 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA00__USDHC1_DATA4                       0x0150 0x0498 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA00__QSPI2_B_DATA_1                     0x0150 0x0498 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA00__ECSPI5_MISO                        0x0150 0x0498 0x0754 0x3 0x0
+#define MX6SX_PAD_NAND_DATA00__ESAI_RX_CLK                        0x0150 0x0498 0x0788 0x4 0x0
+#define MX6SX_PAD_NAND_DATA00__GPIO4_IO_4                         0x0150 0x0498 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA00__WEIM_AD_0                          0x0150 0x0498 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA00__TPSMP_HDATA_7                      0x0150 0x0498 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA00__ANATOP_USBPHY1_TSTO_RX_DISCON_DET  0x0150 0x0498 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA00__SDMA_DEBUG_EVT_CHN_LINES_5         0x0150 0x0498 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA01__RAWNAND_DATA01                     0x0154 0x049C 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA01__USDHC1_DATA5                       0x0154 0x049C 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA01__QSPI2_B_DATA_0                     0x0154 0x049C 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA01__ECSPI5_MOSI                        0x0154 0x049C 0x0758 0x3 0x0
+#define MX6SX_PAD_NAND_DATA01__ESAI_RX_FS                         0x0154 0x049C 0x0778 0x4 0x0
+#define MX6SX_PAD_NAND_DATA01__GPIO4_IO_5                         0x0154 0x049C 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA01__WEIM_AD_1                          0x0154 0x049C 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA01__TPSMP_HDATA_8                      0x0154 0x049C 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA01__ANATOP_USBPHY1_TSTO_RX_HS_RXD      0x0154 0x049C 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA01__SDMA_DEBUG_EVT_CHN_LINES_4         0x0154 0x049C 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA02__RAWNAND_DATA02                     0x0158 0x04A0 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA02__USDHC1_DATA6                       0x0158 0x04A0 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA02__QSPI2_B_SCLK                       0x0158 0x04A0 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA02__ECSPI5_SCLK                        0x0158 0x04A0 0x0750 0x3 0x0
+#define MX6SX_PAD_NAND_DATA02__ESAI_TX_HF_CLK                     0x0158 0x04A0 0x0784 0x4 0x0
+#define MX6SX_PAD_NAND_DATA02__GPIO4_IO_6                         0x0158 0x04A0 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA02__WEIM_AD_2                          0x0158 0x04A0 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA02__TPSMP_HDATA_9                      0x0158 0x04A0 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA02__ANATOP_USBPHY2_TSTO_PLL_CLK20DIV   0x0158 0x04A0 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA02__SDMA_DEBUG_EVT_CHN_LINES_3         0x0158 0x04A0 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA03__RAWNAND_DATA03                     0x015C 0x04A4 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA03__USDHC1_DATA7                       0x015C 0x04A4 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA03__QSPI2_B_SS0_B                      0x015C 0x04A4 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA03__ECSPI5_SS0                         0x015C 0x04A4 0x075C 0x3 0x0
+#define MX6SX_PAD_NAND_DATA03__ESAI_RX_HF_CLK                     0x015C 0x04A4 0x0780 0x4 0x0
+#define MX6SX_PAD_NAND_DATA03__GPIO4_IO_7                         0x015C 0x04A4 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA03__WEIM_AD_3                          0x015C 0x04A4 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA03__TPSMP_HDATA_10                     0x015C 0x04A4 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA03__ANATOP_USBPHY1_TSTO_RX_SQUELCH     0x015C 0x04A4 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA03__SDMA_DEBUG_EVT_CHN_LINES_6         0x015C 0x04A4 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA04__RAWNAND_DATA04                     0x0160 0x04A8 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA04__USDHC2_DATA4                       0x0160 0x04A8 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA04__QSPI2_B_SS1_B                      0x0160 0x04A8 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA04__UART3_RTS_B                        0x0160 0x04A8 0x083C 0x3 0x0
+#define MX6SX_PAD_NAND_DATA04__AUDMUX_AUD4_RXFS                   0x0160 0x04A8 0x0650 0x4 0x0
+#define MX6SX_PAD_NAND_DATA04__GPIO4_IO_8                         0x0160 0x04A8 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA04__WEIM_AD_4                          0x0160 0x04A8 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA04__TPSMP_HDATA_11                     0x0160 0x04A8 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA04__ANATOP_USBPHY2_TSTO_RX_SQUELCH     0x0160 0x04A8 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA04__SDMA_DEBUG_CORE_STATE_0            0x0160 0x04A8 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA05__RAWNAND_DATA05                     0x0164 0x04AC 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA05__USDHC2_DATA5                       0x0164 0x04AC 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA05__QSPI2_B_DQS                        0x0164 0x04AC 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA05__UART3_CTS_B                        0x0164 0x04AC 0x083C 0x3 0x1
+#define MX6SX_PAD_NAND_DATA05__AUDMUX_AUD4_RXC                    0x0164 0x04AC 0x064C 0x4 0x0
+#define MX6SX_PAD_NAND_DATA05__GPIO4_IO_9                         0x0164 0x04AC 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA05__WEIM_AD_5                          0x0164 0x04AC 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA05__TPSMP_HDATA_12                     0x0164 0x04AC 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA05__ANATOP_USBPHY2_TSTO_RX_DISCON_DET  0x0164 0x04AC 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA05__SDMA_DEBUG_CORE_STATE_1            0x0164 0x04AC 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA06__RAWNAND_DATA06                     0x0168 0x04B0 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA06__USDHC2_DATA6                       0x0168 0x04B0 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA06__QSPI2_A_SS1_B                      0x0168 0x04B0 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA06__UART3_RX                           0x0168 0x04B0 0x0840 0x3 0x0
+#define MX6SX_PAD_NAND_DATA06__UART3_TX                           0x0168 0x04B0 0x0000 0x3 0x0
+#define MX6SX_PAD_NAND_DATA06__PWM3_OUT                           0x0168 0x04B0 0x0000 0x4 0x0
+#define MX6SX_PAD_NAND_DATA06__GPIO4_IO_10                        0x0168 0x04B0 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA06__WEIM_AD_6                          0x0168 0x04B0 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA06__TPSMP_HDATA_13                     0x0168 0x04B0 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA06__ANATOP_USBPHY2_TSTO_RX_FS_RXD      0x0168 0x04B0 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA06__SDMA_DEBUG_CORE_STATE_2            0x0168 0x04B0 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_DATA07__RAWNAND_DATA07                     0x016C 0x04B4 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_DATA07__USDHC2_DATA7                       0x016C 0x04B4 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_DATA07__QSPI2_A_DQS                        0x016C 0x04B4 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_DATA07__UART3_RX                           0x016C 0x04B4 0x0840 0x3 0x1
+#define MX6SX_PAD_NAND_DATA07__UART3_TX                           0x016C 0x04B4 0x0000 0x3 0x0
+#define MX6SX_PAD_NAND_DATA07__PWM4_OUT                           0x016C 0x04B4 0x0000 0x4 0x0
+#define MX6SX_PAD_NAND_DATA07__GPIO4_IO_11                        0x016C 0x04B4 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_DATA07__WEIM_AD_7                          0x016C 0x04B4 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_DATA07__TPSMP_HDATA_14                     0x016C 0x04B4 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_DATA07__ANATOP_USBPHY1_TSTO_RX_FS_RXD      0x016C 0x04B4 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_DATA07__SDMA_DEBUG_CORE_STATE_3            0x016C 0x04B4 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_RE_B__RAWNAND_RE_B                         0x0170 0x04B8 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_RE_B__USDHC2_RESET_B                       0x0170 0x04B8 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_RE_B__QSPI2_B_DATA_3                       0x0170 0x04B8 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_RE_B__AUDMUX_AUD4_TXFS                     0x0170 0x04B8 0x0658 0x3 0x0
+#define MX6SX_PAD_NAND_RE_B__ESAI_TX_FS                           0x0170 0x04B8 0x077C 0x4 0x0
+#define MX6SX_PAD_NAND_RE_B__GPIO4_IO_12                          0x0170 0x04B8 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_RE_B__WEIM_RW                              0x0170 0x04B8 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_RE_B__TPSMP_HDATA_5                        0x0170 0x04B8 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_RE_B__ANATOP_USBPHY2_TSTO_RX_HS_RXD        0x0170 0x04B8 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_RE_B__SDMA_DEBUG_PC_7                      0x0170 0x04B8 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_READY_B__RAWNAND_READY_B                   0x0174 0x04BC 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_READY_B__USDHC1_VSELECT                    0x0174 0x04BC 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_READY_B__QSPI2_A_DATA_1                    0x0174 0x04BC 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_READY_B__ECSPI2_MISO                       0x0174 0x04BC 0x0724 0x3 0x0
+#define MX6SX_PAD_NAND_READY_B__ESAI_TX1                          0x0174 0x04BC 0x0794 0x4 0x0
+#define MX6SX_PAD_NAND_READY_B__GPIO4_IO_13                       0x0174 0x04BC 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_READY_B__WEIM_EB_B_1                       0x0174 0x04BC 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_READY_B__TPSMP_HDATA_2                     0x0174 0x04BC 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_READY_B__ANATOP_USBPHY1_TSTI_TX_DN         0x0174 0x04BC 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_READY_B__SDMA_DEBUG_PC_10                  0x0174 0x04BC 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_WE_B__RAWNAND_WE_B                         0x0178 0x04C0 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_WE_B__USDHC4_VSELECT                       0x0178 0x04C0 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_WE_B__QSPI2_B_DATA_2                       0x0178 0x04C0 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_WE_B__AUDMUX_AUD4_RXD                      0x0178 0x04C0 0x0644 0x3 0x0
+#define MX6SX_PAD_NAND_WE_B__ESAI_TX5_RX0                         0x0178 0x04C0 0x07A4 0x4 0x0
+#define MX6SX_PAD_NAND_WE_B__GPIO4_IO_14                          0x0178 0x04C0 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_WE_B__WEIM_WAIT                            0x0178 0x04C0 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_WE_B__TPSMP_HDATA_6                        0x0178 0x04C0 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_WE_B__ANATOP_USBPHY1_TSTO_PLL_CLK20DIV     0x0178 0x04C0 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_WE_B__SDMA_DEBUG_PC_6                      0x0178 0x04C0 0x0000 0x9 0x0
+#define MX6SX_PAD_NAND_WP_B__RAWNAND_WP_B                         0x017C 0x04C4 0x0000 0x0 0x0
+#define MX6SX_PAD_NAND_WP_B__USDHC1_RESET_B                       0x017C 0x04C4 0x0000 0x1 0x0
+#define MX6SX_PAD_NAND_WP_B__QSPI2_A_DATA_0                       0x017C 0x04C4 0x0000 0x2 0x0
+#define MX6SX_PAD_NAND_WP_B__ECSPI2_MOSI                          0x017C 0x04C4 0x0728 0x3 0x0
+#define MX6SX_PAD_NAND_WP_B__ESAI_TX4_RX1                         0x017C 0x04C4 0x07A0 0x4 0x0
+#define MX6SX_PAD_NAND_WP_B__GPIO4_IO_15                          0x017C 0x04C4 0x0000 0x5 0x0
+#define MX6SX_PAD_NAND_WP_B__WEIM_EB_B_0                          0x017C 0x04C4 0x0000 0x6 0x0
+#define MX6SX_PAD_NAND_WP_B__TPSMP_HDATA_1                        0x017C 0x04C4 0x0000 0x7 0x0
+#define MX6SX_PAD_NAND_WP_B__ANATOP_USBPHY1_TSTI_TX_HS_MODE       0x017C 0x04C4 0x0000 0x8 0x0
+#define MX6SX_PAD_NAND_WP_B__SDMA_DEBUG_PC_11                     0x017C 0x04C4 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_DATA0__QSPI1_A_DATA_0                    0x0180 0x04C8 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_DATA0__USB_OTG2_OC                       0x0180 0x04C8 0x085C 0x1 0x2
+#define MX6SX_PAD_QSPI1A_DATA0__ECSPI1_MOSI                       0x0180 0x04C8 0x0718 0x2 0x1
+#define MX6SX_PAD_QSPI1A_DATA0__ESAI_TX4_RX1                      0x0180 0x04C8 0x07A0 0x3 0x2
+#define MX6SX_PAD_QSPI1A_DATA0__CSI1_DATA_14                      0x0180 0x04C8 0x06D4 0x4 0x1
+#define MX6SX_PAD_QSPI1A_DATA0__GPIO4_IO_16                       0x0180 0x04C8 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_DATA0__WEIM_DATA_6                       0x0180 0x04C8 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_DATA0__SIM_M_HADDR_3                     0x0180 0x04C8 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_DATA0__SDMA_DEBUG_BUS_DEVICE_3           0x0180 0x04C8 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_DATA1__QSPI1_A_DATA_1                    0x0184 0x04CC 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_DATA1__ANATOP_OTG1_ID                    0x0184 0x04CC 0x0624 0x1 0x2
+#define MX6SX_PAD_QSPI1A_DATA1__ECSPI1_MISO                       0x0184 0x04CC 0x0714 0x2 0x1
+#define MX6SX_PAD_QSPI1A_DATA1__ESAI_TX1                          0x0184 0x04CC 0x0794 0x3 0x2
+#define MX6SX_PAD_QSPI1A_DATA1__CSI1_DATA_13                      0x0184 0x04CC 0x06D0 0x4 0x1
+#define MX6SX_PAD_QSPI1A_DATA1__GPIO4_IO_17                       0x0184 0x04CC 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_DATA1__WEIM_DATA_5                       0x0184 0x04CC 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_DATA1__SIM_M_HADDR_4                     0x0184 0x04CC 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_DATA1__SDMA_DEBUG_PC_0                   0x0184 0x04CC 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__QSPI1_A_DATA_2                    0x0188 0x04D0 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__USB_OTG1_PWR                      0x0188 0x04D0 0x0000 0x1 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__ECSPI5_SS1                        0x0188 0x04D0 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__ESAI_TX_CLK                       0x0188 0x04D0 0x078C 0x3 0x2
+#define MX6SX_PAD_QSPI1A_DATA2__CSI1_DATA_12                      0x0188 0x04D0 0x06CC 0x4 0x1
+#define MX6SX_PAD_QSPI1A_DATA2__GPIO4_IO_18                       0x0188 0x04D0 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__WEIM_DATA_4                       0x0188 0x04D0 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__SIM_M_HADDR_6                     0x0188 0x04D0 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_DATA2__SDMA_DEBUG_PC_1                   0x0188 0x04D0 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__QSPI1_A_DATA_3                    0x018C 0x04D4 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__USB_OTG1_OC                       0x018C 0x04D4 0x0860 0x1 0x2
+#define MX6SX_PAD_QSPI1A_DATA3__ECSPI5_SS2                        0x018C 0x04D4 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__ESAI_TX0                          0x018C 0x04D4 0x0790 0x3 0x2
+#define MX6SX_PAD_QSPI1A_DATA3__CSI1_DATA_11                      0x018C 0x04D4 0x06C8 0x4 0x1
+#define MX6SX_PAD_QSPI1A_DATA3__GPIO4_IO_19                       0x018C 0x04D4 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__WEIM_DATA_3                       0x018C 0x04D4 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__SIM_M_HADDR_7                     0x018C 0x04D4 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_DATA3__SDMA_DEBUG_PC_2                   0x018C 0x04D4 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_DQS__QSPI1_A_DQS                         0x0190 0x04D8 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_DQS__CAN2_TX                             0x0190 0x04D8 0x0000 0x1 0x0
+#define MX6SX_PAD_QSPI1A_DQS__CANFD_TX2                           0x0190 0x04D8 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1A_DQS__ECSPI5_MOSI                         0x0190 0x04D8 0x0758 0x3 0x1
+#define MX6SX_PAD_QSPI1A_DQS__CSI1_DATA_15                        0x0190 0x04D8 0x06D8 0x4 0x1
+#define MX6SX_PAD_QSPI1A_DQS__GPIO4_IO_20                         0x0190 0x04D8 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_DQS__WEIM_DATA_7                         0x0190 0x04D8 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_DQS__SIM_M_HADDR_13                      0x0190 0x04D8 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_DQS__SDMA_DEBUG_BUS_DEVICE_4             0x0190 0x04D8 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_SCLK__QSPI1_A_SCLK                       0x0194 0x04DC 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_SCLK__ANATOP_OTG2_ID                     0x0194 0x04DC 0x0628 0x1 0x2
+#define MX6SX_PAD_QSPI1A_SCLK__ECSPI1_SCLK                        0x0194 0x04DC 0x0710 0x2 0x1
+#define MX6SX_PAD_QSPI1A_SCLK__ESAI_TX2_RX3                       0x0194 0x04DC 0x0798 0x3 0x2
+#define MX6SX_PAD_QSPI1A_SCLK__CSI1_DATA_1                        0x0194 0x04DC 0x06A4 0x4 0x1
+#define MX6SX_PAD_QSPI1A_SCLK__GPIO4_IO_21                        0x0194 0x04DC 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_SCLK__WEIM_DATA_0                        0x0194 0x04DC 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_SCLK__SIM_M_HADDR_0                      0x0194 0x04DC 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_SCLK__SDMA_DEBUG_PC_5                    0x0194 0x04DC 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__QSPI1_A_SS0_B                     0x0198 0x04E0 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__USB_OTG2_PWR                      0x0198 0x04E0 0x0000 0x1 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__ECSPI1_SS0                        0x0198 0x04E0 0x071C 0x2 0x1
+#define MX6SX_PAD_QSPI1A_SS0_B__ESAI_TX3_RX2                      0x0198 0x04E0 0x079C 0x3 0x2
+#define MX6SX_PAD_QSPI1A_SS0_B__CSI1_DATA_0                       0x0198 0x04E0 0x06A0 0x4 0x1
+#define MX6SX_PAD_QSPI1A_SS0_B__GPIO4_IO_22                       0x0198 0x04E0 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__WEIM_DATA_1                       0x0198 0x04E0 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__SIM_M_HADDR_1                     0x0198 0x04E0 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_SS0_B__SDMA_DEBUG_PC_4                   0x0198 0x04E0 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1A_SS1_B__QSPI1_A_SS1_B                     0x019C 0x04E4 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1A_SS1_B__CAN1_RX                           0x019C 0x04E4 0x068C 0x1 0x2
+#define MX6SX_PAD_QSPI1A_SS1_B__CANFD_RX1                         0x019C 0x04E4 0x0694 0x2 0x2
+#define MX6SX_PAD_QSPI1A_SS1_B__ECSPI5_MISO                       0x019C 0x04E4 0x0754 0x3 0x1
+#define MX6SX_PAD_QSPI1A_SS1_B__CSI1_DATA_10                      0x019C 0x04E4 0x06FC 0x4 0x1
+#define MX6SX_PAD_QSPI1A_SS1_B__GPIO4_IO_23                       0x019C 0x04E4 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1A_SS1_B__WEIM_DATA_2                       0x019C 0x04E4 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1A_SS1_B__SIM_M_HADDR_12                    0x019C 0x04E4 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1A_SS1_B__SDMA_DEBUG_PC_3                   0x019C 0x04E4 0x0000 0x9 0x0
+#define MX6SX_PAD_QSPI1B_DATA0__QSPI1_B_DATA_0                    0x01A0 0x04E8 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_DATA0__UART3_CTS_B                       0x01A0 0x04E8 0x083C 0x1 0x4
+#define MX6SX_PAD_QSPI1B_DATA0__ECSPI3_MOSI                       0x01A0 0x04E8 0x0738 0x2 0x1
+#define MX6SX_PAD_QSPI1B_DATA0__ESAI_RX_FS                        0x01A0 0x04E8 0x0778 0x3 0x2
+#define MX6SX_PAD_QSPI1B_DATA0__CSI1_DATA_22                      0x01A0 0x04E8 0x06F4 0x4 0x1
+#define MX6SX_PAD_QSPI1B_DATA0__GPIO4_IO_24                       0x01A0 0x04E8 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_DATA0__WEIM_DATA_14                      0x01A0 0x04E8 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_DATA0__SIM_M_HADDR_9                     0x01A0 0x04E8 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_DATA1__QSPI1_B_DATA_1                    0x01A4 0x04EC 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_DATA1__UART3_RTS_B                       0x01A4 0x04EC 0x083C 0x1 0x5
+#define MX6SX_PAD_QSPI1B_DATA1__ECSPI3_MISO                       0x01A4 0x04EC 0x0734 0x2 0x1
+#define MX6SX_PAD_QSPI1B_DATA1__ESAI_RX_CLK                       0x01A4 0x04EC 0x0788 0x3 0x2
+#define MX6SX_PAD_QSPI1B_DATA1__CSI1_DATA_21                      0x01A4 0x04EC 0x06F0 0x4 0x1
+#define MX6SX_PAD_QSPI1B_DATA1__GPIO4_IO_25                       0x01A4 0x04EC 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_DATA1__WEIM_DATA_13                      0x01A4 0x04EC 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_DATA1__SIM_M_HADDR_8                     0x01A4 0x04EC 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_DATA2__QSPI1_B_DATA_2                    0x01A8 0x04F0 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_DATA2__I2C2_SDA                          0x01A8 0x04F0 0x07B4 0x1 0x2
+#define MX6SX_PAD_QSPI1B_DATA2__ECSPI5_RDY                        0x01A8 0x04F0 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1B_DATA2__ESAI_TX5_RX0                      0x01A8 0x04F0 0x07A4 0x3 0x2
+#define MX6SX_PAD_QSPI1B_DATA2__CSI1_DATA_20                      0x01A8 0x04F0 0x06EC 0x4 0x1
+#define MX6SX_PAD_QSPI1B_DATA2__GPIO4_IO_26                       0x01A8 0x04F0 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_DATA2__WEIM_DATA_12                      0x01A8 0x04F0 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_DATA2__SIM_M_HADDR_5                     0x01A8 0x04F0 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_DATA3__QSPI1_B_DATA_3                    0x01AC 0x04F4 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_DATA3__I2C2_SCL                          0x01AC 0x04F4 0x07B0 0x1 0x2
+#define MX6SX_PAD_QSPI1B_DATA3__ECSPI5_SS3                        0x01AC 0x04F4 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1B_DATA3__ESAI_TX_FS                        0x01AC 0x04F4 0x077C 0x3 0x2
+#define MX6SX_PAD_QSPI1B_DATA3__CSI1_DATA_19                      0x01AC 0x04F4 0x06E8 0x4 0x1
+#define MX6SX_PAD_QSPI1B_DATA3__GPIO4_IO_27                       0x01AC 0x04F4 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_DATA3__WEIM_DATA_11                      0x01AC 0x04F4 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_DATA3__SIM_M_HADDR_2                     0x01AC 0x04F4 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_DQS__QSPI1_B_DQS                         0x01B0 0x04F8 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_DQS__CAN1_TX                             0x01B0 0x04F8 0x0000 0x1 0x0
+#define MX6SX_PAD_QSPI1B_DQS__CANFD_TX1                           0x01B0 0x04F8 0x0000 0x2 0x0
+#define MX6SX_PAD_QSPI1B_DQS__ECSPI5_SS0                          0x01B0 0x04F8 0x075C 0x3 0x1
+#define MX6SX_PAD_QSPI1B_DQS__CSI1_DATA_23                        0x01B0 0x04F8 0x06F8 0x4 0x1
+#define MX6SX_PAD_QSPI1B_DQS__GPIO4_IO_28                         0x01B0 0x04F8 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_DQS__WEIM_DATA_15                        0x01B0 0x04F8 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_DQS__SIM_M_HADDR_15                      0x01B0 0x04F8 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_SCLK__QSPI1_B_SCLK                       0x01B4 0x04FC 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_SCLK__UART3_RX                           0x01B4 0x04FC 0x0840 0x1 0x4
+#define MX6SX_PAD_QSPI1B_SCLK__UART3_TX                           0x01B4 0x04FC 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_SCLK__ECSPI3_SCLK                        0x01B4 0x04FC 0x0730 0x2 0x1
+#define MX6SX_PAD_QSPI1B_SCLK__ESAI_RX_HF_CLK                     0x01B4 0x04FC 0x0780 0x3 0x2
+#define MX6SX_PAD_QSPI1B_SCLK__CSI1_DATA_16                       0x01B4 0x04FC 0x06DC 0x4 0x1
+#define MX6SX_PAD_QSPI1B_SCLK__GPIO4_IO_29                        0x01B4 0x04FC 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_SCLK__WEIM_DATA_8                        0x01B4 0x04FC 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_SCLK__SIM_M_HADDR_11                     0x01B4 0x04FC 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_SS0_B__QSPI1_B_SS0_B                     0x01B8 0x0500 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_SS0_B__UART3_RX                          0x01B8 0x0500 0x0840 0x1 0x5
+#define MX6SX_PAD_QSPI1B_SS0_B__UART3_TX                          0x01B8 0x0500 0x0000 0x1 0x0
+#define MX6SX_PAD_QSPI1B_SS0_B__ECSPI3_SS0                        0x01B8 0x0500 0x073C 0x2 0x1
+#define MX6SX_PAD_QSPI1B_SS0_B__ESAI_TX_HF_CLK                    0x01B8 0x0500 0x0784 0x3 0x3
+#define MX6SX_PAD_QSPI1B_SS0_B__CSI1_DATA_17                      0x01B8 0x0500 0x06E0 0x4 0x1
+#define MX6SX_PAD_QSPI1B_SS0_B__GPIO4_IO_30                       0x01B8 0x0500 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_SS0_B__WEIM_DATA_9                       0x01B8 0x0500 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_SS0_B__SIM_M_HADDR_10                    0x01B8 0x0500 0x0000 0x7 0x0
+#define MX6SX_PAD_QSPI1B_SS1_B__QSPI1_B_SS1_B                     0x01BC 0x0504 0x0000 0x0 0x0
+#define MX6SX_PAD_QSPI1B_SS1_B__CAN2_RX                           0x01BC 0x0504 0x0690 0x1 0x2
+#define MX6SX_PAD_QSPI1B_SS1_B__CANFD_RX2                         0x01BC 0x0504 0x0698 0x2 0x2
+#define MX6SX_PAD_QSPI1B_SS1_B__ECSPI5_SCLK                       0x01BC 0x0504 0x0750 0x3 0x1
+#define MX6SX_PAD_QSPI1B_SS1_B__CSI1_DATA_18                      0x01BC 0x0504 0x06E4 0x4 0x1
+#define MX6SX_PAD_QSPI1B_SS1_B__GPIO4_IO_31                       0x01BC 0x0504 0x0000 0x5 0x0
+#define MX6SX_PAD_QSPI1B_SS1_B__WEIM_DATA_10                      0x01BC 0x0504 0x0000 0x6 0x0
+#define MX6SX_PAD_QSPI1B_SS1_B__SIM_M_HADDR_14                    0x01BC 0x0504 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0                     0x01C0 0x0508 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_RD0__GPIO5_IO_0                          0x01C0 0x0508 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RD0__CSI2_DATA_10                        0x01C0 0x0508 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RD0__ANATOP_TESTI_0                      0x01C0 0x0508 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RD0__RAWNAND_TESTER_TRIGGER              0x01C0 0x0508 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RD0__PCIE_CTRL_DEBUG_0                   0x01C0 0x0508 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1                     0x01C4 0x050C 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_RD1__GPIO5_IO_1                          0x01C4 0x050C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RD1__CSI2_DATA_11                        0x01C4 0x050C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RD1__ANATOP_TESTI_1                      0x01C4 0x050C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RD1__USDHC1_TESTER_TRIGGER               0x01C4 0x050C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RD1__PCIE_CTRL_DEBUG_1                   0x01C4 0x050C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2                     0x01C8 0x0510 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_RD2__GPIO5_IO_2                          0x01C8 0x0510 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RD2__CSI2_DATA_12                        0x01C8 0x0510 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RD2__ANATOP_TESTI_2                      0x01C8 0x0510 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RD2__USDHC2_TESTER_TRIGGER               0x01C8 0x0510 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RD2__PCIE_CTRL_DEBUG_2                   0x01C8 0x0510 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3                     0x01CC 0x0514 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_RD3__GPIO5_IO_3                          0x01CC 0x0514 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RD3__CSI2_DATA_13                        0x01CC 0x0514 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RD3__ANATOP_TESTI_3                      0x01CC 0x0514 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RD3__USDHC3_TESTER_TRIGGER               0x01CC 0x0514 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RD3__PCIE_CTRL_DEBUG_3                   0x01CC 0x0514 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN                      0x01D0 0x0518 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__GPIO5_IO_4                       0x01D0 0x0518 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__CSI2_DATA_14                     0x01D0 0x0518 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__ANATOP_TESTO_0                   0x01D0 0x0518 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__USDHC4_TESTER_TRIGGER            0x01D0 0x0518 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RX_CTL__PCIE_CTRL_DEBUG_4                0x01D0 0x0518 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_RXC__ENET1_RX_CLK                        0x01D4 0x051C 0x0768 0x0 0x1
+#define MX6SX_PAD_RGMII1_RXC__ENET1_RX_ER                         0x01D4 0x051C 0x0000 0x1 0x0
+#define MX6SX_PAD_RGMII1_RXC__GPIO5_IO_5                          0x01D4 0x051C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_RXC__CSI2_DATA_15                        0x01D4 0x051C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_RXC__ANATOP_TESTO_1                      0x01D4 0x051C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_RXC__ECSPI1_TESTER_TRIGGER               0x01D4 0x051C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_RXC__PCIE_CTRL_DEBUG_5                   0x01D4 0x051C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0                     0x01D8 0x0520 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TD0__SAI2_RX_SYNC                        0x01D8 0x0520 0x0810 0x2 0x1
+#define MX6SX_PAD_RGMII1_TD0__GPIO5_IO_6                          0x01D8 0x0520 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TD0__CSI2_DATA_16                        0x01D8 0x0520 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TD0__ANATOP_TESTO_2                      0x01D8 0x0520 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TD0__ECSPI2_TESTER_TRIGGER               0x01D8 0x0520 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TD0__PCIE_CTRL_DEBUG_6                   0x01D8 0x0520 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1                     0x01DC 0x0524 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TD1__SAI2_RX_BCLK                        0x01DC 0x0524 0x0808 0x2 0x1
+#define MX6SX_PAD_RGMII1_TD1__GPIO5_IO_7                          0x01DC 0x0524 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TD1__CSI2_DATA_17                        0x01DC 0x0524 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TD1__ANATOP_TESTO_3                      0x01DC 0x0524 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TD1__ECSPI3_TESTER_TRIGGER               0x01DC 0x0524 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TD1__PCIE_CTRL_DEBUG_7                   0x01DC 0x0524 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TD2__ENET1_TX_DATA_2                     0x01E0 0x0528 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TD2__SAI2_TX_SYNC                        0x01E0 0x0528 0x0818 0x2 0x1
+#define MX6SX_PAD_RGMII1_TD2__GPIO5_IO_8                          0x01E0 0x0528 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TD2__CSI2_DATA_18                        0x01E0 0x0528 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TD2__ANATOP_TESTO_4                      0x01E0 0x0528 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TD2__ECSPI4_TESTER_TRIGGER               0x01E0 0x0528 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TD2__PCIE_CTRL_DEBUG_8                   0x01E0 0x0528 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TD3__ENET1_TX_DATA_3                     0x01E4 0x052C 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TD3__SAI2_TX_BCLK                        0x01E4 0x052C 0x0814 0x2 0x1
+#define MX6SX_PAD_RGMII1_TD3__GPIO5_IO_9                          0x01E4 0x052C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TD3__CSI2_DATA_19                        0x01E4 0x052C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TD3__ANATOP_TESTO_5                      0x01E4 0x052C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TD3__ECSPI5_TESTER_TRIGGER               0x01E4 0x052C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TD3__PCIE_CTRL_DEBUG_9                   0x01E4 0x052C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN                      0x01E8 0x0530 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__SAI2_RX_DATA_0                   0x01E8 0x0530 0x080C 0x2 0x1
+#define MX6SX_PAD_RGMII1_TX_CTL__GPIO5_IO_10                      0x01E8 0x0530 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__CSI2_DATA_0                      0x01E8 0x0530 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__ANATOP_TESTO_6                   0x01E8 0x0530 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__QSPI1_TESTER_TRIGGER             0x01E8 0x0530 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TX_CTL__PCIE_CTRL_DEBUG_10               0x01E8 0x0530 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII1_TXC__ENET1_RGMII_TXC                     0x01EC 0x0534 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII1_TXC__ENET1_TX_ER                         0x01EC 0x0534 0x0000 0x1 0x0
+#define MX6SX_PAD_RGMII1_TXC__SAI2_TX_DATA_0                      0x01EC 0x0534 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII1_TXC__GPIO5_IO_11                         0x01EC 0x0534 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII1_TXC__CSI2_DATA_1                         0x01EC 0x0534 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII1_TXC__ANATOP_TESTO_7                      0x01EC 0x0534 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII1_TXC__QSPI2_TESTER_TRIGGER                0x01EC 0x0534 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII1_TXC__PCIE_CTRL_DEBUG_11                  0x01EC 0x0534 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RD0__ENET2_RX_DATA_0                     0x01F0 0x0538 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_RD0__PWM4_OUT                            0x01F0 0x0538 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII2_RD0__GPIO5_IO_12                         0x01F0 0x0538 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RD0__CSI2_DATA_2                         0x01F0 0x0538 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RD0__ANATOP_TESTO_8                      0x01F0 0x0538 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RD0__VDEC_DEBUG_18                       0x01F0 0x0538 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RD0__PCIE_CTRL_DEBUG_12                  0x01F0 0x0538 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RD1__ENET2_RX_DATA_1                     0x01F4 0x053C 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_RD1__PWM3_OUT                            0x01F4 0x053C 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII2_RD1__GPIO5_IO_13                         0x01F4 0x053C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RD1__CSI2_DATA_3                         0x01F4 0x053C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RD1__ANATOP_TESTO_9                      0x01F4 0x053C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RD1__VDEC_DEBUG_19                       0x01F4 0x053C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RD1__PCIE_CTRL_DEBUG_13                  0x01F4 0x053C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RD2__ENET2_RX_DATA_2                     0x01F8 0x0540 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_RD2__PWM2_OUT                            0x01F8 0x0540 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII2_RD2__GPIO5_IO_14                         0x01F8 0x0540 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RD2__CSI2_DATA_4                         0x01F8 0x0540 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RD2__ANATOP_TESTO_10                     0x01F8 0x0540 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RD2__VDEC_DEBUG_20                       0x01F8 0x0540 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RD2__PCIE_CTRL_DEBUG_14                  0x01F8 0x0540 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RD3__ENET2_RX_DATA_3                     0x01FC 0x0544 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_RD3__PWM1_OUT                            0x01FC 0x0544 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII2_RD3__GPIO5_IO_15                         0x01FC 0x0544 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RD3__CSI2_DATA_5                         0x01FC 0x0544 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RD3__ANATOP_TESTO_11                     0x01FC 0x0544 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RD3__VDEC_DEBUG_21                       0x01FC 0x0544 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RD3__PCIE_CTRL_DEBUG_15                  0x01FC 0x0544 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__ENET2_RX_EN                      0x0200 0x0548 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__GPIO5_IO_16                      0x0200 0x0548 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__CSI2_DATA_6                      0x0200 0x0548 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__ANATOP_TESTO_12                  0x0200 0x0548 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__VDEC_DEBUG_22                    0x0200 0x0548 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RX_CTL__PCIE_CTRL_DEBUG_16               0x0200 0x0548 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_RXC__ENET2_RX_CLK                        0x0204 0x054C 0x0774 0x0 0x1
+#define MX6SX_PAD_RGMII2_RXC__ENET2_RX_ER                         0x0204 0x054C 0x0000 0x1 0x0
+#define MX6SX_PAD_RGMII2_RXC__GPIO5_IO_17                         0x0204 0x054C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_RXC__CSI2_DATA_7                         0x0204 0x054C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_RXC__ANATOP_TESTO_13                     0x0204 0x054C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_RXC__VDEC_DEBUG_23                       0x0204 0x054C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_RXC__PCIE_CTRL_DEBUG_17                  0x0204 0x054C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TD0__ENET2_TX_DATA_0                     0x0208 0x0550 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TD0__SAI1_RX_SYNC                        0x0208 0x0550 0x07FC 0x2 0x1
+#define MX6SX_PAD_RGMII2_TD0__PWM8_OUT                            0x0208 0x0550 0x0000 0x3 0x0
+#define MX6SX_PAD_RGMII2_TD0__GPIO5_IO_18                         0x0208 0x0550 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TD0__CSI2_DATA_8                         0x0208 0x0550 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TD0__ANATOP_TESTO_14                     0x0208 0x0550 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TD0__VDEC_DEBUG_24                       0x0208 0x0550 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TD0__PCIE_CTRL_DEBUG_18                  0x0208 0x0550 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TD1__ENET2_TX_DATA_1                     0x020C 0x0554 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TD1__SAI1_RX_BCLK                        0x020C 0x0554 0x07F4 0x2 0x1
+#define MX6SX_PAD_RGMII2_TD1__PWM7_OUT                            0x020C 0x0554 0x0000 0x3 0x0
+#define MX6SX_PAD_RGMII2_TD1__GPIO5_IO_19                         0x020C 0x0554 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TD1__CSI2_DATA_9                         0x020C 0x0554 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TD1__ANATOP_TESTO_15                     0x020C 0x0554 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TD1__VDEC_DEBUG_25                       0x020C 0x0554 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TD1__PCIE_CTRL_DEBUG_19                  0x020C 0x0554 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TD2__ENET2_TX_DATA_2                     0x0210 0x0558 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TD2__SAI1_TX_SYNC                        0x0210 0x0558 0x0804 0x2 0x1
+#define MX6SX_PAD_RGMII2_TD2__PWM6_OUT                            0x0210 0x0558 0x0000 0x3 0x0
+#define MX6SX_PAD_RGMII2_TD2__GPIO5_IO_20                         0x0210 0x0558 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TD2__CSI2_VSYNC                          0x0210 0x0558 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TD2__SJC_FAIL                            0x0210 0x0558 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TD2__VDEC_DEBUG_26                       0x0210 0x0558 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TD2__PCIE_CTRL_DEBUG_20                  0x0210 0x0558 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TD3__ENET2_TX_DATA_3                     0x0214 0x055C 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TD3__SAI1_TX_BCLK                        0x0214 0x055C 0x0800 0x2 0x1
+#define MX6SX_PAD_RGMII2_TD3__PWM5_OUT                            0x0214 0x055C 0x0000 0x3 0x0
+#define MX6SX_PAD_RGMII2_TD3__GPIO5_IO_21                         0x0214 0x055C 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TD3__CSI2_HSYNC                          0x0214 0x055C 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TD3__SJC_JTAG_ACT                        0x0214 0x055C 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TD3__VDEC_DEBUG_27                       0x0214 0x055C 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TD3__PCIE_CTRL_DEBUG_21                  0x0214 0x055C 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__ENET2_TX_EN                      0x0218 0x0560 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__SAI1_RX_DATA_0                   0x0218 0x0560 0x07F8 0x2 0x1
+#define MX6SX_PAD_RGMII2_TX_CTL__GPIO5_IO_22                      0x0218 0x0560 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__CSI2_FIELD                       0x0218 0x0560 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__SJC_DE_B                         0x0218 0x0560 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__VDEC_DEBUG_28                    0x0218 0x0560 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TX_CTL__PCIE_CTRL_DEBUG_22               0x0218 0x0560 0x0000 0x9 0x0
+#define MX6SX_PAD_RGMII2_TXC__ENET2_RGMII_TXC                     0x021C 0x0564 0x0000 0x0 0x0
+#define MX6SX_PAD_RGMII2_TXC__ENET2_TX_ER                         0x021C 0x0564 0x0000 0x1 0x0
+#define MX6SX_PAD_RGMII2_TXC__SAI1_TX_DATA_0                      0x021C 0x0564 0x0000 0x2 0x0
+#define MX6SX_PAD_RGMII2_TXC__GPIO5_IO_23                         0x021C 0x0564 0x0000 0x5 0x0
+#define MX6SX_PAD_RGMII2_TXC__CSI2_PIXCLK                         0x021C 0x0564 0x0000 0x6 0x0
+#define MX6SX_PAD_RGMII2_TXC__SJC_DONE                            0x021C 0x0564 0x0000 0x7 0x0
+#define MX6SX_PAD_RGMII2_TXC__VDEC_DEBUG_29                       0x021C 0x0564 0x0000 0x8 0x0
+#define MX6SX_PAD_RGMII2_TXC__PCIE_CTRL_DEBUG_23                  0x021C 0x0564 0x0000 0x9 0x0
+#define MX6SX_PAD_SD1_CLK__USDHC1_CLK                             0x0220 0x0568 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_CLK__AUDMUX_AUD5_RXFS                       0x0220 0x0568 0x0668 0x1 0x1
+#define MX6SX_PAD_SD1_CLK__WDOG2_WDOG_B                           0x0220 0x0568 0x0000 0x2 0x0
+#define MX6SX_PAD_SD1_CLK__GPT_CLK                                0x0220 0x0568 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_CLK__WDOG2_WDOG_RST_B_DEB                   0x0220 0x0568 0x0000 0x4 0x0
+#define MX6SX_PAD_SD1_CLK__GPIO6_IO_0                             0x0220 0x0568 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_CLK__ENET2_1588_EVENT1_OUT                  0x0220 0x0568 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_CLK__CCM_OUT1                               0x0220 0x0568 0x0000 0x7 0x0
+#define MX6SX_PAD_SD1_CLK__VADC_ADC_PROC_CLK                      0x0220 0x0568 0x0000 0x8 0x0
+#define MX6SX_PAD_SD1_CLK__MMDC_DEBUG_45                          0x0220 0x0568 0x0000 0x9 0x0
+#define MX6SX_PAD_SD1_CMD__USDHC1_CMD                             0x0224 0x056C 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_CMD__AUDMUX_AUD5_RXC                        0x0224 0x056C 0x0664 0x1 0x1
+#define MX6SX_PAD_SD1_CMD__WDOG1_WDOG_B                           0x0224 0x056C 0x0000 0x2 0x0
+#define MX6SX_PAD_SD1_CMD__GPT_COMPARE1                           0x0224 0x056C 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_CMD__WDOG1_WDOG_RST_B_DEB                   0x0224 0x056C 0x0000 0x4 0x0
+#define MX6SX_PAD_SD1_CMD__GPIO6_IO_1                             0x0224 0x056C 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_CMD__ENET2_1588_EVENT1_IN                   0x0224 0x056C 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_CMD__CCM_CLKO1                              0x0224 0x056C 0x0000 0x7 0x0
+#define MX6SX_PAD_SD1_CMD__VADC_EXT_SYSCLK                        0x0224 0x056C 0x0000 0x8 0x0
+#define MX6SX_PAD_SD1_CMD__MMDC_DEBUG_46                          0x0224 0x056C 0x0000 0x9 0x0
+#define MX6SX_PAD_SD1_DATA0__USDHC1_DATA0                         0x0228 0x0570 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_DATA0__AUDMUX_AUD5_RXD                      0x0228 0x0570 0x065C 0x1 0x1
+#define MX6SX_PAD_SD1_DATA0__CAAM_WRAPPER_RNG_OSC_OBS             0x0228 0x0570 0x0000 0x2 0x0
+#define MX6SX_PAD_SD1_DATA0__GPT_CAPTURE1                         0x0228 0x0570 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_DATA0__UART2_RX                             0x0228 0x0570 0x0838 0x4 0x2
+#define MX6SX_PAD_SD1_DATA0__UART2_TX                             0x0228 0x0570 0x0000 0x4 0x0
+#define MX6SX_PAD_SD1_DATA0__GPIO6_IO_2                           0x0228 0x0570 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_DATA0__ENET1_1588_EVENT1_IN                 0x0228 0x0570 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_DATA0__CCM_OUT2                             0x0228 0x0570 0x0000 0x7 0x0
+#define MX6SX_PAD_SD1_DATA0__VADC_CLAMP_UP                        0x0228 0x0570 0x0000 0x8 0x0
+#define MX6SX_PAD_SD1_DATA0__MMDC_DEBUG_48                        0x0228 0x0570 0x0000 0x9 0x0
+#define MX6SX_PAD_SD1_DATA1__USDHC1_DATA1                         0x022C 0x0574 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_DATA1__AUDMUX_AUD5_TXC                      0x022C 0x0574 0x066C 0x1 0x1
+#define MX6SX_PAD_SD1_DATA1__PWM4_OUT                             0x022C 0x0574 0x0000 0x2 0x0
+#define MX6SX_PAD_SD1_DATA1__GPT_CAPTURE2                         0x022C 0x0574 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_DATA1__UART2_RX                             0x022C 0x0574 0x0838 0x4 0x3
+#define MX6SX_PAD_SD1_DATA1__UART2_TX                             0x022C 0x0574 0x0000 0x4 0x0
+#define MX6SX_PAD_SD1_DATA1__GPIO6_IO_3                           0x022C 0x0574 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_DATA1__ENET1_1588_EVENT1_OUT                0x022C 0x0574 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_DATA1__CCM_CLKO2                            0x022C 0x0574 0x0000 0x7 0x0
+#define MX6SX_PAD_SD1_DATA1__VADC_CLAMP_DOWN                      0x022C 0x0574 0x0000 0x8 0x0
+#define MX6SX_PAD_SD1_DATA1__MMDC_DEBUG_47                        0x022C 0x0574 0x0000 0x9 0x0
+#define MX6SX_PAD_SD1_DATA2__USDHC1_DATA2                         0x0230 0x0578 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_DATA2__AUDMUX_AUD5_TXFS                     0x0230 0x0578 0x0670 0x1 0x1
+#define MX6SX_PAD_SD1_DATA2__PWM3_OUT                             0x0230 0x0578 0x0000 0x2 0x0
+#define MX6SX_PAD_SD1_DATA2__GPT_COMPARE2                         0x0230 0x0578 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_DATA2__UART2_CTS_B                          0x0230 0x0578 0x0834 0x4 0x2
+#define MX6SX_PAD_SD1_DATA2__GPIO6_IO_4                           0x0230 0x0578 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_DATA2__ECSPI4_RDY                           0x0230 0x0578 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_DATA2__CCM_OUT0                             0x0230 0x0578 0x0000 0x7 0x0
+#define MX6SX_PAD_SD1_DATA2__VADC_EXT_PD_N                        0x0230 0x0578 0x0000 0x8 0x0
+#define MX6SX_PAD_SD1_DATA3__USDHC1_DATA3                         0x0234 0x057C 0x0000 0x0 0x0
+#define MX6SX_PAD_SD1_DATA3__AUDMUX_AUD5_TXD                      0x0234 0x057C 0x0660 0x1 0x1
+#define MX6SX_PAD_SD1_DATA3__AUDMUX_AUD5_RXD                      0x0234 0x057C 0x065C 0x2 0x2
+#define MX6SX_PAD_SD1_DATA3__GPT_COMPARE3                         0x0234 0x057C 0x0000 0x3 0x0
+#define MX6SX_PAD_SD1_DATA3__UART2_RTS_B                          0x0234 0x057C 0x0834 0x4 0x3
+#define MX6SX_PAD_SD1_DATA3__GPIO6_IO_5                           0x0234 0x057C 0x0000 0x5 0x0
+#define MX6SX_PAD_SD1_DATA3__ECSPI4_SS1                           0x0234 0x057C 0x0000 0x6 0x0
+#define MX6SX_PAD_SD1_DATA3__CCM_PMIC_RDY                         0x0234 0x057C 0x069C 0x7 0x2
+#define MX6SX_PAD_SD1_DATA3__VADC_RST_N                           0x0234 0x057C 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_CLK__USDHC2_CLK                             0x0238 0x0580 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_CLK__AUDMUX_AUD6_RXFS                       0x0238 0x0580 0x0680 0x1 0x2
+#define MX6SX_PAD_SD2_CLK__KPP_COL_5                              0x0238 0x0580 0x07C8 0x2 0x1
+#define MX6SX_PAD_SD2_CLK__ECSPI4_SCLK                            0x0238 0x0580 0x0740 0x3 0x1
+#define MX6SX_PAD_SD2_CLK__MLB_SIG                                0x0238 0x0580 0x07F0 0x4 0x2
+#define MX6SX_PAD_SD2_CLK__GPIO6_IO_6                             0x0238 0x0580 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_CLK__MQS_RIGHT                              0x0238 0x0580 0x0000 0x6 0x0
+#define MX6SX_PAD_SD2_CLK__WDOG1_WDOG_ANY                         0x0238 0x0580 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_CLK__VADC_CLAMP_CURRENT_5                   0x0238 0x0580 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_CLK__MMDC_DEBUG_29                          0x0238 0x0580 0x0000 0x9 0x0
+#define MX6SX_PAD_SD2_CMD__USDHC2_CMD                             0x023C 0x0584 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_CMD__AUDMUX_AUD6_RXC                        0x023C 0x0584 0x067C 0x1 0x2
+#define MX6SX_PAD_SD2_CMD__KPP_ROW_5                              0x023C 0x0584 0x07D4 0x2 0x1
+#define MX6SX_PAD_SD2_CMD__ECSPI4_MOSI                            0x023C 0x0584 0x0748 0x3 0x1
+#define MX6SX_PAD_SD2_CMD__MLB_CLK                                0x023C 0x0584 0x07E8 0x4 0x2
+#define MX6SX_PAD_SD2_CMD__GPIO6_IO_7                             0x023C 0x0584 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_CMD__MQS_LEFT                               0x023C 0x0584 0x0000 0x6 0x0
+#define MX6SX_PAD_SD2_CMD__WDOG3_WDOG_B                           0x023C 0x0584 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_CMD__VADC_CLAMP_CURRENT_4                   0x023C 0x0584 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_CMD__MMDC_DEBUG_30                          0x023C 0x0584 0x0000 0x9 0x0
+#define MX6SX_PAD_SD2_DATA0__USDHC2_DATA0                         0x0240 0x0588 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_DATA0__AUDMUX_AUD6_RXD                      0x0240 0x0588 0x0674 0x1 0x2
+#define MX6SX_PAD_SD2_DATA0__KPP_ROW_7                            0x0240 0x0588 0x07DC 0x2 0x1
+#define MX6SX_PAD_SD2_DATA0__PWM1_OUT                             0x0240 0x0588 0x0000 0x3 0x0
+#define MX6SX_PAD_SD2_DATA0__I2C4_SDA                             0x0240 0x0588 0x07C4 0x4 0x3
+#define MX6SX_PAD_SD2_DATA0__GPIO6_IO_8                           0x0240 0x0588 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_DATA0__ECSPI4_SS3                           0x0240 0x0588 0x0000 0x6 0x0
+#define MX6SX_PAD_SD2_DATA0__UART4_RX                             0x0240 0x0588 0x0848 0x7 0x4
+#define MX6SX_PAD_SD2_DATA0__UART4_TX                             0x0240 0x0588 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_DATA0__VADC_CLAMP_CURRENT_0                 0x0240 0x0588 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_DATA0__MMDC_DEBUG_50                        0x0240 0x0588 0x0000 0x9 0x0
+#define MX6SX_PAD_SD2_DATA1__USDHC2_DATA1                         0x0244 0x058C 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_DATA1__AUDMUX_AUD6_TXC                      0x0244 0x058C 0x0684 0x1 0x2
+#define MX6SX_PAD_SD2_DATA1__KPP_COL_7                            0x0244 0x058C 0x07D0 0x2 0x1
+#define MX6SX_PAD_SD2_DATA1__PWM2_OUT                             0x0244 0x058C 0x0000 0x3 0x0
+#define MX6SX_PAD_SD2_DATA1__I2C4_SCL                             0x0244 0x058C 0x07C0 0x4 0x3
+#define MX6SX_PAD_SD2_DATA1__GPIO6_IO_9                           0x0244 0x058C 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_DATA1__ECSPI4_SS2                           0x0244 0x058C 0x0000 0x6 0x0
+#define MX6SX_PAD_SD2_DATA1__UART4_RX                             0x0244 0x058C 0x0848 0x7 0x5
+#define MX6SX_PAD_SD2_DATA1__UART4_TX                             0x0244 0x058C 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_DATA1__VADC_CLAMP_CURRENT_1                 0x0244 0x058C 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_DATA1__MMDC_DEBUG_49                        0x0244 0x058C 0x0000 0x9 0x0
+#define MX6SX_PAD_SD2_DATA2__USDHC2_DATA2                         0x0248 0x0590 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_DATA2__AUDMUX_AUD6_TXFS                     0x0248 0x0590 0x0688 0x1 0x2
+#define MX6SX_PAD_SD2_DATA2__KPP_ROW_6                            0x0248 0x0590 0x07D8 0x2 0x1
+#define MX6SX_PAD_SD2_DATA2__ECSPI4_SS0                           0x0248 0x0590 0x074C 0x3 0x1
+#define MX6SX_PAD_SD2_DATA2__SDMA_EXT_EVENT_0                     0x0248 0x0590 0x081C 0x4 0x2
+#define MX6SX_PAD_SD2_DATA2__GPIO6_IO_10                          0x0248 0x0590 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_DATA2__SPDIF_OUT                            0x0248 0x0590 0x0000 0x6 0x0
+#define MX6SX_PAD_SD2_DATA2__UART6_RX                             0x0248 0x0590 0x0858 0x7 0x4
+#define MX6SX_PAD_SD2_DATA2__UART6_TX                             0x0248 0x0590 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_DATA2__VADC_CLAMP_CURRENT_2                 0x0248 0x0590 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_DATA2__MMDC_DEBUG_32                        0x0248 0x0590 0x0000 0x9 0x0
+#define MX6SX_PAD_SD2_DATA3__USDHC2_DATA3                         0x024C 0x0594 0x0000 0x0 0x0
+#define MX6SX_PAD_SD2_DATA3__AUDMUX_AUD6_TXD                      0x024C 0x0594 0x0678 0x1 0x2
+#define MX6SX_PAD_SD2_DATA3__KPP_COL_6                            0x024C 0x0594 0x07CC 0x2 0x1
+#define MX6SX_PAD_SD2_DATA3__ECSPI4_MISO                          0x024C 0x0594 0x0744 0x3 0x1
+#define MX6SX_PAD_SD2_DATA3__MLB_DATA                             0x024C 0x0594 0x07EC 0x4 0x2
+#define MX6SX_PAD_SD2_DATA3__GPIO6_IO_11                          0x024C 0x0594 0x0000 0x5 0x0
+#define MX6SX_PAD_SD2_DATA3__SPDIF_IN                             0x024C 0x0594 0x0824 0x6 0x4
+#define MX6SX_PAD_SD2_DATA3__UART6_RX                             0x024C 0x0594 0x0858 0x7 0x5
+#define MX6SX_PAD_SD2_DATA3__UART6_TX                             0x024C 0x0594 0x0000 0x7 0x0
+#define MX6SX_PAD_SD2_DATA3__VADC_CLAMP_CURRENT_3                 0x024C 0x0594 0x0000 0x8 0x0
+#define MX6SX_PAD_SD2_DATA3__MMDC_DEBUG_31                        0x024C 0x0594 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_CLK__USDHC3_CLK                             0x0250 0x0598 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_CLK__UART4_CTS_B                            0x0250 0x0598 0x0844 0x1 0x0
+#define MX6SX_PAD_SD3_CLK__ECSPI4_SCLK                            0x0250 0x0598 0x0740 0x2 0x0
+#define MX6SX_PAD_SD3_CLK__AUDMUX_AUD6_RXFS                       0x0250 0x0598 0x0680 0x3 0x0
+#define MX6SX_PAD_SD3_CLK__LCDIF2_VSYNC                           0x0250 0x0598 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_CLK__GPIO7_IO_0                             0x0250 0x0598 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_CLK__LCDIF2_BUSY                            0x0250 0x0598 0x07E4 0x6 0x0
+#define MX6SX_PAD_SD3_CLK__TPSMP_HDATA_29                         0x0250 0x0598 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_CLK__SDMA_DEBUG_EVENT_CHANNEL_5             0x0250 0x0598 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_CMD__USDHC3_CMD                             0x0254 0x059C 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_CMD__UART4_RX                               0x0254 0x059C 0x0848 0x1 0x0
+#define MX6SX_PAD_SD3_CMD__UART4_TX                               0x0254 0x059C 0x0000 0x1 0x0
+#define MX6SX_PAD_SD3_CMD__ECSPI4_MOSI                            0x0254 0x059C 0x0748 0x2 0x0
+#define MX6SX_PAD_SD3_CMD__AUDMUX_AUD6_RXC                        0x0254 0x059C 0x067C 0x3 0x0
+#define MX6SX_PAD_SD3_CMD__LCDIF2_HSYNC                           0x0254 0x059C 0x07E4 0x4 0x1
+#define MX6SX_PAD_SD3_CMD__GPIO7_IO_1                             0x0254 0x059C 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_CMD__LCDIF2_RS                              0x0254 0x059C 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_CMD__TPSMP_HDATA_28                         0x0254 0x059C 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_CMD__SDMA_DEBUG_EVENT_CHANNEL_4             0x0254 0x059C 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA0__USDHC3_DATA0                         0x0258 0x05A0 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA0__I2C4_SCL                             0x0258 0x05A0 0x07C0 0x1 0x0
+#define MX6SX_PAD_SD3_DATA0__ECSPI2_SS1                           0x0258 0x05A0 0x0000 0x2 0x0
+#define MX6SX_PAD_SD3_DATA0__AUDMUX_AUD6_RXD                      0x0258 0x05A0 0x0674 0x3 0x0
+#define MX6SX_PAD_SD3_DATA0__LCDIF2_DATA_1                        0x0258 0x05A0 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA0__GPIO7_IO_2                           0x0258 0x05A0 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA0__DCIC1_OUT                            0x0258 0x05A0 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA0__TPSMP_HDATA_30                       0x0258 0x05A0 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA0__GPU_DEBUG_0                          0x0258 0x05A0 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA0__SDMA_DEBUG_EVT_CHN_LINES_0           0x0258 0x05A0 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA1__USDHC3_DATA1                         0x025C 0x05A4 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA1__I2C4_SDA                             0x025C 0x05A4 0x07C4 0x1 0x0
+#define MX6SX_PAD_SD3_DATA1__ECSPI2_SS2                           0x025C 0x05A4 0x0000 0x2 0x0
+#define MX6SX_PAD_SD3_DATA1__AUDMUX_AUD6_TXC                      0x025C 0x05A4 0x0684 0x3 0x0
+#define MX6SX_PAD_SD3_DATA1__LCDIF2_DATA_0                        0x025C 0x05A4 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA1__GPIO7_IO_3                           0x025C 0x05A4 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA1__DCIC2_OUT                            0x025C 0x05A4 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA1__TPSMP_HDATA_31                       0x025C 0x05A4 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA1__GPU_DEBUG_1                          0x025C 0x05A4 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA1__SDMA_DEBUG_EVT_CHN_LINES_1           0x025C 0x05A4 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA2__USDHC3_DATA2                         0x0260 0x05A8 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA2__UART4_RTS_B                          0x0260 0x05A8 0x0844 0x1 0x1
+#define MX6SX_PAD_SD3_DATA2__ECSPI4_SS0                           0x0260 0x05A8 0x074C 0x2 0x0
+#define MX6SX_PAD_SD3_DATA2__AUDMUX_AUD6_TXFS                     0x0260 0x05A8 0x0688 0x3 0x0
+#define MX6SX_PAD_SD3_DATA2__LCDIF2_CLK                           0x0260 0x05A8 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA2__GPIO7_IO_4                           0x0260 0x05A8 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA2__LCDIF2_WR_RWN                        0x0260 0x05A8 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA2__TPSMP_HDATA_26                       0x0260 0x05A8 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA2__GPU_DEBUG_2                          0x0260 0x05A8 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA2__SDMA_DEBUG_EVENT_CHANNEL_2           0x0260 0x05A8 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA3__USDHC3_DATA3                         0x0264 0x05AC 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA3__UART4_RX                             0x0264 0x05AC 0x0848 0x1 0x1
+#define MX6SX_PAD_SD3_DATA3__UART4_TX                             0x0264 0x05AC 0x0000 0x1 0x0
+#define MX6SX_PAD_SD3_DATA3__ECSPI4_MISO                          0x0264 0x05AC 0x0744 0x2 0x0
+#define MX6SX_PAD_SD3_DATA3__AUDMUX_AUD6_TXD                      0x0264 0x05AC 0x0678 0x3 0x0
+#define MX6SX_PAD_SD3_DATA3__LCDIF2_ENABLE                        0x0264 0x05AC 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA3__GPIO7_IO_5                           0x0264 0x05AC 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA3__LCDIF2_RD_E                          0x0264 0x05AC 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA3__TPSMP_HDATA_27                       0x0264 0x05AC 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA3__GPU_DEBUG_3                          0x0264 0x05AC 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA3__SDMA_DEBUG_EVENT_CHANNEL_3           0x0264 0x05AC 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA4__USDHC3_DATA4                         0x0268 0x05B0 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA4__CAN2_RX                              0x0268 0x05B0 0x0690 0x1 0x0
+#define MX6SX_PAD_SD3_DATA4__CANFD_RX2                            0x0268 0x05B0 0x0698 0x2 0x0
+#define MX6SX_PAD_SD3_DATA4__UART3_RX                             0x0268 0x05B0 0x0840 0x3 0x2
+#define MX6SX_PAD_SD3_DATA4__UART3_TX                             0x0268 0x05B0 0x0000 0x3 0x0
+#define MX6SX_PAD_SD3_DATA4__LCDIF2_DATA_3                        0x0268 0x05B0 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA4__GPIO7_IO_6                           0x0268 0x05B0 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA4__ENET2_1588_EVENT0_IN                 0x0268 0x05B0 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA4__TPSMP_HTRANS_1                       0x0268 0x05B0 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA4__GPU_DEBUG_4                          0x0268 0x05B0 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA4__SDMA_DEBUG_BUS_DEVICE_0              0x0268 0x05B0 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA5__USDHC3_DATA5                         0x026C 0x05B4 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA5__CAN1_TX                              0x026C 0x05B4 0x0000 0x1 0x0
+#define MX6SX_PAD_SD3_DATA5__CANFD_TX1                            0x026C 0x05B4 0x0000 0x2 0x0
+#define MX6SX_PAD_SD3_DATA5__UART3_RX                             0x026C 0x05B4 0x0840 0x3 0x3
+#define MX6SX_PAD_SD3_DATA5__UART3_TX                             0x026C 0x05B4 0x0000 0x3 0x0
+#define MX6SX_PAD_SD3_DATA5__LCDIF2_DATA_2                        0x026C 0x05B4 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA5__GPIO7_IO_7                           0x026C 0x05B4 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA5__ENET2_1588_EVENT0_OUT                0x026C 0x05B4 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA5__SIM_M_HWRITE                         0x026C 0x05B4 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA5__GPU_DEBUG_5                          0x026C 0x05B4 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA5__SDMA_DEBUG_BUS_DEVICE_1              0x026C 0x05B4 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA6__USDHC3_DATA6                         0x0270 0x05B8 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA6__CAN2_TX                              0x0270 0x05B8 0x0000 0x1 0x0
+#define MX6SX_PAD_SD3_DATA6__CANFD_TX2                            0x0270 0x05B8 0x0000 0x2 0x0
+#define MX6SX_PAD_SD3_DATA6__UART3_RTS_B                          0x0270 0x05B8 0x083C 0x3 0x2
+#define MX6SX_PAD_SD3_DATA6__LCDIF2_DATA_4                        0x0270 0x05B8 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA6__GPIO7_IO_8                           0x0270 0x05B8 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA6__ENET1_1588_EVENT0_OUT                0x0270 0x05B8 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA6__TPSMP_HTRANS_0                       0x0270 0x05B8 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA6__GPU_DEBUG_7                          0x0270 0x05B8 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA6__SDMA_DEBUG_EVT_CHN_LINES_7           0x0270 0x05B8 0x0000 0x9 0x0
+#define MX6SX_PAD_SD3_DATA7__USDHC3_DATA7                         0x0274 0x05BC 0x0000 0x0 0x0
+#define MX6SX_PAD_SD3_DATA7__CAN1_RX                              0x0274 0x05BC 0x068C 0x1 0x0
+#define MX6SX_PAD_SD3_DATA7__CANFD_RX1                            0x0274 0x05BC 0x0694 0x2 0x0
+#define MX6SX_PAD_SD3_DATA7__UART3_CTS_B                          0x0274 0x05BC 0x083C 0x3 0x3
+#define MX6SX_PAD_SD3_DATA7__LCDIF2_DATA_5                        0x0274 0x05BC 0x0000 0x4 0x0
+#define MX6SX_PAD_SD3_DATA7__GPIO7_IO_9                           0x0274 0x05BC 0x0000 0x5 0x0
+#define MX6SX_PAD_SD3_DATA7__ENET1_1588_EVENT0_IN                 0x0274 0x05BC 0x0000 0x6 0x0
+#define MX6SX_PAD_SD3_DATA7__TPSMP_HDATA_DIR                      0x0274 0x05BC 0x0000 0x7 0x0
+#define MX6SX_PAD_SD3_DATA7__GPU_DEBUG_6                          0x0274 0x05BC 0x0000 0x8 0x0
+#define MX6SX_PAD_SD3_DATA7__SDMA_DEBUG_EVT_CHN_LINES_2           0x0274 0x05BC 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_CLK__USDHC4_CLK                             0x0278 0x05C0 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_CLK__RAWNAND_DATA15                         0x0278 0x05C0 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_CLK__ECSPI2_MISO                            0x0278 0x05C0 0x0724 0x2 0x1
+#define MX6SX_PAD_SD4_CLK__AUDMUX_AUD3_RXFS                       0x0278 0x05C0 0x0638 0x3 0x0
+#define MX6SX_PAD_SD4_CLK__LCDIF2_DATA_13                         0x0278 0x05C0 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_CLK__GPIO6_IO_12                            0x0278 0x05C0 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_CLK__ECSPI3_SS2                             0x0278 0x05C0 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_CLK__TPSMP_HDATA_20                         0x0278 0x05C0 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_CLK__VDEC_DEBUG_12                          0x0278 0x05C0 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_CLK__SDMA_DEBUG_EVENT_CHANNEL_SEL           0x0278 0x05C0 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_CMD__USDHC4_CMD                             0x027C 0x05C4 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_CMD__RAWNAND_DATA14                         0x027C 0x05C4 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_CMD__ECSPI2_MOSI                            0x027C 0x05C4 0x0728 0x2 0x1
+#define MX6SX_PAD_SD4_CMD__AUDMUX_AUD3_RXC                        0x027C 0x05C4 0x0634 0x3 0x0
+#define MX6SX_PAD_SD4_CMD__LCDIF2_DATA_14                         0x027C 0x05C4 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_CMD__GPIO6_IO_13                            0x027C 0x05C4 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_CMD__ECSPI3_SS1                             0x027C 0x05C4 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_CMD__TPSMP_HDATA_19                         0x027C 0x05C4 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_CMD__VDEC_DEBUG_11                          0x027C 0x05C4 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_CMD__SDMA_DEBUG_CORE_RUN                    0x027C 0x05C4 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA0__USDHC4_DATA0                         0x0280 0x05C8 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA0__RAWNAND_DATA10                       0x0280 0x05C8 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA0__ECSPI2_SS0                           0x0280 0x05C8 0x072C 0x2 0x1
+#define MX6SX_PAD_SD4_DATA0__AUDMUX_AUD3_RXD                      0x0280 0x05C8 0x062C 0x3 0x0
+#define MX6SX_PAD_SD4_DATA0__LCDIF2_DATA_12                       0x0280 0x05C8 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA0__GPIO6_IO_14                          0x0280 0x05C8 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA0__ECSPI3_SS3                           0x0280 0x05C8 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_DATA0__TPSMP_HDATA_21                       0x0280 0x05C8 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA0__VDEC_DEBUG_13                        0x0280 0x05C8 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA0__SDMA_DEBUG_MODE                      0x0280 0x05C8 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA1__USDHC4_DATA1                         0x0284 0x05CC 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA1__RAWNAND_DATA11                       0x0284 0x05CC 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA1__ECSPI2_SCLK                          0x0284 0x05CC 0x0720 0x2 0x1
+#define MX6SX_PAD_SD4_DATA1__AUDMUX_AUD3_TXC                      0x0284 0x05CC 0x063C 0x3 0x0
+#define MX6SX_PAD_SD4_DATA1__LCDIF2_DATA_11                       0x0284 0x05CC 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA1__GPIO6_IO_15                          0x0284 0x05CC 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA1__ECSPI3_RDY                           0x0284 0x05CC 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_DATA1__TPSMP_HDATA_22                       0x0284 0x05CC 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA1__VDEC_DEBUG_14                        0x0284 0x05CC 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA1__SDMA_DEBUG_BUS_ERROR                 0x0284 0x05CC 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA2__USDHC4_DATA2                         0x0288 0x05D0 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA2__RAWNAND_DATA12                       0x0288 0x05D0 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA2__I2C2_SDA                             0x0288 0x05D0 0x07B4 0x2 0x0
+#define MX6SX_PAD_SD4_DATA2__AUDMUX_AUD3_TXFS                     0x0288 0x05D0 0x0640 0x3 0x0
+#define MX6SX_PAD_SD4_DATA2__LCDIF2_DATA_10                       0x0288 0x05D0 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA2__GPIO6_IO_16                          0x0288 0x05D0 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA2__ECSPI2_SS3                           0x0288 0x05D0 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_DATA2__TPSMP_HDATA_23                       0x0288 0x05D0 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA2__VDEC_DEBUG_15                        0x0288 0x05D0 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA2__SDMA_DEBUG_BUS_RWB                   0x0288 0x05D0 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA3__USDHC4_DATA3                         0x028C 0x05D4 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA3__RAWNAND_DATA13                       0x028C 0x05D4 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA3__I2C2_SCL                             0x028C 0x05D4 0x07B0 0x2 0x0
+#define MX6SX_PAD_SD4_DATA3__AUDMUX_AUD3_TXD                      0x028C 0x05D4 0x0630 0x3 0x0
+#define MX6SX_PAD_SD4_DATA3__LCDIF2_DATA_9                        0x028C 0x05D4 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA3__GPIO6_IO_17                          0x028C 0x05D4 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA3__ECSPI2_RDY                           0x028C 0x05D4 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_DATA3__TPSMP_HDATA_24                       0x028C 0x05D4 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA3__VDEC_DEBUG_16                        0x028C 0x05D4 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA3__SDMA_DEBUG_MATCHED_DMBUS             0x028C 0x05D4 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA4__USDHC4_DATA4                         0x0290 0x05D8 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA4__RAWNAND_DATA09                       0x0290 0x05D8 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA4__UART5_RX                             0x0290 0x05D8 0x0850 0x2 0x0
+#define MX6SX_PAD_SD4_DATA4__UART5_TX                             0x0290 0x05D8 0x0000 0x2 0x0
+#define MX6SX_PAD_SD4_DATA4__ECSPI3_SCLK                          0x0290 0x05D8 0x0730 0x3 0x0
+#define MX6SX_PAD_SD4_DATA4__LCDIF2_DATA_8                        0x0290 0x05D8 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA4__GPIO6_IO_18                          0x0290 0x05D8 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA4__SPDIF_OUT                            0x0290 0x05D8 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_DATA4__TPSMP_HDATA_16                       0x0290 0x05D8 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA4__USB_OTG_HOST_MODE                    0x0290 0x05D8 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA4__SDMA_DEBUG_RTBUFFER_WRITE            0x0290 0x05D8 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA5__USDHC4_DATA5                         0x0294 0x05DC 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA5__RAWNAND_CE2_B                        0x0294 0x05DC 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA5__UART5_RX                             0x0294 0x05DC 0x0850 0x2 0x1
+#define MX6SX_PAD_SD4_DATA5__UART5_TX                             0x0294 0x05DC 0x0000 0x2 0x0
+#define MX6SX_PAD_SD4_DATA5__ECSPI3_MOSI                          0x0294 0x05DC 0x0738 0x3 0x0
+#define MX6SX_PAD_SD4_DATA5__LCDIF2_DATA_7                        0x0294 0x05DC 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA5__GPIO6_IO_19                          0x0294 0x05DC 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA5__SPDIF_IN                             0x0294 0x05DC 0x0824 0x6 0x0
+#define MX6SX_PAD_SD4_DATA5__TPSMP_HDATA_17                       0x0294 0x05DC 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA5__VDEC_DEBUG_9                         0x0294 0x05DC 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA5__SDMA_DEBUG_EVENT_CHANNEL_0           0x0294 0x05DC 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA6__USDHC4_DATA6                         0x0298 0x05E0 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA6__RAWNAND_CE3_B                        0x0298 0x05E0 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA6__UART5_RTS_B                          0x0298 0x05E0 0x084C 0x2 0x0
+#define MX6SX_PAD_SD4_DATA6__ECSPI3_MISO                          0x0298 0x05E0 0x0734 0x3 0x0
+#define MX6SX_PAD_SD4_DATA6__LCDIF2_DATA_6                        0x0298 0x05E0 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA6__GPIO6_IO_20                          0x0298 0x05E0 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA6__USDHC4_WP                            0x0298 0x05E0 0x0878 0x6 0x0
+#define MX6SX_PAD_SD4_DATA6__TPSMP_HDATA_18                       0x0298 0x05E0 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA6__VDEC_DEBUG_10                        0x0298 0x05E0 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA6__SDMA_DEBUG_EVENT_CHANNEL_1           0x0298 0x05E0 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_DATA7__USDHC4_DATA7                         0x029C 0x05E4 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_DATA7__RAWNAND_DATA08                       0x029C 0x05E4 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_DATA7__UART5_CTS_B                          0x029C 0x05E4 0x084C 0x2 0x1
+#define MX6SX_PAD_SD4_DATA7__ECSPI3_SS0                           0x029C 0x05E4 0x073C 0x3 0x0
+#define MX6SX_PAD_SD4_DATA7__LCDIF2_DATA_15                       0x029C 0x05E4 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_DATA7__GPIO6_IO_21                          0x029C 0x05E4 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_DATA7__USDHC4_CD_B                          0x029C 0x05E4 0x0874 0x6 0x0
+#define MX6SX_PAD_SD4_DATA7__TPSMP_HDATA_15                       0x029C 0x05E4 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_DATA7__USB_OTG_PWR_WAKE                     0x029C 0x05E4 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_DATA7__SDMA_DEBUG_YIELD                     0x029C 0x05E4 0x0000 0x9 0x0
+#define MX6SX_PAD_SD4_RESET_B__USDHC4_RESET_B                     0x02A0 0x05E8 0x0000 0x0 0x0
+#define MX6SX_PAD_SD4_RESET_B__RAWNAND_DQS                        0x02A0 0x05E8 0x0000 0x1 0x0
+#define MX6SX_PAD_SD4_RESET_B__USDHC4_RESET                       0x02A0 0x05E8 0x0000 0x2 0x0
+#define MX6SX_PAD_SD4_RESET_B__AUDMUX_MCLK                        0x02A0 0x05E8 0x0000 0x3 0x0
+#define MX6SX_PAD_SD4_RESET_B__LCDIF2_RESET                       0x02A0 0x05E8 0x0000 0x4 0x0
+#define MX6SX_PAD_SD4_RESET_B__GPIO6_IO_22                        0x02A0 0x05E8 0x0000 0x5 0x0
+#define MX6SX_PAD_SD4_RESET_B__LCDIF2_CS                          0x02A0 0x05E8 0x0000 0x6 0x0
+#define MX6SX_PAD_SD4_RESET_B__TPSMP_HDATA_25                     0x02A0 0x05E8 0x0000 0x7 0x0
+#define MX6SX_PAD_SD4_RESET_B__VDEC_DEBUG_17                      0x02A0 0x05E8 0x0000 0x8 0x0
+#define MX6SX_PAD_SD4_RESET_B__SDMA_DEBUG_BUS_DEVICE_2            0x02A0 0x05E8 0x0000 0x9 0x0
+#define MX6SX_PAD_USB_H_DATA__USB_H_DATA                          0x02A4 0x05EC 0x0000 0x0 0x0
+#define MX6SX_PAD_USB_H_DATA__PWM2_OUT                            0x02A4 0x05EC 0x0000 0x1 0x0
+#define MX6SX_PAD_USB_H_DATA__ANATOP_24M_OUT                      0x02A4 0x05EC 0x0000 0x2 0x0
+#define MX6SX_PAD_USB_H_DATA__I2C4_SDA                            0x02A4 0x05EC 0x07C4 0x3 0x1
+#define MX6SX_PAD_USB_H_DATA__WDOG3_WDOG_B                        0x02A4 0x05EC 0x0000 0x4 0x0
+#define MX6SX_PAD_USB_H_DATA__GPIO7_IO_10                         0x02A4 0x05EC 0x0000 0x5 0x0
+#define MX6SX_PAD_USB_H_STROBE__USB_H_STROBE                      0x02A8 0x05F0 0x0000 0x0 0x0
+#define MX6SX_PAD_USB_H_STROBE__PWM1_OUT                          0x02A8 0x05F0 0x0000 0x1 0x0
+#define MX6SX_PAD_USB_H_STROBE__ANATOP_32K_OUT                    0x02A8 0x05F0 0x0000 0x2 0x0
+#define MX6SX_PAD_USB_H_STROBE__I2C4_SCL                          0x02A8 0x05F0 0x07C0 0x3 0x1
+#define MX6SX_PAD_USB_H_STROBE__WDOG3_WDOG_RST_B_DEB              0x02A8 0x05F0 0x0000 0x4 0x0
+#define MX6SX_PAD_USB_H_STROBE__GPIO7_IO_11                       0x02A8 0x05F0 0x0000 0x5 0x0
+
+#endif /* __DTS_IMX6SX_PINFUNC_H */
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
new file mode 100644 (file)
index 0000000..a3980d9
--- /dev/null
@@ -0,0 +1,479 @@
+/*
+ * Copyright (C) 2014 Freescale Semiconductor, Inc.
+ *
+ * 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/input/input.h>
+#include "imx6sx.dtsi"
+
+/ {
+       model = "Freescale i.MX6 SoloX SDB Board";
+       compatible = "fsl,imx6sx-sdb", "fsl,imx6sx";
+
+       chosen {
+               stdout-path = &uart1;
+       };
+
+       memory {
+               reg = <0x80000000 0x40000000>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               vcc_sd3: regulator@0 {
+                       compatible = "regulator-fixed";
+                       reg = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_vcc_sd3>;
+                       regulator-name = "VCC_SD3";
+                       regulator-min-microvolt = <3000000>;
+                       regulator-max-microvolt = <3000000>;
+                       gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_usb_otg1_vbus: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb_otg1>;
+                       regulator-name = "usb_otg1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_usb_otg2_vbus: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb_otg2>;
+                       regulator-name = "usb_otg2_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+               };
+
+               reg_psu_5v: regulator@3 {
+                       compatible = "regulator-fixed";
+                       reg = <3>;
+                       regulator-name = "PSU-5V0";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+               };
+       };
+
+       sound {
+               compatible = "fsl,imx6sx-sdb-wm8962", "fsl,imx-audio-wm8962";
+               model = "wm8962-audio";
+               ssi-controller = <&ssi2>;
+               audio-codec = <&codec>;
+               audio-routing =
+                       "Headphone Jack", "HPOUTL",
+                       "Headphone Jack", "HPOUTR",
+                       "Ext Spk", "SPKOUTL",
+                       "Ext Spk", "SPKOUTR",
+                       "AMIC", "MICBIAS",
+                       "IN3R", "AMIC";
+               mux-int-port = <2>;
+               mux-ext-port = <6>;
+       };
+};
+
+&audmux {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_audmux>;
+       status = "okay";
+};
+
+&fec1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_enet1>;
+       phy-mode = "rgmii";
+       status = "okay";
+};
+
+&i2c1 {
+        clock-frequency = <100000>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_i2c1>;
+        status = "okay";
+
+       pmic: pfuze100@08 {
+               compatible = "fsl,pfuze100";
+               reg = <0x08>;
+
+               regulators {
+                       sw1a_reg: sw1ab {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw1c_reg: sw1c {
+                               regulator-min-microvolt = <300000>;
+                               regulator-max-microvolt = <1875000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                               regulator-ramp-delay = <6250>;
+                       };
+
+                       sw2_reg: sw2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3a_reg: sw3a {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw3b_reg: sw3b {
+                               regulator-min-microvolt = <400000>;
+                               regulator-max-microvolt = <1975000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       sw4_reg: sw4 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <3300000>;
+                       };
+
+                       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: vgen1 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                               regulator-always-on;
+                       };
+
+                       vgen2_reg: vgen2 {
+                               regulator-min-microvolt = <800000>;
+                               regulator-max-microvolt = <1550000>;
+                       };
+
+                       vgen3_reg: vgen3 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen4_reg: vgen4 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen5_reg: vgen5 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vgen6_reg: vgen6 {
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&i2c4 {
+        clock-frequency = <100000>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_i2c4>;
+        status = "okay";
+
+       codec: wm8962@1a {
+               compatible = "wlf,wm8962";
+               reg = <0x1a>;
+               clocks = <&clks IMX6SX_CLK_AUDIO>;
+               DCVDD-supply = <&vgen4_reg>;
+               DBVDD-supply = <&vgen4_reg>;
+               AVDD-supply = <&vgen4_reg>;
+               CPVDD-supply = <&vgen4_reg>;
+               MICVDD-supply = <&vgen3_reg>;
+               PLLVDD-supply = <&vgen4_reg>;
+               SPKVDD1-supply = <&reg_psu_5v>;
+               SPKVDD2-supply = <&reg_psu_5v>;
+       };
+};
+
+&ssi2 {
+       status = "okay";
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart1>;
+       status = "okay";
+};
+
+&uart5 { /* for bluetooth */
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_uart5>;
+       fsl,uart-has-rtscts;
+       status = "okay";
+};
+
+&usbotg1 {
+       vbus-supply = <&reg_usb_otg1_vbus>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usb_otg1_id>;
+       status = "okay";
+};
+
+&usbotg2 {
+       vbus-supply = <&reg_usb_otg2_vbus>;
+       dr_mode = "host";
+       status = "okay";
+};
+
+&usdhc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc2>;
+       non-removable;
+       no-1-8-v;
+       keep-power-in-suspend;
+       enable-sdio-wakeup;
+       status = "okay";
+};
+
+&usdhc3 {
+       pinctrl-names = "default", "state_100mhz", "state_200mhz";
+       pinctrl-0 = <&pinctrl_usdhc3>;
+       pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
+       pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
+       bus-width = <8>;
+       cd-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
+       wp-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
+       keep-power-in-suspend;
+       enable-sdio-wakeup;
+       vmmc-supply = <&vcc_sd3>;
+       status = "okay";
+};
+
+&usdhc4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_usdhc4>;
+       cd-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>;
+       wp-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&iomuxc {
+       imx6x-sdb {
+               pinctrl_audmux: audmuxgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_CSI_DATA00__AUDMUX_AUD6_TXC   0x130b0
+                               MX6SX_PAD_CSI_DATA01__AUDMUX_AUD6_TXFS  0x130b0
+                               MX6SX_PAD_CSI_HSYNC__AUDMUX_AUD6_TXD    0x120b0
+                               MX6SX_PAD_CSI_VSYNC__AUDMUX_AUD6_RXD    0x130b0
+                               MX6SX_PAD_CSI_PIXCLK__AUDMUX_MCLK       0x130b0
+                       >;
+               };
+
+               pinctrl_enet1: enet1grp {
+                       fsl,pins = <
+                               MX6SX_PAD_ENET1_MDIO__ENET1_MDIO        0xa0b1
+                               MX6SX_PAD_ENET1_MDC__ENET1_MDC          0xa0b1
+                               MX6SX_PAD_RGMII1_TXC__ENET1_RGMII_TXC   0xa0b1
+                               MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0   0xa0b1
+                               MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1   0xa0b1
+                               MX6SX_PAD_RGMII1_TD2__ENET1_TX_DATA_2   0xa0b1
+                               MX6SX_PAD_RGMII1_TD3__ENET1_TX_DATA_3   0xa0b1
+                               MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN    0xa0b1
+                               MX6SX_PAD_RGMII1_RXC__ENET1_RX_CLK      0x3081
+                               MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0   0x3081
+                               MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1   0x3081
+                               MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2   0x3081
+                               MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3   0x3081
+                               MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN    0x3081
+                       >;
+               };
+
+               pinctrl_gpio_keys: gpio_keysgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059
+                               MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059
+                       >;
+               };
+
+               pinctrl_i2c1: i2c1grp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO01__I2C1_SDA          0x4001b8b1
+                               MX6SX_PAD_GPIO1_IO00__I2C1_SCL          0x4001b8b1
+                       >;
+               };
+
+               pinctrl_i2c4: i2c4grp {
+                       fsl,pins = <
+                               MX6SX_PAD_CSI_DATA07__I2C4_SDA          0x4001b8b1
+                               MX6SX_PAD_CSI_DATA06__I2C4_SCL          0x4001b8b1
+                       >;
+               };
+
+               pinctrl_vcc_sd3: vccsd3grp {
+                       fsl,pins = <
+                               MX6SX_PAD_KEY_COL1__GPIO2_IO_11         0x17059
+                       >;
+               };
+
+               pinctrl_uart1: uart1grp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO04__UART1_TX          0x1b0b1
+                               MX6SX_PAD_GPIO1_IO05__UART1_RX          0x1b0b1
+                       >;
+               };
+
+               pinctrl_uart5: uart5grp {
+                       fsl,pins = <
+                               MX6SX_PAD_KEY_ROW3__UART5_RX            0x1b0b1
+                               MX6SX_PAD_KEY_COL3__UART5_TX            0x1b0b1
+                               MX6SX_PAD_KEY_ROW2__UART5_CTS_B         0x1b0b1
+                               MX6SX_PAD_KEY_COL2__UART5_RTS_B         0x1b0b1
+                       >;
+               };
+
+               pinctrl_usb_otg1: usbotg1grp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9        0x10b0
+                       >;
+               };
+
+               pinctrl_usb_otg1_id: usbotg1idgrp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO10__ANATOP_OTG1_ID    0x17059
+                       >;
+               };
+
+               pinctrl_usb_otg2: usbot2ggrp {
+                       fsl,pins = <
+                               MX6SX_PAD_GPIO1_IO12__GPIO1_IO_12       0x10b0
+                       >;
+               };
+
+               pinctrl_usdhc2: usdhc2grp {
+                       fsl,pins = <
+                               MX6SX_PAD_SD2_CMD__USDHC2_CMD           0x17059
+                               MX6SX_PAD_SD2_CLK__USDHC2_CLK           0x10059
+                               MX6SX_PAD_SD2_DATA0__USDHC2_DATA0       0x17059
+                               MX6SX_PAD_SD2_DATA1__USDHC2_DATA1       0x17059
+                               MX6SX_PAD_SD2_DATA2__USDHC2_DATA2       0x17059
+                               MX6SX_PAD_SD2_DATA3__USDHC2_DATA3       0x17059
+                       >;
+               };
+
+               pinctrl_usdhc3: usdhc3grp {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x17059
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x10059
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x17059
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x17059
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x17059
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x17059
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x17059
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x17059
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x17059
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x17059
+                               MX6SX_PAD_KEY_COL0__GPIO2_IO_10         0x17059 /* CD */
+                               MX6SX_PAD_KEY_ROW0__GPIO2_IO_15         0x17059 /* WP */
+                       >;
+               };
+
+               pinctrl_usdhc3_100mhz: usdhc3grp-100mhz {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x170b9
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x100b9
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x170b9
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x170b9
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x170b9
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x170b9
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x170b9
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x170b9
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x170b9
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x170b9
+                       >;
+               };
+
+               pinctrl_usdhc3_200mhz: usdhc3grp-200mhz {
+                       fsl,pins = <
+                               MX6SX_PAD_SD3_CMD__USDHC3_CMD           0x170f9
+                               MX6SX_PAD_SD3_CLK__USDHC3_CLK           0x100f9
+                               MX6SX_PAD_SD3_DATA0__USDHC3_DATA0       0x170f9
+                               MX6SX_PAD_SD3_DATA1__USDHC3_DATA1       0x170f9
+                               MX6SX_PAD_SD3_DATA2__USDHC3_DATA2       0x170f9
+                               MX6SX_PAD_SD3_DATA3__USDHC3_DATA3       0x170f9
+                               MX6SX_PAD_SD3_DATA4__USDHC3_DATA4       0x170f9
+                               MX6SX_PAD_SD3_DATA5__USDHC3_DATA5       0x170f9
+                               MX6SX_PAD_SD3_DATA6__USDHC3_DATA6       0x170f9
+                               MX6SX_PAD_SD3_DATA7__USDHC3_DATA7       0x170f9
+                       >;
+               };
+
+               pinctrl_usdhc4: usdhc4grp {
+                       fsl,pins = <
+                               MX6SX_PAD_SD4_CMD__USDHC4_CMD           0x17059
+                               MX6SX_PAD_SD4_CLK__USDHC4_CLK           0x10059
+                               MX6SX_PAD_SD4_DATA0__USDHC4_DATA0       0x17059
+                               MX6SX_PAD_SD4_DATA1__USDHC4_DATA1       0x17059
+                               MX6SX_PAD_SD4_DATA2__USDHC4_DATA2       0x17059
+                               MX6SX_PAD_SD4_DATA3__USDHC4_DATA3       0x17059
+                               MX6SX_PAD_SD4_DATA7__GPIO6_IO_21        0x17059 /* CD */
+                               MX6SX_PAD_SD4_DATA6__GPIO6_IO_20        0x17059 /* WP */
+                       >;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
new file mode 100644 (file)
index 0000000..f4b9da6
--- /dev/null
@@ -0,0 +1,1208 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * 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 <dt-bindings/clock/imx6sx-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "imx6sx-pinfunc.h"
+#include "skeleton.dtsi"
+
+/ {
+       aliases {
+               can0 = &flexcan1;
+               can1 = &flexcan2;
+               ethernet0 = &fec1;
+               ethernet1 = &fec2;
+               gpio0 = &gpio1;
+               gpio1 = &gpio2;
+               gpio2 = &gpio3;
+               gpio3 = &gpio4;
+               gpio4 = &gpio5;
+               gpio5 = &gpio6;
+               gpio6 = &gpio7;
+               i2c0 = &i2c1;
+               i2c1 = &i2c2;
+               i2c2 = &i2c3;
+               i2c3 = &i2c4;
+               mmc0 = &usdhc1;
+               mmc1 = &usdhc2;
+               mmc2 = &usdhc3;
+               mmc3 = &usdhc4;
+               serial0 = &uart1;
+               serial1 = &uart2;
+               serial2 = &uart3;
+               serial3 = &uart4;
+               serial4 = &uart5;
+               serial5 = &uart6;
+               spi0 = &ecspi1;
+               spi1 = &ecspi2;
+               spi2 = &ecspi3;
+               spi3 = &ecspi4;
+               spi4 = &ecspi5;
+               usbphy0 = &usbphy1;
+               usbphy1 = &usbphy2;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu0: cpu@0 {
+                       compatible = "arm,cortex-a9";
+                       device_type = "cpu";
+                       reg = <0>;
+                       next-level-cache = <&L2>;
+                       operating-points = <
+                               /* kHz    uV */
+                               996000  1250000
+                               792000  1175000
+                               396000  1075000
+                       >;
+                       fsl,soc-operating-points = <
+                               /* ARM kHz  SOC uV */
+                               996000      1175000
+                               792000      1175000
+                               396000      1175000
+                       >;
+                       clock-latency = <61036>; /* two CLK32 periods */
+                       clocks = <&clks IMX6SX_CLK_ARM>,
+                                <&clks IMX6SX_CLK_PLL2_PFD2>,
+                                <&clks IMX6SX_CLK_STEP>,
+                                <&clks IMX6SX_CLK_PLL1_SW>,
+                                <&clks IMX6SX_CLK_PLL1_SYS>;
+                       clock-names = "arm", "pll2_pfd2_396m", "step",
+                                     "pll1_sw", "pll1_sys";
+                       arm-supply = <&reg_arm>;
+                       soc-supply = <&reg_soc>;
+               };
+       };
+
+       intc: interrupt-controller@00a01000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               reg = <0x00a01000 0x1000>,
+                     <0x00a00100 0x100>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ckil: clock@0 {
+                       compatible = "fixed-clock";
+                       reg = <0>;
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+                       clock-output-names = "ckil";
+               };
+
+               osc: clock@1 {
+                       compatible = "fixed-clock";
+                       reg = <1>;
+                       #clock-cells = <0>;
+                       clock-frequency = <24000000>;
+                       clock-output-names = "osc";
+               };
+
+               ipp_di0: clock@2 {
+                       compatible = "fixed-clock";
+                       reg = <2>;
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+                       clock-output-names = "ipp_di0";
+               };
+
+               ipp_di1: clock@3 {
+                       compatible = "fixed-clock";
+                       reg = <3>;
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+                       clock-output-names = "ipp_di1";
+               };
+       };
+
+       soc {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "simple-bus";
+               interrupt-parent = <&intc>;
+               ranges;
+
+               pmu {
+                       compatible = "arm,cortex-a9-pmu";
+                       interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+               };
+
+               ocram: sram@00900000 {
+                       compatible = "mmio-sram";
+                       reg = <0x00900000 0x20000>;
+                       clocks = <&clks IMX6SX_CLK_OCRAM>;
+               };
+
+               L2: l2-cache@00a02000 {
+                       compatible = "arm,pl310-cache";
+                       reg = <0x00a02000 0x1000>;
+                       interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+                       cache-unified;
+                       cache-level = <2>;
+                       arm,tag-latency = <4 2 3>;
+                       arm,data-latency = <4 2 3>;
+               };
+
+               dma_apbh: dma-apbh@01804000 {
+                       compatible = "fsl,imx6sx-dma-apbh", "fsl,imx28-dma-apbh";
+                       reg = <0x01804000 0x2000>;
+                       interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "gpmi0", "gpmi1", "gpmi2", "gpmi3";
+                       #dma-cells = <1>;
+                       dma-channels = <4>;
+                       clocks = <&clks IMX6SX_CLK_APBH_DMA>;
+               };
+
+               gpmi: gpmi-nand@01806000{
+                       compatible = "fsl,imx6sx-gpmi-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x01806000 0x2000>, <0x01808000 0x4000>;
+                       reg-names = "gpmi-nand", "bch";
+                       interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "bch";
+                       clocks = <&clks IMX6SX_CLK_GPMI_IO>,
+                                <&clks IMX6SX_CLK_GPMI_APB>,
+                                <&clks IMX6SX_CLK_GPMI_BCH>,
+                                <&clks IMX6SX_CLK_GPMI_BCH_APB>,
+                                <&clks IMX6SX_CLK_PER1_BCH>;
+                       clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",
+                                     "gpmi_bch_apb", "per1_bch";
+                       dmas = <&dma_apbh 0>;
+                       dma-names = "rx-tx";
+                       status = "disabled";
+               };
+
+               aips1: aips-bus@02000000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x02000000 0x100000>;
+                       ranges;
+
+                       spba-bus@02000000 {
+                               compatible = "fsl,spba-bus", "simple-bus";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <0x02000000 0x40000>;
+                               ranges;
+
+                               spdif: spdif@02004000 {
+                                       compatible = "fsl,imx6sx-spdif", "fsl,imx35-spdif";
+                                       reg = <0x02004000 0x4000>;
+                                       interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+                                       dmas = <&sdma 14 18 0>,
+                                              <&sdma 15 18 0>;
+                                       dma-names = "rx", "tx";
+                                       clocks = <&clks IMX6SX_CLK_SPDIF>,
+                                                <&clks IMX6SX_CLK_OSC>,
+                                                <&clks IMX6SX_CLK_SPDIF>,
+                                                <&clks 0>, <&clks 0>, <&clks 0>,
+                                                <&clks IMX6SX_CLK_IPG>,
+                                                <&clks 0>, <&clks 0>,
+                                                <&clks IMX6SX_CLK_SPBA>;
+                                       clock-names = "core", "rxtx0",
+                                                     "rxtx1", "rxtx2",
+                                                     "rxtx3", "rxtx4",
+                                                     "rxtx5", "rxtx6",
+                                                     "rxtx7", "dma";
+                                       status = "disabled";
+                               };
+
+                               ecspi1: ecspi@02008000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02008000 0x4000>;
+                                       interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ECSPI1>,
+                                                <&clks IMX6SX_CLK_ECSPI1>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi2: ecspi@0200c000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x0200c000 0x4000>;
+                                       interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ECSPI2>,
+                                                <&clks IMX6SX_CLK_ECSPI2>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi3: ecspi@02010000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02010000 0x4000>;
+                                       interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ECSPI3>,
+                                                <&clks IMX6SX_CLK_ECSPI3>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               ecspi4: ecspi@02014000 {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+                                       compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
+                                       reg = <0x02014000 0x4000>;
+                                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ECSPI4>,
+                                                <&clks IMX6SX_CLK_ECSPI4>;
+                                       clock-names = "ipg", "per";
+                                       status = "disabled";
+                               };
+
+                               uart1: serial@02020000 {
+                                       compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                                       reg = <0x02020000 0x4000>;
+                                       interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                                <&clks IMX6SX_CLK_UART_SERIAL>;
+                                       clock-names = "ipg", "per";
+                                       dmas = <&sdma 25 4 0>, <&sdma 26 4 0>;
+                                       dma-names = "rx", "tx";
+                                       status = "disabled";
+                               };
+
+                               esai: esai@02024000 {
+                                       reg = <0x02024000 0x4000>;
+                                       interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ESAI_IPG>,
+                                                <&clks IMX6SX_CLK_ESAI_MEM>,
+                                                <&clks IMX6SX_CLK_ESAI_EXTAL>,
+                                                <&clks IMX6SX_CLK_ESAI_IPG>,
+                                                <&clks IMX6SX_CLK_SPBA>;
+                                       clock-names = "core", "mem", "extal",
+                                                     "fsys", "dma";
+                                       status = "disabled";
+                               };
+
+                               ssi1: ssi@02028000 {
+                                       compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
+                                       reg = <0x02028000 0x4000>;
+                                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_SSI1_IPG>,
+                                                <&clks IMX6SX_CLK_SSI1>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 37 1 0>, <&sdma 38 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               ssi2: ssi@0202c000 {
+                                       compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
+                                       reg = <0x0202c000 0x4000>;
+                                       interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_SSI2_IPG>,
+                                                <&clks IMX6SX_CLK_SSI2>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 41 1 0>, <&sdma 42 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               ssi3: ssi@02030000 {
+                                       compatible = "fsl,imx6sx-ssi", "fsl,imx51-ssi";
+                                       reg = <0x02030000 0x4000>;
+                                       interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_SSI3_IPG>,
+                                                <&clks IMX6SX_CLK_SSI3>;
+                                       clock-names = "ipg", "baud";
+                                       dmas = <&sdma 45 1 0>, <&sdma 46 1 0>;
+                                       dma-names = "rx", "tx";
+                                       fsl,fifo-depth = <15>;
+                                       status = "disabled";
+                               };
+
+                               asrc: asrc@02034000 {
+                                       reg = <0x02034000 0x4000>;
+                                       interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_ASRC_MEM>,
+                                                <&clks IMX6SX_CLK_ASRC_IPG>,
+                                                <&clks IMX6SX_CLK_SPDIF>,
+                                                <&clks IMX6SX_CLK_SPBA>;
+                                       clock-names = "mem", "ipg", "asrck", "dma";
+                                       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>;
+                                       dma-names = "rxa", "rxb", "rxc",
+                                                   "txa", "txb", "txc";
+                                       status = "okay";
+                               };
+                       };
+
+                       pwm1: pwm@02080000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x02080000 0x4000>;
+                               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM1>,
+                                        <&clks IMX6SX_CLK_PWM1>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm2: pwm@02084000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x02084000 0x4000>;
+                               interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM2>,
+                                        <&clks IMX6SX_CLK_PWM2>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm3: pwm@02088000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x02088000 0x4000>;
+                               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM3>,
+                                        <&clks IMX6SX_CLK_PWM3>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm4: pwm@0208c000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x0208c000 0x4000>;
+                               interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM4>,
+                                        <&clks IMX6SX_CLK_PWM4>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       flexcan1: can@02090000 {
+                               compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
+                               reg = <0x02090000 0x4000>;
+                               interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_CAN1_IPG>,
+                                        <&clks IMX6SX_CLK_CAN1_SERIAL>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       flexcan2: can@02094000 {
+                               compatible = "fsl,imx6sx-flexcan", "fsl,imx6q-flexcan";
+                               reg = <0x02094000 0x4000>;
+                               interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_CAN2_IPG>,
+                                        <&clks IMX6SX_CLK_CAN2_SERIAL>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       gpt: gpt@02098000 {
+                               compatible = "fsl,imx6sx-gpt", "fsl,imx31-gpt";
+                               reg = <0x02098000 0x4000>;
+                               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_GPT_BUS>,
+                                        <&clks IMX6SX_CLK_GPT_SERIAL>;
+                               clock-names = "ipg", "per";
+                       };
+
+                       gpio1: gpio@0209c000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x0209c000 0x4000>;
+                               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio2: gpio@020a0000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a0000 0x4000>;
+                               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio3: gpio@020a4000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a4000 0x4000>;
+                               interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio4: gpio@020a8000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020a8000 0x4000>;
+                               interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio5: gpio@020ac000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020ac000 0x4000>;
+                               interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio6: gpio@020b0000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020b0000 0x4000>;
+                               interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       gpio7: gpio@020b4000 {
+                               compatible = "fsl,imx6sx-gpio", "fsl,imx35-gpio";
+                               reg = <0x020b4000 0x4000>;
+                               interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
+                               gpio-controller;
+                               #gpio-cells = <2>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                       };
+
+                       kpp: kpp@020b8000 {
+                               compatible = "fsl,imx6sx-kpp", "fsl,imx21-kpp";
+                               reg = <0x020b8000 0x4000>;
+                               interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_DUMMY>;
+                               status = "disabled";
+                       };
+
+                       wdog1: wdog@020bc000 {
+                               compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+                               reg = <0x020bc000 0x4000>;
+                               interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_DUMMY>;
+                       };
+
+                       wdog2: wdog@020c0000 {
+                               compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+                               reg = <0x020c0000 0x4000>;
+                               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_DUMMY>;
+                               status = "disabled";
+                       };
+
+                       clks: ccm@020c4000 {
+                               compatible = "fsl,imx6sx-ccm";
+                               reg = <0x020c4000 0x4000>;
+                               interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+                               #clock-cells = <1>;
+                               clocks = <&ckil>, <&osc>, <&ipp_di0>, <&ipp_di1>;
+                               clock-names = "ckil", "osc", "ipp_di0", "ipp_di1";
+                       };
+
+                       anatop: anatop@020c8000 {
+                               compatible = "fsl,imx6sx-anatop", "fsl,imx6q-anatop",
+                                            "syscon", "simple-bus";
+                               reg = <0x020c8000 0x1000>;
+                               interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
+
+                               regulator-1p1@110 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd1p1";
+                                       regulator-min-microvolt = <800000>;
+                                       regulator-max-microvolt = <1375000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x110>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <4>;
+                                       anatop-min-voltage = <800000>;
+                                       anatop-max-voltage = <1375000>;
+                               };
+
+                               regulator-3p0@120 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd3p0";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <3150000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x120>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <0>;
+                                       anatop-min-voltage = <2625000>;
+                                       anatop-max-voltage = <3400000>;
+                               };
+
+                               regulator-2p5@130 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vdd2p5";
+                                       regulator-min-microvolt = <2100000>;
+                                       regulator-max-microvolt = <2875000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x130>;
+                                       anatop-vol-bit-shift = <8>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-min-bit-val = <0>;
+                                       anatop-min-voltage = <2100000>;
+                                       anatop-max-voltage = <2875000>;
+                               };
+
+                               reg_arm: regulator-vddcore@140 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddarm";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <0>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <24>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+
+                               reg_pcie: regulator-vddpcie@140 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddpcie";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <9>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <26>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+
+                               reg_soc: regulator-vddsoc@140 {
+                                       compatible = "fsl,anatop-regulator";
+                                       regulator-name = "vddsoc";
+                                       regulator-min-microvolt = <725000>;
+                                       regulator-max-microvolt = <1450000>;
+                                       regulator-always-on;
+                                       anatop-reg-offset = <0x140>;
+                                       anatop-vol-bit-shift = <18>;
+                                       anatop-vol-bit-width = <5>;
+                                       anatop-delay-reg-offset = <0x170>;
+                                       anatop-delay-bit-shift = <28>;
+                                       anatop-delay-bit-width = <2>;
+                                       anatop-min-bit-val = <1>;
+                                       anatop-min-voltage = <725000>;
+                                       anatop-max-voltage = <1450000>;
+                               };
+                       };
+
+                       tempmon: tempmon {
+                               compatible = "fsl,imx6sx-tempmon", "fsl,imx6q-tempmon";
+                               interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+                               fsl,tempmon = <&anatop>;
+                               fsl,tempmon-data = <&ocotp>;
+                               clocks = <&clks IMX6SX_CLK_PLL3_USB_OTG>;
+                       };
+
+                       usbphy1: usbphy@020c9000 {
+                               compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
+                               reg = <0x020c9000 0x1000>;
+                               interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USBPHY1>;
+                               fsl,anatop = <&anatop>;
+                       };
+
+                       usbphy2: usbphy@020ca000 {
+                               compatible = "fsl,imx6sx-usbphy", "fsl,imx23-usbphy";
+                               reg = <0x020ca000 0x1000>;
+                               interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USBPHY2>;
+                               fsl,anatop = <&anatop>;
+                       };
+
+                       snvs: snvs@020cc000 {
+                               compatible = "fsl,sec-v4.0-mon", "simple-bus";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               ranges = <0 0x020cc000 0x4000>;
+
+                               snvs-rtc-lp@34 {
+                                       compatible = "fsl,sec-v4.0-mon-rtc-lp";
+                                       reg = <0x34 0x58>;
+                                       interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+                               };
+                       };
+
+                       epit1: epit@020d0000 {
+                               reg = <0x020d0000 0x4000>;
+                               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       epit2: epit@020d4000 {
+                               reg = <0x020d4000 0x4000>;
+                               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       src: src@020d8000 {
+                               compatible = "fsl,imx6sx-src", "fsl,imx51-src";
+                               reg = <0x020d8000 0x4000>;
+                               interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+                               #reset-cells = <1>;
+                       };
+
+                       gpc: gpc@020dc000 {
+                               compatible = "fsl,imx6sx-gpc", "fsl,imx6q-gpc";
+                               reg = <0x020dc000 0x4000>;
+                               interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+                       };
+
+                       iomuxc: iomuxc@020e0000 {
+                               compatible = "fsl,imx6sx-iomuxc";
+                               reg = <0x020e0000 0x4000>;
+                       };
+
+                       gpr: iomuxc-gpr@020e4000 {
+                               compatible = "fsl,imx6sx-iomuxc-gpr",
+                                            "fsl,imx6q-iomuxc-gpr", "syscon";
+                               reg = <0x020e4000 0x4000>;
+                       };
+
+                       sdma: sdma@020ec000 {
+                               compatible = "fsl,imx6sx-sdma", "fsl,imx6q-sdma";
+                               reg = <0x020ec000 0x4000>;
+                               interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_SDMA>,
+                                        <&clks IMX6SX_CLK_SDMA>;
+                               clock-names = "ipg", "ahb";
+                               #dma-cells = <3>;
+                               /* imx6sx reuses imx6q sdma firmware */
+                               fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";
+                       };
+               };
+
+               aips2: aips-bus@02100000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x02100000 0x100000>;
+                       ranges;
+
+                       usbotg1: usb@02184000 {
+                               compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
+                               reg = <0x02184000 0x200>;
+                               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USBOH3>;
+                               fsl,usbphy = <&usbphy1>;
+                               fsl,usbmisc = <&usbmisc 0>;
+                               fsl,anatop = <&anatop>;
+                               status = "disabled";
+                       };
+
+                       usbotg2: usb@02184200 {
+                               compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
+                               reg = <0x02184200 0x200>;
+                               interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USBOH3>;
+                               fsl,usbphy = <&usbphy2>;
+                               fsl,usbmisc = <&usbmisc 1>;
+                               status = "disabled";
+                       };
+
+                       usbh: usb@02184400 {
+                               compatible = "fsl,imx6sx-usb", "fsl,imx27-usb";
+                               reg = <0x02184400 0x200>;
+                               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USBOH3>;
+                               fsl,usbmisc = <&usbmisc 2>;
+                               phy_type = "hsic";
+                               fsl,anatop = <&anatop>;
+                               status = "disabled";
+                       };
+
+                       usbmisc: usbmisc@02184800 {
+                               #index-cells = <1>;
+                               compatible = "fsl,imx6sx-usbmisc", "fsl,imx6q-usbmisc";
+                               reg = <0x02184800 0x200>;
+                               clocks = <&clks IMX6SX_CLK_USBOH3>;
+                       };
+
+                       fec1: ethernet@02188000 {
+                               compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
+                               reg = <0x02188000 0x4000>;
+                               interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_ENET>,
+                                        <&clks IMX6SX_CLK_ENET_AHB>,
+                                        <&clks IMX6SX_CLK_ENET_PTP>,
+                                        <&clks IMX6SX_CLK_ENET_REF>,
+                                        <&clks IMX6SX_CLK_ENET_PTP>;
+                               clock-names = "ipg", "ahb", "ptp",
+                                             "enet_clk_ref", "enet_out";
+                               status = "disabled";
+                        };
+
+                       mlb: mlb@0218c000 {
+                               reg = <0x0218c000 0x4000>;
+                               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_MLB>;
+                               status = "disabled";
+                       };
+
+                       usdhc1: usdhc@02190000 {
+                               compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x02190000 0x4000>;
+                               interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USDHC1>,
+                                        <&clks IMX6SX_CLK_USDHC1>,
+                                        <&clks IMX6SX_CLK_USDHC1>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc2: usdhc@02194000 {
+                               compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x02194000 0x4000>;
+                               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USDHC2>,
+                                        <&clks IMX6SX_CLK_USDHC2>,
+                                        <&clks IMX6SX_CLK_USDHC2>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc3: usdhc@02198000 {
+                               compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x02198000 0x4000>;
+                               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USDHC3>,
+                                        <&clks IMX6SX_CLK_USDHC3>,
+                                        <&clks IMX6SX_CLK_USDHC3>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       usdhc4: usdhc@0219c000 {
+                               compatible = "fsl,imx6sx-usdhc", "fsl,imx6sl-usdhc";
+                               reg = <0x0219c000 0x4000>;
+                               interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_USDHC4>,
+                                        <&clks IMX6SX_CLK_USDHC4>,
+                                        <&clks IMX6SX_CLK_USDHC4>;
+                               clock-names = "ipg", "ahb", "per";
+                               bus-width = <4>;
+                               status = "disabled";
+                       };
+
+                       i2c1: i2c@021a0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a0000 0x4000>;
+                               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_I2C1>;
+                               status = "disabled";
+                       };
+
+                       i2c2: i2c@021a4000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a4000 0x4000>;
+                               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_I2C2>;
+                               status = "disabled";
+                       };
+
+                       i2c3: i2c@021a8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
+                               reg = <0x021a8000 0x4000>;
+                               interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_I2C3>;
+                               status = "disabled";
+                       };
+
+                       mmdc: mmdc@021b0000 {
+                               compatible = "fsl,imx6sx-mmdc", "fsl,imx6q-mmdc";
+                               reg = <0x021b0000 0x4000>;
+                       };
+
+                       fec2: ethernet@021b4000 {
+                               compatible = "fsl,imx6sx-fec";
+                               reg = <0x021b4000 0x4000>;
+                               interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_ENET>,
+                                        <&clks IMX6SX_CLK_ENET_AHB>,
+                                        <&clks IMX6SX_CLK_ENET_PTP>,
+                                        <&clks IMX6SX_CLK_ENET2_REF_125M>,
+                                        <&clks IMX6SX_CLK_ENET_PTP>;
+                               clock-names = "ipg", "ahb", "ptp",
+                                             "enet_clk_ref", "enet_out";
+                               status = "disabled";
+                       };
+
+                       weim: weim@021b8000 {
+                               compatible = "fsl,imx6sx-weim", "fsl,imx6q-weim";
+                               reg = <0x021b8000 0x4000>;
+                               interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_EIM_SLOW>;
+                       };
+
+                       ocotp: ocotp@021bc000 {
+                               compatible = "fsl,imx6sx-ocotp", "syscon";
+                               reg = <0x021bc000 0x4000>;
+                               clocks = <&clks IMX6SX_CLK_OCOTP>;
+                       };
+
+                       sai1: sai@021d4000 {
+                               compatible = "fsl,imx6sx-sai";
+                               reg = <0x021d4000 0x4000>;
+                               interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_SAI1_IPG>,
+                                        <&clks IMX6SX_CLK_SAI1>,
+                                        <&clks 0>, <&clks 0>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
+                               dma-names = "rx", "tx";
+                               dmas = <&sdma 31 23 0>, <&sdma 32 23 0>;
+                               dma-source = <&gpr 0 15 0 16>;
+                               status = "disabled";
+                       };
+
+                       audmux: audmux@021d8000 {
+                               compatible = "fsl,imx6sx-audmux", "fsl,imx31-audmux";
+                               reg = <0x021d8000 0x4000>;
+                               status = "disabled";
+                       };
+
+                       sai2: sai@021dc000 {
+                               compatible = "fsl,imx6sx-sai";
+                               reg = <0x021dc000 0x4000>;
+                               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_SAI2_IPG>,
+                                        <&clks IMX6SX_CLK_SAI2>,
+                                        <&clks 0>, <&clks 0>;
+                               clock-names = "bus", "mclk1", "mclk2", "mclk3";
+                               dma-names = "rx", "tx";
+                               dmas = <&sdma 33 23 0>, <&sdma 34 23 0>;
+                               dma-source = <&gpr 0 17 0 18>;
+                               status = "disabled";
+                       };
+
+                       qspi1: qspi@021e0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-qspi";
+                               reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>;
+                               reg-names = "QuadSPI", "QuadSPI-memory";
+                               interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_QSPI1>,
+                                        <&clks IMX6SX_CLK_QSPI1>;
+                               clock-names = "qspi_en", "qspi";
+                               status = "disabled";
+                       };
+
+                       qspi2: qspi@021e4000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-qspi";
+                               reg = <0x021e4000 0x4000>, <0x70000000 0x10000000>;
+                               reg-names = "QuadSPI", "QuadSPI-memory";
+                               interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_QSPI2>,
+                                        <&clks IMX6SX_CLK_QSPI2>;
+                               clock-names = "qspi_en", "qspi";
+                               status = "disabled";
+                       };
+
+                       uart2: serial@021e8000 {
+                               compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                               reg = <0x021e8000 0x4000>;
+                               interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                        <&clks IMX6SX_CLK_UART_SERIAL>;
+                               clock-names = "ipg", "per";
+                               dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
+                               dma-names = "rx", "tx";
+                               status = "disabled";
+                       };
+
+                       uart3: serial@021ec000 {
+                               compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                               reg = <0x021ec000 0x4000>;
+                               interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                        <&clks IMX6SX_CLK_UART_SERIAL>;
+                               clock-names = "ipg", "per";
+                               dmas = <&sdma 29 4 0>, <&sdma 30 4 0>;
+                               dma-names = "rx", "tx";
+                               status = "disabled";
+                       };
+
+                       uart4: serial@021f0000 {
+                               compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                               reg = <0x021f0000 0x4000>;
+                               interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                        <&clks IMX6SX_CLK_UART_SERIAL>;
+                               clock-names = "ipg", "per";
+                               dmas = <&sdma 31 4 0>, <&sdma 32 4 0>;
+                               dma-names = "rx", "tx";
+                               status = "disabled";
+                       };
+
+                       uart5: serial@021f4000 {
+                               compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                               reg = <0x021f4000 0x4000>;
+                               interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                        <&clks IMX6SX_CLK_UART_SERIAL>;
+                               clock-names = "ipg", "per";
+                               dmas = <&sdma 33 4 0>, <&sdma 34 4 0>;
+                               dma-names = "rx", "tx";
+                               status = "disabled";
+                       };
+
+                       i2c4: i2c@021f8000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-i2c", "fsl,imx21-i2c";
+                               reg = <0x021f8000 0x4000>;
+                               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_I2C4>;
+                               status = "disabled";
+                       };
+               };
+
+               aips3: aips-bus@02200000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x02200000 0x100000>;
+                       ranges;
+
+                       spba-bus@02200000 {
+                               compatible = "fsl,spba-bus", "simple-bus";
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               reg = <0x02240000 0x40000>;
+                               ranges;
+
+                               csi1: csi@02214000 {
+                                       reg = <0x02214000 0x4000>;
+                                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
+                                                <&clks IMX6SX_CLK_CSI>,
+                                                <&clks IMX6SX_CLK_DCIC1>;
+                                       clock-names = "disp-axi", "csi_mclk", "dcic";
+                                       status = "disabled";
+                               };
+
+                               pxp: pxp@02218000 {
+                                       reg = <0x02218000 0x4000>;
+                                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_PXP_AXI>,
+                                                <&clks IMX6SX_CLK_DISPLAY_AXI>;
+                                       clock-names = "pxp-axi", "disp-axi";
+                                       status = "disabled";
+                               };
+
+                               csi2: csi@0221c000 {
+                                       reg = <0x0221c000 0x4000>;
+                                       interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_DISPLAY_AXI>,
+                                                <&clks IMX6SX_CLK_CSI>,
+                                                <&clks IMX6SX_CLK_DCIC2>;
+                                       clock-names = "disp-axi", "csi_mclk", "dcic";
+                                       status = "disabled";
+                               };
+
+                               lcdif1: lcdif@02220000 {
+                                       reg = <0x02220000 0x4000>;
+                                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
+                                                <&clks IMX6SX_CLK_LCDIF_APB>,
+                                                <&clks IMX6SX_CLK_DISPLAY_AXI>;
+                                       clock-names = "pix", "axi", "disp_axi";
+                                       status = "disabled";
+                               };
+
+                               lcdif2: lcdif@02224000 {
+                                       reg = <0x02224000 0x4000>;
+                                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+                                       clocks = <&clks IMX6SX_CLK_LCDIF2_PIX>,
+                                                <&clks IMX6SX_CLK_LCDIF_APB>,
+                                                <&clks IMX6SX_CLK_DISPLAY_AXI>;
+                                       clock-names = "pix", "axi", "disp_axi";
+                                       status = "disabled";
+                               };
+
+                               vadc: vadc@02228000 {
+                                       reg = <0x02228000 0x4000>, <0x0222c000 0x4000>;
+                                       reg-names = "vadc-vafe", "vadc-vdec";
+                                       clocks = <&clks IMX6SX_CLK_VADC>,
+                                                <&clks IMX6SX_CLK_CSI>;
+                                       clock-names = "vadc", "csi";
+                                       status = "disabled";
+                               };
+                       };
+
+                       adc1: adc@02280000 {
+                               compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
+                               reg = <0x02280000 0x4000>;
+                               interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_IPG>;
+                               clock-names = "adc";
+                               status = "disabled";
+                        };
+
+                       adc2: adc@02284000 {
+                               compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
+                               reg = <0x02284000 0x4000>;
+                               interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_IPG>;
+                               clock-names = "adc";
+                               status = "disabled";
+                        };
+
+                       wdog3: wdog@02288000 {
+                               compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
+                               reg = <0x02288000 0x4000>;
+                               interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_DUMMY>;
+                               status = "disabled";
+                       };
+
+                       ecspi5: ecspi@0228c000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               compatible = "fsl,imx6sx-ecspi", "fsl,imx51-ecspi";
+                               reg = <0x0228c000 0x4000>;
+                               interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_ECSPI5>,
+                                        <&clks IMX6SX_CLK_ECSPI5>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
+                       uart6: serial@022a0000 {
+                               compatible = "fsl,imx6sx-uart", "fsl,imx21-uart";
+                               reg = <0x022a0000 0x4000>;
+                               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_UART_IPG>,
+                                        <&clks IMX6SX_CLK_UART_SERIAL>;
+                               clock-names = "ipg", "per";
+                               dmas = <&sdma 0 4 0>, <&sdma 47 4 0>;
+                               dma-names = "rx", "tx";
+                               status = "disabled";
+                       };
+
+                       pwm5: pwm@022a4000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x022a4000 0x4000>;
+                               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM5>,
+                                        <&clks IMX6SX_CLK_PWM5>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm6: pwm@022a8000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x022a8000 0x4000>;
+                               interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM6>,
+                                        <&clks IMX6SX_CLK_PWM6>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm7: pwm@022ac000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x022ac000 0x4000>;
+                               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM7>,
+                                        <&clks IMX6SX_CLK_PWM7>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+
+                       pwm8: pwm@0022b0000 {
+                               compatible = "fsl,imx6sx-pwm", "fsl,imx27-pwm";
+                               reg = <0x0022b0000 0x4000>;
+                               interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks IMX6SX_CLK_PWM8>,
+                                        <&clks IMX6SX_CLK_PWM8>;
+                               clock-names = "ipg", "per";
+                               #pwm-cells = <2>;
+                       };
+               };
+
+               pcie: pcie@0x08000000 {
+                       compatible = "fsl,imx6sx-pcie", "snps,dw-pcie";
+                       reg = <0x08ffc000 0x4000>; /* DBI */
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       device_type = "pci";
+                                 /* configuration space */
+                       ranges = <0x00000800 0 0x08f00000 0x08f00000 0 0x00080000
+                                 /* downstream I/O */
+                                 0x81000000 0 0          0x08f80000 0 0x00010000
+                                 /* non-prefetchable memory */
+                                 0x82000000 0 0x08000000 0x08000000 0 0x00f00000>;
+                       num-lanes = <1>;
+                       interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&clks IMX6SX_CLK_PCIE_REF_125M>,
+                                <&clks IMX6SX_CLK_PCIE_AXI>,
+                                <&clks IMX6SX_CLK_LVDS1_OUT>,
+                                <&clks IMX6SX_CLK_DISPLAY_AXI>;
+                       clock-names = "pcie_ref_125m", "pcie_axi",
+                                     "lvds_gate", "display_axi";
+                       status = "disabled";
+               };
+       };
+};
index 90774d6..598afe9 100644 (file)
@@ -22,7 +22,7 @@ clocks {
                #clock-cells = <0>;
                compatible = "ti,keystone,pll-clock";
                clocks = <&refclkpass>;
-               clock-output-names = "pa-pll-clk";
+               clock-output-names = "papllclk";
                reg = <0x02620358 4>;
                reg-names = "control";
        };
index 96e6536..d5adee3 100644 (file)
@@ -31,7 +31,7 @@ clocks {
                #clock-cells = <0>;
                compatible = "ti,keystone,pll-clock";
                clocks = <&refclkpass>;
-               clock-output-names = "pa-pll-clk";
+               clock-output-names = "papllclk";
                reg = <0x02620358 4>;
                reg-names = "control";
        };
index 1f90cbf..3223cc1 100644 (file)
                };
        };
 };
+
+&mdio {
+       ethphy0: ethernet-phy@0 {
+               compatible = "marvell,88E1111", "ethernet-phy-ieee802.3-c22";
+               reg = <0>;
+       };
+
+       ethphy1: ethernet-phy@1 {
+               compatible = "marvell,88E1111", "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
index f584b80..eb1e3e2 100644 (file)
@@ -31,7 +31,7 @@ clocks {
                #clock-cells = <0>;
                compatible = "ti,keystone,pll-clock";
                clocks = <&refclksys>;
-               clock-output-names = "pa-pll-clk";
+               clock-output-names = "papllclk";
                reg = <0x02620358 4>;
                reg-names = "control";
        };
index 93f82c7..0c334b2 100644 (file)
@@ -215,7 +215,7 @@ clocks {
        clkpa: clkpa {
                #clock-cells = <0>;
                compatible = "ti,keystone,psc-clock";
-               clocks = <&chipclk16>;
+               clocks = <&paclk13>;
                clock-output-names = "pa";
                reg = <0x0235001c 0xb00>, <0x02350008 0x400>;
                reg-names = "control", "domain";
index c1414cb..9e31fe7 100644 (file)
                        ranges = <0 0 0x30000000 0x10000000
                                  1 0 0x21000A00 0x00000100>;
                };
+
+               mdio: mdio@02090300 {
+                       compatible      = "ti,keystone_mdio", "ti,davinci_mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg             = <0x02090300 0x100>;
+                       status = "disabled";
+                       clocks = <&clkpa>;
+                       clock-names = "fck";
+                       bus_freq        = <2500000>;
+               };
        };
 };
diff --git a/arch/arm/boot/dts/kirkwood-d2net.dts b/arch/arm/boot/dts/kirkwood-d2net.dts
new file mode 100644 (file)
index 0000000..6b78560
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Device Tree file for d2 Network v2
+ *
+ * Copyright (C) 2014 Simon Guinot <simon.guinot@sequanux.org>
+ *
+ * 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 "kirkwood-netxbig.dtsi"
+
+/ {
+       model = "LaCie d2 Network v2";
+       compatible = "lacie,d2net_v2", "lacie,netxbig", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+
+       ns2-leds {
+               compatible = "lacie,ns2-leds";
+
+               blue-sata {
+                       label = "d2net_v2:blue:sata";
+                       slow-gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+                       cmd-gpio = <&gpio0 30 GPIO_ACTIVE_HIGH>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               red-fail {
+                       label = "d2net_v2:red:fail";
+                       gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-net2big.dts b/arch/arm/boot/dts/kirkwood-net2big.dts
new file mode 100644 (file)
index 0000000..53dc37a
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Device Tree file for LaCie 2Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * 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 "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "kirkwood-netxbig.dtsi"
+
+/ {
+       model = "LaCie 2Big Network v2";
+       compatible = "lacie,net2big_v2", "lacie,netxbig", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x10000000>;
+       };
+};
+
+&regulators {
+       regulator@2 {
+               compatible = "regulator-fixed";
+               reg = <2>;
+               regulator-name = "hdd1power";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+       };
+
+       clocks {
+              g762_clk: g762-oscillator {
+                        compatible = "fixed-clock";
+                        #clock-cells = <0>;
+                        clock-frequency = <32768>;
+              };
+       };
+};
+
+&i2c0 {
+       g762@3e {
+               compatible = "gmt,g762";
+               reg = <0x3e>;
+               clocks = <&g762_clk>;
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-net5big.dts b/arch/arm/boot/dts/kirkwood-net5big.dts
new file mode 100644 (file)
index 0000000..36155b7
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Device Tree file for LaCie 5Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * 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 "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+#include "kirkwood-netxbig.dtsi"
+
+/ {
+       model = "LaCie 5Big Network v2";
+       compatible = "lacie,net5big_v2", "lacie,netxbig", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x20000000>;
+       };
+
+};
+
+&regulators {
+       regulator@2 {
+               compatible = "regulator-fixed";
+               reg = <2>;
+               regulator-name = "hdd1power";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+       };
+
+       regulator@3 {
+               compatible = "regulator-fixed";
+               reg = <3>;
+               regulator-name = "hdd2power";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+       };
+
+       regulator@4 {
+               compatible = "regulator-fixed";
+               reg = <4>;
+               regulator-name = "hdd3power";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+       };
+
+       regulator@5 {
+               compatible = "regulator-fixed";
+               reg = <5>;
+               regulator-name = "hdd4power";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               enable-active-high;
+               regulator-always-on;
+               regulator-boot-on;
+               gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+       };
+
+       clocks {
+              g762_clk: g762-oscillator {
+                        compatible = "fixed-clock";
+                        #clock-cells = <0>;
+                        clock-frequency = <32768>;
+              };
+       };
+};
+
+&mdio {
+       ethphy1: ethernet-phy@1 {
+               reg = <0>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
+
+
+&i2c0 {
+       g762@3e {
+               compatible = "gmt,g762";
+               reg = <0x3e>;
+               clocks = <&g762_clk>;
+       };
+};
diff --git a/arch/arm/boot/dts/kirkwood-netxbig.dtsi b/arch/arm/boot/dts/kirkwood-netxbig.dtsi
new file mode 100644 (file)
index 0000000..b0cfb7c
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * Device Tree common file for LaCie 2Big and 5Big Network v2
+ *
+ * Copyright (C) 2014
+ *
+ * Andrew Lunn <andrew@lunn.ch>
+ *
+ * Based on netxbig_v2-setup.c,
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * 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.
+*/
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+       chosen {
+               bootargs = "console=ttyS0,115200n8";
+               stdout-path = &uart0;
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       status = "okay";
+               };
+
+               spi@10600 {
+                       status = "okay";
+
+                       flash@0 {
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               compatible = "mxicy,mx25l4005a";
+                               reg = <0>;
+                               spi-max-frequency = <20000000>;
+                               mode = <0>;
+
+                               partition@0 {
+                                       reg = <0x0 0x80000>;
+                                       label = "u-boot";
+                               };
+                       };
+               };
+
+               sata@80000 {
+                       status = "okay";
+                       nr-ports = <2>;
+               };
+
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               /*
+                * button@1 and button@2 represent a three position rocker
+                * switch. Thus the conventional KEY_POWER does not fit
+                */
+               button@1 {
+                       label = "Back power switch (on|auto)";
+                       linux,code = <KEY_ESC>;
+                       linux,input-type = <5>;
+                       gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+               };
+               button@2 {
+                       label = "Back power switch (auto|off)";
+                       linux,code = <KEY_1>;
+                       linux,input-type = <5>;
+                       gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+               };
+               button@3 {
+                       label = "Function button";
+                       linux,code = <KEY_OPTION>;
+                       gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
+               };
+
+       };
+
+       gpio-poweroff {
+               compatible = "gpio-poweroff";
+               gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
+       };
+
+       regulators: regulators {
+               status = "okay";
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               pinctrl-names = "default";
+
+               regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "hdd0power";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       enable-active-high;
+                       regulator-always-on;
+                       regulator-boot-on;
+                       gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+               };
+       };
+};
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               reg = <8>;
+       };
+
+       ethphy1: ethernet-phy@1 {
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
+&pinctrl {
+       pinctrl-names = "default";
+
+       pmx_button_function: pmx-button-function {
+               marvell,pins = "mpp34";
+               marvell,function = "gpio";
+       };
+       pmx_button_power_off: pmx-button-power-off {
+               marvell,pins = "mpp15";
+               marvell,function = "gpio";
+       };
+       pmx_button_power_on: pmx-button-power-on {
+               marvell,pins = "mpp13";
+               marvell,function = "gpio";
+       };
+};
+
+&i2c0 {
+       status = "okay";
+
+       eeprom@50 {
+               compatible = "atmel,24c04";
+               pagesize = <16>;
+               reg = <0x50>;
+       };
+};
index 928f6ee..e83e4f9 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index ccf9ea2..f0f5e10 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <18432000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <18432000>;
+               };
        };
 
        ahb {
index e83b046..2ad3e3b 100644 (file)
 &i2c2 {
        compatible = "ti,omap2420-i2c";
 };
+
+/include/ "omap24xx-clocks.dtsi"
+/include/ "omap2420-clocks.dtsi"
index c4e8013..f9ab99d 100644 (file)
 &i2c2 {
        compatible = "ti,omap2430-i2c";
 };
+
+/include/ "omap24xx-clocks.dtsi"
+/include/ "omap2430-clocks.dtsi"
index 1e1b057..159720d 100644 (file)
                        };
                };
        };
+
+       sound: sound {
+               compatible = "ti,abe-twl6040";
+               ti,model = "omap5-uevm";
+
+               ti,mclk-freq = <19200000>;
+
+               ti,mcpdm = <&mcpdm>;
+
+               ti,twl6040 = <&twl6040>;
+
+               /* Audio routing */
+               ti,audio-routing =
+                       "Headset Stereophone", "HSOL",
+                       "Headset Stereophone", "HSOR",
+                       "Line Out", "AUXL",
+                       "Line Out", "AUXR",
+                       "HSMIC", "Headset Mic",
+                       "Headset Mic", "Headset Mic Bias",
+                       "AFML", "Line In",
+                       "AFMR", "Line In";
+       };
 };
 
 &omap5_pmx_core {
        pinctrl-names = "default";
        pinctrl-0 = <
-                       &twl6040_pins
-                       &mcpdm_pins
-                       &mcbsp1_pins
-                       &mcbsp2_pins
                        &usbhost_pins
                        &led_gpio_pins
        >;
                        ti,wakeup;
                };
 
+               clk32kgaudio: palmas_clk32k@1 {
+                       compatible = "ti,palmas-clk32kgaudio";
+                       #clock-cells = <0>;
+               };
+
                palmas_pmic {
                        compatible = "ti,palmas-pmic";
                        interrupt-parent = <&palmas>;
                        };
                };
        };
+
+       twl6040: twl@4b {
+               compatible = "ti,twl6040";
+               reg = <0x4b>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&twl6040_pins>;
+
+               interrupts = <GIC_SPI 119 IRQ_TYPE_NONE>; /* IRQ_SYS_2N cascaded to gic */
+               interrupt-parent = <&gic>;
+               ti,audpwron-gpio = <&gpio5 13 0>;  /* gpio line 141 */
+
+               vio-supply = <&smps7_reg>;
+               v2v1-supply = <&smps9_reg>;
+               enable-active-high;
+
+               clocks = <&clk32kgaudio>;
+               clock-names = "clk32k";
+       };
 };
 
 &i2c5 {
        };
 };
 
-&mcbsp3 {
-       status = "disabled";
+&mcpdm {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcpdm_pins>;
+       status = "okay";
+};
+
+&mcbsp1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcbsp1_pins>;
+       status = "okay";
+};
+
+&mcbsp2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcbsp2_pins>;
+       status = "okay";
 };
 
 &usbhshost {
index 33ffabe..66afcff 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                     clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                     clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 56849b5..2070546 100644 (file)
 &scif2 {
        status = "okay";
 };
+
+&spi4 {
+       status = "okay";
+
+       codec: codec@0 {
+               compatible = "wlf,wm8978";
+               reg = <0>;
+               spi-max-frequency = <5000000>;
+       };
+};
index 70b1fff..a860f32 100644 (file)
        model = "APE6EVM";
        compatible = "renesas,ape6evm-reference", "renesas,r8a73a4";
 
+       aliases {
+               serial0 = &scifa0;
+       };
+
        chosen {
                bootargs = "console=ttySC0,115200 ignore_loglevel rw";
        };
@@ -90,9 +94,6 @@
 };
 
 &pfc {
-       pinctrl-0 = <&scifa0_pins>;
-       pinctrl-names = "default";
-
        scifa0_pins: serial0 {
                renesas,groups = "scifa0_data";
                renesas,function = "scifa0";
        status = "okay";
 };
 
+&scifa0 {
+       pinctrl-0 = <&scifa0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &sdhi0 {
        vmmc-supply = <&vcc_sdhi0>;
        bus-width = <4>;
index 82c5ac8..d8ec505 100644 (file)
                status = "disabled";
        };
 
+       scifa0: serial@e6c40000 {
+               compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
+               reg = <0 0xe6c40000 0 0x100>;
+               interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa1: serial@e6c50000 {
+               compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
+               reg = <0 0xe6c50000 0 0x100>;
+               interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb2: serial@e6c20000 {
+               compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+               reg = <0 0xe6c20000 0 0x100>;
+               interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb3: serial@e6c30000 {
+               compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+               reg = <0 0xe6c30000 0 0x100>;
+               interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb4: serial@e6ce0000 {
+               compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+               reg = <0 0xe6ce0000 0 0x100>;
+               interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb5: serial@e6cf0000 {
+               compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
+               reg = <0 0xe6cf0000 0 0x100>;
+               interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
        mmcif0: mmc@ee200000 {
                compatible = "renesas,sh-mmcif";
                reg = <0 0xee200000 0 0x80>;
index 486007d..ee9e7d5 100644 (file)
        model = "armadillo 800 eva reference";
        compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
 
+       aliases {
+               serial1 = &scifa1;
+       };
+
        chosen {
-               bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
+               bootargs = "console=tty0 console=ttySC1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
        };
 
        memory {
 
        leds {
                compatible = "gpio-leds";
-               led1 {
+               led3 {
                        gpios = <&pfc 102 GPIO_ACTIVE_HIGH>;
+                       label = "LED3";
                };
-               led2 {
+               led4 {
                        gpios = <&pfc 111 GPIO_ACTIVE_HIGH>;
+                       label = "LED4";
                };
-               led3 {
+               led5 {
                        gpios = <&pfc 110 GPIO_ACTIVE_HIGH>;
+                       label = "LED5";
                };
-               led4 {
+               led6 {
                        gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
+                       label = "LED6";
                };
        };
 
 };
 
 &pfc {
-       pinctrl-0 = <&scifa1_pins>;
-       pinctrl-names = "default";
-
        ether_pins: ether {
                renesas,groups = "gether_mii", "gether_int";
                renesas,function = "gether";
        status = "okay";
 };
 
+&scifa1 {
+       pinctrl-0 = <&scifa1_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &sdhi0 {
        pinctrl-0 = <&sdhi0_pins>;
        pinctrl-names = "default";
index 55d29f4..bda18fb 100644 (file)
                status = "disabled";
        };
 
+       scifa0: serial@e6c40000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6c40000 0x100>;
+               interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa1: serial@e6c50000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6c50000 0x100>;
+               interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa2: serial@e6c60000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6c60000 0x100>;
+               interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa3: serial@e6c70000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6c70000 0x100>;
+               interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa4: serial@e6c80000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6c80000 0x100>;
+               interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa5: serial@e6cb0000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6cb0000 0x100>;
+               interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa6: serial@e6cc0000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6cc0000 0x100>;
+               interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa7: serial@e6cd0000 {
+               compatible = "renesas,scifa-r8a7740", "renesas,scifa";
+               reg = <0xe6cd0000 0x100>;
+               interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb8: serial@e6c30000 {
+               compatible = "renesas,scifb-r8a7740", "renesas,scifb";
+               reg = <0xe6c30000 0x100>;
+               interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
        pfc: pfc@e6050000 {
                compatible = "renesas,pfc-r8a7740";
                reg = <0xe6050000 0x8000>,
index f76f6ec..3342c74 100644 (file)
        model = "bockw";
        compatible = "renesas,bockw-reference", "renesas,r8a7778";
 
+       aliases {
+               serial0 = &scif0;
+       };
+
        chosen {
                bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
        };
@@ -70,9 +74,6 @@
 };
 
 &pfc {
-       pinctrl-0 = <&scif0_pins>;
-       pinctrl-names = "default";
-
        scif0_pins: serial0 {
                renesas,groups = "scif0_data_a", "scif0_ctrl";
                renesas,function = "scif0";
                };
        };
 };
+
+&scif0 {
+       pinctrl-0 = <&scif0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
index 3af0a21..ecfdf4b 100644 (file)
                status = "disabled";
        };
 
+       scif0: serial@ffe40000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe40000 0x100>;
+               interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scif1: serial@ffe41000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe41000 0x100>;
+               interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scif2: serial@ffe42000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe42000 0x100>;
+               interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scif3: serial@ffe43000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe43000 0x100>;
+               interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scif4: serial@ffe44000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe44000 0x100>;
+               interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scif5: serial@ffe45000 {
+               compatible = "renesas,scif-r8a7778", "renesas,scif";
+               reg = <0xffe45000 0x100>;
+               interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
        mmcif: mmc@ffe4e000 {
                compatible = "renesas,sh-mmcif";
                reg = <0xffe4e000 0x100>;
index a7af2c2..ee23388 100644 (file)
@@ -17,7 +17,7 @@
        compatible = "renesas,marzen", "renesas,r8a7779";
 
        chosen {
-               bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on";
+               bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
        };
 
        memory {
index b517c8e..13bf08a 100644 (file)
                spi2 = &hspi2;
        };
 
-        gic: interrupt-controller@f0001000 {
-                compatible = "arm,cortex-a9-gic";
-                #interrupt-cells = <3>;
-                interrupt-controller;
-                reg = <0xf0001000 0x1000>,
-                      <0xf0000100 0x100>;
-        };
+       gic: interrupt-controller@f0001000 {
+               compatible = "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               interrupt-controller;
+               reg = <0xf0001000 0x1000>,
+                     <0xf0000100 0x100>;
+       };
 
        gpio0: gpio@ffc40000 {
                compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
index dd2fe46..856b423 100644 (file)
 
        memory@40000000 {
                device_type = "memory";
-               reg = <0 0x40000000 0 0x80000000>;
+               reg = <0 0x40000000 0 0x40000000>;
        };
 
        memory@180000000 {
                device_type = "memory";
-               reg = <1 0x80000000 0 0x80000000>;
+               reg = <1 0x40000000 0 0xc0000000>;
        };
 
        lbsc {
                                 "msiof1_tx";
                renesas,function = "msiof1";
        };
+
+       iic1_pins: iic1 {
+               renesas,groups = "iic1";
+               renesas,function = "iic1";
+       };
+
+       iic2_pins: iic2 {
+               renesas,groups = "iic2";
+               renesas,function = "iic2";
+       };
+
+       iic3_pins: iic3 {
+               renesas,groups = "iic3";
+               renesas,function = "iic3";
+       };
+
+       usb0_pins: usb0 {
+               renesas,groups = "usb0";
+               renesas,function = "usb0";
+       };
+
+       usb1_pins: usb1 {
+               renesas,groups = "usb1";
+               renesas,function = "usb1";
+       };
+
+       usb2_pins: usb2 {
+               renesas,groups = "usb2";
+               renesas,function = "usb2";
+       };
 };
 
 &ether {
        cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
        status = "okay";
 };
+
+&cpu0 {
+       cpu0-supply = <&vdd_dvfs>;
+};
+
+&iic0  {
+       status = "ok";
+};
+
+&iic1  {
+       status = "ok";
+       pinctrl-0 = <&iic1_pins>;
+       pinctrl-names = "default";
+};
+
+&iic2  {
+       status = "ok";
+       pinctrl-0 = <&iic2_pins>;
+       pinctrl-names = "default";
+};
+
+&iic3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&iic3_pins>;
+       status = "okay";
+
+       vdd_dvfs: regulator@68 {
+               compatible = "diasemi,da9210";
+               reg = <0x68>;
+
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
+&pci0 {
+       status = "okay";
+       pinctrl-0 = <&usb0_pins>;
+       pinctrl-names = "default";
+};
+
+&pci1 {
+       status = "okay";
+       pinctrl-0 = <&usb1_pins>;
+       pinctrl-names = "default";
+};
+
+&pci2 {
+       status = "okay";
+       pinctrl-0 = <&usb2_pins>;
+       pinctrl-names = "default";
+};
index 7ff2960..d9ddecb 100644 (file)
                        compatible = "arm,cortex-a15";
                        reg = <0>;
                        clock-frequency = <1300000000>;
+                       voltage-tolerance = <1>; /* 1% */
+                       clocks = <&cpg_clocks R8A7790_CLK_Z>;
+                       clock-latency = <300000>; /* 300 us */
+
+                       /* kHz - uV - OPPs unknown yet */
+                       operating-points = <1400000 1000000>,
+                                          <1225000 1000000>,
+                                          <1050000 1000000>,
+                                          < 875000 1000000>,
+                                          < 700000 1000000>,
+                                          < 350000 1000000>;
                };
 
                cpu1: cpu@1 {
                        clock-output-names = "extal";
                };
 
+               /* External PCIe clock - can be overridden by the board */
+               pcie_bus_clk: pcie_bus_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <100000000>;
+                       clock-output-names = "pcie_bus";
+                       status = "disabled";
+               };
+
                /*
                 * The external audio clocks are configured as 0 Hz fixed frequency clocks by
                 * default. Boards that provide audio clocks should override them.
                        reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
                        clocks = <&hp_clk>, <&cp_clk>, <&mmc1_clk>, <&sd3_clk>,
                                 <&sd2_clk>, <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, <&mmc0_clk>,
-                                <&hp_clk>, <&hp_clk>, <&rclk_clk>;
+                                <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
                        #clock-cells = <1>;
                        renesas,clock-indices = <
                                R8A7790_CLK_IIC2 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
                                R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_MMCIF0
-                               R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_CMT1
+                               R8A7790_CLK_IIC0 R8A7790_CLK_PCIEC R8A7790_CLK_IIC1 R8A7790_CLK_SSUSB R8A7790_CLK_CMT1
                        >;
                        clock-output-names =
                                "iic2", "tpu0", "mmcif1", "sdhi3",
                                "sdhi2", "sdhi1", "sdhi0", "mmcif0",
-                               "iic0", "iic1", "cmt1";
+                               "iic0", "pciec", "iic1", "ssusb", "cmt1";
                };
                mstp5_clks: mstp5_clks@e6150144 {
                        compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
                                "rcan1", "rcan0", "qspi_mod", "iic3",
                                "i2c3", "i2c2", "i2c1", "i2c0";
                };
+               mstp10_clks: mstp10_clks@e6150998 {
+                       compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+                       clocks = <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>;
+
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7790_CLK_SSI_ALL
+                               R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
+                               R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
+                               R8A7790_CLK_SCU_ALL
+                               R8A7790_CLK_SCU_DVC1 R8A7790_CLK_SCU_DVC0
+                               R8A7790_CLK_SCU_SRC9 R8A7790_CLK_SCU_SRC8 R8A7790_CLK_SCU_SRC7 R8A7790_CLK_SCU_SRC6 R8A7790_CLK_SCU_SRC5
+                               R8A7790_CLK_SCU_SRC4 R8A7790_CLK_SCU_SRC3 R8A7790_CLK_SCU_SRC2 R8A7790_CLK_SCU_SRC1 R8A7790_CLK_SCU_SRC0
+                       >;
+                       clock-output-names =
+                               "ssi-all",
+                               "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+                               "ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
+                               "scu-all",
+                               "scu-dvc1", "scu-dvc0",
+                               "scu-src9", "scu-src8", "scu-src7", "scu-src6", "scu-src5",
+                               "scu-src4", "scu-src3", "scu-src2", "scu-src1", "scu-src0";
+               };
        };
 
        qspi: spi@e6b10000 {
                #size-cells = <0>;
                status = "disabled";
        };
+
+       pci0: pci@ee090000 {
+               compatible = "renesas,pci-r8a7790";
+               device_type = "pci";
+               clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+               reg = <0 0xee090000 0 0xc00>,
+                     <0 0xee080000 0 0x1100>;
+               interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+
+               bus-range = <0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pci1: pci@ee0b0000 {
+               compatible = "renesas,pci-r8a7790";
+               device_type = "pci";
+               clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+               reg = <0 0xee0b0000 0 0xc00>,
+                     <0 0xee0a0000 0 0x1100>;
+               interrupts = <0 112 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+
+               bus-range = <1 1>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x02000000 0 0xee0a0000 0 0xee0a0000 0 0x00010000>;
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 112 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pci2: pci@ee0d0000 {
+               compatible = "renesas,pci-r8a7790";
+               device_type = "pci";
+               clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
+               reg = <0 0xee0d0000 0 0xc00>,
+                     <0 0xee0c0000 0 0x1100>;
+               interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+
+               bus-range = <2 2>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pciec: pcie@fe000000 {
+               compatible = "renesas,pcie-r8a7790";
+               reg = <0 0xfe000000 0 0x80000>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               bus-range = <0x00 0xff>;
+               device_type = "pci";
+               ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
+                         0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
+                         0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
+                         0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+               /* Map all possible DDR as inbound ranges */
+               dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
+                             0x43000000 1 0x80000000 1 0x80000000 0 0x80000000>;
+               interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 117 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 118 IRQ_TYPE_LEVEL_HIGH>;
+               #interrupt-cells = <1>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7790_CLK_PCIEC>, <&pcie_bus_clk>;
+               clock-names = "pcie", "pcie_bus";
+               status = "disabled";
+       };
+
+       rcar_sound: rcar_sound@0xec500000 {
+               #sound-dai-cells = <1>;
+               compatible =  "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2", "renesas,rcar_sound";
+               interrupt-parent = <&gic>;
+               reg =   <0 0xec500000 0 0x1000>, /* SCU */
+                       <0 0xec5a0000 0 0x100>,  /* ADG */
+                       <0 0xec540000 0 0x1000>, /* SSIU */
+                       <0 0xec541000 0 0x1280>; /* SSI */
+               clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
+                       <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
+                       <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
+                       <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
+                       <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
+                       <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
+                       <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
+                       <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
+                       <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
+                       <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
+                       <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
+                       <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
+                       <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
+               clock-names = "ssi-all",
+                               "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
+                               "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
+                               "src.9", "src.8", "src.7", "src.6", "src.5",
+                               "src.4", "src.3", "src.2", "src.1", "src.0",
+                               "dvc.0", "dvc.1",
+                               "clk_a", "clk_b", "clk_c", "clk_i";
+
+               status = "disabled";
+
+               rcar_sound,dvc {
+                       dvc0: dvc@0 { };
+                       dvc1: dvc@1 { };
+               };
+
+               rcar_sound,src {
+                       src0: src@0 { };
+                       src1: src@1 { };
+                       src2: src@2 { };
+                       src3: src@3 { };
+                       src4: src@4 { };
+                       src5: src@5 { };
+                       src6: src@6 { };
+                       src7: src@7 { };
+                       src8: src@8 { };
+                       src9: src@9 { };
+               };
+
+               rcar_sound,ssi {
+                       ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; };
+               };
+       };
 };
index cc6d992..3a2ef0a 100644 (file)
                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_tx";
                renesas,function = "msiof0";
        };
+
+       usb0_pins: usb0 {
+               renesas,groups = "usb0";
+               renesas,function = "usb0";
+       };
+
+       usb1_pins: usb1 {
+               renesas,groups = "usb1";
+               renesas,function = "usb1";
+       };
 };
 
 &scif0 {
 };
 
 &sata0 {
-       status = "okay";
+       status = "okay";
 };
 
 &sdhi0 {
        status = "okay";
 };
 
+&i2c2 {
+       pinctrl-0 = <&i2c2_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       clock-frequency = <400000>;
+};
+
 &qspi {
        pinctrl-0 = <&qspi_pins>;
        pinctrl-names = "default";
                spi-cpha;
        };
 };
+
+&pci0 {
+       status = "okay";
+       pinctrl-0 = <&usb0_pins>;
+       pinctrl-names = "default";
+};
+
+&pci1 {
+       status = "okay";
+       pinctrl-0 = <&usb1_pins>;
+       pinctrl-names = "default";
+};
+
+&pcie_bus_clk {
+       status = "okay";
+};
+
+&pciec {
+       status = "okay";
+};
index 05d44f9..23486c0 100644 (file)
        clock-frequency = <20000000>;
 };
 
-&i2c2 {
-       pinctrl-0 = <&i2c2_pins>;
-       pinctrl-names = "default";
-
-       status = "okay";
-       clock-frequency = <400000>;
-
-       eeprom@50 {
-               compatible = "renesas,24c02";
-               reg = <0x50>;
-               pagesize = <16>;
-       };
-};
-
-&i2c6 {
-       status = "okay";
-       clock-frequency = <100000>;
-};
-
 &pfc {
        pinctrl-0 = <&du_pins>;
        pinctrl-names = "default";
                                 "msiof0_tx";
                renesas,function = "msiof0";
        };
+
+       i2c6_pins: i2c6 {
+               renesas,groups = "i2c6";
+               renesas,function = "i2c6";
+       };
+
+       usb0_pins: usb0 {
+               renesas,groups = "usb0";
+               renesas,function = "usb0";
+       };
+
+       usb1_pins: usb1 {
+               renesas,groups = "usb1";
+               renesas,function = "usb1";
+       };
 };
 
 &ether {
                spi-cpha;
        };
 };
+
+&i2c2 {
+       pinctrl-0 = <&i2c2_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       clock-frequency = <400000>;
+
+       eeprom@50 {
+               compatible = "renesas,24c02";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
+&i2c6 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c6_pins>;
+       status = "okay";
+       clock-frequency = <100000>;
+
+       vdd_dvfs: regulator@68 {
+               compatible = "diasemi,da9210";
+               reg = <0x68>;
+
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
+&pci0 {
+       status = "okay";
+       pinctrl-0 = <&usb0_pins>;
+       pinctrl-names = "default";
+};
+
+&pci1 {
+       status = "okay";
+       pinctrl-0 = <&usb1_pins>;
+       pinctrl-names = "default";
+};
+
+&pcie_bus_clk {
+       status = "okay";
+};
+
+&pciec {
+       status = "okay";
+};
+
+&cpu0 {
+       cpu0-supply = <&vdd_dvfs>;
+};
index 8d7ffae..6e9a556 100644 (file)
                        compatible = "arm,cortex-a15";
                        reg = <0>;
                        clock-frequency = <1500000000>;
+                       voltage-tolerance = <1>; /* 1% */
+                       clocks = <&cpg_clocks R8A7791_CLK_Z>;
+                       clock-latency = <300000>; /* 300 us */
+
+                       /* kHz - uV - OPPs unknown yet */
+                       operating-points = <1500000 1000000>,
+                                          <1312500 1000000>,
+                                          <1125000 1000000>,
+                                          < 937500 1000000>,
+                                          < 750000 1000000>,
+                                          < 375000 1000000>;
                };
 
                cpu1: cpu@1 {
                        clock-output-names = "extal";
                };
 
+               /*
+                * The external audio clocks are configured as 0 Hz fixed frequency clocks by
+                * default. Boards that provide audio clocks should override them.
+                */
+               audio_clk_a: audio_clk_a {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+                       clock-output-names = "audio_clk_a";
+               };
+               audio_clk_b: audio_clk_b {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+                       clock-output-names = "audio_clk_b";
+               };
+               audio_clk_c: audio_clk_c {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+                       clock-output-names = "audio_clk_c";
+               };
+
+               /* External PCIe clock - can be overridden by the board */
+               pcie_bus_clk: pcie_bus_clk {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <100000000>;
+                       clock-output-names = "pcie_bus";
+                       status = "disabled";
+               };
+
                /* Special CPG clocks */
                cpg_clocks: cpg_clocks@e6150000 {
                        compatible = "renesas,r8a7791-cpg-clocks",
                        compatible = "renesas,r8a7791-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>, <&mp_clk>, <&mp_clk>;
+                                <&mp_clk>, <&mp_clk>, <&mp_clk>,
+                                <&zs_clk>, <&zs_clk>;
                        #clock-cells = <1>;
                        renesas,clock-indices = <
                                R8A7791_CLK_SCIFA2 R8A7791_CLK_SCIFA1 R8A7791_CLK_SCIFA0
                                R8A7791_CLK_MSIOF2 R8A7791_CLK_SCIFB0 R8A7791_CLK_SCIFB1
                                R8A7791_CLK_MSIOF1 R8A7791_CLK_SCIFB2
+                               R8A7791_CLK_SYS_DMAC1 R8A7791_CLK_SYS_DMAC0
                        >;
                        clock-output-names =
                                "scifa2", "scifa1", "scifa0", "msiof2", "scifb0",
-                               "scifb1", "msiof1", "scifb2";
+                               "scifb1", "msiof1", "scifb2",
+                               "sys-dmac1", "sys-dmac0";
                };
                mstp3_clks: mstp3_clks@e615013c {
                        compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
                        clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
-                                <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&rclk_clk>;
+                                <&mmc0_clk>, <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
                        #clock-cells = <1>;
                        renesas,clock-indices = <
                                R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 R8A7791_CLK_SDHI0
-                               R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_CMT1
+                               R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_PCIEC R8A7791_CLK_IIC1
+                               R8A7791_CLK_SSUSB R8A7791_CLK_CMT1
                        >;
                        clock-output-names =
                                "tpu0", "sdhi2", "sdhi1", "sdhi0",
-                               "mmcif0", "i2c7", "i2c8", "cmt1";
+                               "mmcif0", "i2c7", "pciec", "i2c8", "ssusb", "cmt1";
                };
                mstp5_clks: mstp5_clks@e6150144 {
                        compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
                                "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
                                "i2c1", "i2c0";
                };
+               mstp10_clks: mstp10_clks@e6150998 {
+                       compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
+                       reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
+                       clocks = <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
+                               <&p_clk>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
+                               <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>;
+
+                       #clock-cells = <1>;
+                       clock-indices = <
+                               R8A7791_CLK_SSI_ALL
+                               R8A7791_CLK_SSI9 R8A7791_CLK_SSI8 R8A7791_CLK_SSI7 R8A7791_CLK_SSI6 R8A7791_CLK_SSI5
+                               R8A7791_CLK_SSI4 R8A7791_CLK_SSI3 R8A7791_CLK_SSI2 R8A7791_CLK_SSI1 R8A7791_CLK_SSI0
+                               R8A7791_CLK_SCU_ALL
+                               R8A7791_CLK_SCU_DVC1 R8A7791_CLK_SCU_DVC0
+                               R8A7791_CLK_SCU_SRC9 R8A7791_CLK_SCU_SRC8 R8A7791_CLK_SCU_SRC7 R8A7791_CLK_SCU_SRC6 R8A7791_CLK_SCU_SRC5
+                               R8A7791_CLK_SCU_SRC4 R8A7791_CLK_SCU_SRC3 R8A7791_CLK_SCU_SRC2 R8A7791_CLK_SCU_SRC1 R8A7791_CLK_SCU_SRC0
+                       >;
+                       clock-output-names =
+                               "ssi-all",
+                               "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
+                               "ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
+                               "scu-all",
+                               "scu-dvc1", "scu-dvc0",
+                               "scu-src9", "scu-src8", "scu-src7", "scu-src6", "scu-src5",
+                               "scu-src4", "scu-src3", "scu-src2", "scu-src1", "scu-src0";
+               };
                mstp11_clks: mstp11_clks@e615099c {
                        compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
                        reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
                #size-cells = <0>;
                status = "disabled";
        };
+
+       pci0: pci@ee090000 {
+               compatible = "renesas,pci-r8a7791";
+               device_type = "pci";
+               clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
+               reg = <0 0xee090000 0 0xc00>,
+                     <0 0xee080000 0 0x1100>;
+               interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+
+               bus-range = <0 0>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pci1: pci@ee0d0000 {
+               compatible = "renesas,pci-r8a7791";
+               device_type = "pci";
+               clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
+               reg = <0 0xee0d0000 0 0xc00>,
+                     <0 0xee0c0000 0 0x1100>;
+               interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+
+               bus-range = <1 1>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               #interrupt-cells = <1>;
+               ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
+               interrupt-map-mask = <0xff00 0 0 0x7>;
+               interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+                                0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
+                                0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
+       };
+
+       pciec: pcie@fe000000 {
+               compatible = "renesas,pcie-r8a7791";
+               reg = <0 0xfe000000 0 0x80000>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               bus-range = <0x00 0xff>;
+               device_type = "pci";
+               ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
+                         0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
+                         0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
+                         0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
+               /* Map all possible DDR as inbound ranges */
+               dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
+                             0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
+               interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 117 IRQ_TYPE_LEVEL_HIGH>,
+                            <0 118 IRQ_TYPE_LEVEL_HIGH>;
+               #interrupt-cells = <1>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&mstp3_clks R8A7791_CLK_PCIEC>, <&pcie_bus_clk>;
+               clock-names = "pcie", "pcie_bus";
+               status = "disabled";
+       };
+
+       rcar_sound: rcar_sound@0xec500000 {
+               #sound-dai-cells = <1>;
+               compatible =  "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2", "renesas,rcar_sound";
+               interrupt-parent = <&gic>;
+               reg =   <0 0xec500000 0 0x1000>, /* SCU */
+                       <0 0xec5a0000 0 0x100>,  /* ADG */
+                       <0 0xec540000 0 0x1000>, /* SSIU */
+                       <0 0xec541000 0 0x1280>; /* SSI */
+               clocks = <&mstp10_clks R8A7791_CLK_SSI_ALL>,
+                       <&mstp10_clks R8A7791_CLK_SSI9>, <&mstp10_clks R8A7791_CLK_SSI8>,
+                       <&mstp10_clks R8A7791_CLK_SSI7>, <&mstp10_clks R8A7791_CLK_SSI6>,
+                       <&mstp10_clks R8A7791_CLK_SSI5>, <&mstp10_clks R8A7791_CLK_SSI4>,
+                       <&mstp10_clks R8A7791_CLK_SSI3>, <&mstp10_clks R8A7791_CLK_SSI2>,
+                       <&mstp10_clks R8A7791_CLK_SSI1>, <&mstp10_clks R8A7791_CLK_SSI0>,
+                       <&mstp10_clks R8A7791_CLK_SCU_SRC9>, <&mstp10_clks R8A7791_CLK_SCU_SRC8>,
+                       <&mstp10_clks R8A7791_CLK_SCU_SRC7>, <&mstp10_clks R8A7791_CLK_SCU_SRC6>,
+                       <&mstp10_clks R8A7791_CLK_SCU_SRC5>, <&mstp10_clks R8A7791_CLK_SCU_SRC4>,
+                       <&mstp10_clks R8A7791_CLK_SCU_SRC3>, <&mstp10_clks R8A7791_CLK_SCU_SRC2>,
+                       <&mstp10_clks R8A7791_CLK_SCU_SRC1>, <&mstp10_clks R8A7791_CLK_SCU_SRC0>,
+                       <&mstp10_clks R8A7791_CLK_SCU_DVC0>, <&mstp10_clks R8A7791_CLK_SCU_DVC1>,
+                       <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
+               clock-names = "ssi-all",
+                               "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
+                               "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
+                               "src.9", "src.8", "src.7", "src.6", "src.5",
+                               "src.4", "src.3", "src.2", "src.1", "src.0",
+                               "dvc.0", "dvc.1",
+                               "clk_a", "clk_b", "clk_c", "clk_i";
+
+               status = "disabled";
+
+               rcar_sound,dvc {
+                       dvc0: dvc@0 { };
+                       dvc1: dvc@1 { };
+               };
+
+               rcar_sound,src {
+                       src0: src@0 { };
+                       src1: src@1 { };
+                       src2: src@2 { };
+                       src3: src@3 { };
+                       src4: src@4 { };
+                       src5: src@5 { };
+                       src6: src@6 { };
+                       src7: src@7 { };
+                       src8: src@8 { };
+                       src9: src@9 { };
+               };
+
+               rcar_sound,ssi {
+                       ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; };
+                       ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; };
+               };
+       };
 };
index afb3273..042f821 100644 (file)
                reg = <0x60000000 0x40000000>;
        };
 
-       soc {
-               uart0: serial@10124000 {
-                       status = "okay";
-               };
+       vcc_sd0: fixed-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "sdmmc-supply";
+               regulator-min-microvolt = <3000000>;
+               regulator-max-microvolt = <3000000>;
+               gpio = <&gpio3 7 GPIO_ACTIVE_LOW>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
 
-               uart1: serial@10126000 {
-                       status = "okay";
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+
+               button@0 {
+                       gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* GPIO6_A2 */
+                       linux,code = <116>;
+                       label = "GPIO Key Power";
+                       linux,input-type = <1>;
+                       gpio-key,wakeup = <1>;
+                       debounce-interval = <100>;
                };
-
-               uart2: serial@20064000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart2_xfer>;
-                       status = "okay";
+               button@1 {
+                       gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; /* GPIO4_C5 */
+                       linux,code = <104>;
+                       label = "GPIO Key Vol-";
+                       linux,input-type = <1>;
+                       gpio-key,wakeup = <0>;
+                       debounce-interval = <100>;
                };
+               /* VOL+ comes somehow thru the ADC */
+       };
+};
 
-               uart3: serial@20068000 {
-                       status = "okay";
-               };
+&i2c1 {
+       status = "okay";
+       clock-frequency = <400000>;
 
-               vcc_sd0: fixed-regulator {
-                       compatible = "regulator-fixed";
-                       regulator-name = "sdmmc-supply";
-                       regulator-min-microvolt = <3000000>;
-                       regulator-max-microvolt = <3000000>;
-                       gpio = <&gpio3 7 GPIO_ACTIVE_LOW>;
-                       startup-delay-us = <100000>;
-               };
+       tps: tps@2d {
+               reg = <0x2d>;
 
-               dwmmc@10214000 { /* sdmmc */
-                       num-slots = <1>;
-                       status = "okay";
+               interrupt-parent = <&gpio6>;
+               interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
 
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
-                       vmmc-supply = <&vcc_sd0>;
+               vcc5-supply = <&vcc_io>;
+               vcc6-supply = <&vcc_io>;
 
-                       slot@0 {
-                               reg = <0>;
-                               bus-width = <4>;
-                               disable-wp;
+               regulators {
+                       vcc_rtc: regulator@0 {
+                               regulator-name = "vcc_rtc";
+                               regulator-always-on;
                        };
-               };
 
-               dwmmc@10218000 { /* wifi */
-                       num-slots = <1>;
-                       status = "okay";
-                       non-removable;
+                       vcc_io: regulator@1 {
+                               regulator-name = "vcc_io";
+                               regulator-always-on;
+                       };
 
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_bus4>;
+                       vdd_arm: regulator@2 {
+                               regulator-name = "vdd_arm";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
 
-                       slot@0 {
-                               reg = <0>;
-                               bus-width = <4>;
-                               disable-wp;
+                       vcc_ddr: regulator@3 {
+                               regulator-name = "vcc_ddr";
+                               regulator-min-microvolt = <600000>;
+                               regulator-max-microvolt = <1500000>;
+                               regulator-boot-on;
+                               regulator-always-on;
+                       };
+
+                       vcc18_cif: regulator@5 {
+                               regulator-name = "vcc18_cif";
+                               regulator-always-on;
+                       };
+
+                       vdd_11: regulator@6 {
+                               regulator-name = "vdd_11";
+                               regulator-always-on;
+                       };
+
+                       vcc_25: regulator@7 {
+                               regulator-name = "vcc_25";
+                               regulator-always-on;
+                       };
+
+                       vcc_18: regulator@8 {
+                               regulator-name = "vcc_18";
+                               regulator-always-on;
+                       };
+
+                       vcc25_hdmi: regulator@9 {
+                               regulator-name = "vcc25_hdmi";
+                               regulator-always-on;
+                       };
+
+                       vcca_33: regulator@10 {
+                               regulator-name = "vcca_33";
+                               regulator-always-on;
                        };
-               };
 
-               gpio-keys {
-                       compatible = "gpio-keys";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       autorepeat;
-
-                       button@0 {
-                               gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* GPIO6_A2 */
-                               linux,code = <116>;
-                               label = "GPIO Key Power";
-                               linux,input-type = <1>;
-                               gpio-key,wakeup = <1>;
-                               debounce-interval = <100>;
+                       vcc_tp: regulator@11 {
+                               regulator-name = "vcc_tp";
+                               regulator-always-on;
                        };
-                       button@1 {
-                               gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; /* GPIO4_C5 */
-                               linux,code = <104>;
-                               label = "GPIO Key Vol-";
-                               linux,input-type = <1>;
-                               gpio-key,wakeup = <0>;
-                               debounce-interval = <100>;
+
+                       vcc28_cif: regulator@12 {
+                               regulator-name = "vcc28_cif";
+                               regulator-always-on;
                        };
-                       /* VOL+ comes somehow thru the ADC */
                };
        };
 };
+
+/* must be included after &tps gets defined */
+#include "tps65910.dtsi"
+
+&mmc0 { /* sdmmc */
+       num-slots = <1>;
+       status = "okay";
+       vmmc-supply = <&vcc_sd0>;
+
+       slot@0 {
+               reg = <0>;
+               bus-width = <4>;
+               disable-wp;
+       };
+};
+
+&mmc1 { /* wifi */
+       num-slots = <1>;
+       status = "okay";
+       non-removable;
+
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_bus4>;
+
+       slot@0 {
+               reg = <0>;
+               bus-width = <4>;
+               disable-wp;
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&uart3 {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3066a-clocks.dtsi b/arch/arm/boot/dts/rk3066a-clocks.dtsi
deleted file mode 100644 (file)
index 6e307fc..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (c) 2013 MundoReader S.L.
- * Author: Heiko Stuebner <heiko@sntech.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.
- */
-
-/ {
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               /*
-                * This is a dummy clock, to be used as placeholder on
-                * other mux clocks when a specific parent clock is not
-                * yet implemented. It should be dropped when the driver
-                * is complete.
-                */
-               dummy: dummy {
-                       compatible = "fixed-clock";
-                       clock-frequency = <0>;
-                       #clock-cells = <0>;
-               };
-
-               xin24m: xin24m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <24000000>;
-                       #clock-cells = <0>;
-               };
-
-               dummy48m: dummy48m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <48000000>;
-                       #clock-cells = <0>;
-               };
-
-               dummy150m: dummy150m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <150000000>;
-                       #clock-cells = <0>;
-               };
-
-               clk_gates0: gate-clk@200000d0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d0 0x4>;
-                       clocks = <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_core_periph", "gate_cpu_gpll",
-                               "gate_ddrphy", "gate_aclk_cpu",
-                               "gate_hclk_cpu", "gate_pclk_cpu",
-                               "gate_atclk_cpu", "gate_i2s0",
-                               "gate_i2s0_frac", "gate_i2s1",
-                               "gate_i2s1_frac", "gate_i2s2",
-                               "gate_i2s2_frac", "gate_spdif",
-                               "gate_spdif_frac", "gate_testclk";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates1: gate-clk@200000d4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d4 0x4>;
-                       clocks = <&xin24m>, <&xin24m>,
-                                <&xin24m>, <&dummy>,
-                                <&dummy>, <&xin24m>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_timer0", "gate_timer1",
-                               "gate_timer2", "gate_jtag",
-                               "gate_aclk_lcdc1_src", "gate_otgphy0",
-                               "gate_otgphy1", "gate_ddr_gpll",
-                               "gate_uart0", "gate_frac_uart0",
-                               "gate_uart1", "gate_frac_uart1",
-                               "gate_uart2", "gate_frac_uart2",
-                               "gate_uart3", "gate_frac_uart3";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates2: gate-clk@200000d8 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d8 0x4>;
-                       clocks = <&clk_gates2 1>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&clk_gates2 3>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy48m>,
-                                <&dummy>, <&dummy48m>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_periph_src", "gate_aclk_periph",
-                               "gate_hclk_periph", "gate_pclk_periph",
-                               "gate_smc", "gate_mac",
-                               "gate_hsadc", "gate_hsadc_frac",
-                               "gate_saradc", "gate_spi0",
-                               "gate_spi1", "gate_mmc0",
-                               "gate_mac_lbtest", "gate_mmc1",
-                               "gate_emmc", "gate_tsadc";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates3: gate-clk@200000dc {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000dc 0x4>;
-                       clocks = <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_aclk_lcdc0_src", "gate_dclk_lcdc0",
-                               "gate_dclk_lcdc1", "gate_pclkin_cif0",
-                               "gate_pclkin_cif1", "reserved",
-                               "reserved", "gate_cif0_out",
-                               "gate_cif1_out", "gate_aclk_vepu",
-                               "gate_hclk_vepu", "gate_aclk_vdpu",
-                               "gate_hclk_vdpu", "gate_gpu_src",
-                               "reserved", "gate_xin27m";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates4: gate-clk@200000e0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e0 0x4>;
-                       clocks = <&clk_gates2 2>, <&clk_gates2 3>,
-                                <&clk_gates2 1>, <&clk_gates2 1>,
-                                <&clk_gates2 1>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates2 2>,
-                                <&clk_gates0 4>, <&clk_gates0 4>,
-                                <&clk_gates0 3>, <&clk_gates0 3>,
-                                <&clk_gates0 3>, <&clk_gates2 3>,
-                                <&clk_gates0 4>;
-
-                       clock-output-names =
-                               "gate_hclk_peri_axi_matrix", "gate_pclk_peri_axi_matrix",
-                               "gate_aclk_cpu_peri", "gate_aclk_peri_axi_matrix",
-                               "gate_aclk_pei_niu", "gate_hclk_usb_peri",
-                               "gate_hclk_peri_ahb_arbi", "gate_hclk_emem_peri",
-                               "gate_hclk_cpubus", "gate_hclk_ahb2apb",
-                               "gate_aclk_strc_sys", "gate_aclk_l2mem_con",
-                               "gate_aclk_intmem", "gate_pclk_tsadc",
-                               "gate_hclk_hdmi";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates5: gate-clk@200000e4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e4 0x4>;
-                       clocks = <&clk_gates0 3>, <&clk_gates2 1>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates0 4>, <&clk_gates0 5>,
-                                <&clk_gates2 1>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates4 5>,
-                                <&clk_gates4 5>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_aclk_dmac1", "gate_aclk_dmac2",
-                               "gate_pclk_efuse", "gate_pclk_tzpc",
-                               "gate_pclk_grf", "gate_pclk_pmu",
-                               "gate_hclk_rom", "gate_pclk_ddrupctl",
-                               "gate_aclk_smc", "gate_hclk_nandc",
-                               "gate_hclk_mmc0", "gate_hclk_mmc1",
-                               "gate_hclk_emmc", "gate_hclk_otg0",
-                               "gate_hclk_otg1", "gate_aclk_gpu";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates6: gate-clk@200000e8 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e8 0x4>;
-                       clocks = <&clk_gates3 0>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates1 4>,
-                                <&clk_gates0 4>, <&clk_gates3 0>,
-                                <&clk_gates0 4>, <&clk_gates1 4>,
-                                <&clk_gates3 0>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates1 4>,
-                                <&clk_gates0 4>, <&clk_gates3 0>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_aclk_lcdc0", "gate_hclk_lcdc0",
-                               "gate_hclk_lcdc1", "gate_aclk_lcdc1",
-                               "gate_hclk_cif0", "gate_aclk_cif0",
-                               "gate_hclk_cif1", "gate_aclk_cif1",
-                               "gate_aclk_ipp", "gate_hclk_ipp",
-                               "gate_hclk_rga", "gate_aclk_rga",
-                               "gate_hclk_vio_bus", "gate_aclk_vio0",
-                               "gate_aclk_vcodec", "gate_shclk_vio_h2h";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates7: gate-clk@200000ec {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000ec 0x4>;
-                       clocks = <&clk_gates2 2>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates2 3>;
-
-                       clock-output-names =
-                               "gate_hclk_emac", "gate_hclk_spdif",
-                               "gate_hclk_i2s0_2ch", "gate_hclk_i2s1_2ch",
-                               "gate_hclk_i2s_8ch", "gate_hclk_hsadc",
-                               "gate_hclk_pidf", "gate_pclk_timer0",
-                               "gate_pclk_timer1", "gate_pclk_timer2",
-                               "gate_pclk_pwm01", "gate_pclk_pwm23",
-                               "gate_pclk_spi0", "gate_pclk_spi1",
-                               "gate_pclk_saradc", "gate_pclk_wdt";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates8: gate-clk@200000f0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000f0 0x4>;
-                       clocks = <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&dummy>, <&clk_gates0 5>;
-
-                       clock-output-names =
-                               "gate_pclk_uart0", "gate_pclk_uart1",
-                               "gate_pclk_uart2", "gate_pclk_uart3",
-                               "gate_pclk_i2c0", "gate_pclk_i2c1",
-                               "gate_pclk_i2c2", "gate_pclk_i2c3",
-                               "gate_pclk_i2c4", "gate_pclk_gpio0",
-                               "gate_pclk_gpio1", "gate_pclk_gpio2",
-                               "gate_pclk_gpio3", "gate_pclk_gpio4",
-                               "reserved", "gate_pclk_gpio6";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates9: gate-clk@200000f4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000f4 0x4>;
-                       clocks = <&dummy>, <&clk_gates0 5>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&clk_gates1 4>,
-                                <&clk_gates0 5>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>;
-
-                       clock-output-names =
-                               "gate_clk_core_dbg", "gate_pclk_dbg",
-                               "gate_clk_trace", "gate_atclk",
-                               "gate_clk_l2c", "gate_aclk_vio1",
-                               "gate_pclk_publ", "gate_aclk_intmem0",
-                               "gate_aclk_intmem1", "gate_aclk_intmem2",
-                               "gate_aclk_intmem3";
-
-                       #clock-cells = <1>;
-               };
-       };
-
-};
index 4387cfd..879a818 100644 (file)
@@ -15,8 +15,8 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/clock/rk3066a-cru.h>
 #include "rk3xxx.dtsi"
-#include "rk3066a-clocks.dtsi"
 
 / {
        compatible = "rockchip,rk3066a";
                };
        };
 
-       soc {
-               timer@20038000 {
-                       compatible = "snps,dw-apb-timer-osc";
-                       reg = <0x20038000 0x100>;
-                       interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clk_gates1 0>, <&clk_gates7 7>;
-                       clock-names = "timer", "pclk";
+       sram: sram@10080000 {
+               compatible = "mmio-sram";
+               reg = <0x10080000 0x10000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x10080000 0x10000>;
+
+               smp-sram@0 {
+                       compatible = "rockchip,rk3066-smp-sram";
+                       reg = <0x0 0x50>;
                };
+       };
+
+       cru: clock-controller@20000000 {
+               compatible = "rockchip,rk3066a-cru";
+               reg = <0x20000000 0x1000>;
+               rockchip,grf = <&grf>;
 
-               timer@2003a000 {
-                       compatible = "snps,dw-apb-timer-osc";
-                       reg = <0x2003a000 0x100>;
-                       interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clk_gates1 1>, <&clk_gates7 8>;
-                       clock-names = "timer", "pclk";
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+       timer@2000e000 {
+               compatible = "snps,dw-apb-timer-osc";
+               reg = <0x2000e000 0x100>;
+               interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_TIMER2>, <&cru PCLK_TIMER2>;
+               clock-names = "timer", "pclk";
+       };
+
+       timer@20038000 {
+               compatible = "snps,dw-apb-timer-osc";
+               reg = <0x20038000 0x100>;
+               interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_TIMER0>, <&cru PCLK_TIMER0>;
+               clock-names = "timer", "pclk";
+       };
+
+       timer@2003a000 {
+               compatible = "snps,dw-apb-timer-osc";
+               reg = <0x2003a000 0x100>;
+               interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_TIMER1>, <&cru PCLK_TIMER1>;
+               clock-names = "timer", "pclk";
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,rk3066a-pinctrl";
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio0: gpio0@20034000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20034000 0x100>;
+                       interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO0>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                };
 
-               timer@2000e000 {
-                       compatible = "snps,dw-apb-timer-osc";
-                       reg = <0x2000e000 0x100>;
-                       interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-                       clocks = <&clk_gates1 2>, <&clk_gates7 9>;
-                       clock-names = "timer", "pclk";
+               gpio1: gpio1@2003c000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2003c000 0x100>;
+                       interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                };
 
-               sram: sram@10080000 {
-                       compatible = "mmio-sram";
-                       reg = <0x10080000 0x10000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges = <0 0x10080000 0x10000>;
+               gpio2: gpio2@2003e000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2003e000 0x100>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
 
-                       smp-sram@0 {
-                               compatible = "rockchip,rk3066-smp-sram";
-                               reg = <0x0 0x50>;
-                       };
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio3: gpio3@20080000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20080000 0x100>;
+                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO3>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                };
 
-               pinctrl@20008000 {
-                       compatible = "rockchip,rk3066a-pinctrl";
-                       rockchip,grf = <&grf>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges;
+               gpio4: gpio4@20084000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20084000 0x100>;
+                       interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO4>;
 
-                       gpio0: gpio0@20034000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x20034000 0x100>;
-                               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 9>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               gpio6: gpio6@2000a000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2000a000 0x100>;
+                       interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO6>;
+
+                       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;
+               };
+
+               i2c0 {
+                       i2c0_xfer: i2c0-xfer {
+                               rockchip,pins = <RK_GPIO2 28 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO2 29 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       gpio1: gpio1@2003c000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x2003c000 0x100>;
-                               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 10>;
+               i2c1 {
+                       i2c1_xfer: i2c1-xfer {
+                               rockchip,pins = <RK_GPIO2 30 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO2 31 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               i2c2 {
+                       i2c2_xfer: i2c2-xfer {
+                               rockchip,pins = <RK_GPIO3 0 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               i2c3 {
+                       i2c3_xfer: i2c3-xfer {
+                               rockchip,pins = <RK_GPIO3 2 RK_FUNC_2 &pcfg_pull_none>,
+                                               <RK_GPIO3 3 RK_FUNC_2 &pcfg_pull_none>;
                        };
+               };
 
-                       gpio2: gpio2@2003e000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x2003e000 0x100>;
-                               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 11>;
+               i2c4 {
+                       i2c4_xfer: i2c4-xfer {
+                               rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               pwm0 {
+                       pwm0_out: pwm0-out {
+                               rockchip,pins = <RK_GPIO0 3 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               pwm1 {
+                       pwm1_out: pwm1-out {
+                               rockchip,pins = <RK_GPIO0 4 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       gpio3: gpio3@20080000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x20080000 0x100>;
-                               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 12>;
+               pwm2 {
+                       pwm2_out: pwm2-out {
+                               rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               pwm3 {
+                       pwm3_out: pwm3-out {
+                               rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       gpio4: gpio4@20084000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x20084000 0x100>;
-                               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 13>;
+                       uart0_cts: uart0-cts {
+                               rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+                       uart0_rts: uart0-rts {
+                               rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+               };
+
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+                       uart1_cts: uart1-cts {
+                               rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       gpio6: gpio6@2000a000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x2000a000 0x100>;
-                               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 15>;
+                       uart1_rts: uart1-rts {
+                               rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               uart2 {
+                       uart2_xfer: uart2-xfer {
+                               rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
+                       };
+                       /* no rts / cts for uart2 */
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               uart3 {
+                       uart3_xfer: uart3-xfer {
+                               rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       pcfg_pull_default: pcfg_pull_default {
-                               bias-pull-pin-default;
+                       uart3_cts: uart3-cts {
+                               rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       pcfg_pull_none: pcfg_pull_none {
-                               bias-disable;
+                       uart3_rts: uart3-rts {
+                               rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
                        };
+               };
 
-                       uart0 {
-                               uart0_xfer: uart0-xfer {
-                                       rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+               sd0 {
+                       sd0_clk: sd0-clk {
+                               rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart0_cts: uart0-cts {
-                                       rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd0_cmd: sd0-cmd {
+                               rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart0_rts: uart0-rts {
-                                       rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd0_cd: sd0-cd {
+                               rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       uart1 {
-                               uart1_xfer: uart1-xfer {
-                                       rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd0_wp: sd0-wp {
+                               rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart1_cts: uart1-cts {
-                                       rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd0_bus1: sd0-bus-width1 {
+                               rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart1_rts: uart1-rts {
-                                       rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd0_bus4: sd0-bus-width4 {
+                               rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
                        };
+               };
 
-                       uart2 {
-                               uart2_xfer: uart2-xfer {
-                                       rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-                               /* no rts / cts for uart2 */
+               sd1 {
+                       sd1_clk: sd1-clk {
+                               rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       uart3 {
-                               uart3_xfer: uart3-xfer {
-                                       rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd1_cmd: sd1-cmd {
+                               rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart3_cts: uart3-cts {
-                                       rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd1_cd: sd1-cd {
+                               rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
+                       };
 
-                               uart3_rts: uart3-rts {
-                                       rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd1_wp: sd1-wp {
+                               rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       sd0 {
-                               sd0_clk: sd0-clk {
-                                       rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd0_cmd: sd0-cmd {
-                                       rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd0_cd: sd0-cd {
-                                       rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd0_wp: sd0-wp {
-                                       rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd0_bus1: sd0-bus-width1 {
-                                       rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd0_bus4: sd0-bus-width4 {
-                                       rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd1_bus1: sd1-bus-width1 {
+                               rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
                        };
 
-                       sd1 {
-                               sd1_clk: sd1-clk {
-                                       rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd1_cmd: sd1-cmd {
-                                       rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd1_cd: sd1-cd {
-                                       rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd1_wp: sd1-wp {
-                                       rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd1_bus1: sd1-bus-width1 {
-                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
-                               };
-
-                               sd1_bus4: sd1-bus-width4 {
-                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
-                                                       <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
-                               };
+                       sd1_bus4: sd1-bus-width4 {
+                               rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
+                                               <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
                        };
                };
        };
 };
+
+&i2c0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_xfer>;
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_xfer>;
+};
+
+&i2c2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_xfer>;
+};
+
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_xfer>;
+};
+
+&i2c4 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_xfer>;
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
+};
+
+&mmc1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus4>;
+};
+
+&pwm0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_out>;
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm1_out>;
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm2_out>;
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm3_out>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_xfer>;
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_xfer>;
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_xfer>;
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_xfer>;
+};
+
+&wdt {
+       compatible = "rockchip,rk3066-wdt", "snps,dw-wdt";
+};
diff --git a/arch/arm/boot/dts/rk3188-clocks.dtsi b/arch/arm/boot/dts/rk3188-clocks.dtsi
deleted file mode 100644 (file)
index b1b92dc..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright (c) 2013 MundoReader S.L.
- * Author: Heiko Stuebner <heiko@sntech.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.
- */
-
-/ {
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               /*
-                * This is a dummy clock, to be used as placeholder on
-                * other mux clocks when a specific parent clock is not
-                * yet implemented. It should be dropped when the driver
-                * is complete.
-                */
-               dummy: dummy {
-                       compatible = "fixed-clock";
-                       clock-frequency = <0>;
-                       #clock-cells = <0>;
-               };
-
-               xin24m: xin24m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <24000000>;
-                       #clock-cells = <0>;
-               };
-
-               dummy48m: dummy48m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <48000000>;
-                       #clock-cells = <0>;
-               };
-
-               dummy150m: dummy150m {
-                       compatible = "fixed-clock";
-                       clock-frequency = <150000000>;
-                       #clock-cells = <0>;
-               };
-
-               clk_gates0: gate-clk@200000d0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d0 0x4>;
-                       clocks = <&dummy150m>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_core_periph", "gate_cpu_gpll",
-                               "gate_ddrphy", "gate_aclk_cpu",
-                               "gate_hclk_cpu", "gate_pclk_cpu",
-                               "gate_atclk_cpu", "gate_aclk_core",
-                               "reserved", "gate_i2s0",
-                               "gate_i2s0_frac", "reserved",
-                               "reserved", "gate_spdif",
-                               "gate_spdif_frac", "gate_testclk";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates1: gate-clk@200000d4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d4 0x4>;
-                       clocks = <&xin24m>, <&xin24m>,
-                                <&xin24m>, <&dummy>,
-                                <&dummy>, <&xin24m>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&xin24m>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_timer0", "gate_timer1",
-                               "gate_timer3", "gate_jtag",
-                               "gate_aclk_lcdc1_src", "gate_otgphy0",
-                               "gate_otgphy1", "gate_ddr_gpll",
-                               "gate_uart0", "gate_frac_uart0",
-                               "gate_uart1", "gate_frac_uart1",
-                               "gate_uart2", "gate_frac_uart2",
-                               "gate_uart3", "gate_frac_uart3";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates2: gate-clk@200000d8 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000d8 0x4>;
-                       clocks = <&clk_gates2 1>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&clk_gates2 3>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy48m>,
-                                <&dummy>, <&dummy48m>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_periph_src", "gate_aclk_periph",
-                               "gate_hclk_periph", "gate_pclk_periph",
-                               "gate_smc", "gate_mac",
-                               "gate_hsadc", "gate_hsadc_frac",
-                               "gate_saradc", "gate_spi0",
-                               "gate_spi1", "gate_mmc0",
-                               "gate_mac_lbtest", "gate_mmc1",
-                               "gate_emmc", "reserved";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates3: gate-clk@200000dc {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000dc 0x4>;
-                       clocks = <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&xin24m>, <&xin24m>,
-                                <&dummy>, <&dummy>,
-                                <&xin24m>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&xin24m>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_aclk_lcdc0_src", "gate_dclk_lcdc0",
-                               "gate_dclk_lcdc1", "gate_pclkin_cif0",
-                               "gate_timer2", "gate_timer4",
-                               "gate_hsicphy", "gate_cif0_out",
-                               "gate_timer5", "gate_aclk_vepu",
-                               "gate_hclk_vepu", "gate_aclk_vdpu",
-                               "gate_hclk_vdpu", "reserved",
-                               "gate_timer6", "gate_aclk_gpu_src";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates4: gate-clk@200000e0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e0 0x4>;
-                       clocks = <&clk_gates2 2>, <&clk_gates2 3>,
-                                <&clk_gates2 1>, <&clk_gates2 1>,
-                                <&clk_gates2 1>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates2 2>,
-                                <&clk_gates0 4>, <&clk_gates0 4>,
-                                <&clk_gates0 3>, <&dummy>,
-                                <&clk_gates0 3>, <&dummy>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_hclk_peri_axi_matrix", "gate_pclk_peri_axi_matrix",
-                               "gate_aclk_cpu_peri", "gate_aclk_peri_axi_matrix",
-                               "gate_aclk_pei_niu", "gate_hclk_usb_peri",
-                               "gate_hclk_peri_ahb_arbi", "gate_hclk_emem_peri",
-                               "gate_hclk_cpubus", "gate_hclk_ahb2apb",
-                               "gate_aclk_strc_sys", "reserved",
-                               "gate_aclk_intmem", "reserved",
-                               "gate_hclk_imem1", "gate_hclk_imem0";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates5: gate-clk@200000e4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e4 0x4>;
-                       clocks = <&clk_gates0 3>, <&clk_gates2 1>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates0 4>, <&clk_gates0 5>,
-                                <&clk_gates2 1>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates4 5>;
-
-                       clock-output-names =
-                               "gate_aclk_dmac1", "gate_aclk_dmac2",
-                               "gate_pclk_efuse", "gate_pclk_tzpc",
-                               "gate_pclk_grf", "gate_pclk_pmu",
-                               "gate_hclk_rom", "gate_pclk_ddrupctl",
-                               "gate_aclk_smc", "gate_hclk_nandc",
-                               "gate_hclk_mmc0", "gate_hclk_mmc1",
-                               "gate_hclk_emmc", "gate_hclk_otg0";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates6: gate-clk@200000e8 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000e8 0x4>;
-                       clocks = <&clk_gates3 0>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates1 4>,
-                                <&clk_gates0 4>, <&clk_gates3 0>,
-                                <&dummy>, <&dummy>,
-                                <&clk_gates3 0>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&clk_gates1 4>,
-                                <&clk_gates0 4>, <&clk_gates3 0>;
-
-                       clock-output-names =
-                               "gate_aclk_lcdc0", "gate_hclk_lcdc0",
-                               "gate_hclk_lcdc1", "gate_aclk_lcdc1",
-                               "gate_hclk_cif0", "gate_aclk_cif0",
-                               "reserved", "reserved",
-                               "gate_aclk_ipp", "gate_hclk_ipp",
-                               "gate_hclk_rga", "gate_aclk_rga",
-                               "gate_hclk_vio_bus", "gate_aclk_vio0";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates7: gate-clk@200000ec {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000ec 0x4>;
-                       clocks = <&clk_gates2 2>, <&clk_gates0 4>,
-                                <&clk_gates0 4>, <&dummy>,
-                                <&dummy>, <&clk_gates2 2>,
-                                <&clk_gates2 2>, <&clk_gates0 5>,
-                                <&dummy>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates2 3>;
-
-                       clock-output-names =
-                               "gate_hclk_emac", "gate_hclk_spdif",
-                               "gate_hclk_i2s0_2ch", "gate_hclk_otg1",
-                               "gate_hclk_hsic", "gate_hclk_hsadc",
-                               "gate_hclk_pidf", "gate_pclk_timer0",
-                               "reserved", "gate_pclk_timer2",
-                               "gate_pclk_pwm01", "gate_pclk_pwm23",
-                               "gate_pclk_spi0", "gate_pclk_spi1",
-                               "gate_pclk_saradc", "gate_pclk_wdt";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates8: gate-clk@200000f0 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000f0 0x4>;
-                       clocks = <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&clk_gates2 3>,
-                                <&clk_gates2 3>, <&clk_gates0 5>,
-                                <&clk_gates0 5>, <&clk_gates0 5>,
-                                <&clk_gates2 3>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_pclk_uart0", "gate_pclk_uart1",
-                               "gate_pclk_uart2", "gate_pclk_uart3",
-                               "gate_pclk_i2c0", "gate_pclk_i2c1",
-                               "gate_pclk_i2c2", "gate_pclk_i2c3",
-                               "gate_pclk_i2c4", "gate_pclk_gpio0",
-                               "gate_pclk_gpio1", "gate_pclk_gpio2",
-                               "gate_pclk_gpio3", "gate_aclk_gps";
-
-                       #clock-cells = <1>;
-               };
-
-               clk_gates9: gate-clk@200000f4 {
-                       compatible = "rockchip,rk2928-gate-clk";
-                       reg = <0x200000f4 0x4>;
-                       clocks = <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>,
-                                <&dummy>, <&dummy>;
-
-                       clock-output-names =
-                               "gate_clk_core_dbg", "gate_pclk_dbg",
-                               "gate_clk_trace", "gate_atclk",
-                               "gate_clk_l2c", "gate_aclk_vio1",
-                               "gate_pclk_publ", "gate_aclk_gpu";
-
-                       #clock-cells = <1>;
-               };
-       };
-
-};
index a5eee55..171b610 100644 (file)
                reg = <0x60000000 0x80000000>;
        };
 
-       soc {
-               uart0: serial@10124000 {
-                       status = "okay";
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+
+               button@0 {
+                       gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <116>;
+                       label = "GPIO Key Power";
+                       linux,input-type = <1>;
+                       gpio-key,wakeup = <1>;
+                       debounce-interval = <100>;
                };
+       };
 
-               uart1: serial@10126000 {
-                       status = "okay";
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               green {
+                       gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
                };
 
-               uart2: serial@20064000 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&uart2_xfer>;
-                       status = "okay";
+               yellow {
+                       gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
                };
 
-               uart3: serial@20068000 {
-                       status = "okay";
+               sleep {
+                       gpios = <&gpio0 15 0>;
+                       default-state = "off";
                };
+       };
 
-               gpio-keys {
-                       compatible = "gpio-keys";
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-                       autorepeat;
-
-                       button@0 {
-                               gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
-                               linux,code = <116>;
-                               label = "GPIO Key Power";
-                               linux,input-type = <1>;
-                               gpio-key,wakeup = <1>;
-                               debounce-interval = <100>;
+       ir_recv: gpio-ir-receiver {
+               compatible = "gpio-ir-receiver";
+               gpios = <&gpio0 10 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ir_recv_pin>;
+       };
+
+       vcc_sd0: sdmmc-regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "sdmmc-supply";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               gpio = <&gpio3 1 GPIO_ACTIVE_LOW>;
+               startup-delay-us = <100000>;
+               vin-supply = <&vcc_io>;
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <400000>;
+
+       act8846: act8846@5a {
+               compatible = "active-semi,act8846";
+               reg = <0x5a>;
+               status = "okay";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&act8846_dvs0_ctl>;
+
+               regulators {
+                       vcc_ddr: REG1 {
+                               regulator-name = "VCC_DDR";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_log: REG2 {
+                               regulator-name = "VDD_LOG";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_arm: REG3 {
+                               regulator-name = "VDD_ARM";
+                               regulator-min-microvolt = <875000>;
+                               regulator-max-microvolt = <1300000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_io: REG4 {
+                               regulator-name = "VCC_IO";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_10: REG5 {
+                               regulator-name = "VDD_10";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_hdmi: REG6 {
+                               regulator-name = "VDD_HDMI";
+                               regulator-min-microvolt = <2500000>;
+                               regulator-max-microvolt = <2500000>;
+                               regulator-always-on;
+                       };
+
+                       vcc18: REG7 {
+                               regulator-name = "VCC_18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
                        };
-               };
 
-               gpio-leds {
-                       compatible = "gpio-leds";
+                       vcca_33: REG8 {
+                               regulator-name = "VCCA_33";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_rmii: REG9 {
+                               regulator-name = "VCC_RMII";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
 
-                       green {
-                               gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
-                               default-state = "off";
+                       vccio_wl: REG10 {
+                               regulator-name = "VCCIO_WL";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
                        };
 
-                       yellow {
-                               gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
-                               default-state = "off";
+                       vcc_18: REG11 {
+                               regulator-name = "VCC18_IO";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
                        };
 
-                       sleep {
-                               gpios = <&gpio0 15 0>;
-                               default-state = "off";
+                       vcc28: REG12 {
+                               regulator-name = "VCC_28";
+                               regulator-min-microvolt = <2800000>;
+                               regulator-max-microvolt = <2800000>;
+                               regulator-always-on;
                        };
                };
+       };
+};
+
+&mmc0 {
+       num-slots = <1>;
+       status = "okay";
+       vmmc-supply = <&vcc_sd0>;
 
+       slot@0 {
+               reg = <0>;
+               bus-width = <4>;
+               disable-wp;
        };
 };
+
+&pinctrl {
+       pcfg_output_low: pcfg-output-low {
+               output-low;
+       };
+
+       act8846 {
+               act8846_dvs0_ctl: act8846-dvs0-ctl {
+                       rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>;
+               };
+       };
+
+       ir-receiver {
+               ir_recv_pin: ir-recv-pin {
+                       rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&uart3 {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
index 238c996..ee801a9 100644 (file)
@@ -15,8 +15,8 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/clock/rk3188-cru.h>
 #include "rk3xxx.dtsi"
-#include "rk3188-clocks.dtsi"
 
 / {
        compatible = "rockchip,rk3188";
                };
        };
 
-       soc {
-               global-timer@1013c200 {
-                       interrupts = <GIC_PPI 11 0xf04>;
+       sram: sram@10080000 {
+               compatible = "mmio-sram";
+               reg = <0x10080000 0x8000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges = <0 0x10080000 0x8000>;
+
+               smp-sram@0 {
+                       compatible = "rockchip,rk3066-smp-sram";
+                       reg = <0x0 0x50>;
                };
+       };
+
+       cru: clock-controller@20000000 {
+               compatible = "rockchip,rk3188-cru";
+               reg = <0x20000000 0x1000>;
+               rockchip,grf = <&grf>;
+
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,rk3188-pinctrl";
+               rockchip,grf = <&grf>;
+               rockchip,pmu = <&pmu>;
+
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio0: gpio0@0x2000a000 {
+                       compatible = "rockchip,rk3188-gpio-bank0";
+                       reg = <0x2000a000 0x100>;
+                       interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO0>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
 
-               local-timer@1013c600 {
-                       interrupts = <GIC_PPI 13 0xf04>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                };
 
-               sram: sram@10080000 {
-                       compatible = "mmio-sram";
-                       reg = <0x10080000 0x8000>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges = <0 0x10080000 0x8000>;
+               gpio1: gpio1@0x2003c000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2003c000 0x100>;
+                       interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
 
-                       smp-sram@0 {
-                               compatible = "rockchip,rk3066-smp-sram";
-                               reg = <0x0 0x50>;
-                       };
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
                };
 
-               pinctrl@20008000 {
-                       compatible = "rockchip,rk3188-pinctrl";
-                       rockchip,grf = <&grf>;
-                       rockchip,pmu = <&pmu>;
+               gpio2: gpio2@2003e000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x2003e000 0x100>;
+                       interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
 
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges;
+                       gpio-controller;
+                       #gpio-cells = <2>;
 
-                       gpio0: gpio0@0x2000a000 {
-                               compatible = "rockchip,rk3188-gpio-bank0";
-                               reg = <0x2000a000 0x100>;
-                               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 9>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               gpio3: gpio3@20080000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0x20080000 0x100>;
+                       interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO3>;
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                       };
+                       gpio-controller;
+                       #gpio-cells = <2>;
 
-                       gpio1: gpio1@0x2003c000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x2003c000 0x100>;
-                               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 10>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               pcfg_pull_up: pcfg_pull_up {
+                       bias-pull-up;
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
-                       };
+               pcfg_pull_down: pcfg_pull_down {
+                       bias-pull-down;
+               };
 
-                       gpio2: gpio2@2003e000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x2003e000 0x100>;
-                               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 11>;
+               pcfg_pull_none: pcfg_pull_none {
+                       bias-disable;
+               };
+
+               i2c0 {
+                       i2c0_xfer: i2c0-xfer {
+                               rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO1 25 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               i2c1 {
+                       i2c1_xfer: i2c1-xfer {
+                               rockchip,pins = <RK_GPIO1 26 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO1 27 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               i2c2 {
+                       i2c2_xfer: i2c2-xfer {
+                               rockchip,pins = <RK_GPIO1 28 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO1 29 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       gpio3: gpio3@20080000 {
-                               compatible = "rockchip,gpio-bank";
-                               reg = <0x20080000 0x100>;
-                               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clk_gates8 12>;
+               i2c3 {
+                       i2c3_xfer: i2c3-xfer {
+                               rockchip,pins = <RK_GPIO3 14 RK_FUNC_2 &pcfg_pull_none>,
+                                               <RK_GPIO3 15 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+               };
 
-                               gpio-controller;
-                               #gpio-cells = <2>;
+               i2c4 {
+                       i2c4_xfer: i2c4-xfer {
+                               rockchip,pins = <RK_GPIO1 30 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO1 31 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
 
-                               interrupt-controller;
-                               #interrupt-cells = <2>;
+               pwm0 {
+                       pwm0_out: pwm0-out {
+                               rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       pcfg_pull_up: pcfg_pull_up {
-                               bias-pull-up;
+               pwm1 {
+                       pwm1_out: pwm1-out {
+                               rockchip,pins = <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       pcfg_pull_down: pcfg_pull_down {
-                               bias-pull-down;
+               pwm2 {
+                       pwm2_out: pwm2-out {
+                               rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       pcfg_pull_none: pcfg_pull_none {
-                               bias-disable;
+               pwm3 {
+                       pwm3_out: pwm3-out {
+                               rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       uart0 {
-                               uart0_xfer: uart0-xfer {
-                                       rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
-                                                       <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
+                                               <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart0_cts: uart0-cts {
-                                       rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart0_cts: uart0-cts {
+                               rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart0_rts: uart0-rts {
-                                       rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart0_rts: uart0-rts {
+                               rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       uart1 {
-                               uart1_xfer: uart1-xfer {
-                                       rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
-                                                       <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
+                                               <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart1_cts: uart1-cts {
-                                       rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart1_cts: uart1-cts {
+                               rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart1_rts: uart1-rts {
-                                       rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart1_rts: uart1-rts {
+                               rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       uart2 {
-                               uart2_xfer: uart2-xfer {
-                                       rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
-                                                       <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
-                               };
-                               /* no rts / cts for uart2 */
+               uart2 {
+                       uart2_xfer: uart2-xfer {
+                               rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
+                                               <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
                        };
+                       /* no rts / cts for uart2 */
+               };
 
-                       uart3 {
-                               uart3_xfer: uart3-xfer {
-                                       rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
-                                                       <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+               uart3 {
+                       uart3_xfer: uart3-xfer {
+                               rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
+                                               <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart3_cts: uart3-cts {
-                                       rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart3_cts: uart3-cts {
+                               rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               uart3_rts: uart3-rts {
-                                       rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       uart3_rts: uart3-rts {
+                               rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       sd0 {
-                               sd0_clk: sd0-clk {
-                                       rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+               sd0 {
+                       sd0_clk: sd0-clk {
+                               rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_cmd: sd0-cmd {
-                                       rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_cmd: sd0-cmd {
+                               rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_cd: sd0-cd {
-                                       rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_cd: sd0-cd {
+                               rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_wp: sd0-wp {
-                                       rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_wp: sd0-wp {
+                               rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_pwr: sd0-pwr {
-                                       rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_pwr: sd0-pwr {
+                               rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_bus1: sd0-bus-width1 {
-                                       rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_bus1: sd0-bus-width1 {
+                               rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd0_bus4: sd0-bus-width4 {
-                                       rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd0_bus4: sd0-bus-width4 {
+                               rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
                        };
+               };
 
-                       sd1 {
-                               sd1_clk: sd1-clk {
-                                       rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+               sd1 {
+                       sd1_clk: sd1-clk {
+                               rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd1_cmd: sd1-cmd {
-                                       rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd1_cmd: sd1-cmd {
+                               rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd1_cd: sd1-cd {
-                                       rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd1_cd: sd1-cd {
+                               rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd1_wp: sd1-wp {
-                                       rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd1_wp: sd1-wp {
+                               rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd1_bus1: sd1-bus-width1 {
-                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd1_bus1: sd1-bus-width1 {
+                               rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
+                       };
 
-                               sd1_bus4: sd1-bus-width4 {
-                                       rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
-                                                       <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
-                               };
+                       sd1_bus4: sd1-bus-width4 {
+                               rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
+                                               <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
                        };
                };
        };
 };
+
+&global_timer {
+       interrupts = <GIC_PPI 11 0xf04>;
+};
+
+&local_timer {
+       interrupts = <GIC_PPI 13 0xf04>;
+};
+
+&i2c0 {
+       compatible = "rockchip,rk3188-i2c";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_xfer>;
+};
+
+&i2c1 {
+       compatible = "rockchip,rk3188-i2c";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_xfer>;
+};
+
+&i2c2 {
+       compatible = "rockchip,rk3188-i2c";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c2_xfer>;
+};
+
+&i2c3 {
+       compatible = "rockchip,rk3188-i2c";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_xfer>;
+};
+
+&i2c4 {
+       compatible = "rockchip,rk3188-i2c";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c4_xfer>;
+};
+
+&pwm0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm0_out>;
+};
+
+&pwm1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm1_out>;
+};
+
+&pwm2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm2_out>;
+};
+
+&pwm3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&pwm3_out>;
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_xfer>;
+};
+
+&uart1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart1_xfer>;
+};
+
+&uart2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart2_xfer>;
+};
+
+&uart3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart3_xfer>;
+};
+
+&wdt {
+       compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";
+};
diff --git a/arch/arm/boot/dts/rk3288-evb-act8846.dts b/arch/arm/boot/dts/rk3288-evb-act8846.dts
new file mode 100644 (file)
index 0000000..7d59ff4
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+#include "rk3288-evb.dtsi"
+
+/ {
+       compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
+};
+
+&i2c0 {
+       hym8563@51 {
+               compatible = "haoyu,hym8563";
+               reg = <0x51>;
+
+               interrupt-parent = <&gpio0>;
+               interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&hym8563_int>;
+
+               #clock-cells = <0>;
+               clock-output-names = "xin32k";
+       };
+
+       act8846: act8846@5a {
+               compatible = "active-semi,act8846";
+               reg = <0x5a>;
+               status = "okay";
+
+               regulators {
+                       vcc_ddr: REG1 {
+                               regulator-name = "VCC_DDR";
+                               regulator-min-microvolt = <1200000>;
+                               regulator-max-microvolt = <1200000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_io: REG2 {
+                               regulator-name = "VCC_IO";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_log: REG3 {
+                               regulator-name = "VDD_LOG";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_20: REG4 {
+                               regulator-name = "VCC_20";
+                               regulator-min-microvolt = <2000000>;
+                               regulator-max-microvolt = <2000000>;
+                               regulator-always-on;
+                       };
+
+                       vccio_sd: REG5 {
+                               regulator-name = "VCCIO_SD";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd10_lcd: REG6 {
+                               regulator-name = "VDD10_LCD";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vcca_codec: REG7 {
+                               regulator-name = "VCCA_CODEC";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vcca_tp: REG8 {
+                               regulator-name = "VCCA_TP";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vccio_pmu: REG9 {
+                               regulator-name = "VCCIO_PMU";
+                               regulator-min-microvolt = <3300000>;
+                               regulator-max-microvolt = <3300000>;
+                               regulator-always-on;
+                       };
+
+                       vdd_10: REG10 {
+                               regulator-name = "VDD_10";
+                               regulator-min-microvolt = <1000000>;
+                               regulator-max-microvolt = <1000000>;
+                               regulator-always-on;
+                       };
+
+                       vcc_18: REG11 {
+                               regulator-name = "VCC_18";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+
+                       vcc18_lcd: REG12 {
+                               regulator-name = "VCC18_LCD";
+                               regulator-min-microvolt = <1800000>;
+                               regulator-max-microvolt = <1800000>;
+                               regulator-always-on;
+                       };
+               };
+       };
+};
+
+&pinctrl {
+       hym8563 {
+               hym8563_int: hym8563-int {
+                       rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/rk3288-evb-rk808.dts b/arch/arm/boot/dts/rk3288-evb-rk808.dts
new file mode 100644 (file)
index 0000000..9a88b6c
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * 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.
+ */
+
+/dts-v1/;
+#include "rk3288-evb.dtsi"
+
+/ {
+       compatible = "rockchip,rk3288-evb-rk808", "rockchip,rk3288";
+};
diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
new file mode 100644 (file)
index 0000000..4f57209
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ */
+
+#include "rk3288.dtsi"
+
+/ {
+       memory {
+               reg = <0x0 0x80000000>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwrbtn>;
+
+               button@0 {
+                       gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <116>;
+                       label = "GPIO Key Power";
+                       linux,input-type = <1>;
+                       gpio-key,wakeup = <1>;
+                       debounce-interval = <100>;
+               };
+       };
+
+       /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
+       vcc_host: vcc-host-regulator {
+               compatible = "regulator-fixed";
+               enable-active-high;
+               gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&host_vbus_drv>;
+               regulator-name = "vcc_host";
+               regulator-always-on;
+               regulator-boot-on;
+       };
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+&wdt {
+       status = "okay";
+};
+
+&uart0 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
+
+&uart2 {
+       status = "okay";
+};
+
+&uart3 {
+       status = "okay";
+};
+
+&uart4 {
+       status = "okay";
+};
+
+&pinctrl {
+       buttons {
+               pwrbtn: pwrbtn {
+                       rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
+               };
+       };
+
+       usb {
+               host_vbus_drv: host-vbus-drv {
+                       rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
+               };
+       };
+};
+
+&usb_host0_ehci {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
new file mode 100644 (file)
index 0000000..e7cb008
--- /dev/null
@@ -0,0 +1,595 @@
+/*
+ * 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.
+ */
+
+#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/rk3288-cru.h>
+#include "skeleton.dtsi"
+
+/ {
+       compatible = "rockchip,rk3288";
+
+       interrupt-parent = <&gic>;
+
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               i2c5 = &i2c5;
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+               serial3 = &uart3;
+               serial4 = &uart4;
+       };
+
+       cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu@500 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a12";
+                       reg = <0x500>;
+               };
+               cpu@501 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a12";
+                       reg = <0x501>;
+               };
+               cpu@502 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a12";
+                       reg = <0x502>;
+               };
+               cpu@503 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a12";
+                       reg = <0x503>;
+               };
+       };
+
+       xin24m: oscillator {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xin24m";
+               #clock-cells = <0>;
+       };
+
+       timer {
+               compatible = "arm,armv7-timer";
+               interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
+                            <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+               clock-frequency = <24000000>;
+       };
+
+       i2c1: i2c@ff140000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff140000 0x1000>;
+               interrupts = <GIC_SPI 62 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";
+       };
+
+       i2c3: i2c@ff150000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff150000 0x1000>;
+               interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c3_xfer>;
+               status = "disabled";
+       };
+
+       i2c4: i2c@ff160000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff160000 0x1000>;
+               interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C4>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c4_xfer>;
+               status = "disabled";
+       };
+
+       i2c5: i2c@ff170000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff170000 0x1000>;
+               interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C5>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c5_xfer>;
+               status = "disabled";
+       };
+
+       uart0: serial@ff180000 {
+               compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart";
+               reg = <0xff180000 0x100>;
+               interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart0_xfer>;
+               status = "disabled";
+       };
+
+       uart1: serial@ff190000 {
+               compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart";
+               reg = <0xff190000 0x100>;
+               interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart1_xfer>;
+               status = "disabled";
+       };
+
+       uart2: serial@ff690000 {
+               compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart";
+               reg = <0xff690000 0x100>;
+               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart2_xfer>;
+               status = "disabled";
+       };
+
+       uart3: serial@ff1b0000 {
+               compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart";
+               reg = <0xff1b0000 0x100>;
+               interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart3_xfer>;
+               status = "disabled";
+       };
+
+       uart4: serial@ff1c0000 {
+               compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart";
+               reg = <0xff1c0000 0x100>;
+               interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <4>;
+               clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
+               clock-names = "baudclk", "apb_pclk";
+               pinctrl-names = "default";
+               pinctrl-0 = <&uart4_xfer>;
+               status = "disabled";
+       };
+
+       i2c0: i2c@ff650000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff650000 0x1000>;
+               interrupts = <GIC_SPI 60 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";
+       };
+
+       i2c2: i2c@ff660000 {
+               compatible = "rockchip,rk3288-i2c";
+               reg = <0xff660000 0x1000>;
+               interrupts = <GIC_SPI 61 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";
+       };
+
+       pmu: power-management@ff730000 {
+               compatible = "rockchip,rk3288-pmu", "syscon";
+               reg = <0xff730000 0x100>;
+       };
+
+       sgrf: syscon@ff740000 {
+               compatible = "rockchip,rk3288-sgrf", "syscon";
+               reg = <0xff740000 0x1000>;
+       };
+
+       cru: clock-controller@ff760000 {
+               compatible = "rockchip,rk3288-cru";
+               reg = <0xff760000 0x1000>;
+               rockchip,grf = <&grf>;
+               #clock-cells = <1>;
+               #reset-cells = <1>;
+       };
+
+       grf: syscon@ff770000 {
+               compatible = "rockchip,rk3288-grf", "syscon";
+               reg = <0xff770000 0x1000>;
+       };
+
+       wdt: watchdog@ff800000 {
+               compatible = "rockchip,rk3288-wdt", "snps,dw-wdt";
+               reg = <0xff800000 0x100>;
+               interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       usb_host0_ehci: usb@ff500000 {
+               compatible = "generic-ehci";
+               reg = <0xff500000 0x100>;
+               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_USBHOST0>;
+               clock-names = "usbhost";
+               status = "disabled";
+       };
+
+       /* NOTE: ohci@ff520000 doesn't actually work on hardware */
+
+       usb_hsic: usb@ff5c0000 {
+               compatible = "generic-ehci";
+               reg = <0xff5c0000 0x100>;
+               interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_HSIC>;
+               clock-names = "usbhost";
+               status = "disabled";
+       };
+
+       gic: interrupt-controller@ffc01000 {
+               compatible = "arm,gic-400";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+
+               reg = <0xffc01000 0x1000>,
+                     <0xffc02000 0x1000>,
+                     <0xffc04000 0x2000>,
+                     <0xffc06000 0x2000>;
+               interrupts = <GIC_PPI 9 0xf04>;
+       };
+
+       pinctrl: pinctrl {
+               compatible = "rockchip,rk3288-pinctrl";
+               rockchip,grf = <&grf>;
+               rockchip,pmu = <&pmu>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio0: gpio0@ff750000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg =   <0xff750000 0x100>;
+                       interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO0>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio1: gpio1@ff780000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff780000 0x100>;
+                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO1>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio2: gpio2@ff790000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff790000 0x100>;
+                       interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO2>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio3: gpio3@ff7a0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7a0000 0x100>;
+                       interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO3>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio4: gpio4@ff7b0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7b0000 0x100>;
+                       interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO4>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio5: gpio5@ff7c0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7c0000 0x100>;
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO5>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio6: gpio6@ff7d0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7d0000 0x100>;
+                       interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO6>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio7: gpio7@ff7e0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7e0000 0x100>;
+                       interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO7>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+               };
+
+               gpio8: gpio8@ff7f0000 {
+                       compatible = "rockchip,gpio-bank";
+                       reg = <0xff7f0000 0x100>;
+                       interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&cru PCLK_GPIO8>;
+
+                       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;
+               };
+
+               i2c0 {
+                       i2c0_xfer: i2c0-xfer {
+                               rockchip,pins = <0 15 RK_FUNC_1 &pcfg_pull_none>,
+                                               <0 16 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c1 {
+                       i2c1_xfer: i2c1-xfer {
+                               rockchip,pins = <8 4 RK_FUNC_1 &pcfg_pull_none>,
+                                               <8 5 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c2 {
+                       i2c2_xfer: i2c2-xfer {
+                               rockchip,pins = <6 9 RK_FUNC_1 &pcfg_pull_none>,
+                                               <6 10 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c3 {
+                       i2c3_xfer: i2c3-xfer {
+                               rockchip,pins = <2 16 RK_FUNC_1 &pcfg_pull_none>,
+                                               <2 17 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c4 {
+                       i2c4_xfer: i2c4-xfer {
+                               rockchip,pins = <7 17 RK_FUNC_1 &pcfg_pull_none>,
+                                               <7 18 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               i2c5 {
+                       i2c5_xfer: i2c5-xfer {
+                               rockchip,pins = <7 19 RK_FUNC_1 &pcfg_pull_none>,
+                                               <7 20 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               sdmmc {
+                       sdmmc_clk: sdmmc-clk {
+                               rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       sdmmc_cmd: sdmmc-cmd {
+                               rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdmmc_cd: sdmcc-cd {
+                               rockchip,pins = <6 22 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdmmc_bus1: sdmmc-bus1 {
+                               rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+
+                       sdmmc_bus4: sdmmc-bus4 {
+                               rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up>,
+                                               <6 17 RK_FUNC_1 &pcfg_pull_up>,
+                                               <6 18 RK_FUNC_1 &pcfg_pull_up>,
+                                               <6 19 RK_FUNC_1 &pcfg_pull_up>;
+                       };
+               };
+
+               emmc {
+                       emmc_clk: emmc-clk {
+                               rockchip,pins = <3 18 RK_FUNC_2 &pcfg_pull_none>;
+                       };
+
+                       emmc_cmd: emmc-cmd {
+                               rockchip,pins = <3 16 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+
+                       emmc_pwr: emmc-pwr {
+                               rockchip,pins = <3 9 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+
+                       emmc_bus1: emmc-bus1 {
+                               rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+
+                       emmc_bus4: emmc-bus4 {
+                               rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 1 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 2 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 3 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+
+                       emmc_bus8: emmc-bus8 {
+                               rockchip,pins = <3 0 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 1 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 2 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 3 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 4 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 5 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 6 RK_FUNC_2 &pcfg_pull_up>,
+                                               <3 7 RK_FUNC_2 &pcfg_pull_up>;
+                       };
+               };
+
+               uart0 {
+                       uart0_xfer: uart0-xfer {
+                               rockchip,pins = <4 16 RK_FUNC_1 &pcfg_pull_up>,
+                                               <4 17 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart0_cts: uart0-cts {
+                               rockchip,pins = <4 18 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart0_rts: uart0-rts {
+                               rockchip,pins = <4 19 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart1 {
+                       uart1_xfer: uart1-xfer {
+                               rockchip,pins = <5 8 RK_FUNC_1 &pcfg_pull_up>,
+                                               <5 9 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart1_cts: uart1-cts {
+                               rockchip,pins = <5 10 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart1_rts: uart1-rts {
+                               rockchip,pins = <5 11 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart2 {
+                       uart2_xfer: uart2-xfer {
+                               rockchip,pins = <7 22 RK_FUNC_1 &pcfg_pull_up>,
+                                               <7 23 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+                       /* no rts / cts for uart2 */
+               };
+
+               uart3 {
+                       uart3_xfer: uart3-xfer {
+                               rockchip,pins = <7 7 RK_FUNC_1 &pcfg_pull_up>,
+                                               <7 8 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart3_cts: uart3-cts {
+                               rockchip,pins = <7 9 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+
+                       uart3_rts: uart3-rts {
+                               rockchip,pins = <7 10 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
+               uart4 {
+                       uart4_xfer: uart4-xfer {
+                               rockchip,pins = <5 12 3 &pcfg_pull_up>,
+                                               <5 13 3 &pcfg_pull_none>;
+                       };
+
+                       uart4_cts: uart4-cts {
+                               rockchip,pins = <5 14 3 &pcfg_pull_none>;
+                       };
+
+                       uart4_rts: uart4-rts {
+                               rockchip,pins = <5 15 3 &pcfg_pull_none>;
+                       };
+               };
+       };
+};
index 2adf1cc..8caf85d 100644 (file)
 / {
        interrupt-parent = <&gic>;
 
-       soc {
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+       };
+
+       xin24m: oscillator {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               #clock-cells = <0>;
+               clock-output-names = "xin24m";
+       };
+
+       L2: l2-cache-controller@10138000 {
+               compatible = "arm,pl310-cache";
+               reg = <0x10138000 0x1000>;
+               cache-unified;
+               cache-level = <2>;
+       };
+
+       scu@1013c000 {
+               compatible = "arm,cortex-a9-scu";
+               reg = <0x1013c000 0x100>;
+       };
+
+       global_timer: global-timer@1013c200 {
+               compatible = "arm,cortex-a9-global-timer";
+               reg = <0x1013c200 0x20>;
+               interrupts = <GIC_PPI 11 0x304>;
+               clocks = <&cru CORE_PERI>;
+       };
+
+       local_timer: local-timer@1013c600 {
+               compatible = "arm,cortex-a9-twd-timer";
+               reg = <0x1013c600 0x20>;
+               interrupts = <GIC_PPI 13 0x304>;
+               clocks = <&cru CORE_PERI>;
+       };
+
+       gic: interrupt-controller@1013d000 {
+               compatible = "arm,cortex-a9-gic";
+               interrupt-controller;
+               #interrupt-cells = <3>;
+               reg = <0x1013d000 0x1000>,
+                     <0x1013c100 0x0100>;
+       };
+
+       uart0: serial@10124000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x10124000 0x400>;
+               interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clock-names = "baudclk", "apb_pclk";
+               clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
+               status = "disabled";
+       };
+
+       uart1: serial@10126000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x10126000 0x400>;
+               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clock-names = "baudclk", "apb_pclk";
+               clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
+               status = "disabled";
+       };
+
+       mmc0: dwmmc@10214000 {
+               compatible = "rockchip,rk2928-dw-mshc";
+               reg = <0x10214000 0x1000>;
+               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
-               #size-cells = <1>;
-               compatible = "simple-bus";
-               ranges;
-
-               scu@1013c000 {
-                       compatible = "arm,cortex-a9-scu";
-                       reg = <0x1013c000 0x100>;
-               };
-
-               pmu: pmu@20004000 {
-                       compatible = "rockchip,rk3066-pmu", "syscon";
-                       reg = <0x20004000 0x100>;
-               };
-
-               grf: grf@20008000 {
-                       compatible = "syscon";
-                       reg = <0x20008000 0x200>;
-               };
-
-               gic: interrupt-controller@1013d000 {
-                       compatible = "arm,cortex-a9-gic";
-                       interrupt-controller;
-                       #interrupt-cells = <3>;
-                       reg = <0x1013d000 0x1000>,
-                             <0x1013c100 0x0100>;
-               };
-
-               L2: l2-cache-controller@10138000 {
-                       compatible = "arm,pl310-cache";
-                       reg = <0x10138000 0x1000>;
-                       cache-unified;
-                       cache-level = <2>;
-               };
-
-               global-timer@1013c200 {
-                       compatible = "arm,cortex-a9-global-timer";
-                       reg = <0x1013c200 0x20>;
-                       interrupts = <GIC_PPI 11 0x304>;
-                       clocks = <&dummy150m>;
-               };
-
-               local-timer@1013c600 {
-                       compatible = "arm,cortex-a9-twd-timer";
-                       reg = <0x1013c600 0x20>;
-                       interrupts = <GIC_PPI 13 0x304>;
-                       clocks = <&dummy150m>;
-               };
-
-               uart0: serial@10124000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10124000 0x400>;
-                       interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 8>;
-                       status = "disabled";
-               };
-
-               uart1: serial@10126000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x10126000 0x400>;
-                       interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 10>;
-                       status = "disabled";
-               };
-
-               uart2: serial@20064000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20064000 0x400>;
-                       interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 12>;
-                       status = "disabled";
-               };
-
-               uart3: serial@20068000 {
-                       compatible = "snps,dw-apb-uart";
-                       reg = <0x20068000 0x400>;
-                       interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                       reg-shift = <2>;
-                       reg-io-width = <1>;
-                       clocks = <&clk_gates1 14>;
-                       status = "disabled";
-               };
-
-               dwmmc@10214000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10214000 0x1000>;
-                       interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       clocks = <&clk_gates5 10>, <&clk_gates2 11>;
-                       clock-names = "biu", "ciu";
-
-                       status = "disabled";
-               };
-
-               dwmmc@10218000 {
-                       compatible = "rockchip,rk2928-dw-mshc";
-                       reg = <0x10218000 0x1000>;
-                       interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
-                       clocks = <&clk_gates5 11>, <&clk_gates2 13>;
-                       clock-names = "biu", "ciu";
-
-                       status = "disabled";
-               };
+               #size-cells = <0>;
+
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
+               clock-names = "biu", "ciu";
+
+               status = "disabled";
+       };
+
+       mmc1: dwmmc@10218000 {
+               compatible = "rockchip,rk2928-dw-mshc";
+               reg = <0x10218000 0x1000>;
+               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>;
+               clock-names = "biu", "ciu";
+
+               status = "disabled";
+       };
+
+       pmu: pmu@20004000 {
+               compatible = "rockchip,rk3066-pmu", "syscon";
+               reg = <0x20004000 0x100>;
+       };
+
+       grf: grf@20008000 {
+               compatible = "syscon";
+               reg = <0x20008000 0x200>;
+       };
+
+       i2c0: i2c@2002d000 {
+               compatible = "rockchip,rk3066-i2c";
+               reg = <0x2002d000 0x1000>;
+               interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rockchip,grf = <&grf>;
+               rockchip,bus-index = <0>;
+
+               clock-names = "i2c";
+               clocks = <&cru PCLK_I2C0>;
+
+               status = "disabled";
+       };
+
+       i2c1: i2c@2002f000 {
+               compatible = "rockchip,rk3066-i2c";
+               reg = <0x2002f000 0x1000>;
+               interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rockchip,grf = <&grf>;
+
+               clocks = <&cru PCLK_I2C1>;
+               clock-names = "i2c";
+
+               status = "disabled";
+       };
+
+       pwm0: pwm@20030000 {
+               compatible = "rockchip,rk2928-pwm";
+               reg = <0x20030000 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM01>;
+               status = "disabled";
+       };
+
+       pwm1: pwm@20030010 {
+               compatible = "rockchip,rk2928-pwm";
+               reg = <0x20030010 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM01>;
+               status = "disabled";
+       };
+
+       wdt: watchdog@2004c000 {
+               compatible = "snps,dw-wdt";
+               reg = <0x2004c000 0x100>;
+               clocks = <&cru PCLK_WDT>;
+               interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       pwm2: pwm@20050020 {
+               compatible = "rockchip,rk2928-pwm";
+               reg = <0x20050020 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM23>;
+               status = "disabled";
+       };
+
+       pwm3: pwm@20050030 {
+               compatible = "rockchip,rk2928-pwm";
+               reg = <0x20050030 0x10>;
+               #pwm-cells = <2>;
+               clocks = <&cru PCLK_PWM23>;
+               status = "disabled";
+       };
+
+       i2c2: i2c@20056000 {
+               compatible = "rockchip,rk3066-i2c";
+               reg = <0x20056000 0x1000>;
+               interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rockchip,grf = <&grf>;
+
+               clocks = <&cru PCLK_I2C2>;
+               clock-names = "i2c";
+
+               status = "disabled";
+       };
+
+       i2c3: i2c@2005a000 {
+               compatible = "rockchip,rk3066-i2c";
+               reg = <0x2005a000 0x1000>;
+               interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rockchip,grf = <&grf>;
+
+               clocks = <&cru PCLK_I2C3>;
+               clock-names = "i2c";
+
+               status = "disabled";
+       };
+
+       i2c4: i2c@2005e000 {
+               compatible = "rockchip,rk3066-i2c";
+               reg = <0x2005e000 0x1000>;
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               rockchip,grf = <&grf>;
+
+               clocks = <&cru PCLK_I2C4>;
+               clock-names = "i2c";
+
+               status = "disabled";
+       };
+
+       uart2: serial@20064000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x20064000 0x400>;
+               interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clock-names = "baudclk", "apb_pclk";
+               clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
+               status = "disabled";
+       };
+
+       uart3: serial@20068000 {
+               compatible = "snps,dw-apb-uart";
+               reg = <0x20068000 0x400>;
+               interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
+               reg-shift = <2>;
+               reg-io-width = <1>;
+               clock-names = "baudclk", "apb_pclk";
+               clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
+               status = "disabled";
        };
 };
index e0b15a6..45013b8 100644 (file)
                reg = <0x20000000 0x8000000>;
        };
 
-       slow_xtal: slow_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+       clocks {
+               slow_xtal: slow_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       main_xtal: main_xtal {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-frequency = <0>;
-       };
+               main_xtal: main_xtal {
+                       compatible = "fixed-clock";
+                       #clock-cells = <0>;
+                       clock-frequency = <0>;
+               };
 
-       clocks {
                adc_op_clk: adc_op_clk{
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
index b0b1331..f7d8583 100644 (file)
                reg = <0x20000000 0x20000000>;
        };
 
-       slow_xtal {
-               clock-frequency = <32768>;
-       };
+       clocks {
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
 
-       main_xtal {
-               clock-frequency = <12000000>;
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 306eef0..b8c6f20 100644 (file)
@@ -45,6 +45,8 @@
                                wm8904: wm8904@1a {
                                        compatible = "wm8904";
                                        reg = <0x1a>;
+                                       clocks = <&pck0>;
+                                       clock-names = "mclk";
                                };
                        };
 
index a99171c..18662ae 100644 (file)
        model = "KZM-A9-GT";
        compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
 
+       aliases {
+               serial4 = &scifa4;
+       };
+
        cpus {
                cpu@0 {
                        cpu0-supply = <&vdd_dvfs>;
@@ -35,7 +39,7 @@
        };
 
        chosen {
-               bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel earlyprintk=sh-sci.4,115200 rw";
+               bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
        };
 
        memory {
 };
 
 &pfc {
-       pinctrl-0 = <&scifa4_pins>;
-       pinctrl-names = "default";
-
        i2c3_pins: i2c3 {
                renesas,groups = "i2c3_1";
                renesas,function = "i2c3";
        };
 };
 
+&scifa4 {
+       pinctrl-0 = <&scifa4_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+};
+
 &sdhi0 {
        pinctrl-0 = <&sdhi0_pins>;
        pinctrl-names = "default";
index 5ecf552..910b790 100644 (file)
                status = "disabled";
        };
 
+       scifa0: serial@e6c40000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6c40000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa1: serial@e6c50000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6c50000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa2: serial@e6c60000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6c60000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa3: serial@e6c70000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6c70000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa4: serial@e6c80000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6c80000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa5: serial@e6cb0000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6cb0000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa6: serial@e6cc0000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6cc0000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifa7: serial@e6cd0000 {
+               compatible = "renesas,scifa-sh73a0", "renesas,scifa";
+               reg = <0xe6cd0000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       scifb8: serial@e6c30000 {
+               compatible = "renesas,scifb-sh73a0", "renesas,scifb";
+               reg = <0xe6c30000 0x100>;
+               interrupt-parent = <&gic>;
+               interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
        pfc: pfc@e6050000 {
                compatible = "renesas,pfc-sh73a0";
                reg = <0xe6050000 0x8000>,
index 4676f25..0a66d8a 100644 (file)
                };
 
                rst: rstmgr@ffd05000 {
+                       #reset-cells = <1>;
                        compatible = "altr,rst-mgr";
                        reg = <0xffd05000 0x1000>;
                };
index e41eedc..9d23230 100644 (file)
                        reg = <0x80119000 0x1000>;
                        interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
 
+                       dmas = <&dma 41 0 0x2>, /* Logical - DevToMem */
+                              <&dma 41 0 0x0>; /* Logical - MemToDev */
+                       dma-names = "rx", "tx";
+
                        clocks = <&prcc_kclk 2 5>, <&prcc_pclk 2 7>;
                        clock-names = "sdi", "apb_pclk";
 
                        reg = <0x80008000 0x1000>;
                        interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
 
+                       dmas = <&dma 43 0 0x2>, /* Logical - DevToMem */
+                              <&dma 43 0 0x0>; /* Logical - MemToDev */
+                       dma-names = "rx", "tx";
+
                        clocks = <&prcc_kclk 3 7>, <&prcc_pclk 3 7>;
                        clock-names = "sdi", "apb_pclk";
 
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
 
+                       /* This DMA channel only exist on DB8500 v1 */
                        dmas = <&dma 30 0 0x10>; /* Logical - MemToDev - HighPrio */
                        dma-names = "tx";
 
                        interrupts = <0 62 IRQ_TYPE_LEVEL_HIGH>;
                        v-ape-supply = <&db8500_vape_reg>;
 
+                       /* This DMA channel only exist on DB8500 v2 */
                        dmas = <&dma 30 0 0x12>; /* Logical - DevToMem - HighPrio */
                        dma-names = "rx";
 
index 1c35744..84d7c5d 100644 (file)
@@ -42,6 +42,8 @@
                                interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
                                interrupt-parent = <&gpio6>;
                                interrupt-controller;
+                               vcc-supply = <&db8500_vsmps2_reg>;
+                               vio-supply = <&db8500_vsmps2_reg>;
 
                                wakeup-source;
                                st,autosleep-timeout = <1024>;
index c405653..18b65d1 100644 (file)
                                };
                        };
                };
+               /* Sensors mounted on this board variant */
+               i2c@80128000 {
+                       lsm303dlh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lsm303dlh-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_tvk_mode>;
+                       };
+                       lsm303dlm@1e {
+                               /* Magnetometer */
+                               compatible = "st,lsm303dlm-magn";
+                               reg = <0x1e>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&magneto_tvk_mode>;
+                       };
+                       l3g4200d@68 {
+                               /* Gyroscope */
+                               compatible = "st,l3g4200d-gyro";
+                               st,drdy-int-pin = <2>;
+                               reg = <0x68>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       lsp001wm@5c {
+                               /* Barometer/pressure sensor */
+                               compatible = "st,lps001wp-press";
+                               reg = <0x5c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+               };
                pinctrl {
                        /* Pull up this GPIO pin */
                        tc35893 {
                                        };
                                };
                        };
+                       accelerometer {
+                               accel_tvk_mode: accel_tvk {
+                                       /* Accelerometer interrupt lines 1 & 2 */
+                                       tvk_cfg {
+                                               ste,pins = "GPIO82_C1", "GPIO83_D3";
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                               };
+                       };
+                       magnetometer {
+                               magneto_tvk_mode: magneto_tvk {
+                                       /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
+                                       tvk_cfg1 {
+                                               ste,pins = "GPIO31_V3";
+                                               ste,config = <&gpio_in_pu>;
+                                       };
+                                       tvk_cfg2 {
+                                               ste,pins = "GPIO32_V2";
+                                               ste,config = <&gpio_in_pd>;
+                                       };
+                               };
+                       };
                };
        };
 };
index c234106..bcc1f0c 100644 (file)
@@ -35,8 +35,6 @@
                         */
                        pinctrl-names = "default";
                        pinctrl-0 = <&ipgpio_hrefv60_mode>,
-                                 <&accel_hrefv60_mode>,
-                                 <&magneto_hrefv60_mode>,
                                  <&etm_hrefv60_mode>,
                                  <&nahj_hrefv60_mode>,
                                  <&nfc_hrefv60_mode>,
                                        };
                                };
                        };
-                       accelerometer {
-                               accel_hrefv60_mode: accel_hrefv60 {
-                                       /* Accelerometer interrupt lines 1 & 2 */
-                                       hrefv60_cfg1 {
-                                               ste,pins = "GPIO82_C1", "GPIO83_D3";
-                                               ste,config = <&gpio_in_pu>;
-                                       };
-                               };
-                       };
-                       magnetometer {
-                               magneto_hrefv60_mode: magneto_hrefv60 {
-                                       /* Magnetometer uses GPIO 31 and 32, pull these up/down respectively */
-                                       hrefv60_cfg1 {
-                                               ste,pins = "GPIO31_V3";
-                                               ste,config = <&gpio_in_pu>;
-                                       };
-                                       hrefv60_cfg2 {
-                                               ste,pins = "GPIO32_V2";
-                                               ste,config = <&gpio_in_pd>;
-                                       };
-                               };
-                       };
                        etm {
                                /*
                                 * Drive D19-D23 for the ETM PTM trace interface low,
index 474ef83..4a2000c 100644 (file)
                        pinctrl-names = "default","sleep";
                        pinctrl-0 = <&i2c2_default_mode>;
                        pinctrl-1 = <&i2c2_sleep_mode>;
+                       lsm303dlh@18 {
+                               /* Accelerometer */
+                               compatible = "st,lsm303dlh-accel";
+                               st,drdy-int-pin = <1>;
+                               reg = <0x18>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&accel_snowball_mode>;
+                       };
+                       lsm303dlm@1e {
+                               /* Magnetometer */
+                               compatible = "st,lsm303dlm-magn";
+                               reg = <0x1e>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                               pinctrl-names = "default";
+                               pinctrl-0 = <&magneto_snowball_mode>;
+                       };
+                       l3g4200d@68 {
+                               /* Gyroscope */
+                               compatible = "st,l3g4200d-gyro";
+                               st,drdy-int-pin = <2>;
+                               reg = <0x68>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
+                       lsp001wm@5c {
+                               /* Barometer/pressure sensor */
+                               compatible = "st,lps001wp-press";
+                               reg = <0x5c>;
+                               vdd-supply = <&ab8500_ldo_aux1_reg>;
+                               vddio-supply = <&db8500_vsmps2_reg>;
+                       };
                };
 
                i2c@80110000 {
                         * can be moved over to being controlled by respective device.
                         */
                        pinctrl-names = "default";
-                       pinctrl-0 = <&accel_snowball_mode>,
-                                 <&magneto_snowball_mode>,
-                                 <&gbf_snowball_mode>,
+                       pinctrl-0 = <&gbf_snowball_mode>,
                                  <&wlan_snowball_mode>;
 
                        ethernet {
index 0b97c07..9e99ade 100644 (file)
                        };
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
        };
 
diff --git a/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts b/arch/arm/boot/dts/sun4i-a10-ba10-tvbox.dts
new file mode 100644 (file)
index 0000000..1763cc7
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2014 Hans de Goede <hdegoede@redhat.com>
+ *
+ * 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/ "sun4i-a10.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+       model = "BA10 tvbox";
+       compatible = "allwinner,ba10-tvbox", "allwinner,sun4i-a10";
+
+       soc@01c00000 {
+               emac: ethernet@01c0b000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&emac_pins_a>;
+                       phy = <&phy1>;
+                       status = "okay";
+               };
+
+               mdio@01c0b080 {
+                       status = "okay";
+
+                       phy1: ethernet-phy@1 {
+                               reg = <1>;
+                       };
+               };
+
+               mmc0: mmc@01c0f000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+                       vmmc-supply = <&reg_vcc3v3>;
+                       bus-width = <4>;
+                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-inverted;
+                       status = "okay";
+               };
+
+               usbphy: phy@01c13400 {
+                       usb1_vbus-supply = <&reg_usb1_vbus>;
+                       usb2_vbus-supply = <&reg_usb2_vbus>;
+                       status = "okay";
+               };
+
+               ehci0: usb@01c14000 {
+                       status = "okay";
+               };
+
+               ohci0: usb@01c14400 {
+                       status = "okay";
+               };
+
+               ehci1: usb@01c1c000 {
+                       status = "okay";
+               };
+
+               ohci1: usb@01c1c400 {
+                       status = "okay";
+               };
+
+               pinctrl@01c20800 {
+                       usb2_vbus_pin_a: usb2_vbus_pin@0 {
+                               allwinner,pins = "PH12";
+                       };
+               };
+
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
+               uart0: serial@01c28000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&uart0_pins_a>;
+                       status = "okay";
+               };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
+       };
+
+       reg_usb1_vbus: usb1-vbus {
+               status = "okay";
+       };
+
+       reg_usb2_vbus: usb2-vbus {
+               gpio = <&pio 7 12 0>;
+               status = "okay";
+       };
+};
index c200eac..3ce56bf 100644 (file)
                        };
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
 
                i2c1: i2c@01c2b000 {
index 547fadc..891ea44 100644 (file)
                        };
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        status = "okay";
                };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
        };
 
        reg_emac_3v3: emac-3v3 {
index f13723e..6b0c378 100644 (file)
                        status = "okay";
                };
 
-               i2c0: i2c@01c2ac00 {
-                       pinctrl-names = "default";
-                       pinctrl-0 = <&i2c0_pins_a>;
-                       status = "okay";
-               };
-
                usbphy: phy@01c13400 {
                        usb1_vbus-supply = <&reg_usb1_vbus>;
                        usb2_vbus-supply = <&reg_usb2_vbus>;
                ohci1: usb@01c1c400 {
                        status = "okay";
                };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
        };
 
        reg_usb1_vbus: usb1-vbus {
index c01cea5..b9ecce6 100644 (file)
                        status = "okay";
                };
 
+               pinctrl@01c20800 {
+                       ir0_pins_a: ir0@0 {
+                               /* The ir receiver is not always populated */
+                               allwinner,pull = <1>;
+                       };
+               };
+
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        status = "okay";
                };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
        };
 
        reg_usb1_vbus: usb1-vbus {
index d46a7db..d046d56 100644 (file)
                        pinctrl-0 = <&uart0_pins_a>;
                        status = "okay";
                };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
        };
 
        leds {
index fb03bcc..6675bcd 100644 (file)
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupts = <0>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
        };
 
index d96e179..459cb63 100644 (file)
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
                                allwinner,drive = <0>;
                                allwinner,pull = <1>;
                        };
+
+                       ir0_pins_a: ir0@0 {
+                               allwinner,pins = "PB3","PB4";
+                               allwinner,function = "ir0";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+
+                       ir1_pins_a: ir1@0 {
+                               allwinner,pins = "PB22","PB23";
+                               allwinner,function = "ir1";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
                };
 
                timer@01c20c00 {
                        status = "disabled";
                };
 
+               ir0: ir@01c21800 {
+                       compatible = "allwinner,sun4i-a10-ir";
+                       clocks = <&apb0_gates 6>, <&ir0_clk>;
+                       clock-names = "apb", "ir";
+                       interrupts = <5>;
+                       reg = <0x01c21800 0x40>;
+                       status = "disabled";
+               };
+
+               ir1: ir@01c21c00 {
+                       compatible = "allwinner,sun4i-a10-ir";
+                       clocks = <&apb0_gates 7>, <&ir1_clk>;
+                       clock-names = "apb", "ir";
+                       interrupts = <6>;
+                       reg = <0x01c21c00 0x40>;
+                       status = "disabled";
+               };
+
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun4i-a10-sid";
                        reg = <0x01c23800 0x10>;
index b64f705..24b0ad3 100644 (file)
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
index 3b2a94c..bf86e65 100644 (file)
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
new file mode 100644 (file)
index 0000000..f142065
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2014 Maxime Ripard
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * 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/ "sun6i-a31.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+
+/ {
+       model = "Merrii A31 Hummingbird";
+       compatible = "merrii,a31-hummingbird", "allwinner,sun6i-a31";
+
+       chosen {
+               bootargs = "earlyprintk console=ttyS0,115200";
+       };
+
+       soc@01c00000 {
+               mmc0: mmc@01c0f000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_hummingbird>;
+                       vmmc-supply = <&reg_vcc3v0>;
+                       bus-width = <4>;
+                       cd-gpios = <&pio 0 8 0>; /* PA8 */
+                       cd-inverted;
+                       status = "okay";
+               };
+
+               usbphy: phy@01c19400 {
+                       usb1_vbus-supply = <&reg_usb1_vbus>;
+                       status = "okay";
+               };
+
+               ehci0: usb@01c1a000 {
+                       status = "okay";
+               };
+
+               ohci0: usb@01c1a400 {
+                       status = "okay";
+               };
+
+               pio: pinctrl@01c20800 {
+                       mmc0_pins_a: mmc0@0 {
+                               /* external pull-ups missing for some pins */
+                               allwinner,pull = <1>;
+                       };
+
+                       mmc0_cd_pin_hummingbird: mmc0_cd_pin@0 {
+                               allwinner,pins = "PA8";
+                               allwinner,function = "gpio_in";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <1>;
+                       };
+
+                       usb1_vbus_pin_a: usb1_vbus_pin@0 {
+                               allwinner,pins = "PH24";
+                               allwinner,function = "gpio_out";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+               };
+
+               uart0: serial@01c28000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&uart0_pins_a>;
+                       status = "okay";
+               };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       /* pull-ups and devices require AXP221 DLDO3 */
+                       status = "failed";
+               };
+
+               i2c1: i2c@01c2b000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c1_pins_a>;
+                       status = "okay";
+               };
+
+               i2c2: i2c@01c2b400 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c2_pins_a>;
+                       status = "okay";
+
+                       pcf8563: rtc@51 {
+                               compatible = "nxp,pcf8563";
+                               reg = <0x51>;
+                       };
+               };
+
+               gmac: ethernet@01c30000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&gmac_pins_rgmii_a>;
+                       phy = <&phy1>;
+                       phy-mode = "rgmii";
+                       status = "okay";
+
+                       phy1: ethernet-phy@1 {
+                               reg = <1>;
+                       };
+               };
+       };
+
+       reg_usb1_vbus: usb1-vbus {
+               pinctrl-0 = <&usb1_vbus_pin_a>;
+               gpio = <&pio 7 24 0>; /* PH24 */
+               status = "okay";
+       };
+};
index a9dfa12..44b07e5 100644 (file)
@@ -23,6 +23,7 @@
                serial3 = &uart3;
                serial4 = &uart4;
                serial5 = &uart5;
+               ethernet0 = &gmac;
        };
 
 
                                             "usb_ohci0", "usb_ohci1",
                                             "usb_ohci2";
                };
+
+               /*
+                * The following two are dummy clocks, placeholders used in the gmac_tx
+                * clock. The gmac driver will choose one parent depending on the PHY
+                * interface mode, using clk_set_rate auto-reparenting.
+                * The actual TX clock rate is not controlled by the gmac_tx clock.
+                */
+               mii_phy_tx_clk: clk@1 {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <25000000>;
+                       clock-output-names = "mii_phy_tx";
+               };
+
+               gmac_int_tx_clk: clk@2 {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <125000000>;
+                       clock-output-names = "gmac_int_tx";
+               };
+
+               gmac_tx_clk: clk@01c200d0 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun7i-a20-gmac-clk";
+                       reg = <0x01c200d0 0x4>;
+                       clocks = <&mii_phy_tx_clk>, <&gmac_int_tx_clk>;
+                       clock-output-names = "gmac_tx";
+               };
        };
 
        soc@01c00000 {
                        clocks = <&apb1_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
                                allwinner,drive = <2>;
                                allwinner,pull = <0>;
                        };
+
+                       gmac_pins_mii_a: gmac_mii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA8", "PA9", "PA11",
+                                               "PA12", "PA13", "PA14", "PA19",
+                                               "PA20", "PA21", "PA22", "PA23",
+                                               "PA24", "PA26", "PA27";
+                               allwinner,function = "gmac";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+
+                       gmac_pins_gmii_a: gmac_gmii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA4", "PA5", "PA6", "PA7",
+                                               "PA8", "PA9", "PA10", "PA11",
+                                               "PA12", "PA13", "PA14", "PA15",
+                                               "PA16", "PA17", "PA18", "PA19",
+                                               "PA20", "PA21", "PA22", "PA23",
+                                               "PA24", "PA25", "PA26", "PA27";
+                               allwinner,function = "gmac";
+                               /*
+                                * data lines in GMII mode run at 125MHz and
+                                * might need a higher signal drive strength
+                                */
+                               allwinner,drive = <2>;
+                               allwinner,pull = <0>;
+                       };
+
+                       gmac_pins_rgmii_a: gmac_rgmii@0 {
+                               allwinner,pins = "PA0", "PA1", "PA2", "PA3",
+                                               "PA9", "PA10", "PA11",
+                                               "PA12", "PA13", "PA14", "PA19",
+                                               "PA20", "PA25", "PA26", "PA27";
+                               allwinner,function = "gmac";
+                               /*
+                                * data lines in RGMII mode use DDR mode
+                                * and need a higher signal drive strength
+                                */
+                               allwinner,drive = <3>;
+                               allwinner,pull = <0>;
+                       };
                };
 
                ahb1_rst: reset@01c202c0 {
                        status = "disabled";
                };
 
+               gmac: ethernet@01c30000 {
+                       compatible = "allwinner,sun7i-a20-gmac";
+                       reg = <0x01c30000 0x1054>;
+                       interrupts = <0 82 4>;
+                       interrupt-names = "macirq";
+                       clocks = <&ahb1_gates 17>, <&gmac_tx_clk>;
+                       clock-names = "stmmaceth", "allwinner_gmac_tx";
+                       resets = <&ahb1_rst 17>;
+                       reset-names = "stmmaceth";
+                       snps,pbl = <2>;
+                       snps,fixed-burst;
+                       snps,force_sf_dma_mode;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                timer@01c60000 {
                        compatible = "allwinner,sun6i-a31-hstimer", "allwinner,sun7i-a20-hstimer";
                        reg = <0x01c60000 0x1000>;
                        resets = <&apb0_rst 0>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
                };
index a5ad945..5368098 100644 (file)
                        };
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupt-parent = <&nmi_intc>;
+                               interrupts = <0 8>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
 
                i2c1: i2c@01c2b000 {
index b87fea9..a6c1a3c 100644 (file)
                        status = "okay";
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupt-parent = <&nmi_intc>;
+                               interrupts = <0 8>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
 
                i2c1: i2c@01c2b000 {
index b77308e..6a67712 100644 (file)
                        };
                };
 
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
                        status = "okay";
                };
 
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupt-parent = <&nmi_intc>;
+                               interrupts = <0 8>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
+
                gmac: ethernet@01c50000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&gmac_pins_mii_a>;
index b759630..9d669cd 100644 (file)
                        pinctrl-names = "default";
                        pinctrl-0 = <&i2c0_pins_a>;
                        status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupt-parent = <&nmi_intc>;
+                               interrupts = <0 8>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
                };
 
                i2c1: i2c@01c2b000 {
diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3.dts
new file mode 100644 (file)
index 0000000..046dfc0
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2014 Zoltan HERPAI
+ * Zoltan HERPAI <wigyori@uid0.hu>
+ *
+ * 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/ "sun7i-a20.dtsi"
+/include/ "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       model = "LinkSprite pcDuino3";
+       compatible = "linksprite,pcduino3", "allwinner,sun7i-a20";
+
+       soc@01c00000 {
+               mmc0: mmc@01c0f000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
+                       vmmc-supply = <&reg_vcc3v3>;
+                       bus-width = <4>;
+                       cd-gpios = <&pio 7 1 0>; /* PH1 */
+                       cd-inverted;
+                       status = "okay";
+               };
+
+               usbphy: phy@01c13400 {
+                       usb1_vbus-supply = <&reg_usb1_vbus>;
+                       usb2_vbus-supply = <&reg_usb2_vbus>;
+                       status = "okay";
+               };
+
+               ehci0: usb@01c14000 {
+                       status = "okay";
+               };
+
+               ohci0: usb@01c14400 {
+                       status = "okay";
+               };
+
+               ahci: sata@01c18000 {
+                       target-supply = <&reg_ahci_5v>;
+                       status = "okay";
+               };
+
+               ehci1: usb@01c1c000 {
+                       status = "okay";
+               };
+
+               ohci1: usb@01c1c400 {
+                       status = "okay";
+               };
+
+               pinctrl@01c20800 {
+                       ahci_pwr_pin_a: ahci_pwr_pin@0 {
+                               allwinner,pins = "PH2";
+                       };
+
+                       led_pins_pcduino3: led_pins@0 {
+                               allwinner,pins = "PH15", "PH16";
+                               allwinner,function = "gpio_out";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+
+                       key_pins_pcduino3: key_pins@0 {
+                               allwinner,pins = "PH17", "PH18", "PH19";
+                               allwinner,function = "gpio_in";
+                               allwinner,drive = <0>;
+                               allwinner,pull = <0>;
+                       };
+               };
+
+               ir0: ir@01c21800 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&ir0_pins_a>;
+                       status = "okay";
+               };
+
+               uart0: serial@01c28000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&uart0_pins_a>;
+                       status = "okay";
+               };
+
+               i2c0: i2c@01c2ac00 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&i2c0_pins_a>;
+                       status = "okay";
+
+                       axp209: pmic@34 {
+                               compatible = "x-powers,axp209";
+                               reg = <0x34>;
+                               interrupt-parent = <&nmi_intc>;
+                               interrupts = <0 8>;
+
+                               interrupt-controller;
+                               #interrupt-cells = <1>;
+                       };
+               };
+
+               gmac: ethernet@01c50000 {
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&gmac_pins_mii_a>;
+                       phy = <&phy1>;
+                       phy-mode = "mii";
+                       status = "okay";
+
+                       phy1: ethernet-phy@1 {
+                               reg = <1>;
+                       };
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&led_pins_pcduino3>;
+
+               tx {
+                       label = "pcduino3:green:tx";
+                       gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
+               };
+
+               rx {
+                       label = "pcduino3:green:rx";
+                       gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&key_pins_pcduino3>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               button@0 {
+                       label = "Key Back";
+                       linux,code = <KEY_BACK>;
+                       gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
+               };
+               button@1 {
+                       label = "Key Home";
+                       linux,code = <KEY_HOME>;
+                       gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
+               };
+               button@2 {
+                       label = "Key Menu";
+                       linux,code = <KEY_MENU>;
+                       gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
+               };
+       };
+
+       reg_usb1_vbus: usb1-vbus {
+               status = "okay";
+       };
+
+       reg_usb2_vbus: usb2-vbus {
+               status = "okay";
+       };
+
+       reg_ahci_5v: ahci-5v {
+               gpio = <&pio 7 2 0>;
+               status = "okay";
+       };
+};
index 01e9466..4011628 100644 (file)
                        clocks = <&apb0_gates 5>;
                        gpio-controller;
                        interrupt-controller;
-                       #address-cells = <1>;
+                       #interrupt-cells = <2>;
                        #size-cells = <0>;
                        #gpio-cells = <3>;
 
                                allwinner,drive = <2>;
                                allwinner,pull = <0>;
                        };
+
+                       ir0_pins_a: ir0@0 {
+                                   allwinner,pins = "PB3","PB4";
+                                   allwinner,function = "ir0";
+                                   allwinner,drive = <0>;
+                                   allwinner,pull = <0>;
+                       };
+
+                       ir1_pins_a: ir1@0 {
+                                   allwinner,pins = "PB22","PB23";
+                                   allwinner,function = "ir1";
+                                   allwinner,drive = <0>;
+                                   allwinner,pull = <0>;
+                       };
                };
 
                timer@01c20c00 {
                        status = "disabled";
                };
 
+               ir0: ir@01c21800 {
+                       compatible = "allwinner,sun4i-a10-ir";
+                       clocks = <&apb0_gates 6>, <&ir0_clk>;
+                       clock-names = "apb", "ir";
+                       interrupts = <0 5 4>;
+                       reg = <0x01c21800 0x40>;
+                       status = "disabled";
+               };
+
+               ir1: ir@01c21c00 {
+                       compatible = "allwinner,sun4i-a10-ir";
+                       clocks = <&apb0_gates 7>, <&ir1_clk>;
+                       clock-names = "apb", "ir";
+                       interrupts = <0 6 4>;
+                       reg = <0x01c21c00 0x40>;
+                       status = "disabled";
+               };
+
                sid: eeprom@01c23800 {
                        compatible = "allwinner,sun7i-a20-sid";
                        reg = <0x01c23800 0x200>;
diff --git a/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts b/arch/arm/boot/dts/sun8i-a23-ippo-q8h-v5.dts
new file mode 100644 (file)
index 0000000..34002e3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2014 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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/ "sun8i-a23.dtsi"
+
+/ {
+       model = "Ippo Q8H Dual Core Tablet (v5)";
+       compatible = "ippo,q8h-v5", "allwinner,sun8i-a23";
+
+       chosen {
+               bootargs = "earlyprintk console=ttyS0,115200";
+       };
+
+       soc@01c00000 {
+               r_uart: serial@01f02800 {
+                       status = "okay";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/sun8i-a23.dtsi b/arch/arm/boot/dts/sun8i-a23.dtsi
new file mode 100644 (file)
index 0000000..54ac078
--- /dev/null
@@ -0,0 +1,343 @@
+/*
+ * Copyright 2014 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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/ "skeleton.dtsi"
+
+/ {
+       interrupt-parent = <&gic>;
+
+       aliases {
+               serial0 = &uart0;
+               serial1 = &uart1;
+               serial2 = &uart2;
+               serial3 = &uart3;
+               serial4 = &uart4;
+               serial5 = &r_uart;
+       };
+
+       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>;
+               };
+       };
+
+       memory {
+               reg = <0x40000000 0x40000000>;
+       };
+
+       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 */
+               pll6: pll6_clk {
+                       #clock-cells = <0>;
+                       compatible = "fixed-clock";
+                       clock-frequency = <600000000>;
+                       clock-output-names = "pll6";
+               };
+
+               cpu: cpu_clk@01c20050 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-cpu-clk";
+                       reg = <0x01c20050 0x4>;
+
+                       /*
+                        * PLL1 is listed twice here.
+                        * While it looks suspicious, it's actually documented
+                        * that way both in the datasheet and in the code from
+                        * Allwinner.
+                        */
+                       clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
+                       clock-output-names = "cpu";
+               };
+
+               axi: axi_clk@01c20050 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun8i-a23-axi-clk";
+                       reg = <0x01c20050 0x4>;
+                       clocks = <&cpu>;
+                       clock-output-names = "axi";
+               };
+
+               ahb1_mux: ahb1_mux_clk@01c20054 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun6i-a31-ahb1-mux-clk";
+                       reg = <0x01c20054 0x4>;
+                       clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
+                       clock-output-names = "ahb1_mux";
+               };
+
+               ahb1: ahb1_clk@01c20054 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-ahb-clk";
+                       reg = <0x01c20054 0x4>;
+                       clocks = <&ahb1_mux>;
+                       clock-output-names = "ahb1";
+               };
+
+               apb1: apb1_clk@01c20054 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-apb0-clk";
+                       reg = <0x01c20054 0x4>;
+                       clocks = <&ahb1>;
+                       clock-output-names = "apb1";
+               };
+
+               ahb1_gates: clk@01c20060 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
+                       reg = <0x01c20060 0x8>;
+                       clocks = <&ahb1>;
+                       clock-output-names = "ahb1_mipidsi", "ahb1_dma",
+                                       "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
+                                       "ahb1_nand", "ahb1_sdram",
+                                       "ahb1_hstimer", "ahb1_spi0",
+                                       "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
+                                       "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
+                                       "ahb1_csi", "ahb1_be",  "ahb1_fe",
+                                       "ahb1_gpu", "ahb1_spinlock",
+                                       "ahb1_drc";
+               };
+
+               apb1_gates: clk@01c20068 {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-a23-apb1-gates-clk";
+                       reg = <0x01c20068 0x4>;
+                       clocks = <&apb1>;
+                       clock-output-names = "apb1_codec", "apb1_pio",
+                                       "apb1_daudio0", "apb1_daudio1";
+               };
+
+               apb2_mux: apb2_mux_clk@01c20058 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun4i-a10-apb1-mux-clk";
+                       reg = <0x01c20058 0x4>;
+                       clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>;
+                       clock-output-names = "apb2_mux";
+               };
+
+               apb2: apb2_clk@01c20058 {
+                       #clock-cells = <0>;
+                       compatible = "allwinner,sun6i-a31-apb2-div-clk";
+                       reg = <0x01c20058 0x4>;
+                       clocks = <&apb2_mux>;
+                       clock-output-names = "apb2";
+               };
+
+               apb2_gates: clk@01c2006c {
+                       #clock-cells = <1>;
+                       compatible = "allwinner,sun8i-a23-apb2-gates-clk";
+                       reg = <0x01c2006c 0x4>;
+                       clocks = <&apb2>;
+                       clock-output-names = "apb2_i2c0", "apb2_i2c1",
+                                       "apb2_i2c2", "apb2_uart0",
+                                       "apb2_uart1", "apb2_uart2",
+                                       "apb2_uart3", "apb2_uart4";
+               };
+       };
+
+       soc@01c00000 {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               ahb1_rst: reset@01c202c0 {
+                       #reset-cells = <1>;
+                       compatible = "allwinner,sun6i-a31-clock-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 = <0 18 4>,
+                                    <0 19 4>;
+                       clocks = <&osc24M>;
+               };
+
+               wdt0: watchdog@01c20ca0 {
+                       compatible = "allwinner,sun6i-a31-wdt";
+                       reg = <0x01c20ca0 0x20>;
+                       interrupts = <0 25 4>;
+               };
+
+               uart0: serial@01c28000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28000 0x400>;
+                       interrupts = <0 0 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb2_gates 16>;
+                       resets = <&apb2_rst 16>;
+                       status = "disabled";
+               };
+
+               uart1: serial@01c28400 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28400 0x400>;
+                       interrupts = <0 1 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb2_gates 17>;
+                       resets = <&apb2_rst 17>;
+                       status = "disabled";
+               };
+
+               uart2: serial@01c28800 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28800 0x400>;
+                       interrupts = <0 2 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb2_gates 18>;
+                       resets = <&apb2_rst 18>;
+                       status = "disabled";
+               };
+
+               uart3: serial@01c28c00 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c28c00 0x400>;
+                       interrupts = <0 3 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb2_gates 19>;
+                       resets = <&apb2_rst 19>;
+                       status = "disabled";
+               };
+
+               uart4: serial@01c29000 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01c29000 0x400>;
+                       interrupts = <0 4 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb2_gates 20>;
+                       resets = <&apb2_rst 20>;
+                       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 = <1 9 0xf04>;
+               };
+
+               prcm@01f01400 {
+                       compatible = "allwinner,sun8i-a23-prcm";
+                       reg = <0x01f01400 0x200>;
+
+                       ar100: ar100_clk {
+                               compatible = "fixed-factor-clock";
+                               #clock-cells = <0>;
+                               clock-div = <1>;
+                               clock-mult = <1>;
+                               clocks = <&osc24M>;
+                               clock-output-names = "ar100";
+                       };
+
+                       ahb0: ahb0_clk {
+                               compatible = "fixed-factor-clock";
+                               #clock-cells = <0>;
+                               clock-div = <1>;
+                               clock-mult = <1>;
+                               clocks = <&ar100>;
+                               clock-output-names = "ahb0";
+                       };
+
+                       apb0: apb0_clk {
+                               compatible = "allwinner,sun8i-a23-apb0-clk";
+                               #clock-cells = <0>;
+                               clocks = <&ahb0>;
+                               clock-output-names = "apb0";
+                       };
+
+                       apb0_gates: apb0_gates_clk {
+                               compatible = "allwinner,sun8i-a23-apb0-gates-clk";
+                               #clock-cells = <1>;
+                               clocks = <&apb0>;
+                               clock-output-names = "apb0_pio", "apb0_timer",
+                                               "apb0_rsb", "apb0_uart",
+                                               "apb0_i2c";
+                       };
+
+                       apb0_rst: apb0_rst {
+                               compatible = "allwinner,sun6i-a31-clock-reset";
+                               #reset-cells = <1>;
+                       };
+               };
+
+               r_uart: serial@01f02800 {
+                       compatible = "snps,dw-apb-uart";
+                       reg = <0x01f02800 0x400>;
+                       interrupts = <0 38 4>;
+                       reg-shift = <2>;
+                       reg-io-width = <4>;
+                       clocks = <&apb0_gates 4>;
+                       resets = <&apb0_rst 4>;
+                       status = "disabled";
+               };
+       };
+};
index 0b0e8e0..c7c6825 100644 (file)
                reg = <0x80000000 0x79600000>;
        };
 
+       host1x@50000000 {
+               dsi@54300000 {
+                       status = "okay";
+
+                       vdd-supply = <&vdd_1v2_ap>;
+
+                       panel@0 {
+                               compatible = "lg,lh500wx1-sd03";
+                               reg = <0>;
+
+                               power-supply = <&vdd_lcd>;
+                               backlight = <&backlight>;
+                       };
+               };
+       };
+
        pinmux@70000868 {
                pinctrl-names = "default";
                pinctrl-0 = <&state_default>;
                                nvidia,function = "sdmmc1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                        sdmmc1_cmd_pz1 {
                                nvidia,pins = "sdmmc1_cmd_pz1",
                                nvidia,function = "sdmmc3";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                        sdmmc3_cmd_pa7 {
                                nvidia,pins = "sdmmc3_cmd_pa7",
                                nvidia,function = "sdmmc4";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
-                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                        };
                        sdmmc4_cmd_pt7 {
                                nvidia,pins = "sdmmc4_cmd_pt7",
                                nvidia,pins = "drive_sdio1";
                                nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
                                nvidia,schmitt = <TEGRA_PIN_DISABLE>;
-                               nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
                                nvidia,pull-down-strength = <36>;
                                nvidia,pull-up-strength = <20>;
                                nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOW>;
                                nvidia,pins = "drive_sdio3";
                                nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
                                nvidia,schmitt = <TEGRA_PIN_DISABLE>;
-                               nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
                                nvidia,pull-down-strength = <36>;
                                nvidia,pull-up-strength = <20>;
                                nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
                                nvidia,pins = "drive_gma";
                                nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
                                nvidia,schmitt = <TEGRA_PIN_DISABLE>;
-                               nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
                                nvidia,pull-down-strength = <2>;
                                nvidia,pull-up-strength = <2>;
                                nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
                                nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
-                               nvidia,drive-type = <1>;
                        };
                };
        };
                                                regulator-name = "vdd-1v8";
                                                regulator-min-microvolt = <1800000>;
                                                regulator-max-microvolt = <1800000>;
-                                               regulator-always-on;
                                                regulator-boot-on;
                                        };
 
                                                regulator-name = "vdd-2v8-display";
                                                regulator-min-microvolt = <2800000>;
                                                regulator-max-microvolt = <2800000>;
+                                               regulator-always-on;
                                                regulator-boot-on;
                                        };
 
-                                       ldo3 {
+                                       vdd_1v2_ap: ldo3 {
                                                regulator-name = "avdd-1v2";
                                                regulator-min-microvolt = <1200000>;
                                                regulator-max-microvolt = <1200000>;
                        regulator-boot-on;
                };
 
-               regulator@1 {
+               vdd_lcd: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "vdd_lcd_1v8";
index fdc559a..335a1d8 100644 (file)
                interrupt-controller;
        };
 
+       apbmisc@70000800 {
+               compatible = "nvidia,tegra114-apbmisc", "nvidia,tegra20-apbmisc";
+               reg = <0x70000800 0x64   /* Chip revision */
+                      0x70000008 0x04>; /* Strapping options */
+       };
+
        pinmux: pinmux@70000868 {
                compatible = "nvidia,tegra114-pinmux";
                reg = <0x70000868 0x148         /* Pad control registers */
                clock-names = "pclk", "clk32k_in";
        };
 
+       fuse@7000f800 {
+               compatible = "nvidia,tegra114-efuse";
+               reg = <0x7000f800 0x400>;
+               clocks = <&tegra_car TEGRA114_CLK_FUSE>;
+               clock-names = "fuse";
+               resets = <&tegra_car 39>;
+               reset-names = "fuse";
+       };
+
        iommu@70019010 {
                compatible = "nvidia,tegra114-smmu", "nvidia,tegra30-smmu";
                reg = <0x70019010 0x02c
index e31fb61..624b0fb 100644 (file)
                                        regulator-max-microamp = <3500000>;
                                        regulator-always-on;
                                        regulator-boot-on;
-                                       ams,external-control = <2>;
+                                       ams,ext-control = <2>;
                                };
 
                                sd1 {
                                        regulator-max-microamp = <2500000>;
                                        regulator-always-on;
                                        regulator-boot-on;
-                                       ams,external-control = <1>;
+                                       ams,ext-control = <1>;
                                };
 
                                vdd_1v35_lp0: sd2 {
                                        regulator-max-microvolt = <1050000>;
                                        regulator-boot-on;
                                        regulator-always-on;
-                                       ams,external-control = <1>;
+                                       ams,ext-control = <1>;
                                };
 
                                ldo1 {
                nvidia,sys-clock-req-active-high;
        };
 
+       padctl@0,7009f000 {
+               pinctrl-0 = <&padctl_default>;
+               pinctrl-names = "default";
+
+               padctl_default: pinmux {
+                       usb3 {
+                               nvidia,lanes = "pcie-0", "pcie-1";
+                               nvidia,function = "usb3";
+                               nvidia,iddq = <0>;
+                       };
+
+                       pcie {
+                               nvidia,lanes = "pcie-2", "pcie-3",
+                                              "pcie-4";
+                               nvidia,function = "pcie";
+                               nvidia,iddq = <0>;
+                       };
+
+                       sata {
+                               nvidia,lanes = "sata-0";
+                               nvidia,function = "sata";
+                               nvidia,iddq = <0>;
+                       };
+               };
+       };
+
        /* SD card */
        sdhci@0,700b0400 {
                status = "okay";
        sdhci@0,700b0600 {
                status = "okay";
                bus-width = <8>;
+               non-removable;
        };
 
        ahub@0,70300000 {
index f0bb842..70ad91d 100644 (file)
                                        regulator-max-microamp = <3500000>;
                                        regulator-always-on;
                                        regulator-boot-on;
-                                       ams,external-control = <2>;
+                                       ams,ext-control = <2>;
                                };
 
                                sd1 {
                                        regulator-max-microamp = <2500000>;
                                        regulator-always-on;
                                        regulator-boot-on;
-                                       ams,external-control = <1>;
+                                       ams,ext-control = <1>;
                                };
 
                                vdd_1v35_lp0: sd2 {
                                        regulator-max-microvolt = <1050000>;
                                        regulator-boot-on;
                                        regulator-always-on;
-                                       ams,external-control = <1>;
+                                       ams,ext-control = <1>;
                                };
 
                                ldo1 {
        spi@0,7000d400 {
                status = "okay";
 
-               cros-ec@0 {
+               cros_ec: cros-ec@0 {
                        compatible = "google,cros-ec-spi";
                        spi-max-frequency = <4000000>;
                        interrupt-parent = <&gpio>;
 
                        google,cros-ec-spi-msg-delay = <2000>;
 
-                       cros-ec-keyb {
-                               compatible = "google,cros-ec-keyb";
-                               keypad,num-rows = <8>;
-                               keypad,num-columns = <13>;
-                               google,needs-ghost-filter;
-
-                               linux,keymap = <
-                                       MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-                                       MATRIX_KEY(0x00, 0x02, KEY_F1)
-                                       MATRIX_KEY(0x00, 0x03, KEY_B)
-                                       MATRIX_KEY(0x00, 0x04, KEY_F10)
-                                       MATRIX_KEY(0x00, 0x06, KEY_N)
-                                       MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
-                                       MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
-
-                                       MATRIX_KEY(0x01, 0x01, KEY_ESC)
-                                       MATRIX_KEY(0x01, 0x02, KEY_F4)
-                                       MATRIX_KEY(0x01, 0x03, KEY_G)
-                                       MATRIX_KEY(0x01, 0x04, KEY_F7)
-                                       MATRIX_KEY(0x01, 0x06, KEY_H)
-                                       MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
-                                       MATRIX_KEY(0x01, 0x09, KEY_F9)
-                                       MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
-
-                                       MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
-                                       MATRIX_KEY(0x02, 0x01, KEY_TAB)
-                                       MATRIX_KEY(0x02, 0x02, KEY_F3)
-                                       MATRIX_KEY(0x02, 0x03, KEY_T)
-                                       MATRIX_KEY(0x02, 0x04, KEY_F6)
-                                       MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
-                                       MATRIX_KEY(0x02, 0x06, KEY_Y)
-                                       MATRIX_KEY(0x02, 0x07, KEY_102ND)
-                                       MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
-                                       MATRIX_KEY(0x02, 0x09, KEY_F8)
-
-                                       MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
-                                       MATRIX_KEY(0x03, 0x02, KEY_F2)
-                                       MATRIX_KEY(0x03, 0x03, KEY_5)
-                                       MATRIX_KEY(0x03, 0x04, KEY_F5)
-                                       MATRIX_KEY(0x03, 0x06, KEY_6)
-                                       MATRIX_KEY(0x03, 0x08, KEY_MINUS)
-                                       MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
-
-                                       MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
-                                       MATRIX_KEY(0x04, 0x01, KEY_A)
-                                       MATRIX_KEY(0x04, 0x02, KEY_D)
-                                       MATRIX_KEY(0x04, 0x03, KEY_F)
-                                       MATRIX_KEY(0x04, 0x04, KEY_S)
-                                       MATRIX_KEY(0x04, 0x05, KEY_K)
-                                       MATRIX_KEY(0x04, 0x06, KEY_J)
-                                       MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
-                                       MATRIX_KEY(0x04, 0x09, KEY_L)
-                                       MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
-                                       MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
-
-                                       MATRIX_KEY(0x05, 0x01, KEY_Z)
-                                       MATRIX_KEY(0x05, 0x02, KEY_C)
-                                       MATRIX_KEY(0x05, 0x03, KEY_V)
-                                       MATRIX_KEY(0x05, 0x04, KEY_X)
-                                       MATRIX_KEY(0x05, 0x05, KEY_COMMA)
-                                       MATRIX_KEY(0x05, 0x06, KEY_M)
-                                       MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
-                                       MATRIX_KEY(0x05, 0x08, KEY_SLASH)
-                                       MATRIX_KEY(0x05, 0x09, KEY_DOT)
-                                       MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
-
-                                       MATRIX_KEY(0x06, 0x01, KEY_1)
-                                       MATRIX_KEY(0x06, 0x02, KEY_3)
-                                       MATRIX_KEY(0x06, 0x03, KEY_4)
-                                       MATRIX_KEY(0x06, 0x04, KEY_2)
-                                       MATRIX_KEY(0x06, 0x05, KEY_8)
-                                       MATRIX_KEY(0x06, 0x06, KEY_7)
-                                       MATRIX_KEY(0x06, 0x08, KEY_0)
-                                       MATRIX_KEY(0x06, 0x09, KEY_9)
-                                       MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
-                                       MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
-                                       MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
-
-                                       MATRIX_KEY(0x07, 0x01, KEY_Q)
-                                       MATRIX_KEY(0x07, 0x02, KEY_E)
-                                       MATRIX_KEY(0x07, 0x03, KEY_R)
-                                       MATRIX_KEY(0x07, 0x04, KEY_W)
-                                       MATRIX_KEY(0x07, 0x05, KEY_I)
-                                       MATRIX_KEY(0x07, 0x06, KEY_U)
-                                       MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
-                                       MATRIX_KEY(0x07, 0x08, KEY_P)
-                                       MATRIX_KEY(0x07, 0x09, KEY_O)
-                                       MATRIX_KEY(0x07, 0x0b, KEY_UP)
-                                       MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
-                               >;
+                       i2c-tunnel {
+                               compatible = "google,cros-ec-i2c-tunnel";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               google,remote-bus = <0>;
+
+                               charger: bq24735@9 {
+                                       compatible = "ti,bq24735";
+                                       reg = <0x9>;
+                                       interrupt-parent = <&gpio>;
+                                       interrupts = <TEGRA_GPIO(J, 0)
+                                                       GPIO_ACTIVE_HIGH>;
+                                       ti,ac-detect-gpios = <&gpio
+                                                       TEGRA_GPIO(J, 0)
+                                                       GPIO_ACTIVE_HIGH>;
+                               };
+
+                               battery: sbs-battery@b {
+                                       compatible = "sbs,sbs-battery";
+                                       reg = <0xb>;
+                                       sbs,i2c-retry-count = <2>;
+                                       sbs,poll-retry-count = <1>;
+                               };
                        };
                };
        };
                nvidia,sys-clock-req-active-high;
        };
 
+       hda@0,70030000 {
+               status = "okay";
+       };
+
        sdhci@0,700b0400 {
                cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
                power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
 };
+
+#include "cros-ec-keyboard.dtsi"
index 6e6bc4e..3af46d3 100644 (file)
@@ -1,6 +1,7 @@
 #include <dt-bindings/clock/tegra124-car.h>
 #include <dt-bindings/gpio/tegra-gpio.h>
 #include <dt-bindings/pinctrl/pinctrl-tegra.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 
 #include "skeleton.dtsi"
                        (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
        };
 
+       gpu@0,57000000 {
+               compatible = "nvidia,gk20a";
+               reg = <0x0 0x57000000 0x0 0x01000000>,
+                     <0x0 0x58000000 0x0 0x01000000>;
+               interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "stall", "nonstall";
+               clocks = <&tegra_car TEGRA124_CLK_GPU>,
+                        <&tegra_car TEGRA124_CLK_PLL_P_OUT5>;
+               clock-names = "gpu", "pwr";
+               resets = <&tegra_car 184>;
+               reset-names = "gpu";
+               status = "disabled";
+       };
+
        timer@0,60005000 {
                compatible = "nvidia,tegra124-timer", "nvidia,tegra20-timer";
                reg = <0x0 0x60005000 0x0 0x400>;
                #dma-cells = <1>;
        };
 
+       apbmisc@0,70000800 {
+               compatible = "nvidia,tegra124-apbmisc", "nvidia,tegra20-apbmisc";
+               reg = <0x0 0x70000800 0x0 0x64>,   /* Chip revision */
+                     <0x0 0x7000E864 0x0 0x04>;   /* Strapping options */
+       };
+
        pinmux: pinmux@0,70000868 {
                compatible = "nvidia,tegra124-pinmux";
                reg = <0x0 0x70000868 0x0 0x164>, /* Pad control registers */
                clock-names = "pclk", "clk32k_in";
        };
 
+       fuse@0,7000f800 {
+               compatible = "nvidia,tegra124-efuse";
+               reg = <0x0 0x7000f800 0x0 0x400>;
+               clocks = <&tegra_car TEGRA124_CLK_FUSE>;
+               clock-names = "fuse";
+               resets = <&tegra_car 39>;
+               reset-names = "fuse";
+       };
+
+       hda@0,70030000 {
+               compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
+               reg = <0x0 0x70030000 0x0 0x10000>;
+               interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&tegra_car TEGRA124_CLK_HDA>,
+                        <&tegra_car TEGRA124_CLK_HDA2HDMI>,
+                        <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
+               clock-names = "hda", "hda2hdmi", "hdacodec_2x";
+               resets = <&tegra_car 125>, /* hda */
+                        <&tegra_car 128>, /* hda2hdmi */
+                        <&tegra_car 111>; /* hda2codec_2x */
+               reset-names = "hda", "hda2hdmi", "hdacodec_2x";
+               status = "disabled";
+       };
+
+       padctl: padctl@0,7009f000 {
+               compatible = "nvidia,tegra124-xusb-padctl";
+               reg = <0x0 0x7009f000 0x0 0x1000>;
+               resets = <&tegra_car 142>;
+               reset-names = "padctl";
+
+               #phy-cells = <1>;
+       };
+
        sdhci@0,700b0000 {
                compatible = "nvidia,tegra124-sdhci";
                reg = <0x0 0x700b0000 0x0 0x200>;
index 6d3a4cb..1b7c56b 100644 (file)
                status = "okay";
        };
 
+       host1x@50000000 {
+               dc@54200000 {
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&panel>;
+                       };
+               };
+       };
+
        i2c@7000c000 {
                wm8903: wm8903@1a {
                        compatible = "wlf,wm8903";
@@ -30,7 +39,7 @@
                };
        };
 
-       backlight {
+       backlight: backlight {
                compatible = "pwm-backlight";
                pwms = <&pwm 0 5000000>;
 
                default-brightness-level = <6>;
        };
 
+       panel: panel {
+               compatible = "innolux,n156bge-l21", "simple-panel";
+
+               power-supply =  <&vdd_1v8_reg>, <&vdd_3v3_reg>;
+               enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
+
+               backlight = <&backlight>;
+       };
+
        sound {
                compatible = "ad,tegra-audio-wm8903-medcom-wide",
                             "nvidia,tegra-audio-wm8903";
                         <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
+
+       regulators {
+               vcc_24v_reg: regulator@100 {
+                       compatible = "regulator-fixed";
+                       reg = <100>;
+                       regulator-name = "vcc_24v";
+                       regulator-min-microvolt = <24000000>;
+                       regulator-max-microvolt = <24000000>;
+                       regulator-always-on;
+               };
+
+               vdd_5v0_reg: regulator@101 {
+                       compatible = "regulator-fixed";
+                       reg = <101>;
+                       regulator-name = "vdd_5v0";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+               };
+
+               vdd_3v3_reg: regulator@102 {
+                       compatible = "regulator-fixed";
+                       reg = <102>;
+                       regulator-name = "vdd_3v3";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               vdd_1v8_reg: regulator@103 {
+                       compatible = "regulator-fixed";
+                       reg = <103>;
+                       regulator-name = "vdd_1v8";
+                       vin-supply = <&vdd_3v3_reg>;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+       };
 };
index 9a39a80..d4438e3 100644 (file)
                request-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
                slave-addr = <138>;
                clocks = <&tegra_car TEGRA20_CLK_I2C3>,
-                        <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
+                        <&tegra_car TEGRA20_CLK_PLL_P_OUT3>;
                clock-names = "div-clk", "fast-clk";
                resets = <&tegra_car 67>;
                reset-names = "i2c";
                        GPIO_ACTIVE_HIGH>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
-                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
-                        <&tegra_car TEGRA20_CLK_CDEV1>;
+                        <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
+                        <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
 };
index 29051a2..a10b415 100644 (file)
                         <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
+
+       regulators {
+               vcc_24v_reg: regulator@100 {
+                       compatible = "regulator-fixed";
+                       reg = <100>;
+                       regulator-name = "vcc_24v";
+                       regulator-min-microvolt = <24000000>;
+                       regulator-max-microvolt = <24000000>;
+                       regulator-always-on;
+               };
+
+               vdd_5v0_reg: regulator@101 {
+                       compatible = "regulator-fixed";
+                       reg = <101>;
+                       regulator-name = "vdd_5v0";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+               };
+
+               vdd_3v3_reg: regulator@102 {
+                       compatible = "regulator-fixed";
+                       reg = <102>;
+                       regulator-name = "vdd_3v3";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               vdd_1v8_reg: regulator@103 {
+                       compatible = "regulator-fixed";
+                       reg = <103>;
+                       regulator-name = "vdd_1v8";
+                       vin-supply = <&vdd_3v3_reg>;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+       };
 };
index a1b0d96..9c83185 100644 (file)
                        #gpio-cells = <2>;
                        gpio-controller;
 
+                       /* vdd_5v0_reg must be provided by the base board */
                        sys-supply = <&vdd_5v0_reg>;
                        vin-sm0-supply = <&sys_reg>;
                        vin-sm1-supply = <&sys_reg>;
                #address-cells = <1>;
                #size-cells = <0>;
 
-               vdd_5v0_reg: regulator@0 {
-                       compatible = "regulator-fixed";
-                       reg = <0>;
-                       regulator-name = "vdd_5v0";
-                       regulator-min-microvolt = <5000000>;
-                       regulator-max-microvolt = <5000000>;
-                       regulator-always-on;
-               };
-
                pci_vdd_reg: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
index 890562c..c12d8be 100644 (file)
                         <&tegra_car TEGRA20_CLK_CDEV1>;
                clock-names = "pll_a", "pll_a_out0", "mclk";
        };
+
+       regulators {
+               vcc_24v_reg: regulator@100 {
+                       compatible = "regulator-fixed";
+                       reg = <100>;
+                       regulator-name = "vcc_24v";
+                       regulator-min-microvolt = <24000000>;
+                       regulator-max-microvolt = <24000000>;
+                       regulator-always-on;
+               };
+
+               vdd_5v0_reg: regulator@101 {
+                       compatible = "regulator-fixed";
+                       reg = <101>;
+                       regulator-name = "vdd_5v0";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+               };
+
+               vdd_3v3_reg: regulator@102 {
+                       compatible = "regulator-fixed";
+                       reg = <102>;
+                       regulator-name = "vdd_3v3";
+                       vin-supply = <&vcc_24v_reg>;
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+
+               vdd_1v8_reg: regulator@103 {
+                       compatible = "regulator-fixed";
+                       reg = <103>;
+                       regulator-name = "vdd_1v8";
+                       vin-supply = <&vdd_3v3_reg>;
+                       regulator-min-microvolt = <1800000>;
+                       regulator-max-microvolt = <1800000>;
+                       regulator-always-on;
+               };
+       };
 };
index a7ddf70..243d84c 100644 (file)
                interrupt-controller;
        };
 
+       apbmisc@70000800 {
+               compatible = "nvidia,tegra20-apbmisc";
+               reg = <0x70000800 0x64   /* Chip revision */
+                      0x70000008 0x04>; /* Strapping options */
+       };
+
        pinmux: pinmux@70000014 {
                compatible = "nvidia,tegra20-pinmux";
                reg = <0x70000014 0x10   /* Tri-state registers */
                #size-cells = <0>;
        };
 
+       fuse@7000f800 {
+               compatible = "nvidia,tegra20-efuse";
+               reg = <0x7000F800 0x400>;
+               clocks = <&tegra_car TEGRA20_CLK_FUSE>;
+               clock-names = "fuse";
+               resets = <&tegra_car 39>;
+               reset-names = "fuse";
+       };
+
        pcie-controller@80003000 {
                compatible = "nvidia,tegra20-pcie";
                device_type = "pci";
diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
new file mode 100644 (file)
index 0000000..45d40f0
--- /dev/null
@@ -0,0 +1,260 @@
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "tegra30-apalis.dtsi"
+
+/ {
+       model = "Toradex Apalis T30 on Apalis Evaluation Board";
+       compatible = "toradex,apalis_t30-eval", "toradex,apalis_t30", "nvidia,tegra30";
+
+       aliases {
+               rtc0 = "/i2c@7000c000/rtc@68";
+               rtc1 = "/i2c@7000d000/tps65911@2d";
+               rtc2 = "/rtc@7000e000";
+       };
+
+       pcie-controller@00003000 {
+               status = "okay";
+
+               pci@1,0 {
+                       status = "okay";
+               };
+
+               pci@2,0 {
+                       status = "okay";
+               };
+
+               pci@3,0 {
+                       status = "okay";
+               };
+       };
+
+       host1x@50000000 {
+               dc@54200000 {
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&panel>;
+                       };
+               };
+               hdmi@54280000 {
+                       status = "okay";
+               };
+       };
+
+       serial@70006000 {
+               status = "okay";
+       };
+
+       serial@70006040 {
+               compatible = "nvidia,tegra30-hsuart";
+               status = "okay";
+       };
+
+       serial@70006200 {
+               compatible = "nvidia,tegra30-hsuart";
+               status = "okay";
+       };
+
+       serial@70006300 {
+               compatible = "nvidia,tegra30-hsuart";
+               status = "okay";
+       };
+
+       pwm@7000a000 {
+               status = "okay";
+       };
+
+       /*
+        * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
+        * board)
+        */
+       i2c@7000c000 {
+               status = "okay";
+               clock-frequency = <100000>;
+
+               pcie-switch@58 {
+                       compatible = "plx,pex8605";
+                       reg = <0x58>;
+               };
+
+               /* M41T0M6 real time clock on carrier board */
+               rtc@68 {
+                       compatible = "st,m41t00";
+                       reg = <0x68>;
+               };
+       };
+
+       /* GEN2_I2C: unused */
+
+       /*
+        * CAM_I2C: I2C3_SDA/SCL on MXM3 pin 201/203 (e.g. camera sensor on
+        * carrier board)
+        */
+       cami2c: i2c@7000c500 {
+               status = "okay";
+               clock-frequency = <400000>;
+       };
+
+       /* DDC: I2C2_SDA/SCL on MXM3 pin 205/207 (e.g. display EDID) */
+       hdmiddc: i2c@7000c700 {
+               status = "okay";
+       };
+
+       /* SPI1: Apalis SPI1 */
+       spi@7000d400 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+               spidev0: spidev@1 {
+                       compatible = "spidev";
+                       reg = <1>;
+                       spi-max-frequency = <25000000>;
+               };
+       };
+
+       /* SPI5: Apalis SPI2 */
+       spi@7000dc00 {
+               status = "okay";
+               spi-max-frequency = <25000000>;
+               spidev1: spidev@2 {
+                       compatible = "spidev";
+                       reg = <2>;
+                       spi-max-frequency = <25000000>;
+               };
+       };
+
+       sd1: sdhci@78000000 {
+               status = "okay";
+               bus-width = <4>;
+               /* SD1_CD# */
+               cd-gpios = <&gpio TEGRA_GPIO(CC, 5) GPIO_ACTIVE_LOW>;
+               no-1-8-v;
+       };
+
+       mmc1: sdhci@78000400 {
+               status = "okay";
+               bus-width = <8>;
+               /* MMC1_CD# */
+               cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
+               no-1-8-v;
+       };
+
+       /* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
+       usb@7d000000 {
+               status = "okay";
+       };
+
+       usb-phy@7d000000 {
+               status = "okay";
+               vbus-supply = <&usbo1_vbus_reg>;
+       };
+
+       /* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
+       usb@7d004000 {
+               status = "okay";
+       };
+
+       usb-phy@7d004000 {
+               status = "okay";
+               vbus-supply = <&usbh_vbus_reg>;
+       };
+
+       /* EHCI instance 2: USB3_DP/N -> USBH3_DP/N */
+       usb@7d008000 {
+               status = "okay";
+       };
+
+       usb-phy@7d008000 {
+               status = "okay";
+               vbus-supply = <&usbh_vbus_reg>;
+       };
+
+       backlight: backlight {
+               compatible = "pwm-backlight";
+
+               /* PWM0 */
+               pwms = <&pwm 0 5000000>;
+               brightness-levels = <255 231 223 207 191 159 127 0>;
+               default-brightness-level = <6>;
+               /* BKL1_ON */
+               enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+       };
+
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               power {
+                       label = "Power";
+                       gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       debounce-interval = <10>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       panel: panel {
+               /*
+                * edt,et057090dhu: EDT 5.7" LCD TFT
+                * edt,et070080dh6: EDT 7.0" LCD TFT
+                */
+               compatible = "edt,et057090dhu", "simple-panel";
+
+               backlight = <&backlight>;
+       };
+
+       pwmleds {
+               compatible = "pwm-leds";
+
+               pwm1 {
+                       label = "PWM1";
+                       pwms = <&pwm 3 19600>;
+                       max-brightness = <255>;
+               };
+
+               pwm2 {
+                       label = "PWM2";
+                       pwms = <&pwm 2 19600>;
+                       max-brightness = <255>;
+               };
+
+               pwm3 {
+                       label = "PWM3";
+                       pwms = <&pwm 1 19600>;
+                       max-brightness = <255>;
+               };
+       };
+
+       regulators {
+               sys_5v0_reg: regulator@1 {
+                       compatible = "regulator-fixed";
+                       reg = <1>;
+                       regulator-name = "5v0";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       regulator-always-on;
+               };
+
+               /* USBO1_EN */
+               usbo1_vbus_reg: regulator@2 {
+                       compatible = "regulator-fixed";
+                       reg = <2>;
+                       regulator-name = "usbo1_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio TEGRA_GPIO(T, 5) GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       vin-supply = <&sys_5v0_reg>;
+               };
+
+               /* USBH_EN */
+               usbh_vbus_reg: regulator@3 {
+                       compatible = "regulator-fixed";
+                       reg = <3>;
+                       regulator-name = "usbh_vbus";
+                       regulator-min-microvolt = <5000000>;
+                       regulator-max-microvolt = <5000000>;
+                       gpio = <&gpio TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
+                       enable-active-high;
+                       vin-supply = <&sys_5v0_reg>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
new file mode 100644 (file)
index 0000000..8adaa78
--- /dev/null
@@ -0,0 +1,678 @@
+#include "tegra30.dtsi"
+
+/*
+ * Toradex Apalis T30 Device Tree
+ * Compatible for Revisions 1GB: V1.0A; 2GB: V1.0B, V1.0C
+ */
+/ {
+       model = "Toradex Apalis T30";
+       compatible = "toradex,apalis_t30", "nvidia,tegra30";
+
+       pcie-controller@00003000 {
+               avdd-pexa-supply = <&vdd2_reg>;
+               vdd-pexa-supply = <&vdd2_reg>;
+               avdd-pexb-supply = <&vdd2_reg>;
+               vdd-pexb-supply = <&vdd2_reg>;
+               avdd-pex-pll-supply = <&vdd2_reg>;
+               avdd-plle-supply = <&ldo6_reg>;
+               vddio-pex-ctl-supply = <&sys_3v3_reg>;
+               hvdd-pex-supply = <&sys_3v3_reg>;
+
+               pci@1,0 {
+                       nvidia,num-lanes = <4>;
+               };
+
+               pci@2,0 {
+                       nvidia,num-lanes = <1>;
+               };
+
+               pci@3,0 {
+                       nvidia,num-lanes = <1>;
+               };
+       };
+
+       host1x@50000000 {
+               hdmi@54280000 {
+                       vdd-supply = <&sys_3v3_reg>;
+                       pll-supply = <&vio_reg>;
+
+                       nvidia,hpd-gpio =
+                               <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
+                       nvidia,ddc-i2c-bus = <&hdmiddc>;
+               };
+       };
+
+       pinmux@70000868 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&state_default>;
+
+               state_default: pinmux {
+                       /* Apalis BKL1_ON */
+                       pv2 {
+                               nvidia,pins = "pv2";
+                               nvidia,function = "rsvd4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis BKL1_PWM */
+                       uart3_rts_n_pc0 {
+                               nvidia,pins =   "uart3_rts_n_pc0";
+                               nvidia,function = "pwm0";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
+                       uart3_cts_n_pa1 {
+                               nvidia,pins =   "uart3_cts_n_pa1";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis CAN1 on SPI6 */
+                       spi2_cs0_n_px3 {
+                               nvidia,pins =   "spi2_cs0_n_px3",
+                                               "spi2_miso_px1",
+                                               "spi2_mosi_px0",
+                                               "spi2_sck_px2";
+                               nvidia,function = "spi6";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* CAN_INT1 */
+                       spi2_cs1_n_pw2 {
+                               nvidia,pins = "spi2_cs1_n_pw2";
+                               nvidia,function = "spi3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis CAN2 on SPI4 */
+                       gmi_a16_pj7 {
+                               nvidia,pins =   "gmi_a16_pj7",
+                                               "gmi_a17_pb0",
+                                               "gmi_a18_pb1",
+                                               "gmi_a19_pk7";
+                               nvidia,function = "spi4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* CAN_INT2 */
+                       spi2_cs2_n_pw3 {
+                               nvidia,pins = "spi2_cs2_n_pw3";
+                               nvidia,function = "spi3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis I2C3 */
+                       cam_i2c_scl_pbb1 {
+                               nvidia,pins = "cam_i2c_scl_pbb1",
+                                             "cam_i2c_sda_pbb2";
+                               nvidia,function = "i2c3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,lock = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis MMC1 */
+                       sdmmc3_clk_pa6 {
+                               nvidia,pins =   "sdmmc3_clk_pa6",
+                                               "sdmmc3_cmd_pa7";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       sdmmc3_dat0_pb7 {
+                               nvidia,pins =   "sdmmc3_dat0_pb7",
+                                               "sdmmc3_dat1_pb6",
+                                               "sdmmc3_dat2_pb5",
+                                               "sdmmc3_dat3_pb4",
+                                               "sdmmc3_dat4_pd1",
+                                               "sdmmc3_dat5_pd0",
+                                               "sdmmc3_dat6_pd3",
+                                               "sdmmc3_dat7_pd4";
+                               nvidia,function = "sdmmc3";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Apalis MMC1_CD# */
+                       pv3 {
+                               nvidia,pins = "pv3";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis PWM1 */
+                       gpio_pu6 {
+                               nvidia,pins =   "gpio_pu6";
+                               nvidia,function = "pwm3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM2 */
+                       gpio_pu5 {
+                               nvidia,pins =   "gpio_pu5";
+                               nvidia,function = "pwm2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM3 */
+                       gpio_pu4 {
+                               nvidia,pins =   "gpio_pu4";
+                               nvidia,function = "pwm1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis PWM4 */
+                       gpio_pu3 {
+                               nvidia,pins =   "gpio_pu3";
+                               nvidia,function = "pwm0";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis RESET_MOCI# */
+                       gmi_rst_n_pi4 {
+                               nvidia,pins = "gmi_rst_n_pi4";
+                               nvidia,function = "gmi";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis SD1 */
+                       sdmmc1_clk_pz0 {
+                               nvidia,pins = "sdmmc1_clk_pz0";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       sdmmc1_cmd_pz1 {
+                               nvidia,pins =   "sdmmc1_cmd_pz1",
+                                               "sdmmc1_dat0_py7",
+                                               "sdmmc1_dat1_py6",
+                                               "sdmmc1_dat2_py5",
+                                               "sdmmc1_dat3_py4";
+                               nvidia,function = "sdmmc1";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       /* Apalis SD1_CD# */
+                       clk2_req_pcc5 {
+                               nvidia,pins = "clk2_req_pcc5";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis SPI1 */
+                       spi1_sck_px5 {
+                               nvidia,pins =   "spi1_sck_px5",
+                                               "spi1_mosi_px4",
+                                               "spi1_miso_px7",
+                                               "spi1_cs0_n_px6";
+                               nvidia,function = "spi1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis SPI2 */
+                       lcd_sck_pz4 {
+                               nvidia,pins =   "lcd_sck_pz4",
+                                               "lcd_sdout_pn5",
+                                               "lcd_sdin_pz2",
+                                               "lcd_cs0_n_pn4";
+                               nvidia,function = "spi5";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART1 */
+                       ulpi_data0 {
+                               nvidia,pins =   "ulpi_data0_po1",
+                                               "ulpi_data1_po2",
+                                               "ulpi_data2_po3",
+                                               "ulpi_data3_po4",
+                                               "ulpi_data4_po5",
+                                               "ulpi_data5_po6",
+                                               "ulpi_data6_po7",
+                                               "ulpi_data7_po0";
+                               nvidia,function = "uarta";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART2 */
+                       ulpi_clk_py0 {
+                               nvidia,pins =   "ulpi_clk_py0",
+                                               "ulpi_dir_py1",
+                                               "ulpi_nxt_py2",
+                                               "ulpi_stp_py3";
+                               nvidia,function = "uartd";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART3 */
+                       uart2_rxd_pc3 {
+                               nvidia,pins =   "uart2_rxd_pc3",
+                                               "uart2_txd_pc2";
+                               nvidia,function = "uartb";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis UART4 */
+                       uart3_rxd_pw7 {
+                               nvidia,pins =   "uart3_rxd_pw7",
+                                               "uart3_txd_pw6";
+                               nvidia,function = "uartc";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBO1_EN */
+                       gen2_i2c_scl_pt5 {
+                               nvidia,pins = "gen2_i2c_scl_pt5";
+                               nvidia,function = "rsvd4";
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Apalis USBO1_OC# */
+                       gen2_i2c_sda_pt6 {
+                               nvidia,pins = "gen2_i2c_sda_pt6";
+                               nvidia,function = "rsvd4";
+                               nvidia,open-drain = <TEGRA_PIN_DISABLE>;
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* Apalis WAKE1_MICO */
+                       pv1 {
+                               nvidia,pins = "pv1";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* eMMC (On-module) */
+                       sdmmc4_clk_pcc4 {
+                               nvidia,pins =   "sdmmc4_clk_pcc4",
+                                               "sdmmc4_rst_n_pcc3";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+                       sdmmc4_dat0_paa0 {
+                               nvidia,pins =   "sdmmc4_dat0_paa0",
+                                               "sdmmc4_dat1_paa1",
+                                               "sdmmc4_dat2_paa2",
+                                               "sdmmc4_dat3_paa3",
+                                               "sdmmc4_dat4_paa4",
+                                               "sdmmc4_dat5_paa5",
+                                               "sdmmc4_dat6_paa6",
+                                               "sdmmc4_dat7_paa7";
+                               nvidia,function = "sdmmc4";
+                               nvidia,pull = <TEGRA_PIN_PULL_UP>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* LVDS Transceiver Configuration */
+                       pbb0 {
+                               nvidia,pins =   "pbb0",
+                                               "pbb7",
+                                               "pcc1",
+                                               "pcc2";
+                               nvidia,function = "rsvd2";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,lock = <TEGRA_PIN_DISABLE>;
+                       };
+                       pbb3 {
+                               nvidia,pins =   "pbb3",
+                                               "pbb4",
+                                               "pbb5",
+                                               "pbb6";
+                               nvidia,function = "displayb";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+                               nvidia,lock = <TEGRA_PIN_DISABLE>;
+                       };
+
+                       /* Power I2C (On-module) */
+                       pwr_i2c_scl_pz6 {
+                               nvidia,pins = "pwr_i2c_scl_pz6",
+                                             "pwr_i2c_sda_pz7";
+                               nvidia,function = "i2cpwr";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                               nvidia,lock = <TEGRA_PIN_DISABLE>;
+                               nvidia,open-drain = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /*
+                        * THERMD_ALERT#, unlatched I2C address pin of LM95245
+                        * temperature sensor therefore requires disabling for
+                        * now
+                        */
+                       lcd_dc1_pd2 {
+                               nvidia,pins = "lcd_dc1_pd2";
+                               nvidia,function = "rsvd3";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+
+                       /* TOUCH_PEN_INT# */
+                       pv0 {
+                               nvidia,pins = "pv0";
+                               nvidia,function = "rsvd1";
+                               nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+                               nvidia,tristate = <TEGRA_PIN_DISABLE>;
+                               nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+                       };
+               };
+       };
+
+       hdmiddc: i2c@7000c700 {
+               clock-frequency = <100000>;
+       };
+
+       /*
+        * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
+        * touch screen controller
+        */
+       i2c@7000d000 {
+               status = "okay";
+               clock-frequency = <100000>;
+
+               pmic: tps65911@2d {
+                       compatible = "ti,tps65911";
+                       reg = <0x2d>;
+
+                       interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <2>;
+                       interrupt-controller;
+
+                       ti,system-power-controller;
+
+                       #gpio-cells = <2>;
+                       gpio-controller;
+
+                       vcc1-supply = <&sys_3v3_reg>;
+                       vcc2-supply = <&sys_3v3_reg>;
+                       vcc3-supply = <&vio_reg>;
+                       vcc4-supply = <&sys_3v3_reg>;
+                       vcc5-supply = <&sys_3v3_reg>;
+                       vcc6-supply = <&vio_reg>;
+                       vcc7-supply = <&sys_5v0_reg>;
+                       vccio-supply = <&sys_3v3_reg>;
+
+                       regulators {
+                               /* SW1: +V1.35_VDDIO_DDR */
+                               vdd1_reg: vdd1 {
+                                       regulator-name = "vddio_ddr_1v35";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               /* SW2: +V1.05 */
+                               vdd2_reg: vdd2 {
+                                       regulator-name =
+                                               "vdd_pexa,vdd_pexb,vdd_sata";
+                                       regulator-min-microvolt = <1050000>;
+                                       regulator-max-microvolt = <1050000>;
+                               };
+
+                               /* SW CTRL: +V1.0_VDD_CPU */
+                               vddctrl_reg: vddctrl {
+                                       regulator-name = "vdd_cpu,vdd_sys";
+                                       regulator-min-microvolt = <1150000>;
+                                       regulator-max-microvolt = <1150000>;
+                                       regulator-always-on;
+                               };
+
+                               /* SWIO: +V1.8 */
+                               vio_reg: vio {
+                                       regulator-name = "vdd_1v8_gen";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               /* LDO1: unused */
+
+                               /*
+                                * EN_+V3.3 switching via FET:
+                                * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
+                                * see also v3_3 fixed supply
+                                */
+                               ldo2_reg: ldo2 {
+                                       regulator-name = "en_3v3";
+                                       regulator-min-microvolt = <3300000>;
+                                       regulator-max-microvolt = <3300000>;
+                                       regulator-always-on;
+                               };
+
+                               /* +V1.2_CSI */
+                               ldo3_reg: ldo3 {
+                                       regulator-name =
+                                               "avdd_dsi_csi,pwrdet_mipi";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                               };
+
+                               /* +V1.2_VDD_RTC */
+                               ldo4_reg: ldo4 {
+                                       regulator-name = "vdd_rtc";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * +V2.8_AVDD_VDAC:
+                                * only required for analog RGB
+                                */
+                               ldo5_reg: ldo5 {
+                                       regulator-name = "avdd_vdac";
+                                       regulator-min-microvolt = <2800000>;
+                                       regulator-max-microvolt = <2800000>;
+                                       regulator-always-on;
+                               };
+
+                               /*
+                                * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
+                                * but LDO6 can't set voltage in 50mV
+                                * granularity
+                                */
+                               ldo6_reg: ldo6 {
+                                       regulator-name = "avdd_plle";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                               };
+
+                               /* +V1.2_AVDD_PLL */
+                               ldo7_reg: ldo7 {
+                                       regulator-name = "avdd_pll";
+                                       regulator-min-microvolt = <1200000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                               };
+
+                               /* +V1.0_VDD_DDR_HS */
+                               ldo8_reg: ldo8 {
+                                       regulator-name = "vdd_ddr_hs";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+                       };
+               };
+
+               /* STMPE811 touch screen controller */
+               stmpe811@41 {
+                       compatible = "st,stmpe811";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x41>;
+                       interrupts = <TEGRA_GPIO(V, 0) IRQ_TYPE_LEVEL_LOW>;
+                       interrupt-parent = <&gpio>;
+                       interrupt-controller;
+                       id = <0>;
+                       blocks = <0x5>;
+                       irq-trigger = <0x1>;
+
+                       stmpe_touchscreen {
+                               compatible = "st,stmpe-ts";
+                               reg = <0>;
+                               /* 3.25 MHz ADC clock speed */
+                               st,adc-freq = <1>;
+                               /* 8 sample average control */
+                               st,ave-ctrl = <3>;
+                               /* 7 length fractional part in z */
+                               st,fraction-z = <7>;
+                               /*
+                                * 50 mA typical 80 mA max touchscreen drivers
+                                * current limit value
+                                */
+                               st,i-drive = <1>;
+                               /* 12-bit ADC */
+                               st,mod-12b = <1>;
+                               /* internal ADC reference */
+                               st,ref-sel = <0>;
+                               /* ADC converstion time: 80 clocks */
+                               st,sample-time = <4>;
+                               /* 1 ms panel driver settling time */
+                               st,settling = <3>;
+                               /* 5 ms touch detect interrupt delay */
+                               st,touch-det-delay = <5>;
+                       };
+               };
+
+               /*
+                * LM95245 temperature sensor
+                * Note: OVERT_N directly connected to PMIC PWRDN
+                */
+               temp-sensor@4c {
+                       compatible = "national,lm95245";
+                       reg = <0x4c>;
+               };
+
+               /* SW: +V1.2_VDD_CORE */
+               tps62362@60 {
+                       compatible = "ti,tps62362";
+                       reg = <0x60>;
+
+                       regulator-name = "tps62362-vout";
+                       regulator-min-microvolt = <900000>;
+                       regulator-max-microvolt = <1400000>;
+                       regulator-boot-on;
+                       regulator-always-on;
+                       ti,vsel0-state-low;
+                       /* VSEL1: EN_CORE_DVFS_N low for DVFS */
+                       ti,vsel1-state-low;
+               };
+       };
+
+       /* SPI4: CAN2 */
+       spi@7000da00 {
+               status = "okay";
+               spi-max-frequency = <10000000>;
+
+               can@1 {
+                       compatible = "microchip,mcp2515";
+                       reg = <1>;
+                       clocks = <&clk16m>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(W, 3) GPIO_ACTIVE_LOW>;
+                       spi-max-frequency = <10000000>;
+               };
+       };
+
+       /* SPI6: CAN1 */
+       spi@7000de00 {
+               status = "okay";
+               spi-max-frequency = <10000000>;
+
+               can@0 {
+                       compatible = "microchip,mcp2515";
+                       reg = <0>;
+                       clocks = <&clk16m>;
+                       interrupt-parent = <&gpio>;
+                       interrupts = <TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+                       spi-max-frequency = <10000000>;
+               };
+       };
+
+       pmc@7000e400 {
+               nvidia,invert-interrupt;
+               nvidia,suspend-mode = <1>;
+               nvidia,cpu-pwr-good-time = <5000>;
+               nvidia,cpu-pwr-off-time = <5000>;
+               nvidia,core-pwr-good-time = <3845 3845>;
+               nvidia,core-pwr-off-time = <0>;
+               nvidia,core-power-req-active-high;
+               nvidia,sys-clock-req-active-high;
+       };
+
+       sdhci@78000600 {
+               status = "okay";
+               bus-width = <8>;
+               non-removable;
+       };
+
+       clocks {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               clk32k_in: clk@0 {
+                       compatible = "fixed-clock";
+                       reg=<0>;
+                       #clock-cells = <0>;
+                       clock-frequency = <32768>;
+               };
+               clk16m: clk@1 {
+                       compatible = "fixed-clock";
+                       reg=<1>;
+                       #clock-cells = <0>;
+                       clock-frequency = <16000000>;
+                       clock-output-names = "clk16m";
+               };
+       };
+
+       regulators {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               sys_3v3_reg: regulator@100 {
+                       compatible = "regulator-fixed";
+                       reg = <100>;
+                       regulator-name = "3v3";
+                       regulator-min-microvolt = <3300000>;
+                       regulator-max-microvolt = <3300000>;
+                       regulator-always-on;
+               };
+       };
+};
index dec4fc8..0b1ede9 100644 (file)
                interrupt-controller;
        };
 
+       apbmisc@70000800 {
+               compatible = "nvidia,tegra30-apbmisc", "nvidia,tegra20-apbmisc";
+               reg = <0x70000800 0x64   /* Chip revision */
+                      0x70000008 0x04>; /* Strapping options */
+       };
+
        pinmux: pinmux@70000868 {
                compatible = "nvidia,tegra30-pinmux";
                reg = <0x70000868 0xd4    /* Pad control registers */
                nvidia,ahb = <&ahb>;
        };
 
+       fuse@7000f800 {
+               compatible = "nvidia,tegra30-efuse";
+               reg = <0x7000f800 0x400>;
+               clocks = <&tegra_car TEGRA30_CLK_FUSE>;
+               clock-names = "fuse";
+               resets = <&tegra_car 39>;
+               reset-names = "fuse";
+       };
+
        ahub@70080000 {
                compatible = "nvidia,tegra30-ahub";
                reg = <0x70080000 0x200
index 0e6d3de..ce7138c 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 0751a6a..3043296 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 2859776..12edafe 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 290e603..68c0de3 100644 (file)
                        compatible = "atmel,osc", "fixed-clock";
                        clock-frequency = <12000000>;
                };
+
+               slow_xtal {
+                       clock-frequency = <32768>;
+               };
+
+               main_xtal {
+                       clock-frequency = <12000000>;
+               };
        };
 
        ahb {
index 6cc314e..583dd36 100644 (file)
@@ -14,6 +14,8 @@
 
 / {
        aliases {
+               can0 = &can0;
+               can1 = &can1;
                serial0 = &uart0;
                serial1 = &uart1;
                serial2 = &uart2;
                                        <&clks VF610_CLK_DMAMUX1>;
                        };
 
+                       can0: flexcan@40020000 {
+                               compatible = "fsl,vf610-flexcan";
+                               reg = <0x40020000 0x4000>;
+                               interrupts = <0 58 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks VF610_CLK_FLEXCAN0>,
+                                        <&clks VF610_CLK_FLEXCAN0>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
                        uart0: serial@40027000 {
                                compatible = "fsl,vf610-lpuart";
                                reg = <0x40027000 0x1000>;
 
                        esdhc1: esdhc@400b2000 {
                                compatible = "fsl,imx53-esdhc";
-                               reg = <0x400b2000 0x4000>;
+                               reg = <0x400b2000 0x1000>;
                                interrupts = <0 28 0x04>;
                                clocks = <&clks VF610_CLK_IPG_BUS>,
                                        <&clks VF610_CLK_PLATFORM_BUS>,
                                clock-names = "ipg", "ahb", "ptp";
                                status = "disabled";
                        };
+
+                       can1: flexcan@400d4000 {
+                               compatible = "fsl,vf610-flexcan";
+                               reg = <0x400d4000 0x4000>;
+                               interrupts = <0 59 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clks VF610_CLK_FLEXCAN1>,
+                                        <&clks VF610_CLK_FLEXCAN1>;
+                               clock-names = "ipg", "per";
+                               status = "disabled";
+                       };
+
                };
        };
 };
index 760bbc4..6cc83d4 100644 (file)
                interrupt-parent = <&intc>;
                ranges;
 
+               adc@f8007100 {
+                       compatible = "xlnx,zynq-xadc-1.00.a";
+                       reg = <0xf8007100 0x20>;
+                       interrupts = <0 7 4>;
+                       interrupt-parent = <&intc>;
+                       clocks = <&clkc 12>;
+               };
+
+               can0: can@e0008000 {
+                       compatible = "xlnx,zynq-can-1.0";
+                       status = "disabled";
+                       clocks = <&clkc 19>, <&clkc 36>;
+                       clock-names = "can_clk", "pclk";
+                       reg = <0xe0008000 0x1000>;
+                       interrupts = <0 28 4>;
+                       interrupt-parent = <&intc>;
+                       tx-fifo-depth = <0x40>;
+                       rx-fifo-depth = <0x40>;
+               };
+
+               can1: can@e0009000 {
+                       compatible = "xlnx,zynq-can-1.0";
+                       status = "disabled";
+                       clocks = <&clkc 20>, <&clkc 37>;
+                       clock-names = "can_clk", "pclk";
+                       reg = <0xe0009000 0x1000>;
+                       interrupts = <0 51 4>;
+                       interrupt-parent = <&intc>;
+                       tx-fifo-depth = <0x40>;
+                       rx-fifo-depth = <0x40>;
+               };
+
+               gpio0: gpio@e000a000 {
+                       compatible = "xlnx,zynq-gpio-1.0";
+                       #gpio-cells = <2>;
+                       clocks = <&clkc 42>;
+                       gpio-controller;
+                       interrupt-parent = <&intc>;
+                       interrupts = <0 20 4>;
+                       reg = <0xe000a000 0x1000>;
+               };
+
                i2c0: i2c@e0004000 {
                        compatible = "cdns,i2c-r1p10";
                        status = "disabled";
                };
 
                uart0: serial@e0000000 {
-                       compatible = "xlnx,xuartps";
+                       compatible = "xlnx,xuartps", "cdns,uart-r1p8";
                        status = "disabled";
                        clocks = <&clkc 23>, <&clkc 40>;
-                       clock-names = "ref_clk", "aper_clk";
+                       clock-names = "uart_clk", "pclk";
                        reg = <0xE0000000 0x1000>;
                        interrupts = <0 27 4>;
                };
 
                uart1: serial@e0001000 {
-                       compatible = "xlnx,xuartps";
+                       compatible = "xlnx,xuartps", "cdns,uart-r1p8";
                        status = "disabled";
                        clocks = <&clkc 24>, <&clkc 41>;
-                       clock-names = "ref_clk", "aper_clk";
+                       clock-names = "uart_clk", "pclk";
                        reg = <0xE0001000 0x1000>;
                        interrupts = <0 50 4>;
                };
 
+               spi0: spi@e0006000 {
+                       compatible = "xlnx,zynq-spi-r1p6";
+                       reg = <0xe0006000 0x1000>;
+                       status = "disabled";
+                       interrupt-parent = <&intc>;
+                       interrupts = <0 26 4>;
+                       clocks = <&clkc 25>, <&clkc 34>;
+                       clock-names = "ref_clk", "pclk";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
+               spi1: spi@e0007000 {
+                       compatible = "xlnx,zynq-spi-r1p6";
+                       reg = <0xe0007000 0x1000>;
+                       status = "disabled";
+                       interrupt-parent = <&intc>;
+                       interrupts = <0 49 4>;
+                       clocks = <&clkc 26>, <&clkc 35>;
+                       clock-names = "ref_clk", "pclk";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                gem0: ethernet@e000b000 {
                        compatible = "cdns,gem";
                        reg = <0xe000b000 0x4000>;
                        };
                };
 
+               dmac_s: dmac@f8003000 {
+                       compatible = "arm,pl330", "arm,primecell";
+                       reg = <0xf8003000 0x1000>;
+                       interrupt-parent = <&intc>;
+                       interrupts = <0 13 4>,
+                                    <0 14 4>, <0 15 4>,
+                                    <0 16 4>, <0 17 4>,
+                                    <0 40 4>, <0 41 4>,
+                                    <0 42 4>, <0 43 4>;
+                       #dma-cells = <1>;
+                       #dma-channels = <8>;
+                       #dma-requests = <4>;
+                       clocks = <&clkc 27>;
+                       clock-names = "apb_pclk";
+               };
+
                devcfg: devcfg@f8007000 {
                        compatible = "xlnx,zynq-devcfg-1.0";
                        reg = <0xf8007000 0x100>;
diff --git a/arch/arm/boot/dts/zynq-parallella.dts b/arch/arm/boot/dts/zynq-parallella.dts
new file mode 100644 (file)
index 0000000..41afd9d
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * Derived from zynq-zed.dts:
+ *
+ *  Copyright (C) 2011 Xilinx
+ *  Copyright (C) 2012 National Instruments Corp.
+ *  Copyright (C) 2013 Xilinx
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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/ "zynq-7000.dtsi"
+
+/ {
+       model = "Adapteva Parallella Board";
+       compatible = "adapteva,parallella", "xlnx,zynq-7000";
+
+       memory {
+               device_type = "memory";
+               reg = <0 0x40000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait";
+               linux,stdout-path = "/amba/serial@e0001000";
+       };
+};
+
+&gem0 {
+       status = "okay";
+       phy-mode = "rgmii-id";
+       phy-handle = <&ethernet_phy>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       ethernet_phy: ethernet-phy@0 {
+               /* Marvell 88E1318 */
+               compatible = "ethernet-phy-id0141.0e90",
+                            "ethernet-phy-ieee802.3-c22";
+               reg = <0>;
+               marvell,reg-init = <0x3 0x10 0xff00 0x1e>,
+                                  <0x3 0x11 0xfff0 0xa>;
+       };
+};
+
+&i2c0 {
+       status = "okay";
+};
+
+&sdhci1 {
+       status = "okay";
+};
+
+&uart1 {
+       status = "okay";
+};
index 5e09cee..835c308 100644 (file)
 
 };
 
+&can0 {
+       status = "okay";
+};
+
 &gem0 {
        status = "okay";
        phy-mode = "rgmii";
index bada59d..63bde0e 100644 (file)
@@ -1,6 +1,7 @@
 # CONFIG_SWAP is not set
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_FHANDLE=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_LOG_BUF_SHIFT=14
@@ -35,10 +36,8 @@ CONFIG_MACH_EUKREA_CPUIMX27_USESDHC2=y
 CONFIG_MACH_EUKREA_CPUIMX27_USEUART4=y
 CONFIG_MACH_MX27_3DS=y
 CONFIG_MACH_IMX27_VISSTRIM_M10=y
-CONFIG_MACH_IMX27LITE=y
 CONFIG_MACH_PCA100=y
 CONFIG_MACH_MXT_TD60=y
-CONFIG_MACH_IMX27IPCAM=y
 CONFIG_MACH_IMX27_DT=y
 CONFIG_PREEMPT=y
 CONFIG_AEABI=y
@@ -159,6 +158,8 @@ CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_UDC=y
 CONFIG_USB_CHIPIDEA_HOST=y
 CONFIG_NOP_USB_XCEIV=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_ETH=m
 CONFIG_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_PLTFM=y
index 59b7e45..16cfec4 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_KERNEL_LZO=y
 CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_LOG_BUF_SHIFT=18
@@ -31,11 +32,12 @@ CONFIG_MACH_IMX35_DT=y
 CONFIG_MACH_PCM043=y
 CONFIG_MACH_MX35_3DS=y
 CONFIG_MACH_VPR200=y
-CONFIG_MACH_IMX51_DT=y
+CONFIG_SOC_IMX51=y
 CONFIG_SOC_IMX50=y
 CONFIG_SOC_IMX53=y
 CONFIG_SOC_IMX6Q=y
 CONFIG_SOC_IMX6SL=y
+CONFIG_SOC_IMX6SX=y
 CONFIG_SOC_VF610=y
 CONFIG_PCI=y
 CONFIG_PCI_IMX6=y
@@ -67,6 +69,8 @@ CONFIG_IP_PNP_DHCP=y
 # CONFIG_INET_LRO is not set
 CONFIG_IPV6=y
 CONFIG_NETFILTER=y
+CONFIG_CAN=y
+CONFIG_CAN_FLEXCAN=y
 CONFIG_CFG80211=y
 CONFIG_MAC80211=y
 CONFIG_RFKILL=y
@@ -160,6 +164,7 @@ CONFIG_SPI=y
 CONFIG_SPI_IMX=y
 CONFIG_GPIO_SYSFS=y
 CONFIG_GPIO_MC9S08DZ60=y
+CONFIG_GPIO_STMPE=y
 # CONFIG_HWMON is not set
 CONFIG_WATCHDOG=y
 CONFIG_IMX2_WDT=y
@@ -242,6 +247,7 @@ CONFIG_RTC_DRV_SNVS=y
 CONFIG_DMADEVICES=y
 CONFIG_IMX_SDMA=y
 CONFIG_MXS_DMA=y
+CONFIG_FSL_EDMA=y
 CONFIG_STAGING=y
 CONFIG_DRM_IMX=y
 CONFIG_DRM_IMX_FB_HELPER=y
@@ -288,6 +294,7 @@ CONFIG_NLS_ASCII=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NLS_ISO8859_15=m
 CONFIG_NLS_UTF8=y
+CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_FS=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_SCHED_DEBUG is not set
index 5348364..f70ea21 100644 (file)
@@ -27,7 +27,7 @@ CONFIG_ARCH_HIGHBANK=y
 CONFIG_ARCH_HI3xxx=y
 CONFIG_ARCH_KEYSTONE=y
 CONFIG_ARCH_MXC=y
-CONFIG_MACH_IMX51_DT=y
+CONFIG_SOC_IMX51=y
 CONFIG_SOC_IMX53=y
 CONFIG_SOC_IMX6Q=y
 CONFIG_SOC_IMX6SL=y
index a9f9923..c7906c2 100644 (file)
@@ -1,4 +1,5 @@
 CONFIG_SYSVIPC=y
+CONFIG_FHANDLE=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_TASKSTATS=y
index 536a137..f650f00 100644 (file)
@@ -180,6 +180,7 @@ CONFIG_TWL4030_WATCHDOG=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65217=y
+CONFIG_MFD_TPS65218=y
 CONFIG_MFD_TPS65910=y
 CONFIG_TWL6040_CORE=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
@@ -188,6 +189,7 @@ CONFIG_REGULATOR_TI_ABB=y
 CONFIG_REGULATOR_TPS65023=y
 CONFIG_REGULATOR_TPS6507X=y
 CONFIG_REGULATOR_TPS65217=y
+CONFIG_REGULATOR_TPS65218=y
 CONFIG_REGULATOR_TPS65910=y
 CONFIG_REGULATOR_TWL4030=y
 CONFIG_REGULATOR_PBIAS=y
index 45b55e0..6cc6f7a 100644 (file)
@@ -113,14 +113,12 @@ config SOC_AT91RM9200
        select HAVE_AT91_DBGU0
        select MULTI_IRQ_HANDLER
        select SPARSE_IRQ
-       select AT91_USE_OLD_CLK
        select HAVE_AT91_USB_CLK
 
 config SOC_AT91SAM9260
        bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
        select HAVE_AT91_DBGU0
        select SOC_AT91SAM9
-       select AT91_USE_OLD_CLK
        select HAVE_AT91_USB_CLK
        help
          Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
@@ -140,7 +138,6 @@ config SOC_AT91SAM9263
        select HAVE_AT91_DBGU1
        select HAVE_FB_ATMEL
        select SOC_AT91SAM9
-       select AT91_USE_OLD_CLK
        select HAVE_AT91_USB_CLK
 
 config SOC_AT91SAM9RL
@@ -155,7 +152,6 @@ config SOC_AT91SAM9G45
        select HAVE_AT91_DBGU1
        select HAVE_FB_ATMEL
        select SOC_AT91SAM9
-       select AT91_USE_OLD_CLK
        select HAVE_AT91_UTMI
        select HAVE_AT91_USB_CLK
        help
index 787bb50..038702e 100644 (file)
 #include "at91_aic.h"
 #include "soc.h"
 #include "generic.h"
-#include "clock.h"
 #include "sam9_smc.h"
 #include "pm.h"
 
+#if defined(CONFIG_OLD_CLK_AT91)
+#include "clock.h"
 /* --------------------------------------------------------------------
  *  Clocks
  * -------------------------------------------------------------------- */
@@ -277,6 +278,9 @@ static void __init at91rm9200_register_clocks(void)
        clk_register(&pck2);
        clk_register(&pck3);
 }
+#else
+#define at91rm9200_register_clocks NULL
+#endif
 
 /* --------------------------------------------------------------------
  *  GPIO
index c3d22be..3477ba9 100644 (file)
 #include "at91_rstc.h"
 #include "soc.h"
 #include "generic.h"
-#include "clock.h"
 #include "sam9_smc.h"
 #include "pm.h"
 
+#if defined(CONFIG_OLD_CLK_AT91)
+#include "clock.h"
 /* --------------------------------------------------------------------
  *  Clocks
  * -------------------------------------------------------------------- */
@@ -288,6 +289,9 @@ static void __init at91sam9260_register_clocks(void)
        clk_register(&pck0);
        clk_register(&pck1);
 }
+#else
+#define at91sam9260_register_clocks NULL
+#endif
 
 /* --------------------------------------------------------------------
  *  GPIO
index f302905..c074653 100644 (file)
 #include "at91_rstc.h"
 #include "soc.h"
 #include "generic.h"
-#include "clock.h"
 #include "sam9_smc.h"
 #include "pm.h"
 
+#if defined(CONFIG_OLD_CLK_AT91)
+#include "clock.h"
 /* --------------------------------------------------------------------
  *  Clocks
  * -------------------------------------------------------------------- */
@@ -280,6 +281,9 @@ static void __init at91sam9263_register_clocks(void)
        clk_register(&pck2);
        clk_register(&pck3);
 }
+#else
+#define at91sam9263_register_clocks NULL
+#endif
 
 /* --------------------------------------------------------------------
  *  GPIO
index 9d3d544..0d5d857 100644 (file)
 #include "at91_aic.h"
 #include "soc.h"
 #include "generic.h"
-#include "clock.h"
 #include "sam9_smc.h"
 #include "pm.h"
 
+#if defined(CONFIG_OLD_CLK_AT91)
+#include "clock.h"
 /* --------------------------------------------------------------------
  *  Clocks
  * -------------------------------------------------------------------- */
@@ -331,6 +332,9 @@ static void __init at91sam9g45_register_clocks(void)
        clk_register(&pck0);
        clk_register(&pck1);
 }
+#else
+#define at91sam9g45_register_clocks NULL
+#endif
 
 /* --------------------------------------------------------------------
  *  GPIO
index 4b51857..2bc7b97 100644 (file)
@@ -65,18 +65,8 @@ config IMX_HAVE_IOMUX_V1
 config ARCH_MXC_IOMUX_V3
        bool
 
-config ARCH_MX1
-       bool
-
-config ARCH_MX25
-       bool
-
-config MACH_MX27
-       bool
-
 config SOC_IMX1
        bool
-       select ARCH_MX1
        select CPU_ARM920T
        select IMX_HAVE_IOMUX_V1
        select MXC_AVIC
@@ -89,7 +79,6 @@ config SOC_IMX21
 
 config SOC_IMX25
        bool
-       select ARCH_MX25
        select ARCH_MXC_IOMUX_V3
        select CPU_ARM926T
        select MXC_AVIC
@@ -100,7 +89,6 @@ config SOC_IMX27
        select ARCH_HAS_OPP
        select CPU_ARM926T
        select IMX_HAVE_IOMUX_V1
-       select MACH_MX27
        select MXC_AVIC
        select PINCTRL_IMX27
 
@@ -119,18 +107,6 @@ config SOC_IMX35
        select PINCTRL_IMX35
        select SMP_ON_UP if SMP
 
-config SOC_IMX5
-       bool
-       select ARCH_HAS_OPP
-       select ARCH_MXC_IOMUX_V3
-       select MXC_TZIC
-
-config SOC_IMX51
-       bool
-       select HAVE_IMX_SRC
-       select PINCTRL_IMX51
-       select SOC_IMX5
-
 if ARCH_MULTI_V4T
 
 comment "MX1 platforms:"
@@ -366,15 +342,6 @@ config MACH_IMX27_VISSTRIM_M10
          This includes specific configurations for the board and its
          peripherals.
 
-config MACH_IMX27LITE
-       bool "LogicPD MX27 LITEKIT platform"
-       select IMX_HAVE_PLATFORM_IMX_SSI
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select SOC_IMX27
-       help
-         Include support for MX27 LITEKIT platform. This includes specific
-         configurations for the board and its peripherals.
-
 config MACH_PCA100
        bool "Phytec phyCARD-s (pca100)"
        select IMX_HAVE_PLATFORM_FSL_USB2_UDC
@@ -406,15 +373,6 @@ config MACH_MXT_TD60
          Include support for i-MXT (aka td60) platform. This
          includes specific configurations for the module and its peripherals.
 
-config MACH_IMX27IPCAM
-       bool "IMX27 IPCAM platform"
-       select IMX_HAVE_PLATFORM_IMX2_WDT
-       select IMX_HAVE_PLATFORM_IMX_UART
-       select SOC_IMX27
-       help
-         Include support for IMX27 IPCAM platform. This includes specific
-         configurations for the board and its peripherals.
-
 config MACH_IMX27_DT
        bool "Support i.MX27 platforms from device tree"
        select SOC_IMX27
@@ -700,24 +658,29 @@ if ARCH_MULTI_V7
 
 comment "Device tree only"
 
+config SOC_IMX5
+       bool
+       select ARCH_HAS_OPP
+       select HAVE_IMX_SRC
+       select MXC_TZIC
+
 config SOC_IMX50
        bool "i.MX50 support"
-       select HAVE_IMX_SRC
        select PINCTRL_IMX50
        select SOC_IMX5
 
        help
          This enables support for Freescale i.MX50 processor.
 
-config MACH_IMX51_DT
+config SOC_IMX51
        bool "i.MX51 support"
-       select SOC_IMX51
+       select PINCTRL_IMX51
+       select SOC_IMX5
        help
          This enables support for Freescale i.MX51 processor
 
 config SOC_IMX53
        bool "i.MX53 support"
-       select HAVE_IMX_SRC
        select PINCTRL_IMX53
        select SOC_IMX5
 
@@ -734,8 +697,6 @@ config SOC_IMX6
        select HAVE_IMX_MMDC
        select HAVE_IMX_SRC
        select MFD_SYSCON
-       select PL310_ERRATA_588369 if CACHE_L2X0
-       select PL310_ERRATA_727915 if CACHE_L2X0
        select PL310_ERRATA_769419 if CACHE_L2X0
 
 config SOC_IMX6Q
@@ -771,8 +732,6 @@ config SOC_VF610
        select ARM_GIC
        select PINCTRL_VF610
        select VF_PIT_TIMER
-       select PL310_ERRATA_588369 if CACHE_L2X0
-       select PL310_ERRATA_727915 if CACHE_L2X0
        select PL310_ERRATA_769419 if CACHE_L2X0
 
        help
index bbe93bb..ac88599 100644 (file)
@@ -12,7 +12,7 @@ obj-$(CONFIG_SOC_IMX31) += mm-imx3.o cpu-imx31.o clk-imx31.o iomux-imx31.o ehci-
 obj-$(CONFIG_SOC_IMX35) += mm-imx3.o cpu-imx35.o clk-imx35.o ehci-imx35.o pm-imx3.o
 
 imx5-pm-$(CONFIG_PM) += pm-imx5.o
-obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y)
+obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o clk-imx51-imx53.o $(imx5-pm-y)
 
 obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
                            clk-pfd.o clk-busy.o clk.o \
@@ -31,6 +31,8 @@ ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_SOC_IMX5) += cpuidle-imx5.o
 obj-$(CONFIG_SOC_IMX6Q) += cpuidle-imx6q.o
 obj-$(CONFIG_SOC_IMX6SL) += cpuidle-imx6sl.o
+# i.MX6SX reuses i.MX6Q cpuidle driver
+obj-$(CONFIG_SOC_IMX6SX) += cpuidle-imx6q.o
 endif
 
 ifdef CONFIG_SND_IMX_SOC
@@ -38,9 +40,6 @@ obj-y += ssi-fiq.o
 obj-y += ssi-fiq-ksym.o
 endif
 
-# Support for CMOS sensor interface
-obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
-
 # i.MX1 based machines
 obj-$(CONFIG_ARCH_MX1ADS) += mach-mx1ads.o
 obj-$(CONFIG_MACH_SCB9328) += mach-scb9328.o
@@ -60,13 +59,11 @@ obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
 obj-$(CONFIG_MACH_PCM038) += mach-pcm038.o
 obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o
 obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o
-obj-$(CONFIG_MACH_IMX27LITE) += mach-imx27lite.o
 obj-$(CONFIG_MACH_IMX27_VISSTRIM_M10) += mach-imx27_visstrim_m10.o
 obj-$(CONFIG_MACH_CPUIMX27) += mach-cpuimx27.o
 obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
 obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
 obj-$(CONFIG_MACH_MXT_TD60) += mach-mxt_td60.o
-obj-$(CONFIG_MACH_IMX27IPCAM) += mach-imx27ipcam.o
 obj-$(CONFIG_MACH_IMX27_DT) += imx27-dt.o
 
 # i.MX31 based machines
@@ -109,8 +106,8 @@ obj-$(CONFIG_SOC_IMX6) += suspend-imx6.o
 endif
 obj-$(CONFIG_SOC_IMX6) += pm-imx6.o
 
-obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
 obj-$(CONFIG_SOC_IMX50) += mach-imx50.o
+obj-$(CONFIG_SOC_IMX51) += mach-imx51.o
 obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
 
 obj-$(CONFIG_SOC_VF610) += clk-vf610.o mach-vf610.o
index 7f739be..37c307a 100644 (file)
  * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/clk.h>
-#include <linux/io.h>
 #include <linux/clkdev.h>
+#include <linux/clk-provider.h>
 #include <linux/err.h>
+#include <linux/init.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <dt-bindings/clock/imx1-clock.h>
 
 #include "clk.h"
 #include "common.h"
 #include "hardware.h"
 
-/* CCM register addresses */
-#define IO_ADDR_CCM(off)       (MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR + (off)))
-
-#define CCM_CSCR       IO_ADDR_CCM(0x0)
-#define CCM_MPCTL0     IO_ADDR_CCM(0x4)
-#define CCM_SPCTL0     IO_ADDR_CCM(0xc)
-#define CCM_PCDR       IO_ADDR_CCM(0x20)
-
-/* SCM register addresses */
-#define IO_ADDR_SCM(off)       (MX1_IO_ADDRESS(MX1_SCM_BASE_ADDR + (off)))
-
-#define SCM_GCCR       IO_ADDR_SCM(0xc)
-
 static const char *prem_sel_clks[] = { "clk32_premult", "clk16m", };
 static const char *clko_sel_clks[] = { "per1", "hclk", "clk48m", "clk16m",
                                       "prem", "fclk", };
 
-enum imx1_clks {
-       dummy, clk32, clk16m_ext, clk16m, clk32_premult, prem, mpll, mpll_gate,
-       spll, spll_gate, mcu, fclk, hclk, clk48m, per1, per2, per3, clko,
-       uart3_gate, ssi2_gate, brom_gate, dma_gate, csi_gate, mma_gate,
-       usbd_gate, clk_max
-};
+static struct clk *clk[IMX1_CLK_MAX];
+static struct clk_onecell_data clk_data;
 
-static struct clk *clk[clk_max];
+static void __iomem *ccm __initdata;
+#define CCM_CSCR       (ccm + 0x0000)
+#define CCM_MPCTL0     (ccm + 0x0004)
+#define CCM_SPCTL0     (ccm + 0x000c)
+#define CCM_PCDR       (ccm + 0x0020)
+#define SCM_GCCR       (ccm + 0x0810)
 
-int __init mx1_clocks_init(unsigned long fref)
+static void __init _mx1_clocks_init(unsigned long fref)
 {
-       int i;
+       clk[IMX1_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
+       clk[IMX1_CLK_CLK32] = imx_obtain_fixed_clock("clk32", fref);
+       clk[IMX1_CLK_CLK16M_EXT] = imx_clk_fixed("clk16m_ext", 16000000);
+       clk[IMX1_CLK_CLK16M] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17);
+       clk[IMX1_CLK_CLK32_PREMULT] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1);
+       clk[IMX1_CLK_PREM] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks, ARRAY_SIZE(prem_sel_clks));
+       clk[IMX1_CLK_MPLL] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0);
+       clk[IMX1_CLK_MPLL_GATE] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0);
+       clk[IMX1_CLK_SPLL] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0);
+       clk[IMX1_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
+       clk[IMX1_CLK_MCU] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1);
+       clk[IMX1_CLK_FCLK] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1);
+       clk[IMX1_CLK_HCLK] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4);
+       clk[IMX1_CLK_CLK48M] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3);
+       clk[IMX1_CLK_PER1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4);
+       clk[IMX1_CLK_PER2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4);
+       clk[IMX1_CLK_PER3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7);
+       clk[IMX1_CLK_CLKO] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks, ARRAY_SIZE(clko_sel_clks));
+       clk[IMX1_CLK_UART3_GATE] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6);
+       clk[IMX1_CLK_SSI2_GATE] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5);
+       clk[IMX1_CLK_BROM_GATE] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4);
+       clk[IMX1_CLK_DMA_GATE] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3);
+       clk[IMX1_CLK_CSI_GATE] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2);
+       clk[IMX1_CLK_MMA_GATE] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1);
+       clk[IMX1_CLK_USBD_GATE] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0);
+
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
+}
 
-       clk[dummy] = imx_clk_fixed("dummy", 0);
-       clk[clk32] = imx_clk_fixed("clk32", fref);
-       clk[clk16m_ext] = imx_clk_fixed("clk16m_ext", 16000000);
-       clk[clk16m] = imx_clk_gate("clk16m", "clk16m_ext", CCM_CSCR, 17);
-       clk[clk32_premult] = imx_clk_fixed_factor("clk32_premult", "clk32", 512, 1);
-       clk[prem] = imx_clk_mux("prem", CCM_CSCR, 16, 1, prem_sel_clks,
-                       ARRAY_SIZE(prem_sel_clks));
-       clk[mpll] = imx_clk_pllv1("mpll", "clk32_premult", CCM_MPCTL0);
-       clk[mpll_gate] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0);
-       clk[spll] = imx_clk_pllv1("spll", "prem", CCM_SPCTL0);
-       clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
-       clk[mcu] = imx_clk_divider("mcu", "clk32_premult", CCM_CSCR, 15, 1);
-       clk[fclk] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 15, 1);
-       clk[hclk] = imx_clk_divider("hclk", "spll_gate", CCM_CSCR, 10, 4);
-       clk[clk48m] = imx_clk_divider("clk48m", "spll_gate", CCM_CSCR, 26, 3);
-       clk[per1] = imx_clk_divider("per1", "spll_gate", CCM_PCDR, 0, 4);
-       clk[per2] = imx_clk_divider("per2", "spll_gate", CCM_PCDR, 4, 4);
-       clk[per3] = imx_clk_divider("per3", "spll_gate", CCM_PCDR, 16, 7);
-       clk[clko] = imx_clk_mux("clko", CCM_CSCR, 29, 3, clko_sel_clks,
-                       ARRAY_SIZE(clko_sel_clks));
-       clk[uart3_gate] = imx_clk_gate("uart3_gate", "hclk", SCM_GCCR, 6);
-       clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "hclk", SCM_GCCR, 5);
-       clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", SCM_GCCR, 4);
-       clk[dma_gate] = imx_clk_gate("dma_gate", "hclk", SCM_GCCR, 3);
-       clk[csi_gate] = imx_clk_gate("csi_gate", "hclk", SCM_GCCR, 2);
-       clk[mma_gate] = imx_clk_gate("mma_gate", "hclk", SCM_GCCR, 1);
-       clk[usbd_gate] = imx_clk_gate("usbd_gate", "clk48m", SCM_GCCR, 0);
+int __init mx1_clocks_init(unsigned long fref)
+{
+       ccm = MX1_IO_ADDRESS(MX1_CCM_BASE_ADDR);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("imx1 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       _mx1_clocks_init(fref);
 
-       clk_register_clkdev(clk[dma_gate], "ahb", "imx1-dma");
-       clk_register_clkdev(clk[hclk], "ipg", "imx1-dma");
-       clk_register_clkdev(clk[per1], "per", "imx-gpt.0");
-       clk_register_clkdev(clk[hclk], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[per1], "per", "imx1-uart.0");
-       clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.0");
-       clk_register_clkdev(clk[per1], "per", "imx1-uart.1");
-       clk_register_clkdev(clk[hclk], "ipg", "imx1-uart.1");
-       clk_register_clkdev(clk[per1], "per", "imx1-uart.2");
-       clk_register_clkdev(clk[uart3_gate], "ipg", "imx1-uart.2");
-       clk_register_clkdev(clk[hclk], NULL, "imx1-i2c.0");
-       clk_register_clkdev(clk[per2], "per", "imx1-cspi.0");
-       clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.0");
-       clk_register_clkdev(clk[per2], "per", "imx1-cspi.1");
-       clk_register_clkdev(clk[dummy], "ipg", "imx1-cspi.1");
-       clk_register_clkdev(clk[per2], "per", "imx1-fb.0");
-       clk_register_clkdev(clk[dummy], "ipg", "imx1-fb.0");
-       clk_register_clkdev(clk[dummy], "ahb", "imx1-fb.0");
+       clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX1_CLK_DMA_GATE], "ahb", "imx1-dma");
+       clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-dma");
+       clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.0");
+       clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.0");
+       clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.1");
+       clk_register_clkdev(clk[IMX1_CLK_HCLK], "ipg", "imx1-uart.1");
+       clk_register_clkdev(clk[IMX1_CLK_PER1], "per", "imx1-uart.2");
+       clk_register_clkdev(clk[IMX1_CLK_UART3_GATE], "ipg", "imx1-uart.2");
+       clk_register_clkdev(clk[IMX1_CLK_HCLK], NULL, "imx1-i2c.0");
+       clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.0");
+       clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.0");
+       clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-cspi.1");
+       clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-cspi.1");
+       clk_register_clkdev(clk[IMX1_CLK_PER2], "per", "imx1-fb.0");
+       clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ipg", "imx1-fb.0");
+       clk_register_clkdev(clk[IMX1_CLK_DUMMY], "ahb", "imx1-fb.0");
 
        mxc_timer_init(MX1_IO_ADDRESS(MX1_TIM1_BASE_ADDR), MX1_TIM1_INT);
 
        return 0;
 }
+
+static void __init mx1_clocks_init_dt(struct device_node *np)
+{
+       ccm = of_iomap(np, 0);
+       BUG_ON(!ccm);
+
+       _mx1_clocks_init(32768);
+
+       clk_data.clks = clk;
+       clk_data.clk_num = ARRAY_SIZE(clk);
+       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+}
+CLK_OF_DECLARE(imx1_ccm, "fsl,imx1-ccm", mx1_clocks_init_dt);
index bdc2e46..4b4c753 100644 (file)
  * 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
  */
 
 #include <linux/clk.h>
-#include <linux/clkdev.h>
 #include <linux/clk-provider.h>
-#include <linux/io.h>
-#include <linux/module.h>
-#include <linux/err.h>
+#include <linux/clkdev.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <dt-bindings/clock/imx21-clock.h>
 
 #include "clk.h"
 #include "common.h"
 #include "hardware.h"
 
-#define IO_ADDR_CCM(off)       (MX21_IO_ADDRESS(MX21_CCM_BASE_ADDR + (off)))
+static void __iomem *ccm __initdata;
 
 /* Register offsets */
-#define CCM_CSCR               IO_ADDR_CCM(0x0)
-#define CCM_MPCTL0             IO_ADDR_CCM(0x4)
-#define CCM_MPCTL1             IO_ADDR_CCM(0x8)
-#define CCM_SPCTL0             IO_ADDR_CCM(0xc)
-#define CCM_SPCTL1             IO_ADDR_CCM(0x10)
-#define CCM_OSC26MCTL          IO_ADDR_CCM(0x14)
-#define CCM_PCDR0              IO_ADDR_CCM(0x18)
-#define CCM_PCDR1              IO_ADDR_CCM(0x1c)
-#define CCM_PCCR0              IO_ADDR_CCM(0x20)
-#define CCM_PCCR1              IO_ADDR_CCM(0x24)
-#define CCM_CCSR               IO_ADDR_CCM(0x28)
-#define CCM_PMCTL              IO_ADDR_CCM(0x2c)
-#define CCM_PMCOUNT            IO_ADDR_CCM(0x30)
-#define CCM_WKGDCTL            IO_ADDR_CCM(0x34)
-
-static const char *mpll_sel_clks[] = { "fpm", "ckih", };
-static const char *spll_sel_clks[] = { "fpm", "ckih", };
-
-enum imx21_clks {
-       ckil, ckih, fpm, mpll_sel, spll_sel, mpll, spll, fclk, hclk, ipg, per1,
-       per2, per3, per4, uart1_ipg_gate, uart2_ipg_gate, uart3_ipg_gate,
-       uart4_ipg_gate, gpt1_ipg_gate, gpt2_ipg_gate, gpt3_ipg_gate,
-       pwm_ipg_gate, sdhc1_ipg_gate, sdhc2_ipg_gate, lcdc_ipg_gate,
-       lcdc_hclk_gate, cspi3_ipg_gate, cspi2_ipg_gate, cspi1_ipg_gate,
-       per4_gate, csi_hclk_gate, usb_div, usb_gate, usb_hclk_gate, ssi1_gate,
-       ssi2_gate, nfc_div, nfc_gate, dma_gate, dma_hclk_gate, brom_gate,
-       emma_gate, emma_hclk_gate, slcdc_gate, slcdc_hclk_gate, wdog_gate,
-       gpio_gate, i2c_gate, kpp_gate, owire_gate, rtc_gate, clk_max
-};
-
-static struct clk *clk[clk_max];
+#define CCM_CSCR       (ccm + 0x00)
+#define CCM_MPCTL0     (ccm + 0x04)
+#define CCM_SPCTL0     (ccm + 0x0c)
+#define CCM_PCDR0      (ccm + 0x18)
+#define CCM_PCDR1      (ccm + 0x1c)
+#define CCM_PCCR0      (ccm + 0x20)
+#define CCM_PCCR1      (ccm + 0x24)
+
+static const char *mpll_osc_sel_clks[] = { "ckih_gate", "ckih_div1p5", };
+static const char *mpll_sel_clks[] = { "fpm_gate", "mpll_osc_sel", };
+static const char *spll_sel_clks[] = { "fpm_gate", "mpll_osc_sel", };
+static const char *ssi_sel_clks[] = { "spll_gate", "mpll_gate", };
+
+static struct clk *clk[IMX21_CLK_MAX];
+static struct clk_onecell_data clk_data;
+
+static void __init _mx21_clocks_init(unsigned long lref, unsigned long href)
+{
+       BUG_ON(!ccm);
+
+       clk[IMX21_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
+       clk[IMX21_CLK_CKIL] = imx_obtain_fixed_clock("ckil", lref);
+       clk[IMX21_CLK_CKIH] = imx_obtain_fixed_clock("ckih", href);
+       clk[IMX21_CLK_FPM] = imx_clk_fixed_factor("fpm", "ckil", 512, 1);
+       clk[IMX21_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih_gate", 2, 3);
+
+       clk[IMX21_CLK_MPLL_GATE] = imx_clk_gate("mpll_gate", "mpll", CCM_CSCR, 0);
+       clk[IMX21_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
+       clk[IMX21_CLK_FPM_GATE] = imx_clk_gate("fpm_gate", "fpm", CCM_CSCR, 2);
+       clk[IMX21_CLK_CKIH_GATE] = imx_clk_gate_dis("ckih_gate", "ckih", CCM_CSCR, 3);
+       clk[IMX21_CLK_MPLL_OSC_SEL] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, mpll_osc_sel_clks, ARRAY_SIZE(mpll_osc_sel_clks));
+       clk[IMX21_CLK_IPG] = imx_clk_divider("ipg", "hclk", CCM_CSCR, 9, 1);
+       clk[IMX21_CLK_HCLK] = imx_clk_divider("hclk", "fclk", CCM_CSCR, 10, 4);
+       clk[IMX21_CLK_MPLL_SEL] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, ARRAY_SIZE(mpll_sel_clks));
+       clk[IMX21_CLK_SPLL_SEL] = imx_clk_mux("spll_sel", CCM_CSCR, 17, 1, spll_sel_clks, ARRAY_SIZE(spll_sel_clks));
+       clk[IMX21_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", CCM_CSCR, 19, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
+       clk[IMX21_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", CCM_CSCR, 20, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
+       clk[IMX21_CLK_USB_DIV] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 26, 3);
+       clk[IMX21_CLK_FCLK] = imx_clk_divider("fclk", "mpll_gate", CCM_CSCR, 29, 3);
+
+       clk[IMX21_CLK_MPLL] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0);
+
+       clk[IMX21_CLK_SPLL] = imx_clk_pllv1("spll", "spll_sel", CCM_SPCTL0);
+
+       clk[IMX21_CLK_NFC_DIV] = imx_clk_divider("nfc_div", "fclk", CCM_PCDR0, 12, 4);
+       clk[IMX21_CLK_SSI1_DIV] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6);
+       clk[IMX21_CLK_SSI2_DIV] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6);
+
+       clk[IMX21_CLK_PER1] = imx_clk_divider("per1", "mpll_gate", CCM_PCDR1, 0, 6);
+       clk[IMX21_CLK_PER2] = imx_clk_divider("per2", "mpll_gate", CCM_PCDR1, 8, 6);
+       clk[IMX21_CLK_PER3] = imx_clk_divider("per3", "mpll_gate", CCM_PCDR1, 16, 6);
+       clk[IMX21_CLK_PER4] = imx_clk_divider("per4", "mpll_gate", CCM_PCDR1, 24, 6);
+
+       clk[IMX21_CLK_UART1_IPG_GATE] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR0, 0);
+       clk[IMX21_CLK_UART2_IPG_GATE] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR0, 1);
+       clk[IMX21_CLK_UART3_IPG_GATE] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR0, 2);
+       clk[IMX21_CLK_UART4_IPG_GATE] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR0, 3);
+       clk[IMX21_CLK_CSPI1_IPG_GATE] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 4);
+       clk[IMX21_CLK_CSPI2_IPG_GATE] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 5);
+       clk[IMX21_CLK_SSI1_GATE] = imx_clk_gate("ssi1_gate", "ipg", CCM_PCCR0, 6);
+       clk[IMX21_CLK_SSI2_GATE] = imx_clk_gate("ssi2_gate", "ipg", CCM_PCCR0, 7);
+       clk[IMX21_CLK_SDHC1_IPG_GATE] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 9);
+       clk[IMX21_CLK_SDHC2_IPG_GATE] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 10);
+       clk[IMX21_CLK_GPIO_GATE] = imx_clk_gate("gpio_gate", "ipg", CCM_PCCR0, 11);
+       clk[IMX21_CLK_I2C_GATE] = imx_clk_gate("i2c_gate", "ipg", CCM_PCCR0, 12);
+       clk[IMX21_CLK_DMA_GATE] = imx_clk_gate("dma_gate", "ipg", CCM_PCCR0, 13);
+       clk[IMX21_CLK_USB_GATE] = imx_clk_gate("usb_gate", "usb_div", CCM_PCCR0, 14);
+       clk[IMX21_CLK_EMMA_GATE] = imx_clk_gate("emma_gate", "ipg", CCM_PCCR0, 15);
+       clk[IMX21_CLK_SSI2_BAUD_GATE] = imx_clk_gate("ssi2_baud_gate", "ipg", CCM_PCCR0, 16);
+       clk[IMX21_CLK_SSI1_BAUD_GATE] = imx_clk_gate("ssi1_baud_gate", "ipg", CCM_PCCR0, 17);
+       clk[IMX21_CLK_LCDC_IPG_GATE] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 18);
+       clk[IMX21_CLK_NFC_GATE] = imx_clk_gate("nfc_gate", "nfc_div", CCM_PCCR0, 19);
+       clk[IMX21_CLK_SLCDC_HCLK_GATE] = imx_clk_gate("slcdc_hclk_gate", "hclk", CCM_PCCR0, 21);
+       clk[IMX21_CLK_PER4_GATE] = imx_clk_gate("per4_gate", "per4", CCM_PCCR0, 22);
+       clk[IMX21_CLK_BMI_GATE] = imx_clk_gate("bmi_gate", "hclk", CCM_PCCR0, 23);
+       clk[IMX21_CLK_USB_HCLK_GATE] = imx_clk_gate("usb_hclk_gate", "hclk", CCM_PCCR0, 24);
+       clk[IMX21_CLK_SLCDC_GATE] = imx_clk_gate("slcdc_gate", "hclk", CCM_PCCR0, 25);
+       clk[IMX21_CLK_LCDC_HCLK_GATE] = imx_clk_gate("lcdc_hclk_gate", "hclk", CCM_PCCR0, 26);
+       clk[IMX21_CLK_EMMA_HCLK_GATE] = imx_clk_gate("emma_hclk_gate", "hclk", CCM_PCCR0, 27);
+       clk[IMX21_CLK_BROM_GATE] = imx_clk_gate("brom_gate", "hclk", CCM_PCCR0, 28);
+       clk[IMX21_CLK_DMA_HCLK_GATE] = imx_clk_gate("dma_hclk_gate", "hclk", CCM_PCCR0, 30);
+       clk[IMX21_CLK_CSI_HCLK_GATE] = imx_clk_gate("csi_hclk_gate", "hclk", CCM_PCCR0, 31);
+
+       clk[IMX21_CLK_CSPI3_IPG_GATE] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR1, 23);
+       clk[IMX21_CLK_WDOG_GATE] = imx_clk_gate("wdog_gate", "ipg", CCM_PCCR1, 24);
+       clk[IMX21_CLK_GPT1_IPG_GATE] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR1, 25);
+       clk[IMX21_CLK_GPT2_IPG_GATE] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR1, 26);
+       clk[IMX21_CLK_GPT3_IPG_GATE] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR1, 27);
+       clk[IMX21_CLK_PWM_IPG_GATE] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR1, 28);
+       clk[IMX21_CLK_RTC_GATE] = imx_clk_gate("rtc_gate", "ipg", CCM_PCCR1, 29);
+       clk[IMX21_CLK_KPP_GATE] = imx_clk_gate("kpp_gate", "ipg", CCM_PCCR1, 30);
+       clk[IMX21_CLK_OWIRE_GATE] = imx_clk_gate("owire_gate", "ipg", CCM_PCCR1, 31);
+
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
+}
 
-/*
- * must be called very early to get information about the
- * available clock rate when the timer framework starts
- */
 int __init mx21_clocks_init(unsigned long lref, unsigned long href)
 {
-       int i;
-
-       clk[ckil] = imx_clk_fixed("ckil", lref);
-       clk[ckih] = imx_clk_fixed("ckih", href);
-       clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 512, 1);
-       clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks,
-                       ARRAY_SIZE(mpll_sel_clks));
-       clk[spll_sel] = imx_clk_mux("spll_sel", CCM_CSCR, 17, 1, spll_sel_clks,
-                       ARRAY_SIZE(spll_sel_clks));
-       clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0);
-       clk[spll] = imx_clk_pllv1("spll", "spll_sel", CCM_SPCTL0);
-       clk[fclk] = imx_clk_divider("fclk", "mpll", CCM_CSCR, 29, 3);
-       clk[hclk] = imx_clk_divider("hclk", "fclk", CCM_CSCR, 10, 4);
-       clk[ipg] = imx_clk_divider("ipg", "hclk", CCM_CSCR, 9, 1);
-       clk[per1] = imx_clk_divider("per1", "mpll", CCM_PCDR1, 0, 6);
-       clk[per2] = imx_clk_divider("per2", "mpll", CCM_PCDR1, 8, 6);
-       clk[per3] = imx_clk_divider("per3", "mpll", CCM_PCDR1, 16, 6);
-       clk[per4] = imx_clk_divider("per4", "mpll", CCM_PCDR1, 24, 6);
-       clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR0, 0);
-       clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR0, 1);
-       clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR0, 2);
-       clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR0, 3);
-       clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR1, 25);
-       clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR1, 26);
-       clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR1, 27);
-       clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR1, 28);
-       clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 9);
-       clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 10);
-       clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 18);
-       clk[lcdc_hclk_gate] = imx_clk_gate("lcdc_hclk_gate", "hclk", CCM_PCCR0, 26);
-       clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR1, 23);
-       clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 5);
-       clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 4);
-       clk[per4_gate] = imx_clk_gate("per4_gate", "per4", CCM_PCCR0, 22);
-       clk[csi_hclk_gate] = imx_clk_gate("csi_hclk_gate", "hclk", CCM_PCCR0, 31);
-       clk[usb_div] = imx_clk_divider("usb_div", "spll", CCM_CSCR, 26, 3);
-       clk[usb_gate] = imx_clk_gate("usb_gate", "usb_div", CCM_PCCR0, 14);
-       clk[usb_hclk_gate] = imx_clk_gate("usb_hclk_gate", "hclk", CCM_PCCR0, 24);
-       clk[ssi1_gate] = imx_clk_gate("ssi1_gate", "ipg", CCM_PCCR0, 6);
-       clk[ssi2_gate] = imx_clk_gate("ssi2_gate", "ipg", CCM_PCCR0, 7);
-       clk[nfc_div] = imx_clk_divider("nfc_div", "ipg", CCM_PCDR0, 12, 4);
-       clk[nfc_gate] = imx_clk_gate("nfc_gate", "nfc_div", CCM_PCCR0, 19);
-       clk[dma_gate] = imx_clk_gate("dma_gate", "ipg", CCM_PCCR0, 13);
-       clk[dma_hclk_gate] = imx_clk_gate("dma_hclk_gate", "hclk", CCM_PCCR0, 30);
-       clk[brom_gate] = imx_clk_gate("brom_gate", "hclk", CCM_PCCR0, 28);
-       clk[emma_gate] = imx_clk_gate("emma_gate", "ipg", CCM_PCCR0, 15);
-       clk[emma_hclk_gate] = imx_clk_gate("emma_hclk_gate", "hclk", CCM_PCCR0, 27);
-       clk[slcdc_gate] = imx_clk_gate("slcdc_gate", "ipg", CCM_PCCR0, 25);
-       clk[slcdc_hclk_gate] = imx_clk_gate("slcdc_hclk_gate", "hclk", CCM_PCCR0, 21);
-       clk[wdog_gate] = imx_clk_gate("wdog_gate", "ipg", CCM_PCCR1, 24);
-       clk[gpio_gate] = imx_clk_gate("gpio_gate", "ipg", CCM_PCCR0, 11);
-       clk[i2c_gate] = imx_clk_gate("i2c_gate", "ipg", CCM_PCCR0, 12);
-       clk[kpp_gate] = imx_clk_gate("kpp_gate", "ipg", CCM_PCCR1, 30);
-       clk[owire_gate] = imx_clk_gate("owire_gate", "ipg", CCM_PCCR1, 31);
-       clk[rtc_gate] = imx_clk_gate("rtc_gate", "ipg", CCM_PCCR1, 29);
-
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX21 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
-
-       clk_register_clkdev(clk[per1], "per1", NULL);
-       clk_register_clkdev(clk[per2], "per2", NULL);
-       clk_register_clkdev(clk[per3], "per3", NULL);
-       clk_register_clkdev(clk[per4], "per4", NULL);
-       clk_register_clkdev(clk[per1], "per", "imx21-uart.0");
-       clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0");
-       clk_register_clkdev(clk[per1], "per", "imx21-uart.1");
-       clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1");
-       clk_register_clkdev(clk[per1], "per", "imx21-uart.2");
-       clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2");
-       clk_register_clkdev(clk[per1], "per", "imx21-uart.3");
-       clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3");
-       clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[per1], "per", "imx-gpt.0");
-       clk_register_clkdev(clk[gpt2_ipg_gate], "ipg", "imx-gpt.1");
-       clk_register_clkdev(clk[per1], "per", "imx-gpt.1");
-       clk_register_clkdev(clk[gpt3_ipg_gate], "ipg", "imx-gpt.2");
-       clk_register_clkdev(clk[per1], "per", "imx-gpt.2");
-       clk_register_clkdev(clk[per2], "per", "imx21-cspi.0");
-       clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx21-cspi.0");
-       clk_register_clkdev(clk[per2], "per", "imx21-cspi.1");
-       clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx21-cspi.1");
-       clk_register_clkdev(clk[per2], "per", "imx21-cspi.2");
-       clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx21-cspi.2");
-       clk_register_clkdev(clk[per3], "per", "imx21-fb.0");
-       clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
-       clk_register_clkdev(clk[lcdc_hclk_gate], "ahb", "imx21-fb.0");
-       clk_register_clkdev(clk[usb_gate], "per", "imx21-hcd.0");
-       clk_register_clkdev(clk[usb_hclk_gate], "ahb", "imx21-hcd.0");
-       clk_register_clkdev(clk[nfc_gate], NULL, "imx21-nand.0");
-       clk_register_clkdev(clk[dma_hclk_gate], "ahb", "imx21-dma");
-       clk_register_clkdev(clk[dma_gate], "ipg", "imx21-dma");
-       clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
-       clk_register_clkdev(clk[i2c_gate], NULL, "imx21-i2c.0");
-       clk_register_clkdev(clk[kpp_gate], NULL, "mxc-keypad");
-       clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1.0");
-       clk_register_clkdev(clk[brom_gate], "brom", NULL);
-       clk_register_clkdev(clk[emma_gate], "emma", NULL);
-       clk_register_clkdev(clk[slcdc_gate], "slcdc", NULL);
-       clk_register_clkdev(clk[gpio_gate], "gpio", NULL);
-       clk_register_clkdev(clk[rtc_gate], "rtc", NULL);
-       clk_register_clkdev(clk[csi_hclk_gate], "csi", NULL);
-       clk_register_clkdev(clk[ssi1_gate], "ssi1", NULL);
-       clk_register_clkdev(clk[ssi2_gate], "ssi2", NULL);
-       clk_register_clkdev(clk[sdhc1_ipg_gate], "sdhc1", NULL);
-       clk_register_clkdev(clk[sdhc2_ipg_gate], "sdhc2", NULL);
+       ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
+
+       _mx21_clocks_init(lref, href);
+
+       clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.0");
+       clk_register_clkdev(clk[IMX21_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0");
+       clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.1");
+       clk_register_clkdev(clk[IMX21_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1");
+       clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.2");
+       clk_register_clkdev(clk[IMX21_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2");
+       clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.3");
+       clk_register_clkdev(clk[IMX21_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3");
+       clk_register_clkdev(clk[IMX21_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.0");
+       clk_register_clkdev(clk[IMX21_CLK_CSPI1_IPG_GATE], "ipg", "imx21-cspi.0");
+       clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.1");
+       clk_register_clkdev(clk[IMX21_CLK_CSPI2_IPG_GATE], "ipg", "imx21-cspi.1");
+       clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.2");
+       clk_register_clkdev(clk[IMX21_CLK_CSPI3_IPG_GATE], "ipg", "imx21-cspi.2");
+       clk_register_clkdev(clk[IMX21_CLK_PER3], "per", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX21_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX21_CLK_LCDC_HCLK_GATE], "ahb", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX21_CLK_USB_GATE], "per", "imx21-hcd.0");
+       clk_register_clkdev(clk[IMX21_CLK_USB_HCLK_GATE], "ahb", "imx21-hcd.0");
+       clk_register_clkdev(clk[IMX21_CLK_NFC_GATE], NULL, "imx21-nand.0");
+       clk_register_clkdev(clk[IMX21_CLK_DMA_HCLK_GATE], "ahb", "imx21-dma");
+       clk_register_clkdev(clk[IMX21_CLK_DMA_GATE], "ipg", "imx21-dma");
+       clk_register_clkdev(clk[IMX21_CLK_WDOG_GATE], NULL, "imx2-wdt.0");
+       clk_register_clkdev(clk[IMX21_CLK_I2C_GATE], NULL, "imx21-i2c.0");
+       clk_register_clkdev(clk[IMX21_CLK_OWIRE_GATE], NULL, "mxc_w1.0");
 
        mxc_timer_init(MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR), MX21_INT_GPT1);
 
        return 0;
 }
+
+static void __init mx21_clocks_init_dt(struct device_node *np)
+{
+       ccm = of_iomap(np, 0);
+
+       _mx21_clocks_init(32768, 26000000);
+
+       clk_data.clks = clk;
+       clk_data.clk_num = ARRAY_SIZE(clk);
+       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+}
+CLK_OF_DECLARE(imx27_ccm, "fsl,imx21-ccm", mx21_clocks_init_dt);
index ae578c0..59c0c85 100644 (file)
@@ -32,8 +32,6 @@
 #include "hardware.h"
 #include "mx25.h"
 
-#define CRM_BASE       MX25_IO_ADDRESS(MX25_CRM_BASE_ADDR)
-
 #define CCM_MPCTL      0x00
 #define CCM_UPCTL      0x04
 #define CCM_CCTL       0x08
@@ -56,7 +54,7 @@
 #define CCM_LTR3       0x4c
 #define CCM_MCR                0x64
 
-#define ccm(x) (CRM_BASE + (x))
+#define ccm(x) (ccm_base + (x))
 
 static struct clk_onecell_data clk_data;
 
@@ -91,9 +89,10 @@ enum mx25_clks {
 
 static struct clk *clk[clk_max];
 
-static int __init __mx25_clocks_init(unsigned long osc_rate)
+static int __init __mx25_clocks_init(unsigned long osc_rate,
+                                    void __iomem *ccm_base)
 {
-       int i;
+       BUG_ON(!ccm_base);
 
        clk[dummy] = imx_clk_fixed("dummy", 0);
        clk[osc] = imx_clk_fixed("osc", osc_rate);
@@ -224,19 +223,13 @@ static int __init __mx25_clocks_init(unsigned long osc_rate)
        /* CCM_CGCR2(19): reserved in datasheet, but used as wdt in FSL kernel */
        clk[wdt_ipg] = imx_clk_gate("wdt_ipg", "ipg", ccm(CCM_CGCR2), 19);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX25 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_prepare_enable(clk[emi_ahb]);
 
        /* Clock source for gpt must be derived from AHB */
        clk_set_parent(clk[per5_sel], clk[ahb]);
 
-       clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
-
        /*
         * Let's initially set up CLKO parent as ipg, since this configuration
         * is used on some imx25 board designs to clock the audio codec.
@@ -248,8 +241,14 @@ static int __init __mx25_clocks_init(unsigned long osc_rate)
 
 int __init mx25_clocks_init(void)
 {
-       __mx25_clocks_init(24000000);
+       void __iomem *ccm;
 
+       ccm = ioremap(MX25_CRM_BASE_ADDR, SZ_16K);
+
+       __mx25_clocks_init(24000000, ccm);
+
+       clk_register_clkdev(clk[gpt1_ipg], "ipg", "imx-gpt.0");
+       clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
        /* i.mx25 has the i.mx21 type uart */
        clk_register_clkdev(clk[uart1_ipg], "ipg", "imx21-uart.0");
        clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.0");
@@ -314,29 +313,27 @@ int __init mx25_clocks_init(void)
        return 0;
 }
 
-int __init mx25_clocks_init_dt(void)
+static void __init mx25_clocks_init_dt(struct device_node *np)
 {
-       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(np, NULL, "fixed-clock") {
+       for_each_compatible_node(refnp, NULL, "fixed-clock") {
                u32 rate;
-               if (of_property_read_u32(np, "clock-frequency", &rate))
+               if (of_property_read_u32(refnp, "clock-frequency", &rate))
                        continue;
 
-               if (of_device_is_compatible(np, "fsl,imx-osc"))
+               if (of_device_is_compatible(refnp, "fsl,imx-osc"))
                        osc_rate = rate;
        }
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx25-ccm");
+       ccm = of_iomap(np, 0);
+       __mx25_clocks_init(osc_rate, ccm);
+
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
-
-       __mx25_clocks_init(osc_rate);
-
-       mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx25-gpt"));
-
-       return 0;
 }
+CLK_OF_DECLARE(imx25_ccm, "fsl,imx25-ccm", mx25_clocks_init_dt);
index 317a662..ab6349e 100644 (file)
@@ -1,61 +1,36 @@
 #include <linux/clk.h>
-#include <linux/io.h>
-#include <linux/module.h>
+#include <linux/clk-provider.h>
 #include <linux/clkdev.h>
 #include <linux/err.h>
-#include <linux/clk-provider.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
+#include <dt-bindings/clock/imx27-clock.h>
 
 #include "clk.h"
 #include "common.h"
 #include "hardware.h"
 
-#define IO_ADDR_CCM(off)       (MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR + (off)))
+static void __iomem *ccm __initdata;
 
 /* Register offsets */
-#define CCM_CSCR               IO_ADDR_CCM(0x0)
-#define CCM_MPCTL0             IO_ADDR_CCM(0x4)
-#define CCM_MPCTL1             IO_ADDR_CCM(0x8)
-#define CCM_SPCTL0             IO_ADDR_CCM(0xc)
-#define CCM_SPCTL1             IO_ADDR_CCM(0x10)
-#define CCM_OSC26MCTL          IO_ADDR_CCM(0x14)
-#define CCM_PCDR0              IO_ADDR_CCM(0x18)
-#define CCM_PCDR1              IO_ADDR_CCM(0x1c)
-#define CCM_PCCR0              IO_ADDR_CCM(0x20)
-#define CCM_PCCR1              IO_ADDR_CCM(0x24)
-#define CCM_CCSR               IO_ADDR_CCM(0x28)
-#define CCM_PMCTL              IO_ADDR_CCM(0x2c)
-#define CCM_PMCOUNT            IO_ADDR_CCM(0x30)
-#define CCM_WKGDCTL            IO_ADDR_CCM(0x34)
-
-#define CCM_CSCR_UPDATE_DIS    (1 << 31)
-#define CCM_CSCR_SSI2          (1 << 23)
-#define CCM_CSCR_SSI1          (1 << 22)
-#define CCM_CSCR_VPU           (1 << 21)
-#define CCM_CSCR_MSHC           (1 << 20)
-#define CCM_CSCR_SPLLRES        (1 << 19)
-#define CCM_CSCR_MPLLRES        (1 << 18)
-#define CCM_CSCR_SP             (1 << 17)
-#define CCM_CSCR_MCU            (1 << 16)
-#define CCM_CSCR_OSC26MDIV      (1 << 4)
-#define CCM_CSCR_OSC26M         (1 << 3)
-#define CCM_CSCR_FPM            (1 << 2)
-#define CCM_CSCR_SPEN           (1 << 1)
-#define CCM_CSCR_MPEN           (1 << 0)
-
-/* i.MX27 TO 2+ */
-#define CCM_CSCR_ARM_SRC        (1 << 15)
-
-#define CCM_SPCTL1_LF           (1 << 15)
-#define CCM_SPCTL1_BRMO         (1 << 6)
+#define CCM_CSCR               (ccm + 0x00)
+#define CCM_MPCTL0             (ccm + 0x04)
+#define CCM_MPCTL1             (ccm + 0x08)
+#define CCM_SPCTL0             (ccm + 0x0c)
+#define CCM_SPCTL1             (ccm + 0x10)
+#define CCM_PCDR0              (ccm + 0x18)
+#define CCM_PCDR1              (ccm + 0x1c)
+#define CCM_PCCR0              (ccm + 0x20)
+#define CCM_PCCR1              (ccm + 0x24)
+#define CCM_CCSR               (ccm + 0x28)
 
 static const char *vpu_sel_clks[] = { "spll", "mpll_main2", };
 static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", };
 static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", };
-static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", };
+static const char *mpll_osc_sel_clks[] = { "ckih_gate", "ckih_div1p5", };
 static const char *clko_sel_clks[] = {
-       "ckil", "fpm", "ckih", "ckih",
-       "ckih", "mpll", "spll", "cpu_div",
+       "ckil", "fpm", "ckih_gate", "ckih_gate",
+       "ckih_gate", "mpll", "spll", "cpu_div",
        "ahb", "ipg", "per1_div", "per2_div",
        "per3_div", "per4_div", "ssi1_div", "ssi2_div",
        "nfc_div", "mshc_div", "vpu_div", "60m",
@@ -64,239 +39,220 @@ static const char *clko_sel_clks[] = {
 
 static const char *ssi_sel_clks[] = { "spll_gate", "mpll", };
 
-enum mx27_clks {
-       dummy, ckih, ckil, mpll, spll, mpll_main2, ahb, ipg, nfc_div, per1_div,
-       per2_div, per3_div, per4_div, vpu_sel, vpu_div, usb_div, cpu_sel,
-       clko_sel, cpu_div, clko_div, ssi1_sel, ssi2_sel, ssi1_div, ssi2_div,
-       clko_en, ssi2_ipg_gate, ssi1_ipg_gate, slcdc_ipg_gate, sdhc3_ipg_gate,
-       sdhc2_ipg_gate, sdhc1_ipg_gate, scc_ipg_gate, sahara_ipg_gate,
-       rtc_ipg_gate, pwm_ipg_gate, owire_ipg_gate, lcdc_ipg_gate,
-       kpp_ipg_gate, iim_ipg_gate, i2c2_ipg_gate, i2c1_ipg_gate,
-       gpt6_ipg_gate, gpt5_ipg_gate, gpt4_ipg_gate, gpt3_ipg_gate,
-       gpt2_ipg_gate, gpt1_ipg_gate, gpio_ipg_gate, fec_ipg_gate,
-       emma_ipg_gate, dma_ipg_gate, cspi3_ipg_gate, cspi2_ipg_gate,
-       cspi1_ipg_gate, nfc_baud_gate, ssi2_baud_gate, ssi1_baud_gate,
-       vpu_baud_gate, per4_gate, per3_gate, per2_gate, per1_gate,
-       usb_ahb_gate, slcdc_ahb_gate, sahara_ahb_gate, lcdc_ahb_gate,
-       vpu_ahb_gate, fec_ahb_gate, emma_ahb_gate, emi_ahb_gate, dma_ahb_gate,
-       csi_ahb_gate, brom_ahb_gate, ata_ahb_gate, wdog_ipg_gate, usb_ipg_gate,
-       uart6_ipg_gate, uart5_ipg_gate, uart4_ipg_gate, uart3_ipg_gate,
-       uart2_ipg_gate, uart1_ipg_gate, ckih_div1p5, fpm, mpll_osc_sel,
-       mpll_sel, spll_gate, mshc_div, rtic_ipg_gate, mshc_ipg_gate,
-       rtic_ahb_gate, mshc_baud_gate, clk_max
-};
-
-static struct clk *clk[clk_max];
+static struct clk *clk[IMX27_CLK_MAX];
 static struct clk_onecell_data clk_data;
 
-int __init mx27_clocks_init(unsigned long fref)
+static void __init _mx27_clocks_init(unsigned long fref)
 {
-       int i;
-       struct device_node *np;
-
-       clk[dummy] = imx_clk_fixed("dummy", 0);
-       clk[ckih] = imx_clk_fixed("ckih", fref);
-       clk[ckil] = imx_clk_fixed("ckil", 32768);
-       clk[fpm] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1);
-       clk[ckih_div1p5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3);
+       BUG_ON(!ccm);
 
-       clk[mpll_osc_sel] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1,
-                       mpll_osc_sel_clks,
-                       ARRAY_SIZE(mpll_osc_sel_clks));
-       clk[mpll_sel] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks,
-                       ARRAY_SIZE(mpll_sel_clks));
-       clk[mpll] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0);
-       clk[spll] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0);
-       clk[spll_gate] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
-       clk[mpll_main2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3);
+       clk[IMX27_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
+       clk[IMX27_CLK_CKIH] = imx_clk_fixed("ckih", fref);
+       clk[IMX27_CLK_CKIL] = imx_clk_fixed("ckil", 32768);
+       clk[IMX27_CLK_FPM] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1);
+       clk[IMX27_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih_gate", 2, 3);
+       clk[IMX27_CLK_CKIH_GATE] = imx_clk_gate_dis("ckih_gate", "ckih", CCM_CSCR, 3);
+       clk[IMX27_CLK_MPLL_OSC_SEL] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, mpll_osc_sel_clks, ARRAY_SIZE(mpll_osc_sel_clks));
+       clk[IMX27_CLK_MPLL_SEL] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, ARRAY_SIZE(mpll_sel_clks));
+       clk[IMX27_CLK_MPLL] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0);
+       clk[IMX27_CLK_SPLL] = imx_clk_pllv1("spll", "ckih_gate", CCM_SPCTL0);
+       clk[IMX27_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
+       clk[IMX27_CLK_MPLL_MAIN2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3);
 
        if (mx27_revision() >= IMX_CHIP_REVISION_2_0) {
-               clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 8, 2);
-               clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2);
+               clk[IMX27_CLK_AHB] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 8, 2);
+               clk[IMX27_CLK_IPG] = imx_clk_fixed_factor("ipg", "ahb", 1, 2);
        } else {
-               clk[ahb] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 9, 4);
-               clk[ipg] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1);
+               clk[IMX27_CLK_AHB] = imx_clk_divider("ahb", "mpll_main2", CCM_CSCR, 9, 4);
+               clk[IMX27_CLK_IPG] = imx_clk_divider("ipg", "ahb", CCM_CSCR, 8, 1);
        }
 
-       clk[mshc_div] = imx_clk_divider("mshc_div", "ahb", CCM_PCDR0, 0, 6);
-       clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4);
-       clk[per1_div] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6);
-       clk[per2_div] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6);
-       clk[per3_div] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6);
-       clk[per4_div] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6);
-       clk[vpu_sel] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks));
-       clk[vpu_div] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6);
-       clk[usb_div] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 28, 3);
-       clk[cpu_sel] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks));
-       clk[clko_sel] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks));
+       clk[IMX27_CLK_MSHC_DIV] = imx_clk_divider("mshc_div", "ahb", CCM_PCDR0, 0, 6);
+       clk[IMX27_CLK_NFC_DIV] = imx_clk_divider("nfc_div", "ahb", CCM_PCDR0, 6, 4);
+       clk[IMX27_CLK_PER1_DIV] = imx_clk_divider("per1_div", "mpll_main2", CCM_PCDR1, 0, 6);
+       clk[IMX27_CLK_PER2_DIV] = imx_clk_divider("per2_div", "mpll_main2", CCM_PCDR1, 8, 6);
+       clk[IMX27_CLK_PER3_DIV] = imx_clk_divider("per3_div", "mpll_main2", CCM_PCDR1, 16, 6);
+       clk[IMX27_CLK_PER4_DIV] = imx_clk_divider("per4_div", "mpll_main2", CCM_PCDR1, 24, 6);
+       clk[IMX27_CLK_VPU_SEL] = imx_clk_mux("vpu_sel", CCM_CSCR, 21, 1, vpu_sel_clks, ARRAY_SIZE(vpu_sel_clks));
+       clk[IMX27_CLK_VPU_DIV] = imx_clk_divider("vpu_div", "vpu_sel", CCM_PCDR0, 10, 6);
+       clk[IMX27_CLK_USB_DIV] = imx_clk_divider("usb_div", "spll_gate", CCM_CSCR, 28, 3);
+       clk[IMX27_CLK_CPU_SEL] = imx_clk_mux("cpu_sel", CCM_CSCR, 15, 1, cpu_sel_clks, ARRAY_SIZE(cpu_sel_clks));
+       clk[IMX27_CLK_CLKO_SEL] = imx_clk_mux("clko_sel", CCM_CCSR, 0, 5, clko_sel_clks, ARRAY_SIZE(clko_sel_clks));
+
        if (mx27_revision() >= IMX_CHIP_REVISION_2_0)
-               clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 12, 2);
+               clk[IMX27_CLK_CPU_DIV] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 12, 2);
        else
-               clk[cpu_div] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 13, 3);
-       clk[clko_div] = imx_clk_divider("clko_div", "clko_sel", CCM_PCDR0, 22, 3);
-       clk[ssi1_sel] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
-       clk[ssi2_sel] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
-       clk[ssi1_div] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6);
-       clk[ssi2_div] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6);
-       clk[clko_en] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0);
-       clk[ssi2_ipg_gate] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0);
-       clk[ssi1_ipg_gate] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1);
-       clk[slcdc_ipg_gate] = imx_clk_gate("slcdc_ipg_gate", "ipg", CCM_PCCR0, 2);
-       clk[sdhc3_ipg_gate] = imx_clk_gate("sdhc3_ipg_gate", "ipg", CCM_PCCR0, 3);
-       clk[sdhc2_ipg_gate] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 4);
-       clk[sdhc1_ipg_gate] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5);
-       clk[scc_ipg_gate] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6);
-       clk[sahara_ipg_gate] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7);
-       clk[rtic_ipg_gate] = imx_clk_gate("rtic_ipg_gate", "ipg", CCM_PCCR0, 8);
-       clk[rtc_ipg_gate] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9);
-       clk[pwm_ipg_gate] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11);
-       clk[owire_ipg_gate] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12);
-       clk[mshc_ipg_gate] = imx_clk_gate("mshc_ipg_gate", "ipg", CCM_PCCR0, 13);
-       clk[lcdc_ipg_gate] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14);
-       clk[kpp_ipg_gate] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15);
-       clk[iim_ipg_gate] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16);
-       clk[i2c2_ipg_gate] = imx_clk_gate("i2c2_ipg_gate", "ipg", CCM_PCCR0, 17);
-       clk[i2c1_ipg_gate] = imx_clk_gate("i2c1_ipg_gate", "ipg", CCM_PCCR0, 18);
-       clk[gpt6_ipg_gate] = imx_clk_gate("gpt6_ipg_gate", "ipg", CCM_PCCR0, 19);
-       clk[gpt5_ipg_gate] = imx_clk_gate("gpt5_ipg_gate", "ipg", CCM_PCCR0, 20);
-       clk[gpt4_ipg_gate] = imx_clk_gate("gpt4_ipg_gate", "ipg", CCM_PCCR0, 21);
-       clk[gpt3_ipg_gate] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR0, 22);
-       clk[gpt2_ipg_gate] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR0, 23);
-       clk[gpt1_ipg_gate] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR0, 24);
-       clk[gpio_ipg_gate] = imx_clk_gate("gpio_ipg_gate", "ipg", CCM_PCCR0, 25);
-       clk[fec_ipg_gate] = imx_clk_gate("fec_ipg_gate", "ipg", CCM_PCCR0, 26);
-       clk[emma_ipg_gate] = imx_clk_gate("emma_ipg_gate", "ipg", CCM_PCCR0, 27);
-       clk[dma_ipg_gate] = imx_clk_gate("dma_ipg_gate", "ipg", CCM_PCCR0, 28);
-       clk[cspi3_ipg_gate] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29);
-       clk[cspi2_ipg_gate] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30);
-       clk[cspi1_ipg_gate] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31);
-       clk[mshc_baud_gate] = imx_clk_gate("mshc_baud_gate", "mshc_div", CCM_PCCR1, 2);
-       clk[nfc_baud_gate] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1,  3);
-       clk[ssi2_baud_gate] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1,  4);
-       clk[ssi1_baud_gate] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1,  5);
-       clk[vpu_baud_gate] = imx_clk_gate("vpu_baud_gate", "vpu_div", CCM_PCCR1,  6);
-       clk[per4_gate] = imx_clk_gate("per4_gate", "per4_div", CCM_PCCR1,  7);
-       clk[per3_gate] = imx_clk_gate("per3_gate", "per3_div", CCM_PCCR1,  8);
-       clk[per2_gate] = imx_clk_gate("per2_gate", "per2_div", CCM_PCCR1,  9);
-       clk[per1_gate] = imx_clk_gate("per1_gate", "per1_div", CCM_PCCR1, 10);
-       clk[usb_ahb_gate] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11);
-       clk[slcdc_ahb_gate] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12);
-       clk[sahara_ahb_gate] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13);
-       clk[rtic_ahb_gate] = imx_clk_gate("rtic_ahb_gate", "ahb", CCM_PCCR1, 14);
-       clk[lcdc_ahb_gate] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15);
-       clk[vpu_ahb_gate] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16);
-       clk[fec_ahb_gate] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17);
-       clk[emma_ahb_gate] = imx_clk_gate("emma_ahb_gate", "ahb", CCM_PCCR1, 18);
-       clk[emi_ahb_gate] = imx_clk_gate("emi_ahb_gate", "ahb", CCM_PCCR1, 19);
-       clk[dma_ahb_gate] = imx_clk_gate("dma_ahb_gate", "ahb", CCM_PCCR1, 20);
-       clk[csi_ahb_gate] = imx_clk_gate("csi_ahb_gate", "ahb", CCM_PCCR1, 21);
-       clk[brom_ahb_gate] = imx_clk_gate("brom_ahb_gate", "ahb", CCM_PCCR1, 22);
-       clk[ata_ahb_gate] = imx_clk_gate("ata_ahb_gate", "ahb", CCM_PCCR1, 23);
-       clk[wdog_ipg_gate] = imx_clk_gate("wdog_ipg_gate", "ipg", CCM_PCCR1, 24);
-       clk[usb_ipg_gate] = imx_clk_gate("usb_ipg_gate", "ipg", CCM_PCCR1, 25);
-       clk[uart6_ipg_gate] = imx_clk_gate("uart6_ipg_gate", "ipg", CCM_PCCR1, 26);
-       clk[uart5_ipg_gate] = imx_clk_gate("uart5_ipg_gate", "ipg", CCM_PCCR1, 27);
-       clk[uart4_ipg_gate] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR1, 28);
-       clk[uart3_ipg_gate] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR1, 29);
-       clk[uart2_ipg_gate] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR1, 30);
-       clk[uart1_ipg_gate] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR1, 31);
+               clk[IMX27_CLK_CPU_DIV] = imx_clk_divider("cpu_div", "cpu_sel", CCM_CSCR, 13, 3);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX27 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       clk[IMX27_CLK_CLKO_DIV] = imx_clk_divider("clko_div", "clko_sel", CCM_PCDR0, 22, 3);
+       clk[IMX27_CLK_SSI1_SEL] = imx_clk_mux("ssi1_sel", CCM_CSCR, 22, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
+       clk[IMX27_CLK_SSI2_SEL] = imx_clk_mux("ssi2_sel", CCM_CSCR, 23, 1, ssi_sel_clks, ARRAY_SIZE(ssi_sel_clks));
+       clk[IMX27_CLK_SSI1_DIV] = imx_clk_divider("ssi1_div", "ssi1_sel", CCM_PCDR0, 16, 6);
+       clk[IMX27_CLK_SSI2_DIV] = imx_clk_divider("ssi2_div", "ssi2_sel", CCM_PCDR0, 26, 6);
+       clk[IMX27_CLK_CLKO_EN] = imx_clk_gate("clko_en", "clko_div", CCM_PCCR0, 0);
+       clk[IMX27_CLK_SSI2_IPG_GATE] = imx_clk_gate("ssi2_ipg_gate", "ipg", CCM_PCCR0, 0);
+       clk[IMX27_CLK_SSI1_IPG_GATE] = imx_clk_gate("ssi1_ipg_gate", "ipg", CCM_PCCR0, 1);
+       clk[IMX27_CLK_SLCDC_IPG_GATE] = imx_clk_gate("slcdc_ipg_gate", "ipg", CCM_PCCR0, 2);
+       clk[IMX27_CLK_SDHC3_IPG_GATE] = imx_clk_gate("sdhc3_ipg_gate", "ipg", CCM_PCCR0, 3);
+       clk[IMX27_CLK_SDHC2_IPG_GATE] = imx_clk_gate("sdhc2_ipg_gate", "ipg", CCM_PCCR0, 4);
+       clk[IMX27_CLK_SDHC1_IPG_GATE] = imx_clk_gate("sdhc1_ipg_gate", "ipg", CCM_PCCR0, 5);
+       clk[IMX27_CLK_SCC_IPG_GATE] = imx_clk_gate("scc_ipg_gate", "ipg", CCM_PCCR0, 6);
+       clk[IMX27_CLK_SAHARA_IPG_GATE] = imx_clk_gate("sahara_ipg_gate", "ipg", CCM_PCCR0, 7);
+       clk[IMX27_CLK_RTIC_IPG_GATE] = imx_clk_gate("rtic_ipg_gate", "ipg", CCM_PCCR0, 8);
+       clk[IMX27_CLK_RTC_IPG_GATE] = imx_clk_gate("rtc_ipg_gate", "ipg", CCM_PCCR0, 9);
+       clk[IMX27_CLK_PWM_IPG_GATE] = imx_clk_gate("pwm_ipg_gate", "ipg", CCM_PCCR0, 11);
+       clk[IMX27_CLK_OWIRE_IPG_GATE] = imx_clk_gate("owire_ipg_gate", "ipg", CCM_PCCR0, 12);
+       clk[IMX27_CLK_MSHC_IPG_GATE] = imx_clk_gate("mshc_ipg_gate", "ipg", CCM_PCCR0, 13);
+       clk[IMX27_CLK_LCDC_IPG_GATE] = imx_clk_gate("lcdc_ipg_gate", "ipg", CCM_PCCR0, 14);
+       clk[IMX27_CLK_KPP_IPG_GATE] = imx_clk_gate("kpp_ipg_gate", "ipg", CCM_PCCR0, 15);
+       clk[IMX27_CLK_IIM_IPG_GATE] = imx_clk_gate("iim_ipg_gate", "ipg", CCM_PCCR0, 16);
+       clk[IMX27_CLK_I2C2_IPG_GATE] = imx_clk_gate("i2c2_ipg_gate", "ipg", CCM_PCCR0, 17);
+       clk[IMX27_CLK_I2C1_IPG_GATE] = imx_clk_gate("i2c1_ipg_gate", "ipg", CCM_PCCR0, 18);
+       clk[IMX27_CLK_GPT6_IPG_GATE] = imx_clk_gate("gpt6_ipg_gate", "ipg", CCM_PCCR0, 19);
+       clk[IMX27_CLK_GPT5_IPG_GATE] = imx_clk_gate("gpt5_ipg_gate", "ipg", CCM_PCCR0, 20);
+       clk[IMX27_CLK_GPT4_IPG_GATE] = imx_clk_gate("gpt4_ipg_gate", "ipg", CCM_PCCR0, 21);
+       clk[IMX27_CLK_GPT3_IPG_GATE] = imx_clk_gate("gpt3_ipg_gate", "ipg", CCM_PCCR0, 22);
+       clk[IMX27_CLK_GPT2_IPG_GATE] = imx_clk_gate("gpt2_ipg_gate", "ipg", CCM_PCCR0, 23);
+       clk[IMX27_CLK_GPT1_IPG_GATE] = imx_clk_gate("gpt1_ipg_gate", "ipg", CCM_PCCR0, 24);
+       clk[IMX27_CLK_GPIO_IPG_GATE] = imx_clk_gate("gpio_ipg_gate", "ipg", CCM_PCCR0, 25);
+       clk[IMX27_CLK_FEC_IPG_GATE] = imx_clk_gate("fec_ipg_gate", "ipg", CCM_PCCR0, 26);
+       clk[IMX27_CLK_EMMA_IPG_GATE] = imx_clk_gate("emma_ipg_gate", "ipg", CCM_PCCR0, 27);
+       clk[IMX27_CLK_DMA_IPG_GATE] = imx_clk_gate("dma_ipg_gate", "ipg", CCM_PCCR0, 28);
+       clk[IMX27_CLK_CSPI3_IPG_GATE] = imx_clk_gate("cspi3_ipg_gate", "ipg", CCM_PCCR0, 29);
+       clk[IMX27_CLK_CSPI2_IPG_GATE] = imx_clk_gate("cspi2_ipg_gate", "ipg", CCM_PCCR0, 30);
+       clk[IMX27_CLK_CSPI1_IPG_GATE] = imx_clk_gate("cspi1_ipg_gate", "ipg", CCM_PCCR0, 31);
+       clk[IMX27_CLK_MSHC_BAUD_GATE] = imx_clk_gate("mshc_baud_gate", "mshc_div", CCM_PCCR1, 2);
+       clk[IMX27_CLK_NFC_BAUD_GATE] = imx_clk_gate("nfc_baud_gate", "nfc_div", CCM_PCCR1,  3);
+       clk[IMX27_CLK_SSI2_BAUD_GATE] = imx_clk_gate("ssi2_baud_gate", "ssi2_div", CCM_PCCR1,  4);
+       clk[IMX27_CLK_SSI1_BAUD_GATE] = imx_clk_gate("ssi1_baud_gate", "ssi1_div", CCM_PCCR1,  5);
+       clk[IMX27_CLK_VPU_BAUD_GATE] = imx_clk_gate("vpu_baud_gate", "vpu_div", CCM_PCCR1,  6);
+       clk[IMX27_CLK_PER4_GATE] = imx_clk_gate("per4_gate", "per4_div", CCM_PCCR1,  7);
+       clk[IMX27_CLK_PER3_GATE] = imx_clk_gate("per3_gate", "per3_div", CCM_PCCR1,  8);
+       clk[IMX27_CLK_PER2_GATE] = imx_clk_gate("per2_gate", "per2_div", CCM_PCCR1,  9);
+       clk[IMX27_CLK_PER1_GATE] = imx_clk_gate("per1_gate", "per1_div", CCM_PCCR1, 10);
+       clk[IMX27_CLK_USB_AHB_GATE] = imx_clk_gate("usb_ahb_gate", "ahb", CCM_PCCR1, 11);
+       clk[IMX27_CLK_SLCDC_AHB_GATE] = imx_clk_gate("slcdc_ahb_gate", "ahb", CCM_PCCR1, 12);
+       clk[IMX27_CLK_SAHARA_AHB_GATE] = imx_clk_gate("sahara_ahb_gate", "ahb", CCM_PCCR1, 13);
+       clk[IMX27_CLK_RTIC_AHB_GATE] = imx_clk_gate("rtic_ahb_gate", "ahb", CCM_PCCR1, 14);
+       clk[IMX27_CLK_LCDC_AHB_GATE] = imx_clk_gate("lcdc_ahb_gate", "ahb", CCM_PCCR1, 15);
+       clk[IMX27_CLK_VPU_AHB_GATE] = imx_clk_gate("vpu_ahb_gate", "ahb", CCM_PCCR1, 16);
+       clk[IMX27_CLK_FEC_AHB_GATE] = imx_clk_gate("fec_ahb_gate", "ahb", CCM_PCCR1, 17);
+       clk[IMX27_CLK_EMMA_AHB_GATE] = imx_clk_gate("emma_ahb_gate", "ahb", CCM_PCCR1, 18);
+       clk[IMX27_CLK_EMI_AHB_GATE] = imx_clk_gate("emi_ahb_gate", "ahb", CCM_PCCR1, 19);
+       clk[IMX27_CLK_DMA_AHB_GATE] = imx_clk_gate("dma_ahb_gate", "ahb", CCM_PCCR1, 20);
+       clk[IMX27_CLK_CSI_AHB_GATE] = imx_clk_gate("csi_ahb_gate", "ahb", CCM_PCCR1, 21);
+       clk[IMX27_CLK_BROM_AHB_GATE] = imx_clk_gate("brom_ahb_gate", "ahb", CCM_PCCR1, 22);
+       clk[IMX27_CLK_ATA_AHB_GATE] = imx_clk_gate("ata_ahb_gate", "ahb", CCM_PCCR1, 23);
+       clk[IMX27_CLK_WDOG_IPG_GATE] = imx_clk_gate("wdog_ipg_gate", "ipg", CCM_PCCR1, 24);
+       clk[IMX27_CLK_USB_IPG_GATE] = imx_clk_gate("usb_ipg_gate", "ipg", CCM_PCCR1, 25);
+       clk[IMX27_CLK_UART6_IPG_GATE] = imx_clk_gate("uart6_ipg_gate", "ipg", CCM_PCCR1, 26);
+       clk[IMX27_CLK_UART5_IPG_GATE] = imx_clk_gate("uart5_ipg_gate", "ipg", CCM_PCCR1, 27);
+       clk[IMX27_CLK_UART4_IPG_GATE] = imx_clk_gate("uart4_ipg_gate", "ipg", CCM_PCCR1, 28);
+       clk[IMX27_CLK_UART3_IPG_GATE] = imx_clk_gate("uart3_ipg_gate", "ipg", CCM_PCCR1, 29);
+       clk[IMX27_CLK_UART2_IPG_GATE] = imx_clk_gate("uart2_ipg_gate", "ipg", CCM_PCCR1, 30);
+       clk[IMX27_CLK_UART1_IPG_GATE] = imx_clk_gate("uart1_ipg_gate", "ipg", CCM_PCCR1, 31);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm");
-       if (np) {
-               clk_data.clks = clk;
-               clk_data.clk_num = ARRAY_SIZE(clk);
-               of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
-       }
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
-       clk_register_clkdev(clk[uart1_ipg_gate], "ipg", "imx21-uart.0");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.0");
-       clk_register_clkdev(clk[uart2_ipg_gate], "ipg", "imx21-uart.1");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.1");
-       clk_register_clkdev(clk[uart3_ipg_gate], "ipg", "imx21-uart.2");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.2");
-       clk_register_clkdev(clk[uart4_ipg_gate], "ipg", "imx21-uart.3");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.3");
-       clk_register_clkdev(clk[uart5_ipg_gate], "ipg", "imx21-uart.4");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.4");
-       clk_register_clkdev(clk[uart6_ipg_gate], "ipg", "imx21-uart.5");
-       clk_register_clkdev(clk[per1_gate], "per", "imx21-uart.5");
-       clk_register_clkdev(clk[gpt1_ipg_gate], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[per1_gate], "per", "imx-gpt.0");
-       clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.0");
-       clk_register_clkdev(clk[sdhc1_ipg_gate], "ipg", "imx21-mmc.0");
-       clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.1");
-       clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.1");
-       clk_register_clkdev(clk[per2_gate], "per", "imx21-mmc.2");
-       clk_register_clkdev(clk[sdhc2_ipg_gate], "ipg", "imx21-mmc.2");
-       clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.0");
-       clk_register_clkdev(clk[cspi1_ipg_gate], "ipg", "imx27-cspi.0");
-       clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.1");
-       clk_register_clkdev(clk[cspi2_ipg_gate], "ipg", "imx27-cspi.1");
-       clk_register_clkdev(clk[per2_gate], "per", "imx27-cspi.2");
-       clk_register_clkdev(clk[cspi3_ipg_gate], "ipg", "imx27-cspi.2");
-       clk_register_clkdev(clk[per3_gate], "per", "imx21-fb.0");
-       clk_register_clkdev(clk[lcdc_ipg_gate], "ipg", "imx21-fb.0");
-       clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
-       clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
-       clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0");
-       clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
-       clk_register_clkdev(clk[usb_ipg_gate], "ipg", "imx-udc-mx27");
-       clk_register_clkdev(clk[usb_ahb_gate], "ahb", "imx-udc-mx27");
-       clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0");
-       clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0");
-       clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0");
-       clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1");
-       clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.1");
-       clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.1");
-       clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
-       clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.2");
-       clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.2");
-       clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
-       clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
-       clk_register_clkdev(clk[nfc_baud_gate], NULL, "imx27-nand.0");
-       clk_register_clkdev(clk[vpu_baud_gate], "per", "coda-imx27.0");
-       clk_register_clkdev(clk[vpu_ahb_gate], "ahb", "coda-imx27.0");
-       clk_register_clkdev(clk[dma_ahb_gate], "ahb", "imx27-dma");
-       clk_register_clkdev(clk[dma_ipg_gate], "ipg", "imx27-dma");
-       clk_register_clkdev(clk[fec_ipg_gate], "ipg", "imx27-fec.0");
-       clk_register_clkdev(clk[fec_ahb_gate], "ahb", "imx27-fec.0");
-       clk_register_clkdev(clk[wdog_ipg_gate], NULL, "imx2-wdt.0");
-       clk_register_clkdev(clk[i2c1_ipg_gate], NULL, "imx21-i2c.0");
-       clk_register_clkdev(clk[i2c2_ipg_gate], NULL, "imx21-i2c.1");
-       clk_register_clkdev(clk[owire_ipg_gate], NULL, "mxc_w1.0");
-       clk_register_clkdev(clk[kpp_ipg_gate], NULL, "imx-keypad");
-       clk_register_clkdev(clk[emma_ahb_gate], "emma-ahb", "imx27-camera.0");
-       clk_register_clkdev(clk[emma_ipg_gate], "emma-ipg", "imx27-camera.0");
-       clk_register_clkdev(clk[emma_ahb_gate], "ahb", "m2m-emmaprp.0");
-       clk_register_clkdev(clk[emma_ipg_gate], "ipg", "m2m-emmaprp.0");
-       clk_register_clkdev(clk[cpu_div], NULL, "cpu0");
+       clk_register_clkdev(clk[IMX27_CLK_CPU_DIV], NULL, "cpu0");
 
-       mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1);
-
-       clk_prepare_enable(clk[emi_ahb_gate]);
+       clk_prepare_enable(clk[IMX27_CLK_EMI_AHB_GATE]);
 
        imx_print_silicon_rev("i.MX27", mx27_revision());
+}
+
+int __init mx27_clocks_init(unsigned long fref)
+{
+       ccm = ioremap(MX27_CCM_BASE_ADDR, SZ_4K);
+
+       _mx27_clocks_init(fref);
+
+       clk_register_clkdev(clk[IMX27_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.0");
+       clk_register_clkdev(clk[IMX27_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.1");
+       clk_register_clkdev(clk[IMX27_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.2");
+       clk_register_clkdev(clk[IMX27_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.3");
+       clk_register_clkdev(clk[IMX27_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.4");
+       clk_register_clkdev(clk[IMX27_CLK_UART6_IPG_GATE], "ipg", "imx21-uart.5");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx21-uart.5");
+       clk_register_clkdev(clk[IMX27_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER1_GATE], "per", "imx-gpt.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.0");
+       clk_register_clkdev(clk[IMX27_CLK_SDHC1_IPG_GATE], "ipg", "imx21-mmc.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.1");
+       clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.1");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx21-mmc.2");
+       clk_register_clkdev(clk[IMX27_CLK_SDHC2_IPG_GATE], "ipg", "imx21-mmc.2");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.0");
+       clk_register_clkdev(clk[IMX27_CLK_CSPI1_IPG_GATE], "ipg", "imx27-cspi.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.1");
+       clk_register_clkdev(clk[IMX27_CLK_CSPI2_IPG_GATE], "ipg", "imx27-cspi.1");
+       clk_register_clkdev(clk[IMX27_CLK_PER2_GATE], "per", "imx27-cspi.2");
+       clk_register_clkdev(clk[IMX27_CLK_CSPI3_IPG_GATE], "ipg", "imx27-cspi.2");
+       clk_register_clkdev(clk[IMX27_CLK_PER3_GATE], "per", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX27_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX27_CLK_LCDC_AHB_GATE], "ahb", "imx21-fb.0");
+       clk_register_clkdev(clk[IMX27_CLK_CSI_AHB_GATE], "ahb", "imx27-camera.0");
+       clk_register_clkdev(clk[IMX27_CLK_PER4_GATE], "per", "imx27-camera.0");
+       clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "imx-udc-mx27");
+       clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "imx-udc-mx27");
+       clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "imx-udc-mx27");
+       clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.0");
+       clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.0");
+       clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.0");
+       clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.1");
+       clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.1");
+       clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.1");
+       clk_register_clkdev(clk[IMX27_CLK_USB_DIV], "per", "mxc-ehci.2");
+       clk_register_clkdev(clk[IMX27_CLK_USB_IPG_GATE], "ipg", "mxc-ehci.2");
+       clk_register_clkdev(clk[IMX27_CLK_USB_AHB_GATE], "ahb", "mxc-ehci.2");
+       clk_register_clkdev(clk[IMX27_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0");
+       clk_register_clkdev(clk[IMX27_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1");
+       clk_register_clkdev(clk[IMX27_CLK_NFC_BAUD_GATE], NULL, "imx27-nand.0");
+       clk_register_clkdev(clk[IMX27_CLK_VPU_BAUD_GATE], "per", "coda-imx27.0");
+       clk_register_clkdev(clk[IMX27_CLK_VPU_AHB_GATE], "ahb", "coda-imx27.0");
+       clk_register_clkdev(clk[IMX27_CLK_DMA_AHB_GATE], "ahb", "imx27-dma");
+       clk_register_clkdev(clk[IMX27_CLK_DMA_IPG_GATE], "ipg", "imx27-dma");
+       clk_register_clkdev(clk[IMX27_CLK_FEC_IPG_GATE], "ipg", "imx27-fec.0");
+       clk_register_clkdev(clk[IMX27_CLK_FEC_AHB_GATE], "ahb", "imx27-fec.0");
+       clk_register_clkdev(clk[IMX27_CLK_WDOG_IPG_GATE], NULL, "imx2-wdt.0");
+       clk_register_clkdev(clk[IMX27_CLK_I2C1_IPG_GATE], NULL, "imx21-i2c.0");
+       clk_register_clkdev(clk[IMX27_CLK_I2C2_IPG_GATE], NULL, "imx21-i2c.1");
+       clk_register_clkdev(clk[IMX27_CLK_OWIRE_IPG_GATE], NULL, "mxc_w1.0");
+       clk_register_clkdev(clk[IMX27_CLK_KPP_IPG_GATE], NULL, "imx-keypad");
+       clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "emma-ahb", "imx27-camera.0");
+       clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "emma-ipg", "imx27-camera.0");
+       clk_register_clkdev(clk[IMX27_CLK_EMMA_AHB_GATE], "ahb", "m2m-emmaprp.0");
+       clk_register_clkdev(clk[IMX27_CLK_EMMA_IPG_GATE], "ipg", "m2m-emmaprp.0");
+
+       mxc_timer_init(MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR), MX27_INT_GPT1);
 
        return 0;
 }
 
-int __init mx27_clocks_init_dt(void)
+static void __init mx27_clocks_init_dt(struct device_node *np)
 {
-       struct device_node *np;
+       struct device_node *refnp;
        u32 fref = 26000000; /* default */
 
-       for_each_compatible_node(np, NULL, "fixed-clock") {
-               if (!of_device_is_compatible(np, "fsl,imx-osc26m"))
+       for_each_compatible_node(refnp, NULL, "fixed-clock") {
+               if (!of_device_is_compatible(refnp, "fsl,imx-osc26m"))
                        continue;
 
-               if (!of_property_read_u32(np, "clock-frequency", &fref))
+               if (!of_property_read_u32(refnp, "clock-frequency", &fref))
                        break;
        }
 
-       return mx27_clocks_init(fref);
+       ccm = of_iomap(np, 0);
+
+       _mx27_clocks_init(fref);
+
+       clk_data.clks = clk;
+       clk_data.clk_num = ARRAY_SIZE(clk);
+       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 }
+CLK_OF_DECLARE(imx27_ccm, "fsl,imx27-ccm", mx27_clocks_init_dt);
index 4a9de08..286ef42 100644 (file)
@@ -51,7 +51,6 @@ static struct clk_onecell_data clk_data;
 int __init mx31_clocks_init(unsigned long fref)
 {
        void __iomem *base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR);
-       int i;
        struct device_node *np;
 
        clk[dummy] = imx_clk_fixed("dummy", 0);
@@ -114,10 +113,7 @@ int __init mx31_clocks_init(unsigned long fref)
        clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MXC_CCM_CGR2, 10);
        clk[firi_gate] = imx_clk_gate2("firi_gate", "upll", base+MXC_CCM_CGR2, 12);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("imx31 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm");
 
index 71c86a2..a0d2b57 100644 (file)
@@ -75,7 +75,6 @@ int __init mx35_clocks_init(void)
        u32 pdr0, consumer_sel, hsp_sel;
        struct arm_ahb_div *aad;
        unsigned char *hsp_div;
-       u32 i;
 
        pdr0 = __raw_readl(base + MXC_CCM_PDR0);
        consumer_sel = (pdr0 >> 16) & 0xf;
@@ -200,10 +199,7 @@ int __init mx35_clocks_init(void)
        clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3,  2);
        clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3,  4);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX35 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_register_clkdev(clk[pata_gate], NULL, "pata_imx");
        clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0");
index 21d2b11..72d6521 100644 (file)
 #include <linux/of_irq.h>
 #include <dt-bindings/clock/imx5-clock.h>
 
-#include "crm-regs-imx5.h"
 #include "clk.h"
 #include "common.h"
 #include "hardware.h"
 
+#define MX51_DPLL1_BASE                0x83f80000
+#define MX51_DPLL2_BASE                0x83f84000
+#define MX51_DPLL3_BASE                0x83f88000
+
+#define MX53_DPLL1_BASE                0x63f80000
+#define MX53_DPLL2_BASE                0x63f84000
+#define MX53_DPLL3_BASE                0x63f88000
+#define MX53_DPLL4_BASE                0x63f8c000
+
+#define MXC_CCM_CCR            (ccm_base + 0x00)
+#define MXC_CCM_CCDR           (ccm_base + 0x04)
+#define MXC_CCM_CSR            (ccm_base + 0x08)
+#define MXC_CCM_CCSR           (ccm_base + 0x0c)
+#define MXC_CCM_CACRR          (ccm_base + 0x10)
+#define MXC_CCM_CBCDR          (ccm_base + 0x14)
+#define MXC_CCM_CBCMR          (ccm_base + 0x18)
+#define MXC_CCM_CSCMR1         (ccm_base + 0x1c)
+#define MXC_CCM_CSCMR2         (ccm_base + 0x20)
+#define MXC_CCM_CSCDR1         (ccm_base + 0x24)
+#define MXC_CCM_CS1CDR         (ccm_base + 0x28)
+#define MXC_CCM_CS2CDR         (ccm_base + 0x2c)
+#define MXC_CCM_CDCDR          (ccm_base + 0x30)
+#define MXC_CCM_CHSCDR         (ccm_base + 0x34)
+#define MXC_CCM_CSCDR2         (ccm_base + 0x38)
+#define MXC_CCM_CSCDR3         (ccm_base + 0x3c)
+#define MXC_CCM_CSCDR4         (ccm_base + 0x40)
+#define MXC_CCM_CWDR           (ccm_base + 0x44)
+#define MXC_CCM_CDHIPR         (ccm_base + 0x48)
+#define MXC_CCM_CDCR           (ccm_base + 0x4c)
+#define MXC_CCM_CTOR           (ccm_base + 0x50)
+#define MXC_CCM_CLPCR          (ccm_base + 0x54)
+#define MXC_CCM_CISR           (ccm_base + 0x58)
+#define MXC_CCM_CIMR           (ccm_base + 0x5c)
+#define MXC_CCM_CCOSR          (ccm_base + 0x60)
+#define MXC_CCM_CGPR           (ccm_base + 0x64)
+#define MXC_CCM_CCGR0          (ccm_base + 0x68)
+#define MXC_CCM_CCGR1          (ccm_base + 0x6c)
+#define MXC_CCM_CCGR2          (ccm_base + 0x70)
+#define MXC_CCM_CCGR3          (ccm_base + 0x74)
+#define MXC_CCM_CCGR4          (ccm_base + 0x78)
+#define MXC_CCM_CCGR5          (ccm_base + 0x7c)
+#define MXC_CCM_CCGR6          (ccm_base + 0x80)
+#define MXC_CCM_CCGR7          (ccm_base + 0x84)
+
 /* Low-power Audio Playback Mode clock */
 static const char *lp_apm_sel[] = { "osc", };
 
@@ -86,17 +129,15 @@ static const char *mx51_spdif1_com_sel[] = { "spdif1_podf", "ssi2_root_gate", };
 static struct clk *clk[IMX5_CLK_END];
 static struct clk_onecell_data clk_data;
 
-static void __init mx5_clocks_common_init(unsigned long rate_ckil,
-               unsigned long rate_osc, unsigned long rate_ckih1,
-               unsigned long rate_ckih2)
+static void __init mx5_clocks_common_init(void __iomem *ccm_base)
 {
-       int i;
+       imx5_pm_set_ccm_base(ccm_base);
 
        clk[IMX5_CLK_DUMMY]             = imx_clk_fixed("dummy", 0);
-       clk[IMX5_CLK_CKIL]              = imx_obtain_fixed_clock("ckil", rate_ckil);
-       clk[IMX5_CLK_OSC]               = imx_obtain_fixed_clock("osc", rate_osc);
-       clk[IMX5_CLK_CKIH1]             = imx_obtain_fixed_clock("ckih1", rate_ckih1);
-       clk[IMX5_CLK_CKIH2]             = imx_obtain_fixed_clock("ckih2", rate_ckih2);
+       clk[IMX5_CLK_CKIL]              = imx_obtain_fixed_clock("ckil", 0);
+       clk[IMX5_CLK_OSC]               = imx_obtain_fixed_clock("osc", 0);
+       clk[IMX5_CLK_CKIH1]             = imx_obtain_fixed_clock("ckih1", 0);
+       clk[IMX5_CLK_CKIH2]             = imx_obtain_fixed_clock("ckih2", 0);
 
        clk[IMX5_CLK_PERIPH_APM]        = imx_clk_mux("periph_apm", MXC_CCM_CBCMR, 12, 2,
                                                periph_apm_sel, ARRAY_SIZE(periph_apm_sel));
@@ -244,58 +285,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
        clk[IMX5_CLK_SAHARA_IPG_GATE]   = imx_clk_gate2("sahara_ipg_gate", "ipg", MXC_CCM_CCGR4, 14);
        clk[IMX5_CLK_SATA_REF]          = imx_clk_fixed_factor("sata_ref", "usb_phy1_gate", 1, 1);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX5 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
-
-       clk_register_clkdev(clk[IMX5_CLK_GPT_HF_GATE], "per", "imx-gpt.0");
-       clk_register_clkdev(clk[IMX5_CLK_GPT_IPG_GATE], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[IMX5_CLK_UART1_PER_GATE], "per", "imx21-uart.0");
-       clk_register_clkdev(clk[IMX5_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0");
-       clk_register_clkdev(clk[IMX5_CLK_UART2_PER_GATE], "per", "imx21-uart.1");
-       clk_register_clkdev(clk[IMX5_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1");
-       clk_register_clkdev(clk[IMX5_CLK_UART3_PER_GATE], "per", "imx21-uart.2");
-       clk_register_clkdev(clk[IMX5_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2");
-       clk_register_clkdev(clk[IMX5_CLK_UART4_PER_GATE], "per", "imx21-uart.3");
-       clk_register_clkdev(clk[IMX5_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3");
-       clk_register_clkdev(clk[IMX5_CLK_UART5_PER_GATE], "per", "imx21-uart.4");
-       clk_register_clkdev(clk[IMX5_CLK_UART5_IPG_GATE], "ipg", "imx21-uart.4");
-       clk_register_clkdev(clk[IMX5_CLK_ECSPI1_PER_GATE], "per", "imx51-ecspi.0");
-       clk_register_clkdev(clk[IMX5_CLK_ECSPI1_IPG_GATE], "ipg", "imx51-ecspi.0");
-       clk_register_clkdev(clk[IMX5_CLK_ECSPI2_PER_GATE], "per", "imx51-ecspi.1");
-       clk_register_clkdev(clk[IMX5_CLK_ECSPI2_IPG_GATE], "ipg", "imx51-ecspi.1");
-       clk_register_clkdev(clk[IMX5_CLK_CSPI_IPG_GATE], NULL, "imx35-cspi.2");
-       clk_register_clkdev(clk[IMX5_CLK_I2C1_GATE], NULL, "imx21-i2c.0");
-       clk_register_clkdev(clk[IMX5_CLK_I2C2_GATE], NULL, "imx21-i2c.1");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.0");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.0");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.0");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.1");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.1");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.1");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "mxc-ehci.2");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "mxc-ehci.2");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "mxc-ehci.2");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_PER_GATE], "per", "imx-udc-mx51");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ipg", "imx-udc-mx51");
-       clk_register_clkdev(clk[IMX5_CLK_USBOH3_GATE], "ahb", "imx-udc-mx51");
-       clk_register_clkdev(clk[IMX5_CLK_NFC_GATE], NULL, "imx51-nand");
-       clk_register_clkdev(clk[IMX5_CLK_SSI1_IPG_GATE], NULL, "imx-ssi.0");
-       clk_register_clkdev(clk[IMX5_CLK_SSI2_IPG_GATE], NULL, "imx-ssi.1");
-       clk_register_clkdev(clk[IMX5_CLK_SSI3_IPG_GATE], NULL, "imx-ssi.2");
-       clk_register_clkdev(clk[IMX5_CLK_SDMA_GATE], NULL, "imx35-sdma");
        clk_register_clkdev(clk[IMX5_CLK_CPU_PODF], NULL, "cpu0");
-       clk_register_clkdev(clk[IMX5_CLK_IIM_GATE], "iim", NULL);
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.0");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx2-wdt.1");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], NULL, "imx-keypad");
-       clk_register_clkdev(clk[IMX5_CLK_IPU_DI1_GATE], "di1", "imx-tve.0");
        clk_register_clkdev(clk[IMX5_CLK_GPC_DVFS], "gpc_dvfs", NULL);
-       clk_register_clkdev(clk[IMX5_CLK_EPIT1_IPG_GATE], "ipg", "imx-epit.0");
-       clk_register_clkdev(clk[IMX5_CLK_EPIT1_HF_GATE], "per", "imx-epit.0");
-       clk_register_clkdev(clk[IMX5_CLK_EPIT2_IPG_GATE], "ipg", "imx-epit.1");
-       clk_register_clkdev(clk[IMX5_CLK_EPIT2_HF_GATE], "per", "imx-epit.1");
 
        /* Set SDHC parents to be PLL2 */
        clk_set_parent(clk[IMX5_CLK_ESDHC_A_SEL], clk[IMX5_CLK_PLL2_SW]);
@@ -322,12 +313,26 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
 
 static void __init mx50_clocks_init(struct device_node *np)
 {
+       void __iomem *ccm_base;
+       void __iomem *pll_base;
        unsigned long r;
-       int i;
 
-       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
-       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
-       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE);
+       pll_base = ioremap(MX53_DPLL1_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX53_DPLL2_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX53_DPLL3_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", pll_base);
+
+       ccm_base = of_iomap(np, 0);
+       WARN_ON(!ccm_base);
+
+       mx5_clocks_common_init(ccm_base);
 
        clk[IMX5_CLK_LP_APM]            = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1,
                                                lp_apm_sel, ARRAY_SIZE(lp_apm_sel));
@@ -349,17 +354,12 @@ static void __init mx50_clocks_init(struct device_node *np)
        clk[IMX5_CLK_CKO2_PODF]         = imx_clk_divider("cko2_podf", "cko2_sel", MXC_CCM_CCOSR, 21, 3);
        clk[IMX5_CLK_CKO2]              = imx_clk_gate2("cko2", "cko2_podf", MXC_CCM_CCOSR, 24);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX50 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       mx5_clocks_common_init(0, 0, 0, 0);
-
        /* set SDHC root clock to 200MHZ*/
        clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000);
        clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000);
@@ -370,21 +370,32 @@ static void __init mx50_clocks_init(struct device_node *np)
 
        r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000);
        clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r);
-
-       mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx50-gpt"));
 }
 CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init);
 
-int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
-                       unsigned long rate_ckih1, unsigned long rate_ckih2)
+static void __init mx51_clocks_init(struct device_node *np)
 {
-       int i;
+       void __iomem *ccm_base;
+       void __iomem *pll_base;
        u32 val;
-       struct device_node *np;
 
-       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", MX51_DPLL1_BASE);
-       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", MX51_DPLL2_BASE);
-       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", MX51_DPLL3_BASE);
+       pll_base = ioremap(MX51_DPLL1_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX51_DPLL2_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX51_DPLL3_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", pll_base);
+
+       ccm_base = of_iomap(np, 0);
+       WARN_ON(!ccm_base);
+
+       mx5_clocks_common_init(ccm_base);
+
        clk[IMX5_CLK_LP_APM]            = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 9, 1,
                                                lp_apm_sel, ARRAY_SIZE(lp_apm_sel));
        clk[IMX5_CLK_IPU_DI0_SEL]       = imx_clk_mux("ipu_di0_sel", MXC_CCM_CSCMR2, 26, 3,
@@ -417,35 +428,12 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
                                                mx51_spdif1_com_sel, ARRAY_SIZE(mx51_spdif1_com_sel));
        clk[IMX5_CLK_SPDIF1_GATE]       = imx_clk_gate2("spdif1_gate", "spdif1_com_sel", MXC_CCM_CCGR5, 28);
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX51 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx51-ccm");
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       mx5_clocks_common_init(rate_ckil, rate_osc, rate_ckih1, rate_ckih2);
-
-       clk_register_clkdev(clk[IMX5_CLK_HSI2C_GATE], NULL, "imx21-i2c.2");
-       clk_register_clkdev(clk[IMX5_CLK_MX51_MIPI], "mipi_hsp", NULL);
-       clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx27-fec.0");
-       clk_register_clkdev(clk[IMX5_CLK_USB_PHY_GATE], "phy", "mxc-ehci.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx51.0");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx51.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx51.1");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.1");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx51.1");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx51.2");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.2");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx51.2");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx51.3");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx51.3");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx51.3");
-
        /* set the usboh3 parent to pll2_sw */
        clk_set_parent(clk[IMX5_CLK_USBOH3_SEL], clk[IMX5_CLK_PLL2_SW]);
 
@@ -453,9 +441,6 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
        clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 166250000);
        clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 166250000);
 
-       /* System timer */
-       mxc_timer_init(MX51_IO_ADDRESS(MX51_GPT1_BASE_ADDR), MX51_INT_GPT);
-
        clk_prepare_enable(clk[IMX5_CLK_IIM_GATE]);
        imx_print_silicon_rev("i.MX51", mx51_revision());
        clk_disable_unprepare(clk[IMX5_CLK_IIM_GATE]);
@@ -474,25 +459,35 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
        val = readl(MXC_CCM_CLPCR);
        val |= 1 << 23;
        writel(val, MXC_CCM_CLPCR);
-
-       return 0;
-}
-
-static void __init mx51_clocks_init_dt(struct device_node *np)
-{
-       mx51_clocks_init(0, 0, 0, 0);
 }
-CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init_dt);
+CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init);
 
 static void __init mx53_clocks_init(struct device_node *np)
 {
-       int i;
+       void __iomem *ccm_base;
+       void __iomem *pll_base;
        unsigned long r;
 
-       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", MX53_DPLL1_BASE);
-       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", MX53_DPLL2_BASE);
-       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", MX53_DPLL3_BASE);
-       clk[IMX5_CLK_PLL4_SW]           = imx_clk_pllv2("pll4_sw", "osc", MX53_DPLL4_BASE);
+       pll_base = ioremap(MX53_DPLL1_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL1_SW]           = imx_clk_pllv2("pll1_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX53_DPLL2_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL2_SW]           = imx_clk_pllv2("pll2_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX53_DPLL3_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL3_SW]           = imx_clk_pllv2("pll3_sw", "osc", pll_base);
+
+       pll_base = ioremap(MX53_DPLL4_BASE, SZ_16K);
+       WARN_ON(!pll_base);
+       clk[IMX5_CLK_PLL4_SW]           = imx_clk_pllv2("pll4_sw", "osc", pll_base);
+
+       ccm_base = of_iomap(np, 0);
+       WARN_ON(!ccm_base);
+
+       mx5_clocks_common_init(ccm_base);
 
        clk[IMX5_CLK_LP_APM]            = imx_clk_mux("lp_apm", MXC_CCM_CCSR, 10, 1,
                                                lp_apm_sel, ARRAY_SIZE(lp_apm_sel));
@@ -543,33 +538,12 @@ static void __init mx53_clocks_init(struct device_node *np)
        clk[IMX5_CLK_SPDIF_XTAL_SEL]    = imx_clk_mux("spdif_xtal_sel", MXC_CCM_CSCMR1, 2, 2,
                                                mx53_spdif_xtal_sel, ARRAY_SIZE(mx53_spdif_xtal_sel));
 
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX53 clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       mx5_clocks_common_init(0, 0, 0, 0);
-
-       clk_register_clkdev(clk[IMX5_CLK_I2C3_GATE], NULL, "imx21-i2c.2");
-       clk_register_clkdev(clk[IMX5_CLK_FEC_GATE], NULL, "imx25-fec.0");
-       clk_register_clkdev(clk[IMX5_CLK_USB_PHY1_GATE], "usb_phy1", "mxc-ehci.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC1_IPG_GATE], "ipg", "sdhci-esdhc-imx53.0");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC1_PER_GATE], "per", "sdhci-esdhc-imx53.0");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC2_IPG_GATE], "ipg", "sdhci-esdhc-imx53.1");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.1");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC2_PER_GATE], "per", "sdhci-esdhc-imx53.1");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC3_IPG_GATE], "ipg", "sdhci-esdhc-imx53.2");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.2");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC3_PER_GATE], "per", "sdhci-esdhc-imx53.2");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC4_IPG_GATE], "ipg", "sdhci-esdhc-imx53.3");
-       clk_register_clkdev(clk[IMX5_CLK_DUMMY], "ahb", "sdhci-esdhc-imx53.3");
-       clk_register_clkdev(clk[IMX5_CLK_ESDHC4_PER_GATE], "per", "sdhci-esdhc-imx53.3");
-
        /* set SDHC root clock to 200MHZ*/
        clk_set_rate(clk[IMX5_CLK_ESDHC_A_PODF], 200000000);
        clk_set_rate(clk[IMX5_CLK_ESDHC_B_PODF], 200000000);
@@ -583,7 +557,5 @@ static void __init mx53_clocks_init(struct device_node *np)
 
        r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000);
        clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r);
-
-       mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx53-gpt"));
 }
 CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init);
index 8556c78..6cceb77 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
+#include <dt-bindings/clock/imx6qdl-clock.h>
 
 #include "clk.h"
 #include "common.h"
@@ -73,48 +74,13 @@ static const char *lvds_sels[] = {
        "pcie_ref_125m", "sata_ref_100m",
 };
 
-enum mx6q_clks {
-       dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m,
-       pll3_pfd0_720m, pll3_pfd1_540m, pll3_pfd2_508m, pll3_pfd3_454m,
-       pll2_198m, pll3_120m, pll3_80m, pll3_60m, twd, step, pll1_sw,
-       periph_pre, periph2_pre, periph_clk2_sel, periph2_clk2_sel, axi_sel,
-       esai_sel, asrc_sel, spdif_sel, gpu2d_axi, gpu3d_axi, gpu2d_core_sel,
-       gpu3d_core_sel, gpu3d_shader_sel, ipu1_sel, ipu2_sel, ldb_di0_sel,
-       ldb_di1_sel, ipu1_di0_pre_sel, ipu1_di1_pre_sel, ipu2_di0_pre_sel,
-       ipu2_di1_pre_sel, ipu1_di0_sel, ipu1_di1_sel, ipu2_di0_sel,
-       ipu2_di1_sel, hsi_tx_sel, pcie_axi_sel, ssi1_sel, ssi2_sel, ssi3_sel,
-       usdhc1_sel, usdhc2_sel, usdhc3_sel, usdhc4_sel, enfc_sel, emi_sel,
-       emi_slow_sel, vdo_axi_sel, vpu_axi_sel, cko1_sel, periph, periph2,
-       periph_clk2, periph2_clk2, ipg, ipg_per, esai_pred, esai_podf,
-       asrc_pred, asrc_podf, spdif_pred, spdif_podf, can_root, ecspi_root,
-       gpu2d_core_podf, gpu3d_core_podf, gpu3d_shader, ipu1_podf, ipu2_podf,
-       ldb_di0_podf, ldb_di1_podf, ipu1_di0_pre, ipu1_di1_pre, ipu2_di0_pre,
-       ipu2_di1_pre, hsi_tx_podf, ssi1_pred, ssi1_podf, ssi2_pred, ssi2_podf,
-       ssi3_pred, ssi3_podf, uart_serial_podf, usdhc1_podf, usdhc2_podf,
-       usdhc3_podf, usdhc4_podf, enfc_pred, enfc_podf, emi_podf,
-       emi_slow_podf, vpu_axi_podf, cko1_podf, axi, mmdc_ch0_axi_podf,
-       mmdc_ch1_axi_podf, arm, ahb, apbh_dma, asrc, can1_ipg, can1_serial,
-       can2_ipg, can2_serial, ecspi1, ecspi2, ecspi3, ecspi4, ecspi5, enet,
-       esai, gpt_ipg, gpt_ipg_per, gpu2d_core, gpu3d_core, hdmi_iahb,
-       hdmi_isfr, i2c1, i2c2, i2c3, iim, enfc, ipu1, ipu1_di0, ipu1_di1, ipu2,
-       ipu2_di0, ldb_di0, ldb_di1, ipu2_di1, hsi_tx, mlb, mmdc_ch0_axi,
-       mmdc_ch1_axi, ocram, openvg_axi, pcie_axi, pwm1, pwm2, pwm3, pwm4, per1_bch,
-       gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1,
-       ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
-       usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg,
-       pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg,
-       ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5,
-       sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate,
-       usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, eim_slow,
-       spdif, cko2_sel, cko2_podf, cko2, cko, vdoa, pll4_audio_div,
-       lvds1_sel, lvds2_sel, lvds1_gate, lvds2_gate, esai_ahb, clk_max
-};
-
-static struct clk *clk[clk_max];
+static struct clk *clk[IMX6QDL_CLK_END];
 static struct clk_onecell_data clk_data;
 
-static enum mx6q_clks const clks_init_on[] __initconst = {
-       mmdc_ch0_axi, rom, arm,
+static unsigned int const clks_init_on[] __initconst = {
+       IMX6QDL_CLK_MMDC_CH0_AXI,
+       IMX6QDL_CLK_ROM,
+       IMX6QDL_CLK_ARM,
 };
 
 static struct clk_div_table clk_enet_ref_table[] = {
@@ -149,10 +115,10 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
        int i;
        int ret;
 
-       clk[dummy] = imx_clk_fixed("dummy", 0);
-       clk[ckil] = imx_obtain_fixed_clock("ckil", 0);
-       clk[ckih] = imx_obtain_fixed_clock("ckih1", 0);
-       clk[osc] = imx_obtain_fixed_clock("osc", 0);
+       clk[IMX6QDL_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
+       clk[IMX6QDL_CLK_CKIL] = imx_obtain_fixed_clock("ckil", 0);
+       clk[IMX6QDL_CLK_CKIH] = imx_obtain_fixed_clock("ckih1", 0);
+       clk[IMX6QDL_CLK_OSC] = imx_obtain_fixed_clock("osc", 0);
 
        np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
        base = of_iomap(np, 0);
@@ -166,14 +132,14 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
                video_div_table[2].div = 1;
        };
 
-       /*                   type                               name         parent_name  base     div_mask */
-       clk[pll1_sys]      = imx_clk_pllv3(IMX_PLLV3_SYS,       "pll1_sys",     "osc", base,        0x7f);
-       clk[pll2_bus]      = imx_clk_pllv3(IMX_PLLV3_GENERIC,   "pll2_bus",     "osc", base + 0x30, 0x1);
-       clk[pll3_usb_otg]  = imx_clk_pllv3(IMX_PLLV3_USB,       "pll3_usb_otg", "osc", base + 0x10, 0x3);
-       clk[pll4_audio]    = imx_clk_pllv3(IMX_PLLV3_AV,        "pll4_audio",   "osc", base + 0x70, 0x7f);
-       clk[pll5_video]    = imx_clk_pllv3(IMX_PLLV3_AV,        "pll5_video",   "osc", base + 0xa0, 0x7f);
-       clk[pll6_enet]     = imx_clk_pllv3(IMX_PLLV3_ENET,      "pll6_enet",    "osc", base + 0xe0, 0x3);
-       clk[pll7_usb_host] = imx_clk_pllv3(IMX_PLLV3_USB,       "pll7_usb_host","osc", base + 0x20, 0x3);
+       /*                                             type             name         parent_name  base     div_mask */
+       clk[IMX6QDL_CLK_PLL1_SYS]      = imx_clk_pllv3(IMX_PLLV3_SYS,   "pll1_sys",     "osc", base,        0x7f);
+       clk[IMX6QDL_CLK_PLL2_BUS]      = imx_clk_pllv3(IMX_PLLV3_GENERIC,       "pll2_bus",     "osc", base + 0x30, 0x1);
+       clk[IMX6QDL_CLK_PLL3_USB_OTG]  = imx_clk_pllv3(IMX_PLLV3_USB,   "pll3_usb_otg", "osc", base + 0x10, 0x3);
+       clk[IMX6QDL_CLK_PLL4_AUDIO]    = imx_clk_pllv3(IMX_PLLV3_AV,    "pll4_audio",   "osc", base + 0x70, 0x7f);
+       clk[IMX6QDL_CLK_PLL5_VIDEO]    = imx_clk_pllv3(IMX_PLLV3_AV,    "pll5_video",   "osc", base + 0xa0, 0x7f);
+       clk[IMX6QDL_CLK_PLL6_ENET]     = imx_clk_pllv3(IMX_PLLV3_ENET,  "pll6_enet",    "osc", base + 0xe0, 0x3);
+       clk[IMX6QDL_CLK_PLL7_USB_HOST] = imx_clk_pllv3(IMX_PLLV3_USB,   "pll7_usb_host","osc", base + 0x20, 0x3);
 
        /*
         * Bit 20 is the reserved and read-only bit, we do this only for:
@@ -181,28 +147,28 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
         * - Keep refcount when do usbphy clk_enable/disable, in that case,
         * the clk framework may need to enable/disable usbphy's parent
         */
-       clk[usbphy1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20);
-       clk[usbphy2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20);
+       clk[IMX6QDL_CLK_USBPHY1] = imx_clk_gate("usbphy1", "pll3_usb_otg", base + 0x10, 20);
+       clk[IMX6QDL_CLK_USBPHY2] = imx_clk_gate("usbphy2", "pll7_usb_host", base + 0x20, 20);
 
        /*
         * usbphy*_gate needs to be on after system boots up, and software
         * never needs to control it anymore.
         */
-       clk[usbphy1_gate] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6);
-       clk[usbphy2_gate] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6);
+       clk[IMX6QDL_CLK_USBPHY1_GATE] = imx_clk_gate("usbphy1_gate", "dummy", base + 0x10, 6);
+       clk[IMX6QDL_CLK_USBPHY2_GATE] = imx_clk_gate("usbphy2_gate", "dummy", base + 0x20, 6);
 
-       clk[sata_ref] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5);
-       clk[pcie_ref] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4);
+       clk[IMX6QDL_CLK_SATA_REF] = imx_clk_fixed_factor("sata_ref", "pll6_enet", 1, 5);
+       clk[IMX6QDL_CLK_PCIE_REF] = imx_clk_fixed_factor("pcie_ref", "pll6_enet", 1, 4);
 
-       clk[sata_ref_100m] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20);
-       clk[pcie_ref_125m] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19);
+       clk[IMX6QDL_CLK_SATA_REF_100M] = imx_clk_gate("sata_ref_100m", "sata_ref", base + 0xe0, 20);
+       clk[IMX6QDL_CLK_PCIE_REF_125M] = imx_clk_gate("pcie_ref_125m", "pcie_ref", base + 0xe0, 19);
 
-       clk[enet_ref] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0,
+       clk[IMX6QDL_CLK_ENET_REF] = clk_register_divider_table(NULL, "enet_ref", "pll6_enet", 0,
                        base + 0xe0, 0, 2, 0, clk_enet_ref_table,
                        &imx_ccm_lock);
 
-       clk[lvds1_sel] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels));
-       clk[lvds2_sel] = imx_clk_mux("lvds2_sel", base + 0x160, 5, 5, lvds_sels, ARRAY_SIZE(lvds_sels));
+       clk[IMX6QDL_CLK_LVDS1_SEL] = imx_clk_mux("lvds1_sel", base + 0x160, 0, 5, lvds_sels, ARRAY_SIZE(lvds_sels));
+       clk[IMX6QDL_CLK_LVDS2_SEL] = imx_clk_mux("lvds2_sel", base + 0x160, 5, 5, lvds_sels, ARRAY_SIZE(lvds_sels));
 
        /*
         * lvds1_gate and lvds2_gate are pseudo-gates.  Both can be
@@ -210,29 +176,29 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
         * the "output_enable" bit as a gate, even though it's really just
         * enabling clock output.
         */
-       clk[lvds1_gate] = imx_clk_gate("lvds1_gate", "lvds1_sel", base + 0x160, 10);
-       clk[lvds2_gate] = imx_clk_gate("lvds2_gate", "lvds2_sel", base + 0x160, 11);
-
-       /*                                name              parent_name        reg       idx */
-       clk[pll2_pfd0_352m] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus",     base + 0x100, 0);
-       clk[pll2_pfd1_594m] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus",     base + 0x100, 1);
-       clk[pll2_pfd2_396m] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus",     base + 0x100, 2);
-       clk[pll3_pfd0_720m] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0,  0);
-       clk[pll3_pfd1_540m] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0,  1);
-       clk[pll3_pfd2_508m] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0,  2);
-       clk[pll3_pfd3_454m] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0,  3);
-
-       /*                                    name         parent_name     mult div */
-       clk[pll2_198m] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2);
-       clk[pll3_120m] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg",   1, 4);
-       clk[pll3_80m]  = imx_clk_fixed_factor("pll3_80m",  "pll3_usb_otg",   1, 6);
-       clk[pll3_60m]  = imx_clk_fixed_factor("pll3_60m",  "pll3_usb_otg",   1, 8);
-       clk[twd]       = imx_clk_fixed_factor("twd",       "arm",            1, 2);
-
-       clk[pll4_post_div] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock);
-       clk[pll4_audio_div] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div", CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock);
-       clk[pll5_post_div] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock);
-       clk[pll5_video_div] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock);
+       clk[IMX6QDL_CLK_LVDS1_GATE] = imx_clk_gate("lvds1_gate", "lvds1_sel", base + 0x160, 10);
+       clk[IMX6QDL_CLK_LVDS2_GATE] = imx_clk_gate("lvds2_gate", "lvds2_sel", base + 0x160, 11);
+
+       /*                                            name              parent_name        reg       idx */
+       clk[IMX6QDL_CLK_PLL2_PFD0_352M] = imx_clk_pfd("pll2_pfd0_352m", "pll2_bus",     base + 0x100, 0);
+       clk[IMX6QDL_CLK_PLL2_PFD1_594M] = imx_clk_pfd("pll2_pfd1_594m", "pll2_bus",     base + 0x100, 1);
+       clk[IMX6QDL_CLK_PLL2_PFD2_396M] = imx_clk_pfd("pll2_pfd2_396m", "pll2_bus",     base + 0x100, 2);
+       clk[IMX6QDL_CLK_PLL3_PFD0_720M] = imx_clk_pfd("pll3_pfd0_720m", "pll3_usb_otg", base + 0xf0,  0);
+       clk[IMX6QDL_CLK_PLL3_PFD1_540M] = imx_clk_pfd("pll3_pfd1_540m", "pll3_usb_otg", base + 0xf0,  1);
+       clk[IMX6QDL_CLK_PLL3_PFD2_508M] = imx_clk_pfd("pll3_pfd2_508m", "pll3_usb_otg", base + 0xf0,  2);
+       clk[IMX6QDL_CLK_PLL3_PFD3_454M] = imx_clk_pfd("pll3_pfd3_454m", "pll3_usb_otg", base + 0xf0,  3);
+
+       /*                                                name         parent_name     mult div */
+       clk[IMX6QDL_CLK_PLL2_198M] = imx_clk_fixed_factor("pll2_198m", "pll2_pfd2_396m", 1, 2);
+       clk[IMX6QDL_CLK_PLL3_120M] = imx_clk_fixed_factor("pll3_120m", "pll3_usb_otg",   1, 4);
+       clk[IMX6QDL_CLK_PLL3_80M]  = imx_clk_fixed_factor("pll3_80m",  "pll3_usb_otg",   1, 6);
+       clk[IMX6QDL_CLK_PLL3_60M]  = imx_clk_fixed_factor("pll3_60m",  "pll3_usb_otg",   1, 8);
+       clk[IMX6QDL_CLK_TWD]       = imx_clk_fixed_factor("twd",       "arm",            1, 2);
+
+       clk[IMX6QDL_CLK_PLL4_POST_DIV] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock);
+       clk[IMX6QDL_CLK_PLL4_AUDIO_DIV] = clk_register_divider(NULL, "pll4_audio_div", "pll4_post_div", CLK_SET_RATE_PARENT, base + 0x170, 15, 1, 0, &imx_ccm_lock);
+       clk[IMX6QDL_CLK_PLL5_POST_DIV] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock);
+       clk[IMX6QDL_CLK_PLL5_VIDEO_DIV] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock);
 
        np = ccm_node;
        base = of_iomap(np, 0);
@@ -240,262 +206,254 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
 
        imx6q_pm_set_ccm_base(base);
 
-       /*                                  name                reg       shift width parent_names     num_parents */
-       clk[step]             = imx_clk_mux("step",             base + 0xc,  8,  1, step_sels,         ARRAY_SIZE(step_sels));
-       clk[pll1_sw]          = imx_clk_mux("pll1_sw",          base + 0xc,  2,  1, pll1_sw_sels,      ARRAY_SIZE(pll1_sw_sels));
-       clk[periph_pre]       = imx_clk_mux("periph_pre",       base + 0x18, 18, 2, periph_pre_sels,   ARRAY_SIZE(periph_pre_sels));
-       clk[periph2_pre]      = imx_clk_mux("periph2_pre",      base + 0x18, 21, 2, periph_pre_sels,   ARRAY_SIZE(periph_pre_sels));
-       clk[periph_clk2_sel]  = imx_clk_mux("periph_clk2_sel",  base + 0x18, 12, 2, periph_clk2_sels,  ARRAY_SIZE(periph_clk2_sels));
-       clk[periph2_clk2_sel] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels));
-       clk[axi_sel]          = imx_clk_mux("axi_sel",          base + 0x14, 6,  2, axi_sels,          ARRAY_SIZE(axi_sels));
-       clk[esai_sel]         = imx_clk_mux("esai_sel",         base + 0x20, 19, 2, audio_sels,        ARRAY_SIZE(audio_sels));
-       clk[asrc_sel]         = imx_clk_mux("asrc_sel",         base + 0x30, 7,  2, audio_sels,        ARRAY_SIZE(audio_sels));
-       clk[spdif_sel]        = imx_clk_mux("spdif_sel",        base + 0x30, 20, 2, audio_sels,        ARRAY_SIZE(audio_sels));
-       clk[gpu2d_axi]        = imx_clk_mux("gpu2d_axi",        base + 0x18, 0,  1, gpu_axi_sels,      ARRAY_SIZE(gpu_axi_sels));
-       clk[gpu3d_axi]        = imx_clk_mux("gpu3d_axi",        base + 0x18, 1,  1, gpu_axi_sels,      ARRAY_SIZE(gpu_axi_sels));
-       clk[gpu2d_core_sel]   = imx_clk_mux("gpu2d_core_sel",   base + 0x18, 16, 2, gpu2d_core_sels,   ARRAY_SIZE(gpu2d_core_sels));
-       clk[gpu3d_core_sel]   = imx_clk_mux("gpu3d_core_sel",   base + 0x18, 4,  2, gpu3d_core_sels,   ARRAY_SIZE(gpu3d_core_sels));
-       clk[gpu3d_shader_sel] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8,  2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels));
-       clk[ipu1_sel]         = imx_clk_mux("ipu1_sel",         base + 0x3c, 9,  2, ipu_sels,          ARRAY_SIZE(ipu_sels));
-       clk[ipu2_sel]         = imx_clk_mux("ipu2_sel",         base + 0x3c, 14, 2, ipu_sels,          ARRAY_SIZE(ipu_sels));
-       clk[ldb_di0_sel]      = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9,  3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
-       clk[ldb_di1_sel]      = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
-       clk[ipu1_di0_pre_sel] = imx_clk_mux_flags("ipu1_di0_pre_sel", base + 0x34, 6,  3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
-       clk[ipu1_di1_pre_sel] = imx_clk_mux_flags("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
-       clk[ipu2_di0_pre_sel] = imx_clk_mux_flags("ipu2_di0_pre_sel", base + 0x38, 6,  3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
-       clk[ipu2_di1_pre_sel] = imx_clk_mux_flags("ipu2_di1_pre_sel", base + 0x38, 15, 3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
-       clk[ipu1_di0_sel]     = imx_clk_mux_flags("ipu1_di0_sel",     base + 0x34, 0,  3, ipu1_di0_sels,     ARRAY_SIZE(ipu1_di0_sels), CLK_SET_RATE_PARENT);
-       clk[ipu1_di1_sel]     = imx_clk_mux_flags("ipu1_di1_sel",     base + 0x34, 9,  3, ipu1_di1_sels,     ARRAY_SIZE(ipu1_di1_sels), CLK_SET_RATE_PARENT);
-       clk[ipu2_di0_sel]     = imx_clk_mux_flags("ipu2_di0_sel",     base + 0x38, 0,  3, ipu2_di0_sels,     ARRAY_SIZE(ipu2_di0_sels), CLK_SET_RATE_PARENT);
-       clk[ipu2_di1_sel]     = imx_clk_mux_flags("ipu2_di1_sel",     base + 0x38, 9,  3, ipu2_di1_sels,     ARRAY_SIZE(ipu2_di1_sels), CLK_SET_RATE_PARENT);
-       clk[hsi_tx_sel]       = imx_clk_mux("hsi_tx_sel",       base + 0x30, 28, 1, hsi_tx_sels,       ARRAY_SIZE(hsi_tx_sels));
-       clk[pcie_axi_sel]     = imx_clk_mux("pcie_axi_sel",     base + 0x18, 10, 1, pcie_axi_sels,     ARRAY_SIZE(pcie_axi_sels));
-       clk[ssi1_sel]         = imx_clk_fixup_mux("ssi1_sel",   base + 0x1c, 10, 2, ssi_sels,          ARRAY_SIZE(ssi_sels),          imx_cscmr1_fixup);
-       clk[ssi2_sel]         = imx_clk_fixup_mux("ssi2_sel",   base + 0x1c, 12, 2, ssi_sels,          ARRAY_SIZE(ssi_sels),          imx_cscmr1_fixup);
-       clk[ssi3_sel]         = imx_clk_fixup_mux("ssi3_sel",   base + 0x1c, 14, 2, ssi_sels,          ARRAY_SIZE(ssi_sels),          imx_cscmr1_fixup);
-       clk[usdhc1_sel]       = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels),        imx_cscmr1_fixup);
-       clk[usdhc2_sel]       = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels),        imx_cscmr1_fixup);
-       clk[usdhc3_sel]       = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels),        imx_cscmr1_fixup);
-       clk[usdhc4_sel]       = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels),        imx_cscmr1_fixup);
-       clk[enfc_sel]         = imx_clk_mux("enfc_sel",         base + 0x2c, 16, 2, enfc_sels,         ARRAY_SIZE(enfc_sels));
-       clk[emi_sel]          = imx_clk_fixup_mux("emi_sel",      base + 0x1c, 27, 2, emi_sels,        ARRAY_SIZE(emi_sels),          imx_cscmr1_fixup);
-       clk[emi_slow_sel]     = imx_clk_fixup_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels,   ARRAY_SIZE(emi_slow_sels),     imx_cscmr1_fixup);
-       clk[vdo_axi_sel]      = imx_clk_mux("vdo_axi_sel",      base + 0x18, 11, 1, vdo_axi_sels,      ARRAY_SIZE(vdo_axi_sels));
-       clk[vpu_axi_sel]      = imx_clk_mux("vpu_axi_sel",      base + 0x18, 14, 2, vpu_axi_sels,      ARRAY_SIZE(vpu_axi_sels));
-       clk[cko1_sel]         = imx_clk_mux("cko1_sel",         base + 0x60, 0,  4, cko1_sels,         ARRAY_SIZE(cko1_sels));
-       clk[cko2_sel]         = imx_clk_mux("cko2_sel",         base + 0x60, 16, 5, cko2_sels,         ARRAY_SIZE(cko2_sels));
-       clk[cko]              = imx_clk_mux("cko",              base + 0x60, 8, 1,  cko_sels,          ARRAY_SIZE(cko_sels));
-
-       /*                              name         reg      shift width busy: reg, shift parent_names  num_parents */
-       clk[periph]  = imx_clk_busy_mux("periph",  base + 0x14, 25,  1,   base + 0x48, 5,  periph_sels,  ARRAY_SIZE(periph_sels));
-       clk[periph2] = imx_clk_busy_mux("periph2", base + 0x14, 26,  1,   base + 0x48, 3,  periph2_sels, ARRAY_SIZE(periph2_sels));
-
-       /*                                      name                parent_name          reg       shift width */
-       clk[periph_clk2]      = imx_clk_divider("periph_clk2",      "periph_clk2_sel",   base + 0x14, 27, 3);
-       clk[periph2_clk2]     = imx_clk_divider("periph2_clk2",     "periph2_clk2_sel",  base + 0x14, 0,  3);
-       clk[ipg]              = imx_clk_divider("ipg",              "ahb",               base + 0x14, 8,  2);
-       clk[ipg_per]          = imx_clk_fixup_divider("ipg_per",    "ipg",               base + 0x1c, 0,  6, imx_cscmr1_fixup);
-       clk[esai_pred]        = imx_clk_divider("esai_pred",        "esai_sel",          base + 0x28, 9,  3);
-       clk[esai_podf]        = imx_clk_divider("esai_podf",        "esai_pred",         base + 0x28, 25, 3);
-       clk[asrc_pred]        = imx_clk_divider("asrc_pred",        "asrc_sel",          base + 0x30, 12, 3);
-       clk[asrc_podf]        = imx_clk_divider("asrc_podf",        "asrc_pred",         base + 0x30, 9,  3);
-       clk[spdif_pred]       = imx_clk_divider("spdif_pred",       "spdif_sel",         base + 0x30, 25, 3);
-       clk[spdif_podf]       = imx_clk_divider("spdif_podf",       "spdif_pred",        base + 0x30, 22, 3);
-       clk[can_root]         = imx_clk_divider("can_root",         "pll3_60m",          base + 0x20, 2,  6);
-       clk[ecspi_root]       = imx_clk_divider("ecspi_root",       "pll3_60m",          base + 0x38, 19, 6);
-       clk[gpu2d_core_podf]  = imx_clk_divider("gpu2d_core_podf",  "gpu2d_core_sel",    base + 0x18, 23, 3);
-       clk[gpu3d_core_podf]  = imx_clk_divider("gpu3d_core_podf",  "gpu3d_core_sel",    base + 0x18, 26, 3);
-       clk[gpu3d_shader]     = imx_clk_divider("gpu3d_shader",     "gpu3d_shader_sel",  base + 0x18, 29, 3);
-       clk[ipu1_podf]        = imx_clk_divider("ipu1_podf",        "ipu1_sel",          base + 0x3c, 11, 3);
-       clk[ipu2_podf]        = imx_clk_divider("ipu2_podf",        "ipu2_sel",          base + 0x3c, 16, 3);
-       clk[ldb_di0_div_3_5]  = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7);
-       clk[ldb_di0_podf]     = imx_clk_divider_flags("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1, 0);
-       clk[ldb_di1_div_3_5]  = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7);
-       clk[ldb_di1_podf]     = imx_clk_divider_flags("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1, 0);
-       clk[ipu1_di0_pre]     = imx_clk_divider("ipu1_di0_pre",     "ipu1_di0_pre_sel",  base + 0x34, 3,  3);
-       clk[ipu1_di1_pre]     = imx_clk_divider("ipu1_di1_pre",     "ipu1_di1_pre_sel",  base + 0x34, 12, 3);
-       clk[ipu2_di0_pre]     = imx_clk_divider("ipu2_di0_pre",     "ipu2_di0_pre_sel",  base + 0x38, 3,  3);
-       clk[ipu2_di1_pre]     = imx_clk_divider("ipu2_di1_pre",     "ipu2_di1_pre_sel",  base + 0x38, 12, 3);
-       clk[hsi_tx_podf]      = imx_clk_divider("hsi_tx_podf",      "hsi_tx_sel",        base + 0x30, 29, 3);
-       clk[ssi1_pred]        = imx_clk_divider("ssi1_pred",        "ssi1_sel",          base + 0x28, 6,  3);
-       clk[ssi1_podf]        = imx_clk_divider("ssi1_podf",        "ssi1_pred",         base + 0x28, 0,  6);
-       clk[ssi2_pred]        = imx_clk_divider("ssi2_pred",        "ssi2_sel",          base + 0x2c, 6,  3);
-       clk[ssi2_podf]        = imx_clk_divider("ssi2_podf",        "ssi2_pred",         base + 0x2c, 0,  6);
-       clk[ssi3_pred]        = imx_clk_divider("ssi3_pred",        "ssi3_sel",          base + 0x28, 22, 3);
-       clk[ssi3_podf]        = imx_clk_divider("ssi3_podf",        "ssi3_pred",         base + 0x28, 16, 6);
-       clk[uart_serial_podf] = imx_clk_divider("uart_serial_podf", "pll3_80m",          base + 0x24, 0,  6);
-       clk[usdhc1_podf]      = imx_clk_divider("usdhc1_podf",      "usdhc1_sel",        base + 0x24, 11, 3);
-       clk[usdhc2_podf]      = imx_clk_divider("usdhc2_podf",      "usdhc2_sel",        base + 0x24, 16, 3);
-       clk[usdhc3_podf]      = imx_clk_divider("usdhc3_podf",      "usdhc3_sel",        base + 0x24, 19, 3);
-       clk[usdhc4_podf]      = imx_clk_divider("usdhc4_podf",      "usdhc4_sel",        base + 0x24, 22, 3);
-       clk[enfc_pred]        = imx_clk_divider("enfc_pred",        "enfc_sel",          base + 0x2c, 18, 3);
-       clk[enfc_podf]        = imx_clk_divider("enfc_podf",        "enfc_pred",         base + 0x2c, 21, 6);
-       clk[emi_podf]         = imx_clk_fixup_divider("emi_podf",   "emi_sel",           base + 0x1c, 20, 3, imx_cscmr1_fixup);
-       clk[emi_slow_podf]    = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel",   base + 0x1c, 23, 3, imx_cscmr1_fixup);
-       clk[vpu_axi_podf]     = imx_clk_divider("vpu_axi_podf",     "vpu_axi_sel",       base + 0x24, 25, 3);
-       clk[cko1_podf]        = imx_clk_divider("cko1_podf",        "cko1_sel",          base + 0x60, 4,  3);
-       clk[cko2_podf]        = imx_clk_divider("cko2_podf",        "cko2_sel",          base + 0x60, 21, 3);
-
-       /*                                            name                 parent_name    reg        shift width busy: reg, shift */
-       clk[axi]               = imx_clk_busy_divider("axi",               "axi_sel",     base + 0x14, 16,  3,   base + 0x48, 0);
-       clk[mmdc_ch0_axi_podf] = imx_clk_busy_divider("mmdc_ch0_axi_podf", "periph",      base + 0x14, 19,  3,   base + 0x48, 4);
-       clk[mmdc_ch1_axi_podf] = imx_clk_busy_divider("mmdc_ch1_axi_podf", "periph2",     base + 0x14, 3,   3,   base + 0x48, 2);
-       clk[arm]               = imx_clk_busy_divider("arm",               "pll1_sw",     base + 0x10, 0,   3,   base + 0x48, 16);
-       clk[ahb]               = imx_clk_busy_divider("ahb",               "periph",      base + 0x14, 10,  3,   base + 0x48, 1);
-
-       /*                                name             parent_name          reg         shift */
-       clk[apbh_dma]     = imx_clk_gate2("apbh_dma",      "usdhc3",            base + 0x68, 4);
-       clk[asrc]         = imx_clk_gate2("asrc",          "asrc_podf",         base + 0x68, 6);
-       clk[can1_ipg]     = imx_clk_gate2("can1_ipg",      "ipg",               base + 0x68, 14);
-       clk[can1_serial]  = imx_clk_gate2("can1_serial",   "can_root",          base + 0x68, 16);
-       clk[can2_ipg]     = imx_clk_gate2("can2_ipg",      "ipg",               base + 0x68, 18);
-       clk[can2_serial]  = imx_clk_gate2("can2_serial",   "can_root",          base + 0x68, 20);
-       clk[ecspi1]       = imx_clk_gate2("ecspi1",        "ecspi_root",        base + 0x6c, 0);
-       clk[ecspi2]       = imx_clk_gate2("ecspi2",        "ecspi_root",        base + 0x6c, 2);
-       clk[ecspi3]       = imx_clk_gate2("ecspi3",        "ecspi_root",        base + 0x6c, 4);
-       clk[ecspi4]       = imx_clk_gate2("ecspi4",        "ecspi_root",        base + 0x6c, 6);
+       /*                                              name                reg       shift width parent_names     num_parents */
+       clk[IMX6QDL_CLK_STEP]             = imx_clk_mux("step",             base + 0xc,  8,  1, step_sels,         ARRAY_SIZE(step_sels));
+       clk[IMX6QDL_CLK_PLL1_SW]          = imx_clk_mux("pll1_sw",          base + 0xc,  2,  1, pll1_sw_sels,      ARRAY_SIZE(pll1_sw_sels));
+       clk[IMX6QDL_CLK_PERIPH_PRE]       = imx_clk_mux("periph_pre",       base + 0x18, 18, 2, periph_pre_sels,   ARRAY_SIZE(periph_pre_sels));
+       clk[IMX6QDL_CLK_PERIPH2_PRE]      = imx_clk_mux("periph2_pre",      base + 0x18, 21, 2, periph_pre_sels,   ARRAY_SIZE(periph_pre_sels));
+       clk[IMX6QDL_CLK_PERIPH_CLK2_SEL]  = imx_clk_mux("periph_clk2_sel",  base + 0x18, 12, 2, periph_clk2_sels,  ARRAY_SIZE(periph_clk2_sels));
+       clk[IMX6QDL_CLK_PERIPH2_CLK2_SEL] = imx_clk_mux("periph2_clk2_sel", base + 0x18, 20, 1, periph2_clk2_sels, ARRAY_SIZE(periph2_clk2_sels));
+       clk[IMX6QDL_CLK_AXI_SEL]          = imx_clk_mux("axi_sel",          base + 0x14, 6,  2, axi_sels,          ARRAY_SIZE(axi_sels));
+       clk[IMX6QDL_CLK_ESAI_SEL]         = imx_clk_mux("esai_sel",         base + 0x20, 19, 2, audio_sels,        ARRAY_SIZE(audio_sels));
+       clk[IMX6QDL_CLK_ASRC_SEL]         = imx_clk_mux("asrc_sel",         base + 0x30, 7,  2, audio_sels,        ARRAY_SIZE(audio_sels));
+       clk[IMX6QDL_CLK_SPDIF_SEL]        = imx_clk_mux("spdif_sel",        base + 0x30, 20, 2, audio_sels,        ARRAY_SIZE(audio_sels));
+       clk[IMX6QDL_CLK_GPU2D_AXI]        = imx_clk_mux("gpu2d_axi",        base + 0x18, 0,  1, gpu_axi_sels,      ARRAY_SIZE(gpu_axi_sels));
+       clk[IMX6QDL_CLK_GPU3D_AXI]        = imx_clk_mux("gpu3d_axi",        base + 0x18, 1,  1, gpu_axi_sels,      ARRAY_SIZE(gpu_axi_sels));
+       clk[IMX6QDL_CLK_GPU2D_CORE_SEL]   = imx_clk_mux("gpu2d_core_sel",   base + 0x18, 16, 2, gpu2d_core_sels,   ARRAY_SIZE(gpu2d_core_sels));
+       clk[IMX6QDL_CLK_GPU3D_CORE_SEL]   = imx_clk_mux("gpu3d_core_sel",   base + 0x18, 4,  2, gpu3d_core_sels,   ARRAY_SIZE(gpu3d_core_sels));
+       clk[IMX6QDL_CLK_GPU3D_SHADER_SEL] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8,  2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels));
+       clk[IMX6QDL_CLK_IPU1_SEL]         = imx_clk_mux("ipu1_sel",         base + 0x3c, 9,  2, ipu_sels,          ARRAY_SIZE(ipu_sels));
+       clk[IMX6QDL_CLK_IPU2_SEL]         = imx_clk_mux("ipu2_sel",         base + 0x3c, 14, 2, ipu_sels,          ARRAY_SIZE(ipu_sels));
+       clk[IMX6QDL_CLK_LDB_DI0_SEL]      = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9,  3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_LDB_DI1_SEL]      = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels,      ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL] = imx_clk_mux_flags("ipu1_di0_pre_sel", base + 0x34, 6,  3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL] = imx_clk_mux_flags("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL] = imx_clk_mux_flags("ipu2_di0_pre_sel", base + 0x38, 6,  3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU2_DI1_PRE_SEL] = imx_clk_mux_flags("ipu2_di1_pre_sel", base + 0x38, 15, 3, ipu_di_pre_sels,   ARRAY_SIZE(ipu_di_pre_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU1_DI0_SEL]     = imx_clk_mux_flags("ipu1_di0_sel",     base + 0x34, 0,  3, ipu1_di0_sels,     ARRAY_SIZE(ipu1_di0_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU1_DI1_SEL]     = imx_clk_mux_flags("ipu1_di1_sel",     base + 0x34, 9,  3, ipu1_di1_sels,     ARRAY_SIZE(ipu1_di1_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU2_DI0_SEL]     = imx_clk_mux_flags("ipu2_di0_sel",     base + 0x38, 0,  3, ipu2_di0_sels,     ARRAY_SIZE(ipu2_di0_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_IPU2_DI1_SEL]     = imx_clk_mux_flags("ipu2_di1_sel",     base + 0x38, 9,  3, ipu2_di1_sels,     ARRAY_SIZE(ipu2_di1_sels), CLK_SET_RATE_PARENT);
+       clk[IMX6QDL_CLK_HSI_TX_SEL]       = imx_clk_mux("hsi_tx_sel",       base + 0x30, 28, 1, hsi_tx_sels,       ARRAY_SIZE(hsi_tx_sels));
+       clk[IMX6QDL_CLK_PCIE_AXI_SEL]     = imx_clk_mux("pcie_axi_sel",     base + 0x18, 10, 1, pcie_axi_sels,     ARRAY_SIZE(pcie_axi_sels));
+       clk[IMX6QDL_CLK_SSI1_SEL]         = imx_clk_fixup_mux("ssi1_sel",   base + 0x1c, 10, 2, ssi_sels,          ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_SSI2_SEL]         = imx_clk_fixup_mux("ssi2_sel",   base + 0x1c, 12, 2, ssi_sels,          ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_SSI3_SEL]         = imx_clk_fixup_mux("ssi3_sel",   base + 0x1c, 14, 2, ssi_sels,          ARRAY_SIZE(ssi_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_USDHC1_SEL]       = imx_clk_fixup_mux("usdhc1_sel", base + 0x1c, 16, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_USDHC2_SEL]       = imx_clk_fixup_mux("usdhc2_sel", base + 0x1c, 17, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_USDHC3_SEL]       = imx_clk_fixup_mux("usdhc3_sel", base + 0x1c, 18, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_USDHC4_SEL]       = imx_clk_fixup_mux("usdhc4_sel", base + 0x1c, 19, 1, usdhc_sels,        ARRAY_SIZE(usdhc_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_ENFC_SEL]         = imx_clk_mux("enfc_sel",         base + 0x2c, 16, 2, enfc_sels,         ARRAY_SIZE(enfc_sels));
+       clk[IMX6QDL_CLK_EMI_SEL]          = imx_clk_fixup_mux("emi_sel",      base + 0x1c, 27, 2, emi_sels,        ARRAY_SIZE(emi_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_EMI_SLOW_SEL]     = imx_clk_fixup_mux("emi_slow_sel", base + 0x1c, 29, 2, emi_slow_sels,   ARRAY_SIZE(emi_slow_sels), imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_VDO_AXI_SEL]      = imx_clk_mux("vdo_axi_sel",      base + 0x18, 11, 1, vdo_axi_sels,      ARRAY_SIZE(vdo_axi_sels));
+       clk[IMX6QDL_CLK_VPU_AXI_SEL]      = imx_clk_mux("vpu_axi_sel",      base + 0x18, 14, 2, vpu_axi_sels,      ARRAY_SIZE(vpu_axi_sels));
+       clk[IMX6QDL_CLK_CKO1_SEL]         = imx_clk_mux("cko1_sel",         base + 0x60, 0,  4, cko1_sels,         ARRAY_SIZE(cko1_sels));
+       clk[IMX6QDL_CLK_CKO2_SEL]         = imx_clk_mux("cko2_sel",         base + 0x60, 16, 5, cko2_sels,         ARRAY_SIZE(cko2_sels));
+       clk[IMX6QDL_CLK_CKO]              = imx_clk_mux("cko",              base + 0x60, 8, 1,  cko_sels,          ARRAY_SIZE(cko_sels));
+
+       /*                                          name         reg      shift width busy: reg, shift parent_names  num_parents */
+       clk[IMX6QDL_CLK_PERIPH]  = imx_clk_busy_mux("periph",  base + 0x14, 25,  1,   base + 0x48, 5,  periph_sels,  ARRAY_SIZE(periph_sels));
+       clk[IMX6QDL_CLK_PERIPH2] = imx_clk_busy_mux("periph2", base + 0x14, 26,  1,   base + 0x48, 3,  periph2_sels, ARRAY_SIZE(periph2_sels));
+
+       /*                                                  name                parent_name          reg       shift width */
+       clk[IMX6QDL_CLK_PERIPH_CLK2]      = imx_clk_divider("periph_clk2",      "periph_clk2_sel",   base + 0x14, 27, 3);
+       clk[IMX6QDL_CLK_PERIPH2_CLK2]     = imx_clk_divider("periph2_clk2",     "periph2_clk2_sel",  base + 0x14, 0,  3);
+       clk[IMX6QDL_CLK_IPG]              = imx_clk_divider("ipg",              "ahb",               base + 0x14, 8,  2);
+       clk[IMX6QDL_CLK_IPG_PER]          = imx_clk_fixup_divider("ipg_per",    "ipg",               base + 0x1c, 0,  6, imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_ESAI_PRED]        = imx_clk_divider("esai_pred",        "esai_sel",          base + 0x28, 9,  3);
+       clk[IMX6QDL_CLK_ESAI_PODF]        = imx_clk_divider("esai_podf",        "esai_pred",         base + 0x28, 25, 3);
+       clk[IMX6QDL_CLK_ASRC_PRED]        = imx_clk_divider("asrc_pred",        "asrc_sel",          base + 0x30, 12, 3);
+       clk[IMX6QDL_CLK_ASRC_PODF]        = imx_clk_divider("asrc_podf",        "asrc_pred",         base + 0x30, 9,  3);
+       clk[IMX6QDL_CLK_SPDIF_PRED]       = imx_clk_divider("spdif_pred",       "spdif_sel",         base + 0x30, 25, 3);
+       clk[IMX6QDL_CLK_SPDIF_PODF]       = imx_clk_divider("spdif_podf",       "spdif_pred",        base + 0x30, 22, 3);
+       clk[IMX6QDL_CLK_CAN_ROOT]         = imx_clk_divider("can_root",         "pll3_60m",          base + 0x20, 2,  6);
+       clk[IMX6QDL_CLK_ECSPI_ROOT]       = imx_clk_divider("ecspi_root",       "pll3_60m",          base + 0x38, 19, 6);
+       clk[IMX6QDL_CLK_GPU2D_CORE_PODF]  = imx_clk_divider("gpu2d_core_podf",  "gpu2d_core_sel",    base + 0x18, 23, 3);
+       clk[IMX6QDL_CLK_GPU3D_CORE_PODF]  = imx_clk_divider("gpu3d_core_podf",  "gpu3d_core_sel",    base + 0x18, 26, 3);
+       clk[IMX6QDL_CLK_GPU3D_SHADER]     = imx_clk_divider("gpu3d_shader",     "gpu3d_shader_sel",  base + 0x18, 29, 3);
+       clk[IMX6QDL_CLK_IPU1_PODF]        = imx_clk_divider("ipu1_podf",        "ipu1_sel",          base + 0x3c, 11, 3);
+       clk[IMX6QDL_CLK_IPU2_PODF]        = imx_clk_divider("ipu2_podf",        "ipu2_sel",          base + 0x3c, 16, 3);
+       clk[IMX6QDL_CLK_LDB_DI0_DIV_3_5]  = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7);
+       clk[IMX6QDL_CLK_LDB_DI0_PODF]     = imx_clk_divider_flags("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1, 0);
+       clk[IMX6QDL_CLK_LDB_DI1_DIV_3_5]  = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7);
+       clk[IMX6QDL_CLK_LDB_DI1_PODF]     = imx_clk_divider_flags("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1, 0);
+       clk[IMX6QDL_CLK_IPU1_DI0_PRE]     = imx_clk_divider("ipu1_di0_pre",     "ipu1_di0_pre_sel",  base + 0x34, 3,  3);
+       clk[IMX6QDL_CLK_IPU1_DI1_PRE]     = imx_clk_divider("ipu1_di1_pre",     "ipu1_di1_pre_sel",  base + 0x34, 12, 3);
+       clk[IMX6QDL_CLK_IPU2_DI0_PRE]     = imx_clk_divider("ipu2_di0_pre",     "ipu2_di0_pre_sel",  base + 0x38, 3,  3);
+       clk[IMX6QDL_CLK_IPU2_DI1_PRE]     = imx_clk_divider("ipu2_di1_pre",     "ipu2_di1_pre_sel",  base + 0x38, 12, 3);
+       clk[IMX6QDL_CLK_HSI_TX_PODF]      = imx_clk_divider("hsi_tx_podf",      "hsi_tx_sel",        base + 0x30, 29, 3);
+       clk[IMX6QDL_CLK_SSI1_PRED]        = imx_clk_divider("ssi1_pred",        "ssi1_sel",          base + 0x28, 6,  3);
+       clk[IMX6QDL_CLK_SSI1_PODF]        = imx_clk_divider("ssi1_podf",        "ssi1_pred",         base + 0x28, 0,  6);
+       clk[IMX6QDL_CLK_SSI2_PRED]        = imx_clk_divider("ssi2_pred",        "ssi2_sel",          base + 0x2c, 6,  3);
+       clk[IMX6QDL_CLK_SSI2_PODF]        = imx_clk_divider("ssi2_podf",        "ssi2_pred",         base + 0x2c, 0,  6);
+       clk[IMX6QDL_CLK_SSI3_PRED]        = imx_clk_divider("ssi3_pred",        "ssi3_sel",          base + 0x28, 22, 3);
+       clk[IMX6QDL_CLK_SSI3_PODF]        = imx_clk_divider("ssi3_podf",        "ssi3_pred",         base + 0x28, 16, 6);
+       clk[IMX6QDL_CLK_UART_SERIAL_PODF] = imx_clk_divider("uart_serial_podf", "pll3_80m",          base + 0x24, 0,  6);
+       clk[IMX6QDL_CLK_USDHC1_PODF]      = imx_clk_divider("usdhc1_podf",      "usdhc1_sel",        base + 0x24, 11, 3);
+       clk[IMX6QDL_CLK_USDHC2_PODF]      = imx_clk_divider("usdhc2_podf",      "usdhc2_sel",        base + 0x24, 16, 3);
+       clk[IMX6QDL_CLK_USDHC3_PODF]      = imx_clk_divider("usdhc3_podf",      "usdhc3_sel",        base + 0x24, 19, 3);
+       clk[IMX6QDL_CLK_USDHC4_PODF]      = imx_clk_divider("usdhc4_podf",      "usdhc4_sel",        base + 0x24, 22, 3);
+       clk[IMX6QDL_CLK_ENFC_PRED]        = imx_clk_divider("enfc_pred",        "enfc_sel",          base + 0x2c, 18, 3);
+       clk[IMX6QDL_CLK_ENFC_PODF]        = imx_clk_divider("enfc_podf",        "enfc_pred",         base + 0x2c, 21, 6);
+       clk[IMX6QDL_CLK_EMI_PODF]         = imx_clk_fixup_divider("emi_podf",   "emi_sel",           base + 0x1c, 20, 3, imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_EMI_SLOW_PODF]    = imx_clk_fixup_divider("emi_slow_podf", "emi_slow_sel",   base + 0x1c, 23, 3, imx_cscmr1_fixup);
+       clk[IMX6QDL_CLK_VPU_AXI_PODF]     = imx_clk_divider("vpu_axi_podf",     "vpu_axi_sel",       base + 0x24, 25, 3);
+       clk[IMX6QDL_CLK_CKO1_PODF]        = imx_clk_divider("cko1_podf",        "cko1_sel",          base + 0x60, 4,  3);
+       clk[IMX6QDL_CLK_CKO2_PODF]        = imx_clk_divider("cko2_podf",        "cko2_sel",          base + 0x60, 21, 3);
+
+       /*                                                        name                 parent_name    reg        shift width busy: reg, shift */
+       clk[IMX6QDL_CLK_AXI]               = imx_clk_busy_divider("axi",               "axi_sel",     base + 0x14, 16,  3,   base + 0x48, 0);
+       clk[IMX6QDL_CLK_MMDC_CH0_AXI_PODF] = imx_clk_busy_divider("mmdc_ch0_axi_podf", "periph",      base + 0x14, 19,  3,   base + 0x48, 4);
+       clk[IMX6QDL_CLK_MMDC_CH1_AXI_PODF] = imx_clk_busy_divider("mmdc_ch1_axi_podf", "periph2",     base + 0x14, 3,   3,   base + 0x48, 2);
+       clk[IMX6QDL_CLK_ARM]               = imx_clk_busy_divider("arm",               "pll1_sw",     base + 0x10, 0,   3,   base + 0x48, 16);
+       clk[IMX6QDL_CLK_AHB]               = imx_clk_busy_divider("ahb",               "periph",      base + 0x14, 10,  3,   base + 0x48, 1);
+
+       /*                                            name             parent_name          reg         shift */
+       clk[IMX6QDL_CLK_APBH_DMA]     = imx_clk_gate2("apbh_dma",      "usdhc3",            base + 0x68, 4);
+       clk[IMX6QDL_CLK_ASRC]         = imx_clk_gate2("asrc",          "asrc_podf",         base + 0x68, 6);
+       clk[IMX6QDL_CLK_CAN1_IPG]     = imx_clk_gate2("can1_ipg",      "ipg",               base + 0x68, 14);
+       clk[IMX6QDL_CLK_CAN1_SERIAL]  = imx_clk_gate2("can1_serial",   "can_root",          base + 0x68, 16);
+       clk[IMX6QDL_CLK_CAN2_IPG]     = imx_clk_gate2("can2_ipg",      "ipg",               base + 0x68, 18);
+       clk[IMX6QDL_CLK_CAN2_SERIAL]  = imx_clk_gate2("can2_serial",   "can_root",          base + 0x68, 20);
+       clk[IMX6QDL_CLK_ECSPI1]       = imx_clk_gate2("ecspi1",        "ecspi_root",        base + 0x6c, 0);
+       clk[IMX6QDL_CLK_ECSPI2]       = imx_clk_gate2("ecspi2",        "ecspi_root",        base + 0x6c, 2);
+       clk[IMX6QDL_CLK_ECSPI3]       = imx_clk_gate2("ecspi3",        "ecspi_root",        base + 0x6c, 4);
+       clk[IMX6QDL_CLK_ECSPI4]       = imx_clk_gate2("ecspi4",        "ecspi_root",        base + 0x6c, 6);
        if (cpu_is_imx6dl())
-               /* ecspi5 is replaced with i2c4 on imx6dl & imx6s */
-               clk[ecspi5] = imx_clk_gate2("i2c4",        "ipg_per",           base + 0x6c, 8);
+               clk[IMX6DL_CLK_I2C4]  = imx_clk_gate2("i2c4",          "ipg_per",           base + 0x6c, 8);
        else
-               clk[ecspi5] = imx_clk_gate2("ecspi5",      "ecspi_root",        base + 0x6c, 8);
-       clk[enet]         = imx_clk_gate2("enet",          "ipg",               base + 0x6c, 10);
-       clk[esai]         = imx_clk_gate2_shared("esai",   "esai_podf",         base + 0x6c, 16, &share_count_esai);
-       clk[esai_ahb]     = imx_clk_gate2_shared("esai_ahb", "ahb",             base + 0x6c, 16, &share_count_esai);
-       clk[gpt_ipg]      = imx_clk_gate2("gpt_ipg",       "ipg",               base + 0x6c, 20);
-       clk[gpt_ipg_per]  = imx_clk_gate2("gpt_ipg_per",   "ipg_per",           base + 0x6c, 22);
+               clk[IMX6Q_CLK_ECSPI5] = imx_clk_gate2("ecspi5",        "ecspi_root",        base + 0x6c, 8);
+       clk[IMX6QDL_CLK_ENET]         = imx_clk_gate2("enet",          "ipg",               base + 0x6c, 10);
+       clk[IMX6QDL_CLK_ESAI]         = imx_clk_gate2_shared("esai",   "esai_podf",         base + 0x6c, 16, &share_count_esai);
+       clk[IMX6QDL_CLK_ESAI_AHB]     = imx_clk_gate2_shared("esai_ahb", "ahb",             base + 0x6c, 16, &share_count_esai);
+       clk[IMX6QDL_CLK_GPT_IPG]      = imx_clk_gate2("gpt_ipg",       "ipg",               base + 0x6c, 20);
+       clk[IMX6QDL_CLK_GPT_IPG_PER]  = imx_clk_gate2("gpt_ipg_per",   "ipg_per",           base + 0x6c, 22);
        if (cpu_is_imx6dl())
                /*
                 * The multiplexer and divider of imx6q clock gpu3d_shader get
                 * redefined/reused as gpu2d_core_sel and gpu2d_core_podf on imx6dl.
                 */
-               clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu3d_shader", base + 0x6c, 24);
+               clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu3d_shader", base + 0x6c, 24);
        else
-               clk[gpu2d_core] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24);
-       clk[gpu3d_core]   = imx_clk_gate2("gpu3d_core",    "gpu3d_core_podf",   base + 0x6c, 26);
-       clk[hdmi_iahb]    = imx_clk_gate2("hdmi_iahb",     "ahb",               base + 0x70, 0);
-       clk[hdmi_isfr]    = imx_clk_gate2("hdmi_isfr",     "pll3_pfd1_540m",    base + 0x70, 4);
-       clk[i2c1]         = imx_clk_gate2("i2c1",          "ipg_per",           base + 0x70, 6);
-       clk[i2c2]         = imx_clk_gate2("i2c2",          "ipg_per",           base + 0x70, 8);
-       clk[i2c3]         = imx_clk_gate2("i2c3",          "ipg_per",           base + 0x70, 10);
-       clk[iim]          = imx_clk_gate2("iim",           "ipg",               base + 0x70, 12);
-       clk[enfc]         = imx_clk_gate2("enfc",          "enfc_podf",         base + 0x70, 14);
-       clk[vdoa]         = imx_clk_gate2("vdoa",          "vdo_axi",           base + 0x70, 26);
-       clk[ipu1]         = imx_clk_gate2("ipu1",          "ipu1_podf",         base + 0x74, 0);
-       clk[ipu1_di0]     = imx_clk_gate2("ipu1_di0",      "ipu1_di0_sel",      base + 0x74, 2);
-       clk[ipu1_di1]     = imx_clk_gate2("ipu1_di1",      "ipu1_di1_sel",      base + 0x74, 4);
-       clk[ipu2]         = imx_clk_gate2("ipu2",          "ipu2_podf",         base + 0x74, 6);
-       clk[ipu2_di0]     = imx_clk_gate2("ipu2_di0",      "ipu2_di0_sel",      base + 0x74, 8);
-       clk[ldb_di0]      = imx_clk_gate2("ldb_di0",       "ldb_di0_podf",      base + 0x74, 12);
-       clk[ldb_di1]      = imx_clk_gate2("ldb_di1",       "ldb_di1_podf",      base + 0x74, 14);
-       clk[ipu2_di1]     = imx_clk_gate2("ipu2_di1",      "ipu2_di1_sel",      base + 0x74, 10);
-       clk[hsi_tx]       = imx_clk_gate2("hsi_tx",        "hsi_tx_podf",       base + 0x74, 16);
+               clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24);
+       clk[IMX6QDL_CLK_GPU3D_CORE]   = imx_clk_gate2("gpu3d_core",    "gpu3d_core_podf",   base + 0x6c, 26);
+       clk[IMX6QDL_CLK_HDMI_IAHB]    = imx_clk_gate2("hdmi_iahb",     "ahb",               base + 0x70, 0);
+       clk[IMX6QDL_CLK_HDMI_ISFR]    = imx_clk_gate2("hdmi_isfr",     "pll3_pfd1_540m",    base + 0x70, 4);
+       clk[IMX6QDL_CLK_I2C1]         = imx_clk_gate2("i2c1",          "ipg_per",           base + 0x70, 6);
+       clk[IMX6QDL_CLK_I2C2]         = imx_clk_gate2("i2c2",          "ipg_per",           base + 0x70, 8);
+       clk[IMX6QDL_CLK_I2C3]         = imx_clk_gate2("i2c3",          "ipg_per",           base + 0x70, 10);
+       clk[IMX6QDL_CLK_IIM]          = imx_clk_gate2("iim",           "ipg",               base + 0x70, 12);
+       clk[IMX6QDL_CLK_ENFC]         = imx_clk_gate2("enfc",          "enfc_podf",         base + 0x70, 14);
+       clk[IMX6QDL_CLK_VDOA]         = imx_clk_gate2("vdoa",          "vdo_axi",           base + 0x70, 26);
+       clk[IMX6QDL_CLK_IPU1]         = imx_clk_gate2("ipu1",          "ipu1_podf",         base + 0x74, 0);
+       clk[IMX6QDL_CLK_IPU1_DI0]     = imx_clk_gate2("ipu1_di0",      "ipu1_di0_sel",      base + 0x74, 2);
+       clk[IMX6QDL_CLK_IPU1_DI1]     = imx_clk_gate2("ipu1_di1",      "ipu1_di1_sel",      base + 0x74, 4);
+       clk[IMX6QDL_CLK_IPU2]         = imx_clk_gate2("ipu2",          "ipu2_podf",         base + 0x74, 6);
+       clk[IMX6QDL_CLK_IPU2_DI0]     = imx_clk_gate2("ipu2_di0",      "ipu2_di0_sel",      base + 0x74, 8);
+       clk[IMX6QDL_CLK_LDB_DI0]      = imx_clk_gate2("ldb_di0",       "ldb_di0_podf",      base + 0x74, 12);
+       clk[IMX6QDL_CLK_LDB_DI1]      = imx_clk_gate2("ldb_di1",       "ldb_di1_podf",      base + 0x74, 14);
+       clk[IMX6QDL_CLK_IPU2_DI1]     = imx_clk_gate2("ipu2_di1",      "ipu2_di1_sel",      base + 0x74, 10);
+       clk[IMX6QDL_CLK_HSI_TX]       = imx_clk_gate2("hsi_tx",        "hsi_tx_podf",       base + 0x74, 16);
        if (cpu_is_imx6dl())
                /*
                 * The multiplexer and divider of the imx6q clock gpu2d get
                 * redefined/reused as mlb_sys_sel and mlb_sys_clk_podf on imx6dl.
                 */
-               clk[mlb] = imx_clk_gate2("mlb",            "gpu2d_core_podf",   base + 0x74, 18);
+               clk[IMX6QDL_CLK_MLB] = imx_clk_gate2("mlb",            "gpu2d_core_podf",   base + 0x74, 18);
        else
-               clk[mlb] = imx_clk_gate2("mlb",            "axi",               base + 0x74, 18);
-       clk[mmdc_ch0_axi] = imx_clk_gate2("mmdc_ch0_axi",  "mmdc_ch0_axi_podf", base + 0x74, 20);
-       clk[mmdc_ch1_axi] = imx_clk_gate2("mmdc_ch1_axi",  "mmdc_ch1_axi_podf", base + 0x74, 22);
-       clk[ocram]        = imx_clk_gate2("ocram",         "ahb",               base + 0x74, 28);
-       clk[openvg_axi]   = imx_clk_gate2("openvg_axi",    "axi",               base + 0x74, 30);
-       clk[pcie_axi]     = imx_clk_gate2("pcie_axi",      "pcie_axi_sel",      base + 0x78, 0);
-       clk[per1_bch]     = imx_clk_gate2("per1_bch",      "usdhc3",            base + 0x78, 12);
-       clk[pwm1]         = imx_clk_gate2("pwm1",          "ipg_per",           base + 0x78, 16);
-       clk[pwm2]         = imx_clk_gate2("pwm2",          "ipg_per",           base + 0x78, 18);
-       clk[pwm3]         = imx_clk_gate2("pwm3",          "ipg_per",           base + 0x78, 20);
-       clk[pwm4]         = imx_clk_gate2("pwm4",          "ipg_per",           base + 0x78, 22);
-       clk[gpmi_bch_apb] = imx_clk_gate2("gpmi_bch_apb",  "usdhc3",            base + 0x78, 24);
-       clk[gpmi_bch]     = imx_clk_gate2("gpmi_bch",      "usdhc4",            base + 0x78, 26);
-       clk[gpmi_io]      = imx_clk_gate2("gpmi_io",       "enfc",              base + 0x78, 28);
-       clk[gpmi_apb]     = imx_clk_gate2("gpmi_apb",      "usdhc3",            base + 0x78, 30);
-       clk[rom]          = imx_clk_gate2("rom",           "ahb",               base + 0x7c, 0);
-       clk[sata]         = imx_clk_gate2("sata",          "ipg",               base + 0x7c, 4);
-       clk[sdma]         = imx_clk_gate2("sdma",          "ahb",               base + 0x7c, 6);
-       clk[spba]         = imx_clk_gate2("spba",          "ipg",               base + 0x7c, 12);
-       clk[spdif]        = imx_clk_gate2("spdif",         "spdif_podf",        base + 0x7c, 14);
-       clk[ssi1_ipg]     = imx_clk_gate2("ssi1_ipg",      "ipg",               base + 0x7c, 18);
-       clk[ssi2_ipg]     = imx_clk_gate2("ssi2_ipg",      "ipg",               base + 0x7c, 20);
-       clk[ssi3_ipg]     = imx_clk_gate2("ssi3_ipg",      "ipg",               base + 0x7c, 22);
-       clk[uart_ipg]     = imx_clk_gate2("uart_ipg",      "ipg",               base + 0x7c, 24);
-       clk[uart_serial]  = imx_clk_gate2("uart_serial",   "uart_serial_podf",  base + 0x7c, 26);
-       clk[usboh3]       = imx_clk_gate2("usboh3",        "ipg",               base + 0x80, 0);
-       clk[usdhc1]       = imx_clk_gate2("usdhc1",        "usdhc1_podf",       base + 0x80, 2);
-       clk[usdhc2]       = imx_clk_gate2("usdhc2",        "usdhc2_podf",       base + 0x80, 4);
-       clk[usdhc3]       = imx_clk_gate2("usdhc3",        "usdhc3_podf",       base + 0x80, 6);
-       clk[usdhc4]       = imx_clk_gate2("usdhc4",        "usdhc4_podf",       base + 0x80, 8);
-       clk[eim_slow]     = imx_clk_gate2("eim_slow",      "emi_slow_podf",     base + 0x80, 10);
-       clk[vdo_axi]      = imx_clk_gate2("vdo_axi",       "vdo_axi_sel",       base + 0x80, 12);
-       clk[vpu_axi]      = imx_clk_gate2("vpu_axi",       "vpu_axi_podf",      base + 0x80, 14);
-       clk[cko1]         = imx_clk_gate("cko1",           "cko1_podf",         base + 0x60, 7);
-       clk[cko2]         = imx_clk_gate("cko2",           "cko2_podf",         base + 0x60, 24);
-
-       for (i = 0; i < ARRAY_SIZE(clk); i++)
-               if (IS_ERR(clk[i]))
-                       pr_err("i.MX6q clk %d: register failed with %ld\n",
-                               i, PTR_ERR(clk[i]));
+               clk[IMX6QDL_CLK_MLB] = imx_clk_gate2("mlb",            "axi",               base + 0x74, 18);
+       clk[IMX6QDL_CLK_MMDC_CH0_AXI] = imx_clk_gate2("mmdc_ch0_axi",  "mmdc_ch0_axi_podf", base + 0x74, 20);
+       clk[IMX6QDL_CLK_MMDC_CH1_AXI] = imx_clk_gate2("mmdc_ch1_axi",  "mmdc_ch1_axi_podf", base + 0x74, 22);
+       clk[IMX6QDL_CLK_OCRAM]        = imx_clk_gate2("ocram",         "ahb",               base + 0x74, 28);
+       clk[IMX6QDL_CLK_OPENVG_AXI]   = imx_clk_gate2("openvg_axi",    "axi",               base + 0x74, 30);
+       clk[IMX6QDL_CLK_PCIE_AXI]     = imx_clk_gate2("pcie_axi",      "pcie_axi_sel",      base + 0x78, 0);
+       clk[IMX6QDL_CLK_PER1_BCH]     = imx_clk_gate2("per1_bch",      "usdhc3",            base + 0x78, 12);
+       clk[IMX6QDL_CLK_PWM1]         = imx_clk_gate2("pwm1",          "ipg_per",           base + 0x78, 16);
+       clk[IMX6QDL_CLK_PWM2]         = imx_clk_gate2("pwm2",          "ipg_per",           base + 0x78, 18);
+       clk[IMX6QDL_CLK_PWM3]         = imx_clk_gate2("pwm3",          "ipg_per",           base + 0x78, 20);
+       clk[IMX6QDL_CLK_PWM4]         = imx_clk_gate2("pwm4",          "ipg_per",           base + 0x78, 22);
+       clk[IMX6QDL_CLK_GPMI_BCH_APB] = imx_clk_gate2("gpmi_bch_apb",  "usdhc3",            base + 0x78, 24);
+       clk[IMX6QDL_CLK_GPMI_BCH]     = imx_clk_gate2("gpmi_bch",      "usdhc4",            base + 0x78, 26);
+       clk[IMX6QDL_CLK_GPMI_IO]      = imx_clk_gate2("gpmi_io",       "enfc",              base + 0x78, 28);
+       clk[IMX6QDL_CLK_GPMI_APB]     = imx_clk_gate2("gpmi_apb",      "usdhc3",            base + 0x78, 30);
+       clk[IMX6QDL_CLK_ROM]          = imx_clk_gate2("rom",           "ahb",               base + 0x7c, 0);
+       clk[IMX6QDL_CLK_SATA]         = imx_clk_gate2("sata",          "ipg",               base + 0x7c, 4);
+       clk[IMX6QDL_CLK_SDMA]         = imx_clk_gate2("sdma",          "ahb",               base + 0x7c, 6);
+       clk[IMX6QDL_CLK_SPBA]         = imx_clk_gate2("spba",          "ipg",               base + 0x7c, 12);
+       clk[IMX6QDL_CLK_SPDIF]        = imx_clk_gate2("spdif",         "spdif_podf",        base + 0x7c, 14);
+       clk[IMX6QDL_CLK_SSI1_IPG]     = imx_clk_gate2("ssi1_ipg",      "ipg",               base + 0x7c, 18);
+       clk[IMX6QDL_CLK_SSI2_IPG]     = imx_clk_gate2("ssi2_ipg",      "ipg",               base + 0x7c, 20);
+       clk[IMX6QDL_CLK_SSI3_IPG]     = imx_clk_gate2("ssi3_ipg",      "ipg",               base + 0x7c, 22);
+       clk[IMX6QDL_CLK_UART_IPG]     = imx_clk_gate2("uart_ipg",      "ipg",               base + 0x7c, 24);
+       clk[IMX6QDL_CLK_UART_SERIAL]  = imx_clk_gate2("uart_serial",   "uart_serial_podf",  base + 0x7c, 26);
+       clk[IMX6QDL_CLK_USBOH3]       = imx_clk_gate2("usboh3",        "ipg",               base + 0x80, 0);
+       clk[IMX6QDL_CLK_USDHC1]       = imx_clk_gate2("usdhc1",        "usdhc1_podf",       base + 0x80, 2);
+       clk[IMX6QDL_CLK_USDHC2]       = imx_clk_gate2("usdhc2",        "usdhc2_podf",       base + 0x80, 4);
+       clk[IMX6QDL_CLK_USDHC3]       = imx_clk_gate2("usdhc3",        "usdhc3_podf",       base + 0x80, 6);
+       clk[IMX6QDL_CLK_USDHC4]       = imx_clk_gate2("usdhc4",        "usdhc4_podf",       base + 0x80, 8);
+       clk[IMX6QDL_CLK_EIM_SLOW]     = imx_clk_gate2("eim_slow",      "emi_slow_podf",     base + 0x80, 10);
+       clk[IMX6QDL_CLK_VDO_AXI]      = imx_clk_gate2("vdo_axi",       "vdo_axi_sel",       base + 0x80, 12);
+       clk[IMX6QDL_CLK_VPU_AXI]      = imx_clk_gate2("vpu_axi",       "vpu_axi_podf",      base + 0x80, 14);
+       clk[IMX6QDL_CLK_CKO1]         = imx_clk_gate("cko1",           "cko1_podf",         base + 0x60, 7);
+       clk[IMX6QDL_CLK_CKO2]         = imx_clk_gate("cko2",           "cko2_podf",         base + 0x60, 24);
+
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
 
        clk_data.clks = clk;
        clk_data.clk_num = ARRAY_SIZE(clk);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       clk_register_clkdev(clk[gpt_ipg], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
-       clk_register_clkdev(clk[enet_ref], "enet_ref", NULL);
+       clk_register_clkdev(clk[IMX6QDL_CLK_ENET_REF], "enet_ref", NULL);
 
        if ((imx_get_soc_revision() != IMX_CHIP_REVISION_1_0) ||
            cpu_is_imx6dl()) {
-               clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]);
-               clk_set_parent(clk[ldb_di1_sel], clk[pll5_video_div]);
+               clk_set_parent(clk[IMX6QDL_CLK_LDB_DI0_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
+               clk_set_parent(clk[IMX6QDL_CLK_LDB_DI1_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
        }
 
-       clk_set_parent(clk[ipu1_di0_pre_sel], clk[pll5_video_div]);
-       clk_set_parent(clk[ipu1_di1_pre_sel], clk[pll5_video_div]);
-       clk_set_parent(clk[ipu2_di0_pre_sel], clk[pll5_video_div]);
-       clk_set_parent(clk[ipu2_di1_pre_sel], clk[pll5_video_div]);
-       clk_set_parent(clk[ipu1_di0_sel], clk[ipu1_di0_pre]);
-       clk_set_parent(clk[ipu1_di1_sel], clk[ipu1_di1_pre]);
-       clk_set_parent(clk[ipu2_di0_sel], clk[ipu2_di0_pre]);
-       clk_set_parent(clk[ipu2_di1_sel], clk[ipu2_di1_pre]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI1_PRE_SEL], clk[IMX6QDL_CLK_PLL5_VIDEO_DIV]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI0_SEL], clk[IMX6QDL_CLK_IPU1_DI0_PRE]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU1_DI1_SEL], clk[IMX6QDL_CLK_IPU1_DI1_PRE]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_SEL], clk[IMX6QDL_CLK_IPU2_DI0_PRE]);
+       clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI1_SEL], clk[IMX6QDL_CLK_IPU2_DI1_PRE]);
 
        /*
         * The gpmi needs 100MHz frequency in the EDO/Sync mode,
         * We can not get the 100MHz from the pll2_pfd0_352m.
         * So choose pll2_pfd2_396m as enfc_sel's parent.
         */
-       clk_set_parent(clk[enfc_sel], clk[pll2_pfd2_396m]);
+       clk_set_parent(clk[IMX6QDL_CLK_ENFC_SEL], clk[IMX6QDL_CLK_PLL2_PFD2_396M]);
 
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clk[clks_init_on[i]]);
 
        if (IS_ENABLED(CONFIG_USB_MXS_PHY)) {
-               clk_prepare_enable(clk[usbphy1_gate]);
-               clk_prepare_enable(clk[usbphy2_gate]);
+               clk_prepare_enable(clk[IMX6QDL_CLK_USBPHY1_GATE]);
+               clk_prepare_enable(clk[IMX6QDL_CLK_USBPHY2_GATE]);
        }
 
        /*
         * Let's initially set up CLKO with OSC24M, since this configuration
         * is widely used by imx6q board designs to clock audio codec.
         */
-       ret = clk_set_parent(clk[cko2_sel], clk[osc]);
+       ret = clk_set_parent(clk[IMX6QDL_CLK_CKO2_SEL], clk[IMX6QDL_CLK_OSC]);
        if (!ret)
-               ret = clk_set_parent(clk[cko], clk[cko2]);
+               ret = clk_set_parent(clk[IMX6QDL_CLK_CKO], clk[IMX6QDL_CLK_CKO2]);
        if (ret)
                pr_warn("failed to set up CLKO: %d\n", ret);
 
        /* Audio-related clocks configuration */
-       clk_set_parent(clk[spdif_sel], clk[pll3_pfd3_454m]);
+       clk_set_parent(clk[IMX6QDL_CLK_SPDIF_SEL], clk[IMX6QDL_CLK_PLL3_PFD3_454M]);
 
        /* All existing boards with PCIe use LVDS1 */
        if (IS_ENABLED(CONFIG_PCI_IMX6))
-               clk_set_parent(clk[lvds1_sel], clk[sata_ref_100m]);
+               clk_set_parent(clk[IMX6QDL_CLK_LVDS1_SEL], clk[IMX6QDL_CLK_SATA_REF_100M]);
 
        /* Set initial power mode */
        imx6q_set_lpm(WAIT_CLOCKED);
-
-       mxc_timer_init_dt(of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"));
 }
 CLK_OF_DECLARE(imx6q, "fsl,imx6q-ccm", imx6q_clocks_init);
index 5408ca7..fef46fa 100644 (file)
@@ -348,18 +348,12 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
        clks[IMX6SL_CLK_USDHC3]       = imx_clk_gate2("usdhc3",       "usdhc3_podf",       base + 0x80, 6);
        clks[IMX6SL_CLK_USDHC4]       = imx_clk_gate2("usdhc4",       "usdhc4_podf",       base + 0x80, 8);
 
-       for (i = 0; i < ARRAY_SIZE(clks); i++)
-               if (IS_ERR(clks[i]))
-                       pr_err("i.MX6SL 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);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       clk_register_clkdev(clks[IMX6SL_CLK_GPT], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clks[IMX6SL_CLK_GPT_SERIAL], "per", "imx-gpt.0");
-
        /* Ensure the AHB clk is at 132MHz. */
        ret = clk_set_rate(clks[IMX6SL_CLK_AHB], 132000000);
        if (ret)
@@ -383,8 +377,5 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node)
 
        /* Set initial power mode */
        imx6q_set_lpm(WAIT_CLOCKED);
-
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt");
-       mxc_timer_init_dt(np);
 }
 CLK_OF_DECLARE(imx6sl, "fsl,imx6sl-ccm", imx6sl_clocks_init);
index 72f8902..ecde72b 100644 (file)
@@ -124,6 +124,9 @@ static struct clk_div_table video_div_table[] = {
 static u32 share_count_asrc;
 static u32 share_count_audio;
 static u32 share_count_esai;
+static u32 share_count_ssi1;
+static u32 share_count_ssi2;
+static u32 share_count_ssi3;
 
 static void __init imx6sx_clocks_init(struct device_node *ccm_node)
 {
@@ -409,12 +412,12 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
        clks[IMX6SX_CLK_SPBA]         = imx_clk_gate2("spba",          "ipg",               base + 0x7c, 12);
        clks[IMX6SX_CLK_AUDIO]        = imx_clk_gate2_shared("audio",  "audio_podf",        base + 0x7c, 14, &share_count_audio);
        clks[IMX6SX_CLK_SPDIF]        = imx_clk_gate2_shared("spdif",  "spdif_podf",        base + 0x7c, 14, &share_count_audio);
-       clks[IMX6SX_CLK_SSI1_IPG]     = imx_clk_gate2("ssi1_ipg",      "ipg",               base + 0x7c, 18);
-       clks[IMX6SX_CLK_SSI2_IPG]     = imx_clk_gate2("ssi2_ipg",      "ipg",               base + 0x7c, 20);
-       clks[IMX6SX_CLK_SSI3_IPG]     = imx_clk_gate2("ssi3_ipg",      "ipg",               base + 0x7c, 22);
-       clks[IMX6SX_CLK_SSI1]         = imx_clk_gate2("ssi1",          "ssi1_podf",         base + 0x7c, 18);
-       clks[IMX6SX_CLK_SSI2]         = imx_clk_gate2("ssi2",          "ssi2_podf",         base + 0x7c, 20);
-       clks[IMX6SX_CLK_SSI3]         = imx_clk_gate2("ssi3",          "ssi3_podf",         base + 0x7c, 22);
+       clks[IMX6SX_CLK_SSI1_IPG]     = imx_clk_gate2_shared("ssi1_ipg",      "ipg",        base + 0x7c, 18, &share_count_ssi1);
+       clks[IMX6SX_CLK_SSI2_IPG]     = imx_clk_gate2_shared("ssi2_ipg",      "ipg",        base + 0x7c, 20, &share_count_ssi2);
+       clks[IMX6SX_CLK_SSI3_IPG]     = imx_clk_gate2_shared("ssi3_ipg",      "ipg",        base + 0x7c, 22, &share_count_ssi3);
+       clks[IMX6SX_CLK_SSI1]         = imx_clk_gate2_shared("ssi1",          "ssi1_podf",  base + 0x7c, 18, &share_count_ssi1);
+       clks[IMX6SX_CLK_SSI2]         = imx_clk_gate2_shared("ssi2",          "ssi2_podf",  base + 0x7c, 20, &share_count_ssi2);
+       clks[IMX6SX_CLK_SSI3]         = imx_clk_gate2_shared("ssi3",          "ssi3_podf",  base + 0x7c, 22, &share_count_ssi3);
        clks[IMX6SX_CLK_UART_IPG]     = imx_clk_gate2("uart_ipg",      "ipg",               base + 0x7c, 24);
        clks[IMX6SX_CLK_UART_SERIAL]  = imx_clk_gate2("uart_serial",   "uart_podf",         base + 0x7c, 26);
        clks[IMX6SX_CLK_SAI1_IPG]     = imx_clk_gate2("sai1_ipg",      "ipg",               base + 0x7c, 28);
@@ -443,17 +446,12 @@ static void __init imx6sx_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.MX6sx 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);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
 
-       clk_register_clkdev(clks[IMX6SX_CLK_GPT_BUS], "ipg", "imx-gpt.0");
-       clk_register_clkdev(clks[IMX6SX_CLK_GPT_SERIAL], "per", "imx-gpt.0");
-
        for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
                clk_prepare_enable(clks[clks_init_on[i]]);
 
@@ -517,8 +515,5 @@ static void __init imx6sx_clocks_init(struct device_node *ccm_node)
 
        /* Set initial power mode */
        imx6q_set_lpm(WAIT_CLOCKED);
-
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx6sx-gpt");
-       mxc_timer_init_dt(np);
 }
 CLK_OF_DECLARE(imx6sx, "fsl,imx6sx-ccm", imx6sx_clocks_init);
index 22dc3ee..f60d6d5 100644 (file)
@@ -295,14 +295,18 @@ static void __init vf610_clocks_init(struct device_node *ccm_node)
 
        clk[VF610_CLK_ASRC] = imx_clk_gate2("asrc", "ipg_bus", CCM_CCGR4, CCM_CCGRx_CGn(1));
 
-       clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "ipg_bus", CCM_CCGR0, CCM_CCGRx_CGn(0));
-       clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "ipg_bus", CCM_CCGR9, CCM_CCGRx_CGn(4));
+       clk[VF610_CLK_FLEXCAN0_EN] = imx_clk_gate("flexcan0_en", "ipg_bus", CCM_CSCDR2, 11);
+       clk[VF610_CLK_FLEXCAN0] = imx_clk_gate2("flexcan0", "flexcan0_en", CCM_CCGR0, CCM_CCGRx_CGn(0));
+       clk[VF610_CLK_FLEXCAN1_EN] = imx_clk_gate("flexcan1_en", "ipg_bus", CCM_CSCDR2, 12);
+       clk[VF610_CLK_FLEXCAN1] = imx_clk_gate2("flexcan1", "flexcan1_en", CCM_CCGR9, CCM_CCGRx_CGn(4));
 
        clk[VF610_CLK_DMAMUX0] = imx_clk_gate2("dmamux0", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(4));
        clk[VF610_CLK_DMAMUX1] = imx_clk_gate2("dmamux1", "platform_bus", CCM_CCGR0, CCM_CCGRx_CGn(5));
        clk[VF610_CLK_DMAMUX2] = imx_clk_gate2("dmamux2", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(1));
        clk[VF610_CLK_DMAMUX3] = imx_clk_gate2("dmamux3", "platform_bus", CCM_CCGR6, CCM_CCGRx_CGn(2));
 
+       imx_check_clocks(clk, ARRAY_SIZE(clk));
+
        clk_set_parent(clk[VF610_CLK_QSPI0_SEL], clk[VF610_CLK_PLL1_PFD4]);
        clk_set_rate(clk[VF610_CLK_QSPI0_X4_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_SEL]) / 2);
        clk_set_rate(clk[VF610_CLK_QSPI0_X2_DIV], clk_get_rate(clk[VF610_CLK_QSPI0_X4_DIV]) / 2);
index edc35df..df12b53 100644 (file)
@@ -7,6 +7,16 @@
 
 DEFINE_SPINLOCK(imx_ccm_lock);
 
+void __init imx_check_clocks(struct clk *clks[], unsigned int count)
+{
+       unsigned i;
+
+       for (i = 0; i < count; i++)
+               if (IS_ERR(clks[i]))
+                       pr_err("i.MX clk %u: register failed with %ld\n",
+                              i, PTR_ERR(clks[i]));
+}
+
 static struct clk * __init imx_obtain_fixed_clock_from_dt(const char *name)
 {
        struct of_phandle_args phandle;
index e29f6eb..d5ba76f 100644 (file)
@@ -6,6 +6,8 @@
 
 extern spinlock_t imx_ccm_lock;
 
+void imx_check_clocks(struct clk *clks[], unsigned int count);
+
 extern void imx_cscmr1_fixup(u32 *val);
 
 struct clk *imx_clk_pllv1(const char *name, const char *parent,
@@ -95,6 +97,13 @@ static inline struct clk *imx_clk_gate(const char *name, const char *parent,
                        shift, 0, &imx_ccm_lock);
 }
 
+static inline struct clk *imx_clk_gate_dis(const char *name, const char *parent,
+               void __iomem *reg, u8 shift)
+{
+       return clk_register_gate(NULL, name, parent, CLK_SET_RATE_PARENT, reg,
+                       shift, CLK_GATE_SET_TO_DISABLE, &imx_ccm_lock);
+}
+
 static inline struct clk *imx_clk_mux(const char *name, void __iomem *reg,
                u8 shift, u8 width, const char **parents, int num_parents)
 {
index 9ab785c..22ba897 100644 (file)
@@ -19,6 +19,7 @@ struct pt_regs;
 struct clk;
 struct device_node;
 enum mxc_cpu_pwr_mode;
+struct of_device_id;
 
 void mx1_map_io(void);
 void mx21_map_io(void);
@@ -26,48 +27,34 @@ void mx25_map_io(void);
 void mx27_map_io(void);
 void mx31_map_io(void);
 void mx35_map_io(void);
-void mx51_map_io(void);
-void mx53_map_io(void);
 void imx1_init_early(void);
 void imx21_init_early(void);
 void imx25_init_early(void);
 void imx27_init_early(void);
 void imx31_init_early(void);
 void imx35_init_early(void);
-void imx51_init_early(void);
-void imx53_init_early(void);
 void mxc_init_irq(void __iomem *);
-void tzic_init_irq(void __iomem *);
+void tzic_init_irq(void);
 void mx1_init_irq(void);
 void mx21_init_irq(void);
 void mx25_init_irq(void);
 void mx27_init_irq(void);
 void mx31_init_irq(void);
 void mx35_init_irq(void);
-void mx51_init_irq(void);
-void mx53_init_irq(void);
 void imx1_soc_init(void);
 void imx21_soc_init(void);
 void imx25_soc_init(void);
 void imx27_soc_init(void);
 void imx31_soc_init(void);
 void imx35_soc_init(void);
-void imx51_soc_init(void);
-void imx51_init_late(void);
-void imx53_init_late(void);
 void epit_timer_init(void __iomem *base, int irq);
 void mxc_timer_init(void __iomem *, int);
-void mxc_timer_init_dt(struct device_node *);
 int mx1_clocks_init(unsigned long fref);
 int mx21_clocks_init(unsigned long lref, unsigned long fref);
 int mx25_clocks_init(void);
 int mx27_clocks_init(unsigned long fref);
 int mx31_clocks_init(unsigned long fref);
 int mx35_clocks_init(void);
-int mx51_clocks_init(unsigned long ckil, unsigned long osc,
-                       unsigned long ckih1, unsigned long ckih2);
-int mx25_clocks_init_dt(void);
-int mx27_clocks_init_dt(void);
 int mx31_clocks_init_dt(void);
 struct platform_device *mxc_register_gpio(char *name, int id,
        resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
@@ -75,8 +62,10 @@ void mxc_set_cpu_type(unsigned int type);
 void mxc_restart(enum reboot_mode, const char *);
 void mxc_arch_reset_init(void __iomem *);
 void mxc_arch_reset_init_dt(void);
+int mx51_revision(void);
 int mx53_revision(void);
 void imx_set_aips(void __iomem *);
+void imx_aips_allow_unprivileged_access(const char *compat);
 int mxc_device_init(void);
 void imx_set_soc_revision(unsigned int rev);
 unsigned int imx_get_soc_revision(void);
@@ -117,7 +106,7 @@ static inline void imx_scu_standby_enable(void) {}
 #endif
 void imx_src_init(void);
 void imx_gpc_init(void);
-void imx_gpc_pre_suspend(void);
+void imx_gpc_pre_suspend(bool arm_power_off);
 void imx_gpc_post_resume(void);
 void imx_gpc_mask_all(void);
 void imx_gpc_restore_all(void);
@@ -127,7 +116,7 @@ void imx_anatop_init(void);
 void imx_anatop_pre_suspend(void);
 void imx_anatop_post_resume(void);
 int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
-void imx6q_set_int_mem_clk_lpm(void);
+void imx6q_set_int_mem_clk_lpm(bool enable);
 void imx6sl_set_wait_clk(bool enter);
 
 void imx_cpu_die(unsigned int cpu);
@@ -144,12 +133,17 @@ static inline void imx6_suspend(void __iomem *ocram_vbase) {}
 void imx6q_pm_init(void);
 void imx6dl_pm_init(void);
 void imx6sl_pm_init(void);
+void imx6sx_pm_init(void);
 void imx6q_pm_set_ccm_base(void __iomem *base);
 
 #ifdef CONFIG_PM
-void imx5_pm_init(void);
+void imx51_pm_init(void);
+void imx53_pm_init(void);
+void imx5_pm_set_ccm_base(void __iomem *base);
 #else
-static inline void imx5_pm_init(void) {}
+static inline void imx51_pm_init(void) {}
+static inline void imx53_pm_init(void) {}
+static inline void imx5_pm_set_ccm_base(void __iomem *base) {}
 #endif
 
 #ifdef CONFIG_NEON
index c1c99a7..3403bac 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
 
 #include "hardware.h"
 #include "common.h"
@@ -24,10 +26,26 @@ static int mx5_cpu_rev = -1;
 
 #define IIM_SREV 0x24
 
+static u32 imx5_read_srev_reg(const char *compat)
+{
+       void __iomem *iim_base;
+       struct device_node *np;
+       u32 srev;
+
+       np = of_find_compatible_node(NULL, NULL, compat);
+       iim_base = of_iomap(np, 0);
+       WARN_ON(!iim_base);
+
+       srev = readl(iim_base + IIM_SREV) & 0xff;
+
+       iounmap(iim_base);
+
+       return srev;
+}
+
 static int get_mx51_srev(void)
 {
-       void __iomem *iim_base = MX51_IO_ADDRESS(MX51_IIM_BASE_ADDR);
-       u32 rev = readl(iim_base + IIM_SREV) & 0xff;
+       u32 rev = imx5_read_srev_reg("fsl,imx51-iim");
 
        switch (rev) {
        case 0x0:
@@ -77,8 +95,7 @@ int __init mx51_neon_fixup(void)
 
 static int get_mx53_srev(void)
 {
-       void __iomem *iim_base = MX51_IO_ADDRESS(MX53_IIM_BASE_ADDR);
-       u32 rev = readl(iim_base + IIM_SREV) & 0xff;
+       u32 rev = imx5_read_srev_reg("fsl,imx53-iim");
 
        switch (rev) {
        case 0x0:
index bbe8ff1..df42c14 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/module.h>
 #include <linux/io.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 #include <linux/slab.h>
 #include <linux/sys_soc.h>
 
@@ -60,6 +61,18 @@ void __init imx_set_aips(void __iomem *base)
        __raw_writel(reg, base + 0x50);
 }
 
+void __init imx_aips_allow_unprivileged_access(
+               const char *compat)
+{
+       void __iomem *aips_base_addr;
+       struct device_node *np;
+
+       for_each_compatible_node(np, NULL, compat) {
+               aips_base_addr = of_iomap(np, 0);
+               imx_set_aips(aips_base_addr);
+       }
+}
+
 struct device * __init imx_soc_device_init(void)
 {
        struct soc_device_attribute *soc_dev_attr;
index 6bcae04..10844d3 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "common.h"
 #include "cpuidle.h"
+#include "hardware.h"
 
 static atomic_t master = ATOMIC_INIT(0);
 static DEFINE_SPINLOCK(master_lock);
@@ -66,10 +67,11 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
 int __init imx6q_cpuidle_init(void)
 {
        /* Need to enable SCU standby for entering WAIT modes */
-       imx_scu_standby_enable();
+       if (!cpu_is_imx6sx())
+               imx_scu_standby_enable();
 
        /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */
-       imx6q_set_int_mem_clk_lpm();
+       imx6q_set_int_mem_clk_lpm(true);
 
        return cpuidle_register(&imx6q_cpuidle_driver, NULL);
 }
diff --git a/arch/arm/mach-imx/crm-regs-imx5.h b/arch/arm/mach-imx/crm-regs-imx5.h
deleted file mode 100644 (file)
index 5e3f1f0..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
- * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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
- */
-#ifndef __ARCH_ARM_MACH_MX51_CRM_REGS_H__
-#define __ARCH_ARM_MACH_MX51_CRM_REGS_H__
-
-#define MX51_CCM_BASE          MX51_IO_ADDRESS(MX51_CCM_BASE_ADDR)
-#define MX51_DPLL1_BASE                MX51_IO_ADDRESS(MX51_PLL1_BASE_ADDR)
-#define MX51_DPLL2_BASE                MX51_IO_ADDRESS(MX51_PLL2_BASE_ADDR)
-#define MX51_DPLL3_BASE                MX51_IO_ADDRESS(MX51_PLL3_BASE_ADDR)
-#define MX51_CORTEXA8_BASE     MX51_IO_ADDRESS(MX51_ARM_BASE_ADDR)
-#define MX51_GPC_BASE          MX51_IO_ADDRESS(MX51_GPC_BASE_ADDR)
-
-/*MX53*/
-#define MX53_CCM_BASE          MX53_IO_ADDRESS(MX53_CCM_BASE_ADDR)
-#define MX53_DPLL1_BASE                MX53_IO_ADDRESS(MX53_PLL1_BASE_ADDR)
-#define MX53_DPLL2_BASE                MX53_IO_ADDRESS(MX53_PLL2_BASE_ADDR)
-#define MX53_DPLL3_BASE                MX53_IO_ADDRESS(MX53_PLL3_BASE_ADDR)
-#define MX53_DPLL4_BASE                MX53_IO_ADDRESS(MX53_PLL4_BASE_ADDR)
-
-/* PLL Register Offsets */
-#define MXC_PLL_DP_CTL                 0x00
-#define MXC_PLL_DP_CONFIG              0x04
-#define MXC_PLL_DP_OP                  0x08
-#define MXC_PLL_DP_MFD                 0x0C
-#define MXC_PLL_DP_MFN                 0x10
-#define MXC_PLL_DP_MFNMINUS            0x14
-#define MXC_PLL_DP_MFNPLUS             0x18
-#define MXC_PLL_DP_HFS_OP              0x1C
-#define MXC_PLL_DP_HFS_MFD             0x20
-#define MXC_PLL_DP_HFS_MFN             0x24
-#define MXC_PLL_DP_MFN_TOGC            0x28
-#define MXC_PLL_DP_DESTAT              0x2c
-
-/* PLL Register Bit definitions */
-#define MXC_PLL_DP_CTL_MUL_CTRL                0x2000
-#define MXC_PLL_DP_CTL_DPDCK0_2_EN     0x1000
-#define MXC_PLL_DP_CTL_DPDCK0_2_OFFSET 12
-#define MXC_PLL_DP_CTL_ADE             0x800
-#define MXC_PLL_DP_CTL_REF_CLK_DIV     0x400
-#define MXC_PLL_DP_CTL_REF_CLK_SEL_MASK        (3 << 8)
-#define MXC_PLL_DP_CTL_REF_CLK_SEL_OFFSET      8
-#define MXC_PLL_DP_CTL_HFSM            0x80
-#define MXC_PLL_DP_CTL_PRE             0x40
-#define MXC_PLL_DP_CTL_UPEN            0x20
-#define MXC_PLL_DP_CTL_RST             0x10
-#define MXC_PLL_DP_CTL_RCP             0x8
-#define MXC_PLL_DP_CTL_PLM             0x4
-#define MXC_PLL_DP_CTL_BRM0            0x2
-#define MXC_PLL_DP_CTL_LRF             0x1
-
-#define MXC_PLL_DP_CONFIG_BIST         0x8
-#define MXC_PLL_DP_CONFIG_SJC_CE       0x4
-#define MXC_PLL_DP_CONFIG_AREN         0x2
-#define MXC_PLL_DP_CONFIG_LDREQ                0x1
-
-#define MXC_PLL_DP_OP_MFI_OFFSET       4
-#define MXC_PLL_DP_OP_MFI_MASK         (0xF << 4)
-#define MXC_PLL_DP_OP_PDF_OFFSET       0
-#define MXC_PLL_DP_OP_PDF_MASK         0xF
-
-#define MXC_PLL_DP_MFD_OFFSET          0
-#define MXC_PLL_DP_MFD_MASK            0x07FFFFFF
-
-#define MXC_PLL_DP_MFN_OFFSET          0x0
-#define MXC_PLL_DP_MFN_MASK            0x07FFFFFF
-
-#define MXC_PLL_DP_MFN_TOGC_TOG_DIS    (1 << 17)
-#define MXC_PLL_DP_MFN_TOGC_TOG_EN     (1 << 16)
-#define MXC_PLL_DP_MFN_TOGC_CNT_OFFSET 0x0
-#define MXC_PLL_DP_MFN_TOGC_CNT_MASK   0xFFFF
-
-#define MXC_PLL_DP_DESTAT_TOG_SEL      (1 << 31)
-#define MXC_PLL_DP_DESTAT_MFN          0x07FFFFFF
-
-/* Register addresses of CCM*/
-#define MXC_CCM_CCR            (MX51_CCM_BASE + 0x00)
-#define MXC_CCM_CCDR           (MX51_CCM_BASE + 0x04)
-#define MXC_CCM_CSR            (MX51_CCM_BASE + 0x08)
-#define MXC_CCM_CCSR           (MX51_CCM_BASE + 0x0C)
-#define MXC_CCM_CACRR          (MX51_CCM_BASE + 0x10)
-#define MXC_CCM_CBCDR          (MX51_CCM_BASE + 0x14)
-#define MXC_CCM_CBCMR          (MX51_CCM_BASE + 0x18)
-#define MXC_CCM_CSCMR1         (MX51_CCM_BASE + 0x1C)
-#define MXC_CCM_CSCMR2         (MX51_CCM_BASE + 0x20)
-#define MXC_CCM_CSCDR1         (MX51_CCM_BASE + 0x24)
-#define MXC_CCM_CS1CDR         (MX51_CCM_BASE + 0x28)
-#define MXC_CCM_CS2CDR         (MX51_CCM_BASE + 0x2C)
-#define MXC_CCM_CDCDR          (MX51_CCM_BASE + 0x30)
-#define MXC_CCM_CHSCDR         (MX51_CCM_BASE + 0x34)
-#define MXC_CCM_CSCDR2         (MX51_CCM_BASE + 0x38)
-#define MXC_CCM_CSCDR3         (MX51_CCM_BASE + 0x3C)
-#define MXC_CCM_CSCDR4         (MX51_CCM_BASE + 0x40)
-#define MXC_CCM_CWDR           (MX51_CCM_BASE + 0x44)
-#define MXC_CCM_CDHIPR         (MX51_CCM_BASE + 0x48)
-#define MXC_CCM_CDCR           (MX51_CCM_BASE + 0x4C)
-#define MXC_CCM_CTOR           (MX51_CCM_BASE + 0x50)
-#define MXC_CCM_CLPCR          (MX51_CCM_BASE + 0x54)
-#define MXC_CCM_CISR           (MX51_CCM_BASE + 0x58)
-#define MXC_CCM_CIMR           (MX51_CCM_BASE + 0x5C)
-#define MXC_CCM_CCOSR          (MX51_CCM_BASE + 0x60)
-#define MXC_CCM_CGPR           (MX51_CCM_BASE + 0x64)
-#define MXC_CCM_CCGR0          (MX51_CCM_BASE + 0x68)
-#define MXC_CCM_CCGR1          (MX51_CCM_BASE + 0x6C)
-#define MXC_CCM_CCGR2          (MX51_CCM_BASE + 0x70)
-#define MXC_CCM_CCGR3          (MX51_CCM_BASE + 0x74)
-#define MXC_CCM_CCGR4          (MX51_CCM_BASE + 0x78)
-#define MXC_CCM_CCGR5          (MX51_CCM_BASE + 0x7C)
-#define MXC_CCM_CCGR6          (MX51_CCM_BASE + 0x80)
-#define MXC_CCM_CCGR7          (MX51_CCM_BASE + 0x84)
-
-#define MXC_CCM_CMEOR          (MX51_CCM_BASE + 0x84)
-
-/* Define the bits in register CCR */
-#define MXC_CCM_CCR_COSC_EN            (1 << 12)
-#define MXC_CCM_CCR_FPM_MULT_MASK      (1 << 11)
-#define MXC_CCM_CCR_CAMP2_EN           (1 << 10)
-#define MXC_CCM_CCR_CAMP1_EN           (1 << 9)
-#define MXC_CCM_CCR_FPM_EN             (1 << 8)
-#define MXC_CCM_CCR_OSCNT_OFFSET       (0)
-#define MXC_CCM_CCR_OSCNT_MASK (0xFF)
-
-/* Define the bits in register CCDR */
-#define MXC_CCM_CCDR_HSC_HS_MASK       (0x1 << 18)
-#define MXC_CCM_CCDR_IPU_HS_MASK       (0x1 << 17)
-#define MXC_CCM_CCDR_EMI_HS_MASK       (0x1 << 16)
-
-/* Define the bits in register CSR */
-#define MXC_CCM_CSR_COSR_READY (1 << 5)
-#define MXC_CCM_CSR_LVS_VALUE  (1 << 4)
-#define MXC_CCM_CSR_CAMP2_READY        (1 << 3)
-#define MXC_CCM_CSR_CAMP1_READY        (1 << 2)
-#define MXC_CCM_CSR_FPM_READY  (1 << 1)
-#define MXC_CCM_CSR_REF_EN_B   (1 << 0)
-
-/* Define the bits in register CCSR */
-#define MXC_CCM_CCSR_LP_APM_SEL                (0x1 << 9)
-#define MXC_CCM_CCSR_STEP_SEL_OFFSET   (7)
-#define MXC_CCM_CCSR_STEP_SEL_MASK     (0x3 << 7)
-#define MXC_CCM_CCSR_STEP_SEL_LP_APM      0
-#define MXC_CCM_CCSR_STEP_SEL_PLL1_BYPASS  1 /* Only when JTAG connected? */
-#define MXC_CCM_CCSR_STEP_SEL_PLL2_DIVIDED 2
-#define MXC_CCM_CCSR_STEP_SEL_PLL3_DIVIDED 3
-#define MXC_CCM_CCSR_PLL2_PODF_OFFSET  (5)
-#define MXC_CCM_CCSR_PLL2_PODF_MASK    (0x3 << 5)
-#define MXC_CCM_CCSR_PLL3_PODF_OFFSET  (3)
-#define MXC_CCM_CCSR_PLL3_PODF_MASK    (0x3 << 3)
-#define MXC_CCM_CCSR_PLL1_SW_CLK_SEL   (1 << 2) /* 0: pll1_main_clk,
-                                                   1: step_clk */
-#define MXC_CCM_CCSR_PLL2_SW_CLK_SEL   (1 << 1)
-#define MXC_CCM_CCSR_PLL3_SW_CLK_SEL   (1 << 0)
-
-/* Define the bits in register CACRR */
-#define MXC_CCM_CACRR_ARM_PODF_OFFSET  (0)
-#define MXC_CCM_CACRR_ARM_PODF_MASK    (0x7)
-
-/* Define the bits in register CBCDR */
-#define MXC_CCM_CBCDR_EMI_CLK_SEL              (0x1 << 26)
-#define MXC_CCM_CBCDR_PERIPH_CLK_SEL           (0x1 << 25)
-#define MXC_CCM_CBCDR_DDR_HF_SEL_OFFSET                (30)
-#define MXC_CCM_CBCDR_DDR_HF_SEL               (0x1 << 30)
-#define MXC_CCM_CBCDR_DDR_PODF_OFFSET          (27)
-#define MXC_CCM_CBCDR_DDR_PODF_MASK            (0x7 << 27)
-#define MXC_CCM_CBCDR_EMI_PODF_OFFSET          (22)
-#define MXC_CCM_CBCDR_EMI_PODF_MASK            (0x7 << 22)
-#define MXC_CCM_CBCDR_AXI_B_PODF_OFFSET                (19)
-#define MXC_CCM_CBCDR_AXI_B_PODF_MASK          (0x7 << 19)
-#define MXC_CCM_CBCDR_AXI_A_PODF_OFFSET                (16)
-#define MXC_CCM_CBCDR_AXI_A_PODF_MASK          (0x7 << 16)
-#define MXC_CCM_CBCDR_NFC_PODF_OFFSET          (13)
-#define MXC_CCM_CBCDR_NFC_PODF_MASK            (0x7 << 13)
-#define MXC_CCM_CBCDR_AHB_PODF_OFFSET          (10)
-#define MXC_CCM_CBCDR_AHB_PODF_MASK            (0x7 << 10)
-#define MXC_CCM_CBCDR_IPG_PODF_OFFSET          (8)
-#define MXC_CCM_CBCDR_IPG_PODF_MASK            (0x3 << 8)
-#define MXC_CCM_CBCDR_PERCLK_PRED1_OFFSET      (6)
-#define MXC_CCM_CBCDR_PERCLK_PRED1_MASK                (0x3 << 6)
-#define MXC_CCM_CBCDR_PERCLK_PRED2_OFFSET      (3)
-#define MXC_CCM_CBCDR_PERCLK_PRED2_MASK                (0x7 << 3)
-#define MXC_CCM_CBCDR_PERCLK_PODF_OFFSET       (0)
-#define MXC_CCM_CBCDR_PERCLK_PODF_MASK         (0x7)
-
-/* Define the bits in register CBCMR */
-#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_OFFSET   (14)
-#define MXC_CCM_CBCMR_VPU_AXI_CLK_SEL_MASK     (0x3 << 14)
-#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_OFFSET    (12)
-#define MXC_CCM_CBCMR_PERIPH_CLK_SEL_MASK      (0x3 << 12)
-#define MXC_CCM_CBCMR_DDR_CLK_SEL_OFFSET       (10)
-#define MXC_CCM_CBCMR_DDR_CLK_SEL_MASK         (0x3 << 10)
-#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_OFFSET   (8)
-#define MXC_CCM_CBCMR_ARM_AXI_CLK_SEL_MASK     (0x3 << 8)
-#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_OFFSET   (6)
-#define MXC_CCM_CBCMR_IPU_HSP_CLK_SEL_MASK     (0x3 << 6)
-#define MXC_CCM_CBCMR_GPU_CLK_SEL_OFFSET       (4)
-#define MXC_CCM_CBCMR_GPU_CLK_SEL_MASK         (0x3 << 4)
-#define MXC_CCM_CBCMR_GPU2D_CLK_SEL_OFFSET     (14)
-#define MXC_CCM_CBCMR_GPU2D_CLK_SEL_MASK       (0x3 << 14)
-#define MXC_CCM_CBCMR_PERCLK_LP_APM_CLK_SEL    (0x1 << 1)
-#define MXC_CCM_CBCMR_PERCLK_IPG_CLK_SEL       (0x1 << 0)
-
-/* Define the bits in register CSCMR1 */
-#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_OFFSET         (30)
-#define MXC_CCM_CSCMR1_SSI_EXT2_CLK_SEL_MASK           (0x3 << 30)
-#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_OFFSET         (28)
-#define MXC_CCM_CSCMR1_SSI_EXT1_CLK_SEL_MASK           (0x3 << 28)
-#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL_OFFSET          (26)
-#define MXC_CCM_CSCMR1_USB_PHY_CLK_SEL                 (0x1 << 26)
-#define MXC_CCM_CSCMR1_UART_CLK_SEL_OFFSET             (24)
-#define MXC_CCM_CSCMR1_UART_CLK_SEL_MASK               (0x3 << 24)
-#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_OFFSET           (22)
-#define MXC_CCM_CSCMR1_USBOH3_CLK_SEL_MASK             (0x3 << 22)
-#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_OFFSET     (20)
-#define MXC_CCM_CSCMR1_ESDHC1_MSHC1_CLK_SEL_MASK       (0x3 << 20)
-#define MXC_CCM_CSCMR1_ESDHC3_CLK_SEL                  (0x1 << 19)
-#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_MX53_CLK_SEL       (0x1 << 19)
-#define MXC_CCM_CSCMR1_ESDHC4_CLK_SEL                  (0x1 << 18)
-#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_OFFSET     (16)
-#define MXC_CCM_CSCMR1_ESDHC2_MSHC2_CLK_SEL_MASK       (0x3 << 16)
-#define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_OFFSET      (16)
-#define MXC_CCM_CSCMR1_ESDHC3_MX53_CLK_SEL_MASK                (0x3 << 16)
-#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_OFFSET             (14)
-#define MXC_CCM_CSCMR1_SSI1_CLK_SEL_MASK               (0x3 << 14)
-#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_OFFSET             (12)
-#define MXC_CCM_CSCMR1_SSI2_CLK_SEL_MASK               (0x3 << 12)
-#define MXC_CCM_CSCMR1_SSI3_CLK_SEL                    (0x1 << 11)
-#define MXC_CCM_CSCMR1_VPU_RCLK_SEL                    (0x1 << 10)
-#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_OFFSET          (8)
-#define MXC_CCM_CSCMR1_SSI_APM_CLK_SEL_MASK            (0x3 << 8)
-#define MXC_CCM_CSCMR1_TVE_CLK_SEL                     (0x1 << 7)
-#define MXC_CCM_CSCMR1_TVE_EXT_CLK_SEL                 (0x1 << 6)
-#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_OFFSET             (4)
-#define MXC_CCM_CSCMR1_CSPI_CLK_SEL_MASK               (0x3 << 4)
-#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_OFFSET            (2)
-#define MXC_CCM_CSCMR1_SPDIF_CLK_SEL_MASK              (0x3 << 2)
-#define MXC_CCM_CSCMR1_SSI_EXT2_COM_CLK_SEL            (0x1 << 1)
-#define MXC_CCM_CSCMR1_SSI_EXT1_COM_CLK_SEL            (0x1)
-
-/* Define the bits in register CSCMR2 */
-#define MXC_CCM_CSCMR2_DI_CLK_SEL_OFFSET(n)            (26+n*3)
-#define MXC_CCM_CSCMR2_DI_CLK_SEL_MASK(n)              (0x7 << (26+n*3))
-#define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_OFFSET                (24)
-#define MXC_CCM_CSCMR2_CSI_MCLK2_CLK_SEL_MASK          (0x3 << 24)
-#define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_OFFSET                (22)
-#define MXC_CCM_CSCMR2_CSI_MCLK1_CLK_SEL_MASK          (0x3 << 22)
-#define MXC_CCM_CSCMR2_ESC_CLK_SEL_OFFSET              (20)
-#define MXC_CCM_CSCMR2_ESC_CLK_SEL_MASK                        (0x3 << 20)
-#define MXC_CCM_CSCMR2_HSC2_CLK_SEL_OFFSET             (18)
-#define MXC_CCM_CSCMR2_HSC2_CLK_SEL_MASK               (0x3 << 18)
-#define MXC_CCM_CSCMR2_HSC1_CLK_SEL_OFFSET             (16)
-#define MXC_CCM_CSCMR2_HSC1_CLK_SEL_MASK               (0x3 << 16)
-#define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_OFFSET            (14)
-#define MXC_CCM_CSCMR2_HSI2C_CLK_SEL_MASK              (0x3 << 14)
-#define MXC_CCM_CSCMR2_FIRI_CLK_SEL_OFFSET             (12)
-#define MXC_CCM_CSCMR2_FIRI_CLK_SEL_MASK               (0x3 << 12)
-#define MXC_CCM_CSCMR2_SIM_CLK_SEL_OFFSET              (10)
-#define MXC_CCM_CSCMR2_SIM_CLK_SEL_MASK                        (0x3 << 10)
-#define MXC_CCM_CSCMR2_SLIMBUS_COM                     (0x1 << 9)
-#define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_OFFSET          (6)
-#define MXC_CCM_CSCMR2_SLIMBUS_CLK_SEL_MASK            (0x7 << 6)
-#define MXC_CCM_CSCMR2_SPDIF1_COM                      (1 << 5)
-#define MXC_CCM_CSCMR2_SPDIF0_COM                      (1 << 4)
-#define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_OFFSET           (2)
-#define MXC_CCM_CSCMR2_SPDIF1_CLK_SEL_MASK             (0x3 << 2)
-#define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_OFFSET           (0)
-#define MXC_CCM_CSCMR2_SPDIF0_CLK_SEL_MASK             (0x3)
-
-/* Define the bits in register CSCDR1 */
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_OFFSET    (22)
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PRED_MASK      (0x7 << 22)
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_OFFSET    (19)
-#define MXC_CCM_CSCDR1_ESDHC2_MSHC2_CLK_PODF_MASK      (0x7 << 19)
-#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_OFFSET     (22)
-#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PRED_MASK       (0x7 << 22)
-#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_OFFSET     (19)
-#define MXC_CCM_CSCDR1_ESDHC3_MX53_CLK_PODF_MASK       (0x7 << 19)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_OFFSET    (16)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PRED_MASK      (0x7 << 16)
-#define MXC_CCM_CSCDR1_PGC_CLK_PODF_OFFSET             (14)
-#define MXC_CCM_CSCDR1_PGC_CLK_PODF_MASK               (0x3 << 14)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_OFFSET    (11)
-#define MXC_CCM_CSCDR1_ESDHC1_MSHC1_CLK_PODF_MASK      (0x7 << 11)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_OFFSET          (8)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PRED_MASK            (0x7 << 8)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_OFFSET          (6)
-#define MXC_CCM_CSCDR1_USBOH3_CLK_PODF_MASK            (0x3 << 6)
-#define MXC_CCM_CSCDR1_UART_CLK_PRED_OFFSET            (3)
-#define MXC_CCM_CSCDR1_UART_CLK_PRED_MASK              (0x7 << 3)
-#define MXC_CCM_CSCDR1_UART_CLK_PODF_OFFSET            (0)
-#define MXC_CCM_CSCDR1_UART_CLK_PODF_MASK              (0x7)
-
-/* Define the bits in register CS1CDR and CS2CDR */
-#define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_OFFSET                (22)
-#define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PRED_MASK          (0x7 << 22)
-#define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_OFFSET                (16)
-#define MXC_CCM_CS1CDR_SSI_EXT1_CLK_PODF_MASK          (0x3F << 16)
-#define MXC_CCM_CS1CDR_SSI1_CLK_PRED_OFFSET            (6)
-#define MXC_CCM_CS1CDR_SSI1_CLK_PRED_MASK              (0x7 << 6)
-#define MXC_CCM_CS1CDR_SSI1_CLK_PODF_OFFSET            (0)
-#define MXC_CCM_CS1CDR_SSI1_CLK_PODF_MASK              (0x3F)
-
-#define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_OFFSET                (22)
-#define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PRED_MASK          (0x7 << 22)
-#define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_OFFSET                (16)
-#define MXC_CCM_CS2CDR_SSI_EXT2_CLK_PODF_MASK          (0x3F << 16)
-#define MXC_CCM_CS2CDR_SSI2_CLK_PRED_OFFSET            (6)
-#define MXC_CCM_CS2CDR_SSI2_CLK_PRED_MASK              (0x7 << 6)
-#define MXC_CCM_CS2CDR_SSI2_CLK_PODF_OFFSET            (0)
-#define MXC_CCM_CS2CDR_SSI2_CLK_PODF_MASK              (0x3F)
-
-/* Define the bits in register CDCDR */
-#define MXC_CCM_CDCDR_TVE_CLK_PRED_OFFSET              (28)
-#define MXC_CCM_CDCDR_TVE_CLK_PRED_MASK                        (0x7 << 28)
-#define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_OFFSET           (25)
-#define MXC_CCM_CDCDR_SPDIF0_CLK_PRED_MASK             (0x7 << 25)
-#define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_OFFSET           (19)
-#define MXC_CCM_CDCDR_SPDIF0_CLK_PODF_MASK             (0x3F << 19)
-#define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_OFFSET           (16)
-#define MXC_CCM_CDCDR_SPDIF1_CLK_PRED_MASK             (0x7 << 16)
-#define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_OFFSET           (9)
-#define MXC_CCM_CDCDR_SPDIF1_CLK_PODF_MASK             (0x3F << 9)
-#define MXC_CCM_CDCDR_DI_CLK_PRED_OFFSET               (6)
-#define MXC_CCM_CDCDR_DI_CLK_PRED_MASK                 (0x7 << 6)
-#define MXC_CCM_CDCDR_USB_PHY_PRED_OFFSET              (3)
-#define MXC_CCM_CDCDR_USB_PHY_PRED_MASK                        (0x7 << 3)
-#define MXC_CCM_CDCDR_USB_PHY_PODF_OFFSET              (0)
-#define MXC_CCM_CDCDR_USB_PHY_PODF_MASK                        (0x7)
-
-/* Define the bits in register CHSCCDR */
-#define MXC_CCM_CHSCCDR_ESC_CLK_PRED_OFFSET            (12)
-#define MXC_CCM_CHSCCDR_ESC_CLK_PRED_MASK              (0x7 << 12)
-#define MXC_CCM_CHSCCDR_ESC_CLK_PODF_OFFSET            (6)
-#define MXC_CCM_CHSCCDR_ESC_CLK_PODF_MASK              (0x3F << 6)
-#define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_OFFSET           (3)
-#define MXC_CCM_CHSCCDR_HSC2_CLK_PODF_MASK             (0x7 << 3)
-#define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_OFFSET           (0)
-#define MXC_CCM_CHSCCDR_HSC1_CLK_PODF_MASK             (0x7)
-
-/* Define the bits in register CSCDR2 */
-#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_OFFSET            (25)
-#define MXC_CCM_CSCDR2_CSPI_CLK_PRED_MASK              (0x7 << 25)
-#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_OFFSET            (19)
-#define MXC_CCM_CSCDR2_CSPI_CLK_PODF_MASK              (0x3F << 19)
-#define MXC_CCM_CSCDR2_SIM_CLK_PRED_OFFSET             (16)
-#define MXC_CCM_CSCDR2_SIM_CLK_PRED_MASK               (0x7 << 16)
-#define MXC_CCM_CSCDR2_SIM_CLK_PODF_OFFSET             (9)
-#define MXC_CCM_CSCDR2_SIM_CLK_PODF_MASK               (0x3F << 9)
-#define MXC_CCM_CSCDR2_SLIMBUS_CLK_PRED_OFFSET         (6)
-#define MXC_CCM_CSCDR2_SLIMBUS_PRED_MASK               (0x7 << 6)
-#define MXC_CCM_CSCDR2_SLIMBUS_PODF_OFFSET             (0)
-#define MXC_CCM_CSCDR2_SLIMBUS_PODF_MASK               (0x3F)
-
-/* Define the bits in register CSCDR3 */
-#define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_OFFSET           (16)
-#define MXC_CCM_CSCDR3_HSI2C_CLK_PRED_MASK             (0x7 << 16)
-#define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_OFFSET           (9)
-#define MXC_CCM_CSCDR3_HSI2C_CLK_PODF_MASK             (0x3F << 9)
-#define MXC_CCM_CSCDR3_FIRI_CLK_PRED_OFFSET            (6)
-#define MXC_CCM_CSCDR3_FIRI_CLK_PRED_MASK              (0x7 << 6)
-#define MXC_CCM_CSCDR3_FIRI_CLK_PODF_OFFSET            (0)
-#define MXC_CCM_CSCDR3_FIRI_CLK_PODF_MASK              (0x3F)
-
-/* Define the bits in register CSCDR4 */
-#define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_OFFSET       (16)
-#define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PRED_MASK         (0x7 << 16)
-#define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_OFFSET       (9)
-#define MXC_CCM_CSCDR4_CSI_MCLK2_CLK_PODF_MASK         (0x3F << 9)
-#define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_OFFSET       (6)
-#define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PRED_MASK         (0x7 << 6)
-#define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_OFFSET       (0)
-#define MXC_CCM_CSCDR4_CSI_MCLK1_CLK_PODF_MASK         (0x3F)
-
-/* Define the bits in register CDHIPR */
-#define MXC_CCM_CDHIPR_ARM_PODF_BUSY                   (1 << 16)
-#define MXC_CCM_CDHIPR_DDR_HF_CLK_SEL_BUSY             (1 << 8)
-#define MXC_CCM_CDHIPR_DDR_PODF_BUSY                   (1 << 7)
-#define MXC_CCM_CDHIPR_EMI_CLK_SEL_BUSY                        (1 << 6)
-#define MXC_CCM_CDHIPR_PERIPH_CLK_SEL_BUSY             (1 << 5)
-#define MXC_CCM_CDHIPR_NFC_IPG_INT_MEM_PODF_BUSY       (1 << 4)
-#define MXC_CCM_CDHIPR_AHB_PODF_BUSY                   (1 << 3)
-#define MXC_CCM_CDHIPR_EMI_PODF_BUSY                   (1 << 2)
-#define MXC_CCM_CDHIPR_AXI_B_PODF_BUSY                 (1 << 1)
-#define MXC_CCM_CDHIPR_AXI_A_PODF_BUSY                 (1 << 0)
-
-/* Define the bits in register CDCR */
-#define MXC_CCM_CDCR_ARM_FREQ_SHIFT_DIVIDER            (0x1 << 2)
-#define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_OFFSET       (0)
-#define MXC_CCM_CDCR_PERIPH_CLK_DVFS_PODF_MASK         (0x3)
-
-/* Define the bits in register CLPCR */
-#define MXC_CCM_CLPCR_BYPASS_HSC_LPM_HS                (0x1 << 23)
-#define MXC_CCM_CLPCR_BYPASS_SCC_LPM_HS                (0x1 << 22)
-#define MX51_CCM_CLPCR_BYPASS_MAX_LPM_HS               (0x1 << 21)
-#define MX53_CCM_CLPCR_BYPASS_MAX_LPM_HS               (0x1 << 25)
-#define MXC_CCM_CLPCR_BYPASS_SDMA_LPM_HS       (0x1 << 20)
-#define MXC_CCM_CLPCR_BYPASS_EMI_LPM_HS                (0x1 << 19)
-#define MXC_CCM_CLPCR_BYPASS_IPU_LPM_HS                (0x1 << 18)
-#define MXC_CCM_CLPCR_BYPASS_RTIC_LPM_HS       (0x1 << 17)
-#define MXC_CCM_CLPCR_BYPASS_RNGC_LPM_HS       (0x1 << 16)
-#define MXC_CCM_CLPCR_COSC_PWRDOWN             (0x1 << 11)
-#define MXC_CCM_CLPCR_STBY_COUNT_OFFSET                (9)
-#define MXC_CCM_CLPCR_STBY_COUNT_MASK          (0x3 << 9)
-#define MXC_CCM_CLPCR_VSTBY                    (0x1 << 8)
-#define MXC_CCM_CLPCR_DIS_REF_OSC              (0x1 << 7)
-#define MXC_CCM_CLPCR_SBYOS                    (0x1 << 6)
-#define MXC_CCM_CLPCR_ARM_CLK_DIS_ON_LPM       (0x1 << 5)
-#define MXC_CCM_CLPCR_LPSR_CLK_SEL_OFFSET      (3)
-#define MXC_CCM_CLPCR_LPSR_CLK_SEL_MASK                (0x3 << 3)
-#define MXC_CCM_CLPCR_LPM_OFFSET               (0)
-#define MXC_CCM_CLPCR_LPM_MASK                 (0x3)
-
-/* Define the bits in register CISR */
-#define MXC_CCM_CISR_ARM_PODF_LOADED                   (0x1 << 25)
-#define MXC_CCM_CISR_NFC_IPG_INT_MEM_PODF_LOADED       (0x1 << 21)
-#define MXC_CCM_CISR_AHB_PODF_LOADED                   (0x1 << 20)
-#define MXC_CCM_CISR_EMI_PODF_LOADED                   (0x1 << 19)
-#define MXC_CCM_CISR_AXI_B_PODF_LOADED                 (0x1 << 18)
-#define MXC_CCM_CISR_AXI_A_PODF_LOADED                 (0x1 << 17)
-#define MXC_CCM_CISR_DIVIDER_LOADED                    (0x1 << 16)
-#define MXC_CCM_CISR_COSC_READY                                (0x1 << 6)
-#define MXC_CCM_CISR_CKIH2_READY                       (0x1 << 5)
-#define MXC_CCM_CISR_CKIH_READY                                (0x1 << 4)
-#define MXC_CCM_CISR_FPM_READY                         (0x1 << 3)
-#define MXC_CCM_CISR_LRF_PLL3                          (0x1 << 2)
-#define MXC_CCM_CISR_LRF_PLL2                          (0x1 << 1)
-#define MXC_CCM_CISR_LRF_PLL1                          (0x1)
-
-/* Define the bits in register CIMR */
-#define MXC_CCM_CIMR_MASK_ARM_PODF_LOADED              (0x1 << 25)
-#define MXC_CCM_CIMR_MASK_NFC_IPG_INT_MEM_PODF_LOADED  (0x1 << 21)
-#define MXC_CCM_CIMR_MASK_EMI_PODF_LOADED              (0x1 << 20)
-#define MXC_CCM_CIMR_MASK_AXI_C_PODF_LOADED            (0x1 << 19)
-#define MXC_CCM_CIMR_MASK_AXI_B_PODF_LOADED            (0x1 << 18)
-#define MXC_CCM_CIMR_MASK_AXI_A_PODF_LOADED            (0x1 << 17)
-#define MXC_CCM_CIMR_MASK_DIVIDER_LOADED               (0x1 << 16)
-#define MXC_CCM_CIMR_MASK_COSC_READY                   (0x1 << 5)
-#define MXC_CCM_CIMR_MASK_CKIH_READY                   (0x1 << 4)
-#define MXC_CCM_CIMR_MASK_FPM_READY                    (0x1 << 3)
-#define MXC_CCM_CIMR_MASK_LRF_PLL3                     (0x1 << 2)
-#define MXC_CCM_CIMR_MASK_LRF_PLL2                     (0x1 << 1)
-#define MXC_CCM_CIMR_MASK_LRF_PLL1                     (0x1)
-
-/* Define the bits in register CCOSR */
-#define MXC_CCM_CCOSR_CKO2_EN_OFFSET                   (0x1 << 24)
-#define MXC_CCM_CCOSR_CKO2_DIV_OFFSET                  (21)
-#define MXC_CCM_CCOSR_CKO2_DIV_MASK                    (0x7 << 21)
-#define MXC_CCM_CCOSR_CKO2_SEL_OFFSET                  (16)
-#define MXC_CCM_CCOSR_CKO2_SEL_MASK                    (0x1F << 16)
-#define MXC_CCM_CCOSR_CKOL_EN                          (0x1 << 7)
-#define MXC_CCM_CCOSR_CKOL_DIV_OFFSET                  (4)
-#define MXC_CCM_CCOSR_CKOL_DIV_MASK                    (0x7 << 4)
-#define MXC_CCM_CCOSR_CKOL_SEL_OFFSET                  (0)
-#define MXC_CCM_CCOSR_CKOL_SEL_MASK                    (0xF)
-
-/* Define the bits in registers CGPR */
-#define MXC_CCM_CGPR_EFUSE_PROG_SUPPLY_GATE            (0x1 << 4)
-#define MXC_CCM_CGPR_FPM_SEL                           (0x1 << 3)
-#define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_OFFSET           (0)
-#define MXC_CCM_CGPR_VL_L2BIST_CLKDIV_MASK             (0x7)
-
-/* Define the bits in registers CCGRx */
-#define MXC_CCM_CCGRx_CG_MASK                          0x3
-#define MXC_CCM_CCGRx_MOD_OFF                          0x0
-#define MXC_CCM_CCGRx_MOD_ON                           0x3
-#define MXC_CCM_CCGRx_MOD_IDLE                         0x1
-
-#define MXC_CCM_CCGRx_CG15_MASK                                (0x3 << 30)
-#define MXC_CCM_CCGRx_CG14_MASK                                (0x3 << 28)
-#define MXC_CCM_CCGRx_CG13_MASK                                (0x3 << 26)
-#define MXC_CCM_CCGRx_CG12_MASK                                (0x3 << 24)
-#define MXC_CCM_CCGRx_CG11_MASK                                (0x3 << 22)
-#define MXC_CCM_CCGRx_CG10_MASK                                (0x3 << 20)
-#define MXC_CCM_CCGRx_CG9_MASK                         (0x3 << 18)
-#define MXC_CCM_CCGRx_CG8_MASK                         (0x3 << 16)
-#define MXC_CCM_CCGRx_CG5_MASK                         (0x3 << 10)
-#define MXC_CCM_CCGRx_CG4_MASK                         (0x3 << 8)
-#define MXC_CCM_CCGRx_CG3_MASK                         (0x3 << 6)
-#define MXC_CCM_CCGRx_CG2_MASK                         (0x3 << 4)
-#define MXC_CCM_CCGRx_CG1_MASK                         (0x3 << 2)
-#define MXC_CCM_CCGRx_CG0_MASK                         (0x3 << 0)
-
-#define MXC_CCM_CCGRx_CG15_OFFSET                      30
-#define MXC_CCM_CCGRx_CG14_OFFSET                      28
-#define MXC_CCM_CCGRx_CG13_OFFSET                      26
-#define MXC_CCM_CCGRx_CG12_OFFSET                      24
-#define MXC_CCM_CCGRx_CG11_OFFSET                      22
-#define MXC_CCM_CCGRx_CG10_OFFSET                      20
-#define MXC_CCM_CCGRx_CG9_OFFSET                       18
-#define MXC_CCM_CCGRx_CG8_OFFSET                       16
-#define MXC_CCM_CCGRx_CG7_OFFSET                       14
-#define MXC_CCM_CCGRx_CG6_OFFSET                       12
-#define MXC_CCM_CCGRx_CG5_OFFSET                       10
-#define MXC_CCM_CCGRx_CG4_OFFSET                       8
-#define MXC_CCM_CCGRx_CG3_OFFSET                       6
-#define MXC_CCM_CCGRx_CG2_OFFSET                       4
-#define MXC_CCM_CCGRx_CG1_OFFSET                       2
-#define MXC_CCM_CCGRx_CG0_OFFSET                       0
-
-#define MXC_DPTC_LP_BASE       (MX51_GPC_BASE + 0x80)
-#define MXC_DPTC_GP_BASE       (MX51_GPC_BASE + 0x100)
-#define MXC_DVFS_CORE_BASE     (MX51_GPC_BASE + 0x180)
-#define MXC_DPTC_PER_BASE      (MX51_GPC_BASE + 0x1C0)
-#define MXC_PGC_IPU_BASE       (MX51_GPC_BASE + 0x220)
-#define MXC_PGC_VPU_BASE       (MX51_GPC_BASE + 0x240)
-#define MXC_PGC_GPU_BASE       (MX51_GPC_BASE + 0x260)
-#define MXC_SRPG_NEON_BASE     (MX51_GPC_BASE + 0x280)
-#define MXC_SRPG_ARM_BASE      (MX51_GPC_BASE + 0x2A0)
-#define MXC_SRPG_EMPGC0_BASE   (MX51_GPC_BASE + 0x2C0)
-#define MXC_SRPG_EMPGC1_BASE   (MX51_GPC_BASE + 0x2D0)
-#define MXC_SRPG_MEGAMIX_BASE  (MX51_GPC_BASE + 0x2E0)
-#define MXC_SRPG_EMI_BASE      (MX51_GPC_BASE + 0x300)
-
-/* CORTEXA8 platform */
-#define MXC_CORTEXA8_PLAT_PVID         (MX51_CORTEXA8_BASE + 0x0)
-#define MXC_CORTEXA8_PLAT_GPC          (MX51_CORTEXA8_BASE + 0x4)
-#define MXC_CORTEXA8_PLAT_PIC          (MX51_CORTEXA8_BASE + 0x8)
-#define MXC_CORTEXA8_PLAT_LPC          (MX51_CORTEXA8_BASE + 0xC)
-#define MXC_CORTEXA8_PLAT_NEON_LPC     (MX51_CORTEXA8_BASE + 0x10)
-#define MXC_CORTEXA8_PLAT_ICGC         (MX51_CORTEXA8_BASE + 0x14)
-#define MXC_CORTEXA8_PLAT_AMC          (MX51_CORTEXA8_BASE + 0x18)
-#define MXC_CORTEXA8_PLAT_NMC          (MX51_CORTEXA8_BASE + 0x20)
-#define MXC_CORTEXA8_PLAT_NMS          (MX51_CORTEXA8_BASE + 0x24)
-
-/* DVFS CORE */
-#define MXC_DVFSTHRS           (MXC_DVFS_CORE_BASE + 0x00)
-#define MXC_DVFSCOUN           (MXC_DVFS_CORE_BASE + 0x04)
-#define MXC_DVFSSIG1           (MXC_DVFS_CORE_BASE + 0x08)
-#define MXC_DVFSSIG0           (MXC_DVFS_CORE_BASE + 0x0C)
-#define MXC_DVFSGPC0           (MXC_DVFS_CORE_BASE + 0x10)
-#define MXC_DVFSGPC1           (MXC_DVFS_CORE_BASE + 0x14)
-#define MXC_DVFSGPBT           (MXC_DVFS_CORE_BASE + 0x18)
-#define MXC_DVFSEMAC           (MXC_DVFS_CORE_BASE + 0x1C)
-#define MXC_DVFSCNTR           (MXC_DVFS_CORE_BASE + 0x20)
-#define MXC_DVFSLTR0_0         (MXC_DVFS_CORE_BASE + 0x24)
-#define MXC_DVFSLTR0_1         (MXC_DVFS_CORE_BASE + 0x28)
-#define MXC_DVFSLTR1_0         (MXC_DVFS_CORE_BASE + 0x2C)
-#define MXC_DVFSLTR1_1         (MXC_DVFS_CORE_BASE + 0x30)
-#define MXC_DVFSPT0            (MXC_DVFS_CORE_BASE + 0x34)
-#define MXC_DVFSPT1            (MXC_DVFS_CORE_BASE + 0x38)
-#define MXC_DVFSPT2            (MXC_DVFS_CORE_BASE + 0x3C)
-#define MXC_DVFSPT3            (MXC_DVFS_CORE_BASE + 0x40)
-
-/* GPC */
-#define MXC_GPC_CNTR           (MX51_GPC_BASE + 0x0)
-#define MXC_GPC_PGR            (MX51_GPC_BASE + 0x4)
-#define MXC_GPC_VCR            (MX51_GPC_BASE + 0x8)
-#define MXC_GPC_ALL_PU         (MX51_GPC_BASE + 0xC)
-#define MXC_GPC_NEON           (MX51_GPC_BASE + 0x10)
-#define MXC_GPC_PGR_ARMPG_OFFSET       8
-#define MXC_GPC_PGR_ARMPG_MASK         (3 << 8)
-
-/* PGC */
-#define MXC_PGC_IPU_PGCR       (MXC_PGC_IPU_BASE + 0x0)
-#define MXC_PGC_IPU_PGSR       (MXC_PGC_IPU_BASE + 0xC)
-#define MXC_PGC_VPU_PGCR       (MXC_PGC_VPU_BASE + 0x0)
-#define MXC_PGC_VPU_PGSR       (MXC_PGC_VPU_BASE + 0xC)
-#define MXC_PGC_GPU_PGCR       (MXC_PGC_GPU_BASE + 0x0)
-#define MXC_PGC_GPU_PGSR       (MXC_PGC_GPU_BASE + 0xC)
-
-#define MXC_PGCR_PCR           1
-#define MXC_SRPGCR_PCR         1
-#define MXC_EMPGCR_PCR         1
-#define MXC_PGSR_PSR           1
-
-
-#define MXC_CORTEXA8_PLAT_LPC_DSM      (1 << 0)
-#define MXC_CORTEXA8_PLAT_LPC_DBG_DSM  (1 << 1)
-
-/* SRPG */
-#define MXC_SRPG_NEON_SRPGCR   (MXC_SRPG_NEON_BASE + 0x0)
-#define MXC_SRPG_NEON_PUPSCR   (MXC_SRPG_NEON_BASE + 0x4)
-#define MXC_SRPG_NEON_PDNSCR   (MXC_SRPG_NEON_BASE + 0x8)
-
-#define MXC_SRPG_ARM_SRPGCR    (MXC_SRPG_ARM_BASE + 0x0)
-#define MXC_SRPG_ARM_PUPSCR    (MXC_SRPG_ARM_BASE + 0x4)
-#define MXC_SRPG_ARM_PDNSCR    (MXC_SRPG_ARM_BASE + 0x8)
-
-#define MXC_SRPG_EMPGC0_SRPGCR (MXC_SRPG_EMPGC0_BASE + 0x0)
-#define MXC_SRPG_EMPGC0_PUPSCR (MXC_SRPG_EMPGC0_BASE + 0x4)
-#define MXC_SRPG_EMPGC0_PDNSCR (MXC_SRPG_EMPGC0_BASE + 0x8)
-
-#define MXC_SRPG_EMPGC1_SRPGCR (MXC_SRPG_EMPGC1_BASE + 0x0)
-#define MXC_SRPG_EMPGC1_PUPSCR (MXC_SRPG_EMPGC1_BASE + 0x4)
-#define MXC_SRPG_EMPGC1_PDNSCR (MXC_SRPG_EMPGC1_BASE + 0x8)
-
-#define MXC_SRPG_MEGAMIX_SRPGCR                (MXC_SRPG_MEGAMIX_BASE + 0x0)
-#define MXC_SRPG_MEGAMIX_PUPSCR                (MXC_SRPG_MEGAMIX_BASE + 0x4)
-#define MXC_SRPG_MEGAMIX_PDNSCR                (MXC_SRPG_MEGAMIX_BASE + 0x8)
-
-#define MXC_SRPGC_EMI_SRPGCR   (MXC_SRPGC_EMI_BASE + 0x0)
-#define MXC_SRPGC_EMI_PUPSCR   (MXC_SRPGC_EMI_BASE + 0x4)
-#define MXC_SRPGC_EMI_PDNSCR   (MXC_SRPGC_EMI_BASE + 0x8)
-
-#endif                         /* __ARCH_ARM_MACH_MX51_CRM_REGS_H__ */
diff --git a/arch/arm/mach-imx/devices-imx51.h b/arch/arm/mach-imx/devices-imx51.h
deleted file mode 100644 (file)
index 26389f3..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.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.
- */
-#include "devices/devices-common.h"
-
-extern const struct imx_fec_data imx51_fec_data;
-#define imx51_add_fec(pdata)   \
-       imx_add_fec(&imx51_fec_data, pdata)
-
-extern const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data;
-#define imx51_add_fsl_usb2_udc(pdata)  \
-       imx_add_fsl_usb2_udc(&imx51_fsl_usb2_udc_data, pdata)
-
-extern const struct imx_imx_i2c_data imx51_imx_i2c_data[];
-#define imx51_add_imx_i2c(id, pdata)   \
-       imx_add_imx_i2c(&imx51_imx_i2c_data[id], pdata)
-#define imx51_add_hsi2c(pdata) \
-       imx51_add_imx_i2c(2, pdata)
-
-extern const struct imx_imx_ssi_data imx51_imx_ssi_data[];
-#define imx51_add_imx_ssi(id, pdata)   \
-       imx_add_imx_ssi(&imx51_imx_ssi_data[id], pdata)
-
-extern const struct imx_imx_uart_1irq_data imx51_imx_uart_data[];
-#define imx51_add_imx_uart(id, pdata)  \
-       imx_add_imx_uart_1irq(&imx51_imx_uart_data[id], pdata)
-
-extern const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data;
-#define imx51_add_mxc_ehci_otg(pdata)  \
-       imx_add_mxc_ehci(&imx51_mxc_ehci_otg_data, pdata)
-extern const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[];
-#define imx51_add_mxc_ehci_hs(id, pdata)       \
-       imx_add_mxc_ehci(&imx51_mxc_ehci_hs_data[id - 1], pdata)
-
-extern const struct imx_mxc_nand_data imx51_mxc_nand_data;
-#define imx51_add_mxc_nand(pdata)      \
-       imx_add_mxc_nand(&imx51_mxc_nand_data, pdata)
-
-extern const struct imx_sdhci_esdhc_imx_data imx51_sdhci_esdhc_imx_data[];
-#define imx51_add_sdhci_esdhc_imx(id, pdata)   \
-       imx_add_sdhci_esdhc_imx(&imx51_sdhci_esdhc_imx_data[id], pdata)
-
-extern const struct imx_spi_imx_data imx51_cspi_data;
-#define imx51_add_cspi(pdata)  \
-       imx_add_spi_imx(&imx51_cspi_data, pdata)
-
-extern const struct imx_spi_imx_data imx51_ecspi_data[];
-#define imx51_add_ecspi(id, pdata)     \
-       imx_add_spi_imx(&imx51_ecspi_data[id], pdata)
-
-extern const struct imx_imx2_wdt_data imx51_imx2_wdt_data[];
-#define imx51_add_imx2_wdt(id) \
-       imx_add_imx2_wdt(&imx51_imx2_wdt_data[id])
-
-extern const struct imx_imx_keypad_data imx51_imx_keypad_data;
-#define imx51_add_imx_keypad(pdata)    \
-       imx_add_imx_keypad(&imx51_imx_keypad_data, pdata)
-
-extern const struct imx_pata_imx_data imx51_pata_imx_data;
-#define imx51_add_pata_imx() \
-       imx_add_pata_imx(&imx51_pata_imx_data)
index 2d260a5..1d2cc18 100644 (file)
@@ -1,6 +1,6 @@
 config IMX_HAVE_PLATFORM_FEC
        bool
-       default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
+       default y if SOC_IMX25 || SOC_IMX27 || SOC_IMX35
 
 config IMX_HAVE_PLATFORM_FLEXCAN
        bool
@@ -10,7 +10,6 @@ config IMX_HAVE_PLATFORM_FSL_USB2_UDC
 
 config IMX_HAVE_PLATFORM_GPIO_KEYS
        bool
-       default y if SOC_IMX51
 
 config IMX_HAVE_PLATFORM_IMX21_HCD
        bool
@@ -43,15 +42,9 @@ config IMX_HAVE_PLATFORM_IMX_SSI
 config IMX_HAVE_PLATFORM_IMX_UART
        bool
 
-config IMX_HAVE_PLATFORM_IMX_UDC
-       bool
-
 config IMX_HAVE_PLATFORM_IPU_CORE
        bool
 
-config IMX_HAVE_PLATFORM_MX1_CAMERA
-       bool
-
 config IMX_HAVE_PLATFORM_MX2_CAMERA
        bool
 
index 1cbc14c..8fdb12b 100644 (file)
@@ -16,9 +16,7 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_KEYPAD) += platform-imx-keypad.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_PATA_IMX) += platform-pata_imx.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_SSI) += platform-imx-ssi.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UART) += platform-imx-uart.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_UDC) += platform-imx_udc.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_IPU_CORE) += platform-ipu-core.o
-obj-$(CONFIG_IMX_HAVE_PLATFORM_MX1_CAMERA) += platform-mx1-camera.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_CAMERA) += platform-mx2-camera.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI) += platform-mxc-ehci.o
 obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_MMC) += platform-mxc-mmc.o
index 61352a8..67f7fb1 100644 (file)
@@ -176,22 +176,6 @@ struct platform_device *__init imx_add_imx_uart_1irq(
                const struct imx_imx_uart_1irq_data *data,
                const struct imxuart_platform_data *pdata);
 
-#include <linux/platform_data/usb-imx_udc.h>
-struct imx_imx_udc_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq0;
-       resource_size_t irq1;
-       resource_size_t irq2;
-       resource_size_t irq3;
-       resource_size_t irq4;
-       resource_size_t irq5;
-       resource_size_t irq6;
-};
-struct platform_device *__init imx_add_imx_udc(
-               const struct imx_imx_udc_data *data,
-               const struct imxusb_platform_data *pdata);
-
 #include <linux/platform_data/video-mx3fb.h>
 #include <linux/platform_data/camera-mx3.h>
 struct imx_ipu_core_data {
@@ -208,16 +192,6 @@ struct platform_device *__init imx_add_mx3_sdc_fb(
                const struct imx_ipu_core_data *data,
                struct mx3fb_platform_data *pdata);
 
-#include <linux/platform_data/camera-mx1.h>
-struct imx_mx1_camera_data {
-       resource_size_t iobase;
-       resource_size_t iosize;
-       resource_size_t irq;
-};
-struct platform_device *__init imx_add_mx1_camera(
-               const struct imx_mx1_camera_data *data,
-               const struct mx1_camera_pdata *pdata);
-
 #include <linux/platform_data/camera-mx2.h>
 struct imx_mx2_camera_data {
        const char *devid;
index 63eba08..d86f925 100644 (file)
@@ -35,18 +35,6 @@ const struct imx_fec_data imx35_fec_data __initconst =
        imx_fec_data_entry_single(MX35, "imx27-fec");
 #endif
 
-#ifdef CONFIG_SOC_IMX51
-/* i.mx51 has the i.mx27 type fec */
-const struct imx_fec_data imx51_fec_data __initconst =
-       imx_fec_data_entry_single(MX51, "imx27-fec");
-#endif
-
-#ifdef CONFIG_SOC_IMX53
-/* i.mx53 has the i.mx25 type fec */
-const struct imx_fec_data imx53_fec_data __initconst =
-       imx_fec_data_entry_single(MX53, "imx25-fec");
-#endif
-
 struct platform_device *__init imx_add_fec(
                const struct imx_fec_data *data,
                const struct fec_platform_data *pdata)
index 3c06bd9..23b0061 100644 (file)
@@ -38,11 +38,6 @@ const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
        imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27");
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
-       imx_fsl_usb2_udc_data_entry_single(MX51, "imx-udc-mx51");
-#endif
-
 struct platform_device *__init imx_add_fsl_usb2_udc(
                const struct imx_fsl_usb2_udc_data *data,
                const struct fsl_usb2_platform_data *pdata)
index 57d342e..644ac26 100644 (file)
@@ -70,32 +70,6 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
-#define imx51_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX51, "imx21-i2c", _id, _hwid, SZ_4K)
-       imx51_imx_i2c_data_entry(0, 1),
-       imx51_imx_i2c_data_entry(1, 2),
-       {
-               .devid = "imx21-i2c",
-               .id = 2,
-               .iobase = MX51_HSI2C_DMA_BASE_ADDR,
-               .iosize = SZ_16K,
-               .irq = MX51_INT_HS_I2C,
-       },
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_i2c_data imx53_imx_i2c_data[] __initconst = {
-#define imx53_imx_i2c_data_entry(_id, _hwid)                           \
-       imx_imx_i2c_data_entry(MX53, "imx21-i2c", _id, _hwid, SZ_4K)
-       imx53_imx_i2c_data_entry(0, 1),
-       imx53_imx_i2c_data_entry(1, 2),
-       imx53_imx_i2c_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_imx_i2c(
                const struct imx_imx_i2c_data *data,
                const struct imxi2c_platform_data *pdata)
index 8f22a4c..f42200b 100644 (file)
@@ -41,16 +41,6 @@ const struct imx_imx_keypad_data imx35_imx_keypad_data __initconst =
        imx_imx_keypad_data_entry_single(MX35, SZ_16);
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_keypad_data imx51_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX51, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_keypad_data imx53_imx_keypad_data __initconst =
-       imx_imx_keypad_data_entry_single(MX53, SZ_16);
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_imx_keypad(
                const struct imx_imx_keypad_data *data,
                const struct matrix_keymap_data *pdata)
index bfcb8f3..1c7c721 100644 (file)
@@ -66,26 +66,6 @@ const struct imx_imx_ssi_data imx35_imx_ssi_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_ssi_data imx51_imx_ssi_data[] __initconst = {
-#define imx51_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_imx_ssi_data_entry(0, 1),
-       imx51_imx_ssi_data_entry(1, 2),
-       imx51_imx_ssi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_ssi_data imx53_imx_ssi_data[] __initconst = {
-#define imx53_imx_ssi_data_entry(_id, _hwid)                           \
-       imx_imx_ssi_data_entry(MX53, _id, _hwid, SZ_16K)
-       imx53_imx_ssi_data_entry(0, 1),
-       imx53_imx_ssi_data_entry(1, 2),
-       imx53_imx_ssi_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_imx_ssi(
                const struct imx_imx_ssi_data *data,
                const struct imx_ssi_platform_data *pdata)
index faac4aa..8c01836 100644 (file)
@@ -94,28 +94,6 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
-#define imx51_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX51, _id, _hwid, SZ_4K)
-       imx51_imx_uart_data_entry(0, 1),
-       imx51_imx_uart_data_entry(1, 2),
-       imx51_imx_uart_data_entry(2, 3),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx_uart_1irq_data imx53_imx_uart_data[] __initconst = {
-#define imx53_imx_uart_data_entry(_id, _hwid)                          \
-       imx_imx_uart_1irq_data_entry(MX53, _id, _hwid, SZ_4K)
-       imx53_imx_uart_data_entry(0, 1),
-       imx53_imx_uart_data_entry(1, 2),
-       imx53_imx_uart_data_entry(2, 3),
-       imx53_imx_uart_data_entry(3, 4),
-       imx53_imx_uart_data_entry(4, 5),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_imx_uart_3irq(
                const struct imx_imx_uart_3irq_data *data,
                const struct imxuart_platform_data *pdata)
index ec75d64..54f63bc 100644 (file)
@@ -45,24 +45,6 @@ const struct imx_imx2_wdt_data imx35_imx2_wdt_data __initconst =
        imx_imx2_wdt_data_entry_single(MX35, 0, , SZ_16K);
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_imx2_wdt_data imx51_imx2_wdt_data[] __initconst = {
-#define imx51_imx2_wdt_data_entry(_id, _hwid)                          \
-       imx_imx2_wdt_data_entry(MX51, _id, _hwid, SZ_16K)
-       imx51_imx2_wdt_data_entry(0, 1),
-       imx51_imx2_wdt_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_imx2_wdt_data imx53_imx2_wdt_data[] __initconst = {
-#define imx53_imx2_wdt_data_entry(_id, _hwid)                          \
-       imx_imx2_wdt_data_entry(MX53, _id, _hwid, SZ_16K)
-       imx53_imx2_wdt_data_entry(0, 1),
-       imx53_imx2_wdt_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_imx2_wdt(
                const struct imx_imx2_wdt_data *data)
 {
diff --git a/arch/arm/mach-imx/devices/platform-imx_udc.c b/arch/arm/mach-imx/devices/platform-imx_udc.c
deleted file mode 100644 (file)
index 5ced7e4..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.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.
- */
-#include "../hardware.h"
-#include "devices-common.h"
-
-#define imx_imx_udc_data_entry_single(soc, _size)                      \
-       {                                                               \
-               .iobase = soc ## _USBD_BASE_ADDR,                       \
-               .iosize = _size,                                        \
-               .irq0 = soc ## _INT_USBD0,                              \
-               .irq1 = soc ## _INT_USBD1,                              \
-               .irq2 = soc ## _INT_USBD2,                              \
-               .irq3 = soc ## _INT_USBD3,                              \
-               .irq4 = soc ## _INT_USBD4,                              \
-               .irq5 = soc ## _INT_USBD5,                              \
-               .irq6 = soc ## _INT_USBD6,                              \
-       }
-
-#define imx_imx_udc_data_entry(soc, _size)                             \
-       [_id] = imx_imx_udc_data_entry_single(soc, _size)
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_imx_udc_data imx1_imx_udc_data __initconst =
-       imx_imx_udc_data_entry_single(MX1, SZ_4K);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-struct platform_device *__init imx_add_imx_udc(
-               const struct imx_imx_udc_data *data,
-               const struct imxusb_platform_data *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq0,
-                       .end = data->irq0,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq1,
-                       .end = data->irq1,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq2,
-                       .end = data->irq2,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq3,
-                       .end = data->irq3,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq4,
-                       .end = data->irq4,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq5,
-                       .end = data->irq5,
-                       .flags = IORESOURCE_IRQ,
-               }, {
-                       .start = data->irq6,
-                       .end = data->irq6,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-
-       return imx_add_platform_device("imx_udc", 0,
-                       res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
-}
diff --git a/arch/arm/mach-imx/devices/platform-mx1-camera.c b/arch/arm/mach-imx/devices/platform-mx1-camera.c
deleted file mode 100644 (file)
index 2c67881..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2010 Pengutronix
- * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.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.
- */
-#include "../hardware.h"
-#include "devices-common.h"
-
-#define imx_mx1_camera_data_entry_single(soc, _size)                   \
-       {                                                               \
-               .iobase = soc ## _CSI ## _BASE_ADDR,                    \
-               .iosize = _size,                                        \
-               .irq = soc ## _INT_CSI,                                 \
-       }
-
-#ifdef CONFIG_SOC_IMX1
-const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
-       imx_mx1_camera_data_entry_single(MX1, 10);
-#endif /* ifdef CONFIG_SOC_IMX1 */
-
-struct platform_device *__init imx_add_mx1_camera(
-               const struct imx_mx1_camera_data *data,
-               const struct mx1_camera_pdata *pdata)
-{
-       struct resource res[] = {
-               {
-                       .start = data->iobase,
-                       .end = data->iobase + data->iosize - 1,
-                       .flags = IORESOURCE_MEM,
-               }, {
-                       .start = data->irq,
-                       .end = data->irq,
-                       .flags = IORESOURCE_IRQ,
-               },
-       };
-       return imx_add_platform_device_dmamask("mx1-camera", 0,
-                       res, ARRAY_SIZE(res),
-                       pdata, sizeof(*pdata), DMA_BIT_MASK(32));
-}
index 5d4bbbf..2963536 100644 (file)
@@ -50,15 +50,6 @@ const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst =
        imx_mxc_ehci_data_entry_single(MX35, 1, HS);
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_ehci_data imx51_mxc_ehci_otg_data __initconst =
-       imx_mxc_ehci_data_entry_single(MX51, 0, OTG);
-const struct imx_mxc_ehci_data imx51_mxc_ehci_hs_data[] __initconst = {
-       imx_mxc_ehci_data_entry_single(MX51, 1, HS1),
-       imx_mxc_ehci_data_entry_single(MX51, 2, HS2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
 struct platform_device *__init imx_add_mxc_ehci(
                const struct imx_mxc_ehci_data *data,
                const struct mxc_usbh_platform_data *pdata)
index 7af1c53..fa618a3 100644 (file)
@@ -54,11 +54,6 @@ const struct imx_mxc_nand_data imx35_mxc_nand_data __initconst =
        imx_mxc_nand_data_entry_single(MX35, "imx25-nand", SZ_8K);
 #endif
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_mxc_nand_data imx51_mxc_nand_data __initconst =
-       imx_mxc_nandv3_data_entry_single(MX51, "imx51-nand", SZ_16K);
-#endif
-
 struct platform_device *__init imx_add_mxc_nand(
                const struct imx_mxc_nand_data *data,
                const struct mxc_nand_platform_data *pdata)
index c58404b..851fbc8 100644 (file)
@@ -48,9 +48,6 @@ static int __init imxXX_add_mxc_rnga(void)
 #endif /* if defined(CONFIG_SOC_IMX31) */
                ret = ERR_PTR(-ENODEV);
 
-       if (IS_ERR(ret))
-               return PTR_ERR(ret);
-
-       return 0;
+       return PTR_ERR_OR_ZERO(ret);
 }
 arch_initcall(imxXX_add_mxc_rnga);
index e4ec11c..1c7f895 100644 (file)
@@ -28,16 +28,6 @@ const struct imx_pata_imx_data imx35_pata_imx_data __initconst =
        imx_pata_imx_data_entry_single(MX35, SZ_16K);
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_pata_imx_data imx51_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX51, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_pata_imx_data imx53_pata_imx_data __initconst =
-       imx_pata_imx_data_entry_single(MX53, SZ_16K);
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_pata_imx(
                const struct imx_pata_imx_data *data)
 {
index e66a4e3..fb8d4a2 100644 (file)
@@ -43,30 +43,6 @@ imx35_sdhci_esdhc_imx_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-const struct imx_sdhci_esdhc_imx_data
-imx51_sdhci_esdhc_imx_data[] __initconst = {
-#define imx51_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX51, "sdhci-esdhc-imx51", _id, _hwid)
-       imx51_sdhci_esdhc_imx_data_entry(0, 1),
-       imx51_sdhci_esdhc_imx_data_entry(1, 2),
-       imx51_sdhci_esdhc_imx_data_entry(2, 3),
-       imx51_sdhci_esdhc_imx_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-const struct imx_sdhci_esdhc_imx_data
-imx53_sdhci_esdhc_imx_data[] __initconst = {
-#define imx53_sdhci_esdhc_imx_data_entry(_id, _hwid)                   \
-       imx_sdhci_esdhc_imx_data_entry(MX53, "sdhci-esdhc-imx53", _id, _hwid)
-       imx53_sdhci_esdhc_imx_data_entry(0, 1),
-       imx53_sdhci_esdhc_imx_data_entry(1, 2),
-       imx53_sdhci_esdhc_imx_data_entry(2, 3),
-       imx53_sdhci_esdhc_imx_data_entry(3, 4),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 static const struct esdhc_platform_data default_esdhc_pdata __initconst = {
        .wp_type = ESDHC_WP_NONE,
        .cd_type = ESDHC_CD_NONE,
index 8880bcb..aca825d 100644 (file)
@@ -79,33 +79,6 @@ const struct imx_spi_imx_data imx35_cspi_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
-#ifdef CONFIG_SOC_IMX51
-/* i.mx51 has the i.mx35 type cspi */
-const struct imx_spi_imx_data imx51_cspi_data __initconst =
-       imx_spi_imx_data_entry_single(MX51, CSPI, "imx35-cspi", 2, , SZ_4K);
-
-const struct imx_spi_imx_data imx51_ecspi_data[] __initconst = {
-#define imx51_ecspi_data_entry(_id, _hwid)                             \
-       imx_spi_imx_data_entry(MX51, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
-       imx51_ecspi_data_entry(0, 1),
-       imx51_ecspi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX51 */
-
-#ifdef CONFIG_SOC_IMX53
-/* i.mx53 has the i.mx35 type cspi */
-const struct imx_spi_imx_data imx53_cspi_data __initconst =
-       imx_spi_imx_data_entry_single(MX53, CSPI, "imx35-cspi", 2, , SZ_4K);
-
-/* i.mx53 has the i.mx51 type ecspi */
-const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = {
-#define imx53_ecspi_data_entry(_id, _hwid)                             \
-       imx_spi_imx_data_entry(MX53, ECSPI, "imx51-ecspi", _id, _hwid, SZ_4K)
-       imx53_ecspi_data_entry(0, 1),
-       imx53_ecspi_data_entry(1, 2),
-};
-#endif /* ifdef CONFIG_SOC_IMX53 */
-
 struct platform_device *__init imx_add_spi_imx(
                const struct imx_spi_imx_data *data,
                const struct spi_imx_master *pdata)
index 134c190..42a5a3d 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 448d911..c569743 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 05de4e1..bede21d 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
index 554e7cc..f424a54 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/platform_data/usb-ehci-mxc.h>
 
+#include "ehci.h"
 #include "hardware.h"
 
 #define USBCTRL_OTGBASE_OFFSET 0x600
diff --git a/arch/arm/mach-imx/ehci-imx5.c b/arch/arm/mach-imx/ehci-imx5.c
deleted file mode 100644 (file)
index e49710b..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
- * Copyright (C) 2010 Freescale Semiconductor, Inc.
- *
- * 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.
- */
-
-#include <linux/platform_device.h>
-#include <linux/io.h>
-#include <linux/platform_data/usb-ehci-mxc.h>
-
-#include "hardware.h"
-
-#define MXC_OTG_OFFSET                 0
-#define MXC_H1_OFFSET                  0x200
-#define MXC_H2_OFFSET                  0x400
-
-/* USB_CTRL */
-#define MXC_OTG_UCTRL_OWIE_BIT         (1 << 27)       /* OTG wakeup intr enable */
-#define MXC_OTG_UCTRL_OPM_BIT          (1 << 24)       /* OTG power mask */
-#define MXC_H1_UCTRL_H1UIE_BIT         (1 << 12)       /* Host1 ULPI interrupt enable */
-#define MXC_H1_UCTRL_H1WIE_BIT         (1 << 11)       /* HOST1 wakeup intr enable */
-#define MXC_H1_UCTRL_H1PM_BIT          (1 <<  8)       /* HOST1 power mask */
-
-/* USB_PHY_CTRL_FUNC */
-#define MXC_OTG_PHYCTRL_OC_POL_BIT     (1 << 9)        /* OTG Polarity of Overcurrent */
-#define MXC_OTG_PHYCTRL_OC_DIS_BIT     (1 << 8)        /* OTG Disable Overcurrent Event */
-#define MXC_H1_OC_POL_BIT              (1 << 6)        /* UH1 Polarity of Overcurrent */
-#define MXC_H1_OC_DIS_BIT              (1 << 5)        /* UH1 Disable Overcurrent Event */
-#define MXC_OTG_PHYCTRL_PWR_POL_BIT    (1 << 3)        /* OTG Power Pin Polarity */
-
-/* USBH2CTRL */
-#define MXC_H2_UCTRL_H2UIE_BIT         (1 << 8)
-#define MXC_H2_UCTRL_H2WIE_BIT         (1 << 7)
-#define MXC_H2_UCTRL_H2PM_BIT          (1 << 4)
-
-#define MXC_USBCMD_OFFSET              0x140
-
-/* USBCMD */
-#define MXC_UCMD_ITC_NO_THRESHOLD_MASK (~(0xff << 16)) /* Interrupt Threshold Control */
-
-int mx51_initialize_usb_hw(int port, unsigned int flags)
-{
-       unsigned int v;
-       void __iomem *usb_base;
-       void __iomem *usbotg_base;
-       void __iomem *usbother_base;
-       int ret = 0;
-
-       usb_base = ioremap(MX51_USB_OTG_BASE_ADDR, SZ_4K);
-       if (!usb_base) {
-               printk(KERN_ERR "%s(): ioremap failed\n", __func__);
-               return -ENOMEM;
-       }
-
-       switch (port) {
-       case 0: /* OTG port */
-               usbotg_base = usb_base + MXC_OTG_OFFSET;
-               break;
-       case 1: /* Host 1 port */
-               usbotg_base = usb_base + MXC_H1_OFFSET;
-               break;
-       case 2: /* Host 2 port */
-               usbotg_base = usb_base + MXC_H2_OFFSET;
-               break;
-       default:
-               printk(KERN_ERR"%s no such port %d\n", __func__, port);
-               ret = -ENOENT;
-               goto error;
-       }
-       usbother_base = usb_base + MX5_USBOTHER_REGS_OFFSET;
-
-       switch (port) {
-       case 0: /*OTG port */
-               if (flags & MXC_EHCI_INTERNAL_PHY) {
-                       v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
-
-                       if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
-                               v |= MXC_OTG_PHYCTRL_OC_POL_BIT;
-                       else
-                               v &= ~MXC_OTG_PHYCTRL_OC_POL_BIT;
-                       if (flags & MXC_EHCI_POWER_PINS_ENABLED) {
-                               /* OC/USBPWR is used */
-                               v &= ~MXC_OTG_PHYCTRL_OC_DIS_BIT;
-                       } else {
-                               /* OC/USBPWR is not used */
-                               v |= MXC_OTG_PHYCTRL_OC_DIS_BIT;
-                       }
-                       if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
-                               v |= MXC_OTG_PHYCTRL_PWR_POL_BIT;
-                       else
-                               v &= ~MXC_OTG_PHYCTRL_PWR_POL_BIT;
-                       __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
-
-                       v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
-                       if (flags & MXC_EHCI_WAKEUP_ENABLED)
-                               v |= MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup enable */
-                       else
-                               v &= ~MXC_OTG_UCTRL_OWIE_BIT;/* OTG wakeup disable */
-                       if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-                               v &= ~MXC_OTG_UCTRL_OPM_BIT;
-                       else
-                               v |= MXC_OTG_UCTRL_OPM_BIT;
-                       __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
-               }
-               break;
-       case 1: /* Host 1 */
-               /*Host ULPI */
-               v = __raw_readl(usbother_base + MXC_USBCTRL_OFFSET);
-               if (flags & MXC_EHCI_WAKEUP_ENABLED) {
-                       /* HOST1 wakeup/ULPI intr enable */
-                       v |= (MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
-               } else {
-                       /* HOST1 wakeup/ULPI intr disable */
-                       v &= ~(MXC_H1_UCTRL_H1WIE_BIT | MXC_H1_UCTRL_H1UIE_BIT);
-               }
-
-               if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-                       v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused*/
-               else
-                       v |= MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask used*/
-               __raw_writel(v, usbother_base + MXC_USBCTRL_OFFSET);
-
-               v = __raw_readl(usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
-               if (flags & MXC_EHCI_OC_PIN_ACTIVE_LOW)
-                       v |= MXC_H1_OC_POL_BIT;
-               else
-                       v &= ~MXC_H1_OC_POL_BIT;
-               if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-                       v &= ~MXC_H1_OC_DIS_BIT; /* OC is used */
-               else
-                       v |= MXC_H1_OC_DIS_BIT; /* OC is not used */
-               __raw_writel(v, usbother_base + MXC_USB_PHY_CTR_FUNC_OFFSET);
-
-               v = __raw_readl(usbotg_base + MXC_USBCMD_OFFSET);
-               if (flags & MXC_EHCI_ITC_NO_THRESHOLD)
-                       /* Interrupt Threshold Control:Immediate (no threshold) */
-                       v &= MXC_UCMD_ITC_NO_THRESHOLD_MASK;
-               __raw_writel(v, usbotg_base + MXC_USBCMD_OFFSET);
-               break;
-       case 2: /* Host 2 ULPI */
-               v = __raw_readl(usbother_base + MXC_USBH2CTRL_OFFSET);
-               if (flags & MXC_EHCI_WAKEUP_ENABLED) {
-                       /* HOST1 wakeup/ULPI intr enable */
-                       v |= (MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
-               } else {
-                       /* HOST1 wakeup/ULPI intr disable */
-                       v &= ~(MXC_H2_UCTRL_H2WIE_BIT | MXC_H2_UCTRL_H2UIE_BIT);
-               }
-
-               if (flags & MXC_EHCI_POWER_PINS_ENABLED)
-                       v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused*/
-               else
-                       v |= MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask used*/
-               __raw_writel(v, usbother_base + MXC_USBH2CTRL_OFFSET);
-               break;
-       }
-
-error:
-       iounmap(usb_base);
-       return ret;
-}
-
diff --git a/arch/arm/mach-imx/ehci.h b/arch/arm/mach-imx/ehci.h
new file mode 100644 (file)
index 0000000..0e06002
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __MACH_IMX_EHCI_H
+#define __MACH_IMX_EHCI_H
+
+/* values for portsc field */
+#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
+#define MXC_EHCI_FORCE_FS              (1 << 24)
+#define MXC_EHCI_UTMI_8BIT             (0 << 28)
+#define MXC_EHCI_UTMI_16BIT            (1 << 28)
+#define MXC_EHCI_SERIAL                        (1 << 29)
+#define MXC_EHCI_MODE_UTMI             (0 << 30)
+#define MXC_EHCI_MODE_PHILIPS          (1 << 30)
+#define MXC_EHCI_MODE_ULPI             (2 << 30)
+#define MXC_EHCI_MODE_SERIAL           (3 << 30)
+
+/* values for flags field */
+#define MXC_EHCI_INTERFACE_DIFF_UNI    (0 << 0)
+#define MXC_EHCI_INTERFACE_DIFF_BI     (1 << 0)
+#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2 << 0)
+#define MXC_EHCI_INTERFACE_SINGLE_BI   (3 << 0)
+#define MXC_EHCI_INTERFACE_MASK                (0xf)
+
+#define MXC_EHCI_POWER_PINS_ENABLED    (1 << 5)
+#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH   (1 << 6)
+#define MXC_EHCI_OC_PIN_ACTIVE_LOW     (1 << 7)
+#define MXC_EHCI_TTL_ENABLED           (1 << 8)
+
+#define MXC_EHCI_INTERNAL_PHY          (1 << 9)
+#define MXC_EHCI_IPPUE_DOWN            (1 << 10)
+#define MXC_EHCI_IPPUE_UP              (1 << 11)
+#define MXC_EHCI_WAKEUP_ENABLED                (1 << 12)
+#define MXC_EHCI_ITC_NO_THRESHOLD      (1 << 13)
+
+#define MXC_USBCTRL_OFFSET             0
+#define MXC_USB_PHY_CTR_FUNC_OFFSET    0x8
+#define MXC_USB_PHY_CTR_FUNC2_OFFSET   0xc
+#define MXC_USBH2CTRL_OFFSET           0x14
+
+int mx25_initialize_usb_hw(int port, unsigned int flags);
+int mx31_initialize_usb_hw(int port, unsigned int flags);
+int mx35_initialize_usb_hw(int port, unsigned int flags);
+int mx27_initialize_usb_hw(int port, unsigned int flags);
+
+#endif /* __MACH_IMX_EHCI_H */
index 586e017..82ea74e 100644 (file)
@@ -27,13 +27,14 @@ static void __iomem *gpc_base;
 static u32 gpc_wake_irqs[IMR_NUM];
 static u32 gpc_saved_imrs[IMR_NUM];
 
-void imx_gpc_pre_suspend(void)
+void imx_gpc_pre_suspend(bool arm_power_off)
 {
        void __iomem *reg_imr1 = gpc_base + GPC_IMR1;
        int i;
 
        /* Tell GPC to power off ARM core when suspend */
-       writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN);
+       if (arm_power_off)
+               writel_relaxed(0x1, gpc_base + GPC_PGC_CPU_PDN);
 
        for (i = 0; i < IMR_NUM; i++) {
                gpc_saved_imrs[i] = readl_relaxed(reg_imr1 + i * 4);
index abf43bb..66b2b56 100644 (file)
 
 #include "mxc.h"
 
-#include "mx51.h"
-#include "mx53.h"
 #include "mx3x.h"
 #include "mx31.h"
 #include "mx35.h"
index 42a65e0..cf8032b 100644 (file)
@@ -29,16 +29,10 @@ static const char * const imx25_dt_board_compat[] __initconst = {
        NULL
 };
 
-static void __init imx25_timer_init(void)
-{
-       mx25_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
        .map_io         = mx25_map_io,
        .init_early     = imx25_init_early,
        .init_irq       = mx25_init_irq,
-       .init_time      = imx25_timer_init,
        .init_machine   = imx25_dt_init,
        .dt_compat      = imx25_dt_board_compat,
        .restart        = mxc_restart,
index 17bd405..080e66c 100644 (file)
@@ -34,16 +34,10 @@ static const char * const imx27_dt_board_compat[] __initconst = {
        NULL
 };
 
-static void __init imx27_timer_init(void)
-{
-       mx27_clocks_init_dt();
-}
-
 DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
        .map_io         = mx27_map_io,
        .init_early     = imx27_init_early,
        .init_irq       = mx27_init_irq,
-       .init_time      = imx27_timer_init,
        .init_machine   = imx27_dt_init,
        .dt_compat      = imx27_dt_board_compat,
        .restart        = mxc_restart,
index 581f4d6..418dbc8 100644 (file)
@@ -25,7 +25,7 @@ static void __init imx31_dt_init(void)
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-static const char *imx31_dt_board_compat[] __initconst = {
+static const char * const imx31_dt_board_compat[] __initconst = {
        "fsl,imx31",
        NULL
 };
index a62854c..584fbe1 100644 (file)
@@ -34,7 +34,7 @@ static void __init imx35_irq_init(void)
        mx35_init_irq();
 }
 
-static const char *imx35_dt_board_compat[] __initconst = {
+static const char * const imx35_dt_board_compat[] __initconst = {
        "fsl,imx35",
        NULL
 };
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
deleted file mode 100644 (file)
index b8cd968..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- * Copyright 2011 Linaro Ltd.
- *
- * 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 <linux/irq.h>
-#include <linux/of_irq.h>
-#include <linux/of_platform.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#include "common.h"
-#include "mx51.h"
-
-static void __init imx51_dt_init(void)
-{
-       struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
-
-       mxc_arch_reset_init_dt();
-
-       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-       platform_device_register_full(&devinfo);
-}
-
-static const char *imx51_dt_board_compat[] __initconst = {
-       "fsl,imx51",
-       NULL
-};
-
-DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
-       .map_io         = mx51_map_io,
-       .init_early     = imx51_init_early,
-       .init_irq       = mx51_init_irq,
-       .init_machine   = imx51_dt_init,
-       .init_late      = imx51_init_late,
-       .dt_compat      = imx51_dt_board_compat,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/iomux-mx51.h b/arch/arm/mach-imx/iomux-mx51.h
deleted file mode 100644 (file)
index 75bbcc4..0000000
+++ /dev/null
@@ -1,827 +0,0 @@
-/*
- * Copyright (C) 2009-2010 Amit Kucheria <amit.kucheria@canonical.com>
- * Copyright (C) 2010 Freescale Semiconductor, Inc.
- *
- * 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
- */
-
-#ifndef __MACH_IOMUX_MX51_H__
-#define __MACH_IOMUX_MX51_H__
-
-#include "iomux-v3.h"
-#define __NA_  0x000
-
-
-/* Pad control groupings */
-#define MX51_UART_PAD_CTRL     (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_DSE_HIGH | \
-                               PAD_CTL_HYS | PAD_CTL_SRE_FAST)
-#define MX51_I2C_PAD_CTRL      (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \
-                               PAD_CTL_HYS)
-#define MX51_ESDHC_PAD_CTRL    (PAD_CTL_SRE_FAST | PAD_CTL_ODE | \
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \
-                               PAD_CTL_HYS)
-#define MX51_USBH1_PAD_CTRL    (PAD_CTL_PKE | PAD_CTL_SRE_FAST | \
-                               PAD_CTL_DSE_HIGH | PAD_CTL_PUS_100K_UP | \
-                               PAD_CTL_HYS | PAD_CTL_PUE)
-#define MX51_ECSPI_PAD_CTRL    (PAD_CTL_PKE | PAD_CTL_HYS | \
-                               PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST)
-#define MX51_SDHCI_PAD_CTRL    (PAD_CTL_PKE | PAD_CTL_DSE_HIGH | \
-                               PAD_CTL_PUS_47K_UP | PAD_CTL_PUE | \
-                               PAD_CTL_SRE_FAST | PAD_CTL_DVS)
-#define MX51_GPIO_PAD_CTRL     (PAD_CTL_DSE_HIGH | PAD_CTL_PKE | PAD_CTL_SRE_FAST)
-
-#define MX51_PAD_CTRL_2                (PAD_CTL_PKE | PAD_CTL_HYS)
-#define MX51_PAD_CTRL_3                (PAD_CTL_PKE | PAD_CTL_PUS_100K_UP)
-#define MX51_PAD_CTRL_4                (PAD_CTL_PKE | PAD_CTL_DVS | PAD_CTL_HYS)
-#define MX51_PAD_CTRL_5                (PAD_CTL_DVS | PAD_CTL_DSE_HIGH)
-
-/*
- * The naming convention for the pad modes is MX51_PAD_<padname>__<padmode>
- * If <padname> or <padmode> refers to a GPIO, it is named GPIO<unit>_<num>
- * See also iomux-v3.h
- */
-
-/* Raw pin modes without pad control */
-/*                                                       PAD    MUX ALT INPSE PATH PADCTRL */
-
-/* The same pins as above but with the default pad control values applied */
-#define MX51_PAD_EIM_D16__AUD4_RXFS            IOMUX_PAD(0x3f0, 0x05c, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D16__AUD5_TXD             IOMUX_PAD(0x3f0, 0x05c, 7, 0x8d8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D16__EIM_D16              IOMUX_PAD(0x3f0, 0x05c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D16__GPIO2_0              IOMUX_PAD(0x3f0, 0x05c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D16__I2C1_SDA             IOMUX_PAD(0x3f0, 0x05c, 0x14, 0x9b4, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_EIM_D16__UART2_CTS            IOMUX_PAD(0x3f0, 0x05c, 3, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D16__USBH2_DATA0          IOMUX_PAD(0x3f0, 0x05c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D17__AUD5_RXD             IOMUX_PAD(0x3f4, 0x060, 7, 0x8d4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D17__EIM_D17              IOMUX_PAD(0x3f4, 0x060, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D17__GPIO2_1              IOMUX_PAD(0x3f4, 0x060, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D17__UART2_RXD            IOMUX_PAD(0x3f4, 0x060, 3, 0x9ec, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D17__UART3_CTS            IOMUX_PAD(0x3f4, 0x060, 4, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D17__USBH2_DATA1          IOMUX_PAD(0x3f4, 0x060, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D18__AUD5_TXC             IOMUX_PAD(0x3f8, 0x064, 7, 0x8e4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D18__EIM_D18              IOMUX_PAD(0x3f8, 0x064, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D18__GPIO2_2              IOMUX_PAD(0x3f8, 0x064, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D18__UART2_TXD            IOMUX_PAD(0x3f8, 0x064, 3, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D18__UART3_RTS            IOMUX_PAD(0x3f8, 0x064, 4, 0x9f0, 1, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D18__USBH2_DATA2          IOMUX_PAD(0x3f8, 0x064, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D19__AUD4_RXC             IOMUX_PAD(0x3fc, 0x068, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D19__AUD5_TXFS            IOMUX_PAD(0x3fc, 0x068, 7, 0x8e8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D19__EIM_D19              IOMUX_PAD(0x3fc, 0x068, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D19__GPIO2_3              IOMUX_PAD(0x3fc, 0x068, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D19__I2C1_SCL             IOMUX_PAD(0x3fc, 0x068, 0x14, 0x9b0, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_EIM_D19__UART2_RTS            IOMUX_PAD(0x3fc, 0x068, 3, 0x9e8, 1, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D19__USBH2_DATA3          IOMUX_PAD(0x3fc, 0x068, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D20__AUD4_TXD             IOMUX_PAD(0x400, 0x06c, 5, 0x8c8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D20__EIM_D20              IOMUX_PAD(0x400, 0x06c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D20__GPIO2_4              IOMUX_PAD(0x400, 0x06c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB       IOMUX_PAD(0x400, 0x06c, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D20__USBH2_DATA4          IOMUX_PAD(0x400, 0x06c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D21__AUD4_RXD             IOMUX_PAD(0x404, 0x070, 5, 0x8c4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D21__EIM_D21              IOMUX_PAD(0x404, 0x070, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D21__GPIO2_5              IOMUX_PAD(0x404, 0x070, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB       IOMUX_PAD(0x404, 0x070, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D21__USBH2_DATA5          IOMUX_PAD(0x404, 0x070, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D22__AUD4_TXC             IOMUX_PAD(0x408, 0x074, 5, 0x8cc, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D22__EIM_D22              IOMUX_PAD(0x408, 0x074, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D22__GPIO2_6              IOMUX_PAD(0x408, 0x074, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D22__USBH2_DATA6          IOMUX_PAD(0x408, 0x074, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D23__AUD4_TXFS            IOMUX_PAD(0x40c, 0x078, 5, 0x8d0, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D23__EIM_D23              IOMUX_PAD(0x40c, 0x078, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D23__GPIO2_7              IOMUX_PAD(0x40c, 0x078, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D23__SPDIF_OUT1           IOMUX_PAD(0x40c, 0x078, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D23__USBH2_DATA7          IOMUX_PAD(0x40c, 0x078, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D24__AUD6_RXFS            IOMUX_PAD(0x410, 0x07c, 5, 0x8f8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D24__EIM_D24              IOMUX_PAD(0x410, 0x07c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D24__GPIO2_8              IOMUX_PAD(0x410, 0x07c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D24__I2C2_SDA             IOMUX_PAD(0x410, 0x07c, 0x14, 0x9bc, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_EIM_D24__UART3_CTS            IOMUX_PAD(0x410, 0x07c, 3, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D24__USBOTG_DATA0         IOMUX_PAD(0x410, 0x07c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D25__EIM_D25              IOMUX_PAD(0x414, 0x080, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D25__KEY_COL6             IOMUX_PAD(0x414, 0x080, 1, 0x9c8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D25__UART2_CTS            IOMUX_PAD(0x414, 0x080, 4, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D25__UART3_RXD            IOMUX_PAD(0x414, 0x080, 3, 0x9f4, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D25__USBOTG_DATA1         IOMUX_PAD(0x414, 0x080, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D25__GPT_CMPOUT1          IOMUX_PAD(0x414, 0x080, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D26__EIM_D26              IOMUX_PAD(0x418, 0x084, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D26__KEY_COL7             IOMUX_PAD(0x418, 0x084, 1, 0x9cc, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D26__UART2_RTS            IOMUX_PAD(0x418, 0x084, 4, 0x9e8, 3, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D26__UART3_TXD            IOMUX_PAD(0x418, 0x084, 3, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D26__USBOTG_DATA2         IOMUX_PAD(0x418, 0x084, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D26__GPT_CMPOUT2          IOMUX_PAD(0x418, 0x084, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D27__AUD6_RXC             IOMUX_PAD(0x41c, 0x088, 5, 0x8f4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D27__EIM_D27              IOMUX_PAD(0x41c, 0x088, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D27__GPIO2_9              IOMUX_PAD(0x41c, 0x088, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_D27__I2C2_SCL             IOMUX_PAD(0x41c, 0x088, 0x14, 0x9b8, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_EIM_D27__UART3_RTS            IOMUX_PAD(0x41c, 0x088, 3, 0x9f0, 3, MX51_UART_PAD_CTRL)
-#define MX51_PAD_EIM_D27__USBOTG_DATA3         IOMUX_PAD(0x41c, 0x088, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D28__AUD6_TXD             IOMUX_PAD(0x420, 0x08c, 5, 0x8f0, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D28__EIM_D28              IOMUX_PAD(0x420, 0x08c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D28__KEY_ROW4             IOMUX_PAD(0x420, 0x08c, 1, 0x9d0, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D28__USBOTG_DATA4         IOMUX_PAD(0x420, 0x08c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D29__AUD6_RXD             IOMUX_PAD(0x424, 0x090, 5, 0x8ec, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D29__EIM_D29              IOMUX_PAD(0x424, 0x090, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D29__KEY_ROW5             IOMUX_PAD(0x424, 0x090, 1, 0x9d4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D29__USBOTG_DATA5         IOMUX_PAD(0x424, 0x090, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D30__AUD6_TXC             IOMUX_PAD(0x428, 0x094, 5, 0x8fc, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D30__EIM_D30              IOMUX_PAD(0x428, 0x094, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D30__KEY_ROW6             IOMUX_PAD(0x428, 0x094, 1, 0x9d8, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D30__USBOTG_DATA6         IOMUX_PAD(0x428, 0x094, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D31__AUD6_TXFS            IOMUX_PAD(0x42c, 0x098, 5, 0x900, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D31__EIM_D31              IOMUX_PAD(0x42c, 0x098, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D31__KEY_ROW7             IOMUX_PAD(0x42c, 0x098, 1, 0x9dc, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_D31__USBOTG_DATA7         IOMUX_PAD(0x42c, 0x098, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A16__EIM_A16              IOMUX_PAD(0x430, 0x09c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A16__GPIO2_10             IOMUX_PAD(0x430, 0x09c, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A16__OSC_FREQ_SEL0                IOMUX_PAD(0x430, 0x09c, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A17__EIM_A17              IOMUX_PAD(0x434, 0x0a0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A17__GPIO2_11             IOMUX_PAD(0x434, 0x0a0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A17__OSC_FREQ_SEL1                IOMUX_PAD(0x434, 0x0a0, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A18__BOOT_LPB0            IOMUX_PAD(0x438, 0x0a4, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A18__EIM_A18              IOMUX_PAD(0x438, 0x0a4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A18__GPIO2_12             IOMUX_PAD(0x438, 0x0a4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A19__BOOT_LPB1            IOMUX_PAD(0x43c, 0x0a8, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A19__EIM_A19              IOMUX_PAD(0x43c, 0x0a8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A19__GPIO2_13             IOMUX_PAD(0x43c, 0x0a8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A20__BOOT_UART_SRC0       IOMUX_PAD(0x440, 0x0ac, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A20__EIM_A20              IOMUX_PAD(0x440, 0x0ac, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A20__GPIO2_14             IOMUX_PAD(0x440, 0x0ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A21__BOOT_UART_SRC1       IOMUX_PAD(0x444, 0x0b0, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A21__EIM_A21              IOMUX_PAD(0x444, 0x0b0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A21__GPIO2_15             IOMUX_PAD(0x444, 0x0b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A22__EIM_A22              IOMUX_PAD(0x448, 0x0b4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A22__GPIO2_16             IOMUX_PAD(0x448, 0x0b4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A23__BOOT_HPN_EN          IOMUX_PAD(0x44c, 0x0b8, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A23__EIM_A23              IOMUX_PAD(0x44c, 0x0b8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A23__GPIO2_17             IOMUX_PAD(0x44c, 0x0b8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A24__EIM_A24              IOMUX_PAD(0x450, 0x0bc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A24__GPIO2_18             IOMUX_PAD(0x450, 0x0bc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A24__USBH2_CLK            IOMUX_PAD(0x450, 0x0bc, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A25__DISP1_PIN4           IOMUX_PAD(0x454, 0x0c0, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A25__EIM_A25              IOMUX_PAD(0x454, 0x0c0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A25__GPIO2_19             IOMUX_PAD(0x454, 0x0c0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A25__USBH2_DIR            IOMUX_PAD(0x454, 0x0c0, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A26__CSI1_DATA_EN         IOMUX_PAD(0x458, 0x0c4, 5, 0x9a0, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A26__DISP2_EXT_CLK                IOMUX_PAD(0x458, 0x0c4, 6, 0x908, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A26__EIM_A26              IOMUX_PAD(0x458, 0x0c4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A26__GPIO2_20             IOMUX_PAD(0x458, 0x0c4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A26__USBH2_STP            IOMUX_PAD(0x458, 0x0c4, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A27__CSI2_DATA_EN         IOMUX_PAD(0x45c, 0x0c8, 5, 0x99c, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A27__DISP1_PIN1           IOMUX_PAD(0x45c, 0x0c8, 6, 0x9a4, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A27__EIM_A27              IOMUX_PAD(0x45c, 0x0c8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_A27__GPIO2_21             IOMUX_PAD(0x45c, 0x0c8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_A27__USBH2_NXT            IOMUX_PAD(0x45c, 0x0c8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB0__EIM_EB0              IOMUX_PAD(0x460, 0x0cc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB1__EIM_EB1              IOMUX_PAD(0x464, 0x0d0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB2__AUD5_RXFS            IOMUX_PAD(0x468, 0x0d4, 6, 0x8e0, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB2__CSI1_D2              IOMUX_PAD(0x468, 0x0d4, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB2__EIM_EB2              IOMUX_PAD(0x468, 0x0d4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB2__FEC_MDIO             (IOMUX_PAD(0x468, 0x0d4, 3, 0x954, 0, 0) | \
-               MUX_PAD_CTRL(PAD_CTL_PUS_22K_UP | PAD_CTL_PKE | PAD_CTL_SRE_FAST | \
-               PAD_CTL_DSE_HIGH | PAD_CTL_PUE | PAD_CTL_HYS))
-#define MX51_PAD_EIM_EB2__GPIO2_22             IOMUX_PAD(0x468, 0x0d4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_EB2__GPT_CMPOUT1          IOMUX_PAD(0x468, 0x0d4, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__AUD5_RXC             IOMUX_PAD(0x46c, 0x0d8, 6, 0x8dc, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__CSI1_D3              IOMUX_PAD(0x46c, 0x0d8, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__EIM_EB3              IOMUX_PAD(0x46c, 0x0d8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__FEC_RDATA1           IOMUX_PAD(0x46c, 0x0d8, 3, 0x95c, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__GPIO2_23             IOMUX_PAD(0x46c, 0x0d8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_EB3__GPT_CMPOUT2          IOMUX_PAD(0x46c, 0x0d8, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_OE__EIM_OE                        IOMUX_PAD(0x470, 0x0dc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_OE__GPIO2_24              IOMUX_PAD(0x470, 0x0dc, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS0__EIM_CS0              IOMUX_PAD(0x474, 0x0e0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS0__GPIO2_25             IOMUX_PAD(0x474, 0x0e0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS1__EIM_CS1              IOMUX_PAD(0x478, 0x0e4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS1__GPIO2_26             IOMUX_PAD(0x478, 0x0e4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__AUD5_TXD             IOMUX_PAD(0x47c, 0x0e8, 6, 0x8d8, 1, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__CSI1_D4              IOMUX_PAD(0x47c, 0x0e8, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__EIM_CS2              IOMUX_PAD(0x47c, 0x0e8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__FEC_RDATA2           IOMUX_PAD(0x47c, 0x0e8, 3, 0x960, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__GPIO2_27             IOMUX_PAD(0x47c, 0x0e8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS2__USBOTG_STP           IOMUX_PAD(0x47c, 0x0e8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__AUD5_RXD             IOMUX_PAD(0x480, 0x0ec, 6, 0x8d4, 1, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__CSI1_D5              IOMUX_PAD(0x480, 0x0ec, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__EIM_CS3              IOMUX_PAD(0x480, 0x0ec, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__FEC_RDATA3           IOMUX_PAD(0x480, 0x0ec, 3, 0x964, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__GPIO2_28             IOMUX_PAD(0x480, 0x0ec, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS3__USBOTG_NXT           IOMUX_PAD(0x480, 0x0ec, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS4__AUD5_TXC             IOMUX_PAD(0x484, 0x0f0, 6, 0x8e4, 1, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS4__CSI1_D6              IOMUX_PAD(0x484, 0x0f0, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS4__EIM_CS4              IOMUX_PAD(0x484, 0x0f0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS4__FEC_RX_ER            IOMUX_PAD(0x484, 0x0f0, 3, 0x970, 0, MX51_PAD_CTRL_2)
-#define MX51_PAD_EIM_CS4__GPIO2_29             IOMUX_PAD(0x484, 0x0f0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS4__USBOTG_CLK           IOMUX_PAD(0x484, 0x0f0, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__AUD5_TXFS            IOMUX_PAD(0x488, 0x0f4, 6, 0x8e8, 1, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__CSI1_D7              IOMUX_PAD(0x488, 0x0f4, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__DISP1_EXT_CLK                IOMUX_PAD(0x488, 0x0f4, 4, 0x904, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__EIM_CS5              IOMUX_PAD(0x488, 0x0f4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__FEC_CRS              IOMUX_PAD(0x488, 0x0f4, 3, 0x950, 0, MX51_PAD_CTRL_2)
-#define MX51_PAD_EIM_CS5__GPIO2_30             IOMUX_PAD(0x488, 0x0f4, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CS5__USBOTG_DIR           IOMUX_PAD(0x488, 0x0f4, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DTACK__EIM_DTACK          IOMUX_PAD(0x48c, 0x0f8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DTACK__GPIO2_31           IOMUX_PAD(0x48c, 0x0f8, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_LBA__EIM_LBA              IOMUX_PAD(0x494, 0x0fc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_LBA__GPIO3_1              IOMUX_PAD(0x494, 0x0fc, 1, 0x978, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_EIM_CRE__EIM_CRE              IOMUX_PAD(0x4a0, 0x100, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_CRE__GPIO3_2              IOMUX_PAD(0x4a0, 0x100, 1, 0x97c, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DRAM_CS1__DRAM_CS1            IOMUX_PAD(0x4d0, 0x104, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DRAM_CS1__CCM_CLKO            IOMUX_PAD(0x4d0, 0x104, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WE_B__GPIO3_3           IOMUX_PAD(0x4e4, 0x108, 3, 0x980, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_WE_B__NANDF_WE_B                IOMUX_PAD(0x4e4, 0x108, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WE_B__PATA_DIOW         IOMUX_PAD(0x4e4, 0x108, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WE_B__SD3_DATA0         IOMUX_PAD(0x4e4, 0x108, 2, 0x93c, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_RE_B__GPIO3_4           IOMUX_PAD(0x4e8, 0x10c, 3, 0x984, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RE_B__NANDF_RE_B                IOMUX_PAD(0x4e8, 0x10c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RE_B__PATA_DIOR         IOMUX_PAD(0x4e8, 0x10c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RE_B__SD3_DATA1         IOMUX_PAD(0x4e8, 0x10c, 2, 0x940, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_ALE__GPIO3_5            IOMUX_PAD(0x4ec, 0x110, 3, 0x988, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_ALE__NANDF_ALE          IOMUX_PAD(0x4ec, 0x110, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_ALE__PATA_BUFFER_EN     IOMUX_PAD(0x4ec, 0x110, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CLE__GPIO3_6            IOMUX_PAD(0x4f0, 0x114, 3, 0x98c, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CLE__NANDF_CLE          IOMUX_PAD(0x4f0, 0x114, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CLE__PATA_RESET_B       IOMUX_PAD(0x4f0, 0x114, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WP_B__GPIO3_7           IOMUX_PAD(0x4f4, 0x118, 3, 0x990, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_WP_B__NANDF_WP_B                IOMUX_PAD(0x4f4, 0x118, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WP_B__PATA_DMACK                IOMUX_PAD(0x4f4, 0x118, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_WP_B__SD3_DATA2         IOMUX_PAD(0x4f4, 0x118, 2, 0x944, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB0__ECSPI2_SS1         IOMUX_PAD(0x4f8, 0x11c, 5, 0x930, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB0__GPIO3_8            IOMUX_PAD(0x4f8, 0x11c, 3, 0x994, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB0__NANDF_RB0          IOMUX_PAD(0x4f8, 0x11c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB0__PATA_DMARQ         IOMUX_PAD(0x4f8, 0x11c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB0__SD3_DATA3          IOMUX_PAD(0x4f8, 0x11c, 2, 0x948, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__CSPI_MOSI          IOMUX_PAD(0x4fc, 0x120, 6, 0x91c, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__ECSPI2_RDY         IOMUX_PAD(0x4fc, 0x120, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__GPIO3_9            IOMUX_PAD(0x4fc, 0x120, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__NANDF_RB1          IOMUX_PAD(0x4fc, 0x120, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__PATA_IORDY         IOMUX_PAD(0x4fc, 0x120, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__GPT_CMPOUT2                IOMUX_PAD(0x4fc, 0x120, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB1__SD4_CMD            IOMUX_PAD(0x4fc, 0x120, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__DISP2_WAIT         IOMUX_PAD(0x500, 0x124, 5, 0x9a8, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__ECSPI2_SCLK                IOMUX_PAD(0x500, 0x124, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__FEC_COL            IOMUX_PAD(0x500, 0x124, 1, 0x94c, 0, MX51_PAD_CTRL_2)
-#define MX51_PAD_NANDF_RB2__GPIO3_10           IOMUX_PAD(0x500, 0x124, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__NANDF_RB2          IOMUX_PAD(0x500, 0x124, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__GPT_CMPOUT3                IOMUX_PAD(0x500, 0x124, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__USBH3_H3_DP                IOMUX_PAD(0x500, 0x124, 0x17, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB2__USBH3_NXT          IOMUX_PAD(0x500, 0x124, 6, 0xa20, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__DISP1_WAIT         IOMUX_PAD(0x504, 0x128, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__ECSPI2_MISO                IOMUX_PAD(0x504, 0x128, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__FEC_RX_CLK         IOMUX_PAD(0x504, 0x128, 1, 0x968, 0, MX51_PAD_CTRL_2)
-#define MX51_PAD_NANDF_RB3__GPIO3_11           IOMUX_PAD(0x504, 0x128, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__NANDF_RB3          IOMUX_PAD(0x504, 0x128, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__USBH3_CLK          IOMUX_PAD(0x504, 0x128, 6, 0x9f8, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RB3__USBH3_H3_DM                IOMUX_PAD(0x504, 0x128, 0x17, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO_NAND__GPIO_NAND          IOMUX_PAD(0x514, 0x12c, 0, 0x998, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO_NAND__PATA_INTRQ         IOMUX_PAD(0x514, 0x12c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS0__GPIO3_16           IOMUX_PAD(0x518, 0x130, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS0__NANDF_CS0          IOMUX_PAD(0x518, 0x130, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS1__GPIO3_17           IOMUX_PAD(0x51c, 0x134, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS1__NANDF_CS1          IOMUX_PAD(0x51c, 0x134, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS2__CSPI_SCLK          IOMUX_PAD(0x520, 0x138, 6, 0x914, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS2__FEC_TX_ER          IOMUX_PAD(0x520, 0x138, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS2__GPIO3_18           IOMUX_PAD(0x520, 0x138, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS2__NANDF_CS2          IOMUX_PAD(0x520, 0x138, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS2__PATA_CS_0          IOMUX_PAD(0x520, 0x138, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS2__SD4_CLK            IOMUX_PAD(0x520, 0x138, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS)
-#define MX51_PAD_NANDF_CS2__USBH3_H1_DP                IOMUX_PAD(0x520, 0x138, 0x17, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS3__FEC_MDC            IOMUX_PAD(0x524, 0x13c, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS3__GPIO3_19           IOMUX_PAD(0x524, 0x13c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS3__NANDF_CS3          IOMUX_PAD(0x524, 0x13c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS3__PATA_CS_1          IOMUX_PAD(0x524, 0x13c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS3__SD4_DAT0           IOMUX_PAD(0x524, 0x13c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS3__USBH3_H1_DM                IOMUX_PAD(0x524, 0x13c, 0x17, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS4__FEC_TDATA1         IOMUX_PAD(0x528, 0x140, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS4__GPIO3_20           IOMUX_PAD(0x528, 0x140, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS4__NANDF_CS4          IOMUX_PAD(0x528, 0x140, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS4__PATA_DA_0          IOMUX_PAD(0x528, 0x140, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS4__SD4_DAT1           IOMUX_PAD(0x528, 0x140, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS4__USBH3_STP          IOMUX_PAD(0x528, 0x140, 7, 0xa24, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS5__FEC_TDATA2         IOMUX_PAD(0x52c, 0x144, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS5__GPIO3_21           IOMUX_PAD(0x52c, 0x144, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS5__NANDF_CS5          IOMUX_PAD(0x52c, 0x144, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS5__PATA_DA_1          IOMUX_PAD(0x52c, 0x144, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS5__SD4_DAT2           IOMUX_PAD(0x52c, 0x144, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS5__USBH3_DIR          IOMUX_PAD(0x52c, 0x144, 7, 0xa1c, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS6__CSPI_SS3           IOMUX_PAD(0x530, 0x148, 7, 0x928, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS6__FEC_TDATA3         IOMUX_PAD(0x530, 0x148, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS6__GPIO3_22           IOMUX_PAD(0x530, 0x148, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS6__NANDF_CS6          IOMUX_PAD(0x530, 0x148, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS6__PATA_DA_2          IOMUX_PAD(0x530, 0x148, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS6__SD4_DAT3           IOMUX_PAD(0x530, 0x148, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_CS7__FEC_TX_EN          IOMUX_PAD(0x534, 0x14c, 1, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_CS7__GPIO3_23           IOMUX_PAD(0x534, 0x14c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS7__NANDF_CS7          IOMUX_PAD(0x534, 0x14c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_CS7__SD3_CLK            IOMUX_PAD(0x534, 0x14c, 5, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS)
-#define MX51_PAD_NANDF_RDY_INT__ECSPI2_SS0     IOMUX_PAD(0x538, 0x150, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK     IOMUX_PAD(0x538, 0x150, 1, 0x974, 0, MX51_PAD_CTRL_4)
-#define MX51_PAD_NANDF_RDY_INT__GPIO3_24       IOMUX_PAD(0x538, 0x150, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT  IOMUX_PAD(0x538, 0x150, 0, 0x938, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_RDY_INT__SD3_CMD                IOMUX_PAD(0x538, 0x150, 0x15, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_NANDF_D15__ECSPI2_MOSI                IOMUX_PAD(0x53c, 0x154, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_D15__GPIO3_25           IOMUX_PAD(0x53c, 0x154, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D15__NANDF_D15          IOMUX_PAD(0x53c, 0x154, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D15__PATA_DATA15                IOMUX_PAD(0x53c, 0x154, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D15__SD3_DAT7           IOMUX_PAD(0x53c, 0x154, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D14__ECSPI2_SS3         IOMUX_PAD(0x540, 0x158, 2, 0x934, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_D14__GPIO3_26           IOMUX_PAD(0x540, 0x158, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D14__NANDF_D14          IOMUX_PAD(0x540, 0x158, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D14__PATA_DATA14                IOMUX_PAD(0x540, 0x158, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D14__SD3_DAT6           IOMUX_PAD(0x540, 0x158, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D13__ECSPI2_SS2         IOMUX_PAD(0x544, 0x15c, 2, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_D13__GPIO3_27           IOMUX_PAD(0x544, 0x15c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D13__NANDF_D13          IOMUX_PAD(0x544, 0x15c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D13__PATA_DATA13                IOMUX_PAD(0x544, 0x15c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D13__SD3_DAT5           IOMUX_PAD(0x544, 0x15c, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D12__ECSPI2_SS1         IOMUX_PAD(0x548, 0x160, 2, 0x930, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_NANDF_D12__GPIO3_28           IOMUX_PAD(0x548, 0x160, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D12__NANDF_D12          IOMUX_PAD(0x548, 0x160, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D12__PATA_DATA12                IOMUX_PAD(0x548, 0x160, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D12__SD3_DAT4           IOMUX_PAD(0x548, 0x160, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D11__FEC_RX_DV          IOMUX_PAD(0x54c, 0x164, 2, 0x96c, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D11__GPIO3_29           IOMUX_PAD(0x54c, 0x164, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D11__NANDF_D11          IOMUX_PAD(0x54c, 0x164, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D11__PATA_DATA11                IOMUX_PAD(0x54c, 0x164, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D11__SD3_DATA3          IOMUX_PAD(0x54c, 0x164, 5, 0x948, 1, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D10__GPIO3_30           IOMUX_PAD(0x550, 0x168, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D10__NANDF_D10          IOMUX_PAD(0x550, 0x168, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D10__PATA_DATA10                IOMUX_PAD(0x550, 0x168, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D10__SD3_DATA2          IOMUX_PAD(0x550, 0x168, 5, 0x944, 1, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D9__FEC_RDATA0          IOMUX_PAD(0x554, 0x16c, 0x12, 0x958, 0, MX51_PAD_CTRL_4)
-#define MX51_PAD_NANDF_D9__GPIO3_31            IOMUX_PAD(0x554, 0x16c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D9__NANDF_D9            IOMUX_PAD(0x554, 0x16c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D9__PATA_DATA9          IOMUX_PAD(0x554, 0x16c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D9__SD3_DATA1           IOMUX_PAD(0x554, 0x16c, 5, 0x940, 1, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D8__FEC_TDATA0          IOMUX_PAD(0x558, 0x170, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_NANDF_D8__GPIO4_0             IOMUX_PAD(0x558, 0x170, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D8__NANDF_D8            IOMUX_PAD(0x558, 0x170, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D8__PATA_DATA8          IOMUX_PAD(0x558, 0x170, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D8__SD3_DATA0           IOMUX_PAD(0x558, 0x170, 5, 0x93c, 1, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D7__GPIO4_1             IOMUX_PAD(0x55c, 0x174, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D7__NANDF_D7            IOMUX_PAD(0x55c, 0x174, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D7__PATA_DATA7          IOMUX_PAD(0x55c, 0x174, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D7__USBH3_DATA0         IOMUX_PAD(0x55c, 0x174, 5, 0x9fc, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D6__GPIO4_2             IOMUX_PAD(0x560, 0x178, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D6__NANDF_D6            IOMUX_PAD(0x560, 0x178, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D6__PATA_DATA6          IOMUX_PAD(0x560, 0x178, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D6__SD4_LCTL            IOMUX_PAD(0x560, 0x178, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D6__USBH3_DATA1         IOMUX_PAD(0x560, 0x178, 5, 0xa00, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D5__GPIO4_3             IOMUX_PAD(0x564, 0x17c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D5__NANDF_D5            IOMUX_PAD(0x564, 0x17c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D5__PATA_DATA5          IOMUX_PAD(0x564, 0x17c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D5__SD4_WP              IOMUX_PAD(0x564, 0x17c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D5__USBH3_DATA2         IOMUX_PAD(0x564, 0x17c, 5, 0xa04, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D4__GPIO4_4             IOMUX_PAD(0x568, 0x180, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D4__NANDF_D4            IOMUX_PAD(0x568, 0x180, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D4__PATA_DATA4          IOMUX_PAD(0x568, 0x180, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D4__SD4_CD              IOMUX_PAD(0x568, 0x180, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D4__USBH3_DATA3         IOMUX_PAD(0x568, 0x180, 5, 0xa08, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D3__GPIO4_5             IOMUX_PAD(0x56c, 0x184, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D3__NANDF_D3            IOMUX_PAD(0x56c, 0x184, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D3__PATA_DATA3          IOMUX_PAD(0x56c, 0x184, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D3__SD4_DAT4            IOMUX_PAD(0x56c, 0x184, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D3__USBH3_DATA4         IOMUX_PAD(0x56c, 0x184, 5, 0xa0c, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D2__GPIO4_6             IOMUX_PAD(0x570, 0x188, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D2__NANDF_D2            IOMUX_PAD(0x570, 0x188, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D2__PATA_DATA2          IOMUX_PAD(0x570, 0x188, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D2__SD4_DAT5            IOMUX_PAD(0x570, 0x188, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D2__USBH3_DATA5         IOMUX_PAD(0x570, 0x188, 5, 0xa10, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D1__GPIO4_7             IOMUX_PAD(0x574, 0x18c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D1__NANDF_D1            IOMUX_PAD(0x574, 0x18c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D1__PATA_DATA1          IOMUX_PAD(0x574, 0x18c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D1__SD4_DAT6            IOMUX_PAD(0x574, 0x18c, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D1__USBH3_DATA6         IOMUX_PAD(0x574, 0x18c, 5, 0xa14, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D0__GPIO4_8             IOMUX_PAD(0x578, 0x190, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_NANDF_D0__NANDF_D0            IOMUX_PAD(0x578, 0x190, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D0__PATA_DATA0          IOMUX_PAD(0x578, 0x190, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D0__SD4_DAT7            IOMUX_PAD(0x578, 0x190, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_NANDF_D0__USBH3_DATA7         IOMUX_PAD(0x578, 0x190, 5, 0xa18, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D8__CSI1_D8              IOMUX_PAD(0x57c, 0x194, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D8__GPIO3_12             IOMUX_PAD(0x57c, 0x194, 3, 0x998, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI1_D9__CSI1_D9              IOMUX_PAD(0x580, 0x198, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D9__GPIO3_13             IOMUX_PAD(0x580, 0x198, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI1_D10__CSI1_D10            IOMUX_PAD(0x584, 0x19c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D11__CSI1_D11            IOMUX_PAD(0x588, 0x1a0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D12__CSI1_D12            IOMUX_PAD(0x58c, 0x1a4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D13__CSI1_D13            IOMUX_PAD(0x590, 0x1a8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D14__CSI1_D14            IOMUX_PAD(0x594, 0x1ac, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D15__CSI1_D15            IOMUX_PAD(0x598, 0x1b0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D16__CSI1_D16            IOMUX_PAD(0x59c, 0x1b4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D17__CSI1_D17            IOMUX_PAD(0x5a0, 0x1b8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D18__CSI1_D18            IOMUX_PAD(0x5a4, 0x1bc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_D19__CSI1_D19            IOMUX_PAD(0x5a8, 0x1c0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC                IOMUX_PAD(0x5ac, 0x1c4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_VSYNC__GPIO3_14          IOMUX_PAD(0x5ac, 0x1c4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC                IOMUX_PAD(0x5b0, 0x1c8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_HSYNC__GPIO3_15          IOMUX_PAD(0x5b0, 0x1c8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK      IOMUX_PAD(0x5b4, __NA_, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI1_MCLK__CSI1_MCLK          IOMUX_PAD(0x5b8, __NA_, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D12__CSI2_D12            IOMUX_PAD(0x5bc, 0x1cc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D12__GPIO4_9             IOMUX_PAD(0x5bc, 0x1cc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_D13__CSI2_D13            IOMUX_PAD(0x5c0, 0x1d0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D13__GPIO4_10            IOMUX_PAD(0x5c0, 0x1d0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_D14__CSI2_D14            IOMUX_PAD(0x5c4, 0x1d4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D15__CSI2_D15            IOMUX_PAD(0x5c8, 0x1d8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D16__CSI2_D16            IOMUX_PAD(0x5cc, 0x1dc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D17__CSI2_D17            IOMUX_PAD(0x5d0, 0x1e0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D18__CSI2_D18            IOMUX_PAD(0x5d4, 0x1e4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D18__GPIO4_11            IOMUX_PAD(0x5d4, 0x1e4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_D19__CSI2_D19            IOMUX_PAD(0x5d8, 0x1e8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_D19__GPIO4_12            IOMUX_PAD(0x5d8, 0x1e8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_VSYNC__CSI2_VSYNC                IOMUX_PAD(0x5dc, 0x1ec, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_VSYNC__GPIO4_13          IOMUX_PAD(0x5dc, 0x1ec, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_HSYNC__CSI2_HSYNC                IOMUX_PAD(0x5e0, 0x1f0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_HSYNC__GPIO4_14          IOMUX_PAD(0x5e0, 0x1f0, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSI2_PIXCLK__CSI2_PIXCLK      IOMUX_PAD(0x5e4, 0x1f4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_CSI2_PIXCLK__GPIO4_15         IOMUX_PAD(0x5e4, 0x1f4, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_I2C1_CLK__GPIO4_16            IOMUX_PAD(0x5e8, 0x1f8, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_I2C1_CLK__I2C1_CLK            IOMUX_PAD(0x5e8, 0x1f8, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_I2C1_DAT__GPIO4_17            IOMUX_PAD(0x5ec, 0x1fc, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_I2C1_DAT__I2C1_DAT            IOMUX_PAD(0x5ec, 0x1fc, 0x10, __NA_, 0, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_TXD__AUD3_TXD         IOMUX_PAD(0x5f0, 0x200, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_TXD__GPIO4_18         IOMUX_PAD(0x5f0, 0x200, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_RXD__AUD3_RXD         IOMUX_PAD(0x5f4, 0x204, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_RXD__GPIO4_19         IOMUX_PAD(0x5f4, 0x204, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_RXD__UART3_RXD                IOMUX_PAD(0x5f4, 0x204, 1, 0x9f4, 2, MX51_UART_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_CK__AUD3_TXC          IOMUX_PAD(0x5f8, 0x208, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_CK__GPIO4_20          IOMUX_PAD(0x5f8, 0x208, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_FS__AUD3_TXFS         IOMUX_PAD(0x5fc, 0x20c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_FS__GPIO4_21          IOMUX_PAD(0x5fc, 0x20c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_AUD3_BB_FS__UART3_TXD         IOMUX_PAD(0x5fc, 0x20c, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI       IOMUX_PAD(0x600, 0x210, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_MOSI__GPIO4_22          IOMUX_PAD(0x600, 0x210, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_MOSI__I2C1_SDA          IOMUX_PAD(0x600, 0x210, 0x11, 0x9b4, 1, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_CSPI1_MISO__AUD4_RXD          IOMUX_PAD(0x604, 0x214, 1, 0x8c4, 1, NO_PAD_CTRL)
-#define MX51_PAD_CSPI1_MISO__ECSPI1_MISO       IOMUX_PAD(0x604, 0x214, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_MISO__GPIO4_23          IOMUX_PAD(0x604, 0x214, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS0__AUD4_TXC           IOMUX_PAD(0x608, 0x218, 1, 0x8cc, 1, NO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS0__ECSPI1_SS0         IOMUX_PAD(0x608, 0x218, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS0__GPIO4_24           IOMUX_PAD(0x608, 0x218, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS1__AUD4_TXD           IOMUX_PAD(0x60c, 0x21c, 1, 0x8c8, 1, NO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS1__ECSPI1_SS1         IOMUX_PAD(0x60c, 0x21c, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_SS1__GPIO4_25           IOMUX_PAD(0x60c, 0x21c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_RDY__AUD4_TXFS          IOMUX_PAD(0x610, 0x220, 1, 0x8d0, 1, NO_PAD_CTRL)
-#define MX51_PAD_CSPI1_RDY__ECSPI1_RDY         IOMUX_PAD(0x610, 0x220, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_RDY__GPIO4_26           IOMUX_PAD(0x610, 0x220, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK       IOMUX_PAD(0x614, 0x224, 0, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_CSPI1_SCLK__GPIO4_27          IOMUX_PAD(0x614, 0x224, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_CSPI1_SCLK__I2C1_SCL          IOMUX_PAD(0x614, 0x224, 0x11, 0x9b0, 1, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_UART1_RXD__GPIO4_28           IOMUX_PAD(0x618, 0x228, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART1_RXD__UART1_RXD          IOMUX_PAD(0x618, 0x228, 0, 0x9e4, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART1_TXD__GPIO4_29           IOMUX_PAD(0x61c, 0x22c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART1_TXD__PWM2_PWMO          IOMUX_PAD(0x61c, 0x22c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART1_TXD__UART1_TXD          IOMUX_PAD(0x61c, 0x22c, 0, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART1_RTS__GPIO4_30           IOMUX_PAD(0x620, 0x230, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART1_RTS__UART1_RTS          IOMUX_PAD(0x620, 0x230, 0, 0x9e0, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART1_CTS__GPIO4_31           IOMUX_PAD(0x624, 0x234, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART1_CTS__UART1_CTS          IOMUX_PAD(0x624, 0x234, 0, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART2_RXD__FIRI_TXD           IOMUX_PAD(0x628, 0x238, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART2_RXD__GPIO1_20           IOMUX_PAD(0x628, 0x238, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART2_RXD__UART2_RXD          IOMUX_PAD(0x628, 0x238, 0, 0x9ec, 2, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART2_TXD__FIRI_RXD           IOMUX_PAD(0x62c, 0x23c, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART2_TXD__GPIO1_21           IOMUX_PAD(0x62c, 0x23c, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART2_TXD__UART2_TXD          IOMUX_PAD(0x62c, 0x23c, 0, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART3_RXD__CSI1_D0            IOMUX_PAD(0x630, 0x240, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART3_RXD__GPIO1_22           IOMUX_PAD(0x630, 0x240, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART3_RXD__UART1_DTR          IOMUX_PAD(0x630, 0x240, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART3_RXD__UART3_RXD          IOMUX_PAD(0x630, 0x240, 1, 0x9f4, 4, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART3_TXD__CSI1_D1            IOMUX_PAD(0x634, 0x244, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_UART3_TXD__GPIO1_23           IOMUX_PAD(0x634, 0x244, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_UART3_TXD__UART1_DSR          IOMUX_PAD(0x634, 0x244, 0, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_UART3_TXD__UART3_TXD          IOMUX_PAD(0x634, 0x244, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_OWIRE_LINE__GPIO1_24          IOMUX_PAD(0x638, 0x248, 3, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_OWIRE_LINE__OWIRE_LINE                IOMUX_PAD(0x638, 0x248, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_OWIRE_LINE__SPDIF_OUT         IOMUX_PAD(0x638, 0x248, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_ROW0__KEY_ROW0            IOMUX_PAD(0x63c, 0x24c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_ROW1__KEY_ROW1            IOMUX_PAD(0x640, 0x250, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_ROW2__KEY_ROW2            IOMUX_PAD(0x644, 0x254, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_ROW3__KEY_ROW3            IOMUX_PAD(0x648, 0x258, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL0__KEY_COL0            IOMUX_PAD(0x64c, 0x25c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL0__PLL1_BYP            IOMUX_PAD(0x64c, 0x25c, 7, 0x90c, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL1__KEY_COL1            IOMUX_PAD(0x650, 0x260, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL1__PLL2_BYP            IOMUX_PAD(0x650, 0x260, 7, 0x910, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL2__KEY_COL2            IOMUX_PAD(0x654, 0x264, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL2__PLL3_BYP            IOMUX_PAD(0x654, 0x264, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL3__KEY_COL3            IOMUX_PAD(0x658, 0x268, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL4__I2C2_SCL            IOMUX_PAD(0x65c, 0x26c, 0x13, 0x9b8, 1, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_KEY_COL4__KEY_COL4            IOMUX_PAD(0x65c, 0x26c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL4__SPDIF_OUT1          IOMUX_PAD(0x65c, 0x26c, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL4__UART1_RI            IOMUX_PAD(0x65c, 0x26c, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_KEY_COL4__UART3_RTS           IOMUX_PAD(0x65c, 0x26c, 2, 0x9f0, 4, MX51_UART_PAD_CTRL)
-#define MX51_PAD_KEY_COL5__I2C2_SDA            IOMUX_PAD(0x660, 0x270, 0x13, 0x9bc, 1, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_KEY_COL5__KEY_COL5            IOMUX_PAD(0x660, 0x270, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_KEY_COL5__UART1_DCD           IOMUX_PAD(0x660, 0x270, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_KEY_COL5__UART3_CTS           IOMUX_PAD(0x660, 0x270, 2, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_CLK__CSPI_SCLK          IOMUX_PAD(0x678, 0x278, 1, 0x914, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_CLK__GPIO1_25           IOMUX_PAD(0x678, 0x278, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_CLK__I2C2_SCL           IOMUX_PAD(0x678, 0x278, 0x15, 0x9b8, 2, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_USBH1_CLK__USBH1_CLK          IOMUX_PAD(0x678, 0x278, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DIR__CSPI_MOSI          IOMUX_PAD(0x67c, 0x27c, 1, 0x91c, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DIR__GPIO1_26           IOMUX_PAD(0x67c, 0x27c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DIR__I2C2_SDA           IOMUX_PAD(0x67c, 0x27c, 0x15, 0x9bc, 2, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_USBH1_DIR__USBH1_DIR          IOMUX_PAD(0x67c, 0x27c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_STP__CSPI_RDY           IOMUX_PAD(0x680, 0x280, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_STP__GPIO1_27           IOMUX_PAD(0x680, 0x280, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_STP__UART3_RXD          IOMUX_PAD(0x680, 0x280, 5, 0x9f4, 6, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_STP__USBH1_STP          IOMUX_PAD(0x680, 0x280, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_NXT__CSPI_MISO          IOMUX_PAD(0x684, 0x284, 1, 0x918, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_NXT__GPIO1_28           IOMUX_PAD(0x684, 0x284, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_NXT__UART3_TXD          IOMUX_PAD(0x684, 0x284, 5, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_NXT__USBH1_NXT          IOMUX_PAD(0x684, 0x284, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA0__GPIO1_11         IOMUX_PAD(0x688, 0x288, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA0__UART2_CTS                IOMUX_PAD(0x688, 0x288, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA0__USBH1_DATA0      IOMUX_PAD(0x688, 0x288, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA1__GPIO1_12         IOMUX_PAD(0x68c, 0x28c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA1__UART2_RXD                IOMUX_PAD(0x68c, 0x28c, 1, 0x9ec, 4, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA1__USBH1_DATA1      IOMUX_PAD(0x68c, 0x28c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA2__GPIO1_13         IOMUX_PAD(0x690, 0x290, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA2__UART2_TXD                IOMUX_PAD(0x690, 0x290, 1, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA2__USBH1_DATA2      IOMUX_PAD(0x690, 0x290, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA3__GPIO1_14         IOMUX_PAD(0x694, 0x294, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA3__UART2_RTS                IOMUX_PAD(0x694, 0x294, 1, 0x9e8, 5, MX51_UART_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA3__USBH1_DATA3      IOMUX_PAD(0x694, 0x294, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA4__CSPI_SS0         IOMUX_PAD(0x698, 0x298, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA4__GPIO1_15         IOMUX_PAD(0x698, 0x298, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA4__USBH1_DATA4      IOMUX_PAD(0x698, 0x298, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA5__CSPI_SS1         IOMUX_PAD(0x69c, 0x29c, 1, 0x920, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA5__GPIO1_16         IOMUX_PAD(0x69c, 0x29c, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA5__USBH1_DATA5      IOMUX_PAD(0x69c, 0x29c, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA6__CSPI_SS3         IOMUX_PAD(0x6a0, 0x2a0, 1, 0x928, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA6__GPIO1_17         IOMUX_PAD(0x6a0, 0x2a0, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA6__USBH1_DATA6      IOMUX_PAD(0x6a0, 0x2a0, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA7__ECSPI1_SS3       IOMUX_PAD(0x6a4, 0x2a4, 1, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA7__ECSPI2_SS3       IOMUX_PAD(0x6a4, 0x2a4, 5, 0x934, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA7__GPIO1_18         IOMUX_PAD(0x6a4, 0x2a4, 2, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_USBH1_DATA7__USBH1_DATA7      IOMUX_PAD(0x6a4, 0x2a4, 0, __NA_, 0, MX51_USBH1_PAD_CTRL)
-#define MX51_PAD_DI1_PIN11__DI1_PIN11          IOMUX_PAD(0x6a8, 0x2a8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN11__ECSPI1_SS2         IOMUX_PAD(0x6a8, 0x2a8, 7, __NA_, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_DI1_PIN11__GPIO3_0            IOMUX_PAD(0x6a8, 0x2a8, 4, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN12__DI1_PIN12          IOMUX_PAD(0x6ac, 0x2ac, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN12__GPIO3_1            IOMUX_PAD(0x6ac, 0x2ac, 4, 0x978, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN13__DI1_PIN13          IOMUX_PAD(0x6b0, 0x2b0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN13__GPIO3_2            IOMUX_PAD(0x6b0, 0x2b0, 4, 0x97c, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DI1_D0_CS__DI1_D0_CS          IOMUX_PAD(0x6b4, 0x2b4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_D0_CS__GPIO3_3            IOMUX_PAD(0x6b4, 0x2b4, 4, 0x980, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DI1_D1_CS__DI1_D1_CS          IOMUX_PAD(0x6b8, 0x2b8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_D1_CS__DISP1_PIN14                IOMUX_PAD(0x6b8, 0x2b8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_D1_CS__DISP1_PIN5         IOMUX_PAD(0x6b8, 0x2b8, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_D1_CS__GPIO3_4            IOMUX_PAD(0x6b8, 0x2b8, 4, 0x984, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIN__DISP1_PIN1    IOMUX_PAD(0x6bc, 0x2bc, 2, 0x9a4, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIN__DISPB2_SER_DIN        IOMUX_PAD(0x6bc, 0x2bc, 0, 0x9c4, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIN__GPIO3_5       IOMUX_PAD(0x6bc, 0x2bc, 4, 0x988, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIO__DISP1_PIN6    IOMUX_PAD(0x6c0, 0x2c0, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIO__DISPB2_SER_DIO        IOMUX_PAD(0x6c0, 0x2c0, 0, 0x9c4, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_DIO__GPIO3_6       IOMUX_PAD(0x6c0, 0x2c0, 4, 0x98c, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN17   IOMUX_PAD(0x6c4, 0x2c4, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN7    IOMUX_PAD(0x6c4, 0x2c4, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_CLK__DISPB2_SER_CLK        IOMUX_PAD(0x6c4, 0x2c4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_CLK__GPIO3_7       IOMUX_PAD(0x6c4, 0x2c4, 4, 0x990, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__DISP1_EXT_CLK  IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN16    IOMUX_PAD(0x6c8, 0x2c8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN8     IOMUX_PAD(0x6c8, 0x2c8, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS  IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS  IOMUX_PAD(0x6c8, 0x2c8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISPB2_SER_RS__GPIO3_8                IOMUX_PAD(0x6c8, 0x2c8, 4, 0x994, 1, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT0__DISP1_DAT0                IOMUX_PAD(0x6cc, 0x2cc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT1__DISP1_DAT1                IOMUX_PAD(0x6d0, 0x2d0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT2__DISP1_DAT2                IOMUX_PAD(0x6d4, 0x2d4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT3__DISP1_DAT3                IOMUX_PAD(0x6d8, 0x2d8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT4__DISP1_DAT4                IOMUX_PAD(0x6dc, 0x2dc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT5__DISP1_DAT5                IOMUX_PAD(0x6e0, 0x2e0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT6__BOOT_USB_SRC      IOMUX_PAD(0x6e4, 0x2e4, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT6__DISP1_DAT6                IOMUX_PAD(0x6e4, 0x2e4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT7__BOOT_EEPROM_CFG   IOMUX_PAD(0x6e8, 0x2e8, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT7__DISP1_DAT7                IOMUX_PAD(0x6e8, 0x2e8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT8__BOOT_SRC0         IOMUX_PAD(0x6ec, 0x2ec, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT8__DISP1_DAT8                IOMUX_PAD(0x6ec, 0x2ec, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT9__BOOT_SRC1         IOMUX_PAD(0x6f0, 0x2f0, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT9__DISP1_DAT9                IOMUX_PAD(0x6f0, 0x2f0, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT10__BOOT_SPARE_SIZE  IOMUX_PAD(0x6f4, 0x2f4, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT10__DISP1_DAT10      IOMUX_PAD(0x6f4, 0x2f4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT11__BOOT_LPB_FREQ2   IOMUX_PAD(0x6f8, 0x2f8, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT11__DISP1_DAT11      IOMUX_PAD(0x6f8, 0x2f8, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT12__BOOT_MLC_SEL     IOMUX_PAD(0x6fc, 0x2fc, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT12__DISP1_DAT12      IOMUX_PAD(0x6fc, 0x2fc, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT13__BOOT_MEM_CTL0    IOMUX_PAD(0x700, 0x300, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT13__DISP1_DAT13      IOMUX_PAD(0x700, 0x300, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT14__BOOT_MEM_CTL1    IOMUX_PAD(0x704, 0x304, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT14__DISP1_DAT14      IOMUX_PAD(0x704, 0x304, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT15__BOOT_BUS_WIDTH   IOMUX_PAD(0x708, 0x308, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT15__DISP1_DAT15      IOMUX_PAD(0x708, 0x308, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT16__BOOT_PAGE_SIZE0  IOMUX_PAD(0x70c, 0x30c, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT16__DISP1_DAT16      IOMUX_PAD(0x70c, 0x30c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT17__BOOT_PAGE_SIZE1  IOMUX_PAD(0x710, 0x310, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT17__DISP1_DAT17      IOMUX_PAD(0x710, 0x310, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT18__BOOT_WEIM_MUXED0 IOMUX_PAD(0x714, 0x314, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT18__DISP1_DAT18      IOMUX_PAD(0x714, 0x314, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT18__DISP2_PIN11      IOMUX_PAD(0x714, 0x314, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT18__DISP2_PIN5       IOMUX_PAD(0x714, 0x314, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT19__BOOT_WEIM_MUXED1 IOMUX_PAD(0x718, 0x318, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT19__DISP1_DAT19      IOMUX_PAD(0x718, 0x318, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT19__DISP2_PIN12      IOMUX_PAD(0x718, 0x318, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT19__DISP2_PIN6       IOMUX_PAD(0x718, 0x318, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT20__BOOT_MEM_TYPE0   IOMUX_PAD(0x71c, 0x31c, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT20__DISP1_DAT20      IOMUX_PAD(0x71c, 0x31c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT20__DISP2_PIN13      IOMUX_PAD(0x71c, 0x31c, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT20__DISP2_PIN7       IOMUX_PAD(0x71c, 0x31c, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT21__BOOT_MEM_TYPE1   IOMUX_PAD(0x720, 0x320, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT21__DISP1_DAT21      IOMUX_PAD(0x720, 0x320, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT21__DISP2_PIN14      IOMUX_PAD(0x720, 0x320, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT21__DISP2_PIN8       IOMUX_PAD(0x720, 0x320, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT22__BOOT_LPB_FREQ0   IOMUX_PAD(0x724, 0x324, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT22__DISP1_DAT22      IOMUX_PAD(0x724, 0x324, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT22__DISP2_D0_CS      IOMUX_PAD(0x724, 0x324, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT22__DISP2_DAT16      IOMUX_PAD(0x724, 0x324, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT23__BOOT_LPB_FREQ1   IOMUX_PAD(0x728, 0x328, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT23__DISP1_DAT23      IOMUX_PAD(0x728, 0x328, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT23__DISP2_D1_CS      IOMUX_PAD(0x728, 0x328, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT23__DISP2_DAT17      IOMUX_PAD(0x728, 0x328, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP1_DAT23__DISP2_SER_CS     IOMUX_PAD(0x728, 0x328, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN3__DI1_PIN3            IOMUX_PAD(0x72c, 0x32c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_DISP_CLK__DI1_DISP_CLK    IOMUX_PAD(0x730, __NA_, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN2__DI1_PIN2            IOMUX_PAD(0x734, 0x330, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI1_PIN15__DI1_PIN15          IOMUX_PAD(0x738, __NA_, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP2__DISP1_SER_CLK         IOMUX_PAD(0x740, 0x338, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP2__DISP2_WAIT            IOMUX_PAD(0x740, 0x338, 2, 0x9a8, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP3__CSI1_DATA_EN          IOMUX_PAD(0x744, 0x33c, 3, 0x9a0, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP3__DISP1_SER_DIO         IOMUX_PAD(0x744, 0x33c, 0, 0x9c0, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP3__FEC_TX_ER             IOMUX_PAD(0x744, 0x33c, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DI2_PIN4__CSI2_DATA_EN                IOMUX_PAD(0x748, 0x340, 3, 0x99c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI2_PIN4__DI2_PIN4            IOMUX_PAD(0x748, 0x340, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI2_PIN4__FEC_CRS             IOMUX_PAD(0x748, 0x340, 2, 0x950, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI2_PIN2__DI2_PIN2            IOMUX_PAD(0x74c, 0x344, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI2_PIN2__FEC_MDC             IOMUX_PAD(0x74c, 0x344, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DI2_PIN3__DI2_PIN3            IOMUX_PAD(0x750, 0x348, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI2_PIN3__FEC_MDIO            IOMUX_PAD(0x750, 0x348, 2, 0x954, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK    IOMUX_PAD(0x754, 0x34c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI2_DISP_CLK__FEC_RDATA1      IOMUX_PAD(0x754, 0x34c, 2, 0x95c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP4__DI2_PIN15             IOMUX_PAD(0x758, 0x350, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP4__DISP1_SER_DIN         IOMUX_PAD(0x758, 0x350, 0, 0x9c0, 1, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP4__DISP2_PIN1            IOMUX_PAD(0x758, 0x350, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DI_GP4__FEC_RDATA2            IOMUX_PAD(0x758, 0x350, 2, 0x960, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT0__DISP2_DAT0                IOMUX_PAD(0x75c, 0x354, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT0__FEC_RDATA3                IOMUX_PAD(0x75c, 0x354, 2, 0x964, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT0__KEY_COL6          IOMUX_PAD(0x75c, 0x354, 4, 0x9c8, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT0__UART3_RXD         IOMUX_PAD(0x75c, 0x354, 5, 0x9f4, 8, MX51_UART_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT0__USBH3_CLK         IOMUX_PAD(0x75c, 0x354, 3, 0x9f8, 1, MX51_UART_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT1__DISP2_DAT1                IOMUX_PAD(0x760, 0x358, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT1__FEC_RX_ER         IOMUX_PAD(0x760, 0x358, 2, 0x970, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT1__KEY_COL7          IOMUX_PAD(0x760, 0x358, 4, 0x9cc, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT1__UART3_TXD         IOMUX_PAD(0x760, 0x358, 5, __NA_, 0, MX51_UART_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT1__USBH3_DIR         IOMUX_PAD(0x760, 0x358, 3, 0xa1c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT2__DISP2_DAT2                IOMUX_PAD(0x764, 0x35c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT3__DISP2_DAT3                IOMUX_PAD(0x768, 0x360, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT4__DISP2_DAT4                IOMUX_PAD(0x76c, 0x364, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT5__DISP2_DAT5                IOMUX_PAD(0x770, 0x368, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT6__DISP2_DAT6                IOMUX_PAD(0x774, 0x36c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT6__FEC_TDATA1                IOMUX_PAD(0x774, 0x36c, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DISP2_DAT6__GPIO1_19          IOMUX_PAD(0x774, 0x36c, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT6__KEY_ROW4          IOMUX_PAD(0x774, 0x36c, 4, 0x9d0, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT6__USBH3_STP         IOMUX_PAD(0x774, 0x36c, 3, 0xa24, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT7__DISP2_DAT7                IOMUX_PAD(0x778, 0x370, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT7__FEC_TDATA2                IOMUX_PAD(0x778, 0x370, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DISP2_DAT7__GPIO1_29          IOMUX_PAD(0x778, 0x370, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT7__KEY_ROW5          IOMUX_PAD(0x778, 0x370, 4, 0x9d4, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT7__USBH3_NXT         IOMUX_PAD(0x778, 0x370, 3, 0xa20, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT8__DISP2_DAT8                IOMUX_PAD(0x77c, 0x374, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT8__FEC_TDATA3                IOMUX_PAD(0x77c, 0x374, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DISP2_DAT8__GPIO1_30          IOMUX_PAD(0x77c, 0x374, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT8__KEY_ROW6          IOMUX_PAD(0x77c, 0x374, 4, 0x9d8, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT8__USBH3_DATA0       IOMUX_PAD(0x77c, 0x374, 3, 0x9fc, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT9__AUD6_RXC          IOMUX_PAD(0x780, 0x378, 4, 0x8f4, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT9__DISP2_DAT9                IOMUX_PAD(0x780, 0x378, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT9__FEC_TX_EN         IOMUX_PAD(0x780, 0x378, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DISP2_DAT9__GPIO1_31          IOMUX_PAD(0x780, 0x378, 5, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT9__USBH3_DATA1       IOMUX_PAD(0x780, 0x378, 3, 0xa00, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT10__DISP2_DAT10      IOMUX_PAD(0x784, 0x37c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT10__DISP2_SER_CS     IOMUX_PAD(0x784, 0x37c, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT10__FEC_COL          IOMUX_PAD(0x784, 0x37c, 2, 0x94c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT10__KEY_ROW7         IOMUX_PAD(0x784, 0x37c, 4, 0x9dc, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT10__USBH3_DATA2      IOMUX_PAD(0x784, 0x37c, 3, 0xa04, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT11__AUD6_TXD         IOMUX_PAD(0x788, 0x380, 4, 0x8f0, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT11__DISP2_DAT11      IOMUX_PAD(0x788, 0x380, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT11__FEC_RX_CLK       IOMUX_PAD(0x788, 0x380, 2, 0x968, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT11__GPIO1_10         IOMUX_PAD(0x788, 0x380, 7, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT11__USBH3_DATA3      IOMUX_PAD(0x788, 0x380, 3, 0xa08, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT12__AUD6_RXD         IOMUX_PAD(0x78c, 0x384, 4, 0x8ec, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT12__DISP2_DAT12      IOMUX_PAD(0x78c, 0x384, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT12__FEC_RX_DV                IOMUX_PAD(0x78c, 0x384, 2, 0x96c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT12__USBH3_DATA4      IOMUX_PAD(0x78c, 0x384, 3, 0xa0c, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT13__AUD6_TXC         IOMUX_PAD(0x790, 0x388, 4, 0x8fc, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT13__DISP2_DAT13      IOMUX_PAD(0x790, 0x388, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT13__FEC_TX_CLK       IOMUX_PAD(0x790, 0x388, 2, 0x974, 1, MX51_PAD_CTRL_4)
-#define MX51_PAD_DISP2_DAT13__USBH3_DATA5      IOMUX_PAD(0x790, 0x388, 3, 0xa10, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT14__AUD6_TXFS                IOMUX_PAD(0x794, 0x38c, 4, 0x900, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT14__DISP2_DAT14      IOMUX_PAD(0x794, 0x38c, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT14__FEC_RDATA0       IOMUX_PAD(0x794, 0x38c, 2, 0x958, 1, MX51_PAD_CTRL_4)
-#define MX51_PAD_DISP2_DAT14__USBH3_DATA6      IOMUX_PAD(0x794, 0x38c, 3, 0xa14, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT15__AUD6_RXFS                IOMUX_PAD(0x798, 0x390, 4, 0x8f8, 1, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT15__DISP1_SER_CS     IOMUX_PAD(0x798, 0x390, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT15__DISP2_DAT15      IOMUX_PAD(0x798, 0x390, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_DISP2_DAT15__FEC_TDATA0       IOMUX_PAD(0x798, 0x390, 2, __NA_, 0, MX51_PAD_CTRL_5)
-#define MX51_PAD_DISP2_DAT15__USBH3_DATA7      IOMUX_PAD(0x798, 0x390, 3, 0xa18, 1, NO_PAD_CTRL)
-#define MX51_PAD_SD1_CMD__AUD5_RXFS            IOMUX_PAD(0x79c, 0x394, 1, 0x8e0, 1, NO_PAD_CTRL)
-#define MX51_PAD_SD1_CMD__CSPI_MOSI            IOMUX_PAD(0x79c, 0x394, 2, 0x91c, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_CMD__SD1_CMD              IOMUX_PAD(0x79c, 0x394, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_SD1_CLK__AUD5_RXC             IOMUX_PAD(0x7a0, 0x398, 1, 0x8dc, 1, NO_PAD_CTRL)
-#define MX51_PAD_SD1_CLK__CSPI_SCLK            IOMUX_PAD(0x7a0, 0x398, 2, 0x914, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_CLK__SD1_CLK              IOMUX_PAD(0x7a0, 0x398, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS)
-#define MX51_PAD_SD1_DATA0__AUD5_TXD           IOMUX_PAD(0x7a4, 0x39c, 1, 0x8d8, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA0__CSPI_MISO          IOMUX_PAD(0x7a4, 0x39c, 2, 0x918, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD1_DATA0__SD1_DATA0          IOMUX_PAD(0x7a4, 0x39c, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_EIM_DA0__EIM_DA0              IOMUX_PAD(__NA_, 0x01c, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA1__EIM_DA1              IOMUX_PAD(__NA_, 0x020, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA2__EIM_DA2              IOMUX_PAD(__NA_, 0x024, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA3__EIM_DA3              IOMUX_PAD(__NA_, 0x028, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA1__AUD5_RXD           IOMUX_PAD(0x7a8, 0x3a0, 1, 0x8d4, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA1__SD1_DATA1          IOMUX_PAD(0x7a8, 0x3a0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_EIM_DA4__EIM_DA4              IOMUX_PAD(__NA_, 0x02c, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA5__EIM_DA5              IOMUX_PAD(__NA_, 0x030, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA6__EIM_DA6              IOMUX_PAD(__NA_, 0x034, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA7__EIM_DA7              IOMUX_PAD(__NA_, 0x038, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA2__AUD5_TXC           IOMUX_PAD(0x7ac, 0x3a4, 1, 0x8e4, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA2__SD1_DATA2          IOMUX_PAD(0x7ac, 0x3a4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_EIM_DA10__EIM_DA10            IOMUX_PAD(__NA_, 0x044, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA11__EIM_DA11            IOMUX_PAD(__NA_, 0x048, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA8__EIM_DA8              IOMUX_PAD(__NA_, 0x03c, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA9__EIM_DA9              IOMUX_PAD(__NA_, 0x040, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA3__AUD5_TXFS          IOMUX_PAD(0x7b0, 0x3a8, 1, 0x8e8, 2, NO_PAD_CTRL)
-#define MX51_PAD_SD1_DATA3__CSPI_SS1           IOMUX_PAD(0x7b0, 0x3a8, 2, 0x920, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD1_DATA3__SD1_DATA3          IOMUX_PAD(0x7b0, 0x3a8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_GPIO1_0__CSPI_SS2             IOMUX_PAD(0x7b4, 0x3ac, 2, 0x924, 0, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_GPIO1_0__GPIO1_0              IOMUX_PAD(0x7b4, 0x3ac, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_0__SD1_CD               IOMUX_PAD(0x7b4, 0x3ac, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL)
-#define MX51_PAD_GPIO1_1__CSPI_MISO            IOMUX_PAD(0x7b8, 0x3b0, 2, 0x918, 2, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_GPIO1_1__GPIO1_1              IOMUX_PAD(0x7b8, 0x3b0, 1, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_1__SD1_WP               IOMUX_PAD(0x7b8, 0x3b0, 0, __NA_, 0, MX51_ESDHC_PAD_CTRL)
-#define MX51_PAD_EIM_DA12__EIM_DA12            IOMUX_PAD(__NA_, 0x04c, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA13__EIM_DA13            IOMUX_PAD(__NA_, 0x050, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA14__EIM_DA14            IOMUX_PAD(__NA_, 0x054, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_EIM_DA15__EIM_DA15            IOMUX_PAD(__NA_, 0x058, 0, 0x000, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_CMD__CSPI_MOSI            IOMUX_PAD(0x7bc, 0x3b4, 2, 0x91c, 3, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD2_CMD__I2C1_SCL             IOMUX_PAD(0x7bc, 0x3b4, 0x11, 0x9b0, 2, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_SD2_CMD__SD2_CMD              IOMUX_PAD(0x7bc, 0x3b4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_SD2_CLK__CSPI_SCLK            IOMUX_PAD(0x7c0, 0x3b8, 2, 0x914, 3, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD2_CLK__I2C1_SDA             IOMUX_PAD(0x7c0, 0x3b8, 0x11, 0x9b4, 2, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_SD2_CLK__SD2_CLK              IOMUX_PAD(0x7c0, 0x3b8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL | PAD_CTL_HYS)
-#define MX51_PAD_SD2_DATA0__CSPI_MISO          IOMUX_PAD(0x7c4, 0x3bc, 2, 0x918, 3, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD2_DATA0__SD1_DAT4           IOMUX_PAD(0x7c4, 0x3bc, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA0__SD2_DATA0          IOMUX_PAD(0x7c4, 0x3bc, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_SD2_DATA1__SD1_DAT5           IOMUX_PAD(0x7c8, 0x3c0, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA1__SD2_DATA1          IOMUX_PAD(0x7c8, 0x3c0, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_SD2_DATA1__USBH3_H2_DP                IOMUX_PAD(0x7c8, 0x3c0, 0x12, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA2__SD1_DAT6           IOMUX_PAD(0x7cc, 0x3c4, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA2__SD2_DATA2          IOMUX_PAD(0x7cc, 0x3c4, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_SD2_DATA2__USBH3_H2_DM                IOMUX_PAD(0x7cc, 0x3c4, 0x12, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA3__CSPI_SS2           IOMUX_PAD(0x7d0, 0x3c8, 2, 0x924, 1, MX51_ECSPI_PAD_CTRL)
-#define MX51_PAD_SD2_DATA3__SD1_DAT7           IOMUX_PAD(0x7d0, 0x3c8, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_SD2_DATA3__SD2_DATA3          IOMUX_PAD(0x7d0, 0x3c8, 0x10, __NA_, 0, MX51_SDHCI_PAD_CTRL)
-#define MX51_PAD_GPIO1_2__CCM_OUT_2            IOMUX_PAD(0x7d4, 0x3cc, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_2__GPIO1_2              IOMUX_PAD(0x7d4, 0x3cc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_2__I2C2_SCL             IOMUX_PAD(0x7d4, 0x3cc, 0x12, 0x9b8, 3, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_GPIO1_2__PLL1_BYP             IOMUX_PAD(0x7d4, 0x3cc, 7, 0x90c, 1, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_2__PWM1_PWMO            IOMUX_PAD(0x7d4, 0x3cc, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__GPIO1_3              IOMUX_PAD(0x7d8, 0x3d0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__I2C2_SDA             IOMUX_PAD(0x7d8, 0x3d0, 0x12, 0x9bc, 3, MX51_I2C_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__CCM_CLKO2            IOMUX_PAD(0x7d8, 0x3d0, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__GPT_CLKIN            IOMUX_PAD(0x7d8, 0x3d0, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__PLL2_BYP             IOMUX_PAD(0x7d8, 0x3d0, 7, 0x910, 1, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_3__PWM2_PWMO            IOMUX_PAD(0x7d8, 0x3d0, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ    IOMUX_PAD(0x7fc, 0x3d4, 0, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B  IOMUX_PAD(0x7fc, 0x3d4, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_4__DISP2_EXT_CLK                IOMUX_PAD(0x804, 0x3d8, 4, 0x908, 1, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_4__EIM_RDY              IOMUX_PAD(0x804, 0x3d8, 3, 0x938, 1, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_4__GPIO1_4              IOMUX_PAD(0x804, 0x3d8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_4__WDOG1_WDOG_B         IOMUX_PAD(0x804, 0x3d8, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_4__GPT_CAPIN1           IOMUX_PAD(0x804, 0x3d8, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_5__CSI2_MCLK            IOMUX_PAD(0x808, 0x3dc, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_5__DISP2_PIN16          IOMUX_PAD(0x808, 0x3dc, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_5__GPIO1_5              IOMUX_PAD(0x808, 0x3dc, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_5__WDOG2_WDOG_B         IOMUX_PAD(0x808, 0x3dc, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_5__CCM_CLKO             IOMUX_PAD(0x808, 0x3dc, 5, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_6__DISP2_PIN17          IOMUX_PAD(0x80c, 0x3e0, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_6__GPIO1_6              IOMUX_PAD(0x80c, 0x3e0, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_6__REF_EN_B             IOMUX_PAD(0x80c, 0x3e0, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_6__GPT_CAPIN2           IOMUX_PAD(0x80c, 0x3e0, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_7__CCM_OUT_0            IOMUX_PAD(0x810, 0x3e4, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_7__GPIO1_7              IOMUX_PAD(0x810, 0x3e4, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_7__SD2_WP               IOMUX_PAD(0x810, 0x3e4, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL)
-#define MX51_PAD_GPIO1_7__SPDIF_OUT1           IOMUX_PAD(0x810, 0x3e4, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_8__CSI2_DATA_EN         IOMUX_PAD(0x814, 0x3e8, 2, 0x99c, 2, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_8__GPIO1_8              IOMUX_PAD(0x814, 0x3e8, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_8__SD2_CD               IOMUX_PAD(0x814, 0x3e8, 6, __NA_, 0, MX51_ESDHC_PAD_CTRL)
-#define MX51_PAD_GPIO1_8__USBH3_PWR            IOMUX_PAD(0x814, 0x3e8, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_8__CCM_CLKO2            IOMUX_PAD(0x814, 0x3e8, 4, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__CCM_OUT_1            IOMUX_PAD(0x818, 0x3ec, 3, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__DISP2_D1_CS          IOMUX_PAD(0x818, 0x3ec, 2, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__DISP2_SER_CS         IOMUX_PAD(0x818, 0x3ec, 7, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__GPIO1_9              IOMUX_PAD(0x818, 0x3ec, 0, __NA_, 0, MX51_GPIO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__SD2_LCTL             IOMUX_PAD(0x818, 0x3ec, 6, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__USBH3_OC             IOMUX_PAD(0x818, 0x3ec, 1, __NA_, 0, NO_PAD_CTRL)
-#define MX51_PAD_GPIO1_9__CCM_CLKO             IOMUX_PAD(0x818, 0x3ec, 4, __NA_, 0, NO_PAD_CTRL)
-
-#endif /* __MACH_IOMUX_MX51_H__ */
index 39406b7..a7e9bd2 100644 (file)
@@ -50,6 +50,7 @@
 #include "common.h"
 #include "devices-imx31.h"
 #include "crmregs-imx3.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 75b7b6a..e6d4b99 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
index 1ffa271..62a6e02 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
index e978dda..b2ee6e0 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "common.h"
 #include "devices-imx25.h"
+#include "ehci.h"
 #include "eukrea-baseboards.h"
 #include "hardware.h"
 #include "iomux-mx25.h"
index b61bd8e..ede2bdb 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
deleted file mode 100644 (file)
index bb3ca04..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * Author: Fabio Estevam <fabio.estevam@freescale.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.
- */
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-
-#include "hardware.h"
-#include "common.h"
-#include "devices-imx27.h"
-#include "iomux-mx27.h"
-
-static const int mx27ipcam_pins[] __initconst = {
-       /* UART1 */
-       PE12_PF_UART1_TXD,
-       PE13_PF_UART1_RXD,
-       /* FEC */
-       PD0_AIN_FEC_TXD0,
-       PD1_AIN_FEC_TXD1,
-       PD2_AIN_FEC_TXD2,
-       PD3_AIN_FEC_TXD3,
-       PD4_AOUT_FEC_RX_ER,
-       PD5_AOUT_FEC_RXD1,
-       PD6_AOUT_FEC_RXD2,
-       PD7_AOUT_FEC_RXD3,
-       PD8_AF_FEC_MDIO,
-       PD9_AIN_FEC_MDC,
-       PD10_AOUT_FEC_CRS,
-       PD11_AOUT_FEC_TX_CLK,
-       PD12_AOUT_FEC_RXD0,
-       PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_RX_CLK,
-       PD15_AOUT_FEC_COL,
-       PD16_AIN_FEC_TX_ER,
-       PF23_AIN_FEC_TX_EN,
-};
-
-static void __init mx27ipcam_init(void)
-{
-       imx27_soc_init();
-
-       mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins),
-               "mx27ipcam");
-
-       imx27_add_imx_uart0(NULL);
-       imx27_add_fec(NULL);
-       imx27_add_imx2_wdt();
-}
-
-static void __init mx27ipcam_timer_init(void)
-{
-       mx27_clocks_init(25000000);
-}
-
-MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
-       /* maintainer: Freescale Semiconductor, Inc. */
-       .atag_offset = 0x100,
-       .map_io = mx27_map_io,
-       .init_early = imx27_init_early,
-       .init_irq = mx27_init_irq,
-       .init_time      = mx27ipcam_timer_init,
-       .init_machine = mx27ipcam_init,
-       .restart        = mxc_restart,
-MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
deleted file mode 100644 (file)
index 9992089..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2007 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
- * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
- * Copyright 2009 Daniel Schaeffer (daniel.schaeffer@timesys.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.
- */
-
-#include <linux/platform_device.h>
-#include <linux/gpio.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/time.h>
-#include <asm/mach/map.h>
-
-#include "common.h"
-#include "devices-imx27.h"
-#include "hardware.h"
-#include "iomux-mx27.h"
-
-static const int mx27lite_pins[] __initconst = {
-       /* UART1 */
-       PE12_PF_UART1_TXD,
-       PE13_PF_UART1_RXD,
-       PE14_PF_UART1_CTS,
-       PE15_PF_UART1_RTS,
-       /* FEC */
-       PD0_AIN_FEC_TXD0,
-       PD1_AIN_FEC_TXD1,
-       PD2_AIN_FEC_TXD2,
-       PD3_AIN_FEC_TXD3,
-       PD4_AOUT_FEC_RX_ER,
-       PD5_AOUT_FEC_RXD1,
-       PD6_AOUT_FEC_RXD2,
-       PD7_AOUT_FEC_RXD3,
-       PD8_AF_FEC_MDIO,
-       PD9_AIN_FEC_MDC,
-       PD10_AOUT_FEC_CRS,
-       PD11_AOUT_FEC_TX_CLK,
-       PD12_AOUT_FEC_RXD0,
-       PD13_AOUT_FEC_RX_DV,
-       PD14_AOUT_FEC_RX_CLK,
-       PD15_AOUT_FEC_COL,
-       PD16_AIN_FEC_TX_ER,
-       PF23_AIN_FEC_TX_EN,
-};
-
-static const struct imxuart_platform_data uart_pdata __initconst = {
-       .flags = IMXUART_HAVE_RTSCTS,
-};
-
-static void __init mx27lite_init(void)
-{
-       imx27_soc_init();
-
-       mxc_gpio_setup_multiple_pins(mx27lite_pins, ARRAY_SIZE(mx27lite_pins),
-               "imx27lite");
-       imx27_add_imx_uart0(&uart_pdata);
-       imx27_add_fec(NULL);
-}
-
-static void __init mx27lite_timer_init(void)
-{
-       mx27_clocks_init(26000000);
-}
-
-MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
-       .atag_offset = 0x100,
-       .map_io = mx27_map_io,
-       .init_early = imx27_init_early,
-       .init_irq = mx27_init_irq,
-       .init_time      = mx27lite_timer_init,
-       .init_machine = mx27lite_init,
-       .restart        = mxc_restart,
-MACHINE_END
index b899c0b..b1e56a9 100644 (file)
@@ -23,14 +23,13 @@ static void __init imx50_dt_init(void)
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-static const char *imx50_dt_board_compat[] __initconst = {
+static const char * const imx50_dt_board_compat[] __initconst = {
        "fsl,imx50",
        NULL
 };
 
 DT_MACHINE_START(IMX50_DT, "Freescale i.MX50 (Device Tree Support)")
-       .map_io         = mx53_map_io,
-       .init_irq       = mx53_init_irq,
+       .init_irq       = tzic_init_irq,
        .init_machine   = imx50_dt_init,
        .dt_compat      = imx50_dt_board_compat,
        .restart        = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c
new file mode 100644 (file)
index 0000000..c77deb3
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * 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 <linux/io.h>
+#include <linux/irq.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include "common.h"
+#include "hardware.h"
+
+static void __init imx51_init_early(void)
+{
+       mxc_set_cpu_type(MXC_CPU_MX51);
+}
+
+/*
+ * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
+ * the Freescale marketing division. However this did not remove the
+ * hardware from the chip which still needs to be configured for proper
+ * IPU support.
+ */
+#define MX51_MIPI_HSC_BASE 0x83fdc000
+static void __init imx51_ipu_mipi_setup(void)
+{
+       void __iomem *hsc_addr;
+
+       hsc_addr = ioremap(MX51_MIPI_HSC_BASE, SZ_16K);
+       WARN_ON(!hsc_addr);
+
+       /* setup MIPI module to legacy mode */
+       __raw_writel(0xf00, hsc_addr);
+
+       /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */
+       __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff,
+               hsc_addr + 0x800);
+
+       iounmap(hsc_addr);
+}
+
+static void __init imx51_dt_init(void)
+{
+       struct platform_device_info devinfo = { .name = "cpufreq-cpu0", };
+
+       mxc_arch_reset_init_dt();
+       imx51_ipu_mipi_setup();
+       imx_src_init();
+
+       of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+       platform_device_register_full(&devinfo);
+}
+
+static void __init imx51_init_late(void)
+{
+       mx51_neon_fixup();
+       imx51_pm_init();
+}
+
+static const char * const imx51_dt_board_compat[] __initconst = {
+       "fsl,imx51",
+       NULL
+};
+
+DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
+       .init_early     = imx51_init_early,
+       .init_irq       = tzic_init_irq,
+       .init_machine   = imx51_dt_init,
+       .init_late      = imx51_init_late,
+       .dt_compat      = imx51_dt_board_compat,
+       .restart        = mxc_restart,
+MACHINE_END
index 2bad387..03dd6ea 100644 (file)
 
 #include "common.h"
 #include "hardware.h"
-#include "mx53.h"
+
+static void __init imx53_init_early(void)
+{
+       mxc_set_cpu_type(MXC_CPU_MX53);
+}
 
 static void __init imx53_dt_init(void)
 {
        mxc_arch_reset_init_dt();
+       imx_src_init();
 
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+       imx_aips_allow_unprivileged_access("fsl,imx53-aipstz");
+}
+
+static void __init imx53_init_late(void)
+{
+       imx53_pm_init();
 }
 
-static const char *imx53_dt_board_compat[] __initconst = {
+static const char * const imx53_dt_board_compat[] __initconst = {
        "fsl,imx53",
        NULL
 };
 
 DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
-       .map_io         = mx53_map_io,
        .init_early     = imx53_init_early,
-       .init_irq       = mx53_init_irq,
+       .init_irq       = tzic_init_irq,
        .init_machine   = imx53_dt_init,
        .init_late      = imx53_init_late,
        .dt_compat      = imx53_dt_board_compat,
index e60456d..d51c6e9 100644 (file)
@@ -320,7 +320,7 @@ static void __init imx6q_opp_check_speed_grading(struct device *cpu_dev)
        val >>= OCOTP_CFG3_SPEED_SHIFT;
        val &= 0x3;
 
-       if (val != OCOTP_CFG3_SPEED_1P2GHZ)
+       if ((val != OCOTP_CFG3_SPEED_1P2GHZ) && cpu_is_imx6q())
                if (dev_pm_opp_disable(cpu_dev, 1200000000))
                        pr_warn("failed to disable 1.2 GHz OPP\n");
        if (val < OCOTP_CFG3_SPEED_996MHZ)
@@ -396,7 +396,7 @@ static void __init imx6q_init_irq(void)
        irqchip_init();
 }
 
-static const char *imx6q_dt_compat[] __initconst = {
+static const char * const imx6q_dt_compat[] __initconst = {
        "fsl,imx6dl",
        "fsl,imx6q",
        NULL,
index ad32338..ed263a2 100644 (file)
@@ -70,7 +70,7 @@ static void __init imx6sl_init_irq(void)
        irqchip_init();
 }
 
-static const char *imx6sl_dt_compat[] __initconst = {
+static const char * const imx6sl_dt_compat[] __initconst = {
        "fsl,imx6sl",
        NULL,
 };
index 02fccf6..673a734 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
+#include "cpuidle.h"
 
 static void __init imx6sx_init_machine(void)
 {
@@ -26,6 +27,7 @@ static void __init imx6sx_init_machine(void)
        of_platform_populate(NULL, of_default_bus_match_table, NULL, parent);
 
        imx_anatop_init();
+       imx6sx_pm_init();
 }
 
 static void __init imx6sx_init_irq(void)
@@ -37,7 +39,12 @@ static void __init imx6sx_init_irq(void)
        irqchip_init();
 }
 
-static const char *imx6sx_dt_compat[] __initconst = {
+static void __init imx6sx_init_late(void)
+{
+       imx6q_cpuidle_init();
+}
+
+static const char * const imx6sx_dt_compat[] __initconst = {
        "fsl,imx6sx",
        NULL,
 };
@@ -47,5 +54,6 @@ DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)")
        .init_irq       = imx6sx_init_irq,
        .init_machine   = imx6sx_init_machine,
        .dt_compat      = imx6sx_dt_compat,
+       .init_late      = imx6sx_init_late,
        .restart        = mxc_restart,
 MACHINE_END
index ea1fa19..0d01e36 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "common.h"
 #include "devices-imx25.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx25.h"
 #include "mx25.h"
index 435a542..9ef4640 100644 (file)
@@ -40,6 +40,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index 4217871..453f41a 100644 (file)
@@ -40,6 +40,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index eee042f..e9549a3 100644 (file)
@@ -45,6 +45,7 @@
 #include "board-mx31lilly.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index fa15d0b..57eac6f 100644 (file)
@@ -42,6 +42,7 @@
 #include "board-mx31lite.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
index 08730f2..bb6f8a5 100644 (file)
@@ -47,6 +47,7 @@
 #include "board-mx31moboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
@@ -434,10 +435,8 @@ static int __init moboard_usbh2_init(void)
                return -ENODEV;
 
        pdev = imx31_add_mxc_ehci_hs(2, &usbh2_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct gpio_led mx31moboard_leds[] __initconst = {
index 4e8b184..72cd77d 100644 (file)
@@ -50,6 +50,7 @@
 #include "3ds_debugboard.h"
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 
index 1221237..2d1c50b 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index 81b8aff..8eb1570 100644 (file)
@@ -45,6 +45,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "pcm037.h"
index 6c56fb5..ee862ad 100644 (file)
@@ -36,6 +36,7 @@
 #include "board-pcm038.h"
 #include "common.h"
 #include "devices-imx27.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx27.h"
 #include "ulpi.h"
index c62b5d2..b623bca 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 #include "ulpi.h"
index c446027..ee7e57b 100644 (file)
@@ -20,7 +20,7 @@ static void __init vf610_init_machine(void)
        of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-static const char *vf610_dt_compat[] __initconst = {
+static const char * const vf610_dt_compat[] __initconst = {
        "fsl,vf610",
        NULL,
 };
index 872b3c6..97836e9 100644 (file)
@@ -34,6 +34,7 @@
 
 #include "common.h"
 #include "devices-imx35.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx35.h"
 
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
deleted file mode 100644 (file)
index 4c11202..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * 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
- *
- * Create static mapping between physical to virtual memory.
- */
-
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/clk.h>
-#include <linux/pinctrl/machine.h>
-#include <linux/of_address.h>
-
-#include <asm/mach/map.h>
-
-#include "common.h"
-#include "devices/devices-common.h"
-#include "hardware.h"
-#include "iomux-v3.h"
-
-/*
- * Define the MX51 memory map.
- */
-static struct map_desc mx51_io_desc[] __initdata = {
-       imx_map_entry(MX51, TZIC, MT_DEVICE),
-       imx_map_entry(MX51, IRAM, MT_DEVICE),
-       imx_map_entry(MX51, AIPS1, MT_DEVICE),
-       imx_map_entry(MX51, SPBA0, MT_DEVICE),
-       imx_map_entry(MX51, AIPS2, MT_DEVICE),
-};
-
-/*
- * Define the MX53 memory map.
- */
-static struct map_desc mx53_io_desc[] __initdata = {
-       imx_map_entry(MX53, TZIC, MT_DEVICE),
-       imx_map_entry(MX53, AIPS1, MT_DEVICE),
-       imx_map_entry(MX53, SPBA0, MT_DEVICE),
-       imx_map_entry(MX53, AIPS2, MT_DEVICE),
-};
-
-/*
- * This function initializes the memory map. It is called during the
- * system startup to create static physical to virtual memory mappings
- * for the IO modules.
- */
-void __init mx51_map_io(void)
-{
-       iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
-}
-
-void __init mx53_map_io(void)
-{
-       iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
-}
-
-/*
- * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
- * the Freescale marketing division. However this did not remove the
- * hardware from the chip which still needs to be configured for proper
- * IPU support.
- */
-static void __init imx51_ipu_mipi_setup(void)
-{
-       void __iomem *hsc_addr;
-       hsc_addr = MX51_IO_ADDRESS(MX51_MIPI_HSC_BASE_ADDR);
-
-       /* setup MIPI module to legacy mode */
-       __raw_writel(0xf00, hsc_addr);
-
-       /* CSI mode: reserved; DI control mode: legacy (from Freescale BSP) */
-       __raw_writel(__raw_readl(hsc_addr + 0x800) | 0x30ff,
-               hsc_addr + 0x800);
-}
-
-void __init imx51_init_early(void)
-{
-       imx51_ipu_mipi_setup();
-       mxc_set_cpu_type(MXC_CPU_MX51);
-       mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
-       imx_src_init();
-}
-
-void __init imx53_init_early(void)
-{
-       mxc_set_cpu_type(MXC_CPU_MX53);
-       imx_src_init();
-}
-
-void __init mx51_init_irq(void)
-{
-       tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR));
-}
-
-void __init mx53_init_irq(void)
-{
-       struct device_node *np;
-       void __iomem *base;
-
-       np = of_find_compatible_node(NULL, NULL, "fsl,imx53-tzic");
-       base = of_iomap(np, 0);
-       WARN_ON(!base);
-
-       tzic_init_irq(base);
-}
-
-static struct sdma_platform_data imx51_sdma_pdata __initdata = {
-       .fw_name = "sdma-imx51.bin",
-};
-
-static const struct resource imx51_audmux_res[] __initconst = {
-       DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K),
-};
-
-void __init imx51_soc_init(void)
-{
-       mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
-       mxc_device_init();
-
-       /* i.mx51 has the i.mx35 type gpio */
-       mxc_register_gpio("imx35-gpio", 0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_INT_GPIO1_LOW, MX51_INT_GPIO1_HIGH);
-       mxc_register_gpio("imx35-gpio", 1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_INT_GPIO2_LOW, MX51_INT_GPIO2_HIGH);
-       mxc_register_gpio("imx35-gpio", 2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_INT_GPIO3_LOW, MX51_INT_GPIO3_HIGH);
-       mxc_register_gpio("imx35-gpio", 3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_INT_GPIO4_LOW, MX51_INT_GPIO4_HIGH);
-
-       pinctrl_provide_dummies();
-
-       /* i.mx51 has the i.mx35 type sdma */
-       imx_add_imx_sdma("imx35-sdma", MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata);
-
-       /* Setup AIPS registers */
-       imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS1_BASE_ADDR));
-       imx_set_aips(MX51_IO_ADDRESS(MX51_AIPS2_BASE_ADDR));
-
-       /* i.mx51 has the i.mx31 type audmux */
-       platform_device_register_simple("imx31-audmux", 0, imx51_audmux_res,
-                                       ARRAY_SIZE(imx51_audmux_res));
-}
-
-void __init imx51_init_late(void)
-{
-       mx51_neon_fixup();
-       imx5_pm_init();
-}
-
-void __init imx53_init_late(void)
-{
-       imx5_pm_init();
-}
diff --git a/arch/arm/mach-imx/mx1-camera-fiq-ksym.c b/arch/arm/mach-imx/mx1-camera-fiq-ksym.c
deleted file mode 100644 (file)
index fb38436..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Exported ksyms of ARCH_MX1
- *
- * Copyright (C) 2008, Darius Augulis <augulis.darius@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/platform_device.h>
-#include <linux/module.h>
-
-#include <linux/platform_data/camera-mx1.h>
-
-/* IMX camera FIQ handler */
-EXPORT_SYMBOL(mx1_camera_sof_fiq_start);
-EXPORT_SYMBOL(mx1_camera_sof_fiq_end);
diff --git a/arch/arm/mach-imx/mx1-camera-fiq.S b/arch/arm/mach-imx/mx1-camera-fiq.S
deleted file mode 100644 (file)
index 9c69aa6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Copyright (C) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- *
- *  Based on linux/arch/arm/lib/floppydma.S
- *      Copyright (C) 1995, 1996 Russell King
- *
- * 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 <linux/linkage.h>
-#include <asm/assembler.h>
-
-               .text
-               .global mx1_camera_sof_fiq_end
-               .global mx1_camera_sof_fiq_start
-mx1_camera_sof_fiq_start:
-               @ enable dma
-               ldr     r12, [r9]
-               orr     r12, r12, #0x00000001
-               str     r12, [r9]
-               @ unmask DMA interrupt
-               ldr     r12, [r8]
-               bic     r12, r12, r13
-               str     r12, [r8]
-               @ disable SOF interrupt
-               ldr     r12, [r10]
-               bic     r12, r12, #0x00010000
-               str     r12, [r10]
-               @ clear SOF flag
-               mov     r12, #0x00010000
-               str     r12, [r11]
-               @ return from FIQ
-               subs    pc, lr, #4
-mx1_camera_sof_fiq_end:
index 52d5b15..1e91a09 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
@@ -213,10 +214,8 @@ static int __init devboard_usbh1_init(void)
        usbh1_pdata.otg = phy;
 
        pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 
index a4f43e9..2e895a8 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
@@ -327,10 +328,8 @@ static int __init marxbot_usbh1_init(void)
        usbh1_pdata.otg = phy;
 
        pdev = imx31_add_mxc_ehci_hs(1, &usbh1_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 
 static const struct fsl_usb2_platform_data usb_pdata __initconst = {
index 04ae45d..89fc35a 100644 (file)
@@ -28,6 +28,7 @@
 #include "board-mx31moboard.h"
 #include "common.h"
 #include "devices-imx31.h"
+#include "ehci.h"
 #include "hardware.h"
 #include "iomux-mx3.h"
 #include "ulpi.h"
@@ -141,10 +142,8 @@ static int __init smartbot_otg_host_init(void)
                return -ENODEV;
 
        pdev = imx31_add_mxc_ehci_otg(&otg_host_pdata);
-       if (IS_ERR(pdev))
-               return PTR_ERR(pdev);
 
-       return 0;
+       return PTR_ERR_OR_ZERO(pdev);
 }
 #else
 static inline int smartbot_otg_host_init(void) { return 0; }
diff --git a/arch/arm/mach-imx/mx51.h b/arch/arm/mach-imx/mx51.h
deleted file mode 100644 (file)
index af844f7..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-#ifndef __MACH_MX51_H__
-#define __MACH_MX51_H__
-
-/*
- * IROM
- */
-#define MX51_IROM_BASE_ADDR            0x0
-#define MX51_IROM_SIZE                 SZ_64K
-
-/*
- * IRAM
- */
-#define MX51_IRAM_BASE_ADDR            0x1ffe0000      /* internal ram */
-#define MX51_IRAM_PARTITIONS           16
-#define MX51_IRAM_SIZE         (MX51_IRAM_PARTITIONS * SZ_8K)  /* 128KB */
-
-#define MX51_GPU_BASE_ADDR             0x20000000
-#define MX51_GPU_CTRL_BASE_ADDR                0x30000000
-#define MX51_IPU_CTRL_BASE_ADDR                0x40000000
-
-/*
- * SPBA global module enabled #0
- */
-#define MX51_SPBA0_BASE_ADDR           0x70000000
-#define MX51_SPBA0_SIZE                        SZ_1M
-
-#define MX51_ESDHC1_BASE_ADDR          (MX51_SPBA0_BASE_ADDR + 0x04000)
-#define MX51_ESDHC2_BASE_ADDR          (MX51_SPBA0_BASE_ADDR + 0x08000)
-#define MX51_UART3_BASE_ADDR           (MX51_SPBA0_BASE_ADDR + 0x0c000)
-#define MX51_ECSPI1_BASE_ADDR          (MX51_SPBA0_BASE_ADDR + 0x10000)
-#define MX51_SSI2_BASE_ADDR            (MX51_SPBA0_BASE_ADDR + 0x14000)
-#define MX51_ESDHC3_BASE_ADDR          (MX51_SPBA0_BASE_ADDR + 0x20000)
-#define MX51_ESDHC4_BASE_ADDR          (MX51_SPBA0_BASE_ADDR + 0x24000)
-#define MX51_SPDIF_BASE_ADDR           (MX51_SPBA0_BASE_ADDR + 0x28000)
-#define MX51_ATA_DMA_BASE_ADDR         (MX51_SPBA0_BASE_ADDR + 0x30000)
-#define MX51_SLIM_DMA_BASE_ADDR                (MX51_SPBA0_BASE_ADDR + 0x34000)
-#define MX51_HSI2C_DMA_BASE_ADDR       (MX51_SPBA0_BASE_ADDR + 0x38000)
-#define MX51_SPBA_CTRL_BASE_ADDR       (MX51_SPBA0_BASE_ADDR + 0x3c000)
-
-/*
- * AIPS 1
- */
-#define MX51_AIPS1_BASE_ADDR           0x73f00000
-#define MX51_AIPS1_SIZE                        SZ_1M
-
-#define MX51_USB_BASE_ADDR             (MX51_AIPS1_BASE_ADDR + 0x80000)
-#define MX51_USB_OTG_BASE_ADDR         (MX51_USB_BASE_ADDR + 0x0000)
-#define MX51_USB_HS1_BASE_ADDR         (MX51_USB_BASE_ADDR + 0x0200)
-#define MX51_USB_HS2_BASE_ADDR         (MX51_USB_BASE_ADDR + 0x0400)
-#define MX51_GPIO1_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x84000)
-#define MX51_GPIO2_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x88000)
-#define MX51_GPIO3_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x8c000)
-#define MX51_GPIO4_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x90000)
-#define MX51_KPP_BASE_ADDR             (MX51_AIPS1_BASE_ADDR + 0x94000)
-#define MX51_WDOG1_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x98000)
-#define MX51_WDOG2_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0x9c000)
-#define MX51_GPT1_BASE_ADDR            (MX51_AIPS1_BASE_ADDR + 0xa0000)
-#define MX51_SRTC_BASE_ADDR            (MX51_AIPS1_BASE_ADDR + 0xa4000)
-#define MX51_IOMUXC_BASE_ADDR          (MX51_AIPS1_BASE_ADDR + 0xa8000)
-#define MX51_EPIT1_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0xac000)
-#define MX51_EPIT2_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0xb0000)
-#define MX51_PWM1_BASE_ADDR            (MX51_AIPS1_BASE_ADDR + 0xb4000)
-#define MX51_PWM2_BASE_ADDR            (MX51_AIPS1_BASE_ADDR + 0xb8000)
-#define MX51_UART1_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0xbc000)
-#define MX51_UART2_BASE_ADDR           (MX51_AIPS1_BASE_ADDR + 0xc0000)
-#define MX51_SRC_BASE_ADDR             (MX51_AIPS1_BASE_ADDR + 0xd0000)
-#define MX51_CCM_BASE_ADDR             (MX51_AIPS1_BASE_ADDR + 0xd4000)
-#define MX51_GPC_BASE_ADDR             (MX51_AIPS1_BASE_ADDR + 0xd8000)
-
-/*
- * AIPS 2
- */
-#define MX51_AIPS2_BASE_ADDR           0x83f00000
-#define MX51_AIPS2_SIZE                        SZ_1M
-
-#define MX51_PLL1_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0x80000)
-#define MX51_PLL2_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0x84000)
-#define MX51_PLL3_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0x88000)
-#define MX51_AHBMAX_BASE_ADDR          (MX51_AIPS2_BASE_ADDR + 0x94000)
-#define MX51_IIM_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0x98000)
-#define MX51_CSU_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0x9c000)
-#define MX51_ARM_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xa0000)
-#define MX51_OWIRE_BASE_ADDR           (MX51_AIPS2_BASE_ADDR + 0xa4000)
-#define MX51_FIRI_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xa8000)
-#define MX51_ECSPI2_BASE_ADDR          (MX51_AIPS2_BASE_ADDR + 0xac000)
-#define MX51_SDMA_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xb0000)
-#define MX51_SCC_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xb4000)
-#define MX51_ROMCP_BASE_ADDR           (MX51_AIPS2_BASE_ADDR + 0xb8000)
-#define MX51_RTIC_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xbc000)
-#define MX51_CSPI_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xc0000)
-#define MX51_I2C2_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xc4000)
-#define MX51_I2C1_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xc8000)
-#define MX51_SSI1_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xcc000)
-#define MX51_AUDMUX_BASE_ADDR          (MX51_AIPS2_BASE_ADDR + 0xd0000)
-#define MX51_M4IF_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xd8000)
-#define MX51_ESDCTL_BASE_ADDR          (MX51_AIPS2_BASE_ADDR + 0xd9000)
-#define MX51_WEIM_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xda000)
-#define MX51_NFC_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xdb000)
-#define MX51_EMI_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xdbf00)
-#define MX51_MIPI_HSC_BASE_ADDR                (MX51_AIPS2_BASE_ADDR + 0xdc000)
-#define MX51_ATA_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xe0000)
-#define MX51_SIM_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xe4000)
-#define MX51_SSI3_BASE_ADDR            (MX51_AIPS2_BASE_ADDR + 0xe8000)
-#define MX51_FEC_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xec000)
-#define MX51_TVE_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xf0000)
-#define MX51_VPU_BASE_ADDR             (MX51_AIPS2_BASE_ADDR + 0xf4000)
-#define MX51_SAHARA_BASE_ADDR          (MX51_AIPS2_BASE_ADDR + 0xf8000)
-
-#define MX51_CSD0_BASE_ADDR            0x90000000
-#define MX51_CSD1_BASE_ADDR            0xa0000000
-#define MX51_CS0_BASE_ADDR             0xb0000000
-#define MX51_CS1_BASE_ADDR             0xb8000000
-#define MX51_CS2_BASE_ADDR             0xc0000000
-#define MX51_CS3_BASE_ADDR             0xc8000000
-#define MX51_CS4_BASE_ADDR             0xcc000000
-#define MX51_CS5_BASE_ADDR             0xce000000
-
-/*
- * NFC
- */
-#define MX51_NFC_AXI_BASE_ADDR         0xcfff0000      /* NAND flash AXI */
-#define MX51_NFC_AXI_SIZE              SZ_64K
-
-#define MX51_GPU2D_BASE_ADDR           0xd0000000
-#define MX51_TZIC_BASE_ADDR            0xe0000000
-#define MX51_TZIC_SIZE                 SZ_16K
-
-#define MX51_IO_P2V(x)                 IMX_IO_P2V(x)
-#define MX51_IO_ADDRESS(x)             IOMEM(MX51_IO_P2V(x))
-
-/*
- * defines for SPBA modules
- */
-#define MX51_SPBA_SDHC1        0x04
-#define MX51_SPBA_SDHC2        0x08
-#define MX51_SPBA_UART3        0x0c
-#define MX51_SPBA_CSPI1        0x10
-#define MX51_SPBA_SSI2 0x14
-#define MX51_SPBA_SDHC3        0x20
-#define MX51_SPBA_SDHC4        0x24
-#define MX51_SPBA_SPDIF        0x28
-#define MX51_SPBA_ATA  0x30
-#define MX51_SPBA_SLIM 0x34
-#define MX51_SPBA_HSI2C        0x38
-#define MX51_SPBA_CTRL 0x3c
-
-/*
- * Defines for modules using static and dynamic DMA channels
- */
-#define MX51_MXC_DMA_CHANNEL_IRAM      30
-#define MX51_MXC_DMA_CHANNEL_SPDIF_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART1_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART1_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART2_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART2_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART3_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_UART3_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_MMC1      MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_MMC2      MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_SSI1_RX   MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_SSI1_TX   MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_SSI2_RX   MXC_DMA_DYNAMIC_CHANNEL
-#ifdef CONFIG_SDMA_IRAM
-#define MX51_MXC_DMA_CHANNEL_SSI2_TX   (MX51_MXC_DMA_CHANNEL_IRAM + 1)
-#else                          /*CONFIG_SDMA_IRAM */
-#define MX51_MXC_DMA_CHANNEL_SSI2_TX   MXC_DMA_DYNAMIC_CHANNEL
-#endif                         /*CONFIG_SDMA_IRAM */
-#define MX51_MXC_DMA_CHANNEL_CSPI1_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_CSPI1_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_CSPI2_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_CSPI2_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_CSPI3_RX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_CSPI3_TX  MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_ATA_RX    MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_ATA_TX    MXC_DMA_DYNAMIC_CHANNEL
-#define MX51_MXC_DMA_CHANNEL_MEMORY    MXC_DMA_DYNAMIC_CHANNEL
-
-#define MX51_IS_MEM_DEVICE_NONSHARED(x)                0
-
-/*
- * DMA request assignments
- */
-#define MX51_DMA_REQ_VPU               0
-#define MX51_DMA_REQ_GPC               1
-#define MX51_DMA_REQ_ATA_RX            2
-#define MX51_DMA_REQ_ATA_TX            3
-#define MX51_DMA_REQ_ATA_TX_END                4
-#define MX51_DMA_REQ_SLIM_B            5
-#define MX51_DMA_REQ_CSPI1_RX          6
-#define MX51_DMA_REQ_CSPI1_TX          7
-#define MX51_DMA_REQ_CSPI2_RX          8
-#define MX51_DMA_REQ_CSPI2_TX          9
-#define MX51_DMA_REQ_HS_I2C_TX         10
-#define MX51_DMA_REQ_HS_I2C_RX         11
-#define MX51_DMA_REQ_FIRI_RX           12
-#define MX51_DMA_REQ_FIRI_TX           13
-#define MX51_DMA_REQ_EXTREQ1           14
-#define MX51_DMA_REQ_GPU               15
-#define MX51_DMA_REQ_UART2_RX          16
-#define MX51_DMA_REQ_UART2_TX          17
-#define MX51_DMA_REQ_UART1_RX          18
-#define MX51_DMA_REQ_UART1_TX          19
-#define MX51_DMA_REQ_SDHC1             20
-#define MX51_DMA_REQ_SDHC2             21
-#define MX51_DMA_REQ_SSI2_RX1          22
-#define MX51_DMA_REQ_SSI2_TX1          23
-#define MX51_DMA_REQ_SSI2_RX0          24
-#define MX51_DMA_REQ_SSI2_TX0          25
-#define MX51_DMA_REQ_SSI1_RX1          26
-#define MX51_DMA_REQ_SSI1_TX1          27
-#define MX51_DMA_REQ_SSI1_RX0          28
-#define MX51_DMA_REQ_SSI1_TX0          29
-#define MX51_DMA_REQ_EMI_RD            30
-#define MX51_DMA_REQ_CTI2_0            31
-#define MX51_DMA_REQ_EMI_WR            32
-#define MX51_DMA_REQ_CTI2_1            33
-#define MX51_DMA_REQ_EPIT2             34
-#define MX51_DMA_REQ_SSI3_RX1          35
-#define MX51_DMA_REQ_IPU               36
-#define MX51_DMA_REQ_SSI3_TX1          37
-#define MX51_DMA_REQ_CSPI_RX           38
-#define MX51_DMA_REQ_CSPI_TX           39
-#define MX51_DMA_REQ_SDHC3             40
-#define MX51_DMA_REQ_SDHC4             41
-#define MX51_DMA_REQ_SLIM_B_TX         42
-#define MX51_DMA_REQ_UART3_RX          43
-#define MX51_DMA_REQ_UART3_TX          44
-#define MX51_DMA_REQ_SPDIF             45
-#define MX51_DMA_REQ_SSI3_RX0          46
-#define MX51_DMA_REQ_SSI3_TX0          47
-
-/*
- * Interrupt numbers
- */
-#include <asm/irq.h>
-#define MX51_INT_BASE                  (NR_IRQS_LEGACY + 0)
-#define MX51_INT_RESV0                 (NR_IRQS_LEGACY + 0)
-#define MX51_INT_ESDHC1                        (NR_IRQS_LEGACY + 1)
-#define MX51_INT_ESDHC2                        (NR_IRQS_LEGACY + 2)
-#define MX51_INT_ESDHC3                        (NR_IRQS_LEGACY + 3)
-#define MX51_INT_ESDHC4                        (NR_IRQS_LEGACY + 4)
-#define MX51_INT_RESV5                 (NR_IRQS_LEGACY + 5)
-#define MX51_INT_SDMA                  (NR_IRQS_LEGACY + 6)
-#define MX51_INT_IOMUX                 (NR_IRQS_LEGACY + 7)
-#define MX51_INT_NFC                   (NR_IRQS_LEGACY + 8)
-#define MX51_INT_VPU                   (NR_IRQS_LEGACY + 9)
-#define MX51_INT_IPU_ERR               (NR_IRQS_LEGACY + 10)
-#define MX51_INT_IPU_SYN               (NR_IRQS_LEGACY + 11)
-#define MX51_INT_GPU                   (NR_IRQS_LEGACY + 12)
-#define MX51_INT_RESV13                        (NR_IRQS_LEGACY + 13)
-#define MX51_INT_USB_HS1               (NR_IRQS_LEGACY + 14)
-#define MX51_INT_EMI                   (NR_IRQS_LEGACY + 15)
-#define MX51_INT_USB_HS2               (NR_IRQS_LEGACY + 16)
-#define MX51_INT_USB_HS3               (NR_IRQS_LEGACY + 17)
-#define MX51_INT_USB_OTG               (NR_IRQS_LEGACY + 18)
-#define MX51_INT_SAHARA_H0             (NR_IRQS_LEGACY + 19)
-#define MX51_INT_SAHARA_H1             (NR_IRQS_LEGACY + 20)
-#define MX51_INT_SCC_SMN               (NR_IRQS_LEGACY + 21)
-#define MX51_INT_SCC_STZ               (NR_IRQS_LEGACY + 22)
-#define MX51_INT_SCC_SCM               (NR_IRQS_LEGACY + 23)
-#define MX51_INT_SRTC_NTZ              (NR_IRQS_LEGACY + 24)
-#define MX51_INT_SRTC_TZ               (NR_IRQS_LEGACY + 25)
-#define MX51_INT_RTIC                  (NR_IRQS_LEGACY + 26)
-#define MX51_INT_CSU                   (NR_IRQS_LEGACY + 27)
-#define MX51_INT_SLIM_B                        (NR_IRQS_LEGACY + 28)
-#define MX51_INT_SSI1                  (NR_IRQS_LEGACY + 29)
-#define MX51_INT_SSI2                  (NR_IRQS_LEGACY + 30)
-#define MX51_INT_UART1                 (NR_IRQS_LEGACY + 31)
-#define MX51_INT_UART2                 (NR_IRQS_LEGACY + 32)
-#define MX51_INT_UART3                 (NR_IRQS_LEGACY + 33)
-#define MX51_INT_RESV34                        (NR_IRQS_LEGACY + 34)
-#define MX51_INT_RESV35                        (NR_IRQS_LEGACY + 35)
-#define MX51_INT_ECSPI1                        (NR_IRQS_LEGACY + 36)
-#define MX51_INT_ECSPI2                        (NR_IRQS_LEGACY + 37)
-#define MX51_INT_CSPI                  (NR_IRQS_LEGACY + 38)
-#define MX51_INT_GPT                   (NR_IRQS_LEGACY + 39)
-#define MX51_INT_EPIT1                 (NR_IRQS_LEGACY + 40)
-#define MX51_INT_EPIT2                 (NR_IRQS_LEGACY + 41)
-#define MX51_INT_GPIO1_INT7            (NR_IRQS_LEGACY + 42)
-#define MX51_INT_GPIO1_INT6            (NR_IRQS_LEGACY + 43)
-#define MX51_INT_GPIO1_INT5            (NR_IRQS_LEGACY + 44)
-#define MX51_INT_GPIO1_INT4            (NR_IRQS_LEGACY + 45)
-#define MX51_INT_GPIO1_INT3            (NR_IRQS_LEGACY + 46)
-#define MX51_INT_GPIO1_INT2            (NR_IRQS_LEGACY + 47)
-#define MX51_INT_GPIO1_INT1            (NR_IRQS_LEGACY + 48)
-#define MX51_INT_GPIO1_INT0            (NR_IRQS_LEGACY + 49)
-#define MX51_INT_GPIO1_LOW             (NR_IRQS_LEGACY + 50)
-#define MX51_INT_GPIO1_HIGH            (NR_IRQS_LEGACY + 51)
-#define MX51_INT_GPIO2_LOW             (NR_IRQS_LEGACY + 52)
-#define MX51_INT_GPIO2_HIGH            (NR_IRQS_LEGACY + 53)
-#define MX51_INT_GPIO3_LOW             (NR_IRQS_LEGACY + 54)
-#define MX51_INT_GPIO3_HIGH            (NR_IRQS_LEGACY + 55)
-#define MX51_INT_GPIO4_LOW             (NR_IRQS_LEGACY + 56)
-#define MX51_INT_GPIO4_HIGH            (NR_IRQS_LEGACY + 57)
-#define MX51_INT_WDOG1                 (NR_IRQS_LEGACY + 58)
-#define MX51_INT_WDOG2                 (NR_IRQS_LEGACY + 59)
-#define MX51_INT_KPP                   (NR_IRQS_LEGACY + 60)
-#define MX51_INT_PWM1                  (NR_IRQS_LEGACY + 61)
-#define MX51_INT_I2C1                  (NR_IRQS_LEGACY + 62)
-#define MX51_INT_I2C2                  (NR_IRQS_LEGACY + 63)
-#define MX51_INT_HS_I2C                        (NR_IRQS_LEGACY + 64)
-#define MX51_INT_RESV65                        (NR_IRQS_LEGACY + 65)
-#define MX51_INT_RESV66                        (NR_IRQS_LEGACY + 66)
-#define MX51_INT_SIM_IPB               (NR_IRQS_LEGACY + 67)
-#define MX51_INT_SIM_DAT               (NR_IRQS_LEGACY + 68)
-#define MX51_INT_IIM                   (NR_IRQS_LEGACY + 69)
-#define MX51_INT_ATA                   (NR_IRQS_LEGACY + 70)
-#define MX51_INT_CCM1                  (NR_IRQS_LEGACY + 71)
-#define MX51_INT_CCM2                  (NR_IRQS_LEGACY + 72)
-#define MX51_INT_GPC1                  (NR_IRQS_LEGACY + 73)
-#define MX51_INT_GPC2                  (NR_IRQS_LEGACY + 74)
-#define MX51_INT_SRC                   (NR_IRQS_LEGACY + 75)
-#define MX51_INT_NM                    (NR_IRQS_LEGACY + 76)
-#define MX51_INT_PMU                   (NR_IRQS_LEGACY + 77)
-#define MX51_INT_CTI_IRQ               (NR_IRQS_LEGACY + 78)
-#define MX51_INT_CTI1_TG0              (NR_IRQS_LEGACY + 79)
-#define MX51_INT_CTI1_TG1              (NR_IRQS_LEGACY + 80)
-#define MX51_INT_MCG_ERR               (NR_IRQS_LEGACY + 81)
-#define MX51_INT_MCG_TMR               (NR_IRQS_LEGACY + 82)
-#define MX51_INT_MCG_FUNC              (NR_IRQS_LEGACY + 83)
-#define MX51_INT_GPU2_IRQ              (NR_IRQS_LEGACY + 84)
-#define MX51_INT_GPU2_BUSY             (NR_IRQS_LEGACY + 85)
-#define MX51_INT_RESV86                        (NR_IRQS_LEGACY + 86)
-#define MX51_INT_FEC                   (NR_IRQS_LEGACY + 87)
-#define MX51_INT_OWIRE                 (NR_IRQS_LEGACY + 88)
-#define MX51_INT_CTI1_TG2              (NR_IRQS_LEGACY + 89)
-#define MX51_INT_SJC                   (NR_IRQS_LEGACY + 90)
-#define MX51_INT_SPDIF                 (NR_IRQS_LEGACY + 91)
-#define MX51_INT_TVE                   (NR_IRQS_LEGACY + 92)
-#define MX51_INT_FIRI                  (NR_IRQS_LEGACY + 93)
-#define MX51_INT_PWM2                  (NR_IRQS_LEGACY + 94)
-#define MX51_INT_SLIM_EXP              (NR_IRQS_LEGACY + 95)
-#define MX51_INT_SSI3                  (NR_IRQS_LEGACY + 96)
-#define MX51_INT_EMI_BOOT              (NR_IRQS_LEGACY + 97)
-#define MX51_INT_CTI1_TG3              (NR_IRQS_LEGACY + 98)
-#define MX51_INT_SMC_RX                        (NR_IRQS_LEGACY + 99)
-#define MX51_INT_VPU_IDLE              (NR_IRQS_LEGACY + 100)
-#define MX51_INT_EMI_NFC               (NR_IRQS_LEGACY + 101)
-#define MX51_INT_GPU_IDLE              (NR_IRQS_LEGACY + 102)
-
-#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
-extern int mx51_revision(void);
-extern void mx51_display_revision(void);
-#endif
-
-#endif /* ifndef __MACH_MX51_H__ */
diff --git a/arch/arm/mach-imx/mx53.h b/arch/arm/mach-imx/mx53.h
deleted file mode 100644 (file)
index f829d1c..0000000
+++ /dev/null
@@ -1,342 +0,0 @@
-#ifndef __MACH_MX53_H__
-#define __MACH_MX53_H__
-
-/*
- * IROM
- */
-#define MX53_IROM_BASE_ADDR            0x0
-#define MX53_IROM_SIZE                 SZ_64K
-
-/* TZIC */
-#define MX53_TZIC_BASE_ADDR            0x0FFFC000
-#define MX53_TZIC_SIZE                 SZ_16K
-
-/*
- * AHCI SATA
- */
-#define MX53_SATA_BASE_ADDR            0x10000000
-
-/*
- * NFC
- */
-#define MX53_NFC_AXI_BASE_ADDR 0xF7FF0000      /* NAND flash AXI */
-#define MX53_NFC_AXI_SIZE              SZ_64K
-
-/*
- * IRAM
- */
-#define MX53_IRAM_BASE_ADDR    0xF8000000      /* internal ram */
-#define MX53_IRAM_PARTITIONS   16
-#define MX53_IRAM_SIZE         (MX53_IRAM_PARTITIONS * SZ_8K)  /* 128KB */
-
-/*
- * Graphics Memory of GPU
- */
-#define MX53_IPU_CTRL_BASE_ADDR        0x18000000
-#define MX53_GPU2D_BASE_ADDR           0x20000000
-#define MX53_GPU_BASE_ADDR             0x30000000
-#define MX53_GPU_GMEM_BASE_ADDR        0xF8020000
-
-#define MX53_DEBUG_BASE_ADDR           0x40000000
-#define MX53_DEBUG_SIZE                SZ_1M
-#define MX53_ETB_BASE_ADDR             (MX53_DEBUG_BASE_ADDR + 0x00001000)
-#define MX53_ETM_BASE_ADDR             (MX53_DEBUG_BASE_ADDR + 0x00002000)
-#define MX53_TPIU_BASE_ADDR            (MX53_DEBUG_BASE_ADDR + 0x00003000)
-#define MX53_CTI0_BASE_ADDR            (MX53_DEBUG_BASE_ADDR + 0x00004000)
-#define MX53_CTI1_BASE_ADDR            (MX53_DEBUG_BASE_ADDR + 0x00005000)
-#define MX53_CTI2_BASE_ADDR            (MX53_DEBUG_BASE_ADDR + 0x00006000)
-#define MX53_CTI3_BASE_ADDR            (MX53_DEBUG_BASE_ADDR + 0x00007000)
-#define MX53_CORTEX_DBG_BASE_ADDR      (MX53_DEBUG_BASE_ADDR + 0x00008000)
-
-/*
- * SPBA global module enabled #0
- */
-#define MX53_SPBA0_BASE_ADDR           0x50000000
-#define MX53_SPBA0_SIZE                SZ_1M
-
-#define MX53_ESDHC1_BASE_ADDR  (MX53_SPBA0_BASE_ADDR + 0x00004000)
-#define MX53_ESDHC2_BASE_ADDR  (MX53_SPBA0_BASE_ADDR + 0x00008000)
-#define MX53_UART3_BASE_ADDR           (MX53_SPBA0_BASE_ADDR + 0x0000C000)
-#define MX53_ECSPI1_BASE_ADDR          (MX53_SPBA0_BASE_ADDR + 0x00010000)
-#define MX53_SSI2_BASE_ADDR            (MX53_SPBA0_BASE_ADDR + 0x00014000)
-#define MX53_ESDHC3_BASE_ADDR  (MX53_SPBA0_BASE_ADDR + 0x00020000)
-#define MX53_ESDHC4_BASE_ADDR  (MX53_SPBA0_BASE_ADDR + 0x00024000)
-#define MX53_SPDIF_BASE_ADDR           (MX53_SPBA0_BASE_ADDR + 0x00028000)
-#define MX53_ASRC_BASE_ADDR            (MX53_SPBA0_BASE_ADDR + 0x0002C000)
-#define MX53_ATA_DMA_BASE_ADDR (MX53_SPBA0_BASE_ADDR + 0x00030000)
-#define MX53_SLIM_DMA_BASE_ADDR        (MX53_SPBA0_BASE_ADDR + 0x00034000)
-#define MX53_HSI2C_DMA_BASE_ADDR       (MX53_SPBA0_BASE_ADDR + 0x00038000)
-#define MX53_SPBA_CTRL_BASE_ADDR       (MX53_SPBA0_BASE_ADDR + 0x0003C000)
-
-/*
- * AIPS 1
- */
-#define MX53_AIPS1_BASE_ADDR   0x53F00000
-#define MX53_AIPS1_SIZE                SZ_1M
-
-#define MX53_OTG_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x00080000)
-#define MX53_GPIO1_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00084000)
-#define MX53_GPIO2_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00088000)
-#define MX53_GPIO3_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x0008C000)
-#define MX53_GPIO4_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00090000)
-#define MX53_KPP_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x00094000)
-#define MX53_WDOG1_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x00098000)
-#define MX53_WDOG2_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x0009C000)
-#define MX53_GPT1_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000A0000)
-#define MX53_SRTC_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000A4000)
-#define MX53_IOMUXC_BASE_ADDR  (MX53_AIPS1_BASE_ADDR + 0x000A8000)
-#define MX53_EPIT1_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000AC000)
-#define MX53_EPIT2_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000B0000)
-#define MX53_PWM1_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000B4000)
-#define MX53_PWM2_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000B8000)
-#define MX53_UART1_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000BC000)
-#define MX53_UART2_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000C0000)
-#define MX53_SRC_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x000D0000)
-#define MX53_CCM_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x000D4000)
-#define MX53_GPC_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x000D8000)
-#define MX53_GPIO5_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000DC000)
-#define MX53_GPIO6_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000E0000)
-#define MX53_GPIO7_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000E4000)
-#define MX53_ATA_BASE_ADDR     (MX53_AIPS1_BASE_ADDR + 0x000E8000)
-#define MX53_I2C3_BASE_ADDR    (MX53_AIPS1_BASE_ADDR + 0x000EC000)
-#define MX53_UART4_BASE_ADDR   (MX53_AIPS1_BASE_ADDR + 0x000F0000)
-
-/*
- * AIPS 2
- */
-#define MX53_AIPS2_BASE_ADDR           0x63F00000
-#define MX53_AIPS2_SIZE                        SZ_1M
-
-#define MX53_PLL1_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x00080000)
-#define MX53_PLL2_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x00084000)
-#define MX53_PLL3_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x00088000)
-#define MX53_PLL4_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x0008C000)
-#define MX53_UART5_BASE_ADDR   (MX53_AIPS2_BASE_ADDR + 0x00090000)
-#define MX53_AHBMAX_BASE_ADDR  (MX53_AIPS2_BASE_ADDR + 0x00094000)
-#define MX53_IIM_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x00098000)
-#define MX53_CSU_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x0009C000)
-#define MX53_ARM_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000A0000)
-#define MX53_OWIRE_BASE_ADDR   (MX53_AIPS2_BASE_ADDR + 0x000A4000)
-#define MX53_FIRI_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000A8000)
-#define MX53_ECSPI2_BASE_ADDR  (MX53_AIPS2_BASE_ADDR + 0x000AC000)
-#define MX53_SDMA_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000B0000)
-#define MX53_SCC_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000B4000)
-#define MX53_ROMCP_BASE_ADDR   (MX53_AIPS2_BASE_ADDR + 0x000B8000)
-#define MX53_RTIC_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000BC000)
-#define MX53_CSPI_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000C0000)
-#define MX53_I2C2_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000C4000)
-#define MX53_I2C1_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000C8000)
-#define MX53_SSI1_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000CC000)
-#define MX53_AUDMUX_BASE_ADDR  (MX53_AIPS2_BASE_ADDR + 0x000D0000)
-#define MX53_RTC_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000D4000)
-#define MX53_M4IF_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000D8000)
-#define MX53_ESDCTL_BASE_ADDR  (MX53_AIPS2_BASE_ADDR + 0x000D9000)
-#define MX53_WEIM_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000DA000)
-#define MX53_NFC_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000DB000)
-#define MX53_EMI_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000DBF00)
-#define MX53_MIPI_HSC_BASE_ADDR        (MX53_AIPS2_BASE_ADDR + 0x000DC000)
-#define MX53_MLB_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000E4000)
-#define MX53_SSI3_BASE_ADDR    (MX53_AIPS2_BASE_ADDR + 0x000E8000)
-#define MX53_FEC_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000EC000)
-#define MX53_TVE_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000F0000)
-#define MX53_VPU_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000F4000)
-#define MX53_SAHARA_BASE_ADDR  (MX53_AIPS2_BASE_ADDR + 0x000F8000)
-#define MX53_PTP_BASE_ADDR     (MX53_AIPS2_BASE_ADDR + 0x000FC000)
-
-/*
- * Memory regions and CS
- */
-#define MX53_CSD0_BASE_ADDR            0x70000000
-#define MX53_CSD1_BASE_ADDR            0xB0000000
-#define MX53_CS0_BASE_ADDR             0xF0000000
-#define MX53_CS1_32MB_BASE_ADDR        0xF2000000
-#define MX53_CS1_64MB_BASE_ADDR                0xF4000000
-#define MX53_CS2_64MB_BASE_ADDR                0xF4000000
-#define MX53_CS2_96MB_BASE_ADDR                0xF6000000
-#define MX53_CS3_BASE_ADDR             0xF6000000
-
-#define MX53_IO_P2V(x)                 IMX_IO_P2V(x)
-#define MX53_IO_ADDRESS(x)             IOMEM(MX53_IO_P2V(x))
-
-/*
- * defines for SPBA modules
- */
-#define MX53_SPBA_SDHC1        0x04
-#define MX53_SPBA_SDHC2        0x08
-#define MX53_SPBA_UART3        0x0C
-#define MX53_SPBA_CSPI1        0x10
-#define MX53_SPBA_SSI2         0x14
-#define MX53_SPBA_SDHC3        0x20
-#define MX53_SPBA_SDHC4        0x24
-#define MX53_SPBA_SPDIF        0x28
-#define MX53_SPBA_ATA          0x30
-#define MX53_SPBA_SLIM         0x34
-#define MX53_SPBA_HSI2C        0x38
-#define MX53_SPBA_CTRL         0x3C
-
-/*
- * DMA request assignments
- */
-#define MX53_DMA_REQ_SSI3_TX0          47
-#define MX53_DMA_REQ_SSI3_RX0          46
-#define MX53_DMA_REQ_SSI3_TX1          45
-#define MX53_DMA_REQ_SSI3_RX1          44
-#define MX53_DMA_REQ_UART3_TX  43
-#define MX53_DMA_REQ_UART3_RX  42
-#define MX53_DMA_REQ_ESAI_TX           41
-#define MX53_DMA_REQ_ESAI_RX           40
-#define MX53_DMA_REQ_CSPI_TX           39
-#define MX53_DMA_REQ_CSPI_RX           38
-#define MX53_DMA_REQ_ASRC_DMA6 37
-#define MX53_DMA_REQ_ASRC_DMA5 36
-#define MX53_DMA_REQ_ASRC_DMA4 35
-#define MX53_DMA_REQ_ASRC_DMA3 34
-#define MX53_DMA_REQ_ASRC_DMA2 33
-#define MX53_DMA_REQ_ASRC_DMA1 32
-#define MX53_DMA_REQ_EMI_WR            31
-#define MX53_DMA_REQ_EMI_RD            30
-#define MX53_DMA_REQ_SSI1_TX0          29
-#define MX53_DMA_REQ_SSI1_RX0          28
-#define MX53_DMA_REQ_SSI1_TX1          27
-#define MX53_DMA_REQ_SSI1_RX1          26
-#define MX53_DMA_REQ_SSI2_TX0          25
-#define MX53_DMA_REQ_SSI2_RX0          24
-#define MX53_DMA_REQ_SSI2_TX1          23
-#define MX53_DMA_REQ_SSI2_RX1          22
-#define MX53_DMA_REQ_I2C2_SDHC2        21
-#define MX53_DMA_REQ_I2C1_SDHC1        20
-#define MX53_DMA_REQ_UART1_TX  19
-#define MX53_DMA_REQ_UART1_RX  18
-#define MX53_DMA_REQ_UART5_TX  17
-#define MX53_DMA_REQ_UART5_RX  16
-#define MX53_DMA_REQ_SPDIF_TX          15
-#define MX53_DMA_REQ_SPDIF_RX          14
-#define MX53_DMA_REQ_UART2_FIRI_TX     13
-#define MX53_DMA_REQ_UART2_FIRI_RX     12
-#define MX53_DMA_REQ_SDHC4             11
-#define MX53_DMA_REQ_I2C3_SDHC3        10
-#define MX53_DMA_REQ_CSPI2_TX          9
-#define MX53_DMA_REQ_CSPI2_RX          8
-#define MX53_DMA_REQ_CSPI1_TX          7
-#define MX53_DMA_REQ_CSPI1_RX          6
-#define MX53_DMA_REQ_IPU               5
-#define MX53_DMA_REQ_ATA_TX_END        4
-#define MX53_DMA_REQ_ATA_UART4_TX      3
-#define MX53_DMA_REQ_ATA_UART4_RX      2
-#define MX53_DMA_REQ_GPC               1
-#define MX53_DMA_REQ_VPU               0
-
-/*
- * Interrupt numbers
- */
-#include <asm/irq.h>
-#define MX53_INT_RESV0         (NR_IRQS_LEGACY + 0)
-#define MX53_INT_ESDHC1                (NR_IRQS_LEGACY + 1)
-#define MX53_INT_ESDHC2                (NR_IRQS_LEGACY + 2)
-#define MX53_INT_ESDHC3                (NR_IRQS_LEGACY + 3)
-#define MX53_INT_ESDHC4                (NR_IRQS_LEGACY + 4)
-#define MX53_INT_DAP           (NR_IRQS_LEGACY + 5)
-#define MX53_INT_SDMA          (NR_IRQS_LEGACY + 6)
-#define MX53_INT_IOMUX         (NR_IRQS_LEGACY + 7)
-#define MX53_INT_NFC           (NR_IRQS_LEGACY + 8)
-#define MX53_INT_VPU           (NR_IRQS_LEGACY + 9)
-#define MX53_INT_IPU_ERR       (NR_IRQS_LEGACY + 10)
-#define MX53_INT_IPU_SYN       (NR_IRQS_LEGACY + 11)
-#define MX53_INT_GPU           (NR_IRQS_LEGACY + 12)
-#define MX53_INT_UART4         (NR_IRQS_LEGACY + 13)
-#define MX53_INT_USB_H1                (NR_IRQS_LEGACY + 14)
-#define MX53_INT_EMI           (NR_IRQS_LEGACY + 15)
-#define MX53_INT_USB_H2                (NR_IRQS_LEGACY + 16)
-#define MX53_INT_USB_H3                (NR_IRQS_LEGACY + 17)
-#define MX53_INT_USB_OTG       (NR_IRQS_LEGACY + 18)
-#define MX53_INT_SAHARA_H0     (NR_IRQS_LEGACY + 19)
-#define MX53_INT_SAHARA_H1     (NR_IRQS_LEGACY + 20)
-#define MX53_INT_SCC_SMN       (NR_IRQS_LEGACY + 21)
-#define MX53_INT_SCC_STZ       (NR_IRQS_LEGACY + 22)
-#define MX53_INT_SCC_SCM       (NR_IRQS_LEGACY + 23)
-#define MX53_INT_SRTC_NTZ      (NR_IRQS_LEGACY + 24)
-#define MX53_INT_SRTC_TZ       (NR_IRQS_LEGACY + 25)
-#define MX53_INT_RTIC          (NR_IRQS_LEGACY + 26)
-#define MX53_INT_CSU           (NR_IRQS_LEGACY + 27)
-#define MX53_INT_SATA          (NR_IRQS_LEGACY + 28)
-#define MX53_INT_SSI1          (NR_IRQS_LEGACY + 29)
-#define MX53_INT_SSI2          (NR_IRQS_LEGACY + 30)
-#define MX53_INT_UART1         (NR_IRQS_LEGACY + 31)
-#define MX53_INT_UART2         (NR_IRQS_LEGACY + 32)
-#define MX53_INT_UART3         (NR_IRQS_LEGACY + 33)
-#define MX53_INT_RTC           (NR_IRQS_LEGACY + 34)
-#define MX53_INT_PTP           (NR_IRQS_LEGACY + 35)
-#define MX53_INT_ECSPI1                (NR_IRQS_LEGACY + 36)
-#define MX53_INT_ECSPI2                (NR_IRQS_LEGACY + 37)
-#define MX53_INT_CSPI          (NR_IRQS_LEGACY + 38)
-#define MX53_INT_GPT           (NR_IRQS_LEGACY + 39)
-#define MX53_INT_EPIT1         (NR_IRQS_LEGACY + 40)
-#define MX53_INT_EPIT2         (NR_IRQS_LEGACY + 41)
-#define MX53_INT_GPIO1_INT7    (NR_IRQS_LEGACY + 42)
-#define MX53_INT_GPIO1_INT6    (NR_IRQS_LEGACY + 43)
-#define MX53_INT_GPIO1_INT5    (NR_IRQS_LEGACY + 44)
-#define MX53_INT_GPIO1_INT4    (NR_IRQS_LEGACY + 45)
-#define MX53_INT_GPIO1_INT3    (NR_IRQS_LEGACY + 46)
-#define MX53_INT_GPIO1_INT2    (NR_IRQS_LEGACY + 47)
-#define MX53_INT_GPIO1_INT1    (NR_IRQS_LEGACY + 48)
-#define MX53_INT_GPIO1_INT0    (NR_IRQS_LEGACY + 49)
-#define MX53_INT_GPIO1_LOW     (NR_IRQS_LEGACY + 50)
-#define MX53_INT_GPIO1_HIGH    (NR_IRQS_LEGACY + 51)
-#define MX53_INT_GPIO2_LOW     (NR_IRQS_LEGACY + 52)
-#define MX53_INT_GPIO2_HIGH    (NR_IRQS_LEGACY + 53)
-#define MX53_INT_GPIO3_LOW     (NR_IRQS_LEGACY + 54)
-#define MX53_INT_GPIO3_HIGH    (NR_IRQS_LEGACY + 55)
-#define MX53_INT_GPIO4_LOW     (NR_IRQS_LEGACY + 56)
-#define MX53_INT_GPIO4_HIGH    (NR_IRQS_LEGACY + 57)
-#define MX53_INT_WDOG1         (NR_IRQS_LEGACY + 58)
-#define MX53_INT_WDOG2         (NR_IRQS_LEGACY + 59)
-#define MX53_INT_KPP           (NR_IRQS_LEGACY + 60)
-#define MX53_INT_PWM1          (NR_IRQS_LEGACY + 61)
-#define MX53_INT_I2C1          (NR_IRQS_LEGACY + 62)
-#define MX53_INT_I2C2          (NR_IRQS_LEGACY + 63)
-#define MX53_INT_I2C3          (NR_IRQS_LEGACY + 64)
-#define MX53_INT_MLB           (NR_IRQS_LEGACY + 65)
-#define MX53_INT_ASRC          (NR_IRQS_LEGACY + 66)
-#define MX53_INT_SPDIF         (NR_IRQS_LEGACY + 67)
-#define MX53_INT_SIM_DAT       (NR_IRQS_LEGACY + 68)
-#define MX53_INT_IIM           (NR_IRQS_LEGACY + 69)
-#define MX53_INT_ATA           (NR_IRQS_LEGACY + 70)
-#define MX53_INT_CCM1          (NR_IRQS_LEGACY + 71)
-#define MX53_INT_CCM2          (NR_IRQS_LEGACY + 72)
-#define MX53_INT_GPC1          (NR_IRQS_LEGACY + 73)
-#define MX53_INT_GPC2          (NR_IRQS_LEGACY + 74)
-#define MX53_INT_SRC           (NR_IRQS_LEGACY + 75)
-#define MX53_INT_NM            (NR_IRQS_LEGACY + 76)
-#define MX53_INT_PMU           (NR_IRQS_LEGACY + 77)
-#define MX53_INT_CTI_IRQ       (NR_IRQS_LEGACY + 78)
-#define MX53_INT_CTI1_TG0      (NR_IRQS_LEGACY + 79)
-#define MX53_INT_CTI1_TG1      (NR_IRQS_LEGACY + 80)
-#define MX53_INT_ESAI          (NR_IRQS_LEGACY + 81)
-#define MX53_INT_CAN1          (NR_IRQS_LEGACY + 82)
-#define MX53_INT_CAN2          (NR_IRQS_LEGACY + 83)
-#define MX53_INT_GPU2_IRQ      (NR_IRQS_LEGACY + 84)
-#define MX53_INT_GPU2_BUSY     (NR_IRQS_LEGACY + 85)
-#define MX53_INT_UART5         (NR_IRQS_LEGACY + 86)
-#define MX53_INT_FEC           (NR_IRQS_LEGACY + 87)
-#define MX53_INT_OWIRE         (NR_IRQS_LEGACY + 88)
-#define MX53_INT_CTI1_TG2      (NR_IRQS_LEGACY + 89)
-#define MX53_INT_SJC           (NR_IRQS_LEGACY + 90)
-#define MX53_INT_TVE           (NR_IRQS_LEGACY + 92)
-#define MX53_INT_FIRI          (NR_IRQS_LEGACY + 93)
-#define MX53_INT_PWM2          (NR_IRQS_LEGACY + 94)
-#define MX53_INT_SLIM_EXP      (NR_IRQS_LEGACY + 95)
-#define MX53_INT_SSI3          (NR_IRQS_LEGACY + 96)
-#define MX53_INT_EMI_BOOT      (NR_IRQS_LEGACY + 97)
-#define MX53_INT_CTI1_TG3      (NR_IRQS_LEGACY + 98)
-#define MX53_INT_SMC_RX                (NR_IRQS_LEGACY + 99)
-#define MX53_INT_VPU_IDLE      (NR_IRQS_LEGACY + 100)
-#define MX53_INT_EMI_NFC       (NR_IRQS_LEGACY + 101)
-#define MX53_INT_GPU_IDLE      (NR_IRQS_LEGACY + 102)
-#define MX53_INT_GPIO5_LOW     (NR_IRQS_LEGACY + 103)
-#define MX53_INT_GPIO5_HIGH    (NR_IRQS_LEGACY + 104)
-#define MX53_INT_GPIO6_LOW     (NR_IRQS_LEGACY + 105)
-#define MX53_INT_GPIO6_HIGH    (NR_IRQS_LEGACY + 106)
-#define MX53_INT_GPIO7_LOW     (NR_IRQS_LEGACY + 107)
-#define MX53_INT_GPIO7_HIGH    (NR_IRQS_LEGACY + 108)
-
-#endif /* ifndef __MACH_MX53_H__ */
index 75d6a37..a39b69e 100644 (file)
@@ -154,10 +154,17 @@ extern unsigned int __mxc_cpu_type;
 #endif
 
 #ifndef __ASSEMBLY__
+#ifdef CONFIG_SOC_IMX6SL
 static inline bool cpu_is_imx6sl(void)
 {
        return __mxc_cpu_type == MXC_CPU_IMX6SL;
 }
+#else
+static inline bool cpu_is_imx6sl(void)
+{
+       return false;
+}
+#endif
 
 static inline bool cpu_is_imx6dl(void)
 {
index 58aeaf5..f1f80ab 100644 (file)
 
 #include "common.h"
 #include "cpuidle.h"
-#include "crm-regs-imx5.h"
 #include "hardware.h"
 
+#define MXC_CCM_CLPCR                  0x54
+#define MXC_CCM_CLPCR_LPM_OFFSET       0
+#define MXC_CCM_CLPCR_LPM_MASK         0x3
+#define MXC_CCM_CLPCR_STBY_COUNT_OFFSET        9
+#define MXC_CCM_CLPCR_VSTBY            (0x1 << 8)
+#define MXC_CCM_CLPCR_SBYOS            (0x1 << 6)
+
+#define MXC_CORTEXA8_PLAT_LPC          0xc
+#define MXC_CORTEXA8_PLAT_LPC_DSM      (1 << 0)
+#define MXC_CORTEXA8_PLAT_LPC_DBG_DSM  (1 << 1)
+
+#define MXC_SRPG_NEON_SRPGCR           0x280
+#define MXC_SRPG_ARM_SRPGCR            0x2a0
+#define MXC_SRPG_EMPGC0_SRPGCR         0x2c0
+#define MXC_SRPG_EMPGC1_SRPGCR         0x2d0
+
+#define MXC_SRPGCR_PCR                 1
+
 /*
  * The WAIT_UNCLOCKED_POWER_OFF state only requires <= 500ns to exit.
  * This is also the lowest power state possible without affecting
  */
 #define IMX5_DEFAULT_CPU_IDLE_STATE WAIT_UNCLOCKED_POWER_OFF
 
+struct imx5_pm_data {
+       phys_addr_t cortex_addr;
+       phys_addr_t gpc_addr;
+};
+
+static const struct imx5_pm_data imx51_pm_data __initconst = {
+       .cortex_addr = 0x83fa0000,
+       .gpc_addr = 0x73fd8000,
+};
+
+static const struct imx5_pm_data imx53_pm_data __initconst = {
+       .cortex_addr = 0x63fa0000,
+       .gpc_addr = 0x53fd8000,
+};
+
+static void __iomem *ccm_base;
+static void __iomem *cortex_base;
+static void __iomem *gpc_base;
+
+void __init imx5_pm_set_ccm_base(void __iomem *base)
+{
+       ccm_base = base;
+}
+
 /*
  * set cpu low power mode before WFI instruction. This function is called
  * mx5 because it can be used for mx51, and mx53.
@@ -43,12 +84,16 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
        int stop_mode = 0;
 
        /* always allow platform to issue a deep sleep mode request */
-       plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) &
+       plat_lpc = __raw_readl(cortex_base + MXC_CORTEXA8_PLAT_LPC) &
            ~(MXC_CORTEXA8_PLAT_LPC_DSM);
-       ccm_clpcr = __raw_readl(MXC_CCM_CLPCR) & ~(MXC_CCM_CLPCR_LPM_MASK);
-       arm_srpgcr = __raw_readl(MXC_SRPG_ARM_SRPGCR) & ~(MXC_SRPGCR_PCR);
-       empgc0 = __raw_readl(MXC_SRPG_EMPGC0_SRPGCR) & ~(MXC_SRPGCR_PCR);
-       empgc1 = __raw_readl(MXC_SRPG_EMPGC1_SRPGCR) & ~(MXC_SRPGCR_PCR);
+       ccm_clpcr = __raw_readl(ccm_base + MXC_CCM_CLPCR) &
+                   ~(MXC_CCM_CLPCR_LPM_MASK);
+       arm_srpgcr = __raw_readl(gpc_base + MXC_SRPG_ARM_SRPGCR) &
+                    ~(MXC_SRPGCR_PCR);
+       empgc0 = __raw_readl(gpc_base + MXC_SRPG_EMPGC0_SRPGCR) &
+                ~(MXC_SRPGCR_PCR);
+       empgc1 = __raw_readl(gpc_base + MXC_SRPG_EMPGC1_SRPGCR) &
+                ~(MXC_SRPGCR_PCR);
 
        switch (mode) {
        case WAIT_CLOCKED:
@@ -82,17 +127,17 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
                return;
        }
 
-       __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC);
-       __raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
-       __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR);
-       __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);
+       __raw_writel(plat_lpc, cortex_base + MXC_CORTEXA8_PLAT_LPC);
+       __raw_writel(ccm_clpcr, ccm_base + MXC_CCM_CLPCR);
+       __raw_writel(arm_srpgcr, gpc_base + MXC_SRPG_ARM_SRPGCR);
+       __raw_writel(arm_srpgcr, gpc_base + MXC_SRPG_NEON_SRPGCR);
 
        if (stop_mode) {
                empgc0 |= MXC_SRPGCR_PCR;
                empgc1 |= MXC_SRPGCR_PCR;
 
-               __raw_writel(empgc0, MXC_SRPG_EMPGC0_SRPGCR);
-               __raw_writel(empgc1, MXC_SRPG_EMPGC1_SRPGCR);
+               __raw_writel(empgc0, gpc_base + MXC_SRPG_EMPGC0_SRPGCR);
+               __raw_writel(empgc1, gpc_base + MXC_SRPG_EMPGC1_SRPGCR);
        }
 }
 
@@ -114,8 +159,8 @@ static int mx5_suspend_enter(suspend_state_t state)
                flush_cache_all();
 
                /*clear the EMPGC0/1 bits */
-               __raw_writel(0, MXC_SRPG_EMPGC0_SRPGCR);
-               __raw_writel(0, MXC_SRPG_EMPGC1_SRPGCR);
+               __raw_writel(0, gpc_base + MXC_SRPG_EMPGC0_SRPGCR);
+               __raw_writel(0, gpc_base + MXC_SRPG_EMPGC1_SRPGCR);
        }
        cpu_do_idle();
 
@@ -149,7 +194,7 @@ static void imx5_pm_idle(void)
        imx5_cpu_do_idle();
 }
 
-static int __init imx5_pm_common_init(void)
+static int __init imx5_pm_common_init(const struct imx5_pm_data *data)
 {
        int ret;
        struct clk *gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
@@ -163,15 +208,28 @@ static int __init imx5_pm_common_init(void)
 
        arm_pm_idle = imx5_pm_idle;
 
+       cortex_base = ioremap(data->cortex_addr, SZ_16K);
+       gpc_base = ioremap(data->gpc_addr, SZ_16K);
+       WARN_ON(!ccm_base || !cortex_base || !gpc_base);
+
        /* Set the registers to the default cpu idle state. */
        mx5_cpu_lp_set(IMX5_DEFAULT_CPU_IDLE_STATE);
 
-       return imx5_cpuidle_init();
+       ret = imx5_cpuidle_init();
+       if (ret)
+               pr_warn("%s: cpuidle init failed %d\n", __func__, ret);
+
+       suspend_set_ops(&mx5_suspend_ops);
+
+       return 0;
+}
+
+void __init imx51_pm_init(void)
+{
+       imx5_pm_common_init(&imx51_pm_data);
 }
 
-void __init imx5_pm_init(void)
+void __init imx53_pm_init(void)
 {
-       int ret = imx5_pm_common_init();
-       if (!ret)
-               suspend_set_ops(&mx5_suspend_ops);
+       imx5_pm_common_init(&imx53_pm_data);
 }
index 9392a8f..5c3af8f 100644 (file)
@@ -129,6 +129,14 @@ static const u32 imx6sl_mmdc_io_offset[] __initconst = {
        0x330, 0x334, 0x320,        /* SDCKE0, SDCKE1, RESET */
 };
 
+static const u32 imx6sx_mmdc_io_offset[] __initconst = {
+       0x2ec, 0x2f0, 0x2f4, 0x2f8, /* DQM0 ~ DQM3 */
+       0x60c, 0x610, 0x61c, 0x620, /* GPR_B0DS ~ GPR_B3DS */
+       0x300, 0x2fc, 0x32c, 0x5f4, /* CAS, RAS, SDCLK_0, GPR_ADDS */
+       0x310, 0x314, 0x5f8, 0x608, /* SODT0, SODT1, MODE_CTL, MODE */
+       0x330, 0x334, 0x338, 0x33c, /* SDQS0 ~ SDQS3 */
+};
+
 static const struct imx6_pm_socdata imx6q_pm_data __initconst = {
        .cpu_type = MXC_CPU_IMX6Q,
        .mmdc_compat = "fsl,imx6q-mmdc",
@@ -159,6 +167,16 @@ static const struct imx6_pm_socdata imx6sl_pm_data __initconst = {
        .mmdc_io_offset = imx6sl_mmdc_io_offset,
 };
 
+static const struct imx6_pm_socdata imx6sx_pm_data __initconst = {
+       .cpu_type = MXC_CPU_IMX6SX,
+       .mmdc_compat = "fsl,imx6sx-mmdc",
+       .src_compat = "fsl,imx6sx-src",
+       .iomuxc_compat = "fsl,imx6sx-iomuxc",
+       .gpc_compat = "fsl,imx6sx-gpc",
+       .mmdc_io_num = ARRAY_SIZE(imx6sx_mmdc_io_offset),
+       .mmdc_io_offset = imx6sx_mmdc_io_offset,
+};
+
 /*
  * This structure is for passing necessary data for low level ocram
  * suspend code(arch/arm/mach-imx/suspend-imx6.S), if this struct
@@ -181,11 +199,13 @@ struct imx6_cpu_pm_info {
        u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */
 } __aligned(8);
 
-void imx6q_set_int_mem_clk_lpm(void)
+void imx6q_set_int_mem_clk_lpm(bool enable)
 {
        u32 val = readl_relaxed(ccm_base + CGPR);
 
-       val |= BM_CGPR_INT_MEM_CLK_LPM;
+       val &= ~BM_CGPR_INT_MEM_CLK_LPM;
+       if (enable)
+               val |= BM_CGPR_INT_MEM_CLK_LPM;
        writel_relaxed(val, ccm_base + CGPR);
 }
 
@@ -254,6 +274,14 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
                break;
        case STOP_POWER_ON:
                val |= 0x2 << BP_CLPCR_LPM;
+               val &= ~BM_CLPCR_VSTBY;
+               val &= ~BM_CLPCR_SBYOS;
+               if (cpu_is_imx6sl())
+                       val |= BM_CLPCR_BYPASS_PMIC_READY;
+               if (cpu_is_imx6sl() || cpu_is_imx6sx())
+                       val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
+               else
+                       val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
                break;
        case WAIT_UNCLOCKED_POWER_OFF:
                val |= 0x1 << BP_CLPCR_LPM;
@@ -265,12 +293,12 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
                val |= 0x3 << BP_CLPCR_STBY_COUNT;
                val |= BM_CLPCR_VSTBY;
                val |= BM_CLPCR_SBYOS;
-               if (cpu_is_imx6sl()) {
+               if (cpu_is_imx6sl())
                        val |= BM_CLPCR_BYPASS_PMIC_READY;
+               if (cpu_is_imx6sl() || cpu_is_imx6sx())
                        val |= BM_CLPCR_BYP_MMDC_CH0_LPM_HS;
-               } else {
+               else
                        val |= BM_CLPCR_BYP_MMDC_CH1_LPM_HS;
-               }
                break;
        default:
                return -EINVAL;
@@ -314,8 +342,22 @@ static int imx6q_suspend_finish(unsigned long val)
 static int imx6q_pm_enter(suspend_state_t state)
 {
        switch (state) {
+       case PM_SUSPEND_STANDBY:
+               imx6q_set_lpm(STOP_POWER_ON);
+               imx6q_set_int_mem_clk_lpm(true);
+               imx_gpc_pre_suspend(false);
+               if (cpu_is_imx6sl())
+                       imx6sl_set_wait_clk(true);
+               /* Zzz ... */
+               cpu_do_idle();
+               if (cpu_is_imx6sl())
+                       imx6sl_set_wait_clk(false);
+               imx_gpc_post_resume();
+               imx6q_set_lpm(WAIT_CLOCKED);
+               break;
        case PM_SUSPEND_MEM:
                imx6q_set_lpm(STOP_POWER_OFF);
+               imx6q_set_int_mem_clk_lpm(false);
                imx6q_enable_wb(true);
                /*
                 * For suspend into ocram, asm code already take care of
@@ -323,7 +365,7 @@ static int imx6q_pm_enter(suspend_state_t state)
                 */
                if (!imx6_suspend_in_ocram_fn)
                        imx6q_enable_rbc(true);
-               imx_gpc_pre_suspend();
+               imx_gpc_pre_suspend(true);
                imx_anatop_pre_suspend();
                imx_set_cpu_jump(0, v7_cpu_resume);
                /* Zzz ... */
@@ -334,6 +376,7 @@ static int imx6q_pm_enter(suspend_state_t state)
                imx_gpc_post_resume();
                imx6q_enable_rbc(false);
                imx6q_enable_wb(false);
+               imx6q_set_int_mem_clk_lpm(true);
                imx6q_set_lpm(WAIT_CLOCKED);
                break;
        default:
@@ -343,9 +386,14 @@ static int imx6q_pm_enter(suspend_state_t state)
        return 0;
 }
 
+static int imx6q_pm_valid(suspend_state_t state)
+{
+       return (state == PM_SUSPEND_STANDBY || state == PM_SUSPEND_MEM);
+}
+
 static const struct platform_suspend_ops imx6q_pm_ops = {
        .enter = imx6q_pm_enter,
-       .valid = suspend_valid_only_mem,
+       .valid = imx6q_pm_valid,
 };
 
 void __init imx6q_pm_set_ccm_base(void __iomem *base)
@@ -549,3 +597,8 @@ void __init imx6sl_pm_init(void)
 {
        imx6_pm_common_init(&imx6sl_pm_data);
 }
+
+void __init imx6sx_pm_init(void)
+{
+       imx6_pm_common_init(&imx6sx_pm_data);
+}
index 3b0733e..d14c33f 100644 (file)
@@ -42,7 +42,10 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
 {
        unsigned int wcr_enable;
 
-       if (wdog_clk)
+       if (!wdog_base)
+               goto reset_fallback;
+
+       if (!IS_ERR(wdog_clk))
                clk_enable(wdog_clk);
 
        if (cpu_is_mx1())
@@ -70,6 +73,7 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
        /* delay to allow the serial port to show the message */
        mdelay(50);
 
+reset_fallback:
        /* we'll take a jump through zero as a poor second */
        soft_restart(0);
 }
@@ -79,13 +83,10 @@ void __init mxc_arch_reset_init(void __iomem *base)
        wdog_base = base;
 
        wdog_clk = clk_get_sys("imx2-wdt.0", NULL);
-       if (IS_ERR(wdog_clk)) {
+       if (IS_ERR(wdog_clk))
                pr_warn("%s: failed to get wdog clock\n", __func__);
-               wdog_clk = NULL;
-               return;
-       }
-
-       clk_prepare(wdog_clk);
+       else
+               clk_prepare(wdog_clk);
 }
 
 void __init mxc_arch_reset_init_dt(void)
@@ -97,13 +98,10 @@ void __init mxc_arch_reset_init_dt(void)
        WARN_ON(!wdog_base);
 
        wdog_clk = of_clk_get(np, 0);
-       if (IS_ERR(wdog_clk)) {
+       if (IS_ERR(wdog_clk))
                pr_warn("%s: failed to get wdog clock\n", __func__);
-               wdog_clk = NULL;
-               return;
-       }
-
-       clk_prepare(wdog_clk);
+       else
+               clk_prepare(wdog_clk);
 }
 
 #ifdef CONFIG_CACHE_L2X0
index bed081e..bf92e5a 100644 (file)
@@ -290,25 +290,20 @@ static int __init mxc_clockevent_init(struct clk *timer_clk)
        return 0;
 }
 
-void __init mxc_timer_init(void __iomem *base, int irq)
+static void __init _mxc_timer_init(int irq,
+                                  struct clk *clk_per, struct clk *clk_ipg)
 {
        uint32_t tctl_val;
-       struct clk *timer_clk;
-       struct clk *timer_ipg_clk;
 
-       timer_clk = clk_get_sys("imx-gpt.0", "per");
-       if (IS_ERR(timer_clk)) {
+       if (IS_ERR(clk_per)) {
                pr_err("i.MX timer: unable to get clk\n");
                return;
        }
 
-       timer_ipg_clk = clk_get_sys("imx-gpt.0", "ipg");
-       if (!IS_ERR(timer_ipg_clk))
-               clk_prepare_enable(timer_ipg_clk);
-
-       clk_prepare_enable(timer_clk);
+       if (!IS_ERR(clk_ipg))
+               clk_prepare_enable(clk_ipg);
 
-       timer_base = base;
+       clk_prepare_enable(clk_per);
 
        /*
         * Initialise to a known state (all timers off, and timing reset)
@@ -325,21 +320,45 @@ void __init mxc_timer_init(void __iomem *base, int irq)
        __raw_writel(tctl_val, timer_base + MXC_TCTL);
 
        /* init and register the timer to the framework */
-       mxc_clocksource_init(timer_clk);
-       mxc_clockevent_init(timer_clk);
+       mxc_clocksource_init(clk_per);
+       mxc_clockevent_init(clk_per);
 
        /* Make irqs happen */
        setup_irq(irq, &mxc_timer_irq);
 }
 
-void __init mxc_timer_init_dt(struct device_node *np)
+void __init mxc_timer_init(void __iomem *base, int irq)
 {
-       void __iomem *base;
+       struct clk *clk_per = clk_get_sys("imx-gpt.0", "per");
+       struct clk *clk_ipg = clk_get_sys("imx-gpt.0", "ipg");
+
+       timer_base = base;
+
+       _mxc_timer_init(irq, clk_per, clk_ipg);
+}
+
+static void __init mxc_timer_init_dt(struct device_node *np)
+{
+       struct clk *clk_per, *clk_ipg;
        int irq;
 
-       base = of_iomap(np, 0);
-       WARN_ON(!base);
+       if (timer_base)
+               return;
+
+       timer_base = of_iomap(np, 0);
+       WARN_ON(!timer_base);
        irq = irq_of_parse_and_map(np, 0);
 
-       mxc_timer_init(base, irq);
+       clk_per = of_clk_get_by_name(np, "per");
+       clk_ipg = of_clk_get_by_name(np, "ipg");
+
+       _mxc_timer_init(irq, clk_per, clk_ipg);
 }
+CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx50_timer, "fsl,imx50-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx51_timer, "fsl,imx51-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt);
index 7828af4..1d4f384 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/irqdomain.h>
 #include <linux/of.h>
+#include <linux/of_address.h>
 
 #include <asm/mach/irq.h>
 #include <asm/exception.h>
@@ -153,13 +154,16 @@ static void __exception_irq_entry tzic_handle_irq(struct pt_regs *regs)
  * interrupts. It registers the interrupt enable and disable functions
  * to the kernel for each interrupt source.
  */
-void __init tzic_init_irq(void __iomem *irqbase)
+void __init tzic_init_irq(void)
 {
        struct device_node *np;
        int irq_base;
        int i;
 
-       tzic_base = irqbase;
+       np = of_find_compatible_node(NULL, NULL, "fsl,tzic");
+       tzic_base = of_iomap(np, 0);
+       WARN_ON(!tzic_base);
+
        /* put the TZIC into the reset value with
         * all interrupts disabled
         */
@@ -181,7 +185,6 @@ void __init tzic_init_irq(void __iomem *irqbase)
        irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id());
        WARN_ON(irq_base < 0);
 
-       np = of_find_compatible_node(NULL, NULL, "fsl,tzic");
        domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0,
                                       &irq_domain_simple_ops, NULL);
        WARN_ON(!domain);
index 8ca99e9..06bbadc 100644 (file)
@@ -176,13 +176,11 @@ obj-$(CONFIG_SOC_DRA7XX)          += clockdomains7xx_data.o
 
 # Clock framework
 obj-$(CONFIG_ARCH_OMAP2)               += $(clock-common) clock2xxx.o
-obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_sys.o
 obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_dpllcore.o
 obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_virt_prcm_set.o
-obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_apll.o clkt2xxx_osc.o
+obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_apll.o
 obj-$(CONFIG_ARCH_OMAP2)               += clkt2xxx_dpll.o clkt_iclk.o
-obj-$(CONFIG_SOC_OMAP2420)             += cclock2420_data.o
-obj-$(CONFIG_SOC_OMAP2430)             += clock2430.o cclock2430_data.o
+obj-$(CONFIG_SOC_OMAP2430)             += clock2430.o
 obj-$(CONFIG_ARCH_OMAP3)               += $(clock-common) clock3xxx.o
 obj-$(CONFIG_ARCH_OMAP3)               += clock34xx.o clkt34xx_dpll3m2.o
 obj-$(CONFIG_ARCH_OMAP3)               += clock3517.o clock36xx.o
diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-omap2/cclock2420_data.c
deleted file mode 100644 (file)
index 3662f4d..0000000
+++ /dev/null
@@ -1,1931 +0,0 @@
-/*
- * OMAP2420 clock data
- *
- * Copyright (C) 2005-2012 Texas Instruments, Inc.
- * Copyright (C) 2004-2011 Nokia Corporation
- *
- * Contacts:
- * Richard Woodruff <r-woodruff2@ti.com>
- * Paul Walmsley
- * Updated to COMMON clk format by Rajendra Nayak <rnayak@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.
- */
-
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/clk.h>
-#include <linux/clk-private.h>
-#include <linux/list.h>
-
-#include "soc.h"
-#include "iomap.h"
-#include "clock.h"
-#include "clock2xxx.h"
-#include "opp2xxx.h"
-#include "cm2xxx.h"
-#include "prm2xxx.h"
-#include "prm-regbits-24xx.h"
-#include "cm-regbits-24xx.h"
-#include "sdrc.h"
-#include "control.h"
-
-#define OMAP_CM_REGADDR                 OMAP2420_CM_REGADDR
-
-/*
- * 2420 clock tree.
- *
- * NOTE:In many cases here we are assigning a 'default' parent. In
- *     many cases the parent is selectable. The set parent calls will
- *     also switch sources.
- *
- *     Several sources are given initial rates which may be wrong, this will
- *     be fixed up in the init func.
- *
- *     Things are broadly separated below by clock domains. It is
- *     noteworthy that most peripherals have dependencies on multiple clock
- *     domains. Many get their interface clocks from the L4 domain, but get
- *     functional clocks from fixed sources or other core domain derived
- *     clocks.
- */
-
-DEFINE_CLK_FIXED_RATE(alt_ck, CLK_IS_ROOT, 54000000, 0x0);
-
-DEFINE_CLK_FIXED_RATE(func_32k_ck, CLK_IS_ROOT, 32768, 0x0);
-
-DEFINE_CLK_FIXED_RATE(mcbsp_clks, CLK_IS_ROOT, 0x0, 0x0);
-
-static struct clk osc_ck;
-
-static const struct clk_ops osc_ck_ops = {
-       .recalc_rate    = &omap2_osc_clk_recalc,
-};
-
-static struct clk_hw_omap osc_ck_hw = {
-       .hw = {
-               .clk = &osc_ck,
-       },
-};
-
-static struct clk osc_ck = {
-       .name   = "osc_ck",
-       .ops    = &osc_ck_ops,
-       .hw     = &osc_ck_hw.hw,
-       .flags  = CLK_IS_ROOT,
-};
-
-DEFINE_CLK_FIXED_RATE(secure_32k_ck, CLK_IS_ROOT, 32768, 0x0);
-
-static struct clk sys_ck;
-
-static const char *sys_ck_parent_names[] = {
-       "osc_ck",
-};
-
-static const struct clk_ops sys_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .recalc_rate    = &omap2xxx_sys_clk_recalc,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(sys_ck, "wkup_clkdm");
-DEFINE_STRUCT_CLK(sys_ck, sys_ck_parent_names, sys_ck_ops);
-
-static struct dpll_data dpll_dd = {
-       .mult_div1_reg  = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .mult_mask      = OMAP24XX_DPLL_MULT_MASK,
-       .div1_mask      = OMAP24XX_DPLL_DIV_MASK,
-       .clk_bypass     = &sys_ck,
-       .clk_ref        = &sys_ck,
-       .control_reg    = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_mask    = OMAP24XX_EN_DPLL_MASK,
-       .max_multiplier = 1023,
-       .min_divider    = 1,
-       .max_divider    = 16,
-};
-
-static struct clk dpll_ck;
-
-static const char *dpll_ck_parent_names[] = {
-       "sys_ck",
-};
-
-static const struct clk_ops dpll_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .get_parent     = &omap2_init_dpll_parent,
-       .recalc_rate    = &omap2_dpllcore_recalc,
-       .round_rate     = &omap2_dpll_round_rate,
-       .set_rate       = &omap2_reprogram_dpllcore,
-};
-
-static struct clk_hw_omap dpll_ck_hw = {
-       .hw = {
-               .clk = &dpll_ck,
-       },
-       .ops            = &clkhwops_omap2xxx_dpll,
-       .dpll_data      = &dpll_dd,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dpll_ck, dpll_ck_parent_names, dpll_ck_ops);
-
-static struct clk core_ck;
-
-static const char *core_ck_parent_names[] = {
-       "dpll_ck",
-};
-
-static const struct clk_ops core_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(core_ck, "wkup_clkdm");
-DEFINE_STRUCT_CLK(core_ck, core_ck_parent_names, core_ck_ops);
-
-DEFINE_CLK_DIVIDER(core_l3_ck, "core_ck", &core_ck, 0x0,
-                  OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                  OMAP24XX_CLKSEL_L3_SHIFT, OMAP24XX_CLKSEL_L3_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-DEFINE_CLK_DIVIDER(l4_ck, "core_l3_ck", &core_l3_ck, 0x0,
-                  OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                  OMAP24XX_CLKSEL_L4_SHIFT, OMAP24XX_CLKSEL_L4_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-static struct clk aes_ick;
-
-static const char *aes_ick_parent_names[] = {
-       "l4_ck",
-};
-
-static const struct clk_ops aes_ick_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-};
-
-static struct clk_hw_omap aes_ick_hw = {
-       .hw = {
-               .clk = &aes_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_AES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(aes_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk apll54_ck;
-
-static const struct clk_ops apll54_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_clk_apll54_enable,
-       .disable        = &omap2_clk_apll54_disable,
-       .recalc_rate    = &omap2_clk_apll54_recalc,
-};
-
-static struct clk_hw_omap apll54_ck_hw = {
-       .hw = {
-               .clk = &apll54_ck,
-       },
-       .ops            = &clkhwops_apll54,
-       .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_bit     = OMAP24XX_EN_54M_PLL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(apll54_ck, dpll_ck_parent_names, apll54_ck_ops);
-
-static struct clk apll96_ck;
-
-static const struct clk_ops apll96_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_clk_apll96_enable,
-       .disable        = &omap2_clk_apll96_disable,
-       .recalc_rate    = &omap2_clk_apll96_recalc,
-};
-
-static struct clk_hw_omap apll96_ck_hw = {
-       .hw = {
-               .clk = &apll96_ck,
-       },
-       .ops            = &clkhwops_apll96,
-       .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_bit     = OMAP24XX_EN_96M_PLL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(apll96_ck, dpll_ck_parent_names, apll96_ck_ops);
-
-static struct clk func_96m_ck;
-
-static const char *func_96m_ck_parent_names[] = {
-       "apll96_ck",
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(func_96m_ck, "wkup_clkdm");
-DEFINE_STRUCT_CLK(func_96m_ck, func_96m_ck_parent_names, core_ck_ops);
-
-static struct clk cam_fck;
-
-static const char *cam_fck_parent_names[] = {
-       "func_96m_ck",
-};
-
-static struct clk_hw_omap cam_fck_hw = {
-       .hw = {
-               .clk = &cam_fck,
-       },
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(cam_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk cam_ick;
-
-static struct clk_hw_omap cam_ick_hw = {
-       .hw = {
-               .clk = &cam_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(cam_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk des_ick;
-
-static struct clk_hw_omap des_ick_hw = {
-       .hw = {
-               .clk = &des_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_DES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(des_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate dsp_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 6, .val = 6, .flags = RATE_IN_242X },
-       { .div = 8, .val = 8, .flags = RATE_IN_242X },
-       { .div = 12, .val = 12, .flags = RATE_IN_242X },
-       { .div = 0 }
-};
-
-static const struct clksel dsp_fck_clksel[] = {
-       { .parent = &core_ck, .rates = dsp_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *dsp_fck_parent_names[] = {
-       "core_ck",
-};
-
-static const struct clk_ops dsp_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dsp_fck, "dsp_clkdm", dsp_fck_clksel,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-                        OMAP24XX_CLKSEL_DSP_MASK,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
-                        OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, &clkhwops_wait,
-                        dsp_fck_parent_names, dsp_fck_ops);
-
-static const struct clksel dsp_ick_clksel[] = {
-       { .parent = &dsp_fck, .rates = dsp_ick_rates },
-       { .parent = NULL },
-};
-
-static const char *dsp_ick_parent_names[] = {
-       "dsp_fck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dsp_ick, "dsp_clkdm", dsp_ick_clksel,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-                        OMAP24XX_CLKSEL_DSP_IF_MASK,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
-                        OMAP2420_EN_DSP_IPI_SHIFT, &clkhwops_iclk_wait,
-                        dsp_ick_parent_names, dsp_fck_ops);
-
-static const struct clksel_rate dss1_fck_sys_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate dss1_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 5, .val = 5, .flags = RATE_IN_24XX },
-       { .div = 6, .val = 6, .flags = RATE_IN_24XX },
-       { .div = 8, .val = 8, .flags = RATE_IN_24XX },
-       { .div = 9, .val = 9, .flags = RATE_IN_24XX },
-       { .div = 12, .val = 12, .flags = RATE_IN_24XX },
-       { .div = 16, .val = 16, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel dss1_fck_clksel[] = {
-       { .parent = &sys_ck, .rates = dss1_fck_sys_rates },
-       { .parent = &core_ck, .rates = dss1_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *dss1_fck_parent_names[] = {
-       "sys_ck", "core_ck",
-};
-
-static struct clk dss1_fck;
-
-static const struct clk_ops dss1_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dss1_fck, "dss_clkdm", dss1_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_DSS1_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_DSS1_SHIFT, NULL,
-                        dss1_fck_parent_names, dss1_fck_ops);
-
-static const struct clksel_rate dss2_fck_sys_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate dss2_fck_48m_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate func_48m_apll96_rates[] = {
-       { .div = 2, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate func_48m_alt_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel func_48m_clksel[] = {
-       { .parent = &apll96_ck, .rates = func_48m_apll96_rates },
-       { .parent = &alt_ck, .rates = func_48m_alt_rates },
-       { .parent = NULL },
-};
-
-static const char *func_48m_ck_parent_names[] = {
-       "apll96_ck", "alt_ck",
-};
-
-static struct clk func_48m_ck;
-
-static const struct clk_ops func_48m_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-static struct clk_hw_omap func_48m_ck_hw = {
-       .hw = {
-               .clk = &func_48m_ck,
-       },
-       .clksel         = func_48m_clksel,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .clksel_mask    = OMAP24XX_48M_SOURCE_MASK,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(func_48m_ck, func_48m_ck_parent_names, func_48m_ck_ops);
-
-static const struct clksel dss2_fck_clksel[] = {
-       { .parent = &sys_ck, .rates = dss2_fck_sys_rates },
-       { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates },
-       { .parent = NULL },
-};
-
-static const char *dss2_fck_parent_names[] = {
-       "sys_ck", "func_48m_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dss2_fck, "dss_clkdm", dss2_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_DSS2_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_DSS2_SHIFT, NULL,
-                        dss2_fck_parent_names, dss1_fck_ops);
-
-static const char *func_54m_ck_parent_names[] = {
-       "apll54_ck", "alt_ck",
-};
-
-DEFINE_CLK_MUX(func_54m_ck, func_54m_ck_parent_names, NULL, 0x0,
-              OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-              OMAP24XX_54M_SOURCE_SHIFT, OMAP24XX_54M_SOURCE_WIDTH,
-              0x0, NULL);
-
-static struct clk dss_54m_fck;
-
-static const char *dss_54m_fck_parent_names[] = {
-       "func_54m_ck",
-};
-
-static struct clk_hw_omap dss_54m_fck_hw = {
-       .hw = {
-               .clk = &dss_54m_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_TV_SHIFT,
-       .clkdm_name     = "dss_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dss_54m_fck, dss_54m_fck_parent_names, aes_ick_ops);
-
-static struct clk dss_ick;
-
-static struct clk_hw_omap dss_ick_hw = {
-       .hw = {
-               .clk = &dss_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_DSS1_SHIFT,
-       .clkdm_name     = "dss_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dss_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk eac_fck;
-
-static struct clk_hw_omap eac_fck_hw = {
-       .hw = {
-               .clk = &eac_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP2420_EN_EAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(eac_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk eac_ick;
-
-static struct clk_hw_omap eac_ick_hw = {
-       .hw = {
-               .clk = &eac_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_EAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(eac_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk emul_ck;
-
-static struct clk_hw_omap emul_ck_hw = {
-       .hw = {
-               .clk = &emul_ck,
-       },
-       .enable_reg     = OMAP2420_PRCM_CLKEMUL_CTRL,
-       .enable_bit     = OMAP24XX_EMULATION_EN_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(emul_ck, dss_54m_fck_parent_names, aes_ick_ops);
-
-DEFINE_CLK_FIXED_FACTOR(func_12m_ck, "func_48m_ck", &func_48m_ck, 0x0, 1, 4);
-
-static struct clk fac_fck;
-
-static const char *fac_fck_parent_names[] = {
-       "func_12m_ck",
-};
-
-static struct clk_hw_omap fac_fck_hw = {
-       .hw = {
-               .clk = &fac_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(fac_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk fac_ick;
-
-static struct clk_hw_omap fac_ick_hw = {
-       .hw = {
-               .clk = &fac_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(fac_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel gfx_fck_clksel[] = {
-       { .parent = &core_l3_ck, .rates = gfx_l3_rates },
-       { .parent = NULL },
-};
-
-static const char *gfx_2d_fck_parent_names[] = {
-       "core_l3_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gfx_2d_fck, "gfx_clkdm", gfx_fck_clksel,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
-                        OMAP_CLKSEL_GFX_MASK,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_2D_SHIFT, &clkhwops_wait,
-                        gfx_2d_fck_parent_names, dsp_fck_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gfx_3d_fck, "gfx_clkdm", gfx_fck_clksel,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
-                        OMAP_CLKSEL_GFX_MASK,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_3D_SHIFT, &clkhwops_wait,
-                        gfx_2d_fck_parent_names, dsp_fck_ops);
-
-static struct clk gfx_ick;
-
-static const char *gfx_ick_parent_names[] = {
-       "core_l3_ck",
-};
-
-static struct clk_hw_omap gfx_ick_hw = {
-       .hw = {
-               .clk = &gfx_ick,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP_EN_GFX_SHIFT,
-       .clkdm_name     = "gfx_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gfx_ick, gfx_ick_parent_names, aes_ick_ops);
-
-static struct clk gpios_fck;
-
-static const char *gpios_fck_parent_names[] = {
-       "func_32k_ck",
-};
-
-static struct clk_hw_omap gpios_fck_hw = {
-       .hw = {
-               .clk = &gpios_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpios_fck, gpios_fck_parent_names, aes_ick_ops);
-
-static struct clk gpios_ick;
-
-static const char *gpios_ick_parent_names[] = {
-       "sys_ck",
-};
-
-static struct clk_hw_omap gpios_ick_hw = {
-       .hw = {
-               .clk = &gpios_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpios_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk gpmc_fck;
-
-static struct clk_hw_omap gpmc_fck_hw = {
-       .hw = {
-               .clk = &gpmc_fck,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP24XX_AUTO_GPMC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpmc_fck, gfx_ick_parent_names, core_ck_ops);
-
-static const struct clksel_rate gpt_alt_rates[] = {
-       { .div = 1, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel omap24xx_gpt_clksel[] = {
-       { .parent = &func_32k_ck, .rates = gpt_32k_rates },
-       { .parent = &sys_ck, .rates = gpt_sys_rates },
-       { .parent = &alt_ck, .rates = gpt_alt_rates },
-       { .parent = NULL },
-};
-
-static const char *gpt10_fck_parent_names[] = {
-       "func_32k_ck", "sys_ck", "alt_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt10_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT10_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT10_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt10_ick;
-
-static struct clk_hw_omap gpt10_ick_hw = {
-       .hw = {
-               .clk = &gpt10_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT10_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt10_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt11_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT11_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT11_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt11_ick;
-
-static struct clk_hw_omap gpt11_ick_hw = {
-       .hw = {
-               .clk = &gpt11_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT11_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt11_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt12_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT12_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT12_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt12_ick;
-
-static struct clk_hw_omap gpt12_ick_hw = {
-       .hw = {
-               .clk = &gpt12_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT12_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt12_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clk_ops gpt1_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt1_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_GPT1_MASK,
-                        OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_GPT1_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, gpt1_fck_ops);
-
-static struct clk gpt1_ick;
-
-static struct clk_hw_omap gpt1_ick_hw = {
-       .hw = {
-               .clk = &gpt1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt1_ick, gpios_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt2_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT2_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT2_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt2_ick;
-
-static struct clk_hw_omap gpt2_ick_hw = {
-       .hw = {
-               .clk = &gpt2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt2_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt3_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT3_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT3_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt3_ick;
-
-static struct clk_hw_omap gpt3_ick_hw = {
-       .hw = {
-               .clk = &gpt3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt3_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt4_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT4_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT4_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt4_ick;
-
-static struct clk_hw_omap gpt4_ick_hw = {
-       .hw = {
-               .clk = &gpt4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt4_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt5_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT5_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT5_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt5_ick;
-
-static struct clk_hw_omap gpt5_ick_hw = {
-       .hw = {
-               .clk = &gpt5_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT5_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt5_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt6_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT6_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT6_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt6_ick;
-
-static struct clk_hw_omap gpt6_ick_hw = {
-       .hw = {
-               .clk = &gpt6_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT6_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt6_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt7_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT7_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT7_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt7_ick;
-
-static struct clk_hw_omap gpt7_ick_hw = {
-       .hw = {
-               .clk = &gpt7_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt7_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt8_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT8_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT8_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt8_ick;
-
-static struct clk_hw_omap gpt8_ick_hw = {
-       .hw = {
-               .clk = &gpt8_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT8_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt8_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt9_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT9_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT9_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt9_ick;
-
-static struct clk_hw_omap gpt9_ick_hw = {
-       .hw = {
-               .clk = &gpt9_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT9_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt9_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk hdq_fck;
-
-static struct clk_hw_omap hdq_fck_hw = {
-       .hw = {
-               .clk = &hdq_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(hdq_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk hdq_ick;
-
-static struct clk_hw_omap hdq_ick_hw = {
-       .hw = {
-               .clk = &hdq_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(hdq_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk i2c1_fck;
-
-static struct clk_hw_omap i2c1_fck_hw = {
-       .hw = {
-               .clk = &i2c1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c1_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk i2c1_ick;
-
-static struct clk_hw_omap i2c1_ick_hw = {
-       .hw = {
-               .clk = &i2c1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk i2c2_fck;
-
-static struct clk_hw_omap i2c2_fck_hw = {
-       .hw = {
-               .clk = &i2c2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c2_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk i2c2_ick;
-
-static struct clk_hw_omap i2c2_ick_hw = {
-       .hw = {
-               .clk = &i2c2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c2_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(iva1_ifck, "iva1_clkdm", dsp_fck_clksel,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-                        OMAP2420_CLKSEL_IVA_MASK,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
-                        OMAP2420_EN_IVA_COP_SHIFT, &clkhwops_wait,
-                        dsp_fck_parent_names, dsp_fck_ops);
-
-static struct clk iva1_mpu_int_ifck;
-
-static const char *iva1_mpu_int_ifck_parent_names[] = {
-       "iva1_ifck",
-};
-
-static const struct clk_ops iva1_mpu_int_ifck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap_fixed_divisor_recalc,
-};
-
-static struct clk_hw_omap iva1_mpu_int_ifck_hw = {
-       .hw = {
-               .clk = &iva1_mpu_int_ifck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP2420_EN_IVA_MPU_SHIFT,
-       .clkdm_name     = "iva1_clkdm",
-       .fixed_div      = 2,
-};
-
-DEFINE_STRUCT_CLK(iva1_mpu_int_ifck, iva1_mpu_int_ifck_parent_names,
-                 iva1_mpu_int_ifck_ops);
-
-static struct clk mailboxes_ick;
-
-static struct clk_hw_omap mailboxes_ick_hw = {
-       .hw = {
-               .clk = &mailboxes_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MAILBOXES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mailboxes_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate common_mcbsp_96m_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel mcbsp_fck_clksel[] = {
-       { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates },
-       { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
-       { .parent = NULL },
-};
-
-static const char *mcbsp1_fck_parent_names[] = {
-       "func_96m_ck", "mcbsp_clks",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp1_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
-                        OMAP2_MCBSP1_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_MCBSP1_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp1_ick;
-
-static struct clk_hw_omap mcbsp1_ick_hw = {
-       .hw = {
-               .clk = &mcbsp1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCBSP1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp1_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp2_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
-                        OMAP2_MCBSP2_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_MCBSP2_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp2_ick;
-
-static struct clk_hw_omap mcbsp2_ick_hw = {
-       .hw = {
-               .clk = &mcbsp2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCBSP2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mcspi1_fck;
-
-static const char *mcspi1_fck_parent_names[] = {
-       "func_48m_ck",
-};
-
-static struct clk_hw_omap mcspi1_fck_hw = {
-       .hw = {
-               .clk = &mcspi1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi1_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk mcspi1_ick;
-
-static struct clk_hw_omap mcspi1_ick_hw = {
-       .hw = {
-               .clk = &mcspi1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mcspi2_fck;
-
-static struct clk_hw_omap mcspi2_fck_hw = {
-       .hw = {
-               .clk = &mcspi2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi2_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk mcspi2_ick;
-
-static struct clk_hw_omap mcspi2_ick_hw = {
-       .hw = {
-               .clk = &mcspi2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mmc_fck;
-
-static struct clk_hw_omap mmc_fck_hw = {
-       .hw = {
-               .clk = &mmc_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP2420_EN_MMC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmc_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk mmc_ick;
-
-static struct clk_hw_omap mmc_ick_hw = {
-       .hw = {
-               .clk = &mmc_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_MMC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmc_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_DIVIDER(mpu_ck, "core_ck", &core_ck, 0x0,
-                  OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
-                  OMAP24XX_CLKSEL_MPU_SHIFT, OMAP24XX_CLKSEL_MPU_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-static struct clk mpu_wdt_fck;
-
-static struct clk_hw_omap mpu_wdt_fck_hw = {
-       .hw = {
-               .clk = &mpu_wdt_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mpu_wdt_fck, gpios_fck_parent_names, aes_ick_ops);
-
-static struct clk mpu_wdt_ick;
-
-static struct clk_hw_omap mpu_wdt_ick_hw = {
-       .hw = {
-               .clk = &mpu_wdt_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mpu_wdt_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk mspro_fck;
-
-static struct clk_hw_omap mspro_fck_hw = {
-       .hw = {
-               .clk = &mspro_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mspro_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk mspro_ick;
-
-static struct clk_hw_omap mspro_ick_hw = {
-       .hw = {
-               .clk = &mspro_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mspro_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk omapctrl_ick;
-
-static struct clk_hw_omap omapctrl_ick_hw = {
-       .hw = {
-               .clk = &omapctrl_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_OMAPCTRL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(omapctrl_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk pka_ick;
-
-static struct clk_hw_omap pka_ick_hw = {
-       .hw = {
-               .clk = &pka_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_PKA_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(pka_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk rng_ick;
-
-static struct clk_hw_omap rng_ick_hw = {
-       .hw = {
-               .clk = &rng_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_RNG_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(rng_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk sdma_fck;
-
-DEFINE_STRUCT_CLK_HW_OMAP(sdma_fck, "core_l3_clkdm");
-DEFINE_STRUCT_CLK(sdma_fck, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sdma_ick;
-
-static struct clk_hw_omap sdma_ick_hw = {
-       .hw = {
-               .clk = &sdma_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP24XX_AUTO_SDMA_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sdma_ick, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sdrc_ick;
-
-static struct clk_hw_omap sdrc_ick_hw = {
-       .hw = {
-               .clk = &sdrc_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP24XX_AUTO_SDRC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sdrc_ick, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sha_ick;
-
-static struct clk_hw_omap sha_ick_hw = {
-       .hw = {
-               .clk = &sha_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_SHA_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sha_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk ssi_l4_ick;
-
-static struct clk_hw_omap ssi_l4_ick_hw = {
-       .hw = {
-               .clk = &ssi_l4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP24XX_EN_SSI_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(ssi_l4_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 6, .val = 6, .flags = RATE_IN_242X },
-       { .div = 8, .val = 8, .flags = RATE_IN_242X },
-       { .div = 0 }
-};
-
-static const struct clksel ssi_ssr_sst_fck_clksel[] = {
-       { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *ssi_ssr_sst_fck_parent_names[] = {
-       "core_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_sst_fck, "core_l3_clkdm",
-                        ssi_ssr_sst_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_SSI_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-                        OMAP24XX_EN_SSI_SHIFT, &clkhwops_wait,
-                        ssi_ssr_sst_fck_parent_names, dsp_fck_ops);
-
-static struct clk sync_32k_ick;
-
-static struct clk_hw_omap sync_32k_ick_hw = {
-       .hw = {
-               .clk = &sync_32k_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_32KSYNC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sync_32k_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate common_clkout_src_core_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_sys_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_96m_rates[] = {
-       { .div = 1, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_54m_rates[] = {
-       { .div = 1, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel common_clkout_src_clksel[] = {
-       { .parent = &core_ck, .rates = common_clkout_src_core_rates },
-       { .parent = &sys_ck, .rates = common_clkout_src_sys_rates },
-       { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates },
-       { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates },
-       { .parent = NULL },
-};
-
-static const char *sys_clkout_src_parent_names[] = {
-       "core_ck", "sys_ck", "func_96m_ck", "func_54m_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(sys_clkout_src, "wkup_clkdm", common_clkout_src_clksel,
-                        OMAP2420_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_SOURCE_MASK,
-                        OMAP2420_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_EN_SHIFT,
-                        NULL, sys_clkout_src_parent_names, gpt1_fck_ops);
-
-DEFINE_CLK_DIVIDER(sys_clkout, "sys_clkout_src", &sys_clkout_src, 0x0,
-                  OMAP2420_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_DIV_SHIFT,
-                  OMAP24XX_CLKOUT_DIV_WIDTH, CLK_DIVIDER_POWER_OF_TWO, NULL);
-
-DEFINE_CLK_OMAP_MUX_GATE(sys_clkout2_src, "wkup_clkdm",
-                        common_clkout_src_clksel, OMAP2420_PRCM_CLKOUT_CTRL,
-                        OMAP2420_CLKOUT2_SOURCE_MASK,
-                        OMAP2420_PRCM_CLKOUT_CTRL, OMAP2420_CLKOUT2_EN_SHIFT,
-                        NULL, sys_clkout_src_parent_names, gpt1_fck_ops);
-
-DEFINE_CLK_DIVIDER(sys_clkout2, "sys_clkout2_src", &sys_clkout2_src, 0x0,
-                  OMAP2420_PRCM_CLKOUT_CTRL, OMAP2420_CLKOUT2_DIV_SHIFT,
-                  OMAP2420_CLKOUT2_DIV_WIDTH, CLK_DIVIDER_POWER_OF_TWO, NULL);
-
-static struct clk uart1_fck;
-
-static struct clk_hw_omap uart1_fck_hw = {
-       .hw = {
-               .clk = &uart1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart1_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart1_ick;
-
-static struct clk_hw_omap uart1_ick_hw = {
-       .hw = {
-               .clk = &uart1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk uart2_fck;
-
-static struct clk_hw_omap uart2_fck_hw = {
-       .hw = {
-               .clk = &uart2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart2_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart2_ick;
-
-static struct clk_hw_omap uart2_ick_hw = {
-       .hw = {
-               .clk = &uart2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk uart3_fck;
-
-static struct clk_hw_omap uart3_fck_hw = {
-       .hw = {
-               .clk = &uart3_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart3_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart3_ick;
-
-static struct clk_hw_omap uart3_ick_hw = {
-       .hw = {
-               .clk = &uart3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart3_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk usb_fck;
-
-static struct clk_hw_omap usb_fck_hw = {
-       .hw = {
-               .clk = &usb_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP24XX_EN_USB_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(usb_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static const struct clksel_rate usb_l4_ick_core_l3_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel usb_l4_ick_clksel[] = {
-       { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates },
-       { .parent = NULL },
-};
-
-static const char *usb_l4_ick_parent_names[] = {
-       "core_l3_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(usb_l4_ick, "core_l4_clkdm", usb_l4_ick_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_USB_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-                        OMAP24XX_EN_USB_SHIFT, &clkhwops_iclk_wait,
-                        usb_l4_ick_parent_names, dsp_fck_ops);
-
-static struct clk virt_prcm_set;
-
-static const char *virt_prcm_set_parent_names[] = {
-       "mpu_ck",
-};
-
-static const struct clk_ops virt_prcm_set_ops = {
-       .recalc_rate    = &omap2_table_mpu_recalc,
-       .set_rate       = &omap2_select_table_rate,
-       .round_rate     = &omap2_round_to_table_rate,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(virt_prcm_set, NULL);
-DEFINE_STRUCT_CLK(virt_prcm_set, virt_prcm_set_parent_names, virt_prcm_set_ops);
-
-static const struct clksel_rate vlynq_fck_96m_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_242X },
-       { .div = 0 }
-};
-
-static const struct clksel_rate vlynq_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_242X },
-       { .div = 2, .val = 2, .flags = RATE_IN_242X },
-       { .div = 3, .val = 3, .flags = RATE_IN_242X },
-       { .div = 4, .val = 4, .flags = RATE_IN_242X },
-       { .div = 6, .val = 6, .flags = RATE_IN_242X },
-       { .div = 8, .val = 8, .flags = RATE_IN_242X },
-       { .div = 9, .val = 9, .flags = RATE_IN_242X },
-       { .div = 12, .val = 12, .flags = RATE_IN_242X },
-       { .div = 16, .val = 16, .flags = RATE_IN_242X },
-       { .div = 18, .val = 18, .flags = RATE_IN_242X },
-       { .div = 0 }
-};
-
-static const struct clksel vlynq_fck_clksel[] = {
-       { .parent = &func_96m_ck, .rates = vlynq_fck_96m_rates },
-       { .parent = &core_ck, .rates = vlynq_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *vlynq_fck_parent_names[] = {
-       "func_96m_ck", "core_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(vlynq_fck, "core_l3_clkdm", vlynq_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP2420_CLKSEL_VLYNQ_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP2420_EN_VLYNQ_SHIFT, &clkhwops_wait,
-                        vlynq_fck_parent_names, dss1_fck_ops);
-
-static struct clk vlynq_ick;
-
-static struct clk_hw_omap vlynq_ick_hw = {
-       .hw = {
-               .clk = &vlynq_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_VLYNQ_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(vlynq_ick, gfx_ick_parent_names, aes_ick_ops);
-
-static struct clk wdt1_ick;
-
-static struct clk_hw_omap wdt1_ick_hw = {
-       .hw = {
-               .clk = &wdt1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_WDT1_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt1_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk wdt3_fck;
-
-static struct clk_hw_omap wdt3_fck_hw = {
-       .hw = {
-               .clk = &wdt3_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP2420_EN_WDT3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt3_fck, gpios_fck_parent_names, aes_ick_ops);
-
-static struct clk wdt3_ick;
-
-static struct clk_hw_omap wdt3_ick_hw = {
-       .hw = {
-               .clk = &wdt3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_WDT3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt3_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk wdt4_fck;
-
-static struct clk_hw_omap wdt4_fck_hw = {
-       .hw = {
-               .clk = &wdt4_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt4_fck, gpios_fck_parent_names, aes_ick_ops);
-
-static struct clk wdt4_ick;
-
-static struct clk_hw_omap wdt4_ick_hw = {
-       .hw = {
-               .clk = &wdt4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt4_ick, aes_ick_parent_names, aes_ick_ops);
-
-/*
- * clkdev integration
- */
-
-static struct omap_clk omap2420_clks[] = {
-       /* external root sources */
-       CLK(NULL,       "func_32k_ck",  &func_32k_ck),
-       CLK(NULL,       "secure_32k_ck", &secure_32k_ck),
-       CLK(NULL,       "osc_ck",       &osc_ck),
-       CLK(NULL,       "sys_ck",       &sys_ck),
-       CLK(NULL,       "alt_ck",       &alt_ck),
-       CLK(NULL,       "mcbsp_clks",   &mcbsp_clks),
-       /* internal analog sources */
-       CLK(NULL,       "dpll_ck",      &dpll_ck),
-       CLK(NULL,       "apll96_ck",    &apll96_ck),
-       CLK(NULL,       "apll54_ck",    &apll54_ck),
-       /* internal prcm root sources */
-       CLK(NULL,       "func_54m_ck",  &func_54m_ck),
-       CLK(NULL,       "core_ck",      &core_ck),
-       CLK(NULL,       "func_96m_ck",  &func_96m_ck),
-       CLK(NULL,       "func_48m_ck",  &func_48m_ck),
-       CLK(NULL,       "func_12m_ck",  &func_12m_ck),
-       CLK(NULL,       "sys_clkout_src", &sys_clkout_src),
-       CLK(NULL,       "sys_clkout",   &sys_clkout),
-       CLK(NULL,       "sys_clkout2_src", &sys_clkout2_src),
-       CLK(NULL,       "sys_clkout2",  &sys_clkout2),
-       CLK(NULL,       "emul_ck",      &emul_ck),
-       /* mpu domain clocks */
-       CLK(NULL,       "mpu_ck",       &mpu_ck),
-       /* dsp domain clocks */
-       CLK(NULL,       "dsp_fck",      &dsp_fck),
-       CLK(NULL,       "dsp_ick",      &dsp_ick),
-       CLK(NULL,       "iva1_ifck",    &iva1_ifck),
-       CLK(NULL,       "iva1_mpu_int_ifck", &iva1_mpu_int_ifck),
-       /* GFX domain clocks */
-       CLK(NULL,       "gfx_3d_fck",   &gfx_3d_fck),
-       CLK(NULL,       "gfx_2d_fck",   &gfx_2d_fck),
-       CLK(NULL,       "gfx_ick",      &gfx_ick),
-       /* DSS domain clocks */
-       CLK("omapdss_dss",      "ick",          &dss_ick),
-       CLK(NULL,       "dss_ick",              &dss_ick),
-       CLK(NULL,       "dss1_fck",             &dss1_fck),
-       CLK(NULL,       "dss2_fck",     &dss2_fck),
-       CLK(NULL,       "dss_54m_fck",  &dss_54m_fck),
-       /* L3 domain clocks */
-       CLK(NULL,       "core_l3_ck",   &core_l3_ck),
-       CLK(NULL,       "ssi_fck",      &ssi_ssr_sst_fck),
-       CLK(NULL,       "usb_l4_ick",   &usb_l4_ick),
-       /* L4 domain clocks */
-       CLK(NULL,       "l4_ck",        &l4_ck),
-       CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick),
-       /* virtual meta-group clock */
-       CLK(NULL,       "virt_prcm_set", &virt_prcm_set),
-       /* general l4 interface ck, multi-parent functional clk */
-       CLK(NULL,       "gpt1_ick",     &gpt1_ick),
-       CLK(NULL,       "gpt1_fck",     &gpt1_fck),
-       CLK(NULL,       "gpt2_ick",     &gpt2_ick),
-       CLK(NULL,       "gpt2_fck",     &gpt2_fck),
-       CLK(NULL,       "gpt3_ick",     &gpt3_ick),
-       CLK(NULL,       "gpt3_fck",     &gpt3_fck),
-       CLK(NULL,       "gpt4_ick",     &gpt4_ick),
-       CLK(NULL,       "gpt4_fck",     &gpt4_fck),
-       CLK(NULL,       "gpt5_ick",     &gpt5_ick),
-       CLK(NULL,       "gpt5_fck",     &gpt5_fck),
-       CLK(NULL,       "gpt6_ick",     &gpt6_ick),
-       CLK(NULL,       "gpt6_fck",     &gpt6_fck),
-       CLK(NULL,       "gpt7_ick",     &gpt7_ick),
-       CLK(NULL,       "gpt7_fck",     &gpt7_fck),
-       CLK(NULL,       "gpt8_ick",     &gpt8_ick),
-       CLK(NULL,       "gpt8_fck",     &gpt8_fck),
-       CLK(NULL,       "gpt9_ick",     &gpt9_ick),
-       CLK(NULL,       "gpt9_fck",     &gpt9_fck),
-       CLK(NULL,       "gpt10_ick",    &gpt10_ick),
-       CLK(NULL,       "gpt10_fck",    &gpt10_fck),
-       CLK(NULL,       "gpt11_ick",    &gpt11_ick),
-       CLK(NULL,       "gpt11_fck",    &gpt11_fck),
-       CLK(NULL,       "gpt12_ick",    &gpt12_ick),
-       CLK(NULL,       "gpt12_fck",    &gpt12_fck),
-       CLK("omap-mcbsp.1", "ick",      &mcbsp1_ick),
-       CLK(NULL,       "mcbsp1_ick",   &mcbsp1_ick),
-       CLK(NULL,       "mcbsp1_fck",   &mcbsp1_fck),
-       CLK("omap-mcbsp.2", "ick",      &mcbsp2_ick),
-       CLK(NULL,       "mcbsp2_ick",   &mcbsp2_ick),
-       CLK(NULL,       "mcbsp2_fck",   &mcbsp2_fck),
-       CLK("omap2_mcspi.1", "ick",     &mcspi1_ick),
-       CLK(NULL,       "mcspi1_ick",   &mcspi1_ick),
-       CLK(NULL,       "mcspi1_fck",   &mcspi1_fck),
-       CLK("omap2_mcspi.2", "ick",     &mcspi2_ick),
-       CLK(NULL,       "mcspi2_ick",   &mcspi2_ick),
-       CLK(NULL,       "mcspi2_fck",   &mcspi2_fck),
-       CLK(NULL,       "uart1_ick",    &uart1_ick),
-       CLK(NULL,       "uart1_fck",    &uart1_fck),
-       CLK(NULL,       "uart2_ick",    &uart2_ick),
-       CLK(NULL,       "uart2_fck",    &uart2_fck),
-       CLK(NULL,       "uart3_ick",    &uart3_ick),
-       CLK(NULL,       "uart3_fck",    &uart3_fck),
-       CLK(NULL,       "gpios_ick",    &gpios_ick),
-       CLK(NULL,       "gpios_fck",    &gpios_fck),
-       CLK("omap_wdt", "ick",          &mpu_wdt_ick),
-       CLK(NULL,       "mpu_wdt_ick",          &mpu_wdt_ick),
-       CLK(NULL,       "mpu_wdt_fck",  &mpu_wdt_fck),
-       CLK(NULL,       "sync_32k_ick", &sync_32k_ick),
-       CLK(NULL,       "wdt1_ick",     &wdt1_ick),
-       CLK(NULL,       "omapctrl_ick", &omapctrl_ick),
-       CLK("omap24xxcam", "fck",       &cam_fck),
-       CLK(NULL,       "cam_fck",      &cam_fck),
-       CLK("omap24xxcam", "ick",       &cam_ick),
-       CLK(NULL,       "cam_ick",      &cam_ick),
-       CLK(NULL,       "mailboxes_ick", &mailboxes_ick),
-       CLK(NULL,       "wdt4_ick",     &wdt4_ick),
-       CLK(NULL,       "wdt4_fck",     &wdt4_fck),
-       CLK(NULL,       "wdt3_ick",     &wdt3_ick),
-       CLK(NULL,       "wdt3_fck",     &wdt3_fck),
-       CLK(NULL,       "mspro_ick",    &mspro_ick),
-       CLK(NULL,       "mspro_fck",    &mspro_fck),
-       CLK("mmci-omap.0", "ick",       &mmc_ick),
-       CLK(NULL,       "mmc_ick",      &mmc_ick),
-       CLK("mmci-omap.0", "fck",       &mmc_fck),
-       CLK(NULL,       "mmc_fck",      &mmc_fck),
-       CLK(NULL,       "fac_ick",      &fac_ick),
-       CLK(NULL,       "fac_fck",      &fac_fck),
-       CLK(NULL,       "eac_ick",      &eac_ick),
-       CLK(NULL,       "eac_fck",      &eac_fck),
-       CLK("omap_hdq.0", "ick",        &hdq_ick),
-       CLK(NULL,       "hdq_ick",      &hdq_ick),
-       CLK("omap_hdq.0", "fck",        &hdq_fck),
-       CLK(NULL,       "hdq_fck",      &hdq_fck),
-       CLK("omap_i2c.1", "ick",        &i2c1_ick),
-       CLK(NULL,       "i2c1_ick",     &i2c1_ick),
-       CLK(NULL,       "i2c1_fck",     &i2c1_fck),
-       CLK("omap_i2c.2", "ick",        &i2c2_ick),
-       CLK(NULL,       "i2c2_ick",     &i2c2_ick),
-       CLK(NULL,       "i2c2_fck",     &i2c2_fck),
-       CLK(NULL,       "gpmc_fck",     &gpmc_fck),
-       CLK(NULL,       "sdma_fck",     &sdma_fck),
-       CLK(NULL,       "sdma_ick",     &sdma_ick),
-       CLK(NULL,       "sdrc_ick",     &sdrc_ick),
-       CLK(NULL,       "vlynq_ick",    &vlynq_ick),
-       CLK(NULL,       "vlynq_fck",    &vlynq_fck),
-       CLK(NULL,       "des_ick",      &des_ick),
-       CLK("omap-sham",        "ick",  &sha_ick),
-       CLK(NULL,       "sha_ick",      &sha_ick),
-       CLK("omap_rng", "ick",          &rng_ick),
-       CLK(NULL,       "rng_ick",              &rng_ick),
-       CLK("omap-aes", "ick",  &aes_ick),
-       CLK(NULL,       "aes_ick",      &aes_ick),
-       CLK(NULL,       "pka_ick",      &pka_ick),
-       CLK(NULL,       "usb_fck",      &usb_fck),
-       CLK("musb-hdrc",        "fck",  &osc_ck),
-       CLK(NULL,       "timer_32k_ck", &func_32k_ck),
-       CLK(NULL,       "timer_sys_ck", &sys_ck),
-       CLK(NULL,       "timer_ext_ck", &alt_ck),
-       CLK(NULL,       "cpufreq_ck",   &virt_prcm_set),
-};
-
-
-static const char *enable_init_clks[] = {
-       "apll96_ck",
-       "apll54_ck",
-       "sync_32k_ick",
-       "omapctrl_ick",
-       "gpmc_fck",
-       "sdrc_ick",
-};
-
-/*
- * init code
- */
-
-int __init omap2420_clk_init(void)
-{
-       prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL;
-       cpu_mask = RATE_IN_242X;
-       rate_table = omap2420_rate_table;
-
-       omap2xxx_clkt_dpllcore_init(&dpll_ck_hw.hw);
-
-       omap2xxx_clkt_vps_check_bootloader_rates();
-
-       omap_clocks_register(omap2420_clks, ARRAY_SIZE(omap2420_clks));
-
-       omap2xxx_clkt_vps_late_init();
-
-       omap2_clk_disable_autoidle_all();
-
-       omap2_clk_enable_init_clocks(enable_init_clks,
-                                    ARRAY_SIZE(enable_init_clks));
-
-       pr_info("Clocking rate (Crystal/DPLL/MPU): %ld.%01ld/%ld/%ld MHz\n",
-               (clk_get_rate(&sys_ck) / 1000000),
-               (clk_get_rate(&sys_ck) / 100000) % 10,
-               (clk_get_rate(&dpll_ck) / 1000000),
-               (clk_get_rate(&mpu_ck) / 1000000));
-
-       return 0;
-}
diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c
deleted file mode 100644 (file)
index 5e4b037..0000000
+++ /dev/null
@@ -1,2048 +0,0 @@
-/*
- * OMAP2430 clock data
- *
- * Copyright (C) 2005-2009, 2012 Texas Instruments, Inc.
- * Copyright (C) 2004-2011 Nokia Corporation
- *
- * Contacts:
- * Richard Woodruff <r-woodruff2@ti.com>
- * Paul Walmsley
- *
- * 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 <linux/kernel.h>
-#include <linux/clk.h>
-#include <linux/clk-private.h>
-#include <linux/list.h>
-
-#include "soc.h"
-#include "iomap.h"
-#include "clock.h"
-#include "clock2xxx.h"
-#include "opp2xxx.h"
-#include "cm2xxx.h"
-#include "prm2xxx.h"
-#include "prm-regbits-24xx.h"
-#include "cm-regbits-24xx.h"
-#include "sdrc.h"
-#include "control.h"
-
-#define OMAP_CM_REGADDR                        OMAP2430_CM_REGADDR
-
-/*
- * 2430 clock tree.
- *
- * NOTE:In many cases here we are assigning a 'default' parent. In
- *     many cases the parent is selectable. The set parent calls will
- *     also switch sources.
- *
- *     Several sources are given initial rates which may be wrong, this will
- *     be fixed up in the init func.
- *
- *     Things are broadly separated below by clock domains. It is
- *     noteworthy that most peripherals have dependencies on multiple clock
- *     domains. Many get their interface clocks from the L4 domain, but get
- *     functional clocks from fixed sources or other core domain derived
- *     clocks.
- */
-
-DEFINE_CLK_FIXED_RATE(alt_ck, CLK_IS_ROOT, 54000000, 0x0);
-
-DEFINE_CLK_FIXED_RATE(func_32k_ck, CLK_IS_ROOT, 32768, 0x0);
-
-DEFINE_CLK_FIXED_RATE(mcbsp_clks, CLK_IS_ROOT, 0x0, 0x0);
-
-static struct clk osc_ck;
-
-static const struct clk_ops osc_ck_ops = {
-       .enable         = &omap2_enable_osc_ck,
-       .disable        = omap2_disable_osc_ck,
-       .recalc_rate    = &omap2_osc_clk_recalc,
-};
-
-static struct clk_hw_omap osc_ck_hw = {
-       .hw = {
-               .clk = &osc_ck,
-       },
-};
-
-static struct clk osc_ck = {
-       .name   = "osc_ck",
-       .ops    = &osc_ck_ops,
-       .hw     = &osc_ck_hw.hw,
-       .flags  = CLK_IS_ROOT,
-};
-
-DEFINE_CLK_FIXED_RATE(secure_32k_ck, CLK_IS_ROOT, 32768, 0x0);
-
-static struct clk sys_ck;
-
-static const char *sys_ck_parent_names[] = {
-       "osc_ck",
-};
-
-static const struct clk_ops sys_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .recalc_rate    = &omap2xxx_sys_clk_recalc,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(sys_ck, "wkup_clkdm");
-DEFINE_STRUCT_CLK(sys_ck, sys_ck_parent_names, sys_ck_ops);
-
-static struct dpll_data dpll_dd = {
-       .mult_div1_reg  = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .mult_mask      = OMAP24XX_DPLL_MULT_MASK,
-       .div1_mask      = OMAP24XX_DPLL_DIV_MASK,
-       .clk_bypass     = &sys_ck,
-       .clk_ref        = &sys_ck,
-       .control_reg    = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_mask    = OMAP24XX_EN_DPLL_MASK,
-       .max_multiplier = 1023,
-       .min_divider    = 1,
-       .max_divider    = 16,
-};
-
-static struct clk dpll_ck;
-
-static const char *dpll_ck_parent_names[] = {
-       "sys_ck",
-};
-
-static const struct clk_ops dpll_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .get_parent     = &omap2_init_dpll_parent,
-       .recalc_rate    = &omap2_dpllcore_recalc,
-       .round_rate     = &omap2_dpll_round_rate,
-       .set_rate       = &omap2_reprogram_dpllcore,
-};
-
-static struct clk_hw_omap dpll_ck_hw = {
-       .hw = {
-               .clk = &dpll_ck,
-       },
-       .ops            = &clkhwops_omap2xxx_dpll,
-       .dpll_data      = &dpll_dd,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dpll_ck, dpll_ck_parent_names, dpll_ck_ops);
-
-static struct clk core_ck;
-
-static const char *core_ck_parent_names[] = {
-       "dpll_ck",
-};
-
-static const struct clk_ops core_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(core_ck, "wkup_clkdm");
-DEFINE_STRUCT_CLK(core_ck, core_ck_parent_names, core_ck_ops);
-
-DEFINE_CLK_DIVIDER(core_l3_ck, "core_ck", &core_ck, 0x0,
-                  OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                  OMAP24XX_CLKSEL_L3_SHIFT, OMAP24XX_CLKSEL_L3_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-DEFINE_CLK_DIVIDER(l4_ck, "core_l3_ck", &core_l3_ck, 0x0,
-                  OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                  OMAP24XX_CLKSEL_L4_SHIFT, OMAP24XX_CLKSEL_L4_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-static struct clk aes_ick;
-
-static const char *aes_ick_parent_names[] = {
-       "l4_ck",
-};
-
-static const struct clk_ops aes_ick_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-};
-
-static struct clk_hw_omap aes_ick_hw = {
-       .hw = {
-               .clk = &aes_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_AES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(aes_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk apll54_ck;
-
-static const struct clk_ops apll54_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_clk_apll54_enable,
-       .disable        = &omap2_clk_apll54_disable,
-       .recalc_rate    = &omap2_clk_apll54_recalc,
-};
-
-static struct clk_hw_omap apll54_ck_hw = {
-       .hw = {
-               .clk = &apll54_ck,
-       },
-       .ops            = &clkhwops_apll54,
-       .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_bit     = OMAP24XX_EN_54M_PLL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(apll54_ck, dpll_ck_parent_names, apll54_ck_ops);
-
-static struct clk apll96_ck;
-
-static const struct clk_ops apll96_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_clk_apll96_enable,
-       .disable        = &omap2_clk_apll96_disable,
-       .recalc_rate    = &omap2_clk_apll96_recalc,
-};
-
-static struct clk_hw_omap apll96_ck_hw = {
-       .hw = {
-               .clk = &apll96_ck,
-       },
-       .ops            = &clkhwops_apll96,
-       .enable_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
-       .enable_bit     = OMAP24XX_EN_96M_PLL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(apll96_ck, dpll_ck_parent_names, apll96_ck_ops);
-
-static const char *func_96m_ck_parent_names[] = {
-       "apll96_ck", "alt_ck",
-};
-
-DEFINE_CLK_MUX(func_96m_ck, func_96m_ck_parent_names, NULL, 0x0,
-              OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), OMAP2430_96M_SOURCE_SHIFT,
-              OMAP2430_96M_SOURCE_WIDTH, 0x0, NULL);
-
-static struct clk cam_fck;
-
-static const char *cam_fck_parent_names[] = {
-       "func_96m_ck",
-};
-
-static struct clk_hw_omap cam_fck_hw = {
-       .hw = {
-               .clk = &cam_fck,
-       },
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(cam_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk cam_ick;
-
-static struct clk_hw_omap cam_ick_hw = {
-       .hw = {
-               .clk = &cam_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_CAM_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(cam_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk des_ick;
-
-static struct clk_hw_omap des_ick_hw = {
-       .hw = {
-               .clk = &des_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_DES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(des_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate dsp_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel dsp_fck_clksel[] = {
-       { .parent = &core_ck, .rates = dsp_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *dsp_fck_parent_names[] = {
-       "core_ck",
-};
-
-static struct clk dsp_fck;
-
-static const struct clk_ops dsp_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dsp_fck, "dsp_clkdm", dsp_fck_clksel,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-                        OMAP24XX_CLKSEL_DSP_MASK,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
-                        OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, &clkhwops_wait,
-                        dsp_fck_parent_names, dsp_fck_ops);
-
-static const struct clksel_rate dss1_fck_sys_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate dss1_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 5, .val = 5, .flags = RATE_IN_24XX },
-       { .div = 6, .val = 6, .flags = RATE_IN_24XX },
-       { .div = 8, .val = 8, .flags = RATE_IN_24XX },
-       { .div = 9, .val = 9, .flags = RATE_IN_24XX },
-       { .div = 12, .val = 12, .flags = RATE_IN_24XX },
-       { .div = 16, .val = 16, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel dss1_fck_clksel[] = {
-       { .parent = &sys_ck, .rates = dss1_fck_sys_rates },
-       { .parent = &core_ck, .rates = dss1_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *dss1_fck_parent_names[] = {
-       "sys_ck", "core_ck",
-};
-
-static const struct clk_ops dss1_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dss1_fck, "dss_clkdm", dss1_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_DSS1_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_DSS1_SHIFT, NULL,
-                        dss1_fck_parent_names, dss1_fck_ops);
-
-static const struct clksel_rate dss2_fck_sys_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate dss2_fck_48m_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate func_48m_apll96_rates[] = {
-       { .div = 2, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate func_48m_alt_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel func_48m_clksel[] = {
-       { .parent = &apll96_ck, .rates = func_48m_apll96_rates },
-       { .parent = &alt_ck, .rates = func_48m_alt_rates },
-       { .parent = NULL },
-};
-
-static const char *func_48m_ck_parent_names[] = {
-       "apll96_ck", "alt_ck",
-};
-
-static struct clk func_48m_ck;
-
-static const struct clk_ops func_48m_ck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-static struct clk_hw_omap func_48m_ck_hw = {
-       .hw = {
-               .clk = &func_48m_ck,
-       },
-       .clksel         = func_48m_clksel,
-       .clksel_reg     = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-       .clksel_mask    = OMAP24XX_48M_SOURCE_MASK,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(func_48m_ck, func_48m_ck_parent_names, func_48m_ck_ops);
-
-static const struct clksel dss2_fck_clksel[] = {
-       { .parent = &sys_ck, .rates = dss2_fck_sys_rates },
-       { .parent = &func_48m_ck, .rates = dss2_fck_48m_rates },
-       { .parent = NULL },
-};
-
-static const char *dss2_fck_parent_names[] = {
-       "sys_ck", "func_48m_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(dss2_fck, "dss_clkdm", dss2_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_DSS2_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_DSS2_SHIFT, NULL,
-                        dss2_fck_parent_names, dss1_fck_ops);
-
-static const char *func_54m_ck_parent_names[] = {
-       "apll54_ck", "alt_ck",
-};
-
-DEFINE_CLK_MUX(func_54m_ck, func_54m_ck_parent_names, NULL, 0x0,
-              OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
-              OMAP24XX_54M_SOURCE_SHIFT, OMAP24XX_54M_SOURCE_WIDTH, 0x0, NULL);
-
-static struct clk dss_54m_fck;
-
-static const char *dss_54m_fck_parent_names[] = {
-       "func_54m_ck",
-};
-
-static struct clk_hw_omap dss_54m_fck_hw = {
-       .hw = {
-               .clk = &dss_54m_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_TV_SHIFT,
-       .clkdm_name     = "dss_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dss_54m_fck, dss_54m_fck_parent_names, aes_ick_ops);
-
-static struct clk dss_ick;
-
-static struct clk_hw_omap dss_ick_hw = {
-       .hw = {
-               .clk = &dss_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_DSS1_SHIFT,
-       .clkdm_name     = "dss_clkdm",
-};
-
-DEFINE_STRUCT_CLK(dss_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk emul_ck;
-
-static struct clk_hw_omap emul_ck_hw = {
-       .hw = {
-               .clk = &emul_ck,
-       },
-       .enable_reg     = OMAP2430_PRCM_CLKEMUL_CTRL,
-       .enable_bit     = OMAP24XX_EMULATION_EN_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(emul_ck, dss_54m_fck_parent_names, aes_ick_ops);
-
-DEFINE_CLK_FIXED_FACTOR(func_12m_ck, "func_48m_ck", &func_48m_ck, 0x0, 1, 4);
-
-static struct clk fac_fck;
-
-static const char *fac_fck_parent_names[] = {
-       "func_12m_ck",
-};
-
-static struct clk_hw_omap fac_fck_hw = {
-       .hw = {
-               .clk = &fac_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(fac_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk fac_ick;
-
-static struct clk_hw_omap fac_ick_hw = {
-       .hw = {
-               .clk = &fac_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_FAC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(fac_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel gfx_fck_clksel[] = {
-       { .parent = &core_l3_ck, .rates = gfx_l3_rates },
-       { .parent = NULL },
-};
-
-static const char *gfx_2d_fck_parent_names[] = {
-       "core_l3_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gfx_2d_fck, "gfx_clkdm", gfx_fck_clksel,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
-                        OMAP_CLKSEL_GFX_MASK,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_2D_SHIFT, &clkhwops_wait,
-                        gfx_2d_fck_parent_names, dsp_fck_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gfx_3d_fck, "gfx_clkdm", gfx_fck_clksel,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
-                        OMAP_CLKSEL_GFX_MASK,
-                        OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_3D_SHIFT, &clkhwops_wait,
-                        gfx_2d_fck_parent_names, dsp_fck_ops);
-
-static struct clk gfx_ick;
-
-static const char *gfx_ick_parent_names[] = {
-       "core_l3_ck",
-};
-
-static struct clk_hw_omap gfx_ick_hw = {
-       .hw = {
-               .clk = &gfx_ick,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP_EN_GFX_SHIFT,
-       .clkdm_name     = "gfx_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gfx_ick, gfx_ick_parent_names, aes_ick_ops);
-
-static struct clk gpio5_fck;
-
-static const char *gpio5_fck_parent_names[] = {
-       "func_32k_ck",
-};
-
-static struct clk_hw_omap gpio5_fck_hw = {
-       .hw = {
-               .clk = &gpio5_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_GPIO5_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpio5_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-static struct clk gpio5_ick;
-
-static struct clk_hw_omap gpio5_ick_hw = {
-       .hw = {
-               .clk = &gpio5_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_GPIO5_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpio5_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk gpios_fck;
-
-static struct clk_hw_omap gpios_fck_hw = {
-       .hw = {
-               .clk = &gpios_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpios_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-static struct clk gpios_ick;
-
-static const char *gpios_ick_parent_names[] = {
-       "sys_ck",
-};
-
-static struct clk_hw_omap gpios_ick_hw = {
-       .hw = {
-               .clk = &gpios_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpios_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk gpmc_fck;
-
-static struct clk_hw_omap gpmc_fck_hw = {
-       .hw = {
-               .clk = &gpmc_fck,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP24XX_AUTO_GPMC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpmc_fck, gfx_ick_parent_names, core_ck_ops);
-
-static const struct clksel_rate gpt_alt_rates[] = {
-       { .div = 1, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel omap24xx_gpt_clksel[] = {
-       { .parent = &func_32k_ck, .rates = gpt_32k_rates },
-       { .parent = &sys_ck, .rates = gpt_sys_rates },
-       { .parent = &alt_ck, .rates = gpt_alt_rates },
-       { .parent = NULL },
-};
-
-static const char *gpt10_fck_parent_names[] = {
-       "func_32k_ck", "sys_ck", "alt_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt10_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT10_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT10_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt10_ick;
-
-static struct clk_hw_omap gpt10_ick_hw = {
-       .hw = {
-               .clk = &gpt10_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT10_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt10_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt11_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT11_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT11_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt11_ick;
-
-static struct clk_hw_omap gpt11_ick_hw = {
-       .hw = {
-               .clk = &gpt11_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT11_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt11_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt12_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT12_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT12_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt12_ick;
-
-static struct clk_hw_omap gpt12_ick_hw = {
-       .hw = {
-               .clk = &gpt12_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT12_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt12_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clk_ops gpt1_fck_ops = {
-       .init           = &omap2_init_clk_clkdm,
-       .enable         = &omap2_dflt_clk_enable,
-       .disable        = &omap2_dflt_clk_disable,
-       .is_enabled     = &omap2_dflt_clk_is_enabled,
-       .recalc_rate    = &omap2_clksel_recalc,
-       .set_rate       = &omap2_clksel_set_rate,
-       .round_rate     = &omap2_clksel_round_rate,
-       .get_parent     = &omap2_clksel_find_parent_index,
-       .set_parent     = &omap2_clksel_set_parent,
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt1_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_GPT1_MASK,
-                        OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-                        OMAP24XX_EN_GPT1_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, gpt1_fck_ops);
-
-static struct clk gpt1_ick;
-
-static struct clk_hw_omap gpt1_ick_hw = {
-       .hw = {
-               .clk = &gpt1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt1_ick, gpios_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt2_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT2_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT2_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt2_ick;
-
-static struct clk_hw_omap gpt2_ick_hw = {
-       .hw = {
-               .clk = &gpt2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt2_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt3_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT3_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT3_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt3_ick;
-
-static struct clk_hw_omap gpt3_ick_hw = {
-       .hw = {
-               .clk = &gpt3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt3_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt4_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT4_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT4_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt4_ick;
-
-static struct clk_hw_omap gpt4_ick_hw = {
-       .hw = {
-               .clk = &gpt4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt4_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt5_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT5_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT5_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt5_ick;
-
-static struct clk_hw_omap gpt5_ick_hw = {
-       .hw = {
-               .clk = &gpt5_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT5_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt5_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt6_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT6_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT6_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt6_ick;
-
-static struct clk_hw_omap gpt6_ick_hw = {
-       .hw = {
-               .clk = &gpt6_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT6_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt6_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt7_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT7_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT7_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt7_ick;
-
-static struct clk_hw_omap gpt7_ick_hw = {
-       .hw = {
-               .clk = &gpt7_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt7_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk gpt8_fck;
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt8_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT8_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT8_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt8_ick;
-
-static struct clk_hw_omap gpt8_ick_hw = {
-       .hw = {
-               .clk = &gpt8_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT8_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt8_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(gpt9_fck, "core_l4_clkdm", omap24xx_gpt_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL2),
-                        OMAP24XX_CLKSEL_GPT9_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_GPT9_SHIFT, &clkhwops_wait,
-                        gpt10_fck_parent_names, dss1_fck_ops);
-
-static struct clk gpt9_ick;
-
-static struct clk_hw_omap gpt9_ick_hw = {
-       .hw = {
-               .clk = &gpt9_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_GPT9_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(gpt9_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk hdq_fck;
-
-static struct clk_hw_omap hdq_fck_hw = {
-       .hw = {
-               .clk = &hdq_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(hdq_fck, fac_fck_parent_names, aes_ick_ops);
-
-static struct clk hdq_ick;
-
-static struct clk_hw_omap hdq_ick_hw = {
-       .hw = {
-               .clk = &hdq_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_HDQ_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(hdq_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk i2c1_ick;
-
-static struct clk_hw_omap i2c1_ick_hw = {
-       .hw = {
-               .clk = &i2c1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk i2c2_ick;
-
-static struct clk_hw_omap i2c2_ick_hw = {
-       .hw = {
-               .clk = &i2c2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP2420_EN_I2C2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2c2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk i2chs1_fck;
-
-static struct clk_hw_omap i2chs1_fck_hw = {
-       .hw = {
-               .clk = &i2chs1_fck,
-       },
-       .ops            = &clkhwops_omap2430_i2chs_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_I2CHS1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2chs1_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk i2chs2_fck;
-
-static struct clk_hw_omap i2chs2_fck_hw = {
-       .hw = {
-               .clk = &i2chs2_fck,
-       },
-       .ops            = &clkhwops_omap2430_i2chs_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_I2CHS2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(i2chs2_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk icr_ick;
-
-static struct clk_hw_omap icr_ick_hw = {
-       .hw = {
-               .clk = &icr_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP2430_EN_ICR_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(icr_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static const struct clksel dsp_ick_clksel[] = {
-       { .parent = &dsp_fck, .rates = dsp_ick_rates },
-       { .parent = NULL },
-};
-
-static const char *iva2_1_ick_parent_names[] = {
-       "dsp_fck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(iva2_1_ick, "dsp_clkdm", dsp_ick_clksel,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-                        OMAP24XX_CLKSEL_DSP_IF_MASK,
-                        OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
-                        OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT, &clkhwops_wait,
-                        iva2_1_ick_parent_names, dsp_fck_ops);
-
-static struct clk mailboxes_ick;
-
-static struct clk_hw_omap mailboxes_ick_hw = {
-       .hw = {
-               .clk = &mailboxes_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MAILBOXES_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mailboxes_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate common_mcbsp_96m_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel mcbsp_fck_clksel[] = {
-       { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates },
-       { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
-       { .parent = NULL },
-};
-
-static const char *mcbsp1_fck_parent_names[] = {
-       "func_96m_ck", "mcbsp_clks",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp1_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
-                        OMAP2_MCBSP1_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_MCBSP1_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp1_ick;
-
-static struct clk_hw_omap mcbsp1_ick_hw = {
-       .hw = {
-               .clk = &mcbsp1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCBSP1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp1_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp2_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
-                        OMAP2_MCBSP2_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-                        OMAP24XX_EN_MCBSP2_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp2_ick;
-
-static struct clk_hw_omap mcbsp2_ick_hw = {
-       .hw = {
-               .clk = &mcbsp2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCBSP2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp2_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp3_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1),
-                        OMAP2_MCBSP3_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-                        OMAP2430_EN_MCBSP3_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp3_ick;
-
-static struct clk_hw_omap mcbsp3_ick_hw = {
-       .hw = {
-               .clk = &mcbsp3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MCBSP3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp3_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp4_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1),
-                        OMAP2_MCBSP4_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-                        OMAP2430_EN_MCBSP4_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp4_ick;
-
-static struct clk_hw_omap mcbsp4_ick_hw = {
-       .hw = {
-               .clk = &mcbsp4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MCBSP4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp4_ick, aes_ick_parent_names, aes_ick_ops);
-
-DEFINE_CLK_OMAP_MUX_GATE(mcbsp5_fck, "core_l4_clkdm", mcbsp_fck_clksel,
-                        OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1),
-                        OMAP2_MCBSP5_CLKS_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-                        OMAP2430_EN_MCBSP5_SHIFT, &clkhwops_wait,
-                        mcbsp1_fck_parent_names, dss1_fck_ops);
-
-static struct clk mcbsp5_ick;
-
-static struct clk_hw_omap mcbsp5_ick_hw = {
-       .hw = {
-               .clk = &mcbsp5_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MCBSP5_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcbsp5_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mcspi1_fck;
-
-static const char *mcspi1_fck_parent_names[] = {
-       "func_48m_ck",
-};
-
-static struct clk_hw_omap mcspi1_fck_hw = {
-       .hw = {
-               .clk = &mcspi1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi1_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk mcspi1_ick;
-
-static struct clk_hw_omap mcspi1_ick_hw = {
-       .hw = {
-               .clk = &mcspi1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mcspi2_fck;
-
-static struct clk_hw_omap mcspi2_fck_hw = {
-       .hw = {
-               .clk = &mcspi2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi2_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk mcspi2_ick;
-
-static struct clk_hw_omap mcspi2_ick_hw = {
-       .hw = {
-               .clk = &mcspi2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MCSPI2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mcspi3_fck;
-
-static struct clk_hw_omap mcspi3_fck_hw = {
-       .hw = {
-               .clk = &mcspi3_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_MCSPI3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi3_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk mcspi3_ick;
-
-static struct clk_hw_omap mcspi3_ick_hw = {
-       .hw = {
-               .clk = &mcspi3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MCSPI3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mcspi3_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate mdm_ick_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_243X },
-       { .div = 4, .val = 4, .flags = RATE_IN_243X },
-       { .div = 6, .val = 6, .flags = RATE_IN_243X },
-       { .div = 9, .val = 9, .flags = RATE_IN_243X },
-       { .div = 0 }
-};
-
-static const struct clksel mdm_ick_clksel[] = {
-       { .parent = &core_ck, .rates = mdm_ick_core_rates },
-       { .parent = NULL },
-};
-
-static const char *mdm_ick_parent_names[] = {
-       "core_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(mdm_ick, "mdm_clkdm", mdm_ick_clksel,
-                        OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_CLKSEL),
-                        OMAP2430_CLKSEL_MDM_MASK,
-                        OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
-                        OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT,
-                        &clkhwops_iclk_wait, mdm_ick_parent_names,
-                        dsp_fck_ops);
-
-static struct clk mdm_intc_ick;
-
-static struct clk_hw_omap mdm_intc_ick_hw = {
-       .hw = {
-               .clk = &mdm_intc_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MDM_INTC_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mdm_intc_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mdm_osc_ck;
-
-static struct clk_hw_omap mdm_osc_ck_hw = {
-       .hw = {
-               .clk = &mdm_osc_ck,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP2430_EN_OSC_SHIFT,
-       .clkdm_name     = "mdm_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mdm_osc_ck, sys_ck_parent_names, aes_ick_ops);
-
-static struct clk mmchs1_fck;
-
-static struct clk_hw_omap mmchs1_fck_hw = {
-       .hw = {
-               .clk = &mmchs1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHS1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchs1_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk mmchs1_ick;
-
-static struct clk_hw_omap mmchs1_ick_hw = {
-       .hw = {
-               .clk = &mmchs1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHS1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchs1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mmchs2_fck;
-
-static struct clk_hw_omap mmchs2_fck_hw = {
-       .hw = {
-               .clk = &mmchs2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHS2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchs2_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk mmchs2_ick;
-
-static struct clk_hw_omap mmchs2_ick_hw = {
-       .hw = {
-               .clk = &mmchs2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHS2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchs2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk mmchsdb1_fck;
-
-static struct clk_hw_omap mmchsdb1_fck_hw = {
-       .hw = {
-               .clk = &mmchsdb1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHSDB1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchsdb1_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-static struct clk mmchsdb2_fck;
-
-static struct clk_hw_omap mmchsdb2_fck_hw = {
-       .hw = {
-               .clk = &mmchsdb2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP2430_EN_MMCHSDB2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mmchsdb2_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-DEFINE_CLK_DIVIDER(mpu_ck, "core_ck", &core_ck, 0x0,
-                  OMAP_CM_REGADDR(MPU_MOD, CM_CLKSEL),
-                  OMAP24XX_CLKSEL_MPU_SHIFT, OMAP24XX_CLKSEL_MPU_WIDTH,
-                  CLK_DIVIDER_ONE_BASED, NULL);
-
-static struct clk mpu_wdt_fck;
-
-static struct clk_hw_omap mpu_wdt_fck_hw = {
-       .hw = {
-               .clk = &mpu_wdt_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
-       .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mpu_wdt_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-static struct clk mpu_wdt_ick;
-
-static struct clk_hw_omap mpu_wdt_ick_hw = {
-       .hw = {
-               .clk = &mpu_wdt_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mpu_wdt_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk mspro_fck;
-
-static struct clk_hw_omap mspro_fck_hw = {
-       .hw = {
-               .clk = &mspro_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mspro_fck, cam_fck_parent_names, aes_ick_ops);
-
-static struct clk mspro_ick;
-
-static struct clk_hw_omap mspro_ick_hw = {
-       .hw = {
-               .clk = &mspro_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_MSPRO_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(mspro_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk omapctrl_ick;
-
-static struct clk_hw_omap omapctrl_ick_hw = {
-       .hw = {
-               .clk = &omapctrl_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_OMAPCTRL_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(omapctrl_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk pka_ick;
-
-static struct clk_hw_omap pka_ick_hw = {
-       .hw = {
-               .clk = &pka_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_PKA_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(pka_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk rng_ick;
-
-static struct clk_hw_omap rng_ick_hw = {
-       .hw = {
-               .clk = &rng_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_RNG_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(rng_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk sdma_fck;
-
-DEFINE_STRUCT_CLK_HW_OMAP(sdma_fck, "core_l3_clkdm");
-DEFINE_STRUCT_CLK(sdma_fck, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sdma_ick;
-
-static struct clk_hw_omap sdma_ick_hw = {
-       .hw = {
-               .clk = &sdma_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP24XX_AUTO_SDMA_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sdma_ick, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sdrc_ick;
-
-static struct clk_hw_omap sdrc_ick_hw = {
-       .hw = {
-               .clk = &sdrc_ick,
-       },
-       .ops            = &clkhwops_iclk,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
-       .enable_bit     = OMAP2430_EN_SDRC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sdrc_ick, gfx_ick_parent_names, core_ck_ops);
-
-static struct clk sha_ick;
-
-static struct clk_hw_omap sha_ick_hw = {
-       .hw = {
-               .clk = &sha_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
-       .enable_bit     = OMAP24XX_EN_SHA_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sha_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk ssi_l4_ick;
-
-static struct clk_hw_omap ssi_l4_ick_hw = {
-       .hw = {
-               .clk = &ssi_l4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP24XX_EN_SSI_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(ssi_l4_ick, aes_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate ssi_ssr_sst_fck_core_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 5, .val = 5, .flags = RATE_IN_243X },
-       { .div = 0 }
-};
-
-static const struct clksel ssi_ssr_sst_fck_clksel[] = {
-       { .parent = &core_ck, .rates = ssi_ssr_sst_fck_core_rates },
-       { .parent = NULL },
-};
-
-static const char *ssi_ssr_sst_fck_parent_names[] = {
-       "core_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_sst_fck, "core_l3_clkdm",
-                        ssi_ssr_sst_fck_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_SSI_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-                        OMAP24XX_EN_SSI_SHIFT, &clkhwops_wait,
-                        ssi_ssr_sst_fck_parent_names, dsp_fck_ops);
-
-static struct clk sync_32k_ick;
-
-static struct clk_hw_omap sync_32k_ick_hw = {
-       .hw = {
-               .clk = &sync_32k_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_32KSYNC_SHIFT,
-       .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(sync_32k_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static const struct clksel_rate common_clkout_src_core_rates[] = {
-       { .div = 1, .val = 0, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_sys_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_96m_rates[] = {
-       { .div = 1, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel_rate common_clkout_src_54m_rates[] = {
-       { .div = 1, .val = 3, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel common_clkout_src_clksel[] = {
-       { .parent = &core_ck, .rates = common_clkout_src_core_rates },
-       { .parent = &sys_ck, .rates = common_clkout_src_sys_rates },
-       { .parent = &func_96m_ck, .rates = common_clkout_src_96m_rates },
-       { .parent = &func_54m_ck, .rates = common_clkout_src_54m_rates },
-       { .parent = NULL },
-};
-
-static const char *sys_clkout_src_parent_names[] = {
-       "core_ck", "sys_ck", "func_96m_ck", "func_54m_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(sys_clkout_src, "wkup_clkdm", common_clkout_src_clksel,
-                        OMAP2430_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_SOURCE_MASK,
-                        OMAP2430_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_EN_SHIFT,
-                        NULL, sys_clkout_src_parent_names, gpt1_fck_ops);
-
-DEFINE_CLK_DIVIDER(sys_clkout, "sys_clkout_src", &sys_clkout_src, 0x0,
-                  OMAP2430_PRCM_CLKOUT_CTRL, OMAP24XX_CLKOUT_DIV_SHIFT,
-                  OMAP24XX_CLKOUT_DIV_WIDTH, CLK_DIVIDER_POWER_OF_TWO, NULL);
-
-static struct clk uart1_fck;
-
-static struct clk_hw_omap uart1_fck_hw = {
-       .hw = {
-               .clk = &uart1_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart1_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart1_ick;
-
-static struct clk_hw_omap uart1_ick_hw = {
-       .hw = {
-               .clk = &uart1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART1_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart1_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk uart2_fck;
-
-static struct clk_hw_omap uart2_fck_hw = {
-       .hw = {
-               .clk = &uart2_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart2_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart2_ick;
-
-static struct clk_hw_omap uart2_ick_hw = {
-       .hw = {
-               .clk = &uart2_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_UART2_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart2_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk uart3_fck;
-
-static struct clk_hw_omap uart3_fck_hw = {
-       .hw = {
-               .clk = &uart3_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart3_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static struct clk uart3_ick;
-
-static struct clk_hw_omap uart3_ick_hw = {
-       .hw = {
-               .clk = &uart3_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP24XX_EN_UART3_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(uart3_ick, aes_ick_parent_names, aes_ick_ops);
-
-static struct clk usb_fck;
-
-static struct clk_hw_omap usb_fck_hw = {
-       .hw = {
-               .clk = &usb_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2),
-       .enable_bit     = OMAP24XX_EN_USB_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(usb_fck, mcspi1_fck_parent_names, aes_ick_ops);
-
-static const struct clksel_rate usb_l4_ick_core_l3_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 4, .val = 4, .flags = RATE_IN_24XX },
-       { .div = 0 }
-};
-
-static const struct clksel usb_l4_ick_clksel[] = {
-       { .parent = &core_l3_ck, .rates = usb_l4_ick_core_l3_rates },
-       { .parent = NULL },
-};
-
-static const char *usb_l4_ick_parent_names[] = {
-       "core_l3_ck",
-};
-
-DEFINE_CLK_OMAP_MUX_GATE(usb_l4_ick, "core_l4_clkdm", usb_l4_ick_clksel,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL1),
-                        OMAP24XX_CLKSEL_USB_MASK,
-                        OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-                        OMAP24XX_EN_USB_SHIFT, &clkhwops_iclk_wait,
-                        usb_l4_ick_parent_names, dsp_fck_ops);
-
-static struct clk usbhs_ick;
-
-static struct clk_hw_omap usbhs_ick_hw = {
-       .hw = {
-               .clk = &usbhs_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
-       .enable_bit     = OMAP2430_EN_USBHS_SHIFT,
-       .clkdm_name     = "core_l3_clkdm",
-};
-
-DEFINE_STRUCT_CLK(usbhs_ick, gfx_ick_parent_names, aes_ick_ops);
-
-static struct clk virt_prcm_set;
-
-static const char *virt_prcm_set_parent_names[] = {
-       "mpu_ck",
-};
-
-static const struct clk_ops virt_prcm_set_ops = {
-       .recalc_rate    = &omap2_table_mpu_recalc,
-       .set_rate       = &omap2_select_table_rate,
-       .round_rate     = &omap2_round_to_table_rate,
-};
-
-DEFINE_STRUCT_CLK_HW_OMAP(virt_prcm_set, NULL);
-DEFINE_STRUCT_CLK(virt_prcm_set, virt_prcm_set_parent_names, virt_prcm_set_ops);
-
-static struct clk wdt1_ick;
-
-static struct clk_hw_omap wdt1_ick_hw = {
-       .hw = {
-               .clk = &wdt1_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
-       .enable_bit     = OMAP24XX_EN_WDT1_SHIFT,
-       .clkdm_name     = "wkup_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt1_ick, gpios_ick_parent_names, aes_ick_ops);
-
-static struct clk wdt4_fck;
-
-static struct clk_hw_omap wdt4_fck_hw = {
-       .hw = {
-               .clk = &wdt4_fck,
-       },
-       .ops            = &clkhwops_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
-       .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt4_fck, gpio5_fck_parent_names, aes_ick_ops);
-
-static struct clk wdt4_ick;
-
-static struct clk_hw_omap wdt4_ick_hw = {
-       .hw = {
-               .clk = &wdt4_ick,
-       },
-       .ops            = &clkhwops_iclk_wait,
-       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
-       .enable_bit     = OMAP24XX_EN_WDT4_SHIFT,
-       .clkdm_name     = "core_l4_clkdm",
-};
-
-DEFINE_STRUCT_CLK(wdt4_ick, aes_ick_parent_names, aes_ick_ops);
-
-/*
- * clkdev integration
- */
-
-static struct omap_clk omap2430_clks[] = {
-       /* external root sources */
-       CLK(NULL,       "func_32k_ck",  &func_32k_ck),
-       CLK(NULL,       "secure_32k_ck", &secure_32k_ck),
-       CLK(NULL,       "osc_ck",       &osc_ck),
-       CLK("twl",      "fck",          &osc_ck),
-       CLK(NULL,       "sys_ck",       &sys_ck),
-       CLK(NULL,       "alt_ck",       &alt_ck),
-       CLK(NULL,       "mcbsp_clks",   &mcbsp_clks),
-       /* internal analog sources */
-       CLK(NULL,       "dpll_ck",      &dpll_ck),
-       CLK(NULL,       "apll96_ck",    &apll96_ck),
-       CLK(NULL,       "apll54_ck",    &apll54_ck),
-       /* internal prcm root sources */
-       CLK(NULL,       "func_54m_ck",  &func_54m_ck),
-       CLK(NULL,       "core_ck",      &core_ck),
-       CLK(NULL,       "func_96m_ck",  &func_96m_ck),
-       CLK(NULL,       "func_48m_ck",  &func_48m_ck),
-       CLK(NULL,       "func_12m_ck",  &func_12m_ck),
-       CLK(NULL,       "sys_clkout_src", &sys_clkout_src),
-       CLK(NULL,       "sys_clkout",   &sys_clkout),
-       CLK(NULL,       "emul_ck",      &emul_ck),
-       /* mpu domain clocks */
-       CLK(NULL,       "mpu_ck",       &mpu_ck),
-       /* dsp domain clocks */
-       CLK(NULL,       "dsp_fck",      &dsp_fck),
-       CLK(NULL,       "iva2_1_ick",   &iva2_1_ick),
-       /* GFX domain clocks */
-       CLK(NULL,       "gfx_3d_fck",   &gfx_3d_fck),
-       CLK(NULL,       "gfx_2d_fck",   &gfx_2d_fck),
-       CLK(NULL,       "gfx_ick",      &gfx_ick),
-       /* Modem domain clocks */
-       CLK(NULL,       "mdm_ick",      &mdm_ick),
-       CLK(NULL,       "mdm_osc_ck",   &mdm_osc_ck),
-       /* DSS domain clocks */
-       CLK("omapdss_dss",      "ick",          &dss_ick),
-       CLK(NULL,       "dss_ick",              &dss_ick),
-       CLK(NULL,       "dss1_fck",             &dss1_fck),
-       CLK(NULL,       "dss2_fck",     &dss2_fck),
-       CLK(NULL,       "dss_54m_fck",  &dss_54m_fck),
-       /* L3 domain clocks */
-       CLK(NULL,       "core_l3_ck",   &core_l3_ck),
-       CLK(NULL,       "ssi_fck",      &ssi_ssr_sst_fck),
-       CLK(NULL,       "usb_l4_ick",   &usb_l4_ick),
-       /* L4 domain clocks */
-       CLK(NULL,       "l4_ck",        &l4_ck),
-       CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick),
-       /* virtual meta-group clock */
-       CLK(NULL,       "virt_prcm_set", &virt_prcm_set),
-       /* general l4 interface ck, multi-parent functional clk */
-       CLK(NULL,       "gpt1_ick",     &gpt1_ick),
-       CLK(NULL,       "gpt1_fck",     &gpt1_fck),
-       CLK(NULL,       "gpt2_ick",     &gpt2_ick),
-       CLK(NULL,       "gpt2_fck",     &gpt2_fck),
-       CLK(NULL,       "gpt3_ick",     &gpt3_ick),
-       CLK(NULL,       "gpt3_fck",     &gpt3_fck),
-       CLK(NULL,       "gpt4_ick",     &gpt4_ick),
-       CLK(NULL,       "gpt4_fck",     &gpt4_fck),
-       CLK(NULL,       "gpt5_ick",     &gpt5_ick),
-       CLK(NULL,       "gpt5_fck",     &gpt5_fck),
-       CLK(NULL,       "gpt6_ick",     &gpt6_ick),
-       CLK(NULL,       "gpt6_fck",     &gpt6_fck),
-       CLK(NULL,       "gpt7_ick",     &gpt7_ick),
-       CLK(NULL,       "gpt7_fck",     &gpt7_fck),
-       CLK(NULL,       "gpt8_ick",     &gpt8_ick),
-       CLK(NULL,       "gpt8_fck",     &gpt8_fck),
-       CLK(NULL,       "gpt9_ick",     &gpt9_ick),
-       CLK(NULL,       "gpt9_fck",     &gpt9_fck),
-       CLK(NULL,       "gpt10_ick",    &gpt10_ick),
-       CLK(NULL,       "gpt10_fck",    &gpt10_fck),
-       CLK(NULL,       "gpt11_ick",    &gpt11_ick),
-       CLK(NULL,       "gpt11_fck",    &gpt11_fck),
-       CLK(NULL,       "gpt12_ick",    &gpt12_ick),
-       CLK(NULL,       "gpt12_fck",    &gpt12_fck),
-       CLK("omap-mcbsp.1", "ick",      &mcbsp1_ick),
-       CLK(NULL,       "mcbsp1_ick",   &mcbsp1_ick),
-       CLK(NULL,       "mcbsp1_fck",   &mcbsp1_fck),
-       CLK("omap-mcbsp.2", "ick",      &mcbsp2_ick),
-       CLK(NULL,       "mcbsp2_ick",   &mcbsp2_ick),
-       CLK(NULL,       "mcbsp2_fck",   &mcbsp2_fck),
-       CLK("omap-mcbsp.3", "ick",      &mcbsp3_ick),
-       CLK(NULL,       "mcbsp3_ick",   &mcbsp3_ick),
-       CLK(NULL,       "mcbsp3_fck",   &mcbsp3_fck),
-       CLK("omap-mcbsp.4", "ick",      &mcbsp4_ick),
-       CLK(NULL,       "mcbsp4_ick",   &mcbsp4_ick),
-       CLK(NULL,       "mcbsp4_fck",   &mcbsp4_fck),
-       CLK("omap-mcbsp.5", "ick",      &mcbsp5_ick),
-       CLK(NULL,       "mcbsp5_ick",   &mcbsp5_ick),
-       CLK(NULL,       "mcbsp5_fck",   &mcbsp5_fck),
-       CLK("omap2_mcspi.1", "ick",     &mcspi1_ick),
-       CLK(NULL,       "mcspi1_ick",   &mcspi1_ick),
-       CLK(NULL,       "mcspi1_fck",   &mcspi1_fck),
-       CLK("omap2_mcspi.2", "ick",     &mcspi2_ick),
-       CLK(NULL,       "mcspi2_ick",   &mcspi2_ick),
-       CLK(NULL,       "mcspi2_fck",   &mcspi2_fck),
-       CLK("omap2_mcspi.3", "ick",     &mcspi3_ick),
-       CLK(NULL,       "mcspi3_ick",   &mcspi3_ick),
-       CLK(NULL,       "mcspi3_fck",   &mcspi3_fck),
-       CLK(NULL,       "uart1_ick",    &uart1_ick),
-       CLK(NULL,       "uart1_fck",    &uart1_fck),
-       CLK(NULL,       "uart2_ick",    &uart2_ick),
-       CLK(NULL,       "uart2_fck",    &uart2_fck),
-       CLK(NULL,       "uart3_ick",    &uart3_ick),
-       CLK(NULL,       "uart3_fck",    &uart3_fck),
-       CLK(NULL,       "gpios_ick",    &gpios_ick),
-       CLK(NULL,       "gpios_fck",    &gpios_fck),
-       CLK("omap_wdt", "ick",          &mpu_wdt_ick),
-       CLK(NULL,       "mpu_wdt_ick",  &mpu_wdt_ick),
-       CLK(NULL,       "mpu_wdt_fck",  &mpu_wdt_fck),
-       CLK(NULL,       "sync_32k_ick", &sync_32k_ick),
-       CLK(NULL,       "wdt1_ick",     &wdt1_ick),
-       CLK(NULL,       "omapctrl_ick", &omapctrl_ick),
-       CLK(NULL,       "icr_ick",      &icr_ick),
-       CLK("omap24xxcam", "fck",       &cam_fck),
-       CLK(NULL,       "cam_fck",      &cam_fck),
-       CLK("omap24xxcam", "ick",       &cam_ick),
-       CLK(NULL,       "cam_ick",      &cam_ick),
-       CLK(NULL,       "mailboxes_ick", &mailboxes_ick),
-       CLK(NULL,       "wdt4_ick",     &wdt4_ick),
-       CLK(NULL,       "wdt4_fck",     &wdt4_fck),
-       CLK(NULL,       "mspro_ick",    &mspro_ick),
-       CLK(NULL,       "mspro_fck",    &mspro_fck),
-       CLK(NULL,       "fac_ick",      &fac_ick),
-       CLK(NULL,       "fac_fck",      &fac_fck),
-       CLK("omap_hdq.0", "ick",        &hdq_ick),
-       CLK(NULL,       "hdq_ick",      &hdq_ick),
-       CLK("omap_hdq.1", "fck",        &hdq_fck),
-       CLK(NULL,       "hdq_fck",      &hdq_fck),
-       CLK("omap_i2c.1", "ick",        &i2c1_ick),
-       CLK(NULL,       "i2c1_ick",     &i2c1_ick),
-       CLK(NULL,       "i2chs1_fck",   &i2chs1_fck),
-       CLK("omap_i2c.2", "ick",        &i2c2_ick),
-       CLK(NULL,       "i2c2_ick",     &i2c2_ick),
-       CLK(NULL,       "i2chs2_fck",   &i2chs2_fck),
-       CLK(NULL,       "gpmc_fck",     &gpmc_fck),
-       CLK(NULL,       "sdma_fck",     &sdma_fck),
-       CLK(NULL,       "sdma_ick",     &sdma_ick),
-       CLK(NULL,       "sdrc_ick",     &sdrc_ick),
-       CLK(NULL,       "des_ick",      &des_ick),
-       CLK("omap-sham",        "ick",  &sha_ick),
-       CLK(NULL,       "sha_ick",      &sha_ick),
-       CLK("omap_rng", "ick",          &rng_ick),
-       CLK(NULL,       "rng_ick",      &rng_ick),
-       CLK("omap-aes", "ick",  &aes_ick),
-       CLK(NULL,       "aes_ick",      &aes_ick),
-       CLK(NULL,       "pka_ick",      &pka_ick),
-       CLK(NULL,       "usb_fck",      &usb_fck),
-       CLK("musb-omap2430",    "ick",  &usbhs_ick),
-       CLK(NULL,       "usbhs_ick",    &usbhs_ick),
-       CLK("omap_hsmmc.0", "ick",      &mmchs1_ick),
-       CLK(NULL,       "mmchs1_ick",   &mmchs1_ick),
-       CLK(NULL,       "mmchs1_fck",   &mmchs1_fck),
-       CLK("omap_hsmmc.1", "ick",      &mmchs2_ick),
-       CLK(NULL,       "mmchs2_ick",   &mmchs2_ick),
-       CLK(NULL,       "mmchs2_fck",   &mmchs2_fck),
-       CLK(NULL,       "gpio5_ick",    &gpio5_ick),
-       CLK(NULL,       "gpio5_fck",    &gpio5_fck),
-       CLK(NULL,       "mdm_intc_ick", &mdm_intc_ick),
-       CLK("omap_hsmmc.0", "mmchsdb_fck",      &mmchsdb1_fck),
-       CLK(NULL,        "mmchsdb1_fck",        &mmchsdb1_fck),
-       CLK("omap_hsmmc.1", "mmchsdb_fck",      &mmchsdb2_fck),
-       CLK(NULL,        "mmchsdb2_fck",        &mmchsdb2_fck),
-       CLK(NULL,       "timer_32k_ck",  &func_32k_ck),
-       CLK(NULL,       "timer_sys_ck", &sys_ck),
-       CLK(NULL,       "timer_ext_ck", &alt_ck),
-       CLK(NULL,       "cpufreq_ck",   &virt_prcm_set),
-};
-
-static const char *enable_init_clks[] = {
-       "apll96_ck",
-       "apll54_ck",
-       "sync_32k_ick",
-       "omapctrl_ick",
-       "gpmc_fck",
-       "sdrc_ick",
-};
-
-/*
- * init code
- */
-
-int __init omap2430_clk_init(void)
-{
-       prcm_clksrc_ctrl = OMAP2430_PRCM_CLKSRC_CTRL;
-       cpu_mask = RATE_IN_243X;
-       rate_table = omap2430_rate_table;
-
-       omap2xxx_clkt_dpllcore_init(&dpll_ck_hw.hw);
-
-       omap2xxx_clkt_vps_check_bootloader_rates();
-
-       omap_clocks_register(omap2430_clks, ARRAY_SIZE(omap2430_clks));
-
-       omap2xxx_clkt_vps_late_init();
-
-       omap2_clk_disable_autoidle_all();
-
-       omap2_clk_enable_init_clocks(enable_init_clks,
-                                    ARRAY_SIZE(enable_init_clks));
-
-       pr_info("Clocking rate (Crystal/DPLL/MPU): %ld.%01ld/%ld/%ld MHz\n",
-               (clk_get_rate(&sys_ck) / 1000000),
-               (clk_get_rate(&sys_ck) / 100000) % 10,
-               (clk_get_rate(&dpll_ck) / 1000000),
-               (clk_get_rate(&mpu_ck) / 1000000));
-
-       return 0;
-}
diff --git a/arch/arm/mach-omap2/clkt2xxx_osc.c b/arch/arm/mach-omap2/clkt2xxx_osc.c
deleted file mode 100644 (file)
index 0717dff..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * OMAP2xxx osc_clk-specific clock code
- *
- * Copyright (C) 2005-2008 Texas Instruments, Inc.
- * Copyright (C) 2004-2010 Nokia Corporation
- *
- * Contacts:
- * Richard Woodruff <r-woodruff2@ti.com>
- * Paul Walmsley
- *
- * Based on earlier work by Tuukka Tikkanen, Tony Lindgren,
- * Gordon McNutt and RidgeRun, Inc.
- *
- * 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.
- */
-#undef DEBUG
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/clk.h>
-#include <linux/io.h>
-
-#include "clock.h"
-#include "clock2xxx.h"
-#include "prm2xxx_3xxx.h"
-#include "prm-regbits-24xx.h"
-
-/*
- * XXX This does not actually enable the osc_ck, since the osc_ck must
- * be running for this function to be called.  Instead, this function
- * is used to disable an autoidle mode on the osc_ck.  The existing
- * clk_enable/clk_disable()-based usecounting for osc_ck should be
- * replaced with autoidle-based usecounting.
- */
-int omap2_enable_osc_ck(struct clk_hw *clk)
-{
-       u32 pcc;
-
-       pcc = readl_relaxed(prcm_clksrc_ctrl);
-
-       writel_relaxed(pcc & ~OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
-
-       return 0;
-}
-
-/*
- * XXX This does not actually disable the osc_ck, since doing so would
- * immediately halt the system.  Instead, this function is used to
- * enable an autoidle mode on the osc_ck.  The existing
- * clk_enable/clk_disable()-based usecounting for osc_ck should be
- * replaced with autoidle-based usecounting.
- */
-void omap2_disable_osc_ck(struct clk_hw *clk)
-{
-       u32 pcc;
-
-       pcc = readl_relaxed(prcm_clksrc_ctrl);
-
-       writel_relaxed(pcc | OMAP_AUTOEXTCLKMODE_MASK, prcm_clksrc_ctrl);
-}
-
-unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
-                                  unsigned long parent_rate)
-{
-       return omap2xxx_get_apll_clkin() * omap2xxx_get_sysclkdiv();
-}
diff --git a/arch/arm/mach-omap2/clkt2xxx_sys.c b/arch/arm/mach-omap2/clkt2xxx_sys.c
deleted file mode 100644 (file)
index 58dd3a9..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * OMAP2xxx sys_clk-specific clock code
- *
- * Copyright (C) 2005-2008 Texas Instruments, Inc.
- * Copyright (C) 2004-2010 Nokia Corporation
- *
- * Contacts:
- * Richard Woodruff <r-woodruff2@ti.com>
- * Paul Walmsley
- *
- * Based on earlier work by Tuukka Tikkanen, Tony Lindgren,
- * Gordon McNutt and RidgeRun, Inc.
- *
- * 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.
- */
-#undef DEBUG
-
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/clk.h>
-#include <linux/io.h>
-
-#include "clock.h"
-#include "clock2xxx.h"
-#include "prm2xxx_3xxx.h"
-#include "prm-regbits-24xx.h"
-
-void __iomem *prcm_clksrc_ctrl;
-
-u32 omap2xxx_get_sysclkdiv(void)
-{
-       u32 div;
-
-       div = readl_relaxed(prcm_clksrc_ctrl);
-       div &= OMAP_SYSCLKDIV_MASK;
-       div >>= OMAP_SYSCLKDIV_SHIFT;
-
-       return div;
-}
-
-unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
-                                     unsigned long parent_rate)
-{
-       return parent_rate / omap2xxx_get_sysclkdiv();
-}
index 591581a..4ac6e3d 100644 (file)
@@ -81,27 +81,6 @@ u32 omap2_clk_readl(struct clk_hw_omap *clk, void __iomem *reg)
        return val;
 }
 
-/*
- * Used for clocks that have the same value as the parent clock,
- * divided by some factor
- */
-unsigned long omap_fixed_divisor_recalc(struct clk_hw *hw,
-               unsigned long parent_rate)
-{
-       struct clk_hw_omap *oclk;
-
-       if (!hw) {
-               pr_warn("%s: hw is NULL\n", __func__);
-               return -EINVAL;
-       }
-
-       oclk = to_clk_hw_omap(hw);
-
-       WARN_ON(!oclk->fixed_div);
-
-       return parent_rate / oclk->fixed_div;
-}
-
 /*
  * OMAP2+ specific clock functions
  */
index 12f54d4..bb67238 100644 (file)
@@ -178,9 +178,6 @@ struct clksel {
        const struct clksel_rate *rates;
 };
 
-unsigned long omap_fixed_divisor_recalc(struct clk_hw *hw,
-                                       unsigned long parent_rate);
-
 /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
 #define CORE_CLK_SRC_32K               0x0
 #define CORE_CLK_SRC_DPLL              0x1
index 45f41a4..a090225 100644 (file)
@@ -45,8 +45,6 @@ int omap2430_clk_init(void);
 #define omap2430_clk_init()    do { } while(0)
 #endif
 
-extern void __iomem *prcm_clksrc_ctrl;
-
 extern struct clk_hw *dclk_hw;
 int omap2_enable_osc_ck(struct clk_hw *hw);
 void omap2_disable_osc_ck(struct clk_hw *hw);
index 8538669..d7a5d11 100644 (file)
 #define OMAP24XX_AUTO_DPLL_SHIFT                       0
 #define OMAP24XX_AUTO_DPLL_MASK                                (0x3 << 0)
 #define OMAP24XX_APLLS_CLKIN_SHIFT                     23
+#define OMAP24XX_APLLS_CLKIN_WIDTH                     3
 #define OMAP24XX_APLLS_CLKIN_MASK                      (0x7 << 23)
 #define OMAP24XX_DPLL_MULT_MASK                                (0x3ff << 12)
 #define OMAP24XX_DPLL_DIV_MASK                         (0xf << 8)
index 8f55945..1271fe9 100644 (file)
@@ -53,6 +53,7 @@
 #include "prm2xxx.h"
 #include "prm3xxx.h"
 #include "prm44xx.h"
+#include "opp2xxx.h"
 
 /*
  * omap_clk_soc_init: points to a function that does the SoC-specific
@@ -410,7 +411,8 @@ void __init omap2420_init_early(void)
        omap242x_clockdomains_init();
        omap2420_hwmod_init();
        omap_hwmod_init_postsetup();
-       omap_clk_soc_init = omap2420_clk_init;
+       omap_clk_soc_init = omap2420_dt_clk_init;
+       rate_table = omap2420_rate_table;
 }
 
 void __init omap2420_init_late(void)
@@ -439,7 +441,8 @@ void __init omap2430_init_early(void)
        omap243x_clockdomains_init();
        omap2430_hwmod_init();
        omap_hwmod_init_postsetup();
-       omap_clk_soc_init = omap2430_clk_init;
+       omap_clk_soc_init = omap2430_dt_clk_init;
+       rate_table = omap2430_rate_table;
 }
 
 void __init omap2430_init_late(void)
index a5ea988..d7ac05c 100644 (file)
@@ -249,6 +249,10 @@ static void __init prcm_setup_regs(void)
        /* Enable wake-up events */
        omap2_prm_write_mod_reg(OMAP24XX_EN_GPIOS_MASK | OMAP24XX_EN_GPT1_MASK,
                                WKUP_MOD, PM_WKEN);
+
+       /* Enable SYS_CLKEN control when all domains idle */
+       omap2_prm_set_mod_reg_bits(OMAP_AUTOEXTCLKMODE_MASK, OMAP24XX_GR_MOD,
+                                  OMAP2_PRCM_CLKSRC_CTRL_OFFSET);
 }
 
 int __init omap2_pm_init(void)
index 25e8b82..76ca320 100644 (file)
@@ -472,6 +472,8 @@ static struct of_device_id omap_prcm_dt_match_table[] = {
        { .compatible = "ti,am3-scrm" },
        { .compatible = "ti,am4-prcm" },
        { .compatible = "ti,am4-scrm" },
+       { .compatible = "ti,omap2-prcm" },
+       { .compatible = "ti,omap2-scrm" },
        { .compatible = "ti,omap3-prm" },
        { .compatible = "ti,omap3-cm" },
        { .compatible = "ti,omap3-scrm" },
index 1caee6d..d168669 100644 (file)
@@ -2,9 +2,11 @@ config ARCH_ROCKCHIP
        bool "Rockchip RK2928 and RK3xxx SOCs" if ARCH_MULTI_V7
        select PINCTRL
        select PINCTRL_ROCKCHIP
+       select ARCH_HAS_RESET_CONTROLLER
        select ARCH_REQUIRE_GPIOLIB
        select ARM_GIC
        select CACHE_L2X0
+       select HAVE_ARM_ARCH_TIMER
        select HAVE_ARM_SCU if SMP
        select HAVE_ARM_TWD if SMP
        select DW_APB_TIMER_OF
index 968cc34..8ab9e0e 100644 (file)
@@ -29,6 +29,7 @@ static const char * const rockchip_board_dt_compat[] = {
        "rockchip,rk3066a",
        "rockchip,rk3066b",
        "rockchip,rk3188",
+       "rockchip,rk3288",
        NULL,
 };
 
index b5bc22c..9629851 100644 (file)
@@ -574,11 +574,17 @@ static struct clk_lookup lookups[] = {
 
        /* MSTP */
        CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
+       CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]),
        CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
+       CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]),
        CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
+       CLKDEV_DEV_ID("e6c20000.serial", &mstp_clks[MSTP206]),
        CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
+       CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP207]),
        CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
+       CLKDEV_DEV_ID("e6ce0000.serial", &mstp_clks[MSTP216]),
        CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
+       CLKDEV_DEV_ID("e6cf0000.serial", &mstp_clks[MSTP217]),
        CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
        CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
        CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
@@ -598,6 +604,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
        CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
        CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
+       CLKDEV_ICK_ID("fck", "e6130000.timer", &mstp_clks[MSTP329]),
        CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
        CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
        CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
index 50931e3..2ffb560 100644 (file)
@@ -555,27 +555,27 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("sh_mobile_ceu.1",        &mstp_clks[MSTP128]),
 
        CLKDEV_DEV_ID("sh-sci.4",               &mstp_clks[MSTP200]),
-       CLKDEV_DEV_ID("e6c80000.sci",           &mstp_clks[MSTP200]),
+       CLKDEV_DEV_ID("e6c80000.serial",        &mstp_clks[MSTP200]),
        CLKDEV_DEV_ID("sh-sci.3",               &mstp_clks[MSTP201]),
-       CLKDEV_DEV_ID("e6c70000.sci",           &mstp_clks[MSTP201]),
+       CLKDEV_DEV_ID("e6c70000.serial",        &mstp_clks[MSTP201]),
        CLKDEV_DEV_ID("sh-sci.2",               &mstp_clks[MSTP202]),
-       CLKDEV_DEV_ID("e6c60000.sci",           &mstp_clks[MSTP202]),
+       CLKDEV_DEV_ID("e6c60000.serial",        &mstp_clks[MSTP202]),
        CLKDEV_DEV_ID("sh-sci.1",               &mstp_clks[MSTP203]),
-       CLKDEV_DEV_ID("e6c50000.sci",           &mstp_clks[MSTP203]),
+       CLKDEV_DEV_ID("e6c50000.serial",        &mstp_clks[MSTP203]),
        CLKDEV_DEV_ID("sh-sci.0",               &mstp_clks[MSTP204]),
-       CLKDEV_DEV_ID("e6c40000.sci",           &mstp_clks[MSTP204]),
+       CLKDEV_DEV_ID("e6c40000.serial",        &mstp_clks[MSTP204]),
        CLKDEV_DEV_ID("sh-sci.8",               &mstp_clks[MSTP206]),
-       CLKDEV_DEV_ID("e6c30000.sci",           &mstp_clks[MSTP206]),
+       CLKDEV_DEV_ID("e6c30000.serial",        &mstp_clks[MSTP206]),
        CLKDEV_DEV_ID("sh-sci.5",               &mstp_clks[MSTP207]),
-       CLKDEV_DEV_ID("e6cb0000.sci",           &mstp_clks[MSTP207]),
+       CLKDEV_DEV_ID("e6cb0000.serial",        &mstp_clks[MSTP207]),
        CLKDEV_DEV_ID("sh-dma-engine.3",        &mstp_clks[MSTP214]),
        CLKDEV_DEV_ID("sh-dma-engine.2",        &mstp_clks[MSTP216]),
        CLKDEV_DEV_ID("sh-dma-engine.1",        &mstp_clks[MSTP217]),
        CLKDEV_DEV_ID("sh-dma-engine.0",        &mstp_clks[MSTP218]),
        CLKDEV_DEV_ID("sh-sci.7",               &mstp_clks[MSTP222]),
-       CLKDEV_DEV_ID("e6cd0000.sci",           &mstp_clks[MSTP222]),
+       CLKDEV_DEV_ID("e6cd0000.serial",        &mstp_clks[MSTP222]),
        CLKDEV_DEV_ID("sh-sci.6",               &mstp_clks[MSTP230]),
-       CLKDEV_DEV_ID("e6cc0000.sci",           &mstp_clks[MSTP230]),
+       CLKDEV_DEV_ID("e6cc0000.serial",        &mstp_clks[MSTP230]),
 
        CLKDEV_DEV_ID("sh_fsi2",                &mstp_clks[MSTP328]),
        CLKDEV_DEV_ID("fe1f0000.sound",         &mstp_clks[MSTP328]),
@@ -598,8 +598,11 @@ static struct clk_lookup lookups[] = {
 
        /* ICK */
        CLKDEV_ICK_ID("fck",    "sh-tmu.1",             &mstp_clks[MSTP111]),
+       CLKDEV_ICK_ID("fck",    "fff90000.timer",       &mstp_clks[MSTP111]),
        CLKDEV_ICK_ID("fck",    "sh-tmu.0",             &mstp_clks[MSTP125]),
+       CLKDEV_ICK_ID("fck",    "fff80000.timer",       &mstp_clks[MSTP125]),
        CLKDEV_ICK_ID("fck",    "sh-cmt-48.1",          &mstp_clks[MSTP329]),
+       CLKDEV_ICK_ID("fck",    "e6138000.timer",       &mstp_clks[MSTP329]),
        CLKDEV_ICK_ID("host",   "renesas_usbhs",        &mstp_clks[MSTP416]),
        CLKDEV_ICK_ID("func",   "renesas_usbhs",        &mstp_clks[MSTP407]),
        CLKDEV_ICK_ID("phy",    "renesas_usbhs",        &mstp_clks[MSTP406]),
index 13f8f3a..9407bac 100644 (file)
@@ -202,11 +202,17 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */
        CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */
        CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
+       CLKDEV_DEV_ID("ffe40000.serial", &mstp_clks[MSTP026]), /* SCIF0 */
        CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
+       CLKDEV_DEV_ID("ffe41000.serial", &mstp_clks[MSTP025]), /* SCIF1 */
        CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
+       CLKDEV_DEV_ID("ffe42000.serial", &mstp_clks[MSTP024]), /* SCIF2 */
        CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
+       CLKDEV_DEV_ID("ffe43000.serial", &mstp_clks[MSTP023]), /* SCIF3 */
        CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
+       CLKDEV_DEV_ID("ffe44000.serial", &mstp_clks[MSTP022]), /* SCIF4 */
        CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
+       CLKDEV_DEV_ID("ffe45000.serial", &mstp_clks[MSTP021]), /* SCIF5 */
        CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
        CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */
        CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
@@ -238,7 +244,9 @@ static struct clk_lookup lookups[] = {
        CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
        CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
        CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
+       CLKDEV_ICK_ID("fck", "ffd80000.timer", &mstp_clks[MSTP016]),
        CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
+       CLKDEV_ICK_ID("fck", "ffd81000.timer", &mstp_clks[MSTP015]),
 };
 
 void __init r8a7778_clock_init(void)
index 0d9cd1f..0d77f65 100644 (file)
@@ -638,16 +638,25 @@ static struct clk_lookup lookups[] = {
        CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */
        CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
        CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
+       CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP219]), /* SCIFA7 */
        CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */
        CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* MP-DMAC */
        CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
+       CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */
        CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
+       CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */
        CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
+       CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */
        CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
+       CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), /* SCIFA1 */
        CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */
+       CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), /* SCIFA2 */
        CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
+       CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), /* SCIFA3 */
        CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
+       CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), /* SCIFA4 */
        CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
+       CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP331]), /* SCIFA6 */
        CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */
        CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */
        CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
@@ -681,6 +690,7 @@ static struct clk_lookup lookups[] = {
        CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
        CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
        CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
+       CLKDEV_ICK_ID("fck", "e6138000.timer", &mstp_clks[MSTP329]), /* CMT1 */
        CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
 };
 
index 9333770..e84b6a5 100644 (file)
@@ -187,12 +187,6 @@ static struct resource cmt1_resources[] = {
 
 void __init r8a73a4_add_dt_devices(void)
 {
-       r8a73a4_register_scif(0);
-       r8a73a4_register_scif(1);
-       r8a73a4_register_scif(2);
-       r8a73a4_register_scif(3);
-       r8a73a4_register_scif(4);
-       r8a73a4_register_scif(5);
        r8a7790_register_cmt(1);
 }
 
@@ -287,6 +281,12 @@ static struct resource dma_resources[] = {
 void __init r8a73a4_add_standard_devices(void)
 {
        r8a73a4_add_dt_devices();
+       r8a73a4_register_scif(0);
+       r8a73a4_register_scif(1);
+       r8a73a4_register_scif(2);
+       r8a73a4_register_scif(3);
+       r8a73a4_register_scif(4);
+       r8a73a4_register_scif(5);
        r8a73a4_register_irqc(0);
        r8a73a4_register_irqc(1);
        r8a73a4_register_thermal();
index 35dec23..d0f51f1 100644 (file)
@@ -310,6 +310,10 @@ static struct platform_device ipmmu_device = {
 };
 
 static struct platform_device *r8a7740_devices_dt[] __initdata = {
+       &cmt1_device,
+};
+
+static struct platform_device *r8a7740_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
        &scif2_device,
@@ -319,10 +323,6 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
        &scif6_device,
        &scif7_device,
        &scif8_device,
-       &cmt1_device,
-};
-
-static struct platform_device *r8a7740_early_devices[] __initdata = {
        &irqpin0_device,
        &irqpin1_device,
        &irqpin2_device,
index d311ef9..3d5a5ae 100644 (file)
@@ -292,12 +292,6 @@ void __init r8a7778_add_dt_devices(void)
        }
 #endif
 
-       r8a7778_register_scif(0);
-       r8a7778_register_scif(1);
-       r8a7778_register_scif(2);
-       r8a7778_register_scif(3);
-       r8a7778_register_scif(4);
-       r8a7778_register_scif(5);
        r8a7778_register_tmu(0);
 }
 
@@ -506,6 +500,12 @@ static void __init r8a7778_register_hpb_dmae(void)
 void __init r8a7778_add_standard_devices(void)
 {
        r8a7778_add_dt_devices();
+       r8a7778_register_scif(0);
+       r8a7778_register_scif(1);
+       r8a7778_register_scif(2);
+       r8a7778_register_scif(3);
+       r8a7778_register_scif(4);
+       r8a7778_register_scif(5);
        r8a7778_register_i2c(0);
        r8a7778_register_i2c(1);
        r8a7778_register_i2c(2);
index ad00724..2e1e289 100644 (file)
@@ -696,6 +696,10 @@ static struct platform_device irqpin3_device = {
 };
 
 static struct platform_device *sh73a0_devices_dt[] __initdata = {
+       &cmt1_device,
+};
+
+static struct platform_device *sh73a0_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
        &scif2_device,
@@ -705,10 +709,6 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = {
        &scif6_device,
        &scif7_device,
        &scif8_device,
-       &cmt1_device,
-};
-
-static struct platform_device *sh73a0_early_devices[] __initdata = {
        &tmu0_device,
        &ipmmu_device,
 };
index 68bc0b8..942efdc 100644 (file)
@@ -59,29 +59,37 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
 
 void __init shmobile_init_delay(void)
 {
-       struct device_node *np, *parent;
-       u32 max_freq, freq;
-
-       max_freq = 0;
-
-       parent = of_find_node_by_path("/cpus");
-       if (parent) {
-               for_each_child_of_node(parent, np) {
-                       if (!of_property_read_u32(np, "clock-frequency", &freq))
-                               max_freq = max(max_freq, freq);
-               }
-               of_node_put(parent);
-       }
+       struct device_node *np, *cpus;
+       bool is_a8_a9 = false;
+       bool is_a15 = false;
+       u32 max_freq = 0;
+
+       cpus = of_find_node_by_path("/cpus");
+       if (!cpus)
+               return;
+
+       for_each_child_of_node(cpus, np) {
+               u32 freq;
+
+               if (!of_property_read_u32(np, "clock-frequency", &freq))
+                       max_freq = max(max_freq, freq);
 
-       if (max_freq) {
-               if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
-                       shmobile_setup_delay_hz(max_freq, 1, 3);
-               else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
-                       shmobile_setup_delay_hz(max_freq, 1, 3);
-               else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
-                       if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
-                               shmobile_setup_delay_hz(max_freq, 2, 4);
+               if (of_device_is_compatible(np, "arm,cortex-a8") ||
+                   of_device_is_compatible(np, "arm,cortex-a9"))
+                       is_a8_a9 = true;
+               else if (of_device_is_compatible(np, "arm,cortex-a15"))
+                       is_a15 = true;
        }
+
+       of_node_put(cpus);
+
+       if (!max_freq)
+               return;
+
+       if (is_a8_a9)
+               shmobile_setup_delay_hz(max_freq, 1, 3);
+       else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
+               shmobile_setup_delay_hz(max_freq, 2, 4);
 }
 
 static void __init shmobile_late_time_init(void)
index 6fbfbb7..c303b55 100644 (file)
@@ -2,24 +2,20 @@ asflags-y                             += -march=armv7-a
 
 obj-y                                   += io.o
 obj-y                                   += irq.o
-obj-y                                  += fuse.o
 obj-y                                  += pmc.o
 obj-y                                  += flowctrl.o
 obj-y                                  += powergate.o
-obj-y                                  += apbio.o
 obj-y                                  += pm.o
 obj-y                                  += reset.o
 obj-y                                  += reset-handler.o
 obj-y                                  += sleep.o
 obj-y                                  += tegra.o
 obj-$(CONFIG_CPU_IDLE)                 += cpuidle.o
-obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += tegra20_speedo.o
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += sleep-tegra20.o
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += pm-tegra20.o
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += cpuidle-tegra20.o
 endif
-obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += tegra30_speedo.o
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += sleep-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += pm-tegra30.o
 ifeq ($(CONFIG_CPU_IDLE),y)
@@ -28,7 +24,6 @@ endif
 obj-$(CONFIG_SMP)                      += platsmp.o headsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 
-obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += tegra114_speedo.o
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += sleep-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += pm-tegra30.o
 ifeq ($(CONFIG_CPU_IDLE),y)
diff --git a/arch/arm/mach-tegra/apbio.c b/arch/arm/mach-tegra/apbio.c
deleted file mode 100644 (file)
index bc47197..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (C) 2010 NVIDIA Corporation.
- * Copyright (C) 2010 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/of.h>
-#include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
-#include <linux/spinlock.h>
-#include <linux/completion.h>
-#include <linux/sched.h>
-#include <linux/mutex.h>
-
-#include "apbio.h"
-#include "iomap.h"
-
-#if defined(CONFIG_TEGRA20_APB_DMA)
-static DEFINE_MUTEX(tegra_apb_dma_lock);
-static u32 *tegra_apb_bb;
-static dma_addr_t tegra_apb_bb_phys;
-static DECLARE_COMPLETION(tegra_apb_wait);
-
-static u32 tegra_apb_readl_direct(unsigned long offset);
-static void tegra_apb_writel_direct(u32 value, unsigned long offset);
-
-static struct dma_chan *tegra_apb_dma_chan;
-static struct dma_slave_config dma_sconfig;
-
-static bool tegra_apb_dma_init(void)
-{
-       dma_cap_mask_t mask;
-
-       mutex_lock(&tegra_apb_dma_lock);
-
-       /* Check to see if we raced to setup */
-       if (tegra_apb_dma_chan)
-               goto skip_init;
-
-       dma_cap_zero(mask);
-       dma_cap_set(DMA_SLAVE, mask);
-       tegra_apb_dma_chan = dma_request_channel(mask, NULL, NULL);
-       if (!tegra_apb_dma_chan) {
-               /*
-                * This is common until the device is probed, so don't
-                * shout about it.
-                */
-               pr_debug("%s: can not allocate dma channel\n", __func__);
-               goto err_dma_alloc;
-       }
-
-       tegra_apb_bb = dma_alloc_coherent(NULL, sizeof(u32),
-               &tegra_apb_bb_phys, GFP_KERNEL);
-       if (!tegra_apb_bb) {
-               pr_err("%s: can not allocate bounce buffer\n", __func__);
-               goto err_buff_alloc;
-       }
-
-       dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-       dma_sconfig.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-       dma_sconfig.src_maxburst = 1;
-       dma_sconfig.dst_maxburst = 1;
-
-skip_init:
-       mutex_unlock(&tegra_apb_dma_lock);
-       return true;
-
-err_buff_alloc:
-       dma_release_channel(tegra_apb_dma_chan);
-       tegra_apb_dma_chan = NULL;
-
-err_dma_alloc:
-       mutex_unlock(&tegra_apb_dma_lock);
-       return false;
-}
-
-static void apb_dma_complete(void *args)
-{
-       complete(&tegra_apb_wait);
-}
-
-static int do_dma_transfer(unsigned long apb_add,
-               enum dma_transfer_direction dir)
-{
-       struct dma_async_tx_descriptor *dma_desc;
-       int ret;
-
-       if (dir == DMA_DEV_TO_MEM)
-               dma_sconfig.src_addr = apb_add;
-       else
-               dma_sconfig.dst_addr = apb_add;
-
-       ret = dmaengine_slave_config(tegra_apb_dma_chan, &dma_sconfig);
-       if (ret)
-               return ret;
-
-       dma_desc = dmaengine_prep_slave_single(tegra_apb_dma_chan,
-                       tegra_apb_bb_phys, sizeof(u32), dir,
-                       DMA_PREP_INTERRUPT |  DMA_CTRL_ACK);
-       if (!dma_desc)
-               return -EINVAL;
-
-       dma_desc->callback = apb_dma_complete;
-       dma_desc->callback_param = NULL;
-
-       reinit_completion(&tegra_apb_wait);
-
-       dmaengine_submit(dma_desc);
-       dma_async_issue_pending(tegra_apb_dma_chan);
-       ret = wait_for_completion_timeout(&tegra_apb_wait,
-               msecs_to_jiffies(50));
-
-       if (WARN(ret == 0, "apb read dma timed out")) {
-               dmaengine_terminate_all(tegra_apb_dma_chan);
-               return -EFAULT;
-       }
-       return 0;
-}
-
-static u32 tegra_apb_readl_using_dma(unsigned long offset)
-{
-       int ret;
-
-       if (!tegra_apb_dma_chan && !tegra_apb_dma_init())
-               return tegra_apb_readl_direct(offset);
-
-       mutex_lock(&tegra_apb_dma_lock);
-       ret = do_dma_transfer(offset, DMA_DEV_TO_MEM);
-       if (ret < 0) {
-               pr_err("error in reading offset 0x%08lx using dma\n", offset);
-               *(u32 *)tegra_apb_bb = 0;
-       }
-       mutex_unlock(&tegra_apb_dma_lock);
-       return *((u32 *)tegra_apb_bb);
-}
-
-static void tegra_apb_writel_using_dma(u32 value, unsigned long offset)
-{
-       int ret;
-
-       if (!tegra_apb_dma_chan && !tegra_apb_dma_init()) {
-               tegra_apb_writel_direct(value, offset);
-               return;
-       }
-
-       mutex_lock(&tegra_apb_dma_lock);
-       *((u32 *)tegra_apb_bb) = value;
-       ret = do_dma_transfer(offset, DMA_MEM_TO_DEV);
-       if (ret < 0)
-               pr_err("error in writing offset 0x%08lx using dma\n", offset);
-       mutex_unlock(&tegra_apb_dma_lock);
-}
-#else
-#define tegra_apb_readl_using_dma tegra_apb_readl_direct
-#define tegra_apb_writel_using_dma tegra_apb_writel_direct
-#endif
-
-typedef u32 (*apbio_read_fptr)(unsigned long offset);
-typedef void (*apbio_write_fptr)(u32 value, unsigned long offset);
-
-static apbio_read_fptr apbio_read;
-static apbio_write_fptr apbio_write;
-
-static u32 tegra_apb_readl_direct(unsigned long offset)
-{
-       return readl(IO_ADDRESS(offset));
-}
-
-static void tegra_apb_writel_direct(u32 value, unsigned long offset)
-{
-       writel(value, IO_ADDRESS(offset));
-}
-
-void tegra_apb_io_init(void)
-{
-       /* Need to use dma only when it is Tegra20 based platform */
-       if (of_machine_is_compatible("nvidia,tegra20") ||
-                       !of_have_populated_dt()) {
-               apbio_read = tegra_apb_readl_using_dma;
-               apbio_write = tegra_apb_writel_using_dma;
-       } else {
-               apbio_read = tegra_apb_readl_direct;
-               apbio_write = tegra_apb_writel_direct;
-       }
-}
-
-u32 tegra_apb_readl(unsigned long offset)
-{
-       return apbio_read(offset);
-}
-
-void tegra_apb_writel(u32 value, unsigned long offset)
-{
-       apbio_write(value, offset);
-}
diff --git a/arch/arm/mach-tegra/apbio.h b/arch/arm/mach-tegra/apbio.h
deleted file mode 100644 (file)
index f05d71c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2010 NVIDIA Corporation.
- * Copyright (C) 2010 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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 __MACH_TEGRA_APBIO_H
-#define __MACH_TEGRA_APBIO_H
-
-void tegra_apb_io_init(void);
-u32 tegra_apb_readl(unsigned long offset);
-void tegra_apb_writel(u32 value, unsigned long offset);
-#endif
index 9c6029b..bb4782a 100644 (file)
  *
  */
 
-#include <linux/platform_device.h>
 #include <linux/gpio/driver.h>
+#include <linux/platform_device.h>
 #include <linux/rfkill-gpio.h>
+
 #include "board.h"
 
 static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
index b5fb7c1..e3ebdce 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
+#include <asm/firmware.h>
+#include <linux/clockchips.h>
 #include <linux/cpuidle.h>
 #include <linux/cpu_pm.h>
-#include <linux/clockchips.h>
-#include <asm/firmware.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
 
 #include <asm/cpuidle.h>
-#include <asm/suspend.h>
 #include <asm/smp_plat.h>
+#include <asm/suspend.h>
 
 #include "pm.h"
 #include "sleep.h"
index b82dcae..b30bf5c 100644 (file)
  * more details.
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/clk/tegra.h>
+#include <linux/clockchips.h>
 #include <linux/cpuidle.h>
 #include <linux/cpu_pm.h>
-#include <linux/clockchips.h>
-#include <linux/clk/tegra.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
 
 #include <asm/cpuidle.h>
 #include <asm/proc-fns.h>
-#include <asm/suspend.h>
 #include <asm/smp_plat.h>
+#include <asm/suspend.h>
 
-#include "pm.h"
-#include "sleep.h"
+#include "flowctrl.h"
 #include "iomap.h"
 #include "irq.h"
-#include "flowctrl.h"
+#include "pm.h"
+#include "sleep.h"
 
 #ifdef CONFIG_PM_SLEEP
 static bool abort_flag;
index ed2a2a7..3556127 100644 (file)
  * more details.
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/clk/tegra.h>
+#include <linux/clockchips.h>
 #include <linux/cpuidle.h>
 #include <linux/cpu_pm.h>
-#include <linux/clockchips.h>
-#include <linux/clk/tegra.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
 
 #include <asm/cpuidle.h>
 #include <asm/proc-fns.h>
-#include <asm/suspend.h>
 #include <asm/smp_plat.h>
+#include <asm/suspend.h>
 
 #include "pm.h"
 #include "sleep.h"
index 7bc5d8d..3165631 100644 (file)
 #include <linux/kernel.h>
 #include <linux/module.h>
 
-#include "fuse.h"
+#include <soc/tegra/fuse.h>
+
 #include "cpuidle.h"
 
 void __init tegra_cpuidle_init(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
                        tegra20_cpuidle_init();
@@ -49,7 +50,7 @@ void __init tegra_cpuidle_init(void)
 
 void tegra_cpuidle_pcie_irqs_in_use(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
                        tegra20_cpuidle_pcie_irqs_in_use();
index ce8ab8a..ec55d1d 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <linux/cpumask.h>
 #include <linux/init.h>
-#include <linux/kernel.h>
 #include <linux/io.h>
-#include <linux/cpumask.h>
+#include <linux/kernel.h>
+
+#include <soc/tegra/fuse.h>
 
 #include "flowctrl.h"
 #include "iomap.h"
-#include "fuse.h"
 
 static u8 flowctrl_offset_halt_cpu[] = {
        FLOW_CTRL_HALT_CPU0_EVENTS,
@@ -76,7 +77,7 @@ void flowctrl_cpu_suspend_enter(unsigned int cpuid)
        int i;
 
        reg = flowctrl_read_cpu_csr(cpuid);
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                /* clear wfe bitmap */
                reg &= ~TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP;
@@ -117,7 +118,7 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)
 
        /* Disable powergating via flow controller for CPU0 */
        reg = flowctrl_read_cpu_csr(cpuid);
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                /* clear wfe bitmap */
                reg &= ~TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP;
diff --git a/arch/arm/mach-tegra/fuse.c b/arch/arm/mach-tegra/fuse.c
deleted file mode 100644 (file)
index c9ac23b..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * arch/arm/mach-tegra/fuse.c
- *
- * Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
- *
- * Author:
- *     Colin Cross <ccross@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/io.h>
-#include <linux/export.h>
-#include <linux/random.h>
-#include <linux/clk.h>
-#include <linux/tegra-soc.h>
-
-#include "fuse.h"
-#include "iomap.h"
-#include "apbio.h"
-
-/* Tegra20 only */
-#define FUSE_UID_LOW           0x108
-#define FUSE_UID_HIGH          0x10c
-
-/* Tegra30 and later */
-#define FUSE_VENDOR_CODE       0x200
-#define FUSE_FAB_CODE          0x204
-#define FUSE_LOT_CODE_0                0x208
-#define FUSE_LOT_CODE_1                0x20c
-#define FUSE_WAFER_ID          0x210
-#define FUSE_X_COORDINATE      0x214
-#define FUSE_Y_COORDINATE      0x218
-
-#define FUSE_SKU_INFO          0x110
-
-#define TEGRA20_FUSE_SPARE_BIT         0x200
-#define TEGRA30_FUSE_SPARE_BIT         0x244
-
-int tegra_sku_id;
-int tegra_cpu_process_id;
-int tegra_core_process_id;
-int tegra_chip_id;
-int tegra_cpu_speedo_id;               /* only exist in Tegra30 and later */
-int tegra_soc_speedo_id;
-enum tegra_revision tegra_revision;
-
-static struct clk *fuse_clk;
-static int tegra_fuse_spare_bit;
-static void (*tegra_init_speedo_data)(void);
-
-/* The BCT to use at boot is specified by board straps that can be read
- * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs.
- */
-int tegra_bct_strapping;
-
-#define STRAP_OPT 0x008
-#define GMI_AD0 (1 << 4)
-#define GMI_AD1 (1 << 5)
-#define RAM_ID_MASK (GMI_AD0 | GMI_AD1)
-#define RAM_CODE_SHIFT 4
-
-static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
-       [TEGRA_REVISION_UNKNOWN] = "unknown",
-       [TEGRA_REVISION_A01]     = "A01",
-       [TEGRA_REVISION_A02]     = "A02",
-       [TEGRA_REVISION_A03]     = "A03",
-       [TEGRA_REVISION_A03p]    = "A03 prime",
-       [TEGRA_REVISION_A04]     = "A04",
-};
-
-static void tegra_fuse_enable_clk(void)
-{
-       if (IS_ERR(fuse_clk))
-               fuse_clk = clk_get_sys(NULL, "fuse");
-       if (IS_ERR(fuse_clk))
-               return;
-       clk_prepare_enable(fuse_clk);
-}
-
-static void tegra_fuse_disable_clk(void)
-{
-       if (IS_ERR(fuse_clk))
-               return;
-       clk_disable_unprepare(fuse_clk);
-}
-
-u32 tegra_fuse_readl(unsigned long offset)
-{
-       return tegra_apb_readl(TEGRA_FUSE_BASE + offset);
-}
-
-bool tegra_spare_fuse(int bit)
-{
-       bool ret;
-
-       tegra_fuse_enable_clk();
-
-       ret = tegra_fuse_readl(tegra_fuse_spare_bit + bit * 4);
-
-       tegra_fuse_disable_clk();
-
-       return ret;
-}
-
-static enum tegra_revision tegra_get_revision(u32 id)
-{
-       u32 minor_rev = (id >> 16) & 0xf;
-
-       switch (minor_rev) {
-       case 1:
-               return TEGRA_REVISION_A01;
-       case 2:
-               return TEGRA_REVISION_A02;
-       case 3:
-               if (tegra_chip_id == TEGRA20 &&
-                       (tegra_spare_fuse(18) || tegra_spare_fuse(19)))
-                       return TEGRA_REVISION_A03p;
-               else
-                       return TEGRA_REVISION_A03;
-       case 4:
-               return TEGRA_REVISION_A04;
-       default:
-               return TEGRA_REVISION_UNKNOWN;
-       }
-}
-
-static void tegra_get_process_id(void)
-{
-       u32 reg;
-
-       tegra_fuse_enable_clk();
-
-       reg = tegra_fuse_readl(tegra_fuse_spare_bit);
-       tegra_cpu_process_id = (reg >> 6) & 3;
-       reg = tegra_fuse_readl(tegra_fuse_spare_bit);
-       tegra_core_process_id = (reg >> 12) & 3;
-
-       tegra_fuse_disable_clk();
-}
-
-u32 tegra_read_chipid(void)
-{
-       return readl_relaxed(IO_ADDRESS(TEGRA_APB_MISC_BASE) + 0x804);
-}
-
-static void __init tegra20_fuse_init_randomness(void)
-{
-       u32 randomness[2];
-
-       randomness[0] = tegra_fuse_readl(FUSE_UID_LOW);
-       randomness[1] = tegra_fuse_readl(FUSE_UID_HIGH);
-
-       add_device_randomness(randomness, sizeof(randomness));
-}
-
-/* Applies to Tegra30 or later */
-static void __init tegra30_fuse_init_randomness(void)
-{
-       u32 randomness[7];
-
-       randomness[0] = tegra_fuse_readl(FUSE_VENDOR_CODE);
-       randomness[1] = tegra_fuse_readl(FUSE_FAB_CODE);
-       randomness[2] = tegra_fuse_readl(FUSE_LOT_CODE_0);
-       randomness[3] = tegra_fuse_readl(FUSE_LOT_CODE_1);
-       randomness[4] = tegra_fuse_readl(FUSE_WAFER_ID);
-       randomness[5] = tegra_fuse_readl(FUSE_X_COORDINATE);
-       randomness[6] = tegra_fuse_readl(FUSE_Y_COORDINATE);
-
-       add_device_randomness(randomness, sizeof(randomness));
-}
-
-void __init tegra_init_fuse(void)
-{
-       u32 id;
-       u32 randomness[5];
-
-       u32 reg = readl(IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48));
-       reg |= 1 << 28;
-       writel(reg, IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x48));
-
-       /*
-        * Enable FUSE clock. This needs to be hardcoded because the clock
-        * subsystem is not active during early boot.
-        */
-       reg = readl(IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x14));
-       reg |= 1 << 7;
-       writel(reg, IO_ADDRESS(TEGRA_CLK_RESET_BASE + 0x14));
-       fuse_clk = ERR_PTR(-EINVAL);
-
-       reg = tegra_fuse_readl(FUSE_SKU_INFO);
-       randomness[0] = reg;
-       tegra_sku_id = reg & 0xFF;
-
-       reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT);
-       randomness[1] = reg;
-       tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT;
-
-       id = tegra_read_chipid();
-       randomness[2] = id;
-       tegra_chip_id = (id >> 8) & 0xff;
-
-       switch (tegra_chip_id) {
-       case TEGRA20:
-               tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT;
-               tegra_init_speedo_data = &tegra20_init_speedo_data;
-               break;
-       case TEGRA30:
-               tegra_fuse_spare_bit = TEGRA30_FUSE_SPARE_BIT;
-               tegra_init_speedo_data = &tegra30_init_speedo_data;
-               break;
-       case TEGRA114:
-               tegra_init_speedo_data = &tegra114_init_speedo_data;
-               break;
-       default:
-               pr_warn("Tegra: unknown chip id %d\n", tegra_chip_id);
-               tegra_fuse_spare_bit = TEGRA20_FUSE_SPARE_BIT;
-               tegra_init_speedo_data = &tegra_get_process_id;
-       }
-
-       tegra_revision = tegra_get_revision(id);
-       tegra_init_speedo_data();
-       randomness[3] = (tegra_cpu_process_id << 16) | tegra_core_process_id;
-       randomness[4] = (tegra_cpu_speedo_id << 16) | tegra_soc_speedo_id;
-
-       add_device_randomness(randomness, sizeof(randomness));
-       switch (tegra_chip_id) {
-       case TEGRA20:
-               tegra20_fuse_init_randomness();
-               break;
-       case TEGRA30:
-       case TEGRA114:
-       default:
-               tegra30_fuse_init_randomness();
-               break;
-       }
-
-       pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n",
-               tegra_revision_name[tegra_revision],
-               tegra_sku_id, tegra_cpu_process_id,
-               tegra_core_process_id);
-}
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h
deleted file mode 100644 (file)
index c01d047..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
- *
- * Author:
- *     Colin Cross <ccross@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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 __MACH_TEGRA_FUSE_H
-#define __MACH_TEGRA_FUSE_H
-
-#define SKU_ID_T20     8
-#define SKU_ID_T25SE   20
-#define SKU_ID_AP25    23
-#define SKU_ID_T25     24
-#define SKU_ID_AP25E   27
-#define SKU_ID_T25E    28
-
-#define TEGRA20                0x20
-#define TEGRA30                0x30
-#define TEGRA114       0x35
-#define TEGRA124       0x40
-
-#ifndef __ASSEMBLY__
-enum tegra_revision {
-       TEGRA_REVISION_UNKNOWN = 0,
-       TEGRA_REVISION_A01,
-       TEGRA_REVISION_A02,
-       TEGRA_REVISION_A03,
-       TEGRA_REVISION_A03p,
-       TEGRA_REVISION_A04,
-       TEGRA_REVISION_MAX,
-};
-
-extern int tegra_sku_id;
-extern int tegra_cpu_process_id;
-extern int tegra_core_process_id;
-extern int tegra_chip_id;
-extern int tegra_cpu_speedo_id;                /* only exist in Tegra30 and later */
-extern int tegra_soc_speedo_id;
-extern enum tegra_revision tegra_revision;
-
-extern int tegra_bct_strapping;
-
-unsigned long long tegra_chip_uid(void);
-void tegra_init_fuse(void);
-bool tegra_spare_fuse(int bit);
-u32 tegra_fuse_readl(unsigned long offset);
-
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-void tegra20_init_speedo_data(void);
-#else
-static inline void tegra20_init_speedo_data(void) {}
-#endif
-
-#ifdef CONFIG_ARCH_TEGRA_3x_SOC
-void tegra30_init_speedo_data(void);
-#else
-static inline void tegra30_init_speedo_data(void) {}
-#endif
-
-#ifdef CONFIG_ARCH_TEGRA_114_SOC
-void tegra114_init_speedo_data(void);
-#else
-static inline void tegra114_init_speedo_data(void) {}
-#endif
-#endif /* __ASSEMBLY__ */
-
-#endif
index ff26af2..d60339c 100644 (file)
@@ -7,13 +7,15 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
+#include <linux/clk/tegra.h>
 #include <linux/kernel.h>
 #include <linux/smp.h>
-#include <linux/clk/tegra.h>
+
+#include <soc/tegra/fuse.h>
 
 #include <asm/smp_plat.h>
 
-#include "fuse.h"
 #include "sleep.h"
 
 static void (*tegra_hotplug_shutdown)(void);
@@ -51,12 +53,12 @@ void __init tegra_hotplug_init(void)
        if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
                return;
 
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_get_chip_id() == TEGRA20)
                tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_get_chip_id() == TEGRA30)
                tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_chip_id == TEGRA114)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_get_chip_id() == TEGRA114)
                tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) && tegra_chip_id == TEGRA124)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) && tegra_get_chip_id() == TEGRA124)
                tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
 }
index bb9c9c2..352de15 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/init.h>
-#include <linux/mm.h>
 #include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/module.h>
 
-#include <asm/page.h>
 #include <asm/mach/map.h>
+#include <asm/page.h>
 
 #include "board.h"
 #include "iomap.h"
index 1a74d56..da7be13 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
 #include <linux/cpu_pm.h>
 #include <linux/interrupt.h>
-#include <linux/irq.h>
 #include <linux/io.h>
-#include <linux/of.h>
-#include <linux/of_address.h>
 #include <linux/irqchip/arm-gic.h>
+#include <linux/irq.h>
+#include <linux/kernel.h>
+#include <linux/of_address.h>
+#include <linux/of.h>
 #include <linux/syscore_ops.h>
 
 #include "board.h"
index 929d104..0466a14 100644 (file)
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/init.h>
-#include <linux/errno.h>
+
+#include <linux/clk/tegra.h>
 #include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/io.h>
 #include <linux/jiffies.h>
 #include <linux/smp.h>
-#include <linux/io.h>
-#include <linux/clk/tegra.h>
+
+#include <soc/tegra/fuse.h>
 
 #include <asm/cacheflush.h>
 #include <asm/mach-types.h>
-#include <asm/smp_scu.h>
 #include <asm/smp_plat.h>
-
-#include "fuse.h"
-#include "flowctrl.h"
-#include "reset.h"
-#include "pmc.h"
+#include <asm/smp_scu.h>
 
 #include "common.h"
+#include "flowctrl.h"
 #include "iomap.h"
+#include "pmc.h"
+#include "reset.h"
 
 static cpumask_t tegra_cpu_init_mask;
 
@@ -170,13 +171,13 @@ static int tegra114_boot_secondary(unsigned int cpu, struct task_struct *idle)
 static int tegra_boot_secondary(unsigned int cpu,
                                          struct task_struct *idle)
 {
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_get_chip_id() == TEGRA20)
                return tegra20_boot_secondary(cpu, idle);
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_get_chip_id() == TEGRA30)
                return tegra30_boot_secondary(cpu, idle);
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_chip_id == TEGRA114)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_114_SOC) && tegra_get_chip_id() == TEGRA114)
                return tegra114_boot_secondary(cpu, idle);
-       if (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) && tegra_chip_id == TEGRA124)
+       if (IS_ENABLED(CONFIG_ARCH_TEGRA_124_SOC) && tegra_get_chip_id() == TEGRA124)
                return tegra114_boot_secondary(cpu, idle);
 
        return -EINVAL;
index d65e1d7..39ac2b7 100644 (file)
@@ -13,6 +13,7 @@
  * 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 <linux/kernel.h>
 
 #include "pm.h"
index 8fa326d..46cc19d 100644 (file)
@@ -13,6 +13,7 @@
  * 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 <linux/kernel.h>
 
 #include "pm.h"
index f55b05a..94db3b6 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/kernel.h>
-#include <linux/spinlock.h>
-#include <linux/io.h>
+#include <linux/clk/tegra.h>
 #include <linux/cpumask.h>
-#include <linux/delay.h>
 #include <linux/cpu_pm.h>
-#include <linux/suspend.h>
+#include <linux/delay.h>
 #include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
 #include <linux/slab.h>
-#include <linux/clk/tegra.h>
+#include <linux/spinlock.h>
+#include <linux/suspend.h>
+
+#include <soc/tegra/fuse.h>
 
-#include <asm/smp_plat.h>
 #include <asm/cacheflush.h>
-#include <asm/suspend.h>
 #include <asm/idmap.h>
 #include <asm/proc-fns.h>
+#include <asm/smp_plat.h>
+#include <asm/suspend.h>
 #include <asm/tlbflush.h>
 
-#include "iomap.h"
-#include "reset.h"
 #include "flowctrl.h"
-#include "fuse.h"
-#include "pm.h"
+#include "iomap.h"
 #include "pmc.h"
+#include "pm.h"
+#include "reset.h"
 #include "sleep.h"
 
 #ifdef CONFIG_PM_SLEEP
@@ -53,7 +54,7 @@ static int (*tegra_sleep_func)(unsigned long v2p);
 
 static void tegra_tear_down_cpu_init(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
                        tegra_tear_down_cpu = tegra20_tear_down_cpu;
@@ -143,7 +144,7 @@ bool tegra_set_cpu_in_lp2(void)
 
        if ((phy_cpu_id == 0) && cpumask_equal(cpu_lp2_mask, cpu_online_mask))
                last_cpu = true;
-       else if (tegra_chip_id == TEGRA20 && phy_cpu_id == 1)
+       else if (tegra_get_chip_id() == TEGRA20 && phy_cpu_id == 1)
                tegra20_cpu_set_resettable_soon();
 
        spin_unlock(&tegra_lp2_lock);
@@ -212,7 +213,7 @@ static int tegra_sleep_core(unsigned long v2p)
  */
 static bool tegra_lp1_iram_hook(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
                        tegra20_lp1_iram_hook();
@@ -242,7 +243,7 @@ static bool tegra_lp1_iram_hook(void)
 
 static bool tegra_sleep_core_init(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC))
                        tegra20_sleep_core_init();
index 7c7123e..69df180 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/kernel.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/tegra-powergate.h>
+
+#include <soc/tegra/fuse.h>
+#include <soc/tegra/powergate.h>
 
 #include "flowctrl.h"
-#include "fuse.h"
 #include "pm.h"
 #include "pmc.h"
 #include "sleep.h"
@@ -251,7 +252,7 @@ void tegra_pmc_pm_set(enum tegra_suspend_mode mode)
        reg |= TEGRA_POWER_CPU_PWRREQ_OE;
        reg &= ~TEGRA_POWER_EFFECT_LP0;
 
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
        case TEGRA30:
                break;
index 4cefc5c..0a14b86 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
 #include <linux/clk.h>
+#include <linux/clk/tegra.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/export.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/kernel.h>
 #include <linux/reset.h>
 #include <linux/seq_file.h>
 #include <linux/spinlock.h>
-#include <linux/clk/tegra.h>
-#include <linux/tegra-powergate.h>
 
-#include "fuse.h"
+#include <soc/tegra/fuse.h>
+#include <soc/tegra/powergate.h>
+
 #include "iomap.h"
 
 #define DPD_SAMPLE             0x020
@@ -157,7 +158,7 @@ int tegra_powergate_remove_clamping(int id)
         * The Tegra124 GPU has a separate register (with different semantics)
         * to remove clamps.
         */
-       if (tegra_chip_id == TEGRA124) {
+       if (tegra_get_chip_id() == TEGRA124) {
                if (id == TEGRA_POWERGATE_3D) {
                        pmc_write(0, GPU_RG_CNTRL);
                        return 0;
@@ -227,7 +228,7 @@ int tegra_cpu_powergate_id(int cpuid)
 
 int __init tegra_powergate_init(void)
 {
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                tegra_num_powerdomains = 7;
                break;
@@ -368,7 +369,7 @@ int __init tegra_powergate_debugfs_init(void)
 {
        struct dentry *d;
 
-       switch (tegra_chip_id) {
+       switch (tegra_get_chip_id()) {
        case TEGRA20:
                powergate_name = powergate_name_t20;
                break;
index 578d4d1..7b2baab 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <linux/linkage.h>
 #include <linux/init.h>
+#include <linux/linkage.h>
+
+#include <soc/tegra/fuse.h>
 
-#include <asm/cache.h>
 #include <asm/asm-offsets.h>
+#include <asm/cache.h>
 
 #include "flowctrl.h"
-#include "fuse.h"
 #include "iomap.h"
 #include "reset.h"
 #include "sleep.h"
index 146fe8e..5377495 100644 (file)
  *
  */
 
+#include <linux/bitops.h>
+#include <linux/cpumask.h>
 #include <linux/init.h>
 #include <linux/io.h>
-#include <linux/cpumask.h>
-#include <linux/bitops.h>
+
+#include <soc/tegra/fuse.h>
 
 #include <asm/cacheflush.h>
-#include <asm/hardware/cache-l2x0.h>
 #include <asm/firmware.h>
+#include <asm/hardware/cache-l2x0.h>
 
 #include "iomap.h"
 #include "irammap.h"
 #include "reset.h"
 #include "sleep.h"
-#include "fuse.h"
 
 #define TEGRA_IRAM_RESET_BASE (TEGRA_IRAM_BASE + \
                                TEGRA_IRAM_RESET_HANDLER_OFFSET)
@@ -53,7 +54,7 @@ static void __init tegra_cpu_reset_handler_set(const u32 reset_address)
         * Prevent further modifications to the physical reset vector.
         *  NOTE: Has no effect on chips prior to Tegra30.
         */
-       if (tegra_chip_id != TEGRA20) {
+       if (tegra_get_chip_id() != TEGRA20) {
                reg = readl(sb_ctrl);
                reg |= 2;
                writel(reg, sb_ctrl);
index b16d4a5..8ea699b 100644 (file)
 
 #include <linux/linkage.h>
 
-#include <asm/assembler.h>
+#include <soc/tegra/fuse.h>
+
 #include <asm/asm-offsets.h>
+#include <asm/assembler.h>
 #include <asm/cache.h>
 
+#include "flowctrl.h"
 #include "irammap.h"
-#include "fuse.h"
 #include "sleep.h"
-#include "flowctrl.h"
 
 #define EMC_CFG                                0xc
 #define EMC_ADR_CFG                    0x10
index 15ac9fc..6ccbc8c 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/serial_8250.h>
 #include <linux/clk.h>
+#include <linux/clk/tegra.h>
 #include <linux/dma-mapping.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/irqchip.h>
 #include <linux/irqdomain.h>
-#include <linux/of.h>
+#include <linux/kernel.h>
 #include <linux/of_address.h>
 #include <linux/of_fdt.h>
+#include <linux/of.h>
 #include <linux/of_platform.h>
 #include <linux/pda_power.h>
-#include <linux/io.h>
+#include <linux/platform_device.h>
+#include <linux/serial_8250.h>
 #include <linux/slab.h>
 #include <linux/sys_soc.h>
 #include <linux/usb/tegra_usb_phy.h>
-#include <linux/clk/tegra.h>
-#include <linux/irqchip.h>
+
+#include <soc/tegra/fuse.h>
 
 #include <asm/hardware/cache-l2x0.h>
-#include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
+#include <asm/mach-types.h>
 #include <asm/setup.h>
 #include <asm/trusted_foundations.h>
 
-#include "apbio.h"
 #include "board.h"
 #include "common.h"
 #include "cpuidle.h"
-#include "fuse.h"
 #include "iomap.h"
 #include "irq.h"
 #include "pmc.h"
@@ -73,7 +73,6 @@ u32 tegra_uart_config[3] = {
 static void __init tegra_init_early(void)
 {
        of_register_trusted_foundations();
-       tegra_apb_io_init();
        tegra_init_fuse();
        tegra_cpu_reset_handler_init();
        tegra_powergate_init();
@@ -103,8 +102,9 @@ static void __init tegra_dt_init(void)
                goto out;
 
        soc_dev_attr->family = kasprintf(GFP_KERNEL, "Tegra");
-       soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d", tegra_revision);
-       soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%d", tegra_chip_id);
+       soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%d",
+                                          tegra_sku_info.revision);
+       soc_dev_attr->soc_id = kasprintf(GFP_KERNEL, "%u", tegra_get_chip_id());
 
        soc_dev = soc_device_register(soc_dev_attr);
        if (IS_ERR(soc_dev)) {
diff --git a/arch/arm/mach-tegra/tegra114_speedo.c b/arch/arm/mach-tegra/tegra114_speedo.c
deleted file mode 100644 (file)
index 5218d48..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * 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 <linux/kernel.h>
-#include <linux/bug.h>
-
-#include "fuse.h"
-
-#define CORE_PROCESS_CORNERS_NUM       2
-#define CPU_PROCESS_CORNERS_NUM                2
-
-enum {
-       THRESHOLD_INDEX_0,
-       THRESHOLD_INDEX_1,
-       THRESHOLD_INDEX_COUNT,
-};
-
-static const u32 core_process_speedos[][CORE_PROCESS_CORNERS_NUM] = {
-       {1123,     UINT_MAX},
-       {0,        UINT_MAX},
-};
-
-static const u32 cpu_process_speedos[][CPU_PROCESS_CORNERS_NUM] = {
-       {1695,     UINT_MAX},
-       {0,        UINT_MAX},
-};
-
-static void rev_sku_to_speedo_ids(int rev, int sku, int *threshold)
-{
-       u32 tmp;
-
-       switch (sku) {
-       case 0x00:
-       case 0x10:
-       case 0x05:
-       case 0x06:
-               tegra_cpu_speedo_id = 1;
-               tegra_soc_speedo_id = 0;
-               *threshold = THRESHOLD_INDEX_0;
-               break;
-
-       case 0x03:
-       case 0x04:
-               tegra_cpu_speedo_id = 2;
-               tegra_soc_speedo_id = 1;
-               *threshold = THRESHOLD_INDEX_1;
-               break;
-
-       default:
-               pr_err("Tegra114 Unknown SKU %d\n", sku);
-               tegra_cpu_speedo_id = 0;
-               tegra_soc_speedo_id = 0;
-               *threshold = THRESHOLD_INDEX_0;
-               break;
-       }
-
-       if (rev == TEGRA_REVISION_A01) {
-               tmp = tegra_fuse_readl(0x270) << 1;
-               tmp |= tegra_fuse_readl(0x26c);
-               if (!tmp)
-                       tegra_cpu_speedo_id = 0;
-       }
-}
-
-void tegra114_init_speedo_data(void)
-{
-       u32 cpu_speedo_val;
-       u32 core_speedo_val;
-       int threshold;
-       int i;
-
-       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) !=
-                       THRESHOLD_INDEX_COUNT);
-       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) !=
-                       THRESHOLD_INDEX_COUNT);
-
-       rev_sku_to_speedo_ids(tegra_revision, tegra_sku_id, &threshold);
-
-       cpu_speedo_val = tegra_fuse_readl(0x12c) + 1024;
-       core_speedo_val = tegra_fuse_readl(0x134);
-
-       for (i = 0; i < CPU_PROCESS_CORNERS_NUM; i++)
-               if (cpu_speedo_val < cpu_process_speedos[threshold][i])
-                       break;
-       tegra_cpu_process_id = i;
-
-       for (i = 0; i < CORE_PROCESS_CORNERS_NUM; i++)
-               if (core_speedo_val < core_process_speedos[threshold][i])
-                       break;
-       tegra_core_process_id = i;
-}
diff --git a/arch/arm/mach-tegra/tegra20_speedo.c b/arch/arm/mach-tegra/tegra20_speedo.c
deleted file mode 100644 (file)
index fa6eb57..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * 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 <linux/kernel.h>
-#include <linux/bug.h>
-
-#include "fuse.h"
-
-#define CPU_SPEEDO_LSBIT               20
-#define CPU_SPEEDO_MSBIT               29
-#define CPU_SPEEDO_REDUND_LSBIT                30
-#define CPU_SPEEDO_REDUND_MSBIT                39
-#define CPU_SPEEDO_REDUND_OFFS (CPU_SPEEDO_REDUND_MSBIT - CPU_SPEEDO_MSBIT)
-
-#define CORE_SPEEDO_LSBIT              40
-#define CORE_SPEEDO_MSBIT              47
-#define CORE_SPEEDO_REDUND_LSBIT       48
-#define CORE_SPEEDO_REDUND_MSBIT       55
-#define CORE_SPEEDO_REDUND_OFFS        (CORE_SPEEDO_REDUND_MSBIT - CORE_SPEEDO_MSBIT)
-
-#define SPEEDO_MULT                    4
-
-#define PROCESS_CORNERS_NUM            4
-
-#define SPEEDO_ID_SELECT_0(rev)                ((rev) <= 2)
-#define SPEEDO_ID_SELECT_1(sku)                \
-       (((sku) != 20) && ((sku) != 23) && ((sku) != 24) && \
-        ((sku) != 27) && ((sku) != 28))
-
-enum {
-       SPEEDO_ID_0,
-       SPEEDO_ID_1,
-       SPEEDO_ID_2,
-       SPEEDO_ID_COUNT,
-};
-
-static const u32 cpu_process_speedos[][PROCESS_CORNERS_NUM] = {
-       {315, 366, 420, UINT_MAX},
-       {303, 368, 419, UINT_MAX},
-       {316, 331, 383, UINT_MAX},
-};
-
-static const u32 core_process_speedos[][PROCESS_CORNERS_NUM] = {
-       {165, 195, 224, UINT_MAX},
-       {165, 195, 224, UINT_MAX},
-       {165, 195, 224, UINT_MAX},
-};
-
-void tegra20_init_speedo_data(void)
-{
-       u32 reg;
-       u32 val;
-       int i;
-
-       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != SPEEDO_ID_COUNT);
-       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != SPEEDO_ID_COUNT);
-
-       if (SPEEDO_ID_SELECT_0(tegra_revision))
-               tegra_soc_speedo_id = SPEEDO_ID_0;
-       else if (SPEEDO_ID_SELECT_1(tegra_sku_id))
-               tegra_soc_speedo_id = SPEEDO_ID_1;
-       else
-               tegra_soc_speedo_id = SPEEDO_ID_2;
-
-       val = 0;
-       for (i = CPU_SPEEDO_MSBIT; i >= CPU_SPEEDO_LSBIT; i--) {
-               reg = tegra_spare_fuse(i) |
-                       tegra_spare_fuse(i + CPU_SPEEDO_REDUND_OFFS);
-               val = (val << 1) | (reg & 0x1);
-       }
-       val = val * SPEEDO_MULT;
-       pr_debug("%s CPU speedo value %u\n", __func__, val);
-
-       for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) {
-               if (val <= cpu_process_speedos[tegra_soc_speedo_id][i])
-                       break;
-       }
-       tegra_cpu_process_id = i;
-
-       val = 0;
-       for (i = CORE_SPEEDO_MSBIT; i >= CORE_SPEEDO_LSBIT; i--) {
-               reg = tegra_spare_fuse(i) |
-                       tegra_spare_fuse(i + CORE_SPEEDO_REDUND_OFFS);
-               val = (val << 1) | (reg & 0x1);
-       }
-       val = val * SPEEDO_MULT;
-       pr_debug("%s Core speedo value %u\n", __func__, val);
-
-       for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) {
-               if (val <= core_process_speedos[tegra_soc_speedo_id][i])
-                       break;
-       }
-       tegra_core_process_id = i;
-
-       pr_info("Tegra20 Soc Speedo ID %d", tegra_soc_speedo_id);
-}
diff --git a/arch/arm/mach-tegra/tegra30_speedo.c b/arch/arm/mach-tegra/tegra30_speedo.c
deleted file mode 100644 (file)
index 125cb16..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * 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 <linux/kernel.h>
-#include <linux/bug.h>
-
-#include "fuse.h"
-
-#define CORE_PROCESS_CORNERS_NUM       1
-#define CPU_PROCESS_CORNERS_NUM                6
-
-#define FUSE_SPEEDO_CALIB_0    0x114
-#define FUSE_PACKAGE_INFO      0X1FC
-#define FUSE_TEST_PROG_VER     0X128
-
-#define G_SPEEDO_BIT_MINUS1    58
-#define G_SPEEDO_BIT_MINUS1_R  59
-#define G_SPEEDO_BIT_MINUS2    60
-#define G_SPEEDO_BIT_MINUS2_R  61
-#define LP_SPEEDO_BIT_MINUS1   62
-#define LP_SPEEDO_BIT_MINUS1_R 63
-#define LP_SPEEDO_BIT_MINUS2   64
-#define LP_SPEEDO_BIT_MINUS2_R 65
-
-enum {
-       THRESHOLD_INDEX_0,
-       THRESHOLD_INDEX_1,
-       THRESHOLD_INDEX_2,
-       THRESHOLD_INDEX_3,
-       THRESHOLD_INDEX_4,
-       THRESHOLD_INDEX_5,
-       THRESHOLD_INDEX_6,
-       THRESHOLD_INDEX_7,
-       THRESHOLD_INDEX_8,
-       THRESHOLD_INDEX_9,
-       THRESHOLD_INDEX_10,
-       THRESHOLD_INDEX_11,
-       THRESHOLD_INDEX_COUNT,
-};
-
-static const u32 core_process_speedos[][CORE_PROCESS_CORNERS_NUM] = {
-       {180},
-       {170},
-       {195},
-       {180},
-       {168},
-       {192},
-       {180},
-       {170},
-       {195},
-       {180},
-       {180},
-       {180},
-};
-
-static const u32 cpu_process_speedos[][CPU_PROCESS_CORNERS_NUM] = {
-       {306, 338, 360, 376, UINT_MAX},
-       {295, 336, 358, 375, UINT_MAX},
-       {325, 325, 358, 375, UINT_MAX},
-       {325, 325, 358, 375, UINT_MAX},
-       {292, 324, 348, 364, UINT_MAX},
-       {324, 324, 348, 364, UINT_MAX},
-       {324, 324, 348, 364, UINT_MAX},
-       {295, 336, 358, 375, UINT_MAX},
-       {358, 358, 358, 358, 397, UINT_MAX},
-       {364, 364, 364, 364, 397, UINT_MAX},
-       {295, 336, 358, 375, 391, UINT_MAX},
-       {295, 336, 358, 375, 391, UINT_MAX},
-};
-
-static int threshold_index;
-static int package_id;
-
-static void fuse_speedo_calib(u32 *speedo_g, u32 *speedo_lp)
-{
-       u32 reg;
-       int ate_ver;
-       int bit_minus1;
-       int bit_minus2;
-
-       reg = tegra_fuse_readl(FUSE_SPEEDO_CALIB_0);
-
-       *speedo_lp = (reg & 0xFFFF) * 4;
-       *speedo_g = ((reg >> 16) & 0xFFFF) * 4;
-
-       ate_ver = tegra_fuse_readl(FUSE_TEST_PROG_VER);
-       pr_info("%s: ATE prog ver %d.%d\n", __func__, ate_ver/10, ate_ver%10);
-
-       if (ate_ver >= 26) {
-               bit_minus1 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1);
-               bit_minus1 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS1_R);
-               bit_minus2 = tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2);
-               bit_minus2 |= tegra_spare_fuse(LP_SPEEDO_BIT_MINUS2_R);
-               *speedo_lp |= (bit_minus1 << 1) | bit_minus2;
-
-               bit_minus1 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS1);
-               bit_minus1 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS1_R);
-               bit_minus2 = tegra_spare_fuse(G_SPEEDO_BIT_MINUS2);
-               bit_minus2 |= tegra_spare_fuse(G_SPEEDO_BIT_MINUS2_R);
-               *speedo_g |= (bit_minus1 << 1) | bit_minus2;
-       } else {
-               *speedo_lp |= 0x3;
-               *speedo_g |= 0x3;
-       }
-}
-
-static void rev_sku_to_speedo_ids(int rev, int sku)
-{
-       switch (rev) {
-       case TEGRA_REVISION_A01:
-               tegra_cpu_speedo_id = 0;
-               tegra_soc_speedo_id = 0;
-               threshold_index = THRESHOLD_INDEX_0;
-               break;
-       case TEGRA_REVISION_A02:
-       case TEGRA_REVISION_A03:
-               switch (sku) {
-               case 0x87:
-               case 0x82:
-                       tegra_cpu_speedo_id = 1;
-                       tegra_soc_speedo_id = 1;
-                       threshold_index = THRESHOLD_INDEX_1;
-                       break;
-               case 0x81:
-                       switch (package_id) {
-                       case 1:
-                               tegra_cpu_speedo_id = 2;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_2;
-                               break;
-                       case 2:
-                               tegra_cpu_speedo_id = 4;
-                               tegra_soc_speedo_id = 1;
-                               threshold_index = THRESHOLD_INDEX_7;
-                               break;
-                       default:
-                               pr_err("Tegra30: Unknown pkg %d\n", package_id);
-                               BUG();
-                               break;
-                       }
-                       break;
-               case 0x80:
-                       switch (package_id) {
-                       case 1:
-                               tegra_cpu_speedo_id = 5;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_8;
-                               break;
-                       case 2:
-                               tegra_cpu_speedo_id = 6;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_9;
-                               break;
-                       default:
-                               pr_err("Tegra30: Unknown pkg %d\n", package_id);
-                               BUG();
-                               break;
-                       }
-                       break;
-               case 0x83:
-                       switch (package_id) {
-                       case 1:
-                               tegra_cpu_speedo_id = 7;
-                               tegra_soc_speedo_id = 1;
-                               threshold_index = THRESHOLD_INDEX_10;
-                               break;
-                       case 2:
-                               tegra_cpu_speedo_id = 3;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_3;
-                               break;
-                       default:
-                               pr_err("Tegra30: Unknown pkg %d\n", package_id);
-                               BUG();
-                               break;
-                       }
-                       break;
-               case 0x8F:
-                       tegra_cpu_speedo_id = 8;
-                       tegra_soc_speedo_id = 1;
-                       threshold_index = THRESHOLD_INDEX_11;
-                       break;
-               case 0x08:
-                       tegra_cpu_speedo_id = 1;
-                       tegra_soc_speedo_id = 1;
-                       threshold_index = THRESHOLD_INDEX_4;
-                       break;
-               case 0x02:
-                       tegra_cpu_speedo_id = 2;
-                       tegra_soc_speedo_id = 2;
-                       threshold_index = THRESHOLD_INDEX_5;
-                       break;
-               case 0x04:
-                       tegra_cpu_speedo_id = 3;
-                       tegra_soc_speedo_id = 2;
-                       threshold_index = THRESHOLD_INDEX_6;
-                       break;
-               case 0:
-                       switch (package_id) {
-                       case 1:
-                               tegra_cpu_speedo_id = 2;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_2;
-                               break;
-                       case 2:
-                               tegra_cpu_speedo_id = 3;
-                               tegra_soc_speedo_id = 2;
-                               threshold_index = THRESHOLD_INDEX_3;
-                               break;
-                       default:
-                               pr_err("Tegra30: Unknown pkg %d\n", package_id);
-                               BUG();
-                               break;
-                       }
-                       break;
-               default:
-                       pr_warn("Tegra30: Unknown SKU %d\n", sku);
-                       tegra_cpu_speedo_id = 0;
-                       tegra_soc_speedo_id = 0;
-                       threshold_index = THRESHOLD_INDEX_0;
-                       break;
-               }
-               break;
-       default:
-               pr_warn("Tegra30: Unknown chip rev %d\n", rev);
-               tegra_cpu_speedo_id = 0;
-               tegra_soc_speedo_id = 0;
-               threshold_index = THRESHOLD_INDEX_0;
-               break;
-       }
-}
-
-void tegra30_init_speedo_data(void)
-{
-       u32 cpu_speedo_val;
-       u32 core_speedo_val;
-       int i;
-
-       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) !=
-                       THRESHOLD_INDEX_COUNT);
-       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) !=
-                       THRESHOLD_INDEX_COUNT);
-
-       package_id = tegra_fuse_readl(FUSE_PACKAGE_INFO) & 0x0F;
-
-       rev_sku_to_speedo_ids(tegra_revision, tegra_sku_id);
-       fuse_speedo_calib(&cpu_speedo_val, &core_speedo_val);
-       pr_debug("%s CPU speedo value %u\n", __func__, cpu_speedo_val);
-       pr_debug("%s Core speedo value %u\n", __func__, core_speedo_val);
-
-       for (i = 0; i < CPU_PROCESS_CORNERS_NUM; i++) {
-               if (cpu_speedo_val < cpu_process_speedos[threshold_index][i])
-                       break;
-       }
-       tegra_cpu_process_id = i - 1;
-
-       if (tegra_cpu_process_id == -1) {
-               pr_warn("Tegra30: CPU speedo value %3d out of range",
-                      cpu_speedo_val);
-               tegra_cpu_process_id = 0;
-               tegra_cpu_speedo_id = 1;
-       }
-
-       for (i = 0; i < CORE_PROCESS_CORNERS_NUM; i++) {
-               if (core_speedo_val < core_process_speedos[threshold_index][i])
-                       break;
-       }
-       tegra_core_process_id = i - 1;
-
-       if (tegra_core_process_id == -1) {
-               pr_warn("Tegra30: CORE speedo value %3d out of range",
-                      core_speedo_val);
-               tegra_core_process_id = 0;
-               tegra_soc_speedo_id = 1;
-       }
-
-       pr_info("Tegra30: CPU Speedo ID %d, Soc Speedo ID %d",
-               tegra_cpu_speedo_id, tegra_soc_speedo_id);
-}
index 558a239..d8961ef 100644 (file)
@@ -25,7 +25,8 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <linux/tegra-ahb.h>
+
+#include <soc/tegra/ahb.h>
 
 #define DRV_NAME "tegra-ahb"
 
index f8ee13c..75c9681 100644 (file)
@@ -162,7 +162,9 @@ static int __init weim_parse_dt(struct platform_device *pdev,
                }
        }
 
-       ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
+       ret = of_platform_populate(pdev->dev.of_node,
+                                  of_default_bus_match_table,
+                                  NULL, &pdev->dev);
        if (ret)
                dev_err(&pdev->dev, "%s fail to create devices.\n",
                        pdev->dev.of_node->full_name);
index 57a078e..b9355da 100644 (file)
@@ -64,11 +64,56 @@ static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,
        const struct clk_ops *mux_ops = composite->mux_ops;
        struct clk_hw *rate_hw = composite->rate_hw;
        struct clk_hw *mux_hw = composite->mux_hw;
+       struct clk *parent;
+       unsigned long parent_rate;
+       long tmp_rate, best_rate = 0;
+       unsigned long rate_diff;
+       unsigned long best_rate_diff = ULONG_MAX;
+       int i;
 
        if (rate_hw && rate_ops && rate_ops->determine_rate) {
                rate_hw->clk = hw->clk;
                return rate_ops->determine_rate(rate_hw, rate, best_parent_rate,
                                                best_parent_p);
+       } else if (rate_hw && rate_ops && rate_ops->round_rate &&
+                  mux_hw && mux_ops && mux_ops->set_parent) {
+               *best_parent_p = NULL;
+
+               if (__clk_get_flags(hw->clk) & CLK_SET_RATE_NO_REPARENT) {
+                       *best_parent_p = clk_get_parent(mux_hw->clk);
+                       *best_parent_rate = __clk_get_rate(*best_parent_p);
+
+                       return rate_ops->round_rate(rate_hw, rate,
+                                                   best_parent_rate);
+               }
+
+               for (i = 0; i < __clk_get_num_parents(mux_hw->clk); i++) {
+                       parent = clk_get_parent_by_index(mux_hw->clk, i);
+                       if (!parent)
+                               continue;
+
+                       parent_rate = __clk_get_rate(parent);
+
+                       tmp_rate = rate_ops->round_rate(rate_hw, rate,
+                                                       &parent_rate);
+                       if (tmp_rate < 0)
+                               continue;
+
+                       rate_diff = abs(rate - tmp_rate);
+
+                       if (!rate_diff || !*best_parent_p
+                                      || best_rate_diff > rate_diff) {
+                               *best_parent_p = parent;
+                               *best_parent_rate = parent_rate;
+                               best_rate_diff = rate_diff;
+                               best_rate = tmp_rate;
+                       }
+
+                       if (!rate_diff)
+                               return rate;
+               }
+
+               return best_rate;
        } else if (mux_hw && mux_ops && mux_ops->determine_rate) {
                mux_hw->clk = hw->clk;
                return mux_ops->determine_rate(mux_hw, rate, best_parent_rate,
@@ -162,7 +207,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name,
        clk_composite_ops = &composite->ops;
 
        if (mux_hw && mux_ops) {
-               if (!mux_ops->get_parent || !mux_ops->set_parent) {
+               if (!mux_ops->get_parent) {
                        clk = ERR_PTR(-EINVAL);
                        goto err;
                }
@@ -170,7 +215,8 @@ struct clk *clk_register_composite(struct device *dev, const char *name,
                composite->mux_hw = mux_hw;
                composite->mux_ops = mux_ops;
                clk_composite_ops->get_parent = clk_composite_get_parent;
-               clk_composite_ops->set_parent = clk_composite_set_parent;
+               if (mux_ops->set_parent)
+                       clk_composite_ops->set_parent = clk_composite_set_parent;
                if (mux_ops->determine_rate)
                        clk_composite_ops->determine_rate = clk_composite_determine_rate;
        }
@@ -180,24 +226,27 @@ struct clk *clk_register_composite(struct device *dev, const char *name,
                        clk = ERR_PTR(-EINVAL);
                        goto err;
                }
+               clk_composite_ops->recalc_rate = clk_composite_recalc_rate;
 
-               /* .round_rate is a prerequisite for .set_rate */
-               if (rate_ops->round_rate) {
-                       clk_composite_ops->round_rate = clk_composite_round_rate;
-                       if (rate_ops->set_rate) {
-                               clk_composite_ops->set_rate = clk_composite_set_rate;
-                       }
-               } else {
-                       WARN(rate_ops->set_rate,
-                               "%s: missing round_rate op is required\n",
-                               __func__);
+               if (rate_ops->determine_rate)
+                       clk_composite_ops->determine_rate =
+                               clk_composite_determine_rate;
+               else if (rate_ops->round_rate)
+                       clk_composite_ops->round_rate =
+                               clk_composite_round_rate;
+
+               /* .set_rate requires either .round_rate or .determine_rate */
+               if (rate_ops->set_rate) {
+                       if (rate_ops->determine_rate || rate_ops->round_rate)
+                               clk_composite_ops->set_rate =
+                                               clk_composite_set_rate;
+                       else
+                               WARN(1, "%s: missing round_rate op is required\n",
+                                               __func__);
                }
 
                composite->rate_hw = rate_hw;
                composite->rate_ops = rate_ops;
-               clk_composite_ops->recalc_rate = clk_composite_recalc_rate;
-               if (rate_ops->determine_rate)
-                       clk_composite_ops->determine_rate = clk_composite_determine_rate;
        }
 
        if (gate_hw && gate_ops) {
index 8d3aefa..ee6b077 100644 (file)
@@ -3,3 +3,9 @@
 #
 
 obj-y  += clk-rockchip.o
+obj-y  += clk.o
+obj-y  += clk-pll.o
+obj-$(CONFIG_RESET_CONTROLLER) += softrst.o
+
+obj-y  += clk-rk3188.o
+obj-y  += clk-rk3288.o
diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
new file mode 100644 (file)
index 0000000..f2a1c7a
--- /dev/null
@@ -0,0 +1,431 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <asm/div64.h>
+#include <linux/slab.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+#include <linux/regmap.h>
+#include "clk.h"
+
+#define PLL_MODE_MASK          0x3
+#define PLL_MODE_SLOW          0x0
+#define PLL_MODE_NORM          0x1
+#define PLL_MODE_DEEP          0x2
+
+struct rockchip_clk_pll {
+       struct clk_hw           hw;
+
+       struct clk_mux          pll_mux;
+       const struct clk_ops    *pll_mux_ops;
+
+       struct notifier_block   clk_nb;
+       bool                    rate_change_remuxed;
+
+       void __iomem            *reg_base;
+       int                     lock_offset;
+       unsigned int            lock_shift;
+       enum rockchip_pll_type  type;
+       const struct rockchip_pll_rate_table *rate_table;
+       unsigned int            rate_count;
+       spinlock_t              *lock;
+};
+
+#define to_rockchip_clk_pll(_hw) container_of(_hw, struct rockchip_clk_pll, hw)
+#define to_rockchip_clk_pll_nb(nb) \
+                       container_of(nb, struct rockchip_clk_pll, clk_nb)
+
+static const struct rockchip_pll_rate_table *rockchip_get_pll_settings(
+                           struct rockchip_clk_pll *pll, unsigned long rate)
+{
+       const struct rockchip_pll_rate_table  *rate_table = pll->rate_table;
+       int i;
+
+       for (i = 0; i < pll->rate_count; i++) {
+               if (rate == rate_table[i].rate)
+                       return &rate_table[i];
+       }
+
+       return NULL;
+}
+
+static long rockchip_pll_round_rate(struct clk_hw *hw,
+                           unsigned long drate, unsigned long *prate)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+       const struct rockchip_pll_rate_table *rate_table = pll->rate_table;
+       int i;
+
+       /* Assumming rate_table is in descending order */
+       for (i = 0; i < pll->rate_count; i++) {
+               if (drate >= rate_table[i].rate)
+                       return rate_table[i].rate;
+       }
+
+       /* return minimum supported value */
+       return rate_table[i - 1].rate;
+}
+
+/*
+ * Wait for the pll to reach the locked state.
+ * The calling set_rate function is responsible for making sure the
+ * grf regmap is available.
+ */
+static int rockchip_pll_wait_lock(struct rockchip_clk_pll *pll)
+{
+       struct regmap *grf = rockchip_clk_get_grf();
+       unsigned int val;
+       int delay = 24000000, ret;
+
+       while (delay > 0) {
+               ret = regmap_read(grf, pll->lock_offset, &val);
+               if (ret) {
+                       pr_err("%s: failed to read pll lock status: %d\n",
+                              __func__, ret);
+                       return ret;
+               }
+
+               if (val & BIT(pll->lock_shift))
+                       return 0;
+               delay--;
+       }
+
+       pr_err("%s: timeout waiting for pll to lock\n", __func__);
+       return -ETIMEDOUT;
+}
+
+/**
+ * Set pll mux when changing the pll rate.
+ * This makes sure to move the pll mux away from the actual pll before
+ * changing its rate and back to the original parent after the change.
+ */
+static int rockchip_pll_notifier_cb(struct notifier_block *nb,
+                                       unsigned long event, void *data)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll_nb(nb);
+       struct clk_mux *pll_mux = &pll->pll_mux;
+       const struct clk_ops *pll_mux_ops = pll->pll_mux_ops;
+       int cur_parent;
+
+       switch (event) {
+       case PRE_RATE_CHANGE:
+               cur_parent = pll_mux_ops->get_parent(&pll_mux->hw);
+               if (cur_parent == PLL_MODE_NORM) {
+                       pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_SLOW);
+                       pll->rate_change_remuxed = 1;
+               }
+               break;
+       case POST_RATE_CHANGE:
+               if (pll->rate_change_remuxed) {
+                       pll_mux_ops->set_parent(&pll_mux->hw, PLL_MODE_NORM);
+                       pll->rate_change_remuxed = 0;
+               }
+               break;
+       }
+
+       return NOTIFY_OK;
+}
+
+/**
+ * PLL used in RK3066, RK3188 and RK3288
+ */
+
+#define RK3066_PLL_RESET_DELAY(nr)     ((nr * 500) / 24 + 1)
+
+#define RK3066_PLLCON(i)               (i * 0x4)
+#define RK3066_PLLCON0_OD_MASK         0xf
+#define RK3066_PLLCON0_OD_SHIFT                0
+#define RK3066_PLLCON0_NR_MASK         0x3f
+#define RK3066_PLLCON0_NR_SHIFT                8
+#define RK3066_PLLCON1_NF_MASK         0x1fff
+#define RK3066_PLLCON1_NF_SHIFT                0
+#define RK3066_PLLCON2_BWADJ_MASK      0xfff
+#define RK3066_PLLCON2_BWADJ_SHIFT     0
+#define RK3066_PLLCON3_RESET           (1 << 5)
+#define RK3066_PLLCON3_PWRDOWN         (1 << 1)
+#define RK3066_PLLCON3_BYPASS          (1 << 0)
+
+static unsigned long rockchip_rk3066_pll_recalc_rate(struct clk_hw *hw,
+                                                    unsigned long prate)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+       u64 nf, nr, no, rate64 = prate;
+       u32 pllcon;
+
+       pllcon = readl_relaxed(pll->reg_base + RK3066_PLLCON(3));
+       if (pllcon & RK3066_PLLCON3_BYPASS) {
+               pr_debug("%s: pll %s is bypassed\n", __func__,
+                       __clk_get_name(hw->clk));
+               return prate;
+       }
+
+       pllcon = readl_relaxed(pll->reg_base + RK3066_PLLCON(1));
+       nf = (pllcon >> RK3066_PLLCON1_NF_SHIFT) & RK3066_PLLCON1_NF_MASK;
+
+       pllcon = readl_relaxed(pll->reg_base + RK3066_PLLCON(0));
+       nr = (pllcon >> RK3066_PLLCON0_NR_SHIFT) & RK3066_PLLCON0_NR_MASK;
+       no = (pllcon >> RK3066_PLLCON0_OD_SHIFT) & RK3066_PLLCON0_OD_MASK;
+
+       rate64 *= (nf + 1);
+       do_div(rate64, nr + 1);
+       do_div(rate64, no + 1);
+
+       return (unsigned long)rate64;
+}
+
+static int rockchip_rk3066_pll_set_rate(struct clk_hw *hw, unsigned long drate,
+                                       unsigned long prate)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+       const struct rockchip_pll_rate_table *rate;
+       unsigned long old_rate = rockchip_rk3066_pll_recalc_rate(hw, prate);
+       struct regmap *grf = rockchip_clk_get_grf();
+       int ret;
+
+       if (IS_ERR(grf)) {
+               pr_debug("%s: grf regmap not available, aborting rate change\n",
+                        __func__);
+               return PTR_ERR(grf);
+       }
+
+       pr_debug("%s: changing %s from %lu to %lu with a parent rate of %lu\n",
+                __func__, __clk_get_name(hw->clk), old_rate, drate, prate);
+
+       /* Get required rate settings from table */
+       rate = rockchip_get_pll_settings(pll, drate);
+       if (!rate) {
+               pr_err("%s: Invalid rate : %lu for pll clk %s\n", __func__,
+                       drate, __clk_get_name(hw->clk));
+               return -EINVAL;
+       }
+
+       pr_debug("%s: rate settings for %lu (nr, no, nf): (%d, %d, %d)\n",
+                __func__, rate->rate, rate->nr, rate->no, rate->nf);
+
+       /* enter reset mode */
+       writel(HIWORD_UPDATE(RK3066_PLLCON3_RESET, RK3066_PLLCON3_RESET, 0),
+              pll->reg_base + RK3066_PLLCON(3));
+
+       /* update pll values */
+       writel(HIWORD_UPDATE(rate->nr - 1, RK3066_PLLCON0_NR_MASK,
+                                          RK3066_PLLCON0_NR_SHIFT) |
+              HIWORD_UPDATE(rate->no - 1, RK3066_PLLCON0_OD_MASK,
+                                          RK3066_PLLCON0_OD_SHIFT),
+              pll->reg_base + RK3066_PLLCON(0));
+
+       writel_relaxed(HIWORD_UPDATE(rate->nf - 1, RK3066_PLLCON1_NF_MASK,
+                                                  RK3066_PLLCON1_NF_SHIFT),
+                      pll->reg_base + RK3066_PLLCON(1));
+       writel_relaxed(HIWORD_UPDATE(rate->bwadj, RK3066_PLLCON2_BWADJ_MASK,
+                                                 RK3066_PLLCON2_BWADJ_SHIFT),
+                      pll->reg_base + RK3066_PLLCON(2));
+
+       /* leave reset and wait the reset_delay */
+       writel(HIWORD_UPDATE(0, RK3066_PLLCON3_RESET, 0),
+              pll->reg_base + RK3066_PLLCON(3));
+       udelay(RK3066_PLL_RESET_DELAY(rate->nr));
+
+       /* wait for the pll to lock */
+       ret = rockchip_pll_wait_lock(pll);
+       if (ret) {
+               pr_warn("%s: pll did not lock, trying to restore old rate %lu\n",
+                       __func__, old_rate);
+               rockchip_rk3066_pll_set_rate(hw, old_rate, prate);
+       }
+
+       return ret;
+}
+
+static int rockchip_rk3066_pll_enable(struct clk_hw *hw)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+
+       writel(HIWORD_UPDATE(0, RK3066_PLLCON3_PWRDOWN, 0),
+              pll->reg_base + RK3066_PLLCON(3));
+
+       return 0;
+}
+
+static void rockchip_rk3066_pll_disable(struct clk_hw *hw)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+
+       writel(HIWORD_UPDATE(RK3066_PLLCON3_PWRDOWN,
+                            RK3066_PLLCON3_PWRDOWN, 0),
+              pll->reg_base + RK3066_PLLCON(3));
+}
+
+static int rockchip_rk3066_pll_is_enabled(struct clk_hw *hw)
+{
+       struct rockchip_clk_pll *pll = to_rockchip_clk_pll(hw);
+       u32 pllcon = readl(pll->reg_base + RK3066_PLLCON(3));
+
+       return !(pllcon & RK3066_PLLCON3_PWRDOWN);
+}
+
+static const struct clk_ops rockchip_rk3066_pll_clk_norate_ops = {
+       .recalc_rate = rockchip_rk3066_pll_recalc_rate,
+       .enable = rockchip_rk3066_pll_enable,
+       .disable = rockchip_rk3066_pll_disable,
+       .is_enabled = rockchip_rk3066_pll_is_enabled,
+};
+
+static const struct clk_ops rockchip_rk3066_pll_clk_ops = {
+       .recalc_rate = rockchip_rk3066_pll_recalc_rate,
+       .round_rate = rockchip_pll_round_rate,
+       .set_rate = rockchip_rk3066_pll_set_rate,
+       .enable = rockchip_rk3066_pll_enable,
+       .disable = rockchip_rk3066_pll_disable,
+       .is_enabled = rockchip_rk3066_pll_is_enabled,
+};
+
+/*
+ * Common registering of pll clocks
+ */
+
+struct clk *rockchip_clk_register_pll(enum rockchip_pll_type pll_type,
+               const char *name, const char **parent_names, u8 num_parents,
+               void __iomem *base, int con_offset, int grf_lock_offset,
+               int lock_shift, int mode_offset, int mode_shift,
+               struct rockchip_pll_rate_table *rate_table,
+               spinlock_t *lock)
+{
+       const char *pll_parents[3];
+       struct clk_init_data init;
+       struct rockchip_clk_pll *pll;
+       struct clk_mux *pll_mux;
+       struct clk *pll_clk, *mux_clk;
+       char pll_name[20];
+       int ret;
+
+       if (num_parents != 2) {
+               pr_err("%s: needs two parent clocks\n", __func__);
+               return ERR_PTR(-EINVAL);
+       }
+
+       /* name the actual pll */
+       snprintf(pll_name, sizeof(pll_name), "pll_%s", name);
+
+       pll = kzalloc(sizeof(*pll), GFP_KERNEL);
+       if (!pll)
+               return ERR_PTR(-ENOMEM);
+
+       init.name = pll_name;
+
+       /* keep all plls untouched for now */
+       init.flags = CLK_IGNORE_UNUSED;
+
+       init.parent_names = &parent_names[0];
+       init.num_parents = 1;
+
+       if (rate_table) {
+               int len;
+
+               /* find count of rates in rate_table */
+               for (len = 0; rate_table[len].rate != 0; )
+                       len++;
+
+               pll->rate_count = len;
+               pll->rate_table = kmemdup(rate_table,
+                                       pll->rate_count *
+                                       sizeof(struct rockchip_pll_rate_table),
+                                       GFP_KERNEL);
+               WARN(!pll->rate_table,
+                       "%s: could not allocate rate table for %s\n",
+                       __func__, name);
+       }
+
+       switch (pll_type) {
+       case pll_rk3066:
+               if (!pll->rate_table)
+                       init.ops = &rockchip_rk3066_pll_clk_norate_ops;
+               else
+                       init.ops = &rockchip_rk3066_pll_clk_ops;
+               break;
+       default:
+               pr_warn("%s: Unknown pll type for pll clk %s\n",
+                       __func__, name);
+       }
+
+       pll->hw.init = &init;
+       pll->type = pll_type;
+       pll->reg_base = base + con_offset;
+       pll->lock_offset = grf_lock_offset;
+       pll->lock_shift = lock_shift;
+       pll->lock = lock;
+       pll->clk_nb.notifier_call = rockchip_pll_notifier_cb;
+
+       pll_clk = clk_register(NULL, &pll->hw);
+       if (IS_ERR(pll_clk)) {
+               pr_err("%s: failed to register pll clock %s : %ld\n",
+                       __func__, name, PTR_ERR(pll_clk));
+               mux_clk = pll_clk;
+               goto err_pll;
+       }
+
+       ret = clk_notifier_register(pll_clk, &pll->clk_nb);
+       if (ret) {
+               pr_err("%s: failed to register clock notifier for %s : %d\n",
+                               __func__, name, ret);
+               mux_clk = ERR_PTR(ret);
+               goto err_pll_notifier;
+       }
+
+       /* create the mux on top of the real pll */
+       pll->pll_mux_ops = &clk_mux_ops;
+       pll_mux = &pll->pll_mux;
+
+       /* the actual muxing is xin24m, pll-output, xin32k */
+       pll_parents[0] = parent_names[0];
+       pll_parents[1] = pll_name;
+       pll_parents[2] = parent_names[1];
+
+       init.name = name;
+       init.flags = CLK_SET_RATE_PARENT;
+       init.ops = pll->pll_mux_ops;
+       init.parent_names = pll_parents;
+       init.num_parents = ARRAY_SIZE(pll_parents);
+
+       pll_mux->reg = base + mode_offset;
+       pll_mux->shift = mode_shift;
+       pll_mux->mask = PLL_MODE_MASK;
+       pll_mux->flags = 0;
+       pll_mux->lock = lock;
+       pll_mux->hw.init = &init;
+
+       if (pll_type == pll_rk3066)
+               pll_mux->flags |= CLK_MUX_HIWORD_MASK;
+
+       mux_clk = clk_register(NULL, &pll_mux->hw);
+       if (IS_ERR(mux_clk))
+               goto err_mux;
+
+       return mux_clk;
+
+err_mux:
+       ret = clk_notifier_unregister(pll_clk, &pll->clk_nb);
+       if (ret) {
+               pr_err("%s: could not unregister clock notifier in error path : %d\n",
+                      __func__, ret);
+               return mux_clk;
+       }
+err_pll_notifier:
+       clk_unregister(pll_clk);
+err_pll:
+       kfree(pll);
+       return mux_clk;
+}
diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
new file mode 100644 (file)
index 0000000..a83a6d8
--- /dev/null
@@ -0,0 +1,672 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <dt-bindings/clock/rk3188-cru-common.h>
+#include "clk.h"
+
+#define RK3188_GRF_SOC_STATUS  0xac
+
+enum rk3188_plls {
+       apll, cpll, dpll, gpll,
+};
+
+struct rockchip_pll_rate_table rk3188_pll_rates[] = {
+       RK3066_PLL_RATE(2208000000, 1, 92, 1),
+       RK3066_PLL_RATE(2184000000, 1, 91, 1),
+       RK3066_PLL_RATE(2160000000, 1, 90, 1),
+       RK3066_PLL_RATE(2136000000, 1, 89, 1),
+       RK3066_PLL_RATE(2112000000, 1, 88, 1),
+       RK3066_PLL_RATE(2088000000, 1, 87, 1),
+       RK3066_PLL_RATE(2064000000, 1, 86, 1),
+       RK3066_PLL_RATE(2040000000, 1, 85, 1),
+       RK3066_PLL_RATE(2016000000, 1, 84, 1),
+       RK3066_PLL_RATE(1992000000, 1, 83, 1),
+       RK3066_PLL_RATE(1968000000, 1, 82, 1),
+       RK3066_PLL_RATE(1944000000, 1, 81, 1),
+       RK3066_PLL_RATE(1920000000, 1, 80, 1),
+       RK3066_PLL_RATE(1896000000, 1, 79, 1),
+       RK3066_PLL_RATE(1872000000, 1, 78, 1),
+       RK3066_PLL_RATE(1848000000, 1, 77, 1),
+       RK3066_PLL_RATE(1824000000, 1, 76, 1),
+       RK3066_PLL_RATE(1800000000, 1, 75, 1),
+       RK3066_PLL_RATE(1776000000, 1, 74, 1),
+       RK3066_PLL_RATE(1752000000, 1, 73, 1),
+       RK3066_PLL_RATE(1728000000, 1, 72, 1),
+       RK3066_PLL_RATE(1704000000, 1, 71, 1),
+       RK3066_PLL_RATE(1680000000, 1, 70, 1),
+       RK3066_PLL_RATE(1656000000, 1, 69, 1),
+       RK3066_PLL_RATE(1632000000, 1, 68, 1),
+       RK3066_PLL_RATE(1608000000, 1, 67, 1),
+       RK3066_PLL_RATE(1560000000, 1, 65, 1),
+       RK3066_PLL_RATE(1512000000, 1, 63, 1),
+       RK3066_PLL_RATE(1488000000, 1, 62, 1),
+       RK3066_PLL_RATE(1464000000, 1, 61, 1),
+       RK3066_PLL_RATE(1440000000, 1, 60, 1),
+       RK3066_PLL_RATE(1416000000, 1, 59, 1),
+       RK3066_PLL_RATE(1392000000, 1, 58, 1),
+       RK3066_PLL_RATE(1368000000, 1, 57, 1),
+       RK3066_PLL_RATE(1344000000, 1, 56, 1),
+       RK3066_PLL_RATE(1320000000, 1, 55, 1),
+       RK3066_PLL_RATE(1296000000, 1, 54, 1),
+       RK3066_PLL_RATE(1272000000, 1, 53, 1),
+       RK3066_PLL_RATE(1248000000, 1, 52, 1),
+       RK3066_PLL_RATE(1224000000, 1, 51, 1),
+       RK3066_PLL_RATE(1200000000, 1, 50, 1),
+       RK3066_PLL_RATE(1188000000, 2, 99, 1),
+       RK3066_PLL_RATE(1176000000, 1, 49, 1),
+       RK3066_PLL_RATE(1128000000, 1, 47, 1),
+       RK3066_PLL_RATE(1104000000, 1, 46, 1),
+       RK3066_PLL_RATE(1008000000, 1, 84, 2),
+       RK3066_PLL_RATE( 912000000, 1, 76, 2),
+       RK3066_PLL_RATE( 891000000, 8, 594, 2),
+       RK3066_PLL_RATE( 888000000, 1, 74, 2),
+       RK3066_PLL_RATE( 816000000, 1, 68, 2),
+       RK3066_PLL_RATE( 798000000, 2, 133, 2),
+       RK3066_PLL_RATE( 792000000, 1, 66, 2),
+       RK3066_PLL_RATE( 768000000, 1, 64, 2),
+       RK3066_PLL_RATE( 742500000, 8, 495, 2),
+       RK3066_PLL_RATE( 696000000, 1, 58, 2),
+       RK3066_PLL_RATE( 600000000, 1, 50, 2),
+       RK3066_PLL_RATE( 594000000, 2, 198, 4),
+       RK3066_PLL_RATE( 552000000, 1, 46, 2),
+       RK3066_PLL_RATE( 504000000, 1, 84, 4),
+       RK3066_PLL_RATE( 456000000, 1, 76, 4),
+       RK3066_PLL_RATE( 408000000, 1, 68, 4),
+       RK3066_PLL_RATE( 384000000, 2, 128, 4),
+       RK3066_PLL_RATE( 360000000, 1, 60, 4),
+       RK3066_PLL_RATE( 312000000, 1, 52, 4),
+       RK3066_PLL_RATE( 300000000, 1, 50, 4),
+       RK3066_PLL_RATE( 297000000, 2, 198, 8),
+       RK3066_PLL_RATE( 252000000, 1, 84, 8),
+       RK3066_PLL_RATE( 216000000, 1, 72, 8),
+       RK3066_PLL_RATE( 148500000, 2, 99, 8),
+       RK3066_PLL_RATE( 126000000, 1, 84, 16),
+       RK3066_PLL_RATE(  48000000, 1, 64, 32),
+       { /* sentinel */ },
+};
+
+PNAME(mux_pll_p)               = { "xin24m", "xin32k" };
+PNAME(mux_armclk_p)            = { "apll", "gpll_armclk" };
+PNAME(mux_ddrphy_p)            = { "dpll", "gpll_ddr" };
+PNAME(mux_pll_src_gpll_cpll_p) = { "gpll", "cpll" };
+PNAME(mux_pll_src_cpll_gpll_p) = { "cpll", "gpll" };
+PNAME(mux_aclk_cpu_p)          = { "apll", "gpll" };
+PNAME(mux_sclk_cif0_p)         = { "cif0_pre", "xin24m" };
+PNAME(mux_sclk_i2s0_p)         = { "i2s0_pre", "i2s0_frac", "xin12m" };
+PNAME(mux_sclk_spdif_p)                = { "spdif_src", "spdif_frac", "xin12m" };
+PNAME(mux_sclk_uart0_p)                = { "uart0_pre", "uart0_frac", "xin24m" };
+PNAME(mux_sclk_uart1_p)                = { "uart1_pre", "uart1_frac", "xin24m" };
+PNAME(mux_sclk_uart2_p)                = { "uart2_pre", "uart2_frac", "xin24m" };
+PNAME(mux_sclk_uart3_p)                = { "uart3_pre", "uart3_frac", "xin24m" };
+PNAME(mux_sclk_hsadc_p)                = { "hsadc_src", "hsadc_frac", "ext_hsadc" };
+PNAME(mux_mac_p)               = { "gpll", "dpll" };
+PNAME(mux_sclk_macref_p)       = { "mac_src", "ext_rmii" };
+
+static struct rockchip_pll_clock rk3188_pll_clks[] __initdata = {
+       [apll] = PLL(pll_rk3066, PLL_APLL, "apll", mux_pll_p, 0, RK2928_PLL_CON(0),
+                    RK2928_MODE_CON, 0, 6, rk3188_pll_rates),
+       [dpll] = PLL(pll_rk3066, PLL_DPLL, "dpll", mux_pll_p, 0, RK2928_PLL_CON(4),
+                    RK2928_MODE_CON, 4, 5, NULL),
+       [cpll] = PLL(pll_rk3066, PLL_CPLL, "cpll", mux_pll_p, 0, RK2928_PLL_CON(8),
+                    RK2928_MODE_CON, 8, 7, rk3188_pll_rates),
+       [gpll] = PLL(pll_rk3066, PLL_GPLL, "gpll", mux_pll_p, 0, RK2928_PLL_CON(12),
+                    RK2928_MODE_CON, 12, 8, rk3188_pll_rates),
+};
+
+#define MFLAGS CLK_MUX_HIWORD_MASK
+#define DFLAGS CLK_DIVIDER_HIWORD_MASK
+#define GFLAGS (CLK_GATE_HIWORD_MASK | CLK_GATE_SET_TO_DISABLE)
+
+/* 2 ^ (val + 1) */
+static struct clk_div_table div_core_peri_t[] = {
+       { .val = 0, .div = 2 },
+       { .val = 1, .div = 4 },
+       { .val = 2, .div = 8 },
+       { .val = 3, .div = 16 },
+       { /* sentinel */ },
+};
+
+static struct rockchip_clk_branch common_clk_branches[] __initdata = {
+       /*
+        * Clock-Architecture Diagram 2
+        */
+
+       GATE(0, "gpll_armclk", "gpll", 0, RK2928_CLKGATE_CON(0), 1, GFLAGS),
+
+       /* these two are set by the cpuclk and should not be changed */
+       COMPOSITE_NOMUX_DIVTBL(CORE_PERI, "core_peri", "armclk", 0,
+                       RK2928_CLKSEL_CON(0), 6, 2, DFLAGS | CLK_DIVIDER_READ_ONLY,
+                       div_core_peri_t, RK2928_CLKGATE_CON(0), 0, GFLAGS),
+
+       COMPOSITE(0, "aclk_vepu", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(32), 7, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 9, GFLAGS),
+       GATE(0, "hclk_vepu", "aclk_vepu", 0,
+                       RK2928_CLKGATE_CON(3), 10, GFLAGS),
+       COMPOSITE(0, "aclk_vdpu", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(32), 15, 1, MFLAGS, 8, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 11, GFLAGS),
+       GATE(0, "hclk_vdpu", "aclk_vdpu", 0,
+                       RK2928_CLKGATE_CON(3), 12, GFLAGS),
+
+       GATE(0, "gpll_ddr", "gpll", 0,
+                       RK2928_CLKGATE_CON(1), 7, GFLAGS),
+       COMPOSITE(0, "ddrphy", mux_ddrphy_p, 0,
+                       RK2928_CLKSEL_CON(26), 8, 1, MFLAGS, 0, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK2928_CLKGATE_CON(0), 2, GFLAGS),
+
+       GATE(0, "aclk_cpu", "aclk_cpu_pre", 0,
+                       RK2928_CLKGATE_CON(0), 3, GFLAGS),
+
+       DIV(0, "pclk_cpu_pre", "aclk_cpu_pre", 0,
+                       RK2928_CLKSEL_CON(1), 12, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO),
+       GATE(0, "atclk_cpu", "pclk_cpu_pre", 0,
+                       RK2928_CLKGATE_CON(0), 6, GFLAGS),
+       GATE(0, "pclk_cpu", "pclk_cpu_pre", 0,
+                       RK2928_CLKGATE_CON(0), 5, GFLAGS),
+       DIV(0, "hclk_cpu_pre", "aclk_cpu_pre", 0,
+                       RK2928_CLKSEL_CON(1), 8, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO),
+       COMPOSITE_NOMUX(0, "hclk_ahb2apb", "hclk_cpu_pre", 0,
+                       RK2928_CLKSEL_CON(1), 14, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK2928_CLKGATE_CON(4), 9, GFLAGS),
+       GATE(0, "hclk_cpu", "hclk_cpu_pre", 0,
+                       RK2928_CLKGATE_CON(0), 4, GFLAGS),
+
+       COMPOSITE(0, "aclk_lcdc0_pre", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(31), 7, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 0, GFLAGS),
+       COMPOSITE(0, "aclk_lcdc1_pre", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(31), 15, 1, MFLAGS, 8, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(1), 4, GFLAGS),
+
+       GATE(0, "aclk_peri", "aclk_peri_pre", 0,
+                       RK2928_CLKGATE_CON(2), 1, GFLAGS),
+       COMPOSITE_NOMUX(0, "hclk_peri", "aclk_peri_pre", 0,
+                       RK2928_CLKSEL_CON(10), 8, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK2928_CLKGATE_CON(2), 2, GFLAGS),
+       COMPOSITE_NOMUX(0, "pclk_peri", "aclk_peri_pre", 0,
+                       RK2928_CLKSEL_CON(10), 12, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK2928_CLKGATE_CON(2), 3, GFLAGS),
+
+       MUX(0, "cif_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(29), 0, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "cif0_pre", "cif_src", 0,
+                       RK2928_CLKSEL_CON(29), 1, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 7, GFLAGS),
+       MUX(SCLK_CIF0, "sclk_cif0", mux_sclk_cif0_p, 0,
+                       RK2928_CLKSEL_CON(29), 7, 1, MFLAGS),
+
+       GATE(0, "pclkin_cif0", "ext_cif0", 0,
+                       RK2928_CLKGATE_CON(3), 3, GFLAGS),
+
+       /*
+        * the 480m are generated inside the usb block from these clocks,
+        * but they are also a source for the hsicphy clock.
+        */
+       GATE(SCLK_OTGPHY0, "sclk_otgphy0", "usb480m", 0,
+                       RK2928_CLKGATE_CON(1), 5, GFLAGS),
+       GATE(SCLK_OTGPHY1, "sclk_otgphy1", "usb480m", 0,
+                       RK2928_CLKGATE_CON(1), 6, GFLAGS),
+
+       COMPOSITE(0, "mac_src", mux_mac_p, 0,
+                       RK2928_CLKSEL_CON(21), 0, 1, MFLAGS, 8, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 5, GFLAGS),
+       MUX(SCLK_MAC, "sclk_macref", mux_sclk_macref_p, CLK_SET_RATE_PARENT,
+                       RK2928_CLKSEL_CON(21), 4, 1, MFLAGS),
+       GATE(0, "sclk_mac_lbtest", "sclk_macref",
+                       RK2928_CLKGATE_CON(2), 12, 0, GFLAGS),
+
+       COMPOSITE(0, "hsadc_src", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 6, GFLAGS),
+       COMPOSITE_FRAC(0, "hsadc_frac", "hsadc_src",
+                       RK2928_CLKSEL_CON(23), 0,
+                       RK2928_CLKGATE_CON(2), 7, 0, GFLAGS),
+       MUX(SCLK_HSADC, "sclk_hsadc", mux_sclk_hsadc_p, 0,
+                       RK2928_CLKSEL_CON(22), 4, 2, MFLAGS),
+
+       COMPOSITE_NOMUX(SCLK_SARADC, "sclk_saradc", "xin24m", 0,
+                       RK2928_CLKSEL_CON(24), 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 8, GFLAGS),
+
+       /*
+        * Clock-Architecture Diagram 4
+        */
+
+       GATE(SCLK_SMC, "sclk_smc", "hclk_peri",
+                       RK2928_CLKGATE_CON(2), 4, 0, GFLAGS),
+
+       COMPOSITE_NOMUX(SCLK_SPI0, "sclk_spi0", "pclk_peri", 0,
+                       RK2928_CLKSEL_CON(25), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 9, GFLAGS),
+       COMPOSITE_NOMUX(SCLK_SPI1, "sclk_spi1", "pclk_peri", 0,
+                       RK2928_CLKSEL_CON(25), 8, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 10, GFLAGS),
+
+       COMPOSITE_NOMUX(SCLK_SDMMC, "sclk_sdmmc", "hclk_peri", 0,
+                       RK2928_CLKSEL_CON(11), 0, 6, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 11, GFLAGS),
+       COMPOSITE_NOMUX(SCLK_SDIO, "sclk_sdio", "hclk_peri", 0,
+                       RK2928_CLKSEL_CON(12), 0, 6, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 13, GFLAGS),
+       COMPOSITE_NOMUX(SCLK_EMMC, "sclk_emmc", "hclk_peri", 0,
+                       RK2928_CLKSEL_CON(12), 8, 6, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 14, GFLAGS),
+
+       MUX(0, "uart_src", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(12), 15, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart0_pre", "uart_src", 0,
+                       RK2928_CLKSEL_CON(13), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(1), 8, GFLAGS),
+       COMPOSITE_FRAC(0, "uart0_frac", "uart0_pre", 0,
+                       RK2928_CLKSEL_CON(17), 0,
+                       RK2928_CLKGATE_CON(1), 9, GFLAGS),
+       MUX(SCLK_UART0, "sclk_uart0", mux_sclk_uart0_p, 0,
+                       RK2928_CLKSEL_CON(13), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart1_pre", "uart_src", 0,
+                       RK2928_CLKSEL_CON(14), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(1), 10, GFLAGS),
+       COMPOSITE_FRAC(0, "uart1_frac", "uart1_pre", 0,
+                       RK2928_CLKSEL_CON(18), 0,
+                       RK2928_CLKGATE_CON(1), 11, GFLAGS),
+       MUX(SCLK_UART1, "sclk_uart1", mux_sclk_uart1_p, 0,
+                       RK2928_CLKSEL_CON(14), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart2_pre", "uart_src", 0,
+                       RK2928_CLKSEL_CON(15), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(1), 12, GFLAGS),
+       COMPOSITE_FRAC(0, "uart2_frac", "uart2_pre", 0,
+                       RK2928_CLKSEL_CON(19), 0,
+                       RK2928_CLKGATE_CON(1), 13, GFLAGS),
+       MUX(SCLK_UART2, "sclk_uart2", mux_sclk_uart2_p, 0,
+                       RK2928_CLKSEL_CON(15), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart3_pre", "uart_src", 0,
+                       RK2928_CLKSEL_CON(16), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(1), 14, GFLAGS),
+       COMPOSITE_FRAC(0, "uart3_frac", "uart3_pre", 0,
+                       RK2928_CLKSEL_CON(20), 0,
+                       RK2928_CLKGATE_CON(1), 15, GFLAGS),
+       MUX(SCLK_UART3, "sclk_uart3", mux_sclk_uart3_p, 0,
+                       RK2928_CLKSEL_CON(16), 8, 2, MFLAGS),
+
+       GATE(SCLK_JTAG, "jtag", "ext_jtag", 0, RK2928_CLKGATE_CON(1), 3, GFLAGS),
+
+       GATE(SCLK_TIMER0, "timer0", "xin24m", 0, RK2928_CLKGATE_CON(1), 0, GFLAGS),
+       GATE(SCLK_TIMER1, "timer1", "xin24m", 0, RK2928_CLKGATE_CON(1), 1, GFLAGS),
+
+       /* clk_core_pre gates */
+       GATE(0, "core_dbg", "armclk", 0, RK2928_CLKGATE_CON(9), 0, GFLAGS),
+
+       /* aclk_cpu gates */
+       GATE(ACLK_DMA1, "aclk_dma1", "aclk_cpu", 0, RK2928_CLKGATE_CON(5), 0, GFLAGS),
+       GATE(0, "aclk_intmem", "aclk_cpu", 0, RK2928_CLKGATE_CON(4), 12, GFLAGS),
+       GATE(0, "aclk_strc_sys", "aclk_cpu", 0, RK2928_CLKGATE_CON(4), 10, GFLAGS),
+
+       /* hclk_cpu gates */
+       GATE(HCLK_ROM, "hclk_rom", "hclk_cpu", 0, RK2928_CLKGATE_CON(5), 6, GFLAGS),
+       GATE(HCLK_I2S0, "hclk_i2s0", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 2, GFLAGS),
+       GATE(HCLK_SPDIF, "hclk_spdif", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 1, GFLAGS),
+       GATE(0, "hclk_cpubus", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 8, GFLAGS),
+       /* hclk_ahb2apb is part of a clk branch */
+       GATE(0, "hclk_vio_bus", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 12, GFLAGS),
+       GATE(HCLK_LCDC0, "hclk_lcdc0", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 1, GFLAGS),
+       GATE(HCLK_LCDC1, "hclk_lcdc1", "aclk_cpu", 0, RK2928_CLKGATE_CON(6), 2, GFLAGS),
+       GATE(HCLK_CIF0, "hclk_cif0", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 4, GFLAGS),
+       GATE(HCLK_IPP, "hclk_ipp", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 9, GFLAGS),
+       GATE(HCLK_RGA, "hclk_rga", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 10, GFLAGS),
+
+       /* hclk_peri gates */
+       GATE(0, "hclk_peri_axi_matrix", "hclk_peri", 0, RK2928_CLKGATE_CON(4), 0, GFLAGS),
+       GATE(0, "hclk_peri_ahb_arbi", "hclk_peri", 0, RK2928_CLKGATE_CON(4), 6, GFLAGS),
+       GATE(0, "hclk_emem_peri", "hclk_peri", 0, RK2928_CLKGATE_CON(4), 7, GFLAGS),
+       GATE(HCLK_EMAC, "hclk_emac", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 0, GFLAGS),
+       GATE(HCLK_NANDC0, "hclk_nandc0", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 9, GFLAGS),
+       GATE(0, "hclk_usb_peri", "hclk_peri", 0, RK2928_CLKGATE_CON(4), 5, GFLAGS),
+       GATE(HCLK_OTG0, "hclk_usbotg0", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 13, GFLAGS),
+       GATE(HCLK_HSADC, "hclk_hsadc", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 5, GFLAGS),
+       GATE(HCLK_PIDF, "hclk_pidfilter", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 6, GFLAGS),
+       GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 10, GFLAGS),
+       GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 11, GFLAGS),
+       GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 12, GFLAGS),
+
+       /* aclk_lcdc0_pre gates */
+       GATE(0, "aclk_vio0", "aclk_lcdc0_pre", 0, RK2928_CLKGATE_CON(6), 13, GFLAGS),
+       GATE(ACLK_LCDC0, "aclk_lcdc0", "aclk_vio0", 0, RK2928_CLKGATE_CON(6), 0, GFLAGS),
+       GATE(ACLK_CIF0, "aclk_cif0", "aclk_vio0", 0, RK2928_CLKGATE_CON(6), 5, GFLAGS),
+       GATE(ACLK_IPP, "aclk_ipp", "aclk_vio0", 0, RK2928_CLKGATE_CON(6), 8, GFLAGS),
+
+       /* aclk_lcdc1_pre gates */
+       GATE(0, "aclk_vio1", "aclk_lcdc1_pre", 0, RK2928_CLKGATE_CON(9), 5, GFLAGS),
+       GATE(ACLK_LCDC1, "aclk_lcdc1", "aclk_vio1", 0, RK2928_CLKGATE_CON(6), 3, GFLAGS),
+       GATE(ACLK_RGA, "aclk_rga", "aclk_vio1", 0, RK2928_CLKGATE_CON(6), 11, GFLAGS),
+
+       /* atclk_cpu gates */
+       GATE(0, "atclk", "atclk_cpu", 0, RK2928_CLKGATE_CON(9), 3, GFLAGS),
+       GATE(0, "trace", "atclk_cpu", 0, RK2928_CLKGATE_CON(9), 2, GFLAGS),
+
+       /* pclk_cpu gates */
+       GATE(PCLK_PWM01, "pclk_pwm01", "pclk_cpu", 0, RK2928_CLKGATE_CON(7), 10, GFLAGS),
+       GATE(PCLK_TIMER0, "pclk_timer0", "pclk_cpu", 0, RK2928_CLKGATE_CON(7), 7, GFLAGS),
+       GATE(PCLK_I2C0, "pclk_i2c0", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 4, GFLAGS),
+       GATE(PCLK_I2C1, "pclk_i2c1", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 5, GFLAGS),
+       GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 9, GFLAGS),
+       GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 10, GFLAGS),
+       GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 11, GFLAGS),
+       GATE(PCLK_EFUSE, "pclk_efuse", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 2, GFLAGS),
+       GATE(PCLK_TZPC, "pclk_tzpc", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 3, GFLAGS),
+       GATE(0, "pclk_ddrupctl", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 7, GFLAGS),
+       GATE(0, "pclk_ddrpubl", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 6, GFLAGS),
+       GATE(0, "pclk_dbg", "pclk_cpu", 0, RK2928_CLKGATE_CON(9), 1, GFLAGS),
+       GATE(PCLK_GRF, "pclk_grf", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 4, GFLAGS),
+       GATE(PCLK_PMU, "pclk_pmu", "pclk_cpu", 0, RK2928_CLKGATE_CON(5), 5, GFLAGS),
+
+       /* aclk_peri */
+       GATE(ACLK_DMA2, "aclk_dma2", "aclk_peri", 0, RK2928_CLKGATE_CON(5), 1, GFLAGS),
+       GATE(ACLK_SMC, "aclk_smc", "aclk_peri", 0, RK2928_CLKGATE_CON(5), 8, GFLAGS),
+       GATE(0, "aclk_peri_niu", "aclk_peri", 0, RK2928_CLKGATE_CON(4), 4, GFLAGS),
+       GATE(0, "aclk_cpu_peri", "aclk_peri", 0, RK2928_CLKGATE_CON(4), 2, GFLAGS),
+       GATE(0, "aclk_peri_axi_matrix", "aclk_peri", 0, RK2928_CLKGATE_CON(4), 3, GFLAGS),
+
+       /* pclk_peri gates */
+       GATE(0, "pclk_peri_axi_matrix", "pclk_peri", 0, RK2928_CLKGATE_CON(4), 1, GFLAGS),
+       GATE(PCLK_PWM23, "pclk_pwm23", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 11, GFLAGS),
+       GATE(PCLK_WDT, "pclk_wdt", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 15, GFLAGS),
+       GATE(PCLK_SPI0, "pclk_spi0", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 12, GFLAGS),
+       GATE(PCLK_SPI1, "pclk_spi1", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 13, GFLAGS),
+       GATE(PCLK_UART2, "pclk_uart2", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 2, GFLAGS),
+       GATE(PCLK_UART3, "pclk_uart3", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 3, GFLAGS),
+       GATE(PCLK_I2C2, "pclk_i2c2", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 6, GFLAGS),
+       GATE(PCLK_I2C3, "pclk_i2c3", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 7, GFLAGS),
+       GATE(PCLK_I2C4, "pclk_i2c4", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 8, GFLAGS),
+       GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 12, GFLAGS),
+       GATE(PCLK_SARADC, "pclk_saradc", "pclk_peri", 0, RK2928_CLKGATE_CON(7), 14, GFLAGS),
+};
+
+PNAME(mux_rk3066_lcdc0_p)      = { "dclk_lcdc0_src", "xin27m" };
+PNAME(mux_rk3066_lcdc1_p)      = { "dclk_lcdc1_src", "xin27m" };
+PNAME(mux_sclk_cif1_p)         = { "cif1_pre", "xin24m" };
+PNAME(mux_sclk_i2s1_p)         = { "i2s1_pre", "i2s1_frac", "xin12m" };
+PNAME(mux_sclk_i2s2_p)         = { "i2s2_pre", "i2s2_frac", "xin12m" };
+
+static struct clk_div_table div_aclk_cpu_t[] = {
+       { .val = 0, .div = 1 },
+       { .val = 1, .div = 2 },
+       { .val = 2, .div = 3 },
+       { .val = 3, .div = 4 },
+       { .val = 4, .div = 8 },
+       { /* sentinel */ },
+};
+
+static struct rockchip_clk_branch rk3066a_clk_branches[] __initdata = {
+       COMPOSITE_NOGATE(0, "armclk", mux_armclk_p, 0,
+                       RK2928_CLKSEL_CON(0), 8, 1, MFLAGS, 0, 5, DFLAGS),
+       DIVTBL(0, "aclk_cpu_pre", "armclk", 0,
+                       RK2928_CLKSEL_CON(1), 0, 3, DFLAGS, div_aclk_cpu_t),
+
+       GATE(CORE_L2C, "core_l2c", "aclk_cpu", 0,
+                       RK2928_CLKGATE_CON(9), 4, GFLAGS),
+
+       COMPOSITE(0, "aclk_peri_pre", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(10), 15, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 0, GFLAGS),
+
+       COMPOSITE(0, "dclk_lcdc0_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(27), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 1, GFLAGS),
+       MUX(DCLK_LCDC0, "dclk_lcdc0", mux_rk3066_lcdc0_p, 0,
+                       RK2928_CLKSEL_CON(27), 4, 1, MFLAGS),
+       COMPOSITE(0, "dclk_lcdc1_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(28), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 2, GFLAGS),
+       MUX(DCLK_LCDC1, "dclk_lcdc1", mux_rk3066_lcdc1_p, 0,
+                       RK2928_CLKSEL_CON(28), 4, 1, MFLAGS),
+
+       COMPOSITE_NOMUX(0, "cif1_pre", "cif_src", 0,
+                       RK2928_CLKSEL_CON(29), 8, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 8, GFLAGS),
+       MUX(SCLK_CIF1, "sclk_cif1", mux_sclk_cif1_p, 0,
+                       RK2928_CLKSEL_CON(29), 15, 1, MFLAGS),
+
+       GATE(0, "pclkin_cif1", "ext_cif1", 0,
+                       RK2928_CLKGATE_CON(3), 4, GFLAGS),
+
+       COMPOSITE(0, "aclk_gpu_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(33), 8, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 13, GFLAGS),
+       GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_src", 0,
+                       RK2928_CLKGATE_CON(5), 15, GFLAGS),
+
+       GATE(SCLK_TIMER2, "timer2", "xin24m", 0,
+                       RK2928_CLKGATE_CON(3), 2, GFLAGS),
+
+       COMPOSITE_NOMUX(0, "sclk_tsadc", "xin24m", 0,
+                       RK2928_CLKSEL_CON(34), 0, 16, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 15, GFLAGS),
+
+       MUX(0, "i2s_src", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(2), 15, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "i2s0_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(2), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(0), 7, GFLAGS),
+       COMPOSITE_FRAC(0, "i2s0_frac", "i2s0_pre", 0,
+                       RK2928_CLKSEL_CON(6), 0,
+                       RK2928_CLKGATE_CON(0), 8, GFLAGS),
+       MUX(SCLK_I2S0, "sclk_i2s0", mux_sclk_i2s0_p, 0,
+                       RK2928_CLKSEL_CON(2), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "i2s1_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(3), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(0), 9, GFLAGS),
+       COMPOSITE_FRAC(0, "i2s1_frac", "i2s1_pre", 0,
+                       RK2928_CLKSEL_CON(7), 0,
+                       RK2928_CLKGATE_CON(0), 10, GFLAGS),
+       MUX(SCLK_I2S1, "sclk_i2s1", mux_sclk_i2s1_p, 0,
+                       RK2928_CLKSEL_CON(3), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "i2s2_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(4), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(0), 11, GFLAGS),
+       COMPOSITE_FRAC(0, "i2s2_frac", "i2s2_pre", 0,
+                       RK2928_CLKSEL_CON(8), 0,
+                       RK2928_CLKGATE_CON(0), 12, GFLAGS),
+       MUX(SCLK_I2S2, "sclk_i2s2", mux_sclk_i2s2_p, 0,
+                       RK2928_CLKSEL_CON(4), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "spdif_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(5), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(0), 13, GFLAGS),
+       COMPOSITE_FRAC(0, "spdif_frac", "spdif_pll", 0,
+                       RK2928_CLKSEL_CON(9), 0,
+                       RK2928_CLKGATE_CON(0), 14, GFLAGS),
+       MUX(SCLK_SPDIF, "sclk_spdif", mux_sclk_spdif_p, 0,
+                       RK2928_CLKSEL_CON(5), 8, 2, MFLAGS),
+
+       GATE(HCLK_I2S1, "hclk_i2s1", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 3, GFLAGS),
+       GATE(HCLK_I2S2, "hclk_i2s2", "hclk_cpu", 0, RK2928_CLKGATE_CON(7), 4, GFLAGS),
+       GATE(0, "hclk_cif1", "hclk_cpu", 0, RK2928_CLKGATE_CON(6), 6, GFLAGS),
+       GATE(0, "hclk_hdmi", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 14, GFLAGS),
+
+       GATE(HCLK_OTG1, "hclk_usbotg1", "hclk_peri", 0, RK2928_CLKGATE_CON(5), 14, GFLAGS),
+
+       GATE(0, "aclk_cif1", "aclk_vio1", 0, RK2928_CLKGATE_CON(6), 7, GFLAGS),
+
+       GATE(PCLK_TIMER1, "pclk_timer1", "pclk_cpu", 0, RK2928_CLKGATE_CON(7), 8, GFLAGS),
+       GATE(PCLK_TIMER2, "pclk_timer2", "pclk_cpu", 0, RK2928_CLKGATE_CON(7), 9, GFLAGS),
+       GATE(PCLK_GPIO6, "pclk_gpio6", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 15, GFLAGS),
+       GATE(PCLK_UART0, "pclk_uart0", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 0, GFLAGS),
+       GATE(PCLK_UART1, "pclk_uart1", "pclk_cpu", 0, RK2928_CLKGATE_CON(8), 1, GFLAGS),
+
+       GATE(PCLK_GPIO4, "pclk_gpio4", "pclk_peri", 0, RK2928_CLKGATE_CON(8), 13, GFLAGS),
+       GATE(PCLK_TSADC, "pclk_tsadc", "pclk_peri", 0, RK2928_CLKGATE_CON(4), 13, GFLAGS),
+};
+
+static struct clk_div_table div_rk3188_aclk_core_t[] = {
+       { .val = 0, .div = 1 },
+       { .val = 1, .div = 2 },
+       { .val = 2, .div = 3 },
+       { .val = 3, .div = 4 },
+       { .val = 4, .div = 8 },
+       { /* sentinel */ },
+};
+
+PNAME(mux_hsicphy_p)           = { "sclk_otgphy0", "sclk_otgphy1",
+                                   "gpll", "cpll" };
+
+static struct rockchip_clk_branch rk3188_clk_branches[] __initdata = {
+       COMPOSITE_NOGATE(0, "armclk", mux_armclk_p, 0,
+                       RK2928_CLKSEL_CON(0), 8, 1, MFLAGS, 9, 5, DFLAGS),
+       COMPOSITE_NOMUX_DIVTBL(0, "aclk_core", "armclk", 0,
+                       RK2928_CLKSEL_CON(1), 3, 3, DFLAGS | CLK_DIVIDER_READ_ONLY,
+                       div_rk3188_aclk_core_t, RK2928_CLKGATE_CON(0), 7, GFLAGS),
+
+       /* do not source aclk_cpu_pre from the apll, to keep complexity down */
+       COMPOSITE_NOGATE(0, "aclk_cpu_pre", mux_aclk_cpu_p, CLK_SET_RATE_NO_REPARENT,
+                       RK2928_CLKSEL_CON(0), 5, 1, MFLAGS, 0, 5, DFLAGS),
+
+       GATE(CORE_L2C, "core_l2c", "armclk", 0,
+                       RK2928_CLKGATE_CON(9), 4, GFLAGS),
+
+       COMPOSITE(0, "aclk_peri_pre", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(10), 15, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(2), 0, GFLAGS),
+
+       COMPOSITE(DCLK_LCDC0, "dclk_lcdc0", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(27), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 1, GFLAGS),
+       COMPOSITE(DCLK_LCDC1, "dclk_lcdc1", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(28), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 2, GFLAGS),
+
+       COMPOSITE(0, "aclk_gpu_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK2928_CLKSEL_CON(34), 7, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 15, GFLAGS),
+       GATE(ACLK_GPU, "aclk_gpu", "aclk_gpu_src", 0,
+                       RK2928_CLKGATE_CON(9), 7, GFLAGS),
+
+       GATE(SCLK_TIMER2, "timer2", "xin24m", 0, RK2928_CLKGATE_CON(3), 4, GFLAGS),
+       GATE(SCLK_TIMER3, "timer3", "xin24m", 0, RK2928_CLKGATE_CON(1), 2, GFLAGS),
+       GATE(SCLK_TIMER4, "timer4", "xin24m", 0, RK2928_CLKGATE_CON(3), 5, GFLAGS),
+       GATE(SCLK_TIMER5, "timer5", "xin24m", 0, RK2928_CLKGATE_CON(3), 8, GFLAGS),
+       GATE(SCLK_TIMER6, "timer6", "xin24m", 0, RK2928_CLKGATE_CON(3), 14, GFLAGS),
+
+       COMPOSITE_NODIV(0, "sclk_hsicphy_480m", mux_hsicphy_p, 0,
+                       RK2928_CLKSEL_CON(30), 0, 2, DFLAGS,
+                       RK2928_CLKGATE_CON(3), 6, GFLAGS),
+       DIV(0, "sclk_hsicphy_12m", "sclk_hsicphy_480m", 0,
+                       RK2928_CLKGATE_CON(11), 8, 6, DFLAGS),
+
+       MUX(0, "i2s_src", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(2), 15, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "i2s0_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(3), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(0), 9, GFLAGS),
+       COMPOSITE_FRAC(0, "i2s0_frac", "i2s0_pre", 0,
+                       RK2928_CLKSEL_CON(7), 0,
+                       RK2928_CLKGATE_CON(0), 10, GFLAGS),
+       MUX(SCLK_I2S0, "sclk_i2s0", mux_sclk_i2s0_p, 0,
+                       RK2928_CLKSEL_CON(3), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "spdif_pre", "i2s_src", 0,
+                       RK2928_CLKSEL_CON(5), 0, 7, DFLAGS,
+                       RK2928_CLKGATE_CON(13), 13, GFLAGS),
+       COMPOSITE_FRAC(0, "spdif_frac", "spdif_pll", 0,
+                       RK2928_CLKSEL_CON(9), 0,
+                       RK2928_CLKGATE_CON(0), 14, GFLAGS),
+       MUX(SCLK_SPDIF, "sclk_spdif", mux_sclk_spdif_p, 0,
+                       RK2928_CLKSEL_CON(5), 8, 2, MFLAGS),
+
+       GATE(0, "hclk_imem0", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 14, GFLAGS),
+       GATE(0, "hclk_imem1", "hclk_cpu", 0, RK2928_CLKGATE_CON(4), 15, GFLAGS),
+
+       GATE(HCLK_OTG1, "hclk_usbotg1", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 3, GFLAGS),
+       GATE(HCLK_HSIC, "hclk_hsic", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 4, GFLAGS),
+
+       GATE(PCLK_TIMER3, "pclk_timer3", "pclk_cpu", 0, RK2928_CLKGATE_CON(7), 9, GFLAGS),
+
+       GATE(PCLK_UART0, "pclk_uart0", "hclk_ahb2apb", 0, RK2928_CLKGATE_CON(8), 0, GFLAGS),
+       GATE(PCLK_UART1, "pclk_uart1", "hclk_ahb2apb", 0, RK2928_CLKGATE_CON(8), 1, GFLAGS),
+
+       GATE(ACLK_GPS, "aclk_gps", "aclk_peri", 0, RK2928_CLKGATE_CON(8), 13, GFLAGS),
+};
+
+static void __init rk3188_common_clk_init(struct device_node *np)
+{
+       void __iomem *reg_base;
+       struct clk *clk;
+
+       reg_base = of_iomap(np, 0);
+       if (!reg_base) {
+               pr_err("%s: could not map cru region\n", __func__);
+               return;
+       }
+
+       rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
+
+       /* xin12m is created by an cru-internal divider */
+       clk = clk_register_fixed_factor(NULL, "xin12m", "xin24m", 0, 1, 2);
+       if (IS_ERR(clk))
+               pr_warn("%s: could not register clock xin12m: %ld\n",
+                       __func__, PTR_ERR(clk));
+
+       clk = clk_register_fixed_factor(NULL, "usb480m", "xin24m", 0, 20, 1);
+       if (IS_ERR(clk))
+               pr_warn("%s: could not register clock usb480m: %ld\n",
+                       __func__, PTR_ERR(clk));
+
+       rockchip_clk_register_plls(rk3188_pll_clks,
+                                  ARRAY_SIZE(rk3188_pll_clks),
+                                  RK3188_GRF_SOC_STATUS);
+       rockchip_clk_register_branches(common_clk_branches,
+                                 ARRAY_SIZE(common_clk_branches));
+
+       rockchip_register_softrst(np, 9, reg_base + RK2928_SOFTRST_CON(0),
+                                 ROCKCHIP_SOFTRST_HIWORD_MASK);
+}
+
+static void __init rk3066a_clk_init(struct device_node *np)
+{
+       rk3188_common_clk_init(np);
+       rockchip_clk_register_branches(rk3066a_clk_branches,
+                                 ARRAY_SIZE(rk3066a_clk_branches));
+}
+CLK_OF_DECLARE(rk3066a_cru, "rockchip,rk3066a-cru", rk3066a_clk_init);
+
+static void __init rk3188a_clk_init(struct device_node *np)
+{
+       rk3188_common_clk_init(np);
+       rockchip_clk_register_branches(rk3188_clk_branches,
+                                 ARRAY_SIZE(rk3188_clk_branches));
+}
+CLK_OF_DECLARE(rk3188a_cru, "rockchip,rk3188a-cru", rk3188a_clk_init);
+
+static void __init rk3188_clk_init(struct device_node *np)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(rk3188_pll_clks); i++) {
+               struct rockchip_pll_clock *pll = &rk3188_pll_clks[i];
+               struct rockchip_pll_rate_table *rate;
+
+               if (!pll->rate_table)
+                       continue;
+
+               rate = pll->rate_table;
+               while (rate->rate > 0) {
+                       rate->bwadj = 0;
+                       rate++;
+               }
+       }
+
+       rk3188a_clk_init(np);
+}
+CLK_OF_DECLARE(rk3188_cru, "rockchip,rk3188-cru", rk3188_clk_init);
diff --git a/drivers/clk/rockchip/clk-rk3288.c b/drivers/clk/rockchip/clk-rk3288.c
new file mode 100644 (file)
index 0000000..0d8c6c5
--- /dev/null
@@ -0,0 +1,717 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <dt-bindings/clock/rk3288-cru.h>
+#include "clk.h"
+
+#define RK3288_GRF_SOC_CON(x)  (0x244 + x * 4)
+#define RK3288_GRF_SOC_STATUS  0x280
+
+enum rk3288_plls {
+       apll, dpll, cpll, gpll, npll,
+};
+
+struct rockchip_pll_rate_table rk3288_pll_rates[] = {
+       RK3066_PLL_RATE(2208000000, 1, 92, 1),
+       RK3066_PLL_RATE(2184000000, 1, 91, 1),
+       RK3066_PLL_RATE(2160000000, 1, 90, 1),
+       RK3066_PLL_RATE(2136000000, 1, 89, 1),
+       RK3066_PLL_RATE(2112000000, 1, 88, 1),
+       RK3066_PLL_RATE(2088000000, 1, 87, 1),
+       RK3066_PLL_RATE(2064000000, 1, 86, 1),
+       RK3066_PLL_RATE(2040000000, 1, 85, 1),
+       RK3066_PLL_RATE(2016000000, 1, 84, 1),
+       RK3066_PLL_RATE(1992000000, 1, 83, 1),
+       RK3066_PLL_RATE(1968000000, 1, 82, 1),
+       RK3066_PLL_RATE(1944000000, 1, 81, 1),
+       RK3066_PLL_RATE(1920000000, 1, 80, 1),
+       RK3066_PLL_RATE(1896000000, 1, 79, 1),
+       RK3066_PLL_RATE(1872000000, 1, 78, 1),
+       RK3066_PLL_RATE(1848000000, 1, 77, 1),
+       RK3066_PLL_RATE(1824000000, 1, 76, 1),
+       RK3066_PLL_RATE(1800000000, 1, 75, 1),
+       RK3066_PLL_RATE(1776000000, 1, 74, 1),
+       RK3066_PLL_RATE(1752000000, 1, 73, 1),
+       RK3066_PLL_RATE(1728000000, 1, 72, 1),
+       RK3066_PLL_RATE(1704000000, 1, 71, 1),
+       RK3066_PLL_RATE(1680000000, 1, 70, 1),
+       RK3066_PLL_RATE(1656000000, 1, 69, 1),
+       RK3066_PLL_RATE(1632000000, 1, 68, 1),
+       RK3066_PLL_RATE(1608000000, 1, 67, 1),
+       RK3066_PLL_RATE(1560000000, 1, 65, 1),
+       RK3066_PLL_RATE(1512000000, 1, 63, 1),
+       RK3066_PLL_RATE(1488000000, 1, 62, 1),
+       RK3066_PLL_RATE(1464000000, 1, 61, 1),
+       RK3066_PLL_RATE(1440000000, 1, 60, 1),
+       RK3066_PLL_RATE(1416000000, 1, 59, 1),
+       RK3066_PLL_RATE(1392000000, 1, 58, 1),
+       RK3066_PLL_RATE(1368000000, 1, 57, 1),
+       RK3066_PLL_RATE(1344000000, 1, 56, 1),
+       RK3066_PLL_RATE(1320000000, 1, 55, 1),
+       RK3066_PLL_RATE(1296000000, 1, 54, 1),
+       RK3066_PLL_RATE(1272000000, 1, 53, 1),
+       RK3066_PLL_RATE(1248000000, 1, 52, 1),
+       RK3066_PLL_RATE(1224000000, 1, 51, 1),
+       RK3066_PLL_RATE(1200000000, 1, 50, 1),
+       RK3066_PLL_RATE(1188000000, 2, 99, 1),
+       RK3066_PLL_RATE(1176000000, 1, 49, 1),
+       RK3066_PLL_RATE(1128000000, 1, 47, 1),
+       RK3066_PLL_RATE(1104000000, 1, 46, 1),
+       RK3066_PLL_RATE(1008000000, 1, 84, 2),
+       RK3066_PLL_RATE( 912000000, 1, 76, 2),
+       RK3066_PLL_RATE( 891000000, 8, 594, 2),
+       RK3066_PLL_RATE( 888000000, 1, 74, 2),
+       RK3066_PLL_RATE( 816000000, 1, 68, 2),
+       RK3066_PLL_RATE( 798000000, 2, 133, 2),
+       RK3066_PLL_RATE( 792000000, 1, 66, 2),
+       RK3066_PLL_RATE( 768000000, 1, 64, 2),
+       RK3066_PLL_RATE( 742500000, 8, 495, 2),
+       RK3066_PLL_RATE( 696000000, 1, 58, 2),
+       RK3066_PLL_RATE( 600000000, 1, 50, 2),
+       RK3066_PLL_RATE( 594000000, 2, 198, 4),
+       RK3066_PLL_RATE( 552000000, 1, 46, 2),
+       RK3066_PLL_RATE( 504000000, 1, 84, 4),
+       RK3066_PLL_RATE( 456000000, 1, 76, 4),
+       RK3066_PLL_RATE( 408000000, 1, 68, 4),
+       RK3066_PLL_RATE( 384000000, 2, 128, 4),
+       RK3066_PLL_RATE( 360000000, 1, 60, 4),
+       RK3066_PLL_RATE( 312000000, 1, 52, 4),
+       RK3066_PLL_RATE( 300000000, 1, 50, 4),
+       RK3066_PLL_RATE( 297000000, 2, 198, 8),
+       RK3066_PLL_RATE( 252000000, 1, 84, 8),
+       RK3066_PLL_RATE( 216000000, 1, 72, 8),
+       RK3066_PLL_RATE( 148500000, 2, 99, 8),
+       RK3066_PLL_RATE( 126000000, 1, 84, 16),
+       RK3066_PLL_RATE(  48000000, 1, 64, 32),
+       { /* sentinel */ },
+};
+
+PNAME(mux_pll_p)               = { "xin24m", "xin32k" };
+PNAME(mux_armclk_p)            = { "apll_core", "gpll_core" };
+PNAME(mux_ddrphy_p)            = { "dpll_ddr", "gpll_ddr" };
+PNAME(mux_aclk_cpu_src_p)      = { "cpll_aclk_cpu", "gpll_aclk_cpu" };
+
+PNAME(mux_pll_src_cpll_gpll_p)         = { "cpll", "gpll" };
+PNAME(mux_pll_src_npll_cpll_gpll_p)    = { "npll", "cpll", "gpll" };
+PNAME(mux_pll_src_cpll_gpll_npll_p)    = { "cpll", "gpll", "npll" };
+PNAME(mux_pll_src_cpll_gpll_usb480m_p) = { "cpll", "gpll", "usb480m" };
+
+PNAME(mux_mmc_src_p)   = { "cpll", "gpll", "xin24m", "xin24m" };
+PNAME(mux_i2s_pre_p)   = { "i2s_src", "i2s_frac", "ext_i2s", "xin12m" };
+PNAME(mux_i2s_clkout_p)        = { "i2s_pre", "xin12m" };
+PNAME(mux_spdif_p)     = { "spdif_pre", "spdif_frac", "xin12m" };
+PNAME(mux_spdif_8ch_p) = { "spdif_8ch_pre", "spdif_8ch_frac", "xin12m" };
+PNAME(mux_uart0_pll_p) = { "cpll", "gpll", "usbphy_480m_src", "npll" };
+PNAME(mux_uart0_p)     = { "uart0_src", "uart0_frac", "xin24m" };
+PNAME(mux_uart1_p)     = { "uart1_src", "uart1_frac", "xin24m" };
+PNAME(mux_uart2_p)     = { "uart2_src", "uart2_frac", "xin24m" };
+PNAME(mux_uart3_p)     = { "uart3_src", "uart3_frac", "xin24m" };
+PNAME(mux_uart4_p)     = { "uart4_src", "uart4_frac", "xin24m" };
+PNAME(mux_cif_out_p)   = { "cif_src", "xin24m" };
+PNAME(mux_macref_p)    = { "mac_src", "ext_gmac" };
+PNAME(mux_hsadcout_p)  = { "hsadc_src", "ext_hsadc" };
+PNAME(mux_edp_24m_p)   = { "ext_edp_24m", "xin24m" };
+PNAME(mux_tspout_p)    = { "cpll", "gpll", "npll", "xin27m" };
+
+PNAME(mux_usbphy480m_p)                = { "sclk_otgphy0", "sclk_otgphy1",
+                                   "sclk_otgphy2" };
+PNAME(mux_hsicphy480m_p)       = { "cpll", "gpll", "usbphy480m_src" };
+PNAME(mux_hsicphy12m_p)                = { "hsicphy12m_xin12m", "hsicphy12m_usbphy" };
+
+static struct rockchip_pll_clock rk3288_pll_clks[] __initdata = {
+       [apll] = PLL(pll_rk3066, PLL_APLL, "apll", mux_pll_p, 0, RK3288_PLL_CON(0),
+                    RK3288_MODE_CON, 0, 6, rk3288_pll_rates),
+       [dpll] = PLL(pll_rk3066, PLL_DPLL, "dpll", mux_pll_p, 0, RK3288_PLL_CON(4),
+                    RK3288_MODE_CON, 4, 5, NULL),
+       [cpll] = PLL(pll_rk3066, PLL_CPLL, "cpll", mux_pll_p, 0, RK3288_PLL_CON(8),
+                    RK3288_MODE_CON, 8, 7, rk3288_pll_rates),
+       [gpll] = PLL(pll_rk3066, PLL_GPLL, "gpll", mux_pll_p, 0, RK3288_PLL_CON(12),
+                    RK3288_MODE_CON, 12, 8, rk3288_pll_rates),
+       [npll] = PLL(pll_rk3066, PLL_NPLL, "npll",  mux_pll_p, 0, RK3288_PLL_CON(16),
+                    RK3288_MODE_CON, 14, 9, NULL),
+};
+
+static struct clk_div_table div_hclk_cpu_t[] = {
+       { .val = 0, .div = 1 },
+       { .val = 1, .div = 2 },
+       { .val = 3, .div = 4 },
+       { /* sentinel */},
+};
+
+#define MFLAGS CLK_MUX_HIWORD_MASK
+#define DFLAGS CLK_DIVIDER_HIWORD_MASK
+#define GFLAGS (CLK_GATE_HIWORD_MASK | CLK_GATE_SET_TO_DISABLE)
+
+static struct rockchip_clk_branch rk3288_clk_branches[] __initdata = {
+       /*
+        * Clock-Architecture Diagram 1
+        */
+
+       GATE(0, "apll_core", "apll", 0,
+                       RK3288_CLKGATE_CON(0), 1, GFLAGS),
+       GATE(0, "gpll_core", "gpll", 0,
+                       RK3288_CLKGATE_CON(0), 2, GFLAGS),
+       COMPOSITE_NOGATE(0, "armclk", mux_armclk_p, 0,
+                       RK3288_CLKSEL_CON(0), 15, 1, MFLAGS, 8, 5, DFLAGS),
+
+       COMPOSITE_NOMUX(0, "armcore0", "armclk", 0,
+                       RK3288_CLKSEL_CON(36), 0, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 0, GFLAGS),
+       COMPOSITE_NOMUX(0, "armcore1", "armclk", 0,
+                       RK3288_CLKSEL_CON(36), 4, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 1, GFLAGS),
+       COMPOSITE_NOMUX(0, "armcore2", "armclk", 0,
+                       RK3288_CLKSEL_CON(36), 8, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 2, GFLAGS),
+       COMPOSITE_NOMUX(0, "armcore3", "armclk", 0,
+                       RK3288_CLKSEL_CON(36), 12, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 3, GFLAGS),
+       COMPOSITE_NOMUX(0, "l2ram", "armclk", 0,
+                       RK3288_CLKSEL_CON(37), 0, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 4, GFLAGS),
+       COMPOSITE_NOMUX(0, "aclk_core_m0", "armclk", 0,
+                       RK3288_CLKSEL_CON(0), 0, 4, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 5, GFLAGS),
+       COMPOSITE_NOMUX(0, "aclk_core_mp", "armclk", 0,
+                       RK3288_CLKSEL_CON(0), 4, 4, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 6, GFLAGS),
+       COMPOSITE_NOMUX(0, "atclk", "armclk", 0,
+                       RK3288_CLKSEL_CON(37), 4, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 7, GFLAGS),
+       COMPOSITE_NOMUX(0, "pclk_dbg_pre", "armclk", 0,
+                       RK3288_CLKSEL_CON(37), 9, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(12), 8, GFLAGS),
+       GATE(0, "pclk_dbg", "pclk_dbg_pre", 0,
+                       RK3288_CLKGATE_CON(12), 9, GFLAGS),
+       GATE(0, "cs_dbg", "pclk_dbg_pre", 0,
+                       RK3288_CLKGATE_CON(12), 10, GFLAGS),
+       GATE(0, "pclk_core_niu", "pclk_dbg_pre", 0,
+                       RK3288_CLKGATE_CON(12), 11, GFLAGS),
+
+       GATE(0, "dpll_ddr", "dpll", 0,
+                       RK3288_CLKGATE_CON(0), 8, GFLAGS),
+       GATE(0, "gpll_ddr", "gpll", 0,
+                       RK3288_CLKGATE_CON(0), 9, GFLAGS),
+       COMPOSITE_NOGATE(0, "ddrphy", mux_ddrphy_p, 0,
+                       RK3288_CLKSEL_CON(26), 2, 1, MFLAGS, 0, 2,
+                                       DFLAGS | CLK_DIVIDER_POWER_OF_TWO),
+
+       GATE(0, "gpll_aclk_cpu", "gpll", 0,
+                       RK3288_CLKGATE_CON(0), 10, GFLAGS),
+       GATE(0, "cpll_aclk_cpu", "cpll", 0,
+                       RK3288_CLKGATE_CON(0), 11, GFLAGS),
+       COMPOSITE_NOGATE(0, "aclk_cpu_src", mux_aclk_cpu_src_p, 0,
+                       RK3288_CLKSEL_CON(1), 15, 1, MFLAGS, 3, 5, DFLAGS),
+       DIV(0, "aclk_cpu_pre", "aclk_cpu_src", 0,
+                       RK3288_CLKSEL_CON(1), 0, 3, DFLAGS),
+       GATE(0, "aclk_cpu", "aclk_cpu_pre", 0,
+                       RK3288_CLKGATE_CON(0), 3, GFLAGS),
+       COMPOSITE_NOMUX(0, "pclk_cpu", "aclk_cpu_pre", 0,
+                       RK3288_CLKSEL_CON(1), 12, 3, DFLAGS,
+                       RK3288_CLKGATE_CON(0), 5, GFLAGS),
+       COMPOSITE_NOMUX_DIVTBL(0, "hclk_cpu", "aclk_cpu_pre", 0,
+                       RK3288_CLKSEL_CON(1), 8, 2, DFLAGS, div_hclk_cpu_t,
+                       RK3288_CLKGATE_CON(0), 4, GFLAGS),
+       GATE(0, "c2c_host", "aclk_cpu_src", 0,
+                       RK3288_CLKGATE_CON(13), 8, GFLAGS),
+       COMPOSITE_NOMUX(0, "crypto", "aclk_cpu_pre", 0,
+                       RK3288_CLKSEL_CON(26), 6, 2, DFLAGS,
+                       RK3288_CLKGATE_CON(5), 4, GFLAGS),
+       GATE(0, "aclk_bus_2pmu", "aclk_cpu_pre", 0,
+                       RK3288_CLKGATE_CON(0), 7, GFLAGS),
+
+       COMPOSITE(0, "i2s_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(4), 15, 1, MFLAGS, 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(4), 1, GFLAGS),
+       COMPOSITE_FRAC(0, "i2s_frac", "i2s_src", 0,
+                       RK3288_CLKSEL_CON(8), 0,
+                       RK3288_CLKGATE_CON(4), 2, GFLAGS),
+       MUX(0, "i2s_pre", mux_i2s_pre_p, 0,
+                       RK3288_CLKSEL_CON(4), 8, 2, MFLAGS),
+       COMPOSITE_NODIV(0, "i2s0_clkout", mux_i2s_clkout_p, 0,
+                       RK3288_CLKSEL_CON(4), 12, 1, MFLAGS,
+                       RK3288_CLKGATE_CON(4), 0, GFLAGS),
+       GATE(SCLK_I2S0, "sclk_i2s0", "i2s_pre", 0,
+                       RK3288_CLKGATE_CON(4), 3, GFLAGS),
+
+       MUX(0, "spdif_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(5), 15, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "spdif_pre", "spdif_src", 0,
+                       RK3288_CLKSEL_CON(5), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(4), 4, GFLAGS),
+       COMPOSITE_FRAC(0, "spdif_frac", "spdif_src", 0,
+                       RK3288_CLKSEL_CON(9), 0,
+                       RK3288_CLKGATE_CON(4), 5, GFLAGS),
+       COMPOSITE_NODIV(SCLK_SPDIF, "sclk_spdif", mux_spdif_p, 0,
+                       RK3288_CLKSEL_CON(5), 8, 2, MFLAGS,
+                       RK3288_CLKGATE_CON(4), 6, GFLAGS),
+       COMPOSITE_NOMUX(0, "spdif_8ch_pre", "spdif_src", 0,
+                       RK3288_CLKSEL_CON(40), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(4), 7, GFLAGS),
+       COMPOSITE_FRAC(0, "spdif_8ch_frac", "spdif_8ch_src", 0,
+                       RK3288_CLKSEL_CON(41), 0,
+                       RK3288_CLKGATE_CON(4), 8, GFLAGS),
+       COMPOSITE_NODIV(SCLK_SPDIF8CH, "sclk_spdif_8ch", mux_spdif_8ch_p, 0,
+                       RK3288_CLKSEL_CON(40), 8, 2, MFLAGS,
+                       RK3288_CLKGATE_CON(4), 9, GFLAGS),
+
+       GATE(0, "sclk_acc_efuse", "xin24m", 0,
+                       RK3288_CLKGATE_CON(0), 12, GFLAGS),
+
+       GATE(SCLK_TIMER0, "sclk_timer0", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 0, GFLAGS),
+       GATE(SCLK_TIMER1, "sclk_timer1", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 1, GFLAGS),
+       GATE(SCLK_TIMER2, "sclk_timer2", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 2, GFLAGS),
+       GATE(SCLK_TIMER3, "sclk_timer3", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 3, GFLAGS),
+       GATE(SCLK_TIMER4, "sclk_timer4", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 4, GFLAGS),
+       GATE(SCLK_TIMER5, "sclk_timer5", "xin24m", 0,
+                       RK3288_CLKGATE_CON(1), 5, GFLAGS),
+
+       /*
+        * Clock-Architecture Diagram 2
+        */
+
+       COMPOSITE(0, "aclk_vepu", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(32), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 9, GFLAGS),
+       COMPOSITE(0, "aclk_vdpu", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 11, GFLAGS),
+
+       COMPOSITE(0, "aclk_vio0", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(31), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 0, GFLAGS),
+       DIV(0, "hclk_vio", "aclk_vio0", 0,
+                       RK3288_CLKSEL_CON(28), 8, 5, DFLAGS),
+       COMPOSITE(0, "aclk_vio1", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(31), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 2, GFLAGS),
+
+       COMPOSITE(0, "aclk_rga_pre", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(30), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 5, GFLAGS),
+       COMPOSITE(0, "sclk_rga", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(30), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 4, GFLAGS),
+
+       COMPOSITE(DCLK_VOP0, "dclk_vop0", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(27), 0, 2, MFLAGS, 8, 8, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 1, GFLAGS),
+       COMPOSITE(DCLK_VOP1, "dclk_vop1", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(29), 6, 2, MFLAGS, 8, 8, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 3, GFLAGS),
+
+       COMPOSITE_NODIV(0, "sclk_edp_24m", mux_edp_24m_p, 0,
+                       RK3288_CLKSEL_CON(28), 15, 1, MFLAGS,
+                       RK3288_CLKGATE_CON(3), 12, GFLAGS),
+       COMPOSITE(0, "sclk_edp", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(28), 6, 2, MFLAGS, 0, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 13, GFLAGS),
+
+       COMPOSITE(0, "sclk_isp", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(6), 6, 2, MFLAGS, 0, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 14, GFLAGS),
+       COMPOSITE(0, "sclk_isp_jpe", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(6), 14, 2, MFLAGS, 8, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(3), 15, GFLAGS),
+
+       GATE(0, "sclk_hdmi_hdcp", "xin24m", 0,
+                       RK3288_CLKGATE_CON(5), 12, GFLAGS),
+       GATE(0, "sclk_hdmi_cec", "xin32k", 0,
+                       RK3288_CLKGATE_CON(5), 11, GFLAGS),
+
+       COMPOSITE(0, "aclk_hevc", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(39), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 13, GFLAGS),
+       DIV(0, "hclk_hevc", "aclk_hevc", 0,
+                       RK3288_CLKSEL_CON(40), 12, 2, DFLAGS),
+
+       COMPOSITE(0, "sclk_hevc_cabac", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(42), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 14, GFLAGS),
+       COMPOSITE(0, "sclk_hevc_core", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(42), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 15, GFLAGS),
+
+       COMPOSITE_NODIV(0, "vip_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(26), 8, 1, MFLAGS,
+                       RK3288_CLKGATE_CON(3), 7, GFLAGS),
+       COMPOSITE_NOGATE(0, "sclk_vip_out", mux_cif_out_p, 0,
+                       RK3288_CLKSEL_CON(26), 15, 1, MFLAGS, 9, 5, DFLAGS),
+
+       DIV(0, "pclk_pd_alive", "gpll", 0,
+                       RK3288_CLKSEL_CON(33), 8, 5, DFLAGS),
+       COMPOSITE_NOMUX(0, "pclk_pd_pmu", "gpll", 0,
+                       RK3288_CLKSEL_CON(33), 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(5), 8, GFLAGS),
+
+       COMPOSITE(SCLK_GPU, "sclk_gpu", mux_pll_src_cpll_gpll_usb480m_p, 0,
+                       RK3288_CLKSEL_CON(34), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(5), 7, GFLAGS),
+
+       COMPOSITE(0, "aclk_peri_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(10), 15, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 0, GFLAGS),
+       COMPOSITE_NOMUX(0, "pclk_peri", "aclk_peri_src", 0,
+                       RK3288_CLKSEL_CON(10), 12, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK3288_CLKGATE_CON(2), 3, GFLAGS),
+       COMPOSITE_NOMUX(0, "hclk_peri", "aclk_peri_src", 0,
+                       RK3288_CLKSEL_CON(10), 8, 2, DFLAGS | CLK_DIVIDER_POWER_OF_TWO,
+                       RK3288_CLKGATE_CON(2), 2, GFLAGS),
+       GATE(0, "aclk_peri", "aclk_peri_src", 0,
+                       RK3288_CLKGATE_CON(2), 1, GFLAGS),
+
+       /*
+        * Clock-Architecture Diagram 3
+        */
+
+       COMPOSITE(SCLK_SPI0, "sclk_spi0", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(25), 7, 1, MFLAGS, 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 9, GFLAGS),
+       COMPOSITE(SCLK_SPI1, "sclk_spi1", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(25), 15, 1, MFLAGS, 8, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 10, GFLAGS),
+       COMPOSITE(SCLK_SPI2, "sclk_spi2", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(39), 7, 1, MFLAGS, 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 11, GFLAGS),
+
+       COMPOSITE(SCLK_SDMMC, "sclk_sdmmc", mux_mmc_src_p, 0,
+                       RK3288_CLKSEL_CON(11), 6, 2, MFLAGS, 0, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 0, GFLAGS),
+       COMPOSITE(SCLK_SDIO0, "sclk_sdio0", mux_mmc_src_p, 0,
+                       RK3288_CLKSEL_CON(12), 6, 2, MFLAGS, 0, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 1, GFLAGS),
+       COMPOSITE(SCLK_SDIO1, "sclk_sdio1", mux_mmc_src_p, 0,
+                       RK3288_CLKSEL_CON(34), 14, 2, MFLAGS, 8, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 2, GFLAGS),
+       COMPOSITE(SCLK_EMMC, "sclk_emmc", mux_mmc_src_p, 0,
+                       RK3288_CLKSEL_CON(12), 14, 2, MFLAGS, 8, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(13), 3, GFLAGS),
+
+       COMPOSITE(0, "sclk_tspout", mux_tspout_p, 0,
+                       RK3288_CLKSEL_CON(35), 14, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(4), 11, GFLAGS),
+       COMPOSITE(0, "sclk_tsp", mux_pll_src_cpll_gpll_npll_p, 0,
+                       RK3288_CLKSEL_CON(35), 6, 2, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(4), 10, GFLAGS),
+
+       GATE(SCLK_OTGPHY0, "sclk_otgphy0", "usb480m", 0,
+                       RK3288_CLKGATE_CON(13), 4, GFLAGS),
+       GATE(SCLK_OTGPHY1, "sclk_otgphy1", "usb480m", 0,
+                       RK3288_CLKGATE_CON(13), 5, GFLAGS),
+       GATE(SCLK_OTGPHY2, "sclk_otgphy2", "usb480m", 0,
+                       RK3288_CLKGATE_CON(13), 6, GFLAGS),
+       GATE(SCLK_OTG_ADP, "sclk_otg_adp", "xin32k", 0,
+                       RK3288_CLKGATE_CON(13), 7, GFLAGS),
+
+       COMPOSITE_NOMUX(SCLK_TSADC, "sclk_tsadc", "xin32k", 0,
+                       RK3288_CLKSEL_CON(2), 0, 6, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 7, GFLAGS),
+
+       COMPOSITE_NOMUX(SCLK_SARADC, "sclk_saradc", "xin24m", 0,
+                       RK3288_CLKSEL_CON(24), 8, 8, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 8, GFLAGS),
+
+       GATE(SCLK_PS2C, "sclk_ps2c", "xin24m", 0,
+                       RK3288_CLKGATE_CON(5), 13, GFLAGS),
+
+       COMPOSITE(SCLK_NANDC0, "sclk_nandc0", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(38), 7, 1, MFLAGS, 0, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(5), 5, GFLAGS),
+       COMPOSITE(SCLK_NANDC1, "sclk_nandc1", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(38), 15, 1, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(5), 6, GFLAGS),
+
+       COMPOSITE(0, "uart0_src", mux_uart0_pll_p, 0,
+                       RK3288_CLKSEL_CON(13), 13, 2, MFLAGS, 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(1), 8, GFLAGS),
+       COMPOSITE_FRAC(0, "uart0_frac", "uart0_src", 0,
+                       RK3288_CLKSEL_CON(17), 0,
+                       RK3288_CLKGATE_CON(1), 9, GFLAGS),
+       MUX(SCLK_UART0, "sclk_uart0", mux_uart0_p, 0,
+                       RK3288_CLKSEL_CON(13), 8, 2, MFLAGS),
+       MUX(0, "uart_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(13), 15, 1, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart1_src", "uart_src", 0,
+                       RK3288_CLKSEL_CON(14), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(1), 10, GFLAGS),
+       COMPOSITE_FRAC(0, "uart1_frac", "uart1_src", 0,
+                       RK3288_CLKSEL_CON(18), 0,
+                       RK3288_CLKGATE_CON(1), 11, GFLAGS),
+       MUX(SCLK_UART1, "sclk_uart1", mux_uart1_p, 0,
+                       RK3288_CLKSEL_CON(14), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart2_src", "uart_src", 0,
+                       RK3288_CLKSEL_CON(15), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(1), 12, GFLAGS),
+       COMPOSITE_FRAC(0, "uart2_frac", "uart2_src", 0,
+                       RK3288_CLKSEL_CON(19), 0,
+                       RK3288_CLKGATE_CON(1), 13, GFLAGS),
+       MUX(SCLK_UART2, "sclk_uart2", mux_uart2_p, 0,
+                       RK3288_CLKSEL_CON(15), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart3_src", "uart_src", 0,
+                       RK3288_CLKSEL_CON(16), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(1), 14, GFLAGS),
+       COMPOSITE_FRAC(0, "uart3_frac", "uart3_src", 0,
+                       RK3288_CLKSEL_CON(20), 0,
+                       RK3288_CLKGATE_CON(1), 15, GFLAGS),
+       MUX(SCLK_UART3, "sclk_uart3", mux_uart3_p, 0,
+                       RK3288_CLKSEL_CON(16), 8, 2, MFLAGS),
+       COMPOSITE_NOMUX(0, "uart4_src", "uart_src", 0,
+                       RK3288_CLKSEL_CON(3), 0, 7, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 12, GFLAGS),
+       COMPOSITE_FRAC(0, "uart4_frac", "uart4_src", 0,
+                       RK3288_CLKSEL_CON(7), 0,
+                       RK3288_CLKGATE_CON(2), 13, GFLAGS),
+       MUX(SCLK_UART4, "sclk_uart4", mux_uart4_p, 0,
+                       RK3288_CLKSEL_CON(3), 8, 2, MFLAGS),
+
+       COMPOSITE(0, "mac_src", mux_pll_src_npll_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(21), 0, 2, MFLAGS, 8, 5, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 5, GFLAGS),
+       MUX(0, "macref", mux_macref_p, 0,
+                       RK3288_CLKSEL_CON(21), 4, 1, MFLAGS),
+       GATE(0, "sclk_macref_out", "macref", 0,
+                       RK3288_CLKGATE_CON(5), 3, GFLAGS),
+       GATE(SCLK_MACREF, "sclk_macref", "macref", 0,
+                       RK3288_CLKGATE_CON(5), 2, GFLAGS),
+       GATE(SCLK_MAC_RX, "sclk_mac_rx", "macref", 0,
+                       RK3288_CLKGATE_CON(5), 0, GFLAGS),
+       GATE(SCLK_MAC_TX, "sclk_mac_tx", "macref", 0,
+                       RK3288_CLKGATE_CON(5), 1, GFLAGS),
+
+       COMPOSITE(0, "hsadc_src", mux_pll_src_cpll_gpll_p, 0,
+                       RK3288_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
+                       RK3288_CLKGATE_CON(2), 6, GFLAGS),
+       MUX(SCLK_HSADC, "sclk_hsadc_out", mux_hsadcout_p, 0,
+                       RK3288_CLKSEL_CON(22), 4, 1, MFLAGS),
+
+       GATE(0, "jtag", "ext_jtag", 0,
+                       RK3288_CLKGATE_CON(4), 14, GFLAGS),
+
+       COMPOSITE_NODIV(0, "usbphy480m_src", mux_usbphy480m_p, 0,
+                       RK3288_CLKSEL_CON(13), 11, 2, MFLAGS,
+                       RK3288_CLKGATE_CON(5), 15, GFLAGS),
+       COMPOSITE_NODIV(SCLK_HSICPHY480M, "sclk_hsicphy480m", mux_hsicphy480m_p, 0,
+                       RK3288_CLKSEL_CON(29), 0, 2, MFLAGS,
+                       RK3288_CLKGATE_CON(3), 6, GFLAGS),
+       GATE(0, "hsicphy12m_xin12m", "xin12m", 0,
+                       RK3288_CLKGATE_CON(13), 9, GFLAGS),
+       DIV(0, "hsicphy12m_usbphy", "sclk_hsicphy480m", 0,
+                       RK3288_CLKSEL_CON(11), 8, 6, DFLAGS),
+       MUX(SCLK_HSICPHY12M, "sclk_hsicphy12m", mux_hsicphy12m_p, 0,
+                       RK3288_CLKSEL_CON(22), 4, 1, MFLAGS),
+
+       /*
+        * Clock-Architecture Diagram 4
+        */
+
+       /* aclk_cpu gates */
+       GATE(0, "sclk_intmem0", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 5, GFLAGS),
+       GATE(0, "sclk_intmem1", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 6, GFLAGS),
+       GATE(0, "sclk_intmem2", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 7, GFLAGS),
+       GATE(ACLK_DMAC1, "aclk_dmac1", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 12, GFLAGS),
+       GATE(0, "aclk_strc_sys", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 13, GFLAGS),
+       GATE(0, "aclk_intmem", "aclk_cpu", 0, RK3288_CLKGATE_CON(10), 4, GFLAGS),
+       GATE(ACLK_CRYPTO, "aclk_crypto", "aclk_cpu", 0, RK3288_CLKGATE_CON(11), 6, GFLAGS),
+       GATE(0, "aclk_ccp", "aclk_cpu", 0, RK3288_CLKGATE_CON(11), 8, GFLAGS),
+
+       /* hclk_cpu gates */
+       GATE(HCLK_CRYPTO, "hclk_crypto", "hclk_cpu", 0, RK3288_CLKGATE_CON(11), 7, GFLAGS),
+       GATE(HCLK_I2S0, "hclk_i2s0", "hclk_cpu", 0, RK3288_CLKGATE_CON(10), 8, GFLAGS),
+       GATE(HCLK_ROM, "hclk_rom", "hclk_cpu", 0, RK3288_CLKGATE_CON(10), 9, GFLAGS),
+       GATE(HCLK_SPDIF, "hclk_spdif", "hclk_cpu", 0, RK3288_CLKGATE_CON(10), 10, GFLAGS),
+       GATE(HCLK_SPDIF8CH, "hclk_spdif_8ch", "hclk_cpu", 0, RK3288_CLKGATE_CON(10), 11, GFLAGS),
+
+       /* pclk_cpu gates */
+       GATE(PCLK_PWM, "pclk_pwm", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 0, GFLAGS),
+       GATE(PCLK_TIMER, "pclk_timer", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 1, GFLAGS),
+       GATE(PCLK_I2C0, "pclk_i2c0", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 2, GFLAGS),
+       GATE(PCLK_I2C1, "pclk_i2c1", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 3, GFLAGS),
+       GATE(0, "pclk_ddrupctl0", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 14, GFLAGS),
+       GATE(0, "pclk_publ0", "pclk_cpu", 0, RK3288_CLKGATE_CON(10), 15, GFLAGS),
+       GATE(0, "pclk_ddrupctl1", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 0, GFLAGS),
+       GATE(0, "pclk_publ1", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 1, GFLAGS),
+       GATE(0, "pclk_efuse_1024", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 2, GFLAGS),
+       GATE(PCLK_TZPC, "pclk_tzpc", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 3, GFLAGS),
+       GATE(PCLK_UART2, "pclk_uart2", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 9, GFLAGS),
+       GATE(0, "pclk_efuse_256", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 10, GFLAGS),
+       GATE(PCLK_RKPWM, "pclk_rkpwm", "pclk_cpu", 0, RK3288_CLKGATE_CON(11), 11, GFLAGS),
+
+       /* ddrctrl [DDR Controller PHY clock] gates */
+       GATE(0, "nclk_ddrupctl0", "ddrphy", 0, RK3288_CLKGATE_CON(11), 4, GFLAGS),
+       GATE(0, "nclk_ddrupctl1", "ddrphy", 0, RK3288_CLKGATE_CON(11), 5, GFLAGS),
+
+       /* ddrphy gates */
+       GATE(0, "sclk_ddrphy0", "ddrphy", 0, RK3288_CLKGATE_CON(4), 12, GFLAGS),
+       GATE(0, "sclk_ddrphy1", "ddrphy", 0, RK3288_CLKGATE_CON(4), 13, GFLAGS),
+
+       /* aclk_peri gates */
+       GATE(0, "aclk_peri_axi_matrix", "aclk_peri", 0, RK3288_CLKGATE_CON(6), 2, GFLAGS),
+       GATE(ACLK_DMAC2, "aclk_dmac2", "aclk_peri", 0, RK3288_CLKGATE_CON(6), 3, GFLAGS),
+       GATE(0, "aclk_peri_niu", "aclk_peri", 0, RK3288_CLKGATE_CON(7), 11, GFLAGS),
+       GATE(ACLK_MMU, "aclk_mmu", "aclk_peri", 0, RK3288_CLKGATE_CON(8), 12, GFLAGS),
+       GATE(ACLK_GMAC, "aclk_gmac", "aclk_peri", 0, RK3288_CLKGATE_CON(8), 0, GFLAGS),
+       GATE(HCLK_GPS, "hclk_gps", "aclk_peri", 0, RK3288_CLKGATE_CON(8), 2, GFLAGS),
+
+       /* hclk_peri gates */
+       GATE(0, "hclk_peri_matrix", "hclk_peri", 0, RK3288_CLKGATE_CON(6), 0, GFLAGS),
+       GATE(HCLK_OTG0, "hclk_otg0", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 4, GFLAGS),
+       GATE(HCLK_USBHOST0, "hclk_host0", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 6, GFLAGS),
+       GATE(HCLK_USBHOST1, "hclk_host1", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 7, GFLAGS),
+       GATE(HCLK_HSIC, "hclk_hsic", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 8, GFLAGS),
+       GATE(0, "hclk_usb_peri", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 9, GFLAGS),
+       GATE(0, "hclk_peri_ahb_arbi", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 10, GFLAGS),
+       GATE(0, "hclk_emem", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 12, GFLAGS),
+       GATE(0, "hclk_mem", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 13, GFLAGS),
+       GATE(HCLK_NANDC0, "hclk_nandc0", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 14, GFLAGS),
+       GATE(HCLK_NANDC1, "hclk_nandc1", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 15, GFLAGS),
+       GATE(HCLK_TSP, "hclk_tsp", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 8, GFLAGS),
+       GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 3, GFLAGS),
+       GATE(HCLK_SDIO0, "hclk_sdio0", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 4, GFLAGS),
+       GATE(HCLK_SDIO1, "hclk_sdio1", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 5, GFLAGS),
+       GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 6, GFLAGS),
+       GATE(HCLK_HSADC, "hclk_hsadc", "hclk_peri", 0, RK3288_CLKGATE_CON(8), 7, GFLAGS),
+       GATE(0, "pmu_hclk_otg0", "hclk_peri", 0, RK3288_CLKGATE_CON(7), 5, GFLAGS),
+
+       /* pclk_peri gates */
+       GATE(0, "pclk_peri_matrix", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 1, GFLAGS),
+       GATE(PCLK_SPI0, "pclk_spi0", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 4, GFLAGS),
+       GATE(PCLK_SPI1, "pclk_spi1", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 5, GFLAGS),
+       GATE(PCLK_SPI2, "pclk_spi2", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 6, GFLAGS),
+       GATE(PCLK_PS2C, "pclk_ps2c", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 7, GFLAGS),
+       GATE(PCLK_UART0, "pclk_uart0", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 8, GFLAGS),
+       GATE(PCLK_UART1, "pclk_uart1", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 9, GFLAGS),
+       GATE(PCLK_I2C4, "pclk_i2c4", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 15, GFLAGS),
+       GATE(PCLK_UART3, "pclk_uart3", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 11, GFLAGS),
+       GATE(PCLK_UART4, "pclk_uart4", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 12, GFLAGS),
+       GATE(PCLK_I2C2, "pclk_i2c2", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 13, GFLAGS),
+       GATE(PCLK_I2C3, "pclk_i2c3", "pclk_peri", 0, RK3288_CLKGATE_CON(6), 14, GFLAGS),
+       GATE(PCLK_SARADC, "pclk_saradc", "pclk_peri", 0, RK3288_CLKGATE_CON(7), 1, GFLAGS),
+       GATE(PCLK_TSADC, "pclk_tsadc", "pclk_peri", 0, RK3288_CLKGATE_CON(7), 2, GFLAGS),
+       GATE(PCLK_SIM, "pclk_sim", "pclk_peri", 0, RK3288_CLKGATE_CON(7), 3, GFLAGS),
+       GATE(PCLK_I2C5, "pclk_i2c5", "pclk_peri", 0, RK3288_CLKGATE_CON(7), 0, GFLAGS),
+       GATE(PCLK_GMAC, "pclk_gmac", "pclk_peri", 0, RK3288_CLKGATE_CON(8), 1, GFLAGS),
+
+       GATE(SCLK_LCDC_PWM0, "sclk_lcdc_pwm0", "xin24m", 0, RK3288_CLKGATE_CON(13), 10, GFLAGS),
+       GATE(SCLK_LCDC_PWM1, "sclk_lcdc_pwm1", "xin24m", 0, RK3288_CLKGATE_CON(13), 11, GFLAGS),
+       GATE(0, "sclk_pvtm_core", "xin24m", 0, RK3288_CLKGATE_CON(5), 9, GFLAGS),
+       GATE(0, "sclk_pvtm_gpu", "xin24m", 0, RK3288_CLKGATE_CON(5), 10, GFLAGS),
+       GATE(0, "sclk_mipidsi_24m", "xin24m", 0, RK3288_CLKGATE_CON(5), 15, GFLAGS),
+
+       /* sclk_gpu gates */
+       GATE(ACLK_GPU, "aclk_gpu", "sclk_gpu", 0, RK3288_CLKGATE_CON(18), 0, GFLAGS),
+
+       /* pclk_pd_alive gates */
+       GATE(PCLK_GPIO8, "pclk_gpio8", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 8, GFLAGS),
+       GATE(PCLK_GPIO7, "pclk_gpio7", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 7, GFLAGS),
+       GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 1, GFLAGS),
+       GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 2, GFLAGS),
+       GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 3, GFLAGS),
+       GATE(PCLK_GPIO4, "pclk_gpio4", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 4, GFLAGS),
+       GATE(PCLK_GPIO5, "pclk_gpio5", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 5, GFLAGS),
+       GATE(PCLK_GPIO6, "pclk_gpio6", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 6, GFLAGS),
+       GATE(PCLK_GRF, "pclk_grf", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 11, GFLAGS),
+       GATE(0, "pclk_alive_niu", "pclk_pd_alive", 0, RK3288_CLKGATE_CON(14), 12, GFLAGS),
+
+       /* pclk_pd_pmu gates */
+       GATE(PCLK_PMU, "pclk_pmu", "pclk_pd_pmu", 0, RK3288_CLKGATE_CON(17), 0, GFLAGS),
+       GATE(0, "pclk_intmem1", "pclk_pd_pmu", 0, RK3288_CLKGATE_CON(17), 1, GFLAGS),
+       GATE(0, "pclk_pmu_niu", "pclk_pd_pmu", 0, RK3288_CLKGATE_CON(17), 2, GFLAGS),
+       GATE(PCLK_SGRF, "pclk_sgrf", "pclk_pd_pmu", 0, RK3288_CLKGATE_CON(17), 3, GFLAGS),
+       GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_pd_pmu", 0, RK3288_CLKGATE_CON(17), 4, GFLAGS),
+
+       /* hclk_vio gates */
+       GATE(HCLK_RGA, "hclk_rga", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 1, GFLAGS),
+       GATE(HCLK_VOP0, "hclk_vop0", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 6, GFLAGS),
+       GATE(HCLK_VOP1, "hclk_vop1", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 8, GFLAGS),
+       GATE(0, "hclk_vio_ahb_arbi", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 9, GFLAGS),
+       GATE(0, "hclk_vio_niu", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 10, GFLAGS),
+       GATE(0, "hclk_vip", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 15, GFLAGS),
+       GATE(HCLK_IEP, "hclk_iep", "hclk_vio", 0, RK3288_CLKGATE_CON(15), 3, GFLAGS),
+       GATE(HCLK_ISP, "hclk_isp", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 1, GFLAGS),
+       GATE(0, "hclk_vio2_h2p", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 10, GFLAGS),
+       GATE(0, "pclk_mipi_dsi0", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 4, GFLAGS),
+       GATE(0, "pclk_mipi_dsi1", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 5, GFLAGS),
+       GATE(0, "pclk_mipi_csi", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 6, GFLAGS),
+       GATE(0, "pclk_lvds_phy", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 7, GFLAGS),
+       GATE(0, "pclk_edp_ctrl", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 8, GFLAGS),
+       GATE(0, "pclk_hdmi_ctrl", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 9, GFLAGS),
+       GATE(0, "pclk_vio2_h2p", "hclk_vio", 0, RK3288_CLKGATE_CON(16), 11, GFLAGS),
+
+       /* aclk_vio0 gates */
+       GATE(ACLK_VOP0, "aclk_vop0", "aclk_vio0", 0, RK3288_CLKGATE_CON(15), 5, GFLAGS),
+       GATE(0, "aclk_iep", "aclk_vio0", 0, RK3288_CLKGATE_CON(15), 2, GFLAGS),
+       GATE(0, "aclk_vio0_niu", "aclk_vio0", 0, RK3288_CLKGATE_CON(15), 11, GFLAGS),
+       GATE(0, "aclk_vip", "aclk_vio0", 0, RK3288_CLKGATE_CON(15), 14, GFLAGS),
+
+       /* aclk_vio1 gates */
+       GATE(ACLK_VOP1, "aclk_vop1", "aclk_vio1", 0, RK3288_CLKGATE_CON(15), 7, GFLAGS),
+       GATE(0, "aclk_isp", "aclk_vio1", 0, RK3288_CLKGATE_CON(16), 2, GFLAGS),
+       GATE(0, "aclk_vio1_niu", "aclk_vio1", 0, RK3288_CLKGATE_CON(15), 12, GFLAGS),
+
+       /* aclk_rga_pre gates */
+       GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 0, RK3288_CLKGATE_CON(15), 0, GFLAGS),
+       GATE(0, "aclk_rga_niu", "aclk_rga_pre", 0, RK3288_CLKGATE_CON(15), 13, GFLAGS),
+
+       /*
+        * Other ungrouped clocks.
+        */
+
+       GATE(0, "pclk_vip_in", "ext_vip", 0, RK3288_CLKGATE_CON(16), 0, GFLAGS),
+       GATE(0, "pclk_isp_in", "ext_isp", 0, RK3288_CLKGATE_CON(16), 3, GFLAGS),
+};
+
+static void __init rk3288_clk_init(struct device_node *np)
+{
+       void __iomem *reg_base;
+       struct clk *clk;
+
+       reg_base = of_iomap(np, 0);
+       if (!reg_base) {
+               pr_err("%s: could not map cru region\n", __func__);
+               return;
+       }
+
+       rockchip_clk_init(np, reg_base, CLK_NR_CLKS);
+
+       /* xin12m is created by an cru-internal divider */
+       clk = clk_register_fixed_factor(NULL, "xin12m", "xin24m", 0, 1, 2);
+       if (IS_ERR(clk))
+               pr_warn("%s: could not register clock xin12m: %ld\n",
+                       __func__, PTR_ERR(clk));
+
+
+       clk = clk_register_fixed_factor(NULL, "usb480m", "xin24m", 0, 20, 1);
+       if (IS_ERR(clk))
+               pr_warn("%s: could not register clock usb480m: %ld\n",
+                       __func__, PTR_ERR(clk));
+
+       rockchip_clk_register_plls(rk3288_pll_clks,
+                                  ARRAY_SIZE(rk3288_pll_clks),
+                                  RK3288_GRF_SOC_STATUS);
+       rockchip_clk_register_branches(rk3288_clk_branches,
+                                 ARRAY_SIZE(rk3288_clk_branches));
+
+       rockchip_register_softrst(np, 9, reg_base + RK3288_SOFTRST_CON(0),
+                                 ROCKCHIP_SOFTRST_HIWORD_MASK);
+}
+CLK_OF_DECLARE(rk3288_cru, "rockchip,rk3288-cru", rk3288_clk_init);
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
new file mode 100644 (file)
index 0000000..278cf9d
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * based on
+ *
+ * samsung/clk.c
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2013 Linaro Ltd.
+ * Author: Thomas Abraham <thomas.ab@samsung.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.
+ */
+
+#include <linux/slab.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include "clk.h"
+
+/**
+ * Register a clock branch.
+ * Most clock branches have a form like
+ *
+ * src1 --|--\
+ *        |M |--[GATE]-[DIV]-
+ * src2 --|--/
+ *
+ * sometimes without one of those components.
+ */
+struct clk *rockchip_clk_register_branch(const char *name,
+               const char **parent_names, u8 num_parents, void __iomem *base,
+               int muxdiv_offset, u8 mux_shift, u8 mux_width, u8 mux_flags,
+               u8 div_shift, u8 div_width, u8 div_flags,
+               struct clk_div_table *div_table, int gate_offset,
+               u8 gate_shift, u8 gate_flags, unsigned long flags,
+               spinlock_t *lock)
+{
+       struct clk *clk;
+       struct clk_mux *mux = NULL;
+       struct clk_gate *gate = NULL;
+       struct clk_divider *div = NULL;
+       const struct clk_ops *mux_ops = NULL, *div_ops = NULL,
+                            *gate_ops = NULL;
+
+       if (num_parents > 1) {
+               mux = kzalloc(sizeof(*mux), GFP_KERNEL);
+               if (!mux)
+                       return ERR_PTR(-ENOMEM);
+
+               mux->reg = base + muxdiv_offset;
+               mux->shift = mux_shift;
+               mux->mask = BIT(mux_width) - 1;
+               mux->flags = mux_flags;
+               mux->lock = lock;
+               mux_ops = (mux_flags & CLK_MUX_READ_ONLY) ? &clk_mux_ro_ops
+                                                       : &clk_mux_ops;
+       }
+
+       if (gate_offset >= 0) {
+               gate = kzalloc(sizeof(*gate), GFP_KERNEL);
+               if (!gate)
+                       return ERR_PTR(-ENOMEM);
+
+               gate->flags = gate_flags;
+               gate->reg = base + gate_offset;
+               gate->bit_idx = gate_shift;
+               gate->lock = lock;
+               gate_ops = &clk_gate_ops;
+       }
+
+       if (div_width > 0) {
+               div = kzalloc(sizeof(*div), GFP_KERNEL);
+               if (!div)
+                       return ERR_PTR(-ENOMEM);
+
+               div->flags = div_flags;
+               div->reg = base + muxdiv_offset;
+               div->shift = div_shift;
+               div->width = div_width;
+               div->lock = lock;
+               div->table = div_table;
+               div_ops = (div_flags & CLK_DIVIDER_READ_ONLY)
+                                               ? &clk_divider_ro_ops
+                                               : &clk_divider_ops;
+       }
+
+       clk = clk_register_composite(NULL, name, parent_names, num_parents,
+                                    mux ? &mux->hw : NULL, mux_ops,
+                                    div ? &div->hw : NULL, div_ops,
+                                    gate ? &gate->hw : NULL, gate_ops,
+                                    flags);
+
+       return clk;
+}
+
+static DEFINE_SPINLOCK(clk_lock);
+static struct clk **clk_table;
+static void __iomem *reg_base;
+static struct clk_onecell_data clk_data;
+static struct device_node *cru_node;
+static struct regmap *grf;
+
+void __init rockchip_clk_init(struct device_node *np, void __iomem *base,
+                             unsigned long nr_clks)
+{
+       reg_base = base;
+       cru_node = np;
+       grf = ERR_PTR(-EPROBE_DEFER);
+
+       clk_table = kcalloc(nr_clks, sizeof(struct clk *), GFP_KERNEL);
+       if (!clk_table)
+               pr_err("%s: could not allocate clock lookup table\n", __func__);
+
+       clk_data.clks = clk_table;
+       clk_data.clk_num = nr_clks;
+       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
+}
+
+struct regmap *rockchip_clk_get_grf(void)
+{
+       if (IS_ERR(grf))
+               grf = syscon_regmap_lookup_by_phandle(cru_node, "rockchip,grf");
+       return grf;
+}
+
+void rockchip_clk_add_lookup(struct clk *clk, unsigned int id)
+{
+       if (clk_table && id)
+               clk_table[id] = clk;
+}
+
+void __init rockchip_clk_register_plls(struct rockchip_pll_clock *list,
+                               unsigned int nr_pll, int grf_lock_offset)
+{
+       struct clk *clk;
+       int idx;
+
+       for (idx = 0; idx < nr_pll; idx++, list++) {
+               clk = rockchip_clk_register_pll(list->type, list->name,
+                               list->parent_names, list->num_parents,
+                               reg_base, list->con_offset, grf_lock_offset,
+                               list->lock_shift, list->mode_offset,
+                               list->mode_shift, list->rate_table, &clk_lock);
+               if (IS_ERR(clk)) {
+                       pr_err("%s: failed to register clock %s\n", __func__,
+                               list->name);
+                       continue;
+               }
+
+               rockchip_clk_add_lookup(clk, list->id);
+       }
+}
+
+void __init rockchip_clk_register_branches(
+                                     struct rockchip_clk_branch *list,
+                                     unsigned int nr_clk)
+{
+       struct clk *clk = NULL;
+       unsigned int idx;
+       unsigned long flags;
+
+       for (idx = 0; idx < nr_clk; idx++, list++) {
+               flags = list->flags;
+
+               /* catch simple muxes */
+               switch (list->branch_type) {
+               case branch_mux:
+                       clk = clk_register_mux(NULL, list->name,
+                               list->parent_names, list->num_parents,
+                               flags, reg_base + list->muxdiv_offset,
+                               list->mux_shift, list->mux_width,
+                               list->mux_flags, &clk_lock);
+                       break;
+               case branch_divider:
+                       if (list->div_table)
+                               clk = clk_register_divider_table(NULL,
+                                       list->name, list->parent_names[0],
+                                       flags, reg_base + list->muxdiv_offset,
+                                       list->div_shift, list->div_width,
+                                       list->div_flags, list->div_table,
+                                       &clk_lock);
+                       else
+                               clk = clk_register_divider(NULL, list->name,
+                                       list->parent_names[0], flags,
+                                       reg_base + list->muxdiv_offset,
+                                       list->div_shift, list->div_width,
+                                       list->div_flags, &clk_lock);
+                       break;
+               case branch_fraction_divider:
+                       /* unimplemented */
+                       continue;
+                       break;
+               case branch_gate:
+                       flags |= CLK_SET_RATE_PARENT;
+
+                       /* keep all gates untouched for now */
+                       flags |= CLK_IGNORE_UNUSED;
+
+                       clk = clk_register_gate(NULL, list->name,
+                               list->parent_names[0], flags,
+                               reg_base + list->gate_offset,
+                               list->gate_shift, list->gate_flags, &clk_lock);
+                       break;
+               case branch_composite:
+                       /* keep all gates untouched for now */
+                       flags |= CLK_IGNORE_UNUSED;
+
+                       clk = rockchip_clk_register_branch(list->name,
+                               list->parent_names, list->num_parents,
+                               reg_base, list->muxdiv_offset, list->mux_shift,
+                               list->mux_width, list->mux_flags,
+                               list->div_shift, list->div_width,
+                               list->div_flags, list->div_table,
+                               list->gate_offset, list->gate_shift,
+                               list->gate_flags, flags, &clk_lock);
+                       break;
+               }
+
+               /* none of the cases above matched */
+               if (!clk) {
+                       pr_err("%s: unknown clock type %d\n",
+                              __func__, list->branch_type);
+                       continue;
+               }
+
+               if (IS_ERR(clk)) {
+                       pr_err("%s: failed to register clock %s: %ld\n",
+                              __func__, list->name, PTR_ERR(clk));
+                       continue;
+               }
+
+               rockchip_clk_add_lookup(clk, list->id);
+       }
+}
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
new file mode 100644 (file)
index 0000000..887cbde
--- /dev/null
@@ -0,0 +1,347 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.de>
+ *
+ * based on
+ *
+ * samsung/clk.h
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2013 Linaro Ltd.
+ * Author: Thomas Abraham <thomas.ab@samsung.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 CLK_ROCKCHIP_CLK_H
+#define CLK_ROCKCHIP_CLK_H
+
+#include <linux/io.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+
+#define HIWORD_UPDATE(val, mask, shift) \
+               ((val) << (shift) | (mask) << ((shift) + 16))
+
+/* register positions shared by RK2928, RK3066 and RK3188 */
+#define RK2928_PLL_CON(x)              (x * 0x4)
+#define RK2928_MODE_CON                0x40
+#define RK2928_CLKSEL_CON(x)   (x * 0x4 + 0x44)
+#define RK2928_CLKGATE_CON(x)  (x * 0x4 + 0xd0)
+#define RK2928_GLB_SRST_FST            0x100
+#define RK2928_GLB_SRST_SND            0x104
+#define RK2928_SOFTRST_CON(x)  (x * 0x4 + 0x110)
+#define RK2928_MISC_CON                0x134
+
+#define RK3288_PLL_CON(x)              RK2928_PLL_CON(x)
+#define RK3288_MODE_CON                        0x50
+#define RK3288_CLKSEL_CON(x)           (x * 0x4 + 0x60)
+#define RK3288_CLKGATE_CON(x)          (x * 0x4 + 0x160)
+#define RK3288_GLB_SRST_FST            0x1b0
+#define RK3288_GLB_SRST_SND            0x1b4
+#define RK3288_SOFTRST_CON(x)          (x * 0x4 + 0x1b8)
+#define RK3288_MISC_CON                        0x1e8
+
+enum rockchip_pll_type {
+       pll_rk3066,
+};
+
+#define RK3066_PLL_RATE(_rate, _nr, _nf, _no)  \
+{                                              \
+       .rate   = _rate##U,                     \
+       .nr = _nr,                              \
+       .nf = _nf,                              \
+       .no = _no,                              \
+       .bwadj = (_nf >> 1),                    \
+}
+
+struct rockchip_pll_rate_table {
+       unsigned long rate;
+       unsigned int nr;
+       unsigned int nf;
+       unsigned int no;
+       unsigned int bwadj;
+};
+
+/**
+ * struct rockchip_pll_clock: information about pll clock
+ * @id: platform specific id of the clock.
+ * @name: name of this pll clock.
+ * @parent_name: name of the parent clock.
+ * @flags: optional flags for basic clock.
+ * @con_offset: offset of the register for configuring the PLL.
+ * @mode_offset: offset of the register for configuring the PLL-mode.
+ * @mode_shift: offset inside the mode-register for the mode of this pll.
+ * @lock_shift: offset inside the lock register for the lock status.
+ * @type: Type of PLL to be registered.
+ * @rate_table: Table of usable pll rates
+ */
+struct rockchip_pll_clock {
+       unsigned int            id;
+       const char              *name;
+       const char              **parent_names;
+       u8                      num_parents;
+       unsigned long           flags;
+       int                     con_offset;
+       int                     mode_offset;
+       int                     mode_shift;
+       int                     lock_shift;
+       enum rockchip_pll_type  type;
+       struct rockchip_pll_rate_table *rate_table;
+};
+
+#define PLL(_type, _id, _name, _pnames, _flags, _con, _mode, _mshift,  \
+               _lshift, _rtable)                                       \
+       {                                                               \
+               .id             = _id,                                  \
+               .type           = _type,                                \
+               .name           = _name,                                \
+               .parent_names   = _pnames,                              \
+               .num_parents    = ARRAY_SIZE(_pnames),                  \
+               .flags          = CLK_GET_RATE_NOCACHE | _flags,        \
+               .con_offset     = _con,                                 \
+               .mode_offset    = _mode,                                \
+               .mode_shift     = _mshift,                              \
+               .lock_shift     = _lshift,                              \
+               .rate_table     = _rtable,                              \
+       }
+
+struct clk *rockchip_clk_register_pll(enum rockchip_pll_type pll_type,
+               const char *name, const char **parent_names, u8 num_parents,
+               void __iomem *base, int con_offset, int grf_lock_offset,
+               int lock_shift, int reg_mode, int mode_shift,
+               struct rockchip_pll_rate_table *rate_table,
+               spinlock_t *lock);
+
+#define PNAME(x) static const char *x[] __initconst
+
+enum rockchip_clk_branch_type {
+       branch_composite,
+       branch_mux,
+       branch_divider,
+       branch_fraction_divider,
+       branch_gate,
+};
+
+struct rockchip_clk_branch {
+       unsigned int                    id;
+       enum rockchip_clk_branch_type   branch_type;
+       const char                      *name;
+       const char                      **parent_names;
+       u8                              num_parents;
+       unsigned long                   flags;
+       int                             muxdiv_offset;
+       u8                              mux_shift;
+       u8                              mux_width;
+       u8                              mux_flags;
+       u8                              div_shift;
+       u8                              div_width;
+       u8                              div_flags;
+       struct clk_div_table            *div_table;
+       int                             gate_offset;
+       u8                              gate_shift;
+       u8                              gate_flags;
+};
+
+#define COMPOSITE(_id, cname, pnames, f, mo, ms, mw, mf, ds, dw,\
+                 df, go, gs, gf)                               \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_composite,             \
+               .name           = cname,                        \
+               .parent_names   = pnames,                       \
+               .num_parents    = ARRAY_SIZE(pnames),           \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .mux_shift      = ms,                           \
+               .mux_width      = mw,                           \
+               .mux_flags      = mf,                           \
+               .div_shift      = ds,                           \
+               .div_width      = dw,                           \
+               .div_flags      = df,                           \
+               .gate_offset    = go,                           \
+               .gate_shift     = gs,                           \
+               .gate_flags     = gf,                           \
+       }
+
+#define COMPOSITE_NOMUX(_id, cname, pname, f, mo, ds, dw, df,  \
+                       go, gs, gf)                             \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_composite,             \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .div_shift      = ds,                           \
+               .div_width      = dw,                           \
+               .div_flags      = df,                           \
+               .gate_offset    = go,                           \
+               .gate_shift     = gs,                           \
+               .gate_flags     = gf,                           \
+       }
+
+#define COMPOSITE_NOMUX_DIVTBL(_id, cname, pname, f, mo, ds, dw,\
+                              df, dt, go, gs, gf)              \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_composite,             \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .div_shift      = ds,                           \
+               .div_width      = dw,                           \
+               .div_flags      = df,                           \
+               .div_table      = dt,                           \
+               .gate_offset    = go,                           \
+               .gate_shift     = gs,                           \
+               .gate_flags     = gf,                           \
+       }
+
+#define COMPOSITE_NODIV(_id, cname, pnames, f, mo, ms, mw, mf, \
+                       go, gs, gf)                             \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_composite,             \
+               .name           = cname,                        \
+               .parent_names   = pnames,                       \
+               .num_parents    = ARRAY_SIZE(pnames),           \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .mux_shift      = ms,                           \
+               .mux_width      = mw,                           \
+               .mux_flags      = mf,                           \
+               .gate_offset    = go,                           \
+               .gate_shift     = gs,                           \
+               .gate_flags     = gf,                           \
+       }
+
+#define COMPOSITE_NOGATE(_id, cname, pnames, f, mo, ms, mw, mf,        \
+                        ds, dw, df)                            \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_composite,             \
+               .name           = cname,                        \
+               .parent_names   = pnames,                       \
+               .num_parents    = ARRAY_SIZE(pnames),           \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .mux_shift      = ms,                           \
+               .mux_width      = mw,                           \
+               .mux_flags      = mf,                           \
+               .div_shift      = ds,                           \
+               .div_width      = dw,                           \
+               .div_flags      = df,                           \
+               .gate_offset    = -1,                           \
+       }
+
+#define COMPOSITE_FRAC(_id, cname, pname, f, mo, df, go, gs, gf)\
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_fraction_divider,      \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .div_shift      = 16,                           \
+               .div_width      = 16,                           \
+               .div_flags      = df,                           \
+               .gate_offset    = go,                           \
+               .gate_shift     = gs,                           \
+               .gate_flags     = gf,                           \
+       }
+
+#define MUX(_id, cname, pnames, f, o, s, w, mf)                        \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_mux,                   \
+               .name           = cname,                        \
+               .parent_names   = pnames,                       \
+               .num_parents    = ARRAY_SIZE(pnames),           \
+               .flags          = f,                            \
+               .muxdiv_offset  = o,                            \
+               .mux_shift      = s,                            \
+               .mux_width      = w,                            \
+               .mux_flags      = mf,                           \
+               .gate_offset    = -1,                           \
+       }
+
+#define DIV(_id, cname, pname, f, o, s, w, df)                 \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_divider,               \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = o,                            \
+               .div_shift      = s,                            \
+               .div_width      = w,                            \
+               .div_flags      = df,                           \
+               .gate_offset    = -1,                           \
+       }
+
+#define DIVTBL(_id, cname, pname, f, o, s, w, df, dt)          \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_divider,               \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = o,                            \
+               .div_shift      = s,                            \
+               .div_width      = w,                            \
+               .div_flags      = df,                           \
+               .div_table      = dt,                           \
+       }
+
+#define GATE(_id, cname, pname, f, o, b, gf)                   \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_gate,                  \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .gate_offset    = o,                            \
+               .gate_shift     = b,                            \
+               .gate_flags     = gf,                           \
+       }
+
+
+void rockchip_clk_init(struct device_node *np, void __iomem *base,
+                      unsigned long nr_clks);
+struct regmap *rockchip_clk_get_grf(void);
+void rockchip_clk_add_lookup(struct clk *clk, unsigned int id);
+void rockchip_clk_register_branches(struct rockchip_clk_branch *clk_list,
+                                   unsigned int nr_clk);
+void rockchip_clk_register_plls(struct rockchip_pll_clock *pll_list,
+                               unsigned int nr_pll, int grf_lock_offset);
+
+#define ROCKCHIP_SOFTRST_HIWORD_MASK   BIT(0)
+
+#ifdef CONFIG_RESET_CONTROLLER
+void rockchip_register_softrst(struct device_node *np,
+                              unsigned int num_regs,
+                              void __iomem *base, u8 flags);
+#else
+static inline void rockchip_register_softrst(struct device_node *np,
+                              unsigned int num_regs,
+                              void __iomem *base, u8 flags)
+{
+}
+#endif
+
+#endif
diff --git a/drivers/clk/rockchip/softrst.c b/drivers/clk/rockchip/softrst.c
new file mode 100644 (file)
index 0000000..552f7bb
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <linux/slab.h>
+#include <linux/io.h>
+#include <linux/reset-controller.h>
+#include <linux/spinlock.h>
+#include "clk.h"
+
+struct rockchip_softrst {
+       struct reset_controller_dev     rcdev;
+       void __iomem                    *reg_base;
+       int                             num_regs;
+       int                             num_per_reg;
+       u8                              flags;
+       spinlock_t                      lock;
+};
+
+static int rockchip_softrst_assert(struct reset_controller_dev *rcdev,
+                             unsigned long id)
+{
+       struct rockchip_softrst *softrst = container_of(rcdev,
+                                                    struct rockchip_softrst,
+                                                    rcdev);
+       int bank = id / softrst->num_per_reg;
+       int offset = id % softrst->num_per_reg;
+
+       if (softrst->flags & ROCKCHIP_SOFTRST_HIWORD_MASK) {
+               writel(BIT(offset) | (BIT(offset) << 16),
+                      softrst->reg_base + (bank * 4));
+       } else {
+               unsigned long flags;
+               u32 reg;
+
+               spin_lock_irqsave(&softrst->lock, flags);
+
+               reg = readl(softrst->reg_base + (bank * 4));
+               writel(reg | BIT(offset), softrst->reg_base + (bank * 4));
+
+               spin_unlock_irqrestore(&softrst->lock, flags);
+       }
+
+       return 0;
+}
+
+static int rockchip_softrst_deassert(struct reset_controller_dev *rcdev,
+                               unsigned long id)
+{
+       struct rockchip_softrst *softrst = container_of(rcdev,
+                                                    struct rockchip_softrst,
+                                                    rcdev);
+       int bank = id / softrst->num_per_reg;
+       int offset = id % softrst->num_per_reg;
+
+       if (softrst->flags & ROCKCHIP_SOFTRST_HIWORD_MASK) {
+               writel((BIT(offset) << 16), softrst->reg_base + (bank * 4));
+       } else {
+               unsigned long flags;
+               u32 reg;
+
+               spin_lock_irqsave(&softrst->lock, flags);
+
+               reg = readl(softrst->reg_base + (bank * 4));
+               writel(reg & ~BIT(offset), softrst->reg_base + (bank * 4));
+
+               spin_unlock_irqrestore(&softrst->lock, flags);
+       }
+
+       return 0;
+}
+
+static struct reset_control_ops rockchip_softrst_ops = {
+       .assert         = rockchip_softrst_assert,
+       .deassert       = rockchip_softrst_deassert,
+};
+
+void __init rockchip_register_softrst(struct device_node *np,
+                                     unsigned int num_regs,
+                                     void __iomem *base, u8 flags)
+{
+       struct rockchip_softrst *softrst;
+       int ret;
+
+       softrst = kzalloc(sizeof(*softrst), GFP_KERNEL);
+       if (!softrst)
+               return;
+
+       spin_lock_init(&softrst->lock);
+
+       softrst->reg_base = base;
+       softrst->flags = flags;
+       softrst->num_regs = num_regs;
+       softrst->num_per_reg = (flags & ROCKCHIP_SOFTRST_HIWORD_MASK) ? 16
+                                                                     : 32;
+
+       softrst->rcdev.owner = THIS_MODULE;
+       softrst->rcdev.nr_resets =  num_regs * softrst->num_per_reg;
+       softrst->rcdev.ops = &rockchip_softrst_ops;
+       softrst->rcdev.of_node = np;
+       ret = reset_controller_register(&softrst->rcdev);
+       if (ret) {
+               pr_err("%s: could not register reset controller, %d\n",
+                      __func__, ret);
+               kfree(softrst);
+       }
+};
index 5070153..0aa8830 100644 (file)
@@ -20,7 +20,8 @@
 #include <linux/io.h>
 #include <linux/delay.h>
 #include <linux/err.h>
-#include <linux/tegra-soc.h>
+
+#include <soc/tegra/fuse.h>
 
 #include "clk.h"
 
index 8b10c38..5679ffd 100644 (file)
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/clk/tegra.h>
-#include <linux/tegra-powergate.h>
+
+#include <soc/tegra/powergate.h>
+
 #include <dt-bindings/clock/tegra30-car.h>
+
 #include "clk.h"
 #include "clk-id.h"
 
index c0a7d77..f4503ba 100644 (file)
@@ -19,7 +19,8 @@
 #include <linux/of.h>
 #include <linux/clk/tegra.h>
 #include <linux/reset-controller.h>
-#include <linux/tegra-soc.h>
+
+#include <soc/tegra/fuse.h>
 
 #include "clk.h"
 
index 30f5ba9..6997485 100644 (file)
@@ -12,7 +12,8 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
-#include <linux/tegra-powergate.h>
+
+#include <soc/tegra/powergate.h>
 
 #include "drm.h"
 #include "gem.h"
index 27c979b..eafd0b8 100644 (file)
@@ -11,7 +11,8 @@
 #include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
-#include <linux/tegra-powergate.h>
+
+#include <soc/tegra/powergate.h>
 
 #include <drm/drm_dp_helper.h>
 
index 605b5b4..230d06c 100644 (file)
@@ -35,7 +35,8 @@
 #include <linux/of_iommu.h>
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
-#include <linux/tegra-ahb.h>
+
+#include <soc/tegra/ahb.h>
 
 #include <asm/page.h>
 #include <asm/cacheflush.h>
index 3d15d16..85c2985 100644 (file)
 #include <linux/of_irq.h>
 #include <linux/slab.h>
 #include <linux/irqchip/arm-gic.h>
+#include <linux/irqchip/irq-crossbar.h>
 
 #define IRQ_FREE       -1
+#define IRQ_RESERVED   -2
+#define IRQ_SKIP       -3
 #define GIC_IRQ_START  32
 
-/*
+/**
+ * struct crossbar_device - crossbar device description
  * @int_max: maximum number of supported interrupts
+ * @safe_map: safe default value to initialize the crossbar
+ * @max_crossbar_sources: Maximum number of crossbar sources
  * @irq_map: array of interrupts to crossbar number mapping
  * @crossbar_base: crossbar base address
  * @register_offsets: offsets for each irq number
+ * @write: register write function pointer
  */
 struct crossbar_device {
        uint int_max;
+       uint safe_map;
+       uint max_crossbar_sources;
        uint *irq_map;
        void __iomem *crossbar_base;
        int *register_offsets;
-       void (*write) (int, int);
+       void (*write)(int, int);
 };
 
 static struct crossbar_device *cb;
@@ -50,11 +59,22 @@ static inline void crossbar_writeb(int irq_no, int cb_no)
        writeb(cb_no, cb->crossbar_base + cb->register_offsets[irq_no]);
 }
 
+static inline int get_prev_map_irq(int cb_no)
+{
+       int i;
+
+       for (i = cb->int_max - 1; i >= 0; i--)
+               if (cb->irq_map[i] == cb_no)
+                       return i;
+
+       return -ENODEV;
+}
+
 static inline int allocate_free_irq(int cb_no)
 {
        int i;
 
-       for (i = 0; i < cb->int_max; i++) {
+       for (i = cb->int_max - 1; i >= 0; i--) {
                if (cb->irq_map[i] == IRQ_FREE) {
                        cb->irq_map[i] = cb_no;
                        return i;
@@ -64,19 +84,47 @@ static inline int allocate_free_irq(int cb_no)
        return -ENODEV;
 }
 
+static inline bool needs_crossbar_write(irq_hw_number_t hw)
+{
+       int cb_no;
+
+       if (hw > GIC_IRQ_START) {
+               cb_no = cb->irq_map[hw - GIC_IRQ_START];
+               if (cb_no != IRQ_RESERVED && cb_no != IRQ_SKIP)
+                       return true;
+       }
+
+       return false;
+}
+
 static int crossbar_domain_map(struct irq_domain *d, unsigned int irq,
                               irq_hw_number_t hw)
 {
-       cb->write(hw - GIC_IRQ_START, cb->irq_map[hw - GIC_IRQ_START]);
+       if (needs_crossbar_write(hw))
+               cb->write(hw - GIC_IRQ_START, cb->irq_map[hw - GIC_IRQ_START]);
+
        return 0;
 }
 
+/**
+ * crossbar_domain_unmap - unmap a crossbar<->irq connection
+ * @d: domain of irq to unmap
+ * @irq: virq number
+ *
+ * We do not maintain a use count of total number of map/unmap
+ * calls for a particular irq to find out if a irq can be really
+ * unmapped. This is because unmap is called during irq_dispose_mapping(irq),
+ * after which irq is anyways unusable. So an explicit map has to be called
+ * after that.
+ */
 static void crossbar_domain_unmap(struct irq_domain *d, unsigned int irq)
 {
        irq_hw_number_t hw = irq_get_irq_data(irq)->hwirq;
 
-       if (hw > GIC_IRQ_START)
+       if (needs_crossbar_write(hw)) {
                cb->irq_map[hw - GIC_IRQ_START] = IRQ_FREE;
+               cb->write(hw - GIC_IRQ_START, cb->safe_map);
+       }
 }
 
 static int crossbar_domain_xlate(struct irq_domain *d,
@@ -85,18 +133,41 @@ static int crossbar_domain_xlate(struct irq_domain *d,
                                 unsigned long *out_hwirq,
                                 unsigned int *out_type)
 {
-       unsigned long ret;
+       int ret;
+       int req_num = intspec[1];
+       int direct_map_num;
+
+       if (req_num >= cb->max_crossbar_sources) {
+               direct_map_num = req_num - cb->max_crossbar_sources;
+               if (direct_map_num < cb->int_max) {
+                       ret = cb->irq_map[direct_map_num];
+                       if (ret == IRQ_RESERVED || ret == IRQ_SKIP) {
+                               /* We use the interrupt num as h/w irq num */
+                               ret = direct_map_num;
+                               goto found;
+                       }
+               }
+
+               pr_err("%s: requested crossbar number %d > max %d\n",
+                      __func__, req_num, cb->max_crossbar_sources);
+               return -EINVAL;
+       }
 
-       ret = allocate_free_irq(intspec[1]);
+       ret = get_prev_map_irq(req_num);
+       if (ret >= 0)
+               goto found;
 
-       if (IS_ERR_VALUE(ret))
+       ret = allocate_free_irq(req_num);
+
+       if (ret < 0)
                return ret;
 
+found:
        *out_hwirq = ret + GIC_IRQ_START;
        return 0;
 }
 
-const struct irq_domain_ops routable_irq_domain_ops = {
+static const struct irq_domain_ops routable_irq_domain_ops = {
        .map = crossbar_domain_map,
        .unmap = crossbar_domain_unmap,
        .xlate = crossbar_domain_xlate
@@ -104,22 +175,36 @@ const struct irq_domain_ops routable_irq_domain_ops = {
 
 static int __init crossbar_of_init(struct device_node *node)
 {
-       int i, size, max, reserved = 0, entry;
+       int i, size, max = 0, reserved = 0, entry;
        const __be32 *irqsr;
+       int ret = -ENOMEM;
 
        cb = kzalloc(sizeof(*cb), GFP_KERNEL);
 
        if (!cb)
-               return -ENOMEM;
+               return ret;
 
        cb->crossbar_base = of_iomap(node, 0);
        if (!cb->crossbar_base)
-               goto err1;
+               goto err_cb;
+
+       of_property_read_u32(node, "ti,max-crossbar-sources",
+                            &cb->max_crossbar_sources);
+       if (!cb->max_crossbar_sources) {
+               pr_err("missing 'ti,max-crossbar-sources' property\n");
+               ret = -EINVAL;
+               goto err_base;
+       }
 
        of_property_read_u32(node, "ti,max-irqs", &max);
-       cb->irq_map = kzalloc(max * sizeof(int), GFP_KERNEL);
+       if (!max) {
+               pr_err("missing 'ti,max-irqs' property\n");
+               ret = -EINVAL;
+               goto err_base;
+       }
+       cb->irq_map = kcalloc(max, sizeof(int), GFP_KERNEL);
        if (!cb->irq_map)
-               goto err2;
+               goto err_base;
 
        cb->int_max = max;
 
@@ -137,15 +222,35 @@ static int __init crossbar_of_init(struct device_node *node)
                                                   i, &entry);
                        if (entry > max) {
                                pr_err("Invalid reserved entry\n");
-                               goto err3;
+                               ret = -EINVAL;
+                               goto err_irq_map;
+                       }
+                       cb->irq_map[entry] = IRQ_RESERVED;
+               }
+       }
+
+       /* Skip irqs hardwired to bypass the crossbar */
+       irqsr = of_get_property(node, "ti,irqs-skip", &size);
+       if (irqsr) {
+               size /= sizeof(__be32);
+
+               for (i = 0; i < size; i++) {
+                       of_property_read_u32_index(node,
+                                                  "ti,irqs-skip",
+                                                  i, &entry);
+                       if (entry > max) {
+                               pr_err("Invalid skip entry\n");
+                               ret = -EINVAL;
+                               goto err_irq_map;
                        }
-                       cb->irq_map[entry] = 0;
+                       cb->irq_map[entry] = IRQ_SKIP;
                }
        }
 
-       cb->register_offsets = kzalloc(max * sizeof(int), GFP_KERNEL);
+
+       cb->register_offsets = kcalloc(max, sizeof(int), GFP_KERNEL);
        if (!cb->register_offsets)
-               goto err3;
+               goto err_irq_map;
 
        of_property_read_u32(node, "ti,reg-size", &size);
 
@@ -161,7 +266,8 @@ static int __init crossbar_of_init(struct device_node *node)
                break;
        default:
                pr_err("Invalid reg-size property\n");
-               goto err4;
+               ret = -EINVAL;
+               goto err_reg_offset;
                break;
        }
 
@@ -170,25 +276,37 @@ static int __init crossbar_of_init(struct device_node *node)
         * reserved irqs. so find and store the offsets once.
         */
        for (i = 0; i < max; i++) {
-               if (!cb->irq_map[i])
+               if (cb->irq_map[i] == IRQ_RESERVED)
                        continue;
 
                cb->register_offsets[i] = reserved;
                reserved += size;
        }
 
+       of_property_read_u32(node, "ti,irqs-safe-map", &cb->safe_map);
+       /* Initialize the crossbar with safe map to start with */
+       for (i = 0; i < max; i++) {
+               if (cb->irq_map[i] == IRQ_RESERVED ||
+                   cb->irq_map[i] == IRQ_SKIP)
+                       continue;
+
+               cb->write(i, cb->safe_map);
+       }
+
        register_routable_domain_ops(&routable_irq_domain_ops);
        return 0;
 
-err4:
+err_reg_offset:
        kfree(cb->register_offsets);
-err3:
+err_irq_map:
        kfree(cb->irq_map);
-err2:
+err_base:
        iounmap(cb->crossbar_base);
-err1:
+err_cb:
        kfree(cb);
-       return -ENOMEM;
+
+       cb = NULL;
+       return ret;
 }
 
 static const struct of_device_id crossbar_match[] __initconst = {
diff --git a/drivers/misc/fuse/Makefile b/drivers/misc/fuse/Makefile
new file mode 100644 (file)
index 0000000..0679c4f
--- /dev/null
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_TEGRA)       += tegra/
index 083cf37..a2f0f88 100644 (file)
 #include <linux/reset.h>
 #include <linux/sizes.h>
 #include <linux/slab.h>
-#include <linux/tegra-cpuidle.h>
-#include <linux/tegra-powergate.h>
 #include <linux/vmalloc.h>
 #include <linux/regulator/consumer.h>
 
+#include <soc/tegra/cpuidle.h>
+#include <soc/tegra/powergate.h>
+
 #include <asm/mach/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/pci.h>
index 0042ccb..0fa42be 100644 (file)
@@ -328,6 +328,12 @@ config PINCTRL_TEGRA124
        bool
        select PINCTRL_TEGRA
 
+config PINCTRL_TEGRA_XUSB
+       def_bool y if ARCH_TEGRA
+       select GENERIC_PHY
+       select PINCONF
+       select PINMUX
+
 config PINCTRL_TZ1090
        bool "Toumaz Xenif TZ1090 pin control driver"
        depends on SOC_TZ1090
index c4b5d40..df88788 100644 (file)
@@ -55,6 +55,7 @@ obj-$(CONFIG_PINCTRL_TEGRA20) += pinctrl-tegra20.o
 obj-$(CONFIG_PINCTRL_TEGRA30)  += pinctrl-tegra30.o
 obj-$(CONFIG_PINCTRL_TEGRA114) += pinctrl-tegra114.o
 obj-$(CONFIG_PINCTRL_TEGRA124) += pinctrl-tegra124.o
+obj-$(CONFIG_PINCTRL_TEGRA_XUSB)       += pinctrl-tegra-xusb.o
 obj-$(CONFIG_PINCTRL_TZ1090)   += pinctrl-tz1090.o
 obj-$(CONFIG_PINCTRL_TZ1090_PDC)       += pinctrl-tz1090-pdc.o
 obj-$(CONFIG_PINCTRL_U300)     += pinctrl-u300.o
diff --git a/drivers/pinctrl/pinctrl-tegra-xusb.c b/drivers/pinctrl/pinctrl-tegra-xusb.c
new file mode 100644 (file)
index 0000000..4a7daf5
--- /dev/null
@@ -0,0 +1,973 @@
+/*
+ * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/phy/phy.h>
+#include <linux/pinctrl/pinctrl.h>
+#include <linux/pinctrl/pinmux.h>
+#include <linux/platform_device.h>
+#include <linux/reset.h>
+
+#include <dt-bindings/pinctrl/pinctrl-tegra-xusb.h>
+
+#include "core.h"
+#include "pinctrl-utils.h"
+
+#define XUSB_PADCTL_ELPG_PROGRAM 0x01c
+#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN (1 << 26)
+#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY (1 << 25)
+#define XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN (1 << 24)
+
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1 0x040
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL0_LOCKDET (1 << 19)
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_REFCLK_SEL_MASK (0xf << 12)
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST (1 << 1)
+
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2 0x044
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_REFCLKBUF_EN (1 << 6)
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_EN (1 << 5)
+#define XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_SEL (1 << 4)
+
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1 0x138
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET (1 << 27)
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE (1 << 24)
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD (1 << 3)
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST (1 << 1)
+#define XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ (1 << 0)
+
+#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1 0x148
+#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD (1 << 1)
+#define XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ (1 << 0)
+
+struct tegra_xusb_padctl_function {
+       const char *name;
+       const char * const *groups;
+       unsigned int num_groups;
+};
+
+struct tegra_xusb_padctl_group {
+       const unsigned int *funcs;
+       unsigned int num_funcs;
+};
+
+struct tegra_xusb_padctl_soc {
+       const struct pinctrl_pin_desc *pins;
+       unsigned int num_pins;
+
+       const struct tegra_xusb_padctl_function *functions;
+       unsigned int num_functions;
+
+       const struct tegra_xusb_padctl_lane *lanes;
+       unsigned int num_lanes;
+};
+
+struct tegra_xusb_padctl_lane {
+       const char *name;
+
+       unsigned int offset;
+       unsigned int shift;
+       unsigned int mask;
+       unsigned int iddq;
+
+       const unsigned int *funcs;
+       unsigned int num_funcs;
+};
+
+struct tegra_xusb_padctl {
+       struct device *dev;
+       void __iomem *regs;
+       struct mutex lock;
+       struct reset_control *rst;
+
+       const struct tegra_xusb_padctl_soc *soc;
+       struct pinctrl_dev *pinctrl;
+       struct pinctrl_desc desc;
+
+       struct phy_provider *provider;
+       struct phy *phys[2];
+
+       unsigned int enable;
+};
+
+static inline void padctl_writel(struct tegra_xusb_padctl *padctl, u32 value,
+                                unsigned long offset)
+{
+       writel(value, padctl->regs + offset);
+}
+
+static inline u32 padctl_readl(struct tegra_xusb_padctl *padctl,
+                              unsigned long offset)
+{
+       return readl(padctl->regs + offset);
+}
+
+static int tegra_xusb_padctl_get_groups_count(struct pinctrl_dev *pinctrl)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+
+       return padctl->soc->num_pins;
+}
+
+static const char *tegra_xusb_padctl_get_group_name(struct pinctrl_dev *pinctrl,
+                                                   unsigned int group)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+
+       return padctl->soc->pins[group].name;
+}
+
+enum tegra_xusb_padctl_param {
+       TEGRA_XUSB_PADCTL_IDDQ,
+};
+
+static const struct tegra_xusb_padctl_property {
+       const char *name;
+       enum tegra_xusb_padctl_param param;
+} properties[] = {
+       { "nvidia,iddq", TEGRA_XUSB_PADCTL_IDDQ },
+};
+
+#define TEGRA_XUSB_PADCTL_PACK(param, value) ((param) << 16 | (value))
+#define TEGRA_XUSB_PADCTL_UNPACK_PARAM(config) ((config) >> 16)
+#define TEGRA_XUSB_PADCTL_UNPACK_VALUE(config) ((config) & 0xffff)
+
+static int tegra_xusb_padctl_parse_subnode(struct tegra_xusb_padctl *padctl,
+                                          struct device_node *np,
+                                          struct pinctrl_map **maps,
+                                          unsigned int *reserved_maps,
+                                          unsigned int *num_maps)
+{
+       unsigned int i, reserve = 0, num_configs = 0;
+       unsigned long config, *configs = NULL;
+       const char *function, *group;
+       struct property *prop;
+       int err = 0;
+       u32 value;
+
+       err = of_property_read_string(np, "nvidia,function", &function);
+       if (err < 0) {
+               if (err != -EINVAL)
+                       return err;
+
+               function = NULL;
+       }
+
+       for (i = 0; i < ARRAY_SIZE(properties); i++) {
+               err = of_property_read_u32(np, properties[i].name, &value);
+               if (err < 0) {
+                       if (err == -EINVAL)
+                               continue;
+
+                       return err;
+               }
+
+               config = TEGRA_XUSB_PADCTL_PACK(properties[i].param, value);
+
+               err = pinctrl_utils_add_config(padctl->pinctrl, &configs,
+                                              &num_configs, config);
+               if (err < 0)
+                       return err;
+       }
+
+       if (function)
+               reserve++;
+
+       if (num_configs)
+               reserve++;
+
+       err = of_property_count_strings(np, "nvidia,lanes");
+       if (err < 0)
+               return err;
+
+       reserve *= err;
+
+       err = pinctrl_utils_reserve_map(padctl->pinctrl, maps, reserved_maps,
+                                       num_maps, reserve);
+       if (err < 0)
+               return err;
+
+       of_property_for_each_string(np, "nvidia,lanes", prop, group) {
+               if (function) {
+                       err = pinctrl_utils_add_map_mux(padctl->pinctrl, maps,
+                                       reserved_maps, num_maps, group,
+                                       function);
+                       if (err < 0)
+                               return err;
+               }
+
+               if (num_configs) {
+                       err = pinctrl_utils_add_map_configs(padctl->pinctrl,
+                                       maps, reserved_maps, num_maps, group,
+                                       configs, num_configs,
+                                       PIN_MAP_TYPE_CONFIGS_GROUP);
+                       if (err < 0)
+                               return err;
+               }
+       }
+
+       return 0;
+}
+
+static int tegra_xusb_padctl_dt_node_to_map(struct pinctrl_dev *pinctrl,
+                                           struct device_node *parent,
+                                           struct pinctrl_map **maps,
+                                           unsigned int *num_maps)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+       unsigned int reserved_maps = 0;
+       struct device_node *np;
+       int err;
+
+       *num_maps = 0;
+       *maps = NULL;
+
+       for_each_child_of_node(parent, np) {
+               err = tegra_xusb_padctl_parse_subnode(padctl, np, maps,
+                                                     &reserved_maps,
+                                                     num_maps);
+               if (err < 0)
+                       return err;
+       }
+
+       return 0;
+}
+
+static const struct pinctrl_ops tegra_xusb_padctl_pinctrl_ops = {
+       .get_groups_count = tegra_xusb_padctl_get_groups_count,
+       .get_group_name = tegra_xusb_padctl_get_group_name,
+       .dt_node_to_map = tegra_xusb_padctl_dt_node_to_map,
+       .dt_free_map = pinctrl_utils_dt_free_map,
+};
+
+static int tegra_xusb_padctl_get_functions_count(struct pinctrl_dev *pinctrl)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+
+       return padctl->soc->num_functions;
+}
+
+static const char *
+tegra_xusb_padctl_get_function_name(struct pinctrl_dev *pinctrl,
+                                   unsigned int function)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+
+       return padctl->soc->functions[function].name;
+}
+
+static int tegra_xusb_padctl_get_function_groups(struct pinctrl_dev *pinctrl,
+                                                unsigned int function,
+                                                const char * const **groups,
+                                                unsigned * const num_groups)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+
+       *num_groups = padctl->soc->functions[function].num_groups;
+       *groups = padctl->soc->functions[function].groups;
+
+       return 0;
+}
+
+static int tegra_xusb_padctl_pinmux_enable(struct pinctrl_dev *pinctrl,
+                                          unsigned int function,
+                                          unsigned int group)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+       const struct tegra_xusb_padctl_lane *lane;
+       unsigned int i;
+       u32 value;
+
+       lane = &padctl->soc->lanes[group];
+
+       for (i = 0; i < lane->num_funcs; i++)
+               if (lane->funcs[i] == function)
+                       break;
+
+       if (i >= lane->num_funcs)
+               return -EINVAL;
+
+       value = padctl_readl(padctl, lane->offset);
+       value &= ~(lane->mask << lane->shift);
+       value |= i << lane->shift;
+       padctl_writel(padctl, value, lane->offset);
+
+       return 0;
+}
+
+static const struct pinmux_ops tegra_xusb_padctl_pinmux_ops = {
+       .get_functions_count = tegra_xusb_padctl_get_functions_count,
+       .get_function_name = tegra_xusb_padctl_get_function_name,
+       .get_function_groups = tegra_xusb_padctl_get_function_groups,
+       .enable = tegra_xusb_padctl_pinmux_enable,
+};
+
+static int tegra_xusb_padctl_pinconf_group_get(struct pinctrl_dev *pinctrl,
+                                              unsigned int group,
+                                              unsigned long *config)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+       const struct tegra_xusb_padctl_lane *lane;
+       enum tegra_xusb_padctl_param param;
+       u32 value;
+
+       param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(*config);
+       lane = &padctl->soc->lanes[group];
+
+       switch (param) {
+       case TEGRA_XUSB_PADCTL_IDDQ:
+               /* lanes with iddq == 0 don't support this parameter */
+               if (lane->iddq == 0)
+                       return -EINVAL;
+
+               value = padctl_readl(padctl, lane->offset);
+
+               if (value & BIT(lane->iddq))
+                       value = 0;
+               else
+                       value = 1;
+
+               *config = TEGRA_XUSB_PADCTL_PACK(param, value);
+               break;
+
+       default:
+               dev_err(padctl->dev, "invalid configuration parameter: %04x\n",
+                       param);
+               return -ENOTSUPP;
+       }
+
+       return 0;
+}
+
+static int tegra_xusb_padctl_pinconf_group_set(struct pinctrl_dev *pinctrl,
+                                              unsigned int group,
+                                              unsigned long *configs,
+                                              unsigned int num_configs)
+{
+       struct tegra_xusb_padctl *padctl = pinctrl_dev_get_drvdata(pinctrl);
+       const struct tegra_xusb_padctl_lane *lane;
+       enum tegra_xusb_padctl_param param;
+       unsigned long value;
+       unsigned int i;
+       u32 regval;
+
+       lane = &padctl->soc->lanes[group];
+
+       for (i = 0; i < num_configs; i++) {
+               param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(configs[i]);
+               value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(configs[i]);
+
+               switch (param) {
+               case TEGRA_XUSB_PADCTL_IDDQ:
+                       /* lanes with iddq == 0 don't support this parameter */
+                       if (lane->iddq == 0)
+                               return -EINVAL;
+
+                       regval = padctl_readl(padctl, lane->offset);
+
+                       if (value)
+                               regval &= ~BIT(lane->iddq);
+                       else
+                               regval |= BIT(lane->iddq);
+
+                       padctl_writel(padctl, regval, lane->offset);
+                       break;
+
+               default:
+                       dev_err(padctl->dev,
+                               "invalid configuration parameter: %04x\n",
+                               param);
+                       return -ENOTSUPP;
+               }
+       }
+
+       return 0;
+}
+
+#ifdef CONFIG_DEBUG_FS
+static const char *strip_prefix(const char *s)
+{
+       const char *comma = strchr(s, ',');
+       if (!comma)
+               return s;
+
+       return comma + 1;
+}
+
+static void
+tegra_xusb_padctl_pinconf_group_dbg_show(struct pinctrl_dev *pinctrl,
+                                        struct seq_file *s,
+                                        unsigned int group)
+{
+       unsigned int i;
+
+       for (i = 0; i < ARRAY_SIZE(properties); i++) {
+               unsigned long config, value;
+               int err;
+
+               config = TEGRA_XUSB_PADCTL_PACK(properties[i].param, 0);
+
+               err = tegra_xusb_padctl_pinconf_group_get(pinctrl, group,
+                                                         &config);
+               if (err < 0)
+                       continue;
+
+               value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(config);
+
+               seq_printf(s, "\n\t%s=%lu\n", strip_prefix(properties[i].name),
+                          value);
+       }
+}
+
+static void
+tegra_xusb_padctl_pinconf_config_dbg_show(struct pinctrl_dev *pinctrl,
+                                         struct seq_file *s,
+                                         unsigned long config)
+{
+       enum tegra_xusb_padctl_param param;
+       const char *name = "unknown";
+       unsigned long value;
+       unsigned int i;
+
+       param = TEGRA_XUSB_PADCTL_UNPACK_PARAM(config);
+       value = TEGRA_XUSB_PADCTL_UNPACK_VALUE(config);
+
+       for (i = 0; i < ARRAY_SIZE(properties); i++) {
+               if (properties[i].param == param) {
+                       name = properties[i].name;
+                       break;
+               }
+       }
+
+       seq_printf(s, "%s=%lu", strip_prefix(name), value);
+}
+#endif
+
+static const struct pinconf_ops tegra_xusb_padctl_pinconf_ops = {
+       .pin_config_group_get = tegra_xusb_padctl_pinconf_group_get,
+       .pin_config_group_set = tegra_xusb_padctl_pinconf_group_set,
+#ifdef CONFIG_DEBUG_FS
+       .pin_config_group_dbg_show = tegra_xusb_padctl_pinconf_group_dbg_show,
+       .pin_config_config_dbg_show = tegra_xusb_padctl_pinconf_config_dbg_show,
+#endif
+};
+
+static int tegra_xusb_padctl_enable(struct tegra_xusb_padctl *padctl)
+{
+       u32 value;
+
+       mutex_lock(&padctl->lock);
+
+       if (padctl->enable++ > 0)
+               goto out;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+       usleep_range(100, 200);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+       usleep_range(100, 200);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value &= ~XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+out:
+       mutex_unlock(&padctl->lock);
+       return 0;
+}
+
+static int tegra_xusb_padctl_disable(struct tegra_xusb_padctl *padctl)
+{
+       u32 value;
+
+       mutex_lock(&padctl->lock);
+
+       if (WARN_ON(padctl->enable == 0))
+               goto out;
+
+       if (--padctl->enable > 0)
+               goto out;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_VCORE_DOWN;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+       usleep_range(100, 200);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN_EARLY;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+       usleep_range(100, 200);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_ELPG_PROGRAM);
+       value |= XUSB_PADCTL_ELPG_PROGRAM_AUX_MUX_LP0_CLAMP_EN;
+       padctl_writel(padctl, value, XUSB_PADCTL_ELPG_PROGRAM);
+
+out:
+       mutex_unlock(&padctl->lock);
+       return 0;
+}
+
+static int tegra_xusb_phy_init(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+
+       return tegra_xusb_padctl_enable(padctl);
+}
+
+static int tegra_xusb_phy_exit(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+
+       return tegra_xusb_padctl_disable(padctl);
+}
+
+static int pcie_phy_power_on(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+       unsigned long timeout;
+       int err = -ETIMEDOUT;
+       u32 value;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_PLL_P0_CTL1_REFCLK_SEL_MASK;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL2);
+       value |= XUSB_PADCTL_IOPHY_PLL_P0_CTL2_REFCLKBUF_EN |
+                XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_EN |
+                XUSB_PADCTL_IOPHY_PLL_P0_CTL2_TXCLKREF_SEL;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL2);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+       value |= XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+
+       timeout = jiffies + msecs_to_jiffies(50);
+
+       while (time_before(jiffies, timeout)) {
+               value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+               if (value & XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL0_LOCKDET) {
+                       err = 0;
+                       break;
+               }
+
+               usleep_range(100, 200);
+       }
+
+       return err;
+}
+
+static int pcie_phy_power_off(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+       u32 value;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_PLL_P0_CTL1_PLL_RST;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_P0_CTL1);
+
+       return 0;
+}
+
+static const struct phy_ops pcie_phy_ops = {
+       .init = tegra_xusb_phy_init,
+       .exit = tegra_xusb_phy_exit,
+       .power_on = pcie_phy_power_on,
+       .power_off = pcie_phy_power_off,
+       .owner = THIS_MODULE,
+};
+
+static int sata_phy_power_on(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+       unsigned long timeout;
+       int err = -ETIMEDOUT;
+       u32 value;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD;
+       value &= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD;
+       value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       timeout = jiffies + msecs_to_jiffies(50);
+
+       while (time_before(jiffies, timeout)) {
+               value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+               if (value & XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_LOCKDET) {
+                       err = 0;
+                       break;
+               }
+
+               usleep_range(100, 200);
+       }
+
+       return err;
+}
+
+static int sata_phy_power_off(struct phy *phy)
+{
+       struct tegra_xusb_padctl *padctl = phy_get_drvdata(phy);
+       u32 value;
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_RST;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value &= ~XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL1_MODE;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+       value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_PWR_OVRD;
+       value |= XUSB_PADCTL_IOPHY_PLL_S0_CTL1_PLL_IDDQ;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_PLL_S0_CTL1);
+
+       value = padctl_readl(padctl, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
+       value |= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ_OVRD;
+       value |= ~XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1_IDDQ;
+       padctl_writel(padctl, value, XUSB_PADCTL_IOPHY_MISC_PAD_S0_CTL1);
+
+       return 0;
+}
+
+static const struct phy_ops sata_phy_ops = {
+       .init = tegra_xusb_phy_init,
+       .exit = tegra_xusb_phy_exit,
+       .power_on = sata_phy_power_on,
+       .power_off = sata_phy_power_off,
+       .owner = THIS_MODULE,
+};
+
+static struct phy *tegra_xusb_padctl_xlate(struct device *dev,
+                                          struct of_phandle_args *args)
+{
+       struct tegra_xusb_padctl *padctl = dev_get_drvdata(dev);
+       unsigned int index = args->args[0];
+
+       if (args->args_count <= 0)
+               return ERR_PTR(-EINVAL);
+
+       if (index > ARRAY_SIZE(padctl->phys))
+               return ERR_PTR(-EINVAL);
+
+       return padctl->phys[index];
+}
+
+#define PIN_OTG_0   0
+#define PIN_OTG_1   1
+#define PIN_OTG_2   2
+#define PIN_ULPI_0  3
+#define PIN_HSIC_0  4
+#define PIN_HSIC_1  5
+#define PIN_PCIE_0  6
+#define PIN_PCIE_1  7
+#define PIN_PCIE_2  8
+#define PIN_PCIE_3  9
+#define PIN_PCIE_4 10
+#define PIN_SATA_0 11
+
+static const struct pinctrl_pin_desc tegra124_pins[] = {
+       PINCTRL_PIN(PIN_OTG_0,  "otg-0"),
+       PINCTRL_PIN(PIN_OTG_1,  "otg-1"),
+       PINCTRL_PIN(PIN_OTG_2,  "otg-2"),
+       PINCTRL_PIN(PIN_ULPI_0, "ulpi-0"),
+       PINCTRL_PIN(PIN_HSIC_0, "hsic-0"),
+       PINCTRL_PIN(PIN_HSIC_1, "hsic-1"),
+       PINCTRL_PIN(PIN_PCIE_0, "pcie-0"),
+       PINCTRL_PIN(PIN_PCIE_1, "pcie-1"),
+       PINCTRL_PIN(PIN_PCIE_2, "pcie-2"),
+       PINCTRL_PIN(PIN_PCIE_3, "pcie-3"),
+       PINCTRL_PIN(PIN_PCIE_4, "pcie-4"),
+       PINCTRL_PIN(PIN_SATA_0, "sata-0"),
+};
+
+static const char * const tegra124_snps_groups[] = {
+       "otg-0",
+       "otg-1",
+       "otg-2",
+       "ulpi-0",
+       "hsic-0",
+       "hsic-1",
+};
+
+static const char * const tegra124_xusb_groups[] = {
+       "otg-0",
+       "otg-1",
+       "otg-2",
+       "ulpi-0",
+       "hsic-0",
+       "hsic-1",
+};
+
+static const char * const tegra124_uart_groups[] = {
+       "otg-0",
+       "otg-1",
+       "otg-2",
+};
+
+static const char * const tegra124_pcie_groups[] = {
+       "pcie-0",
+       "pcie-1",
+       "pcie-2",
+       "pcie-3",
+       "pcie-4",
+       "sata-0",
+};
+
+static const char * const tegra124_usb3_groups[] = {
+       "pcie-0",
+       "pcie-1",
+       "pcie-2",
+       "pcie-3",
+       "pcie-4",
+       "sata-0",
+};
+
+static const char * const tegra124_sata_groups[] = {
+       "pcie-0",
+       "pcie-1",
+       "pcie-2",
+       "pcie-3",
+       "pcie-4",
+       "sata-0",
+};
+
+static const char * const tegra124_rsvd_groups[] = {
+       "otg-0",
+       "otg-1",
+       "otg-2",
+       "pcie-0",
+       "pcie-1",
+       "pcie-2",
+       "pcie-3",
+       "pcie-4",
+       "sata-0",
+};
+
+#define TEGRA124_FUNCTION(_name)                                       \
+       {                                                               \
+               .name = #_name,                                         \
+               .num_groups = ARRAY_SIZE(tegra124_##_name##_groups),    \
+               .groups = tegra124_##_name##_groups,                    \
+       }
+
+static struct tegra_xusb_padctl_function tegra124_functions[] = {
+       TEGRA124_FUNCTION(snps),
+       TEGRA124_FUNCTION(xusb),
+       TEGRA124_FUNCTION(uart),
+       TEGRA124_FUNCTION(pcie),
+       TEGRA124_FUNCTION(usb3),
+       TEGRA124_FUNCTION(sata),
+       TEGRA124_FUNCTION(rsvd),
+};
+
+enum tegra124_function {
+       TEGRA124_FUNC_SNPS,
+       TEGRA124_FUNC_XUSB,
+       TEGRA124_FUNC_UART,
+       TEGRA124_FUNC_PCIE,
+       TEGRA124_FUNC_USB3,
+       TEGRA124_FUNC_SATA,
+       TEGRA124_FUNC_RSVD,
+};
+
+static const unsigned int tegra124_otg_functions[] = {
+       TEGRA124_FUNC_SNPS,
+       TEGRA124_FUNC_XUSB,
+       TEGRA124_FUNC_UART,
+       TEGRA124_FUNC_RSVD,
+};
+
+static const unsigned int tegra124_usb_functions[] = {
+       TEGRA124_FUNC_SNPS,
+       TEGRA124_FUNC_XUSB,
+};
+
+static const unsigned int tegra124_pci_functions[] = {
+       TEGRA124_FUNC_PCIE,
+       TEGRA124_FUNC_USB3,
+       TEGRA124_FUNC_SATA,
+       TEGRA124_FUNC_RSVD,
+};
+
+#define TEGRA124_LANE(_name, _offset, _shift, _mask, _iddq, _funcs)    \
+       {                                                               \
+               .name = _name,                                          \
+               .offset = _offset,                                      \
+               .shift = _shift,                                        \
+               .mask = _mask,                                          \
+               .iddq = _iddq,                                          \
+               .num_funcs = ARRAY_SIZE(tegra124_##_funcs##_functions), \
+               .funcs = tegra124_##_funcs##_functions,                 \
+       }
+
+static const struct tegra_xusb_padctl_lane tegra124_lanes[] = {
+       TEGRA124_LANE("otg-0",  0x004,  0, 0x3, 0, otg),
+       TEGRA124_LANE("otg-1",  0x004,  2, 0x3, 0, otg),
+       TEGRA124_LANE("otg-2",  0x004,  4, 0x3, 0, otg),
+       TEGRA124_LANE("ulpi-0", 0x004, 12, 0x1, 0, usb),
+       TEGRA124_LANE("hsic-0", 0x004, 14, 0x1, 0, usb),
+       TEGRA124_LANE("hsic-1", 0x004, 15, 0x1, 0, usb),
+       TEGRA124_LANE("pcie-0", 0x134, 16, 0x3, 1, pci),
+       TEGRA124_LANE("pcie-1", 0x134, 18, 0x3, 2, pci),
+       TEGRA124_LANE("pcie-2", 0x134, 20, 0x3, 3, pci),
+       TEGRA124_LANE("pcie-3", 0x134, 22, 0x3, 4, pci),
+       TEGRA124_LANE("pcie-4", 0x134, 24, 0x3, 5, pci),
+       TEGRA124_LANE("sata-0", 0x134, 26, 0x3, 6, pci),
+};
+
+static const struct tegra_xusb_padctl_soc tegra124_soc = {
+       .num_pins = ARRAY_SIZE(tegra124_pins),
+       .pins = tegra124_pins,
+       .num_functions = ARRAY_SIZE(tegra124_functions),
+       .functions = tegra124_functions,
+       .num_lanes = ARRAY_SIZE(tegra124_lanes),
+       .lanes = tegra124_lanes,
+};
+
+static const struct of_device_id tegra_xusb_padctl_of_match[] = {
+       { .compatible = "nvidia,tegra124-xusb-padctl", .data = &tegra124_soc },
+       { }
+};
+MODULE_DEVICE_TABLE(of, tegra_xusb_padctl_of_match);
+
+static int tegra_xusb_padctl_probe(struct platform_device *pdev)
+{
+       struct tegra_xusb_padctl *padctl;
+       const struct of_device_id *match;
+       struct resource *res;
+       struct phy *phy;
+       int err;
+
+       padctl = devm_kzalloc(&pdev->dev, sizeof(*padctl), GFP_KERNEL);
+       if (!padctl)
+               return -ENOMEM;
+
+       platform_set_drvdata(pdev, padctl);
+       mutex_init(&padctl->lock);
+       padctl->dev = &pdev->dev;
+
+       match = of_match_node(tegra_xusb_padctl_of_match, pdev->dev.of_node);
+       padctl->soc = match->data;
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       padctl->regs = devm_ioremap_resource(&pdev->dev, res);
+       if (IS_ERR(padctl->regs))
+               return PTR_ERR(padctl->regs);
+
+       padctl->rst = devm_reset_control_get(&pdev->dev, NULL);
+       if (IS_ERR(padctl->rst))
+               return PTR_ERR(padctl->rst);
+
+       err = reset_control_deassert(padctl->rst);
+       if (err < 0)
+               return err;
+
+       memset(&padctl->desc, 0, sizeof(padctl->desc));
+       padctl->desc.name = dev_name(padctl->dev);
+       padctl->desc.pctlops = &tegra_xusb_padctl_pinctrl_ops;
+       padctl->desc.pmxops = &tegra_xusb_padctl_pinmux_ops;
+       padctl->desc.confops = &tegra_xusb_padctl_pinconf_ops;
+       padctl->desc.owner = THIS_MODULE;
+
+       padctl->pinctrl = pinctrl_register(&padctl->desc, &pdev->dev, padctl);
+       if (!padctl->pinctrl) {
+               dev_err(&pdev->dev, "failed to register pincontrol\n");
+               err = -ENODEV;
+               goto reset;
+       }
+
+       phy = devm_phy_create(&pdev->dev, &pcie_phy_ops, NULL);
+       if (IS_ERR(phy)) {
+               err = PTR_ERR(phy);
+               goto unregister;
+       }
+
+       padctl->phys[TEGRA_XUSB_PADCTL_PCIE] = phy;
+       phy_set_drvdata(phy, padctl);
+
+       phy = devm_phy_create(&pdev->dev, &sata_phy_ops, NULL);
+       if (IS_ERR(phy)) {
+               err = PTR_ERR(phy);
+               goto unregister;
+       }
+
+       padctl->phys[TEGRA_XUSB_PADCTL_SATA] = phy;
+       phy_set_drvdata(phy, padctl);
+
+       padctl->provider = devm_of_phy_provider_register(&pdev->dev,
+                                                        tegra_xusb_padctl_xlate);
+       if (err < 0) {
+               dev_err(&pdev->dev, "failed to register PHYs: %d\n", err);
+               goto unregister;
+       }
+
+       return 0;
+
+unregister:
+       pinctrl_unregister(padctl->pinctrl);
+reset:
+       reset_control_assert(padctl->rst);
+       return err;
+}
+
+static int tegra_xusb_padctl_remove(struct platform_device *pdev)
+{
+       struct tegra_xusb_padctl *padctl = platform_get_drvdata(pdev);
+       int err;
+
+       pinctrl_unregister(padctl->pinctrl);
+
+       err = reset_control_assert(padctl->rst);
+       if (err < 0)
+               dev_err(&pdev->dev, "failed to assert reset: %d\n", err);
+
+       return err;
+}
+
+static struct platform_driver tegra_xusb_padctl_driver = {
+       .driver = {
+               .name = "tegra-xusb-padctl",
+               .of_match_table = tegra_xusb_padctl_of_match,
+       },
+       .probe = tegra_xusb_padctl_probe,
+       .remove = tegra_xusb_padctl_remove,
+};
+module_platform_driver(tegra_xusb_padctl_driver);
+
+MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
+MODULE_DESCRIPTION("Tegra 124 XUSB Pad Control driver");
+MODULE_LICENSE("GPL v2");
index 0f7c447..3b1b95d 100644 (file)
@@ -3,3 +3,4 @@
 #
 
 obj-$(CONFIG_ARCH_QCOM)                += qcom/
+obj-$(CONFIG_ARCH_TEGRA)       += tegra/
diff --git a/drivers/soc/tegra/Makefile b/drivers/soc/tegra/Makefile
new file mode 100644 (file)
index 0000000..236600f
--- /dev/null
@@ -0,0 +1 @@
+obj-$(CONFIG_ARCH_TEGRA) += fuse/
diff --git a/drivers/soc/tegra/fuse/Makefile b/drivers/soc/tegra/fuse/Makefile
new file mode 100644 (file)
index 0000000..3af357d
--- /dev/null
@@ -0,0 +1,8 @@
+obj-y                                  += fuse-tegra.o
+obj-y                                  += fuse-tegra30.o
+obj-y                                  += tegra-apbmisc.o
+obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += fuse-tegra20.o
+obj-$(CONFIG_ARCH_TEGRA_2x_SOC)                += speedo-tegra20.o
+obj-$(CONFIG_ARCH_TEGRA_3x_SOC)                += speedo-tegra30.o
+obj-$(CONFIG_ARCH_TEGRA_114_SOC)       += speedo-tegra114.o
+obj-$(CONFIG_ARCH_TEGRA_124_SOC)       += speedo-tegra124.o
diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
new file mode 100644 (file)
index 0000000..03742ed
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/device.h>
+#include <linux/kobject.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/io.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+static u32 (*fuse_readl)(const unsigned int offset);
+static int fuse_size;
+struct tegra_sku_info tegra_sku_info;
+
+static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
+       [TEGRA_REVISION_UNKNOWN] = "unknown",
+       [TEGRA_REVISION_A01]     = "A01",
+       [TEGRA_REVISION_A02]     = "A02",
+       [TEGRA_REVISION_A03]     = "A03",
+       [TEGRA_REVISION_A03p]    = "A03 prime",
+       [TEGRA_REVISION_A04]     = "A04",
+};
+
+static u8 fuse_readb(const unsigned int offset)
+{
+       u32 val;
+
+       val = fuse_readl(round_down(offset, 4));
+       val >>= (offset % 4) * 8;
+       val &= 0xff;
+
+       return val;
+}
+
+static ssize_t fuse_read(struct file *fd, struct kobject *kobj,
+                       struct bin_attribute *attr, char *buf,
+                       loff_t pos, size_t size)
+{
+       int i;
+
+       if (pos < 0 || pos >= fuse_size)
+               return 0;
+
+       if (size > fuse_size - pos)
+               size = fuse_size - pos;
+
+       for (i = 0; i < size; i++)
+               buf[i] = fuse_readb(pos + i);
+
+       return i;
+}
+
+static struct bin_attribute fuse_bin_attr = {
+       .attr = { .name = "fuse", .mode = S_IRUGO, },
+       .read = fuse_read,
+};
+
+static const struct of_device_id car_match[] __initconst = {
+       { .compatible = "nvidia,tegra20-car", },
+       { .compatible = "nvidia,tegra30-car", },
+       { .compatible = "nvidia,tegra114-car", },
+       { .compatible = "nvidia,tegra124-car", },
+       {},
+};
+
+static void tegra_enable_fuse_clk(void __iomem *base)
+{
+       u32 reg;
+
+       reg = readl_relaxed(base + 0x48);
+       reg |= 1 << 28;
+       writel(reg, base + 0x48);
+
+       /*
+        * Enable FUSE clock. This needs to be hardcoded because the clock
+        * subsystem is not active during early boot.
+        */
+       reg = readl(base + 0x14);
+       reg |= 1 << 7;
+       writel(reg, base + 0x14);
+}
+
+int tegra_fuse_readl(unsigned long offset, u32 *value)
+{
+       if (!fuse_readl)
+               return -EPROBE_DEFER;
+
+       *value = fuse_readl(offset);
+
+       return 0;
+}
+EXPORT_SYMBOL(tegra_fuse_readl);
+
+int tegra_fuse_create_sysfs(struct device *dev, int size,
+                    u32 (*readl)(const unsigned int offset))
+{
+       if (fuse_size)
+               return -ENODEV;
+
+       fuse_bin_attr.size = size;
+       fuse_bin_attr.read = fuse_read;
+
+       fuse_size = size;
+       fuse_readl = readl;
+
+       return device_create_bin_file(dev, &fuse_bin_attr);
+}
+
+void __init tegra_init_fuse(void)
+{
+       struct device_node *np;
+       void __iomem *car_base;
+
+       tegra_init_apbmisc();
+
+       np = of_find_matching_node(NULL, car_match);
+       car_base = of_iomap(np, 0);
+       if (car_base) {
+               tegra_enable_fuse_clk(car_base);
+               iounmap(car_base);
+       } else {
+               pr_err("Could not enable fuse clk. ioremap tegra car failed.\n");
+               return;
+       }
+
+       if (tegra_get_chip_id() == TEGRA20)
+               tegra20_init_fuse_early();
+       else
+               tegra30_init_fuse_early();
+
+       pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n",
+               tegra_revision_name[tegra_sku_info.revision],
+               tegra_sku_info.sku_id, tegra_sku_info.cpu_process_id,
+               tegra_sku_info.core_process_id);
+       pr_debug("Tegra CPU Speedo ID %d, Soc Speedo ID %d\n",
+               tegra_sku_info.cpu_speedo_id, tegra_sku_info.soc_speedo_id);
+}
diff --git a/drivers/soc/tegra/fuse/fuse-tegra20.c b/drivers/soc/tegra/fuse/fuse-tegra20.c
new file mode 100644 (file)
index 0000000..7cb63ab
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Based on drivers/misc/eeprom/sunxi_sid.c
+ */
+
+#include <linux/device.h>
+#include <linux/clk.h>
+#include <linux/completion.h>
+#include <linux/dmaengine.h>
+#include <linux/dma-mapping.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/kobject.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/random.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define FUSE_BEGIN     0x100
+#define FUSE_SIZE      0x1f8
+#define FUSE_UID_LOW   0x08
+#define FUSE_UID_HIGH  0x0c
+
+static phys_addr_t fuse_phys;
+static struct clk *fuse_clk;
+static void __iomem __initdata *fuse_base;
+
+static DEFINE_MUTEX(apb_dma_lock);
+static DECLARE_COMPLETION(apb_dma_wait);
+static struct dma_chan *apb_dma_chan;
+static struct dma_slave_config dma_sconfig;
+static u32 *apb_buffer;
+static dma_addr_t apb_buffer_phys;
+
+static void apb_dma_complete(void *args)
+{
+       complete(&apb_dma_wait);
+}
+
+static u32 tegra20_fuse_readl(const unsigned int offset)
+{
+       int ret;
+       u32 val = 0;
+       struct dma_async_tx_descriptor *dma_desc;
+
+       mutex_lock(&apb_dma_lock);
+
+       dma_sconfig.src_addr = fuse_phys + FUSE_BEGIN + offset;
+       ret = dmaengine_slave_config(apb_dma_chan, &dma_sconfig);
+       if (ret)
+               goto out;
+
+       dma_desc = dmaengine_prep_slave_single(apb_dma_chan, apb_buffer_phys,
+                       sizeof(u32), DMA_DEV_TO_MEM,
+                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
+       if (!dma_desc)
+               goto out;
+
+       dma_desc->callback = apb_dma_complete;
+       dma_desc->callback_param = NULL;
+
+       reinit_completion(&apb_dma_wait);
+
+       clk_prepare_enable(fuse_clk);
+
+       dmaengine_submit(dma_desc);
+       dma_async_issue_pending(apb_dma_chan);
+       ret = wait_for_completion_timeout(&apb_dma_wait, msecs_to_jiffies(50));
+
+       if (WARN(ret == 0, "apb read dma timed out"))
+               dmaengine_terminate_all(apb_dma_chan);
+       else
+               val = *apb_buffer;
+
+       clk_disable_unprepare(fuse_clk);
+out:
+       mutex_unlock(&apb_dma_lock);
+
+       return val;
+}
+
+static const struct of_device_id tegra20_fuse_of_match[] = {
+       { .compatible = "nvidia,tegra20-efuse" },
+       {},
+};
+
+static int apb_dma_init(void)
+{
+       dma_cap_mask_t mask;
+
+       dma_cap_zero(mask);
+       dma_cap_set(DMA_SLAVE, mask);
+       apb_dma_chan = dma_request_channel(mask, NULL, NULL);
+       if (!apb_dma_chan)
+               return -EPROBE_DEFER;
+
+       apb_buffer = dma_alloc_coherent(NULL, sizeof(u32), &apb_buffer_phys,
+                                       GFP_KERNEL);
+       if (!apb_buffer) {
+               dma_release_channel(apb_dma_chan);
+               return -ENOMEM;
+       }
+
+       dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+       dma_sconfig.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+       dma_sconfig.src_maxburst = 1;
+       dma_sconfig.dst_maxburst = 1;
+
+       return 0;
+}
+
+static int tegra20_fuse_probe(struct platform_device *pdev)
+{
+       struct resource *res;
+       int err;
+
+       fuse_clk = devm_clk_get(&pdev->dev, NULL);
+       if (IS_ERR(fuse_clk)) {
+               dev_err(&pdev->dev, "missing clock");
+               return PTR_ERR(fuse_clk);
+       }
+
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res)
+               return -EINVAL;
+       fuse_phys = res->start;
+
+       err = apb_dma_init();
+       if (err)
+               return err;
+
+       if (tegra_fuse_create_sysfs(&pdev->dev, FUSE_SIZE, tegra20_fuse_readl))
+               return -ENODEV;
+
+       dev_dbg(&pdev->dev, "loaded\n");
+
+       return 0;
+}
+
+static struct platform_driver tegra20_fuse_driver = {
+       .probe = tegra20_fuse_probe,
+       .driver = {
+               .name = "tegra20_fuse",
+               .owner = THIS_MODULE,
+               .of_match_table = tegra20_fuse_of_match,
+       }
+};
+
+static int __init tegra20_fuse_init(void)
+{
+       return platform_driver_register(&tegra20_fuse_driver);
+}
+postcore_initcall(tegra20_fuse_init);
+
+/* Early boot code. This code is called before the devices are created */
+
+u32 __init tegra20_fuse_early(const unsigned int offset)
+{
+       return readl_relaxed(fuse_base + FUSE_BEGIN + offset);
+}
+
+bool __init tegra20_spare_fuse_early(int spare_bit)
+{
+       u32 offset = spare_bit * 4;
+       bool value;
+
+       value = tegra20_fuse_early(offset + 0x100);
+
+       return value;
+}
+
+static void __init tegra20_fuse_add_randomness(void)
+{
+       u32 randomness[7];
+
+       randomness[0] = tegra_sku_info.sku_id;
+       randomness[1] = tegra_read_straps();
+       randomness[2] = tegra_read_chipid();
+       randomness[3] = tegra_sku_info.cpu_process_id << 16;
+       randomness[3] |= tegra_sku_info.core_process_id;
+       randomness[4] = tegra_sku_info.cpu_speedo_id << 16;
+       randomness[4] |= tegra_sku_info.soc_speedo_id;
+       randomness[5] = tegra20_fuse_early(FUSE_UID_LOW);
+       randomness[6] = tegra20_fuse_early(FUSE_UID_HIGH);
+
+       add_device_randomness(randomness, sizeof(randomness));
+}
+
+void __init tegra20_init_fuse_early(void)
+{
+       fuse_base = ioremap(TEGRA_FUSE_BASE, TEGRA_FUSE_SIZE);
+
+       tegra_init_revision();
+       tegra20_init_speedo_data(&tegra_sku_info);
+       tegra20_fuse_add_randomness();
+
+       iounmap(fuse_base);
+}
diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c
new file mode 100644 (file)
index 0000000..5999cf3
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/device.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/of_device.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/random.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define FUSE_BEGIN     0x100
+
+/* Tegra30 and later */
+#define FUSE_VENDOR_CODE       0x100
+#define FUSE_FAB_CODE          0x104
+#define FUSE_LOT_CODE_0                0x108
+#define FUSE_LOT_CODE_1                0x10c
+#define FUSE_WAFER_ID          0x110
+#define FUSE_X_COORDINATE      0x114
+#define FUSE_Y_COORDINATE      0x118
+
+#define FUSE_HAS_REVISION_INFO BIT(0)
+
+enum speedo_idx {
+       SPEEDO_TEGRA30 = 0,
+       SPEEDO_TEGRA114,
+       SPEEDO_TEGRA124,
+};
+
+struct tegra_fuse_info {
+       int             size;
+       int             spare_bit;
+       enum speedo_idx speedo_idx;
+};
+
+static void __iomem *fuse_base;
+static struct clk *fuse_clk;
+static struct tegra_fuse_info *fuse_info;
+
+u32 tegra30_fuse_readl(const unsigned int offset)
+{
+       u32 val;
+
+       /*
+        * early in the boot, the fuse clock will be enabled by
+        * tegra_init_fuse()
+        */
+
+       if (fuse_clk)
+               clk_prepare_enable(fuse_clk);
+
+       val = readl_relaxed(fuse_base + FUSE_BEGIN + offset);
+
+       if (fuse_clk)
+               clk_disable_unprepare(fuse_clk);
+
+       return val;
+}
+
+static struct tegra_fuse_info tegra30_info = {
+       .size                   = 0x2a4,
+       .spare_bit              = 0x144,
+       .speedo_idx             = SPEEDO_TEGRA30,
+};
+
+static struct tegra_fuse_info tegra114_info = {
+       .size                   = 0x2a0,
+       .speedo_idx             = SPEEDO_TEGRA114,
+};
+
+static struct tegra_fuse_info tegra124_info = {
+       .size                   = 0x300,
+       .speedo_idx             = SPEEDO_TEGRA124,
+};
+
+static const struct of_device_id tegra30_fuse_of_match[] = {
+       { .compatible = "nvidia,tegra30-efuse", .data = &tegra30_info },
+       { .compatible = "nvidia,tegra114-efuse", .data = &tegra114_info },
+       { .compatible = "nvidia,tegra124-efuse", .data = &tegra124_info },
+       {},
+};
+
+static int tegra30_fuse_probe(struct platform_device *pdev)
+{
+       const struct of_device_id *of_dev_id;
+
+       of_dev_id = of_match_device(tegra30_fuse_of_match, &pdev->dev);
+       if (!of_dev_id)
+               return -ENODEV;
+
+       fuse_clk = devm_clk_get(&pdev->dev, NULL);
+       if (IS_ERR(fuse_clk)) {
+               dev_err(&pdev->dev, "missing clock");
+               return PTR_ERR(fuse_clk);
+       }
+
+       platform_set_drvdata(pdev, NULL);
+
+       if (tegra_fuse_create_sysfs(&pdev->dev, fuse_info->size,
+                                   tegra30_fuse_readl))
+               return -ENODEV;
+
+       dev_dbg(&pdev->dev, "loaded\n");
+
+       return 0;
+}
+
+static struct platform_driver tegra30_fuse_driver = {
+       .probe = tegra30_fuse_probe,
+       .driver = {
+               .name = "tegra_fuse",
+               .owner = THIS_MODULE,
+               .of_match_table = tegra30_fuse_of_match,
+       }
+};
+
+static int __init tegra30_fuse_init(void)
+{
+       return platform_driver_register(&tegra30_fuse_driver);
+}
+postcore_initcall(tegra30_fuse_init);
+
+/* Early boot code. This code is called before the devices are created */
+
+typedef void (*speedo_f)(struct tegra_sku_info *sku_info);
+
+static speedo_f __initdata speedo_tbl[] = {
+       [SPEEDO_TEGRA30]        = tegra30_init_speedo_data,
+       [SPEEDO_TEGRA114]       = tegra114_init_speedo_data,
+       [SPEEDO_TEGRA124]       = tegra124_init_speedo_data,
+};
+
+static void __init tegra30_fuse_add_randomness(void)
+{
+       u32 randomness[12];
+
+       randomness[0] = tegra_sku_info.sku_id;
+       randomness[1] = tegra_read_straps();
+       randomness[2] = tegra_read_chipid();
+       randomness[3] = tegra_sku_info.cpu_process_id << 16;
+       randomness[3] |= tegra_sku_info.core_process_id;
+       randomness[4] = tegra_sku_info.cpu_speedo_id << 16;
+       randomness[4] |= tegra_sku_info.soc_speedo_id;
+       randomness[5] = tegra30_fuse_readl(FUSE_VENDOR_CODE);
+       randomness[6] = tegra30_fuse_readl(FUSE_FAB_CODE);
+       randomness[7] = tegra30_fuse_readl(FUSE_LOT_CODE_0);
+       randomness[8] = tegra30_fuse_readl(FUSE_LOT_CODE_1);
+       randomness[9] = tegra30_fuse_readl(FUSE_WAFER_ID);
+       randomness[10] = tegra30_fuse_readl(FUSE_X_COORDINATE);
+       randomness[11] = tegra30_fuse_readl(FUSE_Y_COORDINATE);
+
+       add_device_randomness(randomness, sizeof(randomness));
+}
+
+static void __init legacy_fuse_init(void)
+{
+       switch (tegra_get_chip_id()) {
+       case TEGRA30:
+               fuse_info = &tegra30_info;
+               break;
+       case TEGRA114:
+               fuse_info = &tegra114_info;
+               break;
+       case TEGRA124:
+               fuse_info = &tegra124_info;
+               break;
+       default:
+               return;
+       }
+
+       fuse_base = ioremap(TEGRA_FUSE_BASE, TEGRA_FUSE_SIZE);
+}
+
+bool __init tegra30_spare_fuse(int spare_bit)
+{
+       u32 offset = fuse_info->spare_bit + spare_bit * 4;
+
+       return tegra30_fuse_readl(offset) & 1;
+}
+
+void __init tegra30_init_fuse_early(void)
+{
+       struct device_node *np;
+       const struct of_device_id *of_match;
+
+       np = of_find_matching_node_and_match(NULL, tegra30_fuse_of_match,
+                                               &of_match);
+       if (np) {
+               fuse_base = of_iomap(np, 0);
+               fuse_info = (struct tegra_fuse_info *)of_match->data;
+       } else
+               legacy_fuse_init();
+
+       if (!fuse_base) {
+               pr_warn("fuse DT node missing and unknown chip id: 0x%02x\n",
+                       tegra_get_chip_id());
+               return;
+       }
+
+       tegra_init_revision();
+       speedo_tbl[fuse_info->speedo_idx](&tegra_sku_info);
+       tegra30_fuse_add_randomness();
+}
diff --git a/drivers/soc/tegra/fuse/fuse.h b/drivers/soc/tegra/fuse/fuse.h
new file mode 100644 (file)
index 0000000..3a398bf
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 Google, Inc.
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * Author:
+ *     Colin Cross <ccross@android.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 __DRIVERS_MISC_TEGRA_FUSE_H
+#define __DRIVERS_MISC_TEGRA_FUSE_H
+
+#define TEGRA_FUSE_BASE        0x7000f800
+#define TEGRA_FUSE_SIZE        0x400
+
+int tegra_fuse_create_sysfs(struct device *dev, int size,
+                    u32 (*readl)(const unsigned int offset));
+
+bool tegra30_spare_fuse(int bit);
+u32 tegra30_fuse_readl(const unsigned int offset);
+void tegra30_init_fuse_early(void);
+void tegra_init_revision(void);
+void tegra_init_apbmisc(void);
+
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
+bool tegra20_spare_fuse_early(int spare_bit);
+void tegra20_init_fuse_early(void);
+u32 tegra20_fuse_early(const unsigned int offset);
+#else
+static inline void tegra20_init_speedo_data(struct tegra_sku_info *sku_info) {}
+static inline bool tegra20_spare_fuse_early(int spare_bit)
+{
+       return false;
+}
+static inline void tegra20_init_fuse_early(void) {}
+static inline u32 tegra20_fuse_early(const unsigned int offset)
+{
+       return 0;
+}
+#endif
+
+
+#ifdef CONFIG_ARCH_TEGRA_3x_SOC
+void tegra30_init_speedo_data(struct tegra_sku_info *sku_info);
+#else
+static inline void tegra30_init_speedo_data(struct tegra_sku_info *sku_info) {}
+#endif
+
+#ifdef CONFIG_ARCH_TEGRA_114_SOC
+void tegra114_init_speedo_data(struct tegra_sku_info *sku_info);
+#else
+static inline void tegra114_init_speedo_data(struct tegra_sku_info *sku_info) {}
+#endif
+
+#ifdef CONFIG_ARCH_TEGRA_124_SOC
+void tegra124_init_speedo_data(struct tegra_sku_info *sku_info);
+#else
+static inline void tegra124_init_speedo_data(struct tegra_sku_info *sku_info) {}
+#endif
+
+#endif
diff --git a/drivers/soc/tegra/fuse/speedo-tegra114.c b/drivers/soc/tegra/fuse/speedo-tegra114.c
new file mode 100644 (file)
index 0000000..2a6ca03
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/bug.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define CORE_PROCESS_CORNERS   2
+#define CPU_PROCESS_CORNERS    2
+
+enum {
+       THRESHOLD_INDEX_0,
+       THRESHOLD_INDEX_1,
+       THRESHOLD_INDEX_COUNT,
+};
+
+static const u32 __initconst core_process_speedos[][CORE_PROCESS_CORNERS] = {
+       {1123,     UINT_MAX},
+       {0,        UINT_MAX},
+};
+
+static const u32 __initconst cpu_process_speedos[][CPU_PROCESS_CORNERS] = {
+       {1695,     UINT_MAX},
+       {0,        UINT_MAX},
+};
+
+static void __init rev_sku_to_speedo_ids(struct tegra_sku_info *sku_info,
+                                        int *threshold)
+{
+       u32 tmp;
+       u32 sku = sku_info->sku_id;
+       enum tegra_revision rev = sku_info->revision;
+
+       switch (sku) {
+       case 0x00:
+       case 0x10:
+       case 0x05:
+       case 0x06:
+               sku_info->cpu_speedo_id = 1;
+               sku_info->soc_speedo_id = 0;
+               *threshold = THRESHOLD_INDEX_0;
+               break;
+
+       case 0x03:
+       case 0x04:
+               sku_info->cpu_speedo_id = 2;
+               sku_info->soc_speedo_id = 1;
+               *threshold = THRESHOLD_INDEX_1;
+               break;
+
+       default:
+               pr_err("Tegra Unknown SKU %d\n", sku);
+               sku_info->cpu_speedo_id = 0;
+               sku_info->soc_speedo_id = 0;
+               *threshold = THRESHOLD_INDEX_0;
+               break;
+       }
+
+       if (rev == TEGRA_REVISION_A01) {
+               tmp = tegra30_fuse_readl(0x270) << 1;
+               tmp |= tegra30_fuse_readl(0x26c);
+               if (!tmp)
+                       sku_info->cpu_speedo_id = 0;
+       }
+}
+
+void __init tegra114_init_speedo_data(struct tegra_sku_info *sku_info)
+{
+       u32 cpu_speedo_val;
+       u32 core_speedo_val;
+       int threshold;
+       int i;
+
+       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+
+       rev_sku_to_speedo_ids(sku_info, &threshold);
+
+       cpu_speedo_val = tegra30_fuse_readl(0x12c) + 1024;
+       core_speedo_val = tegra30_fuse_readl(0x134);
+
+       for (i = 0; i < CPU_PROCESS_CORNERS; i++)
+               if (cpu_speedo_val < cpu_process_speedos[threshold][i])
+                       break;
+       sku_info->cpu_process_id = i;
+
+       for (i = 0; i < CORE_PROCESS_CORNERS; i++)
+               if (core_speedo_val < core_process_speedos[threshold][i])
+                       break;
+       sku_info->core_process_id = i;
+}
diff --git a/drivers/soc/tegra/fuse/speedo-tegra124.c b/drivers/soc/tegra/fuse/speedo-tegra124.c
new file mode 100644 (file)
index 0000000..4636238
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/bug.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define CPU_PROCESS_CORNERS    2
+#define GPU_PROCESS_CORNERS    2
+#define CORE_PROCESS_CORNERS   2
+
+#define FUSE_CPU_SPEEDO_0      0x14
+#define FUSE_CPU_SPEEDO_1      0x2c
+#define FUSE_CPU_SPEEDO_2      0x30
+#define FUSE_SOC_SPEEDO_0      0x34
+#define FUSE_SOC_SPEEDO_1      0x38
+#define FUSE_SOC_SPEEDO_2      0x3c
+#define FUSE_CPU_IDDQ          0x18
+#define FUSE_SOC_IDDQ          0x40
+#define FUSE_GPU_IDDQ          0x128
+#define FUSE_FT_REV            0x28
+
+enum {
+       THRESHOLD_INDEX_0,
+       THRESHOLD_INDEX_1,
+       THRESHOLD_INDEX_COUNT,
+};
+
+static const u32 __initconst cpu_process_speedos[][CPU_PROCESS_CORNERS] = {
+       {2190,  UINT_MAX},
+       {0,     UINT_MAX},
+};
+
+static const u32 __initconst gpu_process_speedos[][GPU_PROCESS_CORNERS] = {
+       {1965,  UINT_MAX},
+       {0,     UINT_MAX},
+};
+
+static const u32 __initconst core_process_speedos[][CORE_PROCESS_CORNERS] = {
+       {2101,  UINT_MAX},
+       {0,     UINT_MAX},
+};
+
+static void __init rev_sku_to_speedo_ids(struct tegra_sku_info *sku_info,
+                                        int *threshold)
+{
+       int sku = sku_info->sku_id;
+
+       /* Assign to default */
+       sku_info->cpu_speedo_id = 0;
+       sku_info->soc_speedo_id = 0;
+       sku_info->gpu_speedo_id = 0;
+       *threshold = THRESHOLD_INDEX_0;
+
+       switch (sku) {
+       case 0x00: /* Eng sku */
+       case 0x0F:
+       case 0x23:
+               /* Using the default */
+               break;
+       case 0x83:
+               sku_info->cpu_speedo_id = 2;
+               break;
+
+       case 0x1F:
+       case 0x87:
+       case 0x27:
+               sku_info->cpu_speedo_id = 2;
+               sku_info->soc_speedo_id = 0;
+               sku_info->gpu_speedo_id = 1;
+               *threshold = THRESHOLD_INDEX_0;
+               break;
+       case 0x81:
+       case 0x21:
+       case 0x07:
+               sku_info->cpu_speedo_id = 1;
+               sku_info->soc_speedo_id = 1;
+               sku_info->gpu_speedo_id = 1;
+               *threshold = THRESHOLD_INDEX_1;
+               break;
+       case 0x49:
+       case 0x4A:
+       case 0x48:
+               sku_info->cpu_speedo_id = 4;
+               sku_info->soc_speedo_id = 2;
+               sku_info->gpu_speedo_id = 3;
+               *threshold = THRESHOLD_INDEX_1;
+               break;
+       default:
+               pr_err("Tegra Unknown SKU %d\n", sku);
+               /* Using the default for the error case */
+               break;
+       }
+}
+
+void __init tegra124_init_speedo_data(struct tegra_sku_info *sku_info)
+{
+       int i, threshold, cpu_speedo_0_value, soc_speedo_0_value;
+       int cpu_iddq_value, gpu_iddq_value, soc_iddq_value;
+
+       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+       BUILD_BUG_ON(ARRAY_SIZE(gpu_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+
+       cpu_speedo_0_value = tegra30_fuse_readl(FUSE_CPU_SPEEDO_0);
+
+       /* GPU Speedo is stored in CPU_SPEEDO_2 */
+       sku_info->gpu_speedo_value = tegra30_fuse_readl(FUSE_CPU_SPEEDO_2);
+
+       soc_speedo_0_value = tegra30_fuse_readl(FUSE_SOC_SPEEDO_0);
+
+       cpu_iddq_value = tegra30_fuse_readl(FUSE_CPU_IDDQ);
+       soc_iddq_value = tegra30_fuse_readl(FUSE_SOC_IDDQ);
+       gpu_iddq_value = tegra30_fuse_readl(FUSE_GPU_IDDQ);
+
+       sku_info->cpu_speedo_value = cpu_speedo_0_value;
+
+       if (sku_info->cpu_speedo_value == 0) {
+               pr_warn("Tegra Warning: Speedo value not fused.\n");
+               WARN_ON(1);
+               return;
+       }
+
+       rev_sku_to_speedo_ids(sku_info, &threshold);
+
+       sku_info->cpu_iddq_value = tegra30_fuse_readl(FUSE_CPU_IDDQ);
+
+       for (i = 0; i < GPU_PROCESS_CORNERS; i++)
+               if (sku_info->gpu_speedo_value <
+                       gpu_process_speedos[threshold][i])
+                       break;
+       sku_info->gpu_process_id = i;
+
+       for (i = 0; i < CPU_PROCESS_CORNERS; i++)
+               if (sku_info->cpu_speedo_value <
+                       cpu_process_speedos[threshold][i])
+                               break;
+       sku_info->cpu_process_id = i;
+
+       for (i = 0; i < CORE_PROCESS_CORNERS; i++)
+               if (soc_speedo_0_value <
+                       core_process_speedos[threshold][i])
+                       break;
+       sku_info->core_process_id = i;
+
+       pr_debug("Tegra GPU Speedo ID=%d, Speedo Value=%d\n",
+                sku_info->gpu_speedo_id, sku_info->gpu_speedo_value);
+}
diff --git a/drivers/soc/tegra/fuse/speedo-tegra20.c b/drivers/soc/tegra/fuse/speedo-tegra20.c
new file mode 100644 (file)
index 0000000..eff1b63
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/bug.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define CPU_SPEEDO_LSBIT               20
+#define CPU_SPEEDO_MSBIT               29
+#define CPU_SPEEDO_REDUND_LSBIT                30
+#define CPU_SPEEDO_REDUND_MSBIT                39
+#define CPU_SPEEDO_REDUND_OFFS (CPU_SPEEDO_REDUND_MSBIT - CPU_SPEEDO_MSBIT)
+
+#define CORE_SPEEDO_LSBIT              40
+#define CORE_SPEEDO_MSBIT              47
+#define CORE_SPEEDO_REDUND_LSBIT       48
+#define CORE_SPEEDO_REDUND_MSBIT       55
+#define CORE_SPEEDO_REDUND_OFFS        (CORE_SPEEDO_REDUND_MSBIT - CORE_SPEEDO_MSBIT)
+
+#define SPEEDO_MULT                    4
+
+#define PROCESS_CORNERS_NUM            4
+
+#define SPEEDO_ID_SELECT_0(rev)                ((rev) <= 2)
+#define SPEEDO_ID_SELECT_1(sku)                \
+       (((sku) != 20) && ((sku) != 23) && ((sku) != 24) && \
+        ((sku) != 27) && ((sku) != 28))
+
+enum {
+       SPEEDO_ID_0,
+       SPEEDO_ID_1,
+       SPEEDO_ID_2,
+       SPEEDO_ID_COUNT,
+};
+
+static const u32 __initconst cpu_process_speedos[][PROCESS_CORNERS_NUM] = {
+       {315, 366, 420, UINT_MAX},
+       {303, 368, 419, UINT_MAX},
+       {316, 331, 383, UINT_MAX},
+};
+
+static const u32 __initconst core_process_speedos[][PROCESS_CORNERS_NUM] = {
+       {165, 195, 224, UINT_MAX},
+       {165, 195, 224, UINT_MAX},
+       {165, 195, 224, UINT_MAX},
+};
+
+void __init tegra20_init_speedo_data(struct tegra_sku_info *sku_info)
+{
+       u32 reg;
+       u32 val;
+       int i;
+
+       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != SPEEDO_ID_COUNT);
+       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != SPEEDO_ID_COUNT);
+
+       if (SPEEDO_ID_SELECT_0(sku_info->revision))
+               sku_info->soc_speedo_id = SPEEDO_ID_0;
+       else if (SPEEDO_ID_SELECT_1(sku_info->sku_id))
+               sku_info->soc_speedo_id = SPEEDO_ID_1;
+       else
+               sku_info->soc_speedo_id = SPEEDO_ID_2;
+
+       val = 0;
+       for (i = CPU_SPEEDO_MSBIT; i >= CPU_SPEEDO_LSBIT; i--) {
+               reg = tegra20_spare_fuse_early(i) |
+                       tegra20_spare_fuse_early(i + CPU_SPEEDO_REDUND_OFFS);
+               val = (val << 1) | (reg & 0x1);
+       }
+       val = val * SPEEDO_MULT;
+       pr_debug("Tegra CPU speedo value %u\n", val);
+
+       for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) {
+               if (val <= cpu_process_speedos[sku_info->soc_speedo_id][i])
+                       break;
+       }
+       sku_info->cpu_process_id = i;
+
+       val = 0;
+       for (i = CORE_SPEEDO_MSBIT; i >= CORE_SPEEDO_LSBIT; i--) {
+               reg = tegra20_spare_fuse_early(i) |
+                       tegra20_spare_fuse_early(i + CORE_SPEEDO_REDUND_OFFS);
+               val = (val << 1) | (reg & 0x1);
+       }
+       val = val * SPEEDO_MULT;
+       pr_debug("Core speedo value %u\n", val);
+
+       for (i = 0; i < (PROCESS_CORNERS_NUM - 1); i++) {
+               if (val <= core_process_speedos[sku_info->soc_speedo_id][i])
+                       break;
+       }
+       sku_info->core_process_id = i;
+}
diff --git a/drivers/soc/tegra/fuse/speedo-tegra30.c b/drivers/soc/tegra/fuse/speedo-tegra30.c
new file mode 100644 (file)
index 0000000..b17f0dc
--- /dev/null
@@ -0,0 +1,288 @@
+/*
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/bug.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define CORE_PROCESS_CORNERS   1
+#define CPU_PROCESS_CORNERS    6
+
+#define FUSE_SPEEDO_CALIB_0    0x14
+#define FUSE_PACKAGE_INFO      0XFC
+#define FUSE_TEST_PROG_VER     0X28
+
+#define G_SPEEDO_BIT_MINUS1    58
+#define G_SPEEDO_BIT_MINUS1_R  59
+#define G_SPEEDO_BIT_MINUS2    60
+#define G_SPEEDO_BIT_MINUS2_R  61
+#define LP_SPEEDO_BIT_MINUS1   62
+#define LP_SPEEDO_BIT_MINUS1_R 63
+#define LP_SPEEDO_BIT_MINUS2   64
+#define LP_SPEEDO_BIT_MINUS2_R 65
+
+enum {
+       THRESHOLD_INDEX_0,
+       THRESHOLD_INDEX_1,
+       THRESHOLD_INDEX_2,
+       THRESHOLD_INDEX_3,
+       THRESHOLD_INDEX_4,
+       THRESHOLD_INDEX_5,
+       THRESHOLD_INDEX_6,
+       THRESHOLD_INDEX_7,
+       THRESHOLD_INDEX_8,
+       THRESHOLD_INDEX_9,
+       THRESHOLD_INDEX_10,
+       THRESHOLD_INDEX_11,
+       THRESHOLD_INDEX_COUNT,
+};
+
+static const u32 __initconst core_process_speedos[][CORE_PROCESS_CORNERS] = {
+       {180},
+       {170},
+       {195},
+       {180},
+       {168},
+       {192},
+       {180},
+       {170},
+       {195},
+       {180},
+       {180},
+       {180},
+};
+
+static const u32 __initconst cpu_process_speedos[][CPU_PROCESS_CORNERS] = {
+       {306, 338, 360, 376, UINT_MAX},
+       {295, 336, 358, 375, UINT_MAX},
+       {325, 325, 358, 375, UINT_MAX},
+       {325, 325, 358, 375, UINT_MAX},
+       {292, 324, 348, 364, UINT_MAX},
+       {324, 324, 348, 364, UINT_MAX},
+       {324, 324, 348, 364, UINT_MAX},
+       {295, 336, 358, 375, UINT_MAX},
+       {358, 358, 358, 358, 397, UINT_MAX},
+       {364, 364, 364, 364, 397, UINT_MAX},
+       {295, 336, 358, 375, 391, UINT_MAX},
+       {295, 336, 358, 375, 391, UINT_MAX},
+};
+
+static int threshold_index __initdata;
+
+static void __init fuse_speedo_calib(u32 *speedo_g, u32 *speedo_lp)
+{
+       u32 reg;
+       int ate_ver;
+       int bit_minus1;
+       int bit_minus2;
+
+       reg = tegra30_fuse_readl(FUSE_SPEEDO_CALIB_0);
+
+       *speedo_lp = (reg & 0xFFFF) * 4;
+       *speedo_g = ((reg >> 16) & 0xFFFF) * 4;
+
+       ate_ver = tegra30_fuse_readl(FUSE_TEST_PROG_VER);
+       pr_debug("Tegra ATE prog ver %d.%d\n", ate_ver/10, ate_ver%10);
+
+       if (ate_ver >= 26) {
+               bit_minus1 = tegra30_spare_fuse(LP_SPEEDO_BIT_MINUS1);
+               bit_minus1 |= tegra30_spare_fuse(LP_SPEEDO_BIT_MINUS1_R);
+               bit_minus2 = tegra30_spare_fuse(LP_SPEEDO_BIT_MINUS2);
+               bit_minus2 |= tegra30_spare_fuse(LP_SPEEDO_BIT_MINUS2_R);
+               *speedo_lp |= (bit_minus1 << 1) | bit_minus2;
+
+               bit_minus1 = tegra30_spare_fuse(G_SPEEDO_BIT_MINUS1);
+               bit_minus1 |= tegra30_spare_fuse(G_SPEEDO_BIT_MINUS1_R);
+               bit_minus2 = tegra30_spare_fuse(G_SPEEDO_BIT_MINUS2);
+               bit_minus2 |= tegra30_spare_fuse(G_SPEEDO_BIT_MINUS2_R);
+               *speedo_g |= (bit_minus1 << 1) | bit_minus2;
+       } else {
+               *speedo_lp |= 0x3;
+               *speedo_g |= 0x3;
+       }
+}
+
+static void __init rev_sku_to_speedo_ids(struct tegra_sku_info *sku_info)
+{
+       int package_id = tegra30_fuse_readl(FUSE_PACKAGE_INFO) & 0x0F;
+
+       switch (sku_info->revision) {
+       case TEGRA_REVISION_A01:
+               sku_info->cpu_speedo_id = 0;
+               sku_info->soc_speedo_id = 0;
+               threshold_index = THRESHOLD_INDEX_0;
+               break;
+       case TEGRA_REVISION_A02:
+       case TEGRA_REVISION_A03:
+               switch (sku_info->sku_id) {
+               case 0x87:
+               case 0x82:
+                       sku_info->cpu_speedo_id = 1;
+                       sku_info->soc_speedo_id = 1;
+                       threshold_index = THRESHOLD_INDEX_1;
+                       break;
+               case 0x81:
+                       switch (package_id) {
+                       case 1:
+                               sku_info->cpu_speedo_id = 2;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_2;
+                               break;
+                       case 2:
+                               sku_info->cpu_speedo_id = 4;
+                               sku_info->soc_speedo_id = 1;
+                               threshold_index = THRESHOLD_INDEX_7;
+                               break;
+                       default:
+                               pr_err("Tegra Unknown pkg %d\n", package_id);
+                               break;
+                       }
+                       break;
+               case 0x80:
+                       switch (package_id) {
+                       case 1:
+                               sku_info->cpu_speedo_id = 5;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_8;
+                               break;
+                       case 2:
+                               sku_info->cpu_speedo_id = 6;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_9;
+                               break;
+                       default:
+                               pr_err("Tegra Unknown pkg %d\n", package_id);
+                               break;
+                       }
+                       break;
+               case 0x83:
+                       switch (package_id) {
+                       case 1:
+                               sku_info->cpu_speedo_id = 7;
+                               sku_info->soc_speedo_id = 1;
+                               threshold_index = THRESHOLD_INDEX_10;
+                               break;
+                       case 2:
+                               sku_info->cpu_speedo_id = 3;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_3;
+                               break;
+                       default:
+                               pr_err("Tegra Unknown pkg %d\n", package_id);
+                               break;
+                       }
+                       break;
+               case 0x8F:
+                       sku_info->cpu_speedo_id = 8;
+                       sku_info->soc_speedo_id = 1;
+                       threshold_index = THRESHOLD_INDEX_11;
+                       break;
+               case 0x08:
+                       sku_info->cpu_speedo_id = 1;
+                       sku_info->soc_speedo_id = 1;
+                       threshold_index = THRESHOLD_INDEX_4;
+                       break;
+               case 0x02:
+                       sku_info->cpu_speedo_id = 2;
+                       sku_info->soc_speedo_id = 2;
+                       threshold_index = THRESHOLD_INDEX_5;
+                       break;
+               case 0x04:
+                       sku_info->cpu_speedo_id = 3;
+                       sku_info->soc_speedo_id = 2;
+                       threshold_index = THRESHOLD_INDEX_6;
+                       break;
+               case 0:
+                       switch (package_id) {
+                       case 1:
+                               sku_info->cpu_speedo_id = 2;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_2;
+                               break;
+                       case 2:
+                               sku_info->cpu_speedo_id = 3;
+                               sku_info->soc_speedo_id = 2;
+                               threshold_index = THRESHOLD_INDEX_3;
+                               break;
+                       default:
+                               pr_err("Tegra Unknown pkg %d\n", package_id);
+                               break;
+                       }
+                       break;
+               default:
+                       pr_warn("Tegra Unknown SKU %d\n", sku_info->sku_id);
+                       sku_info->cpu_speedo_id = 0;
+                       sku_info->soc_speedo_id = 0;
+                       threshold_index = THRESHOLD_INDEX_0;
+                       break;
+               }
+               break;
+       default:
+               pr_warn("Tegra Unknown chip rev %d\n", sku_info->revision);
+               sku_info->cpu_speedo_id = 0;
+               sku_info->soc_speedo_id = 0;
+               threshold_index = THRESHOLD_INDEX_0;
+               break;
+       }
+}
+
+void __init tegra30_init_speedo_data(struct tegra_sku_info *sku_info)
+{
+       u32 cpu_speedo_val;
+       u32 core_speedo_val;
+       int i;
+
+       BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+       BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) !=
+                       THRESHOLD_INDEX_COUNT);
+
+
+       rev_sku_to_speedo_ids(sku_info);
+       fuse_speedo_calib(&cpu_speedo_val, &core_speedo_val);
+       pr_debug("Tegra CPU speedo value %u\n", cpu_speedo_val);
+       pr_debug("Tegra Core speedo value %u\n", core_speedo_val);
+
+       for (i = 0; i < CPU_PROCESS_CORNERS; i++) {
+               if (cpu_speedo_val < cpu_process_speedos[threshold_index][i])
+                       break;
+       }
+       sku_info->cpu_process_id = i - 1;
+
+       if (sku_info->cpu_process_id == -1) {
+               pr_warn("Tegra CPU speedo value %3d out of range",
+                        cpu_speedo_val);
+               sku_info->cpu_process_id = 0;
+               sku_info->cpu_speedo_id = 1;
+       }
+
+       for (i = 0; i < CORE_PROCESS_CORNERS; i++) {
+               if (core_speedo_val < core_process_speedos[threshold_index][i])
+                       break;
+       }
+       sku_info->core_process_id = i - 1;
+
+       if (sku_info->core_process_id == -1) {
+               pr_warn("Tegra CORE speedo value %3d out of range",
+                                core_speedo_val);
+               sku_info->core_process_id = 0;
+               sku_info->soc_speedo_id = 1;
+       }
+}
diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c
new file mode 100644 (file)
index 0000000..bfc1d54
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * 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 <linux/kernel.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/io.h>
+
+#include <soc/tegra/fuse.h>
+
+#include "fuse.h"
+
+#define APBMISC_BASE   0x70000800
+#define APBMISC_SIZE   0x64
+#define FUSE_SKU_INFO  0x10
+
+static void __iomem *apbmisc_base;
+static void __iomem *strapping_base;
+
+u32 tegra_read_chipid(void)
+{
+       return readl_relaxed(apbmisc_base + 4);
+}
+
+u8 tegra_get_chip_id(void)
+{
+       u32 id = tegra_read_chipid();
+
+       return (id >> 8) & 0xff;
+}
+
+u32 tegra_read_straps(void)
+{
+       if (strapping_base)
+               return readl_relaxed(strapping_base);
+       else
+               return 0;
+}
+
+static const struct of_device_id apbmisc_match[] __initconst = {
+       { .compatible = "nvidia,tegra20-apbmisc", },
+       {},
+};
+
+void __init tegra_init_revision(void)
+{
+       u32 id, chip_id, minor_rev;
+       int rev;
+
+       id = tegra_read_chipid();
+       chip_id = (id >> 8) & 0xff;
+       minor_rev = (id >> 16) & 0xf;
+
+       switch (minor_rev) {
+       case 1:
+               rev = TEGRA_REVISION_A01;
+               break;
+       case 2:
+               rev = TEGRA_REVISION_A02;
+               break;
+       case 3:
+               if (chip_id == TEGRA20 && (tegra20_spare_fuse_early(18) ||
+                                          tegra20_spare_fuse_early(19)))
+                       rev = TEGRA_REVISION_A03p;
+               else
+                       rev = TEGRA_REVISION_A03;
+               break;
+       case 4:
+               rev = TEGRA_REVISION_A04;
+               break;
+       default:
+               rev = TEGRA_REVISION_UNKNOWN;
+       }
+
+       tegra_sku_info.revision = rev;
+
+       if (chip_id == TEGRA20)
+               tegra_sku_info.sku_id = tegra20_fuse_early(FUSE_SKU_INFO);
+       else
+               tegra_sku_info.sku_id = tegra30_fuse_readl(FUSE_SKU_INFO);
+}
+
+void __init tegra_init_apbmisc(void)
+{
+       struct device_node *np;
+
+       np = of_find_matching_node(NULL, apbmisc_match);
+       apbmisc_base = of_iomap(np, 0);
+       if (!apbmisc_base) {
+               pr_warn("ioremap tegra apbmisc failed. using %08x instead\n",
+                       APBMISC_BASE);
+               apbmisc_base = ioremap(APBMISC_BASE, APBMISC_SIZE);
+       }
+
+       strapping_base = of_iomap(np, 1);
+       if (!strapping_base)
+               pr_err("ioremap tegra strapping_base failed\n");
+}
diff --git a/include/dt-bindings/clock/imx1-clock.h b/include/dt-bindings/clock/imx1-clock.h
new file mode 100644 (file)
index 0000000..607bf01
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
+ *
+ * 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.
+ *
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX1_H
+#define __DT_BINDINGS_CLOCK_IMX1_H
+
+#define IMX1_CLK_DUMMY         0
+#define IMX1_CLK_CLK32         1
+#define IMX1_CLK_CLK16M_EXT    2
+#define IMX1_CLK_CLK16M                3
+#define IMX1_CLK_CLK32_PREMULT 4
+#define IMX1_CLK_PREM          5
+#define IMX1_CLK_MPLL          6
+#define IMX1_CLK_MPLL_GATE     7
+#define IMX1_CLK_SPLL          8
+#define IMX1_CLK_SPLL_GATE     9
+#define IMX1_CLK_MCU           10
+#define IMX1_CLK_FCLK          11
+#define IMX1_CLK_HCLK          12
+#define IMX1_CLK_CLK48M                13
+#define IMX1_CLK_PER1          14
+#define IMX1_CLK_PER2          15
+#define IMX1_CLK_PER3          16
+#define IMX1_CLK_CLKO          17
+#define IMX1_CLK_UART3_GATE    18
+#define IMX1_CLK_SSI2_GATE     19
+#define IMX1_CLK_BROM_GATE     20
+#define IMX1_CLK_DMA_GATE      21
+#define IMX1_CLK_CSI_GATE      22
+#define IMX1_CLK_MMA_GATE      23
+#define IMX1_CLK_USBD_GATE     24
+#define IMX1_CLK_MAX           25
+
+#endif
diff --git a/include/dt-bindings/clock/imx21-clock.h b/include/dt-bindings/clock/imx21-clock.h
new file mode 100644 (file)
index 0000000..b13596c
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
+ *
+ * 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.
+ *
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX21_H
+#define __DT_BINDINGS_CLOCK_IMX21_H
+
+#define IMX21_CLK_DUMMY                        0
+#define IMX21_CLK_CKIL                 1
+#define IMX21_CLK_CKIH                 2
+#define IMX21_CLK_FPM                  3
+#define IMX21_CLK_CKIH_DIV1P5          4
+#define IMX21_CLK_MPLL_GATE            5
+#define IMX21_CLK_SPLL_GATE            6
+#define IMX21_CLK_FPM_GATE             7
+#define IMX21_CLK_CKIH_GATE            8
+#define IMX21_CLK_MPLL_OSC_SEL         9
+#define IMX21_CLK_IPG                  10
+#define IMX21_CLK_HCLK                 11
+#define IMX21_CLK_MPLL_SEL             12
+#define IMX21_CLK_SPLL_SEL             13
+#define IMX21_CLK_SSI1_SEL             14
+#define IMX21_CLK_SSI2_SEL             15
+#define IMX21_CLK_USB_DIV              16
+#define IMX21_CLK_FCLK                 17
+#define IMX21_CLK_MPLL                 18
+#define IMX21_CLK_SPLL                 19
+#define IMX21_CLK_NFC_DIV              20
+#define IMX21_CLK_SSI1_DIV             21
+#define IMX21_CLK_SSI2_DIV             22
+#define IMX21_CLK_PER1                 23
+#define IMX21_CLK_PER2                 24
+#define IMX21_CLK_PER3                 25
+#define IMX21_CLK_PER4                 26
+#define IMX21_CLK_UART1_IPG_GATE       27
+#define IMX21_CLK_UART2_IPG_GATE       28
+#define IMX21_CLK_UART3_IPG_GATE       29
+#define IMX21_CLK_UART4_IPG_GATE       30
+#define IMX21_CLK_CSPI1_IPG_GATE       31
+#define IMX21_CLK_CSPI2_IPG_GATE       32
+#define IMX21_CLK_SSI1_GATE            33
+#define IMX21_CLK_SSI2_GATE            34
+#define IMX21_CLK_SDHC1_IPG_GATE       35
+#define IMX21_CLK_SDHC2_IPG_GATE       36
+#define IMX21_CLK_GPIO_GATE            37
+#define IMX21_CLK_I2C_GATE             38
+#define IMX21_CLK_DMA_GATE             39
+#define IMX21_CLK_USB_GATE             40
+#define IMX21_CLK_EMMA_GATE            41
+#define IMX21_CLK_SSI2_BAUD_GATE       42
+#define IMX21_CLK_SSI1_BAUD_GATE       43
+#define IMX21_CLK_LCDC_IPG_GATE                44
+#define IMX21_CLK_NFC_GATE             45
+#define IMX21_CLK_LCDC_HCLK_GATE       46
+#define IMX21_CLK_PER4_GATE            47
+#define IMX21_CLK_BMI_GATE             48
+#define IMX21_CLK_USB_HCLK_GATE                49
+#define IMX21_CLK_SLCDC_GATE           50
+#define IMX21_CLK_SLCDC_HCLK_GATE      51
+#define IMX21_CLK_EMMA_HCLK_GATE       52
+#define IMX21_CLK_BROM_GATE            53
+#define IMX21_CLK_DMA_HCLK_GATE                54
+#define IMX21_CLK_CSI_HCLK_GATE                55
+#define IMX21_CLK_CSPI3_IPG_GATE       56
+#define IMX21_CLK_WDOG_GATE            57
+#define IMX21_CLK_GPT1_IPG_GATE                58
+#define IMX21_CLK_GPT2_IPG_GATE                59
+#define IMX21_CLK_GPT3_IPG_GATE                60
+#define IMX21_CLK_PWM_IPG_GATE         61
+#define IMX21_CLK_RTC_GATE             62
+#define IMX21_CLK_KPP_GATE             63
+#define IMX21_CLK_OWIRE_GATE           64
+#define IMX21_CLK_MAX                  65
+
+#endif
diff --git a/include/dt-bindings/clock/imx27-clock.h b/include/dt-bindings/clock/imx27-clock.h
new file mode 100644 (file)
index 0000000..148b053
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
+ *
+ * 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.
+ *
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX27_H
+#define __DT_BINDINGS_CLOCK_IMX27_H
+
+#define IMX27_CLK_DUMMY                        0
+#define IMX27_CLK_CKIH                 1
+#define IMX27_CLK_CKIL                 2
+#define IMX27_CLK_MPLL                 3
+#define IMX27_CLK_SPLL                 4
+#define IMX27_CLK_MPLL_MAIN2           5
+#define IMX27_CLK_AHB                  6
+#define IMX27_CLK_IPG                  7
+#define IMX27_CLK_NFC_DIV              8
+#define IMX27_CLK_PER1_DIV             9
+#define IMX27_CLK_PER2_DIV             10
+#define IMX27_CLK_PER3_DIV             11
+#define IMX27_CLK_PER4_DIV             12
+#define IMX27_CLK_VPU_SEL              13
+#define IMX27_CLK_VPU_DIV              14
+#define IMX27_CLK_USB_DIV              15
+#define IMX27_CLK_CPU_SEL              16
+#define IMX27_CLK_CLKO_SEL             17
+#define IMX27_CLK_CPU_DIV              18
+#define IMX27_CLK_CLKO_DIV             19
+#define IMX27_CLK_SSI1_SEL             20
+#define IMX27_CLK_SSI2_SEL             21
+#define IMX27_CLK_SSI1_DIV             22
+#define IMX27_CLK_SSI2_DIV             23
+#define IMX27_CLK_CLKO_EN              24
+#define IMX27_CLK_SSI2_IPG_GATE                25
+#define IMX27_CLK_SSI1_IPG_GATE                26
+#define IMX27_CLK_SLCDC_IPG_GATE       27
+#define IMX27_CLK_SDHC3_IPG_GATE       28
+#define IMX27_CLK_SDHC2_IPG_GATE       29
+#define IMX27_CLK_SDHC1_IPG_GATE       30
+#define IMX27_CLK_SCC_IPG_GATE         31
+#define IMX27_CLK_SAHARA_IPG_GATE      32
+#define IMX27_CLK_RTC_IPG_GATE         33
+#define IMX27_CLK_PWM_IPG_GATE         34
+#define IMX27_CLK_OWIRE_IPG_GATE       35
+#define IMX27_CLK_LCDC_IPG_GATE                36
+#define IMX27_CLK_KPP_IPG_GATE         37
+#define IMX27_CLK_IIM_IPG_GATE         38
+#define IMX27_CLK_I2C2_IPG_GATE                39
+#define IMX27_CLK_I2C1_IPG_GATE                40
+#define IMX27_CLK_GPT6_IPG_GATE                41
+#define IMX27_CLK_GPT5_IPG_GATE                42
+#define IMX27_CLK_GPT4_IPG_GATE                43
+#define IMX27_CLK_GPT3_IPG_GATE                44
+#define IMX27_CLK_GPT2_IPG_GATE                45
+#define IMX27_CLK_GPT1_IPG_GATE                46
+#define IMX27_CLK_GPIO_IPG_GATE                47
+#define IMX27_CLK_FEC_IPG_GATE         48
+#define IMX27_CLK_EMMA_IPG_GATE                49
+#define IMX27_CLK_DMA_IPG_GATE         50
+#define IMX27_CLK_CSPI3_IPG_GATE       51
+#define IMX27_CLK_CSPI2_IPG_GATE       52
+#define IMX27_CLK_CSPI1_IPG_GATE       53
+#define IMX27_CLK_NFC_BAUD_GATE                54
+#define IMX27_CLK_SSI2_BAUD_GATE       55
+#define IMX27_CLK_SSI1_BAUD_GATE       56
+#define IMX27_CLK_VPU_BAUD_GATE                57
+#define IMX27_CLK_PER4_GATE            58
+#define IMX27_CLK_PER3_GATE            59
+#define IMX27_CLK_PER2_GATE            60
+#define IMX27_CLK_PER1_GATE            61
+#define IMX27_CLK_USB_AHB_GATE         62
+#define IMX27_CLK_SLCDC_AHB_GATE       63
+#define IMX27_CLK_SAHARA_AHB_GATE      64
+#define IMX27_CLK_LCDC_AHB_GATE                65
+#define IMX27_CLK_VPU_AHB_GATE         66
+#define IMX27_CLK_FEC_AHB_GATE         67
+#define IMX27_CLK_EMMA_AHB_GATE                68
+#define IMX27_CLK_EMI_AHB_GATE         69
+#define IMX27_CLK_DMA_AHB_GATE         70
+#define IMX27_CLK_CSI_AHB_GATE         71
+#define IMX27_CLK_BROM_AHB_GATE                72
+#define IMX27_CLK_ATA_AHB_GATE         73
+#define IMX27_CLK_WDOG_IPG_GATE                74
+#define IMX27_CLK_USB_IPG_GATE         75
+#define IMX27_CLK_UART6_IPG_GATE       76
+#define IMX27_CLK_UART5_IPG_GATE       77
+#define IMX27_CLK_UART4_IPG_GATE       78
+#define IMX27_CLK_UART3_IPG_GATE       79
+#define IMX27_CLK_UART2_IPG_GATE       80
+#define IMX27_CLK_UART1_IPG_GATE       81
+#define IMX27_CLK_CKIH_DIV1P5          82
+#define IMX27_CLK_FPM                  83
+#define IMX27_CLK_MPLL_OSC_SEL         84
+#define IMX27_CLK_MPLL_SEL             85
+#define IMX27_CLK_SPLL_GATE            86
+#define IMX27_CLK_MSHC_DIV             87
+#define IMX27_CLK_RTIC_IPG_GATE                88
+#define IMX27_CLK_MSHC_IPG_GATE                89
+#define IMX27_CLK_RTIC_AHB_GATE                90
+#define IMX27_CLK_MSHC_BAUD_GATE       91
+#define IMX27_CLK_CKIH_GATE            92
+#define IMX27_CLK_MAX                  93
+
+#endif
diff --git a/include/dt-bindings/clock/imx6qdl-clock.h b/include/dt-bindings/clock/imx6qdl-clock.h
new file mode 100644 (file)
index 0000000..654151e
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * Copyright 2014 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_IMX6QDL_H
+#define __DT_BINDINGS_CLOCK_IMX6QDL_H
+
+#define IMX6QDL_CLK_DUMMY                      0
+#define IMX6QDL_CLK_CKIL                       1
+#define IMX6QDL_CLK_CKIH                       2
+#define IMX6QDL_CLK_OSC                                3
+#define IMX6QDL_CLK_PLL2_PFD0_352M             4
+#define IMX6QDL_CLK_PLL2_PFD1_594M             5
+#define IMX6QDL_CLK_PLL2_PFD2_396M             6
+#define IMX6QDL_CLK_PLL3_PFD0_720M             7
+#define IMX6QDL_CLK_PLL3_PFD1_540M             8
+#define IMX6QDL_CLK_PLL3_PFD2_508M             9
+#define IMX6QDL_CLK_PLL3_PFD3_454M             10
+#define IMX6QDL_CLK_PLL2_198M                  11
+#define IMX6QDL_CLK_PLL3_120M                  12
+#define IMX6QDL_CLK_PLL3_80M                   13
+#define IMX6QDL_CLK_PLL3_60M                   14
+#define IMX6QDL_CLK_TWD                                15
+#define IMX6QDL_CLK_STEP                       16
+#define IMX6QDL_CLK_PLL1_SW                    17
+#define IMX6QDL_CLK_PERIPH_PRE                 18
+#define IMX6QDL_CLK_PERIPH2_PRE                        19
+#define IMX6QDL_CLK_PERIPH_CLK2_SEL            20
+#define IMX6QDL_CLK_PERIPH2_CLK2_SEL           21
+#define IMX6QDL_CLK_AXI_SEL                    22
+#define IMX6QDL_CLK_ESAI_SEL                   23
+#define IMX6QDL_CLK_ASRC_SEL                   24
+#define IMX6QDL_CLK_SPDIF_SEL                  25
+#define IMX6QDL_CLK_GPU2D_AXI                  26
+#define IMX6QDL_CLK_GPU3D_AXI                  27
+#define IMX6QDL_CLK_GPU2D_CORE_SEL             28
+#define IMX6QDL_CLK_GPU3D_CORE_SEL             29
+#define IMX6QDL_CLK_GPU3D_SHADER_SEL           30
+#define IMX6QDL_CLK_IPU1_SEL                   31
+#define IMX6QDL_CLK_IPU2_SEL                   32
+#define IMX6QDL_CLK_LDB_DI0_SEL                        33
+#define IMX6QDL_CLK_LDB_DI1_SEL                        34
+#define IMX6QDL_CLK_IPU1_DI0_PRE_SEL           35
+#define IMX6QDL_CLK_IPU1_DI1_PRE_SEL           36
+#define IMX6QDL_CLK_IPU2_DI0_PRE_SEL           37
+#define IMX6QDL_CLK_IPU2_DI1_PRE_SEL           38
+#define IMX6QDL_CLK_IPU1_DI0_SEL               39
+#define IMX6QDL_CLK_IPU1_DI1_SEL               40
+#define IMX6QDL_CLK_IPU2_DI0_SEL               41
+#define IMX6QDL_CLK_IPU2_DI1_SEL               42
+#define IMX6QDL_CLK_HSI_TX_SEL                 43
+#define IMX6QDL_CLK_PCIE_AXI_SEL               44
+#define IMX6QDL_CLK_SSI1_SEL                   45
+#define IMX6QDL_CLK_SSI2_SEL                   46
+#define IMX6QDL_CLK_SSI3_SEL                   47
+#define IMX6QDL_CLK_USDHC1_SEL                 48
+#define IMX6QDL_CLK_USDHC2_SEL                 49
+#define IMX6QDL_CLK_USDHC3_SEL                 50
+#define IMX6QDL_CLK_USDHC4_SEL                 51
+#define IMX6QDL_CLK_ENFC_SEL                   52
+#define IMX6QDL_CLK_EMI_SEL                    53
+#define IMX6QDL_CLK_EMI_SLOW_SEL               54
+#define IMX6QDL_CLK_VDO_AXI_SEL                        55
+#define IMX6QDL_CLK_VPU_AXI_SEL                        56
+#define IMX6QDL_CLK_CKO1_SEL                   57
+#define IMX6QDL_CLK_PERIPH                     58
+#define IMX6QDL_CLK_PERIPH2                    59
+#define IMX6QDL_CLK_PERIPH_CLK2                        60
+#define IMX6QDL_CLK_PERIPH2_CLK2               61
+#define IMX6QDL_CLK_IPG                                62
+#define IMX6QDL_CLK_IPG_PER                    63
+#define IMX6QDL_CLK_ESAI_PRED                  64
+#define IMX6QDL_CLK_ESAI_PODF                  65
+#define IMX6QDL_CLK_ASRC_PRED                  66
+#define IMX6QDL_CLK_ASRC_PODF                  67
+#define IMX6QDL_CLK_SPDIF_PRED                 68
+#define IMX6QDL_CLK_SPDIF_PODF                 69
+#define IMX6QDL_CLK_CAN_ROOT                   70
+#define IMX6QDL_CLK_ECSPI_ROOT                 71
+#define IMX6QDL_CLK_GPU2D_CORE_PODF            72
+#define IMX6QDL_CLK_GPU3D_CORE_PODF            73
+#define IMX6QDL_CLK_GPU3D_SHADER               74
+#define IMX6QDL_CLK_IPU1_PODF                  75
+#define IMX6QDL_CLK_IPU2_PODF                  76
+#define IMX6QDL_CLK_LDB_DI0_PODF               77
+#define IMX6QDL_CLK_LDB_DI1_PODF               78
+#define IMX6QDL_CLK_IPU1_DI0_PRE               79
+#define IMX6QDL_CLK_IPU1_DI1_PRE               80
+#define IMX6QDL_CLK_IPU2_DI0_PRE               81
+#define IMX6QDL_CLK_IPU2_DI1_PRE               82
+#define IMX6QDL_CLK_HSI_TX_PODF                        83
+#define IMX6QDL_CLK_SSI1_PRED                  84
+#define IMX6QDL_CLK_SSI1_PODF                  85
+#define IMX6QDL_CLK_SSI2_PRED                  86
+#define IMX6QDL_CLK_SSI2_PODF                  87
+#define IMX6QDL_CLK_SSI3_PRED                  88
+#define IMX6QDL_CLK_SSI3_PODF                  89
+#define IMX6QDL_CLK_UART_SERIAL_PODF           90
+#define IMX6QDL_CLK_USDHC1_PODF                        91
+#define IMX6QDL_CLK_USDHC2_PODF                        92
+#define IMX6QDL_CLK_USDHC3_PODF                        93
+#define IMX6QDL_CLK_USDHC4_PODF                        94
+#define IMX6QDL_CLK_ENFC_PRED                  95
+#define IMX6QDL_CLK_ENFC_PODF                  96
+#define IMX6QDL_CLK_EMI_PODF                   97
+#define IMX6QDL_CLK_EMI_SLOW_PODF              98
+#define IMX6QDL_CLK_VPU_AXI_PODF               99
+#define IMX6QDL_CLK_CKO1_PODF                  100
+#define IMX6QDL_CLK_AXI                                101
+#define IMX6QDL_CLK_MMDC_CH0_AXI_PODF          102
+#define IMX6QDL_CLK_MMDC_CH1_AXI_PODF          103
+#define IMX6QDL_CLK_ARM                                104
+#define IMX6QDL_CLK_AHB                                105
+#define IMX6QDL_CLK_APBH_DMA                   106
+#define IMX6QDL_CLK_ASRC                       107
+#define IMX6QDL_CLK_CAN1_IPG                   108
+#define IMX6QDL_CLK_CAN1_SERIAL                        109
+#define IMX6QDL_CLK_CAN2_IPG                   110
+#define IMX6QDL_CLK_CAN2_SERIAL                        111
+#define IMX6QDL_CLK_ECSPI1                     112
+#define IMX6QDL_CLK_ECSPI2                     113
+#define IMX6QDL_CLK_ECSPI3                     114
+#define IMX6QDL_CLK_ECSPI4                     115
+#define IMX6Q_CLK_ECSPI5                       116
+#define IMX6DL_CLK_I2C4                                116
+#define IMX6QDL_CLK_ENET                       117
+#define IMX6QDL_CLK_ESAI                       118
+#define IMX6QDL_CLK_GPT_IPG                    119
+#define IMX6QDL_CLK_GPT_IPG_PER                        120
+#define IMX6QDL_CLK_GPU2D_CORE                 121
+#define IMX6QDL_CLK_GPU3D_CORE                 122
+#define IMX6QDL_CLK_HDMI_IAHB                  123
+#define IMX6QDL_CLK_HDMI_ISFR                  124
+#define IMX6QDL_CLK_I2C1                       125
+#define IMX6QDL_CLK_I2C2                       126
+#define IMX6QDL_CLK_I2C3                       127
+#define IMX6QDL_CLK_IIM                                128
+#define IMX6QDL_CLK_ENFC                       129
+#define IMX6QDL_CLK_IPU1                       130
+#define IMX6QDL_CLK_IPU1_DI0                   131
+#define IMX6QDL_CLK_IPU1_DI1                   132
+#define IMX6QDL_CLK_IPU2                       133
+#define IMX6QDL_CLK_IPU2_DI0                   134
+#define IMX6QDL_CLK_LDB_DI0                    135
+#define IMX6QDL_CLK_LDB_DI1                    136
+#define IMX6QDL_CLK_IPU2_DI1                   137
+#define IMX6QDL_CLK_HSI_TX                     138
+#define IMX6QDL_CLK_MLB                                139
+#define IMX6QDL_CLK_MMDC_CH0_AXI               140
+#define IMX6QDL_CLK_MMDC_CH1_AXI               141
+#define IMX6QDL_CLK_OCRAM                      142
+#define IMX6QDL_CLK_OPENVG_AXI                 143
+#define IMX6QDL_CLK_PCIE_AXI                   144
+#define IMX6QDL_CLK_PWM1                       145
+#define IMX6QDL_CLK_PWM2                       146
+#define IMX6QDL_CLK_PWM3                       147
+#define IMX6QDL_CLK_PWM4                       148
+#define IMX6QDL_CLK_PER1_BCH                   149
+#define IMX6QDL_CLK_GPMI_BCH_APB               150
+#define IMX6QDL_CLK_GPMI_BCH                   151
+#define IMX6QDL_CLK_GPMI_IO                    152
+#define IMX6QDL_CLK_GPMI_APB                   153
+#define IMX6QDL_CLK_SATA                       154
+#define IMX6QDL_CLK_SDMA                       155
+#define IMX6QDL_CLK_SPBA                       156
+#define IMX6QDL_CLK_SSI1                       157
+#define IMX6QDL_CLK_SSI2                       158
+#define IMX6QDL_CLK_SSI3                       159
+#define IMX6QDL_CLK_UART_IPG                   160
+#define IMX6QDL_CLK_UART_SERIAL                        161
+#define IMX6QDL_CLK_USBOH3                     162
+#define IMX6QDL_CLK_USDHC1                     163
+#define IMX6QDL_CLK_USDHC2                     164
+#define IMX6QDL_CLK_USDHC3                     165
+#define IMX6QDL_CLK_USDHC4                     166
+#define IMX6QDL_CLK_VDO_AXI                    167
+#define IMX6QDL_CLK_VPU_AXI                    168
+#define IMX6QDL_CLK_CKO1                       169
+#define IMX6QDL_CLK_PLL1_SYS                   170
+#define IMX6QDL_CLK_PLL2_BUS                   171
+#define IMX6QDL_CLK_PLL3_USB_OTG               172
+#define IMX6QDL_CLK_PLL4_AUDIO                 173
+#define IMX6QDL_CLK_PLL5_VIDEO                 174
+#define IMX6QDL_CLK_PLL8_MLB                   175
+#define IMX6QDL_CLK_PLL7_USB_HOST              176
+#define IMX6QDL_CLK_PLL6_ENET                  177
+#define IMX6QDL_CLK_SSI1_IPG                   178
+#define IMX6QDL_CLK_SSI2_IPG                   179
+#define IMX6QDL_CLK_SSI3_IPG                   180
+#define IMX6QDL_CLK_ROM                                181
+#define IMX6QDL_CLK_USBPHY1                    182
+#define IMX6QDL_CLK_USBPHY2                    183
+#define IMX6QDL_CLK_LDB_DI0_DIV_3_5            184
+#define IMX6QDL_CLK_LDB_DI1_DIV_3_5            185
+#define IMX6QDL_CLK_SATA_REF                   186
+#define IMX6QDL_CLK_SATA_REF_100M              187
+#define IMX6QDL_CLK_PCIE_REF                   188
+#define IMX6QDL_CLK_PCIE_REF_125M              189
+#define IMX6QDL_CLK_ENET_REF                   190
+#define IMX6QDL_CLK_USBPHY1_GATE               191
+#define IMX6QDL_CLK_USBPHY2_GATE               192
+#define IMX6QDL_CLK_PLL4_POST_DIV              193
+#define IMX6QDL_CLK_PLL5_POST_DIV              194
+#define IMX6QDL_CLK_PLL5_VIDEO_DIV             195
+#define IMX6QDL_CLK_EIM_SLOW                   196
+#define IMX6QDL_CLK_SPDIF                      197
+#define IMX6QDL_CLK_CKO2_SEL                   198
+#define IMX6QDL_CLK_CKO2_PODF                  199
+#define IMX6QDL_CLK_CKO2                       200
+#define IMX6QDL_CLK_CKO                                201
+#define IMX6QDL_CLK_VDOA                       202
+#define IMX6QDL_CLK_PLL4_AUDIO_DIV             203
+#define IMX6QDL_CLK_LVDS1_SEL                  204
+#define IMX6QDL_CLK_LVDS2_SEL                  205
+#define IMX6QDL_CLK_LVDS1_GATE                 206
+#define IMX6QDL_CLK_LVDS2_GATE                 207
+#define IMX6QDL_CLK_ESAI_AHB                   208
+#define IMX6QDL_CLK_END                                209
+
+#endif /* __DT_BINDINGS_CLOCK_IMX6QDL_H */
index 1118f7a..f929a79 100644 (file)
@@ -59,6 +59,7 @@
 #define R8A7790_CLK_SDHI0              14
 #define R8A7790_CLK_MMCIF0             15
 #define R8A7790_CLK_IIC0               18
+#define R8A7790_CLK_PCIEC              19
 #define R8A7790_CLK_IIC1               23
 #define R8A7790_CLK_SSUSB              28
 #define R8A7790_CLK_CMT1               29
 #define R8A7790_CLK_I2C1               30
 #define R8A7790_CLK_I2C0               31
 
+/* MSTP10 */
+#define R8A7790_CLK_SSI_ALL            5
+#define R8A7790_CLK_SSI9               6
+#define R8A7790_CLK_SSI8               7
+#define R8A7790_CLK_SSI7               8
+#define R8A7790_CLK_SSI6               9
+#define R8A7790_CLK_SSI5               10
+#define R8A7790_CLK_SSI4               11
+#define R8A7790_CLK_SSI3               12
+#define R8A7790_CLK_SSI2               13
+#define R8A7790_CLK_SSI1               14
+#define R8A7790_CLK_SSI0               15
+#define R8A7790_CLK_SCU_ALL            17
+#define R8A7790_CLK_SCU_DVC1           18
+#define R8A7790_CLK_SCU_DVC0           19
+#define R8A7790_CLK_SCU_SRC9           22
+#define R8A7790_CLK_SCU_SRC8           23
+#define R8A7790_CLK_SCU_SRC7           24
+#define R8A7790_CLK_SCU_SRC6           25
+#define R8A7790_CLK_SCU_SRC5           26
+#define R8A7790_CLK_SCU_SRC4           27
+#define R8A7790_CLK_SCU_SRC3           28
+#define R8A7790_CLK_SCU_SRC2           29
+#define R8A7790_CLK_SCU_SRC1           30
+#define R8A7790_CLK_SCU_SRC0           31
+
 #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */
index b050d18..f0d4d10 100644 (file)
@@ -53,6 +53,7 @@
 #define R8A7791_CLK_SDHI0              14
 #define R8A7791_CLK_MMCIF0             15
 #define R8A7791_CLK_IIC0               18
+#define R8A7791_CLK_PCIEC              19
 #define R8A7791_CLK_IIC1               23
 #define R8A7791_CLK_SSUSB              28
 #define R8A7791_CLK_CMT1               29
 #define R8A7791_CLK_I2C1               30
 #define R8A7791_CLK_I2C0               31
 
+/* MSTP10 */
+#define R8A7791_CLK_SSI_ALL            5
+#define R8A7791_CLK_SSI9               6
+#define R8A7791_CLK_SSI8               7
+#define R8A7791_CLK_SSI7               8
+#define R8A7791_CLK_SSI6               9
+#define R8A7791_CLK_SSI5               10
+#define R8A7791_CLK_SSI4               11
+#define R8A7791_CLK_SSI3               12
+#define R8A7791_CLK_SSI2               13
+#define R8A7791_CLK_SSI1               14
+#define R8A7791_CLK_SSI0               15
+#define R8A7791_CLK_SCU_ALL            17
+#define R8A7791_CLK_SCU_DVC1           18
+#define R8A7791_CLK_SCU_DVC0           19
+#define R8A7791_CLK_SCU_SRC9           22
+#define R8A7791_CLK_SCU_SRC8           23
+#define R8A7791_CLK_SCU_SRC7           24
+#define R8A7791_CLK_SCU_SRC6           25
+#define R8A7791_CLK_SCU_SRC5           26
+#define R8A7791_CLK_SCU_SRC4           27
+#define R8A7791_CLK_SCU_SRC3           28
+#define R8A7791_CLK_SCU_SRC2           29
+#define R8A7791_CLK_SCU_SRC1           30
+#define R8A7791_CLK_SCU_SRC0           31
+
 /* MSTP11 */
 #define R8A7791_CLK_SCIFA3             6
 #define R8A7791_CLK_SCIFA4             7
diff --git a/include/dt-bindings/clock/rk3066a-cru.h b/include/dt-bindings/clock/rk3066a-cru.h
new file mode 100644 (file)
index 0000000..bc1ed1d
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <dt-bindings/clock/rk3188-cru-common.h>
+
+/* soft-reset indices */
+#define SRST_SRST1             0
+#define SRST_SRST2             1
+
+#define SRST_L2MEM             18
+#define SRST_I2S0              23
+#define SRST_I2S1              24
+#define SRST_I2S2              25
+#define SRST_TIMER2            29
+
+#define SRST_GPIO4             36
+#define SRST_GPIO6             38
+
+#define SRST_TSADC             92
+
+#define SRST_HDMI              96
+#define SRST_HDMI_APB          97
+#define SRST_CIF1              111
diff --git a/include/dt-bindings/clock/rk3188-cru-common.h b/include/dt-bindings/clock/rk3188-cru-common.h
new file mode 100644 (file)
index 0000000..750ee60
--- /dev/null
@@ -0,0 +1,249 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+/* core clocks from */
+#define PLL_APLL               1
+#define PLL_DPLL               2
+#define PLL_CPLL               3
+#define PLL_GPLL               4
+#define CORE_PERI              5
+#define CORE_L2C               6
+
+/* sclk gates (special clocks) */
+#define SCLK_UART0             64
+#define SCLK_UART1             65
+#define SCLK_UART2             66
+#define SCLK_UART3             67
+#define SCLK_MAC               68
+#define SCLK_SPI0              69
+#define SCLK_SPI1              70
+#define SCLK_SARADC            71
+#define SCLK_SDMMC             72
+#define SCLK_SDIO              73
+#define SCLK_EMMC              74
+#define SCLK_I2S0              75
+#define SCLK_I2S1              76
+#define SCLK_I2S2              77
+#define SCLK_SPDIF             78
+#define SCLK_CIF0              79
+#define SCLK_CIF1              80
+#define SCLK_OTGPHY0           81
+#define SCLK_OTGPHY1           82
+#define SCLK_HSADC             83
+#define SCLK_TIMER0            84
+#define SCLK_TIMER1            85
+#define SCLK_TIMER2            86
+#define SCLK_TIMER3            87
+#define SCLK_TIMER4            88
+#define SCLK_TIMER5            89
+#define SCLK_TIMER6            90
+#define SCLK_JTAG              91
+#define SCLK_SMC               92
+
+#define DCLK_LCDC0             190
+#define DCLK_LCDC1             191
+
+/* aclk gates */
+#define ACLK_DMA1              192
+#define ACLK_DMA2              193
+#define ACLK_GPS               194
+#define ACLK_LCDC0             195
+#define ACLK_LCDC1             196
+#define ACLK_GPU               197
+#define ACLK_SMC               198
+#define ACLK_CIF               199
+#define ACLK_IPP               200
+#define ACLK_RGA               201
+#define ACLK_CIF0              202
+
+/* pclk gates */
+#define PCLK_GRF               320
+#define PCLK_PMU               321
+#define PCLK_TIMER0            322
+#define PCLK_TIMER1            323
+#define PCLK_TIMER2            324
+#define PCLK_TIMER3            325
+#define PCLK_PWM01             326
+#define PCLK_PWM23             327
+#define PCLK_SPI0              328
+#define PCLK_SPI1              329
+#define PCLK_SARADC            330
+#define PCLK_WDT               331
+#define PCLK_UART0             332
+#define PCLK_UART1             333
+#define PCLK_UART2             334
+#define PCLK_UART3             335
+#define PCLK_I2C0              336
+#define PCLK_I2C1              337
+#define PCLK_I2C2              338
+#define PCLK_I2C3              339
+#define PCLK_I2C4              340
+#define PCLK_GPIO0             341
+#define PCLK_GPIO1             342
+#define PCLK_GPIO2             343
+#define PCLK_GPIO3             344
+#define PCLK_GPIO4             345
+#define PCLK_GPIO6             346
+#define PCLK_EFUSE             347
+#define PCLK_TZPC              348
+#define PCLK_TSADC             349
+
+/* hclk gates */
+#define HCLK_SDMMC             448
+#define HCLK_SDIO              449
+#define HCLK_EMMC              450
+#define HCLK_OTG0              451
+#define HCLK_EMAC              452
+#define HCLK_SPDIF             453
+#define HCLK_I2S0              454
+#define HCLK_I2S1              455
+#define HCLK_I2S2              456
+#define HCLK_OTG1              457
+#define HCLK_HSIC              458
+#define HCLK_HSADC             459
+#define HCLK_PIDF              460
+#define HCLK_LCDC0             461
+#define HCLK_LCDC1             462
+#define HCLK_ROM               463
+#define HCLK_CIF0              464
+#define HCLK_IPP               465
+#define HCLK_RGA               466
+#define HCLK_NANDC0            467
+
+#define CLK_NR_CLKS            (HCLK_NANDC0 + 1)
+
+/* soft-reset indices */
+#define SRST_MCORE             2
+#define SRST_CORE0             3
+#define SRST_CORE1             4
+#define SRST_MCORE_DBG         7
+#define SRST_CORE0_DBG         8
+#define SRST_CORE1_DBG         9
+#define SRST_CORE0_WDT         12
+#define SRST_CORE1_WDT         13
+#define SRST_STRC_SYS          14
+#define SRST_L2C               15
+
+#define SRST_CPU_AHB           17
+#define SRST_AHB2APB           19
+#define SRST_DMA1              20
+#define SRST_INTMEM            21
+#define SRST_ROM               22
+#define SRST_SPDIF             26
+#define SRST_TIMER0            27
+#define SRST_TIMER1            28
+#define SRST_EFUSE             30
+
+#define SRST_GPIO0             32
+#define SRST_GPIO1             33
+#define SRST_GPIO2             34
+#define SRST_GPIO3             35
+
+#define SRST_UART0             39
+#define SRST_UART1             40
+#define SRST_UART2             41
+#define SRST_UART3             42
+#define SRST_I2C0              43
+#define SRST_I2C1              44
+#define SRST_I2C2              45
+#define SRST_I2C3              46
+#define SRST_I2C4              47
+
+#define SRST_PWM0              48
+#define SRST_PWM1              49
+#define SRST_DAP_PO            50
+#define SRST_DAP               51
+#define SRST_DAP_SYS           52
+#define SRST_TPIU_ATB          53
+#define SRST_PMU_APB           54
+#define SRST_GRF               55
+#define SRST_PMU               56
+#define SRST_PERI_AXI          57
+#define SRST_PERI_AHB          58
+#define SRST_PERI_APB          59
+#define SRST_PERI_NIU          60
+#define SRST_CPU_PERI          61
+#define SRST_EMEM_PERI         62
+#define SRST_USB_PERI          63
+
+#define SRST_DMA2              64
+#define SRST_SMC               65
+#define SRST_MAC               66
+#define SRST_NANC0             68
+#define SRST_USBOTG0           69
+#define SRST_USBPHY0           70
+#define SRST_OTGC0             71
+#define SRST_USBOTG1           72
+#define SRST_USBPHY1           73
+#define SRST_OTGC1             74
+#define SRST_HSADC             76
+#define SRST_PIDFILTER         77
+#define SRST_DDR_MSCH          79
+
+#define SRST_TZPC              80
+#define SRST_SDMMC             81
+#define SRST_SDIO              82
+#define SRST_EMMC              83
+#define SRST_SPI0              84
+#define SRST_SPI1              85
+#define SRST_WDT               86
+#define SRST_SARADC            87
+#define SRST_DDRPHY            88
+#define SRST_DDRPHY_APB                89
+#define SRST_DDRCTL            90
+#define SRST_DDRCTL_APB                91
+#define SRST_DDRPUB            93
+
+#define SRST_VIO0_AXI          98
+#define SRST_VIO0_AHB          99
+#define SRST_LCDC0_AXI         100
+#define SRST_LCDC0_AHB         101
+#define SRST_LCDC0_DCLK                102
+#define SRST_LCDC1_AXI         103
+#define SRST_LCDC1_AHB         104
+#define SRST_LCDC1_DCLK                105
+#define SRST_IPP_AXI           106
+#define SRST_IPP_AHB           107
+#define SRST_RGA_AXI           108
+#define SRST_RGA_AHB           109
+#define SRST_CIF0              110
+
+#define SRST_VCODEC_AXI                112
+#define SRST_VCODEC_AHB                113
+#define SRST_VIO1_AXI          114
+#define SRST_VCODEC_CPU                115
+#define SRST_VCODEC_NIU                116
+#define SRST_GPU               120
+#define SRST_GPU_NIU           122
+#define SRST_TFUN_ATB          125
+#define SRST_TFUN_APB          126
+#define SRST_CTI4_APB          127
+
+#define SRST_TPIU_APB          128
+#define SRST_TRACE             129
+#define SRST_CORE_DBG          130
+#define SRST_DBG_APB           131
+#define SRST_CTI0              132
+#define SRST_CTI0_APB          133
+#define SRST_CTI1              134
+#define SRST_CTI1_APB          135
+#define SRST_PTM_CORE0         136
+#define SRST_PTM_CORE1         137
+#define SRST_PTM0              138
+#define SRST_PTM0_ATB          139
+#define SRST_PTM1              140
+#define SRST_PTM1_ATB          141
+#define SRST_CTM               142
+#define SRST_TS                        143
diff --git a/include/dt-bindings/clock/rk3188-cru.h b/include/dt-bindings/clock/rk3188-cru.h
new file mode 100644 (file)
index 0000000..9fac8ed
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+#include <dt-bindings/clock/rk3188-cru-common.h>
+
+/* soft-reset indices */
+#define SRST_PTM_CORE2         0
+#define SRST_PTM_CORE3         1
+#define SRST_CORE2             5
+#define SRST_CORE3             6
+#define SRST_CORE2_DBG         10
+#define SRST_CORE3_DBG         11
+
+#define SRST_TIMER2            16
+#define SRST_TIMER4            23
+#define SRST_I2S0              24
+#define SRST_TIMER5            25
+#define SRST_TIMER3            29
+#define SRST_TIMER6            31
+
+#define SRST_PTM3              36
+#define SRST_PTM3_ATB          37
+
+#define SRST_GPS               67
+#define SRST_HSICPHY           75
+#define SRST_TIMER             78
+
+#define SRST_PTM2              92
+#define SRST_CORE2_WDT         94
+#define SRST_CORE3_WDT         95
+
+#define SRST_PTM2_ATB          111
+
+#define SRST_HSIC              117
+#define SRST_CTI2              118
+#define SRST_CTI2_APB          119
+#define SRST_GPU_BRIDGE                121
+#define SRST_CTI3              123
+#define SRST_CTI3_APB          124
diff --git a/include/dt-bindings/clock/rk3288-cru.h b/include/dt-bindings/clock/rk3288-cru.h
new file mode 100644 (file)
index 0000000..ebcb460
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ * Copyright (c) 2014 MundoReader S.L.
+ * Author: Heiko Stuebner <heiko@sntech.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.
+ */
+
+/* core clocks */
+#define PLL_APLL               1
+#define PLL_DPLL               2
+#define PLL_CPLL               3
+#define PLL_GPLL               4
+#define PLL_NPLL               5
+
+/* sclk gates (special clocks) */
+#define SCLK_GPU               64
+#define SCLK_SPI0              65
+#define SCLK_SPI1              66
+#define SCLK_SPI2              67
+#define SCLK_SDMMC             68
+#define SCLK_SDIO0             69
+#define SCLK_SDIO1             70
+#define SCLK_EMMC              71
+#define SCLK_TSADC             72
+#define SCLK_SARADC            73
+#define SCLK_PS2C              74
+#define SCLK_NANDC0            75
+#define SCLK_NANDC1            76
+#define SCLK_UART0             77
+#define SCLK_UART1             78
+#define SCLK_UART2             79
+#define SCLK_UART3             80
+#define SCLK_UART4             81
+#define SCLK_I2S0              82
+#define SCLK_SPDIF             83
+#define SCLK_SPDIF8CH          84
+#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_TIMER6            91
+#define SCLK_HSADC             92
+#define SCLK_OTGPHY0           93
+#define SCLK_OTGPHY1           94
+#define SCLK_OTGPHY2           95
+#define SCLK_OTG_ADP           96
+#define SCLK_HSICPHY480M       97
+#define SCLK_HSICPHY12M                98
+#define SCLK_MACREF            99
+#define SCLK_LCDC_PWM0         100
+#define SCLK_LCDC_PWM1         101
+#define SCLK_MAC_RX            102
+#define SCLK_MAC_TX            103
+
+#define DCLK_VOP0              190
+#define DCLK_VOP1              191
+
+/* aclk gates */
+#define ACLK_GPU               192
+#define ACLK_DMAC1             193
+#define ACLK_DMAC2             194
+#define ACLK_MMU               195
+#define ACLK_GMAC              196
+#define ACLK_VOP0              197
+#define ACLK_VOP1              198
+#define ACLK_CRYPTO            199
+#define ACLK_RGA               200
+
+/* pclk gates */
+#define PCLK_GPIO0             320
+#define PCLK_GPIO1             321
+#define PCLK_GPIO2             322
+#define PCLK_GPIO3             323
+#define PCLK_GPIO4             324
+#define PCLK_GPIO5             325
+#define PCLK_GPIO6             326
+#define PCLK_GPIO7             327
+#define PCLK_GPIO8             328
+#define PCLK_GRF               329
+#define PCLK_SGRF              330
+#define PCLK_PMU               331
+#define PCLK_I2C0              332
+#define PCLK_I2C1              333
+#define PCLK_I2C2              334
+#define PCLK_I2C3              335
+#define PCLK_I2C4              336
+#define PCLK_I2C5              337
+#define PCLK_SPI0              338
+#define PCLK_SPI1              339
+#define PCLK_SPI2              340
+#define PCLK_UART0             341
+#define PCLK_UART1             342
+#define PCLK_UART2             343
+#define PCLK_UART3             344
+#define PCLK_UART4             345
+#define PCLK_TSADC             346
+#define PCLK_SARADC            347
+#define PCLK_SIM               348
+#define PCLK_GMAC              349
+#define PCLK_PWM               350
+#define PCLK_RKPWM             351
+#define PCLK_PS2C              352
+#define PCLK_TIMER             353
+#define PCLK_TZPC              354
+
+/* hclk gates */
+#define HCLK_GPS               448
+#define HCLK_OTG0              449
+#define HCLK_USBHOST0          450
+#define HCLK_USBHOST1          451
+#define HCLK_HSIC              452
+#define HCLK_NANDC0            453
+#define HCLK_NANDC1            454
+#define HCLK_TSP               455
+#define HCLK_SDMMC             456
+#define HCLK_SDIO0             457
+#define HCLK_SDIO1             458
+#define HCLK_EMMC              459
+#define HCLK_HSADC             460
+#define HCLK_CRYPTO            461
+#define HCLK_I2S0              462
+#define HCLK_SPDIF             463
+#define HCLK_SPDIF8CH          464
+#define HCLK_VOP0              465
+#define HCLK_VOP1              466
+#define HCLK_ROM               467
+#define HCLK_IEP               468
+#define HCLK_ISP               469
+#define HCLK_RGA               470
+
+#define CLK_NR_CLKS            (HCLK_RGA + 1)
+
+/* soft-reset indices */
+#define SRST_CORE0             0
+#define SRST_CORE1             1
+#define SRST_CORE2             2
+#define SRST_CORE3             3
+#define SRST_CORE0_PO          4
+#define SRST_CORE1_PO          5
+#define SRST_CORE2_PO          6
+#define SRST_CORE3_PO          7
+#define SRST_PDCORE_STRSYS     8
+#define SRST_PDBUS_STRSYS      9
+#define SRST_L2C               10
+#define SRST_TOPDBG            11
+#define SRST_CORE0_DBG         12
+#define SRST_CORE1_DBG         13
+#define SRST_CORE2_DBG         14
+#define SRST_CORE3_DBG         15
+
+#define SRST_PDBUG_AHB_ARBITOR 16
+#define SRST_EFUSE256          17
+#define SRST_DMAC1             18
+#define SRST_INTMEM            19
+#define SRST_ROM               20
+#define SRST_SPDIF8CH          21
+#define SRST_TIMER             22
+#define SRST_I2S0              23
+#define SRST_SPDIF             24
+#define SRST_TIMER0            25
+#define SRST_TIMER1            26
+#define SRST_TIMER2            27
+#define SRST_TIMER3            28
+#define SRST_TIMER4            29
+#define SRST_TIMER5            30
+#define SRST_EFUSE             31
+
+#define SRST_GPIO0             32
+#define SRST_GPIO1             33
+#define SRST_GPIO2             34
+#define SRST_GPIO3             35
+#define SRST_GPIO4             36
+#define SRST_GPIO5             37
+#define SRST_GPIO6             38
+#define SRST_GPIO7             39
+#define SRST_GPIO8             40
+#define SRST_I2C0              42
+#define SRST_I2C1              43
+#define SRST_I2C2              44
+#define SRST_I2C3              45
+#define SRST_I2C4              46
+#define SRST_I2C5              47
+
+#define SRST_DWPWM             48
+#define SRST_MMC_PERI          49
+#define SRST_PERIPH_MMU                50
+#define SRST_DAP               51
+#define SRST_DAP_SYS           52
+#define SRST_TPIU              53
+#define SRST_PMU_APB           54
+#define SRST_GRF               55
+#define SRST_PMU               56
+#define SRST_PERIPH_AXI                57
+#define SRST_PERIPH_AHB                58
+#define SRST_PERIPH_APB                59
+#define SRST_PERIPH_NIU                60
+#define SRST_PDPERI_AHB_ARBI   61
+#define SRST_EMEM              62
+#define SRST_USB_PERI          63
+
+#define SRST_DMAC2             64
+#define SRST_MAC               66
+#define SRST_GPS               67
+#define SRST_RKPWM             69
+#define SRST_CCP               71
+#define SRST_USBHOST0          72
+#define SRST_HSIC              73
+#define SRST_HSIC_AUX          74
+#define SRST_HSIC_PHY          75
+#define SRST_HSADC             76
+#define SRST_NANDC0            77
+#define SRST_NANDC1            78
+
+#define SRST_TZPC              80
+#define SRST_SPI0              83
+#define SRST_SPI1              84
+#define SRST_SPI2              85
+#define SRST_SARADC            87
+#define SRST_PDALIVE_NIU       88
+#define SRST_PDPMU_INTMEM      89
+#define SRST_PDPMU_NIU         90
+#define SRST_SGRF              91
+
+#define SRST_VIO_ARBI          96
+#define SRST_RGA_NIU           97
+#define SRST_VIO0_NIU_AXI      98
+#define SRST_VIO_NIU_AHB       99
+#define SRST_LCDC0_AXI         100
+#define SRST_LCDC0_AHB         101
+#define SRST_LCDC0_DCLK                102
+#define SRST_VIO1_NIU_AXI      103
+#define SRST_VIP               104
+#define SRST_RGA_CORE          105
+#define SRST_IEP_AXI           106
+#define SRST_IEP_AHB           107
+#define SRST_RGA_AXI           108
+#define SRST_RGA_AHB           109
+#define SRST_ISP               110
+#define SRST_EDP               111
+
+#define SRST_VCODEC_AXI                112
+#define SRST_VCODEC_AHB                113
+#define SRST_VIO_H2P           114
+#define SRST_MIPIDSI0          115
+#define SRST_MIPIDSI1          116
+#define SRST_MIPICSI           117
+#define SRST_LVDS_PHY          118
+#define SRST_LVDS_CON          119
+#define SRST_GPU               120
+#define SRST_HDMI              121
+#define SRST_CORE_PVTM         124
+#define SRST_GPU_PVTM          125
+
+#define SRST_MMC0              128
+#define SRST_SDIO0             129
+#define SRST_SDIO1             130
+#define SRST_EMMC              131
+#define SRST_USBOTG_AHB                132
+#define SRST_USBOTG_PHY                133
+#define SRST_USBOTG_CON                134
+#define SRST_USBHOST0_AHB      135
+#define SRST_USBHOST0_PHY      136
+#define SRST_USBHOST0_CON      137
+#define SRST_USBHOST1_AHB      138
+#define SRST_USBHOST1_PHY      139
+#define SRST_USBHOST1_CON      140
+#define SRST_USB_ADP           141
+#define SRST_ACC_EFUSE         142
index a916029..00953d9 100644 (file)
 #define VF610_CLK_DMAMUX1              151
 #define VF610_CLK_DMAMUX2              152
 #define VF610_CLK_DMAMUX3              153
-#define VF610_CLK_END                  154
+#define VF610_CLK_FLEXCAN0_EN          154
+#define VF610_CLK_FLEXCAN1_EN          155
+#define VF610_CLK_END                  156
 
 #endif /* __DT_BINDINGS_CLOCK_VF610_H */
diff --git a/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h b/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h
new file mode 100644 (file)
index 0000000..914d56d
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H
+#define _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H 1
+
+#define TEGRA_XUSB_PADCTL_PCIE 0
+#define TEGRA_XUSB_PADCTL_SATA 1
+
+#endif /* _DT_BINDINGS_PINCTRL_TEGRA_XUSB_H */
diff --git a/include/linux/platform_data/camera-mx1.h b/include/linux/platform_data/camera-mx1.h
deleted file mode 100644 (file)
index 4fd6c70..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * mx1_camera.h - i.MX1/i.MXL camera driver header file
- *
- * Copyright (c) 2008, Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- * Copyright (C) 2009, Darius Augulis <augulis.darius@gmail.com>
- *
- * Based on PXA camera.h file:
- * Copyright (C) 2003, Intel Corporation
- * Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.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.
- */
-
-#ifndef __ASM_ARCH_CAMERA_H_
-#define __ASM_ARCH_CAMERA_H_
-
-#define MX1_CAMERA_DATA_HIGH   1
-#define MX1_CAMERA_PCLK_RISING 2
-#define MX1_CAMERA_VSYNC_HIGH  4
-
-extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end;
-
-/**
- * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data
- * @mclk_10khz:        master clock frequency in 10kHz units
- * @flags:     MX1 camera platform flags
- */
-struct mx1_camera_pdata {
-       unsigned long mclk_10khz;
-       unsigned long flags;
-};
-
-#endif /* __ASM_ARCH_CAMERA_H_ */
index 7eb9d13..157e71f 100644 (file)
@@ -1,46 +1,6 @@
 #ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
 #define __INCLUDE_ASM_ARCH_MXC_EHCI_H
 
-/* values for portsc field */
-#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
-#define MXC_EHCI_FORCE_FS              (1 << 24)
-#define MXC_EHCI_UTMI_8BIT             (0 << 28)
-#define MXC_EHCI_UTMI_16BIT            (1 << 28)
-#define MXC_EHCI_SERIAL                        (1 << 29)
-#define MXC_EHCI_MODE_UTMI             (0 << 30)
-#define MXC_EHCI_MODE_PHILIPS          (1 << 30)
-#define MXC_EHCI_MODE_ULPI             (2 << 30)
-#define MXC_EHCI_MODE_SERIAL           (3 << 30)
-
-/* values for flags field */
-#define MXC_EHCI_INTERFACE_DIFF_UNI    (0 << 0)
-#define MXC_EHCI_INTERFACE_DIFF_BI     (1 << 0)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI  (2 << 0)
-#define MXC_EHCI_INTERFACE_SINGLE_BI   (3 << 0)
-#define MXC_EHCI_INTERFACE_MASK                (0xf)
-
-#define MXC_EHCI_POWER_PINS_ENABLED    (1 << 5)
-#define MXC_EHCI_PWR_PIN_ACTIVE_HIGH   (1 << 6)
-#define MXC_EHCI_OC_PIN_ACTIVE_LOW     (1 << 7)
-#define MXC_EHCI_TTL_ENABLED           (1 << 8)
-
-#define MXC_EHCI_INTERNAL_PHY          (1 << 9)
-#define MXC_EHCI_IPPUE_DOWN            (1 << 10)
-#define MXC_EHCI_IPPUE_UP              (1 << 11)
-#define MXC_EHCI_WAKEUP_ENABLED                (1 << 12)
-#define MXC_EHCI_ITC_NO_THRESHOLD      (1 << 13)
-
-#define MXC_USBCTRL_OFFSET             0
-#define MXC_USB_PHY_CTR_FUNC_OFFSET    0x8
-#define MXC_USB_PHY_CTR_FUNC2_OFFSET   0xc
-#define MXC_USBH2CTRL_OFFSET           0x14
-
-#define MX5_USBOTHER_REGS_OFFSET       0x800
-
-/* USB_PHY_CTRL_FUNC2*/
-#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_MASK              0x3
-#define MX5_USB_UTMI_PHYCTRL1_PLLDIV_SHIFT             0
-
 struct mxc_usbh_platform_data {
        int (*init)(struct platform_device *pdev);
        int (*exit)(struct platform_device *pdev);
@@ -49,11 +9,5 @@ struct mxc_usbh_platform_data {
        struct usb_phy          *otg;
 };
 
-int mx51_initialize_usb_hw(int port, unsigned int flags);
-int mx25_initialize_usb_hw(int port, unsigned int flags);
-int mx31_initialize_usb_hw(int port, unsigned int flags);
-int mx35_initialize_usb_hw(int port, unsigned int flags);
-int mx27_initialize_usb_hw(int port, unsigned int flags);
-
 #endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */
 
diff --git a/include/linux/platform_data/usb-imx_udc.h b/include/linux/platform_data/usb-imx_udc.h
deleted file mode 100644 (file)
index be27337..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *     Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.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 __ASM_ARCH_MXC_USB
-#define __ASM_ARCH_MXC_USB
-
-struct imxusb_platform_data {
-       int (*init)(struct device *);
-       void (*exit)(struct device *);
-};
-
-#endif /* __ASM_ARCH_MXC_USB */
diff --git a/include/linux/tegra-ahb.h b/include/linux/tegra-ahb.h
deleted file mode 100644 (file)
index f1cd075..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __LINUX_AHB_H__
-#define __LINUX_AHB_H__
-
-extern int tegra_ahb_enable_smmu(struct device_node *ahb);
-
-#endif /* __LINUX_AHB_H__ */
diff --git a/include/linux/tegra-cpuidle.h b/include/linux/tegra-cpuidle.h
deleted file mode 100644 (file)
index 9c6286b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- */
-
-#ifndef __LINUX_TEGRA_CPUIDLE_H__
-#define __LINUX_TEGRA_CPUIDLE_H__
-
-#ifdef CONFIG_CPU_IDLE
-void tegra_cpuidle_pcie_irqs_in_use(void);
-#else
-static inline void tegra_cpuidle_pcie_irqs_in_use(void)
-{
-}
-#endif
-
-#endif
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h
deleted file mode 100644 (file)
index 46f0a07..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2010 Google, Inc
- *
- * Author:
- *     Colin Cross <ccross@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * 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 _MACH_TEGRA_POWERGATE_H_
-#define _MACH_TEGRA_POWERGATE_H_
-
-struct clk;
-struct reset_control;
-
-#define TEGRA_POWERGATE_CPU    0
-#define TEGRA_POWERGATE_3D     1
-#define TEGRA_POWERGATE_VENC   2
-#define TEGRA_POWERGATE_PCIE   3
-#define TEGRA_POWERGATE_VDEC   4
-#define TEGRA_POWERGATE_L2     5
-#define TEGRA_POWERGATE_MPE    6
-#define TEGRA_POWERGATE_HEG    7
-#define TEGRA_POWERGATE_SATA   8
-#define TEGRA_POWERGATE_CPU1   9
-#define TEGRA_POWERGATE_CPU2   10
-#define TEGRA_POWERGATE_CPU3   11
-#define TEGRA_POWERGATE_CELP   12
-#define TEGRA_POWERGATE_3D1    13
-#define TEGRA_POWERGATE_CPU0   14
-#define TEGRA_POWERGATE_C0NC   15
-#define TEGRA_POWERGATE_C1NC   16
-#define TEGRA_POWERGATE_SOR    17
-#define TEGRA_POWERGATE_DIS    18
-#define TEGRA_POWERGATE_DISB   19
-#define TEGRA_POWERGATE_XUSBA  20
-#define TEGRA_POWERGATE_XUSBB  21
-#define TEGRA_POWERGATE_XUSBC  22
-#define TEGRA_POWERGATE_VIC    23
-#define TEGRA_POWERGATE_IRAM   24
-
-#define TEGRA_POWERGATE_3D0    TEGRA_POWERGATE_3D
-
-#define TEGRA_IO_RAIL_CSIA     0
-#define TEGRA_IO_RAIL_CSIB     1
-#define TEGRA_IO_RAIL_DSI      2
-#define TEGRA_IO_RAIL_MIPI_BIAS        3
-#define TEGRA_IO_RAIL_PEX_BIAS 4
-#define TEGRA_IO_RAIL_PEX_CLK1 5
-#define TEGRA_IO_RAIL_PEX_CLK2 6
-#define TEGRA_IO_RAIL_USB0     9
-#define TEGRA_IO_RAIL_USB1     10
-#define TEGRA_IO_RAIL_USB2     11
-#define TEGRA_IO_RAIL_USB_BIAS 12
-#define TEGRA_IO_RAIL_NAND     13
-#define TEGRA_IO_RAIL_UART     14
-#define TEGRA_IO_RAIL_BB       15
-#define TEGRA_IO_RAIL_AUDIO    17
-#define TEGRA_IO_RAIL_HSIC     19
-#define TEGRA_IO_RAIL_COMP     22
-#define TEGRA_IO_RAIL_HDMI     28
-#define TEGRA_IO_RAIL_PEX_CNTRL        32
-#define TEGRA_IO_RAIL_SDMMC1   33
-#define TEGRA_IO_RAIL_SDMMC3   34
-#define TEGRA_IO_RAIL_SDMMC4   35
-#define TEGRA_IO_RAIL_CAM      36
-#define TEGRA_IO_RAIL_RES      37
-#define TEGRA_IO_RAIL_HV       38
-#define TEGRA_IO_RAIL_DSIB     39
-#define TEGRA_IO_RAIL_DSIC     40
-#define TEGRA_IO_RAIL_DSID     41
-#define TEGRA_IO_RAIL_CSIE     44
-#define TEGRA_IO_RAIL_LVDS     57
-#define TEGRA_IO_RAIL_SYS_DDC  58
-
-#ifdef CONFIG_ARCH_TEGRA
-int tegra_powergate_is_powered(int id);
-int tegra_powergate_power_on(int id);
-int tegra_powergate_power_off(int id);
-int tegra_powergate_remove_clamping(int id);
-
-/* Must be called with clk disabled, and returns with clk enabled */
-int tegra_powergate_sequence_power_up(int id, struct clk *clk,
-                                     struct reset_control *rst);
-
-int tegra_io_rail_power_on(int id);
-int tegra_io_rail_power_off(int id);
-#else
-static inline int tegra_powergate_is_powered(int id)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_powergate_power_on(int id)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_powergate_power_off(int id)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_powergate_remove_clamping(int id)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk,
-                                                   struct reset_control *rst)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_io_rail_power_on(int id)
-{
-       return -ENOSYS;
-}
-
-static inline int tegra_io_rail_power_off(int id)
-{
-       return -ENOSYS;
-}
-#endif
-
-#endif /* _MACH_TEGRA_POWERGATE_H_ */
diff --git a/include/linux/tegra-soc.h b/include/linux/tegra-soc.h
deleted file mode 100644 (file)
index 95f611d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __LINUX_TEGRA_SOC_H_
-#define __LINUX_TEGRA_SOC_H_
-
-u32 tegra_read_chipid(void);
-
-#endif /* __LINUX_TEGRA_SOC_H_ */
diff --git a/include/soc/tegra/ahb.h b/include/soc/tegra/ahb.h
new file mode 100644 (file)
index 0000000..504eb6f
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef __SOC_TEGRA_AHB_H__
+#define __SOC_TEGRA_AHB_H__
+
+extern int tegra_ahb_enable_smmu(struct device_node *ahb);
+
+#endif /* __SOC_TEGRA_AHB_H__ */
diff --git a/include/soc/tegra/cpuidle.h b/include/soc/tegra/cpuidle.h
new file mode 100644 (file)
index 0000000..ea04f42
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef __SOC_TEGRA_CPUIDLE_H__
+#define __SOC_TEGRA_CPUIDLE_H__
+
+#ifdef CONFIG_CPU_IDLE
+void tegra_cpuidle_pcie_irqs_in_use(void);
+#else
+static inline void tegra_cpuidle_pcie_irqs_in_use(void)
+{
+}
+#endif
+
+#endif /* __SOC_TEGRA_CPUIDLE_H__ */
diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h
new file mode 100644 (file)
index 0000000..738712d
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __SOC_TEGRA_FUSE_H__
+#define __SOC_TEGRA_FUSE_H__
+
+#define TEGRA20                0x20
+#define TEGRA30                0x30
+#define TEGRA114       0x35
+#define TEGRA124       0x40
+
+#define TEGRA_FUSE_SKU_CALIB_0 0xf0
+#define TEGRA30_FUSE_SATA_CALIB        0x124
+
+#ifndef __ASSEMBLY__
+
+u32 tegra_read_chipid(void);
+u8 tegra_get_chip_id(void);
+
+enum tegra_revision {
+       TEGRA_REVISION_UNKNOWN = 0,
+       TEGRA_REVISION_A01,
+       TEGRA_REVISION_A02,
+       TEGRA_REVISION_A03,
+       TEGRA_REVISION_A03p,
+       TEGRA_REVISION_A04,
+       TEGRA_REVISION_MAX,
+};
+
+struct tegra_sku_info {
+       int sku_id;
+       int cpu_process_id;
+       int cpu_speedo_id;
+       int cpu_speedo_value;
+       int cpu_iddq_value;
+       int core_process_id;
+       int soc_speedo_id;
+       int gpu_speedo_id;
+       int gpu_process_id;
+       int gpu_speedo_value;
+       enum tegra_revision revision;
+};
+
+u32 tegra_read_straps(void);
+u32 tegra_read_chipid(void);
+void tegra_init_fuse(void);
+int tegra_fuse_readl(unsigned long offset, u32 *value);
+
+extern struct tegra_sku_info tegra_sku_info;
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __SOC_TEGRA_FUSE_H__ */
diff --git a/include/soc/tegra/powergate.h b/include/soc/tegra/powergate.h
new file mode 100644 (file)
index 0000000..c16912e
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2010 Google, Inc
+ *
+ * Author:
+ *     Colin Cross <ccross@google.com>
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 __SOC_TEGRA_POWERGATE_H__
+#define __SOC_TEGRA_POWERGATE_H__
+
+struct clk;
+struct reset_control;
+
+#define TEGRA_POWERGATE_CPU    0
+#define TEGRA_POWERGATE_3D     1
+#define TEGRA_POWERGATE_VENC   2
+#define TEGRA_POWERGATE_PCIE   3
+#define TEGRA_POWERGATE_VDEC   4
+#define TEGRA_POWERGATE_L2     5
+#define TEGRA_POWERGATE_MPE    6
+#define TEGRA_POWERGATE_HEG    7
+#define TEGRA_POWERGATE_SATA   8
+#define TEGRA_POWERGATE_CPU1   9
+#define TEGRA_POWERGATE_CPU2   10
+#define TEGRA_POWERGATE_CPU3   11
+#define TEGRA_POWERGATE_CELP   12
+#define TEGRA_POWERGATE_3D1    13
+#define TEGRA_POWERGATE_CPU0   14
+#define TEGRA_POWERGATE_C0NC   15
+#define TEGRA_POWERGATE_C1NC   16
+#define TEGRA_POWERGATE_SOR    17
+#define TEGRA_POWERGATE_DIS    18
+#define TEGRA_POWERGATE_DISB   19
+#define TEGRA_POWERGATE_XUSBA  20
+#define TEGRA_POWERGATE_XUSBB  21
+#define TEGRA_POWERGATE_XUSBC  22
+#define TEGRA_POWERGATE_VIC    23
+#define TEGRA_POWERGATE_IRAM   24
+
+#define TEGRA_POWERGATE_3D0    TEGRA_POWERGATE_3D
+
+#define TEGRA_IO_RAIL_CSIA     0
+#define TEGRA_IO_RAIL_CSIB     1
+#define TEGRA_IO_RAIL_DSI      2
+#define TEGRA_IO_RAIL_MIPI_BIAS        3
+#define TEGRA_IO_RAIL_PEX_BIAS 4
+#define TEGRA_IO_RAIL_PEX_CLK1 5
+#define TEGRA_IO_RAIL_PEX_CLK2 6
+#define TEGRA_IO_RAIL_USB0     9
+#define TEGRA_IO_RAIL_USB1     10
+#define TEGRA_IO_RAIL_USB2     11
+#define TEGRA_IO_RAIL_USB_BIAS 12
+#define TEGRA_IO_RAIL_NAND     13
+#define TEGRA_IO_RAIL_UART     14
+#define TEGRA_IO_RAIL_BB       15
+#define TEGRA_IO_RAIL_AUDIO    17
+#define TEGRA_IO_RAIL_HSIC     19
+#define TEGRA_IO_RAIL_COMP     22
+#define TEGRA_IO_RAIL_HDMI     28
+#define TEGRA_IO_RAIL_PEX_CNTRL        32
+#define TEGRA_IO_RAIL_SDMMC1   33
+#define TEGRA_IO_RAIL_SDMMC3   34
+#define TEGRA_IO_RAIL_SDMMC4   35
+#define TEGRA_IO_RAIL_CAM      36
+#define TEGRA_IO_RAIL_RES      37
+#define TEGRA_IO_RAIL_HV       38
+#define TEGRA_IO_RAIL_DSIB     39
+#define TEGRA_IO_RAIL_DSIC     40
+#define TEGRA_IO_RAIL_DSID     41
+#define TEGRA_IO_RAIL_CSIE     44
+#define TEGRA_IO_RAIL_LVDS     57
+#define TEGRA_IO_RAIL_SYS_DDC  58
+
+#ifdef CONFIG_ARCH_TEGRA
+int tegra_powergate_is_powered(int id);
+int tegra_powergate_power_on(int id);
+int tegra_powergate_power_off(int id);
+int tegra_powergate_remove_clamping(int id);
+
+/* Must be called with clk disabled, and returns with clk enabled */
+int tegra_powergate_sequence_power_up(int id, struct clk *clk,
+                                     struct reset_control *rst);
+
+int tegra_io_rail_power_on(int id);
+int tegra_io_rail_power_off(int id);
+#else
+static inline int tegra_powergate_is_powered(int id)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_powergate_power_on(int id)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_powergate_power_off(int id)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_powergate_remove_clamping(int id)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk,
+                                                   struct reset_control *rst)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_io_rail_power_on(int id)
+{
+       return -ENOSYS;
+}
+
+static inline int tegra_io_rail_power_off(int id)
+{
+       return -ENOSYS;
+}
+#endif
+
+#endif /* __SOC_TEGRA_POWERGATE_H__ */