aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig63
-rw-r--r--arch/arm/Kconfig.debug53
-rw-r--r--arch/arm/Makefile3
-rw-r--r--arch/arm/boot/compressed/Makefile15
-rw-r--r--arch/arm/boot/compressed/head-shmobile.S30
-rw-r--r--arch/arm/boot/compressed/mmcif-sh7372.c88
-rw-r--r--arch/arm/boot/compressed/sdhi-sh7372.c95
-rw-r--r--arch/arm/boot/compressed/sdhi-shmobile.c449
-rw-r--r--arch/arm/boot/compressed/sdhi-shmobile.h11
-rw-r--r--arch/arm/boot/dts/Makefile35
-rw-r--r--arch/arm/boot/dts/alpine-db.dts35
-rw-r--r--arch/arm/boot/dts/alpine.dtsi160
-rw-r--r--arch/arm/boot/dts/am335x-chiliboard.dts112
-rw-r--r--arch/arm/boot/dts/am335x-chilisom.dtsi239
-rw-r--r--arch/arm/boot/dts/am335x-evmsk.dts11
-rw-r--r--arch/arm/boot/dts/am335x-nano.dts18
-rw-r--r--arch/arm/boot/dts/am33xx-clocks.dtsi2
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi87
-rw-r--r--arch/arm/boot/dts/am3517.dtsi2
-rw-r--r--arch/arm/boot/dts/am35xx-clocks.dtsi2
-rw-r--r--arch/arm/boot/dts/am4372.dtsi91
-rw-r--r--arch/arm/boot/dts/am437x-idk-evm.dts22
-rw-r--r--arch/arm/boot/dts/am43x-epos-evm.dts84
-rw-r--r--arch/arm/boot/dts/am43xx-clocks.dtsi2
-rw-r--r--arch/arm/boot/dts/am57xx-beagle-x15.dts58
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts13
-rw-r--r--arch/arm/boot/dts/armada-370-mirabox.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-netgear-rn102.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-netgear-rn104.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-rd.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-synology-ds213j.dts3
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi11
-rw-r--r--arch/arm/boot/dts/armada-370.dtsi3
-rw-r--r--arch/arm/boot/dts/armada-375-db.dts2
-rw-r--r--arch/arm/boot/dts/armada-375.dtsi15
-rw-r--r--arch/arm/boot/dts/armada-385-db-ap.dts44
-rw-r--r--arch/arm/boot/dts/armada-388-db.dts4
-rw-r--r--arch/arm/boot/dts/armada-388-gp.dts5
-rw-r--r--arch/arm/boot/dts/armada-388-rd.dts12
-rw-r--r--arch/arm/boot/dts/armada-38x.dtsi23
-rw-r--r--arch/arm/boot/dts/armada-390.dtsi57
-rw-r--r--arch/arm/boot/dts/armada-398-db.dts153
-rw-r--r--arch/arm/boot/dts/armada-398.dtsi60
-rw-r--r--arch/arm/boot/dts/armada-39x.dtsi508
-rw-r--r--arch/arm/boot/dts/armada-xp-axpwifiap.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-db.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-gp.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts3
-rw-r--r--arch/arm/boot/dts/armada-xp-linksys-mamba.dts393
-rw-r--r--arch/arm/boot/dts/armada-xp-matrix.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi1
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi1
-rw-r--r--arch/arm/boot/dts/armada-xp-netgear-rn2120.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts2
-rw-r--r--arch/arm/boot/dts/armada-xp-synology-ds414.dts3
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi8
-rw-r--r--arch/arm/boot/dts/at91-sama5d3_xplained.dts14
-rw-r--r--arch/arm/boot/dts/at91-sama5d4_xplained.dts241
-rw-r--r--arch/arm/boot/dts/at91-sama5d4ek.dts55
-rw-r--r--arch/arm/boot/dts/at91rm9200.dtsi8
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9261.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9g25.dtsi1
-rw-r--r--arch/arm/boot/dts/at91sam9g25ek.dts18
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9n12.dtsi11
-rw-r--r--arch/arm/boot/dts/at91sam9n12ek.dts18
-rw-r--r--arch/arm/boot/dts/at91sam9rl.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi2
-rw-r--r--arch/arm/boot/dts/at91sam9x5_isi.dtsi46
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi4
-rw-r--r--arch/arm/boot/dts/at91sam9x5ek.dtsi48
-rw-r--r--arch/arm/boot/dts/bcm-cygnus.dtsi78
-rw-r--r--arch/arm/boot/dts/bcm4708-netgear-r6250.dts4
-rw-r--r--arch/arm/boot/dts/bcm4709-netgear-r8000.dts77
-rw-r--r--arch/arm/boot/dts/bcm7445.dtsi14
-rw-r--r--arch/arm/boot/dts/bcm911360_entphn.dts13
-rw-r--r--arch/arm/boot/dts/bcm958300k.dts8
-rw-r--r--arch/arm/boot/dts/bcm958305k.dts53
-rw-r--r--arch/arm/boot/dts/dm8168-evm.dts14
-rw-r--r--arch/arm/boot/dts/dm816x.dtsi60
-rw-r--r--arch/arm/boot/dts/dove.dtsi63
-rw-r--r--arch/arm/boot/dts/dra7-evm.dts8
-rw-r--r--arch/arm/boot/dts/dra7.dtsi182
-rw-r--r--arch/arm/boot/dts/dra72-evm.dts8
-rw-r--r--arch/arm/boot/dts/dra72x.dtsi5
-rw-r--r--arch/arm/boot/dts/dra74x.dtsi5
-rw-r--r--arch/arm/boot/dts/dra7xx-clocks.dtsi8
-rw-r--r--arch/arm/boot/dts/emev2-kzm9d.dts13
-rw-r--r--arch/arm/boot/dts/emev2.dtsi10
-rw-r--r--arch/arm/boot/dts/exynos3250.dtsi4
-rw-r--r--arch/arm/boot/dts/exynos4412-odroid-common.dtsi14
-rw-r--r--arch/arm/boot/dts/exynos5250-snow.dts57
-rw-r--r--arch/arm/boot/dts/exynos5250-spring.dts21
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5420-arndale-octa.dts4
-rw-r--r--arch/arm/boot/dts/exynos5420-peach-pit.dts99
-rw-r--r--arch/arm/boot/dts/exynos5420-pinctrl.dtsi7
-rw-r--r--arch/arm/boot/dts/exynos5420-smdk5420.dts7
-rw-r--r--arch/arm/boot/dts/exynos5420.dtsi10
-rw-r--r--arch/arm/boot/dts/exynos5422-odroidxu3.dts21
-rw-r--r--arch/arm/boot/dts/exynos5800-peach-pi.dts71
-rw-r--r--arch/arm/boot/dts/imx25-pdk.dts58
-rw-r--r--arch/arm/boot/dts/imx25-pinfunc.h86
-rw-r--r--arch/arm/boot/dts/imx27.dtsi2
-rw-r--r--arch/arm/boot/dts/imx28-apf28.dts2
-rw-r--r--arch/arm/boot/dts/imx28-apf28dev.dts30
-rw-r--r--arch/arm/boot/dts/imx28.dtsi14
-rw-r--r--arch/arm/boot/dts/imx35.dtsi1
-rw-r--r--arch/arm/boot/dts/imx50.dtsi3
-rw-r--r--arch/arm/boot/dts/imx51.dtsi3
-rw-r--r--arch/arm/boot/dts/imx53.dtsi3
-rw-r--r--arch/arm/boot/dts/imx6dl-aristainetos_4.dts4
-rw-r--r--arch/arm/boot/dts/imx6dl-aristainetos_7.dts4
-rw-r--r--arch/arm/boot/dts/imx6dl-cubox-i.dts38
-rw-r--r--arch/arm/boot/dts/imx6dl-hummingboard.dts38
-rw-r--r--arch/arm/boot/dts/imx6q-cubox-i.dts38
-rw-r--r--arch/arm/boot/dts/imx6q-hummingboard.dts38
-rw-r--r--arch/arm/boot/dts/imx6q.dtsi20
-rw-r--r--arch/arm/boot/dts/imx6qdl-cubox-i.dtsi62
-rw-r--r--arch/arm/boot/dts/imx6qdl-hummingboard.dtsi101
-rw-r--r--arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi38
-rw-r--r--arch/arm/boot/dts/imx6qdl-microsom.dtsi38
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabreauto.dtsi35
-rw-r--r--arch/arm/boot/dts/imx6qdl.dtsi49
-rw-r--r--arch/arm/boot/dts/imx6sl-warp.dts262
-rw-r--r--arch/arm/boot/dts/imx6sl.dtsi13
-rw-r--r--arch/arm/boot/dts/imx6sx-sdb-reva.dts143
-rw-r--r--arch/arm/boot/dts/imx6sx-sdb.dts603
-rw-r--r--arch/arm/boot/dts/imx6sx-sdb.dtsi562
-rw-r--r--arch/arm/boot/dts/imx6sx.dtsi9
-rw-r--r--arch/arm/boot/dts/kirkwood-nas2big.dts143
-rw-r--r--arch/arm/boot/dts/kirkwood-net2big.dts5
-rw-r--r--arch/arm/boot/dts/meson.dtsi20
-rw-r--r--arch/arm/boot/dts/meson6-atv1200.dts4
-rw-r--r--arch/arm/boot/dts/meson8-minix-neo-x8.dts128
-rw-r--r--arch/arm/boot/dts/meson8.dtsi68
-rw-r--r--arch/arm/boot/dts/mt6589.dtsi5
-rw-r--r--arch/arm/boot/dts/nspire-classic.dtsi5
-rw-r--r--arch/arm/boot/dts/nspire-cx.dts4
-rw-r--r--arch/arm/boot/dts/nspire.dtsi21
-rw-r--r--arch/arm/boot/dts/omap2420.dtsi80
-rw-r--r--arch/arm/boot/dts/omap2430-clocks.dtsi8
-rw-r--r--arch/arm/boot/dts/omap2430.dtsi107
-rw-r--r--arch/arm/boot/dts/omap24xx-clocks.dtsi6
-rw-r--r--arch/arm/boot/dts/omap3-beagle-xm.dts1
-rw-r--r--arch/arm/boot/dts/omap3-beagle.dts53
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3517.dts10
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3730.dts10
-rw-r--r--arch/arm/boot/dts/omap3-cm-t3x30.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-devkit8000.dts1
-rw-r--r--arch/arm/boot/dts/omap3-evm-common.dtsi10
-rw-r--r--arch/arm/boot/dts/omap3-gta04.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-igep.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-igep0020-rev-f.dts9
-rw-r--r--arch/arm/boot/dts/omap3-igep0030-rev-g.dts9
-rw-r--r--arch/arm/boot/dts/omap3-lilly-a83x.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-n9.dts37
-rw-r--r--arch/arm/boot/dts/omap3-n900.dts16
-rw-r--r--arch/arm/boot/dts/omap3-n950-n9.dtsi2
-rw-r--r--arch/arm/boot/dts/omap3-n950.dts37
-rw-r--r--arch/arm/boot/dts/omap3-overo-base.dtsi1
-rw-r--r--arch/arm/boot/dts/omap3-pandora-1ghz.dts70
-rw-r--r--arch/arm/boot/dts/omap3-pandora-600mhz.dts65
-rw-r--r--arch/arm/boot/dts/omap3-pandora-common.dtsi640
-rw-r--r--arch/arm/boot/dts/omap3-tao3530.dtsi12
-rw-r--r--arch/arm/boot/dts/omap3-zoom3.dts10
-rw-r--r--arch/arm/boot/dts/omap3.dtsi96
-rw-r--r--arch/arm/boot/dts/omap34xx-hs.dtsi16
-rw-r--r--arch/arm/boot/dts/omap34xx.dtsi17
-rw-r--r--arch/arm/boot/dts/omap36xx-hs.dtsi16
-rw-r--r--arch/arm/boot/dts/omap36xx.dtsi17
-rw-r--r--arch/arm/boot/dts/omap3xxx-clocks.dtsi13
-rw-r--r--arch/arm/boot/dts/omap4-cpu-thermal.dtsi4
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi10
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts11
-rw-r--r--arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi10
-rw-r--r--arch/arm/boot/dts/omap4.dtsi200
-rw-r--r--arch/arm/boot/dts/omap5.dtsi182
-rw-r--r--arch/arm/boot/dts/qcom-apq8064.dtsi51
-rw-r--r--arch/arm/boot/dts/qcom-apq8074-dragonboard.dts2
-rw-r--r--arch/arm/boot/dts/qcom-apq8084-ifc6540.dts1
-rw-r--r--arch/arm/boot/dts/qcom-apq8084-mtp.dts1
-rw-r--r--arch/arm/boot/dts/qcom-apq8084.dtsi56
-rw-r--r--arch/arm/boot/dts/qcom-ipq8064.dtsi38
-rw-r--r--arch/arm/boot/dts/qcom-msm8660.dtsi8
-rw-r--r--arch/arm/boot/dts/qcom-msm8960.dtsi15
-rw-r--r--arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts2
-rw-r--r--arch/arm/boot/dts/qcom-msm8974.dtsi56
-rw-r--r--arch/arm/boot/dts/qcom-pm8841.dtsi18
-rw-r--r--arch/arm/boot/dts/qcom-pm8941.dtsi18
-rw-r--r--arch/arm/boot/dts/qcom-pma8084.dtsi18
-rw-r--r--arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts156
-rw-r--r--arch/arm/boot/dts/r8a73a4-ape6evm.dts59
-rw-r--r--arch/arm/boot/dts/r8a73a4.dtsi557
-rw-r--r--arch/arm/boot/dts/r8a7740.dtsi79
-rw-r--r--arch/arm/boot/dts/r8a7778-bockw.dts174
-rw-r--r--arch/arm/boot/dts/r8a7778.dtsi293
-rw-r--r--arch/arm/boot/dts/r8a7779-marzen.dts9
-rw-r--r--arch/arm/boot/dts/r8a7790-lager.dts87
-rw-r--r--arch/arm/boot/dts/r8a7790.dtsi259
-rw-r--r--arch/arm/boot/dts/r8a7791-henninger.dts11
-rw-r--r--arch/arm/boot/dts/r8a7791-koelsch.dts87
-rw-r--r--arch/arm/boot/dts/r8a7791.dtsi278
-rw-r--r--arch/arm/boot/dts/r8a7794-alt.dts13
-rw-r--r--arch/arm/boot/dts/r8a7794.dtsi157
-rw-r--r--arch/arm/boot/dts/rk3188-radxarock.dts16
-rw-r--r--arch/arm/boot/dts/rk3288-evb-act8846.dts10
-rw-r--r--arch/arm/boot/dts/rk3288-evb-rk808.dts7
-rw-r--r--arch/arm/boot/dts/rk3288-evb.dtsi13
-rw-r--r--arch/arm/boot/dts/rk3288-firefly.dtsi20
-rw-r--r--arch/arm/boot/dts/rk3288-popmetal.dts447
-rw-r--r--arch/arm/boot/dts/rk3288.dtsi35
-rw-r--r--arch/arm/boot/dts/sama5d3.dtsi36
-rw-r--r--arch/arm/boot/dts/sama5d35ek.dts2
-rw-r--r--arch/arm/boot/dts/sama5d3_can.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3_emac.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3_gmac.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3_lcd.dtsi207
-rw-r--r--arch/arm/boot/dts/sama5d3_mci2.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3_tcb1.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d3_uart.dtsi2
-rw-r--r--arch/arm/boot/dts/sama5d4.dtsi344
-rw-r--r--arch/arm/boot/dts/sh7372-mackerel.dts26
-rw-r--r--arch/arm/boot/dts/sh7372.dtsi35
-rw-r--r--arch/arm/boot/dts/sh73a0-kzm9g-reference.dts366
-rw-r--r--arch/arm/boot/dts/sh73a0-kzm9g.dts378
-rw-r--r--arch/arm/boot/dts/sh73a0.dtsi245
-rw-r--r--arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi2421
-rw-r--r--arch/arm/boot/dts/tegra124-jetson-tk1.dts557
-rw-r--r--arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi2023
-rw-r--r--arch/arm/boot/dts/tegra124-nyan-big.dts2005
-rw-r--r--arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi2049
-rw-r--r--arch/arm/boot/dts/tegra124-nyan-blaze.dts1334
-rw-r--r--arch/arm/boot/dts/tegra124-nyan.dtsi695
-rw-r--r--arch/arm/boot/dts/tegra124.dtsi19
-rw-r--r--arch/arm/boot/dts/tegra30-beaver.dts1651
-rw-r--r--arch/arm/boot/dts/vf-colibri-eval-v3.dtsi31
-rw-r--r--arch/arm/boot/dts/vf-colibri.dtsi15
-rw-r--r--arch/arm/boot/dts/vf500.dtsi137
-rw-r--r--arch/arm/boot/dts/vfxxx.dtsi64
-rw-r--r--arch/arm/common/mcpm_entry.c202
-rw-r--r--arch/arm/configs/ape6evm_defconfig109
-rw-r--r--arch/arm/configs/at91_dt_defconfig5
-rw-r--r--arch/arm/configs/exynos_defconfig20
-rw-r--r--arch/arm/configs/imx_v4_v5_defconfig4
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig4
-rw-r--r--arch/arm/configs/mackerel_defconfig157
-rw-r--r--arch/arm/configs/msm_defconfig121
-rw-r--r--arch/arm/configs/multi_v5_defconfig2
-rw-r--r--arch/arm/configs/multi_v7_defconfig14
-rw-r--r--arch/arm/configs/mvebu_v7_defconfig2
-rw-r--r--arch/arm/configs/mxs_defconfig1
-rw-r--r--arch/arm/configs/omap1_defconfig16
-rw-r--r--arch/arm/configs/omap2plus_defconfig27
-rw-r--r--arch/arm/configs/qcom_defconfig9
-rw-r--r--arch/arm/configs/shmobile_defconfig9
-rw-r--r--arch/arm/configs/sunxi_defconfig1
-rw-r--r--arch/arm/include/asm/arm-cci.h42
-rw-r--r--arch/arm/include/asm/mcpm.h65
-rw-r--r--arch/arm/include/debug/msm.S14
-rw-r--r--arch/arm/mach-alpine/Kconfig12
-rw-r--r--arch/arm/mach-alpine/Makefile2
-rw-r--r--arch/arm/mach-alpine/alpine_cpu_pm.c70
-rw-r--r--arch/arm/mach-alpine/alpine_cpu_pm.h (renamed from arch/arm/mach-at91/include/mach/io.h)21
-rw-r--r--arch/arm/mach-alpine/alpine_cpu_resume.h38
-rw-r--r--arch/arm/mach-alpine/alpine_machine.c28
-rw-r--r--arch/arm/mach-alpine/platsmp.c49
-rw-r--r--arch/arm/mach-at91/Kconfig132
-rw-r--r--arch/arm/mach-at91/Makefile11
-rw-r--r--arch/arm/mach-at91/at91rm9200.c46
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c251
-rw-r--r--arch/arm/mach-at91/at91sam9.c76
-rw-r--r--arch/arm/mach-at91/generic.h7
-rw-r--r--arch/arm/mach-at91/include/mach/at91_dbgu.h63
-rw-r--r--arch/arm/mach-at91/include/mach/at91_matrix.h23
-rw-r--r--arch/arm/mach-at91/include/mach/at91_ramc.h4
-rw-r--r--arch/arm/mach-at91/include/mach/at91_st.h61
-rw-r--r--arch/arm/mach-at91/include/mach/at91rm9200.h103
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260.h129
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9260_matrix.h80
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261.h99
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9261_matrix.h64
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263.h117
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9263_matrix.h129
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9_smc.h2
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45.h143
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h153
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9n12.h65
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h53
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl.h105
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h96
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9x5.h71
-rw-r--r--arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h53
-rw-r--r--arch/arm/mach-at91/include/mach/cpu.h216
-rw-r--r--arch/arm/mach-at91/include/mach/hardware.h134
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d3.h86
-rw-r--r--arch/arm/mach-at91/include/mach/sama5d4.h33
-rw-r--r--arch/arm/mach-at91/include/mach/uncompress.h218
-rw-r--r--arch/arm/mach-at91/pm.c238
-rw-r--r--arch/arm/mach-at91/pm.h100
-rw-r--r--arch/arm/mach-at91/pm_slowclock.S335
-rw-r--r--arch/arm/mach-at91/pm_suspend.S337
-rw-r--r--arch/arm/mach-at91/sama5.c95
-rw-r--r--arch/arm/mach-at91/setup.c330
-rw-r--r--arch/arm/mach-at91/soc.c97
-rw-r--r--arch/arm/mach-at91/soc.h78
-rw-r--r--arch/arm/mach-bcm/bcm_cygnus.c2
-rw-r--r--arch/arm/mach-cns3xxx/pm.c1
-rw-r--r--arch/arm/mach-davinci/Kconfig11
-rw-r--r--arch/arm/mach-davinci/asp.h7
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c112
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c80
-rw-r--r--arch/arm/mach-davinci/dm646x.c24
-rw-r--r--arch/arm/mach-davinci/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/common.h6
-rw-r--r--arch/arm/mach-exynos/exynos.c3
-rw-r--r--arch/arm/mach-exynos/firmware.c33
-rw-r--r--arch/arm/mach-exynos/mcpm-exynos.c247
-rw-r--r--arch/arm/mach-exynos/platsmp.c23
-rw-r--r--arch/arm/mach-exynos/pm.c14
-rw-r--r--arch/arm/mach-exynos/pm_domains.c29
-rw-r--r--arch/arm/mach-exynos/regs-pmu.h3
-rw-r--r--arch/arm/mach-exynos/smc.h9
-rw-r--r--arch/arm/mach-exynos/suspend.c22
-rw-r--r--arch/arm/mach-imx/Kconfig84
-rw-r--r--arch/arm/mach-imx/Makefile8
-rw-r--r--arch/arm/mach-imx/clk-imx25.c75
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c8
-rw-r--r--arch/arm/mach-imx/common.h7
-rw-r--r--arch/arm/mach-imx/cpu-imx25.c11
-rw-r--r--arch/arm/mach-imx/devices-imx25.h85
-rw-r--r--arch/arm/mach-imx/devices/Kconfig3
-rw-r--r--arch/arm/mach-imx/devices/Makefile1
-rw-r--r--arch/arm/mach-imx/devices/platform-fec.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-fb.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-i2c.c10
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-keypad.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-ssi.c9
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-uart.c12
-rw-r--r--arch/arm/mach-imx/devices/platform-imx2-wdt.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-imxdi_rtc.c42
-rw-r--r--arch/arm/mach-imx/devices/platform-mx2-camera.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc-ehci.c7
-rw-r--r--arch/arm/mach-imx/devices/platform-mxc_nand.c5
-rw-r--r--arch/arm/mach-imx/devices/platform-spi_imx.c11
-rw-r--r--arch/arm/mach-imx/ehci-imx25.c99
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c310
-rw-r--r--arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c2
-rw-r--r--arch/arm/mach-imx/gpc.c353
-rw-r--r--arch/arm/mach-imx/hardware.h1
-rw-r--r--arch/arm/mach-imx/iomux-mx25.h524
-rw-r--r--arch/arm/mach-imx/iomux-mx3.h2
-rw-r--r--arch/arm/mach-imx/iomux-v3.c5
-rw-r--r--arch/arm/mach-imx/iomux-v3.h5
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c2
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c172
-rw-r--r--arch/arm/mach-imx/mach-imx25.c (renamed from arch/arm/mach-imx/imx25-dt.c)20
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c2
-rw-r--r--arch/arm/mach-imx/mach-imx6sl.c2
-rw-r--r--arch/arm/mach-imx/mach-imx6sx.c2
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c270
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c2
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c2
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c2
-rw-r--r--arch/arm/mach-imx/mm-imx25.c89
-rw-r--r--arch/arm/mach-imx/mx25.h117
-rw-r--r--arch/arm/mach-imx/pm-imx6.c6
-rw-r--r--arch/arm/mach-mediatek/Kconfig1
-rw-r--r--arch/arm/mach-meson/Kconfig3
-rw-r--r--arch/arm/mach-msm/Kconfig109
-rw-r--r--arch/arm/mach-msm/Makefile23
-rw-r--r--arch/arm/mach-msm/Makefile.boot3
-rw-r--r--arch/arm/mach-msm/board-halibut.c110
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c191
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c254
-rw-r--r--arch/arm/mach-msm/board-sapphire.c114
-rw-r--r--arch/arm/mach-msm/board-trout-gpio.c233
-rw-r--r--arch/arm/mach-msm/board-trout-mmc.c185
-rw-r--r--arch/arm/mach-msm/board-trout-panel.c292
-rw-r--r--arch/arm/mach-msm/board-trout.c111
-rw-r--r--arch/arm/mach-msm/board-trout.h162
-rw-r--r--arch/arm/mach-msm/clock-pcom.c176
-rw-r--r--arch/arm/mach-msm/clock-pcom.h145
-rw-r--r--arch/arm/mach-msm/clock.c28
-rw-r--r--arch/arm/mach-msm/clock.h43
-rw-r--r--arch/arm/mach-msm/common.h41
-rw-r--r--arch/arm/mach-msm/devices-msm7x00.c480
-rw-r--r--arch/arm/mach-msm/devices-msm7x30.c246
-rw-r--r--arch/arm/mach-msm/devices-qsd8x50.c388
-rw-r--r--arch/arm/mach-msm/devices.h53
-rw-r--r--arch/arm/mach-msm/dma.c298
-rw-r--r--arch/arm/mach-msm/gpiomux-8x50.c51
-rw-r--r--arch/arm/mach-msm/gpiomux-v1.h67
-rw-r--r--arch/arm/mach-msm/gpiomux.c111
-rw-r--r--arch/arm/mach-msm/gpiomux.h84
-rw-r--r--arch/arm/mach-msm/include/mach/clk.h31
-rw-r--r--arch/arm/mach-msm/include/mach/dma.h151
-rw-r--r--arch/arm/mach-msm/include/mach/entry-macro.S36
-rw-r--r--arch/arm/mach-msm/include/mach/hardware.h18
-rw-r--r--arch/arm/mach-msm/include/mach/irqs-7x00.h75
-rw-r--r--arch/arm/mach-msm/include/mach/irqs-7x30.h153
-rw-r--r--arch/arm/mach-msm/include/mach/irqs-8x50.h88
-rw-r--r--arch/arm/mach-msm/include/mach/irqs.h37
-rw-r--r--arch/arm/mach-msm/include/mach/msm_gpiomux.h38
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-7x00.h108
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-7x30.h103
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap-8x50.h125
-rw-r--r--arch/arm/mach-msm/include/mach/msm_iomap.h53
-rw-r--r--arch/arm/mach-msm/include/mach/msm_smd.h109
-rw-r--r--arch/arm/mach-msm/include/mach/sirc.h98
-rw-r--r--arch/arm/mach-msm/include/mach/vreg.h29
-rw-r--r--arch/arm/mach-msm/io.c161
-rw-r--r--arch/arm/mach-msm/irq-vic.c363
-rw-r--r--arch/arm/mach-msm/irq.c151
-rw-r--r--arch/arm/mach-msm/last_radio_log.c71
-rw-r--r--arch/arm/mach-msm/proc_comm.c129
-rw-r--r--arch/arm/mach-msm/proc_comm.h258
-rw-r--r--arch/arm/mach-msm/sirc.c172
-rw-r--r--arch/arm/mach-msm/smd.c1034
-rw-r--r--arch/arm/mach-msm/smd_debug.c311
-rw-r--r--arch/arm/mach-msm/smd_private.h403
-rw-r--r--arch/arm/mach-msm/vreg.c220
-rw-r--r--arch/arm/mach-mvebu/Kconfig14
-rw-r--r--arch/arm/mach-mvebu/board-v7.c20
-rw-r--r--arch/arm/mach-mvebu/dove.c2
-rw-r--r--arch/arm/mach-mvebu/kirkwood.c2
-rw-r--r--arch/arm/mach-mvebu/platsmp-a9.c2
-rw-r--r--arch/arm/mach-mvebu/pmsu.c16
-rw-r--r--arch/arm/mach-omap1/pm.c51
-rw-r--r--arch/arm/mach-omap2/Kconfig41
-rw-r--r--arch/arm/mach-omap2/Makefile4
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c654
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c433
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c395
-rw-r--r--arch/arm/mach-omap2/clock.c111
-rw-r--r--arch/arm/mach-omap2/clock.h8
-rw-r--r--arch/arm/mach-omap2/cm.h2
-rw-r--r--arch/arm/mach-omap2/cm2xxx.c2
-rw-r--r--arch/arm/mach-omap2/cm2xxx.h2
-rw-r--r--arch/arm/mach-omap2/cm33xx.c2
-rw-r--r--arch/arm/mach-omap2/cm33xx.h3
-rw-r--r--arch/arm/mach-omap2/cm3xxx.c3
-rw-r--r--arch/arm/mach-omap2/cm3xxx.h2
-rw-r--r--arch/arm/mach-omap2/cm44xx.h3
-rw-r--r--arch/arm/mach-omap2/cm_common.c156
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c6
-rw-r--r--arch/arm/mach-omap2/common.c1
-rw-r--r--arch/arm/mach-omap2/common.h3
-rw-r--r--arch/arm/mach-omap2/control.c201
-rw-r--r--arch/arm/mach-omap2/control.h10
-rw-r--r--arch/arm/mach-omap2/display.c15
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c18
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c4
-rw-r--r--arch/arm/mach-omap2/id.c5
-rw-r--r--arch/arm/mach-omap2/io.c114
-rw-r--r--arch/arm/mach-omap2/mux.c2
-rw-r--r--arch/arm/mach-omap2/omap-secure.h7
-rw-r--r--arch/arm/mach-omap2/omap4-common.c69
-rw-r--r--arch/arm/mach-omap2/omap_device.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c36
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c113
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c74
-rw-r--r--arch/arm/mach-omap2/pm24xx.c24
-rw-r--r--arch/arm/mach-omap2/pm34xx.c18
-rw-r--r--arch/arm/mach-omap2/prcm-common.h20
-rw-r--r--arch/arm/mach-omap2/prcm43xx.h1
-rw-r--r--arch/arm/mach-omap2/prm.h27
-rw-r--r--arch/arm/mach-omap2/prm2xxx.c6
-rw-r--r--arch/arm/mach-omap2/prm2xxx.h4
-rw-r--r--arch/arm/mach-omap2/prm33xx.c2
-rw-r--r--arch/arm/mach-omap2/prm33xx.h2
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c20
-rw-r--r--arch/arm/mach-omap2/prm3xxx.h7
-rw-r--r--arch/arm/mach-omap2/prm44xx.c70
-rw-r--r--arch/arm/mach-omap2/prm44xx.h1
-rw-r--r--arch/arm/mach-omap2/prm44xx_54xx.h8
-rw-r--r--arch/arm/mach-omap2/prm54xx.h1
-rw-r--r--arch/arm/mach-omap2/prm7xx.h2
-rw-r--r--arch/arm/mach-omap2/prm_common.c258
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c18
-rw-r--r--arch/arm/mach-omap2/prminst44xx.h1
-rw-r--r--arch/arm/mach-omap2/sleep44xx.S2
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c4
-rw-r--r--arch/arm/mach-omap2/vp.h9
-rw-r--r--arch/arm/mach-omap2/vp3xxx_data.c4
-rw-r--r--arch/arm/mach-omap2/vp44xx_data.c4
-rw-r--r--arch/arm/mach-qcom/Kconfig3
-rw-r--r--arch/arm/mach-qcom/Makefile3
-rw-r--r--arch/arm/mach-qcom/platsmp.c23
-rw-r--r--arch/arm/mach-qcom/scm-boot.c39
-rw-r--r--arch/arm/mach-qcom/scm-boot.h26
-rw-r--r--arch/arm/mach-qcom/scm.c326
-rw-r--r--arch/arm/mach-qcom/scm.h25
-rw-r--r--arch/arm/mach-rockchip/platsmp.c4
-rw-r--r--arch/arm/mach-rockchip/pm.c14
-rw-r--r--arch/arm/mach-rockchip/pm.h6
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig19
-rw-r--r--arch/arm/mach-s3c24xx/Makefile3
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/pm-core.h24
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2416.c3
-rw-r--r--arch/arm/mach-s3c24xx/pm.c6
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2416.c2
-rw-r--r--arch/arm/mach-s3c24xx/s3c2440.c4
-rw-r--r--arch/arm/mach-s3c24xx/s3c2442.c4
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c7
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig4
-rw-r--r--arch/arm/mach-s3c64xx/Makefile3
-rw-r--r--arch/arm/mach-s3c64xx/crag6410.h1
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c1
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/pm.c2
-rw-r--r--arch/arm/mach-shmobile/Kconfig66
-rw-r--r--arch/arm/mach-shmobile/Makefile22
-rw-r--r--arch/arm/mach-shmobile/Makefile.boot4
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm-reference.c60
-rw-r--r--arch/arm/mach-shmobile/board-ape6evm.c306
-rw-r--r--arch/arm/mach-shmobile/board-bockw-reference.c2
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g-reference.c62
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c1522
-rw-r--r--arch/arm/mach-shmobile/clock-r8a73a4.c659
-rw-r--r--arch/arm/mach-shmobile/clock-sh7372.c620
-rw-r--r--arch/arm/mach-shmobile/clock.c11
-rw-r--r--arch/arm/mach-shmobile/common.h10
-rw-r--r--arch/arm/mach-shmobile/cpuidle.c37
-rw-r--r--arch/arm/mach-shmobile/entry-intc.S54
-rw-r--r--arch/arm/mach-shmobile/include/mach/clkdev.h7
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-mackerel.txt93
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc-mackerel.h38
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc.h16
-rw-r--r--arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h21
-rw-r--r--arch/arm/mach-shmobile/include/mach/sdhi.h16
-rw-r--r--arch/arm/mach-shmobile/include/mach/system.h11
-rw-r--r--arch/arm/mach-shmobile/include/mach/uncompress.h19
-rw-r--r--arch/arm/mach-shmobile/include/mach/zboot.h5
-rw-r--r--arch/arm/mach-shmobile/intc-sh7372.c672
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7790.c82
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7791.c73
-rw-r--r--arch/arm/mach-shmobile/pm-rcar-gen2.c115
-rw-r--r--arch/arm/mach-shmobile/pm-sh7372.c549
-rw-r--r--arch/arm/mach-shmobile/r8a73a4.h17
-rw-r--r--arch/arm/mach-shmobile/r8a7790.h1
-rw-r--r--arch/arm/mach-shmobile/r8a7791.h1
-rw-r--r--arch/arm/mach-shmobile/rcar-gen2.h1
-rw-r--r--arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c147
-rw-r--r--arch/arm/mach-shmobile/setup-r8a73a4.c273
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c8
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7778.c19
-rw-r--r--arch/arm/mach-shmobile/setup-rcar-gen2.c7
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c1016
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c19
-rw-r--r--arch/arm/mach-shmobile/sh7372.h84
-rw-r--r--arch/arm/mach-shmobile/sh73a0.h1
-rw-r--r--arch/arm/mach-shmobile/sleep-sh7372.S98
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7779.c7
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7790.c7
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7791.c4
-rw-r--r--arch/arm/mach-shmobile/smp-sh73a0.c2
-rw-r--r--arch/arm/mach-vexpress/Kconfig4
-rw-r--r--arch/arm/mach-vexpress/dcscb.c197
-rw-r--r--arch/arm/mach-vexpress/tc2_pm.c291
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h14
-rw-r--r--arch/arm/plat-samsung/pm-debug.c1
-rw-r--r--arch/arm/plat-samsung/pm.c20
-rw-r--r--arch/arm/tools/mach-types1
570 files changed, 26208 insertions, 28613 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 392e7ae69452..45df48ba0b12 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -362,19 +362,6 @@ config ARCH_VERSATILE
362 help 362 help
363 This enables support for ARM Ltd Versatile board. 363 This enables support for ARM Ltd Versatile board.
364 364
365config ARCH_AT91
366 bool "Atmel AT91"
367 select ARCH_REQUIRE_GPIOLIB
368 select CLKDEV_LOOKUP
369 select IRQ_DOMAIN
370 select NEED_MACH_IO_H if PCCARD
371 select PINCTRL
372 select PINCTRL_AT91
373 select USE_OF
374 help
375 This enables support for systems based on Atmel
376 AT91RM9200, AT91SAM9 and SAMA5 processors.
377
378config ARCH_CLPS711X 365config ARCH_CLPS711X
379 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" 366 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
380 select ARCH_REQUIRE_GPIOLIB 367 select ARCH_REQUIRE_GPIOLIB
@@ -632,18 +619,6 @@ config ARCH_PXA
632 help 619 help
633 Support for Intel/Marvell's PXA2xx/PXA3xx processor line. 620 Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
634 621
635config ARCH_MSM
636 bool "Qualcomm MSM (non-multiplatform)"
637 select ARCH_REQUIRE_GPIOLIB
638 select COMMON_CLK
639 select GENERIC_CLOCKEVENTS
640 help
641 Support for Qualcomm MSM/QSD based systems. This runs on the
642 apps processor of the MSM/QSD and depends on a shared memory
643 interface to the modem processor which runs the baseband
644 stack and controls some vital subsystems
645 (clock and power control, etc).
646
647config ARCH_SHMOBILE_LEGACY 622config ARCH_SHMOBILE_LEGACY
648 bool "Renesas ARM SoCs (non-multiplatform)" 623 bool "Renesas ARM SoCs (non-multiplatform)"
649 select ARCH_SHMOBILE 624 select ARCH_SHMOBILE
@@ -653,7 +628,6 @@ config ARCH_SHMOBILE_LEGACY
653 select GENERIC_CLOCKEVENTS 628 select GENERIC_CLOCKEVENTS
654 select HAVE_ARM_SCU if SMP 629 select HAVE_ARM_SCU if SMP
655 select HAVE_ARM_TWD if SMP 630 select HAVE_ARM_TWD if SMP
656 select HAVE_MACH_CLKDEV
657 select HAVE_SMP 631 select HAVE_SMP
658 select MIGHT_HAVE_CACHE_L2X0 632 select MIGHT_HAVE_CACHE_L2X0
659 select MULTI_IRQ_HANDLER 633 select MULTI_IRQ_HANDLER
@@ -851,6 +825,8 @@ config ARCH_VIRT
851# 825#
852source "arch/arm/mach-mvebu/Kconfig" 826source "arch/arm/mach-mvebu/Kconfig"
853 827
828source "arch/arm/mach-alpine/Kconfig"
829
854source "arch/arm/mach-asm9260/Kconfig" 830source "arch/arm/mach-asm9260/Kconfig"
855 831
856source "arch/arm/mach-at91/Kconfig" 832source "arch/arm/mach-at91/Kconfig"
@@ -897,8 +873,6 @@ source "arch/arm/mach-ks8695/Kconfig"
897 873
898source "arch/arm/mach-meson/Kconfig" 874source "arch/arm/mach-meson/Kconfig"
899 875
900source "arch/arm/mach-msm/Kconfig"
901
902source "arch/arm/mach-moxart/Kconfig" 876source "arch/arm/mach-moxart/Kconfig"
903 877
904source "arch/arm/mach-mv78xx0/Kconfig" 878source "arch/arm/mach-mv78xx0/Kconfig"
@@ -1523,7 +1497,7 @@ config HZ_FIXED
1523 int 1497 int
1524 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \ 1498 default 200 if ARCH_EBSA110 || ARCH_S3C24XX || \
1525 ARCH_S5PV210 || ARCH_EXYNOS4 1499 ARCH_S5PV210 || ARCH_EXYNOS4
1526 default AT91_TIMER_HZ if ARCH_AT91 1500 default 128 if SOC_AT91RM9200
1527 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY 1501 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE_LEGACY
1528 default 0 1502 default 0
1529 1503
@@ -1856,35 +1830,6 @@ config ZBOOT_ROM
1856 Say Y here if you intend to execute your compressed kernel image 1830 Say Y here if you intend to execute your compressed kernel image
1857 (zImage) directly from ROM or flash. If unsure, say N. 1831 (zImage) directly from ROM or flash. If unsure, say N.
1858 1832
1859choice
1860 prompt "Include SD/MMC loader in zImage (EXPERIMENTAL)"
1861 depends on ZBOOT_ROM && ARCH_SH7372
1862 default ZBOOT_ROM_NONE
1863 help
1864 Include experimental SD/MMC loading code in the ROM-able zImage.
1865 With this enabled it is possible to write the ROM-able zImage
1866 kernel image to an MMC or SD card and boot the kernel straight
1867 from the reset vector. At reset the processor Mask ROM will load
1868 the first part of the ROM-able zImage which in turn loads the
1869 rest the kernel image to RAM.
1870
1871config ZBOOT_ROM_NONE
1872 bool "No SD/MMC loader in zImage (EXPERIMENTAL)"
1873 help
1874 Do not load image from SD or MMC
1875
1876config ZBOOT_ROM_MMCIF
1877 bool "Include MMCIF loader in zImage (EXPERIMENTAL)"
1878 help
1879 Load image from MMCIF hardware block.
1880
1881config ZBOOT_ROM_SH_MOBILE_SDHI
1882 bool "Include SuperH Mobile SDHI loader in zImage (EXPERIMENTAL)"
1883 help
1884 Load image from SDHI hardware block
1885
1886endchoice
1887
1888config ARM_APPENDED_DTB 1833config ARM_APPENDED_DTB
1889 bool "Use appended device tree blob to zImage (EXPERIMENTAL)" 1834 bool "Use appended device tree blob to zImage (EXPERIMENTAL)"
1890 depends on OF 1835 depends on OF
@@ -2158,6 +2103,8 @@ source "net/Kconfig"
2158 2103
2159source "drivers/Kconfig" 2104source "drivers/Kconfig"
2160 2105
2106source "drivers/firmware/Kconfig"
2107
2161source "fs/Kconfig" 2108source "fs/Kconfig"
2162 2109
2163source "arch/arm/Kconfig.debug" 2110source "arch/arm/Kconfig.debug"
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8b0183a9a300..0c12ffb155a2 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -93,6 +93,14 @@ choice
93 prompt "Kernel low-level debugging port" 93 prompt "Kernel low-level debugging port"
94 depends on DEBUG_LL 94 depends on DEBUG_LL
95 95
96 config DEBUG_ALPINE_UART0
97 bool "Kernel low-level debugging messages via Alpine UART0"
98 depends on ARCH_ALPINE
99 select DEBUG_UART_8250
100 help
101 Say Y here if you want kernel low-level debugging support
102 on Alpine based platforms.
103
96 config DEBUG_ASM9260_UART 104 config DEBUG_ASM9260_UART
97 bool "Kernel low-level debugging via asm9260 UART" 105 bool "Kernel low-level debugging via asm9260 UART"
98 depends on MACH_ASM9260 106 depends on MACH_ASM9260
@@ -448,25 +456,6 @@ choice
448 Say Y here if you want kernel low-level debugging support 456 Say Y here if you want kernel low-level debugging support
449 on MMP UART3. 457 on MMP UART3.
450 458
451 config DEBUG_MSM_UART
452 bool "Kernel low-level debugging messages via MSM UART"
453 depends on ARCH_MSM
454 help
455 Say Y here if you want the debug print routines to direct
456 their output to the serial port on MSM devices.
457
458 ARCH DEBUG_UART_PHYS DEBUG_UART_VIRT #
459 MSM7X00A, QSD8X50 0xa9a00000 0xe1000000 UART1
460 MSM7X00A, QSD8X50 0xa9b00000 0xe1000000 UART2
461 MSM7X00A, QSD8X50 0xa9c00000 0xe1000000 UART3
462
463 MSM7X30 0xaca00000 0xe1000000 UART1
464 MSM7X30 0xacb00000 0xe1000000 UART2
465 MSM7X30 0xacc00000 0xe1000000 UART3
466
467 Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration
468 options based on your needs.
469
470 config DEBUG_QCOM_UARTDM 459 config DEBUG_QCOM_UARTDM
471 bool "Kernel low-level debugging messages via QCOM UARTDM" 460 bool "Kernel low-level debugging messages via QCOM UARTDM"
472 depends on ARCH_QCOM 461 depends on ARCH_QCOM
@@ -806,7 +795,7 @@ choice
806 via SCIF2 on Renesas R-Car H1 (R8A7779). 795 via SCIF2 on Renesas R-Car H1 (R8A7779).
807 796
808 config DEBUG_RCAR_GEN2_SCIF0 797 config DEBUG_RCAR_GEN2_SCIF0
809 bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793)" 798 bool "Kernel low-level debugging messages via SCIF0 on R8A7790/R8A7791/R8A7793"
810 depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7793 799 depends on ARCH_R8A7790 || ARCH_R8A7791 || ARCH_R8A7793
811 help 800 help
812 Say Y here if you want kernel low-level debugging support 801 Say Y here if you want kernel low-level debugging support
@@ -821,12 +810,11 @@ choice
821 via SCIF2 on Renesas R-Car E2 (R8A7794). 810 via SCIF2 on Renesas R-Car E2 (R8A7794).
822 811
823 config DEBUG_RMOBILE_SCIFA0 812 config DEBUG_RMOBILE_SCIFA0
824 bool "Kernel low-level debugging messages via SCIFA0 on R8A73A4/SH7372" 813 bool "Kernel low-level debugging messages via SCIFA0 on R8A73A4"
825 depends on ARCH_R8A73A4 || ARCH_SH7372 814 depends on ARCH_R8A73A4
826 help 815 help
827 Say Y here if you want kernel low-level debugging support 816 Say Y here if you want kernel low-level debugging support
828 via SCIFA0 on Renesas R-Mobile APE6 (R8A73A4) or SH-Mobile 817 via SCIFA0 on Renesas R-Mobile APE6 (R8A73A4).
829 AP4 (SH7372).
830 818
831 config DEBUG_RMOBILE_SCIFA1 819 config DEBUG_RMOBILE_SCIFA1
832 bool "Kernel low-level debugging messages via SCIFA1 on R8A7740" 820 bool "Kernel low-level debugging messages via SCIFA1 on R8A7740"
@@ -1295,7 +1283,7 @@ config DEBUG_LL_INCLUDE
1295 DEBUG_IMX6SL_UART || \ 1283 DEBUG_IMX6SL_UART || \
1296 DEBUG_IMX6SX_UART 1284 DEBUG_IMX6SX_UART
1297 default "debug/ks8695.S" if DEBUG_KS8695_UART 1285 default "debug/ks8695.S" if DEBUG_KS8695_UART
1298 default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM 1286 default "debug/msm.S" if DEBUG_QCOM_UARTDM
1299 default "debug/netx.S" if DEBUG_NETX_UART 1287 default "debug/netx.S" if DEBUG_NETX_UART
1300 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 1288 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
1301 default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2 1289 default "debug/renesas-scif.S" if DEBUG_R7S72100_SCIF2
@@ -1388,7 +1376,6 @@ config DEBUG_UART_PHYS
1388 default 0x80230000 if DEBUG_PICOXCELL_UART 1376 default 0x80230000 if DEBUG_PICOXCELL_UART
1389 default 0x808c0000 if ARCH_EP93XX 1377 default 0x808c0000 if ARCH_EP93XX
1390 default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART 1378 default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART
1391 default 0xa9a00000 if DEBUG_MSM_UART
1392 default 0xb0060000 if DEBUG_SIRFPRIMA2_UART1 1379 default 0xb0060000 if DEBUG_SIRFPRIMA2_UART1
1393 default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX 1380 default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX
1394 default 0xc0013000 if DEBUG_U300_UART 1381 default 0xc0013000 if DEBUG_U300_UART
@@ -1417,6 +1404,7 @@ config DEBUG_UART_PHYS
1417 default 0xf8b00000 if DEBUG_HIX5HD2_UART 1404 default 0xf8b00000 if DEBUG_HIX5HD2_UART
1418 default 0xf991e000 if DEBUG_QCOM_UARTDM 1405 default 0xf991e000 if DEBUG_QCOM_UARTDM
1419 default 0xfcb00000 if DEBUG_HI3620_UART 1406 default 0xfcb00000 if DEBUG_HI3620_UART
1407 default 0xfd883000 if DEBUG_ALPINE_UART0
1420 default 0xfe800000 if ARCH_IOP32X 1408 default 0xfe800000 if ARCH_IOP32X
1421 default 0xff690000 if DEBUG_RK32_UART2 1409 default 0xff690000 if DEBUG_RK32_UART2
1422 default 0xffc02000 if DEBUG_SOCFPGA_UART 1410 default 0xffc02000 if DEBUG_SOCFPGA_UART
@@ -1433,7 +1421,7 @@ config DEBUG_UART_PHYS
1433 DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1421 DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1434 DEBUG_LL_UART_EFM32 || \ 1422 DEBUG_LL_UART_EFM32 || \
1435 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1423 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
1436 DEBUG_MSM_UART || DEBUG_NETX_UART || \ 1424 DEBUG_NETX_UART || \
1437 DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \ 1425 DEBUG_QCOM_UARTDM || DEBUG_R7S72100_SCIF2 || \
1438 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \ 1426 DEBUG_RCAR_GEN1_SCIF0 || DEBUG_RCAR_GEN1_SCIF2 || \
1439 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \ 1427 DEBUG_RCAR_GEN2_SCIF0 || DEBUG_RCAR_GEN2_SCIF2 || \
@@ -1446,7 +1434,6 @@ config DEBUG_UART_VIRT
1446 hex "Virtual base address of debug UART" 1434 hex "Virtual base address of debug UART"
1447 default 0xe0000a00 if DEBUG_NETX_UART 1435 default 0xe0000a00 if DEBUG_NETX_UART
1448 default 0xe0010fe0 if ARCH_RPC 1436 default 0xe0010fe0 if ARCH_RPC
1449 default 0xe1000000 if DEBUG_MSM_UART
1450 default 0xf0000be0 if ARCH_EBSA110 1437 default 0xf0000be0 if ARCH_EBSA110
1451 default 0xf0010000 if DEBUG_ASM9260_UART 1438 default 0xf0010000 if DEBUG_ASM9260_UART
1452 default 0xf01fb000 if DEBUG_NOMADIK_UART 1439 default 0xf01fb000 if DEBUG_NOMADIK_UART
@@ -1483,6 +1470,7 @@ config DEBUG_UART_VIRT
1483 default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX 1470 default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX
1484 default 0xfd000000 if ARCH_SPEAR13XX 1471 default 0xfd000000 if ARCH_SPEAR13XX
1485 default 0xfd012000 if ARCH_MV78XX0 1472 default 0xfd012000 if ARCH_MV78XX0
1473 default 0xfd883000 if DEBUG_ALPINE_UART0
1486 default 0xfde12000 if ARCH_DOVE 1474 default 0xfde12000 if ARCH_DOVE
1487 default 0xfe012000 if ARCH_ORION5X 1475 default 0xfe012000 if ARCH_ORION5X
1488 default 0xf31004c0 if DEBUG_MESON_UARTAO 1476 default 0xf31004c0 if DEBUG_MESON_UARTAO
@@ -1526,7 +1514,7 @@ config DEBUG_UART_VIRT
1526 default DEBUG_UART_PHYS if !MMU 1514 default DEBUG_UART_PHYS if !MMU
1527 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ 1515 depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \
1528 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \ 1516 DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
1529 DEBUG_MSM_UART || DEBUG_NETX_UART || \ 1517 DEBUG_NETX_UART || \
1530 DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \ 1518 DEBUG_QCOM_UARTDM || DEBUG_S3C24XX_UART || \
1531 DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART || \ 1519 DEBUG_UART_BCM63XX || DEBUG_ASM9260_UART || \
1532 DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 1520 DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0
@@ -1543,7 +1531,7 @@ config DEBUG_UART_8250_WORD
1543 depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 1531 depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
1544 depends on DEBUG_UART_8250_SHIFT >= 2 1532 depends on DEBUG_UART_8250_SHIFT >= 2
1545 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \ 1533 default y if DEBUG_PICOXCELL_UART || DEBUG_SOCFPGA_UART || \
1546 ARCH_KEYSTONE || \ 1534 ARCH_KEYSTONE || DEBUG_ALPINE_UART0 || \
1547 DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \ 1535 DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
1548 DEBUG_DAVINCI_DA8XX_UART2 || \ 1536 DEBUG_DAVINCI_DA8XX_UART2 || \
1549 DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \ 1537 DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \
@@ -1556,7 +1544,7 @@ config DEBUG_UART_8250_FLOW_CONTROL
1556 1544
1557config DEBUG_UNCOMPRESS 1545config DEBUG_UNCOMPRESS
1558 bool 1546 bool
1559 depends on ARCH_MULTIPLATFORM || ARCH_MSM || PLAT_SAMSUNG 1547 depends on ARCH_MULTIPLATFORM || PLAT_SAMSUNG
1560 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \ 1548 default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
1561 (!DEBUG_TEGRA_UART || !ZBOOT_ROM) 1549 (!DEBUG_TEGRA_UART || !ZBOOT_ROM)
1562 help 1550 help
@@ -1573,7 +1561,8 @@ config DEBUG_UNCOMPRESS
1573config UNCOMPRESS_INCLUDE 1561config UNCOMPRESS_INCLUDE
1574 string 1562 string
1575 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \ 1563 default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM || \
1576 PLAT_SAMSUNG || ARCH_EFM32 1564 PLAT_SAMSUNG || ARCH_EFM32 || \
1565 ARCH_SHMOBILE_LEGACY
1577 default "mach/uncompress.h" 1566 default "mach/uncompress.h"
1578 1567
1579config EARLY_PRINTK 1568config EARLY_PRINTK
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 5575d9fa8806..985227cbbd1b 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -136,13 +136,13 @@ textofs-$(CONFIG_PM_H1940) := 0x00108000
136ifeq ($(CONFIG_ARCH_SA1100),y) 136ifeq ($(CONFIG_ARCH_SA1100),y)
137textofs-$(CONFIG_SA1111) := 0x00208000 137textofs-$(CONFIG_SA1111) := 0x00208000
138endif 138endif
139textofs-$(CONFIG_ARCH_MSM7X30) := 0x00208000
140textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 139textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
141textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 140textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
142textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 141textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
143 142
144# Machine directory name. This list is sorted alphanumerically 143# Machine directory name. This list is sorted alphanumerically
145# by CONFIG_* macro name. 144# by CONFIG_* macro name.
145machine-$(CONFIG_ARCH_ALPINE) += alpine
146machine-$(CONFIG_ARCH_AT91) += at91 146machine-$(CONFIG_ARCH_AT91) += at91
147machine-$(CONFIG_ARCH_AXXIA) += axxia 147machine-$(CONFIG_ARCH_AXXIA) += axxia
148machine-$(CONFIG_ARCH_BCM) += bcm 148machine-$(CONFIG_ARCH_BCM) += bcm
@@ -171,7 +171,6 @@ machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
171machine-$(CONFIG_ARCH_MESON) += meson 171machine-$(CONFIG_ARCH_MESON) += meson
172machine-$(CONFIG_ARCH_MMP) += mmp 172machine-$(CONFIG_ARCH_MMP) += mmp
173machine-$(CONFIG_ARCH_MOXART) += moxart 173machine-$(CONFIG_ARCH_MOXART) += moxart
174machine-$(CONFIG_ARCH_MSM) += msm
175machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 174machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
176machine-$(CONFIG_ARCH_MVEBU) += mvebu 175machine-$(CONFIG_ARCH_MVEBU) += mvebu
177machine-$(CONFIG_ARCH_MXC) += imx 176machine-$(CONFIG_ARCH_MXC) += imx
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 3ea230aa94b7..6e1fb2b2ecc7 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -6,21 +6,6 @@
6 6
7OBJS = 7OBJS =
8 8
9# Ensure that MMCIF loader code appears early in the image
10# to minimise that number of bocks that have to be read in
11# order to load it.
12ifeq ($(CONFIG_ZBOOT_ROM_MMCIF),y)
13OBJS += mmcif-sh7372.o
14endif
15
16# Ensure that SDHI loader code appears early in the image
17# to minimise that number of bocks that have to be read in
18# order to load it.
19ifeq ($(CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI),y)
20OBJS += sdhi-shmobile.o
21OBJS += sdhi-sh7372.o
22endif
23
24AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) 9AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET)
25HEAD = head.o 10HEAD = head.o
26OBJS += misc.o decompress.o 11OBJS += misc.o decompress.o
diff --git a/arch/arm/boot/compressed/head-shmobile.S b/arch/arm/boot/compressed/head-shmobile.S
index e7f80928949c..22a75259faa3 100644
--- a/arch/arm/boot/compressed/head-shmobile.S
+++ b/arch/arm/boot/compressed/head-shmobile.S
@@ -25,36 +25,6 @@
25 /* load board-specific initialization code */ 25 /* load board-specific initialization code */
26#include <mach/zboot.h> 26#include <mach/zboot.h>
27 27
28#if defined(CONFIG_ZBOOT_ROM_MMCIF) || defined(CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI)
29 /* Load image from MMC/SD */
30 adr sp, __tmp_stack + 256
31 ldr r0, __image_start
32 ldr r1, __image_end
33 subs r1, r1, r0
34 ldr r0, __load_base
35 bl mmc_loader
36
37 /* Jump to loaded code */
38 ldr r0, __loaded
39 ldr r1, __image_start
40 sub r0, r0, r1
41 ldr r1, __load_base
42 add pc, r0, r1
43
44__image_start:
45 .long _start
46__image_end:
47 .long _got_end
48__load_base:
49 .long MEMORY_START + 0x02000000 @ Load at 32Mb into SDRAM
50__loaded:
51 .long __continue
52 .align
53__tmp_stack:
54 .space 256
55__continue:
56#endif /* CONFIG_ZBOOT_ROM_MMC || CONFIG_ZBOOT_ROM_SH_MOBILE_SDHI */
57
58 adr r0, dtb_info 28 adr r0, dtb_info
59 ldmia r0, {r1, r3, r4, r5, r7} 29 ldmia r0, {r1, r3, r4, r5, r7}
60 30
diff --git a/arch/arm/boot/compressed/mmcif-sh7372.c b/arch/arm/boot/compressed/mmcif-sh7372.c
deleted file mode 100644
index 672ae95db5c3..000000000000
--- a/arch/arm/boot/compressed/mmcif-sh7372.c
+++ /dev/null
@@ -1,88 +0,0 @@
1/*
2 * sh7372 MMCIF loader
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2010 Simon Horman
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 */
11
12#include <linux/mmc/sh_mmcif.h>
13#include <linux/mmc/boot.h>
14#include <mach/mmc.h>
15
16#define MMCIF_BASE (void __iomem *)0xe6bd0000
17
18#define PORT84CR (void __iomem *)0xe6050054
19#define PORT85CR (void __iomem *)0xe6050055
20#define PORT86CR (void __iomem *)0xe6050056
21#define PORT87CR (void __iomem *)0xe6050057
22#define PORT88CR (void __iomem *)0xe6050058
23#define PORT89CR (void __iomem *)0xe6050059
24#define PORT90CR (void __iomem *)0xe605005a
25#define PORT91CR (void __iomem *)0xe605005b
26#define PORT92CR (void __iomem *)0xe605005c
27#define PORT99CR (void __iomem *)0xe6050063
28
29#define SMSTPCR3 (void __iomem *)0xe615013c
30
31/* SH7372 specific MMCIF loader
32 *
33 * loads the zImage from an MMC card starting from block 1.
34 *
35 * The image must be start with a vrl4 header and
36 * the zImage must start at offset 512 of the image. That is,
37 * at block 2 (=byte 1024) on the media
38 *
39 * Use the following line to write the vrl4 formated zImage
40 * to an MMC card
41 * # dd if=vrl4.out of=/dev/sdx bs=512 seek=1
42 */
43asmlinkage void mmc_loader(unsigned char *buf, unsigned long len)
44{
45 mmc_init_progress();
46 mmc_update_progress(MMC_PROGRESS_ENTER);
47
48 /* Initialise MMC
49 * registers: PORT84CR-PORT92CR
50 * (MMCD0_0-MMCD0_7,MMCCMD0 Control)
51 * value: 0x04 - select function 4
52 */
53 __raw_writeb(0x04, PORT84CR);
54 __raw_writeb(0x04, PORT85CR);
55 __raw_writeb(0x04, PORT86CR);
56 __raw_writeb(0x04, PORT87CR);
57 __raw_writeb(0x04, PORT88CR);
58 __raw_writeb(0x04, PORT89CR);
59 __raw_writeb(0x04, PORT90CR);
60 __raw_writeb(0x04, PORT91CR);
61 __raw_writeb(0x04, PORT92CR);
62
63 /* Initialise MMC
64 * registers: PORT99CR (MMCCLK0 Control)
65 * value: 0x10 | 0x04 - enable output | select function 4
66 */
67 __raw_writeb(0x14, PORT99CR);
68
69 /* Enable clock to MMC hardware block */
70 __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 12), SMSTPCR3);
71
72 mmc_update_progress(MMC_PROGRESS_INIT);
73
74 /* setup MMCIF hardware */
75 sh_mmcif_boot_init(MMCIF_BASE);
76
77 mmc_update_progress(MMC_PROGRESS_LOAD);
78
79 /* load kernel via MMCIF interface */
80 sh_mmcif_boot_do_read(MMCIF_BASE, 2, /* Kernel is at block 2 */
81 (len + SH_MMCIF_BBS - 1) / SH_MMCIF_BBS, buf);
82
83
84 /* Disable clock to MMC hardware block */
85 __raw_writel(__raw_readl(SMSTPCR3) | (1 << 12), SMSTPCR3);
86
87 mmc_update_progress(MMC_PROGRESS_DONE);
88}
diff --git a/arch/arm/boot/compressed/sdhi-sh7372.c b/arch/arm/boot/compressed/sdhi-sh7372.c
deleted file mode 100644
index d279294f2381..000000000000
--- a/arch/arm/boot/compressed/sdhi-sh7372.c
+++ /dev/null
@@ -1,95 +0,0 @@
1/*
2 * SuperH Mobile SDHI
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2010 Kuninori Morimoto
6 * Copyright (C) 2010 Simon Horman
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 *
12 * Parts inspired by u-boot
13 */
14
15#include <linux/io.h>
16#include <mach/mmc.h>
17#include <linux/mmc/boot.h>
18#include <linux/mmc/tmio.h>
19
20#include "sdhi-shmobile.h"
21
22#define PORT179CR 0xe60520b3
23#define PORT180CR 0xe60520b4
24#define PORT181CR 0xe60520b5
25#define PORT182CR 0xe60520b6
26#define PORT183CR 0xe60520b7
27#define PORT184CR 0xe60520b8
28
29#define SMSTPCR3 0xe615013c
30
31#define CR_INPUT_ENABLE 0x10
32#define CR_FUNCTION1 0x01
33
34#define SDHI1_BASE (void __iomem *)0xe6860000
35#define SDHI_BASE SDHI1_BASE
36
37/* SuperH Mobile SDHI loader
38 *
39 * loads the zImage from an SD card starting from block 0
40 * on physical partition 1
41 *
42 * The image must be start with a vrl4 header and
43 * the zImage must start at offset 512 of the image. That is,
44 * at block 1 (=byte 512) of physical partition 1
45 *
46 * Use the following line to write the vrl4 formated zImage
47 * to an SD card
48 * # dd if=vrl4.out of=/dev/sdx bs=512
49 */
50asmlinkage void mmc_loader(unsigned short *buf, unsigned long len)
51{
52 int high_capacity;
53
54 mmc_init_progress();
55
56 mmc_update_progress(MMC_PROGRESS_ENTER);
57 /* Initialise SDHI1 */
58 /* PORT184CR: GPIO_FN_SDHICMD1 Control */
59 __raw_writeb(CR_FUNCTION1, PORT184CR);
60 /* PORT179CR: GPIO_FN_SDHICLK1 Control */
61 __raw_writeb(CR_INPUT_ENABLE|CR_FUNCTION1, PORT179CR);
62 /* PORT181CR: GPIO_FN_SDHID1_3 Control */
63 __raw_writeb(CR_FUNCTION1, PORT183CR);
64 /* PORT182CR: GPIO_FN_SDHID1_2 Control */
65 __raw_writeb(CR_FUNCTION1, PORT182CR);
66 /* PORT183CR: GPIO_FN_SDHID1_1 Control */
67 __raw_writeb(CR_FUNCTION1, PORT181CR);
68 /* PORT180CR: GPIO_FN_SDHID1_0 Control */
69 __raw_writeb(CR_FUNCTION1, PORT180CR);
70
71 /* Enable clock to SDHI1 hardware block */
72 __raw_writel(__raw_readl(SMSTPCR3) & ~(1 << 13), SMSTPCR3);
73
74 /* setup SDHI hardware */
75 mmc_update_progress(MMC_PROGRESS_INIT);
76 high_capacity = sdhi_boot_init(SDHI_BASE);
77 if (high_capacity < 0)
78 goto err;
79
80 mmc_update_progress(MMC_PROGRESS_LOAD);
81 /* load kernel */
82 if (sdhi_boot_do_read(SDHI_BASE, high_capacity,
83 0, /* Kernel is at block 1 */
84 (len + TMIO_BBS - 1) / TMIO_BBS, buf))
85 goto err;
86
87 /* Disable clock to SDHI1 hardware block */
88 __raw_writel(__raw_readl(SMSTPCR3) | (1 << 13), SMSTPCR3);
89
90 mmc_update_progress(MMC_PROGRESS_DONE);
91
92 return;
93err:
94 for(;;);
95}
diff --git a/arch/arm/boot/compressed/sdhi-shmobile.c b/arch/arm/boot/compressed/sdhi-shmobile.c
deleted file mode 100644
index bd3d46980955..000000000000
--- a/arch/arm/boot/compressed/sdhi-shmobile.c
+++ /dev/null
@@ -1,449 +0,0 @@
1/*
2 * SuperH Mobile SDHI
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2010 Kuninori Morimoto
6 * Copyright (C) 2010 Simon Horman
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 *
12 * Parts inspired by u-boot
13 */
14
15#include <linux/io.h>
16#include <linux/mmc/host.h>
17#include <linux/mmc/core.h>
18#include <linux/mmc/mmc.h>
19#include <linux/mmc/sd.h>
20#include <linux/mmc/tmio.h>
21#include <mach/sdhi.h>
22
23#define OCR_FASTBOOT (1<<29)
24#define OCR_HCS (1<<30)
25#define OCR_BUSY (1<<31)
26
27#define RESP_CMD12 0x00000030
28
29static inline u16 sd_ctrl_read16(void __iomem *base, int addr)
30{
31 return __raw_readw(base + addr);
32}
33
34static inline u32 sd_ctrl_read32(void __iomem *base, int addr)
35{
36 return __raw_readw(base + addr) |
37 __raw_readw(base + addr + 2) << 16;
38}
39
40static inline void sd_ctrl_write16(void __iomem *base, int addr, u16 val)
41{
42 __raw_writew(val, base + addr);
43}
44
45static inline void sd_ctrl_write32(void __iomem *base, int addr, u32 val)
46{
47 __raw_writew(val, base + addr);
48 __raw_writew(val >> 16, base + addr + 2);
49}
50
51#define ALL_ERROR (TMIO_STAT_CMD_IDX_ERR | TMIO_STAT_CRCFAIL | \
52 TMIO_STAT_STOPBIT_ERR | TMIO_STAT_DATATIMEOUT | \
53 TMIO_STAT_RXOVERFLOW | TMIO_STAT_TXUNDERRUN | \
54 TMIO_STAT_CMDTIMEOUT | TMIO_STAT_ILL_ACCESS | \
55 TMIO_STAT_ILL_FUNC)
56
57static int sdhi_intr(void __iomem *base)
58{
59 unsigned long state = sd_ctrl_read32(base, CTL_STATUS);
60
61 if (state & ALL_ERROR) {
62 sd_ctrl_write32(base, CTL_STATUS, ~ALL_ERROR);
63 sd_ctrl_write32(base, CTL_IRQ_MASK,
64 ALL_ERROR |
65 sd_ctrl_read32(base, CTL_IRQ_MASK));
66 return -EINVAL;
67 }
68 if (state & TMIO_STAT_CMDRESPEND) {
69 sd_ctrl_write32(base, CTL_STATUS, ~TMIO_STAT_CMDRESPEND);
70 sd_ctrl_write32(base, CTL_IRQ_MASK,
71 TMIO_STAT_CMDRESPEND |
72 sd_ctrl_read32(base, CTL_IRQ_MASK));
73 return 0;
74 }
75 if (state & TMIO_STAT_RXRDY) {
76 sd_ctrl_write32(base, CTL_STATUS, ~TMIO_STAT_RXRDY);
77 sd_ctrl_write32(base, CTL_IRQ_MASK,
78 TMIO_STAT_RXRDY | TMIO_STAT_TXUNDERRUN |
79 sd_ctrl_read32(base, CTL_IRQ_MASK));
80 return 0;
81 }
82 if (state & TMIO_STAT_DATAEND) {
83 sd_ctrl_write32(base, CTL_STATUS, ~TMIO_STAT_DATAEND);
84 sd_ctrl_write32(base, CTL_IRQ_MASK,
85 TMIO_STAT_DATAEND |
86 sd_ctrl_read32(base, CTL_IRQ_MASK));
87 return 0;
88 }
89
90 return -EAGAIN;
91}
92
93static int sdhi_boot_wait_resp_end(void __iomem *base)
94{
95 int err = -EAGAIN, timeout = 10000000;
96
97 while (timeout--) {
98 err = sdhi_intr(base);
99 if (err != -EAGAIN)
100 break;
101 udelay(1);
102 }
103
104 return err;
105}
106
107/* SDHI_CLK_CTRL */
108#define CLK_MMC_ENABLE (1 << 8)
109#define CLK_MMC_INIT (1 << 6) /* clk / 256 */
110
111static void sdhi_boot_mmc_clk_stop(void __iomem *base)
112{
113 sd_ctrl_write16(base, CTL_CLK_AND_WAIT_CTL, 0x0000);
114 msleep(10);
115 sd_ctrl_write16(base, CTL_SD_CARD_CLK_CTL, ~CLK_MMC_ENABLE &
116 sd_ctrl_read16(base, CTL_SD_CARD_CLK_CTL));
117 msleep(10);
118}
119
120static void sdhi_boot_mmc_clk_start(void __iomem *base)
121{
122 sd_ctrl_write16(base, CTL_SD_CARD_CLK_CTL, CLK_MMC_ENABLE |
123 sd_ctrl_read16(base, CTL_SD_CARD_CLK_CTL));
124 msleep(10);
125 sd_ctrl_write16(base, CTL_CLK_AND_WAIT_CTL, CLK_MMC_ENABLE);
126 msleep(10);
127}
128
129static void sdhi_boot_reset(void __iomem *base)
130{
131 sd_ctrl_write16(base, CTL_RESET_SD, 0x0000);
132 msleep(10);
133 sd_ctrl_write16(base, CTL_RESET_SD, 0x0001);
134 msleep(10);
135}
136
137/* Set MMC clock / power.
138 * Note: This controller uses a simple divider scheme therefore it cannot
139 * run a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as
140 * MMC wont run that fast, it has to be clocked at 12MHz which is the next
141 * slowest setting.
142 */
143static int sdhi_boot_mmc_set_ios(void __iomem *base, struct mmc_ios *ios)
144{
145 if (sd_ctrl_read32(base, CTL_STATUS) & TMIO_STAT_CMD_BUSY)
146 return -EBUSY;
147
148 if (ios->clock)
149 sd_ctrl_write16(base, CTL_SD_CARD_CLK_CTL,
150 ios->clock | CLK_MMC_ENABLE);
151
152 /* Power sequence - OFF -> ON -> UP */
153 switch (ios->power_mode) {
154 case MMC_POWER_OFF: /* power down SD bus */
155 sdhi_boot_mmc_clk_stop(base);
156 break;
157 case MMC_POWER_ON: /* power up SD bus */
158 break;
159 case MMC_POWER_UP: /* start bus clock */
160 sdhi_boot_mmc_clk_start(base);
161 break;
162 }
163
164 switch (ios->bus_width) {
165 case MMC_BUS_WIDTH_1:
166 sd_ctrl_write16(base, CTL_SD_MEM_CARD_OPT, 0x80e0);
167 break;
168 case MMC_BUS_WIDTH_4:
169 sd_ctrl_write16(base, CTL_SD_MEM_CARD_OPT, 0x00e0);
170 break;
171 }
172
173 /* Let things settle. delay taken from winCE driver */
174 udelay(140);
175
176 return 0;
177}
178
179/* These are the bitmasks the tmio chip requires to implement the MMC response
180 * types. Note that R1 and R6 are the same in this scheme. */
181#define RESP_NONE 0x0300
182#define RESP_R1 0x0400
183#define RESP_R1B 0x0500
184#define RESP_R2 0x0600
185#define RESP_R3 0x0700
186#define DATA_PRESENT 0x0800
187#define TRANSFER_READ 0x1000
188
189static int sdhi_boot_request(void __iomem *base, struct mmc_command *cmd)
190{
191 int err, c = cmd->opcode;
192
193 switch (mmc_resp_type(cmd)) {
194 case MMC_RSP_NONE: c |= RESP_NONE; break;
195 case MMC_RSP_R1: c |= RESP_R1; break;
196 case MMC_RSP_R1B: c |= RESP_R1B; break;
197 case MMC_RSP_R2: c |= RESP_R2; break;
198 case MMC_RSP_R3: c |= RESP_R3; break;
199 default:
200 return -EINVAL;
201 }
202
203 /* No interrupts so this may not be cleared */
204 sd_ctrl_write32(base, CTL_STATUS, ~TMIO_STAT_CMDRESPEND);
205
206 sd_ctrl_write32(base, CTL_IRQ_MASK, TMIO_STAT_CMDRESPEND |
207 sd_ctrl_read32(base, CTL_IRQ_MASK));
208 sd_ctrl_write32(base, CTL_ARG_REG, cmd->arg);
209 sd_ctrl_write16(base, CTL_SD_CMD, c);
210
211
212 sd_ctrl_write32(base, CTL_IRQ_MASK,
213 ~(TMIO_STAT_CMDRESPEND | ALL_ERROR) &
214 sd_ctrl_read32(base, CTL_IRQ_MASK));
215
216 err = sdhi_boot_wait_resp_end(base);
217 if (err)
218 return err;
219
220 cmd->resp[0] = sd_ctrl_read32(base, CTL_RESPONSE);
221
222 return 0;
223}
224
225static int sdhi_boot_do_read_single(void __iomem *base, int high_capacity,
226 unsigned long block, unsigned short *buf)
227{
228 int err, i;
229
230 /* CMD17 - Read */
231 {
232 struct mmc_command cmd;
233
234 cmd.opcode = MMC_READ_SINGLE_BLOCK | \
235 TRANSFER_READ | DATA_PRESENT;
236 if (high_capacity)
237 cmd.arg = block;
238 else
239 cmd.arg = block * TMIO_BBS;
240 cmd.flags = MMC_RSP_R1;
241 err = sdhi_boot_request(base, &cmd);
242 if (err)
243 return err;
244 }
245
246 sd_ctrl_write32(base, CTL_IRQ_MASK,
247 ~(TMIO_STAT_DATAEND | TMIO_STAT_RXRDY |
248 TMIO_STAT_TXUNDERRUN) &
249 sd_ctrl_read32(base, CTL_IRQ_MASK));
250 err = sdhi_boot_wait_resp_end(base);
251 if (err)
252 return err;
253
254 sd_ctrl_write16(base, CTL_SD_XFER_LEN, TMIO_BBS);
255 for (i = 0; i < TMIO_BBS / sizeof(*buf); i++)
256 *buf++ = sd_ctrl_read16(base, RESP_CMD12);
257
258 err = sdhi_boot_wait_resp_end(base);
259 if (err)
260 return err;
261
262 return 0;
263}
264
265int sdhi_boot_do_read(void __iomem *base, int high_capacity,
266 unsigned long offset, unsigned short count,
267 unsigned short *buf)
268{
269 unsigned long i;
270 int err = 0;
271
272 for (i = 0; i < count; i++) {
273 err = sdhi_boot_do_read_single(base, high_capacity, offset + i,
274 buf + (i * TMIO_BBS /
275 sizeof(*buf)));
276 if (err)
277 return err;
278 }
279
280 return 0;
281}
282
283#define VOLTAGES (MMC_VDD_32_33 | MMC_VDD_33_34)
284
285int sdhi_boot_init(void __iomem *base)
286{
287 bool sd_v2 = false, sd_v1_0 = false;
288 unsigned short cid;
289 int err, high_capacity = 0;
290
291 sdhi_boot_mmc_clk_stop(base);
292 sdhi_boot_reset(base);
293
294 /* mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0 */
295 {
296 struct mmc_ios ios;
297 ios.power_mode = MMC_POWER_ON;
298 ios.bus_width = MMC_BUS_WIDTH_1;
299 ios.clock = CLK_MMC_INIT;
300 err = sdhi_boot_mmc_set_ios(base, &ios);
301 if (err)
302 return err;
303 }
304
305 /* CMD0 */
306 {
307 struct mmc_command cmd;
308 msleep(1);
309 cmd.opcode = MMC_GO_IDLE_STATE;
310 cmd.arg = 0;
311 cmd.flags = MMC_RSP_NONE;
312 err = sdhi_boot_request(base, &cmd);
313 if (err)
314 return err;
315 msleep(2);
316 }
317
318 /* CMD8 - Test for SD version 2 */
319 {
320 struct mmc_command cmd;
321 cmd.opcode = SD_SEND_IF_COND;
322 cmd.arg = (VOLTAGES != 0) << 8 | 0xaa;
323 cmd.flags = MMC_RSP_R1;
324 err = sdhi_boot_request(base, &cmd); /* Ignore error */
325 if ((cmd.resp[0] & 0xff) == 0xaa)
326 sd_v2 = true;
327 }
328
329 /* CMD55 - Get OCR (SD) */
330 {
331 int timeout = 1000;
332 struct mmc_command cmd;
333
334 cmd.arg = 0;
335
336 do {
337 cmd.opcode = MMC_APP_CMD;
338 cmd.flags = MMC_RSP_R1;
339 cmd.arg = 0;
340 err = sdhi_boot_request(base, &cmd);
341 if (err)
342 break;
343
344 cmd.opcode = SD_APP_OP_COND;
345 cmd.flags = MMC_RSP_R3;
346 cmd.arg = (VOLTAGES & 0xff8000);
347 if (sd_v2)
348 cmd.arg |= OCR_HCS;
349 cmd.arg |= OCR_FASTBOOT;
350 err = sdhi_boot_request(base, &cmd);
351 if (err)
352 break;
353
354 msleep(1);
355 } while((!(cmd.resp[0] & OCR_BUSY)) && --timeout);
356
357 if (!err && timeout) {
358 if (!sd_v2)
359 sd_v1_0 = true;
360 high_capacity = (cmd.resp[0] & OCR_HCS) == OCR_HCS;
361 }
362 }
363
364 /* CMD1 - Get OCR (MMC) */
365 if (!sd_v2 && !sd_v1_0) {
366 int timeout = 1000;
367 struct mmc_command cmd;
368
369 do {
370 cmd.opcode = MMC_SEND_OP_COND;
371 cmd.arg = VOLTAGES | OCR_HCS;
372 cmd.flags = MMC_RSP_R3;
373 err = sdhi_boot_request(base, &cmd);
374 if (err)
375 return err;
376
377 msleep(1);
378 } while((!(cmd.resp[0] & OCR_BUSY)) && --timeout);
379
380 if (!timeout)
381 return -EAGAIN;
382
383 high_capacity = (cmd.resp[0] & OCR_HCS) == OCR_HCS;
384 }
385
386 /* CMD2 - Get CID */
387 {
388 struct mmc_command cmd;
389 cmd.opcode = MMC_ALL_SEND_CID;
390 cmd.arg = 0;
391 cmd.flags = MMC_RSP_R2;
392 err = sdhi_boot_request(base, &cmd);
393 if (err)
394 return err;
395 }
396
397 /* CMD3
398 * MMC: Set the relative address
399 * SD: Get the relative address
400 * Also puts the card into the standby state
401 */
402 {
403 struct mmc_command cmd;
404 cmd.opcode = MMC_SET_RELATIVE_ADDR;
405 cmd.arg = 0;
406 cmd.flags = MMC_RSP_R1;
407 err = sdhi_boot_request(base, &cmd);
408 if (err)
409 return err;
410 cid = cmd.resp[0] >> 16;
411 }
412
413 /* CMD9 - Get CSD */
414 {
415 struct mmc_command cmd;
416 cmd.opcode = MMC_SEND_CSD;
417 cmd.arg = cid << 16;
418 cmd.flags = MMC_RSP_R2;
419 err = sdhi_boot_request(base, &cmd);
420 if (err)
421 return err;
422 }
423
424 /* CMD7 - Select the card */
425 {
426 struct mmc_command cmd;
427 cmd.opcode = MMC_SELECT_CARD;
428 //cmd.arg = rca << 16;
429 cmd.arg = cid << 16;
430 //cmd.flags = MMC_RSP_R1B;
431 cmd.flags = MMC_RSP_R1;
432 err = sdhi_boot_request(base, &cmd);
433 if (err)
434 return err;
435 }
436
437 /* CMD16 - Set the block size */
438 {
439 struct mmc_command cmd;
440 cmd.opcode = MMC_SET_BLOCKLEN;
441 cmd.arg = TMIO_BBS;
442 cmd.flags = MMC_RSP_R1;
443 err = sdhi_boot_request(base, &cmd);
444 if (err)
445 return err;
446 }
447
448 return high_capacity;
449}
diff --git a/arch/arm/boot/compressed/sdhi-shmobile.h b/arch/arm/boot/compressed/sdhi-shmobile.h
deleted file mode 100644
index 92eaa09f985e..000000000000
--- a/arch/arm/boot/compressed/sdhi-shmobile.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef SDHI_MOBILE_H
2#define SDHI_MOBILE_H
3
4#include <linux/compiler.h>
5
6int sdhi_boot_do_read(void __iomem *base, int high_capacity,
7 unsigned long offset, unsigned short count,
8 unsigned short *buf);
9int sdhi_boot_init(void __iomem *base);
10
11#endif
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a1c776b8dcec..86217db2937a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1,5 +1,7 @@
1ifeq ($(CONFIG_OF),y) 1ifeq ($(CONFIG_OF),y)
2 2
3dtb-$(CONFIG_ARCH_ALPINE) += \
4 alpine-db.dtb
3dtb-$(CONFIG_MACH_ASM9260) += \ 5dtb-$(CONFIG_MACH_ASM9260) += \
4 alphascale-asm9260-devkit.dtb 6 alphascale-asm9260-devkit.dtb
5# Keep at91 dtb files sorted alphabetically for each SoC 7# Keep at91 dtb files sorted alphabetically for each SoC
@@ -42,6 +44,7 @@ dtb-$(CONFIG_SOC_SAM_V7) += \
42 sama5d34ek.dtb \ 44 sama5d34ek.dtb \
43 sama5d35ek.dtb \ 45 sama5d35ek.dtb \
44 sama5d36ek.dtb \ 46 sama5d36ek.dtb \
47 at91-sama5d4_xplained.dtb \
45 at91-sama5d4ek.dtb 48 at91-sama5d4ek.dtb
46dtb-$(CONFIG_ARCH_ATLAS6) += \ 49dtb-$(CONFIG_ARCH_ATLAS6) += \
47 atlas6-evb.dtb 50 atlas6-evb.dtb
@@ -59,13 +62,15 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
59 bcm4708-netgear-r6300-v2.dtb \ 62 bcm4708-netgear-r6300-v2.dtb \
60 bcm47081-asus-rt-n18u.dtb \ 63 bcm47081-asus-rt-n18u.dtb \
61 bcm47081-buffalo-wzr-600dhp2.dtb \ 64 bcm47081-buffalo-wzr-600dhp2.dtb \
62 bcm47081-buffalo-wzr-900dhp.dtb 65 bcm47081-buffalo-wzr-900dhp.dtb \
66 bcm4709-netgear-r8000.dtb
63dtb-$(CONFIG_ARCH_BCM_63XX) += \ 67dtb-$(CONFIG_ARCH_BCM_63XX) += \
64 bcm963138dvt.dtb 68 bcm963138dvt.dtb
65dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \ 69dtb-$(CONFIG_ARCH_BCM_CYGNUS) += \
66 bcm911360_entphn.dtb \ 70 bcm911360_entphn.dtb \
67 bcm911360k.dtb \ 71 bcm911360k.dtb \
68 bcm958300k.dtb 72 bcm958300k.dtb \
73 bcm958305k.dtb
69dtb-$(CONFIG_ARCH_BCM_MOBILE) += \ 74dtb-$(CONFIG_ARCH_BCM_MOBILE) += \
70 bcm28155-ap.dtb \ 75 bcm28155-ap.dtb \
71 bcm21664-garnet.dtb 76 bcm21664-garnet.dtb
@@ -165,6 +170,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
165 kirkwood-lsxhl.dtb \ 170 kirkwood-lsxhl.dtb \
166 kirkwood-mplcec4.dtb \ 171 kirkwood-mplcec4.dtb \
167 kirkwood-mv88f6281gtw-ge.dtb \ 172 kirkwood-mv88f6281gtw-ge.dtb \
173 kirkwood-nas2big.dtb \
168 kirkwood-net2big.dtb \ 174 kirkwood-net2big.dtb \
169 kirkwood-net5big.dtb \ 175 kirkwood-net5big.dtb \
170 kirkwood-netgear_readynas_duo_v2.dtb \ 176 kirkwood-netgear_readynas_duo_v2.dtb \
@@ -199,6 +205,8 @@ dtb-$(CONFIG_ARCH_LPC32XX) += \
199 ea3250.dtb phy3250.dtb 205 ea3250.dtb phy3250.dtb
200dtb-$(CONFIG_MACH_MESON6) += \ 206dtb-$(CONFIG_MACH_MESON6) += \
201 meson6-atv1200.dtb 207 meson6-atv1200.dtb
208dtb-$(CONFIG_MACH_MESON8) += \
209 meson8-minix-neo-x8.dtb
202dtb-$(CONFIG_ARCH_MMP) += \ 210dtb-$(CONFIG_ARCH_MMP) += \
203 pxa168-aspenite.dtb \ 211 pxa168-aspenite.dtb \
204 pxa910-dkb.dtb \ 212 pxa910-dkb.dtb \
@@ -299,9 +307,11 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
299 imx6q-wandboard.dtb \ 307 imx6q-wandboard.dtb \
300 imx6q-wandboard-revb1.dtb 308 imx6q-wandboard-revb1.dtb
301dtb-$(CONFIG_SOC_IMX6SL) += \ 309dtb-$(CONFIG_SOC_IMX6SL) += \
302 imx6sl-evk.dtb 310 imx6sl-evk.dtb \
311 imx6sl-warp.dtb
303dtb-$(CONFIG_SOC_IMX6SX) += \ 312dtb-$(CONFIG_SOC_IMX6SX) += \
304 imx6sx-sabreauto.dtb \ 313 imx6sx-sabreauto.dtb \
314 imx6sx-sdb-reva.dtb \
305 imx6sx-sdb.dtb 315 imx6sx-sdb.dtb
306dtb-$(CONFIG_SOC_LS1021A) += \ 316dtb-$(CONFIG_SOC_LS1021A) += \
307 ls1021a-qds.dtb \ 317 ls1021a-qds.dtb \
@@ -386,6 +396,8 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
386 omap3-overo-storm-tobi.dtb \ 396 omap3-overo-storm-tobi.dtb \
387 omap3-overo-summit.dtb \ 397 omap3-overo-summit.dtb \
388 omap3-overo-tobi.dtb \ 398 omap3-overo-tobi.dtb \
399 omap3-pandora-600mhz.dtb \
400 omap3-pandora-1ghz.dtb \
389 omap3-sbc-t3517.dtb \ 401 omap3-sbc-t3517.dtb \
390 omap3-sbc-t3530.dtb \ 402 omap3-sbc-t3530.dtb \
391 omap3-sbc-t3730.dtb \ 403 omap3-sbc-t3730.dtb \
@@ -401,7 +413,8 @@ dtb-$(CONFIG_SOC_AM33XX) += \
401 am335x-evmsk.dtb \ 413 am335x-evmsk.dtb \
402 am335x-nano.dtb \ 414 am335x-nano.dtb \
403 am335x-pepper.dtb \ 415 am335x-pepper.dtb \
404 am335x-lxm.dtb 416 am335x-lxm.dtb \
417 am335x-chiliboard.dtb
405dtb-$(CONFIG_ARCH_OMAP4) += \ 418dtb-$(CONFIG_ARCH_OMAP4) += \
406 omap4-duovero-parlor.dtb \ 419 omap4-duovero-parlor.dtb \
407 omap4-panda.dtb \ 420 omap4-panda.dtb \
@@ -464,25 +477,23 @@ dtb-$(CONFIG_ARCH_S5PV210) += \
464 s5pv210-smdkv210.dtb \ 477 s5pv210-smdkv210.dtb \
465 s5pv210-torbreck.dtb 478 s5pv210-torbreck.dtb
466dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += \ 479dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += \
467 r8a73a4-ape6evm.dtb \
468 r8a73a4-ape6evm-reference.dtb \
469 r8a7740-armadillo800eva.dtb \ 480 r8a7740-armadillo800eva.dtb \
470 r8a7778-bockw.dtb \ 481 r8a7778-bockw.dtb \
471 r8a7778-bockw-reference.dtb \ 482 r8a7778-bockw-reference.dtb \
472 r8a7779-marzen.dtb \ 483 r8a7779-marzen.dtb \
473 sh7372-mackerel.dtb \ 484 sh73a0-kzm9g.dtb
474 sh73a0-kzm9g.dtb \
475 sh73a0-kzm9g-reference.dtb
476dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \ 485dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \
477 emev2-kzm9d.dtb \ 486 emev2-kzm9d.dtb \
478 r7s72100-genmai.dtb \ 487 r7s72100-genmai.dtb \
479 r8a73a4-ape6evm.dtb \ 488 r8a73a4-ape6evm.dtb \
480 r8a7740-armadillo800eva.dtb \ 489 r8a7740-armadillo800eva.dtb \
490 r8a7778-bockw.dtb \
481 r8a7779-marzen.dtb \ 491 r8a7779-marzen.dtb \
482 r8a7790-lager.dtb \ 492 r8a7790-lager.dtb \
483 r8a7791-henninger.dtb \ 493 r8a7791-henninger.dtb \
484 r8a7791-koelsch.dtb \ 494 r8a7791-koelsch.dtb \
485 r8a7794-alt.dtb 495 r8a7794-alt.dtb \
496 sh73a0-kzm9g.dtb
486dtb-$(CONFIG_ARCH_SOCFPGA) += \ 497dtb-$(CONFIG_ARCH_SOCFPGA) += \
487 socfpga_arria5_socdk.dtb \ 498 socfpga_arria5_socdk.dtb \
488 socfpga_arria10_socdk.dtb \ 499 socfpga_arria10_socdk.dtb \
@@ -577,6 +588,7 @@ dtb-$(CONFIG_ARCH_TEGRA_114_SOC) += \
577dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \ 588dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \
578 tegra124-jetson-tk1.dtb \ 589 tegra124-jetson-tk1.dtb \
579 tegra124-nyan-big.dtb \ 590 tegra124-nyan-big.dtb \
591 tegra124-nyan-blaze.dtb \
580 tegra124-venice2.dtb 592 tegra124-venice2.dtb
581dtb-$(CONFIG_ARCH_U300) += \ 593dtb-$(CONFIG_ARCH_U300) += \
582 ste-u300.dtb 594 ste-u300.dtb
@@ -624,11 +636,14 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
624 armada-388-db.dtb \ 636 armada-388-db.dtb \
625 armada-388-gp.dtb \ 637 armada-388-gp.dtb \
626 armada-388-rd.dtb 638 armada-388-rd.dtb
639dtb-$(CONFIG_MACH_ARMADA_39X) += \
640 armada-398-db.dtb
627dtb-$(CONFIG_MACH_ARMADA_XP) += \ 641dtb-$(CONFIG_MACH_ARMADA_XP) += \
628 armada-xp-axpwifiap.dtb \ 642 armada-xp-axpwifiap.dtb \
629 armada-xp-db.dtb \ 643 armada-xp-db.dtb \
630 armada-xp-gp.dtb \ 644 armada-xp-gp.dtb \
631 armada-xp-lenovo-ix4-300d.dtb \ 645 armada-xp-lenovo-ix4-300d.dtb \
646 armada-xp-linksys-mamba.dtb \
632 armada-xp-matrix.dtb \ 647 armada-xp-matrix.dtb \
633 armada-xp-netgear-rn2120.dtb \ 648 armada-xp-netgear-rn2120.dtb \
634 armada-xp-openblocks-ax3-4.dtb \ 649 armada-xp-openblocks-ax3-4.dtb \
diff --git a/arch/arm/boot/dts/alpine-db.dts b/arch/arm/boot/dts/alpine-db.dts
new file mode 100644
index 000000000000..dfb5a0802273
--- /dev/null
+++ b/arch/arm/boot/dts/alpine-db.dts
@@ -0,0 +1,35 @@
1/*
2 * Copyright 2015 Annapurna Labs Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * Alternatively, redistribution and use in source and binary forms, with or
9 * without modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * This program is distributed in the hope it will be useful, but WITHOUT
21 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23 * more details.
24 *
25 */
26
27/dts-v1/;
28
29#include "alpine.dtsi"
30
31/ {
32 model = "Annapurna Labs Alpine Dev Board";
33 /* no need for anything outside SOC */
34};
35
diff --git a/arch/arm/boot/dts/alpine.dtsi b/arch/arm/boot/dts/alpine.dtsi
new file mode 100644
index 000000000000..9af2d60e9a7f
--- /dev/null
+++ b/arch/arm/boot/dts/alpine.dtsi
@@ -0,0 +1,160 @@
1/*
2 * Copyright 2015 Annapurna Labs Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * Alternatively, redistribution and use in source and binary forms, with or
9 * without modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * This program is distributed in the hope it will be useful, but WITHOUT
21 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23 * more details.
24 *
25 */
26
27#include <dt-bindings/interrupt-controller/arm-gic.h>
28#include "skeleton64.dtsi"
29
30/ {
31 /* SOC compatibility */
32 compatible = "al,alpine";
33
34 /* CPU Configuration */
35 cpus {
36 #address-cells = <1>;
37 #size-cells = <0>;
38 enable-method = "al,alpine-smp";
39
40 cpu@0 {
41 compatible = "arm,cortex-a15";
42 device_type = "cpu";
43 reg = <0>;
44 clock-frequency = <0>; /* Filled by loader */
45 };
46
47 cpu@1 {
48 compatible = "arm,cortex-a15";
49 device_type = "cpu";
50 reg = <1>;
51 clock-frequency = <0>; /* Filled by loader */
52 };
53
54 cpu@2 {
55 compatible = "arm,cortex-a15";
56 device_type = "cpu";
57 reg = <2>;
58 clock-frequency = <0>; /* Filled by loader */
59 };
60
61 cpu@3 {
62 compatible = "arm,cortex-a15";
63 device_type = "cpu";
64 reg = <3>;
65 clock-frequency = <0>; /* Filled by loader */
66 };
67 };
68
69 soc {
70 #address-cells = <2>;
71 #size-cells = <2>;
72 compatible = "simple-bus";
73 interrupt-parent = <&gic>;
74 ranges;
75
76 arch-timer {
77 compatible = "arm,cortex-a15-timer",
78 "arm,armv7-timer";
79 interrupts =
80 <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
81 <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
82 <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
83 <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
84 clock-frequency = <0>; /* Filled by loader */
85 };
86
87 /* Interrupt Controller */
88 gic: gic@fb001000 {
89 compatible = "arm,cortex-a15-gic";
90 #interrupt-cells = <3>;
91 #size-cells = <0>;
92 #address-cells = <0>;
93 interrupt-controller;
94 reg = <0x0 0xfb001000 0x0 0x1000>,
95 <0x0 0xfb002000 0x0 0x2000>,
96 <0x0 0xfb004000 0x0 0x1000>,
97 <0x0 0xfb006000 0x0 0x2000>;
98 interrupts =
99 <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
100 };
101
102 /* CPU Resume registers */
103 cpu-resume@fbff5ec0 {
104 compatible = "al,alpine-cpu-resume";
105 reg = <0x0 0xfbff5ec0 0x0 0x30>;
106 };
107
108 /* North Bridge Service Registers */
109 sysfabric-service@fb070000 {
110 compatible = "al,alpine-sysfabric-service", "syscon";
111 reg = <0x0 0xfb070000 0x0 0x10000>;
112 };
113
114 /* Performance Monitor Unit */
115 pmu {
116 compatible = "arm,cortex-a15-pmu";
117 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
118 <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
119 <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
120 <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
121 };
122
123 uart0:uart@fd883000 {
124 compatible = "ns16550a";
125 reg = <0x0 0xfd883000 0x0 0x1000>;
126 clock-frequency = <0>; /* Filled by loader */
127 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
128 reg-shift = <2>;
129 reg-io-width = <4>;
130 };
131
132 uart1:uart@0xfd884000 {
133 compatible = "ns16550a";
134 reg = <0x0 0xfd884000 0x0 0x1000>;
135 clock-frequency = <0>; /* Filled by loader */
136 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
137 reg-shift = <2>;
138 reg-io-width = <4>;
139 };
140
141 /* Internal PCIe Controller */
142 pcie-internal@0xfbc00000 {
143 compatible = "pci-host-ecam-generic";
144 device_type = "pci";
145 #size-cells = <2>;
146 #address-cells = <3>;
147 #interrupt-cells = <1>;
148 reg = <0x0 0xfbc00000 0x0 0x100000>;
149 interrupt-map-mask = <0xf800 0 0 7>;
150 /* Add legacy interrupts for SATA devices only */
151 interrupt-map = <0x4000 0 0 1 &gic 0 43 4>,
152 <0x4800 0 0 1 &gic 0 44 4>;
153
154 /* 32 bit non prefetchable memory space */
155 ranges = <0x02000000 0x0 0xfe000000 0x0 0xfe000000 0x0 0x1000000>;
156
157 bus-range = <0x00 0x00>;
158 };
159 };
160};
diff --git a/arch/arm/boot/dts/am335x-chiliboard.dts b/arch/arm/boot/dts/am335x-chiliboard.dts
new file mode 100644
index 000000000000..310da20a8aa7
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-chiliboard.dts
@@ -0,0 +1,112 @@
1/*
2 * Copyright (C) 2015 Jablotron s.r.o. -- http://www.jablotron.com/
3 * Author: Rostislav Lisovy <lisovy@jablotron.cz>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9/dts-v1/;
10#include "am335x-chilisom.dtsi"
11
12/ {
13 model = "AM335x Chiliboard";
14 compatible = "grinn,am335x-chiliboard", "grinn,am335x-chilisom",
15 "ti,am33xx";
16
17 leds {
18 compatible = "gpio-leds";
19 pinctrl-names = "default";
20 pinctrl-0 = <&led_gpio_pins>;
21
22 led0 {
23 label = "led0";
24 gpios = <&gpio3 7 GPIO_ACTIVE_LOW>;
25 default-state = "keep";
26 linux,default-trigger = "heartbeat";
27 };
28
29 led1 {
30 label = "led1";
31 gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
32 default-state = "keep";
33 };
34 };
35};
36
37&am33xx_pinmux {
38 usb1_drvvbus: usb1_drvvbus {
39 pinctrl-single,pins = <
40 0x234 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* usb1_drvvbus.usb1_drvvbus */
41 >;
42 };
43
44 sd_pins: pinmux_sd_card {
45 pinctrl-single,pins = <
46 0xf0 (PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
47 0xf4 (PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
48 0xf8 (PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
49 0xfc (PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
50 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
51 0x104 (PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
52 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
53 >;
54 };
55
56 led_gpio_pins: led_gpio_pins {
57 pinctrl-single,pins = <
58 0x1e4 (PIN_OUTPUT | MUX_MODE7) /* emu0.gpio3_7 */
59 0x1e8 (PIN_OUTPUT | MUX_MODE7) /* emu1.gpio3_8 */
60 >;
61 };
62};
63
64&ldo4_reg {
65 regulator-min-microvolt = <3300000>;
66 regulator-max-microvolt = <3300000>;
67};
68
69/* Ethernet */
70&cpsw_emac0 {
71 phy_id = <&davinci_mdio>, <0>;
72 phy-mode = "rmii";
73};
74
75&phy_sel {
76 rmii-clock-ext;
77};
78
79/* USB */
80&usb {
81 status = "okay";
82};
83
84&usb_ctrl_mod {
85 status = "okay";
86};
87
88&usb1_phy {
89 status = "okay";
90};
91
92&usb1 {
93 pinctrl-names = "default";
94 pinctrl-0 = <&usb1_drvvbus>;
95
96 status = "okay";
97 dr_mode = "host";
98};
99
100&cppi41dma {
101 status = "okay";
102};
103
104/* microSD */
105&mmc1 {
106 pinctrl-names = "default";
107 pinctrl-0 = <&sd_pins>;
108 vmmc-supply = <&ldo4_reg>;
109 bus-width = <0x4>;
110 cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
111 status = "okay";
112};
diff --git a/arch/arm/boot/dts/am335x-chilisom.dtsi b/arch/arm/boot/dts/am335x-chilisom.dtsi
new file mode 100644
index 000000000000..7e9a34dffe21
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-chilisom.dtsi
@@ -0,0 +1,239 @@
1/*
2 * Copyright (C) 2015 Jablotron s.r.o. -- http://www.jablotron.com/
3 * Author: Rostislav Lisovy <lisovy@jablotron.cz>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9#include "am33xx.dtsi"
10
11/ {
12 model = "Grinn AM335x ChiliSOM";
13 compatible = "grinn,am335x-chilisom", "ti,am33xx";
14
15 cpus {
16 cpu@0 {
17 cpu0-supply = <&dcdc2_reg>;
18 };
19 };
20
21 memory {
22 device_type = "memory";
23 reg = <0x80000000 0x20000000>; /* 512 MB */
24 };
25};
26
27&am33xx_pinmux {
28 pinctrl-names = "default";
29
30 i2c0_pins: pinmux_i2c0_pins {
31 pinctrl-single,pins = <
32 0x188 (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_sda.i2c0_sda */
33 0x18c (PIN_INPUT_PULLUP | MUX_MODE0) /* i2c0_scl.i2c0_scl */
34 >;
35 };
36
37 uart0_pins: pinmux_uart0_pins {
38 pinctrl-single,pins = <
39 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */
40 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
41 >;
42 };
43
44 cpsw_default: cpsw_default {
45 pinctrl-single,pins = <
46 /* Slave 1 */
47 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs */
48 0x110 (PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */
49 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txen.rmii1_txen */
50 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
51 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
52 0x13c (PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */
53 0x140 (PIN_INPUT_PULLUP | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */
54 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.rmii_ref_clk */
55 >;
56 };
57
58 cpsw_sleep: cpsw_sleep {
59 pinctrl-single,pins = <
60 /* Slave 1 reset value */
61 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
62 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
63 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
64 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
65 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
66 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
67 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
68 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
69 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
70 >;
71 };
72
73 davinci_mdio_default: davinci_mdio_default {
74 pinctrl-single,pins = <
75 /* mdio_data.mdio_data */
76 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)
77 /* mdio_clk.mdio_clk */
78 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)
79 >;
80 };
81
82 davinci_mdio_sleep: davinci_mdio_sleep {
83 pinctrl-single,pins = <
84 /* MDIO reset value */
85 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
86 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
87 >;
88 };
89
90 nandflash_pins: nandflash_pins {
91 pinctrl-single,pins = <
92 0x00 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
93 0x04 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
94 0x08 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
95 0x0c (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
96 0x10 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
97 0x14 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
98 0x18 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
99 0x1c (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
100
101 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
102 0x7c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
103 0x90 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
104 0x94 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
105 0x98 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wen.gpmc_wen */
106 0x9c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
107 >;
108 };
109};
110
111&uart0 {
112 pinctrl-names = "default";
113 pinctrl-0 = <&uart0_pins>;
114
115 status = "okay";
116};
117
118&i2c0 {
119 pinctrl-names = "default";
120 pinctrl-0 = <&i2c0_pins>;
121
122 status = "okay";
123 clock-frequency = <400000>;
124
125 tps: tps@24 {
126 reg = <0x24>;
127 };
128
129};
130
131/include/ "tps65217.dtsi"
132
133&tps {
134 regulators {
135 dcdc1_reg: regulator@0 {
136 regulator-name = "vdds_dpr";
137 regulator-always-on;
138 };
139
140 dcdc2_reg: regulator@1 {
141 /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
142 regulator-name = "vdd_mpu";
143 regulator-min-microvolt = <925000>;
144 regulator-max-microvolt = <1325000>;
145 regulator-boot-on;
146 regulator-always-on;
147 };
148
149 dcdc3_reg: regulator@2 {
150 /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
151 regulator-name = "vdd_core";
152 regulator-min-microvolt = <925000>;
153 regulator-max-microvolt = <1150000>;
154 regulator-boot-on;
155 regulator-always-on;
156 };
157
158 ldo1_reg: regulator@3 {
159 regulator-name = "vio,vrtc,vdds";
160 regulator-boot-on;
161 regulator-always-on;
162 };
163
164 ldo2_reg: regulator@4 {
165 regulator-name = "vdd_3v3aux";
166 regulator-boot-on;
167 regulator-always-on;
168 };
169
170 ldo3_reg: regulator@5 {
171 regulator-name = "vdd_1v8";
172 regulator-boot-on;
173 regulator-always-on;
174 };
175
176 ldo4_reg: regulator@6 {
177 regulator-name = "vdd_3v3d";
178 regulator-boot-on;
179 regulator-always-on;
180 };
181 };
182};
183
184/* Ethernet MAC */
185&mac {
186 slaves = <1>;
187 pinctrl-names = "default", "sleep";
188 pinctrl-0 = <&cpsw_default>;
189 pinctrl-1 = <&cpsw_sleep>;
190 status = "okay";
191};
192
193&davinci_mdio {
194 pinctrl-names = "default", "sleep";
195 pinctrl-0 = <&davinci_mdio_default>;
196 pinctrl-1 = <&davinci_mdio_sleep>;
197 status = "okay";
198};
199
200/* NAND Flash */
201&elm {
202 status = "okay";
203};
204
205&gpmc {
206 status = "okay";
207 pinctrl-names = "default";
208 pinctrl-0 = <&nandflash_pins>;
209 ranges = <0 0 0x08000000 0x01000000>; /* CS0 0 @addr 0x08000000, size 0x01000000 */
210 nand@0,0 {
211 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
212 ti,nand-ecc-opt = "bch8";
213 ti,elm-id = <&elm>;
214 nand-bus-width = <8>;
215 gpmc,device-width = <1>;
216 gpmc,sync-clk-ps = <0>;
217 gpmc,cs-on-ns = <0>;
218 gpmc,cs-rd-off-ns = <44>;
219 gpmc,cs-wr-off-ns = <44>;
220 gpmc,adv-on-ns = <6>;
221 gpmc,adv-rd-off-ns = <34>;
222 gpmc,adv-wr-off-ns = <44>;
223 gpmc,we-on-ns = <0>;
224 gpmc,we-off-ns = <40>;
225 gpmc,oe-on-ns = <0>;
226 gpmc,oe-off-ns = <54>;
227 gpmc,access-ns = <64>;
228 gpmc,rd-cycle-ns = <82>;
229 gpmc,wr-cycle-ns = <82>;
230 gpmc,wait-on-read = "true";
231 gpmc,wait-on-write = "true";
232 gpmc,bus-turnaround-ns = <0>;
233 gpmc,cycle2cycle-delay-ns = <0>;
234 gpmc,clk-activation-ns = <0>;
235 gpmc,wait-monitoring-ns = <0>;
236 gpmc,wr-access-ns = <40>;
237 gpmc,wr-data-mux-bus-ns = <0>;
238 };
239};
diff --git a/arch/arm/boot/dts/am335x-evmsk.dts b/arch/arm/boot/dts/am335x-evmsk.dts
index df5fee6b6b4b..87fc7a35e802 100644
--- a/arch/arm/boot/dts/am335x-evmsk.dts
+++ b/arch/arm/boot/dts/am335x-evmsk.dts
@@ -15,6 +15,7 @@
15 15
16#include "am33xx.dtsi" 16#include "am33xx.dtsi"
17#include <dt-bindings/pwm/pwm.h> 17#include <dt-bindings/pwm/pwm.h>
18#include <dt-bindings/interrupt-controller/irq.h>
18 19
19/ { 20/ {
20 model = "TI AM335x EVM-SK"; 21 model = "TI AM335x EVM-SK";
@@ -647,6 +648,16 @@
647 cap-power-off-card; 648 cap-power-off-card;
648 pinctrl-names = "default"; 649 pinctrl-names = "default";
649 pinctrl-0 = <&mmc2_pins>; 650 pinctrl-0 = <&mmc2_pins>;
651
652 #address-cells = <1>;
653 #size-cells = <0>;
654 wlcore: wlcore@2 {
655 compatible = "ti,wl1271";
656 reg = <2>;
657 interrupt-parent = <&gpio1>;
658 interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; /* gpio 31 */
659 ref-clock-frequency = <38400000>;
660 };
650}; 661};
651 662
652&mcasp1 { 663&mcasp1 {
diff --git a/arch/arm/boot/dts/am335x-nano.dts b/arch/arm/boot/dts/am335x-nano.dts
index a3466455b171..5ed4ca6eaf55 100644
--- a/arch/arm/boot/dts/am335x-nano.dts
+++ b/arch/arm/boot/dts/am335x-nano.dts
@@ -213,7 +213,9 @@
213 pinctrl-0 = <&i2c0_pins>; 213 pinctrl-0 = <&i2c0_pins>;
214 214
215 gpio@20 { 215 gpio@20 {
216 compatible = "mcp,mcp23017"; 216 compatible = "microchip,mcp23017";
217 gpio-controller;
218 #gpio-cells = <2>;
217 reg = <0x20>; 219 reg = <0x20>;
218 }; 220 };
219 221
@@ -222,7 +224,7 @@
222 }; 224 };
223 225
224 eeprom@53 { 226 eeprom@53 {
225 compatible = "mcp,24c02"; 227 compatible = "microchip,24c02";
226 reg = <0x53>; 228 reg = <0x53>;
227 pagesize = <8>; 229 pagesize = <8>;
228 }; 230 };
@@ -297,8 +299,8 @@
297 | |-->0x004FFFFF-> Kernel end 299 | |-->0x004FFFFF-> Kernel end
298 | |-->0x00500000-> File system start 300 | |-->0x00500000-> File system start
299 | | 301 | |
300 | |-->0x014FFFFF-> File system end 302 | |-->0x01FFFFFF-> File system end
301 | |-->0x01500000-> User data start 303 | |-->0x02000000-> User data start
302 | | 304 | |
303 | |-->0x03FFFFFF-> User data end 305 | |-->0x03FFFFFF-> User data end
304 | |-->0x04000000-> Data storage start 306 | |-->0x04000000-> Data storage start
@@ -327,12 +329,12 @@
327 329
328 partition@4 { 330 partition@4 {
329 label = "rootfs"; 331 label = "rootfs";
330 reg = <0x00500000 0x01000000>; /* 16MB */ 332 reg = <0x00500000 0x01b00000>; /* 27MB */
331 }; 333 };
332 334
333 partition@5 { 335 partition@5 {
334 label = "user"; 336 label = "user";
335 reg = <0x01500000 0x02b00000>; /* 43MB */ 337 reg = <0x02000000 0x02000000>; /* 32MB */
336 }; 338 };
337 339
338 partition@6 { 340 partition@6 {
@@ -343,7 +345,7 @@
343}; 345};
344 346
345&mac { 347&mac {
346 dual_emac = <1>; 348 dual_emac;
347 status = "okay"; 349 status = "okay";
348}; 350};
349 351
@@ -353,11 +355,13 @@
353 355
354&cpsw_emac0 { 356&cpsw_emac0 {
355 phy_id = <&davinci_mdio>, <0>; 357 phy_id = <&davinci_mdio>, <0>;
358 phy-mode = "mii";
356 dual_emac_res_vlan = <1>; 359 dual_emac_res_vlan = <1>;
357}; 360};
358 361
359&cpsw_emac1 { 362&cpsw_emac1 {
360 phy_id = <&davinci_mdio>, <1>; 363 phy_id = <&davinci_mdio>, <1>;
364 phy-mode = "mii";
361 dual_emac_res_vlan = <2>; 365 dual_emac_res_vlan = <2>;
362}; 366};
363 367
diff --git a/arch/arm/boot/dts/am33xx-clocks.dtsi b/arch/arm/boot/dts/am33xx-clocks.dtsi
index 071b56aa0c7e..afb4b3a7bab4 100644
--- a/arch/arm/boot/dts/am33xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am33xx-clocks.dtsi
@@ -7,7 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10&scrm_clocks { 10&scm_clocks {
11 sys_clkin_ck: sys_clkin_ck { 11 sys_clkin_ck: sys_clkin_ck {
12 #clock-cells = <0>; 12 #clock-cells = <0>;
13 compatible = "ti,mux-clock"; 13 compatible = "ti,mux-clock";
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index acd37057bca9..21fcc440fc1a 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -83,20 +83,6 @@
83 }; 83 };
84 }; 84 };
85 85
86 am33xx_control_module: control_module@4a002000 {
87 compatible = "syscon";
88 reg = <0x44e10000 0x7fc>;
89 };
90
91 am33xx_pinmux: pinmux@44e10800 {
92 compatible = "pinctrl-single";
93 reg = <0x44e10800 0x0238>;
94 #address-cells = <1>;
95 #size-cells = <0>;
96 pinctrl-single,register-width = <32>;
97 pinctrl-single,function-mask = <0x7f>;
98 };
99
100 /* 86 /*
101 * XXX: Use a flat representation of the AM33XX interconnect. 87 * XXX: Use a flat representation of the AM33XX interconnect.
102 * The real AM33XX interconnect network is quite complex. Since 88 * The real AM33XX interconnect network is quite complex. Since
@@ -111,37 +97,58 @@
111 ranges; 97 ranges;
112 ti,hwmods = "l3_main"; 98 ti,hwmods = "l3_main";
113 99
114 prcm: prcm@44e00000 { 100 l4_wkup: l4_wkup@44c00000 {
115 compatible = "ti,am3-prcm"; 101 compatible = "ti,am3-l4-wkup", "simple-bus";
116 reg = <0x44e00000 0x4000>; 102 #address-cells = <1>;
117 103 #size-cells = <1>;
118 prcm_clocks: clocks { 104 ranges = <0 0x44c00000 0x280000>;
119 #address-cells = <1>;
120 #size-cells = <0>;
121 };
122 105
123 prcm_clockdomains: clockdomains { 106 prcm: prcm@200000 {
124 }; 107 compatible = "ti,am3-prcm";
125 }; 108 reg = <0x200000 0x4000>;
126 109
127 scrm: scrm@44e10000 { 110 prcm_clocks: clocks {
128 compatible = "ti,am3-scrm"; 111 #address-cells = <1>;
129 reg = <0x44e10000 0x2000>; 112 #size-cells = <0>;
113 };
130 114
131 scrm_clocks: clocks { 115 prcm_clockdomains: clockdomains {
132 #address-cells = <1>; 116 };
133 #size-cells = <0>;
134 }; 117 };
135 118
136 scrm_clockdomains: clockdomains { 119 scm: scm@210000 {
120 compatible = "ti,am3-scm", "simple-bus";
121 reg = <0x210000 0x2000>;
122 #address-cells = <1>;
123 #size-cells = <1>;
124 ranges = <0 0x210000 0x2000>;
125
126 am33xx_pinmux: pinmux@800 {
127 compatible = "pinctrl-single";
128 reg = <0x800 0x238>;
129 #address-cells = <1>;
130 #size-cells = <0>;
131 pinctrl-single,register-width = <32>;
132 pinctrl-single,function-mask = <0x7f>;
133 };
134
135 scm_conf: scm_conf@0 {
136 compatible = "syscon";
137 reg = <0x0 0x800>;
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 scm_clocks: clocks {
142 #address-cells = <1>;
143 #size-cells = <0>;
144 };
145 };
146
147 scm_clockdomains: clockdomains {
148 };
137 }; 149 };
138 }; 150 };
139 151
140 cm: syscon@44e10000 {
141 compatible = "ti,am33xx-controlmodule", "syscon";
142 reg = <0x44e10000 0x800>;
143 };
144
145 intc: interrupt-controller@48200000 { 152 intc: interrupt-controller@48200000 {
146 compatible = "ti,am33xx-intc"; 153 compatible = "ti,am33xx-intc";
147 interrupt-controller; 154 interrupt-controller;
@@ -350,7 +357,7 @@
350 reg = <0x481cc000 0x2000>; 357 reg = <0x481cc000 0x2000>;
351 clocks = <&dcan0_fck>; 358 clocks = <&dcan0_fck>;
352 clock-names = "fck"; 359 clock-names = "fck";
353 syscon-raminit = <&am33xx_control_module 0x644 0>; 360 syscon-raminit = <&scm_conf 0x644 0>;
354 interrupts = <52>; 361 interrupts = <52>;
355 status = "disabled"; 362 status = "disabled";
356 }; 363 };
@@ -361,7 +368,7 @@
361 reg = <0x481d0000 0x2000>; 368 reg = <0x481d0000 0x2000>;
362 clocks = <&dcan1_fck>; 369 clocks = <&dcan1_fck>;
363 clock-names = "fck"; 370 clock-names = "fck";
364 syscon-raminit = <&am33xx_control_module 0x644 1>; 371 syscon-raminit = <&scm_conf 0x644 1>;
365 interrupts = <55>; 372 interrupts = <55>;
366 status = "disabled"; 373 status = "disabled";
367 }; 374 };
@@ -720,7 +727,7 @@
720 */ 727 */
721 interrupts = <40 41 42 43>; 728 interrupts = <40 41 42 43>;
722 ranges; 729 ranges;
723 syscon = <&cm>; 730 syscon = <&scm_conf>;
724 status = "disabled"; 731 status = "disabled";
725 732
726 davinci_mdio: mdio@4a101000 { 733 davinci_mdio: mdio@4a101000 {
diff --git a/arch/arm/boot/dts/am3517.dtsi b/arch/arm/boot/dts/am3517.dtsi
index c90724bded10..f164dce08755 100644
--- a/arch/arm/boot/dts/am3517.dtsi
+++ b/arch/arm/boot/dts/am3517.dtsi
@@ -31,7 +31,7 @@
31 status = "disabled"; 31 status = "disabled";
32 reg = <0x5c000000 0x30000>; 32 reg = <0x5c000000 0x30000>;
33 interrupts = <67 68 69 70>; 33 interrupts = <67 68 69 70>;
34 syscon = <&omap3_scm_general>; 34 syscon = <&scm_conf>;
35 ti,davinci-ctrl-reg-offset = <0x10000>; 35 ti,davinci-ctrl-reg-offset = <0x10000>;
36 ti,davinci-ctrl-mod-reg-offset = <0>; 36 ti,davinci-ctrl-mod-reg-offset = <0>;
37 ti,davinci-ctrl-ram-offset = <0x20000>; 37 ti,davinci-ctrl-ram-offset = <0x20000>;
diff --git a/arch/arm/boot/dts/am35xx-clocks.dtsi b/arch/arm/boot/dts/am35xx-clocks.dtsi
index df489d310b50..518b8fde88b0 100644
--- a/arch/arm/boot/dts/am35xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am35xx-clocks.dtsi
@@ -7,7 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10&scrm_clocks { 10&scm_clocks {
11 emac_ick: emac_ick { 11 emac_ick: emac_ick {
12 #clock-cells = <0>; 12 #clock-cells = <0>;
13 compatible = "ti,am35xx-gate-clock"; 13 compatible = "ti,am35xx-gate-clock";
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 8a099bc10c1e..c80a3e233792 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -66,22 +66,6 @@
66 cache-level = <2>; 66 cache-level = <2>;
67 }; 67 };
68 68
69 am43xx_control_module: control_module@4a002000 {
70 compatible = "syscon";
71 reg = <0x44e10000 0x7f4>;
72 };
73
74 am43xx_pinmux: pinmux@44e10800 {
75 compatible = "ti,am437-padconf", "pinctrl-single";
76 reg = <0x44e10800 0x31c>;
77 #address-cells = <1>;
78 #size-cells = <0>;
79 #interrupt-cells = <1>;
80 interrupt-controller;
81 pinctrl-single,register-width = <32>;
82 pinctrl-single,function-mask = <0xffffffff>;
83 };
84
85 ocp { 69 ocp {
86 compatible = "ti,am4372-l3-noc", "simple-bus"; 70 compatible = "ti,am4372-l3-noc", "simple-bus";
87 #address-cells = <1>; 71 #address-cells = <1>;
@@ -93,29 +77,58 @@
93 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 77 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
94 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 78 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
95 79
96 prcm: prcm@44df0000 { 80 l4_wkup: l4_wkup@44c00000 {
97 compatible = "ti,am4-prcm"; 81 compatible = "ti,am4-l4-wkup", "simple-bus";
98 reg = <0x44df0000 0x11000>; 82 #address-cells = <1>;
99 83 #size-cells = <1>;
100 prcm_clocks: clocks { 84 ranges = <0 0x44c00000 0x287000>;
101 #address-cells = <1>;
102 #size-cells = <0>;
103 };
104 85
105 prcm_clockdomains: clockdomains { 86 prcm: prcm@1f0000 {
106 }; 87 compatible = "ti,am4-prcm";
107 }; 88 reg = <0x1f0000 0x11000>;
108 89
109 scrm: scrm@44e10000 { 90 prcm_clocks: clocks {
110 compatible = "ti,am4-scrm"; 91 #address-cells = <1>;
111 reg = <0x44e10000 0x2000>; 92 #size-cells = <0>;
93 };
112 94
113 scrm_clocks: clocks { 95 prcm_clockdomains: clockdomains {
114 #address-cells = <1>; 96 };
115 #size-cells = <0>;
116 }; 97 };
117 98
118 scrm_clockdomains: clockdomains { 99 scm: scm@210000 {
100 compatible = "ti,am4-scm", "simple-bus";
101 reg = <0x210000 0x4000>;
102 #address-cells = <1>;
103 #size-cells = <1>;
104 ranges = <0 0x210000 0x4000>;
105
106 am43xx_pinmux: pinmux@800 {
107 compatible = "ti,am437-padconf",
108 "pinctrl-single";
109 reg = <0x800 0x31c>;
110 #address-cells = <1>;
111 #size-cells = <0>;
112 #interrupt-cells = <1>;
113 interrupt-controller;
114 pinctrl-single,register-width = <32>;
115 pinctrl-single,function-mask = <0xffffffff>;
116 };
117
118 scm_conf: scm_conf@0 {
119 compatible = "syscon";
120 reg = <0x0 0x800>;
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 scm_clocks: clocks {
125 #address-cells = <1>;
126 #size-cells = <0>;
127 };
128 };
129
130 scm_clockdomains: clockdomains {
131 };
119 }; 132 };
120 }; 133 };
121 134
@@ -796,7 +809,7 @@
796 }; 809 };
797 810
798 ocp2scp0: ocp2scp@483a8000 { 811 ocp2scp0: ocp2scp@483a8000 {
799 compatible = "ti,omap-ocp2scp"; 812 compatible = "ti,am437x-ocp2scp", "ti,omap-ocp2scp";
800 #address-cells = <1>; 813 #address-cells = <1>;
801 #size-cells = <1>; 814 #size-cells = <1>;
802 ranges; 815 ranges;
@@ -815,7 +828,7 @@
815 }; 828 };
816 829
817 ocp2scp1: ocp2scp@483e8000 { 830 ocp2scp1: ocp2scp@483e8000 {
818 compatible = "ti,omap-ocp2scp"; 831 compatible = "ti,am437x-ocp2scp", "ti,omap-ocp2scp";
819 #address-cells = <1>; 832 #address-cells = <1>;
820 #size-cells = <1>; 833 #size-cells = <1>;
821 ranges; 834 ranges;
@@ -893,7 +906,7 @@
893 }; 906 };
894 907
895 hdq: hdq@48347000 { 908 hdq: hdq@48347000 {
896 compatible = "ti,am43xx-hdq"; 909 compatible = "ti,am4372-hdq";
897 reg = <0x48347000 0x1000>; 910 reg = <0x48347000 0x1000>;
898 interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>; 911 interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
899 clocks = <&func_12m_clk>; 912 clocks = <&func_12m_clk>;
@@ -942,7 +955,7 @@
942 clocks = <&dcan0_fck>; 955 clocks = <&dcan0_fck>;
943 clock-names = "fck"; 956 clock-names = "fck";
944 reg = <0x481cc000 0x2000>; 957 reg = <0x481cc000 0x2000>;
945 syscon-raminit = <&am43xx_control_module 0x644 0>; 958 syscon-raminit = <&scm_conf 0x644 0>;
946 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; 959 interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
947 status = "disabled"; 960 status = "disabled";
948 }; 961 };
@@ -953,7 +966,7 @@
953 clocks = <&dcan1_fck>; 966 clocks = <&dcan1_fck>;
954 clock-names = "fck"; 967 clock-names = "fck";
955 reg = <0x481d0000 0x2000>; 968 reg = <0x481d0000 0x2000>;
956 syscon-raminit = <&am43xx_control_module 0x644 1>; 969 syscon-raminit = <&scm_conf 0x644 1>;
957 interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; 970 interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
958 status = "disabled"; 971 status = "disabled";
959 }; 972 };
diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
index 0198f5a62b96..378344271746 100644
--- a/arch/arm/boot/dts/am437x-idk-evm.dts
+++ b/arch/arm/boot/dts/am437x-idk-evm.dts
@@ -133,6 +133,20 @@
133 >; 133 >;
134 }; 134 };
135 135
136 i2c2_pins_default: i2c2_pins_default {
137 pinctrl-single,pins = <
138 0x1e8 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data1.i2c2_scl */
139 0x1ec (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data0.i2c2_sda */
140 >;
141 };
142
143 i2c2_pins_sleep: i2c2_pins_sleep {
144 pinctrl-single,pins = <
145 0x1e8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
146 0x1ec (PIN_INPUT_PULLDOWN | MUX_MODE7)
147 >;
148 };
149
136 mmc1_pins_default: pinmux_mmc1_pins_default { 150 mmc1_pins_default: pinmux_mmc1_pins_default {
137 pinctrl-single,pins = < 151 pinctrl-single,pins = <
138 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */ 152 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
@@ -263,6 +277,14 @@
263 }; 277 };
264}; 278};
265 279
280&i2c2 {
281 status = "okay";
282 pinctrl-names = "default", "sleep";
283 pinctrl-0 = <&i2c2_pins_default>;
284 pinctrl-1 = <&i2c2_pins_sleep>;
285 clock-frequency = <100000>;
286};
287
266&epwmss0 { 288&epwmss0 {
267 status = "okay"; 289 status = "okay";
268}; 290};
diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts
index 1d7109196872..795d68af6df9 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -69,7 +69,48 @@
69 }; 69 };
70 }; 70 };
71 71
72 am43xx_pinmux: pinmux@44e10800 { 72 matrix_keypad: matrix_keypad@0 {
73 compatible = "gpio-matrix-keypad";
74 debounce-delay-ms = <5>;
75 col-scan-delay-us = <2>;
76
77 row-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH /* Bank0, pin12 */
78 &gpio0 13 GPIO_ACTIVE_HIGH /* Bank0, pin13 */
79 &gpio0 14 GPIO_ACTIVE_HIGH /* Bank0, pin14 */
80 &gpio0 15 GPIO_ACTIVE_HIGH>; /* Bank0, pin15 */
81
82 col-gpios = <&gpio3 9 GPIO_ACTIVE_HIGH /* Bank3, pin9 */
83 &gpio3 10 GPIO_ACTIVE_HIGH /* Bank3, pin10 */
84 &gpio2 18 GPIO_ACTIVE_HIGH /* Bank2, pin18 */
85 &gpio2 19 GPIO_ACTIVE_HIGH>; /* Bank2, pin19 */
86
87 linux,keymap = <0x00000201 /* P1 */
88 0x01000204 /* P4 */
89 0x02000207 /* P7 */
90 0x0300020a /* NUMERIC_STAR */
91 0x00010202 /* P2 */
92 0x01010205 /* P5 */
93 0x02010208 /* P8 */
94 0x03010200 /* P0 */
95 0x00020203 /* P3 */
96 0x01020206 /* P6 */
97 0x02020209 /* P9 */
98 0x0302020b /* NUMERIC_POUND */
99 0x00030067 /* UP */
100 0x0103006a /* RIGHT */
101 0x0203006c /* DOWN */
102 0x03030069>; /* LEFT */
103 };
104
105 backlight {
106 compatible = "pwm-backlight";
107 pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
108 brightness-levels = <0 51 53 56 62 75 101 152 255>;
109 default-brightness-level = <8>;
110 };
111};
112
113&am43xx_pinmux {
73 cpsw_default: cpsw_default { 114 cpsw_default: cpsw_default {
74 pinctrl-single,pins = < 115 pinctrl-single,pins = <
75 /* Slave 1 */ 116 /* Slave 1 */
@@ -279,47 +320,6 @@
279 0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) 320 0x204 (DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)
280 >; 321 >;
281 }; 322 };
282 };
283
284 matrix_keypad: matrix_keypad@0 {
285 compatible = "gpio-matrix-keypad";
286 debounce-delay-ms = <5>;
287 col-scan-delay-us = <2>;
288
289 row-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH /* Bank0, pin12 */
290 &gpio0 13 GPIO_ACTIVE_HIGH /* Bank0, pin13 */
291 &gpio0 14 GPIO_ACTIVE_HIGH /* Bank0, pin14 */
292 &gpio0 15 GPIO_ACTIVE_HIGH>; /* Bank0, pin15 */
293
294 col-gpios = <&gpio3 9 GPIO_ACTIVE_HIGH /* Bank3, pin9 */
295 &gpio3 10 GPIO_ACTIVE_HIGH /* Bank3, pin10 */
296 &gpio2 18 GPIO_ACTIVE_HIGH /* Bank2, pin18 */
297 &gpio2 19 GPIO_ACTIVE_HIGH>; /* Bank2, pin19 */
298
299 linux,keymap = <0x00000201 /* P1 */
300 0x01000204 /* P4 */
301 0x02000207 /* P7 */
302 0x0300020a /* NUMERIC_STAR */
303 0x00010202 /* P2 */
304 0x01010205 /* P5 */
305 0x02010208 /* P8 */
306 0x03010200 /* P0 */
307 0x00020203 /* P3 */
308 0x01020206 /* P6 */
309 0x02020209 /* P9 */
310 0x0302020b /* NUMERIC_POUND */
311 0x00030067 /* UP */
312 0x0103006a /* RIGHT */
313 0x0203006c /* DOWN */
314 0x03030069>; /* LEFT */
315 };
316
317 backlight {
318 compatible = "pwm-backlight";
319 pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
320 brightness-levels = <0 51 53 56 62 75 101 152 255>;
321 default-brightness-level = <8>;
322 };
323}; 323};
324 324
325&mmc1 { 325&mmc1 {
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
index cfb49686ab6a..d0c0dfa4ec48 100644
--- a/arch/arm/boot/dts/am43xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
@@ -7,7 +7,7 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10&scrm_clocks { 10&scm_clocks {
11 sys_clkin_ck: sys_clkin_ck { 11 sys_clkin_ck: sys_clkin_ck {
12 #clock-cells = <0>; 12 #clock-cells = <0>;
13 compatible = "ti,mux-clock"; 13 compatible = "ti,mux-clock";
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index bd48dba16748..15f198e4864d 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -8,7 +8,6 @@
8/dts-v1/; 8/dts-v1/;
9 9
10#include "dra74x.dtsi" 10#include "dra74x.dtsi"
11#include <dt-bindings/clk/ti-dra7-atl.h>
12#include <dt-bindings/gpio/gpio.h> 11#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/interrupt-controller/irq.h> 12#include <dt-bindings/interrupt-controller/irq.h>
14 13
@@ -87,6 +86,7 @@
87 gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; 86 gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>;
88 gpio-fan,speed-map = <0 0>, 87 gpio-fan,speed-map = <0 0>,
89 <13000 1>; 88 <13000 1>;
89 #cooling-cells = <2>;
90 }; 90 };
91 91
92 extcon_usb1: extcon_usb1 { 92 extcon_usb1: extcon_usb1 {
@@ -442,6 +442,7 @@
442 pinctrl-0 = <&tmp102_pins_default>; 442 pinctrl-0 = <&tmp102_pins_default>;
443 interrupt-parent = <&gpio7>; 443 interrupt-parent = <&gpio7>;
444 interrupts = <16 IRQ_TYPE_LEVEL_LOW>; 444 interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
445 #thermal-sensor-cells = <1>;
445 }; 446 };
446}; 447};
447 448
@@ -548,6 +549,61 @@
548 pinctrl-0 = <&usb1_pins>; 549 pinctrl-0 = <&usb1_pins>;
549}; 550};
550 551
552&omap_dwc3_1 {
553 extcon = <&extcon_usb1>;
554};
555
556&omap_dwc3_2 {
557 extcon = <&extcon_usb2>;
558};
559
551&usb2 { 560&usb2 {
552 dr_mode = "peripheral"; 561 dr_mode = "peripheral";
553}; 562};
563
564&cpu_trips {
565 cpu_alert1: cpu_alert1 {
566 temperature = <50000>; /* millicelsius */
567 hysteresis = <2000>; /* millicelsius */
568 type = "active";
569 };
570};
571
572&cpu_cooling_maps {
573 map1 {
574 trip = <&cpu_alert1>;
575 cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
576 };
577};
578
579&thermal_zones {
580 board_thermal: board_thermal {
581 polling-delay-passive = <1250>; /* milliseconds */
582 polling-delay = <1500>; /* milliseconds */
583
584 /* sensor ID */
585 thermal-sensors = <&tmp102 0>;
586
587 board_trips: trips {
588 board_alert0: board_alert {
589 temperature = <40000>; /* millicelsius */
590 hysteresis = <2000>; /* millicelsius */
591 type = "active";
592 };
593
594 board_crit: board_crit {
595 temperature = <105000>; /* millicelsius */
596 hysteresis = <0>; /* millicelsius */
597 type = "critical";
598 };
599 };
600
601 board_cooling_maps: cooling-maps {
602 map0 {
603 trip = <&board_alert0>;
604 cooling-device =
605 <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
606 };
607 };
608 };
609};
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index e993c46bd472..19f3bf271915 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -45,6 +45,15 @@
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE. 47 * OTHER DEALINGS IN THE SOFTWARE.
48 *
49 * Note: this Device Tree assumes that the bootloader has remapped the
50 * internal registers to 0xf1000000 (instead of the default
51 * 0xd0000000). The 0xf1000000 is the default used by the recent,
52 * DT-capable, U-Boot bootloaders provided by Marvell. Some earlier
53 * boards were delivered with an older version of the bootloader that
54 * left internal registers mapped at 0xd0000000. If you are in this
55 * situation, you should either update your bootloader (preferred
56 * solution) or the below Device Tree should be adjusted.
48 */ 57 */
49 58
50/dts-v1/; 59/dts-v1/;
@@ -55,7 +64,7 @@
55 compatible = "marvell,a370-db", "marvell,armada370", "marvell,armada-370-xp"; 64 compatible = "marvell,a370-db", "marvell,armada370", "marvell,armada-370-xp";
56 65
57 chosen { 66 chosen {
58 bootargs = "console=ttyS0,115200 earlyprintk"; 67 stdout-path = "serial0:115200n8";
59 }; 68 };
60 69
61 memory { 70 memory {
@@ -64,7 +73,7 @@
64 }; 73 };
65 74
66 soc { 75 soc {
67 ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 76 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
68 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; 77 MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
69 78
70 internal-regs { 79 internal-regs {
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index b10ceb488efe..0f40d5da28c3 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -51,7 +51,7 @@
51 compatible = "globalscale,mirabox", "marvell,armada370", "marvell,armada-370-xp"; 51 compatible = "globalscale,mirabox", "marvell,armada370", "marvell,armada-370-xp";
52 52
53 chosen { 53 chosen {
54 bootargs = "console=ttyS0,115200 earlyprintk"; 54 stdout-path = "serial0:115200n8";
55 }; 55 };
56 56
57 memory { 57 memory {
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
index 3f8cc3845a5e..a31207860f34 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
@@ -53,7 +53,7 @@
53 compatible = "netgear,readynas-102", "marvell,armada370", "marvell,armada-370-xp"; 53 compatible = "netgear,readynas-102", "marvell,armada370", "marvell,armada-370-xp";
54 54
55 chosen { 55 chosen {
56 bootargs = "console=ttyS0,115200 earlyprintk"; 56 stdout-path = "serial0:115200n8";
57 }; 57 };
58 58
59 memory { 59 memory {
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
index 99eb8a014ac6..00540f292979 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
@@ -53,7 +53,7 @@
53 compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp"; 53 compatible = "netgear,readynas-104", "marvell,armada370", "marvell,armada-370-xp";
54 54
55 chosen { 55 chosen {
56 bootargs = "console=ttyS0,115200 earlyprintk"; 56 stdout-path = "serial0:115200n8";
57 }; 57 };
58 58
59 memory { 59 memory {
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 6ae36a38beb2..19475e68b8e9 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -64,7 +64,7 @@
64 compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp"; 64 compatible = "marvell,a370-rd", "marvell,armada370", "marvell,armada-370-xp";
65 65
66 chosen { 66 chosen {
67 bootargs = "console=ttyS0,115200 earlyprintk"; 67 stdout-path = "serial0:115200n8";
68 }; 68 };
69 69
70 memory { 70 memory {
diff --git a/arch/arm/boot/dts/armada-370-synology-ds213j.dts b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
index 59f74e66963f..b42b767763aa 100644
--- a/arch/arm/boot/dts/armada-370-synology-ds213j.dts
+++ b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
@@ -67,8 +67,7 @@
67 "marvell,armada-370-xp"; 67 "marvell,armada-370-xp";
68 68
69 chosen { 69 chosen {
70 bootargs = "console=ttyS0,115200 earlyprintk"; 70 stdout-path = "serial0:115200n8";
71 stdout-path = &uart0;
72 }; 71 };
73 72
74 memory { 73 memory {
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 8a322ad57e5f..ec96f0b36346 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -59,8 +59,8 @@
59 compatible = "marvell,armada-370-xp"; 59 compatible = "marvell,armada-370-xp";
60 60
61 aliases { 61 aliases {
62 eth0 = &eth0; 62 serial0 = &uart0;
63 eth1 = &eth1; 63 serial1 = &uart1;
64 }; 64 };
65 65
66 cpus { 66 cpus {
@@ -73,6 +73,11 @@
73 }; 73 };
74 }; 74 };
75 75
76 pmu {
77 compatible = "arm,cortex-a9-pmu";
78 interrupts-extended = <&mpic 3>;
79 };
80
76 soc { 81 soc {
77 #address-cells = <2>; 82 #address-cells = <2>;
78 #size-cells = <1>; 83 #size-cells = <1>;
@@ -223,7 +228,7 @@
223 <0x20250 0x8>; 228 <0x20250 0x8>;
224 }; 229 };
225 230
226 mpic: interrupt-controller@20000 { 231 mpic: interrupt-controller@20a00 {
227 compatible = "marvell,mpic"; 232 compatible = "marvell,mpic";
228 #interrupt-cells = <1>; 233 #interrupt-cells = <1>;
229 #size-cells = <1>; 234 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index 27397f151def..00b50db57c9c 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -129,6 +129,7 @@
129 compatible = "marvell,aurora-outer-cache"; 129 compatible = "marvell,aurora-outer-cache";
130 reg = <0x08000 0x1000>; 130 reg = <0x08000 0x1000>;
131 cache-id-part = <0x100>; 131 cache-id-part = <0x100>;
132 cache-level = <2>;
132 cache-unified; 133 cache-unified;
133 wt-override; 134 wt-override;
134 }; 135 };
@@ -232,7 +233,7 @@
232 reg = <0x18330 0x4>; 233 reg = <0x18330 0x4>;
233 }; 234 };
234 235
235 interrupt-controller@20000 { 236 interrupt-controller@20a00 {
236 reg = <0x20a00 0x1d0>, <0x21870 0x58>; 237 reg = <0x20a00 0x1d0>, <0x21870 0x58>;
237 }; 238 };
238 239
diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index 0440891425c0..4eabc9c21f8d 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -55,7 +55,7 @@
55 compatible = "marvell,a375-db", "marvell,armada375"; 55 compatible = "marvell,a375-db", "marvell,armada375";
56 56
57 chosen { 57 chosen {
58 bootargs = "console=ttyS0,115200 earlyprintk"; 58 stdout-path = "serial0:115200n8";
59 }; 59 };
60 60
61 memory { 61 memory {
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index ba3c57e0af72..c675257f2377 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -60,8 +60,8 @@
60 gpio0 = &gpio0; 60 gpio0 = &gpio0;
61 gpio1 = &gpio1; 61 gpio1 = &gpio1;
62 gpio2 = &gpio2; 62 gpio2 = &gpio2;
63 ethernet0 = &eth0; 63 serial0 = &uart0;
64 ethernet1 = &eth1; 64 serial1 = &uart1;
65 }; 65 };
66 66
67 clocks { 67 clocks {
@@ -96,6 +96,11 @@
96 }; 96 };
97 }; 97 };
98 98
99 pmu {
100 compatible = "arm,cortex-a9-pmu";
101 interrupts-extended = <&mpic 3>;
102 };
103
99 soc { 104 soc {
100 compatible = "marvell,armada375-mbus", "simple-bus"; 105 compatible = "marvell,armada375-mbus", "simple-bus";
101 #address-cells = <2>; 106 #address-cells = <2>;
@@ -276,7 +281,7 @@
276 status = "disabled"; 281 status = "disabled";
277 }; 282 };
278 283
279 serial@12000 { 284 uart0: serial@12000 {
280 compatible = "snps,dw-apb-uart"; 285 compatible = "snps,dw-apb-uart";
281 reg = <0x12000 0x100>; 286 reg = <0x12000 0x100>;
282 reg-shift = <2>; 287 reg-shift = <2>;
@@ -286,7 +291,7 @@
286 status = "disabled"; 291 status = "disabled";
287 }; 292 };
288 293
289 serial@12100 { 294 uart1: serial@12100 {
290 compatible = "snps,dw-apb-uart"; 295 compatible = "snps,dw-apb-uart";
291 reg = <0x12100 0x100>; 296 reg = <0x12100 0x100>;
292 reg-shift = <2>; 297 reg-shift = <2>;
@@ -394,7 +399,7 @@
394 reg = <0x20000 0x100>, <0x20180 0x20>; 399 reg = <0x20000 0x100>, <0x20180 0x20>;
395 }; 400 };
396 401
397 mpic: interrupt-controller@20000 { 402 mpic: interrupt-controller@20a00 {
398 compatible = "marvell,mpic"; 403 compatible = "marvell,mpic";
399 reg = <0x20a00 0x2d0>, <0x21070 0x58>; 404 reg = <0x20a00 0x2d0>, <0x21070 0x58>;
400 #interrupt-cells = <1>; 405 #interrupt-cells = <1>;
diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 57b9119fb3e0..7219ac3a3d90 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -49,8 +49,7 @@
49 compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada38x"; 49 compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada38x";
50 50
51 chosen { 51 chosen {
52 bootargs = "console=ttyS0,115200"; 52 stdout-path = "serial1:115200n8";
53 stdout-path = &uart1;
54 }; 53 };
55 54
56 memory { 55 memory {
@@ -126,6 +125,13 @@
126 status = "okay"; 125 status = "okay";
127 }; 126 };
128 127
128 pinctrl@18000 {
129 xhci0_vbus_pins: xhci0-vbus-pins {
130 marvell,pins = "mpp44";
131 marvell,function = "gpio";
132 };
133 };
134
129 ethernet@30000 { 135 ethernet@30000 {
130 status = "okay"; 136 status = "okay";
131 phy = <&phy2>; 137 phy = <&phy2>;
@@ -150,6 +156,24 @@
150 phy = <&phy0>; 156 phy = <&phy0>;
151 phy-mode = "rgmii-id"; 157 phy-mode = "rgmii-id";
152 }; 158 };
159
160 nfc: flash@d0000 {
161 status = "okay";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 num-cs = <1>;
166 nand-ecc-strength = <4>;
167 nand-ecc-step-size = <512>;
168 marvell,nand-keep-config;
169 marvell,nand-enable-arbiter;
170 nand-on-flash-bbt;
171 };
172
173 usb3@f0000 {
174 status = "okay";
175 usb-phy = <&usb3_phy>;
176 };
153 }; 177 };
154 178
155 pcie-controller { 179 pcie-controller {
@@ -175,4 +199,20 @@
175 }; 199 };
176 }; 200 };
177 }; 201 };
202
203 usb3_phy: usb3_phy {
204 compatible = "usb-nop-xceiv";
205 vcc-supply = <&reg_xhci0_vbus>;
206 };
207
208 reg_xhci0_vbus: xhci0-vbus {
209 compatible = "regulator-fixed";
210 pinctrl-names = "default";
211 pinctrl-0 = <&xhci0_vbus_pins>;
212 regulator-name = "xhci0-vbus";
213 regulator-min-microvolt = <5000000>;
214 regulator-max-microvolt = <5000000>;
215 enable-active-high;
216 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
217 };
178}; 218};
diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts
index 16512efcd32c..51d1623de53e 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -54,7 +54,7 @@
54 "marvell,armada385", "marvell,armada380"; 54 "marvell,armada385", "marvell,armada380";
55 55
56 chosen { 56 chosen {
57 bootargs = "console=ttyS0,115200 earlyprintk"; 57 stdout-path = "serial0:115200n8";
58 }; 58 };
59 59
60 memory { 60 memory {
@@ -99,7 +99,7 @@
99 phy-mode = "rgmii-id"; 99 phy-mode = "rgmii-id";
100 }; 100 };
101 101
102 usb@50000 { 102 usb@58000 {
103 status = "ok"; 103 status = "ok";
104 }; 104 };
105 105
diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts
index 590b383db323..78514ab0b47a 100644
--- a/arch/arm/boot/dts/armada-388-gp.dts
+++ b/arch/arm/boot/dts/armada-388-gp.dts
@@ -48,8 +48,7 @@
48 compatible = "marvell,a385-gp", "marvell,armada388", "marvell,armada380"; 48 compatible = "marvell,a385-gp", "marvell,armada388", "marvell,armada380";
49 49
50 chosen { 50 chosen {
51 bootargs = "console=ttyS0,115200"; 51 stdout-path = "serial0:115200n8";
52 stdout-path = &uart0;
53 }; 52 };
54 53
55 memory { 54 memory {
@@ -135,7 +134,7 @@
135 }; 134 };
136 135
137 /* CON4 */ 136 /* CON4 */
138 usb@50000 { 137 usb@58000 {
139 vcc-supply = <&reg_usb2_0_vbus>; 138 vcc-supply = <&reg_usb2_0_vbus>;
140 status = "okay"; 139 status = "okay";
141 }; 140 };
diff --git a/arch/arm/boot/dts/armada-388-rd.dts b/arch/arm/boot/dts/armada-388-rd.dts
index d99baac72081..1dc6e2341cc2 100644
--- a/arch/arm/boot/dts/armada-388-rd.dts
+++ b/arch/arm/boot/dts/armada-388-rd.dts
@@ -55,7 +55,7 @@
55 "marvell,armada385","marvell,armada380"; 55 "marvell,armada385","marvell,armada380";
56 56
57 chosen { 57 chosen {
58 bootargs = "console=ttyS0,115200 earlyprintk"; 58 stdout-path = "serial0:115200n8";
59 }; 59 };
60 60
61 memory { 61 memory {
@@ -85,6 +85,16 @@
85 clock-frequency = <100000>; 85 clock-frequency = <100000>;
86 }; 86 };
87 87
88 sdhci@d8000 {
89 pinctrl-names = "default";
90 pinctrl-0 = <&sdhci_pins>;
91 broken-cd;
92 no-1-8-v;
93 wp-inverted;
94 bus-width = <8>;
95 status = "okay";
96 };
97
88 serial@12000 { 98 serial@12000 {
89 status = "okay"; 99 status = "okay";
90 }; 100 };
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 1dff30a81e24..ed2dd8ba4080 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -59,9 +59,13 @@
59 aliases { 59 aliases {
60 gpio0 = &gpio0; 60 gpio0 = &gpio0;
61 gpio1 = &gpio1; 61 gpio1 = &gpio1;
62 ethernet0 = &eth0; 62 serial0 = &uart0;
63 ethernet1 = &eth1; 63 serial1 = &uart1;
64 ethernet2 = &eth2; 64 };
65
66 pmu {
67 compatible = "arm,cortex-a9-pmu";
68 interrupts-extended = <&mpic 3>;
65 }; 69 };
66 70
67 soc { 71 soc {
@@ -216,7 +220,7 @@
216 status = "disabled"; 220 status = "disabled";
217 }; 221 };
218 222
219 serial@12100 { 223 uart1: serial@12100 {
220 compatible = "snps,dw-apb-uart"; 224 compatible = "snps,dw-apb-uart";
221 reg = <0x12100 0x100>; 225 reg = <0x12100 0x100>;
222 reg-shift = <2>; 226 reg-shift = <2>;
@@ -368,7 +372,7 @@
368 reg = <0x20000 0x100>, <0x20180 0x20>; 372 reg = <0x20000 0x100>, <0x20180 0x20>;
369 }; 373 };
370 374
371 mpic: interrupt-controller@20000 { 375 mpic: interrupt-controller@20a00 {
372 compatible = "marvell,mpic"; 376 compatible = "marvell,mpic";
373 reg = <0x20a00 0x2d0>, <0x21070 0x58>; 377 reg = <0x20a00 0x2d0>, <0x21070 0x58>;
374 #interrupt-cells = <1>; 378 #interrupt-cells = <1>;
@@ -435,7 +439,7 @@
435 status = "disabled"; 439 status = "disabled";
436 }; 440 };
437 441
438 usb@50000 { 442 usb@58000 {
439 compatible = "marvell,orion-ehci"; 443 compatible = "marvell,orion-ehci";
440 reg = <0x58000 0x500>; 444 reg = <0x58000 0x500>;
441 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; 445 interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
@@ -548,8 +552,11 @@
548 552
549 sdhci@d8000 { 553 sdhci@d8000 {
550 compatible = "marvell,armada-380-sdhci"; 554 compatible = "marvell,armada-380-sdhci";
551 reg = <0xd8000 0x1000>, <0xdc000 0x100>; 555 reg-names = "sdhci", "mbus", "conf-sdio3";
552 interrupts = <0 25 0x4>; 556 reg = <0xd8000 0x1000>,
557 <0xdc000 0x100>,
558 <0x18454 0x4>;
559 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
553 clocks = <&gateclk 17>; 560 clocks = <&gateclk 17>;
554 mrvl,clk-delay-cycles = <0x1F>; 561 mrvl,clk-delay-cycles = <0x1F>;
555 status = "disabled"; 562 status = "disabled";
diff --git a/arch/arm/boot/dts/armada-390.dtsi b/arch/arm/boot/dts/armada-390.dtsi
new file mode 100644
index 000000000000..094e39c66039
--- /dev/null
+++ b/arch/arm/boot/dts/armada-390.dtsi
@@ -0,0 +1,57 @@
1/*
2 * Device Tree Include file for Marvell Armada 390 SoC.
3 *
4 * Copyright (C) 2015 Marvell
5 *
6 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 *
8 * This file is dual-licensed: you can use it either under the terms
9 * of the GPL or the X11 license, at your option. Note that this dual
10 * licensing only applies to this file, and not this project as a
11 * whole.
12 *
13 * a) This file is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * This file is distributed in the hope that it will be useful
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * Or, alternatively
24 *
25 * b) Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use
29 * copy, modify, merge, publish, distribute, sublicense, and/or
30 * sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47#include "armada-39x.dtsi"
48
49/ {
50 soc {
51 internal-regs {
52 pinctrl@18000 {
53 compatible = "marvell,mv88f6920-pinctrl";
54 reg = <0x18000 0x20>;
55 };
56 };
57};
diff --git a/arch/arm/boot/dts/armada-398-db.dts b/arch/arm/boot/dts/armada-398-db.dts
new file mode 100644
index 000000000000..bbf83756c43c
--- /dev/null
+++ b/arch/arm/boot/dts/armada-398-db.dts
@@ -0,0 +1,153 @@
1/*
2 * Device Tree Include file for Marvell Armada 398 Development Board
3 *
4 * Copyright (C) 2015 Marvell
5 *
6 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 *
8 * This file is dual-licensed: you can use it either under the terms
9 * of the GPL or the X11 license, at your option. Note that this dual
10 * licensing only applies to this file, and not this project as a
11 * whole.
12 *
13 * a) This file is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * This file is distributed in the hope that it will be useful
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * Or, alternatively
24 *
25 * b) Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use
29 * copy, modify, merge, publish, distribute, sublicense, and/or
30 * sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47/dts-v1/;
48#include "armada-398.dtsi"
49
50/ {
51 model = "Marvell Armada 398 Development Board";
52 compatible = "marvell,a398-db", "marvell,armada398", "marvell,armada390";
53
54 chosen {
55 stdout-path = "serial0:115200n8";
56 };
57
58 memory {
59 device_type = "memory";
60 reg = <0x00000000 0x80000000>; /* 2 GB */
61 };
62
63 soc {
64 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
65 MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
66
67 internal-regs {
68 spi@10680 {
69 status = "okay";
70 pinctrl-0 = <&spi1_pins>;
71 pinctrl-names = "default";
72
73 spi-flash@0 {
74 #address-cells = <1>;
75 #size-cells = <0>;
76 compatible = "n25q128a13";
77 reg = <0>;
78 spi-max-frequency = <108000000>;
79
80 partition@0 {
81 label = "U-Boot";
82 reg = <0 0x400000>;
83 };
84
85 partition@400000 {
86 label = "Filesystem";
87 reg = <0x400000 0x1000000>;
88 };
89 };
90 };
91
92 i2c@11000 {
93 pinctrl-0 = <&i2c0_pins>;
94 pinctrl-names = "default";
95 status = "okay";
96 clock-frequency = <100000>;
97 };
98
99 serial@12000 {
100 pinctrl-0 = <&uart0_pins>;
101 pinctrl-names = "default";
102 status = "okay";
103 };
104
105 serial@12100 {
106 pinctrl-0 = <&uart1_pins>;
107 pinctrl-names = "default";
108 status = "okay";
109 };
110
111 flash@d0000 {
112 status = "okay";
113 pinctrl-0 = <&nand_pins>;
114 pinctrl-names = "default";
115 num-cs = <1>;
116 marvell,nand-keep-config;
117 marvell,nand-enable-arbiter;
118 nand-on-flash-bbt;
119 nand-ecc-strength = <8>;
120 nand-ecc-step-size = <512>;
121
122 partition@0 {
123 label = "U-Boot";
124 reg = <0 0x800000>;
125 };
126 partition@800000 {
127 label = "Linux";
128 reg = <0x800000 0x800000>;
129 };
130 partition@1000000 {
131 label = "Filesystem";
132 reg = <0x1000000 0x3f000000>;
133 };
134 };
135 };
136
137 pcie-controller {
138 status = "okay";
139
140 pcie@1,0 {
141 status = "okay";
142 };
143
144 pcie@2,0 {
145 status = "okay";
146 };
147
148 pcie@3,0 {
149 status = "okay";
150 };
151 };
152 };
153};
diff --git a/arch/arm/boot/dts/armada-398.dtsi b/arch/arm/boot/dts/armada-398.dtsi
new file mode 100644
index 000000000000..fdc25914e3a3
--- /dev/null
+++ b/arch/arm/boot/dts/armada-398.dtsi
@@ -0,0 +1,60 @@
1/*
2 * Device Tree Include file for Marvell Armada 398 SoC.
3 *
4 * Copyright (C) 2015 Marvell
5 *
6 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 *
8 * This file is dual-licensed: you can use it either under the terms
9 * of the GPL or the X11 license, at your option. Note that this dual
10 * licensing only applies to this file, and not this project as a
11 * whole.
12 *
13 * a) This file is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * This file is distributed in the hope that it will be useful
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * Or, alternatively
24 *
25 * b) Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use
29 * copy, modify, merge, publish, distribute, sublicense, and/or
30 * sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47#include "armada-39x.dtsi"
48
49/ {
50 compatible = "marvell,armada398", "marvell,armada390";
51
52 soc {
53 internal-regs {
54 pinctrl@18000 {
55 compatible = "marvell,mv88f6928-pinctrl";
56 reg = <0x18000 0x20>;
57 };
58 };
59 };
60};
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
new file mode 100644
index 000000000000..0e85fc15ceda
--- /dev/null
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -0,0 +1,508 @@
1/*
2 * Device Tree Include file for Marvell Armada 39x family of SoCs.
3 *
4 * Copyright (C) 2015 Marvell
5 *
6 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7 *
8 * This file is dual-licensed: you can use it either under the terms
9 * of the GPL or the X11 license, at your option. Note that this dual
10 * licensing only applies to this file, and not this project as a
11 * whole.
12 *
13 * a) This file is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * This file is distributed in the hope that it will be useful
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * Or, alternatively
24 *
25 * b) Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use
29 * copy, modify, merge, publish, distribute, sublicense, and/or
30 * sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47#include "skeleton.dtsi"
48#include <dt-bindings/interrupt-controller/arm-gic.h>
49#include <dt-bindings/interrupt-controller/irq.h>
50
51#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
52
53/ {
54 model = "Marvell Armada 39x family SoC";
55 compatible = "marvell,armada390";
56
57 aliases {
58 serial0 = &uart0;
59 serial1 = &uart1;
60 serial2 = &uart2;
61 serial3 = &uart3;
62 };
63
64 cpus {
65 #address-cells = <1>;
66 #size-cells = <0>;
67 enable-method = "marvell,armada-390-smp";
68
69 cpu@0 {
70 device_type = "cpu";
71 compatible = "arm,cortex-a9";
72 reg = <0>;
73 };
74 cpu@1 {
75 device_type = "cpu";
76 compatible = "arm,cortex-a9";
77 reg = <1>;
78 };
79 };
80
81 soc {
82 compatible = "marvell,armada390-mbus", "marvell,armadaxp-mbus",
83 "simple-bus";
84 #address-cells = <2>;
85 #size-cells = <1>;
86 controller = <&mbusc>;
87 interrupt-parent = <&gic>;
88 pcie-mem-aperture = <0xe0000000 0x8000000>;
89 pcie-io-aperture = <0xe8000000 0x100000>;
90
91 bootrom {
92 compatible = "marvell,bootrom";
93 reg = <MBUS_ID(0x01, 0x1d) 0 0x200000>;
94 };
95
96 internal-regs {
97 compatible = "simple-bus";
98 #address-cells = <1>;
99 #size-cells = <1>;
100 ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
101
102 L2: cache-controller@8000 {
103 compatible = "arm,pl310-cache";
104 reg = <0x8000 0x1000>;
105 cache-unified;
106 cache-level = <2>;
107 };
108
109 scu@c000 {
110 compatible = "arm,cortex-a9-scu";
111 reg = <0xc000 0x100>;
112 };
113
114 timer@c600 {
115 compatible = "arm,cortex-a9-twd-timer";
116 reg = <0xc600 0x20>;
117 interrupts = <GIC_PPI 13 (IRQ_TYPE_EDGE_RISING | GIC_CPU_MASK_SIMPLE(2))>;
118 clocks = <&coreclk 2>;
119 };
120
121 gic: interrupt-controller@d000 {
122 compatible = "arm,cortex-a9-gic";
123 #interrupt-cells = <3>;
124 #size-cells = <0>;
125 interrupt-controller;
126 reg = <0xd000 0x1000>,
127 <0xc100 0x100>;
128 };
129
130 spi0: spi@10600 {
131 compatible = "marvell,orion-spi";
132 reg = <0x10600 0x50>;
133 #address-cells = <1>;
134 #size-cells = <0>;
135 cell-index = <0>;
136 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
137 clocks = <&coreclk 0>;
138 status = "disabled";
139 };
140
141 spi1: spi@10680 {
142 compatible = "marvell,orion-spi";
143 reg = <0x10680 0x50>;
144 #address-cells = <1>;
145 #size-cells = <0>;
146 cell-index = <1>;
147 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
148 clocks = <&coreclk 0>;
149 status = "disabled";
150 };
151
152 i2c0: i2c@11000 {
153 compatible = "marvell,mv64xxx-i2c";
154 reg = <0x11000 0x20>;
155 #address-cells = <1>;
156 #size-cells = <0>;
157 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
158 timeout-ms = <1000>;
159 clocks = <&coreclk 0>;
160 status = "disabled";
161 };
162
163 i2c1: i2c@11100 {
164 compatible = "marvell,mv64xxx-i2c";
165 reg = <0x11100 0x20>;
166 #address-cells = <1>;
167 #size-cells = <0>;
168 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
169 timeout-ms = <1000>;
170 clocks = <&coreclk 0>;
171 status = "disabled";
172 };
173
174 i2c2: i2c@11200 {
175 compatible = "marvell,mv64xxx-i2c";
176 reg = <0x11200 0x20>;
177 #address-cells = <1>;
178 #size-cells = <0>;
179 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
180 timeout-ms = <1000>;
181 clocks = <&coreclk 0>;
182 status = "disabled";
183 };
184
185 i2c3: i2c@11300 {
186 compatible = "marvell,mv64xxx-i2c";
187 reg = <0x11300 0x20>;
188 #address-cells = <1>;
189 #size-cells = <0>;
190 interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
191 timeout-ms = <1000>;
192 clocks = <&coreclk 0>;
193 status = "disabled";
194 };
195
196 uart0: serial@12000 {
197 compatible = "snps,dw-apb-uart";
198 reg = <0x12000 0x100>;
199 reg-shift = <2>;
200 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
201 reg-io-width = <1>;
202 clocks = <&coreclk 0>;
203 status = "disabled";
204 };
205
206 uart1: serial@12100 {
207 compatible = "snps,dw-apb-uart";
208 reg = <0x12100 0x100>;
209 reg-shift = <2>;
210 interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
211 reg-io-width = <1>;
212 clocks = <&coreclk 0>;
213 status = "disabled";
214 };
215
216 uart2: serial@12200 {
217 compatible = "snps,dw-apb-uart";
218 reg = <0x12200 0x100>;
219 reg-shift = <2>;
220 interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
221 reg-io-width = <1>;
222 clocks = <&coreclk 0>;
223 status = "disabled";
224 };
225
226 uart3: serial@12300 {
227 compatible = "snps,dw-apb-uart";
228 reg = <0x12300 0x100>;
229 reg-shift = <2>;
230 interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
231 reg-io-width = <1>;
232 clocks = <&coreclk 0>;
233 status = "disabled";
234 };
235
236 pinctrl@18000 {
237 i2c0_pins: i2c0-pins {
238 marvell,pins = "mpp2", "mpp3";
239 marvell,function = "i2c0";
240 };
241
242 uart0_pins: uart0-pins {
243 marvell,pins = "mpp0", "mpp1";
244 marvell,function = "ua0";
245 };
246
247 uart1_pins: uart1-pins {
248 marvell,pins = "mpp19", "mpp20";
249 marvell,function = "ua1";
250 };
251
252 spi1_pins: spi1-pins {
253 marvell,pins = "mpp56", "mpp57", "mpp58", "mpp59";
254 marvell,function = "spi1";
255 };
256
257 nand_pins: nand-pins {
258 marvell,pins = "mpp22", "mpp34", "mpp23", "mpp33",
259 "mpp38", "mpp28", "mpp40", "mpp42",
260 "mpp35", "mpp36", "mpp25", "mpp30",
261 "mpp32";
262 marvell,function = "dev";
263 };
264 };
265
266 system-controller@18200 {
267 compatible = "marvell,armada-390-system-controller",
268 "marvell,armada-370-xp-system-controller";
269 reg = <0x18200 0x100>;
270 };
271
272 gateclk: clock-gating-control@18220 {
273 compatible = "marvell,armada-390-gating-clock";
274 reg = <0x18220 0x4>;
275 clocks = <&coreclk 0>;
276 #clock-cells = <1>;
277 };
278
279 coreclk: mvebu-sar@18600 {
280 compatible = "marvell,armada-390-core-clock";
281 reg = <0x18600 0x04>;
282 #clock-cells = <1>;
283 };
284
285 mbusc: mbus-controller@20000 {
286 compatible = "marvell,mbus-controller";
287 reg = <0x20000 0x100>, <0x20180 0x20>, <0x20250 0x8>;
288 };
289
290 mpic: interrupt-controller@20a00 {
291 compatible = "marvell,mpic";
292 reg = <0x20a00 0x2d0>, <0x21070 0x58>;
293 #interrupt-cells = <1>;
294 #size-cells = <1>;
295 interrupt-controller;
296 msi-controller;
297 interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>;
298 };
299
300 timer@20300 {
301 compatible = "marvell,armada-380-timer",
302 "marvell,armada-xp-timer";
303 reg = <0x20300 0x30>, <0x21040 0x30>;
304 interrupts-extended = <&gic GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
305 <&gic GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
306 <&gic GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
307 <&gic GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
308 <&mpic 5>,
309 <&mpic 6>;
310 clocks = <&coreclk 2>, <&coreclk 5>;
311 clock-names = "nbclk", "fixed";
312 };
313
314 cpurst@20800 {
315 compatible = "marvell,armada-370-cpu-reset";
316 reg = <0x20800 0x10>;
317 };
318
319 pmsu@22000 {
320 compatible = "marvell,armada-390-pmsu",
321 "marvell,armada-380-pmsu";
322 reg = <0x22000 0x1000>;
323 };
324
325 xor@60800 {
326 compatible = "marvell,orion-xor";
327 reg = <0x60800 0x100
328 0x60a00 0x100>;
329 clocks = <&gateclk 22>;
330 status = "okay";
331
332 xor00 {
333 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
334 dmacap,memcpy;
335 dmacap,xor;
336 };
337 xor01 {
338 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
339 dmacap,memcpy;
340 dmacap,xor;
341 dmacap,memset;
342 };
343 };
344
345 xor@60900 {
346 compatible = "marvell,orion-xor";
347 reg = <0x60900 0x100
348 0x60b00 0x100>;
349 clocks = <&gateclk 28>;
350 status = "okay";
351
352 xor10 {
353 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
354 dmacap,memcpy;
355 dmacap,xor;
356 };
357 xor11 {
358 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
359 dmacap,memcpy;
360 dmacap,xor;
361 dmacap,memset;
362 };
363 };
364
365 flash@d0000 {
366 compatible = "marvell,armada370-nand";
367 reg = <0xd0000 0x54>;
368 #address-cells = <1>;
369 #size-cells = <1>;
370 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
371 clocks = <&coredivclk 0>;
372 status = "disabled";
373 };
374
375 sdhci@d8000 {
376 compatible = "marvell,armada-380-sdhci";
377 reg = <0xd8000 0x1000>, <0xdc000 0x100>;
378 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
379 clocks = <&gateclk 17>;
380 mrvl,clk-delay-cycles = <0x1F>;
381 status = "disabled";
382 };
383
384 coredivclk: clock@e4250 {
385 compatible = "marvell,armada-390-corediv-clock",
386 "marvell,armada-380-corediv-clock";
387 reg = <0xe4250 0xc>;
388 #clock-cells = <1>;
389 clocks = <&mainpll>;
390 clock-output-names = "nand";
391 };
392 };
393
394 pcie-controller {
395 compatible = "marvell,armada-370-pcie";
396 status = "disabled";
397 device_type = "pci";
398
399 #address-cells = <3>;
400 #size-cells = <2>;
401
402 msi-parent = <&mpic>;
403 bus-range = <0x00 0xff>;
404
405 ranges =
406 <0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000
407 0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000
408 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000
409 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000
410 0x82000000 0x1 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 0 MEM */
411 0x81000000 0x1 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 0 IO */
412 0x82000000 0x2 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 1 MEM */
413 0x81000000 0x2 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 1 IO */
414 0x82000000 0x3 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 2 MEM */
415 0x81000000 0x3 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 2 IO */
416 0x82000000 0x4 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 3 MEM */
417 0x81000000 0x4 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 3 IO */>;
418
419 /*
420 * This port can be either x4 or x1. When
421 * configured in x4 by the bootloader, then
422 * pcie@4,0 is not available.
423 */
424 pcie@1,0 {
425 device_type = "pci";
426 assigned-addresses = <0x82000800 0 0x80000 0 0x2000>;
427 reg = <0x0800 0 0 0 0>;
428 #address-cells = <3>;
429 #size-cells = <2>;
430 #interrupt-cells = <1>;
431 ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0
432 0x81000000 0 0 0x81000000 0x1 0 1 0>;
433 interrupt-map-mask = <0 0 0 0>;
434 interrupt-map = <0 0 0 0 &gic GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
435 marvell,pcie-port = <0>;
436 marvell,pcie-lane = <0>;
437 clocks = <&gateclk 8>;
438 status = "disabled";
439 };
440
441 /* x1 port */
442 pcie@2,0 {
443 device_type = "pci";
444 assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
445 reg = <0x1000 0 0 0 0>;
446 #address-cells = <3>;
447 #size-cells = <2>;
448 #interrupt-cells = <1>;
449 ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0
450 0x81000000 0 0 0x81000000 0x2 0 1 0>;
451 interrupt-map-mask = <0 0 0 0>;
452 interrupt-map = <0 0 0 0 &gic GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
453 marvell,pcie-port = <1>;
454 marvell,pcie-lane = <0>;
455 clocks = <&gateclk 5>;
456 status = "disabled";
457 };
458
459 /* x1 port */
460 pcie@3,0 {
461 device_type = "pci";
462 assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
463 reg = <0x1800 0 0 0 0>;
464 #address-cells = <3>;
465 #size-cells = <2>;
466 #interrupt-cells = <1>;
467 ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0
468 0x81000000 0 0 0x81000000 0x3 0 1 0>;
469 interrupt-map-mask = <0 0 0 0>;
470 interrupt-map = <0 0 0 0 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
471 marvell,pcie-port = <2>;
472 marvell,pcie-lane = <0>;
473 clocks = <&gateclk 6>;
474 status = "disabled";
475 };
476
477 /*
478 * x1 port only available when pcie@1,0 is
479 * configured as a x1 port
480 */
481 pcie@4,0 {
482 device_type = "pci";
483 assigned-addresses = <0x82000800 0 0x48000 0 0x2000>;
484 reg = <0x2000 0 0 0 0>;
485 #address-cells = <3>;
486 #size-cells = <2>;
487 #interrupt-cells = <1>;
488 ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0
489 0x81000000 0 0 0x81000000 0x4 0 1 0>;
490 interrupt-map-mask = <0 0 0 0>;
491 interrupt-map = <0 0 0 0 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
492 marvell,pcie-port = <3>;
493 marvell,pcie-lane = <0>;
494 clocks = <&gateclk 7>;
495 status = "disabled";
496 };
497 };
498 };
499
500 clocks {
501 /* 2 GHz fixed main PLL */
502 mainpll: mainpll {
503 compatible = "fixed-clock";
504 #clock-cells = <0>;
505 clock-frequency = <2000000000>;
506 };
507 };
508};
diff --git a/arch/arm/boot/dts/armada-xp-axpwifiap.dts b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
index c1fbab243609..dfd782b44e50 100644
--- a/arch/arm/boot/dts/armada-xp-axpwifiap.dts
+++ b/arch/arm/boot/dts/armada-xp-axpwifiap.dts
@@ -59,7 +59,7 @@
59 compatible = "marvell,rd-axpwifiap", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; 59 compatible = "marvell,rd-axpwifiap", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
60 60
61 chosen { 61 chosen {
62 bootargs = "console=ttyS0,115200 earlyprintk"; 62 stdout-path = "serial0:115200n8";
63 }; 63 };
64 64
65 memory { 65 memory {
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 48bdafe17526..103782407618 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -64,7 +64,7 @@
64 compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; 64 compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
65 65
66 chosen { 66 chosen {
67 bootargs = "console=ttyS0,115200 earlyprintk"; 67 stdout-path = "serial0:115200n8";
68 }; 68 };
69 69
70 memory { 70 memory {
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index 206aebba01be..565227eacf06 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -65,7 +65,7 @@
65 compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; 65 compatible = "marvell,axp-gp", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
66 66
67 chosen { 67 chosen {
68 bootargs = "console=ttyS0,115200 earlyprintk"; 68 stdout-path = "serial0:115200n8";
69 }; 69 };
70 70
71 memory { 71 memory {
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index 5fb3c8b687cf..06a6a6c1fdf7 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -54,8 +54,7 @@
54 "marvell,armadaxp", "marvell,armada-370-xp"; 54 "marvell,armadaxp", "marvell,armada-370-xp";
55 55
56 chosen { 56 chosen {
57 bootargs = "console=ttyS0,115200 earlyprintk"; 57 stdout-path = "serial0:115200n8";
58 stdout-path = &uart0;
59 }; 58 };
60 59
61 memory { 60 memory {
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
new file mode 100644
index 000000000000..a2cf2154dcdb
--- /dev/null
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -0,0 +1,393 @@
1/*
2 * Device Tree file for the Linksys WRT1900AC (Mamba).
3 *
4 * Note: this board is shipped with a new generation boot loader that
5 * remaps internal registers at 0xf1000000. Therefore, if earlyprintk
6 * is used, the CONFIG_DEBUG_MVEBU_UART0_ALTERNATE option should be
7 * used.
8 *
9 * Copyright (C) 2014 Imre Kaloz <kaloz@openwrt.org>
10 *
11 * Based on armada-xp-axpwifiap.dts:
12 *
13 * Copyright (C) 2013 Marvell
14 *
15 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 *
17 * This file is dual-licensed: you can use it either under the terms
18 * of the GPL or the X11 license, at your option. Note that this dual
19 * licensing only applies to this file, and not this project as a
20 * whole.
21 *
22 * a) This file is licensed under the terms of the GNU General Public
23 * License version 2. This program is licensed "as is" without
24 * any warranty of any kind, whether express or implied.
25 *
26 * Or, alternatively,
27 *
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
35 * conditions:
36 *
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
48 */
49
50/dts-v1/;
51#include <dt-bindings/gpio/gpio.h>
52#include <dt-bindings/input/input.h>
53#include "armada-xp-mv78230.dtsi"
54
55/ {
56 model = "Linksys WRT1900AC";
57 compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
58 "marvell,armadaxp", "marvell,armada-370-xp";
59
60 chosen {
61 bootargs = "console=ttyS0,115200";
62 stdout-path = &uart0;
63 };
64
65 memory {
66 device_type = "memory";
67 reg = <0x00000000 0x00000000 0x00000000 0x10000000>; /* 256MB */
68 };
69
70 soc {
71 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000
72 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>;
73
74 pcie-controller {
75 status = "okay";
76
77 /* Etron EJ168 USB 3.0 controller */
78 pcie@1,0 {
79 /* Port 0, Lane 0 */
80 status = "okay";
81 };
82
83 /* First mini-PCIe port */
84 pcie@2,0 {
85 /* Port 0, Lane 1 */
86 status = "okay";
87 };
88
89 /* Second mini-PCIe port */
90 pcie@3,0 {
91 /* Port 0, Lane 3 */
92 status = "okay";
93 };
94 };
95
96 internal-regs {
97
98 /* J10: VCC, NC, RX, NC, TX, GND */
99 serial@12000 {
100 status = "okay";
101 };
102
103 sata@a0000 {
104 nr-ports = <1>;
105 status = "okay";
106 };
107
108 ethernet@70000 {
109 pinctrl-0 = <&ge0_rgmii_pins>;
110 pinctrl-names = "default";
111 status = "okay";
112 phy-mode = "rgmii-id";
113 fixed-link {
114 speed = <1000>;
115 full-duplex;
116 };
117 };
118
119 ethernet@74000 {
120 pinctrl-0 = <&ge1_rgmii_pins>;
121 pinctrl-names = "default";
122 status = "okay";
123 phy-mode = "rgmii-id";
124 fixed-link {
125 speed = <1000>;
126 full-duplex;
127 };
128 };
129
130 /* USB part of the eSATA/USB 2.0 port */
131 usb@50000 {
132 status = "okay";
133 };
134
135 i2c@11000 {
136 status = "okay";
137 clock-frequency = <100000>;
138
139 tmp421@4c {
140 compatible = "ti,tmp421";
141 reg = <0x4c>;
142 };
143
144 tlc59116@68 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 #gpio-cells = <2>;
148 compatible = "ti,tlc59116";
149 reg = <0x68>;
150
151 wan_amber@0 {
152 label = "mamba:amber:wan";
153 reg = <0x0>;
154 };
155
156 wan_white@1 {
157 label = "mamba:white:wan";
158 reg = <0x1>;
159 };
160
161 wlan_2g@2 {
162 label = "mamba:white:wlan_2g";
163 reg = <0x2>;
164 };
165
166 wlan_5g@3 {
167 label = "mamba:white:wlan_5g";
168 reg = <0x3>;
169 };
170
171 esata@4 {
172 label = "mamba:white:esata";
173 reg = <0x4>;
174 };
175
176 usb2@5 {
177 label = "mamba:white:usb2";
178 reg = <0x5>;
179 };
180
181 usb3_1@6 {
182 label = "mamba:white:usb3_1";
183 reg = <0x6>;
184 };
185
186 usb3_2@7 {
187 label = "mamba:white:usb3_2";
188 reg = <0x7>;
189 };
190
191 wps_white@8 {
192 label = "mamba:white:wps";
193 reg = <0x8>;
194 };
195
196 wps_amber@9 {
197 label = "mamba:amber:wps";
198 reg = <0x9>;
199 };
200 };
201 };
202
203 nand@d0000 {
204 status = "okay";
205 num-cs = <1>;
206 marvell,nand-keep-config;
207 marvell,nand-enable-arbiter;
208 nand-on-flash-bbt;
209 nand-ecc-strength = <4>;
210 nand-ecc-step-size = <512>;
211
212 partition@0 {
213 label = "u-boot";
214 reg = <0x0000000 0x100000>; /* 1MB */
215 read-only;
216 };
217
218 partition@100000 {
219 label = "u_env";
220 reg = <0x100000 0x40000>; /* 256KB */
221 };
222
223 partition@140000 {
224 label = "s_env";
225 reg = <0x140000 0x40000>; /* 256KB */
226 };
227
228 partition@900000 {
229 label = "devinfo";
230 reg = <0x900000 0x100000>; /* 1MB */
231 read-only;
232 };
233
234 /* kernel1 overlaps with rootfs1 by design */
235 partition@a00000 {
236 label = "kernel1";
237 reg = <0xa00000 0x2800000>; /* 40MB */
238 };
239
240 partition@d00000 {
241 label = "rootfs1";
242 reg = <0xd00000 0x2500000>; /* 37MB */
243 };
244
245 /* kernel2 overlaps with rootfs2 by design */
246 partition@3200000 {
247 label = "kernel2";
248 reg = <0x3200000 0x2800000>; /* 40MB */
249 };
250
251 partition@3500000 {
252 label = "rootfs2";
253 reg = <0x3500000 0x2500000>; /* 37MB */
254 };
255
256 /*
257 * 38MB, last MB is for the BBT, not writable
258 */
259 partition@5a00000 {
260 label = "syscfg";
261 reg = <0x5a00000 0x2600000>;
262 };
263
264 /*
265 * Unused area between "s_env" and "devinfo".
266 * Moved here because otherwise the renumbered
267 * partitions would break the bootloader
268 * supplied bootargs
269 */
270 partition@180000 {
271 label = "unused_area";
272 reg = <0x180000 0x780000>; /* 7.5MB */
273 };
274 };
275
276 spi0: spi@10600 {
277 status = "okay";
278
279 spi-flash@0 {
280 #address-cells = <1>;
281 #size-cells = <1>;
282 compatible = "everspin,mr25h256";
283 reg = <0>; /* Chip select 0 */
284 spi-max-frequency = <40000000>;
285 };
286 };
287 };
288 };
289
290 gpio_keys {
291 compatible = "gpio-keys";
292 #address-cells = <1>;
293 #size-cells = <0>;
294 pinctrl-0 = <&keys_pin>;
295 pinctrl-names = "default";
296
297 button@1 {
298 label = "WPS";
299 linux,code = <KEY_WPS_BUTTON>;
300 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
301 };
302
303 button@2 {
304 label = "Factory Reset Button";
305 linux,code = <KEY_RESTART>;
306 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
307 };
308 };
309
310 gpio-leds {
311 compatible = "gpio-leds";
312 pinctrl-0 = <&power_led_pin>;
313 pinctrl-names = "default";
314
315 power {
316 label = "mamba:white:power";
317 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
318 default-state = "on";
319 };
320 };
321
322 gpio_fan {
323 /* SUNON HA4010V4-0000-C99 */
324 compatible = "gpio-fan";
325 gpios = <&gpio0 24 0>;
326
327 gpio-fan,speed-map = <0 0
328 4500 1>;
329 };
330
331 dsa@0 {
332 compatible = "marvell,dsa";
333 #address-cells = <2>;
334 #size-cells = <0>;
335
336 dsa,ethernet = <&eth0>;
337 dsa,mii-bus = <&mdio>;
338
339 switch@0 {
340 #address-cells = <1>;
341 #size-cells = <0>;
342 reg = <0x0 0>; /* MDIO address 0, switch 0 in tree */
343
344 port@0 {
345 reg = <0>;
346 label = "lan4";
347 };
348
349 port@1 {
350 reg = <1>;
351 label = "lan3";
352 };
353
354 port@2 {
355 reg = <2>;
356 label = "lan2";
357 };
358
359 port@3 {
360 reg = <3>;
361 label = "lan1";
362 };
363
364 port@4 {
365 reg = <4>;
366 label = "internet";
367 };
368
369 port@5 {
370 reg = <5>;
371 label = "cpu";
372 };
373 };
374 };
375};
376
377&pinctrl {
378
379 keys_pin: keys-pin {
380 marvell,pins = "mpp32", "mpp33";
381 marvell,function = "gpio";
382 };
383
384 power_led_pin: power-led-pin {
385 marvell,pins = "mpp40";
386 marvell,function = "gpio";
387 };
388
389 gpio_fan_pin: gpio-fan-pin {
390 marvell,pins = "mpp24";
391 marvell,function = "gpio";
392 };
393};
diff --git a/arch/arm/boot/dts/armada-xp-matrix.dts b/arch/arm/boot/dts/armada-xp-matrix.dts
index 56f958eb1ede..f894bc83e957 100644
--- a/arch/arm/boot/dts/armada-xp-matrix.dts
+++ b/arch/arm/boot/dts/armada-xp-matrix.dts
@@ -52,7 +52,7 @@
52 compatible = "marvell,axp-matrix", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp"; 52 compatible = "marvell,axp-matrix", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
53 53
54 chosen { 54 chosen {
55 bootargs = "console=ttyS0,115200 earlyprintk"; 55 stdout-path = "serial0:115200n8";
56 }; 56 };
57 57
58 memory { 58 memory {
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index 4a7cbed79b07..8479fdc9e9c2 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -57,7 +57,6 @@
57 gpio0 = &gpio0; 57 gpio0 = &gpio0;
58 gpio1 = &gpio1; 58 gpio1 = &gpio1;
59 gpio2 = &gpio2; 59 gpio2 = &gpio2;
60 eth3 = &eth3;
61 }; 60 };
62 61
63 cpus { 62 cpus {
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index 36ce63a96cc9..661d54c81580 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -57,7 +57,6 @@
57 gpio0 = &gpio0; 57 gpio0 = &gpio0;
58 gpio1 = &gpio1; 58 gpio1 = &gpio1;
59 gpio2 = &gpio2; 59 gpio2 = &gpio2;
60 eth3 = &eth3;
61 }; 60 };
62 61
63 62
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
index 99cb9a8401b4..1516fc2627f9 100644
--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
+++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
@@ -53,7 +53,7 @@
53 compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp"; 53 compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
54 54
55 chosen { 55 chosen {
56 bootargs = "console=ttyS0,115200 earlyprintk"; 56 stdout-path = "serial0:115200n8";
57 }; 57 };
58 58
59 memory { 59 memory {
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index 0c76d9f05fd0..e3b08fb959e5 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -54,7 +54,7 @@
54 compatible = "plathome,openblocks-ax3-4", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp"; 54 compatible = "plathome,openblocks-ax3-4", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp";
55 55
56 chosen { 56 chosen {
57 bootargs = "console=ttyS0,115200 earlyprintk"; 57 stdout-path = "serial0:115200n8";
58 }; 58 };
59 59
60 memory { 60 memory {
diff --git a/arch/arm/boot/dts/armada-xp-synology-ds414.dts b/arch/arm/boot/dts/armada-xp-synology-ds414.dts
index e9fb225169aa..6063428fa6a0 100644
--- a/arch/arm/boot/dts/armada-xp-synology-ds414.dts
+++ b/arch/arm/boot/dts/armada-xp-synology-ds414.dts
@@ -67,8 +67,7 @@
67 "marvell,armadaxp", "marvell,armada-370-xp"; 67 "marvell,armadaxp", "marvell,armada-370-xp";
68 68
69 chosen { 69 chosen {
70 bootargs = "console=ttyS0,115200 earlyprintk"; 70 stdout-path = "serial0:115200n8";
71 stdout-path = &uart0;
72 }; 71 };
73 72
74 memory { 73 memory {
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 82917236a2fb..013d63f69e36 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -57,7 +57,8 @@
57 compatible = "marvell,armadaxp", "marvell,armada-370-xp"; 57 compatible = "marvell,armadaxp", "marvell,armada-370-xp";
58 58
59 aliases { 59 aliases {
60 eth2 = &eth2; 60 serial2 = &uart2;
61 serial3 = &uart3;
61 }; 62 };
62 63
63 soc { 64 soc {
@@ -78,6 +79,7 @@
78 compatible = "marvell,aurora-system-cache"; 79 compatible = "marvell,aurora-system-cache";
79 reg = <0x08000 0x1000>; 80 reg = <0x08000 0x1000>;
80 cache-id-part = <0x100>; 81 cache-id-part = <0x100>;
82 cache-level = <2>;
81 cache-unified; 83 cache-unified;
82 wt-override; 84 wt-override;
83 }; 85 };
@@ -149,11 +151,11 @@
149 cpuclk: clock-complex@18700 { 151 cpuclk: clock-complex@18700 {
150 #clock-cells = <1>; 152 #clock-cells = <1>;
151 compatible = "marvell,armada-xp-cpu-clock"; 153 compatible = "marvell,armada-xp-cpu-clock";
152 reg = <0x18700 0xA0>, <0x1c054 0x10>; 154 reg = <0x18700 0x24>, <0x1c054 0x10>;
153 clocks = <&coreclk 1>; 155 clocks = <&coreclk 1>;
154 }; 156 };
155 157
156 interrupt-controller@20000 { 158 interrupt-controller@20a00 {
157 reg = <0x20a00 0x2d0>, <0x21070 0x58>; 159 reg = <0x20a00 0x2d0>, <0x21070 0x58>;
158 }; 160 };
159 161
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index fec1fca2ad66..9991240b7438 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -167,7 +167,13 @@
167 167
168 macb1: ethernet@f802c000 { 168 macb1: ethernet@f802c000 {
169 phy-mode = "rmii"; 169 phy-mode = "rmii";
170 #address-cells = <1>;
171 #size-cells = <0>;
170 status = "okay"; 172 status = "okay";
173
174 ethernet-phy@1 {
175 reg = <0x1>;
176 };
171 }; 177 };
172 178
173 dbgu: serial@ffffee00 { 179 dbgu: serial@ffffee00 {
@@ -188,6 +194,11 @@
188 <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; 194 <AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
189 }; 195 };
190 196
197 pinctrl_key_gpio: key_gpio_0 {
198 atmel,pins =
199 <AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
200 };
201
191 pinctrl_mmc0_cd: mmc0_cd { 202 pinctrl_mmc0_cd: mmc0_cd {
192 atmel,pins = 203 atmel,pins =
193 <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 204 <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
@@ -276,6 +287,9 @@
276 gpio_keys { 287 gpio_keys {
277 compatible = "gpio-keys"; 288 compatible = "gpio-keys";
278 289
290 pinctrl-names = "default";
291 pinctrl-0 = <&pinctrl_key_gpio>;
292
279 bp3 { 293 bp3 {
280 label = "PB_USER"; 294 label = "PB_USER";
281 gpios = <&pioE 29 GPIO_ACTIVE_LOW>; 295 gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
new file mode 100644
index 000000000000..c740e1a2a3a5
--- /dev/null
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -0,0 +1,241 @@
1/*
2 * at91-sama5d4_xplained.dts - Device Tree file for SAMA5D4 Xplained board
3 *
4 * Copyright (C) 2015 Atmel,
5 * 2015 Josh Wu <josh.wu@atmel.com>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45/dts-v1/;
46#include "sama5d4.dtsi"
47
48/ {
49 model = "Atmel SAMA5D4 Xplained";
50 compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5";
51
52 chosen {
53 bootargs = "console=ttyS0,115200 ignore_loglevel earlyprintk";
54 };
55
56 memory {
57 reg = <0x20000000 0x20000000>;
58 };
59
60 clocks {
61 #address-cells = <1>;
62 #size-cells = <1>;
63 ranges;
64
65 main_clock: clock@0 {
66 compatible = "atmel,osc", "fixed-clock";
67 clock-frequency = <12000000>;
68 };
69
70 slow_xtal {
71 clock-frequency = <32768>;
72 };
73
74 main_xtal {
75 clock-frequency = <12000000>;
76 };
77 };
78
79 ahb {
80 apb {
81 spi0: spi@f8010000 {
82 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
83 status = "okay";
84 m25p80@0 {
85 compatible = "atmel,at25df321a";
86 spi-max-frequency = <50000000>;
87 reg = <0>;
88 };
89 };
90
91 i2c0: i2c@f8014000 {
92 status = "okay";
93 };
94
95 macb0: ethernet@f8020000 {
96 phy-mode = "rmii";
97 status = "okay";
98
99 phy0: ethernet-phy@1 {
100 interrupt-parent = <&pioE>;
101 interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
102 reg = <1>;
103 };
104 };
105
106 mmc1: mmc@fc000000 {
107 pinctrl-names = "default";
108 pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
109 status = "okay";
110 slot@0 {
111 reg = <0>;
112 bus-width = <4>;
113 cd-gpios = <&pioE 3 0>;
114 };
115 };
116
117 usart3: serial@fc00c000 {
118 status = "okay";
119 };
120
121 usart4: serial@fc010000 {
122 status = "okay";
123 };
124
125 adc0: adc@fc034000 {
126 atmel,adc-vref = <3300>;
127 status = "okay";
128 };
129
130 watchdog@fc068640 {
131 status = "okay";
132 };
133
134 pinctrl@fc06a000 {
135 board {
136 pinctrl_mmc1_cd: mmc1_cd {
137 atmel,pins =
138 <AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
139 };
140 pinctrl_usba_vbus: usba_vbus {
141 atmel,pins =
142 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
143 };
144 pinctrl_key_gpio: key_gpio_0 {
145 atmel,pins =
146 <AT91_PIOE 8 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
147 };
148 };
149 };
150 };
151
152 usb0: gadget@00400000 {
153 atmel,vbus-gpio = <&pioE 31 GPIO_ACTIVE_HIGH>;
154 pinctrl-names = "default";
155 pinctrl-0 = <&pinctrl_usba_vbus>;
156 status = "okay";
157 };
158
159 usb1: ohci@00500000 {
160 num-ports = <3>;
161 atmel,vbus-gpio = <0
162 &pioE 11 GPIO_ACTIVE_HIGH
163 &pioE 14 GPIO_ACTIVE_HIGH
164 >;
165 status = "okay";
166 };
167
168 usb2: ehci@00600000 {
169 status = "okay";
170 };
171
172 nand0: nand@80000000 {
173 nand-bus-width = <8>;
174 nand-ecc-mode = "hw";
175 nand-on-flash-bbt;
176 atmel,has-pmecc;
177 status = "okay";
178
179 at91bootstrap@0 {
180 label = "at91bootstrap";
181 reg = <0x0 0x40000>;
182 };
183
184 bootloader@40000 {
185 label = "bootloader";
186 reg = <0x40000 0x80000>;
187 };
188
189 bootloaderenv@c0000 {
190 label = "bootloader env";
191 reg = <0xc0000 0xc0000>;
192 };
193
194 dtb@180000 {
195 label = "device tree";
196 reg = <0x180000 0x80000>;
197 };
198
199 kernel@200000 {
200 label = "kernel";
201 reg = <0x200000 0x600000>;
202 };
203
204 rootfs@800000 {
205 label = "rootfs";
206 reg = <0x800000 0x0f800000>;
207 };
208 };
209 };
210
211 gpio_keys {
212 compatible = "gpio-keys";
213
214 pinctrl-names = "default";
215 pinctrl-0 = <&pinctrl_key_gpio>;
216
217 pb_user1 {
218 label = "pb_user1";
219 gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
220 linux,code = <0x100>;
221 gpio-key,wakeup;
222 };
223 };
224
225 leds {
226 compatible = "gpio-leds";
227 status = "okay";
228
229 d8 {
230 label = "d8";
231 gpios = <&pioD 30 GPIO_ACTIVE_HIGH>;
232 status = "disabled";
233 };
234
235 d10 {
236 label = "d10";
237 gpios = <&pioE 15 GPIO_ACTIVE_LOW>;
238 linux,default-trigger = "heartbeat";
239 };
240 };
241};
diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts
index 9198b719d0ef..89ef4a540db5 100644
--- a/arch/arm/boot/dts/at91-sama5d4ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d4ek.dts
@@ -115,6 +115,10 @@
115 }; 115 };
116 }; 116 };
117 117
118 ssc0: ssc@f8008000 {
119 status = "okay";
120 };
121
118 spi0: spi@f8010000 { 122 spi0: spi@f8010000 {
119 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>; 123 cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
120 status = "okay"; 124 status = "okay";
@@ -127,6 +131,13 @@
127 131
128 i2c0: i2c@f8014000 { 132 i2c0: i2c@f8014000 {
129 status = "okay"; 133 status = "okay";
134
135 wm8904: codec@1a {
136 compatible = "wlf,wm8904";
137 reg = <0x1a>;
138 clocks = <&pck2>;
139 clock-names = "mclk";
140 };
130 }; 141 };
131 142
132 macb0: ethernet@f8020000 { 143 macb0: ethernet@f8020000 {
@@ -171,6 +182,10 @@
171 atmel,pins = 182 atmel,pins =
172 <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; 183 <AT91_PIOE 6 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
173 }; 184 };
185 pinctrl_pck2_as_audio_mck: pck2_as_audio_mck {
186 atmel,pins =
187 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
188 };
174 pinctrl_usba_vbus: usba_vbus { 189 pinctrl_usba_vbus: usba_vbus {
175 atmel,pins = 190 atmel,pins =
176 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; 191 <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
@@ -244,8 +259,6 @@
244 259
245 gpio_keys { 260 gpio_keys {
246 compatible = "gpio-keys"; 261 compatible = "gpio-keys";
247 #address-cells = <1>;
248 #size-cells = <0>;
249 262
250 pinctrl-names = "default"; 263 pinctrl-names = "default";
251 pinctrl-0 = <&pinctrl_key_gpio>; 264 pinctrl-0 = <&pinctrl_key_gpio>;
@@ -257,4 +270,42 @@
257 gpio-key,wakeup; 270 gpio-key,wakeup;
258 }; 271 };
259 }; 272 };
273
274 leds {
275 compatible = "gpio-leds";
276 status = "okay";
277
278 d8 {
279 label = "d8";
280 /* PE28, conflicts with usart4 rts pin */
281 gpios = <&pioE 28 GPIO_ACTIVE_LOW>;
282 };
283
284 d9 {
285 label = "d9";
286 gpios = <&pioE 9 GPIO_ACTIVE_HIGH>;
287 };
288
289 d10 {
290 label = "d10";
291 gpios = <&pioE 8 GPIO_ACTIVE_LOW>;
292 linux,default-trigger = "heartbeat";
293 };
294 };
295
296 sound {
297 compatible = "atmel,asoc-wm8904";
298 pinctrl-names = "default";
299 pinctrl-0 = <&pinctrl_pck2_as_audio_mck>;
300
301 atmel,model = "wm8904 @ SAMA5D4EK";
302 atmel,audio-routing =
303 "Headphone Jack", "HPOUTL",
304 "Headphone Jack", "HPOUTR",
305 "IN1L", "Line In Jack",
306 "IN1R", "Line In Jack";
307
308 atmel,ssc-controller = <&ssc0>;
309 atmel,audio-codec = <&wm8904>;
310 };
260}; 311};
diff --git a/arch/arm/boot/dts/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index 21c2b504f977..4fb333bd1f85 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -356,9 +356,13 @@
356 }; 356 };
357 357
358 st: timer@fffffd00 { 358 st: timer@fffffd00 {
359 compatible = "atmel,at91rm9200-st"; 359 compatible = "atmel,at91rm9200-st", "syscon", "simple-mfd";
360 reg = <0xfffffd00 0x100>; 360 reg = <0xfffffd00 0x100>;
361 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 361 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
362
363 watchdog {
364 compatible = "atmel,at91rm9200-wdt";
365 };
362 }; 366 };
363 367
364 rtc: rtc@fffffe00 { 368 rtc: rtc@fffffe00 {
@@ -830,7 +834,7 @@
830 }; 834 };
831 835
832 dbgu: serial@fffff200 { 836 dbgu: serial@fffff200 {
833 compatible = "atmel,at91rm9200-usart"; 837 compatible = "atmel,at91rm9200-dbgu", "atmel,at91rm9200-usart";
834 reg = <0xfffff200 0x200>; 838 reg = <0xfffff200 0x200>;
835 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 839 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
836 pinctrl-names = "default"; 840 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 62d25b14deb8..d88fe62a2b2e 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -753,7 +753,7 @@
753 }; 753 };
754 754
755 dbgu: serial@fffff200 { 755 dbgu: serial@fffff200 {
756 compatible = "atmel,at91sam9260-usart"; 756 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
757 reg = <0xfffff200 0x200>; 757 reg = <0xfffff200 0x200>;
758 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 758 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
759 pinctrl-names = "default"; 759 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi
index d55fdf2487ef..bf8d1856a55a 100644
--- a/arch/arm/boot/dts/at91sam9261.dtsi
+++ b/arch/arm/boot/dts/at91sam9261.dtsi
@@ -276,7 +276,7 @@
276 }; 276 };
277 277
278 dbgu: serial@fffff200 { 278 dbgu: serial@fffff200 {
279 compatible = "atmel,at91sam9260-usart"; 279 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
280 reg = <0xfffff200 0x200>; 280 reg = <0xfffff200 0x200>;
281 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 281 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
282 pinctrl-names = "default"; 282 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index e4f61a979a57..111889b556cf 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -762,7 +762,7 @@
762 }; 762 };
763 763
764 dbgu: serial@ffffee00 { 764 dbgu: serial@ffffee00 {
765 compatible = "atmel,at91sam9260-usart"; 765 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
766 reg = <0xffffee00 0x200>; 766 reg = <0xffffee00 0x200>;
767 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 767 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
768 pinctrl-names = "default"; 768 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9g25.dtsi b/arch/arm/boot/dts/at91sam9g25.dtsi
index 17b879990914..a7da0dd0c98f 100644
--- a/arch/arm/boot/dts/at91sam9g25.dtsi
+++ b/arch/arm/boot/dts/at91sam9g25.dtsi
@@ -7,6 +7,7 @@
7 */ 7 */
8 8
9#include "at91sam9x5.dtsi" 9#include "at91sam9x5.dtsi"
10#include "at91sam9x5_isi.dtsi"
10#include "at91sam9x5_usart3.dtsi" 11#include "at91sam9x5_usart3.dtsi"
11#include "at91sam9x5_macb0.dtsi" 12#include "at91sam9x5_macb0.dtsi"
12 13
diff --git a/arch/arm/boot/dts/at91sam9g25ek.dts b/arch/arm/boot/dts/at91sam9g25ek.dts
index 1e4c49c584d3..707fd4ea58f5 100644
--- a/arch/arm/boot/dts/at91sam9g25ek.dts
+++ b/arch/arm/boot/dts/at91sam9g25ek.dts
@@ -16,10 +16,28 @@
16 16
17 ahb { 17 ahb {
18 apb { 18 apb {
19 spi0: spi@f0000000 {
20 status = "disabled";
21 };
22
23 mmc1: mmc@f000c000 {
24 status = "disabled";
25 };
26
27 i2c0: i2c@f8010000 {
28 ov2640: camera@0x30 {
29 status = "okay";
30 };
31 };
32
19 macb0: ethernet@f802c000 { 33 macb0: ethernet@f802c000 {
20 phy-mode = "rmii"; 34 phy-mode = "rmii";
21 status = "okay"; 35 status = "okay";
22 }; 36 };
37
38 isi: isi@f8048000 {
39 status = "okay";
40 };
23 }; 41 };
24 }; 42 };
25}; 43};
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 8ec05b11298a..70e59c5ceb2f 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -893,7 +893,7 @@
893 }; 893 };
894 894
895 dbgu: serial@ffffee00 { 895 dbgu: serial@ffffee00 {
896 compatible = "atmel,at91sam9260-usart"; 896 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
897 reg = <0xffffee00 0x200>; 897 reg = <0xffffee00 0x200>;
898 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 898 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
899 pinctrl-names = "default"; 899 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index 0c53a375ba99..a9e35dfc12d9 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -757,7 +757,7 @@
757 }; 757 };
758 758
759 dbgu: serial@fffff200 { 759 dbgu: serial@fffff200 {
760 compatible = "atmel,at91sam9260-usart"; 760 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
761 reg = <0xfffff200 0x200>; 761 reg = <0xfffff200 0x200>;
762 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 762 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
763 pinctrl-names = "default"; 763 pinctrl-names = "default";
@@ -912,6 +912,15 @@
912 clocks = <&pwm_clk>; 912 clocks = <&pwm_clk>;
913 status = "disabled"; 913 status = "disabled";
914 }; 914 };
915
916 usb1: gadget@f803c000 {
917 compatible = "atmel,at91sam9260-udc";
918 reg = <0xf803c000 0x4000>;
919 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 2>;
920 clocks = <&udphs_clk>, <&udpck>;
921 clock-names = "pclk", "hclk";
922 status = "disabled";
923 };
915 }; 924 };
916 925
917 nand0: nand@40000000 { 926 nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index 9575c0d895c9..6e067c8a3502 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -108,6 +108,13 @@
108 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; 108 <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
109 }; 109 };
110 }; 110 };
111
112 usb1 {
113 pinctrl_usb1_vbus_sense: usb1_vbus_sense {
114 atmel,pins =
115 <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PB16 gpio usb vbus sense, no pull up and deglitch */
116 };
117 };
111 }; 118 };
112 119
113 spi0: spi@f0000000 { 120 spi0: spi@f0000000 {
@@ -120,9 +127,20 @@
120 }; 127 };
121 }; 128 };
122 129
130 usb1: gadget@f803c000 {
131 pinctrl-names = "default";
132 pinctrl-0 = <&pinctrl_usb1_vbus_sense>;
133 atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
134 status = "okay";
135 };
136
123 watchdog@fffffe40 { 137 watchdog@fffffe40 {
124 status = "okay"; 138 status = "okay";
125 }; 139 };
140
141 rtc@fffffeb0 {
142 status = "okay";
143 };
126 }; 144 };
127 145
128 nand0: nand@40000000 { 146 nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9rl.dtsi b/arch/arm/boot/dts/at91sam9rl.dtsi
index 40f645b8fe25..ebfd5ce9cb38 100644
--- a/arch/arm/boot/dts/at91sam9rl.dtsi
+++ b/arch/arm/boot/dts/at91sam9rl.dtsi
@@ -377,7 +377,7 @@
377 }; 377 };
378 378
379 dbgu: serial@fffff200 { 379 dbgu: serial@fffff200 {
380 compatible = "atmel,at91sam9260-usart"; 380 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
381 reg = <0xfffff200 0x200>; 381 reg = <0xfffff200 0x200>;
382 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 382 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
383 pinctrl-names = "default"; 383 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index d221179d0f1a..3aa56ae3410a 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -860,7 +860,7 @@
860 }; 860 };
861 861
862 dbgu: serial@fffff200 { 862 dbgu: serial@fffff200 {
863 compatible = "atmel,at91sam9260-usart"; 863 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
864 reg = <0xfffff200 0x200>; 864 reg = <0xfffff200 0x200>;
865 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; 865 interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
866 pinctrl-names = "default"; 866 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/at91sam9x5_isi.dtsi b/arch/arm/boot/dts/at91sam9x5_isi.dtsi
index 98bc877a68ef..8fc45ca4dcb5 100644
--- a/arch/arm/boot/dts/at91sam9x5_isi.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_isi.dtsi
@@ -13,6 +13,37 @@
13/ { 13/ {
14 ahb { 14 ahb {
15 apb { 15 apb {
16 pinctrl@fffff400 {
17 isi {
18 pinctrl_isi_data_0_7: isi-0-data-0-7 {
19 atmel,pins =
20 <AT91_PIOC 0 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D0, conflicts with LCDDAT0 */
21 AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D1, conflicts with LCDDAT1 */
22 AT91_PIOC 2 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D2, conflicts with LCDDAT2 */
23 AT91_PIOC 3 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D3, conflicts with LCDDAT3 */
24 AT91_PIOC 4 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D4, conflicts with LCDDAT4 */
25 AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D5, conflicts with LCDDAT5 */
26 AT91_PIOC 6 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D6, conflicts with LCDDAT6 */
27 AT91_PIOC 7 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D7, conflicts with LCDDAT7 */
28 AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_PCK, conflicts with LCDDAT12 */
29 AT91_PIOC 14 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_HSYNC, conflicts with LCDDAT14 */
30 AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* ISI_VSYNC, conflicts with LCDDAT13 */
31 };
32
33 pinctrl_isi_data_8_9: isi-0-data-8-9 {
34 atmel,pins =
35 <AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D8, conflicts with LCDDAT8 */
36 AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* ISI_D9, conflicts with LCDDAT9 */
37 };
38
39 pinctrl_isi_data_10_11: isi-0-data-10-11 {
40 atmel,pins =
41 <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE /* ISI_D10, conflicts with LCDDAT10 */
42 AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* ISI_D11, conflicts with LCDDAT11 */
43 };
44 };
45 };
46
16 pmc: pmc@fffffc00 { 47 pmc: pmc@fffffc00 {
17 periphck { 48 periphck {
18 isi_clk: isi_clk { 49 isi_clk: isi_clk {
@@ -21,6 +52,21 @@
21 }; 52 };
22 }; 53 };
23 }; 54 };
55
56 isi: isi@f8048000 {
57 compatible = "atmel,at91sam9g45-isi";
58 reg = <0xf8048000 0x4000>;
59 interrupts = <25 IRQ_TYPE_LEVEL_HIGH 5>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_isi_data_0_7>;
62 clocks = <&isi_clk>;
63 clock-names = "isi_clk";
64 status = "disabled";
65 port {
66 #address-cells = <1>;
67 #size-cells = <0>;
68 };
69 };
24 }; 70 };
25 }; 71 };
26}; 72};
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 229d6c24a9c4..26112ebd15fc 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -42,6 +42,10 @@
42 }; 42 };
43 }; 43 };
44 }; 44 };
45
46 rtc@fffffeb0 {
47 status = "okay";
48 };
45 }; 49 };
46 50
47 nand0: nand@40000000 { 51 nand0: nand@40000000 {
diff --git a/arch/arm/boot/dts/at91sam9x5ek.dtsi b/arch/arm/boot/dts/at91sam9x5ek.dtsi
index bd16bd360272..cc83a37a7311 100644
--- a/arch/arm/boot/dts/at91sam9x5ek.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5ek.dtsi
@@ -59,6 +59,16 @@
59 status = "okay"; 59 status = "okay";
60 }; 60 };
61 61
62 isi: isi@f8048000 {
63 status = "disabled";
64 port {
65 isi_0: endpoint@0 {
66 remote-endpoint = <&ov2640_0>;
67 bus-width = <8>;
68 };
69 };
70 };
71
62 i2c0: i2c@f8010000 { 72 i2c0: i2c@f8010000 {
63 status = "okay"; 73 status = "okay";
64 74
@@ -66,9 +76,47 @@
66 compatible = "wm8731"; 76 compatible = "wm8731";
67 reg = <0x1a>; 77 reg = <0x1a>;
68 }; 78 };
79
80 ov2640: camera@0x30 {
81 compatible = "ovti,ov2640";
82 reg = <0x30>;
83 pinctrl-names = "default";
84 pinctrl-0 = <&pinctrl_pck0_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
85 resetb-gpios = <&pioA 7 GPIO_ACTIVE_LOW>;
86 pwdn-gpios = <&pioA 13 GPIO_ACTIVE_HIGH>;
87 clocks = <&pck0>;
88 clock-names = "xvclk";
89 assigned-clocks = <&pck0>;
90 assigned-clock-rates = <25000000>;
91 status = "disabled";
92
93 port {
94 ov2640_0: endpoint {
95 remote-endpoint = <&isi_0>;
96 bus-width = <8>;
97 };
98 };
99 };
69 }; 100 };
70 101
71 pinctrl@fffff400 { 102 pinctrl@fffff400 {
103 camera_sensor {
104 pinctrl_pck0_as_isi_mck: pck0_as_isi_mck-0 {
105 atmel,pins =
106 <AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_MCK */
107 };
108
109 pinctrl_sensor_power: sensor_power-0 {
110 atmel,pins =
111 <AT91_PIOA 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
112 };
113
114 pinctrl_sensor_reset: sensor_reset-0 {
115 atmel,pins =
116 <AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
117 };
118 };
119
72 mmc0 { 120 mmc0 {
73 pinctrl_board_mmc0: mmc0-board { 121 pinctrl_board_mmc0: mmc0-board {
74 atmel,pins = 122 atmel,pins =
diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi
index ff5fb6ab0b97..7b52c33ea69a 100644
--- a/arch/arm/boot/dts/bcm-cygnus.dtsi
+++ b/arch/arm/boot/dts/bcm-cygnus.dtsi
@@ -54,6 +54,42 @@
54 54
55 /include/ "bcm-cygnus-clock.dtsi" 55 /include/ "bcm-cygnus-clock.dtsi"
56 56
57 pinctrl: pinctrl@0x0301d0c8 {
58 compatible = "brcm,cygnus-pinmux";
59 reg = <0x0301d0c8 0x30>,
60 <0x0301d24c 0x2c>;
61 };
62
63 gpio_crmu: gpio@03024800 {
64 compatible = "brcm,cygnus-crmu-gpio";
65 reg = <0x03024800 0x50>,
66 <0x03024008 0x18>;
67 #gpio-cells = <2>;
68 gpio-controller;
69 };
70
71 gpio_ccm: gpio@1800a000 {
72 compatible = "brcm,cygnus-ccm-gpio";
73 reg = <0x1800a000 0x50>,
74 <0x0301d164 0x20>;
75 #gpio-cells = <2>;
76 gpio-controller;
77 interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
78 interrupt-controller;
79 };
80
81 gpio_asiu: gpio@180a5000 {
82 compatible = "brcm,cygnus-asiu-gpio";
83 reg = <0x180a5000 0x668>;
84 #gpio-cells = <2>;
85 gpio-controller;
86
87 pinmux = <&pinctrl>;
88
89 interrupt-controller;
90 interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
91 };
92
57 amba { 93 amba {
58 #address-cells = <1>; 94 #address-cells = <1>;
59 #size-cells = <1>; 95 #size-cells = <1>;
@@ -90,6 +126,48 @@
90 status = "disabled"; 126 status = "disabled";
91 }; 127 };
92 128
129 pcie0: pcie@18012000 {
130 compatible = "brcm,iproc-pcie";
131 reg = <0x18012000 0x1000>;
132
133 #interrupt-cells = <1>;
134 interrupt-map-mask = <0 0 0 0>;
135 interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
136
137 linux,pci-domain = <0>;
138
139 bus-range = <0x00 0xff>;
140
141 #address-cells = <3>;
142 #size-cells = <2>;
143 device_type = "pci";
144 ranges = <0x81000000 0 0 0x28000000 0 0x00010000
145 0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
146
147 status = "disabled";
148 };
149
150 pcie1: pcie@18013000 {
151 compatible = "brcm,iproc-pcie";
152 reg = <0x18013000 0x1000>;
153
154 #interrupt-cells = <1>;
155 interrupt-map-mask = <0 0 0 0>;
156 interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
157
158 linux,pci-domain = <1>;
159
160 bus-range = <0x00 0xff>;
161
162 #address-cells = <3>;
163 #size-cells = <2>;
164 device_type = "pci";
165 ranges = <0x81000000 0 0 0x48000000 0 0x00010000
166 0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
167
168 status = "disabled";
169 };
170
93 uart0: serial@18020000 { 171 uart0: serial@18020000 {
94 compatible = "snps,dw-apb-uart"; 172 compatible = "snps,dw-apb-uart";
95 reg = <0x18020000 0x100>; 173 reg = <0x18020000 0x100>;
diff --git a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
index f18c9d9b2f2c..2ed9e5794785 100644
--- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
+++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
@@ -45,13 +45,13 @@
45 power0 { 45 power0 {
46 label = "bcm53xx:green:power"; 46 label = "bcm53xx:green:power";
47 gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>; 47 gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
48 linux,default-trigger = "default-off"; 48 linux,default-trigger = "default-on";
49 }; 49 };
50 50
51 power1 { 51 power1 {
52 label = "bcm53xx:amber:power"; 52 label = "bcm53xx:amber:power";
53 gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>; 53 gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "default-on"; 54 linux,default-trigger = "default-off";
55 }; 55 };
56 56
57 usb { 57 usb {
diff --git a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
new file mode 100644
index 000000000000..ea26dd3ec03a
--- /dev/null
+++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
@@ -0,0 +1,77 @@
1/*
2 * Broadcom BCM470X / BCM5301X ARM platform code.
3 * DTS for Netgear R8000
4 *
5 * Copyright (C) 2015 Rafał Miłecki <zajec5@gmail.com>
6 *
7 * Licensed under the GNU/GPL. See COPYING for details.
8 */
9
10/dts-v1/;
11
12#include "bcm4708.dtsi"
13
14/ {
15 compatible = "netgear,r8000", "brcm,bcm4709", "brcm,bcm4708";
16 model = "Netgear R8000 (BCM4709)";
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 memory {
23 reg = <0x00000000 0x08000000>;
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 power0 {
30 label = "bcm53xx:white:power";
31 gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "default-on";
33 };
34
35 power1 {
36 label = "bcm53xx:amber:power";
37 gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
38 linux,default-trigger = "default-off";
39 };
40
41 5ghz-1 {
42 label = "bcm53xx:white:5ghz-1";
43 gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
44 linux,default-trigger = "default-off";
45 };
46
47 2ghz {
48 label = "bcm53xx:white:2ghz";
49 gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
50 linux,default-trigger = "default-off";
51 };
52 };
53
54 gpio-keys {
55 compatible = "gpio-keys";
56 #address-cells = <1>;
57 #size-cells = <0>;
58
59 rfkill {
60 label = "WiFi";
61 linux,code = <KEY_RFKILL>;
62 gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
63 };
64
65 wps {
66 label = "WPS";
67 linux,code = <KEY_WPS_BUTTON>;
68 gpios = <&chipcommon 5 GPIO_ACTIVE_LOW>;
69 };
70
71 restart {
72 label = "Reset";
73 linux,code = <KEY_RESTART>;
74 gpios = <&chipcommon 6 GPIO_ACTIVE_LOW>;
75 };
76 };
77};
diff --git a/arch/arm/boot/dts/bcm7445.dtsi b/arch/arm/boot/dts/bcm7445.dtsi
index 0ca0f4e523d0..39ac7840d7ee 100644
--- a/arch/arm/boot/dts/bcm7445.dtsi
+++ b/arch/arm/boot/dts/bcm7445.dtsi
@@ -76,7 +76,7 @@
76 reg-shift = <2>; 76 reg-shift = <2>;
77 reg-io-width = <4>; 77 reg-io-width = <4>;
78 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 78 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
79 clock-frequency = <0x4d3f640>; 79 clock-frequency = <81000000>;
80 }; 80 };
81 81
82 sun_top_ctrl: syscon@404000 { 82 sun_top_ctrl: syscon@404000 {
@@ -96,6 +96,18 @@
96 "syscon"; 96 "syscon";
97 reg = <0x452000 0x100>; 97 reg = <0x452000 0x100>;
98 }; 98 };
99
100 irq0_intc: interrupt-controller@40a780 {
101 compatible = "brcm,bcm7120-l2-intc";
102 interrupt-parent = <&gic>;
103 #interrupt-cells = <1>;
104 reg = <0x40a780 0x8>;
105 interrupt-controller;
106 interrupts = <GIC_SPI 0x45 0x0>,
107 <GIC_SPI 0x43 0x0>;
108 brcm,int-map-mask = <0x25c>, <0x7000000>;
109 brcm,int-fwd-mask = <0x70000>;
110 };
99 }; 111 };
100 112
101 smpboot { 113 smpboot {
diff --git a/arch/arm/boot/dts/bcm911360_entphn.dts b/arch/arm/boot/dts/bcm911360_entphn.dts
index d2ee95280548..7db484323fd6 100644
--- a/arch/arm/boot/dts/bcm911360_entphn.dts
+++ b/arch/arm/boot/dts/bcm911360_entphn.dts
@@ -33,6 +33,7 @@
33/dts-v1/; 33/dts-v1/;
34 34
35#include "bcm-cygnus.dtsi" 35#include "bcm-cygnus.dtsi"
36#include "dt-bindings/input/input.h"
36 37
37/ { 38/ {
38 model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)"; 39 model = "Cygnus Enterprise Phone (BCM911360_ENTPHN)";
@@ -50,4 +51,16 @@
50 uart3: serial@18023000 { 51 uart3: serial@18023000 {
51 status = "okay"; 52 status = "okay";
52 }; 53 };
54
55 gpio_keys {
56 compatible = "gpio-keys";
57 #address-cells = <1>;
58 #size-cells = <0>;
59
60 hook {
61 label = "HOOK";
62 linux,code = <KEY_O>;
63 gpios = <&gpio_asiu 48 0>;
64 };
65 };
53}; 66};
diff --git a/arch/arm/boot/dts/bcm958300k.dts b/arch/arm/boot/dts/bcm958300k.dts
index f1bb36f3975c..c9eb8565eac5 100644
--- a/arch/arm/boot/dts/bcm958300k.dts
+++ b/arch/arm/boot/dts/bcm958300k.dts
@@ -47,6 +47,14 @@
47 bootargs = "console=ttyS0,115200"; 47 bootargs = "console=ttyS0,115200";
48 }; 48 };
49 49
50 pcie0: pcie@18012000 {
51 status = "okay";
52 };
53
54 pcie1: pcie@18013000 {
55 status = "okay";
56 };
57
50 uart3: serial@18023000 { 58 uart3: serial@18023000 {
51 status = "okay"; 59 status = "okay";
52 }; 60 };
diff --git a/arch/arm/boot/dts/bcm958305k.dts b/arch/arm/boot/dts/bcm958305k.dts
new file mode 100644
index 000000000000..56b429abbedb
--- /dev/null
+++ b/arch/arm/boot/dts/bcm958305k.dts
@@ -0,0 +1,53 @@
1/*
2 * BSD LICENSE
3 *
4 * Copyright(c) 2015 Broadcom Corporation. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Broadcom Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/dts-v1/;
34
35#include "bcm-cygnus.dtsi"
36
37/ {
38 model = "Cygnus Wireless Audio (BCM958305K)";
39 compatible = "brcm,bcm58305", "brcm,cygnus";
40
41 aliases {
42 serial0 = &uart3;
43 };
44
45 chosen {
46 stdout-path = &uart3;
47 bootargs = "console=ttyS0,115200";
48 };
49
50 uart3: serial@18023000 {
51 status = "okay";
52 };
53};
diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts
index afe678f6d2e9..169a85578fc9 100644
--- a/arch/arm/boot/dts/dm8168-evm.dts
+++ b/arch/arm/boot/dts/dm8168-evm.dts
@@ -29,10 +29,10 @@
29&dm816x_pinmux { 29&dm816x_pinmux {
30 mcspi1_pins: pinmux_mcspi1_pins { 30 mcspi1_pins: pinmux_mcspi1_pins {
31 pinctrl-single,pins = < 31 pinctrl-single,pins = <
32 DM816X_IOPAD(0x0a94, PIN_INPUT | MUX_MODE0) /* SPI_SCLK */ 32 DM816X_IOPAD(0x0a94, MUX_MODE0) /* SPI_SCLK */
33 DM816X_IOPAD(0x0a98, PIN_OUTPUT | MUX_MODE0) /* SPI_SCS0 */ 33 DM816X_IOPAD(0x0a98, MUX_MODE0) /* SPI_SCS0 */
34 DM816X_IOPAD(0x0aa8, PIN_INPUT | MUX_MODE0) /* SPI_D0 */ 34 DM816X_IOPAD(0x0aa8, MUX_MODE0) /* SPI_D0 */
35 DM816X_IOPAD(0x0aac, PIN_INPUT | MUX_MODE0) /* SPI_D1 */ 35 DM816X_IOPAD(0x0aac, MUX_MODE0) /* SPI_D1 */
36 >; 36 >;
37 }; 37 };
38 38
@@ -52,13 +52,13 @@
52 52
53 usb0_pins: pinmux_usb0_pins { 53 usb0_pins: pinmux_usb0_pins {
54 pinctrl-single,pins = < 54 pinctrl-single,pins = <
55 DM816X_IOPAD(0x0d00, MUX_MODE0) /* USB0_DRVVBUS */ 55 DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB0_DRVVBUS */
56 >; 56 >;
57 }; 57 };
58 58
59 usb1_pins: pinmux_usb0_pins { 59 usb1_pins: pinmux_usb1_pins {
60 pinctrl-single,pins = < 60 pinctrl-single,pins = <
61 DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB1_DRVVBUS */ 61 DM816X_IOPAD(0x0d08, MUX_MODE0) /* USB1_DRVVBUS */
62 >; 62 >;
63 }; 63 };
64}; 64};
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi
index f35715bc6992..de8427be830a 100644
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -396,6 +396,29 @@
396 mentor,num-eps = <16>; 396 mentor,num-eps = <16>;
397 mentor,ram-bits = <12>; 397 mentor,ram-bits = <12>;
398 mentor,power = <500>; 398 mentor,power = <500>;
399
400 dmas = <&cppi41dma 0 0 &cppi41dma 1 0
401 &cppi41dma 2 0 &cppi41dma 3 0
402 &cppi41dma 4 0 &cppi41dma 5 0
403 &cppi41dma 6 0 &cppi41dma 7 0
404 &cppi41dma 8 0 &cppi41dma 9 0
405 &cppi41dma 10 0 &cppi41dma 11 0
406 &cppi41dma 12 0 &cppi41dma 13 0
407 &cppi41dma 14 0 &cppi41dma 0 1
408 &cppi41dma 1 1 &cppi41dma 2 1
409 &cppi41dma 3 1 &cppi41dma 4 1
410 &cppi41dma 5 1 &cppi41dma 6 1
411 &cppi41dma 7 1 &cppi41dma 8 1
412 &cppi41dma 9 1 &cppi41dma 10 1
413 &cppi41dma 11 1 &cppi41dma 12 1
414 &cppi41dma 13 1 &cppi41dma 14 1>;
415 dma-names =
416 "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
417 "rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
418 "rx14", "rx15",
419 "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
420 "tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
421 "tx14", "tx15";
399 }; 422 };
400 423
401 usb1: usb@47401800 { 424 usb1: usb@47401800 {
@@ -413,6 +436,43 @@
413 mentor,num-eps = <16>; 436 mentor,num-eps = <16>;
414 mentor,ram-bits = <12>; 437 mentor,ram-bits = <12>;
415 mentor,power = <500>; 438 mentor,power = <500>;
439
440 dmas = <&cppi41dma 15 0 &cppi41dma 16 0
441 &cppi41dma 17 0 &cppi41dma 18 0
442 &cppi41dma 19 0 &cppi41dma 20 0
443 &cppi41dma 21 0 &cppi41dma 22 0
444 &cppi41dma 23 0 &cppi41dma 24 0
445 &cppi41dma 25 0 &cppi41dma 26 0
446 &cppi41dma 27 0 &cppi41dma 28 0
447 &cppi41dma 29 0 &cppi41dma 15 1
448 &cppi41dma 16 1 &cppi41dma 17 1
449 &cppi41dma 18 1 &cppi41dma 19 1
450 &cppi41dma 20 1 &cppi41dma 21 1
451 &cppi41dma 22 1 &cppi41dma 23 1
452 &cppi41dma 24 1 &cppi41dma 25 1
453 &cppi41dma 26 1 &cppi41dma 27 1
454 &cppi41dma 28 1 &cppi41dma 29 1>;
455 dma-names =
456 "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
457 "rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
458 "rx14", "rx15",
459 "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
460 "tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
461 "tx14", "tx15";
462 };
463
464 cppi41dma: dma-controller@47402000 {
465 compatible = "ti,am3359-cppi41";
466 reg = <0x47400000 0x1000
467 0x47402000 0x1000
468 0x47403000 0x1000
469 0x47404000 0x4000>;
470 reg-names = "glue", "controller", "scheduler", "queuemgr";
471 interrupts = <17>;
472 interrupt-names = "glue";
473 #dma-cells = <2>;
474 #dma-channels = <30>;
475 #dma-requests = <256>;
416 }; 476 };
417 }; 477 };
418 478
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index a5441d5482a6..9ad829523a13 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -1,5 +1,8 @@
1/include/ "skeleton.dtsi" 1/include/ "skeleton.dtsi"
2 2
3#include <dt-bindings/gpio/gpio.h>
4#include <dt-bindings/interrupt-controller/irq.h>
5
3#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) 6#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
4 7
5/ { 8/ {
@@ -61,7 +64,7 @@
61 0x82000000 0x2 0x0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 Mem */ 64 0x82000000 0x2 0x0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 Mem */
62 0x81000000 0x2 0x0 MBUS_ID(0x08, 0xe0) 0 1 0>; /* Port 1.0 I/O */ 65 0x81000000 0x2 0x0 MBUS_ID(0x08, 0xe0) 0 1 0>; /* Port 1.0 I/O */
63 66
64 pcie-port@0 { 67 pcie0: pcie-port@0 {
65 device_type = "pci"; 68 device_type = "pci";
66 status = "disabled"; 69 status = "disabled";
67 assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; 70 assigned-addresses = <0x82000800 0 0x40000 0 0x2000>;
@@ -79,7 +82,7 @@
79 interrupt-map = <0 0 0 0 &intc 16>; 82 interrupt-map = <0 0 0 0 &intc 16>;
80 }; 83 };
81 84
82 pcie-port@1 { 85 pcie1: pcie-port@1 {
83 device_type = "pci"; 86 device_type = "pci";
84 status = "disabled"; 87 status = "disabled";
85 assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 88 assigned-addresses = <0x82002800 0 0x80000 0 0x2000>;
@@ -154,7 +157,7 @@
154 157
155 uart2: serial@12200 { 158 uart2: serial@12200 {
156 compatible = "ns16550a"; 159 compatible = "ns16550a";
157 reg = <0x12000 0x100>; 160 reg = <0x12200 0x100>;
158 reg-shift = <2>; 161 reg-shift = <2>;
159 interrupts = <9>; 162 interrupts = <9>;
160 clocks = <&core_clk 0>; 163 clocks = <&core_clk 0>;
@@ -163,7 +166,7 @@
163 166
164 uart3: serial@12300 { 167 uart3: serial@12300 {
165 compatible = "ns16550a"; 168 compatible = "ns16550a";
166 reg = <0x12100 0x100>; 169 reg = <0x12300 0x100>;
167 reg-shift = <2>; 170 reg-shift = <2>;
168 interrupts = <10>; 171 interrupts = <10>;
169 clocks = <&core_clk 0>; 172 clocks = <&core_clk 0>;
@@ -448,6 +451,11 @@
448 marvell,function = "gpio"; 451 marvell,function = "gpio";
449 }; 452 };
450 453
454 pmx_pcie1_clkreq: pmx-pcie1-clkreq {
455 marvell,pins = "mpp9";
456 marvell,function = "pex1";
457 };
458
451 pmx_gpio_10: pmx-gpio-10 { 459 pmx_gpio_10: pmx-gpio-10 {
452 marvell,pins = "mpp10"; 460 marvell,pins = "mpp10";
453 marvell,function = "gpio"; 461 marvell,function = "gpio";
@@ -458,6 +466,11 @@
458 marvell,function = "gpio"; 466 marvell,function = "gpio";
459 }; 467 };
460 468
469 pmx_pcie0_clkreq: pmx-pcie0-clkreq {
470 marvell,pins = "mpp11";
471 marvell,function = "pex0";
472 };
473
461 pmx_gpio_12: pmx-gpio-12 { 474 pmx_gpio_12: pmx-gpio-12 {
462 marvell,pins = "mpp12"; 475 marvell,pins = "mpp12";
463 marvell,function = "gpio"; 476 marvell,function = "gpio";
@@ -563,6 +576,18 @@
563 marvell,function = "gpio"; 576 marvell,function = "gpio";
564 }; 577 };
565 578
579 pmx_spi1_4_7: pmx-spi1-4-7 {
580 marvell,pins = "mpp4", "mpp5",
581 "mpp6", "mpp7";
582 marvell,function = "spi1";
583 };
584
585 pmx_spi1_20_23: pmx-spi1-20-23 {
586 marvell,pins = "mpp20", "mpp21",
587 "mpp22", "mpp23";
588 marvell,function = "spi1";
589 };
590
566 pmx_uart1: pmx-uart1 { 591 pmx_uart1: pmx-uart1 {
567 marvell,pins = "mpp_uart1"; 592 marvell,pins = "mpp_uart1";
568 marvell,function = "uart1"; 593 marvell,function = "uart1";
@@ -582,6 +607,36 @@
582 marvell,pins = "mpp_nand"; 607 marvell,pins = "mpp_nand";
583 marvell,function = "gpo"; 608 marvell,function = "gpo";
584 }; 609 };
610
611 pmx_i2c1: pmx-i2c1 {
612 marvell,pins = "mpp17", "mpp19";
613 marvell,function = "twsi";
614 };
615
616 pmx_i2c2: pmx-i2c2 {
617 marvell,pins = "mpp_audio1";
618 marvell,function = "twsi";
619 };
620
621 pmx_ssp_i2c2: pmx-ssp-i2c2 {
622 marvell,pins = "mpp_audio1";
623 marvell,function = "ssp/twsi";
624 };
625
626 pmx_i2cmux_0: pmx-i2cmux-0 {
627 marvell,pins = "twsi";
628 marvell,function = "twsi-opt1";
629 };
630
631 pmx_i2cmux_1: pmx-i2cmux-1 {
632 marvell,pins = "twsi";
633 marvell,function = "twsi-opt2";
634 };
635
636 pmx_i2cmux_2: pmx-i2cmux-2 {
637 marvell,pins = "twsi";
638 marvell,function = "twsi-opt3";
639 };
585 }; 640 };
586 641
587 core_clk: core-clocks@d0214 { 642 core_clk: core-clocks@d0214 {
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts
index b1bd06c6c2a8..aa465904f6cc 100644
--- a/arch/arm/boot/dts/dra7-evm.dts
+++ b/arch/arm/boot/dts/dra7-evm.dts
@@ -541,6 +541,14 @@
541 }; 541 };
542}; 542};
543 543
544&omap_dwc3_1 {
545 extcon = <&extcon_usb1>;
546};
547
548&omap_dwc3_2 {
549 extcon = <&extcon_usb2>;
550};
551
544&usb1 { 552&usb1 {
545 dr_mode = "peripheral"; 553 dr_mode = "peripheral";
546 pinctrl-names = "default"; 554 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index a0afce7ad482..5332b57b4950 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -102,17 +102,101 @@
102 interrupts-extended = <&crossbar_mpu GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, 102 interrupts-extended = <&crossbar_mpu GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
103 <&wakeupgen GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 103 <&wakeupgen GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
104 104
105 prm: prm@4ae06000 { 105 l4_cfg: l4@4a000000 {
106 compatible = "ti,dra7-prm"; 106 compatible = "ti,dra7-l4-cfg", "simple-bus";
107 reg = <0x4ae06000 0x3000>; 107 #address-cells = <1>;
108 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 108 #size-cells = <1>;
109 ranges = <0 0x4a000000 0x22c000>;
109 110
110 prm_clocks: clocks { 111 scm: scm@2000 {
112 compatible = "ti,dra7-scm-core", "simple-bus";
113 reg = <0x2000 0x2000>;
111 #address-cells = <1>; 114 #address-cells = <1>;
112 #size-cells = <0>; 115 #size-cells = <1>;
116 ranges = <0 0x2000 0x2000>;
117
118 scm_conf: scm_conf@0 {
119 compatible = "syscon";
120 reg = <0x0 0x1400>;
121 #address-cells = <1>;
122 #size-cells = <1>;
123
124 pbias_regulator: pbias_regulator {
125 compatible = "ti,pbias-omap";
126 reg = <0xe00 0x4>;
127 syscon = <&scm_conf>;
128 pbias_mmc_reg: pbias_mmc_omap5 {
129 regulator-name = "pbias_mmc_omap5";
130 regulator-min-microvolt = <1800000>;
131 regulator-max-microvolt = <3000000>;
132 };
133 };
134 };
135
136 dra7_pmx_core: pinmux@1400 {
137 compatible = "ti,dra7-padconf",
138 "pinctrl-single";
139 reg = <0x1400 0x0464>;
140 #address-cells = <1>;
141 #size-cells = <0>;
142 #interrupt-cells = <1>;
143 interrupt-controller;
144 pinctrl-single,register-width = <32>;
145 pinctrl-single,function-mask = <0x3fffffff>;
146 };
147 };
148
149 cm_core_aon: cm_core_aon@5000 {
150 compatible = "ti,dra7-cm-core-aon";
151 reg = <0x5000 0x2000>;
152
153 cm_core_aon_clocks: clocks {
154 #address-cells = <1>;
155 #size-cells = <0>;
156 };
157
158 cm_core_aon_clockdomains: clockdomains {
159 };
160 };
161
162 cm_core: cm_core@8000 {
163 compatible = "ti,dra7-cm-core";
164 reg = <0x8000 0x3000>;
165
166 cm_core_clocks: clocks {
167 #address-cells = <1>;
168 #size-cells = <0>;
169 };
170
171 cm_core_clockdomains: clockdomains {
172 };
113 }; 173 };
174 };
114 175
115 prm_clockdomains: clockdomains { 176 l4_wkup: l4@4ae00000 {
177 compatible = "ti,dra7-l4-wkup", "simple-bus";
178 #address-cells = <1>;
179 #size-cells = <1>;
180 ranges = <0 0x4ae00000 0x3f000>;
181
182 counter32k: counter@4000 {
183 compatible = "ti,omap-counter32k";
184 reg = <0x4000 0x40>;
185 ti,hwmods = "counter_32k";
186 };
187
188 prm: prm@6000 {
189 compatible = "ti,dra7-prm";
190 reg = <0x6000 0x3000>;
191 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
192
193 prm_clocks: clocks {
194 #address-cells = <1>;
195 #size-cells = <0>;
196 };
197
198 prm_clockdomains: clockdomains {
199 };
116 }; 200 };
117 }; 201 };
118 202
@@ -185,36 +269,16 @@
185 }; 269 };
186 }; 270 };
187 271
188 cm_core_aon: cm_core_aon@4a005000 { 272 bandgap: bandgap@4a0021e0 {
189 compatible = "ti,dra7-cm-core-aon"; 273 reg = <0x4a0021e0 0xc
190 reg = <0x4a005000 0x2000>; 274 0x4a00232c 0xc
191 275 0x4a002380 0x2c
192 cm_core_aon_clocks: clocks { 276 0x4a0023C0 0x3c
193 #address-cells = <1>; 277 0x4a002564 0x8
194 #size-cells = <0>; 278 0x4a002574 0x50>;
195 }; 279 compatible = "ti,dra752-bandgap";
196 280 interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
197 cm_core_aon_clockdomains: clockdomains { 281 #thermal-sensor-cells = <1>;
198 };
199 };
200
201 cm_core: cm_core@4a008000 {
202 compatible = "ti,dra7-cm-core";
203 reg = <0x4a008000 0x3000>;
204
205 cm_core_clocks: clocks {
206 #address-cells = <1>;
207 #size-cells = <0>;
208 };
209
210 cm_core_clockdomains: clockdomains {
211 };
212 };
213
214 counter32k: counter@4ae04000 {
215 compatible = "ti,omap-counter32k";
216 reg = <0x4ae04000 0x40>;
217 ti,hwmods = "counter_32k";
218 }; 282 };
219 283
220 dra7_ctrl_core: ctrl_core@4a002000 { 284 dra7_ctrl_core: ctrl_core@4a002000 {
@@ -227,28 +291,6 @@
227 reg = <0x4a002e00 0x7c>; 291 reg = <0x4a002e00 0x7c>;
228 }; 292 };
229 293
230 pbias_regulator: pbias_regulator {
231 compatible = "ti,pbias-omap";
232 reg = <0 0x4>;
233 syscon = <&dra7_ctrl_general>;
234 pbias_mmc_reg: pbias_mmc_omap5 {
235 regulator-name = "pbias_mmc_omap5";
236 regulator-min-microvolt = <1800000>;
237 regulator-max-microvolt = <3000000>;
238 };
239 };
240
241 dra7_pmx_core: pinmux@4a003400 {
242 compatible = "ti,dra7-padconf", "pinctrl-single";
243 reg = <0x4a003400 0x0464>;
244 #address-cells = <1>;
245 #size-cells = <0>;
246 #interrupt-cells = <1>;
247 interrupt-controller;
248 pinctrl-single,register-width = <32>;
249 pinctrl-single,function-mask = <0x3fffffff>;
250 };
251
252 sdma: dma-controller@4a056000 { 294 sdma: dma-controller@4a056000 {
253 compatible = "ti,omap4430-sdma"; 295 compatible = "ti,omap4430-sdma";
254 reg = <0x4a056000 0x1000>; 296 reg = <0x4a056000 0x1000>;
@@ -666,7 +708,6 @@
666 reg = <0x48820000 0x80>; 708 reg = <0x48820000 0x80>;
667 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; 709 interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
668 ti,hwmods = "timer5"; 710 ti,hwmods = "timer5";
669 ti,timer-dsp;
670 }; 711 };
671 712
672 timer6: timer@48822000 { 713 timer6: timer@48822000 {
@@ -674,8 +715,6 @@
674 reg = <0x48822000 0x80>; 715 reg = <0x48822000 0x80>;
675 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; 716 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
676 ti,hwmods = "timer6"; 717 ti,hwmods = "timer6";
677 ti,timer-dsp;
678 ti,timer-pwm;
679 }; 718 };
680 719
681 timer7: timer@48824000 { 720 timer7: timer@48824000 {
@@ -683,7 +722,6 @@
683 reg = <0x48824000 0x80>; 722 reg = <0x48824000 0x80>;
684 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; 723 interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
685 ti,hwmods = "timer7"; 724 ti,hwmods = "timer7";
686 ti,timer-dsp;
687 }; 725 };
688 726
689 timer8: timer@48826000 { 727 timer8: timer@48826000 {
@@ -691,8 +729,6 @@
691 reg = <0x48826000 0x80>; 729 reg = <0x48826000 0x80>;
692 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; 730 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
693 ti,hwmods = "timer8"; 731 ti,hwmods = "timer8";
694 ti,timer-dsp;
695 ti,timer-pwm;
696 }; 732 };
697 733
698 timer9: timer@4803e000 { 734 timer9: timer@4803e000 {
@@ -714,7 +750,6 @@
714 reg = <0x48088000 0x80>; 750 reg = <0x48088000 0x80>;
715 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; 751 interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
716 ti,hwmods = "timer11"; 752 ti,hwmods = "timer11";
717 ti,timer-pwm;
718 }; 753 };
719 754
720 timer13: timer@48828000 { 755 timer13: timer@48828000 {
@@ -1419,7 +1454,7 @@
1419 compatible = "ti,dra7-d_can"; 1454 compatible = "ti,dra7-d_can";
1420 ti,hwmods = "dcan1"; 1455 ti,hwmods = "dcan1";
1421 reg = <0x4ae3c000 0x2000>; 1456 reg = <0x4ae3c000 0x2000>;
1422 syscon-raminit = <&dra7_ctrl_core 0x558 0>; 1457 syscon-raminit = <&scm_conf 0x558 0>;
1423 interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>; 1458 interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
1424 clocks = <&dcan1_sys_clk_mux>; 1459 clocks = <&dcan1_sys_clk_mux>;
1425 status = "disabled"; 1460 status = "disabled";
@@ -1429,12 +1464,23 @@
1429 compatible = "ti,dra7-d_can"; 1464 compatible = "ti,dra7-d_can";
1430 ti,hwmods = "dcan2"; 1465 ti,hwmods = "dcan2";
1431 reg = <0x48480000 0x2000>; 1466 reg = <0x48480000 0x2000>;
1432 syscon-raminit = <&dra7_ctrl_core 0x558 1>; 1467 syscon-raminit = <&scm_conf 0x558 1>;
1433 interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>; 1468 interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
1434 clocks = <&sys_clkin1>; 1469 clocks = <&sys_clkin1>;
1435 status = "disabled"; 1470 status = "disabled";
1436 }; 1471 };
1437 }; 1472 };
1473
1474 thermal_zones: thermal-zones {
1475 #include "omap4-cpu-thermal.dtsi"
1476 #include "omap5-gpu-thermal.dtsi"
1477 #include "omap5-core-thermal.dtsi"
1478 };
1479
1480};
1481
1482&cpu_thermal {
1483 polling-delay = <500>; /* milliseconds */
1438}; 1484};
1439 1485
1440/include/ "dra7xx-clocks.dtsi" 1486/include/ "dra7xx-clocks.dtsi"
diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts
index daf28110d487..ce0390f081d9 100644
--- a/arch/arm/boot/dts/dra72-evm.dts
+++ b/arch/arm/boot/dts/dra72-evm.dts
@@ -377,6 +377,14 @@
377 phy-supply = <&ldo4_reg>; 377 phy-supply = <&ldo4_reg>;
378}; 378};
379 379
380&omap_dwc3_1 {
381 extcon = <&extcon_usb1>;
382};
383
384&omap_dwc3_2 {
385 extcon = <&extcon_usb2>;
386};
387
380&usb1 { 388&usb1 {
381 dr_mode = "peripheral"; 389 dr_mode = "peripheral";
382 pinctrl-names = "default"; 390 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
index f7fb0d0ef25a..03d742f8d572 100644
--- a/arch/arm/boot/dts/dra72x.dtsi
+++ b/arch/arm/boot/dts/dra72x.dtsi
@@ -20,6 +20,11 @@
20 device_type = "cpu"; 20 device_type = "cpu";
21 compatible = "arm,cortex-a15"; 21 compatible = "arm,cortex-a15";
22 reg = <0>; 22 reg = <0>;
23
24 /* cooling options */
25 cooling-min-level = <0>;
26 cooling-max-level = <2>;
27 #cooling-cells = <2>; /* min followed by max */
23 }; 28 };
24 }; 29 };
25 30
diff --git a/arch/arm/boot/dts/dra74x.dtsi b/arch/arm/boot/dts/dra74x.dtsi
index 00eeed789b4b..cc560a70926f 100644
--- a/arch/arm/boot/dts/dra74x.dtsi
+++ b/arch/arm/boot/dts/dra74x.dtsi
@@ -31,6 +31,11 @@
31 clock-names = "cpu"; 31 clock-names = "cpu";
32 32
33 clock-latency = <300000>; /* From omap-cpufreq driver */ 33 clock-latency = <300000>; /* From omap-cpufreq driver */
34
35 /* cooling options */
36 cooling-min-level = <0>;
37 cooling-max-level = <2>;
38 #cooling-cells = <2>; /* min followed by max */
34 }; 39 };
35 cpu@1 { 40 cpu@1 {
36 device_type = "cpu"; 41 device_type = "cpu";
diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
index 99b09a44e269..3b933f74d000 100644
--- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
+++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
@@ -1493,6 +1493,14 @@
1493 ti,dividers = <1>, <8>; 1493 ti,dividers = <1>, <8>;
1494 }; 1494 };
1495 1495
1496 clkout2_clk: clkout2_clk {
1497 #clock-cells = <0>;
1498 compatible = "ti,gate-clock";
1499 clocks = <&clkoutmux2_clk_mux>;
1500 ti,bit-shift = <8>;
1501 reg = <0x06b0>;
1502 };
1503
1496 l3init_960m_gfclk: l3init_960m_gfclk { 1504 l3init_960m_gfclk: l3init_960m_gfclk {
1497 #clock-cells = <0>; 1505 #clock-cells = <0>;
1498 compatible = "ti,gate-clock"; 1506 compatible = "ti,gate-clock";
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts
index 667d323e80a3..19446273e4a7 100644
--- a/arch/arm/boot/dts/emev2-kzm9d.dts
+++ b/arch/arm/boot/dts/emev2-kzm9d.dts
@@ -94,3 +94,16 @@
94 vdd33a-supply = <&reg_3p3v>; 94 vdd33a-supply = <&reg_3p3v>;
95 }; 95 };
96}; 96};
97
98&pfc {
99 uart1_pins: uart@e1030000 {
100 renesas,groups = "uart1_ctrl", "uart1_data";
101 renesas,function = "uart1";
102 };
103};
104
105&uart1 {
106 pinctrl-0 = <&uart1_pins>;
107 pinctrl-names = "default";
108 status = "okay";
109};
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi
index cc7bfe0ba40a..bb45694d91bc 100644
--- a/arch/arm/boot/dts/emev2.dtsi
+++ b/arch/arm/boot/dts/emev2.dtsi
@@ -169,12 +169,18 @@
169 clock-names = "sclk"; 169 clock-names = "sclk";
170 }; 170 };
171 171
172 pfc: pfc@e0140200 {
173 compatible = "renesas,pfc-emev2";
174 reg = <0xe0140200 0x100>;
175 };
176
172 gpio0: gpio@e0050000 { 177 gpio0: gpio@e0050000 {
173 compatible = "renesas,em-gio"; 178 compatible = "renesas,em-gio";
174 reg = <0xe0050000 0x2c>, <0xe0050040 0x20>; 179 reg = <0xe0050000 0x2c>, <0xe0050040 0x20>;
175 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>, 180 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>,
176 <0 68 IRQ_TYPE_LEVEL_HIGH>; 181 <0 68 IRQ_TYPE_LEVEL_HIGH>;
177 gpio-controller; 182 gpio-controller;
183 gpio-ranges = <&pfc 0 0 32>;
178 #gpio-cells = <2>; 184 #gpio-cells = <2>;
179 ngpios = <32>; 185 ngpios = <32>;
180 interrupt-controller; 186 interrupt-controller;
@@ -186,6 +192,7 @@
186 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>, 192 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>,
187 <0 70 IRQ_TYPE_LEVEL_HIGH>; 193 <0 70 IRQ_TYPE_LEVEL_HIGH>;
188 gpio-controller; 194 gpio-controller;
195 gpio-ranges = <&pfc 0 32 32>;
189 #gpio-cells = <2>; 196 #gpio-cells = <2>;
190 ngpios = <32>; 197 ngpios = <32>;
191 interrupt-controller; 198 interrupt-controller;
@@ -197,6 +204,7 @@
197 interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>, 204 interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>,
198 <0 72 IRQ_TYPE_LEVEL_HIGH>; 205 <0 72 IRQ_TYPE_LEVEL_HIGH>;
199 gpio-controller; 206 gpio-controller;
207 gpio-ranges = <&pfc 0 64 32>;
200 #gpio-cells = <2>; 208 #gpio-cells = <2>;
201 ngpios = <32>; 209 ngpios = <32>;
202 interrupt-controller; 210 interrupt-controller;
@@ -208,6 +216,7 @@
208 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>, 216 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>,
209 <0 74 IRQ_TYPE_LEVEL_HIGH>; 217 <0 74 IRQ_TYPE_LEVEL_HIGH>;
210 gpio-controller; 218 gpio-controller;
219 gpio-ranges = <&pfc 0 96 32>;
211 #gpio-cells = <2>; 220 #gpio-cells = <2>;
212 ngpios = <32>; 221 ngpios = <32>;
213 interrupt-controller; 222 interrupt-controller;
@@ -219,6 +228,7 @@
219 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>, 228 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>,
220 <0 76 IRQ_TYPE_LEVEL_HIGH>; 229 <0 76 IRQ_TYPE_LEVEL_HIGH>;
221 gpio-controller; 230 gpio-controller;
231 gpio-ranges = <&pfc 0 128 31>;
222 #gpio-cells = <2>; 232 #gpio-cells = <2>;
223 ngpios = <31>; 233 ngpios = <31>;
224 interrupt-controller; 234 interrupt-controller;
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 14ab515aa83c..e3bfb11c6ef8 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -176,6 +176,10 @@
176 compatible = "samsung,exynos3250-cmu"; 176 compatible = "samsung,exynos3250-cmu";
177 reg = <0x10030000 0x20000>; 177 reg = <0x10030000 0x20000>;
178 #clock-cells = <1>; 178 #clock-cells = <1>;
179 assigned-clocks = <&cmu CLK_MOUT_ACLK_400_MCUISP_SUB>,
180 <&cmu CLK_MOUT_ACLK_266_SUB>;
181 assigned-clock-parents = <&cmu CLK_FIN_PLL>,
182 <&cmu CLK_FIN_PLL>;
179 }; 183 };
180 184
181 cmu_dmc: clock-controller@105C0000 { 185 cmu_dmc: clock-controller@105C0000 {
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index adb4f6a97a1d..8de12af7c276 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -75,10 +75,18 @@
75 }; 75 };
76 }; 76 };
77 77
78 emmc_pwrseq: pwrseq {
79 pinctrl-0 = <&sd1_cd>;
80 pinctrl-names = "default";
81 compatible = "mmc-pwrseq-emmc";
82 reset-gpios = <&gpk1 2 1>;
83 };
84
78 mmc@12550000 { 85 mmc@12550000 {
79 pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; 86 pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>;
80 pinctrl-names = "default"; 87 pinctrl-names = "default";
81 vmmc-supply = <&ldo20_reg &buck8_reg>; 88 vmmc-supply = <&ldo20_reg &buck8_reg>;
89 mmc-pwrseq = <&emmc_pwrseq>;
82 status = "okay"; 90 status = "okay";
83 91
84 num-slots = <1>; 92 num-slots = <1>;
@@ -472,6 +480,12 @@
472 }; 480 };
473}; 481};
474 482
483/* RSTN signal for eMMC */
484&sd1_cd {
485 samsung,pin-pud = <0>;
486 samsung,pin-drv = <0>;
487};
488
475&pinctrl_1 { 489&pinctrl_1 {
476 gpio_power_key: power_key { 490 gpio_power_key: power_key {
477 samsung,pins = "gpx1-3"; 491 samsung,pins = "gpx1-3";
diff --git a/arch/arm/boot/dts/exynos5250-snow.dts b/arch/arm/boot/dts/exynos5250-snow.dts
index b9aeec430527..2657e842e5a5 100644
--- a/arch/arm/boot/dts/exynos5250-snow.dts
+++ b/arch/arm/boot/dts/exynos5250-snow.dts
@@ -29,6 +29,7 @@
29 29
30 chosen { 30 chosen {
31 bootargs = "console=tty1"; 31 bootargs = "console=tty1";
32 stdout-path = "serial3:115200n8";
32 }; 33 };
33 34
34 gpio-keys { 35 gpio-keys {
@@ -183,7 +184,20 @@
183 powerdown-gpios = <&gpy2 5 GPIO_ACTIVE_HIGH>; 184 powerdown-gpios = <&gpy2 5 GPIO_ACTIVE_HIGH>;
184 reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>; 185 reset-gpios = <&gpx1 5 GPIO_ACTIVE_HIGH>;
185 edid-emulation = <5>; 186 edid-emulation = <5>;
186 panel = <&panel>; 187
188 ports {
189 port@0 {
190 bridge_out: endpoint {
191 remote-endpoint = <&panel_in>;
192 };
193 };
194
195 port@1 {
196 bridge_in: endpoint {
197 remote-endpoint = <&dp_out>;
198 };
199 };
200 };
187 }; 201 };
188 }; 202 };
189 203
@@ -228,6 +242,20 @@
228 compatible = "auo,b116xw03"; 242 compatible = "auo,b116xw03";
229 power-supply = <&fet6>; 243 power-supply = <&fet6>;
230 backlight = <&backlight>; 244 backlight = <&backlight>;
245
246 port {
247 panel_in: endpoint {
248 remote-endpoint = <&bridge_out>;
249 };
250 };
251 };
252
253 mmc3_pwrseq: mmc3_pwrseq {
254 compatible = "mmc-pwrseq-simple";
255 reset-gpios = <&gpx0 2 GPIO_ACTIVE_LOW>, /* WIFI_RSTn */
256 <&gpx0 1 GPIO_ACTIVE_LOW>; /* WIFI_EN */
257 clocks = <&max77686 MAX77686_CLK_PMIC>;
258 clock-names = "ext_clock";
231 }; 259 };
232}; 260};
233 261
@@ -242,7 +270,14 @@
242 samsung,link-rate = <0x0a>; 270 samsung,link-rate = <0x0a>;
243 samsung,lane-count = <2>; 271 samsung,lane-count = <2>;
244 samsung,hpd-gpio = <&gpx0 7 GPIO_ACTIVE_HIGH>; 272 samsung,hpd-gpio = <&gpx0 7 GPIO_ACTIVE_HIGH>;
245 bridge = <&ptn3460>; 273
274 ports {
275 port@0 {
276 dp_out: endpoint {
277 remote-endpoint = <&bridge_in>;
278 };
279 };
280 };
246}; 281};
247 282
248&ehci { 283&ehci {
@@ -531,17 +566,33 @@
531 status = "okay"; 566 status = "okay";
532 num-slots = <1>; 567 num-slots = <1>;
533 broken-cd; 568 broken-cd;
569 cap-sdio-irq;
534 card-detect-delay = <200>; 570 card-detect-delay = <200>;
535 samsung,dw-mshc-ciu-div = <3>; 571 samsung,dw-mshc-ciu-div = <3>;
536 samsung,dw-mshc-sdr-timing = <2 3>; 572 samsung,dw-mshc-sdr-timing = <2 3>;
537 samsung,dw-mshc-ddr-timing = <1 2>; 573 samsung,dw-mshc-ddr-timing = <1 2>;
538 pinctrl-names = "default"; 574 pinctrl-names = "default";
539 pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>; 575 pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4 &wifi_en &wifi_rst>;
540 bus-width = <4>; 576 bus-width = <4>;
541 cap-sd-highspeed; 577 cap-sd-highspeed;
578 mmc-pwrseq = <&mmc3_pwrseq>;
542}; 579};
543 580
544&pinctrl_0 { 581&pinctrl_0 {
582 wifi_en: wifi-en {
583 samsung,pins = "gpx0-1";
584 samsung,pin-function = <1>;
585 samsung,pin-pud = <0>;
586 samsung,pin-drv = <0>;
587 };
588
589 wifi_rst: wifi-rst {
590 samsung,pins = "gpx0-2";
591 samsung,pin-function = <1>;
592 samsung,pin-pud = <0>;
593 samsung,pin-drv = <0>;
594 };
595
545 power_key_irq: power-key-irq { 596 power_key_irq: power-key-irq {
546 samsung,pins = "gpx1-3"; 597 samsung,pins = "gpx1-3";
547 samsung,pin-function = <0xf>; 598 samsung,pin-function = <0xf>;
diff --git a/arch/arm/boot/dts/exynos5250-spring.dts b/arch/arm/boot/dts/exynos5250-spring.dts
index f02775487cd4..d03f9b8d376d 100644
--- a/arch/arm/boot/dts/exynos5250-spring.dts
+++ b/arch/arm/boot/dts/exynos5250-spring.dts
@@ -25,6 +25,7 @@
25 25
26 chosen { 26 chosen {
27 bootargs = "console=tty1"; 27 bootargs = "console=tty1";
28 stdout-path = "serial3:115200n8";
28 }; 29 };
29 30
30 gpio-keys { 31 gpio-keys {
@@ -429,7 +430,6 @@
429&mmc_0 { 430&mmc_0 {
430 status = "okay"; 431 status = "okay";
431 num-slots = <1>; 432 num-slots = <1>;
432 supports-highspeed;
433 broken-cd; 433 broken-cd;
434 card-detect-delay = <200>; 434 card-detect-delay = <200>;
435 samsung,dw-mshc-ciu-div = <3>; 435 samsung,dw-mshc-ciu-div = <3>;
@@ -437,11 +437,8 @@
437 samsung,dw-mshc-ddr-timing = <1 2>; 437 samsung,dw-mshc-ddr-timing = <1 2>;
438 pinctrl-names = "default"; 438 pinctrl-names = "default";
439 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>; 439 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4 &sd0_bus8>;
440 440 bus-width = <8>;
441 slot@0 { 441 cap-mmc-highspeed;
442 reg = <0>;
443 bus-width = <8>;
444 };
445}; 442};
446 443
447/* 444/*
@@ -451,7 +448,6 @@
451&mmc_1 { 448&mmc_1 {
452 status = "okay"; 449 status = "okay";
453 num-slots = <1>; 450 num-slots = <1>;
454 supports-highspeed;
455 broken-cd; 451 broken-cd;
456 card-detect-delay = <200>; 452 card-detect-delay = <200>;
457 samsung,dw-mshc-ciu-div = <3>; 453 samsung,dw-mshc-ciu-div = <3>;
@@ -459,11 +455,8 @@
459 samsung,dw-mshc-ddr-timing = <1 2>; 455 samsung,dw-mshc-ddr-timing = <1 2>;
460 pinctrl-names = "default"; 456 pinctrl-names = "default";
461 pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus4>; 457 pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus4>;
462 458 bus-width = <4>;
463 slot@0 { 459 cap-sd-highspeed;
464 reg = <0>;
465 bus-width = <4>;
466 };
467}; 460};
468 461
469&pinctrl_0 { 462&pinctrl_0 {
@@ -490,7 +483,7 @@
490 483
491 power_key_irq: power-key-irq { 484 power_key_irq: power-key-irq {
492 samsung,pins = "gpx1-3"; 485 samsung,pins = "gpx1-3";
493 samsung,pin-function = <0>; 486 samsung,pin-function = <0xf>;
494 samsung,pin-pud = <0>; 487 samsung,pin-pud = <0>;
495 samsung,pin-drv = <0>; 488 samsung,pin-drv = <0>;
496 }; 489 };
@@ -518,7 +511,7 @@
518 511
519 lid_irq: lid-irq { 512 lid_irq: lid-irq {
520 samsung,pins = "gpx3-5"; 513 samsung,pins = "gpx3-5";
521 samsung,pin-function = <0>; 514 samsung,pin-function = <0xf>;
522 samsung,pin-pud = <0>; 515 samsung,pin-pud = <0>;
523 samsung,pin-drv = <0>; 516 samsung,pin-drv = <0>;
524 }; 517 };
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 77f656eb8e6b..257e2f10525d 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -143,7 +143,7 @@
143 compatible = "samsung,exynos4210-mct"; 143 compatible = "samsung,exynos4210-mct";
144 reg = <0x101C0000 0x800>; 144 reg = <0x101C0000 0x800>;
145 interrupt-controller; 145 interrupt-controller;
146 #interrups-cells = <2>; 146 #interrupt-cells = <2>;
147 interrupt-parent = <&mct_map>; 147 interrupt-parent = <&mct_map>;
148 interrupts = <0 0>, <1 0>, <2 0>, <3 0>, 148 interrupts = <0 0>, <1 0>, <2 0>, <3 0>,
149 <4 0>, <5 0>; 149 <4 0>, <5 0>;
diff --git a/arch/arm/boot/dts/exynos5420-arndale-octa.dts b/arch/arm/boot/dts/exynos5420-arndale-octa.dts
index db2c1c4cd900..b82b6fa15f48 100644
--- a/arch/arm/boot/dts/exynos5420-arndale-octa.dts
+++ b/arch/arm/boot/dts/exynos5420-arndale-octa.dts
@@ -55,7 +55,7 @@
55 samsung,dw-mshc-sdr-timing = <0 4>; 55 samsung,dw-mshc-sdr-timing = <0 4>;
56 samsung,dw-mshc-ddr-timing = <0 2>; 56 samsung,dw-mshc-ddr-timing = <0 2>;
57 pinctrl-names = "default"; 57 pinctrl-names = "default";
58 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; 58 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
59 vmmc-supply = <&ldo10_reg>; 59 vmmc-supply = <&ldo10_reg>;
60 bus-width = <8>; 60 bus-width = <8>;
61 cap-mmc-highspeed; 61 cap-mmc-highspeed;
@@ -68,7 +68,7 @@
68 samsung,dw-mshc-sdr-timing = <2 3>; 68 samsung,dw-mshc-sdr-timing = <2 3>;
69 samsung,dw-mshc-ddr-timing = <1 2>; 69 samsung,dw-mshc-ddr-timing = <1 2>;
70 pinctrl-names = "default"; 70 pinctrl-names = "default";
71 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 71 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
72 vmmc-supply = <&ldo19_reg>; 72 vmmc-supply = <&ldo19_reg>;
73 vqmmc-supply = <&ldo13_reg>; 73 vqmmc-supply = <&ldo13_reg>;
74 bus-width = <4>; 74 bus-width = <4>;
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index c47bb70665c1..0788d08fb43e 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -43,6 +43,10 @@
43 pinctrl-names = "default"; 43 pinctrl-names = "default";
44 }; 44 };
45 45
46 chosen {
47 stdout-path = "serial3:115200n8";
48 };
49
46 fixed-rate-clocks { 50 fixed-rate-clocks {
47 oscclk { 51 oscclk {
48 compatible = "samsung,exynos5420-oscclk"; 52 compatible = "samsung,exynos5420-oscclk";
@@ -118,6 +122,19 @@
118 compatible = "auo,b116xw03"; 122 compatible = "auo,b116xw03";
119 power-supply = <&tps65090_fet6>; 123 power-supply = <&tps65090_fet6>;
120 backlight = <&backlight>; 124 backlight = <&backlight>;
125
126 port {
127 panel_in: endpoint {
128 remote-endpoint = <&bridge_out>;
129 };
130 };
131 };
132
133 mmc1_pwrseq: mmc1_pwrseq {
134 compatible = "mmc-pwrseq-simple";
135 reset-gpios = <&gpx0 0 GPIO_ACTIVE_LOW>; /* WIFI_EN */
136 clocks = <&max77802 MAX77802_CLK_32K_CP>;
137 clock-names = "ext_clock";
121 }; 138 };
122}; 139};
123 140
@@ -137,7 +154,14 @@
137 samsung,link-rate = <0x06>; 154 samsung,link-rate = <0x06>;
138 samsung,lane-count = <2>; 155 samsung,lane-count = <2>;
139 samsung,hpd-gpio = <&gpx2 6 0>; 156 samsung,hpd-gpio = <&gpx2 6 0>;
140 bridge = <&ps8625>; 157
158 ports {
159 port@0 {
160 dp_out: endpoint {
161 remote-endpoint = <&bridge_in>;
162 };
163 };
164 };
141}; 165};
142 166
143&fimd { 167&fimd {
@@ -581,6 +605,8 @@
581 interrupt-parent = <&gpx0>; 605 interrupt-parent = <&gpx0>;
582 pinctrl-names = "default"; 606 pinctrl-names = "default";
583 pinctrl-0 = <&max98090_irq>; 607 pinctrl-0 = <&max98090_irq>;
608 clocks = <&pmu_system_controller 0>;
609 clock-names = "mclk";
584 }; 610 };
585 611
586 light-sensor@44 { 612 light-sensor@44 {
@@ -595,8 +621,22 @@
595 sleep-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>; 621 sleep-gpios = <&gpx3 5 GPIO_ACTIVE_HIGH>;
596 reset-gpios = <&gpy7 7 GPIO_ACTIVE_HIGH>; 622 reset-gpios = <&gpy7 7 GPIO_ACTIVE_HIGH>;
597 lane-count = <2>; 623 lane-count = <2>;
598 panel = <&panel>;
599 use-external-pwm; 624 use-external-pwm;
625
626 ports {
627 port@0 {
628 bridge_out: endpoint {
629 remote-endpoint = <&panel_in>;
630 };
631 };
632
633 port@1 {
634 bridge_in: endpoint {
635 remote-endpoint = <&dp_out>;
636 };
637 };
638 };
639
600 }; 640 };
601}; 641};
602 642
@@ -659,11 +699,32 @@
659 samsung,dw-mshc-ciu-div = <3>; 699 samsung,dw-mshc-ciu-div = <3>;
660 samsung,dw-mshc-sdr-timing = <0 4>; 700 samsung,dw-mshc-sdr-timing = <0 4>;
661 samsung,dw-mshc-ddr-timing = <0 2>; 701 samsung,dw-mshc-ddr-timing = <0 2>;
702 samsung,dw-mshc-hs400-timing = <0 2>;
703 samsung,read-strobe-delay = <90>;
662 pinctrl-names = "default"; 704 pinctrl-names = "default";
663 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; 705 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_rclk>;
664 bus-width = <8>; 706 bus-width = <8>;
665}; 707};
666 708
709&mmc_1 {
710 status = "okay";
711 num-slots = <1>;
712 broken-cd;
713 cap-sdio-irq;
714 card-detect-delay = <200>;
715 clock-frequency = <400000000>;
716 samsung,dw-mshc-ciu-div = <1>;
717 samsung,dw-mshc-sdr-timing = <0 1>;
718 samsung,dw-mshc-ddr-timing = <0 2>;
719 pinctrl-names = "default";
720 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_int>, <&sd1_bus1>,
721 <&sd1_bus4>, <&sd1_bus8>, <&wifi_en>;
722 bus-width = <4>;
723 cap-sd-highspeed;
724 mmc-pwrseq = <&mmc1_pwrseq>;
725 vqmmc-supply = <&buck10_reg>;
726};
727
667&mmc_2 { 728&mmc_2 {
668 status = "okay"; 729 status = "okay";
669 num-slots = <1>; 730 num-slots = <1>;
@@ -674,7 +735,7 @@
674 samsung,dw-mshc-sdr-timing = <2 3>; 735 samsung,dw-mshc-sdr-timing = <2 3>;
675 samsung,dw-mshc-ddr-timing = <1 2>; 736 samsung,dw-mshc-ddr-timing = <1 2>;
676 pinctrl-names = "default"; 737 pinctrl-names = "default";
677 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 738 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
678 bus-width = <4>; 739 bus-width = <4>;
679}; 740};
680 741
@@ -683,6 +744,13 @@
683 pinctrl-names = "default"; 744 pinctrl-names = "default";
684 pinctrl-0 = <&mask_tpm_reset>; 745 pinctrl-0 = <&mask_tpm_reset>;
685 746
747 wifi_en: wifi-en {
748 samsung,pins = "gpx0-0";
749 samsung,pin-function = <1>;
750 samsung,pin-pud = <0>;
751 samsung,pin-drv = <0>;
752 };
753
686 max98090_irq: max98090-irq { 754 max98090_irq: max98090-irq {
687 samsung,pins = "gpx0-2"; 755 samsung,pins = "gpx0-2";
688 samsung,pin-function = <0>; 756 samsung,pin-function = <0>;
@@ -770,6 +838,29 @@
770 }; 838 };
771}; 839};
772 840
841&pinctrl_1 {
842 /* Adjust WiFi drive strengths lower for EMI */
843 sd1_clk: sd1-clk {
844 samsung,pin-drv = <2>;
845 };
846
847 sd1_cmd: sd1-cmd {
848 samsung,pin-drv = <2>;
849 };
850
851 sd1_bus1: sd1-bus-width1 {
852 samsung,pin-drv = <2>;
853 };
854
855 sd1_bus4: sd1-bus-width4 {
856 samsung,pin-drv = <2>;
857 };
858
859 sd1_bus8: sd1-bus-width8 {
860 samsung,pin-drv = <2>;
861 };
862};
863
773&pinctrl_2 { 864&pinctrl_2 {
774 pmic_dvs_2: pmic-dvs-2 { 865 pmic_dvs_2: pmic-dvs-2 {
775 samsung,pins = "gpj4-2"; 866 samsung,pins = "gpj4-2";
diff --git a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
index ba686e40eac7..8b153166ebdb 100644
--- a/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
+++ b/arch/arm/boot/dts/exynos5420-pinctrl.dtsi
@@ -201,6 +201,13 @@
201 samsung,pin-drv = <3>; 201 samsung,pin-drv = <3>;
202 }; 202 };
203 203
204 sd0_rclk: sd0-rclk {
205 samsung,pins = "gpc0-7";
206 samsung,pin-function = <2>;
207 samsung,pin-pud = <1>;
208 samsung,pin-drv = <3>;
209 };
210
204 sd1_cmd: sd1-cmd { 211 sd1_cmd: sd1-cmd {
205 samsung,pins = "gpc1-1"; 212 samsung,pins = "gpc1-1";
206 samsung,pin-function = <2>; 213 samsung,pin-function = <2>;
diff --git a/arch/arm/boot/dts/exynos5420-smdk5420.dts b/arch/arm/boot/dts/exynos5420-smdk5420.dts
index 8be3d7b489ff..9103f2381a6d 100644
--- a/arch/arm/boot/dts/exynos5420-smdk5420.dts
+++ b/arch/arm/boot/dts/exynos5420-smdk5420.dts
@@ -80,8 +80,11 @@
80 samsung,dw-mshc-ciu-div = <3>; 80 samsung,dw-mshc-ciu-div = <3>;
81 samsung,dw-mshc-sdr-timing = <0 4>; 81 samsung,dw-mshc-sdr-timing = <0 4>;
82 samsung,dw-mshc-ddr-timing = <0 2>; 82 samsung,dw-mshc-ddr-timing = <0 2>;
83 samsung,dw-mshc-hs400-timing = <0 2>;
84 samsung,read-strobe-delay = <90>;
83 pinctrl-names = "default"; 85 pinctrl-names = "default";
84 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; 86 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8
87 &sd0_rclk>;
85 bus-width = <8>; 88 bus-width = <8>;
86 cap-mmc-highspeed; 89 cap-mmc-highspeed;
87 }; 90 };
@@ -93,7 +96,7 @@
93 samsung,dw-mshc-sdr-timing = <2 3>; 96 samsung,dw-mshc-sdr-timing = <2 3>;
94 samsung,dw-mshc-ddr-timing = <1 2>; 97 samsung,dw-mshc-ddr-timing = <1 2>;
95 pinctrl-names = "default"; 98 pinctrl-names = "default";
96 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 99 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
97 bus-width = <4>; 100 bus-width = <4>;
98 cap-sd-highspeed; 101 cap-sd-highspeed;
99 }; 102 };
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index b3d2d53820e3..f67b23f303c3 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -221,7 +221,7 @@
221 compatible = "samsung,exynos4210-mct"; 221 compatible = "samsung,exynos4210-mct";
222 reg = <0x101C0000 0x800>; 222 reg = <0x101C0000 0x800>;
223 interrupt-controller; 223 interrupt-controller;
224 #interrups-cells = <1>; 224 #interrupt-cells = <1>;
225 interrupt-parent = <&mct_map>; 225 interrupt-parent = <&mct_map>;
226 interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>, 226 interrupts = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>,
227 <8>, <9>, <10>, <11>; 227 <8>, <9>, <10>, <11>;
@@ -251,6 +251,8 @@
251 compatible = "samsung,exynos4210-pd"; 251 compatible = "samsung,exynos4210-pd";
252 reg = <0x10044000 0x20>; 252 reg = <0x10044000 0x20>;
253 #power-domain-cells = <0>; 253 #power-domain-cells = <0>;
254 clocks = <&clock CLK_GSCL0>, <&clock CLK_GSCL1>;
255 clock-names = "asb0", "asb1";
254 }; 256 };
255 257
256 isp_pd: power-domain@10044020 { 258 isp_pd: power-domain@10044020 {
@@ -283,9 +285,11 @@
283 <&clock CLK_MOUT_SW_ACLK300>, 285 <&clock CLK_MOUT_SW_ACLK300>,
284 <&clock CLK_MOUT_USER_ACLK300_DISP1>, 286 <&clock CLK_MOUT_USER_ACLK300_DISP1>,
285 <&clock CLK_MOUT_SW_ACLK400>, 287 <&clock CLK_MOUT_SW_ACLK400>,
286 <&clock CLK_MOUT_USER_ACLK400_DISP1>; 288 <&clock CLK_MOUT_USER_ACLK400_DISP1>,
289 <&clock CLK_FIMD1>, <&clock CLK_MIXER>;
287 clock-names = "oscclk", "pclk0", "clk0", 290 clock-names = "oscclk", "pclk0", "clk0",
288 "pclk1", "clk1", "pclk2", "clk2"; 291 "pclk1", "clk1", "pclk2", "clk2",
292 "asb0", "asb1";
289 }; 293 };
290 294
291 pinctrl_0: pinctrl@13400000 { 295 pinctrl_0: pinctrl@13400000 {
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index a519c863248d..edc25cf1d717 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -264,6 +264,13 @@
264 }; 264 };
265 }; 265 };
266 266
267 emmc_pwrseq: pwrseq {
268 pinctrl-0 = <&emmc_nrst_pin>;
269 pinctrl-names = "default";
270 compatible = "mmc-pwrseq-emmc";
271 reset-gpios = <&gpd1 0 1>;
272 };
273
267 i2c_2: i2c@12C80000 { 274 i2c_2: i2c@12C80000 {
268 samsung,i2c-sda-delay = <100>; 275 samsung,i2c-sda-delay = <100>;
269 samsung,i2c-max-bus-freq = <66000>; 276 samsung,i2c-max-bus-freq = <66000>;
@@ -298,13 +305,14 @@
298 305
299&mmc_0 { 306&mmc_0 {
300 status = "okay"; 307 status = "okay";
308 mmc-pwrseq = <&emmc_pwrseq>;
301 broken-cd; 309 broken-cd;
302 card-detect-delay = <200>; 310 card-detect-delay = <200>;
303 samsung,dw-mshc-ciu-div = <3>; 311 samsung,dw-mshc-ciu-div = <3>;
304 samsung,dw-mshc-sdr-timing = <0 4>; 312 samsung,dw-mshc-sdr-timing = <0 4>;
305 samsung,dw-mshc-ddr-timing = <0 2>; 313 samsung,dw-mshc-ddr-timing = <0 2>;
306 pinctrl-names = "default"; 314 pinctrl-names = "default";
307 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; 315 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
308 bus-width = <8>; 316 bus-width = <8>;
309 cap-mmc-highspeed; 317 cap-mmc-highspeed;
310}; 318};
@@ -316,7 +324,7 @@
316 samsung,dw-mshc-sdr-timing = <0 4>; 324 samsung,dw-mshc-sdr-timing = <0 4>;
317 samsung,dw-mshc-ddr-timing = <0 2>; 325 samsung,dw-mshc-ddr-timing = <0 2>;
318 pinctrl-names = "default"; 326 pinctrl-names = "default";
319 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 327 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
320 bus-width = <4>; 328 bus-width = <4>;
321 cap-sd-highspeed; 329 cap-sd-highspeed;
322}; 330};
@@ -330,6 +338,15 @@
330 }; 338 };
331}; 339};
332 340
341&pinctrl_1 {
342 emmc_nrst_pin: emmc-nrst {
343 samsung,pins = "gpd1-0";
344 samsung,pin-function = <0>;
345 samsung,pin-pud = <0>;
346 samsung,pin-drv = <0>;
347 };
348};
349
333&usbdrd_dwc3_0 { 350&usbdrd_dwc3_0 {
334 dr_mode = "host"; 351 dr_mode = "host";
335}; 352};
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 06737c60d333..412f41d62686 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -42,6 +42,10 @@
42 pinctrl-names = "default"; 42 pinctrl-names = "default";
43 }; 43 };
44 44
45 chosen {
46 stdout-path = "serial3:115200n8";
47 };
48
45 fixed-rate-clocks { 49 fixed-rate-clocks {
46 oscclk { 50 oscclk {
47 compatible = "samsung,exynos5420-oscclk"; 51 compatible = "samsung,exynos5420-oscclk";
@@ -119,6 +123,13 @@
119 power-supply = <&tps65090_fet6>; 123 power-supply = <&tps65090_fet6>;
120 backlight = <&backlight>; 124 backlight = <&backlight>;
121 }; 125 };
126
127 mmc1_pwrseq: mmc1_pwrseq {
128 compatible = "mmc-pwrseq-simple";
129 reset-gpios = <&gpx0 0 GPIO_ACTIVE_LOW>; /* WIFI_EN */
130 clocks = <&max77802 MAX77802_CLK_32K_CP>;
131 clock-names = "ext_clock";
132 };
122}; 133};
123 134
124&adc { 135&adc {
@@ -581,6 +592,8 @@
581 interrupt-parent = <&gpx0>; 592 interrupt-parent = <&gpx0>;
582 pinctrl-names = "default"; 593 pinctrl-names = "default";
583 pinctrl-0 = <&max98091_irq>; 594 pinctrl-0 = <&max98091_irq>;
595 clocks = <&pmu_system_controller 0>;
596 clock-names = "mclk";
584 }; 597 };
585 598
586 light-sensor@44 { 599 light-sensor@44 {
@@ -641,18 +654,40 @@
641 num-slots = <1>; 654 num-slots = <1>;
642 broken-cd; 655 broken-cd;
643 mmc-hs200-1_8v; 656 mmc-hs200-1_8v;
657 mmc-hs400-1_8v;
644 cap-mmc-highspeed; 658 cap-mmc-highspeed;
645 non-removable; 659 non-removable;
646 card-detect-delay = <200>; 660 card-detect-delay = <200>;
647 clock-frequency = <400000000>; 661 clock-frequency = <800000000>;
648 samsung,dw-mshc-ciu-div = <3>; 662 samsung,dw-mshc-ciu-div = <3>;
649 samsung,dw-mshc-sdr-timing = <0 4>; 663 samsung,dw-mshc-sdr-timing = <0 4>;
650 samsung,dw-mshc-ddr-timing = <0 2>; 664 samsung,dw-mshc-ddr-timing = <0 2>;
665 samsung,dw-mshc-hs400-timing = <0 2>;
666 samsung,read-strobe-delay = <90>;
651 pinctrl-names = "default"; 667 pinctrl-names = "default";
652 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus4 &sd0_bus8>; 668 pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_rclk>;
653 bus-width = <8>; 669 bus-width = <8>;
654}; 670};
655 671
672&mmc_1 {
673 status = "okay";
674 num-slots = <1>;
675 broken-cd;
676 cap-sdio-irq;
677 card-detect-delay = <200>;
678 clock-frequency = <400000000>;
679 samsung,dw-mshc-ciu-div = <1>;
680 samsung,dw-mshc-sdr-timing = <0 1>;
681 samsung,dw-mshc-ddr-timing = <0 2>;
682 pinctrl-names = "default";
683 pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_int>, <&sd1_bus1>,
684 <&sd1_bus4>, <&sd1_bus8>, <&wifi_en>;
685 bus-width = <4>;
686 cap-sd-highspeed;
687 mmc-pwrseq = <&mmc1_pwrseq>;
688 vqmmc-supply = <&buck10_reg>;
689};
690
656&mmc_2 { 691&mmc_2 {
657 status = "okay"; 692 status = "okay";
658 num-slots = <1>; 693 num-slots = <1>;
@@ -663,7 +698,7 @@
663 samsung,dw-mshc-sdr-timing = <2 3>; 698 samsung,dw-mshc-sdr-timing = <2 3>;
664 samsung,dw-mshc-ddr-timing = <1 2>; 699 samsung,dw-mshc-ddr-timing = <1 2>;
665 pinctrl-names = "default"; 700 pinctrl-names = "default";
666 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus4>; 701 pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_cd &sd2_bus1 &sd2_bus4>;
667 bus-width = <4>; 702 bus-width = <4>;
668}; 703};
669 704
@@ -672,6 +707,13 @@
672 pinctrl-names = "default"; 707 pinctrl-names = "default";
673 pinctrl-0 = <&mask_tpm_reset>; 708 pinctrl-0 = <&mask_tpm_reset>;
674 709
710 wifi_en: wifi-en {
711 samsung,pins = "gpx0-0";
712 samsung,pin-function = <1>;
713 samsung,pin-pud = <0>;
714 samsung,pin-drv = <0>;
715 };
716
675 max98091_irq: max98091-irq { 717 max98091_irq: max98091-irq {
676 samsung,pins = "gpx0-2"; 718 samsung,pins = "gpx0-2";
677 samsung,pin-function = <0>; 719 samsung,pin-function = <0>;
@@ -759,6 +801,29 @@
759 }; 801 };
760}; 802};
761 803
804&pinctrl_1 {
805 /* Adjust WiFi drive strengths lower for EMI */
806 sd1_clk: sd1-clk {
807 samsung,pin-drv = <2>;
808 };
809
810 sd1_cmd: sd1-cmd {
811 samsung,pin-drv = <2>;
812 };
813
814 sd1_bus1: sd1-bus-width1 {
815 samsung,pin-drv = <2>;
816 };
817
818 sd1_bus4: sd1-bus-width4 {
819 samsung,pin-drv = <2>;
820 };
821
822 sd1_bus8: sd1-bus-width8 {
823 samsung,pin-drv = <2>;
824 };
825};
826
762&pinctrl_2 { 827&pinctrl_2 {
763 pmic_dvs_2: pmic-dvs-2 { 828 pmic_dvs_2: pmic-dvs-2 {
764 samsung,pins = "gpj4-2"; 829 samsung,pins = "gpj4-2";
diff --git a/arch/arm/boot/dts/imx25-pdk.dts b/arch/arm/boot/dts/imx25-pdk.dts
index 9c21b1583762..dd45e6971bc3 100644
--- a/arch/arm/boot/dts/imx25-pdk.dts
+++ b/arch/arm/boot/dts/imx25-pdk.dts
@@ -75,6 +75,27 @@
75 mux-int-port = <1>; 75 mux-int-port = <1>;
76 mux-ext-port = <4>; 76 mux-ext-port = <4>;
77 }; 77 };
78
79 wvga: display {
80 model = "CLAA057VC01CW";
81 bits-per-pixel = <16>;
82 fsl,pcr = <0xfa208b80>;
83 bus-width = <18>;
84 native-mode = <&wvga_timings>;
85 display-timings {
86 wvga_timings: 640x480 {
87 hactive = <640>;
88 vactive = <480>;
89 hback-porch = <45>;
90 hfront-porch = <114>;
91 hsync-len = <1>;
92 vback-porch = <33>;
93 vfront-porch = <11>;
94 vsync-len = <1>;
95 clock-frequency = <25200000>;
96 };
97 };
98 };
78}; 99};
79 100
80&audmux { 101&audmux {
@@ -190,6 +211,33 @@
190 >; 211 >;
191 }; 212 };
192 213
214 pinctrl_lcd: lcdgrp {
215 fsl,pins = <
216 MX25_PAD_LD0__LD0 0xe0
217 MX25_PAD_LD1__LD1 0xe0
218 MX25_PAD_LD2__LD2 0xe0
219 MX25_PAD_LD3__LD3 0xe0
220 MX25_PAD_LD4__LD4 0xe0
221 MX25_PAD_LD5__LD5 0xe0
222 MX25_PAD_LD6__LD6 0xe0
223 MX25_PAD_LD7__LD7 0xe0
224 MX25_PAD_LD8__LD8 0xe0
225 MX25_PAD_LD9__LD9 0xe0
226 MX25_PAD_LD10__LD10 0xe0
227 MX25_PAD_LD11__LD11 0xe0
228 MX25_PAD_LD12__LD12 0xe0
229 MX25_PAD_LD13__LD13 0xe0
230 MX25_PAD_LD14__LD14 0xe0
231 MX25_PAD_LD15__LD15 0xe0
232 MX25_PAD_GPIO_E__LD16 0xe0
233 MX25_PAD_GPIO_F__LD17 0xe0
234 MX25_PAD_HSYNC__HSYNC 0xe0
235 MX25_PAD_VSYNC__VSYNC 0xe0
236 MX25_PAD_LSCLK__LSCLK 0xe0
237 MX25_PAD_OE_ACD__OE_ACD 0xe0
238 MX25_PAD_CONTRAST__CONTRAST 0xe0
239 >;
240 };
193 241
194 pinctrl_uart1: uart1grp { 242 pinctrl_uart1: uart1grp {
195 fsl,pins = < 243 fsl,pins = <
@@ -202,6 +250,16 @@
202 }; 250 };
203}; 251};
204 252
253&lcdc {
254 display = <&wvga>;
255 fsl,lpccr = <0x00a903ff>;
256 fsl,lscr1 = <0x00120300>;
257 fsl,dmacr = <0x00020010>;
258 pinctrl-names = "default";
259 pinctrl-0 = <&pinctrl_lcd>;
260 status = "okay";
261};
262
205&nfc { 263&nfc {
206 nand-on-flash-bbt; 264 nand-on-flash-bbt;
207 status = "okay"; 265 status = "okay";
diff --git a/arch/arm/boot/dts/imx25-pinfunc.h b/arch/arm/boot/dts/imx25-pinfunc.h
index 88eebb15da6a..7c4b9f2f9aad 100644
--- a/arch/arm/boot/dts/imx25-pinfunc.h
+++ b/arch/arm/boot/dts/imx25-pinfunc.h
@@ -17,48 +17,69 @@
17 * <mux_reg conf_reg input_reg mux_mode input_val> 17 * <mux_reg conf_reg input_reg mux_mode input_val>
18 */ 18 */
19 19
20#define MX25_PAD_TDO__TDO 0x000 0x3e8 0x000 0x00 0x000
21
20#define MX25_PAD_A10__A10 0x008 0x000 0x000 0x00 0x000 22#define MX25_PAD_A10__A10 0x008 0x000 0x000 0x00 0x000
21#define MX25_PAD_A10__GPIO_4_0 0x008 0x000 0x000 0x05 0x000 23#define MX25_PAD_A10__GPIO_4_0 0x008 0x000 0x000 0x05 0x000
22 24
23#define MX25_PAD_A13__A13 0x00c 0x22C 0x000 0x00 0x000 25#define MX25_PAD_A13__A13 0x00c 0x22C 0x000 0x00 0x000
24#define MX25_PAD_A13__GPIO_4_1 0x00c 0x22C 0x000 0x05 0x000 26#define MX25_PAD_A13__GPIO_4_1 0x00c 0x22C 0x000 0x05 0x000
27#define MX25_PAD_A13__LCDC_CLS 0x00c 0x22C 0x000 0x07 0x000
25 28
26#define MX25_PAD_A14__A14 0x010 0x230 0x000 0x10 0x000 29#define MX25_PAD_A14__A14 0x010 0x230 0x000 0x10 0x000
27#define MX25_PAD_A14__GPIO_2_0 0x010 0x230 0x000 0x15 0x000 30#define MX25_PAD_A14__GPIO_2_0 0x010 0x230 0x000 0x15 0x000
31#define MX25_PAD_A14__SIM1_CLK1 0x010 0x230 0x000 0x16 0x000
32#define MX25_PAD_A14__LCDC_SPL 0x010 0x230 0x000 0x17 0x000
28 33
29#define MX25_PAD_A15__A15 0x014 0x234 0x000 0x10 0x000 34#define MX25_PAD_A15__A15 0x014 0x234 0x000 0x10 0x000
30#define MX25_PAD_A15__GPIO_2_1 0x014 0x234 0x000 0x15 0x000 35#define MX25_PAD_A15__GPIO_2_1 0x014 0x234 0x000 0x15 0x000
36#define MX25_PAD_A15__SIM1_RST1 0x014 0x234 0x000 0x16 0x000
37#define MX25_PAD_A15__LCDC_PS 0x014 0x234 0x000 0x17 0x000
31 38
32#define MX25_PAD_A16__A16 0x018 0x000 0x000 0x10 0x000 39#define MX25_PAD_A16__A16 0x018 0x000 0x000 0x10 0x000
33#define MX25_PAD_A16__GPIO_2_2 0x018 0x000 0x000 0x15 0x000 40#define MX25_PAD_A16__GPIO_2_2 0x018 0x000 0x000 0x15 0x000
41#define MX25_PAD_A16__SIM1_VEN1 0x018 0x000 0x000 0x16 0x000
42#define MX25_PAD_A16__LCDC_REV 0x018 0x000 0x000 0x17 0x000
34 43
35#define MX25_PAD_A17__A17 0x01c 0x238 0x000 0x10 0x000 44#define MX25_PAD_A17__A17 0x01c 0x238 0x000 0x10 0x000
36#define MX25_PAD_A17__GPIO_2_3 0x01c 0x238 0x000 0x15 0x000 45#define MX25_PAD_A17__GPIO_2_3 0x01c 0x238 0x000 0x15 0x000
46#define MX25_PAD_A17__SIM1_TX 0x01c 0x238 0x554 0x16 0x000
47#define MX25_PAD_A17__FEC_TX_ERR 0x01c 0x238 0x000 0x17 0x000
37 48
38#define MX25_PAD_A18__A18 0x020 0x23c 0x000 0x10 0x000 49#define MX25_PAD_A18__A18 0x020 0x23c 0x000 0x10 0x000
39#define MX25_PAD_A18__GPIO_2_4 0x020 0x23c 0x000 0x15 0x000 50#define MX25_PAD_A18__GPIO_2_4 0x020 0x23c 0x000 0x15 0x000
51#define MX25_PAD_A18__SIM1_PD1 0x020 0x23c 0x550 0x16 0x000
40#define MX25_PAD_A18__FEC_COL 0x020 0x23c 0x504 0x17 0x000 52#define MX25_PAD_A18__FEC_COL 0x020 0x23c 0x504 0x17 0x000
41 53
42#define MX25_PAD_A19__A19 0x024 0x240 0x000 0x10 0x000 54#define MX25_PAD_A19__A19 0x024 0x240 0x000 0x10 0x000
43#define MX25_PAD_A19__FEC_RX_ER 0x024 0x240 0x518 0x17 0x000
44#define MX25_PAD_A19__GPIO_2_5 0x024 0x240 0x000 0x15 0x000 55#define MX25_PAD_A19__GPIO_2_5 0x024 0x240 0x000 0x15 0x000
56#define MX25_PAD_A19__SIM1_RX1 0x024 0x240 0x54c 0x16 0x000
57#define MX25_PAD_A19__FEC_RX_ERR 0x024 0x240 0x518 0x17 0x000
45 58
46#define MX25_PAD_A20__A20 0x028 0x244 0x000 0x10 0x000 59#define MX25_PAD_A20__A20 0x028 0x244 0x000 0x10 0x000
47#define MX25_PAD_A20__GPIO_2_6 0x028 0x244 0x000 0x15 0x000 60#define MX25_PAD_A20__GPIO_2_6 0x028 0x244 0x000 0x15 0x000
61#define MX25_PAD_A20__SIM2_CLK1 0x028 0x244 0x000 0x16 0x000
48#define MX25_PAD_A20__FEC_RDATA2 0x028 0x244 0x50c 0x17 0x000 62#define MX25_PAD_A20__FEC_RDATA2 0x028 0x244 0x50c 0x17 0x000
49 63
50#define MX25_PAD_A21__A21 0x02c 0x248 0x000 0x10 0x000 64#define MX25_PAD_A21__A21 0x02c 0x248 0x000 0x10 0x000
51#define MX25_PAD_A21__GPIO_2_7 0x02c 0x248 0x000 0x15 0x000 65#define MX25_PAD_A21__GPIO_2_7 0x02c 0x248 0x000 0x15 0x000
66#define MX25_PAD_A21__SIM2_RST1 0x02c 0x248 0x000 0x16 0x000
52#define MX25_PAD_A21__FEC_RDATA3 0x02c 0x248 0x510 0x17 0x000 67#define MX25_PAD_A21__FEC_RDATA3 0x02c 0x248 0x510 0x17 0x000
53 68
54#define MX25_PAD_A22__A22 0x030 0x000 0x000 0x10 0x000 69#define MX25_PAD_A22__A22 0x030 0x000 0x000 0x10 0x000
55#define MX25_PAD_A22__GPIO_2_8 0x030 0x000 0x000 0x15 0x000 70#define MX25_PAD_A22__GPIO_2_8 0x030 0x000 0x000 0x15 0x000
71#define MX25_PAD_A22__FEC_TDATA2 0x030 0x000 0x000 0x17 0x000
72#define MX25_PAD_A22__SIM2_VEN1 0x030 0x000 0x000 0x16 0x000
73#define MX25_PAD_A22__FEC_TDATA2 0x030 0x000 0x000 0x17 0x000
56 74
57#define MX25_PAD_A23__A23 0x034 0x24c 0x000 0x10 0x000 75#define MX25_PAD_A23__A23 0x034 0x24c 0x000 0x10 0x000
58#define MX25_PAD_A23__GPIO_2_9 0x034 0x24c 0x000 0x15 0x000 76#define MX25_PAD_A23__GPIO_2_9 0x034 0x24c 0x000 0x15 0x000
77#define MX25_PAD_A23__SIM2_TX1 0x034 0x24c 0x560 0x16 0x000
78#define MX25_PAD_A23__FEC_TDATA3 0x034 0x24c 0x000 0x17 0x000
59 79
60#define MX25_PAD_A24__A24 0x038 0x250 0x000 0x10 0x000 80#define MX25_PAD_A24__A24 0x038 0x250 0x000 0x10 0x000
61#define MX25_PAD_A24__GPIO_2_10 0x038 0x250 0x000 0x15 0x000 81#define MX25_PAD_A24__GPIO_2_10 0x038 0x250 0x000 0x15 0x000
82#define MX25_PAD_A24__SIM2_PD1 0x038 0x250 0x55c 0x16 0x000
62#define MX25_PAD_A24__FEC_RX_CLK 0x038 0x250 0x514 0x17 0x000 83#define MX25_PAD_A24__FEC_RX_CLK 0x038 0x250 0x514 0x17 0x000
63 84
64#define MX25_PAD_A25__A25 0x03c 0x254 0x000 0x10 0x000 85#define MX25_PAD_A25__A25 0x03c 0x254 0x000 0x10 0x000
@@ -133,20 +154,25 @@
133#define MX25_PAD_D15__D15 0x088 0x280 0x000 0x00 0x000 154#define MX25_PAD_D15__D15 0x088 0x280 0x000 0x00 0x000
134#define MX25_PAD_D15__LD16 0x088 0x280 0x000 0x01 0x000 155#define MX25_PAD_D15__LD16 0x088 0x280 0x000 0x01 0x000
135#define MX25_PAD_D15__GPIO_4_5 0x088 0x280 0x000 0x05 0x000 156#define MX25_PAD_D15__GPIO_4_5 0x088 0x280 0x000 0x05 0x000
157#define MX25_PAD_D15__SDHC1_DAT7 0x088 0x280 0x4d8 0x06 0x000
136 158
137#define MX25_PAD_D14__D14 0x08c 0x284 0x000 0x00 0x000 159#define MX25_PAD_D14__D14 0x08c 0x284 0x000 0x00 0x000
138#define MX25_PAD_D14__LD17 0x08c 0x284 0x000 0x01 0x000 160#define MX25_PAD_D14__LD17 0x08c 0x284 0x000 0x01 0x000
139#define MX25_PAD_D14__GPIO_4_6 0x08c 0x284 0x000 0x05 0x000 161#define MX25_PAD_D14__GPIO_4_6 0x08c 0x284 0x000 0x05 0x000
162#define MX25_PAD_D14__SDHC1_DAT6 0x08c 0x284 0x4d4 0x06 0x000
140 163
141#define MX25_PAD_D13__D13 0x090 0x288 0x000 0x00 0x000 164#define MX25_PAD_D13__D13 0x090 0x288 0x000 0x00 0x000
142#define MX25_PAD_D13__LD18 0x090 0x288 0x000 0x01 0x000 165#define MX25_PAD_D13__LD18 0x090 0x288 0x000 0x01 0x000
143#define MX25_PAD_D13__GPIO_4_7 0x090 0x288 0x000 0x05 0x000 166#define MX25_PAD_D13__GPIO_4_7 0x090 0x288 0x000 0x05 0x000
167#define MX25_PAD_D13__SDHC1_DAT5 0x090 0x288 0x4d0 0x06 0x000
144 168
145#define MX25_PAD_D12__D12 0x094 0x28c 0x000 0x00 0x000 169#define MX25_PAD_D12__D12 0x094 0x28c 0x000 0x00 0x000
146#define MX25_PAD_D12__GPIO_4_8 0x094 0x28c 0x000 0x05 0x000 170#define MX25_PAD_D12__GPIO_4_8 0x094 0x28c 0x000 0x05 0x000
171#define MX25_PAD_D12__SDHC1_DAT4 0x094 0x28c 0x4cc 0x06 0x000
147 172
148#define MX25_PAD_D11__D11 0x098 0x290 0x000 0x00 0x000 173#define MX25_PAD_D11__D11 0x098 0x290 0x000 0x00 0x000
149#define MX25_PAD_D11__GPIO_4_9 0x098 0x290 0x000 0x05 0x000 174#define MX25_PAD_D11__GPIO_4_9 0x098 0x290 0x000 0x05 0x000
175#define MX25_PAD_D11__USBOTG_PWR 0x098 0x290 0x000 0x06 0x000
150 176
151#define MX25_PAD_D10__D10 0x09c 0x294 0x000 0x00 0x000 177#define MX25_PAD_D10__D10 0x09c 0x294 0x000 0x00 0x000
152#define MX25_PAD_D10__GPIO_4_10 0x09c 0x294 0x000 0x05 0x000 178#define MX25_PAD_D10__GPIO_4_10 0x09c 0x294 0x000 0x05 0x000
@@ -212,26 +238,33 @@
212 238
213#define MX25_PAD_LD8__LD8 0x0e8 0x2e0 0x000 0x10 0x000 239#define MX25_PAD_LD8__LD8 0x0e8 0x2e0 0x000 0x10 0x000
214#define MX25_PAD_LD8__FEC_TX_ERR 0x0e8 0x2e0 0x000 0x15 0x000 240#define MX25_PAD_LD8__FEC_TX_ERR 0x0e8 0x2e0 0x000 0x15 0x000
241#define MX25_PAD_LD8__SDHC2_CMD 0x0e8 0x2e0 0x4e0 0x06 0x000
215 242
216#define MX25_PAD_LD9__LD9 0x0ec 0x2e4 0x000 0x10 0x000 243#define MX25_PAD_LD9__LD9 0x0ec 0x2e4 0x000 0x10 0x000
217#define MX25_PAD_LD9__FEC_COL 0x0ec 0x2e4 0x504 0x15 0x001 244#define MX25_PAD_LD9__FEC_COL 0x0ec 0x2e4 0x504 0x15 0x001
245#define MX25_PAD_LD9__SDHC2_CLK 0x0ec 0x2e4 0x4dc 0x06 0x000
218 246
219#define MX25_PAD_LD10__LD10 0x0f0 0x2e8 0x000 0x10 0x000 247#define MX25_PAD_LD10__LD10 0x0f0 0x2e8 0x000 0x10 0x000
220#define MX25_PAD_LD10__FEC_RX_ER 0x0f0 0x2e8 0x518 0x15 0x001 248#define MX25_PAD_LD10__FEC_RX_ERR 0x0f0 0x2e8 0x518 0x15 0x001
221 249
222#define MX25_PAD_LD11__LD11 0x0f4 0x2ec 0x000 0x10 0x000 250#define MX25_PAD_LD11__LD11 0x0f4 0x2ec 0x000 0x10 0x000
223#define MX25_PAD_LD11__FEC_RDATA2 0x0f4 0x2ec 0x50c 0x15 0x001 251#define MX25_PAD_LD11__FEC_RDATA2 0x0f4 0x2ec 0x50c 0x15 0x001
252#define MX25_PAD_LD11__SDHC2_DAT1 0x0f4 0x2ec 0x4e8 0x06 0x000
224 253
225#define MX25_PAD_LD12__LD12 0x0f8 0x2f0 0x000 0x10 0x000 254#define MX25_PAD_LD12__LD12 0x0f8 0x2f0 0x000 0x10 0x000
255#define MX25_PAD_LD12__CSPI2_MOSI 0x0f8 0x2f0 0x4a0 0x02 0x000
226#define MX25_PAD_LD12__FEC_RDATA3 0x0f8 0x2f0 0x510 0x15 0x001 256#define MX25_PAD_LD12__FEC_RDATA3 0x0f8 0x2f0 0x510 0x15 0x001
227 257
228#define MX25_PAD_LD13__LD13 0x0fc 0x2f4 0x000 0x10 0x000 258#define MX25_PAD_LD13__LD13 0x0fc 0x2f4 0x000 0x10 0x000
259#define MX25_PAD_LD13__CSPI2_MISO 0x0fc 0x2f4 0x49c 0x02 0x000
229#define MX25_PAD_LD13__FEC_TDATA2 0x0fc 0x2f4 0x000 0x15 0x000 260#define MX25_PAD_LD13__FEC_TDATA2 0x0fc 0x2f4 0x000 0x15 0x000
230 261
231#define MX25_PAD_LD14__LD14 0x100 0x2f8 0x000 0x10 0x000 262#define MX25_PAD_LD14__LD14 0x100 0x2f8 0x000 0x10 0x000
263#define MX25_PAD_LD14__CSPI2_SCLK 0x100 0x2f8 0x494 0x02 0x000
232#define MX25_PAD_LD14__FEC_TDATA3 0x100 0x2f8 0x000 0x15 0x000 264#define MX25_PAD_LD14__FEC_TDATA3 0x100 0x2f8 0x000 0x15 0x000
233 265
234#define MX25_PAD_LD15__LD15 0x104 0x2fc 0x000 0x10 0x000 266#define MX25_PAD_LD15__LD15 0x104 0x2fc 0x000 0x10 0x000
267#define MX25_PAD_LD15__CSPI2_RDY 0x104 0x2fc 0x498 0x02 0x000
235#define MX25_PAD_LD15__FEC_RX_CLK 0x104 0x2fc 0x514 0x15 0x001 268#define MX25_PAD_LD15__FEC_RX_CLK 0x104 0x2fc 0x514 0x15 0x001
236 269
237#define MX25_PAD_HSYNC__HSYNC 0x108 0x300 0x000 0x10 0x000 270#define MX25_PAD_HSYNC__HSYNC 0x108 0x300 0x000 0x10 0x000
@@ -244,6 +277,7 @@
244#define MX25_PAD_LSCLK__GPIO_1_24 0x110 0x308 0x000 0x15 0x000 277#define MX25_PAD_LSCLK__GPIO_1_24 0x110 0x308 0x000 0x15 0x000
245 278
246#define MX25_PAD_OE_ACD__OE_ACD 0x114 0x30c 0x000 0x10 0x000 279#define MX25_PAD_OE_ACD__OE_ACD 0x114 0x30c 0x000 0x10 0x000
280#define MX25_PAD_OE_ACD__CSPI2_SS0 0x114 0x30c 0x4a4 0x02 0x000
247#define MX25_PAD_OE_ACD__GPIO_1_25 0x114 0x30c 0x000 0x15 0x000 281#define MX25_PAD_OE_ACD__GPIO_1_25 0x114 0x30c 0x000 0x15 0x000
248 282
249#define MX25_PAD_CONTRAST__CONTRAST 0x118 0x310 0x000 0x10 0x000 283#define MX25_PAD_CONTRAST__CONTRAST 0x118 0x310 0x000 0x10 0x000
@@ -257,26 +291,31 @@
257 291
258#define MX25_PAD_CSI_D2__CSI_D2 0x120 0x318 0x000 0x10 0x000 292#define MX25_PAD_CSI_D2__CSI_D2 0x120 0x318 0x000 0x10 0x000
259#define MX25_PAD_CSI_D2__UART5_RXD_MUX 0x120 0x318 0x578 0x11 0x001 293#define MX25_PAD_CSI_D2__UART5_RXD_MUX 0x120 0x318 0x578 0x11 0x001
294#define MX25_PAD_CSI_D2__SIM1_CLK0 0x120 0x318 0x000 0x04 0x000
260#define MX25_PAD_CSI_D2__GPIO_1_27 0x120 0x318 0x000 0x15 0x000 295#define MX25_PAD_CSI_D2__GPIO_1_27 0x120 0x318 0x000 0x15 0x000
261#define MX25_PAD_CSI_D2__CSPI3_MOSI 0x120 0x318 0x000 0x17 0x000 296#define MX25_PAD_CSI_D2__CSPI3_MOSI 0x120 0x318 0x000 0x17 0x000
262 297
263#define MX25_PAD_CSI_D3__CSI_D3 0x124 0x31c 0x000 0x10 0x000 298#define MX25_PAD_CSI_D3__CSI_D3 0x124 0x31c 0x000 0x10 0x000
264#define MX25_PAD_CSI_D3__UART5_TXD_MUX 0x124 0x31c 0x000 0x11 0x000 299#define MX25_PAD_CSI_D3__UART5_TXD_MUX 0x124 0x31c 0x000 0x11 0x000
300#define MX25_PAD_CSI_D3__SIM1_RST0 0x124 0x31c 0x000 0x04 0x000
265#define MX25_PAD_CSI_D3__GPIO_1_28 0x124 0x31c 0x000 0x15 0x000 301#define MX25_PAD_CSI_D3__GPIO_1_28 0x124 0x31c 0x000 0x15 0x000
266#define MX25_PAD_CSI_D3__CSPI3_MISO 0x124 0x31c 0x4b4 0x17 0x001 302#define MX25_PAD_CSI_D3__CSPI3_MISO 0x124 0x31c 0x4b4 0x17 0x001
267 303
268#define MX25_PAD_CSI_D4__CSI_D4 0x128 0x320 0x000 0x10 0x000 304#define MX25_PAD_CSI_D4__CSI_D4 0x128 0x320 0x000 0x10 0x000
269#define MX25_PAD_CSI_D4__UART5_RTS 0x128 0x320 0x574 0x11 0x001 305#define MX25_PAD_CSI_D4__UART5_RTS 0x128 0x320 0x574 0x11 0x001
306#define MX25_PAD_CSI_D4__SIM1_VEN0 0x128 0x320 0x000 0x04 0x000
270#define MX25_PAD_CSI_D4__GPIO_1_29 0x128 0x320 0x000 0x15 0x000 307#define MX25_PAD_CSI_D4__GPIO_1_29 0x128 0x320 0x000 0x15 0x000
271#define MX25_PAD_CSI_D4__CSPI3_SCLK 0x128 0x320 0x000 0x17 0x000 308#define MX25_PAD_CSI_D4__CSPI3_SCLK 0x128 0x320 0x000 0x17 0x000
272 309
273#define MX25_PAD_CSI_D5__CSI_D5 0x12c 0x324 0x000 0x10 0x000 310#define MX25_PAD_CSI_D5__CSI_D5 0x12c 0x324 0x000 0x10 0x000
274#define MX25_PAD_CSI_D5__UART5_CTS 0x12c 0x324 0x000 0x11 0x001 311#define MX25_PAD_CSI_D5__UART5_CTS 0x12c 0x324 0x000 0x11 0x000
312#define MX25_PAD_CSI_D5__SIM1_TX0 0x12c 0x324 0x000 0x04 0x000
275#define MX25_PAD_CSI_D5__GPIO_1_30 0x12c 0x324 0x000 0x15 0x000 313#define MX25_PAD_CSI_D5__GPIO_1_30 0x12c 0x324 0x000 0x15 0x000
276#define MX25_PAD_CSI_D5__CSPI3_RDY 0x12c 0x324 0x000 0x17 0x000 314#define MX25_PAD_CSI_D5__CSPI3_RDY 0x12c 0x324 0x000 0x17 0x000
277 315
278#define MX25_PAD_CSI_D6__CSI_D6 0x130 0x328 0x000 0x10 0x000 316#define MX25_PAD_CSI_D6__CSI_D6 0x130 0x328 0x000 0x10 0x000
279#define MX25_PAD_CSI_D6__SDHC2_CMD 0x130 0x328 0x4e0 0x12 0x001 317#define MX25_PAD_CSI_D6__SDHC2_CMD 0x130 0x328 0x4e0 0x12 0x001
318#define MX25_PAD_CSI_D6__SIM1_PD0 0x130 0x328 0x000 0x04 0x000
280#define MX25_PAD_CSI_D6__GPIO_1_31 0x130 0x328 0x000 0x15 0x000 319#define MX25_PAD_CSI_D6__GPIO_1_31 0x130 0x328 0x000 0x15 0x000
281 320
282#define MX25_PAD_CSI_D7__CSI_D7 0x134 0x32c 0x000 0x10 0x000 321#define MX25_PAD_CSI_D7__CSI_D7 0x134 0x32c 0x000 0x10 0x000
@@ -284,32 +323,32 @@
284#define MX25_PAD_CSI_D7__GPIO_1_6 0x134 0x32c 0x000 0x15 0x000 323#define MX25_PAD_CSI_D7__GPIO_1_6 0x134 0x32c 0x000 0x15 0x000
285 324
286#define MX25_PAD_CSI_D8__CSI_D8 0x138 0x330 0x000 0x10 0x000 325#define MX25_PAD_CSI_D8__CSI_D8 0x138 0x330 0x000 0x10 0x000
287#define MX25_PAD_CSI_D8__AUD6_RXC 0x138 0x330 0x000 0x12 0x001 326#define MX25_PAD_CSI_D8__AUD6_RXC 0x138 0x330 0x000 0x12 0x000
288#define MX25_PAD_CSI_D8__GPIO_1_7 0x138 0x330 0x000 0x15 0x000 327#define MX25_PAD_CSI_D8__GPIO_1_7 0x138 0x330 0x000 0x15 0x000
289#define MX25_PAD_CSI_D8__CSPI3_SS2 0x138 0x330 0x4c4 0x17 0x000 328#define MX25_PAD_CSI_D8__CSPI3_SS2 0x138 0x330 0x4c4 0x17 0x000
290 329
291#define MX25_PAD_CSI_D9__CSI_D9 0x13c 0x334 0x000 0x10 0x000 330#define MX25_PAD_CSI_D9__CSI_D9 0x13c 0x334 0x000 0x10 0x000
292#define MX25_PAD_CSI_D9__AUD6_RXFS 0x13c 0x334 0x000 0x12 0x001 331#define MX25_PAD_CSI_D9__AUD6_RXFS 0x13c 0x334 0x000 0x12 0x000
293#define MX25_PAD_CSI_D9__GPIO_4_21 0x13c 0x334 0x000 0x15 0x000 332#define MX25_PAD_CSI_D9__GPIO_4_21 0x13c 0x334 0x000 0x15 0x000
294#define MX25_PAD_CSI_D9__CSPI3_SS3 0x13c 0x334 0x4c8 0x17 0x000 333#define MX25_PAD_CSI_D9__CSPI3_SS3 0x13c 0x334 0x4c8 0x17 0x000
295 334
296#define MX25_PAD_CSI_MCLK__CSI_MCLK 0x140 0x338 0x000 0x10 0x000 335#define MX25_PAD_CSI_MCLK__CSI_MCLK 0x140 0x338 0x000 0x10 0x000
297#define MX25_PAD_CSI_MCLK__AUD6_TXD 0x140 0x338 0x000 0x11 0x001 336#define MX25_PAD_CSI_MCLK__AUD6_TXD 0x140 0x338 0x000 0x11 0x000
298#define MX25_PAD_CSI_MCLK__SDHC2_DAT0 0x140 0x338 0x4e4 0x12 0x001 337#define MX25_PAD_CSI_MCLK__SDHC2_DAT0 0x140 0x338 0x4e4 0x12 0x001
299#define MX25_PAD_CSI_MCLK__GPIO_1_8 0x140 0x338 0x000 0x15 0x000 338#define MX25_PAD_CSI_MCLK__GPIO_1_8 0x140 0x338 0x000 0x15 0x000
300 339
301#define MX25_PAD_CSI_VSYNC__CSI_VSYNC 0x144 0x33c 0x000 0x10 0x000 340#define MX25_PAD_CSI_VSYNC__CSI_VSYNC 0x144 0x33c 0x000 0x10 0x000
302#define MX25_PAD_CSI_VSYNC__AUD6_RXD 0x144 0x33c 0x000 0x11 0x001 341#define MX25_PAD_CSI_VSYNC__AUD6_RXD 0x144 0x33c 0x000 0x11 0x000
303#define MX25_PAD_CSI_VSYNC__SDHC2_DAT1 0x144 0x33c 0x4e8 0x12 0x001 342#define MX25_PAD_CSI_VSYNC__SDHC2_DAT1 0x144 0x33c 0x4e8 0x12 0x001
304#define MX25_PAD_CSI_VSYNC__GPIO_1_9 0x144 0x33c 0x000 0x15 0x000 343#define MX25_PAD_CSI_VSYNC__GPIO_1_9 0x144 0x33c 0x000 0x15 0x000
305 344
306#define MX25_PAD_CSI_HSYNC__CSI_HSYNC 0x148 0x340 0x000 0x10 0x000 345#define MX25_PAD_CSI_HSYNC__CSI_HSYNC 0x148 0x340 0x000 0x10 0x000
307#define MX25_PAD_CSI_HSYNC__AUD6_TXC 0x148 0x340 0x000 0x11 0x001 346#define MX25_PAD_CSI_HSYNC__AUD6_TXC 0x148 0x340 0x000 0x11 0x000
308#define MX25_PAD_CSI_HSYNC__SDHC2_DAT2 0x148 0x340 0x4ec 0x12 0x001 347#define MX25_PAD_CSI_HSYNC__SDHC2_DAT2 0x148 0x340 0x4ec 0x12 0x001
309#define MX25_PAD_CSI_HSYNC__GPIO_1_10 0x148 0x340 0x000 0x15 0x000 348#define MX25_PAD_CSI_HSYNC__GPIO_1_10 0x148 0x340 0x000 0x15 0x000
310 349
311#define MX25_PAD_CSI_PIXCLK__CSI_PIXCLK 0x14c 0x344 0x000 0x10 0x000 350#define MX25_PAD_CSI_PIXCLK__CSI_PIXCLK 0x14c 0x344 0x000 0x10 0x000
312#define MX25_PAD_CSI_PIXCLK__AUD6_TXFS 0x14c 0x344 0x000 0x11 0x001 351#define MX25_PAD_CSI_PIXCLK__AUD6_TXFS 0x14c 0x344 0x000 0x11 0x000
313#define MX25_PAD_CSI_PIXCLK__SDHC2_DAT3 0x14c 0x344 0x4f0 0x12 0x001 352#define MX25_PAD_CSI_PIXCLK__SDHC2_DAT3 0x14c 0x344 0x4f0 0x12 0x001
314#define MX25_PAD_CSI_PIXCLK__GPIO_1_11 0x14c 0x344 0x000 0x15 0x000 353#define MX25_PAD_CSI_PIXCLK__GPIO_1_11 0x14c 0x344 0x000 0x15 0x000
315 354
@@ -369,8 +408,8 @@
369#define MX25_PAD_UART2_RTS__CC1 0x188 0x380 0x000 0x13 0x000 408#define MX25_PAD_UART2_RTS__CC1 0x188 0x380 0x000 0x13 0x000
370#define MX25_PAD_UART2_RTS__GPIO_4_28 0x188 0x380 0x000 0x15 0x000 409#define MX25_PAD_UART2_RTS__GPIO_4_28 0x188 0x380 0x000 0x15 0x000
371 410
372#define MX25_PAD_UART2_CTS__FEC_RX_ER 0x18c 0x384 0x518 0x12 0x002
373#define MX25_PAD_UART2_CTS__UART2_CTS 0x18c 0x384 0x000 0x10 0x000 411#define MX25_PAD_UART2_CTS__UART2_CTS 0x18c 0x384 0x000 0x10 0x000
412#define MX25_PAD_UART2_CTS__FEC_RX_ERR 0x18c 0x384 0x518 0x12 0x002
374#define MX25_PAD_UART2_CTS__GPIO_4_29 0x18c 0x384 0x000 0x15 0x000 413#define MX25_PAD_UART2_CTS__GPIO_4_29 0x18c 0x384 0x000 0x15 0x000
375 414
376#define MX25_PAD_SD1_CMD__SD1_CMD 0x190 0x388 0x000 0x10 0x000 415#define MX25_PAD_SD1_CMD__SD1_CMD 0x190 0x388 0x000 0x10 0x000
@@ -392,11 +431,11 @@
392#define MX25_PAD_SD1_DATA1__GPIO_2_26 0x19c 0x394 0x000 0x15 0x000 431#define MX25_PAD_SD1_DATA1__GPIO_2_26 0x19c 0x394 0x000 0x15 0x000
393 432
394#define MX25_PAD_SD1_DATA2__SD1_DATA2 0x1a0 0x398 0x000 0x10 0x000 433#define MX25_PAD_SD1_DATA2__SD1_DATA2 0x1a0 0x398 0x000 0x10 0x000
395#define MX25_PAD_SD1_DATA2__FEC_RX_CLK 0x1a0 0x398 0x514 0x15 0x002 434#define MX25_PAD_SD1_DATA2__FEC_RX_CLK 0x1a0 0x398 0x514 0x12 0x002
396#define MX25_PAD_SD1_DATA2__GPIO_2_27 0x1a0 0x398 0x000 0x15 0x000 435#define MX25_PAD_SD1_DATA2__GPIO_2_27 0x1a0 0x398 0x000 0x15 0x000
397 436
398#define MX25_PAD_SD1_DATA3__SD1_DATA3 0x1a4 0x39c 0x000 0x10 0x000 437#define MX25_PAD_SD1_DATA3__SD1_DATA3 0x1a4 0x39c 0x000 0x10 0x000
399#define MX25_PAD_SD1_DATA3__FEC_CRS 0x1a4 0x39c 0x508 0x10 0x002 438#define MX25_PAD_SD1_DATA3__FEC_CRS 0x1a4 0x39c 0x508 0x12 0x002
400#define MX25_PAD_SD1_DATA3__GPIO_2_28 0x1a4 0x39c 0x000 0x15 0x000 439#define MX25_PAD_SD1_DATA3__GPIO_2_28 0x1a4 0x39c 0x000 0x15 0x000
401 440
402#define MX25_PAD_KPP_ROW0__KPP_ROW0 0x1a8 0x3a0 0x000 0x10 0x000 441#define MX25_PAD_KPP_ROW0__KPP_ROW0 0x1a8 0x3a0 0x000 0x10 0x000
@@ -410,7 +449,7 @@
410#define MX25_PAD_KPP_ROW2__GPIO_2_31 0x1b0 0x3a8 0x000 0x15 0x000 449#define MX25_PAD_KPP_ROW2__GPIO_2_31 0x1b0 0x3a8 0x000 0x15 0x000
411 450
412#define MX25_PAD_KPP_ROW3__KPP_ROW3 0x1b4 0x3ac 0x000 0x10 0x000 451#define MX25_PAD_KPP_ROW3__KPP_ROW3 0x1b4 0x3ac 0x000 0x10 0x000
413#define MX25_PAD_KPP_ROW3__CSI_LD1 0x1b4 0x3ac 0x48c 0x13 0x002 452#define MX25_PAD_KPP_ROW3__CSI_D1 0x1b4 0x3ac 0x48c 0x13 0x002
414#define MX25_PAD_KPP_ROW3__GPIO_3_0 0x1b4 0x3ac 0x000 0x15 0x000 453#define MX25_PAD_KPP_ROW3__GPIO_3_0 0x1b4 0x3ac 0x000 0x15 0x000
415 454
416#define MX25_PAD_KPP_COL0__KPP_COL0 0x1b8 0x3b0 0x000 0x10 0x000 455#define MX25_PAD_KPP_COL0__KPP_COL0 0x1b8 0x3b0 0x000 0x10 0x000
@@ -455,9 +494,18 @@
455#define MX25_PAD_FEC_RDATA0__GPIO_3_10 0x1dc 0x3d4 0x000 0x15 0x000 494#define MX25_PAD_FEC_RDATA0__GPIO_3_10 0x1dc 0x3d4 0x000 0x15 0x000
456 495
457#define MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x1e0 0x3d8 0x000 0x10 0x000 496#define MX25_PAD_FEC_RDATA1__FEC_RDATA1 0x1e0 0x3d8 0x000 0x10 0x000
497/*
498 * According to the i.MX25 Reference manual (IMX25RM, Rev. 2,
499 * 01/2011) this is CAN1_TX but that's wrong.
500 */
501#define MX25_PAD_FEC_RDATA1__CAN2_TX 0x1e0 0x3d8 0x000 0x14 0x000
458#define MX25_PAD_FEC_RDATA1__GPIO_3_11 0x1e0 0x3d8 0x000 0x15 0x000 502#define MX25_PAD_FEC_RDATA1__GPIO_3_11 0x1e0 0x3d8 0x000 0x15 0x000
459 503
460#define MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x1e4 0x3dc 0x000 0x10 0x000 504#define MX25_PAD_FEC_RX_DV__FEC_RX_DV 0x1e4 0x3dc 0x000 0x10 0x000
505/*
506 * According to the i.MX25 Reference manual (IMX25RM, Rev. 2,
507 * 01/2011) this is CAN1_RX but that's wrong.
508 */
461#define MX25_PAD_FEC_RX_DV__CAN2_RX 0x1e4 0x3dc 0x484 0x14 0x000 509#define MX25_PAD_FEC_RX_DV__CAN2_RX 0x1e4 0x3dc 0x484 0x14 0x000
462#define MX25_PAD_FEC_RX_DV__GPIO_3_12 0x1e4 0x3dc 0x000 0x15 0x000 510#define MX25_PAD_FEC_RX_DV__GPIO_3_12 0x1e4 0x3dc 0x000 0x15 0x000
463 511
@@ -471,30 +519,34 @@
471#define MX25_PAD_DE_B__DE_B 0x1f0 0x3ec 0x000 0x10 0x000 519#define MX25_PAD_DE_B__DE_B 0x1f0 0x3ec 0x000 0x10 0x000
472#define MX25_PAD_DE_B__GPIO_2_20 0x1f0 0x3ec 0x000 0x15 0x000 520#define MX25_PAD_DE_B__GPIO_2_20 0x1f0 0x3ec 0x000 0x15 0x000
473 521
474#define MX25_PAD_TDO__TDO 0x000 0x3e8 0x000 0x00 0x000
475
476#define MX25_PAD_GPIO_A__GPIO_A 0x1f4 0x3f0 0x000 0x10 0x000 522#define MX25_PAD_GPIO_A__GPIO_A 0x1f4 0x3f0 0x000 0x10 0x000
477#define MX25_PAD_GPIO_A__CAN1_TX 0x1f4 0x3f0 0x000 0x16 0x000 523#define MX25_PAD_GPIO_A__CAN1_TX 0x1f4 0x3f0 0x000 0x16 0x000
478#define MX25_PAD_GPIO_A__USBOTG_PWR 0x1f4 0x3f0 0x000 0x12 0x000 524#define MX25_PAD_GPIO_A__USBOTG_PWR 0x1f4 0x3f0 0x000 0x12 0x000
479 525
480#define MX25_PAD_GPIO_B__GPIO_B 0x1f8 0x3f4 0x000 0x10 0x000 526#define MX25_PAD_GPIO_B__GPIO_B 0x1f8 0x3f4 0x000 0x10 0x000
481#define MX25_PAD_GPIO_B__CAN1_RX 0x1f8 0x3f4 0x480 0x16 0x001
482#define MX25_PAD_GPIO_B__USBOTG_OC 0x1f8 0x3f4 0x57c 0x12 0x001 527#define MX25_PAD_GPIO_B__USBOTG_OC 0x1f8 0x3f4 0x57c 0x12 0x001
528#define MX25_PAD_GPIO_B__CAN1_RX 0x1f8 0x3f4 0x480 0x16 0x001
483 529
484#define MX25_PAD_GPIO_C__GPIO_C 0x1fc 0x3f8 0x000 0x10 0x000 530#define MX25_PAD_GPIO_C__GPIO_C 0x1fc 0x3f8 0x000 0x10 0x000
531#define MX25_PAD_GPIO_C__PWM4_PWMO 0x1fc 0x3f8 0x000 0x11 0x000
532#define MX25_PAD_GPIO_C__I2C2_SCL 0x1fc 0x3f8 0x51c 0x12 0x001
533#define MX25_PAD_GPIO_C__KPP_COL4 0x1fc 0x3f8 0x52c 0x13 0x001
485#define MX25_PAD_GPIO_C__CAN2_TX 0x1fc 0x3f8 0x000 0x16 0x000 534#define MX25_PAD_GPIO_C__CAN2_TX 0x1fc 0x3f8 0x000 0x16 0x000
486 535
487#define MX25_PAD_GPIO_D__GPIO_D 0x200 0x3fc 0x000 0x10 0x000 536#define MX25_PAD_GPIO_D__GPIO_D 0x200 0x3fc 0x000 0x10 0x000
537#define MX25_PAD_GPIO_D__I2C2_SDA 0x200 0x3fc 0x520 0x12 0x001
488#define MX25_PAD_GPIO_D__CAN2_RX 0x200 0x3fc 0x484 0x16 0x001 538#define MX25_PAD_GPIO_D__CAN2_RX 0x200 0x3fc 0x484 0x16 0x001
489 539
490#define MX25_PAD_GPIO_E__GPIO_E 0x204 0x400 0x000 0x10 0x000 540#define MX25_PAD_GPIO_E__GPIO_E 0x204 0x400 0x000 0x10 0x000
491#define MX25_PAD_GPIO_E__I2C3_CLK 0x204 0x400 0x524 0x11 0x002 541#define MX25_PAD_GPIO_E__I2C3_CLK 0x204 0x400 0x524 0x11 0x002
492#define MX25_PAD_GPIO_E__LD16 0x204 0x400 0x000 0x12 0x000 542#define MX25_PAD_GPIO_E__LD16 0x204 0x400 0x000 0x12 0x000
493#define MX25_PAD_GPIO_E__AUD7_TXD 0x204 0x400 0x000 0x14 0x000 543#define MX25_PAD_GPIO_E__AUD7_TXD 0x204 0x400 0x000 0x14 0x000
544#define MX25_PAD_GPIO_E__UART4_RXD 0x204 0x400 0x570 0x16 0x002
494 545
495#define MX25_PAD_GPIO_F__GPIO_F 0x208 0x404 0x000 0x10 0x000 546#define MX25_PAD_GPIO_F__GPIO_F 0x208 0x404 0x000 0x10 0x000
496#define MX25_PAD_GPIO_F__LD17 0x208 0x404 0x000 0x12 0x000 547#define MX25_PAD_GPIO_F__LD17 0x208 0x404 0x000 0x12 0x000
497#define MX25_PAD_GPIO_F__AUD7_TXC 0x208 0x404 0x000 0x14 0x000 548#define MX25_PAD_GPIO_F__AUD7_TXC 0x208 0x404 0x000 0x14 0x000
549#define MX25_PAD_GPIO_F__UART4_TXD 0x208 0x404 0x000 0x16 0x000
498 550
499#define MX25_PAD_EXT_ARMCLK__EXT_ARMCLK 0x20c 0x000 0x000 0x10 0x000 551#define MX25_PAD_EXT_ARMCLK__EXT_ARMCLK 0x20c 0x000 0x000 0x10 0x000
500#define MX25_PAD_EXT_ARMCLK__GPIO_3_15 0x20c 0x000 0x000 0x15 0x000 552#define MX25_PAD_EXT_ARMCLK__GPIO_3_15 0x20c 0x000 0x000 0x15 0x000
@@ -505,6 +557,7 @@
505#define MX25_PAD_VSTBY_REQ__VSTBY_REQ 0x214 0x408 0x000 0x10 0x000 557#define MX25_PAD_VSTBY_REQ__VSTBY_REQ 0x214 0x408 0x000 0x10 0x000
506#define MX25_PAD_VSTBY_REQ__AUD7_TXFS 0x214 0x408 0x000 0x14 0x000 558#define MX25_PAD_VSTBY_REQ__AUD7_TXFS 0x214 0x408 0x000 0x14 0x000
507#define MX25_PAD_VSTBY_REQ__GPIO_3_17 0x214 0x408 0x000 0x15 0x000 559#define MX25_PAD_VSTBY_REQ__GPIO_3_17 0x214 0x408 0x000 0x15 0x000
560
508#define MX25_PAD_VSTBY_ACK__VSTBY_ACK 0x218 0x40c 0x000 0x10 0x000 561#define MX25_PAD_VSTBY_ACK__VSTBY_ACK 0x218 0x40c 0x000 0x10 0x000
509#define MX25_PAD_VSTBY_ACK__GPIO_3_18 0x218 0x40c 0x000 0x15 0x000 562#define MX25_PAD_VSTBY_ACK__GPIO_3_18 0x218 0x40c 0x000 0x15 0x000
510 563
@@ -517,6 +570,7 @@
517 570
518#define MX25_PAD_BOOT_MODE0__BOOT_MODE0 0x224 0x000 0x000 0x00 0x000 571#define MX25_PAD_BOOT_MODE0__BOOT_MODE0 0x224 0x000 0x000 0x00 0x000
519#define MX25_PAD_BOOT_MODE0__GPIO_4_30 0x224 0x000 0x000 0x05 0x000 572#define MX25_PAD_BOOT_MODE0__GPIO_4_30 0x224 0x000 0x000 0x05 0x000
573
520#define MX25_PAD_BOOT_MODE1__BOOT_MODE1 0x228 0x000 0x000 0x00 0x000 574#define MX25_PAD_BOOT_MODE1__BOOT_MODE1 0x228 0x000 0x000 0x00 0x000
521#define MX25_PAD_BOOT_MODE1__GPIO_4_31 0x228 0x000 0x000 0x05 0x000 575#define MX25_PAD_BOOT_MODE1__GPIO_4_31 0x228 0x000 0x000 0x05 0x000
522 576
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 4b063b68db44..6951b66d1ab7 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -488,6 +488,7 @@
488 interrupts = <54>; 488 interrupts = <54>;
489 clocks = <&clks IMX27_CLK_USB_IPG_GATE>; 489 clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
490 fsl,usbmisc = <&usbmisc 1>; 490 fsl,usbmisc = <&usbmisc 1>;
491 dr_mode = "host";
491 status = "disabled"; 492 status = "disabled";
492 }; 493 };
493 494
@@ -497,6 +498,7 @@
497 interrupts = <55>; 498 interrupts = <55>;
498 clocks = <&clks IMX27_CLK_USB_IPG_GATE>; 499 clocks = <&clks IMX27_CLK_USB_IPG_GATE>;
499 fsl,usbmisc = <&usbmisc 2>; 500 fsl,usbmisc = <&usbmisc 2>;
501 dr_mode = "host";
500 status = "disabled"; 502 status = "disabled";
501 }; 503 };
502 504
diff --git a/arch/arm/boot/dts/imx28-apf28.dts b/arch/arm/boot/dts/imx28-apf28.dts
index 7198fe3798c6..070e59cbdd8b 100644
--- a/arch/arm/boot/dts/imx28-apf28.dts
+++ b/arch/arm/boot/dts/imx28-apf28.dts
@@ -78,7 +78,7 @@
78 phy-mode = "rmii"; 78 phy-mode = "rmii";
79 pinctrl-names = "default"; 79 pinctrl-names = "default";
80 pinctrl-0 = <&mac0_pins_a>; 80 pinctrl-0 = <&mac0_pins_a>;
81 phy-reset-gpios = <&gpio4 13 0>; 81 phy-reset-gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;
82 status = "okay"; 82 status = "okay";
83 }; 83 };
84 }; 84 };
diff --git a/arch/arm/boot/dts/imx28-apf28dev.dts b/arch/arm/boot/dts/imx28-apf28dev.dts
index 1f38a052ad4b..7ac4f1af16ac 100644
--- a/arch/arm/boot/dts/imx28-apf28dev.dts
+++ b/arch/arm/boot/dts/imx28-apf28dev.dts
@@ -110,6 +110,13 @@
110 }; 110 };
111 }; 111 };
112 }; 112 };
113
114 can0: can@80032000 {
115 pinctrl-names = "default";
116 pinctrl-0 = <&can0_pins_a>;
117 xceiver-supply = <&reg_can0_vcc>;
118 status = "okay";
119 };
113 }; 120 };
114 121
115 apbx@80040000 { 122 apbx@80040000 {
@@ -130,6 +137,13 @@
130 status = "okay"; 137 status = "okay";
131 }; 138 };
132 139
140 auart0: serial@8006a000 {
141 pinctrl-names = "default";
142 pinctrl-0 = <&auart0_pins_a>;
143 fsl,uart-has-rtscts;
144 status = "okay";
145 };
146
133 usbphy0: usbphy@8007c000 { 147 usbphy0: usbphy@8007c000 {
134 status = "okay"; 148 status = "okay";
135 }; 149 };
@@ -143,7 +157,8 @@
143 ahb@80080000 { 157 ahb@80080000 {
144 usb0: usb@80080000 { 158 usb0: usb@80080000 {
145 pinctrl-names = "default"; 159 pinctrl-names = "default";
146 pinctrl-0 = <&usb0_otg_apf28dev>; 160 pinctrl-0 = <&usb0_otg_apf28dev
161 &usb0_id_pins_b>;
147 vbus-supply = <&reg_usb0_vbus>; 162 vbus-supply = <&reg_usb0_vbus>;
148 status = "okay"; 163 status = "okay";
149 }; 164 };
@@ -156,7 +171,7 @@
156 phy-mode = "rmii"; 171 phy-mode = "rmii";
157 pinctrl-names = "default"; 172 pinctrl-names = "default";
158 pinctrl-0 = <&mac1_pins_a>; 173 pinctrl-0 = <&mac1_pins_a>;
159 phy-reset-gpios = <&gpio0 23 0>; 174 phy-reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
160 status = "okay"; 175 status = "okay";
161 }; 176 };
162 }; 177 };
@@ -175,6 +190,14 @@
175 gpio = <&gpio1 23 1>; 190 gpio = <&gpio1 23 1>;
176 enable-active-high; 191 enable-active-high;
177 }; 192 };
193
194 reg_can0_vcc: regulator@1 {
195 compatible = "regulator-fixed";
196 reg = <1>;
197 regulator-name = "can0_vcc";
198 regulator-min-microvolt = <5000000>;
199 regulator-max-microvolt = <5000000>;
200 };
178 }; 201 };
179 202
180 leds { 203 leds {
@@ -200,8 +223,9 @@
200 223
201 user-button { 224 user-button {
202 label = "User button"; 225 label = "User button";
203 gpios = <&gpio0 17 0>; 226 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
204 linux,code = <0x100>; 227 linux,code = <0x100>;
228 gpio-key,wakeup;
205 }; 229 };
206 }; 230 };
207}; 231};
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 47f68ac868d4..25e25f82fbae 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -829,6 +829,19 @@
829 fsl,pull-up = <MXS_PULL_DISABLE>; 829 fsl,pull-up = <MXS_PULL_DISABLE>;
830 }; 830 };
831 831
832 spi3_pins_b: spi3@1 {
833 reg = <1>;
834 fsl,pinmux-ids = <
835 MX28_PAD_SSP3_SCK__SSP3_SCK
836 MX28_PAD_SSP3_MOSI__SSP3_CMD
837 MX28_PAD_SSP3_MISO__SSP3_D0
838 MX28_PAD_SSP3_SS0__SSP3_D3
839 >;
840 fsl,drive-strength = <MXS_DRIVE_8mA>;
841 fsl,voltage = <MXS_VOLTAGE_HIGH>;
842 fsl,pull-up = <MXS_PULL_ENABLE>;
843 };
844
832 usb0_pins_a: usb0@0 { 845 usb0_pins_a: usb0@0 {
833 reg = <0>; 846 reg = <0>;
834 fsl,pinmux-ids = < 847 fsl,pinmux-ids = <
@@ -1197,6 +1210,7 @@
1197 interrupts = <92>; 1210 interrupts = <92>;
1198 clocks = <&clks 61>; 1211 clocks = <&clks 61>;
1199 fsl,usbphy = <&usbphy1>; 1212 fsl,usbphy = <&usbphy1>;
1213 dr_mode = "host";
1200 status = "disabled"; 1214 status = "disabled";
1201 }; 1215 };
1202 1216
diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index 6932928f3b45..b6478e97d6a7 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -318,6 +318,7 @@
318 clocks = <&clks 73>; 318 clocks = <&clks 73>;
319 fsl,usbmisc = <&usbmisc 1>; 319 fsl,usbmisc = <&usbmisc 1>;
320 fsl,usbphy = <&usbphy1>; 320 fsl,usbphy = <&usbphy1>;
321 dr_mode = "host";
321 status = "disabled"; 322 status = "disabled";
322 }; 323 };
323 324
diff --git a/arch/arm/boot/dts/imx50.dtsi b/arch/arm/boot/dts/imx50.dtsi
index 620b0f030591..e2457138311f 100644
--- a/arch/arm/boot/dts/imx50.dtsi
+++ b/arch/arm/boot/dts/imx50.dtsi
@@ -197,6 +197,7 @@
197 reg = <0x53f80200 0x0200>; 197 reg = <0x53f80200 0x0200>;
198 interrupts = <14>; 198 interrupts = <14>;
199 clocks = <&clks IMX5_CLK_USB_PHY2_GATE>; 199 clocks = <&clks IMX5_CLK_USB_PHY2_GATE>;
200 dr_mode = "host";
200 status = "disabled"; 201 status = "disabled";
201 }; 202 };
202 203
@@ -205,6 +206,7 @@
205 reg = <0x53f80400 0x0200>; 206 reg = <0x53f80400 0x0200>;
206 interrupts = <16>; 207 interrupts = <16>;
207 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 208 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
209 dr_mode = "host";
208 status = "disabled"; 210 status = "disabled";
209 }; 211 };
210 212
@@ -213,6 +215,7 @@
213 reg = <0x53f80600 0x0200>; 215 reg = <0x53f80600 0x0200>;
214 interrupts = <17>; 216 interrupts = <17>;
215 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 217 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
218 dr_mode = "host";
216 status = "disabled"; 219 status = "disabled";
217 }; 220 };
218 221
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index c0116cffc513..f46fe9bf0bcb 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -265,6 +265,7 @@
265 interrupts = <14>; 265 interrupts = <14>;
266 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 266 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
267 fsl,usbmisc = <&usbmisc 1>; 267 fsl,usbmisc = <&usbmisc 1>;
268 dr_mode = "host";
268 status = "disabled"; 269 status = "disabled";
269 }; 270 };
270 271
@@ -274,6 +275,7 @@
274 interrupts = <16>; 275 interrupts = <16>;
275 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 276 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
276 fsl,usbmisc = <&usbmisc 2>; 277 fsl,usbmisc = <&usbmisc 2>;
278 dr_mode = "host";
277 status = "disabled"; 279 status = "disabled";
278 }; 280 };
279 281
@@ -283,6 +285,7 @@
283 interrupts = <17>; 285 interrupts = <17>;
284 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 286 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
285 fsl,usbmisc = <&usbmisc 3>; 287 fsl,usbmisc = <&usbmisc 3>;
288 dr_mode = "host";
286 status = "disabled"; 289 status = "disabled";
287 }; 290 };
288 291
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index ff4fa7ecacd8..c3e3ca9362fb 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -309,6 +309,7 @@
309 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 309 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
310 fsl,usbmisc = <&usbmisc 1>; 310 fsl,usbmisc = <&usbmisc 1>;
311 fsl,usbphy = <&usbphy1>; 311 fsl,usbphy = <&usbphy1>;
312 dr_mode = "host";
312 status = "disabled"; 313 status = "disabled";
313 }; 314 };
314 315
@@ -318,6 +319,7 @@
318 interrupts = <16>; 319 interrupts = <16>;
319 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 320 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
320 fsl,usbmisc = <&usbmisc 2>; 321 fsl,usbmisc = <&usbmisc 2>;
322 dr_mode = "host";
321 status = "disabled"; 323 status = "disabled";
322 }; 324 };
323 325
@@ -327,6 +329,7 @@
327 interrupts = <17>; 329 interrupts = <17>;
328 clocks = <&clks IMX5_CLK_USBOH3_GATE>; 330 clocks = <&clks IMX5_CLK_USBOH3_GATE>;
329 fsl,usbmisc = <&usbmisc 3>; 331 fsl,usbmisc = <&usbmisc 3>;
332 dr_mode = "host";
330 status = "disabled"; 333 status = "disabled";
331 }; 334 };
332 335
diff --git a/arch/arm/boot/dts/imx6dl-aristainetos_4.dts b/arch/arm/boot/dts/imx6dl-aristainetos_4.dts
index 9cd06e5e59f0..d4c4a22db488 100644
--- a/arch/arm/boot/dts/imx6dl-aristainetos_4.dts
+++ b/arch/arm/boot/dts/imx6dl-aristainetos_4.dts
@@ -83,3 +83,7 @@
83&ipu1_di0_disp0 { 83&ipu1_di0_disp0 {
84 remote-endpoint = <&display0_in>; 84 remote-endpoint = <&display0_in>;
85}; 85};
86
87&pwm1 {
88 status = "okay";
89};
diff --git a/arch/arm/boot/dts/imx6dl-aristainetos_7.dts b/arch/arm/boot/dts/imx6dl-aristainetos_7.dts
index b413e24288dc..15203f0e9725 100644
--- a/arch/arm/boot/dts/imx6dl-aristainetos_7.dts
+++ b/arch/arm/boot/dts/imx6dl-aristainetos_7.dts
@@ -72,3 +72,7 @@
72&ipu1_di0_disp0 { 72&ipu1_di0_disp0 {
73 remote-endpoint = <&display0_in>; 73 remote-endpoint = <&display0_in>;
74}; 74};
75
76&pwm3 {
77 status = "okay";
78};
diff --git a/arch/arm/boot/dts/imx6dl-cubox-i.dts b/arch/arm/boot/dts/imx6dl-cubox-i.dts
index 58aa8f2b0f26..e0b7fe8e18f8 100644
--- a/arch/arm/boot/dts/imx6dl-cubox-i.dts
+++ b/arch/arm/boot/dts/imx6dl-cubox-i.dts
@@ -1,5 +1,43 @@
1/* 1/*
2 * Copyright (C) 2014 Russell King 2 * Copyright (C) 2014 Russell King
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License.
13 *
14 * This file is distributed in the hope that it will be useful
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
3 */ 41 */
4/dts-v1/; 42/dts-v1/;
5 43
diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts
index 44a0e6736bb1..7369d2d7da3e 100644
--- a/arch/arm/boot/dts/imx6dl-hummingboard.dts
+++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts
@@ -1,6 +1,44 @@
1/* 1/*
2 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com) 2 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
3 * Based on dt work by Russell King 3 * Based on dt work by Russell King
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License.
14 *
15 * This file is distributed in the hope that it will be useful
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
4 */ 42 */
5/dts-v1/; 43/dts-v1/;
6 44
diff --git a/arch/arm/boot/dts/imx6q-cubox-i.dts b/arch/arm/boot/dts/imx6q-cubox-i.dts
index 9efd8b0c8011..670bd8c4c847 100644
--- a/arch/arm/boot/dts/imx6q-cubox-i.dts
+++ b/arch/arm/boot/dts/imx6q-cubox-i.dts
@@ -1,5 +1,43 @@
1/* 1/*
2 * Copyright (C) 2014 Russell King 2 * Copyright (C) 2014 Russell King
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License.
13 *
14 * This file is distributed in the hope that it will be useful
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
3 */ 41 */
4/dts-v1/; 42/dts-v1/;
5 43
diff --git a/arch/arm/boot/dts/imx6q-hummingboard.dts b/arch/arm/boot/dts/imx6q-hummingboard.dts
index c2bf8476ce45..0f6044553a24 100644
--- a/arch/arm/boot/dts/imx6q-hummingboard.dts
+++ b/arch/arm/boot/dts/imx6q-hummingboard.dts
@@ -1,6 +1,44 @@
1/* 1/*
2 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com) 2 * Copyright (C) 2014 Rabeeh Khoury (rabeeh@solid-run.com)
3 * Based on dt work by Russell King 3 * Based on dt work by Russell King
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 * a) This file is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License.
14 *
15 * This file is distributed in the hope that it will be useful
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * Or, alternatively
21 *
22 * b) Permission is hereby granted, free of charge, to any person
23 * obtaining a copy of this software and associated documentation
24 * files (the "Software"), to deal in the Software without
25 * restriction, including without limitation the rights to use
26 * copy, modify, merge, publish, distribute, sublicense, and/or
27 * sell copies of the Software, and to permit persons to whom the
28 * Software is furnished to do so, subject to the following
29 * conditions:
30 *
31 * The above copyright notice and this permission notice shall be
32 * included in all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
35 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
36 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
38 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
39 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41 * OTHER DEALINGS IN THE SOFTWARE.
4 */ 42 */
5/dts-v1/; 43/dts-v1/;
6 44
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 93ec79bb6b35..399103b8e2c9 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -294,19 +294,21 @@
294}; 294};
295 295
296&mipi_dsi { 296&mipi_dsi {
297 port@2 { 297 ports {
298 reg = <2>; 298 port@2 {
299 reg = <2>;
299 300
300 mipi_mux_2: endpoint { 301 mipi_mux_2: endpoint {
301 remote-endpoint = <&ipu2_di0_mipi>; 302 remote-endpoint = <&ipu2_di0_mipi>;
303 };
302 }; 304 };
303 };
304 305
305 port@3 { 306 port@3 {
306 reg = <3>; 307 reg = <3>;
307 308
308 mipi_mux_3: endpoint { 309 mipi_mux_3: endpoint {
309 remote-endpoint = <&ipu2_di1_mipi>; 310 remote-endpoint = <&ipu2_di1_mipi>;
311 };
310 }; 312 };
311 }; 313 };
312}; 314};
diff --git a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
index 6a524ca011e7..d033bb182060 100644
--- a/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-cubox-i.dtsi
@@ -1,8 +1,48 @@
1/* 1/*
2 * Copyright (C) 2014 Russell King 2 * Copyright (C) 2014 Russell King
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License.
13 *
14 * This file is distributed in the hope that it will be useful
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
3 */ 41 */
4#include "imx6qdl-microsom.dtsi" 42#include "imx6qdl-microsom.dtsi"
5#include "imx6qdl-microsom-ar8035.dtsi" 43#include "imx6qdl-microsom-ar8035.dtsi"
44#include <dt-bindings/input/input.h>
45#include <dt-bindings/gpio/gpio.h>
6 46
7/ { 47/ {
8 ir_recv: ir-receiver { 48 ir_recv: ir-receiver {
@@ -66,6 +106,18 @@
66 spdif-controller = <&spdif>; 106 spdif-controller = <&spdif>;
67 spdif-out; 107 spdif-out;
68 }; 108 };
109
110 gpio-keys {
111 compatible = "gpio-keys";
112 pinctrl-0 = <&pinctrl_gpio_key>;
113 pinctrl-names = "default";
114
115 button_0 {
116 label = "Button 0";
117 gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
118 linux,code = <BTN_0>;
119 };
120 };
69}; 121};
70 122
71&hdmi { 123&hdmi {
@@ -170,9 +222,19 @@
170 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059 222 MX6QDL_PAD_SD2_DAT3__SD2_DATA3 0x13059
171 >; 223 >;
172 }; 224 };
225
226 pinctrl_gpio_key: gpio-key {
227 fsl,pins = <
228 MX6QDL_PAD_EIM_DA8__GPIO3_IO08 0x17059
229 >;
230 };
173 }; 231 };
174}; 232};
175 233
234&pwm1 {
235 status = "okay";
236};
237
176&spdif { 238&spdif {
177 pinctrl-names = "default"; 239 pinctrl-names = "default";
178 pinctrl-0 = <&pinctrl_cubox_i_spdif>; 240 pinctrl-0 = <&pinctrl_cubox_i_spdif>;
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
index 62841e85a91e..151a3db2aea9 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
@@ -1,5 +1,43 @@
1/* 1/*
2 * Copyright (C) 2013,2014 Russell King 2 * Copyright (C) 2013,2014 Russell King
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License.
13 *
14 * This file is distributed in the hope that it will be useful
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
3 */ 41 */
4#include "imx6qdl-microsom.dtsi" 42#include "imx6qdl-microsom.dtsi"
5#include "imx6qdl-microsom-ar8035.dtsi" 43#include "imx6qdl-microsom-ar8035.dtsi"
@@ -50,6 +88,19 @@
50 }; 88 };
51 }; 89 };
52 90
91 sound-sgtl5000 {
92 audio-codec = <&sgtl5000>;
93 audio-routing =
94 "MIC_IN", "Mic Jack",
95 "Mic Jack", "Mic Bias",
96 "Headphone Jack", "HP_OUT";
97 compatible = "fsl,imx-audio-sgtl5000";
98 model = "On-board Codec";
99 mux-ext-port = <5>;
100 mux-int-port = <1>;
101 ssi-controller = <&ssi1>;
102 };
103
53 sound-spdif { 104 sound-spdif {
54 compatible = "fsl,imx-audio-spdif"; 105 compatible = "fsl,imx-audio-spdif";
55 model = "On-board SPDIF"; 106 model = "On-board SPDIF";
@@ -59,6 +110,10 @@
59 }; 110 };
60}; 111};
61 112
113&audmux {
114 status = "okay";
115};
116
62&can1 { 117&can1 {
63 pinctrl-names = "default"; 118 pinctrl-names = "default";
64 pinctrl-0 = <&pinctrl_hummingboard_flexcan1>; 119 pinctrl-0 = <&pinctrl_hummingboard_flexcan1>;
@@ -75,16 +130,24 @@
75&i2c1 { 130&i2c1 {
76 pinctrl-names = "default"; 131 pinctrl-names = "default";
77 pinctrl-0 = <&pinctrl_hummingboard_i2c1>; 132 pinctrl-0 = <&pinctrl_hummingboard_i2c1>;
78
79 /*
80 * Not fitted on Carrier-1 board... yet
81 status = "okay"; 133 status = "okay";
82 134
135 /* Pro baseboard model */
83 rtc: pcf8523@68 { 136 rtc: pcf8523@68 {
84 compatible = "nxp,pcf8523"; 137 compatible = "nxp,pcf8523";
85 reg = <0x68>; 138 reg = <0x68>;
86 }; 139 };
87 */ 140
141 /* Pro baseboard model */
142 sgtl5000: sgtl5000@0a {
143 clocks = <&clks IMX6QDL_CLK_CKO>;
144 compatible = "fsl,sgtl5000";
145 pinctrl-names = "default";
146 pinctrl-0 = <&pinctrl_hummingboard_sgtl5000>;
147 reg = <0x0a>;
148 VDDA-supply = <&reg_3p3v>;
149 VDDIO-supply = <&reg_3p3v>;
150 };
88}; 151};
89 152
90&i2c2 { 153&i2c2 {
@@ -129,6 +192,20 @@
129 >; 192 >;
130 }; 193 };
131 194
195 pinctrl_hummingboard_pwm1: pwm1grp {
196 fsl,pins = <MX6QDL_PAD_DISP0_DAT8__PWM1_OUT 0x1b0b1>;
197 };
198
199 pinctrl_hummingboard_sgtl5000: hummingboard-sgtl5000 {
200 fsl,pins = <
201 MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0
202 MX6QDL_PAD_KEY_COL0__AUD5_TXC 0x130b0
203 MX6QDL_PAD_KEY_ROW0__AUD5_TXD 0x110b0
204 MX6QDL_PAD_KEY_COL1__AUD5_TXFS 0x130b0
205 MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
206 >;
207 };
208
132 pinctrl_hummingboard_spdif: hummingboard-spdif { 209 pinctrl_hummingboard_spdif: hummingboard-spdif {
133 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>; 210 fsl,pins = <MX6QDL_PAD_GPIO_17__SPDIF_OUT 0x13091>;
134 }; 211 };
@@ -168,12 +245,28 @@
168 }; 245 };
169}; 246};
170 247
248&pwm1 {
249 pinctrl-names = "default";
250 pinctrl-0 = <&pinctrl_hummingboard_pwm1>;
251 status = "okay";
252};
253
254&pwm2 {
255 pinctrl-names = "default";
256 status = "okay";
257};
258
171&spdif { 259&spdif {
172 pinctrl-names = "default"; 260 pinctrl-names = "default";
173 pinctrl-0 = <&pinctrl_hummingboard_spdif>; 261 pinctrl-0 = <&pinctrl_hummingboard_spdif>;
174 status = "okay"; 262 status = "okay";
175}; 263};
176 264
265&ssi1 {
266 fsl,mode = "i2s-slave";
267 status = "okay";
268};
269
177&usbh1 { 270&usbh1 {
178 disable-over-current; 271 disable-over-current;
179 vbus-supply = <&reg_usbh1_vbus>; 272 vbus-supply = <&reg_usbh1_vbus>;
diff --git a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
index db9f45b2c573..4a1820309cdb 100644
--- a/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-microsom-ar8035.dtsi
@@ -3,6 +3,44 @@
3 * 3 *
4 * This describes the hookup for an AR8035 to the iMX6 on the SolidRun 4 * This describes the hookup for an AR8035 to the iMX6 on the SolidRun
5 * MicroSOM. 5 * MicroSOM.
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License.
16 *
17 * This file is distributed in the hope that it will be useful
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
6 */ 44 */
7&fec { 45&fec {
8 pinctrl-names = "default"; 46 pinctrl-names = "default";
diff --git a/arch/arm/boot/dts/imx6qdl-microsom.dtsi b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
index 79eac6849d4c..349f82be816e 100644
--- a/arch/arm/boot/dts/imx6qdl-microsom.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-microsom.dtsi
@@ -1,5 +1,43 @@
1/* 1/*
2 * Copyright (C) 2013,2014 Russell King 2 * Copyright (C) 2013,2014 Russell King
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License.
13 *
14 * This file is distributed in the hope that it will be useful
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
3 */ 41 */
4 42
5&iomuxc { 43&iomuxc {
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 009abd69385d..46b2fed7c319 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -182,6 +182,34 @@
182 }; 182 };
183}; 183};
184 184
185&i2c3 {
186 pinctrl-names = "default";
187 pinctrl-0 = <&pinctrl_i2c3>;
188 pinctrl-assert-gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;
189 status = "okay";
190
191 max7310_a: gpio@30 {
192 compatible = "maxim,max7310";
193 reg = <0x30>;
194 gpio-controller;
195 #gpio-cells = <2>;
196 };
197
198 max7310_b: gpio@32 {
199 compatible = "maxim,max7310";
200 reg = <0x32>;
201 gpio-controller;
202 #gpio-cells = <2>;
203 };
204
205 max7310_c: gpio@34 {
206 compatible = "maxim,max7310";
207 reg = <0x34>;
208 gpio-controller;
209 #gpio-cells = <2>;
210 };
211};
212
185&iomuxc { 213&iomuxc {
186 pinctrl-names = "default"; 214 pinctrl-names = "default";
187 pinctrl-0 = <&pinctrl_hog>; 215 pinctrl-0 = <&pinctrl_hog>;
@@ -265,6 +293,13 @@
265 >; 293 >;
266 }; 294 };
267 295
296 pinctrl_i2c3: i2c3grp {
297 fsl,pins = <
298 MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
299 MX6QDL_PAD_EIM_D18__I2C3_SDA 0x4001b8b1
300 >;
301 };
302
268 pinctrl_pwm3: pwm1grp { 303 pinctrl_pwm3: pwm1grp {
269 fsl,pins = < 304 fsl,pins = <
270 MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x1b0b1 305 MX6QDL_PAD_SD4_DAT1__PWM3_OUT 0x1b0b1
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index d6c69ec44314..f74a8ded515f 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -53,6 +53,7 @@
53 interrupt-controller; 53 interrupt-controller;
54 reg = <0x00a01000 0x1000>, 54 reg = <0x00a01000 0x1000>,
55 <0x00a00100 0x100>; 55 <0x00a00100 0x100>;
56 interrupt-parent = <&intc>;
56 }; 57 };
57 58
58 clocks { 59 clocks {
@@ -82,7 +83,7 @@
82 #address-cells = <1>; 83 #address-cells = <1>;
83 #size-cells = <1>; 84 #size-cells = <1>;
84 compatible = "simple-bus"; 85 compatible = "simple-bus";
85 interrupt-parent = <&intc>; 86 interrupt-parent = <&gpc>;
86 ranges; 87 ranges;
87 88
88 dma_apbh: dma-apbh@00110000 { 89 dma_apbh: dma-apbh@00110000 {
@@ -122,6 +123,7 @@
122 compatible = "arm,cortex-a9-twd-timer"; 123 compatible = "arm,cortex-a9-twd-timer";
123 reg = <0x00a00600 0x20>; 124 reg = <0x00a00600 0x20>;
124 interrupts = <1 13 0xf01>; 125 interrupts = <1 13 0xf01>;
126 interrupt-parent = <&intc>;
125 clocks = <&clks IMX6QDL_CLK_TWD>; 127 clocks = <&clks IMX6QDL_CLK_TWD>;
126 }; 128 };
127 129
@@ -357,6 +359,7 @@
357 clocks = <&clks IMX6QDL_CLK_IPG>, 359 clocks = <&clks IMX6QDL_CLK_IPG>,
358 <&clks IMX6QDL_CLK_PWM1>; 360 <&clks IMX6QDL_CLK_PWM1>;
359 clock-names = "ipg", "per"; 361 clock-names = "ipg", "per";
362 status = "disabled";
360 }; 363 };
361 364
362 pwm2: pwm@02084000 { 365 pwm2: pwm@02084000 {
@@ -367,6 +370,7 @@
367 clocks = <&clks IMX6QDL_CLK_IPG>, 370 clocks = <&clks IMX6QDL_CLK_IPG>,
368 <&clks IMX6QDL_CLK_PWM2>; 371 <&clks IMX6QDL_CLK_PWM2>;
369 clock-names = "ipg", "per"; 372 clock-names = "ipg", "per";
373 status = "disabled";
370 }; 374 };
371 375
372 pwm3: pwm@02088000 { 376 pwm3: pwm@02088000 {
@@ -377,6 +381,7 @@
377 clocks = <&clks IMX6QDL_CLK_IPG>, 381 clocks = <&clks IMX6QDL_CLK_IPG>,
378 <&clks IMX6QDL_CLK_PWM3>; 382 <&clks IMX6QDL_CLK_PWM3>;
379 clock-names = "ipg", "per"; 383 clock-names = "ipg", "per";
384 status = "disabled";
380 }; 385 };
381 386
382 pwm4: pwm@0208c000 { 387 pwm4: pwm@0208c000 {
@@ -387,6 +392,7 @@
387 clocks = <&clks IMX6QDL_CLK_IPG>, 392 clocks = <&clks IMX6QDL_CLK_IPG>,
388 <&clks IMX6QDL_CLK_PWM4>; 393 <&clks IMX6QDL_CLK_PWM4>;
389 clock-names = "ipg", "per"; 394 clock-names = "ipg", "per";
395 status = "disabled";
390 }; 396 };
391 397
392 can1: flexcan@02090000 { 398 can1: flexcan@02090000 {
@@ -598,7 +604,7 @@
598 regulator-name = "vddpu"; 604 regulator-name = "vddpu";
599 regulator-min-microvolt = <725000>; 605 regulator-min-microvolt = <725000>;
600 regulator-max-microvolt = <1450000>; 606 regulator-max-microvolt = <1450000>;
601 regulator-always-on; 607 regulator-enable-ramp-delay = <150>;
602 anatop-reg-offset = <0x140>; 608 anatop-reg-offset = <0x140>;
603 anatop-vol-bit-shift = <9>; 609 anatop-vol-bit-shift = <9>;
604 anatop-vol-bit-width = <5>; 610 anatop-vol-bit-width = <5>;
@@ -658,7 +664,7 @@
658 #size-cells = <1>; 664 #size-cells = <1>;
659 ranges = <0 0x020cc000 0x4000>; 665 ranges = <0 0x020cc000 0x4000>;
660 666
661 snvs-rtc-lp@34 { 667 snvs_rtc: snvs-rtc-lp@34 {
662 compatible = "fsl,sec-v4.0-mon-rtc-lp"; 668 compatible = "fsl,sec-v4.0-mon-rtc-lp";
663 reg = <0x34 0x58>; 669 reg = <0x34 0x58>;
664 interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, 670 interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>,
@@ -693,8 +699,19 @@
693 gpc: gpc@020dc000 { 699 gpc: gpc@020dc000 {
694 compatible = "fsl,imx6q-gpc"; 700 compatible = "fsl,imx6q-gpc";
695 reg = <0x020dc000 0x4000>; 701 reg = <0x020dc000 0x4000>;
702 interrupt-controller;
703 #interrupt-cells = <3>;
696 interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>, 704 interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>,
697 <0 90 IRQ_TYPE_LEVEL_HIGH>; 705 <0 90 IRQ_TYPE_LEVEL_HIGH>;
706 interrupt-parent = <&intc>;
707 pu-supply = <&reg_pu>;
708 clocks = <&clks IMX6QDL_CLK_GPU3D_CORE>,
709 <&clks IMX6QDL_CLK_GPU3D_SHADER>,
710 <&clks IMX6QDL_CLK_GPU2D_CORE>,
711 <&clks IMX6QDL_CLK_GPU2D_AXI>,
712 <&clks IMX6QDL_CLK_OPENVG_AXI>,
713 <&clks IMX6QDL_CLK_VPU_AXI>;
714 #power-domain-cells = <1>;
698 }; 715 };
699 716
700 gpr: iomuxc-gpr@020e0000 { 717 gpr: iomuxc-gpr@020e0000 {
@@ -845,6 +862,7 @@
845 clocks = <&clks IMX6QDL_CLK_USBOH3>; 862 clocks = <&clks IMX6QDL_CLK_USBOH3>;
846 fsl,usbphy = <&usbphy2>; 863 fsl,usbphy = <&usbphy2>;
847 fsl,usbmisc = <&usbmisc 1>; 864 fsl,usbmisc = <&usbmisc 1>;
865 dr_mode = "host";
848 status = "disabled"; 866 status = "disabled";
849 }; 867 };
850 868
@@ -854,6 +872,7 @@
854 interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; 872 interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>;
855 clocks = <&clks IMX6QDL_CLK_USBOH3>; 873 clocks = <&clks IMX6QDL_CLK_USBOH3>;
856 fsl,usbmisc = <&usbmisc 2>; 874 fsl,usbmisc = <&usbmisc 2>;
875 dr_mode = "host";
857 status = "disabled"; 876 status = "disabled";
858 }; 877 };
859 878
@@ -863,6 +882,7 @@
863 interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>; 882 interrupts = <0 42 IRQ_TYPE_LEVEL_HIGH>;
864 clocks = <&clks IMX6QDL_CLK_USBOH3>; 883 clocks = <&clks IMX6QDL_CLK_USBOH3>;
865 fsl,usbmisc = <&usbmisc 3>; 884 fsl,usbmisc = <&usbmisc 3>;
885 dr_mode = "host";
866 status = "disabled"; 886 status = "disabled";
867 }; 887 };
868 888
@@ -1022,19 +1042,24 @@
1022 reg = <0x021e0000 0x4000>; 1042 reg = <0x021e0000 0x4000>;
1023 status = "disabled"; 1043 status = "disabled";
1024 1044
1025 port@0 { 1045 ports {
1026 reg = <0>; 1046 #address-cells = <1>;
1047 #size-cells = <0>;
1048
1049 port@0 {
1050 reg = <0>;
1027 1051
1028 mipi_mux_0: endpoint { 1052 mipi_mux_0: endpoint {
1029 remote-endpoint = <&ipu1_di0_mipi>; 1053 remote-endpoint = <&ipu1_di0_mipi>;
1054 };
1030 }; 1055 };
1031 };
1032 1056
1033 port@1 { 1057 port@1 {
1034 reg = <1>; 1058 reg = <1>;
1035 1059
1036 mipi_mux_1: endpoint { 1060 mipi_mux_1: endpoint {
1037 remote-endpoint = <&ipu1_di1_mipi>; 1061 remote-endpoint = <&ipu1_di1_mipi>;
1062 };
1038 }; 1063 };
1039 }; 1064 };
1040 }; 1065 };
diff --git a/arch/arm/boot/dts/imx6sl-warp.dts b/arch/arm/boot/dts/imx6sl-warp.dts
new file mode 100644
index 000000000000..64f7decf1fdc
--- /dev/null
+++ b/arch/arm/boot/dts/imx6sl-warp.dts
@@ -0,0 +1,262 @@
1/*
2 * Copyright 2014, 2015 O.S. Systems Software LTDA.
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this file; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22 * MA 02110-1301 USA
23 *
24 * Or, alternatively,
25 *
26 * b) Permission is hereby granted, free of charge, to any person
27 * obtaining a copy of this software and associated documentation
28 * files (the "Software"), to deal in the Software without
29 * restriction, including without limitation the rights to use,
30 * copy, modify, merge, publish, distribute, sublicense, and/or
31 * sell copies of the Software, and to permit persons to whom the
32 * Software is furnished to do so, subject to the following
33 * conditions:
34 *
35 * The above copyright notice and this permission notice shall be
36 * included in all copies or substantial portions of the Software.
37 *
38 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45 * OTHER DEALINGS IN THE SOFTWARE.
46 */
47
48/dts-v1/;
49
50#include <dt-bindings/gpio/gpio.h>
51#include "imx6sl.dtsi"
52
53/ {
54 model = "WaRP Board";
55 compatible = "warp,imx6sl-warp", "fsl,imx6sl";
56
57 memory {
58 reg = <0x80000000 0x20000000>;
59 };
60
61 regulators {
62 compatible = "simple-bus";
63 #address-cells = <1>;
64 #size-cells = <0>;
65
66 reg_usb_otg1_vbus: regulator@0 {
67 compatible = "regulator-fixed";
68 reg = <0>;
69 regulator-name = "usb_otg1_vbus";
70 regulator-min-microvolt = <5000000>;
71 regulator-max-microvolt = <5000000>;
72 gpio = <&gpio4 0 0>;
73 enable-active-high;
74 };
75
76 reg_usb_otg2_vbus: regulator@1 {
77 compatible = "regulator-fixed";
78 reg = <1>;
79 regulator-name = "usb_otg2_vbus";
80 regulator-min-microvolt = <5000000>;
81 regulator-max-microvolt = <5000000>;
82 gpio = <&gpio4 2 0>;
83 enable-active-high;
84 };
85
86 reg_1p8v: regulator@2 {
87 compatible = "regulator-fixed";
88 reg = <2>;
89 regulator-name = "1P8V";
90 regulator-min-microvolt = <1800000>;
91 regulator-max-microvolt = <1800000>;
92 };
93 };
94
95 usdhc3_pwrseq: usdhc3_pwrseq {
96 compatible = "mmc-pwrseq-simple";
97 reset-gpios = <&gpio4 5 GPIO_ACTIVE_LOW>, /* WL_REG_ON */
98 <&gpio3 25 GPIO_ACTIVE_LOW>, /* BT_REG_ON */
99 <&gpio4 4 GPIO_ACTIVE_LOW>, /* BT_WAKE */
100 <&gpio4 6 GPIO_ACTIVE_LOW>; /* BT_RST_N */
101 };
102};
103
104&uart1 {
105 pinctrl-names = "default";
106 pinctrl-0 = <&pinctrl_uart1>;
107 status = "okay";
108};
109
110&uart2 {
111 pinctrl-names = "default";
112 pinctrl-0 = <&pinctrl_uart2>;
113 fsl,uart-has-rtscts;
114 status = "okay";
115};
116
117&uart3 {
118 pinctrl-names = "default";
119 pinctrl-0 = <&pinctrl_uart3>;
120 status = "okay";
121};
122
123&usbotg1 {
124 vbus-supply = <&reg_usb_otg1_vbus>;
125 dr_mode = "host";
126 disable-over-current;
127 status = "okay";
128};
129
130&usbotg2 {
131 vbus-supply = <&reg_usb_otg2_vbus>;
132 disable-over-current;
133 status = "okay";
134};
135
136&usdhc2 {
137 pinctrl-names = "default", "state_100mhz", "state_200mhz";
138 pinctrl-0 = <&pinctrl_usdhc2>;
139 pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
140 pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
141 bus-width = <8>;
142 non-removable;
143 status = "okay";
144};
145
146&usdhc3 {
147 pinctrl-names = "default", "state_100mhz", "state_200mhz";
148 pinctrl-0 = <&pinctrl_usdhc3>;
149 pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
150 pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
151 bus-width = <4>;
152 non-removable;
153 keep-power-in-suspend;
154 enable-sdio-wakeup;
155 mmc-pwrseq = <&usdhc3_pwrseq>;
156 status = "okay";
157};
158
159&iomuxc {
160 imx6sl-warp {
161 pinctrl_uart1: uart1grp {
162 fsl,pins = <
163 MX6SL_PAD_UART1_RXD__UART1_RX_DATA 0x41b0b1
164 MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x41b0b1
165 >;
166 };
167
168 pinctrl_uart2: uart2grp {
169 fsl,pins = <
170 MX6SL_PAD_EPDC_D12__UART2_RX_DATA 0x41b0b1
171 MX6SL_PAD_EPDC_D13__UART2_TX_DATA 0x41b0b1
172 MX6SL_PAD_EPDC_D14__UART2_RTS_B 0x4130B1
173 MX6SL_PAD_EPDC_D15__UART2_CTS_B 0x4130B1
174 >;
175 };
176
177 pinctrl_uart3: uart3grp {
178 fsl,pins = <
179 MX6SL_PAD_AUD_RXC__UART3_RX_DATA 0x41b0b1
180 MX6SL_PAD_AUD_RXC__UART3_TX_DATA 0x41b0b1
181 >;
182 };
183
184 pinctrl_usdhc2: usdhc2grp {
185 fsl,pins = <
186 MX6SL_PAD_SD2_CMD__SD2_CMD 0x417059
187 MX6SL_PAD_SD2_CLK__SD2_CLK 0x410059
188 MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x417059
189 MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x417059
190 MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x417059
191 MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x417059
192 MX6SL_PAD_SD2_DAT4__SD2_DATA4 0x417059
193 MX6SL_PAD_SD2_DAT5__SD2_DATA5 0x417059
194 MX6SL_PAD_SD2_DAT6__SD2_DATA6 0x417059
195 MX6SL_PAD_SD2_DAT7__SD2_DATA7 0x417059
196 >;
197 };
198
199 pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
200 fsl,pins = <
201 MX6SL_PAD_SD2_CMD__SD2_CMD 0x4170b9
202 MX6SL_PAD_SD2_CLK__SD2_CLK 0x4100b9
203 MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x4170b9
204 MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x4170b9
205 MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x4170b9
206 MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x4170b9
207 MX6SL_PAD_SD2_DAT4__SD2_DATA4 0x4170b9
208 MX6SL_PAD_SD2_DAT5__SD2_DATA5 0x4170b9
209 MX6SL_PAD_SD2_DAT6__SD2_DATA6 0x4170b9
210 MX6SL_PAD_SD2_DAT7__SD2_DATA7 0x4170b9
211 >;
212 };
213
214 pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
215 fsl,pins = <
216 MX6SL_PAD_SD2_CMD__SD2_CMD 0x4170f9
217 MX6SL_PAD_SD2_CLK__SD2_CLK 0x4100f9
218 MX6SL_PAD_SD2_DAT0__SD2_DATA0 0x4170f9
219 MX6SL_PAD_SD2_DAT1__SD2_DATA1 0x4170f9
220 MX6SL_PAD_SD2_DAT2__SD2_DATA2 0x4170f9
221 MX6SL_PAD_SD2_DAT3__SD2_DATA3 0x4170f9
222 MX6SL_PAD_SD2_DAT4__SD2_DATA4 0x4170f9
223 MX6SL_PAD_SD2_DAT5__SD2_DATA5 0x4170f9
224 MX6SL_PAD_SD2_DAT6__SD2_DATA6 0x4170f9
225 MX6SL_PAD_SD2_DAT7__SD2_DATA7 0x4170f9
226 >;
227 };
228
229 pinctrl_usdhc3: usdhc3grp {
230 fsl,pins = <
231 MX6SL_PAD_SD3_CMD__SD3_CMD 0x417059
232 MX6SL_PAD_SD3_CLK__SD3_CLK 0x410059
233 MX6SL_PAD_SD3_DAT0__SD3_DATA0 0x417059
234 MX6SL_PAD_SD3_DAT1__SD3_DATA1 0x417059
235 MX6SL_PAD_SD3_DAT2__SD3_DATA2 0x417059
236 MX6SL_PAD_SD3_DAT3__SD3_DATA3 0x417059
237 >;
238 };
239
240 pinctrl_usdhc3_100mhz: usdhc3grp100mhz {
241 fsl,pins = <
242 MX6SL_PAD_SD3_CMD__SD3_CMD 0x4170b9
243 MX6SL_PAD_SD3_CLK__SD3_CLK 0x4100b9
244 MX6SL_PAD_SD3_DAT0__SD3_DATA0 0x4170b9
245 MX6SL_PAD_SD3_DAT1__SD3_DATA1 0x4170b9
246 MX6SL_PAD_SD3_DAT2__SD3_DATA2 0x4170b9
247 MX6SL_PAD_SD3_DAT3__SD3_DATA3 0x4170b9
248 >;
249 };
250
251 pinctrl_usdhc3_200mhz: usdhc3grp200mhz {
252 fsl,pins = <
253 MX6SL_PAD_SD3_CMD__SD3_CMD 0x4170f9
254 MX6SL_PAD_SD3_CLK__SD3_CLK 0x4100f9
255 MX6SL_PAD_SD3_DAT0__SD3_DATA0 0x4170f9
256 MX6SL_PAD_SD3_DAT1__SD3_DATA1 0x4170f9
257 MX6SL_PAD_SD3_DAT2__SD3_DATA2 0x4170f9
258 MX6SL_PAD_SD3_DAT3__SD3_DATA3 0x4170f9
259 >;
260 };
261 };
262};
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index 36ab8e054cee..a78e715e3982 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -72,6 +72,7 @@
72 interrupt-controller; 72 interrupt-controller;
73 reg = <0x00a01000 0x1000>, 73 reg = <0x00a01000 0x1000>,
74 <0x00a00100 0x100>; 74 <0x00a00100 0x100>;
75 interrupt-parent = <&intc>;
75 }; 76 };
76 77
77 clocks { 78 clocks {
@@ -95,7 +96,7 @@
95 #address-cells = <1>; 96 #address-cells = <1>;
96 #size-cells = <1>; 97 #size-cells = <1>;
97 compatible = "simple-bus"; 98 compatible = "simple-bus";
98 interrupt-parent = <&intc>; 99 interrupt-parent = <&gpc>;
99 ranges; 100 ranges;
100 101
101 ocram: sram@00900000 { 102 ocram: sram@00900000 {
@@ -568,7 +569,7 @@
568 #size-cells = <1>; 569 #size-cells = <1>;
569 ranges = <0 0x020cc000 0x4000>; 570 ranges = <0 0x020cc000 0x4000>;
570 571
571 snvs-rtc-lp@34 { 572 snvs_rtc: snvs-rtc-lp@34 {
572 compatible = "fsl,sec-v4.0-mon-rtc-lp"; 573 compatible = "fsl,sec-v4.0-mon-rtc-lp";
573 reg = <0x34 0x58>; 574 reg = <0x34 0x58>;
574 interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>, 575 interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>,
@@ -603,7 +604,14 @@
603 gpc: gpc@020dc000 { 604 gpc: gpc@020dc000 {
604 compatible = "fsl,imx6sl-gpc", "fsl,imx6q-gpc"; 605 compatible = "fsl,imx6sl-gpc", "fsl,imx6q-gpc";
605 reg = <0x020dc000 0x4000>; 606 reg = <0x020dc000 0x4000>;
607 interrupt-controller;
608 #interrupt-cells = <3>;
606 interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>; 609 interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
610 interrupt-parent = <&intc>;
611 pu-supply = <&reg_pu>;
612 clocks = <&clks IMX6SL_CLK_GPU2D_OVG>,
613 <&clks IMX6SL_CLK_GPU2D_PODF>;
614 #power-domain-cells = <1>;
607 }; 615 };
608 616
609 gpr: iomuxc-gpr@020e0000 { 617 gpr: iomuxc-gpr@020e0000 {
@@ -699,6 +707,7 @@
699 interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>; 707 interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>;
700 clocks = <&clks IMX6SL_CLK_USBOH3>; 708 clocks = <&clks IMX6SL_CLK_USBOH3>;
701 fsl,usbmisc = <&usbmisc 2>; 709 fsl,usbmisc = <&usbmisc 2>;
710 dr_mode = "host";
702 status = "disabled"; 711 status = "disabled";
703 }; 712 };
704 713
diff --git a/arch/arm/boot/dts/imx6sx-sdb-reva.dts b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
new file mode 100644
index 000000000000..c76b87cba275
--- /dev/null
+++ b/arch/arm/boot/dts/imx6sx-sdb-reva.dts
@@ -0,0 +1,143 @@
1/*
2 * Copyright (C) 2015 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include "imx6sx-sdb.dtsi"
10
11/ {
12 model = "Freescale i.MX6 SoloX SDB RevA Board";
13};
14
15&i2c1 {
16 clock-frequency = <100000>;
17 pinctrl-names = "default";
18 pinctrl-0 = <&pinctrl_i2c1>;
19 status = "okay";
20
21 pmic: pfuze100@08 {
22 compatible = "fsl,pfuze100";
23 reg = <0x08>;
24
25 regulators {
26 sw1a_reg: sw1ab {
27 regulator-min-microvolt = <300000>;
28 regulator-max-microvolt = <1875000>;
29 regulator-boot-on;
30 regulator-always-on;
31 regulator-ramp-delay = <6250>;
32 };
33
34 sw1c_reg: sw1c {
35 regulator-min-microvolt = <300000>;
36 regulator-max-microvolt = <1875000>;
37 regulator-boot-on;
38 regulator-always-on;
39 regulator-ramp-delay = <6250>;
40 };
41
42 sw2_reg: sw2 {
43 regulator-min-microvolt = <800000>;
44 regulator-max-microvolt = <3300000>;
45 regulator-boot-on;
46 regulator-always-on;
47 };
48
49 sw3a_reg: sw3a {
50 regulator-min-microvolt = <400000>;
51 regulator-max-microvolt = <1975000>;
52 regulator-boot-on;
53 regulator-always-on;
54 };
55
56 sw3b_reg: sw3b {
57 regulator-min-microvolt = <400000>;
58 regulator-max-microvolt = <1975000>;
59 regulator-boot-on;
60 regulator-always-on;
61 };
62
63 sw4_reg: sw4 {
64 regulator-min-microvolt = <800000>;
65 regulator-max-microvolt = <3300000>;
66 };
67
68 swbst_reg: swbst {
69 regulator-min-microvolt = <5000000>;
70 regulator-max-microvolt = <5150000>;
71 };
72
73 snvs_reg: vsnvs {
74 regulator-min-microvolt = <1000000>;
75 regulator-max-microvolt = <3000000>;
76 regulator-boot-on;
77 regulator-always-on;
78 };
79
80 vref_reg: vrefddr {
81 regulator-boot-on;
82 regulator-always-on;
83 };
84
85 vgen1_reg: vgen1 {
86 regulator-min-microvolt = <800000>;
87 regulator-max-microvolt = <1550000>;
88 regulator-always-on;
89 };
90
91 vgen2_reg: vgen2 {
92 regulator-min-microvolt = <800000>;
93 regulator-max-microvolt = <1550000>;
94 };
95
96 vgen3_reg: vgen3 {
97 regulator-min-microvolt = <1800000>;
98 regulator-max-microvolt = <3300000>;
99 regulator-always-on;
100 };
101
102 vgen4_reg: vgen4 {
103 regulator-min-microvolt = <1800000>;
104 regulator-max-microvolt = <3300000>;
105 regulator-always-on;
106 };
107
108 vgen5_reg: vgen5 {
109 regulator-min-microvolt = <1800000>;
110 regulator-max-microvolt = <3300000>;
111 regulator-always-on;
112 };
113
114 vgen6_reg: vgen6 {
115 regulator-min-microvolt = <1800000>;
116 regulator-max-microvolt = <3300000>;
117 regulator-always-on;
118 };
119 };
120 };
121};
122
123&qspi2 {
124 pinctrl-names = "default";
125 pinctrl-0 = <&pinctrl_qspi2>;
126 status = "okay";
127
128 flash0: s25fl128s@0 {
129 reg = <0>;
130 #address-cells = <1>;
131 #size-cells = <1>;
132 compatible = "spansion,s25fl128s";
133 spi-max-frequency = <66000000>;
134 };
135
136 flash1: s25fl128s@1 {
137 reg = <1>;
138 #address-cells = <1>;
139 #size-cells = <1>;
140 compatible = "spansion,s25fl128s";
141 spi-max-frequency = <66000000>;
142 };
143};
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
index 32f07d6b4042..0bfc4e7865b2 100644
--- a/arch/arm/boot/dts/imx6sx-sdb.dts
+++ b/arch/arm/boot/dts/imx6sx-sdb.dts
@@ -1,197 +1,40 @@
1/* 1/*
2 * Copyright (C) 2014 Freescale Semiconductor, Inc. 2 * Copyright (C) 2015 Freescale Semiconductor, Inc.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8 8
9/dts-v1/; 9#include "imx6sx-sdb.dtsi"
10
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13#include "imx6sx.dtsi"
14 10
15/ { 11/ {
16 model = "Freescale i.MX6 SoloX SDB Board"; 12 model = "Freescale i.MX6 SoloX SDB RevB Board";
17 compatible = "fsl,imx6sx-sdb", "fsl,imx6sx";
18
19 chosen {
20 stdout-path = &uart1;
21 };
22
23 memory {
24 reg = <0x80000000 0x40000000>;
25 };
26
27 backlight {
28 compatible = "pwm-backlight";
29 pwms = <&pwm3 0 5000000>;
30 brightness-levels = <0 4 8 16 32 64 128 255>;
31 default-brightness-level = <6>;
32 };
33
34 gpio-keys {
35 compatible = "gpio-keys";
36 pinctrl-names = "default";
37 pinctrl-0 = <&pinctrl_gpio_keys>;
38
39 volume-up {
40 label = "Volume Up";
41 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_VOLUMEUP>;
43 };
44
45 volume-down {
46 label = "Volume Down";
47 gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_VOLUMEDOWN>;
49 };
50 };
51
52 regulators {
53 compatible = "simple-bus";
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 vcc_sd3: regulator@0 {
58 compatible = "regulator-fixed";
59 reg = <0>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_vcc_sd3>;
62 regulator-name = "VCC_SD3";
63 regulator-min-microvolt = <3000000>;
64 regulator-max-microvolt = <3000000>;
65 gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
66 enable-active-high;
67 };
68
69 reg_usb_otg1_vbus: regulator@1 {
70 compatible = "regulator-fixed";
71 reg = <1>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&pinctrl_usb_otg1>;
74 regulator-name = "usb_otg1_vbus";
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
78 enable-active-high;
79 };
80
81 reg_usb_otg2_vbus: regulator@2 {
82 compatible = "regulator-fixed";
83 reg = <2>;
84 pinctrl-names = "default";
85 pinctrl-0 = <&pinctrl_usb_otg2>;
86 regulator-name = "usb_otg2_vbus";
87 regulator-min-microvolt = <5000000>;
88 regulator-max-microvolt = <5000000>;
89 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
90 enable-active-high;
91 };
92
93 reg_psu_5v: regulator@3 {
94 compatible = "regulator-fixed";
95 reg = <3>;
96 regulator-name = "PSU-5V0";
97 regulator-min-microvolt = <5000000>;
98 regulator-max-microvolt = <5000000>;
99 };
100
101 reg_lcd_3v3: regulator@4 {
102 compatible = "regulator-fixed";
103 reg = <4>;
104 regulator-name = "lcd-3v3";
105 gpio = <&gpio3 27 0>;
106 enable-active-high;
107 };
108
109 reg_peri_3v3: regulator@5 {
110 compatible = "regulator-fixed";
111 reg = <5>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_peri_3v3>;
114 regulator-name = "peri_3v3";
115 regulator-min-microvolt = <3300000>;
116 regulator-max-microvolt = <3300000>;
117 gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
118 enable-active-high;
119 regulator-always-on;
120 };
121
122 reg_enet_3v3: regulator@6 {
123 compatible = "regulator-fixed";
124 reg = <6>;
125 pinctrl-names = "default";
126 pinctrl-0 = <&pinctrl_enet_3v3>;
127 regulator-name = "enet_3v3";
128 regulator-min-microvolt = <3300000>;
129 regulator-max-microvolt = <3300000>;
130 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
131 };
132 };
133
134 sound {
135 compatible = "fsl,imx6sx-sdb-wm8962", "fsl,imx-audio-wm8962";
136 model = "wm8962-audio";
137 ssi-controller = <&ssi2>;
138 audio-codec = <&codec>;
139 audio-routing =
140 "Headphone Jack", "HPOUTL",
141 "Headphone Jack", "HPOUTR",
142 "Ext Spk", "SPKOUTL",
143 "Ext Spk", "SPKOUTR",
144 "AMIC", "MICBIAS",
145 "IN3R", "AMIC";
146 mux-int-port = <2>;
147 mux-ext-port = <6>;
148 };
149};
150
151&audmux {
152 pinctrl-names = "default";
153 pinctrl-0 = <&pinctrl_audmux>;
154 status = "okay";
155}; 13};
156 14
157&fec1 { 15&cpu0 {
158 pinctrl-names = "default"; 16 operating-points = <
159 pinctrl-0 = <&pinctrl_enet1>; 17 /* kHz uV */
160 phy-supply = <&reg_enet_3v3>; 18 996000 1250000
161 phy-mode = "rgmii"; 19 792000 1175000
162 phy-handle = <&ethphy1>; 20 396000 1175000
163 status = "okay"; 21 >;
164 22 fsl,soc-operating-points = <
165 mdio { 23 /* ARM kHz SOC uV */
166 #address-cells = <1>; 24 996000 1250000
167 #size-cells = <0>; 25 792000 1175000
168 26 396000 1175000
169 ethphy1: ethernet-phy@1 { 27 >;
170 reg = <1>;
171 };
172
173 ethphy2: ethernet-phy@2 {
174 reg = <2>;
175 };
176 };
177}; 28};
178 29
179&fec2 { 30&i2c1 {
31 clock-frequency = <100000>;
180 pinctrl-names = "default"; 32 pinctrl-names = "default";
181 pinctrl-0 = <&pinctrl_enet2>; 33 pinctrl-0 = <&pinctrl_i2c1>;
182 phy-mode = "rgmii";
183 phy-handle = <&ethphy2>;
184 status = "okay"; 34 status = "okay";
185};
186
187&i2c1 {
188 clock-frequency = <100000>;
189 pinctrl-names = "default";
190 pinctrl-0 = <&pinctrl_i2c1>;
191 status = "okay";
192 35
193 pmic: pfuze100@08 { 36 pmic: pfuze100@08 {
194 compatible = "fsl,pfuze100"; 37 compatible = "fsl,pfuze200";
195 reg = <0x08>; 38 reg = <0x08>;
196 39
197 regulators { 40 regulators {
@@ -203,14 +46,6 @@
203 regulator-ramp-delay = <6250>; 46 regulator-ramp-delay = <6250>;
204 }; 47 };
205 48
206 sw1c_reg: sw1c {
207 regulator-min-microvolt = <300000>;
208 regulator-max-microvolt = <1875000>;
209 regulator-boot-on;
210 regulator-always-on;
211 regulator-ramp-delay = <6250>;
212 };
213
214 sw2_reg: sw2 { 49 sw2_reg: sw2 {
215 regulator-min-microvolt = <800000>; 50 regulator-min-microvolt = <800000>;
216 regulator-max-microvolt = <3300000>; 51 regulator-max-microvolt = <3300000>;
@@ -232,11 +67,6 @@
232 regulator-always-on; 67 regulator-always-on;
233 }; 68 };
234 69
235 sw4_reg: sw4 {
236 regulator-min-microvolt = <800000>;
237 regulator-max-microvolt = <3300000>;
238 };
239
240 swbst_reg: swbst { 70 swbst_reg: swbst {
241 regulator-min-microvolt = <5000000>; 71 regulator-min-microvolt = <5000000>;
242 regulator-max-microvolt = <5150000>; 72 regulator-max-microvolt = <5150000>;
@@ -292,401 +122,24 @@
292 }; 122 };
293}; 123};
294 124
295&i2c4 {
296 clock-frequency = <100000>;
297 pinctrl-names = "default";
298 pinctrl-0 = <&pinctrl_i2c4>;
299 status = "okay";
300
301 codec: wm8962@1a {
302 compatible = "wlf,wm8962";
303 reg = <0x1a>;
304 clocks = <&clks IMX6SX_CLK_AUDIO>;
305 DCVDD-supply = <&vgen4_reg>;
306 DBVDD-supply = <&vgen4_reg>;
307 AVDD-supply = <&vgen4_reg>;
308 CPVDD-supply = <&vgen4_reg>;
309 MICVDD-supply = <&vgen3_reg>;
310 PLLVDD-supply = <&vgen4_reg>;
311 SPKVDD1-supply = <&reg_psu_5v>;
312 SPKVDD2-supply = <&reg_psu_5v>;
313 };
314};
315
316&lcdif1 {
317 pinctrl-names = "default";
318 pinctrl-0 = <&pinctrl_lcd>;
319 lcd-supply = <&reg_lcd_3v3>;
320 display = <&display0>;
321 status = "okay";
322
323 display0: display0 {
324 bits-per-pixel = <16>;
325 bus-width = <24>;
326
327 display-timings {
328 native-mode = <&timing0>;
329 timing0: timing0 {
330 clock-frequency = <33500000>;
331 hactive = <800>;
332 vactive = <480>;
333 hback-porch = <89>;
334 hfront-porch = <164>;
335 vback-porch = <23>;
336 vfront-porch = <10>;
337 hsync-len = <10>;
338 vsync-len = <10>;
339 hsync-active = <0>;
340 vsync-active = <0>;
341 de-active = <1>;
342 pixelclk-active = <0>;
343 };
344 };
345 };
346};
347
348&pwm3 {
349 pinctrl-names = "default";
350 pinctrl-0 = <&pinctrl_pwm3>;
351 status = "okay";
352};
353
354&snvs_poweroff {
355 status = "okay";
356};
357
358&qspi2 { 125&qspi2 {
359 pinctrl-names = "default"; 126 pinctrl-names = "default";
360 pinctrl-0 = <&pinctrl_qspi2>; 127 pinctrl-0 = <&pinctrl_qspi2>;
361 status = "okay"; 128 status = "okay";
362 129
363 flash0: s25fl128s@0 { 130 flash0: n25q256a@0 {
364 reg = <0>;
365 #address-cells = <1>; 131 #address-cells = <1>;
366 #size-cells = <1>; 132 #size-cells = <1>;
367 compatible = "spansion,s25fl128s"; 133 compatible = "micron,n25q256a";
368 spi-max-frequency = <66000000>; 134 spi-max-frequency = <29000000>;
135 reg = <0>;
369 }; 136 };
370 137
371 flash1: s25fl128s@1 { 138 flash1: n25q256a@1 {
372 reg = <1>;
373 #address-cells = <1>; 139 #address-cells = <1>;
374 #size-cells = <1>; 140 #size-cells = <1>;
375 compatible = "spansion,s25fl128s"; 141 compatible = "micron,n25q256a";
376 spi-max-frequency = <66000000>; 142 spi-max-frequency = <29000000>;
377 }; 143 reg = <1>;
378};
379
380&ssi2 {
381 status = "okay";
382};
383
384&uart1 {
385 pinctrl-names = "default";
386 pinctrl-0 = <&pinctrl_uart1>;
387 status = "okay";
388};
389
390&uart5 { /* for bluetooth */
391 pinctrl-names = "default";
392 pinctrl-0 = <&pinctrl_uart5>;
393 fsl,uart-has-rtscts;
394 status = "okay";
395};
396
397&usbotg1 {
398 vbus-supply = <&reg_usb_otg1_vbus>;
399 pinctrl-names = "default";
400 pinctrl-0 = <&pinctrl_usb_otg1_id>;
401 status = "okay";
402};
403
404&usbotg2 {
405 vbus-supply = <&reg_usb_otg2_vbus>;
406 dr_mode = "host";
407 status = "okay";
408};
409
410&usdhc2 {
411 pinctrl-names = "default";
412 pinctrl-0 = <&pinctrl_usdhc2>;
413 non-removable;
414 no-1-8-v;
415 keep-power-in-suspend;
416 enable-sdio-wakeup;
417 status = "okay";
418};
419
420&usdhc3 {
421 pinctrl-names = "default", "state_100mhz", "state_200mhz";
422 pinctrl-0 = <&pinctrl_usdhc3>;
423 pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
424 pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
425 bus-width = <8>;
426 cd-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
427 wp-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
428 keep-power-in-suspend;
429 enable-sdio-wakeup;
430 vmmc-supply = <&vcc_sd3>;
431 status = "okay";
432};
433
434&usdhc4 {
435 pinctrl-names = "default";
436 pinctrl-0 = <&pinctrl_usdhc4>;
437 cd-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>;
438 wp-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;
439 status = "okay";
440};
441
442&iomuxc {
443 imx6x-sdb {
444 pinctrl_audmux: audmuxgrp {
445 fsl,pins = <
446 MX6SX_PAD_CSI_DATA00__AUDMUX_AUD6_TXC 0x130b0
447 MX6SX_PAD_CSI_DATA01__AUDMUX_AUD6_TXFS 0x130b0
448 MX6SX_PAD_CSI_HSYNC__AUDMUX_AUD6_TXD 0x120b0
449 MX6SX_PAD_CSI_VSYNC__AUDMUX_AUD6_RXD 0x130b0
450 MX6SX_PAD_CSI_PIXCLK__AUDMUX_MCLK 0x130b0
451 >;
452 };
453
454 pinctrl_enet1: enet1grp {
455 fsl,pins = <
456 MX6SX_PAD_ENET1_MDIO__ENET1_MDIO 0xa0b1
457 MX6SX_PAD_ENET1_MDC__ENET1_MDC 0xa0b1
458 MX6SX_PAD_RGMII1_TXC__ENET1_RGMII_TXC 0xa0b1
459 MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0 0xa0b1
460 MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1 0xa0b1
461 MX6SX_PAD_RGMII1_TD2__ENET1_TX_DATA_2 0xa0b1
462 MX6SX_PAD_RGMII1_TD3__ENET1_TX_DATA_3 0xa0b1
463 MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN 0xa0b1
464 MX6SX_PAD_RGMII1_RXC__ENET1_RX_CLK 0x3081
465 MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0 0x3081
466 MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1 0x3081
467 MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2 0x3081
468 MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081
469 MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081
470 MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M 0x91
471 >;
472 };
473
474 pinctrl_enet_3v3: enet3v3grp {
475 fsl,pins = <
476 MX6SX_PAD_ENET2_COL__GPIO2_IO_6 0x80000000
477 >;
478 };
479
480 pinctrl_enet2: enet2grp {
481 fsl,pins = <
482 MX6SX_PAD_RGMII2_TXC__ENET2_RGMII_TXC 0xa0b9
483 MX6SX_PAD_RGMII2_TD0__ENET2_TX_DATA_0 0xa0b1
484 MX6SX_PAD_RGMII2_TD1__ENET2_TX_DATA_1 0xa0b1
485 MX6SX_PAD_RGMII2_TD2__ENET2_TX_DATA_2 0xa0b1
486 MX6SX_PAD_RGMII2_TD3__ENET2_TX_DATA_3 0xa0b1
487 MX6SX_PAD_RGMII2_TX_CTL__ENET2_TX_EN 0xa0b1
488 MX6SX_PAD_RGMII2_RXC__ENET2_RX_CLK 0x3081
489 MX6SX_PAD_RGMII2_RD0__ENET2_RX_DATA_0 0x3081
490 MX6SX_PAD_RGMII2_RD1__ENET2_RX_DATA_1 0x3081
491 MX6SX_PAD_RGMII2_RD2__ENET2_RX_DATA_2 0x3081
492 MX6SX_PAD_RGMII2_RD3__ENET2_RX_DATA_3 0x3081
493 MX6SX_PAD_RGMII2_RX_CTL__ENET2_RX_EN 0x3081
494 >;
495 };
496
497 pinctrl_gpio_keys: gpio_keysgrp {
498 fsl,pins = <
499 MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059
500 MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059
501 >;
502 };
503
504 pinctrl_i2c1: i2c1grp {
505 fsl,pins = <
506 MX6SX_PAD_GPIO1_IO01__I2C1_SDA 0x4001b8b1
507 MX6SX_PAD_GPIO1_IO00__I2C1_SCL 0x4001b8b1
508 >;
509 };
510
511 pinctrl_i2c4: i2c4grp {
512 fsl,pins = <
513 MX6SX_PAD_CSI_DATA07__I2C4_SDA 0x4001b8b1
514 MX6SX_PAD_CSI_DATA06__I2C4_SCL 0x4001b8b1
515 >;
516 };
517
518 pinctrl_lcd: lcdgrp {
519 fsl,pins = <
520 MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 0x4001b0b0
521 MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1 0x4001b0b0
522 MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2 0x4001b0b0
523 MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3 0x4001b0b0
524 MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4 0x4001b0b0
525 MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5 0x4001b0b0
526 MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6 0x4001b0b0
527 MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7 0x4001b0b0
528 MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8 0x4001b0b0
529 MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9 0x4001b0b0
530 MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10 0x4001b0b0
531 MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11 0x4001b0b0
532 MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12 0x4001b0b0
533 MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13 0x4001b0b0
534 MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14 0x4001b0b0
535 MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15 0x4001b0b0
536 MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16 0x4001b0b0
537 MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17 0x4001b0b0
538 MX6SX_PAD_LCD1_DATA18__LCDIF1_DATA_18 0x4001b0b0
539 MX6SX_PAD_LCD1_DATA19__LCDIF1_DATA_19 0x4001b0b0
540 MX6SX_PAD_LCD1_DATA20__LCDIF1_DATA_20 0x4001b0b0
541 MX6SX_PAD_LCD1_DATA21__LCDIF1_DATA_21 0x4001b0b0
542 MX6SX_PAD_LCD1_DATA22__LCDIF1_DATA_22 0x4001b0b0
543 MX6SX_PAD_LCD1_DATA23__LCDIF1_DATA_23 0x4001b0b0
544 MX6SX_PAD_LCD1_CLK__LCDIF1_CLK 0x4001b0b0
545 MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE 0x4001b0b0
546 MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC 0x4001b0b0
547 MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC 0x4001b0b0
548 MX6SX_PAD_LCD1_RESET__GPIO3_IO_27 0x4001b0b0
549 >;
550 };
551
552 pinctrl_peri_3v3: peri3v3grp {
553 fsl,pins = <
554 MX6SX_PAD_QSPI1A_DATA0__GPIO4_IO_16 0x80000000
555 >;
556 };
557
558 pinctrl_pwm3: pwm3grp-1 {
559 fsl,pins = <
560 MX6SX_PAD_SD1_DATA2__PWM3_OUT 0x110b0
561 >;
562 };
563
564 pinctrl_qspi2: qspi2grp {
565 fsl,pins = <
566 MX6SX_PAD_NAND_WP_B__QSPI2_A_DATA_0 0x70f1
567 MX6SX_PAD_NAND_READY_B__QSPI2_A_DATA_1 0x70f1
568 MX6SX_PAD_NAND_CE0_B__QSPI2_A_DATA_2 0x70f1
569 MX6SX_PAD_NAND_CE1_B__QSPI2_A_DATA_3 0x70f1
570 MX6SX_PAD_NAND_CLE__QSPI2_A_SCLK 0x70f1
571 MX6SX_PAD_NAND_ALE__QSPI2_A_SS0_B 0x70f1
572 MX6SX_PAD_NAND_DATA01__QSPI2_B_DATA_0 0x70f1
573 MX6SX_PAD_NAND_DATA00__QSPI2_B_DATA_1 0x70f1
574 MX6SX_PAD_NAND_WE_B__QSPI2_B_DATA_2 0x70f1
575 MX6SX_PAD_NAND_RE_B__QSPI2_B_DATA_3 0x70f1
576 MX6SX_PAD_NAND_DATA02__QSPI2_B_SCLK 0x70f1
577 MX6SX_PAD_NAND_DATA03__QSPI2_B_SS0_B 0x70f1
578 >;
579 };
580
581 pinctrl_vcc_sd3: vccsd3grp {
582 fsl,pins = <
583 MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059
584 >;
585 };
586
587 pinctrl_uart1: uart1grp {
588 fsl,pins = <
589 MX6SX_PAD_GPIO1_IO04__UART1_TX 0x1b0b1
590 MX6SX_PAD_GPIO1_IO05__UART1_RX 0x1b0b1
591 >;
592 };
593
594 pinctrl_uart5: uart5grp {
595 fsl,pins = <
596 MX6SX_PAD_KEY_ROW3__UART5_RX 0x1b0b1
597 MX6SX_PAD_KEY_COL3__UART5_TX 0x1b0b1
598 MX6SX_PAD_KEY_ROW2__UART5_CTS_B 0x1b0b1
599 MX6SX_PAD_KEY_COL2__UART5_RTS_B 0x1b0b1
600 >;
601 };
602
603 pinctrl_usb_otg1: usbotg1grp {
604 fsl,pins = <
605 MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9 0x10b0
606 >;
607 };
608
609 pinctrl_usb_otg1_id: usbotg1idgrp {
610 fsl,pins = <
611 MX6SX_PAD_GPIO1_IO10__ANATOP_OTG1_ID 0x17059
612 >;
613 };
614
615 pinctrl_usb_otg2: usbot2ggrp {
616 fsl,pins = <
617 MX6SX_PAD_GPIO1_IO12__GPIO1_IO_12 0x10b0
618 >;
619 };
620
621 pinctrl_usdhc2: usdhc2grp {
622 fsl,pins = <
623 MX6SX_PAD_SD2_CMD__USDHC2_CMD 0x17059
624 MX6SX_PAD_SD2_CLK__USDHC2_CLK 0x10059
625 MX6SX_PAD_SD2_DATA0__USDHC2_DATA0 0x17059
626 MX6SX_PAD_SD2_DATA1__USDHC2_DATA1 0x17059
627 MX6SX_PAD_SD2_DATA2__USDHC2_DATA2 0x17059
628 MX6SX_PAD_SD2_DATA3__USDHC2_DATA3 0x17059
629 >;
630 };
631
632 pinctrl_usdhc3: usdhc3grp {
633 fsl,pins = <
634 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x17059
635 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x10059
636 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x17059
637 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x17059
638 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x17059
639 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x17059
640 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x17059
641 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x17059
642 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x17059
643 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x17059
644 MX6SX_PAD_KEY_COL0__GPIO2_IO_10 0x17059 /* CD */
645 MX6SX_PAD_KEY_ROW0__GPIO2_IO_15 0x17059 /* WP */
646 >;
647 };
648
649 pinctrl_usdhc3_100mhz: usdhc3grp-100mhz {
650 fsl,pins = <
651 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x170b9
652 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x100b9
653 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x170b9
654 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x170b9
655 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x170b9
656 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x170b9
657 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x170b9
658 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x170b9
659 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x170b9
660 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x170b9
661 >;
662 };
663
664 pinctrl_usdhc3_200mhz: usdhc3grp-200mhz {
665 fsl,pins = <
666 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x170f9
667 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x100f9
668 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x170f9
669 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x170f9
670 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x170f9
671 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x170f9
672 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x170f9
673 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x170f9
674 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x170f9
675 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x170f9
676 >;
677 };
678
679 pinctrl_usdhc4: usdhc4grp {
680 fsl,pins = <
681 MX6SX_PAD_SD4_CMD__USDHC4_CMD 0x17059
682 MX6SX_PAD_SD4_CLK__USDHC4_CLK 0x10059
683 MX6SX_PAD_SD4_DATA0__USDHC4_DATA0 0x17059
684 MX6SX_PAD_SD4_DATA1__USDHC4_DATA1 0x17059
685 MX6SX_PAD_SD4_DATA2__USDHC4_DATA2 0x17059
686 MX6SX_PAD_SD4_DATA3__USDHC4_DATA3 0x17059
687 MX6SX_PAD_SD4_DATA7__GPIO6_IO_21 0x17059 /* CD */
688 MX6SX_PAD_SD4_DATA6__GPIO6_IO_20 0x17059 /* WP */
689 >;
690 };
691 }; 144 };
692}; 145};
diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi
new file mode 100644
index 000000000000..cef04cef3a80
--- /dev/null
+++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi
@@ -0,0 +1,562 @@
1/*
2 * Copyright (C) 2014 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9/dts-v1/;
10
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13#include "imx6sx.dtsi"
14
15/ {
16 model = "Freescale i.MX6 SoloX SDB Board";
17 compatible = "fsl,imx6sx-sdb", "fsl,imx6sx";
18
19 chosen {
20 stdout-path = &uart1;
21 };
22
23 memory {
24 reg = <0x80000000 0x40000000>;
25 };
26
27 backlight {
28 compatible = "pwm-backlight";
29 pwms = <&pwm3 0 5000000>;
30 brightness-levels = <0 4 8 16 32 64 128 255>;
31 default-brightness-level = <6>;
32 };
33
34 gpio-keys {
35 compatible = "gpio-keys";
36 pinctrl-names = "default";
37 pinctrl-0 = <&pinctrl_gpio_keys>;
38
39 volume-up {
40 label = "Volume Up";
41 gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
42 linux,code = <KEY_VOLUMEUP>;
43 };
44
45 volume-down {
46 label = "Volume Down";
47 gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
48 linux,code = <KEY_VOLUMEDOWN>;
49 };
50 };
51
52 regulators {
53 compatible = "simple-bus";
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 vcc_sd3: regulator@0 {
58 compatible = "regulator-fixed";
59 reg = <0>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&pinctrl_vcc_sd3>;
62 regulator-name = "VCC_SD3";
63 regulator-min-microvolt = <3000000>;
64 regulator-max-microvolt = <3000000>;
65 gpio = <&gpio2 11 GPIO_ACTIVE_HIGH>;
66 enable-active-high;
67 };
68
69 reg_usb_otg1_vbus: regulator@1 {
70 compatible = "regulator-fixed";
71 reg = <1>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&pinctrl_usb_otg1>;
74 regulator-name = "usb_otg1_vbus";
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
78 enable-active-high;
79 };
80
81 reg_usb_otg2_vbus: regulator@2 {
82 compatible = "regulator-fixed";
83 reg = <2>;
84 pinctrl-names = "default";
85 pinctrl-0 = <&pinctrl_usb_otg2>;
86 regulator-name = "usb_otg2_vbus";
87 regulator-min-microvolt = <5000000>;
88 regulator-max-microvolt = <5000000>;
89 gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
90 enable-active-high;
91 };
92
93 reg_psu_5v: regulator@3 {
94 compatible = "regulator-fixed";
95 reg = <3>;
96 regulator-name = "PSU-5V0";
97 regulator-min-microvolt = <5000000>;
98 regulator-max-microvolt = <5000000>;
99 };
100
101 reg_lcd_3v3: regulator@4 {
102 compatible = "regulator-fixed";
103 reg = <4>;
104 regulator-name = "lcd-3v3";
105 gpio = <&gpio3 27 0>;
106 enable-active-high;
107 };
108
109 reg_peri_3v3: regulator@5 {
110 compatible = "regulator-fixed";
111 reg = <5>;
112 pinctrl-names = "default";
113 pinctrl-0 = <&pinctrl_peri_3v3>;
114 regulator-name = "peri_3v3";
115 regulator-min-microvolt = <3300000>;
116 regulator-max-microvolt = <3300000>;
117 gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
118 enable-active-high;
119 regulator-always-on;
120 };
121
122 reg_enet_3v3: regulator@6 {
123 compatible = "regulator-fixed";
124 reg = <6>;
125 pinctrl-names = "default";
126 pinctrl-0 = <&pinctrl_enet_3v3>;
127 regulator-name = "enet_3v3";
128 regulator-min-microvolt = <3300000>;
129 regulator-max-microvolt = <3300000>;
130 gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
131 };
132 };
133
134 sound {
135 compatible = "fsl,imx6sx-sdb-wm8962", "fsl,imx-audio-wm8962";
136 model = "wm8962-audio";
137 ssi-controller = <&ssi2>;
138 audio-codec = <&codec>;
139 audio-routing =
140 "Headphone Jack", "HPOUTL",
141 "Headphone Jack", "HPOUTR",
142 "Ext Spk", "SPKOUTL",
143 "Ext Spk", "SPKOUTR",
144 "AMIC", "MICBIAS",
145 "IN3R", "AMIC";
146 mux-int-port = <2>;
147 mux-ext-port = <6>;
148 };
149};
150
151&audmux {
152 pinctrl-names = "default";
153 pinctrl-0 = <&pinctrl_audmux>;
154 status = "okay";
155};
156
157&fec1 {
158 pinctrl-names = "default";
159 pinctrl-0 = <&pinctrl_enet1>;
160 phy-supply = <&reg_enet_3v3>;
161 phy-mode = "rgmii";
162 phy-handle = <&ethphy1>;
163 status = "okay";
164
165 mdio {
166 #address-cells = <1>;
167 #size-cells = <0>;
168
169 ethphy1: ethernet-phy@1 {
170 reg = <1>;
171 };
172
173 ethphy2: ethernet-phy@2 {
174 reg = <2>;
175 };
176 };
177};
178
179&fec2 {
180 pinctrl-names = "default";
181 pinctrl-0 = <&pinctrl_enet2>;
182 phy-mode = "rgmii";
183 phy-handle = <&ethphy2>;
184 status = "okay";
185};
186
187&i2c4 {
188 clock-frequency = <100000>;
189 pinctrl-names = "default";
190 pinctrl-0 = <&pinctrl_i2c4>;
191 status = "okay";
192
193 codec: wm8962@1a {
194 compatible = "wlf,wm8962";
195 reg = <0x1a>;
196 clocks = <&clks IMX6SX_CLK_AUDIO>;
197 DCVDD-supply = <&vgen4_reg>;
198 DBVDD-supply = <&vgen4_reg>;
199 AVDD-supply = <&vgen4_reg>;
200 CPVDD-supply = <&vgen4_reg>;
201 MICVDD-supply = <&vgen3_reg>;
202 PLLVDD-supply = <&vgen4_reg>;
203 SPKVDD1-supply = <&reg_psu_5v>;
204 SPKVDD2-supply = <&reg_psu_5v>;
205 };
206};
207
208&lcdif1 {
209 pinctrl-names = "default";
210 pinctrl-0 = <&pinctrl_lcd>;
211 lcd-supply = <&reg_lcd_3v3>;
212 display = <&display0>;
213 status = "okay";
214
215 display0: display0 {
216 bits-per-pixel = <16>;
217 bus-width = <24>;
218
219 display-timings {
220 native-mode = <&timing0>;
221 timing0: timing0 {
222 clock-frequency = <33500000>;
223 hactive = <800>;
224 vactive = <480>;
225 hback-porch = <89>;
226 hfront-porch = <164>;
227 vback-porch = <23>;
228 vfront-porch = <10>;
229 hsync-len = <10>;
230 vsync-len = <10>;
231 hsync-active = <0>;
232 vsync-active = <0>;
233 de-active = <1>;
234 pixelclk-active = <0>;
235 };
236 };
237 };
238};
239
240&pwm3 {
241 pinctrl-names = "default";
242 pinctrl-0 = <&pinctrl_pwm3>;
243 status = "okay";
244};
245
246&snvs_poweroff {
247 status = "okay";
248};
249
250&ssi2 {
251 status = "okay";
252};
253
254&uart1 {
255 pinctrl-names = "default";
256 pinctrl-0 = <&pinctrl_uart1>;
257 status = "okay";
258};
259
260&uart5 { /* for bluetooth */
261 pinctrl-names = "default";
262 pinctrl-0 = <&pinctrl_uart5>;
263 fsl,uart-has-rtscts;
264 status = "okay";
265};
266
267&usbotg1 {
268 vbus-supply = <&reg_usb_otg1_vbus>;
269 pinctrl-names = "default";
270 pinctrl-0 = <&pinctrl_usb_otg1_id>;
271 status = "okay";
272};
273
274&usbotg2 {
275 vbus-supply = <&reg_usb_otg2_vbus>;
276 dr_mode = "host";
277 status = "okay";
278};
279
280&usdhc2 {
281 pinctrl-names = "default";
282 pinctrl-0 = <&pinctrl_usdhc2>;
283 non-removable;
284 no-1-8-v;
285 keep-power-in-suspend;
286 enable-sdio-wakeup;
287 status = "okay";
288};
289
290&usdhc3 {
291 pinctrl-names = "default", "state_100mhz", "state_200mhz";
292 pinctrl-0 = <&pinctrl_usdhc3>;
293 pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
294 pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
295 bus-width = <8>;
296 cd-gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
297 wp-gpios = <&gpio2 15 GPIO_ACTIVE_HIGH>;
298 keep-power-in-suspend;
299 enable-sdio-wakeup;
300 vmmc-supply = <&vcc_sd3>;
301 status = "okay";
302};
303
304&usdhc4 {
305 pinctrl-names = "default";
306 pinctrl-0 = <&pinctrl_usdhc4>;
307 cd-gpios = <&gpio6 21 GPIO_ACTIVE_HIGH>;
308 wp-gpios = <&gpio6 20 GPIO_ACTIVE_HIGH>;
309 status = "okay";
310};
311
312&iomuxc {
313 imx6x-sdb {
314 pinctrl_audmux: audmuxgrp {
315 fsl,pins = <
316 MX6SX_PAD_CSI_DATA00__AUDMUX_AUD6_TXC 0x130b0
317 MX6SX_PAD_CSI_DATA01__AUDMUX_AUD6_TXFS 0x130b0
318 MX6SX_PAD_CSI_HSYNC__AUDMUX_AUD6_TXD 0x120b0
319 MX6SX_PAD_CSI_VSYNC__AUDMUX_AUD6_RXD 0x130b0
320 MX6SX_PAD_CSI_PIXCLK__AUDMUX_MCLK 0x130b0
321 >;
322 };
323
324 pinctrl_enet1: enet1grp {
325 fsl,pins = <
326 MX6SX_PAD_ENET1_MDIO__ENET1_MDIO 0xa0b1
327 MX6SX_PAD_ENET1_MDC__ENET1_MDC 0xa0b1
328 MX6SX_PAD_RGMII1_TXC__ENET1_RGMII_TXC 0xa0b1
329 MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0 0xa0b1
330 MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1 0xa0b1
331 MX6SX_PAD_RGMII1_TD2__ENET1_TX_DATA_2 0xa0b1
332 MX6SX_PAD_RGMII1_TD3__ENET1_TX_DATA_3 0xa0b1
333 MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN 0xa0b1
334 MX6SX_PAD_RGMII1_RXC__ENET1_RX_CLK 0x3081
335 MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0 0x3081
336 MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1 0x3081
337 MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2 0x3081
338 MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081
339 MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081
340 MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M 0x91
341 >;
342 };
343
344 pinctrl_enet_3v3: enet3v3grp {
345 fsl,pins = <
346 MX6SX_PAD_ENET2_COL__GPIO2_IO_6 0x80000000
347 >;
348 };
349
350 pinctrl_enet2: enet2grp {
351 fsl,pins = <
352 MX6SX_PAD_RGMII2_TXC__ENET2_RGMII_TXC 0xa0b9
353 MX6SX_PAD_RGMII2_TD0__ENET2_TX_DATA_0 0xa0b1
354 MX6SX_PAD_RGMII2_TD1__ENET2_TX_DATA_1 0xa0b1
355 MX6SX_PAD_RGMII2_TD2__ENET2_TX_DATA_2 0xa0b1
356 MX6SX_PAD_RGMII2_TD3__ENET2_TX_DATA_3 0xa0b1
357 MX6SX_PAD_RGMII2_TX_CTL__ENET2_TX_EN 0xa0b1
358 MX6SX_PAD_RGMII2_RXC__ENET2_RX_CLK 0x3081
359 MX6SX_PAD_RGMII2_RD0__ENET2_RX_DATA_0 0x3081
360 MX6SX_PAD_RGMII2_RD1__ENET2_RX_DATA_1 0x3081
361 MX6SX_PAD_RGMII2_RD2__ENET2_RX_DATA_2 0x3081
362 MX6SX_PAD_RGMII2_RD3__ENET2_RX_DATA_3 0x3081
363 MX6SX_PAD_RGMII2_RX_CTL__ENET2_RX_EN 0x3081
364 >;
365 };
366
367 pinctrl_gpio_keys: gpio_keysgrp {
368 fsl,pins = <
369 MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059
370 MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059
371 >;
372 };
373
374 pinctrl_i2c1: i2c1grp {
375 fsl,pins = <
376 MX6SX_PAD_GPIO1_IO01__I2C1_SDA 0x4001b8b1
377 MX6SX_PAD_GPIO1_IO00__I2C1_SCL 0x4001b8b1
378 >;
379 };
380
381 pinctrl_i2c4: i2c4grp {
382 fsl,pins = <
383 MX6SX_PAD_CSI_DATA07__I2C4_SDA 0x4001b8b1
384 MX6SX_PAD_CSI_DATA06__I2C4_SCL 0x4001b8b1
385 >;
386 };
387
388 pinctrl_lcd: lcdgrp {
389 fsl,pins = <
390 MX6SX_PAD_LCD1_DATA00__LCDIF1_DATA_0 0x4001b0b0
391 MX6SX_PAD_LCD1_DATA01__LCDIF1_DATA_1 0x4001b0b0
392 MX6SX_PAD_LCD1_DATA02__LCDIF1_DATA_2 0x4001b0b0
393 MX6SX_PAD_LCD1_DATA03__LCDIF1_DATA_3 0x4001b0b0
394 MX6SX_PAD_LCD1_DATA04__LCDIF1_DATA_4 0x4001b0b0
395 MX6SX_PAD_LCD1_DATA05__LCDIF1_DATA_5 0x4001b0b0
396 MX6SX_PAD_LCD1_DATA06__LCDIF1_DATA_6 0x4001b0b0
397 MX6SX_PAD_LCD1_DATA07__LCDIF1_DATA_7 0x4001b0b0
398 MX6SX_PAD_LCD1_DATA08__LCDIF1_DATA_8 0x4001b0b0
399 MX6SX_PAD_LCD1_DATA09__LCDIF1_DATA_9 0x4001b0b0
400 MX6SX_PAD_LCD1_DATA10__LCDIF1_DATA_10 0x4001b0b0
401 MX6SX_PAD_LCD1_DATA11__LCDIF1_DATA_11 0x4001b0b0
402 MX6SX_PAD_LCD1_DATA12__LCDIF1_DATA_12 0x4001b0b0
403 MX6SX_PAD_LCD1_DATA13__LCDIF1_DATA_13 0x4001b0b0
404 MX6SX_PAD_LCD1_DATA14__LCDIF1_DATA_14 0x4001b0b0
405 MX6SX_PAD_LCD1_DATA15__LCDIF1_DATA_15 0x4001b0b0
406 MX6SX_PAD_LCD1_DATA16__LCDIF1_DATA_16 0x4001b0b0
407 MX6SX_PAD_LCD1_DATA17__LCDIF1_DATA_17 0x4001b0b0
408 MX6SX_PAD_LCD1_DATA18__LCDIF1_DATA_18 0x4001b0b0
409 MX6SX_PAD_LCD1_DATA19__LCDIF1_DATA_19 0x4001b0b0
410 MX6SX_PAD_LCD1_DATA20__LCDIF1_DATA_20 0x4001b0b0
411 MX6SX_PAD_LCD1_DATA21__LCDIF1_DATA_21 0x4001b0b0
412 MX6SX_PAD_LCD1_DATA22__LCDIF1_DATA_22 0x4001b0b0
413 MX6SX_PAD_LCD1_DATA23__LCDIF1_DATA_23 0x4001b0b0
414 MX6SX_PAD_LCD1_CLK__LCDIF1_CLK 0x4001b0b0
415 MX6SX_PAD_LCD1_ENABLE__LCDIF1_ENABLE 0x4001b0b0
416 MX6SX_PAD_LCD1_VSYNC__LCDIF1_VSYNC 0x4001b0b0
417 MX6SX_PAD_LCD1_HSYNC__LCDIF1_HSYNC 0x4001b0b0
418 MX6SX_PAD_LCD1_RESET__GPIO3_IO_27 0x4001b0b0
419 >;
420 };
421
422 pinctrl_peri_3v3: peri3v3grp {
423 fsl,pins = <
424 MX6SX_PAD_QSPI1A_DATA0__GPIO4_IO_16 0x80000000
425 >;
426 };
427
428 pinctrl_pwm3: pwm3grp-1 {
429 fsl,pins = <
430 MX6SX_PAD_SD1_DATA2__PWM3_OUT 0x110b0
431 >;
432 };
433
434 pinctrl_qspi2: qspi2grp {
435 fsl,pins = <
436 MX6SX_PAD_NAND_WP_B__QSPI2_A_DATA_0 0x70f1
437 MX6SX_PAD_NAND_READY_B__QSPI2_A_DATA_1 0x70f1
438 MX6SX_PAD_NAND_CE0_B__QSPI2_A_DATA_2 0x70f1
439 MX6SX_PAD_NAND_CE1_B__QSPI2_A_DATA_3 0x70f1
440 MX6SX_PAD_NAND_CLE__QSPI2_A_SCLK 0x70f1
441 MX6SX_PAD_NAND_ALE__QSPI2_A_SS0_B 0x70f1
442 MX6SX_PAD_NAND_DATA01__QSPI2_B_DATA_0 0x70f1
443 MX6SX_PAD_NAND_DATA00__QSPI2_B_DATA_1 0x70f1
444 MX6SX_PAD_NAND_WE_B__QSPI2_B_DATA_2 0x70f1
445 MX6SX_PAD_NAND_RE_B__QSPI2_B_DATA_3 0x70f1
446 MX6SX_PAD_NAND_DATA02__QSPI2_B_SCLK 0x70f1
447 MX6SX_PAD_NAND_DATA03__QSPI2_B_SS0_B 0x70f1
448 >;
449 };
450
451 pinctrl_vcc_sd3: vccsd3grp {
452 fsl,pins = <
453 MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059
454 >;
455 };
456
457 pinctrl_uart1: uart1grp {
458 fsl,pins = <
459 MX6SX_PAD_GPIO1_IO04__UART1_TX 0x1b0b1
460 MX6SX_PAD_GPIO1_IO05__UART1_RX 0x1b0b1
461 >;
462 };
463
464 pinctrl_uart5: uart5grp {
465 fsl,pins = <
466 MX6SX_PAD_KEY_ROW3__UART5_RX 0x1b0b1
467 MX6SX_PAD_KEY_COL3__UART5_TX 0x1b0b1
468 MX6SX_PAD_KEY_ROW2__UART5_CTS_B 0x1b0b1
469 MX6SX_PAD_KEY_COL2__UART5_RTS_B 0x1b0b1
470 >;
471 };
472
473 pinctrl_usb_otg1: usbotg1grp {
474 fsl,pins = <
475 MX6SX_PAD_GPIO1_IO09__GPIO1_IO_9 0x10b0
476 >;
477 };
478
479 pinctrl_usb_otg1_id: usbotg1idgrp {
480 fsl,pins = <
481 MX6SX_PAD_GPIO1_IO10__ANATOP_OTG1_ID 0x17059
482 >;
483 };
484
485 pinctrl_usb_otg2: usbot2ggrp {
486 fsl,pins = <
487 MX6SX_PAD_GPIO1_IO12__GPIO1_IO_12 0x10b0
488 >;
489 };
490
491 pinctrl_usdhc2: usdhc2grp {
492 fsl,pins = <
493 MX6SX_PAD_SD2_CMD__USDHC2_CMD 0x17059
494 MX6SX_PAD_SD2_CLK__USDHC2_CLK 0x10059
495 MX6SX_PAD_SD2_DATA0__USDHC2_DATA0 0x17059
496 MX6SX_PAD_SD2_DATA1__USDHC2_DATA1 0x17059
497 MX6SX_PAD_SD2_DATA2__USDHC2_DATA2 0x17059
498 MX6SX_PAD_SD2_DATA3__USDHC2_DATA3 0x17059
499 >;
500 };
501
502 pinctrl_usdhc3: usdhc3grp {
503 fsl,pins = <
504 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x17059
505 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x10059
506 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x17059
507 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x17059
508 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x17059
509 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x17059
510 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x17059
511 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x17059
512 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x17059
513 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x17059
514 MX6SX_PAD_KEY_COL0__GPIO2_IO_10 0x17059 /* CD */
515 MX6SX_PAD_KEY_ROW0__GPIO2_IO_15 0x17059 /* WP */
516 >;
517 };
518
519 pinctrl_usdhc3_100mhz: usdhc3grp-100mhz {
520 fsl,pins = <
521 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x170b9
522 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x100b9
523 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x170b9
524 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x170b9
525 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x170b9
526 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x170b9
527 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x170b9
528 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x170b9
529 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x170b9
530 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x170b9
531 >;
532 };
533
534 pinctrl_usdhc3_200mhz: usdhc3grp-200mhz {
535 fsl,pins = <
536 MX6SX_PAD_SD3_CMD__USDHC3_CMD 0x170f9
537 MX6SX_PAD_SD3_CLK__USDHC3_CLK 0x100f9
538 MX6SX_PAD_SD3_DATA0__USDHC3_DATA0 0x170f9
539 MX6SX_PAD_SD3_DATA1__USDHC3_DATA1 0x170f9
540 MX6SX_PAD_SD3_DATA2__USDHC3_DATA2 0x170f9
541 MX6SX_PAD_SD3_DATA3__USDHC3_DATA3 0x170f9
542 MX6SX_PAD_SD3_DATA4__USDHC3_DATA4 0x170f9
543 MX6SX_PAD_SD3_DATA5__USDHC3_DATA5 0x170f9
544 MX6SX_PAD_SD3_DATA6__USDHC3_DATA6 0x170f9
545 MX6SX_PAD_SD3_DATA7__USDHC3_DATA7 0x170f9
546 >;
547 };
548
549 pinctrl_usdhc4: usdhc4grp {
550 fsl,pins = <
551 MX6SX_PAD_SD4_CMD__USDHC4_CMD 0x17059
552 MX6SX_PAD_SD4_CLK__USDHC4_CLK 0x10059
553 MX6SX_PAD_SD4_DATA0__USDHC4_DATA0 0x17059
554 MX6SX_PAD_SD4_DATA1__USDHC4_DATA1 0x17059
555 MX6SX_PAD_SD4_DATA2__USDHC4_DATA2 0x17059
556 MX6SX_PAD_SD4_DATA3__USDHC4_DATA3 0x17059
557 MX6SX_PAD_SD4_DATA7__GPIO6_IO_21 0x17059 /* CD */
558 MX6SX_PAD_SD4_DATA6__GPIO6_IO_20 0x17059 /* WP */
559 >;
560 };
561 };
562};
diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
index 7a24fee1e7ae..708175d59b9c 100644
--- a/arch/arm/boot/dts/imx6sx.dtsi
+++ b/arch/arm/boot/dts/imx6sx.dtsi
@@ -88,6 +88,7 @@
88 interrupt-controller; 88 interrupt-controller;
89 reg = <0x00a01000 0x1000>, 89 reg = <0x00a01000 0x1000>,
90 <0x00a00100 0x100>; 90 <0x00a00100 0x100>;
91 interrupt-parent = <&intc>;
91 }; 92 };
92 93
93 clocks { 94 clocks {
@@ -131,7 +132,7 @@
131 #address-cells = <1>; 132 #address-cells = <1>;
132 #size-cells = <1>; 133 #size-cells = <1>;
133 compatible = "simple-bus"; 134 compatible = "simple-bus";
134 interrupt-parent = <&intc>; 135 interrupt-parent = <&gpc>;
135 ranges; 136 ranges;
136 137
137 pmu { 138 pmu {
@@ -666,7 +667,7 @@
666 #size-cells = <1>; 667 #size-cells = <1>;
667 ranges = <0 0x020cc000 0x4000>; 668 ranges = <0 0x020cc000 0x4000>;
668 669
669 snvs-rtc-lp@34 { 670 snvs_rtc: snvs-rtc-lp@34 {
670 compatible = "fsl,sec-v4.0-mon-rtc-lp"; 671 compatible = "fsl,sec-v4.0-mon-rtc-lp";
671 reg = <0x34 0x58>; 672 reg = <0x34 0x58>;
672 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; 673 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
@@ -700,7 +701,10 @@
700 gpc: gpc@020dc000 { 701 gpc: gpc@020dc000 {
701 compatible = "fsl,imx6sx-gpc", "fsl,imx6q-gpc"; 702 compatible = "fsl,imx6sx-gpc", "fsl,imx6q-gpc";
702 reg = <0x020dc000 0x4000>; 703 reg = <0x020dc000 0x4000>;
704 interrupt-controller;
705 #interrupt-cells = <3>;
703 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; 706 interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
707 interrupt-parent = <&intc>;
704 }; 708 };
705 709
706 iomuxc: iomuxc@020e0000 { 710 iomuxc: iomuxc@020e0000 {
@@ -763,6 +767,7 @@
763 fsl,usbmisc = <&usbmisc 2>; 767 fsl,usbmisc = <&usbmisc 2>;
764 phy_type = "hsic"; 768 phy_type = "hsic";
765 fsl,anatop = <&anatop>; 769 fsl,anatop = <&anatop>;
770 dr_mode = "host";
766 status = "disabled"; 771 status = "disabled";
767 }; 772 };
768 773
diff --git a/arch/arm/boot/dts/kirkwood-nas2big.dts b/arch/arm/boot/dts/kirkwood-nas2big.dts
new file mode 100644
index 000000000000..7427ec50b829
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nas2big.dts
@@ -0,0 +1,143 @@
1/*
2 * Device Tree file for LaCie 2Big NAS
3 *
4 * Copyright (C) 2015 Seagate
5 *
6 * Author: Simon Guinot <simon.guinot@sequanux.org>
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11*/
12
13/dts-v1/;
14
15#include "kirkwood-netxbig.dtsi"
16
17/ {
18 model = "LaCie 2Big NAS";
19 compatible = "lacie,nas2big", "lacie,netxbig", "marvell,kirkwood-88f6282", "marvell,kirkwood";
20
21 memory {
22 device_type = "memory";
23 reg = <0x00000000 0x10000000>;
24 };
25
26 chosen {
27 bootargs = "console=ttyS0,115200n8";
28 stdout-path = &uart0;
29 };
30
31 mbus {
32 pcie-controller {
33 status = "okay";
34
35 pcie@1,0 {
36 status = "okay";
37 };
38 };
39 };
40
41 ocp@f1000000 {
42 rtc@10300 {
43 /* The on-chip RTC is not powered (no supercap). */
44 status = "disabled";
45 };
46 spi@10600 {
47 /*
48 * A NAND flash is used instead of an SPI flash for
49 * the other netxbig-compatible boards.
50 */
51 status = "disabled";
52 };
53 };
54
55 fan {
56 /*
57 * An I2C fan controller (GMT G762) is used but alarm is
58 * wired to a separate GPIO.
59 */
60 compatible = "gpio-fan";
61 alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
62 };
63
64 regulators: regulators {
65 status = "okay";
66 compatible = "simple-bus";
67 #address-cells = <1>;
68 #size-cells = <0>;
69 pinctrl-names = "default";
70
71 regulator@2 {
72 compatible = "regulator-fixed";
73 reg = <2>;
74 regulator-name = "hdd1power";
75 regulator-min-microvolt = <5000000>;
76 regulator-max-microvolt = <5000000>;
77 enable-active-high;
78 regulator-always-on;
79 regulator-boot-on;
80 gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
81 };
82 clocks {
83 g762_clk: g762-oscillator {
84 compatible = "fixed-clock";
85 #clock-cells = <0>;
86 clock-frequency = <32768>;
87 };
88 };
89 };
90};
91
92&mdio {
93 status = "okay";
94
95 ethphy0: ethernet-phy@0 {
96 reg = <0>;
97 };
98};
99
100&i2c0 {
101 status = "okay";
102
103 /*
104 * An external I2C RTC (Dallas DS1337S+) is used. This allows
105 * to power-up the board on an RTC alarm. The external RTC can
106 * be kept powered, even when the SoC is off.
107 */
108 rtc@68 {
109 compatible = "dallas,ds1307";
110 reg = <0x68>;
111 interrupts = <43>;
112 };
113 g762@3e {
114 compatible = "gmt,g762";
115 reg = <0x3e>;
116 clocks = <&g762_clk>;
117 };
118};
119
120&nand {
121 chip-delay = <50>;
122 status = "okay";
123
124 partition@0 {
125 label = "U-Boot";
126 reg = <0x0 0x100000>;
127 };
128
129 partition@100000 {
130 label = "uImage";
131 reg = <0x100000 0x1000000>;
132 };
133
134 partition@1100000 {
135 label = "root";
136 reg = <0x1100000 0x8000000>;
137 };
138
139 partition@9100000 {
140 label = "unused";
141 reg = <0x9100000 0x6f00000>;
142 };
143};
diff --git a/arch/arm/boot/dts/kirkwood-net2big.dts b/arch/arm/boot/dts/kirkwood-net2big.dts
index 53dc37a3b687..13a44773b6df 100644
--- a/arch/arm/boot/dts/kirkwood-net2big.dts
+++ b/arch/arm/boot/dts/kirkwood-net2big.dts
@@ -27,6 +27,11 @@
27 device_type = "memory"; 27 device_type = "memory";
28 reg = <0x00000000 0x10000000>; 28 reg = <0x00000000 0x10000000>;
29 }; 29 };
30
31 fan {
32 compatible = "gpio-fan";
33 alarm-gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
34 };
30}; 35};
31 36
32&regulators { 37&regulators {
diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index b67ede515bcd..548441384d2a 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -150,5 +150,25 @@
150 interrupts = <0 15 1>; 150 interrupts = <0 15 1>;
151 status = "disabled"; 151 status = "disabled";
152 }; 152 };
153
154 spifc: spi@c1108c80 {
155 compatible = "amlogic,meson6-spifc";
156 reg = <0xc1108c80 0x80>;
157 #address-cells = <1>;
158 #size-cells = <0>;
159 clocks = <&clk81>;
160 status = "disabled";
161 };
162
163 ethmac: ethernet@c9410000 {
164 compatible = "amlogic,meson6-dwmac", "snps,dwmac";
165 reg = <0xc9410000 0x10000
166 0xc1108108 0x4>;
167 interrupts = <0 8 1>;
168 interrupt-names = "macirq";
169 clocks = <&clk81>;
170 clock-names = "stmmaceth";
171 status = "disabled";
172 };
153 }; 173 };
154}; /* end of / */ 174}; /* end of / */
diff --git a/arch/arm/boot/dts/meson6-atv1200.dts b/arch/arm/boot/dts/meson6-atv1200.dts
index d7d351a68944..1237faa63ce6 100644
--- a/arch/arm/boot/dts/meson6-atv1200.dts
+++ b/arch/arm/boot/dts/meson6-atv1200.dts
@@ -64,3 +64,7 @@
64&uart_AO { 64&uart_AO {
65 status = "okay"; 65 status = "okay";
66}; 66};
67
68&ethmac {
69 status = "okay";
70};
diff --git a/arch/arm/boot/dts/meson8-minix-neo-x8.dts b/arch/arm/boot/dts/meson8-minix-neo-x8.dts
new file mode 100644
index 000000000000..4f536bb1f002
--- /dev/null
+++ b/arch/arm/boot/dts/meson8-minix-neo-x8.dts
@@ -0,0 +1,128 @@
1/*
2 * Copyright 2014 Beniamino Galvani <b.galvani@gmail.com>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44#include <dt-bindings/gpio/gpio.h>
45#include "meson8.dtsi"
46
47/ {
48 model = "MINIX NEO-X8";
49 compatible = "minix,neo-x8", "amlogic,meson8";
50
51 aliases {
52 serial0 = &uart_AO;
53 };
54
55 memory {
56 reg = <0x40000000 0x80000000>;
57 };
58
59 gpio-leds {
60 compatible = "gpio-leds";
61
62 blue {
63 label = "x8:blue:power";
64 gpios = <&gpio_ao GPIO_TEST_N GPIO_ACTIVE_HIGH>;
65 };
66 };
67};
68
69&uart_AO {
70 status = "okay";
71 pinctrl-0 = <&uart_ao_a_pins>;
72 pinctrl-names = "default";
73};
74
75&i2c_AO {
76 status = "okay";
77 pinctrl-0 = <&i2c_ao_pins>;
78 pinctrl-names = "default";
79
80 pmic@32 {
81 compatible = "ricoh,rn5t618";
82 reg = <0x32>;
83
84 regulators {
85 };
86 };
87
88 rtc@51 {
89 compatible = "nxp,pcf8563";
90 reg = <0x51>;
91 };
92};
93
94&spifc {
95 status = "okay";
96 pinctrl-0 = <&spi_nor_pins>;
97 pinctrl-names = "default";
98
99 spi-flash@0 {
100 compatible = "mxicy,mx25l1606e";
101 #address-cells = <1>;
102 #size-cells = <1>;
103 reg = <0>;
104 spi-max-frequency = <30000000>;
105
106 partition@0 {
107 label = "boot";
108 reg = <0x0 0x100000>;
109 };
110
111 partition@100000 {
112 label = "env";
113 reg = <0x100000 0x10000>;
114 };
115 };
116};
117
118&ir_receiver {
119 status = "okay";
120 pinctrl-0 = <&ir_recv_pins>;
121 pinctrl-names = "default";
122};
123
124&ethmac {
125 status = "okay";
126 pinctrl-0 = <&eth_pins>;
127 pnictrl-names = "default";
128};
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 1f442a7fe03b..a2ddcb8c545a 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -43,6 +43,7 @@
43 * OTHER DEALINGS IN THE SOFTWARE. 43 * OTHER DEALINGS IN THE SOFTWARE.
44 */ 44 */
45 45
46#include <dt-bindings/gpio/meson8-gpio.h>
46/include/ "meson.dtsi" 47/include/ "meson.dtsi"
47 48
48/ { 49/ {
@@ -89,4 +90,71 @@
89 compatible = "fixed-clock"; 90 compatible = "fixed-clock";
90 clock-frequency = <141666666>; 91 clock-frequency = <141666666>;
91 }; 92 };
93
94 pinctrl: pinctrl@c1109880 {
95 compatible = "amlogic,meson8-pinctrl";
96 reg = <0xc1109880 0x10>;
97 #address-cells = <1>;
98 #size-cells = <1>;
99 ranges;
100
101 gpio: banks@c11080b0 {
102 reg = <0xc11080b0 0x28>,
103 <0xc11080e8 0x18>,
104 <0xc1108120 0x18>,
105 <0xc1108030 0x30>;
106 reg-names = "mux", "pull", "pull-enable", "gpio";
107 gpio-controller;
108 #gpio-cells = <2>;
109 };
110
111 gpio_ao: ao-bank@c1108030 {
112 reg = <0xc8100014 0x4>,
113 <0xc810002c 0x4>,
114 <0xc8100024 0x8>;
115 reg-names = "mux", "pull", "gpio";
116 gpio-controller;
117 #gpio-cells = <2>;
118 };
119
120 uart_ao_a_pins: uart_ao_a {
121 mux {
122 groups = "uart_tx_ao_a", "uart_rx_ao_a";
123 function = "uart_ao";
124 };
125 };
126
127 i2c_ao_pins: i2c_mst_ao {
128 mux {
129 groups = "i2c_mst_sck_ao", "i2c_mst_sda_ao";
130 function = "i2c_mst_ao";
131 };
132 };
133
134 spi_nor_pins: nor {
135 mux {
136 groups = "nor_d", "nor_q", "nor_c", "nor_cs";
137 function = "nor";
138 };
139 };
140
141 ir_recv_pins: remote {
142 mux {
143 groups = "remote_input";
144 function = "remote";
145 };
146 };
147
148 eth_pins: ethernet {
149 mux {
150 groups = "eth_tx_clk_50m", "eth_tx_en",
151 "eth_txd1", "eth_txd0",
152 "eth_rx_clk_in", "eth_rx_dv",
153 "eth_rxd1", "eth_rxd0", "eth_mdio",
154 "eth_mdc";
155 function = "ethernet";
156 };
157 };
158 };
159
92}; /* end of / */ 160}; /* end of / */
diff --git a/arch/arm/boot/dts/mt6589.dtsi b/arch/arm/boot/dts/mt6589.dtsi
index 106b61b10030..88b3cb128698 100644
--- a/arch/arm/boot/dts/mt6589.dtsi
+++ b/arch/arm/boot/dts/mt6589.dtsi
@@ -138,5 +138,10 @@
138 clocks = <&uart_clk>; 138 clocks = <&uart_clk>;
139 status = "disabled"; 139 status = "disabled";
140 }; 140 };
141
142 wdt: watchdog@010000000 {
143 compatible = "mediatek,mt6589-wdt";
144 reg = <0x10000000 0x44>;
145 };
141 }; 146 };
142}; 147};
diff --git a/arch/arm/boot/dts/nspire-classic.dtsi b/arch/arm/boot/dts/nspire-classic.dtsi
index 9565199bce7a..4907c5085d4b 100644
--- a/arch/arm/boot/dts/nspire-classic.dtsi
+++ b/arch/arm/boot/dts/nspire-classic.dtsi
@@ -51,6 +51,11 @@
51 compatible = "lsi,nspire-classic-ahb-divider"; 51 compatible = "lsi,nspire-classic-ahb-divider";
52}; 52};
53 53
54
55&vbus_reg {
56 gpio = <&gpio 5 0>;
57};
58
54/ { 59/ {
55 memory { 60 memory {
56 device_type = "memory"; 61 device_type = "memory";
diff --git a/arch/arm/boot/dts/nspire-cx.dts b/arch/arm/boot/dts/nspire-cx.dts
index 375b924f60d8..08e0b81b3385 100644
--- a/arch/arm/boot/dts/nspire-cx.dts
+++ b/arch/arm/boot/dts/nspire-cx.dts
@@ -69,6 +69,10 @@
69 0x0709001d 0x070a0033 >; 69 0x0709001d 0x070a0033 >;
70}; 70};
71 71
72&vbus_reg {
73 gpio = <&gpio 2 0>;
74};
75
72/ { 76/ {
73 model = "TI-NSPIRE CX"; 77 model = "TI-NSPIRE CX";
74 compatible = "ti,nspire-cx"; 78 compatible = "ti,nspire-cx";
diff --git a/arch/arm/boot/dts/nspire.dtsi b/arch/arm/boot/dts/nspire.dtsi
index a22ffe633b49..390c91aea16d 100644
--- a/arch/arm/boot/dts/nspire.dtsi
+++ b/arch/arm/boot/dts/nspire.dtsi
@@ -54,6 +54,20 @@
54 clocks = <&ahb_clk>; 54 clocks = <&ahb_clk>;
55 }; 55 };
56 56
57 usb_phy: usb_phy {
58 compatible = "usb-nop-xceiv";
59 };
60
61 vbus_reg: vbus_reg {
62 compatible = "regulator-fixed";
63
64 regulator-name = "USB VBUS output";
65 regulator-type = "voltage";
66
67 regulator-min-microvolt = <5000000>;
68 regulator-max-microvolt = <5000000>;
69 };
70
57 ahb { 71 ahb {
58 compatible = "simple-bus"; 72 compatible = "simple-bus";
59 #address-cells = <1>; 73 #address-cells = <1>;
@@ -65,8 +79,12 @@
65 }; 79 };
66 80
67 usb0: usb@B0000000 { 81 usb0: usb@B0000000 {
82 compatible = "lsi,zevio-usb";
68 reg = <0xB0000000 0x1000>; 83 reg = <0xB0000000 0x1000>;
69 interrupts = <8>; 84 interrupts = <8>;
85
86 usb-phy = <&usb_phy>;
87 vbus-supply = <&vbus_reg>;
70 }; 88 };
71 89
72 usb1: usb@B4000000 { 90 usb1: usb@B4000000 {
@@ -105,8 +123,11 @@
105 ranges; 123 ranges;
106 124
107 gpio: gpio@90000000 { 125 gpio: gpio@90000000 {
126 compatible = "lsi,zevio-gpio";
108 reg = <0x90000000 0x1000>; 127 reg = <0x90000000 0x1000>;
109 interrupts = <7>; 128 interrupts = <7>;
129 gpio-controller;
130 #gpio-cells = <2>;
110 }; 131 };
111 132
112 fast_timer: timer@90010000 { 133 fast_timer: timer@90010000 {
diff --git a/arch/arm/boot/dts/omap2420.dtsi b/arch/arm/boot/dts/omap2420.dtsi
index e2b2e93d7b61..5b9a376cc31e 100644
--- a/arch/arm/boot/dts/omap2420.dtsi
+++ b/arch/arm/boot/dts/omap2420.dtsi
@@ -14,47 +14,65 @@
14 compatible = "ti,omap2420", "ti,omap2"; 14 compatible = "ti,omap2420", "ti,omap2";
15 15
16 ocp { 16 ocp {
17 prcm: prcm@48008000 { 17 l4: l4@48000000 {
18 compatible = "ti,omap2-prcm"; 18 compatible = "ti,omap2-l4", "simple-bus";
19 reg = <0x48008000 0x1000>; 19 #address-cells = <1>;
20 #size-cells = <1>;
21 ranges = <0 0x48000000 0x100000>;
20 22
21 prcm_clocks: clocks { 23 prcm: prcm@8000 {
22 #address-cells = <1>; 24 compatible = "ti,omap2-prcm";
23 #size-cells = <0>; 25 reg = <0x8000 0x1000>;
24 };
25 26
26 prcm_clockdomains: clockdomains { 27 prcm_clocks: clocks {
27 }; 28 #address-cells = <1>;
28 }; 29 #size-cells = <0>;
30 };
29 31
30 scrm: scrm@48000000 { 32 prcm_clockdomains: clockdomains {
31 compatible = "ti,omap2-scrm"; 33 };
32 reg = <0x48000000 0x1000>; 34 };
33 35
34 scrm_clocks: clocks { 36 scm: scm@0 {
37 compatible = "ti,omap2-scm", "simple-bus";
38 reg = <0x0 0x1000>;
35 #address-cells = <1>; 39 #address-cells = <1>;
36 #size-cells = <0>; 40 #size-cells = <1>;
41 ranges = <0 0x0 0x1000>;
42
43 omap2420_pmx: pinmux@30 {
44 compatible = "ti,omap2420-padconf",
45 "pinctrl-single";
46 reg = <0x30 0x0113>;
47 #address-cells = <1>;
48 #size-cells = <0>;
49 pinctrl-single,register-width = <8>;
50 pinctrl-single,function-mask = <0x3f>;
51 };
52
53 scm_conf: scm_conf@270 {
54 compatible = "syscon";
55 reg = <0x270 0x100>;
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 scm_clocks: clocks {
60 #address-cells = <1>;
61 #size-cells = <0>;
62 };
63 };
64
65 scm_clockdomains: clockdomains {
66 };
37 }; 67 };
38 68
39 scrm_clockdomains: clockdomains { 69 counter32k: counter@4000 {
70 compatible = "ti,omap-counter32k";
71 reg = <0x4000 0x20>;
72 ti,hwmods = "counter_32k";
40 }; 73 };
41 }; 74 };
42 75
43 counter32k: counter@48004000 {
44 compatible = "ti,omap-counter32k";
45 reg = <0x48004000 0x20>;
46 ti,hwmods = "counter_32k";
47 };
48
49 omap2420_pmx: pinmux@48000030 {
50 compatible = "ti,omap2420-padconf", "pinctrl-single";
51 reg = <0x48000030 0x0113>;
52 #address-cells = <1>;
53 #size-cells = <0>;
54 pinctrl-single,register-width = <8>;
55 pinctrl-single,function-mask = <0x3f>;
56 };
57
58 gpio1: gpio@48018000 { 76 gpio1: gpio@48018000 {
59 compatible = "ti,omap2-gpio"; 77 compatible = "ti,omap2-gpio";
60 reg = <0x48018000 0x200>; 78 reg = <0x48018000 0x200>;
diff --git a/arch/arm/boot/dts/omap2430-clocks.dtsi b/arch/arm/boot/dts/omap2430-clocks.dtsi
index 805f75df1cf2..93fed68839b9 100644
--- a/arch/arm/boot/dts/omap2430-clocks.dtsi
+++ b/arch/arm/boot/dts/omap2430-clocks.dtsi
@@ -8,12 +8,12 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11&scrm_clocks { 11&scm_clocks {
12 mcbsp3_mux_fck: mcbsp3_mux_fck { 12 mcbsp3_mux_fck: mcbsp3_mux_fck {
13 #clock-cells = <0>; 13 #clock-cells = <0>;
14 compatible = "ti,composite-mux-clock"; 14 compatible = "ti,composite-mux-clock";
15 clocks = <&func_96m_ck>, <&mcbsp_clks>; 15 clocks = <&func_96m_ck>, <&mcbsp_clks>;
16 reg = <0x02e8>; 16 reg = <0x78>;
17 }; 17 };
18 18
19 mcbsp3_fck: mcbsp3_fck { 19 mcbsp3_fck: mcbsp3_fck {
@@ -27,7 +27,7 @@
27 compatible = "ti,composite-mux-clock"; 27 compatible = "ti,composite-mux-clock";
28 clocks = <&func_96m_ck>, <&mcbsp_clks>; 28 clocks = <&func_96m_ck>, <&mcbsp_clks>;
29 ti,bit-shift = <2>; 29 ti,bit-shift = <2>;
30 reg = <0x02e8>; 30 reg = <0x78>;
31 }; 31 };
32 32
33 mcbsp4_fck: mcbsp4_fck { 33 mcbsp4_fck: mcbsp4_fck {
@@ -41,7 +41,7 @@
41 compatible = "ti,composite-mux-clock"; 41 compatible = "ti,composite-mux-clock";
42 clocks = <&func_96m_ck>, <&mcbsp_clks>; 42 clocks = <&func_96m_ck>, <&mcbsp_clks>;
43 ti,bit-shift = <4>; 43 ti,bit-shift = <4>;
44 reg = <0x02e8>; 44 reg = <0x78>;
45 }; 45 };
46 46
47 mcbsp5_fck: mcbsp5_fck { 47 mcbsp5_fck: mcbsp5_fck {
diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
index 0dc8de2782b1..11a7963be003 100644
--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -14,60 +14,73 @@
14 compatible = "ti,omap2430", "ti,omap2"; 14 compatible = "ti,omap2430", "ti,omap2";
15 15
16 ocp { 16 ocp {
17 prcm: prcm@49006000 { 17 l4_wkup: l4_wkup@49000000 {
18 compatible = "ti,omap2-prcm"; 18 compatible = "ti,omap2-l4-wkup", "simple-bus";
19 reg = <0x49006000 0x1000>; 19 #address-cells = <1>;
20 #size-cells = <1>;
21 ranges = <0 0x49000000 0x31000>;
20 22
21 prcm_clocks: clocks { 23 prcm: prcm@6000 {
22 #address-cells = <1>; 24 compatible = "ti,omap2-prcm";
23 #size-cells = <0>; 25 reg = <0x6000 0x1000>;
24 };
25 26
26 prcm_clockdomains: clockdomains { 27 prcm_clocks: clocks {
27 }; 28 #address-cells = <1>;
28 }; 29 #size-cells = <0>;
29 30 };
30 scrm: scrm@49002000 {
31 compatible = "ti,omap2-scrm";
32 reg = <0x49002000 0x1000>;
33 31
34 scrm_clocks: clocks { 32 prcm_clockdomains: clockdomains {
35 #address-cells = <1>; 33 };
36 #size-cells = <0>;
37 }; 34 };
38 35
39 scrm_clockdomains: clockdomains { 36 scm: scm@2000 {
37 compatible = "ti,omap2-scm", "simple-bus";
38 reg = <0x2000 0x1000>;
39 #address-cells = <1>;
40 #size-cells = <1>;
41 ranges = <0 0x2000 0x1000>;
42
43 omap2430_pmx: pinmux@30 {
44 compatible = "ti,omap2430-padconf",
45 "pinctrl-single";
46 reg = <0x30 0x0154>;
47 #address-cells = <1>;
48 #size-cells = <0>;
49 pinctrl-single,register-width = <8>;
50 pinctrl-single,function-mask = <0x3f>;
51 };
52
53 scm_conf: scm_conf@270 {
54 compatible = "syscon";
55 reg = <0x270 0x240>;
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 scm_clocks: clocks {
60 #address-cells = <1>;
61 #size-cells = <0>;
62 };
63
64 pbias_regulator: pbias_regulator {
65 compatible = "ti,pbias-omap";
66 reg = <0x230 0x4>;
67 syscon = <&scm_conf>;
68 pbias_mmc_reg: pbias_mmc_omap2430 {
69 regulator-name = "pbias_mmc_omap2430";
70 regulator-min-microvolt = <1800000>;
71 regulator-max-microvolt = <3000000>;
72 };
73 };
74 };
75
76 scm_clockdomains: clockdomains {
77 };
40 }; 78 };
41 };
42
43 counter32k: counter@49020000 {
44 compatible = "ti,omap-counter32k";
45 reg = <0x49020000 0x20>;
46 ti,hwmods = "counter_32k";
47 };
48
49 omap2430_pmx: pinmux@49002030 {
50 compatible = "ti,omap2430-padconf", "pinctrl-single";
51 reg = <0x49002030 0x0154>;
52 #address-cells = <1>;
53 #size-cells = <0>;
54 pinctrl-single,register-width = <8>;
55 pinctrl-single,function-mask = <0x3f>;
56 };
57
58 omap2_scm_general: tisyscon@49002270 {
59 compatible = "syscon";
60 reg = <0x49002270 0x240>;
61 };
62 79
63 pbias_regulator: pbias_regulator { 80 counter32k: counter@20000 {
64 compatible = "ti,pbias-omap"; 81 compatible = "ti,omap-counter32k";
65 reg = <0x230 0x4>; 82 reg = <0x20000 0x20>;
66 syscon = <&omap2_scm_general>; 83 ti,hwmods = "counter_32k";
67 pbias_mmc_reg: pbias_mmc_omap2430 {
68 regulator-name = "pbias_mmc_omap2430";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <3000000>;
71 }; 84 };
72 }; 85 };
73 86
diff --git a/arch/arm/boot/dts/omap24xx-clocks.dtsi b/arch/arm/boot/dts/omap24xx-clocks.dtsi
index a1365ca926eb..63965b876973 100644
--- a/arch/arm/boot/dts/omap24xx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap24xx-clocks.dtsi
@@ -7,13 +7,13 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10&scrm_clocks { 10&scm_clocks {
11 mcbsp1_mux_fck: mcbsp1_mux_fck { 11 mcbsp1_mux_fck: mcbsp1_mux_fck {
12 #clock-cells = <0>; 12 #clock-cells = <0>;
13 compatible = "ti,composite-mux-clock"; 13 compatible = "ti,composite-mux-clock";
14 clocks = <&func_96m_ck>, <&mcbsp_clks>; 14 clocks = <&func_96m_ck>, <&mcbsp_clks>;
15 ti,bit-shift = <2>; 15 ti,bit-shift = <2>;
16 reg = <0x0274>; 16 reg = <0x4>;
17 }; 17 };
18 18
19 mcbsp1_fck: mcbsp1_fck { 19 mcbsp1_fck: mcbsp1_fck {
@@ -27,7 +27,7 @@
27 compatible = "ti,composite-mux-clock"; 27 compatible = "ti,composite-mux-clock";
28 clocks = <&func_96m_ck>, <&mcbsp_clks>; 28 clocks = <&func_96m_ck>, <&mcbsp_clks>;
29 ti,bit-shift = <6>; 29 ti,bit-shift = <6>;
30 reg = <0x0274>; 30 reg = <0x4>;
31 }; 31 };
32 32
33 mcbsp2_fck: mcbsp2_fck { 33 mcbsp2_fck: mcbsp2_fck {
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index 8cdca51b6984..7c4dca122a91 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -60,7 +60,6 @@
60 ti,model = "omap3beagle"; 60 ti,model = "omap3beagle";
61 61
62 ti,mcbsp = <&mcbsp2>; 62 ti,mcbsp = <&mcbsp2>;
63 ti,codec = <&twl_audio>;
64 }; 63 };
65 64
66 gpio_keys { 65 gpio_keys {
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 6d4c46be8c39..a5474113cd50 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -71,7 +71,6 @@
71 ti,model = "omap3beagle"; 71 ti,model = "omap3beagle";
72 72
73 ti,mcbsp = <&mcbsp2>; 73 ti,mcbsp = <&mcbsp2>;
74 ti,codec = <&twl_audio>;
75 }; 74 };
76 75
77 gpio_keys { 76 gpio_keys {
@@ -378,3 +377,55 @@
378 }; 377 };
379 }; 378 };
380}; 379};
380
381&gpmc {
382 status = "ok";
383 ranges = <0 0 0x30000000 0x1000000>; /* CS0 space, 16MB */
384
385 /* Chip select 0 */
386 nand@0,0 {
387 reg = <0 0 4>; /* NAND I/O window, 4 bytes */
388 interrupts = <20>;
389 ti,nand-ecc-opt = "ham1";
390 nand-bus-width = <16>;
391 #address-cells = <1>;
392 #size-cells = <1>;
393
394 gpmc,device-width = <2>;
395 gpmc,cs-on-ns = <0>;
396 gpmc,cs-rd-off-ns = <36>;
397 gpmc,cs-wr-off-ns = <36>;
398 gpmc,adv-on-ns = <6>;
399 gpmc,adv-rd-off-ns = <24>;
400 gpmc,adv-wr-off-ns = <36>;
401 gpmc,oe-on-ns = <6>;
402 gpmc,oe-off-ns = <48>;
403 gpmc,we-on-ns = <6>;
404 gpmc,we-off-ns = <30>;
405 gpmc,rd-cycle-ns = <72>;
406 gpmc,wr-cycle-ns = <72>;
407 gpmc,access-ns = <54>;
408 gpmc,wr-access-ns = <30>;
409
410 partition@0 {
411 label = "X-Loader";
412 reg = <0 0x80000>;
413 };
414 partition@80000 {
415 label = "U-Boot";
416 reg = <0x80000 0x1e0000>;
417 };
418 partition@1c0000 {
419 label = "U-Boot Env";
420 reg = <0x260000 0x20000>;
421 };
422 partition@280000 {
423 label = "Kernel";
424 reg = <0x280000 0x400000>;
425 };
426 partition@780000 {
427 label = "Filesystem";
428 reg = <0x680000 0xf980000>;
429 };
430 };
431};
diff --git a/arch/arm/boot/dts/omap3-cm-t3517.dts b/arch/arm/boot/dts/omap3-cm-t3517.dts
index 0ab748cf7749..f5b5a1d96cd7 100644
--- a/arch/arm/boot/dts/omap3-cm-t3517.dts
+++ b/arch/arm/boot/dts/omap3-cm-t3517.dts
@@ -133,6 +133,16 @@
133 non-removable; 133 non-removable;
134 bus-width = <4>; 134 bus-width = <4>;
135 cap-power-off-card; 135 cap-power-off-card;
136
137 #address-cells = <1>;
138 #size-cells = <0>;
139 wlcore: wlcore@2 {
140 compatible = "ti,wl1271";
141 reg = <2>;
142 interrupt-parent = <&gpio5>;
143 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 145 */
144 ref-clock-frequency = <38400000>;
145 };
136}; 146};
137 147
138&dss { 148&dss {
diff --git a/arch/arm/boot/dts/omap3-cm-t3730.dts b/arch/arm/boot/dts/omap3-cm-t3730.dts
index 46eadb21b5ef..2294f5b0aa10 100644
--- a/arch/arm/boot/dts/omap3-cm-t3730.dts
+++ b/arch/arm/boot/dts/omap3-cm-t3730.dts
@@ -73,6 +73,16 @@
73 non-removable; 73 non-removable;
74 bus-width = <4>; 74 bus-width = <4>;
75 cap-power-off-card; 75 cap-power-off-card;
76
77 #address-cells = <1>;
78 #size-cells = <0>;
79 wlcore: wlcore@2 {
80 compatible = "ti,wl1271";
81 reg = <2>;
82 interrupt-parent = <&gpio5>;
83 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
84 ref-clock-frequency = <38400000>;
85 };
76}; 86};
77 87
78&dss { 88&dss {
diff --git a/arch/arm/boot/dts/omap3-cm-t3x30.dtsi b/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
index d9e92b654f85..046cd7733c4f 100644
--- a/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
+++ b/arch/arm/boot/dts/omap3-cm-t3x30.dtsi
@@ -16,7 +16,6 @@
16 ti,model = "cm-t35"; 16 ti,model = "cm-t35";
17 17
18 ti,mcbsp = <&mcbsp2>; 18 ti,mcbsp = <&mcbsp2>;
19 ti,codec = <&twl_audio>;
20 }; 19 };
21}; 20};
22 21
diff --git a/arch/arm/boot/dts/omap3-devkit8000.dts b/arch/arm/boot/dts/omap3-devkit8000.dts
index 169037e5ff53..134d3f27a8ec 100644
--- a/arch/arm/boot/dts/omap3-devkit8000.dts
+++ b/arch/arm/boot/dts/omap3-devkit8000.dts
@@ -48,7 +48,6 @@
48 ti,model = "devkit8000"; 48 ti,model = "devkit8000";
49 49
50 ti,mcbsp = <&mcbsp2>; 50 ti,mcbsp = <&mcbsp2>;
51 ti,codec = <&twl_audio>;
52 ti,audio-routing = 51 ti,audio-routing =
53 "Ext Spk", "PREDRIVEL", 52 "Ext Spk", "PREDRIVEL",
54 "Ext Spk", "PREDRIVER", 53 "Ext Spk", "PREDRIVER",
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi
index 127f3e7c10c4..346552b94d9f 100644
--- a/arch/arm/boot/dts/omap3-evm-common.dtsi
+++ b/arch/arm/boot/dts/omap3-evm-common.dtsi
@@ -106,6 +106,16 @@
106 non-removable; 106 non-removable;
107 bus-width = <4>; 107 bus-width = <4>;
108 cap-power-off-card; 108 cap-power-off-card;
109
110 #address-cells = <1>;
111 #size-cells = <0>;
112 wlcore: wlcore@2 {
113 compatible = "ti,wl1271";
114 reg = <2>;
115 interrupt-parent = <&gpio5>;
116 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 149 */
117 ref-clock-frequency = <38400000>;
118 };
109}; 119};
110 120
111&twl_gpio { 121&twl_gpio {
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index fb3a69604ed5..b9f68817bd6e 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -46,7 +46,6 @@
46 ti,model = "gta04"; 46 ti,model = "gta04";
47 47
48 ti,mcbsp = <&mcbsp2>; 48 ti,mcbsp = <&mcbsp2>;
49 ti,codec = <&twl_audio>;
50 }; 49 };
51 50
52 spi_lcd { 51 spi_lcd {
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi
index 8a63ad2286aa..d5e5cd449b16 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -22,7 +22,6 @@
22 compatible = "ti,omap-twl4030"; 22 compatible = "ti,omap-twl4030";
23 ti,model = "igep2"; 23 ti,model = "igep2";
24 ti,mcbsp = <&mcbsp2>; 24 ti,mcbsp = <&mcbsp2>;
25 ti,codec = <&twl_audio>;
26 }; 25 };
27 26
28 vdd33: regulator-vdd33 { 27 vdd33: regulator-vdd33 {
diff --git a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
index cc8bd0cd8cf8..72f7cdc091fb 100644
--- a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
+++ b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
@@ -42,4 +42,13 @@
42 vmmc-supply = <&lbep5clwmc_wlen>; 42 vmmc-supply = <&lbep5clwmc_wlen>;
43 bus-width = <4>; 43 bus-width = <4>;
44 non-removable; 44 non-removable;
45
46 #address-cells = <1>;
47 #size-cells = <0>;
48 wlcore: wlcore@2 {
49 compatible = "ti,wl1835";
50 reg = <2>;
51 interrupt-parent = <&gpio6>;
52 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; /* gpio 177 */
53 };
45}; 54};
diff --git a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
index 9326b282c94a..b899e341874a 100644
--- a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
+++ b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
@@ -64,4 +64,13 @@
64 vmmc-supply = <&lbep5clwmc_wlen>; 64 vmmc-supply = <&lbep5clwmc_wlen>;
65 bus-width = <4>; 65 bus-width = <4>;
66 non-removable; 66 non-removable;
67
68 #address-cells = <1>;
69 #size-cells = <0>;
70 wlcore: wlcore@2 {
71 compatible = "ti,wl1835";
72 reg = <2>;
73 interrupt-parent = <&gpio5>;
74 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; /* gpio 136 */
75 };
67}; 76};
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
index e81fb651d5d0..e63133304a34 100644
--- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
+++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
@@ -38,7 +38,6 @@
38 ti,model = "lilly-a83x"; 38 ti,model = "lilly-a83x";
39 39
40 ti,mcbsp = <&mcbsp2>; 40 ti,mcbsp = <&mcbsp2>;
41 ti,codec = <&twl_audio>;
42 }; 41 };
43 42
44 reg_vcc3: vcc3 { 43 reg_vcc3: vcc3 {
diff --git a/arch/arm/boot/dts/omap3-n9.dts b/arch/arm/boot/dts/omap3-n9.dts
index 9938b5dc1909..f2e213931e09 100644
--- a/arch/arm/boot/dts/omap3-n9.dts
+++ b/arch/arm/boot/dts/omap3-n9.dts
@@ -16,3 +16,40 @@
16 model = "Nokia N9"; 16 model = "Nokia N9";
17 compatible = "nokia,omap3-n9", "ti,omap36xx", "ti,omap3"; 17 compatible = "nokia,omap3-n9", "ti,omap36xx", "ti,omap3";
18}; 18};
19
20&i2c2 {
21 smia_1: camera@10 {
22 compatible = "nokia,smia";
23 reg = <0x10>;
24 /* No reset gpio */
25 vana-supply = <&vaux3>;
26 clocks = <&isp 0>;
27 clock-frequency = <9600000>;
28 nokia,nvm-size = <(16 * 64)>;
29 port {
30 smia_1_1: endpoint {
31 link-frequencies = /bits/ 64 <199200000 210000000 499200000>;
32 clock-lanes = <0>;
33 data-lanes = <1 2>;
34 remote-endpoint = <&csi2a_ep>;
35 };
36 };
37 };
38};
39
40&isp {
41 vdd-csiphy1-supply = <&vaux2>;
42 vdd-csiphy2-supply = <&vaux2>;
43 ports {
44 port@2 {
45 reg = <2>;
46 csi2a_ep: endpoint {
47 remote-endpoint = <&smia_1_1>;
48 clock-lanes = <2>;
49 data-lanes = <1 3>;
50 crc = <1>;
51 lane-polarities = <1 1 1>;
52 };
53 };
54 };
55};
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 2cab149b191c..a29315833ecd 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -9,9 +9,23 @@
9 9
10/dts-v1/; 10/dts-v1/;
11 11
12#include "omap34xx-hs.dtsi" 12#include "omap34xx.dtsi"
13#include <dt-bindings/input/input.h> 13#include <dt-bindings/input/input.h>
14 14
15/*
16 * Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
17 * for omap AES HW crypto support. When linux kernel try to access memory of AES
18 * blocks then kernel receive "Unhandled fault: external abort on non-linefetch"
19 * and crash. Until somebody fix omap-aes.c and omap_hwmod_3xxx_data.c code (no
20 * crash anymore) omap AES support will be disabled for all Nokia N900 devices.
21 * There is "unofficial" version of bootloader which enables AES in L3 firewall
22 * but it is not widely used and to prevent kernel crash rather AES is disabled.
23 * There is also no runtime detection code if AES is disabled in L3 firewall...
24 */
25&aes {
26 status = "disabled";
27};
28
15/ { 29/ {
16 model = "Nokia N900"; 30 model = "Nokia N900";
17 compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3"; 31 compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3";
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi
index c41db94ee9c2..800b379d368d 100644
--- a/arch/arm/boot/dts/omap3-n950-n9.dtsi
+++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi
@@ -8,7 +8,7 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include "omap36xx-hs.dtsi" 11#include "omap36xx.dtsi"
12 12
13/ { 13/ {
14 cpus { 14 cpus {
diff --git a/arch/arm/boot/dts/omap3-n950.dts b/arch/arm/boot/dts/omap3-n950.dts
index 261c5589bfa3..0885b34d5d7d 100644
--- a/arch/arm/boot/dts/omap3-n950.dts
+++ b/arch/arm/boot/dts/omap3-n950.dts
@@ -16,3 +16,40 @@
16 model = "Nokia N950"; 16 model = "Nokia N950";
17 compatible = "nokia,omap3-n950", "ti,omap36xx", "ti,omap3"; 17 compatible = "nokia,omap3-n950", "ti,omap36xx", "ti,omap3";
18}; 18};
19
20&i2c2 {
21 smia_1: camera@10 {
22 compatible = "nokia,smia";
23 reg = <0x10>;
24 /* No reset gpio */
25 vana-supply = <&vaux3>;
26 clocks = <&isp 0>;
27 clock-frequency = <9600000>;
28 nokia,nvm-size = <(16 * 64)>;
29 port {
30 smia_1_1: endpoint {
31 link-frequencies = /bits/ 64 <210000000 333600000 398400000>;
32 clock-lanes = <0>;
33 data-lanes = <1 2>;
34 remote-endpoint = <&csi2a_ep>;
35 };
36 };
37 };
38};
39
40&isp {
41 vdd-csiphy1-supply = <&vaux2>;
42 vdd-csiphy2-supply = <&vaux2>;
43 ports {
44 port@2 {
45 reg = <2>;
46 csi2a_ep: endpoint {
47 remote-endpoint = <&smia_1_1>;
48 clock-lanes = <2>;
49 data-lanes = <3 1>;
50 crc = <1>;
51 lane-polarities = <1 1 1>;
52 };
53 };
54 };
55};
diff --git a/arch/arm/boot/dts/omap3-overo-base.dtsi b/arch/arm/boot/dts/omap3-overo-base.dtsi
index d36bf0250a05..18e1649681c1 100644
--- a/arch/arm/boot/dts/omap3-overo-base.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-base.dtsi
@@ -27,7 +27,6 @@
27 ti,model = "overo"; 27 ti,model = "overo";
28 28
29 ti,mcbsp = <&mcbsp2>; 29 ti,mcbsp = <&mcbsp2>;
30 ti,codec = <&twl_audio>;
31 }; 30 };
32 31
33 /* HS USB Port 2 Power */ 32 /* HS USB Port 2 Power */
diff --git a/arch/arm/boot/dts/omap3-pandora-1ghz.dts b/arch/arm/boot/dts/omap3-pandora-1ghz.dts
new file mode 100644
index 000000000000..9619a28dfd7d
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-pandora-1ghz.dts
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 2015
3 * Nikolaus Schaller <hns@goldelico.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10/*
11 * device tree for OpenPandora 1GHz with DM3730
12 */
13
14/dts-v1/;
15
16#include "omap36xx.dtsi"
17#include "omap3-pandora-common.dtsi"
18
19/ {
20 model = "Pandora Handheld Console 1GHz";
21
22 compatible = "ti,omap36xx", "ti,omap3";
23};
24
25&omap3_pmx_core2 {
26
27 pinctrl-names = "default";
28 pinctrl-0 = <
29 &hsusb2_2_pins
30 &control_pins
31 >;
32
33 hsusb2_2_pins: pinmux_hsusb2_2_pins {
34 pinctrl-single,pins = <
35 OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
36 OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
37 OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
38 OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
39 OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
40 OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
41 >;
42 };
43
44 mmc3_pins: pinmux_mmc3_pins {
45 pinctrl-single,pins = <
46 OMAP3630_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_clk.sdmmc3_clk */
47 OMAP3630_CORE2_IOPAD(0x25da, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_ctl.sdmmc3_cmd */
48 OMAP3630_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d3.sdmmc3_dat3 */
49 OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d4.sdmmc3_dat0 */
50 OMAP3630_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */
51 OMAP3630_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d6.sdmmc3_dat2 */
52 >;
53 };
54
55 control_pins: pinmux_control_pins {
56 pinctrl-single,pins = <
57 OMAP3630_CORE2_IOPAD(0x25dc, PIN_INPUT_PULLDOWN | MUX_MODE4) /* etk_d0.gpio_14 = HP_SHUTDOWN */
58 OMAP3630_CORE2_IOPAD(0x25de, PIN_OUTPUT | MUX_MODE4) /* etk_d1.gpio_15 = BT_SHUTDOWN */
59 OMAP3630_CORE2_IOPAD(0x25e0, PIN_OUTPUT | MUX_MODE4) /* etk_d2.gpio_16 = RESET_USB_HOST */
60 OMAP3630_CORE2_IOPAD(0x25ea, PIN_INPUT | MUX_MODE4) /* etk_d7.gpio_21 = WIFI IRQ */
61 OMAP3630_CORE2_IOPAD(0x25ec, PIN_OUTPUT | MUX_MODE4) /* etk_d8.gpio_22 = MSECURE */
62 OMAP3630_CORE2_IOPAD(0x25ee, PIN_OUTPUT | MUX_MODE4) /* etk_d9.gpio_23 = WIFI_POWER */
63 OMAP3_WKUP_IOPAD(0x2a54, PIN_INPUT | MUX_MODE4) /* reserved.gpio_127 = MMC2_WP */
64 OMAP3_WKUP_IOPAD(0x2a56, PIN_INPUT | MUX_MODE4) /* reserved.gpio_126 = MMC1_WP */
65 OMAP3_WKUP_IOPAD(0x2a58, PIN_OUTPUT | MUX_MODE4) /* reserved.gpio_128 = LED_MMC1 */
66 OMAP3_WKUP_IOPAD(0x2a5a, PIN_OUTPUT | MUX_MODE4) /* reserved.gpio_129 = LED_MMC2 */
67
68 >;
69 };
70};
diff --git a/arch/arm/boot/dts/omap3-pandora-600mhz.dts b/arch/arm/boot/dts/omap3-pandora-600mhz.dts
new file mode 100644
index 000000000000..fb803a70a2bb
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-pandora-600mhz.dts
@@ -0,0 +1,65 @@
1/*
2 * Copyright (C) 2015
3 * Nikolaus Schaller <hns@goldelico.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9
10/*
11 * device tree for OpenPandora with OMAP3530
12 */
13
14/dts-v1/;
15
16#include "omap34xx.dtsi"
17#include "omap3-pandora-common.dtsi"
18
19/ {
20 model = "Pandora Handheld Console";
21
22 compatible = "ti,omap3";
23};
24
25&omap3_pmx_core2 {
26
27 pinctrl-names = "default";
28 pinctrl-0 = <
29 &hsusb2_2_pins
30 &control_pins
31 >;
32
33 hsusb2_2_pins: pinmux_hsusb2_2_pins {
34 pinctrl-single,pins = <
35 OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
36 OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
37 OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
38 OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
39 OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
40 OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
41 >;
42 };
43
44 mmc3_pins: pinmux_mmc3_pins {
45 pinctrl-single,pins = <
46 OMAP3430_CORE2_IOPAD(0x25d8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_clk.sdmmc3_clk */
47 OMAP3430_CORE2_IOPAD(0x25da, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_ctl.sdmmc3_cmd */
48 OMAP3430_CORE2_IOPAD(0x25e2, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d3.sdmmc3_dat3 */
49 OMAP3430_CORE2_IOPAD(0x25e4, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d4.sdmmc3_dat0 */
50 OMAP3430_CORE2_IOPAD(0x25e6, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */
51 OMAP3430_CORE2_IOPAD(0x25e8, PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d6.sdmmc3_dat2 */
52 >;
53 };
54
55 control_pins: pinmux_control_pins {
56 pinctrl-single,pins = <
57 OMAP3430_CORE2_IOPAD(0x25dc, PIN_INPUT_PULLDOWN | MUX_MODE4) /* etk_d0.gpio_14 = HP_SHUTDOWN */
58 OMAP3430_CORE2_IOPAD(0x25de, PIN_OUTPUT | MUX_MODE4) /* etk_d1.gpio_15 = BT_SHUTDOWN */
59 OMAP3430_CORE2_IOPAD(0x25e0, PIN_OUTPUT | MUX_MODE4) /* etk_d2.gpio_16 = RESET_USB_HOST */
60 OMAP3430_CORE2_IOPAD(0x25ea, PIN_INPUT | MUX_MODE4) /* etk_d7.gpio_21 = WIFI IRQ */
61 OMAP3430_CORE2_IOPAD(0x25ec, PIN_OUTPUT | MUX_MODE4) /* etk_d8.gpio_22 = MSECURE */
62 OMAP3430_CORE2_IOPAD(0x25ee, PIN_OUTPUT | MUX_MODE4) /* etk_d9.gpio_23 = WIFI_POWER */
63 >;
64 };
65};
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
new file mode 100644
index 000000000000..782ab1ff1d08
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -0,0 +1,640 @@
1/*
2 * Copyright (C) 2015
3 * Nikolaus Schaller <hns@goldelico.com>
4 *
5 * Common device tree include for OpenPandora devices.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <dt-bindings/input/input.h>
13
14/ {
15 cpus {
16 cpu@0 {
17 cpu0-supply = <&vcc>;
18 };
19 };
20
21 memory {
22 device_type = "memory";
23 reg = <0x80000000 0x20000000>; /* 512 MB */
24 };
25
26 aliases {
27 display0 = &lcd;
28 };
29
30 tv: connector@1 {
31 compatible = "connector-analog-tv";
32 label = "tv";
33
34 port {
35 tv_connector_in: endpoint {
36 remote-endpoint = <&venc_out>;
37 };
38 };
39 };
40
41 gpio-leds {
42
43 compatible = "gpio-leds";
44
45 pinctrl-names = "default";
46 pinctrl-0 = <&led_pins>;
47
48 led@1 {
49 label = "pandora::sd1";
50 gpios = <&gpio5 0 GPIO_ACTIVE_HIGH>; /* GPIO_128 */
51 linux,default-trigger = "mmc0";
52 default-state = "off";
53 };
54
55 led@2 {
56 label = "pandora::sd2";
57 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; /* GPIO_129 */
58 linux,default-trigger = "mmc1";
59 default-state = "off";
60 };
61
62 led@3 {
63 label = "pandora::bluetooth";
64 gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>; /* GPIO_158 */
65 linux,default-trigger = "heartbeat";
66 default-state = "off";
67 };
68
69 led@4 {
70 label = "pandora::wifi";
71 gpios = <&gpio5 31 GPIO_ACTIVE_HIGH>; /* GPIO_159 */
72 linux,default-trigger = "mmc2";
73 default-state = "off";
74 };
75 };
76
77 gpio-keys {
78 compatible = "gpio-keys";
79
80 pinctrl-names = "default";
81 pinctrl-0 = <&button_pins>;
82
83 up-button {
84 label = "up";
85 linux,code = <KEY_UP>;
86 gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* GPIO_110 */
87 gpio-key,wakeup;
88 };
89
90 down-button {
91 label = "down";
92 linux,code = <KEY_DOWN>;
93 gpios = <&gpio4 7 GPIO_ACTIVE_LOW>; /* GPIO_103 */
94 gpio-key,wakeup;
95 };
96
97 left-button {
98 label = "left";
99 linux,code = <KEY_LEFT>;
100 gpios = <&gpio4 0 GPIO_ACTIVE_LOW>; /* GPIO_96 */
101 gpio-key,wakeup;
102 };
103
104 right-button {
105 label = "right";
106 linux,code = <KEY_RIGHT>;
107 gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; /* GPIO_98 */
108 gpio-key,wakeup;
109 };
110
111 pageup-button {
112 label = "game 1";
113 linux,code = <KEY_PAGEUP>;
114 gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; /* GPIO_109 */
115 gpio-key,wakeup;
116 };
117
118 pagedown-button {
119 label = "game 3";
120 linux,code = <KEY_PAGEDOWN>;
121 gpios = <&gpio4 10 GPIO_ACTIVE_LOW>; /* GPIO_106 */
122 gpio-key,wakeup;
123 };
124
125 home-button {
126 label = "game 4";
127 linux,code = <KEY_HOME>;
128 gpios = <&gpio4 5 GPIO_ACTIVE_LOW>; /* GPIO_101 */
129 gpio-key,wakeup;
130 };
131
132 end-button {
133 label = "game 2";
134 linux,code = <KEY_END>;
135 gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; /* GPIO_111 */
136 gpio-key,wakeup;
137 };
138
139 right-shift {
140 label = "l";
141 linux,code = <KEY_RIGHTSHIFT>;
142 gpios = <&gpio4 6 GPIO_ACTIVE_LOW>; /* GPIO_102 */
143 gpio-key,wakeup;
144 };
145
146 kp-plus {
147 label = "l2";
148 linux,code = <KEY_KPPLUS>;
149 gpios = <&gpio4 1 GPIO_ACTIVE_LOW>; /* GPIO_97 */
150 gpio-key,wakeup;
151 };
152
153 right-ctrl {
154 label = "r";
155 linux,code = <KEY_RIGHTCTRL>;
156 gpios = <&gpio4 9 GPIO_ACTIVE_LOW>; /* GPIO_105 */
157 gpio-key,wakeup;
158 };
159
160 kp-minus {
161 label = "r2";
162 linux,code = <KEY_KPMINUS>;
163 gpios = <&gpio4 11 GPIO_ACTIVE_LOW>; /* GPIO_107 */
164 gpio-key,wakeup;
165 };
166
167 left-ctrl {
168 label = "ctrl";
169 linux,code = <KEY_LEFTCTRL>;
170 gpios = <&gpio4 8 GPIO_ACTIVE_LOW>; /* GPIO_104 */
171 gpio-key,wakeup;
172 };
173
174 menu {
175 label = "menu";
176 linux,code = <KEY_MENU>;
177 gpios = <&gpio4 3 GPIO_ACTIVE_LOW>; /* GPIO_99 */
178 gpio-key,wakeup;
179 };
180
181 hold {
182 label = "hold";
183 linux,code = <KEY_COFFEE>;
184 gpios = <&gpio6 16 GPIO_ACTIVE_LOW>; /* GPIO_176 */
185 gpio-key,wakeup;
186 };
187
188 left-alt {
189 label = "alt";
190 linux,code = <KEY_LEFTALT>;
191 gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>; /* GPIO_100 */
192 gpio-key,wakeup;
193 };
194
195 lid {
196 label = "lid";
197 linux,code = <0x00>; /* SW_LID lid shut */
198 linux,input-type = <0x05>; /* EV_SW */
199 gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>; /* GPIO_108 */
200 };
201 };
202};
203
204&omap3_pmx_core {
205
206 mmc1_pins: pinmux_mmc1_pins {
207 pinctrl-single,pins = <
208 OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */
209 OMAP3_CORE1_IOPAD(0x2146, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */
210 OMAP3_CORE1_IOPAD(0x2148, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */
211 OMAP3_CORE1_IOPAD(0x214a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */
212 OMAP3_CORE1_IOPAD(0x214c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */
213 OMAP3_CORE1_IOPAD(0x214e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */
214 >;
215 };
216
217 mmc2_pins: pinmux_mmc2_pins {
218 pinctrl-single,pins = <
219 OMAP3_CORE1_IOPAD(0x2158, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */
220 OMAP3_CORE1_IOPAD(0x215a, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */
221 OMAP3_CORE1_IOPAD(0x215c, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */
222 OMAP3_CORE1_IOPAD(0x215e, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */
223 OMAP3_CORE1_IOPAD(0x2160, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */
224 OMAP3_CORE1_IOPAD(0x2162, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */
225 OMAP3_CORE1_IOPAD(0x2164, PIN_OUTPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat4.sdmmc2_dirdat0 */
226 OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat5.sdmmc2_dirdat1 */
227 OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat6.sdmmc2_dircmd */
228 OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE1) /* sdmmc2_dat7.sdmmc2_clkin */
229 >;
230 };
231
232 dss_dpi_pins: pinmux_dss_dpi_pins {
233 pinctrl-single,pins = <
234 OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */
235 OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */
236 OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */
237 OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */
238 OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0) /* dss_data0.dss_data0 */
239 OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0) /* dss_data1.dss_data1 */
240 OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0) /* dss_data2.dss_data2 */
241 OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0) /* dss_data3.dss_data3 */
242 OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0) /* dss_data4.dss_data4 */
243 OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0) /* dss_data5.dss_data5 */
244 OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */
245 OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */
246 OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */
247 OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */
248 OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */
249 OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */
250 OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */
251 OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */
252 OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */
253 OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */
254 OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */
255 OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */
256 OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE0) /* dss_data18.dss_data18 */
257 OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE0) /* dss_data19.dss_data19 */
258 OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE0) /* dss_data20.dss_data20 */
259 OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE0) /* dss_data21.dss_data21 */
260 OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE0) /* dss_data22.dss_data22 */
261 OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE0) /* dss_data23.dss_data23 */
262 OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE4) /* GPIO_157 = lcd reset */
263 >;
264 };
265
266 uart3_pins: pinmux_uart3_pins {
267 pinctrl-single,pins = <
268 OMAP3_CORE1_IOPAD(0x219e, PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */
269 OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */
270 >;
271 };
272
273 led_pins: pinmux_leds_pins {
274 pinctrl-single,pins = <
275 OMAP3_CORE1_IOPAD(0x2154, PIN_OUTPUT | MUX_MODE4) /* GPIO_128 */
276 OMAP3_CORE1_IOPAD(0x2156, PIN_OUTPUT | MUX_MODE4) /* GPIO_129 */
277 OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE4) /* GPIO_158 */
278 OMAP3_CORE1_IOPAD(0x2192, PIN_OUTPUT | MUX_MODE4) /* GPIO_159 */
279 >;
280 };
281
282 button_pins: pinmux_button_pins {
283 pinctrl-single,pins = <
284 OMAP3_CORE1_IOPAD(0x2110, PIN_INPUT | MUX_MODE4) /* GPIO_96 */
285 OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT | MUX_MODE4) /* GPIO_97 */
286 OMAP3_CORE1_IOPAD(0x2114, PIN_INPUT | MUX_MODE4) /* GPIO_98 */
287 OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT | MUX_MODE4) /* GPIO_99 */
288 OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT | MUX_MODE4) /* GPIO_100 */
289 OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT | MUX_MODE4) /* GPIO_101 */
290 OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT | MUX_MODE4) /* GPIO_102 */
291 OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT | MUX_MODE4) /* GPIO_103 */
292 OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT | MUX_MODE4) /* GPIO_104 */
293 OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT | MUX_MODE4) /* GPIO_105 */
294 OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT | MUX_MODE4) /* GPIO_106 */
295 OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT | MUX_MODE4) /* GPIO_107 */
296 OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT | MUX_MODE4) /* GPIO_108 */
297 OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT | MUX_MODE4) /* GPIO_109 */
298 OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT | MUX_MODE4) /* GPIO_110 */
299 OMAP3_CORE1_IOPAD(0x212e, PIN_INPUT | MUX_MODE4) /* GPIO_111 */
300 OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT | MUX_MODE4) /* GPIO_176 */
301 >;
302 };
303
304 penirq_pins: pinmux_penirq_pins {
305 pinctrl-single,pins = <
306 /* here we could enable to wakeup the cpu from suspend by a pen touch */
307 OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT | MUX_MODE4) /* GPIO_94 */
308 >;
309 };
310
311};
312
313&omap3_pmx_core2 {
314 /* define in CPU specific file that includes this one
315 * use either OMAP3430_CORE2_IOPAD() or OMAP3630_CORE2_IOPAD()
316 */
317};
318
319&i2c1 {
320 clock-frequency = <2600000>;
321
322 twl: twl@48 {
323 reg = <0x48>;
324 interrupts = <7>; /* SYS_NIRQ cascaded to intc */
325 interrupt-parent = <&intc>;
326
327 twl_power: power {
328 compatible = "ti,twl4030-power-reset";
329 ti,use_poweroff;
330 };
331
332 twl_audio: audio {
333 compatible = "ti,twl4030-audio";
334
335 codec {
336 ti,ramp_delay_value = <3>;
337 };
338 };
339 };
340};
341
342#include "twl4030.dtsi"
343#include "twl4030_omap3.dtsi"
344
345&twl_keypad {
346 keypad,num-rows = <8>;
347 keypad,num-columns = <6>;
348 linux,keymap = <
349 MATRIX_KEY(0, 0, KEY_9)
350 MATRIX_KEY(0, 1, KEY_8)
351 MATRIX_KEY(0, 2, KEY_I)
352 MATRIX_KEY(0, 3, KEY_J)
353 MATRIX_KEY(0, 4, KEY_N)
354 MATRIX_KEY(0, 5, KEY_M)
355 MATRIX_KEY(1, 0, KEY_0)
356 MATRIX_KEY(1, 1, KEY_7)
357 MATRIX_KEY(1, 2, KEY_U)
358 MATRIX_KEY(1, 3, KEY_H)
359 MATRIX_KEY(1, 4, KEY_B)
360 MATRIX_KEY(1, 5, KEY_SPACE)
361 MATRIX_KEY(2, 0, KEY_BACKSPACE)
362 MATRIX_KEY(2, 1, KEY_6)
363 MATRIX_KEY(2, 2, KEY_Y)
364 MATRIX_KEY(2, 3, KEY_G)
365 MATRIX_KEY(2, 4, KEY_V)
366 MATRIX_KEY(2, 5, KEY_FN)
367 MATRIX_KEY(3, 0, KEY_O)
368 MATRIX_KEY(3, 1, KEY_5)
369 MATRIX_KEY(3, 2, KEY_T)
370 MATRIX_KEY(3, 3, KEY_F)
371 MATRIX_KEY(3, 4, KEY_C)
372 MATRIX_KEY(4, 0, KEY_P)
373 MATRIX_KEY(4, 1, KEY_4)
374 MATRIX_KEY(4, 2, KEY_R)
375 MATRIX_KEY(4, 3, KEY_D)
376 MATRIX_KEY(4, 4, KEY_X)
377 MATRIX_KEY(5, 0, KEY_K)
378 MATRIX_KEY(5, 1, KEY_3)
379 MATRIX_KEY(5, 2, KEY_E)
380 MATRIX_KEY(5, 3, KEY_S)
381 MATRIX_KEY(5, 4, KEY_Z)
382 MATRIX_KEY(6, 0, KEY_L)
383 MATRIX_KEY(6, 1, KEY_2)
384 MATRIX_KEY(6, 2, KEY_W)
385 MATRIX_KEY(6, 3, KEY_A)
386 MATRIX_KEY(6, 4, KEY_RIGHTBRACE)
387 MATRIX_KEY(7, 0, KEY_ENTER)
388 MATRIX_KEY(7, 1, KEY_1)
389 MATRIX_KEY(7, 2, KEY_Q)
390 MATRIX_KEY(7, 3, KEY_LEFTSHIFT)
391 MATRIX_KEY(7, 4, KEY_LEFTBRACE )
392 >;
393};
394
395/* backup battery charger */
396&charger {
397 ti,bb-uvolt = <3200000>;
398 ti,bb-uamp = <150>;
399};
400
401/* MMC2 */
402&vmmc2 {
403 regulator-min-microvolt = <1850000>;
404 regulator-max-microvolt = <3150000>;
405};
406
407/* LCD */
408&vaux1 {
409 regulator-min-microvolt = <3000000>;
410 regulator-max-microvolt = <3000000>;
411};
412
413/* USB Host PHY */
414&vaux2 {
415 regulator-min-microvolt = <1800000>;
416 regulator-max-microvolt = <1800000>;
417};
418
419/* available on expansion connector */
420&vaux3 {
421 regulator-min-microvolt = <2800000>;
422 regulator-max-microvolt = <2800000>;
423};
424
425/* ADS7846 and nubs */
426&vaux4 {
427 regulator-min-microvolt = <2800000>;
428 regulator-max-microvolt = <2800000>;
429};
430
431/* power audio DAC and LID sensor */
432&vsim {
433 regulator-min-microvolt = <2800000>;
434 regulator-max-microvolt = <2800000>;
435 regulator-always-on;
436};
437
438&i2c2 {
439 clock-frequency = <100000>;
440 /* no clients so we should disable clock */
441};
442
443&i2c3 {
444 clock-frequency = <100000>;
445
446 bq27500@55 {
447 compatible = "ti,bq27500";
448 reg = <0x55>;
449 };
450
451};
452
453&usb_otg_hs {
454 interface-type = <0>;
455 usb-phy = <&usb2_phy>;
456 phys = <&usb2_phy>;
457 phy-names = "usb2-phy";
458 mode = <3>;
459 power = <50>;
460};
461
462&mmc1 {
463 pinctrl-names = "default";
464 pinctrl-0 = <&mmc1_pins>;
465 vmmc-supply = <&vmmc1>;
466 bus-width = <4>;
467 cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
468 wp-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>; /* GPIO_126 */
469};
470
471&mmc2 {
472 pinctrl-names = "default";
473 pinctrl-0 = <&mmc2_pins>;
474 vmmc-supply = <&vmmc2>;
475 bus-width = <4>;
476 cd-gpios = <&twl_gpio 1 GPIO_ACTIVE_HIGH>;
477 wp-gpios = <&gpio4 31 GPIO_ACTIVE_LOW>; /* GPIO_127 */
478};
479
480/* bluetooth*/
481&uart1 {
482};
483
484/* spare (expansion connector) */
485&uart2 {
486};
487
488/* console (expansion connector) */
489&uart3 {
490 pinctrl-names = "default";
491 pinctrl-0 = <&uart3_pins>;
492 interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>;
493};
494
495&usbhshost {
496 port2-mode = "ehci-phy";
497};
498
499&gpmc {
500 ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */
501
502 nand@0,0 {
503 reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
504 nand-bus-width = <16>;
505 ti,nand-ecc-opt = "sw";
506
507 gpmc,sync-clk-ps = <0>;
508 gpmc,cs-on-ns = <0>;
509 gpmc,cs-rd-off-ns = <44>;
510 gpmc,cs-wr-off-ns = <44>;
511 gpmc,adv-on-ns = <6>;
512 gpmc,adv-rd-off-ns = <34>;
513 gpmc,adv-wr-off-ns = <44>;
514 gpmc,we-off-ns = <40>;
515 gpmc,oe-off-ns = <54>;
516 gpmc,access-ns = <64>;
517 gpmc,rd-cycle-ns = <82>;
518 gpmc,wr-cycle-ns = <82>;
519 gpmc,wr-access-ns = <40>;
520 gpmc,wr-data-mux-bus-ns = <0>;
521 gpmc,device-width = <2>;
522
523 #address-cells = <1>;
524 #size-cells = <1>;
525
526 /* u-boot uses mtdparts=nand:512k(xloader),1920k(uboot),128k(uboot-env),10m(boot),-(rootfs) */
527
528 x-loader@0 {
529 label = "xloader";
530 reg = <0 0x80000>;
531 };
532
533 bootloaders@80000 {
534 label = "uboot";
535 reg = <0x80000 0x1e0000>;
536 };
537
538 bootloaders_env@260000 {
539 label = "uboot-env";
540 reg = <0x260000 0x20000>;
541 };
542
543 kernel@280000 {
544 label = "boot";
545 reg = <0x280000 0xa00000>;
546 };
547
548 filesystem@680000 {
549 label = "rootfs";
550 reg = <0xc80000 0>; /* 0 = MTDPART_SIZ_FULL */
551 };
552 };
553};
554
555&mcspi1 {
556 tsc2046@0 {
557 reg = <0>; /* CS0 */
558 compatible = "ti,tsc2046";
559 spi-max-frequency = <1000000>;
560 pinctrl-names = "default";
561 pinctrl-0 = <&penirq_pins>;
562 interrupt-parent = <&gpio3>;
563 interrupts = <30 0>; /* GPIO_94 */
564 pendown-gpio = <&gpio3 30 0>;
565 vcc-supply = <&vaux4>;
566
567 ti,x-min = /bits/ 16 <0>;
568 ti,x-max = /bits/ 16 <8000>;
569 ti,y-min = /bits/ 16 <0>;
570 ti,y-max = /bits/ 16 <4800>;
571 ti,x-plate-ohms = /bits/ 16 <40>;
572 ti,pressure-max = /bits/ 16 <255>;
573
574 linux,wakeup;
575 };
576
577 lcd: lcd@1 {
578 reg = <1>; /* CS1 */
579 compatible = "omapdss,tpo,td043mtea1";
580 spi-max-frequency = <100000>;
581 spi-cpol;
582 spi-cpha;
583
584 label = "lcd";
585 reset-gpios = <&gpio5 29 GPIO_ACTIVE_LOW>; /* GPIO_157 */
586 vcc-supply = <&vaux1>;
587
588 port {
589 lcd_in: endpoint {
590 remote-endpoint = <&dpi_out>;
591 };
592 };
593 };
594
595
596};
597
598/* n/a - used as GPIOs */
599&mcbsp1 {
600};
601
602/* audio DAC */
603&mcbsp2 {
604};
605
606/* bluetooth */
607&mcbsp3 {
608};
609
610/* to twl4030*/
611&mcbsp4 {
612};
613
614&venc {
615 status = "ok";
616
617 vdda-supply = <&vdac>;
618
619 port {
620 venc_out: endpoint {
621 remote-endpoint = <&tv_connector_in>;
622 ti,channels = <2>;
623 };
624 };
625};
626
627&dss {
628 pinctrl-names = "default";
629 pinctrl-0 = < &dss_dpi_pins >;
630
631 status = "ok";
632 vdds_dsi-supply = <&vpll2>;
633
634 port {
635 dpi_out: endpoint {
636 remote-endpoint = <&lcd_in>;
637 data-lines = <24>;
638 };
639 };
640};
diff --git a/arch/arm/boot/dts/omap3-tao3530.dtsi b/arch/arm/boot/dts/omap3-tao3530.dtsi
index e89820a6776e..7bd8d9a4f67f 100644
--- a/arch/arm/boot/dts/omap3-tao3530.dtsi
+++ b/arch/arm/boot/dts/omap3-tao3530.dtsi
@@ -8,7 +8,16 @@
8 */ 8 */
9/dts-v1/; 9/dts-v1/;
10 10
11#include "omap34xx-hs.dtsi" 11#include "omap34xx.dtsi"
12
13/* Secure omaps have some devices inaccessible depending on the firmware */
14&aes {
15 status = "disabled";
16};
17
18&sham {
19 status = "disabled";
20};
12 21
13/ { 22/ {
14 cpus { 23 cpus {
@@ -45,7 +54,6 @@
45 54
46 /* McBSP2 is used for onboard sound, same as on beagle */ 55 /* McBSP2 is used for onboard sound, same as on beagle */
47 ti,mcbsp = <&mcbsp2>; 56 ti,mcbsp = <&mcbsp2>;
48 ti,codec = <&twl_audio>;
49 }; 57 };
50 58
51 /* Regulator to enable/switch the vcc of the Wifi module */ 59 /* Regulator to enable/switch the vcc of the Wifi module */
diff --git a/arch/arm/boot/dts/omap3-zoom3.dts b/arch/arm/boot/dts/omap3-zoom3.dts
index 6644f516a42b..131448d86e67 100644
--- a/arch/arm/boot/dts/omap3-zoom3.dts
+++ b/arch/arm/boot/dts/omap3-zoom3.dts
@@ -195,6 +195,16 @@
195 cap-power-off-card; 195 cap-power-off-card;
196 pinctrl-names = "default"; 196 pinctrl-names = "default";
197 pinctrl-0 = <&mmc3_pins &mmc3_2_pins>; 197 pinctrl-0 = <&mmc3_pins &mmc3_2_pins>;
198
199 #address-cells = <1>;
200 #size-cells = <0>;
201 wlcore: wlcore@2 {
202 compatible = "ti,wl1271";
203 reg = <2>;
204 interrupt-parent = <&gpio6>;
205 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 162 */
206 ref-clock-frequency = <26000000>;
207 };
198}; 208};
199 209
200&uart1 { 210&uart1 {
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 3fdc84fddb70..d18a90f5eca3 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -87,6 +87,60 @@
87 ranges; 87 ranges;
88 ti,hwmods = "l3_main"; 88 ti,hwmods = "l3_main";
89 89
90 l4_core: l4@48000000 {
91 compatible = "ti,omap3-l4-core", "simple-bus";
92 #address-cells = <1>;
93 #size-cells = <1>;
94 ranges = <0 0x48000000 0x1000000>;
95
96 scm: scm@2000 {
97 compatible = "ti,omap3-scm", "simple-bus";
98 reg = <0x2000 0x2000>;
99 #address-cells = <1>;
100 #size-cells = <1>;
101 ranges = <0 0x2000 0x2000>;
102
103 omap3_pmx_core: pinmux@30 {
104 compatible = "ti,omap3-padconf",
105 "pinctrl-single";
106 reg = <0x30 0x238>;
107 #address-cells = <1>;
108 #size-cells = <0>;
109 #interrupt-cells = <1>;
110 interrupt-controller;
111 pinctrl-single,register-width = <16>;
112 pinctrl-single,function-mask = <0xff1f>;
113 };
114
115 scm_conf: scm_conf@270 {
116 compatible = "syscon";
117 reg = <0x270 0x330>;
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 scm_clocks: clocks {
122 #address-cells = <1>;
123 #size-cells = <0>;
124 };
125 };
126
127 scm_clockdomains: clockdomains {
128 };
129
130 omap3_pmx_wkup: pinmux@a00 {
131 compatible = "ti,omap3-padconf",
132 "pinctrl-single";
133 reg = <0xa00 0x5c>;
134 #address-cells = <1>;
135 #size-cells = <0>;
136 #interrupt-cells = <1>;
137 interrupt-controller;
138 pinctrl-single,register-width = <16>;
139 pinctrl-single,function-mask = <0xff1f>;
140 };
141 };
142 };
143
90 aes: aes@480c5000 { 144 aes: aes@480c5000 {
91 compatible = "ti,omap3-aes"; 145 compatible = "ti,omap3-aes";
92 ti,hwmods = "aes"; 146 ti,hwmods = "aes";
@@ -123,19 +177,6 @@
123 }; 177 };
124 }; 178 };
125 179
126 scrm: scrm@48002000 {
127 compatible = "ti,omap3-scrm";
128 reg = <0x48002000 0x2000>;
129
130 scrm_clocks: clocks {
131 #address-cells = <1>;
132 #size-cells = <0>;
133 };
134
135 scrm_clockdomains: clockdomains {
136 };
137 };
138
139 counter32k: counter@48320000 { 180 counter32k: counter@48320000 {
140 compatible = "ti,omap-counter32k"; 181 compatible = "ti,omap-counter32k";
141 reg = <0x48320000 0x20>; 182 reg = <0x48320000 0x20>;
@@ -161,37 +202,10 @@
161 dma-requests = <96>; 202 dma-requests = <96>;
162 }; 203 };
163 204
164 omap3_pmx_core: pinmux@48002030 {
165 compatible = "ti,omap3-padconf", "pinctrl-single";
166 reg = <0x48002030 0x0238>;
167 #address-cells = <1>;
168 #size-cells = <0>;
169 #interrupt-cells = <1>;
170 interrupt-controller;
171 pinctrl-single,register-width = <16>;
172 pinctrl-single,function-mask = <0xff1f>;
173 };
174
175 omap3_pmx_wkup: pinmux@48002a00 {
176 compatible = "ti,omap3-padconf", "pinctrl-single";
177 reg = <0x48002a00 0x5c>;
178 #address-cells = <1>;
179 #size-cells = <0>;
180 #interrupt-cells = <1>;
181 interrupt-controller;
182 pinctrl-single,register-width = <16>;
183 pinctrl-single,function-mask = <0xff1f>;
184 };
185
186 omap3_scm_general: tisyscon@48002270 {
187 compatible = "syscon";
188 reg = <0x48002270 0x2f0>;
189 };
190
191 pbias_regulator: pbias_regulator { 205 pbias_regulator: pbias_regulator {
192 compatible = "ti,pbias-omap"; 206 compatible = "ti,pbias-omap";
193 reg = <0x2b0 0x4>; 207 reg = <0x2b0 0x4>;
194 syscon = <&omap3_scm_general>; 208 syscon = <&scm_conf>;
195 pbias_mmc_reg: pbias_mmc_omap2430 { 209 pbias_mmc_reg: pbias_mmc_omap2430 {
196 regulator-name = "pbias_mmc_omap2430"; 210 regulator-name = "pbias_mmc_omap2430";
197 regulator-min-microvolt = <1800000>; 211 regulator-min-microvolt = <1800000>;
diff --git a/arch/arm/boot/dts/omap34xx-hs.dtsi b/arch/arm/boot/dts/omap34xx-hs.dtsi
deleted file mode 100644
index 1ff626489546..000000000000
--- a/arch/arm/boot/dts/omap34xx-hs.dtsi
+++ /dev/null
@@ -1,16 +0,0 @@
1/* Disabled modules for secure omaps */
2
3#include "omap34xx.dtsi"
4
5/* Secure omaps have some devices inaccessible depending on the firmware */
6&aes {
7 status = "disabled";
8};
9
10&sham {
11 status = "disabled";
12};
13
14&timer12 {
15 status = "disabled";
16};
diff --git a/arch/arm/boot/dts/omap34xx.dtsi b/arch/arm/boot/dts/omap34xx.dtsi
index 3819c1e91591..4f6b2d5b1902 100644
--- a/arch/arm/boot/dts/omap34xx.dtsi
+++ b/arch/arm/boot/dts/omap34xx.dtsi
@@ -8,6 +8,8 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11#include <dt-bindings/media/omap3-isp.h>
12
11#include "omap3.dtsi" 13#include "omap3.dtsi"
12 14
13/ { 15/ {
@@ -37,6 +39,21 @@
37 pinctrl-single,register-width = <16>; 39 pinctrl-single,register-width = <16>;
38 pinctrl-single,function-mask = <0xff1f>; 40 pinctrl-single,function-mask = <0xff1f>;
39 }; 41 };
42
43 isp: isp@480bc000 {
44 compatible = "ti,omap3-isp";
45 reg = <0x480bc000 0x12fc
46 0x480bd800 0x017c>;
47 interrupts = <24>;
48 iommus = <&mmu_isp>;
49 syscon = <&scm_conf 0xdc>;
50 ti,phy-type = <OMAP3ISP_PHY_TYPE_COMPLEX_IO>;
51 #clock-cells = <1>;
52 ports {
53 #address-cells = <1>;
54 #size-cells = <0>;
55 };
56 };
40 }; 57 };
41}; 58};
42 59
diff --git a/arch/arm/boot/dts/omap36xx-hs.dtsi b/arch/arm/boot/dts/omap36xx-hs.dtsi
deleted file mode 100644
index 2c7febb0e016..000000000000
--- a/arch/arm/boot/dts/omap36xx-hs.dtsi
+++ /dev/null
@@ -1,16 +0,0 @@
1/* Disabled modules for secure omaps */
2
3#include "omap36xx.dtsi"
4
5/* Secure omaps have some devices inaccessible depending on the firmware */
6&aes {
7 status = "disabled";
8};
9
10&sham {
11 status = "disabled";
12};
13
14&timer12 {
15 status = "disabled";
16};
diff --git a/arch/arm/boot/dts/omap36xx.dtsi b/arch/arm/boot/dts/omap36xx.dtsi
index 541704a59a5a..86253de5a97a 100644
--- a/arch/arm/boot/dts/omap36xx.dtsi
+++ b/arch/arm/boot/dts/omap36xx.dtsi
@@ -8,6 +8,8 @@
8 * kind, whether express or implied. 8 * kind, whether express or implied.
9 */ 9 */
10 10
11#include <dt-bindings/media/omap3-isp.h>
12
11#include "omap3.dtsi" 13#include "omap3.dtsi"
12 14
13/ { 15/ {
@@ -69,6 +71,21 @@
69 pinctrl-single,register-width = <16>; 71 pinctrl-single,register-width = <16>;
70 pinctrl-single,function-mask = <0xff1f>; 72 pinctrl-single,function-mask = <0xff1f>;
71 }; 73 };
74
75 isp: isp@480bc000 {
76 compatible = "ti,omap3-isp";
77 reg = <0x480bc000 0x12fc
78 0x480bd800 0x0600>;
79 interrupts = <24>;
80 iommus = <&mmu_isp>;
81 syscon = <&scm_conf 0x2f0>;
82 ti,phy-type = <OMAP3ISP_PHY_TYPE_CSIPHY>;
83 #clock-cells = <1>;
84 ports {
85 #address-cells = <1>;
86 #size-cells = <0>;
87 };
88 };
72 }; 89 };
73}; 90};
74 91
diff --git a/arch/arm/boot/dts/omap3xxx-clocks.dtsi b/arch/arm/boot/dts/omap3xxx-clocks.dtsi
index 5c375003bad1..bbba5bdc4bc9 100644
--- a/arch/arm/boot/dts/omap3xxx-clocks.dtsi
+++ b/arch/arm/boot/dts/omap3xxx-clocks.dtsi
@@ -79,13 +79,14 @@
79 clock-div = <1>; 79 clock-div = <1>;
80 }; 80 };
81}; 81};
82&scrm_clocks { 82
83&scm_clocks {
83 mcbsp5_mux_fck: mcbsp5_mux_fck { 84 mcbsp5_mux_fck: mcbsp5_mux_fck {
84 #clock-cells = <0>; 85 #clock-cells = <0>;
85 compatible = "ti,composite-mux-clock"; 86 compatible = "ti,composite-mux-clock";
86 clocks = <&core_96m_fck>, <&mcbsp_clks>; 87 clocks = <&core_96m_fck>, <&mcbsp_clks>;
87 ti,bit-shift = <4>; 88 ti,bit-shift = <4>;
88 reg = <0x02d8>; 89 reg = <0x68>;
89 }; 90 };
90 91
91 mcbsp5_fck: mcbsp5_fck { 92 mcbsp5_fck: mcbsp5_fck {
@@ -99,7 +100,7 @@
99 compatible = "ti,composite-mux-clock"; 100 compatible = "ti,composite-mux-clock";
100 clocks = <&core_96m_fck>, <&mcbsp_clks>; 101 clocks = <&core_96m_fck>, <&mcbsp_clks>;
101 ti,bit-shift = <2>; 102 ti,bit-shift = <2>;
102 reg = <0x0274>; 103 reg = <0x04>;
103 }; 104 };
104 105
105 mcbsp1_fck: mcbsp1_fck { 106 mcbsp1_fck: mcbsp1_fck {
@@ -113,7 +114,7 @@
113 compatible = "ti,composite-mux-clock"; 114 compatible = "ti,composite-mux-clock";
114 clocks = <&per_96m_fck>, <&mcbsp_clks>; 115 clocks = <&per_96m_fck>, <&mcbsp_clks>;
115 ti,bit-shift = <6>; 116 ti,bit-shift = <6>;
116 reg = <0x0274>; 117 reg = <0x04>;
117 }; 118 };
118 119
119 mcbsp2_fck: mcbsp2_fck { 120 mcbsp2_fck: mcbsp2_fck {
@@ -126,7 +127,7 @@
126 #clock-cells = <0>; 127 #clock-cells = <0>;
127 compatible = "ti,composite-mux-clock"; 128 compatible = "ti,composite-mux-clock";
128 clocks = <&per_96m_fck>, <&mcbsp_clks>; 129 clocks = <&per_96m_fck>, <&mcbsp_clks>;
129 reg = <0x02d8>; 130 reg = <0x68>;
130 }; 131 };
131 132
132 mcbsp3_fck: mcbsp3_fck { 133 mcbsp3_fck: mcbsp3_fck {
@@ -140,7 +141,7 @@
140 compatible = "ti,composite-mux-clock"; 141 compatible = "ti,composite-mux-clock";
141 clocks = <&per_96m_fck>, <&mcbsp_clks>; 142 clocks = <&per_96m_fck>, <&mcbsp_clks>;
142 ti,bit-shift = <2>; 143 ti,bit-shift = <2>;
143 reg = <0x02d8>; 144 reg = <0x68>;
144 }; 145 };
145 146
146 mcbsp4_fck: mcbsp4_fck { 147 mcbsp4_fck: mcbsp4_fck {
diff --git a/arch/arm/boot/dts/omap4-cpu-thermal.dtsi b/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
index cb9458feb2e3..ab7f87ae96f0 100644
--- a/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
+++ b/arch/arm/boot/dts/omap4-cpu-thermal.dtsi
@@ -18,7 +18,7 @@ cpu_thermal: cpu_thermal {
18 /* sensor ID */ 18 /* sensor ID */
19 thermal-sensors = <&bandgap 0>; 19 thermal-sensors = <&bandgap 0>;
20 20
21 trips { 21 cpu_trips: trips {
22 cpu_alert0: cpu_alert { 22 cpu_alert0: cpu_alert {
23 temperature = <100000>; /* millicelsius */ 23 temperature = <100000>; /* millicelsius */
24 hysteresis = <2000>; /* millicelsius */ 24 hysteresis = <2000>; /* millicelsius */
@@ -31,7 +31,7 @@ cpu_thermal: cpu_thermal {
31 }; 31 };
32 }; 32 };
33 33
34 cooling-maps { 34 cpu_cooling_maps: cooling-maps {
35 map0 { 35 map0 {
36 trip = <&cpu_alert0>; 36 trip = <&cpu_alert0>;
37 cooling-device = 37 cooling-device =
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 7c15fb2e2fe4..f1507bc8737e 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -448,6 +448,16 @@
448 non-removable; 448 non-removable;
449 bus-width = <4>; 449 bus-width = <4>;
450 cap-power-off-card; 450 cap-power-off-card;
451
452 #address-cells = <1>;
453 #size-cells = <0>;
454 wlcore: wlcore@2 {
455 compatible = "ti,wl1271";
456 reg = <2>;
457 interrupt-parent = <&gpio2>;
458 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
459 ref-clock-frequency = <38400000>;
460 };
451}; 461};
452 462
453&emif1 { 463&emif1 {
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 8aca8dae968a..dac86ed7481f 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -485,6 +485,17 @@
485 non-removable; 485 non-removable;
486 bus-width = <4>; 486 bus-width = <4>;
487 cap-power-off-card; 487 cap-power-off-card;
488
489 #address-cells = <1>;
490 #size-cells = <0>;
491 wlcore: wlcore@2 {
492 compatible = "ti,wl1281";
493 reg = <2>;
494 interrupt-parent = <&gpio1>;
495 interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
496 ref-clock-frequency = <26000000>;
497 tcxo-clock-frequency = <26000000>;
498 };
488}; 499};
489 500
490&emif1 { 501&emif1 {
diff --git a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
index cc66af419236..9bceeb7e1f03 100644
--- a/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
+++ b/arch/arm/boot/dts/omap4-var-som-om44-wlan.dtsi
@@ -65,4 +65,14 @@
65 bus-width = <4>; 65 bus-width = <4>;
66 cap-power-off-card; 66 cap-power-off-card;
67 status = "okay"; 67 status = "okay";
68
69 #address-cells = <1>;
70 #size-cells = <0>;
71 wlcore: wlcore@2 {
72 compatible = "ti,wl1271";
73 reg = <2>;
74 interrupt-parent = <&gpio2>;
75 interrupts = <9 IRQ_TYPE_LEVEL_HIGH>; /* gpio 41 */
76 ref-clock-frequency = <38400000>;
77 };
68}; 78};
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index f2091d1c9c36..f884d6adb71e 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -124,99 +124,141 @@
124 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 124 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
125 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 125 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
126 126
127 cm1: cm1@4a004000 { 127 l4_cfg: l4@4a000000 {
128 compatible = "ti,omap4-cm1"; 128 compatible = "ti,omap4-l4-cfg", "simple-bus";
129 reg = <0x4a004000 0x2000>; 129 #address-cells = <1>;
130 130 #size-cells = <1>;
131 cm1_clocks: clocks { 131 ranges = <0 0x4a000000 0x1000000>;
132 #address-cells = <1>;
133 #size-cells = <0>;
134 };
135 132
136 cm1_clockdomains: clockdomains { 133 cm1: cm1@4000 {
137 }; 134 compatible = "ti,omap4-cm1";
138 }; 135 reg = <0x4000 0x2000>;
139 136
140 prm: prm@4a306000 { 137 cm1_clocks: clocks {
141 compatible = "ti,omap4-prm"; 138 #address-cells = <1>;
142 reg = <0x4a306000 0x3000>; 139 #size-cells = <0>;
143 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 140 };
144 141
145 prm_clocks: clocks { 142 cm1_clockdomains: clockdomains {
146 #address-cells = <1>; 143 };
147 #size-cells = <0>;
148 }; 144 };
149 145
150 prm_clockdomains: clockdomains { 146 cm2: cm2@8000 {
151 }; 147 compatible = "ti,omap4-cm2";
152 }; 148 reg = <0x8000 0x3000>;
153 149
154 cm2: cm2@4a008000 { 150 cm2_clocks: clocks {
155 compatible = "ti,omap4-cm2"; 151 #address-cells = <1>;
156 reg = <0x4a008000 0x3000>; 152 #size-cells = <0>;
153 };
157 154
158 cm2_clocks: clocks { 155 cm2_clockdomains: clockdomains {
159 #address-cells = <1>; 156 };
160 #size-cells = <0>;
161 }; 157 };
162 158
163 cm2_clockdomains: clockdomains { 159 omap4_scm_core: scm@2000 {
160 compatible = "ti,omap4-scm-core", "simple-bus";
161 reg = <0x2000 0x1000>;
162 #address-cells = <1>;
163 #size-cells = <1>;
164 ranges = <0 0x2000 0x1000>;
165
166 scm_conf: scm_conf@0 {
167 compatible = "syscon";
168 reg = <0x0 0x800>;
169 #address-cells = <1>;
170 #size-cells = <1>;
171 };
164 }; 172 };
165 };
166
167 scrm: scrm@4a30a000 {
168 compatible = "ti,omap4-scrm";
169 reg = <0x4a30a000 0x2000>;
170 173
171 scrm_clocks: clocks { 174 omap4_padconf_core: scm@100000 {
175 compatible = "ti,omap4-scm-padconf-core",
176 "simple-bus";
172 #address-cells = <1>; 177 #address-cells = <1>;
173 #size-cells = <0>; 178 #size-cells = <1>;
179 ranges = <0 0x100000 0x1000>;
180
181 omap4_pmx_core: pinmux@40 {
182 compatible = "ti,omap4-padconf",
183 "pinctrl-single";
184 reg = <0x40 0x0196>;
185 #address-cells = <1>;
186 #size-cells = <0>;
187 #interrupt-cells = <1>;
188 interrupt-controller;
189 pinctrl-single,register-width = <16>;
190 pinctrl-single,function-mask = <0x7fff>;
191 };
192
193 omap4_padconf_global: omap4_padconf_global@5a0 {
194 compatible = "syscon";
195 reg = <0x5a0 0x170>;
196 #address-cells = <1>;
197 #size-cells = <1>;
198
199 pbias_regulator: pbias_regulator {
200 compatible = "ti,pbias-omap";
201 reg = <0x60 0x4>;
202 syscon = <&omap4_padconf_global>;
203 pbias_mmc_reg: pbias_mmc_omap4 {
204 regulator-name = "pbias_mmc_omap4";
205 regulator-min-microvolt = <1800000>;
206 regulator-max-microvolt = <3000000>;
207 };
208 };
209 };
174 }; 210 };
175 211
176 scrm_clockdomains: clockdomains { 212 l4_wkup: l4@300000 {
177 }; 213 compatible = "ti,omap4-l4-wkup", "simple-bus";
178 }; 214 #address-cells = <1>;
179 215 #size-cells = <1>;
180 counter32k: counter@4a304000 { 216 ranges = <0 0x300000 0x40000>;
181 compatible = "ti,omap-counter32k"; 217
182 reg = <0x4a304000 0x20>; 218 counter32k: counter@4000 {
183 ti,hwmods = "counter_32k"; 219 compatible = "ti,omap-counter32k";
184 }; 220 reg = <0x4000 0x20>;
185 221 ti,hwmods = "counter_32k";
186 omap4_pmx_core: pinmux@4a100040 { 222 };
187 compatible = "ti,omap4-padconf", "pinctrl-single"; 223
188 reg = <0x4a100040 0x0196>; 224 prm: prm@6000 {
189 #address-cells = <1>; 225 compatible = "ti,omap4-prm";
190 #size-cells = <0>; 226 reg = <0x6000 0x3000>;
191 #interrupt-cells = <1>; 227 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
192 interrupt-controller; 228
193 pinctrl-single,register-width = <16>; 229 prm_clocks: clocks {
194 pinctrl-single,function-mask = <0x7fff>; 230 #address-cells = <1>;
195 }; 231 #size-cells = <0>;
196 omap4_pmx_wkup: pinmux@4a31e040 { 232 };
197 compatible = "ti,omap4-padconf", "pinctrl-single"; 233
198 reg = <0x4a31e040 0x0038>; 234 prm_clockdomains: clockdomains {
199 #address-cells = <1>; 235 };
200 #size-cells = <0>; 236 };
201 #interrupt-cells = <1>; 237
202 interrupt-controller; 238 scrm: scrm@a000 {
203 pinctrl-single,register-width = <16>; 239 compatible = "ti,omap4-scrm";
204 pinctrl-single,function-mask = <0x7fff>; 240 reg = <0xa000 0x2000>;
205 }; 241
206 242 scrm_clocks: clocks {
207 omap4_padconf_global: tisyscon@4a1005a0 { 243 #address-cells = <1>;
208 compatible = "syscon"; 244 #size-cells = <0>;
209 reg = <0x4a1005a0 0x170>; 245 };
210 }; 246
211 247 scrm_clockdomains: clockdomains {
212 pbias_regulator: pbias_regulator { 248 };
213 compatible = "ti,pbias-omap"; 249 };
214 reg = <0x60 0x4>; 250
215 syscon = <&omap4_padconf_global>; 251 omap4_pmx_wkup: pinmux@1e040 {
216 pbias_mmc_reg: pbias_mmc_omap4 { 252 compatible = "ti,omap4-padconf",
217 regulator-name = "pbias_mmc_omap4"; 253 "pinctrl-single";
218 regulator-min-microvolt = <1800000>; 254 reg = <0x1e040 0x0038>;
219 regulator-max-microvolt = <3000000>; 255 #address-cells = <1>;
256 #size-cells = <0>;
257 #interrupt-cells = <1>;
258 interrupt-controller;
259 pinctrl-single,register-width = <16>;
260 pinctrl-single,function-mask = <0x7fff>;
261 };
220 }; 262 };
221 }; 263 };
222 264
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 77b5f70d0ebc..efe5f737f39b 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -139,99 +139,141 @@
139 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, 139 interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
140 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 140 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
141 141
142 prm: prm@4ae06000 { 142 l4_cfg: l4@4a000000 {
143 compatible = "ti,omap5-prm"; 143 compatible = "ti,omap5-l4-cfg", "simple-bus";
144 reg = <0x4ae06000 0x3000>; 144 #address-cells = <1>;
145 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; 145 #size-cells = <1>;
146 ranges = <0 0x4a000000 0x22a000>;
146 147
147 prm_clocks: clocks { 148 scm_core: scm@2000 {
149 compatible = "ti,omap5-scm-core", "simple-bus";
150 reg = <0x2000 0x1000>;
148 #address-cells = <1>; 151 #address-cells = <1>;
149 #size-cells = <0>; 152 #size-cells = <1>;
153 ranges = <0 0x2000 0x800>;
154
155 scm_conf: scm_conf@0 {
156 compatible = "syscon";
157 reg = <0x0 0x800>;
158 #address-cells = <1>;
159 #size-cells = <1>;
160 };
150 }; 161 };
151 162
152 prm_clockdomains: clockdomains { 163 scm_padconf_core: scm@2800 {
164 compatible = "ti,omap5-scm-padconf-core",
165 "simple-bus";
166 #address-cells = <1>;
167 #size-cells = <1>;
168 ranges = <0 0x2800 0x800>;
169
170 omap5_pmx_core: pinmux@40 {
171 compatible = "ti,omap5-padconf",
172 "pinctrl-single";
173 reg = <0x40 0x01b6>;
174 #address-cells = <1>;
175 #size-cells = <0>;
176 #interrupt-cells = <1>;
177 interrupt-controller;
178 pinctrl-single,register-width = <16>;
179 pinctrl-single,function-mask = <0x7fff>;
180 };
181
182 omap5_padconf_global: omap5_padconf_global@5a0 {
183 compatible = "syscon";
184 reg = <0x5a0 0xec>;
185 #address-cells = <1>;
186 #size-cells = <1>;
187
188 pbias_regulator: pbias_regulator {
189 compatible = "ti,pbias-omap";
190 reg = <0x60 0x4>;
191 syscon = <&omap5_padconf_global>;
192 pbias_mmc_reg: pbias_mmc_omap5 {
193 regulator-name = "pbias_mmc_omap5";
194 regulator-min-microvolt = <1800000>;
195 regulator-max-microvolt = <3000000>;
196 };
197 };
198 };
153 }; 199 };
154 };
155 200
156 cm_core_aon: cm_core_aon@4a004000 { 201 cm_core_aon: cm_core_aon@4000 {
157 compatible = "ti,omap5-cm-core-aon"; 202 compatible = "ti,omap5-cm-core-aon";
158 reg = <0x4a004000 0x2000>; 203 reg = <0x4000 0x2000>;
159 204
160 cm_core_aon_clocks: clocks { 205 cm_core_aon_clocks: clocks {
161 #address-cells = <1>; 206 #address-cells = <1>;
162 #size-cells = <0>; 207 #size-cells = <0>;
163 }; 208 };
164 209
165 cm_core_aon_clockdomains: clockdomains { 210 cm_core_aon_clockdomains: clockdomains {
211 };
166 }; 212 };
167 };
168 213
169 scrm: scrm@4ae0a000 { 214 cm_core: cm_core@8000 {
170 compatible = "ti,omap5-scrm"; 215 compatible = "ti,omap5-cm-core";
171 reg = <0x4ae0a000 0x2000>; 216 reg = <0x8000 0x3000>;
172 217
173 scrm_clocks: clocks { 218 cm_core_clocks: clocks {
174 #address-cells = <1>; 219 #address-cells = <1>;
175 #size-cells = <0>; 220 #size-cells = <0>;
176 }; 221 };
177 222
178 scrm_clockdomains: clockdomains { 223 cm_core_clockdomains: clockdomains {
224 };
179 }; 225 };
180 }; 226 };
181 227
182 cm_core: cm_core@4a008000 { 228 l4_wkup: l4@4ae00000 {
183 compatible = "ti,omap5-cm-core"; 229 compatible = "ti,omap5-l4-wkup", "simple-bus";
184 reg = <0x4a008000 0x3000>; 230 #address-cells = <1>;
231 #size-cells = <1>;
232 ranges = <0 0x4ae00000 0x2b000>;
185 233
186 cm_core_clocks: clocks { 234 counter32k: counter@4000 {
187 #address-cells = <1>; 235 compatible = "ti,omap-counter32k";
188 #size-cells = <0>; 236 reg = <0x4000 0x40>;
237 ti,hwmods = "counter_32k";
189 }; 238 };
190 239
191 cm_core_clockdomains: clockdomains { 240 prm: prm@6000 {
241 compatible = "ti,omap5-prm";
242 reg = <0x6000 0x3000>;
243 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
244
245 prm_clocks: clocks {
246 #address-cells = <1>;
247 #size-cells = <0>;
248 };
249
250 prm_clockdomains: clockdomains {
251 };
192 }; 252 };
193 };
194 253
195 counter32k: counter@4ae04000 { 254 scrm: scrm@a000 {
196 compatible = "ti,omap-counter32k"; 255 compatible = "ti,omap5-scrm";
197 reg = <0x4ae04000 0x40>; 256 reg = <0xa000 0x2000>;
198 ti,hwmods = "counter_32k";
199 };
200 257
201 omap5_pmx_core: pinmux@4a002840 { 258 scrm_clocks: clocks {
202 compatible = "ti,omap5-padconf", "pinctrl-single"; 259 #address-cells = <1>;
203 reg = <0x4a002840 0x01b6>; 260 #size-cells = <0>;
204 #address-cells = <1>; 261 };
205 #size-cells = <0>;
206 #interrupt-cells = <1>;
207 interrupt-controller;
208 pinctrl-single,register-width = <16>;
209 pinctrl-single,function-mask = <0x7fff>;
210 };
211 omap5_pmx_wkup: pinmux@4ae0c840 {
212 compatible = "ti,omap5-padconf", "pinctrl-single";
213 reg = <0x4ae0c840 0x0038>;
214 #address-cells = <1>;
215 #size-cells = <0>;
216 #interrupt-cells = <1>;
217 interrupt-controller;
218 pinctrl-single,register-width = <16>;
219 pinctrl-single,function-mask = <0x7fff>;
220 };
221 262
222 omap5_padconf_global: tisyscon@4a002da0 { 263 scrm_clockdomains: clockdomains {
223 compatible = "syscon"; 264 };
224 reg = <0x4A002da0 0xec>; 265 };
225 };
226 266
227 pbias_regulator: pbias_regulator { 267 omap5_pmx_wkup: pinmux@c840 {
228 compatible = "ti,pbias-omap"; 268 compatible = "ti,omap5-padconf",
229 reg = <0x60 0x4>; 269 "pinctrl-single";
230 syscon = <&omap5_padconf_global>; 270 reg = <0xc840 0x0038>;
231 pbias_mmc_reg: pbias_mmc_omap5 { 271 #address-cells = <1>;
232 regulator-name = "pbias_mmc_omap5"; 272 #size-cells = <0>;
233 regulator-min-microvolt = <1800000>; 273 #interrupt-cells = <1>;
234 regulator-max-microvolt = <3000000>; 274 interrupt-controller;
275 pinctrl-single,register-width = <16>;
276 pinctrl-single,function-mask = <0x7fff>;
235 }; 277 };
236 }; 278 };
237 279
diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index b3154c071652..6c1511263a55 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -23,6 +23,7 @@
23 next-level-cache = <&L2>; 23 next-level-cache = <&L2>;
24 qcom,acc = <&acc0>; 24 qcom,acc = <&acc0>;
25 qcom,saw = <&saw0>; 25 qcom,saw = <&saw0>;
26 cpu-idle-states = <&CPU_SPC>;
26 }; 27 };
27 28
28 cpu@1 { 29 cpu@1 {
@@ -33,6 +34,7 @@
33 next-level-cache = <&L2>; 34 next-level-cache = <&L2>;
34 qcom,acc = <&acc1>; 35 qcom,acc = <&acc1>;
35 qcom,saw = <&saw1>; 36 qcom,saw = <&saw1>;
37 cpu-idle-states = <&CPU_SPC>;
36 }; 38 };
37 39
38 cpu@2 { 40 cpu@2 {
@@ -43,6 +45,7 @@
43 next-level-cache = <&L2>; 45 next-level-cache = <&L2>;
44 qcom,acc = <&acc2>; 46 qcom,acc = <&acc2>;
45 qcom,saw = <&saw2>; 47 qcom,saw = <&saw2>;
48 cpu-idle-states = <&CPU_SPC>;
46 }; 49 };
47 50
48 cpu@3 { 51 cpu@3 {
@@ -53,12 +56,23 @@
53 next-level-cache = <&L2>; 56 next-level-cache = <&L2>;
54 qcom,acc = <&acc3>; 57 qcom,acc = <&acc3>;
55 qcom,saw = <&saw3>; 58 qcom,saw = <&saw3>;
59 cpu-idle-states = <&CPU_SPC>;
56 }; 60 };
57 61
58 L2: l2-cache { 62 L2: l2-cache {
59 compatible = "cache"; 63 compatible = "cache";
60 cache-level = <2>; 64 cache-level = <2>;
61 }; 65 };
66
67 idle-states {
68 CPU_SPC: spc {
69 compatible = "qcom,idle-state-spc",
70 "arm,idle-state";
71 entry-latency-us = <400>;
72 exit-latency-us = <900>;
73 min-residency-us = <3000>;
74 };
75 };
62 }; 76 };
63 77
64 cpu-pmu { 78 cpu-pmu {
@@ -139,26 +153,26 @@
139 reg = <0x020b8000 0x1000>, <0x02008000 0x1000>; 153 reg = <0x020b8000 0x1000>, <0x02008000 0x1000>;
140 }; 154 };
141 155
142 saw0: regulator@2089000 { 156 saw0: power-controller@2089000 {
143 compatible = "qcom,saw2"; 157 compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2";
144 reg = <0x02089000 0x1000>, <0x02009000 0x1000>; 158 reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
145 regulator; 159 regulator;
146 }; 160 };
147 161
148 saw1: regulator@2099000 { 162 saw1: power-controller@2099000 {
149 compatible = "qcom,saw2"; 163 compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2";
150 reg = <0x02099000 0x1000>, <0x02009000 0x1000>; 164 reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
151 regulator; 165 regulator;
152 }; 166 };
153 167
154 saw2: regulator@20a9000 { 168 saw2: power-controller@20a9000 {
155 compatible = "qcom,saw2"; 169 compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2";
156 reg = <0x020a9000 0x1000>, <0x02009000 0x1000>; 170 reg = <0x020a9000 0x1000>, <0x02009000 0x1000>;
157 regulator; 171 regulator;
158 }; 172 };
159 173
160 saw3: regulator@20b9000 { 174 saw3: power-controller@20b9000 {
161 compatible = "qcom,saw2"; 175 compatible = "qcom,apq8064-saw2-v1.1-cpu", "qcom,saw2";
162 reg = <0x020b9000 0x1000>, <0x02009000 0x1000>; 176 reg = <0x020b9000 0x1000>, <0x02009000 0x1000>;
163 regulator; 177 regulator;
164 }; 178 };
@@ -166,6 +180,7 @@
166 gsbi1: gsbi@12440000 { 180 gsbi1: gsbi@12440000 {
167 status = "disabled"; 181 status = "disabled";
168 compatible = "qcom,gsbi-v1.0.0"; 182 compatible = "qcom,gsbi-v1.0.0";
183 cell-index = <1>;
169 reg = <0x12440000 0x100>; 184 reg = <0x12440000 0x100>;
170 clocks = <&gcc GSBI1_H_CLK>; 185 clocks = <&gcc GSBI1_H_CLK>;
171 clock-names = "iface"; 186 clock-names = "iface";
@@ -173,6 +188,8 @@
173 #size-cells = <1>; 188 #size-cells = <1>;
174 ranges; 189 ranges;
175 190
191 syscon-tcsr = <&tcsr>;
192
176 i2c1: i2c@12460000 { 193 i2c1: i2c@12460000 {
177 compatible = "qcom,i2c-qup-v1.1.1"; 194 compatible = "qcom,i2c-qup-v1.1.1";
178 reg = <0x12460000 0x1000>; 195 reg = <0x12460000 0x1000>;
@@ -187,6 +204,7 @@
187 gsbi2: gsbi@12480000 { 204 gsbi2: gsbi@12480000 {
188 status = "disabled"; 205 status = "disabled";
189 compatible = "qcom,gsbi-v1.0.0"; 206 compatible = "qcom,gsbi-v1.0.0";
207 cell-index = <2>;
190 reg = <0x12480000 0x100>; 208 reg = <0x12480000 0x100>;
191 clocks = <&gcc GSBI2_H_CLK>; 209 clocks = <&gcc GSBI2_H_CLK>;
192 clock-names = "iface"; 210 clock-names = "iface";
@@ -194,6 +212,8 @@
194 #size-cells = <1>; 212 #size-cells = <1>;
195 ranges; 213 ranges;
196 214
215 syscon-tcsr = <&tcsr>;
216
197 i2c2: i2c@124a0000 { 217 i2c2: i2c@124a0000 {
198 compatible = "qcom,i2c-qup-v1.1.1"; 218 compatible = "qcom,i2c-qup-v1.1.1";
199 reg = <0x124a0000 0x1000>; 219 reg = <0x124a0000 0x1000>;
@@ -208,6 +228,7 @@
208 gsbi7: gsbi@16600000 { 228 gsbi7: gsbi@16600000 {
209 status = "disabled"; 229 status = "disabled";
210 compatible = "qcom,gsbi-v1.0.0"; 230 compatible = "qcom,gsbi-v1.0.0";
231 cell-index = <7>;
211 reg = <0x16600000 0x100>; 232 reg = <0x16600000 0x100>;
212 clocks = <&gcc GSBI7_H_CLK>; 233 clocks = <&gcc GSBI7_H_CLK>;
213 clock-names = "iface"; 234 clock-names = "iface";
@@ -215,6 +236,8 @@
215 #size-cells = <1>; 236 #size-cells = <1>;
216 ranges; 237 ranges;
217 238
239 syscon-tcsr = <&tcsr>;
240
218 serial@16640000 { 241 serial@16640000 {
219 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 242 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
220 reg = <0x16640000 0x1000>, 243 reg = <0x16640000 0x1000>,
@@ -239,6 +262,13 @@
239 #reset-cells = <1>; 262 #reset-cells = <1>;
240 }; 263 };
241 264
265 lcc: clock-controller@28000000 {
266 compatible = "qcom,lcc-apq8064";
267 reg = <0x28000000 0x1000>;
268 #clock-cells = <1>;
269 #reset-cells = <1>;
270 };
271
242 mmcc: clock-controller@4000000 { 272 mmcc: clock-controller@4000000 {
243 compatible = "qcom,mmcc-apq8064"; 273 compatible = "qcom,mmcc-apq8064";
244 reg = <0x4000000 0x1000>; 274 reg = <0x4000000 0x1000>;
@@ -349,5 +379,10 @@
349 pinctrl-0 = <&sdc4_gpios>; 379 pinctrl-0 = <&sdc4_gpios>;
350 }; 380 };
351 }; 381 };
382
383 tcsr: syscon@1a400000 {
384 compatible = "qcom,tcsr-apq8064", "syscon";
385 reg = <0x1a400000 0x100>;
386 };
352 }; 387 };
353}; 388};
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 47370494d0f8..d484d08163e9 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -1,4 +1,6 @@
1#include "qcom-msm8974.dtsi" 1#include "qcom-msm8974.dtsi"
2#include "qcom-pm8841.dtsi"
3#include "qcom-pm8941.dtsi"
2 4
3/ { 5/ {
4 model = "Qualcomm APQ8074 Dragonboard"; 6 model = "Qualcomm APQ8074 Dragonboard";
diff --git a/arch/arm/boot/dts/qcom-apq8084-ifc6540.dts b/arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
index c9ff10821ad9..f7725b96612c 100644
--- a/arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
+++ b/arch/arm/boot/dts/qcom-apq8084-ifc6540.dts
@@ -1,4 +1,5 @@
1#include "qcom-apq8084.dtsi" 1#include "qcom-apq8084.dtsi"
2#include "qcom-pma8084.dtsi"
2 3
3/ { 4/ {
4 model = "Qualcomm APQ8084/IFC6540"; 5 model = "Qualcomm APQ8084/IFC6540";
diff --git a/arch/arm/boot/dts/qcom-apq8084-mtp.dts b/arch/arm/boot/dts/qcom-apq8084-mtp.dts
index 8ecec58a9ff6..cb43acfc5d1d 100644
--- a/arch/arm/boot/dts/qcom-apq8084-mtp.dts
+++ b/arch/arm/boot/dts/qcom-apq8084-mtp.dts
@@ -1,4 +1,5 @@
1#include "qcom-apq8084.dtsi" 1#include "qcom-apq8084.dtsi"
2#include "qcom-pma8084.dtsi"
2 3
3/ { 4/ {
4 model = "Qualcomm APQ 8084-MTP"; 5 model = "Qualcomm APQ 8084-MTP";
diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi
index 1f130bc16858..7084010ee61b 100644
--- a/arch/arm/boot/dts/qcom-apq8084.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8084.dtsi
@@ -21,6 +21,8 @@
21 enable-method = "qcom,kpss-acc-v2"; 21 enable-method = "qcom,kpss-acc-v2";
22 next-level-cache = <&L2>; 22 next-level-cache = <&L2>;
23 qcom,acc = <&acc0>; 23 qcom,acc = <&acc0>;
24 qcom,saw = <&saw0>;
25 cpu-idle-states = <&CPU_SPC>;
24 }; 26 };
25 27
26 cpu@1 { 28 cpu@1 {
@@ -30,6 +32,8 @@
30 enable-method = "qcom,kpss-acc-v2"; 32 enable-method = "qcom,kpss-acc-v2";
31 next-level-cache = <&L2>; 33 next-level-cache = <&L2>;
32 qcom,acc = <&acc1>; 34 qcom,acc = <&acc1>;
35 qcom,saw = <&saw1>;
36 cpu-idle-states = <&CPU_SPC>;
33 }; 37 };
34 38
35 cpu@2 { 39 cpu@2 {
@@ -39,6 +43,8 @@
39 enable-method = "qcom,kpss-acc-v2"; 43 enable-method = "qcom,kpss-acc-v2";
40 next-level-cache = <&L2>; 44 next-level-cache = <&L2>;
41 qcom,acc = <&acc2>; 45 qcom,acc = <&acc2>;
46 qcom,saw = <&saw2>;
47 cpu-idle-states = <&CPU_SPC>;
42 }; 48 };
43 49
44 cpu@3 { 50 cpu@3 {
@@ -48,6 +54,8 @@
48 enable-method = "qcom,kpss-acc-v2"; 54 enable-method = "qcom,kpss-acc-v2";
49 next-level-cache = <&L2>; 55 next-level-cache = <&L2>;
50 qcom,acc = <&acc3>; 56 qcom,acc = <&acc3>;
57 qcom,saw = <&saw3>;
58 cpu-idle-states = <&CPU_SPC>;
51 }; 59 };
52 60
53 L2: l2-cache { 61 L2: l2-cache {
@@ -55,6 +63,16 @@
55 cache-level = <2>; 63 cache-level = <2>;
56 qcom,saw = <&saw_l2>; 64 qcom,saw = <&saw_l2>;
57 }; 65 };
66
67 idle-states {
68 CPU_SPC: spc {
69 compatible = "qcom,idle-state-spc",
70 "arm,idle-state";
71 entry-latency-us = <150>;
72 exit-latency-us = <200>;
73 min-residency-us = <2000>;
74 };
75 };
58 }; 76 };
59 77
60 cpu-pmu { 78 cpu-pmu {
@@ -144,7 +162,27 @@
144 }; 162 };
145 }; 163 };
146 164
147 saw_l2: regulator@f9012000 { 165 saw0: power-controller@f9089000 {
166 compatible = "qcom,apq8084-saw2-v2.1-cpu", "qcom,saw2";
167 reg = <0xf9089000 0x1000>, <0xf9009000 0x1000>;
168 };
169
170 saw1: power-controller@f9099000 {
171 compatible = "qcom,apq8084-saw2-v2.1-cpu", "qcom,saw2";
172 reg = <0xf9099000 0x1000>, <0xf9009000 0x1000>;
173 };
174
175 saw2: power-controller@f90a9000 {
176 compatible = "qcom,apq8084-saw2-v2.1-cpu", "qcom,saw2";
177 reg = <0xf90a9000 0x1000>, <0xf9009000 0x1000>;
178 };
179
180 saw3: power-controller@f90b9000 {
181 compatible = "qcom,apq8084-saw2-v2.1-cpu", "qcom,saw2";
182 reg = <0xf90b9000 0x1000>, <0xf9009000 0x1000>;
183 };
184
185 saw_l2: power-controller@f9012000 {
148 compatible = "qcom,saw2"; 186 compatible = "qcom,saw2";
149 reg = <0xf9012000 0x1000>; 187 reg = <0xf9012000 0x1000>;
150 regulator; 188 regulator;
@@ -226,5 +264,21 @@
226 clock-names = "core", "iface"; 264 clock-names = "core", "iface";
227 status = "disabled"; 265 status = "disabled";
228 }; 266 };
267
268 spmi_bus: spmi@fc4cf000 {
269 compatible = "qcom,spmi-pmic-arb";
270 reg-names = "core", "intr", "cnfg";
271 reg = <0xfc4cf000 0x1000>,
272 <0xfc4cb000 0x1000>,
273 <0xfc4ca000 0x1000>;
274 interrupt-names = "periph_irq";
275 interrupts = <0 190 0>;
276 qcom,ee = <0>;
277 qcom,channel = <0>;
278 #address-cells = <2>;
279 #size-cells = <0>;
280 interrupt-controller;
281 #interrupt-cells = <4>;
282 };
229 }; 283 };
230}; 284};
diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index d01f618df5f7..9f727d8eadf6 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -2,6 +2,7 @@
2 2
3#include "skeleton.dtsi" 3#include "skeleton.dtsi"
4#include <dt-bindings/clock/qcom,gcc-ipq806x.h> 4#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
5#include <dt-bindings/clock/qcom,lcc-ipq806x.h>
5#include <dt-bindings/soc/qcom,gsbi.h> 6#include <dt-bindings/soc/qcom,gsbi.h>
6 7
7/ { 8/ {
@@ -74,6 +75,21 @@
74 ranges; 75 ranges;
75 compatible = "simple-bus"; 76 compatible = "simple-bus";
76 77
78 lpass@28100000 {
79 compatible = "qcom,lpass-cpu";
80 status = "disabled";
81 clocks = <&lcc AHBIX_CLK>,
82 <&lcc MI2S_OSR_CLK>,
83 <&lcc MI2S_BIT_CLK>;
84 clock-names = "ahbix-clk",
85 "mi2s-osr-clk",
86 "mi2s-bit-clk";
87 interrupts = <0 85 1>;
88 interrupt-names = "lpass-irq-lpaif";
89 reg = <0x28100000 0x10000>;
90 reg-names = "lpass-lpaif";
91 };
92
77 qcom_pinmux: pinmux@800000 { 93 qcom_pinmux: pinmux@800000 {
78 compatible = "qcom,ipq8064-pinctrl"; 94 compatible = "qcom,ipq8064-pinctrl";
79 reg = <0x800000 0x4000>; 95 reg = <0x800000 0x4000>;
@@ -132,6 +148,7 @@
132 148
133 gsbi2: gsbi@12480000 { 149 gsbi2: gsbi@12480000 {
134 compatible = "qcom,gsbi-v1.0.0"; 150 compatible = "qcom,gsbi-v1.0.0";
151 cell-index = <2>;
135 reg = <0x12480000 0x100>; 152 reg = <0x12480000 0x100>;
136 clocks = <&gcc GSBI2_H_CLK>; 153 clocks = <&gcc GSBI2_H_CLK>;
137 clock-names = "iface"; 154 clock-names = "iface";
@@ -140,6 +157,8 @@
140 ranges; 157 ranges;
141 status = "disabled"; 158 status = "disabled";
142 159
160 syscon-tcsr = <&tcsr>;
161
143 serial@12490000 { 162 serial@12490000 {
144 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 163 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
145 reg = <0x12490000 0x1000>, 164 reg = <0x12490000 0x1000>,
@@ -167,6 +186,7 @@
167 186
168 gsbi4: gsbi@16300000 { 187 gsbi4: gsbi@16300000 {
169 compatible = "qcom,gsbi-v1.0.0"; 188 compatible = "qcom,gsbi-v1.0.0";
189 cell-index = <4>;
170 reg = <0x16300000 0x100>; 190 reg = <0x16300000 0x100>;
171 clocks = <&gcc GSBI4_H_CLK>; 191 clocks = <&gcc GSBI4_H_CLK>;
172 clock-names = "iface"; 192 clock-names = "iface";
@@ -175,6 +195,8 @@
175 ranges; 195 ranges;
176 status = "disabled"; 196 status = "disabled";
177 197
198 syscon-tcsr = <&tcsr>;
199
178 serial@16340000 { 200 serial@16340000 {
179 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 201 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
180 reg = <0x16340000 0x1000>, 202 reg = <0x16340000 0x1000>,
@@ -201,6 +223,7 @@
201 223
202 gsbi5: gsbi@1a200000 { 224 gsbi5: gsbi@1a200000 {
203 compatible = "qcom,gsbi-v1.0.0"; 225 compatible = "qcom,gsbi-v1.0.0";
226 cell-index = <5>;
204 reg = <0x1a200000 0x100>; 227 reg = <0x1a200000 0x100>;
205 clocks = <&gcc GSBI5_H_CLK>; 228 clocks = <&gcc GSBI5_H_CLK>;
206 clock-names = "iface"; 229 clock-names = "iface";
@@ -209,6 +232,8 @@
209 ranges; 232 ranges;
210 status = "disabled"; 233 status = "disabled";
211 234
235 syscon-tcsr = <&tcsr>;
236
212 serial@1a240000 { 237 serial@1a240000 {
213 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 238 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
214 reg = <0x1a240000 0x1000>, 239 reg = <0x1a240000 0x1000>,
@@ -291,5 +316,18 @@
291 #clock-cells = <1>; 316 #clock-cells = <1>;
292 #reset-cells = <1>; 317 #reset-cells = <1>;
293 }; 318 };
319
320 tcsr: syscon@1a400000 {
321 compatible = "qcom,tcsr-ipq8064", "syscon";
322 reg = <0x1a400000 0x100>;
323 };
324
325 lcc: clock-controller@28000000 {
326 compatible = "qcom,lcc-ipq8064";
327 reg = <0x28000000 0x1000>;
328 #clock-cells = <1>;
329 #reset-cells = <1>;
330 };
331
294 }; 332 };
295}; 333};
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index 0affd6193f56..20bbd19b996e 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -82,6 +82,7 @@
82 82
83 gsbi12: gsbi@19c00000 { 83 gsbi12: gsbi@19c00000 {
84 compatible = "qcom,gsbi-v1.0.0"; 84 compatible = "qcom,gsbi-v1.0.0";
85 cell-index = <12>;
85 reg = <0x19c00000 0x100>; 86 reg = <0x19c00000 0x100>;
86 clocks = <&gcc GSBI12_H_CLK>; 87 clocks = <&gcc GSBI12_H_CLK>;
87 clock-names = "iface"; 88 clock-names = "iface";
@@ -89,6 +90,8 @@
89 #size-cells = <1>; 90 #size-cells = <1>;
90 ranges; 91 ranges;
91 92
93 syscon-tcsr = <&tcsr>;
94
92 serial@19c40000 { 95 serial@19c40000 {
93 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 96 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
94 reg = <0x19c40000 0x1000>, 97 reg = <0x19c40000 0x1000>,
@@ -196,6 +199,11 @@
196 vmmc-supply = <&vsdcc_fixed>; 199 vmmc-supply = <&vsdcc_fixed>;
197 }; 200 };
198 }; 201 };
202
203 tcsr: syscon@1a400000 {
204 compatible = "qcom,tcsr-msm8660", "syscon";
205 reg = <0x1a400000 0x100>;
206 };
199 }; 207 };
200 208
201}; 209};
diff --git a/arch/arm/boot/dts/qcom-msm8960.dtsi b/arch/arm/boot/dts/qcom-msm8960.dtsi
index e1b0d5cd9e3c..a02b984cc68d 100644
--- a/arch/arm/boot/dts/qcom-msm8960.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8960.dtsi
@@ -91,6 +91,13 @@
91 reg = <0x900000 0x4000>; 91 reg = <0x900000 0x4000>;
92 }; 92 };
93 93
94 lcc: clock-controller@28000000 {
95 compatible = "qcom,lcc-msm8960";
96 reg = <0x28000000 0x1000>;
97 #clock-cells = <1>;
98 #reset-cells = <1>;
99 };
100
94 clock-controller@4000000 { 101 clock-controller@4000000 {
95 compatible = "qcom,mmcc-msm8960"; 102 compatible = "qcom,mmcc-msm8960";
96 reg = <0x4000000 0x1000>; 103 reg = <0x4000000 0x1000>;
@@ -122,6 +129,7 @@
122 129
123 gsbi5: gsbi@16400000 { 130 gsbi5: gsbi@16400000 {
124 compatible = "qcom,gsbi-v1.0.0"; 131 compatible = "qcom,gsbi-v1.0.0";
132 cell-index = <5>;
125 reg = <0x16400000 0x100>; 133 reg = <0x16400000 0x100>;
126 clocks = <&gcc GSBI5_H_CLK>; 134 clocks = <&gcc GSBI5_H_CLK>;
127 clock-names = "iface"; 135 clock-names = "iface";
@@ -129,6 +137,8 @@
129 #size-cells = <1>; 137 #size-cells = <1>;
130 ranges; 138 ranges;
131 139
140 syscon-tcsr = <&tcsr>;
141
132 serial@16440000 { 142 serial@16440000 {
133 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; 143 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
134 reg = <0x16440000 0x1000>, 144 reg = <0x16440000 0x1000>,
@@ -238,5 +248,10 @@
238 vmmc-supply = <&vsdcc_fixed>; 248 vmmc-supply = <&vsdcc_fixed>;
239 }; 249 };
240 }; 250 };
251
252 tcsr: syscon@1a400000 {
253 compatible = "qcom,tcsr-msm8960", "syscon";
254 reg = <0x1a400000 0x100>;
255 };
241 }; 256 };
242}; 257};
diff --git a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
index cccc21b7c8fd..bd35b0674ff6 100644
--- a/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
+++ b/arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts
@@ -1,4 +1,6 @@
1#include "qcom-msm8974.dtsi" 1#include "qcom-msm8974.dtsi"
2#include "qcom-pm8841.dtsi"
3#include "qcom-pm8941.dtsi"
2 4
3/ { 5/ {
4 model = "Sony Xperia Z1"; 6 model = "Sony Xperia Z1";
diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi
index e265ec16a787..37b47b5538b8 100644
--- a/arch/arm/boot/dts/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8974.dtsi
@@ -21,6 +21,8 @@
21 reg = <0>; 21 reg = <0>;
22 next-level-cache = <&L2>; 22 next-level-cache = <&L2>;
23 qcom,acc = <&acc0>; 23 qcom,acc = <&acc0>;
24 qcom,saw = <&saw0>;
25 cpu-idle-states = <&CPU_SPC>;
24 }; 26 };
25 27
26 cpu@1 { 28 cpu@1 {
@@ -30,6 +32,8 @@
30 reg = <1>; 32 reg = <1>;
31 next-level-cache = <&L2>; 33 next-level-cache = <&L2>;
32 qcom,acc = <&acc1>; 34 qcom,acc = <&acc1>;
35 qcom,saw = <&saw1>;
36 cpu-idle-states = <&CPU_SPC>;
33 }; 37 };
34 38
35 cpu@2 { 39 cpu@2 {
@@ -39,6 +43,8 @@
39 reg = <2>; 43 reg = <2>;
40 next-level-cache = <&L2>; 44 next-level-cache = <&L2>;
41 qcom,acc = <&acc2>; 45 qcom,acc = <&acc2>;
46 qcom,saw = <&saw2>;
47 cpu-idle-states = <&CPU_SPC>;
42 }; 48 };
43 49
44 cpu@3 { 50 cpu@3 {
@@ -48,6 +54,8 @@
48 reg = <3>; 54 reg = <3>;
49 next-level-cache = <&L2>; 55 next-level-cache = <&L2>;
50 qcom,acc = <&acc3>; 56 qcom,acc = <&acc3>;
57 qcom,saw = <&saw3>;
58 cpu-idle-states = <&CPU_SPC>;
51 }; 59 };
52 60
53 L2: l2-cache { 61 L2: l2-cache {
@@ -55,6 +63,16 @@
55 cache-level = <2>; 63 cache-level = <2>;
56 qcom,saw = <&saw_l2>; 64 qcom,saw = <&saw_l2>;
57 }; 65 };
66
67 idle-states {
68 CPU_SPC: spc {
69 compatible = "qcom,idle-state-spc",
70 "arm,idle-state";
71 entry-latency-us = <150>;
72 exit-latency-us = <200>;
73 min-residency-us = <2000>;
74 };
75 };
58 }; 76 };
59 77
60 cpu-pmu { 78 cpu-pmu {
@@ -144,7 +162,27 @@
144 }; 162 };
145 }; 163 };
146 164
147 saw_l2: regulator@f9012000 { 165 saw0: power-controller@f9089000 {
166 compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
167 reg = <0xf9089000 0x1000>, <0xf9009000 0x1000>;
168 };
169
170 saw1: power-controller@f9099000 {
171 compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
172 reg = <0xf9099000 0x1000>, <0xf9009000 0x1000>;
173 };
174
175 saw2: power-controller@f90a9000 {
176 compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
177 reg = <0xf90a9000 0x1000>, <0xf9009000 0x1000>;
178 };
179
180 saw3: power-controller@f90b9000 {
181 compatible = "qcom,msm8974-saw2-v2.1-cpu", "qcom,saw2";
182 reg = <0xf90b9000 0x1000>, <0xf9009000 0x1000>;
183 };
184
185 saw_l2: power-controller@f9012000 {
148 compatible = "qcom,saw2"; 186 compatible = "qcom,saw2";
149 reg = <0xf9012000 0x1000>; 187 reg = <0xf9012000 0x1000>;
150 regulator; 188 regulator;
@@ -247,5 +285,21 @@
247 #address-cells = <1>; 285 #address-cells = <1>;
248 #size-cells = <0>; 286 #size-cells = <0>;
249 }; 287 };
288
289 spmi_bus: spmi@fc4cf000 {
290 compatible = "qcom,spmi-pmic-arb";
291 reg-names = "core", "intr", "cnfg";
292 reg = <0xfc4cf000 0x1000>,
293 <0xfc4cb000 0x1000>,
294 <0xfc4ca000 0x1000>;
295 interrupt-names = "periph_irq";
296 interrupts = <0 190 0>;
297 qcom,ee = <0>;
298 qcom,channel = <0>;
299 #address-cells = <2>;
300 #size-cells = <0>;
301 interrupt-controller;
302 #interrupt-cells = <4>;
303 };
250 }; 304 };
251}; 305};
diff --git a/arch/arm/boot/dts/qcom-pm8841.dtsi b/arch/arm/boot/dts/qcom-pm8841.dtsi
new file mode 100644
index 000000000000..73813cc118f9
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-pm8841.dtsi
@@ -0,0 +1,18 @@
1#include <dt-bindings/spmi/spmi.h>
2
3&spmi_bus {
4
5 usid4: pm8841@4 {
6 compatible = "qcom,spmi-pmic";
7 reg = <0x4 SPMI_USID>;
8 #address-cells = <1>;
9 #size-cells = <0>;
10 };
11
12 usid5: pm8841@5 {
13 compatible = "qcom,spmi-pmic";
14 reg = <0x5 SPMI_USID>;
15 #address-cells = <1>;
16 #size-cells = <0>;
17 };
18};
diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
new file mode 100644
index 000000000000..24c5088acea2
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -0,0 +1,18 @@
1#include <dt-bindings/spmi/spmi.h>
2
3&spmi_bus {
4
5 usid0: pm8941@0 {
6 compatible ="qcom,spmi-pmic";
7 reg = <0x0 SPMI_USID>;
8 #address-cells = <1>;
9 #size-cells = <0>;
10 };
11
12 usid1: pm8941@1 {
13 compatible ="qcom,spmi-pmic";
14 reg = <0x1 SPMI_USID>;
15 #address-cells = <1>;
16 #size-cells = <0>;
17 };
18};
diff --git a/arch/arm/boot/dts/qcom-pma8084.dtsi b/arch/arm/boot/dts/qcom-pma8084.dtsi
new file mode 100644
index 000000000000..a5a4fe695a46
--- /dev/null
+++ b/arch/arm/boot/dts/qcom-pma8084.dtsi
@@ -0,0 +1,18 @@
1#include <dt-bindings/spmi/spmi.h>
2
3&spmi_bus {
4
5 usid0: pma8084@0 {
6 compatible = "qcom,spmi-pmic";
7 reg = <0x0 SPMI_USID>;
8 #address-cells = <1>;
9 #size-cells = <0>;
10 };
11
12 usid1: pma8084@1 {
13 compatible = "qcom,spmi-pmic";
14 reg = <0x1 SPMI_USID>;
15 #address-cells = <1>;
16 #size-cells = <0>;
17 };
18};
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
deleted file mode 100644
index b3d8f844b57a..000000000000
--- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
+++ /dev/null
@@ -1,156 +0,0 @@
1/*
2 * Device Tree Source for the APE6EVM board
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/dts-v1/;
12#include "r8a73a4.dtsi"
13#include <dt-bindings/gpio/gpio.h>
14
15/ {
16 model = "APE6EVM";
17 compatible = "renesas,ape6evm-reference", "renesas,r8a73a4";
18
19 aliases {
20 serial0 = &scifa0;
21 };
22
23 chosen {
24 bootargs = "ignore_loglevel rw";
25 stdout-path = &scifa0;
26 };
27
28 memory@40000000 {
29 device_type = "memory";
30 reg = <0 0x40000000 0 0x40000000>;
31 };
32
33 memory@200000000 {
34 device_type = "memory";
35 reg = <2 0x00000000 0 0x40000000>;
36 };
37
38 vcc_mmc0: regulator@0 {
39 compatible = "regulator-fixed";
40 regulator-name = "MMC0 Vcc";
41 regulator-min-microvolt = <2800000>;
42 regulator-max-microvolt = <2800000>;
43 regulator-always-on;
44 };
45
46 vcc_sdhi0: regulator@1 {
47 compatible = "regulator-fixed";
48
49 regulator-name = "SDHI0 Vcc";
50 regulator-min-microvolt = <3300000>;
51 regulator-max-microvolt = <3300000>;
52
53 gpio = <&pfc 76 GPIO_ACTIVE_HIGH>;
54 enable-active-high;
55 };
56
57 /* Common 3.3V rail, used by several devices on APE6EVM */
58 ape6evm_fixed_3v3: regulator@2 {
59 compatible = "regulator-fixed";
60 regulator-name = "3V3";
61 regulator-min-microvolt = <3300000>;
62 regulator-max-microvolt = <3300000>;
63 regulator-always-on;
64 };
65
66 lbsc {
67 compatible = "simple-bus";
68 #address-cells = <1>;
69 #size-cells = <1>;
70 ranges = <0 0 0 0x20000000>;
71 };
72};
73
74&i2c5 {
75 status = "okay";
76 vdd_dvfs: max8973@1b {
77 compatible = "maxim,max8973";
78 reg = <0x1b>;
79
80 regulator-min-microvolt = <935000>;
81 regulator-max-microvolt = <1200000>;
82 regulator-boot-on;
83 regulator-always-on;
84 };
85};
86
87&cpu0 {
88 cpu0-supply = <&vdd_dvfs>;
89 operating-points = <
90 /* kHz uV */
91 1950000 1115000
92 1462500 995000
93 >;
94 voltage-tolerance = <1>; /* 1% */
95};
96
97&cmt1 {
98 status = "okay";
99};
100
101&pfc {
102 scifa0_pins: serial0 {
103 renesas,groups = "scifa0_data";
104 renesas,function = "scifa0";
105 };
106
107 mmc0_pins: mmc {
108 renesas,groups = "mmc0_data8", "mmc0_ctrl";
109 renesas,function = "mmc0";
110 };
111
112 sdhi0_pins: sd0 {
113 renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
114 renesas,function = "sdhi0";
115 };
116
117 sdhi1_pins: sd1 {
118 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
119 renesas,function = "sdhi1";
120 };
121};
122
123&mmcif0 {
124 vmmc-supply = <&vcc_mmc0>;
125 bus-width = <8>;
126 non-removable;
127 pinctrl-names = "default";
128 pinctrl-0 = <&mmc0_pins>;
129 status = "okay";
130};
131
132&scifa0 {
133 pinctrl-0 = <&scifa0_pins>;
134 pinctrl-names = "default";
135
136 status = "okay";
137};
138
139&sdhi0 {
140 vmmc-supply = <&vcc_sdhi0>;
141 bus-width = <4>;
142 toshiba,mmc-wrprotect-disable;
143 pinctrl-names = "default";
144 pinctrl-0 = <&sdhi0_pins>;
145 status = "okay";
146};
147
148&sdhi1 {
149 vmmc-supply = <&ape6evm_fixed_3v3>;
150 bus-width = <4>;
151 broken-cd;
152 toshiba,mmc-wrprotect-disable;
153 pinctrl-names = "default";
154 pinctrl-0 = <&sdhi1_pins>;
155 status = "okay";
156};
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts
index 0d50bef01234..81a38ceee098 100644
--- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts
+++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts
@@ -22,7 +22,7 @@
22 }; 22 };
23 23
24 chosen { 24 chosen {
25 bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw"; 25 bootargs = "ignore_loglevel root=/dev/nfs ip=dhcp rw";
26 stdout-path = &scifa0; 26 stdout-path = &scifa0;
27 }; 27 };
28 28
@@ -72,50 +72,30 @@
72 regulator-always-on; 72 regulator-always-on;
73 }; 73 };
74 74
75 lbsc {
76 compatible = "simple-bus";
77 #address-cells = <1>;
78 #size-cells = <1>;
79 ranges = <0 0 0 0x20000000>;
80
81 ethernet@8000000 {
82 compatible = "smsc,lan9220", "smsc,lan9115";
83 reg = <0x08000000 0x1000>;
84 interrupt-parent = <&irqc1>;
85 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
86 phy-mode = "mii";
87 reg-io-width = <4>;
88 smsc,irq-active-high;
89 smsc,irq-push-pull;
90 vdd33a-supply = <&ape6evm_fixed_3v3>;
91 vddvario-supply = <&ape6evm_fixed_1v8>;
92 };
93 };
94
95 leds { 75 leds {
96 compatible = "gpio-leds"; 76 compatible = "gpio-leds";
97 led1 { 77 led1 {
98 gpios = <&pfc 28 GPIO_ACTIVE_LOW>; 78 gpios = <&pfc 28 GPIO_ACTIVE_HIGH>;
99 label = "GNSS_EN"; 79 label = "GNSS_EN";
100 }; 80 };
101 led2 { 81 led2 {
102 gpios = <&pfc 126 GPIO_ACTIVE_LOW>; 82 gpios = <&pfc 126 GPIO_ACTIVE_HIGH>;
103 label = "NFC_NRST"; 83 label = "NFC_NRST";
104 }; 84 };
105 led3 { 85 led3 {
106 gpios = <&pfc 132 GPIO_ACTIVE_LOW>; 86 gpios = <&pfc 132 GPIO_ACTIVE_HIGH>;
107 label = "GNSS_NRST"; 87 label = "GNSS_NRST";
108 }; 88 };
109 led4 { 89 led4 {
110 gpios = <&pfc 232 GPIO_ACTIVE_LOW>; 90 gpios = <&pfc 232 GPIO_ACTIVE_HIGH>;
111 label = "BT_WAKEUP"; 91 label = "BT_WAKEUP";
112 }; 92 };
113 led5 { 93 led5 {
114 gpios = <&pfc 250 GPIO_ACTIVE_LOW>; 94 gpios = <&pfc 250 GPIO_ACTIVE_HIGH>;
115 label = "STROBE"; 95 label = "STROBE";
116 }; 96 };
117 led6 { 97 led6 {
118 gpios = <&pfc 288 GPIO_ACTIVE_LOW>; 98 gpios = <&pfc 288 GPIO_ACTIVE_HIGH>;
119 label = "BBRESETOUT"; 99 label = "BBRESETOUT";
120 }; 100 };
121 }; 101 };
@@ -123,10 +103,14 @@
123 keyboard { 103 keyboard {
124 compatible = "gpio-keys"; 104 compatible = "gpio-keys";
125 105
106 pinctrl-names = "default";
107 pinctrl-0 = <&keyboard_pins>;
108
126 zero-key { 109 zero-key {
127 gpios = <&pfc 324 GPIO_ACTIVE_LOW>; 110 gpios = <&pfc 324 GPIO_ACTIVE_LOW>;
128 linux,code = <KEY_0>; 111 linux,code = <KEY_0>;
129 label = "S16"; 112 label = "S16";
113 gpio-key,wakeup;
130 }; 114 };
131 115
132 menu-key { 116 menu-key {
@@ -184,6 +168,21 @@
184 voltage-tolerance = <1>; /* 1% */ 168 voltage-tolerance = <1>; /* 1% */
185}; 169};
186 170
171&bsc {
172 ethernet@8000000 {
173 compatible = "smsc,lan9220", "smsc,lan9115";
174 reg = <0x08000000 0x1000>;
175 interrupt-parent = <&irqc1>;
176 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
177 phy-mode = "mii";
178 reg-io-width = <4>;
179 smsc,irq-active-high;
180 smsc,irq-push-pull;
181 vdd33a-supply = <&ape6evm_fixed_3v3>;
182 vddvario-supply = <&ape6evm_fixed_1v8>;
183 };
184};
185
187&cmt1 { 186&cmt1 {
188 status = "okay"; 187 status = "okay";
189}; 188};
@@ -208,6 +207,12 @@
208 renesas,groups = "sdhi1_data4", "sdhi1_ctrl"; 207 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
209 renesas,function = "sdhi1"; 208 renesas,function = "sdhi1";
210 }; 209 };
210
211 keyboard_pins: keyboard {
212 renesas,pins = "PORT324", "PORT325", "PORT326", "PORT327",
213 "PORT328", "PORT329";
214 bias-pull-up;
215 };
211}; 216};
212 217
213&mmcif0 { 218&mmcif0 {
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index 38136d9f6d95..0fd889f88109 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -9,6 +9,7 @@
9 * kind, whether express or implied. 9 * kind, whether express or implied.
10 */ 10 */
11 11
12#include <dt-bindings/clock/r8a73a4-clock.h>
12#include <dt-bindings/interrupt-controller/arm-gic.h> 13#include <dt-bindings/interrupt-controller/arm-gic.h>
13#include <dt-bindings/interrupt-controller/irq.h> 14#include <dt-bindings/interrupt-controller/irq.h>
14 15
@@ -27,9 +28,15 @@
27 compatible = "arm,cortex-a15"; 28 compatible = "arm,cortex-a15";
28 reg = <0>; 29 reg = <0>;
29 clock-frequency = <1500000000>; 30 clock-frequency = <1500000000>;
31 power-domains = <&pd_a2sl>;
30 }; 32 };
31 }; 33 };
32 34
35 ptm {
36 compatible = "arm,coresight-etm3x";
37 power-domains = <&pd_d4>;
38 };
39
33 timer { 40 timer {
34 compatible = "arm,armv7-timer"; 41 compatible = "arm,armv7-timer";
35 interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 42 interrupts = <1 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
@@ -41,11 +48,13 @@
41 dbsc1: memory-controller@e6790000 { 48 dbsc1: memory-controller@e6790000 {
42 compatible = "renesas,dbsc-r8a73a4"; 49 compatible = "renesas,dbsc-r8a73a4";
43 reg = <0 0xe6790000 0 0x10000>; 50 reg = <0 0xe6790000 0 0x10000>;
51 power-domains = <&pd_a3bc>;
44 }; 52 };
45 53
46 dbsc2: memory-controller@e67a0000 { 54 dbsc2: memory-controller@e67a0000 {
47 compatible = "renesas,dbsc-r8a73a4"; 55 compatible = "renesas,dbsc-r8a73a4";
48 reg = <0 0xe67a0000 0 0x10000>; 56 reg = <0 0xe67a0000 0 0x10000>;
57 power-domains = <&pd_a3bc>;
49 }; 58 };
50 59
51 dmac: dma-multiplexer { 60 dmac: dma-multiplexer {
@@ -87,38 +96,19 @@
87 "ch8", "ch9", "ch10", "ch11", 96 "ch8", "ch9", "ch10", "ch11",
88 "ch12", "ch13", "ch14", "ch15", 97 "ch12", "ch13", "ch14", "ch15",
89 "ch16", "ch17", "ch18", "ch19"; 98 "ch16", "ch17", "ch18", "ch19";
99 clocks = <&mstp2_clks R8A73A4_CLK_DMAC>;
100 power-domains = <&pd_a3sp>;
90 }; 101 };
91 }; 102 };
92 103
93 pfc: pfc@e6050000 {
94 compatible = "renesas,pfc-r8a73a4";
95 reg = <0 0xe6050000 0 0x9000>;
96 gpio-controller;
97 #gpio-cells = <2>;
98 interrupts-extended =
99 <&irqc0 0 0>, <&irqc0 1 0>, <&irqc0 2 0>, <&irqc0 3 0>,
100 <&irqc0 4 0>, <&irqc0 5 0>, <&irqc0 6 0>, <&irqc0 7 0>,
101 <&irqc0 8 0>, <&irqc0 9 0>, <&irqc0 10 0>, <&irqc0 11 0>,
102 <&irqc0 12 0>, <&irqc0 13 0>, <&irqc0 14 0>, <&irqc0 15 0>,
103 <&irqc0 16 0>, <&irqc0 17 0>, <&irqc0 18 0>, <&irqc0 19 0>,
104 <&irqc0 20 0>, <&irqc0 21 0>, <&irqc0 22 0>, <&irqc0 23 0>,
105 <&irqc0 24 0>, <&irqc0 25 0>, <&irqc0 26 0>, <&irqc0 27 0>,
106 <&irqc0 28 0>, <&irqc0 29 0>, <&irqc0 30 0>, <&irqc0 31 0>,
107 <&irqc1 0 0>, <&irqc1 1 0>, <&irqc1 2 0>, <&irqc1 3 0>,
108 <&irqc1 4 0>, <&irqc1 5 0>, <&irqc1 6 0>, <&irqc1 7 0>,
109 <&irqc1 8 0>, <&irqc1 9 0>, <&irqc1 10 0>, <&irqc1 11 0>,
110 <&irqc1 12 0>, <&irqc1 13 0>, <&irqc1 14 0>, <&irqc1 15 0>,
111 <&irqc1 16 0>, <&irqc1 17 0>, <&irqc1 18 0>, <&irqc1 19 0>,
112 <&irqc1 20 0>, <&irqc1 21 0>, <&irqc1 22 0>, <&irqc1 23 0>,
113 <&irqc1 24 0>, <&irqc1 25 0>;
114 };
115
116 i2c5: i2c@e60b0000 { 104 i2c5: i2c@e60b0000 {
117 #address-cells = <1>; 105 #address-cells = <1>;
118 #size-cells = <0>; 106 #size-cells = <0>;
119 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 107 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
120 reg = <0 0xe60b0000 0 0x428>; 108 reg = <0 0xe60b0000 0 0x428>;
121 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>; 109 interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>;
110 clocks = <&mstp4_clks R8A73A4_CLK_IIC5>;
111 power-domains = <&pd_a3sp>;
122 112
123 status = "disabled"; 113 status = "disabled";
124 }; 114 };
@@ -127,6 +117,9 @@
127 compatible = "renesas,cmt-48-r8a73a4", "renesas,cmt-48-gen2"; 117 compatible = "renesas,cmt-48-r8a73a4", "renesas,cmt-48-gen2";
128 reg = <0 0xe6130000 0 0x1004>; 118 reg = <0 0xe6130000 0 0x1004>;
129 interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>; 119 interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>;
120 clocks = <&mstp3_clks R8A73A4_CLK_CMT1>;
121 clock-names = "fck";
122 power-domains = <&pd_c5>;
130 123
131 renesas,channels-mask = <0xff>; 124 renesas,channels-mask = <0xff>;
132 125
@@ -170,6 +163,7 @@
170 <0 29 IRQ_TYPE_LEVEL_HIGH>, 163 <0 29 IRQ_TYPE_LEVEL_HIGH>,
171 <0 30 IRQ_TYPE_LEVEL_HIGH>, 164 <0 30 IRQ_TYPE_LEVEL_HIGH>,
172 <0 31 IRQ_TYPE_LEVEL_HIGH>; 165 <0 31 IRQ_TYPE_LEVEL_HIGH>;
166 power-domains = <&pd_c4>;
173 }; 167 };
174 168
175 irqc1: interrupt-controller@e61c0200 { 169 irqc1: interrupt-controller@e61c0200 {
@@ -203,6 +197,31 @@
203 <0 55 IRQ_TYPE_LEVEL_HIGH>, 197 <0 55 IRQ_TYPE_LEVEL_HIGH>,
204 <0 56 IRQ_TYPE_LEVEL_HIGH>, 198 <0 56 IRQ_TYPE_LEVEL_HIGH>,
205 <0 57 IRQ_TYPE_LEVEL_HIGH>; 199 <0 57 IRQ_TYPE_LEVEL_HIGH>;
200 power-domains = <&pd_c4>;
201 };
202
203 pfc: pfc@e6050000 {
204 compatible = "renesas,pfc-r8a73a4";
205 reg = <0 0xe6050000 0 0x9000>;
206 gpio-controller;
207 #gpio-cells = <2>;
208 interrupts-extended =
209 <&irqc0 0 0>, <&irqc0 1 0>, <&irqc0 2 0>, <&irqc0 3 0>,
210 <&irqc0 4 0>, <&irqc0 5 0>, <&irqc0 6 0>, <&irqc0 7 0>,
211 <&irqc0 8 0>, <&irqc0 9 0>, <&irqc0 10 0>, <&irqc0 11 0>,
212 <&irqc0 12 0>, <&irqc0 13 0>, <&irqc0 14 0>, <&irqc0 15 0>,
213 <&irqc0 16 0>, <&irqc0 17 0>, <&irqc0 18 0>, <&irqc0 19 0>,
214 <&irqc0 20 0>, <&irqc0 21 0>, <&irqc0 22 0>, <&irqc0 23 0>,
215 <&irqc0 24 0>, <&irqc0 25 0>, <&irqc0 26 0>, <&irqc0 27 0>,
216 <&irqc0 28 0>, <&irqc0 29 0>, <&irqc0 30 0>, <&irqc0 31 0>,
217 <&irqc1 0 0>, <&irqc1 1 0>, <&irqc1 2 0>, <&irqc1 3 0>,
218 <&irqc1 4 0>, <&irqc1 5 0>, <&irqc1 6 0>, <&irqc1 7 0>,
219 <&irqc1 8 0>, <&irqc1 9 0>, <&irqc1 10 0>, <&irqc1 11 0>,
220 <&irqc1 12 0>, <&irqc1 13 0>, <&irqc1 14 0>, <&irqc1 15 0>,
221 <&irqc1 16 0>, <&irqc1 17 0>, <&irqc1 18 0>, <&irqc1 19 0>,
222 <&irqc1 20 0>, <&irqc1 21 0>, <&irqc1 22 0>, <&irqc1 23 0>,
223 <&irqc1 24 0>, <&irqc1 25 0>;
224 power-domains = <&pd_c5>;
206 }; 225 };
207 226
208 thermal@e61f0000 { 227 thermal@e61f0000 {
@@ -210,6 +229,8 @@
210 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>, 229 reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>,
211 <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>; 230 <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>;
212 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>; 231 interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
232 clocks = <&mstp5_clks R8A73A4_CLK_THERMAL>;
233 power-domains = <&pd_c5>;
213 }; 234 };
214 235
215 i2c0: i2c@e6500000 { 236 i2c0: i2c@e6500000 {
@@ -218,6 +239,8 @@
218 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 239 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
219 reg = <0 0xe6500000 0 0x428>; 240 reg = <0 0xe6500000 0 0x428>;
220 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; 241 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
242 clocks = <&mstp3_clks R8A73A4_CLK_IIC0>;
243 power-domains = <&pd_a3sp>;
221 status = "disabled"; 244 status = "disabled";
222 }; 245 };
223 246
@@ -227,6 +250,8 @@
227 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 250 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
228 reg = <0 0xe6510000 0 0x428>; 251 reg = <0 0xe6510000 0 0x428>;
229 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>; 252 interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
253 clocks = <&mstp3_clks R8A73A4_CLK_IIC1>;
254 power-domains = <&pd_a3sp>;
230 status = "disabled"; 255 status = "disabled";
231 }; 256 };
232 257
@@ -236,6 +261,8 @@
236 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 261 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
237 reg = <0 0xe6520000 0 0x428>; 262 reg = <0 0xe6520000 0 0x428>;
238 interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>; 263 interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>;
264 clocks = <&mstp3_clks R8A73A4_CLK_IIC2>;
265 power-domains = <&pd_a3sp>;
239 status = "disabled"; 266 status = "disabled";
240 }; 267 };
241 268
@@ -245,6 +272,8 @@
245 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 272 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
246 reg = <0 0xe6530000 0 0x428>; 273 reg = <0 0xe6530000 0 0x428>;
247 interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>; 274 interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>;
275 clocks = <&mstp4_clks R8A73A4_CLK_IIC3>;
276 power-domains = <&pd_a3sp>;
248 status = "disabled"; 277 status = "disabled";
249 }; 278 };
250 279
@@ -254,6 +283,8 @@
254 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 283 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
255 reg = <0 0xe6540000 0 0x428>; 284 reg = <0 0xe6540000 0 0x428>;
256 interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>; 285 interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>;
286 clocks = <&mstp4_clks R8A73A4_CLK_IIC4>;
287 power-domains = <&pd_a3sp>;
257 status = "disabled"; 288 status = "disabled";
258 }; 289 };
259 290
@@ -263,6 +294,8 @@
263 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 294 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
264 reg = <0 0xe6550000 0 0x428>; 295 reg = <0 0xe6550000 0 0x428>;
265 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>; 296 interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
297 clocks = <&mstp3_clks R8A73A4_CLK_IIC6>;
298 power-domains = <&pd_a3sp>;
266 status = "disabled"; 299 status = "disabled";
267 }; 300 };
268 301
@@ -272,6 +305,8 @@
272 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 305 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
273 reg = <0 0xe6560000 0 0x428>; 306 reg = <0 0xe6560000 0 0x428>;
274 interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>; 307 interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>;
308 clocks = <&mstp3_clks R8A73A4_CLK_IIC7>;
309 power-domains = <&pd_a3sp>;
275 status = "disabled"; 310 status = "disabled";
276 }; 311 };
277 312
@@ -281,6 +316,8 @@
281 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic"; 316 compatible = "renesas,iic-r8a73a4", "renesas,rmobile-iic";
282 reg = <0 0xe6570000 0 0x428>; 317 reg = <0 0xe6570000 0 0x428>;
283 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>; 318 interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
319 clocks = <&mstp5_clks R8A73A4_CLK_IIC8>;
320 power-domains = <&pd_a3sp>;
284 status = "disabled"; 321 status = "disabled";
285 }; 322 };
286 323
@@ -288,6 +325,9 @@
288 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 325 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
289 reg = <0 0xe6c20000 0 0x100>; 326 reg = <0 0xe6c20000 0 0x100>;
290 interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>; 327 interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
328 clocks = <&mstp2_clks R8A73A4_CLK_SCIFB0>;
329 clock-names = "sci_ick";
330 power-domains = <&pd_a3sp>;
291 status = "disabled"; 331 status = "disabled";
292 }; 332 };
293 333
@@ -295,6 +335,9 @@
295 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 335 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
296 reg = <0 0xe6c30000 0 0x100>; 336 reg = <0 0xe6c30000 0 0x100>;
297 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>; 337 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
338 clocks = <&mstp2_clks R8A73A4_CLK_SCIFB1>;
339 clock-names = "sci_ick";
340 power-domains = <&pd_a3sp>;
298 status = "disabled"; 341 status = "disabled";
299 }; 342 };
300 343
@@ -302,6 +345,9 @@
302 compatible = "renesas,scifa-r8a73a4", "renesas,scifa"; 345 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
303 reg = <0 0xe6c40000 0 0x100>; 346 reg = <0 0xe6c40000 0 0x100>;
304 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; 347 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
348 clocks = <&mstp2_clks R8A73A4_CLK_SCIFA0>;
349 clock-names = "sci_ick";
350 power-domains = <&pd_a3sp>;
305 status = "disabled"; 351 status = "disabled";
306 }; 352 };
307 353
@@ -309,6 +355,9 @@
309 compatible = "renesas,scifa-r8a73a4", "renesas,scifa"; 355 compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
310 reg = <0 0xe6c50000 0 0x100>; 356 reg = <0 0xe6c50000 0 0x100>;
311 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>; 357 interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
358 clocks = <&mstp2_clks R8A73A4_CLK_SCIFA1>;
359 clock-names = "sci_ick";
360 power-domains = <&pd_a3sp>;
312 status = "disabled"; 361 status = "disabled";
313 }; 362 };
314 363
@@ -316,6 +365,9 @@
316 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 365 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
317 reg = <0 0xe6ce0000 0 0x100>; 366 reg = <0 0xe6ce0000 0 0x100>;
318 interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>; 367 interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
368 clocks = <&mstp2_clks R8A73A4_CLK_SCIFB2>;
369 clock-names = "sci_ick";
370 power-domains = <&pd_a3sp>;
319 status = "disabled"; 371 status = "disabled";
320 }; 372 };
321 373
@@ -323,6 +375,9 @@
323 compatible = "renesas,scifb-r8a73a4", "renesas,scifb"; 375 compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
324 reg = <0 0xe6cf0000 0 0x100>; 376 reg = <0 0xe6cf0000 0 0x100>;
325 interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>; 377 interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
378 clocks = <&mstp2_clks R8A73A4_CLK_SCIFB3>;
379 clock-names = "sci_ick";
380 power-domains = <&pd_c4>;
326 status = "disabled"; 381 status = "disabled";
327 }; 382 };
328 383
@@ -330,6 +385,8 @@
330 compatible = "renesas,sdhi-r8a73a4"; 385 compatible = "renesas,sdhi-r8a73a4";
331 reg = <0 0xee100000 0 0x100>; 386 reg = <0 0xee100000 0 0x100>;
332 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; 387 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
388 clocks = <&mstp3_clks R8A73A4_CLK_SDHI0>;
389 power-domains = <&pd_a3sp>;
333 cap-sd-highspeed; 390 cap-sd-highspeed;
334 status = "disabled"; 391 status = "disabled";
335 }; 392 };
@@ -338,6 +395,8 @@
338 compatible = "renesas,sdhi-r8a73a4"; 395 compatible = "renesas,sdhi-r8a73a4";
339 reg = <0 0xee120000 0 0x100>; 396 reg = <0 0xee120000 0 0x100>;
340 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; 397 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
398 clocks = <&mstp3_clks R8A73A4_CLK_SDHI1>;
399 power-domains = <&pd_a3sp>;
341 cap-sd-highspeed; 400 cap-sd-highspeed;
342 status = "disabled"; 401 status = "disabled";
343 }; 402 };
@@ -346,6 +405,8 @@
346 compatible = "renesas,sdhi-r8a73a4"; 405 compatible = "renesas,sdhi-r8a73a4";
347 reg = <0 0xee140000 0 0x100>; 406 reg = <0 0xee140000 0 0x100>;
348 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; 407 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
408 clocks = <&mstp3_clks R8A73A4_CLK_SDHI2>;
409 power-domains = <&pd_a3sp>;
349 cap-sd-highspeed; 410 cap-sd-highspeed;
350 status = "disabled"; 411 status = "disabled";
351 }; 412 };
@@ -354,6 +415,8 @@
354 compatible = "renesas,sh-mmcif"; 415 compatible = "renesas,sh-mmcif";
355 reg = <0 0xee200000 0 0x80>; 416 reg = <0 0xee200000 0 0x80>;
356 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>; 417 interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
418 clocks = <&mstp3_clks R8A73A4_CLK_MMCIF0>;
419 power-domains = <&pd_a3sp>;
357 reg-io-width = <4>; 420 reg-io-width = <4>;
358 status = "disabled"; 421 status = "disabled";
359 }; 422 };
@@ -362,6 +425,8 @@
362 compatible = "renesas,sh-mmcif"; 425 compatible = "renesas,sh-mmcif";
363 reg = <0 0xee220000 0 0x80>; 426 reg = <0 0xee220000 0 0x80>;
364 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>; 427 interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
428 clocks = <&mstp3_clks R8A73A4_CLK_MMCIF1>;
429 power-domains = <&pd_a3sp>;
365 reg-io-width = <4>; 430 reg-io-width = <4>;
366 status = "disabled"; 431 status = "disabled";
367 }; 432 };
@@ -377,4 +442,450 @@
377 <0 0xf1006000 0 0x2000>; 442 <0 0xf1006000 0 0x2000>;
378 interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 443 interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
379 }; 444 };
445
446 bsc: bus@fec10000 {
447 compatible = "renesas,bsc-r8a73a4", "renesas,bsc",
448 "simple-pm-bus";
449 #address-cells = <1>;
450 #size-cells = <1>;
451 ranges = <0 0 0 0x20000000>;
452 reg = <0 0xfec10000 0 0x400>;
453 clocks = <&zb_clk>;
454 power-domains = <&pd_c4>;
455 };
456
457 clocks {
458 #address-cells = <2>;
459 #size-cells = <2>;
460 ranges;
461
462 /* External root clocks */
463 extalr_clk: extalr_clk {
464 compatible = "fixed-clock";
465 #clock-cells = <0>;
466 clock-frequency = <32768>;
467 clock-output-names = "extalr";
468 };
469 extal1_clk: extal1_clk {
470 compatible = "fixed-clock";
471 #clock-cells = <0>;
472 clock-frequency = <25000000>;
473 clock-output-names = "extal1";
474 };
475 extal2_clk: extal2_clk {
476 compatible = "fixed-clock";
477 #clock-cells = <0>;
478 clock-frequency = <48000000>;
479 clock-output-names = "extal2";
480 };
481 fsiack_clk: fsiack_clk {
482 compatible = "fixed-clock";
483 #clock-cells = <0>;
484 /* This value must be overridden by the board. */
485 clock-frequency = <0>;
486 clock-output-names = "fsiack";
487 };
488 fsibck_clk: fsibck_clk {
489 compatible = "fixed-clock";
490 #clock-cells = <0>;
491 /* This value must be overridden by the board. */
492 clock-frequency = <0>;
493 clock-output-names = "fsibck";
494 };
495
496 /* Special CPG clocks */
497 cpg_clocks: cpg_clocks@e6150000 {
498 compatible = "renesas,r8a73a4-cpg-clocks";
499 reg = <0 0xe6150000 0 0x10000>;
500 clocks = <&extal1_clk>, <&extal2_clk>;
501 #clock-cells = <1>;
502 clock-output-names = "main", "pll0", "pll1", "pll2",
503 "pll2s", "pll2h", "z", "z2",
504 "i", "m3", "b", "m1", "m2",
505 "zx", "zs", "hp";
506 };
507
508 /* Variable factor clocks (DIV6) */
509 zb_clk: zb_clk@e6150010 {
510 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
511 reg = <0 0xe6150010 0 4>;
512 clocks = <&pll1_div2_clk>, <0>,
513 <&cpg_clocks R8A73A4_CLK_PLL2S>, <0>;
514 #clock-cells = <0>;
515 clock-output-names = "zb";
516 };
517 sdhi0_clk: sdhi0_clk@e6150074 {
518 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
519 reg = <0 0xe6150074 0 4>;
520 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
521 <0>, <&extal2_clk>;
522 #clock-cells = <0>;
523 clock-output-names = "sdhi0ck";
524 };
525 sdhi1_clk: sdhi1_clk@e6150078 {
526 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
527 reg = <0 0xe6150078 0 4>;
528 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
529 <0>, <&extal2_clk>;
530 #clock-cells = <0>;
531 clock-output-names = "sdhi1ck";
532 };
533 sdhi2_clk: sdhi2_clk@e615007c {
534 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
535 reg = <0 0xe615007c 0 4>;
536 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
537 <0>, <&extal2_clk>;
538 #clock-cells = <0>;
539 clock-output-names = "sdhi2ck";
540 };
541 mmc0_clk: mmc0_clk@e6150240 {
542 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
543 reg = <0 0xe6150240 0 4>;
544 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
545 <0>, <&extal2_clk>;
546 #clock-cells = <0>;
547 clock-output-names = "mmc0";
548 };
549 mmc1_clk: mmc1_clk@e6150244 {
550 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
551 reg = <0 0xe6150244 0 4>;
552 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
553 <0>, <&extal2_clk>;
554 #clock-cells = <0>;
555 clock-output-names = "mmc1";
556 };
557 vclk1_clk: vclk1_clk@e6150008 {
558 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
559 reg = <0 0xe6150008 0 4>;
560 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
561 <0>, <&extal2_clk>, <&main_div2_clk>,
562 <&extalr_clk>, <0>, <0>;
563 #clock-cells = <0>;
564 clock-output-names = "vclk1";
565 };
566 vclk2_clk: vclk2_clk@e615000c {
567 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
568 reg = <0 0xe615000c 0 4>;
569 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
570 <0>, <&extal2_clk>, <&main_div2_clk>,
571 <&extalr_clk>, <0>, <0>;
572 #clock-cells = <0>;
573 clock-output-names = "vclk2";
574 };
575 vclk3_clk: vclk3_clk@e615001c {
576 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
577 reg = <0 0xe615001c 0 4>;
578 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
579 <0>, <&extal2_clk>, <&main_div2_clk>,
580 <&extalr_clk>, <0>, <0>;
581 #clock-cells = <0>;
582 clock-output-names = "vclk3";
583 };
584 vclk4_clk: vclk4_clk@e6150014 {
585 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
586 reg = <0 0xe6150014 0 4>;
587 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
588 <0>, <&extal2_clk>, <&main_div2_clk>,
589 <&extalr_clk>, <0>, <0>;
590 #clock-cells = <0>;
591 clock-output-names = "vclk4";
592 };
593 vclk5_clk: vclk5_clk@e6150034 {
594 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
595 reg = <0 0xe6150034 0 4>;
596 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
597 <0>, <&extal2_clk>, <&main_div2_clk>,
598 <&extalr_clk>, <0>, <0>;
599 #clock-cells = <0>;
600 clock-output-names = "vclk5";
601 };
602 fsia_clk: fsia_clk@e6150018 {
603 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
604 reg = <0 0xe6150018 0 4>;
605 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
606 <&fsiack_clk>, <0>;
607 #clock-cells = <0>;
608 clock-output-names = "fsia";
609 };
610 fsib_clk: fsib_clk@e6150090 {
611 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
612 reg = <0 0xe6150090 0 4>;
613 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
614 <&fsibck_clk>, <0>;
615 #clock-cells = <0>;
616 clock-output-names = "fsib";
617 };
618 mp_clk: mp_clk@e6150080 {
619 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
620 reg = <0 0xe6150080 0 4>;
621 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
622 <&extal2_clk>, <&extal2_clk>;
623 #clock-cells = <0>;
624 clock-output-names = "mp";
625 };
626 m4_clk: m4_clk@e6150098 {
627 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
628 reg = <0 0xe6150098 0 4>;
629 clocks = <&cpg_clocks R8A73A4_CLK_PLL2S>;
630 #clock-cells = <0>;
631 clock-output-names = "m4";
632 };
633 hsi_clk: hsi_clk@e615026c {
634 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
635 reg = <0 0xe615026c 0 4>;
636 clocks = <&cpg_clocks R8A73A4_CLK_PLL2H>, <&pll1_div2_clk>,
637 <&cpg_clocks R8A73A4_CLK_PLL2S>, <0>;
638 #clock-cells = <0>;
639 clock-output-names = "hsi";
640 };
641 spuv_clk: spuv_clk@e6150094 {
642 compatible = "renesas,r8a73a4-div6-clock", "renesas,cpg-div6-clock";
643 reg = <0 0xe6150094 0 4>;
644 clocks = <&pll1_div2_clk>, <&cpg_clocks R8A73A4_CLK_PLL2S>,
645 <&extal2_clk>, <&extal2_clk>;
646 #clock-cells = <0>;
647 clock-output-names = "spuv";
648 };
649
650 /* Fixed factor clocks */
651 main_div2_clk: main_div2_clk {
652 compatible = "fixed-factor-clock";
653 clocks = <&cpg_clocks R8A73A4_CLK_MAIN>;
654 #clock-cells = <0>;
655 clock-div = <2>;
656 clock-mult = <1>;
657 clock-output-names = "main_div2";
658 };
659 pll0_div2_clk: pll0_div2_clk {
660 compatible = "fixed-factor-clock";
661 clocks = <&cpg_clocks R8A73A4_CLK_PLL0>;
662 #clock-cells = <0>;
663 clock-div = <2>;
664 clock-mult = <1>;
665 clock-output-names = "pll0_div2";
666 };
667 pll1_div2_clk: pll1_div2_clk {
668 compatible = "fixed-factor-clock";
669 clocks = <&cpg_clocks R8A73A4_CLK_PLL1>;
670 #clock-cells = <0>;
671 clock-div = <2>;
672 clock-mult = <1>;
673 clock-output-names = "pll1_div2";
674 };
675 extal1_div2_clk: extal1_div2_clk {
676 compatible = "fixed-factor-clock";
677 clocks = <&extal1_clk>;
678 #clock-cells = <0>;
679 clock-div = <2>;
680 clock-mult = <1>;
681 clock-output-names = "extal1_div2";
682 };
683
684 /* Gate clocks */
685 mstp2_clks: mstp2_clks@e6150138 {
686 compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
687 reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
688 clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
689 <&mp_clk>, <&mp_clk>, <&cpg_clocks R8A73A4_CLK_HP>;
690 #clock-cells = <1>;
691 clock-indices = <
692 R8A73A4_CLK_SCIFA0 R8A73A4_CLK_SCIFA1
693 R8A73A4_CLK_SCIFB0 R8A73A4_CLK_SCIFB1
694 R8A73A4_CLK_SCIFB2 R8A73A4_CLK_SCIFB3
695 R8A73A4_CLK_DMAC
696 >;
697 clock-output-names =
698 "scifa0", "scifa1", "scifb0", "scifb1",
699 "scifb2", "scifb3", "dmac";
700 };
701 mstp3_clks: mstp3_clks@e615013c {
702 compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
703 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
704 clocks = <&cpg_clocks R8A73A4_CLK_HP>, <&mmc1_clk>,
705 <&sdhi2_clk>, <&sdhi1_clk>, <&sdhi0_clk>,
706 <&mmc0_clk>, <&cpg_clocks R8A73A4_CLK_HP>,
707 <&cpg_clocks R8A73A4_CLK_HP>, <&cpg_clocks
708 R8A73A4_CLK_HP>, <&cpg_clocks
709 R8A73A4_CLK_HP>, <&extalr_clk>;
710 #clock-cells = <1>;
711 clock-indices = <
712 R8A73A4_CLK_IIC2 R8A73A4_CLK_MMCIF1
713 R8A73A4_CLK_SDHI2 R8A73A4_CLK_SDHI1
714 R8A73A4_CLK_SDHI0 R8A73A4_CLK_MMCIF0
715 R8A73A4_CLK_IIC6 R8A73A4_CLK_IIC7
716 R8A73A4_CLK_IIC0 R8A73A4_CLK_IIC1
717 R8A73A4_CLK_CMT1
718 >;
719 clock-output-names =
720 "iic2", "mmcif1", "sdhi2", "sdhi1", "sdhi0",
721 "mmcif0", "iic6", "iic7", "iic0", "iic1",
722 "cmt1";
723 };
724 mstp4_clks: mstp4_clks@e6150140 {
725 compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
726 reg = <0 0xe6150140 0 4>, <0 0xe615004c 0 4>;
727 clocks = <&main_div2_clk>, <&cpg_clocks R8A73A4_CLK_HP>,
728 <&cpg_clocks R8A73A4_CLK_HP>;
729 #clock-cells = <1>;
730 clock-indices = <
731 R8A73A4_CLK_IIC5 R8A73A4_CLK_IIC4
732 R8A73A4_CLK_IIC3
733 >;
734 clock-output-names =
735 "iic5", "iic4", "iic3";
736 };
737 mstp5_clks: mstp5_clks@e6150144 {
738 compatible = "renesas,r8a73a4-mstp-clocks", "renesas,cpg-mstp-clocks";
739 reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
740 clocks = <&extal2_clk>, <&cpg_clocks R8A73A4_CLK_HP>;
741 #clock-cells = <1>;
742 clock-indices = <
743 R8A73A4_CLK_THERMAL R8A73A4_CLK_IIC8
744 >;
745 clock-output-names =
746 "thermal", "iic8";
747 };
748 };
749
750 sysc: system-controller@e6180000 {
751 compatible = "renesas,sysc-r8a73a4", "renesas,sysc-rmobile";
752 reg = <0 0xe6180000 0 0x8000>, <0 0xe6188000 0 0x8000>;
753
754 pm-domains {
755 pd_c5: c5 {
756 #address-cells = <1>;
757 #size-cells = <0>;
758 #power-domain-cells = <0>;
759
760 pd_c4: c4@0 {
761 reg = <0>;
762 #address-cells = <1>;
763 #size-cells = <0>;
764 #power-domain-cells = <0>;
765
766 pd_a3sg: a3sg@16 {
767 reg = <16>;
768 #power-domain-cells = <0>;
769 };
770
771 pd_a3ex: a3ex@17 {
772 reg = <17>;
773 #power-domain-cells = <0>;
774 };
775
776 pd_a3sp: a3sp@18 {
777 reg = <18>;
778 #address-cells = <1>;
779 #size-cells = <0>;
780 #power-domain-cells = <0>;
781
782 pd_a2us: a2us@19 {
783 reg = <19>;
784 #power-domain-cells = <0>;
785 };
786 };
787
788 pd_a3sm: a3sm@20 {
789 reg = <20>;
790 #address-cells = <1>;
791 #size-cells = <0>;
792 #power-domain-cells = <0>;
793
794 pd_a2sl: a2sl@21 {
795 reg = <21>;
796 #power-domain-cells = <0>;
797 };
798 };
799
800 pd_a3km: a3km@22 {
801 reg = <22>;
802 #address-cells = <1>;
803 #size-cells = <0>;
804 #power-domain-cells = <0>;
805
806 pd_a2kl: a2kl@23 {
807 reg = <23>;
808 #power-domain-cells = <0>;
809 };
810 };
811 };
812
813 pd_c4ma: c4ma@1 {
814 reg = <1>;
815 #power-domain-cells = <0>;
816 };
817
818 pd_c4cl: c4cl@2 {
819 reg = <2>;
820 #power-domain-cells = <0>;
821 };
822
823 pd_d4: d4@3 {
824 reg = <3>;
825 #power-domain-cells = <0>;
826 };
827
828 pd_a4bc: a4bc@4 {
829 reg = <4>;
830 #address-cells = <1>;
831 #size-cells = <0>;
832 #power-domain-cells = <0>;
833
834 pd_a3bc: a3bc@5 {
835 reg = <5>;
836 #power-domain-cells = <0>;
837 };
838 };
839
840 pd_a4l: a4l@6 {
841 reg = <6>;
842 #power-domain-cells = <0>;
843 };
844
845 pd_a4lc: a4lc@7 {
846 reg = <7>;
847 #power-domain-cells = <0>;
848 };
849
850 pd_a4mp: a4mp@8 {
851 reg = <8>;
852 #address-cells = <1>;
853 #size-cells = <0>;
854 #power-domain-cells = <0>;
855
856 pd_a3mp: a3mp@9 {
857 reg = <9>;
858 #power-domain-cells = <0>;
859 };
860
861 pd_a3vc: a3vc@10 {
862 reg = <10>;
863 #power-domain-cells = <0>;
864 };
865 };
866
867 pd_a4sf: a4sf@11 {
868 reg = <11>;
869 #power-domain-cells = <0>;
870 };
871
872 pd_a3r: a3r@12 {
873 reg = <12>;
874 #address-cells = <1>;
875 #size-cells = <0>;
876 #power-domain-cells = <0>;
877
878 pd_a2rv: a2rv@13 {
879 reg = <13>;
880 #power-domain-cells = <0>;
881 };
882
883 pd_a2is: a2is@14 {
884 reg = <14>;
885 #power-domain-cells = <0>;
886 };
887 };
888 };
889 };
890 };
380}; 891};
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
index 8a092605d641..83c1c3ca1b8f 100644
--- a/arch/arm/boot/dts/r8a7740.dtsi
+++ b/arch/arm/boot/dts/r8a7740.dtsi
@@ -431,6 +431,18 @@
431 clock-frequency = <27000000>; 431 clock-frequency = <27000000>;
432 clock-output-names = "dv"; 432 clock-output-names = "dv";
433 }; 433 };
434 fmsick_clk: fmsick_clk {
435 compatible = "fixed-clock";
436 #clock-cells = <0>;
437 clock-frequency = <0>;
438 clock-output-names = "fmsick";
439 };
440 fmsock_clk: fmsock_clk {
441 compatible = "fixed-clock";
442 #clock-cells = <0>;
443 clock-frequency = <0>;
444 clock-output-names = "fmsock";
445 };
434 fsiack_clk: fsiack_clk { 446 fsiack_clk: fsiack_clk {
435 compatible = "fixed-clock"; 447 compatible = "fixed-clock";
436 #clock-cells = <0>; 448 #clock-cells = <0>;
@@ -459,13 +471,78 @@
459 }; 471 };
460 472
461 /* Variable factor clocks (DIV6) */ 473 /* Variable factor clocks (DIV6) */
474 vclk1_clk: vclk1_clk@e6150008 {
475 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
476 reg = <0xe6150008 4>;
477 clocks = <&pllc1_div2_clk>, <0>, <&dv_clk>,
478 <&cpg_clocks R8A7740_CLK_USB24S>,
479 <&extal1_div2_clk>, <&extalr_clk>, <0>,
480 <0>;
481 #clock-cells = <0>;
482 clock-output-names = "vclk1";
483 };
484 vclk2_clk: vclk2_clk@e615000c {
485 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
486 reg = <0xe615000c 4>;
487 clocks = <&pllc1_div2_clk>, <0>, <&dv_clk>,
488 <&cpg_clocks R8A7740_CLK_USB24S>,
489 <&extal1_div2_clk>, <&extalr_clk>, <0>,
490 <0>;
491 #clock-cells = <0>;
492 clock-output-names = "vclk2";
493 };
494 fmsi_clk: fmsi_clk@e6150010 {
495 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
496 reg = <0xe6150010 4>;
497 clocks = <&pllc1_div2_clk>, <&fmsick_clk>, <0>, <0>;
498 #clock-cells = <0>;
499 clock-output-names = "fmsi";
500 };
501 fmso_clk: fmso_clk@e6150014 {
502 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
503 reg = <0xe6150014 4>;
504 clocks = <&pllc1_div2_clk>, <&fmsock_clk>, <0>, <0>;
505 #clock-cells = <0>;
506 clock-output-names = "fmso";
507 };
508 fsia_clk: fsia_clk@e6150018 {
509 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
510 reg = <0xe6150018 4>;
511 clocks = <&pllc1_div2_clk>, <&fsiack_clk>, <0>, <0>;
512 #clock-cells = <0>;
513 clock-output-names = "fsia";
514 };
462 sub_clk: sub_clk@e6150080 { 515 sub_clk: sub_clk@e6150080 {
463 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock"; 516 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
464 reg = <0xe6150080 4>; 517 reg = <0xe6150080 4>;
465 clocks = <&pllc1_div2_clk>; 518 clocks = <&pllc1_div2_clk>,
519 <&cpg_clocks R8A7740_CLK_USB24S>, <0>, <0>;
466 #clock-cells = <0>; 520 #clock-cells = <0>;
467 clock-output-names = "sub"; 521 clock-output-names = "sub";
468 }; 522 };
523 spu_clk: spu_clk@e6150084 {
524 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
525 reg = <0xe6150084 4>;
526 clocks = <&pllc1_div2_clk>,
527 <&cpg_clocks R8A7740_CLK_USB24S>, <0>, <0>;
528 #clock-cells = <0>;
529 clock-output-names = "spu";
530 };
531 vou_clk: vou_clk@e6150088 {
532 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
533 reg = <0xe6150088 4>;
534 clocks = <&pllc1_div2_clk>, <&extal1_clk>, <&dv_clk>,
535 <0>;
536 #clock-cells = <0>;
537 clock-output-names = "vou";
538 };
539 stpro_clk: stpro_clk@e615009c {
540 compatible = "renesas,r8a7740-div6-clock", "renesas,cpg-div6-clock";
541 reg = <0xe615009c 4>;
542 clocks = <&cpg_clocks R8A7740_CLK_PLLC0>;
543 #clock-cells = <0>;
544 clock-output-names = "stpro";
545 };
469 546
470 /* Fixed factor clocks */ 547 /* Fixed factor clocks */
471 pllc1_div2_clk: pllc1_div2_clk { 548 pllc1_div2_clk: pllc1_div2_clk {
diff --git a/arch/arm/boot/dts/r8a7778-bockw.dts b/arch/arm/boot/dts/r8a7778-bockw.dts
index 46a884d45175..787fa6f9f46d 100644
--- a/arch/arm/boot/dts/r8a7778-bockw.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw.dts
@@ -16,17 +16,191 @@
16 16
17/dts-v1/; 17/dts-v1/;
18#include "r8a7778.dtsi" 18#include "r8a7778.dtsi"
19#include <dt-bindings/interrupt-controller/irq.h>
20#include <dt-bindings/gpio/gpio.h>
19 21
20/ { 22/ {
21 model = "bockw"; 23 model = "bockw";
22 compatible = "renesas,bockw", "renesas,r8a7778"; 24 compatible = "renesas,bockw", "renesas,r8a7778";
23 25
26 aliases {
27 serial0 = &scif0;
28 };
29
24 chosen { 30 chosen {
25 bootargs = "console=ttySC0,115200 ignore_loglevel ip=dhcp root=/dev/nfs rw"; 31 bootargs = "console=ttySC0,115200 ignore_loglevel ip=dhcp root=/dev/nfs rw";
32 stdout-path = &scif0;
26 }; 33 };
27 34
28 memory { 35 memory {
29 device_type = "memory"; 36 device_type = "memory";
30 reg = <0x60000000 0x10000000>; 37 reg = <0x60000000 0x10000000>;
31 }; 38 };
39
40 fixedregulator3v3: fixedregulator@0 {
41 compatible = "regulator-fixed";
42 regulator-name = "fixed-3.3V";
43 regulator-min-microvolt = <3300000>;
44 regulator-max-microvolt = <3300000>;
45 regulator-boot-on;
46 regulator-always-on;
47 };
48
49 sound {
50 compatible = "simple-audio-card";
51
52 simple-audio-card,format = "left_j";
53 simple-audio-card,bitclock-master = <&sndcodec>;
54 simple-audio-card,frame-master = <&sndcodec>;
55
56 sndcpu: simple-audio-card,cpu {
57 sound-dai = <&rcar_sound>;
58 };
59
60 sndcodec: simple-audio-card,codec {
61 sound-dai = <&ak4643>;
62 system-clock-frequency = <11289600>;
63 };
64 };
65};
66
67&bsc {
68 ethernet@18300000 {
69 compatible = "smsc,lan9220", "smsc,lan9115";
70 reg = <0x18300000 0x1000>;
71
72 phy-mode = "mii";
73 interrupt-parent = <&irqpin>;
74 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
75 reg-io-width = <4>;
76 vddvario-supply = <&fixedregulator3v3>;
77 vdd33a-supply = <&fixedregulator3v3>;
78 };
79};
80
81&extal_clk {
82 clock-frequency = <33333333>;
83};
84
85&i2c0 {
86 status = "okay";
87
88 ak4643: sound-codec@12 {
89 compatible = "asahi-kasei,ak4643";
90 #sound-dai-cells = <0>;
91 reg = <0x12>;
92 };
93
94 camera@41 {
95 compatible = "oki,ml86v7667";
96 reg = <0x41>;
97 };
98
99 camera@43 {
100 compatible = "oki,ml86v7667";
101 reg = <0x43>;
102 };
103
104 rx8581: rtc@51 {
105 compatible = "epson,rx8581";
106 reg = <0x51>;
107 };
108};
109
110&mmcif {
111 pinctrl-0 = <&mmc_pins>;
112 pinctrl-names = "default";
113
114 vmmc-supply = <&fixedregulator3v3>;
115 bus-width = <8>;
116 broken-cd;
117 status = "okay";
118};
119
120&irqpin {
121 status = "okay";
122};
123
124&tmu0 {
125 status = "okay";
126};
127
128&pfc {
129 scif0_pins: serial0 {
130 renesas,groups = "scif0_data_a", "scif0_ctrl";
131 renesas,function = "scif0";
132 };
133
134 mmc_pins: mmc {
135 renesas,groups = "mmc_data8", "mmc_ctrl";
136 renesas,function = "mmc";
137 };
138
139 sdhi0_pins: sd0 {
140 renesas,groups = "sdhi0_data4", "sdhi0_ctrl",
141 "sdhi0_cd";
142 renesas,function = "sdhi0";
143 };
144
145 hspi0_pins: hspi0 {
146 renesas,groups = "hspi0_a";
147 renesas,function = "hspi0";
148 };
149
150 usb0_pins: usb0 {
151 renesas,groups = "usb0";
152 renesas,function = "usb0";
153 };
154
155 usb1_pins: usb1 {
156 renesas,groups = "usb1";
157 renesas,function = "usb1";
158 };
159
160 vin0_pins: vin0 {
161 renesas,groups = "vin0_data8", "vin0_clk";
162 renesas,function = "vin0";
163 };
164
165 vin1_pins: vin1 {
166 renesas,groups = "vin1_data8", "vin1_clk";
167 renesas,function = "vin1";
168 };
169};
170
171&sdhi0 {
172 pinctrl-0 = <&sdhi0_pins>;
173 pinctrl-names = "default";
174
175 vmmc-supply = <&fixedregulator3v3>;
176 bus-width = <4>;
177 status = "okay";
178 wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
179};
180
181&hspi0 {
182 pinctrl-0 = <&hspi0_pins>;
183 pinctrl-names = "default";
184 status = "okay";
185
186 flash: flash@0 {
187 #address-cells = <1>;
188 #size-cells = <1>;
189 compatible = "spansion,s25fl008k";
190 reg = <0>;
191 spi-max-frequency = <104000000>;
192 m25p,fast-read;
193
194 partition@0 {
195 label = "data(spi)";
196 reg = <0x00000000 0x00100000>;
197 };
198 };
199};
200
201&scif0 {
202 pinctrl-0 = <&scif0_pins>;
203 pinctrl-names = "default";
204
205 status = "okay";
32}; 206};
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
index ef8533910029..868f97309533 100644
--- a/arch/arm/boot/dts/r8a7778.dtsi
+++ b/arch/arm/boot/dts/r8a7778.dtsi
@@ -16,6 +16,7 @@
16 16
17/include/ "skeleton.dtsi" 17/include/ "skeleton.dtsi"
18 18
19#include <dt-bindings/clock/r8a7778-clock.h>
19#include <dt-bindings/interrupt-controller/irq.h> 20#include <dt-bindings/interrupt-controller/irq.h>
20 21
21/ { 22/ {
@@ -40,6 +41,24 @@
40 spi2 = &hspi2; 41 spi2 = &hspi2;
41 }; 42 };
42 43
44 bsc: bus@1c000000 {
45 compatible = "simple-bus";
46 #address-cells = <1>;
47 #size-cells = <1>;
48 ranges = <0 0 0x1c000000>;
49 };
50
51 ether: ethernet@fde00000 {
52 compatible = "renesas,ether-r8a7778";
53 reg = <0xfde00000 0x400>;
54 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
55 clocks = <&mstp1_clks R8A7778_CLK_ETHER>;
56 phy-mode = "rmii";
57 #address-cells = <1>;
58 #size-cells = <0>;
59 status = "disabled";
60 };
61
43 gic: interrupt-controller@fe438000 { 62 gic: interrupt-controller@fe438000 {
44 compatible = "arm,cortex-a9-gic"; 63 compatible = "arm,cortex-a9-gic";
45 #interrupt-cells = <3>; 64 #interrupt-cells = <3>;
@@ -132,6 +151,7 @@
132 compatible = "renesas,i2c-r8a7778"; 151 compatible = "renesas,i2c-r8a7778";
133 reg = <0xffc70000 0x1000>; 152 reg = <0xffc70000 0x1000>;
134 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>; 153 interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
154 clocks = <&mstp0_clks R8A7778_CLK_I2C0>;
135 status = "disabled"; 155 status = "disabled";
136 }; 156 };
137 157
@@ -141,6 +161,7 @@
141 compatible = "renesas,i2c-r8a7778"; 161 compatible = "renesas,i2c-r8a7778";
142 reg = <0xffc71000 0x1000>; 162 reg = <0xffc71000 0x1000>;
143 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; 163 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
164 clocks = <&mstp0_clks R8A7778_CLK_I2C1>;
144 status = "disabled"; 165 status = "disabled";
145 }; 166 };
146 167
@@ -150,6 +171,7 @@
150 compatible = "renesas,i2c-r8a7778"; 171 compatible = "renesas,i2c-r8a7778";
151 reg = <0xffc72000 0x1000>; 172 reg = <0xffc72000 0x1000>;
152 interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>; 173 interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
174 clocks = <&mstp0_clks R8A7778_CLK_I2C2>;
153 status = "disabled"; 175 status = "disabled";
154 }; 176 };
155 177
@@ -159,6 +181,7 @@
159 compatible = "renesas,i2c-r8a7778"; 181 compatible = "renesas,i2c-r8a7778";
160 reg = <0xffc73000 0x1000>; 182 reg = <0xffc73000 0x1000>;
161 interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>; 183 interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
184 clocks = <&mstp0_clks R8A7778_CLK_I2C3>;
162 status = "disabled"; 185 status = "disabled";
163 }; 186 };
164 187
@@ -168,6 +191,8 @@
168 interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>, 191 interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
169 <0 33 IRQ_TYPE_LEVEL_HIGH>, 192 <0 33 IRQ_TYPE_LEVEL_HIGH>,
170 <0 34 IRQ_TYPE_LEVEL_HIGH>; 193 <0 34 IRQ_TYPE_LEVEL_HIGH>;
194 clocks = <&mstp0_clks R8A7778_CLK_TMU0>;
195 clock-names = "fck";
171 196
172 #renesas,channels = <3>; 197 #renesas,channels = <3>;
173 198
@@ -180,6 +205,8 @@
180 interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>, 205 interrupts = <0 36 IRQ_TYPE_LEVEL_HIGH>,
181 <0 37 IRQ_TYPE_LEVEL_HIGH>, 206 <0 37 IRQ_TYPE_LEVEL_HIGH>,
182 <0 38 IRQ_TYPE_LEVEL_HIGH>; 207 <0 38 IRQ_TYPE_LEVEL_HIGH>;
208 clocks = <&mstp0_clks R8A7778_CLK_TMU1>;
209 clock-names = "fck";
183 210
184 #renesas,channels = <3>; 211 #renesas,channels = <3>;
185 212
@@ -192,16 +219,75 @@
192 interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>, 219 interrupts = <0 40 IRQ_TYPE_LEVEL_HIGH>,
193 <0 41 IRQ_TYPE_LEVEL_HIGH>, 220 <0 41 IRQ_TYPE_LEVEL_HIGH>,
194 <0 42 IRQ_TYPE_LEVEL_HIGH>; 221 <0 42 IRQ_TYPE_LEVEL_HIGH>;
222 clocks = <&mstp0_clks R8A7778_CLK_TMU2>;
223 clock-names = "fck";
195 224
196 #renesas,channels = <3>; 225 #renesas,channels = <3>;
197 226
198 status = "disabled"; 227 status = "disabled";
199 }; 228 };
200 229
230 rcar_sound: sound@ffd90000 {
231 #sound-dai-cells = <1>;
232 compatible = "renesas,rcar_sound-r8a7778", "renesas,rcar_sound-gen1";
233 reg = <0xffd90000 0x1000>, /* SRU */
234 <0xffd91000 0x1240>, /* SSI */
235 <0xfffe0000 0x24>; /* ADG */
236 clocks = <&mstp3_clks R8A7778_CLK_SSI8>,
237 <&mstp3_clks R8A7778_CLK_SSI7>,
238 <&mstp3_clks R8A7778_CLK_SSI6>,
239 <&mstp3_clks R8A7778_CLK_SSI5>,
240 <&mstp3_clks R8A7778_CLK_SSI4>,
241 <&mstp0_clks R8A7778_CLK_SSI3>,
242 <&mstp0_clks R8A7778_CLK_SSI2>,
243 <&mstp0_clks R8A7778_CLK_SSI1>,
244 <&mstp0_clks R8A7778_CLK_SSI0>,
245 <&mstp5_clks R8A7778_CLK_SRU_SRC8>,
246 <&mstp5_clks R8A7778_CLK_SRU_SRC7>,
247 <&mstp5_clks R8A7778_CLK_SRU_SRC6>,
248 <&mstp5_clks R8A7778_CLK_SRU_SRC5>,
249 <&mstp5_clks R8A7778_CLK_SRU_SRC4>,
250 <&mstp5_clks R8A7778_CLK_SRU_SRC3>,
251 <&mstp5_clks R8A7778_CLK_SRU_SRC2>,
252 <&mstp5_clks R8A7778_CLK_SRU_SRC1>,
253 <&mstp5_clks R8A7778_CLK_SRU_SRC0>,
254 <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>,
255 <&cpg_clocks R8A7778_CLK_S1>;
256 clock-names = "ssi.8", "ssi.7", "ssi.6", "ssi.5", "ssi.4",
257 "ssi.3", "ssi.2", "ssi.1", "ssi.0",
258 "src.8", "src.7", "src.6", "src.5", "src.4",
259 "src.3", "src.2", "src.1", "src.0",
260 "clk_a", "clk_b", "clk_c", "clk_i";
261
262 status = "disabled";
263
264 rcar_sound,src {
265 src3: src@3 { };
266 src4: src@4 { };
267 src5: src@5 { };
268 src6: src@6 { };
269 src7: src@7 { };
270 src8: src@8 { };
271 src9: src@9 { };
272 };
273
274 rcar_sound,ssi {
275 ssi3: ssi@3 { interrupts = <0 0x85 IRQ_TYPE_LEVEL_HIGH>; };
276 ssi4: ssi@4 { interrupts = <0 0x85 IRQ_TYPE_LEVEL_HIGH>; };
277 ssi5: ssi@5 { interrupts = <0 0x86 IRQ_TYPE_LEVEL_HIGH>; };
278 ssi6: ssi@6 { interrupts = <0 0x86 IRQ_TYPE_LEVEL_HIGH>; };
279 ssi7: ssi@7 { interrupts = <0 0x86 IRQ_TYPE_LEVEL_HIGH>; };
280 ssi8: ssi@8 { interrupts = <0 0x86 IRQ_TYPE_LEVEL_HIGH>; };
281 ssi9: ssi@9 { interrupts = <0 0x86 IRQ_TYPE_LEVEL_HIGH>; };
282 };
283 };
284
201 scif0: serial@ffe40000 { 285 scif0: serial@ffe40000 {
202 compatible = "renesas,scif-r8a7778", "renesas,scif"; 286 compatible = "renesas,scif-r8a7778", "renesas,scif";
203 reg = <0xffe40000 0x100>; 287 reg = <0xffe40000 0x100>;
204 interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>; 288 interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
289 clocks = <&mstp0_clks R8A7778_CLK_SCIF0>;
290 clock-names = "sci_ick";
205 status = "disabled"; 291 status = "disabled";
206 }; 292 };
207 293
@@ -209,6 +295,8 @@
209 compatible = "renesas,scif-r8a7778", "renesas,scif"; 295 compatible = "renesas,scif-r8a7778", "renesas,scif";
210 reg = <0xffe41000 0x100>; 296 reg = <0xffe41000 0x100>;
211 interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>; 297 interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
298 clocks = <&mstp0_clks R8A7778_CLK_SCIF1>;
299 clock-names = "sci_ick";
212 status = "disabled"; 300 status = "disabled";
213 }; 301 };
214 302
@@ -216,6 +304,8 @@
216 compatible = "renesas,scif-r8a7778", "renesas,scif"; 304 compatible = "renesas,scif-r8a7778", "renesas,scif";
217 reg = <0xffe42000 0x100>; 305 reg = <0xffe42000 0x100>;
218 interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>; 306 interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
307 clocks = <&mstp0_clks R8A7778_CLK_SCIF2>;
308 clock-names = "sci_ick";
219 status = "disabled"; 309 status = "disabled";
220 }; 310 };
221 311
@@ -223,6 +313,8 @@
223 compatible = "renesas,scif-r8a7778", "renesas,scif"; 313 compatible = "renesas,scif-r8a7778", "renesas,scif";
224 reg = <0xffe43000 0x100>; 314 reg = <0xffe43000 0x100>;
225 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; 315 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
316 clocks = <&mstp0_clks R8A7778_CLK_SCIF3>;
317 clock-names = "sci_ick";
226 status = "disabled"; 318 status = "disabled";
227 }; 319 };
228 320
@@ -230,6 +322,8 @@
230 compatible = "renesas,scif-r8a7778", "renesas,scif"; 322 compatible = "renesas,scif-r8a7778", "renesas,scif";
231 reg = <0xffe44000 0x100>; 323 reg = <0xffe44000 0x100>;
232 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; 324 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
325 clocks = <&mstp0_clks R8A7778_CLK_SCIF4>;
326 clock-names = "sci_ick";
233 status = "disabled"; 327 status = "disabled";
234 }; 328 };
235 329
@@ -237,6 +331,8 @@
237 compatible = "renesas,scif-r8a7778", "renesas,scif"; 331 compatible = "renesas,scif-r8a7778", "renesas,scif";
238 reg = <0xffe45000 0x100>; 332 reg = <0xffe45000 0x100>;
239 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; 333 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
334 clocks = <&mstp0_clks R8A7778_CLK_SCIF5>;
335 clock-names = "sci_ick";
240 status = "disabled"; 336 status = "disabled";
241 }; 337 };
242 338
@@ -244,6 +340,7 @@
244 compatible = "renesas,sh-mmcif"; 340 compatible = "renesas,sh-mmcif";
245 reg = <0xffe4e000 0x100>; 341 reg = <0xffe4e000 0x100>;
246 interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>; 342 interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>;
343 clocks = <&mstp3_clks R8A7778_CLK_MMC>;
247 status = "disabled"; 344 status = "disabled";
248 }; 345 };
249 346
@@ -251,6 +348,7 @@
251 compatible = "renesas,sdhi-r8a7778"; 348 compatible = "renesas,sdhi-r8a7778";
252 reg = <0xffe4c000 0x100>; 349 reg = <0xffe4c000 0x100>;
253 interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>; 350 interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
351 clocks = <&mstp3_clks R8A7778_CLK_SDHI0>;
254 status = "disabled"; 352 status = "disabled";
255 }; 353 };
256 354
@@ -258,6 +356,7 @@
258 compatible = "renesas,sdhi-r8a7778"; 356 compatible = "renesas,sdhi-r8a7778";
259 reg = <0xffe4d000 0x100>; 357 reg = <0xffe4d000 0x100>;
260 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>; 358 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
359 clocks = <&mstp3_clks R8A7778_CLK_SDHI1>;
261 status = "disabled"; 360 status = "disabled";
262 }; 361 };
263 362
@@ -265,6 +364,7 @@
265 compatible = "renesas,sdhi-r8a7778"; 364 compatible = "renesas,sdhi-r8a7778";
266 reg = <0xffe4f000 0x100>; 365 reg = <0xffe4f000 0x100>;
267 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>; 366 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
367 clocks = <&mstp3_clks R8A7778_CLK_SDHI2>;
268 status = "disabled"; 368 status = "disabled";
269 }; 369 };
270 370
@@ -272,6 +372,7 @@
272 compatible = "renesas,hspi-r8a7778", "renesas,hspi"; 372 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
273 reg = <0xfffc7000 0x18>; 373 reg = <0xfffc7000 0x18>;
274 interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>; 374 interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>;
375 clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
275 #address-cells = <1>; 376 #address-cells = <1>;
276 #size-cells = <0>; 377 #size-cells = <0>;
277 status = "disabled"; 378 status = "disabled";
@@ -281,6 +382,7 @@
281 compatible = "renesas,hspi-r8a7778", "renesas,hspi"; 382 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
282 reg = <0xfffc8000 0x18>; 383 reg = <0xfffc8000 0x18>;
283 interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>; 384 interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
385 clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
284 #address-cells = <1>; 386 #address-cells = <1>;
285 #size-cells = <0>; 387 #size-cells = <0>;
286 status = "disabled"; 388 status = "disabled";
@@ -290,8 +392,199 @@
290 compatible = "renesas,hspi-r8a7778", "renesas,hspi"; 392 compatible = "renesas,hspi-r8a7778", "renesas,hspi";
291 reg = <0xfffc6000 0x18>; 393 reg = <0xfffc6000 0x18>;
292 interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>; 394 interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
395 clocks = <&mstp0_clks R8A7778_CLK_HSPI>;
293 #address-cells = <1>; 396 #address-cells = <1>;
294 #size-cells = <0>; 397 #size-cells = <0>;
295 status = "disabled"; 398 status = "disabled";
296 }; 399 };
400
401 clocks {
402 #address-cells = <1>;
403 #size-cells = <1>;
404 ranges;
405
406 /* External input clock */
407 extal_clk: extal_clk {
408 compatible = "fixed-clock";
409 #clock-cells = <0>;
410 clock-frequency = <0>;
411 clock-output-names = "extal";
412 };
413
414 /* Special CPG clocks */
415 cpg_clocks: cpg_clocks@ffc80000 {
416 compatible = "renesas,r8a7778-cpg-clocks";
417 reg = <0xffc80000 0x80>;
418 #clock-cells = <1>;
419 clocks = <&extal_clk>;
420 clock-output-names = "plla", "pllb", "b",
421 "out", "p", "s", "s1";
422 };
423
424 /* Audio clocks; frequencies are set by boards if applicable. */
425 audio_clk_a: audio_clk_a {
426 compatible = "fixed-clock";
427 #clock-cells = <0>;
428 clock-output-names = "audio_clk_a";
429 };
430 audio_clk_b: audio_clk_b {
431 compatible = "fixed-clock";
432 #clock-cells = <0>;
433 clock-output-names = "audio_clk_b";
434 };
435 audio_clk_c: audio_clk_c {
436 compatible = "fixed-clock";
437 #clock-cells = <0>;
438 clock-output-names = "audio_clk_c";
439 };
440
441 /* Fixed ratio clocks */
442 g_clk: g_clk {
443 compatible = "fixed-factor-clock";
444 clocks = <&cpg_clocks R8A7778_CLK_PLLA>;
445 #clock-cells = <0>;
446 clock-div = <12>;
447 clock-mult = <1>;
448 clock-output-names = "g";
449 };
450 i_clk: i_clk {
451 compatible = "fixed-factor-clock";
452 clocks = <&cpg_clocks R8A7778_CLK_PLLA>;
453 #clock-cells = <0>;
454 clock-div = <1>;
455 clock-mult = <1>;
456 clock-output-names = "i";
457 };
458 s3_clk: s3_clk {
459 compatible = "fixed-factor-clock";
460 clocks = <&cpg_clocks R8A7778_CLK_PLLA>;
461 #clock-cells = <0>;
462 clock-div = <4>;
463 clock-mult = <1>;
464 clock-output-names = "s3";
465 };
466 s4_clk: s4_clk {
467 compatible = "fixed-factor-clock";
468 clocks = <&cpg_clocks R8A7778_CLK_PLLA>;
469 #clock-cells = <0>;
470 clock-div = <8>;
471 clock-mult = <1>;
472 clock-output-names = "s4";
473 };
474 z_clk: z_clk {
475 compatible = "fixed-factor-clock";
476 clocks = <&cpg_clocks R8A7778_CLK_PLLB>;
477 #clock-cells = <0>;
478 clock-div = <1>;
479 clock-mult = <1>;
480 clock-output-names = "z";
481 };
482
483 /* Gate clocks */
484 mstp0_clks: mstp0_clks@ffc80030 {
485 compatible = "renesas,r8a7778-mstp-clocks", "renesas,cpg-mstp-clocks";
486 reg = <0xffc80030 4>;
487 clocks = <&cpg_clocks R8A7778_CLK_P>,
488 <&cpg_clocks R8A7778_CLK_P>,
489 <&cpg_clocks R8A7778_CLK_P>,
490 <&cpg_clocks R8A7778_CLK_P>,
491 <&cpg_clocks R8A7778_CLK_P>,
492 <&cpg_clocks R8A7778_CLK_P>,
493 <&cpg_clocks R8A7778_CLK_P>,
494 <&cpg_clocks R8A7778_CLK_P>,
495 <&cpg_clocks R8A7778_CLK_P>,
496 <&cpg_clocks R8A7778_CLK_P>,
497 <&cpg_clocks R8A7778_CLK_P>,
498 <&cpg_clocks R8A7778_CLK_P>,
499 <&cpg_clocks R8A7778_CLK_P>,
500 <&cpg_clocks R8A7778_CLK_P>,
501 <&cpg_clocks R8A7778_CLK_P>,
502 <&cpg_clocks R8A7778_CLK_P>,
503 <&cpg_clocks R8A7778_CLK_P>,
504 <&cpg_clocks R8A7778_CLK_P>,
505 <&cpg_clocks R8A7778_CLK_S>;
506 #clock-cells = <1>;
507 clock-indices = <
508 R8A7778_CLK_I2C0 R8A7778_CLK_I2C1
509 R8A7778_CLK_I2C2 R8A7778_CLK_I2C3
510 R8A7778_CLK_SCIF0 R8A7778_CLK_SCIF1
511 R8A7778_CLK_SCIF2 R8A7778_CLK_SCIF3
512 R8A7778_CLK_SCIF4 R8A7778_CLK_SCIF5
513 R8A7778_CLK_TMU0 R8A7778_CLK_TMU1
514 R8A7778_CLK_TMU2 R8A7778_CLK_SSI0
515 R8A7778_CLK_SSI1 R8A7778_CLK_SSI2
516 R8A7778_CLK_SSI3 R8A7778_CLK_SRU
517 R8A7778_CLK_HSPI
518 >;
519 clock-output-names =
520 "i2c0", "i2c1", "i2c2", "i2c3", "scif0",
521 "scif1", "scif2", "scif3", "scif4", "scif5",
522 "tmu0", "tmu1", "tmu2", "ssi0", "ssi1",
523 "ssi2", "ssi3", "sru", "hspi";
524 };
525 mstp1_clks: mstp1_clks@ffc80034 {
526 compatible = "renesas,r8a7778-mstp-clocks", "renesas,cpg-mstp-clocks";
527 reg = <0xffc80034 4>, <0xffc80044 4>;
528 clocks = <&cpg_clocks R8A7778_CLK_P>,
529 <&cpg_clocks R8A7778_CLK_S>,
530 <&cpg_clocks R8A7778_CLK_S>,
531 <&cpg_clocks R8A7778_CLK_P>;
532 #clock-cells = <1>;
533 clock-indices = <
534 R8A7778_CLK_ETHER R8A7778_CLK_VIN0
535 R8A7778_CLK_VIN1 R8A7778_CLK_USB
536 >;
537 clock-output-names =
538 "ether", "vin0", "vin1", "usb";
539 };
540 mstp3_clks: mstp3_clks@ffc8003c {
541 compatible = "renesas,r8a7778-mstp-clocks", "renesas,cpg-mstp-clocks";
542 reg = <0xffc8003c 4>;
543 clocks = <&s4_clk>,
544 <&cpg_clocks R8A7778_CLK_P>,
545 <&cpg_clocks R8A7778_CLK_P>,
546 <&cpg_clocks R8A7778_CLK_P>,
547 <&cpg_clocks R8A7778_CLK_P>,
548 <&cpg_clocks R8A7778_CLK_P>,
549 <&cpg_clocks R8A7778_CLK_P>,
550 <&cpg_clocks R8A7778_CLK_P>,
551 <&cpg_clocks R8A7778_CLK_P>;
552 #clock-cells = <1>;
553 clock-indices = <
554 R8A7778_CLK_MMC R8A7778_CLK_SDHI0
555 R8A7778_CLK_SDHI1 R8A7778_CLK_SDHI2
556 R8A7778_CLK_SSI4 R8A7778_CLK_SSI5
557 R8A7778_CLK_SSI6 R8A7778_CLK_SSI7
558 R8A7778_CLK_SSI8
559 >;
560 clock-output-names =
561 "mmc", "sdhi0", "sdhi1", "sdhi2", "ssi4",
562 "ssi5", "ssi6", "ssi7", "ssi8";
563 };
564 mstp5_clks: mstp5_clks@ffc80054 {
565 compatible = "renesas,r8a7778-mstp-clocks", "renesas,cpg-mstp-clocks";
566 reg = <0xffc80054 4>;
567 clocks = <&cpg_clocks R8A7778_CLK_P>,
568 <&cpg_clocks R8A7778_CLK_P>,
569 <&cpg_clocks R8A7778_CLK_P>,
570 <&cpg_clocks R8A7778_CLK_P>,
571 <&cpg_clocks R8A7778_CLK_P>,
572 <&cpg_clocks R8A7778_CLK_P>,
573 <&cpg_clocks R8A7778_CLK_P>,
574 <&cpg_clocks R8A7778_CLK_P>,
575 <&cpg_clocks R8A7778_CLK_P>;
576 #clock-cells = <1>;
577 clock-indices = <
578 R8A7778_CLK_SRU_SRC0 R8A7778_CLK_SRU_SRC1
579 R8A7778_CLK_SRU_SRC2 R8A7778_CLK_SRU_SRC3
580 R8A7778_CLK_SRU_SRC4 R8A7778_CLK_SRU_SRC5
581 R8A7778_CLK_SRU_SRC6 R8A7778_CLK_SRU_SRC7
582 R8A7778_CLK_SRU_SRC8
583 >;
584 clock-output-names =
585 "sru-src0", "sru-src1", "sru-src2",
586 "sru-src3", "sru-src4", "sru-src5",
587 "sru-src6", "sru-src7", "sru-src8";
588 };
589 };
297}; 590};
diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
index e83d40e24bcd..540756cdf391 100644
--- a/arch/arm/boot/dts/r8a7779-marzen.dts
+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
@@ -122,6 +122,12 @@
122 }; 122 };
123 }; 123 };
124 }; 124 };
125
126 x3_clk: x3-clock {
127 compatible = "fixed-clock";
128 #clock-cells = <0>;
129 clock-frequency = <65000000>;
130 };
125}; 131};
126 132
127&du { 133&du {
@@ -129,6 +135,9 @@
129 pinctrl-names = "default"; 135 pinctrl-names = "default";
130 status = "okay"; 136 status = "okay";
131 137
138 clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>;
139 clock-names = "du", "dclkin.0";
140
132 ports { 141 ports {
133 port@0 { 142 port@0 {
134 endpoint { 143 endpoint {
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 0c3b6783b72a..aaa4f258e279 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -222,6 +222,29 @@
222 }; 222 };
223 }; 223 };
224 }; 224 };
225
226 hdmi-out {
227 compatible = "hdmi-connector";
228 type = "a";
229
230 port {
231 hdmi_con: endpoint {
232 remote-endpoint = <&adv7511_out>;
233 };
234 };
235 };
236
237 x2_clk: x2-clock {
238 compatible = "fixed-clock";
239 #clock-cells = <0>;
240 clock-frequency = <148500000>;
241 };
242
243 x13_clk: x13-clock {
244 compatible = "fixed-clock";
245 #clock-cells = <0>;
246 clock-frequency = <148500000>;
247 };
225}; 248};
226 249
227&du { 250&du {
@@ -229,12 +252,26 @@
229 pinctrl-names = "default"; 252 pinctrl-names = "default";
230 status = "okay"; 253 status = "okay";
231 254
255 clocks = <&mstp7_clks R8A7790_CLK_DU0>,
256 <&mstp7_clks R8A7790_CLK_DU1>,
257 <&mstp7_clks R8A7790_CLK_DU2>,
258 <&mstp7_clks R8A7790_CLK_LVDS0>,
259 <&mstp7_clks R8A7790_CLK_LVDS1>,
260 <&x13_clk>, <&x2_clk>;
261 clock-names = "du.0", "du.1", "du.2", "lvds.0", "lvds.1",
262 "dclkin.0", "dclkin.1";
263
232 ports { 264 ports {
233 port@0 { 265 port@0 {
234 endpoint { 266 endpoint {
235 remote-endpoint = <&adv7123_in>; 267 remote-endpoint = <&adv7123_in>;
236 }; 268 };
237 }; 269 };
270 port@1 {
271 endpoint {
272 remote-endpoint = <&adv7511_in>;
273 };
274 };
238 port@2 { 275 port@2 {
239 lvds_connector: endpoint { 276 lvds_connector: endpoint {
240 }; 277 };
@@ -506,6 +543,38 @@
506 }; 543 };
507 }; 544 };
508 }; 545 };
546
547 hdmi@39 {
548 compatible = "adi,adv7511w";
549 reg = <0x39>;
550 interrupt-parent = <&gpio1>;
551 interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
552
553 adi,input-depth = <8>;
554 adi,input-colorspace = "rgb";
555 adi,input-clock = "1x";
556 adi,input-style = <1>;
557 adi,input-justification = "evenly";
558
559 ports {
560 #address-cells = <1>;
561 #size-cells = <0>;
562
563 port@0 {
564 reg = <0>;
565 adv7511_in: endpoint {
566 remote-endpoint = <&du_out_lvds0>;
567 };
568 };
569
570 port@1 {
571 reg = <1>;
572 adv7511_out: endpoint {
573 remote-endpoint = <&hdmi_con>;
574 };
575 };
576 };
577 };
509}; 578};
510 579
511&iic3 { 580&iic3 {
@@ -513,9 +582,27 @@
513 pinctrl-0 = <&iic3_pins>; 582 pinctrl-0 = <&iic3_pins>;
514 status = "okay"; 583 status = "okay";
515 584
585 pmic@58 {
586 compatible = "dlg,da9063";
587 reg = <0x58>;
588 interrupt-parent = <&irqc0>;
589 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
590 interrupt-controller;
591
592 rtc {
593 compatible = "dlg,da9063-rtc";
594 };
595
596 wdt {
597 compatible = "dlg,da9063-watchdog";
598 };
599 };
600
516 vdd_dvfs: regulator@68 { 601 vdd_dvfs: regulator@68 {
517 compatible = "dlg,da9210"; 602 compatible = "dlg,da9210";
518 reg = <0x68>; 603 reg = <0x68>;
604 interrupt-parent = <&irqc0>;
605 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
519 606
520 regulator-min-microvolt = <1000000>; 607 regulator-min-microvolt = <1000000>;
521 regulator-max-microvolt = <1000000>; 608 regulator-max-microvolt = <1000000>;
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
index 4b38fc920114..4bb2f4c17321 100644
--- a/arch/arm/boot/dts/r8a7790.dtsi
+++ b/arch/arm/boot/dts/r8a7790.dtsi
@@ -1,6 +1,7 @@
1/* 1/*
2 * Device Tree Source for the r8a7790 SoC 2 * Device Tree Source for the r8a7790 SoC
3 * 3 *
4 * Copyright (C) 2015 Renesas Electronics Corporation
4 * Copyright (C) 2013-2014 Renesas Solutions Corp. 5 * Copyright (C) 2013-2014 Renesas Solutions Corp.
5 * Copyright (C) 2014 Cogent Embedded Inc. 6 * Copyright (C) 2014 Cogent Embedded Inc.
6 * 7 *
@@ -369,13 +370,6 @@
369 dma-channels = <13>; 370 dma-channels = <13>;
370 }; 371 };
371 372
372 audmapp: dma-controller@ec740000 {
373 compatible = "renesas,rcar-audmapp";
374 #dma-cells = <1>;
375
376 reg = <0 0xec740000 0 0x200>;
377 };
378
379 i2c0: i2c@e6508000 { 373 i2c0: i2c@e6508000 {
380 #address-cells = <1>; 374 #address-cells = <1>;
381 #size-cells = <0>; 375 #size-cells = <0>;
@@ -493,17 +487,21 @@
493 487
494 sdhi0: sd@ee100000 { 488 sdhi0: sd@ee100000 {
495 compatible = "renesas,sdhi-r8a7790"; 489 compatible = "renesas,sdhi-r8a7790";
496 reg = <0 0xee100000 0 0x200>; 490 reg = <0 0xee100000 0 0x328>;
497 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; 491 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
498 clocks = <&mstp3_clks R8A7790_CLK_SDHI0>; 492 clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
493 dmas = <&dmac1 0xcd>, <&dmac1 0xce>;
494 dma-names = "tx", "rx";
499 status = "disabled"; 495 status = "disabled";
500 }; 496 };
501 497
502 sdhi1: sd@ee120000 { 498 sdhi1: sd@ee120000 {
503 compatible = "renesas,sdhi-r8a7790"; 499 compatible = "renesas,sdhi-r8a7790";
504 reg = <0 0xee120000 0 0x200>; 500 reg = <0 0xee120000 0 0x328>;
505 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>; 501 interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
506 clocks = <&mstp3_clks R8A7790_CLK_SDHI1>; 502 clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
503 dmas = <&dmac1 0xc9>, <&dmac1 0xca>;
504 dma-names = "tx", "rx";
507 status = "disabled"; 505 status = "disabled";
508 }; 506 };
509 507
@@ -512,6 +510,8 @@
512 reg = <0 0xee140000 0 0x100>; 510 reg = <0 0xee140000 0 0x100>;
513 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; 511 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
514 clocks = <&mstp3_clks R8A7790_CLK_SDHI2>; 512 clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
513 dmas = <&dmac1 0xc1>, <&dmac1 0xc2>;
514 dma-names = "tx", "rx";
515 status = "disabled"; 515 status = "disabled";
516 }; 516 };
517 517
@@ -520,6 +520,8 @@
520 reg = <0 0xee160000 0 0x100>; 520 reg = <0 0xee160000 0 0x100>;
521 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; 521 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
522 clocks = <&mstp3_clks R8A7790_CLK_SDHI3>; 522 clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
523 dmas = <&dmac1 0xd3>, <&dmac1 0xd4>;
524 dma-names = "tx", "rx";
523 status = "disabled"; 525 status = "disabled";
524 }; 526 };
525 527
@@ -792,6 +794,26 @@
792 }; 794 };
793 }; 795 };
794 796
797 can0: can@e6e80000 {
798 compatible = "renesas,can-r8a7790";
799 reg = <0 0xe6e80000 0 0x1000>;
800 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
801 clocks = <&mstp9_clks R8A7790_CLK_RCAN0>,
802 <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>;
803 clock-names = "clkp1", "clkp2", "can_clk";
804 status = "disabled";
805 };
806
807 can1: can@e6e88000 {
808 compatible = "renesas,can-r8a7790";
809 reg = <0 0xe6e88000 0 0x1000>;
810 interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH>;
811 clocks = <&mstp9_clks R8A7790_CLK_RCAN1>,
812 <&cpg_clocks R8A7790_CLK_RCAN>, <&can_clk>;
813 clock-names = "clkp1", "clkp2", "can_clk";
814 status = "disabled";
815 };
816
795 clocks { 817 clocks {
796 #address-cells = <2>; 818 #address-cells = <2>;
797 #size-cells = <2>; 819 #size-cells = <2>;
@@ -838,16 +860,34 @@
838 clock-output-names = "audio_clk_c"; 860 clock-output-names = "audio_clk_c";
839 }; 861 };
840 862
863 /* External USB clock - can be overridden by the board */
864 usb_extal_clk: usb_extal_clk {
865 compatible = "fixed-clock";
866 #clock-cells = <0>;
867 clock-frequency = <48000000>;
868 clock-output-names = "usb_extal";
869 };
870
871 /* External CAN clock */
872 can_clk: can_clk {
873 compatible = "fixed-clock";
874 #clock-cells = <0>;
875 /* This value must be overridden by the board. */
876 clock-frequency = <0>;
877 clock-output-names = "can_clk";
878 status = "disabled";
879 };
880
841 /* Special CPG clocks */ 881 /* Special CPG clocks */
842 cpg_clocks: cpg_clocks@e6150000 { 882 cpg_clocks: cpg_clocks@e6150000 {
843 compatible = "renesas,r8a7790-cpg-clocks", 883 compatible = "renesas,r8a7790-cpg-clocks",
844 "renesas,rcar-gen2-cpg-clocks"; 884 "renesas,rcar-gen2-cpg-clocks";
845 reg = <0 0xe6150000 0 0x1000>; 885 reg = <0 0xe6150000 0 0x1000>;
846 clocks = <&extal_clk>; 886 clocks = <&extal_clk &usb_extal_clk>;
847 #clock-cells = <1>; 887 #clock-cells = <1>;
848 clock-output-names = "main", "pll0", "pll1", "pll3", 888 clock-output-names = "main", "pll0", "pll1", "pll3",
849 "lb", "qspi", "sdh", "sd0", "sd1", 889 "lb", "qspi", "sdh", "sd0", "sd1",
850 "z"; 890 "z", "rcan", "adsp";
851 }; 891 };
852 892
853 /* Variable factor clocks */ 893 /* Variable factor clocks */
@@ -1121,18 +1161,21 @@
1121 mstp5_clks: mstp5_clks@e6150144 { 1161 mstp5_clks: mstp5_clks@e6150144 {
1122 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 1162 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
1123 reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>; 1163 reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
1124 clocks = <&hp_clk>, <&hp_clk>, <&extal_clk>, <&p_clk>; 1164 clocks = <&hp_clk>, <&hp_clk>, <&cpg_clocks R8A7790_CLK_ADSP>,
1165 <&extal_clk>, <&p_clk>;
1125 #clock-cells = <1>; 1166 #clock-cells = <1>;
1126 clock-indices = < 1167 clock-indices = <
1127 R8A7790_CLK_AUDIO_DMAC0 R8A7790_CLK_AUDIO_DMAC1 1168 R8A7790_CLK_AUDIO_DMAC0 R8A7790_CLK_AUDIO_DMAC1
1128 R8A7790_CLK_THERMAL R8A7790_CLK_PWM 1169 R8A7790_CLK_ADSP_MOD R8A7790_CLK_THERMAL
1170 R8A7790_CLK_PWM
1129 >; 1171 >;
1130 clock-output-names = "audmac0", "audmac1", "thermal", "pwm"; 1172 clock-output-names = "audmac0", "audmac1", "adsp_mod",
1173 "thermal", "pwm";
1131 }; 1174 };
1132 mstp7_clks: mstp7_clks@e615014c { 1175 mstp7_clks: mstp7_clks@e615014c {
1133 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks"; 1176 compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
1134 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>; 1177 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
1135 clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>, 1178 clocks = <&mp_clk>, <&hp_clk>, <&zs_clk>, <&zs_clk>, <&p_clk>,
1136 <&p_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>, 1179 <&p_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>, <&zx_clk>,
1137 <&zx_clk>; 1180 <&zx_clk>;
1138 #clock-cells = <1>; 1181 #clock-cells = <1>;
@@ -1410,7 +1453,10 @@
1410 reg = <0 0xec500000 0 0x1000>, /* SCU */ 1453 reg = <0 0xec500000 0 0x1000>, /* SCU */
1411 <0 0xec5a0000 0 0x100>, /* ADG */ 1454 <0 0xec5a0000 0 0x100>, /* ADG */
1412 <0 0xec540000 0 0x1000>, /* SSIU */ 1455 <0 0xec540000 0 0x1000>, /* SSIU */
1413 <0 0xec541000 0 0x1280>; /* SSI */ 1456 <0 0xec541000 0 0x1280>, /* SSI */
1457 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
1458 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
1459
1414 clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>, 1460 clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
1415 <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>, 1461 <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
1416 <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>, 1462 <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
@@ -1435,34 +1481,171 @@
1435 status = "disabled"; 1481 status = "disabled";
1436 1482
1437 rcar_sound,dvc { 1483 rcar_sound,dvc {
1438 dvc0: dvc@0 { }; 1484 dvc0: dvc@0 {
1439 dvc1: dvc@1 { }; 1485 dmas = <&audma0 0xbc>;
1486 dma-names = "tx";
1487 };
1488 dvc1: dvc@1 {
1489 dmas = <&audma0 0xbe>;
1490 dma-names = "tx";
1491 };
1440 }; 1492 };
1441 1493
1442 rcar_sound,src { 1494 rcar_sound,src {
1443 src0: src@0 { interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; }; 1495 src0: src@0 {
1444 src1: src@1 { interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; }; 1496 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
1445 src2: src@2 { interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; }; 1497 dmas = <&audma0 0x85>, <&audma1 0x9a>;
1446 src3: src@3 { interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; }; 1498 dma-names = "rx", "tx";
1447 src4: src@4 { interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; }; 1499 };
1448 src5: src@5 { interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; }; 1500 src1: src@1 {
1449 src6: src@6 { interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; }; 1501 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
1450 src7: src@7 { interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; }; 1502 dmas = <&audma0 0x87>, <&audma1 0x9c>;
1451 src8: src@8 { interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; }; 1503 dma-names = "rx", "tx";
1452 src9: src@9 { interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; }; 1504 };
1505 src2: src@2 {
1506 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
1507 dmas = <&audma0 0x89>, <&audma1 0x9e>;
1508 dma-names = "rx", "tx";
1509 };
1510 src3: src@3 {
1511 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
1512 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
1513 dma-names = "rx", "tx";
1514 };
1515 src4: src@4 {
1516 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
1517 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
1518 dma-names = "rx", "tx";
1519 };
1520 src5: src@5 {
1521 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
1522 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
1523 dma-names = "rx", "tx";
1524 };
1525 src6: src@6 {
1526 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
1527 dmas = <&audma0 0x91>, <&audma1 0xb4>;
1528 dma-names = "rx", "tx";
1529 };
1530 src7: src@7 {
1531 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
1532 dmas = <&audma0 0x93>, <&audma1 0xb6>;
1533 dma-names = "rx", "tx";
1534 };
1535 src8: src@8 {
1536 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
1537 dmas = <&audma0 0x95>, <&audma1 0xb8>;
1538 dma-names = "rx", "tx";
1539 };
1540 src9: src@9 {
1541 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
1542 dmas = <&audma0 0x97>, <&audma1 0xba>;
1543 dma-names = "rx", "tx";
1544 };
1453 }; 1545 };
1454 1546
1455 rcar_sound,ssi { 1547 rcar_sound,ssi {
1456 ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; }; 1548 ssi0: ssi@0 {
1457 ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; }; 1549 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
1458 ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; }; 1550 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
1459 ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; }; 1551 dma-names = "rx", "tx", "rxu", "txu";
1460 ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; }; 1552 };
1461 ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; }; 1553 ssi1: ssi@1 {
1462 ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; }; 1554 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
1463 ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; }; 1555 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
1464 ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; }; 1556 dma-names = "rx", "tx", "rxu", "txu";
1465 ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; }; 1557 };
1558 ssi2: ssi@2 {
1559 interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
1560 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
1561 dma-names = "rx", "tx", "rxu", "txu";
1562 };
1563 ssi3: ssi@3 {
1564 interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
1565 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
1566 dma-names = "rx", "tx", "rxu", "txu";
1567 };
1568 ssi4: ssi@4 {
1569 interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
1570 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
1571 dma-names = "rx", "tx", "rxu", "txu";
1572 };
1573 ssi5: ssi@5 {
1574 interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
1575 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
1576 dma-names = "rx", "tx", "rxu", "txu";
1577 };
1578 ssi6: ssi@6 {
1579 interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
1580 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
1581 dma-names = "rx", "tx", "rxu", "txu";
1582 };
1583 ssi7: ssi@7 {
1584 interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
1585 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
1586 dma-names = "rx", "tx", "rxu", "txu";
1587 };
1588 ssi8: ssi@8 {
1589 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
1590 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
1591 dma-names = "rx", "tx", "rxu", "txu";
1592 };
1593 ssi9: ssi@9 {
1594 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
1595 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
1596 dma-names = "rx", "tx", "rxu", "txu";
1597 };
1466 }; 1598 };
1467 }; 1599 };
1600
1601 ipmmu_sy0: mmu@e6280000 {
1602 compatible = "renesas,ipmmu-vmsa";
1603 reg = <0 0xe6280000 0 0x1000>;
1604 interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
1605 <0 224 IRQ_TYPE_LEVEL_HIGH>;
1606 #iommu-cells = <1>;
1607 status = "disabled";
1608 };
1609
1610 ipmmu_sy1: mmu@e6290000 {
1611 compatible = "renesas,ipmmu-vmsa";
1612 reg = <0 0xe6290000 0 0x1000>;
1613 interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
1614 #iommu-cells = <1>;
1615 status = "disabled";
1616 };
1617
1618 ipmmu_ds: mmu@e6740000 {
1619 compatible = "renesas,ipmmu-vmsa";
1620 reg = <0 0xe6740000 0 0x1000>;
1621 interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
1622 <0 199 IRQ_TYPE_LEVEL_HIGH>;
1623 #iommu-cells = <1>;
1624 status = "disabled";
1625 };
1626
1627 ipmmu_mp: mmu@ec680000 {
1628 compatible = "renesas,ipmmu-vmsa";
1629 reg = <0 0xec680000 0 0x1000>;
1630 interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
1631 #iommu-cells = <1>;
1632 status = "disabled";
1633 };
1634
1635 ipmmu_mx: mmu@fe951000 {
1636 compatible = "renesas,ipmmu-vmsa";
1637 reg = <0 0xfe951000 0 0x1000>;
1638 interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
1639 <0 221 IRQ_TYPE_LEVEL_HIGH>;
1640 #iommu-cells = <1>;
1641 status = "disabled";
1642 };
1643
1644 ipmmu_rt: mmu@ffc80000 {
1645 compatible = "renesas,ipmmu-vmsa";
1646 reg = <0 0xffc80000 0 0x1000>;
1647 interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
1648 #iommu-cells = <1>;
1649 status = "disabled";
1650 };
1468}; 1651};
diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
index d2ebf11f9881..e33e4047b0b0 100644
--- a/arch/arm/boot/dts/r8a7791-henninger.dts
+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
@@ -141,6 +141,11 @@
141 renesas,groups = "vin0_data8", "vin0_clk"; 141 renesas,groups = "vin0_data8", "vin0_clk";
142 renesas,function = "vin0"; 142 renesas,function = "vin0";
143 }; 143 };
144
145 can0_pins: can0 {
146 renesas,groups = "can0_data";
147 renesas,function = "can0";
148 };
144}; 149};
145 150
146&scif0 { 151&scif0 {
@@ -307,3 +312,9 @@
307 }; 312 };
308 }; 313 };
309}; 314};
315
316&can0 {
317 pinctrl-0 = <&can0_pins>;
318 pinctrl-names = "default";
319 status = "okay";
320};
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index a3c27807f6c5..74c3212f1f11 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -258,6 +258,29 @@
258 system-clock-frequency = <11289600>; 258 system-clock-frequency = <11289600>;
259 }; 259 };
260 }; 260 };
261
262 hdmi-out {
263 compatible = "hdmi-connector";
264 type = "a";
265
266 port {
267 hdmi_con: endpoint {
268 remote-endpoint = <&adv7511_out>;
269 };
270 };
271 };
272
273 x2_clk: x2-clock {
274 compatible = "fixed-clock";
275 #clock-cells = <0>;
276 clock-frequency = <148500000>;
277 };
278
279 x13_clk: x13-clock {
280 compatible = "fixed-clock";
281 #clock-cells = <0>;
282 clock-frequency = <148500000>;
283 };
261}; 284};
262 285
263&du { 286&du {
@@ -265,7 +288,19 @@
265 pinctrl-names = "default"; 288 pinctrl-names = "default";
266 status = "okay"; 289 status = "okay";
267 290
291 clocks = <&mstp7_clks R8A7791_CLK_DU0>,
292 <&mstp7_clks R8A7791_CLK_DU1>,
293 <&mstp7_clks R8A7791_CLK_LVDS0>,
294 <&x13_clk>, <&x2_clk>;
295 clock-names = "du.0", "du.1", "lvds.0",
296 "dclkin.0", "dclkin.1";
297
268 ports { 298 ports {
299 port@0 {
300 endpoint {
301 remote-endpoint = <&adv7511_in>;
302 };
303 };
269 port@1 { 304 port@1 {
270 lvds_connector: endpoint { 305 lvds_connector: endpoint {
271 }; 306 };
@@ -284,7 +319,7 @@
284 }; 319 };
285 320
286 du_pins: du { 321 du_pins: du {
287 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0"; 322 renesas,groups = "du_rgb666", "du_sync", "du_disp", "du_clk_out_0";
288 renesas,function = "du"; 323 renesas,function = "du";
289 }; 324 };
290 325
@@ -506,6 +541,38 @@
506 }; 541 };
507 }; 542 };
508 543
544 hdmi@39 {
545 compatible = "adi,adv7511w";
546 reg = <0x39>;
547 interrupt-parent = <&gpio3>;
548 interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
549
550 adi,input-depth = <8>;
551 adi,input-colorspace = "rgb";
552 adi,input-clock = "1x";
553 adi,input-style = <1>;
554 adi,input-justification = "evenly";
555
556 ports {
557 #address-cells = <1>;
558 #size-cells = <0>;
559
560 port@0 {
561 reg = <0>;
562 adv7511_in: endpoint {
563 remote-endpoint = <&du_out_rgb>;
564 };
565 };
566
567 port@1 {
568 reg = <1>;
569 adv7511_out: endpoint {
570 remote-endpoint = <&hdmi_con>;
571 };
572 };
573 };
574 };
575
509 eeprom@50 { 576 eeprom@50 {
510 compatible = "renesas,24c02"; 577 compatible = "renesas,24c02";
511 reg = <0x50>; 578 reg = <0x50>;
@@ -517,9 +584,27 @@
517 status = "okay"; 584 status = "okay";
518 clock-frequency = <100000>; 585 clock-frequency = <100000>;
519 586
587 pmic@58 {
588 compatible = "dlg,da9063";
589 reg = <0x58>;
590 interrupt-parent = <&irqc0>;
591 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
592 interrupt-controller;
593
594 rtc {
595 compatible = "dlg,da9063-rtc";
596 };
597
598 wdt {
599 compatible = "dlg,da9063-watchdog";
600 };
601 };
602
520 vdd_dvfs: regulator@68 { 603 vdd_dvfs: regulator@68 {
521 compatible = "dlg,da9210"; 604 compatible = "dlg,da9210";
522 reg = <0x68>; 605 reg = <0x68>;
606 interrupt-parent = <&irqc0>;
607 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
523 608
524 regulator-min-microvolt = <1000000>; 609 regulator-min-microvolt = <1000000>;
525 regulator-max-microvolt = <1000000>; 610 regulator-max-microvolt = <1000000>;
diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
index e35812a0d8d4..4696062f6dde 100644
--- a/arch/arm/boot/dts/r8a7791.dtsi
+++ b/arch/arm/boot/dts/r8a7791.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * Device Tree Source for the r8a7791 SoC 2 * Device Tree Source for the r8a7791 SoC
3 * 3 *
4 * Copyright (C) 2013-2014 Renesas Electronics Corporation 4 * Copyright (C) 2013-2015 Renesas Electronics Corporation
5 * Copyright (C) 2013-2014 Renesas Solutions Corp. 5 * Copyright (C) 2013-2014 Renesas Solutions Corp.
6 * Copyright (C) 2014 Cogent Embedded Inc. 6 * Copyright (C) 2014 Cogent Embedded Inc.
7 * 7 *
@@ -357,13 +357,6 @@
357 dma-channels = <13>; 357 dma-channels = <13>;
358 }; 358 };
359 359
360 audmapp: dma-controller@ec740000 {
361 compatible = "renesas,rcar-audmapp";
362 #dma-cells = <1>;
363
364 reg = <0 0xec740000 0 0x200>;
365 };
366
367 /* The memory map in the User's Manual maps the cores to bus numbers */ 360 /* The memory map in the User's Manual maps the cores to bus numbers */
368 i2c0: i2c@e6508000 { 361 i2c0: i2c@e6508000 {
369 #address-cells = <1>; 362 #address-cells = <1>;
@@ -482,9 +475,11 @@
482 475
483 sdhi0: sd@ee100000 { 476 sdhi0: sd@ee100000 {
484 compatible = "renesas,sdhi-r8a7791"; 477 compatible = "renesas,sdhi-r8a7791";
485 reg = <0 0xee100000 0 0x200>; 478 reg = <0 0xee100000 0 0x328>;
486 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>; 479 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
487 clocks = <&mstp3_clks R8A7791_CLK_SDHI0>; 480 clocks = <&mstp3_clks R8A7791_CLK_SDHI0>;
481 dmas = <&dmac1 0xcd>, <&dmac1 0xce>;
482 dma-names = "tx", "rx";
488 status = "disabled"; 483 status = "disabled";
489 }; 484 };
490 485
@@ -493,6 +488,8 @@
493 reg = <0 0xee140000 0 0x100>; 488 reg = <0 0xee140000 0 0x100>;
494 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>; 489 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
495 clocks = <&mstp3_clks R8A7791_CLK_SDHI1>; 490 clocks = <&mstp3_clks R8A7791_CLK_SDHI1>;
491 dmas = <&dmac1 0xc1>, <&dmac1 0xc2>;
492 dma-names = "tx", "rx";
496 status = "disabled"; 493 status = "disabled";
497 }; 494 };
498 495
@@ -501,6 +498,8 @@
501 reg = <0 0xee160000 0 0x100>; 498 reg = <0 0xee160000 0 0x100>;
502 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>; 499 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
503 clocks = <&mstp3_clks R8A7791_CLK_SDHI2>; 500 clocks = <&mstp3_clks R8A7791_CLK_SDHI2>;
501 dmas = <&dmac1 0xd3>, <&dmac1 0xd4>;
502 dma-names = "tx", "rx";
504 status = "disabled"; 503 status = "disabled";
505 }; 504 };
506 505
@@ -816,6 +815,26 @@
816 }; 815 };
817 }; 816 };
818 817
818 can0: can@e6e80000 {
819 compatible = "renesas,can-r8a7791";
820 reg = <0 0xe6e80000 0 0x1000>;
821 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
822 clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
823 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
824 clock-names = "clkp1", "clkp2", "can_clk";
825 status = "disabled";
826 };
827
828 can1: can@e6e88000 {
829 compatible = "renesas,can-r8a7791";
830 reg = <0 0xe6e88000 0 0x1000>;
831 interrupts = <0 187 IRQ_TYPE_LEVEL_HIGH>;
832 clocks = <&mstp9_clks R8A7791_CLK_RCAN1>,
833 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
834 clock-names = "clkp1", "clkp2", "can_clk";
835 status = "disabled";
836 };
837
819 clocks { 838 clocks {
820 #address-cells = <2>; 839 #address-cells = <2>;
821 #size-cells = <2>; 840 #size-cells = <2>;
@@ -862,31 +881,50 @@
862 status = "disabled"; 881 status = "disabled";
863 }; 882 };
864 883
884 /* External USB clock - can be overridden by the board */
885 usb_extal_clk: usb_extal_clk {
886 compatible = "fixed-clock";
887 #clock-cells = <0>;
888 clock-frequency = <48000000>;
889 clock-output-names = "usb_extal";
890 };
891
892 /* External CAN clock */
893 can_clk: can_clk {
894 compatible = "fixed-clock";
895 #clock-cells = <0>;
896 /* This value must be overridden by the board. */
897 clock-frequency = <0>;
898 clock-output-names = "can_clk";
899 status = "disabled";
900 };
901
865 /* Special CPG clocks */ 902 /* Special CPG clocks */
866 cpg_clocks: cpg_clocks@e6150000 { 903 cpg_clocks: cpg_clocks@e6150000 {
867 compatible = "renesas,r8a7791-cpg-clocks", 904 compatible = "renesas,r8a7791-cpg-clocks",
868 "renesas,rcar-gen2-cpg-clocks"; 905 "renesas,rcar-gen2-cpg-clocks";
869 reg = <0 0xe6150000 0 0x1000>; 906 reg = <0 0xe6150000 0 0x1000>;
870 clocks = <&extal_clk>; 907 clocks = <&extal_clk &usb_extal_clk>;
871 #clock-cells = <1>; 908 #clock-cells = <1>;
872 clock-output-names = "main", "pll0", "pll1", "pll3", 909 clock-output-names = "main", "pll0", "pll1", "pll3",
873 "lb", "qspi", "sdh", "sd0", "z"; 910 "lb", "qspi", "sdh", "sd0", "z",
911 "rcan", "adsp";
874 }; 912 };
875 913
876 /* Variable factor clocks */ 914 /* Variable factor clocks */
877 sd1_clk: sd2_clk@e6150078 { 915 sd2_clk: sd2_clk@e6150078 {
878 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock"; 916 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
879 reg = <0 0xe6150078 0 4>; 917 reg = <0 0xe6150078 0 4>;
880 clocks = <&pll1_div2_clk>; 918 clocks = <&pll1_div2_clk>;
881 #clock-cells = <0>; 919 #clock-cells = <0>;
882 clock-output-names = "sd1"; 920 clock-output-names = "sd2";
883 }; 921 };
884 sd2_clk: sd3_clk@e615026c { 922 sd3_clk: sd3_clk@e615026c {
885 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock"; 923 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
886 reg = <0 0xe615026c 0 4>; 924 reg = <0 0xe615026c 0 4>;
887 clocks = <&pll1_div2_clk>; 925 clocks = <&pll1_div2_clk>;
888 #clock-cells = <0>; 926 #clock-cells = <0>;
889 clock-output-names = "sd2"; 927 clock-output-names = "sd3";
890 }; 928 };
891 mmc0_clk: mmc0_clk@e6150240 { 929 mmc0_clk: mmc0_clk@e6150240 {
892 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock"; 930 compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
@@ -1107,7 +1145,7 @@
1107 mstp3_clks: mstp3_clks@e615013c { 1145 mstp3_clks: mstp3_clks@e615013c {
1108 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 1146 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
1109 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; 1147 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
1110 clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>, 1148 clocks = <&cp_clk>, <&sd3_clk>, <&sd2_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
1111 <&mmc0_clk>, <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>, 1149 <&mmc0_clk>, <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>,
1112 <&hp_clk>, <&hp_clk>; 1150 <&hp_clk>, <&hp_clk>;
1113 #clock-cells = <1>; 1151 #clock-cells = <1>;
@@ -1125,18 +1163,21 @@
1125 mstp5_clks: mstp5_clks@e6150144 { 1163 mstp5_clks: mstp5_clks@e6150144 {
1126 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 1164 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
1127 reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>; 1165 reg = <0 0xe6150144 0 4>, <0 0xe615003c 0 4>;
1128 clocks = <&hp_clk>, <&hp_clk>, <&extal_clk>, <&p_clk>; 1166 clocks = <&hp_clk>, <&hp_clk>, <&cpg_clocks R8A7791_CLK_ADSP>,
1167 <&extal_clk>, <&p_clk>;
1129 #clock-cells = <1>; 1168 #clock-cells = <1>;
1130 clock-indices = < 1169 clock-indices = <
1131 R8A7791_CLK_AUDIO_DMAC0 R8A7791_CLK_AUDIO_DMAC1 1170 R8A7791_CLK_AUDIO_DMAC0 R8A7791_CLK_AUDIO_DMAC1
1132 R8A7791_CLK_THERMAL R8A7791_CLK_PWM 1171 R8A7791_CLK_ADSP_MOD R8A7791_CLK_THERMAL
1172 R8A7791_CLK_PWM
1133 >; 1173 >;
1134 clock-output-names = "audmac0", "audmac1", "thermal", "pwm"; 1174 clock-output-names = "audmac0", "audmac1", "adsp_mod",
1175 "thermal", "pwm";
1135 }; 1176 };
1136 mstp7_clks: mstp7_clks@e615014c { 1177 mstp7_clks: mstp7_clks@e615014c {
1137 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 1178 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
1138 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>; 1179 reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
1139 clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>, 1180 clocks = <&mp_clk>, <&hp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
1140 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, 1181 <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
1141 <&zx_clk>, <&zx_clk>, <&zx_clk>; 1182 <&zx_clk>, <&zx_clk>, <&zx_clk>;
1142 #clock-cells = <1>; 1183 #clock-cells = <1>;
@@ -1154,7 +1195,7 @@
1154 mstp8_clks: mstp8_clks@e6150990 { 1195 mstp8_clks: mstp8_clks@e6150990 {
1155 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks"; 1196 compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
1156 reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>; 1197 reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
1157 clocks = <&zg_clk>, <&hp_clk>, <&zg_clk>, <&zg_clk>, 1198 clocks = <&zx_clk>, <&hp_clk>, <&zg_clk>, <&zg_clk>,
1158 <&zg_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>; 1199 <&zg_clk>, <&p_clk>, <&zs_clk>, <&zs_clk>;
1159 #clock-cells = <1>; 1200 #clock-cells = <1>;
1160 clock-indices = < 1201 clock-indices = <
@@ -1384,6 +1425,66 @@
1384 status = "disabled"; 1425 status = "disabled";
1385 }; 1426 };
1386 1427
1428 ipmmu_sy0: mmu@e6280000 {
1429 compatible = "renesas,ipmmu-vmsa";
1430 reg = <0 0xe6280000 0 0x1000>;
1431 interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
1432 <0 224 IRQ_TYPE_LEVEL_HIGH>;
1433 #iommu-cells = <1>;
1434 status = "disabled";
1435 };
1436
1437 ipmmu_sy1: mmu@e6290000 {
1438 compatible = "renesas,ipmmu-vmsa";
1439 reg = <0 0xe6290000 0 0x1000>;
1440 interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
1441 #iommu-cells = <1>;
1442 status = "disabled";
1443 };
1444
1445 ipmmu_ds: mmu@e6740000 {
1446 compatible = "renesas,ipmmu-vmsa";
1447 reg = <0 0xe6740000 0 0x1000>;
1448 interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
1449 <0 199 IRQ_TYPE_LEVEL_HIGH>;
1450 #iommu-cells = <1>;
1451 status = "disabled";
1452 };
1453
1454 ipmmu_mp: mmu@ec680000 {
1455 compatible = "renesas,ipmmu-vmsa";
1456 reg = <0 0xec680000 0 0x1000>;
1457 interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
1458 #iommu-cells = <1>;
1459 status = "disabled";
1460 };
1461
1462 ipmmu_mx: mmu@fe951000 {
1463 compatible = "renesas,ipmmu-vmsa";
1464 reg = <0 0xfe951000 0 0x1000>;
1465 interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
1466 <0 221 IRQ_TYPE_LEVEL_HIGH>;
1467 #iommu-cells = <1>;
1468 status = "disabled";
1469 };
1470
1471 ipmmu_rt: mmu@ffc80000 {
1472 compatible = "renesas,ipmmu-vmsa";
1473 reg = <0 0xffc80000 0 0x1000>;
1474 interrupts = <0 307 IRQ_TYPE_LEVEL_HIGH>;
1475 #iommu-cells = <1>;
1476 status = "disabled";
1477 };
1478
1479 ipmmu_gp: mmu@e62a0000 {
1480 compatible = "renesas,ipmmu-vmsa";
1481 reg = <0 0xe62a0000 0 0x1000>;
1482 interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>,
1483 <0 261 IRQ_TYPE_LEVEL_HIGH>;
1484 #iommu-cells = <1>;
1485 status = "disabled";
1486 };
1487
1387 rcar_sound: rcar_sound@ec500000 { 1488 rcar_sound: rcar_sound@ec500000 {
1388 /* 1489 /*
1389 * #sound-dai-cells is required 1490 * #sound-dai-cells is required
@@ -1395,7 +1496,10 @@
1395 reg = <0 0xec500000 0 0x1000>, /* SCU */ 1496 reg = <0 0xec500000 0 0x1000>, /* SCU */
1396 <0 0xec5a0000 0 0x100>, /* ADG */ 1497 <0 0xec5a0000 0 0x100>, /* ADG */
1397 <0 0xec540000 0 0x1000>, /* SSIU */ 1498 <0 0xec540000 0 0x1000>, /* SSIU */
1398 <0 0xec541000 0 0x1280>; /* SSI */ 1499 <0 0xec541000 0 0x1280>, /* SSI */
1500 <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
1501 reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
1502
1399 clocks = <&mstp10_clks R8A7791_CLK_SSI_ALL>, 1503 clocks = <&mstp10_clks R8A7791_CLK_SSI_ALL>,
1400 <&mstp10_clks R8A7791_CLK_SSI9>, <&mstp10_clks R8A7791_CLK_SSI8>, 1504 <&mstp10_clks R8A7791_CLK_SSI9>, <&mstp10_clks R8A7791_CLK_SSI8>,
1401 <&mstp10_clks R8A7791_CLK_SSI7>, <&mstp10_clks R8A7791_CLK_SSI6>, 1505 <&mstp10_clks R8A7791_CLK_SSI7>, <&mstp10_clks R8A7791_CLK_SSI6>,
@@ -1420,34 +1524,120 @@
1420 status = "disabled"; 1524 status = "disabled";
1421 1525
1422 rcar_sound,dvc { 1526 rcar_sound,dvc {
1423 dvc0: dvc@0 { }; 1527 dvc0: dvc@0 {
1424 dvc1: dvc@1 { }; 1528 dmas = <&audma0 0xbc>;
1529 dma-names = "tx";
1530 };
1531 dvc1: dvc@1 {
1532 dmas = <&audma0 0xbe>;
1533 dma-names = "tx";
1534 };
1425 }; 1535 };
1426 1536
1427 rcar_sound,src { 1537 rcar_sound,src {
1428 src0: src@0 { interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; }; 1538 src0: src@0 {
1429 src1: src@1 { interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; }; 1539 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
1430 src2: src@2 { interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; }; 1540 dmas = <&audma0 0x85>, <&audma1 0x9a>;
1431 src3: src@3 { interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; }; 1541 dma-names = "rx", "tx";
1432 src4: src@4 { interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; }; 1542 };
1433 src5: src@5 { interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; }; 1543 src1: src@1 {
1434 src6: src@6 { interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; }; 1544 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
1435 src7: src@7 { interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; }; 1545 dmas = <&audma0 0x87>, <&audma1 0x9c>;
1436 src8: src@8 { interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; }; 1546 dma-names = "rx", "tx";
1437 src9: src@9 { interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; }; 1547 };
1548 src2: src@2 {
1549 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
1550 dmas = <&audma0 0x89>, <&audma1 0x9e>;
1551 dma-names = "rx", "tx";
1552 };
1553 src3: src@3 {
1554 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
1555 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
1556 dma-names = "rx", "tx";
1557 };
1558 src4: src@4 {
1559 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
1560 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
1561 dma-names = "rx", "tx";
1562 };
1563 src5: src@5 {
1564 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
1565 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
1566 dma-names = "rx", "tx";
1567 };
1568 src6: src@6 {
1569 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
1570 dmas = <&audma0 0x91>, <&audma1 0xb4>;
1571 dma-names = "rx", "tx";
1572 };
1573 src7: src@7 {
1574 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
1575 dmas = <&audma0 0x93>, <&audma1 0xb6>;
1576 dma-names = "rx", "tx";
1577 };
1578 src8: src@8 {
1579 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
1580 dmas = <&audma0 0x95>, <&audma1 0xb8>;
1581 dma-names = "rx", "tx";
1582 };
1583 src9: src@9 {
1584 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
1585 dmas = <&audma0 0x97>, <&audma1 0xba>;
1586 dma-names = "rx", "tx";
1587 };
1438 }; 1588 };
1439 1589
1440 rcar_sound,ssi { 1590 rcar_sound,ssi {
1441 ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; }; 1591 ssi0: ssi@0 {
1442 ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; }; 1592 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
1443 ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; }; 1593 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
1444 ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; }; 1594 dma-names = "rx", "tx", "rxu", "txu";
1445 ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; }; 1595 };
1446 ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; }; 1596 ssi1: ssi@1 {
1447 ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; }; 1597 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
1448 ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; }; 1598 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
1449 ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; }; 1599 dma-names = "rx", "tx", "rxu", "txu";
1450 ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; }; 1600 };
1601 ssi2: ssi@2 {
1602 interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
1603 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
1604 dma-names = "rx", "tx", "rxu", "txu";
1605 };
1606 ssi3: ssi@3 {
1607 interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
1608 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
1609 dma-names = "rx", "tx", "rxu", "txu";
1610 };
1611 ssi4: ssi@4 {
1612 interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
1613 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
1614 dma-names = "rx", "tx", "rxu", "txu";
1615 };
1616 ssi5: ssi@5 {
1617 interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
1618 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
1619 dma-names = "rx", "tx", "rxu", "txu";
1620 };
1621 ssi6: ssi@6 {
1622 interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
1623 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
1624 dma-names = "rx", "tx", "rxu", "txu";
1625 };
1626 ssi7: ssi@7 {
1627 interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
1628 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
1629 dma-names = "rx", "tx", "rxu", "txu";
1630 };
1631 ssi8: ssi@8 {
1632 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
1633 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
1634 dma-names = "rx", "tx", "rxu", "txu";
1635 };
1636 ssi9: ssi@9 {
1637 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
1638 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
1639 dma-names = "rx", "tx", "rxu", "txu";
1640 };
1451 }; 1641 };
1452 }; 1642 };
1453}; 1643};
diff --git a/arch/arm/boot/dts/r8a7794-alt.dts b/arch/arm/boot/dts/r8a7794-alt.dts
index 0d848e605071..928cfa641475 100644
--- a/arch/arm/boot/dts/r8a7794-alt.dts
+++ b/arch/arm/boot/dts/r8a7794-alt.dts
@@ -43,6 +43,19 @@
43 status = "okay"; 43 status = "okay";
44}; 44};
45 45
46&ether {
47 phy-handle = <&phy1>;
48 renesas,ether-link-active-low;
49 status = "okay";
50
51 phy1: ethernet-phy@1 {
52 reg = <1>;
53 interrupt-parent = <&irqc0>;
54 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
55 micrel,led-mode = <1>;
56 };
57};
58
46&scif2 { 59&scif2 {
47 status = "okay"; 60 status = "okay";
48}; 61};
diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi
index 8f78da5ef10b..7a3ffa51a8bf 100644
--- a/arch/arm/boot/dts/r8a7794.dtsi
+++ b/arch/arm/boot/dts/r8a7794.dtsi
@@ -107,6 +107,66 @@
107 <0 17 IRQ_TYPE_LEVEL_HIGH>; 107 <0 17 IRQ_TYPE_LEVEL_HIGH>;
108 }; 108 };
109 109
110 dmac0: dma-controller@e6700000 {
111 compatible = "renesas,rcar-dmac";
112 reg = <0 0xe6700000 0 0x20000>;
113 interrupts = <0 197 IRQ_TYPE_LEVEL_HIGH
114 0 200 IRQ_TYPE_LEVEL_HIGH
115 0 201 IRQ_TYPE_LEVEL_HIGH
116 0 202 IRQ_TYPE_LEVEL_HIGH
117 0 203 IRQ_TYPE_LEVEL_HIGH
118 0 204 IRQ_TYPE_LEVEL_HIGH
119 0 205 IRQ_TYPE_LEVEL_HIGH
120 0 206 IRQ_TYPE_LEVEL_HIGH
121 0 207 IRQ_TYPE_LEVEL_HIGH
122 0 208 IRQ_TYPE_LEVEL_HIGH
123 0 209 IRQ_TYPE_LEVEL_HIGH
124 0 210 IRQ_TYPE_LEVEL_HIGH
125 0 211 IRQ_TYPE_LEVEL_HIGH
126 0 212 IRQ_TYPE_LEVEL_HIGH
127 0 213 IRQ_TYPE_LEVEL_HIGH
128 0 214 IRQ_TYPE_LEVEL_HIGH>;
129 interrupt-names = "error",
130 "ch0", "ch1", "ch2", "ch3",
131 "ch4", "ch5", "ch6", "ch7",
132 "ch8", "ch9", "ch10", "ch11",
133 "ch12", "ch13", "ch14";
134 clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC0>;
135 clock-names = "fck";
136 #dma-cells = <1>;
137 dma-channels = <15>;
138 };
139
140 dmac1: dma-controller@e6720000 {
141 compatible = "renesas,rcar-dmac";
142 reg = <0 0xe6720000 0 0x20000>;
143 interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
144 0 216 IRQ_TYPE_LEVEL_HIGH
145 0 217 IRQ_TYPE_LEVEL_HIGH
146 0 218 IRQ_TYPE_LEVEL_HIGH
147 0 219 IRQ_TYPE_LEVEL_HIGH
148 0 308 IRQ_TYPE_LEVEL_HIGH
149 0 309 IRQ_TYPE_LEVEL_HIGH
150 0 310 IRQ_TYPE_LEVEL_HIGH
151 0 311 IRQ_TYPE_LEVEL_HIGH
152 0 312 IRQ_TYPE_LEVEL_HIGH
153 0 313 IRQ_TYPE_LEVEL_HIGH
154 0 314 IRQ_TYPE_LEVEL_HIGH
155 0 315 IRQ_TYPE_LEVEL_HIGH
156 0 316 IRQ_TYPE_LEVEL_HIGH
157 0 317 IRQ_TYPE_LEVEL_HIGH
158 0 318 IRQ_TYPE_LEVEL_HIGH>;
159 interrupt-names = "error",
160 "ch0", "ch1", "ch2", "ch3",
161 "ch4", "ch5", "ch6", "ch7",
162 "ch8", "ch9", "ch10", "ch11",
163 "ch12", "ch13", "ch14";
164 clocks = <&mstp2_clks R8A7794_CLK_SYS_DMAC1>;
165 clock-names = "fck";
166 #dma-cells = <1>;
167 dma-channels = <15>;
168 };
169
110 scifa0: serial@e6c40000 { 170 scifa0: serial@e6c40000 {
111 compatible = "renesas,scifa-r8a7794", "renesas,scifa"; 171 compatible = "renesas,scifa-r8a7794", "renesas,scifa";
112 reg = <0 0xe6c40000 0 64>; 172 reg = <0 0xe6c40000 0 64>;
@@ -269,6 +329,41 @@
269 status = "disabled"; 329 status = "disabled";
270 }; 330 };
271 331
332 ether: ethernet@ee700000 {
333 compatible = "renesas,ether-r8a7794";
334 reg = <0 0xee700000 0 0x400>;
335 interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
336 clocks = <&mstp8_clks R8A7794_CLK_ETHER>;
337 phy-mode = "rmii";
338 #address-cells = <1>;
339 #size-cells = <0>;
340 status = "disabled";
341 };
342
343 sdhi0: sd@ee100000 {
344 compatible = "renesas,sdhi-r8a7794";
345 reg = <0 0xee100000 0 0x200>;
346 interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
347 clocks = <&mstp3_clks R8A7794_CLK_SDHI0>;
348 status = "disabled";
349 };
350
351 sdhi1: sd@ee140000 {
352 compatible = "renesas,sdhi-r8a7794";
353 reg = <0 0xee140000 0 0x100>;
354 interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
355 clocks = <&mstp3_clks R8A7794_CLK_SDHI1>;
356 status = "disabled";
357 };
358
359 sdhi2: sd@ee160000 {
360 compatible = "renesas,sdhi-r8a7794";
361 reg = <0 0xee160000 0 0x100>;
362 interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
363 clocks = <&mstp3_clks R8A7794_CLK_SDHI2>;
364 status = "disabled";
365 };
366
272 clocks { 367 clocks {
273 #address-cells = <2>; 368 #address-cells = <2>;
274 #size-cells = <2>; 369 #size-cells = <2>;
@@ -294,19 +389,19 @@
294 "lb", "qspi", "sdh", "sd0", "z"; 389 "lb", "qspi", "sdh", "sd0", "z";
295 }; 390 };
296 /* Variable factor clocks */ 391 /* Variable factor clocks */
297 sd1_clk: sd2_clk@e6150078 { 392 sd2_clk: sd2_clk@e6150078 {
298 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock"; 393 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock";
299 reg = <0 0xe6150078 0 4>; 394 reg = <0 0xe6150078 0 4>;
300 clocks = <&pll1_div2_clk>; 395 clocks = <&pll1_div2_clk>;
301 #clock-cells = <0>; 396 #clock-cells = <0>;
302 clock-output-names = "sd1"; 397 clock-output-names = "sd2";
303 }; 398 };
304 sd2_clk: sd3_clk@e615007c { 399 sd3_clk: sd3_clk@e615026c {
305 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock"; 400 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock";
306 reg = <0 0xe615007c 0 4>; 401 reg = <0 0xe615026c 0 4>;
307 clocks = <&pll1_div2_clk>; 402 clocks = <&pll1_div2_clk>;
308 #clock-cells = <0>; 403 #clock-cells = <0>;
309 clock-output-names = "sd2"; 404 clock-output-names = "sd3";
310 }; 405 };
311 mmc0_clk: mmc0_clk@e6150240 { 406 mmc0_clk: mmc0_clk@e6150240 {
312 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock"; 407 compatible = "renesas,r8a7794-div6-clock", "renesas,cpg-div6-clock";
@@ -518,7 +613,7 @@
518 mstp3_clks: mstp3_clks@e615013c { 613 mstp3_clks: mstp3_clks@e615013c {
519 compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks"; 614 compatible = "renesas,r8a7794-mstp-clocks", "renesas,cpg-mstp-clocks";
520 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>; 615 reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
521 clocks = <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7794_CLK_SD0>, 616 clocks = <&sd3_clk>, <&sd2_clk>, <&cpg_clocks R8A7794_CLK_SD0>,
522 <&mmc0_clk>, <&rclk_clk>, <&hp_clk>, <&hp_clk>; 617 <&mmc0_clk>, <&rclk_clk>, <&hp_clk>, <&hp_clk>;
523 #clock-cells = <1>; 618 #clock-cells = <1>;
524 clock-indices = < 619 clock-indices = <
@@ -585,4 +680,54 @@
585 clock-output-names = "scifa3", "scifa4", "scifa5"; 680 clock-output-names = "scifa3", "scifa4", "scifa5";
586 }; 681 };
587 }; 682 };
683
684 ipmmu_sy0: mmu@e6280000 {
685 compatible = "renesas,ipmmu-vmsa";
686 reg = <0 0xe6280000 0 0x1000>;
687 interrupts = <0 223 IRQ_TYPE_LEVEL_HIGH>,
688 <0 224 IRQ_TYPE_LEVEL_HIGH>;
689 #iommu-cells = <1>;
690 status = "disabled";
691 };
692
693 ipmmu_sy1: mmu@e6290000 {
694 compatible = "renesas,ipmmu-vmsa";
695 reg = <0 0xe6290000 0 0x1000>;
696 interrupts = <0 225 IRQ_TYPE_LEVEL_HIGH>;
697 #iommu-cells = <1>;
698 status = "disabled";
699 };
700
701 ipmmu_ds: mmu@e6740000 {
702 compatible = "renesas,ipmmu-vmsa";
703 reg = <0 0xe6740000 0 0x1000>;
704 interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
705 <0 199 IRQ_TYPE_LEVEL_HIGH>;
706 #iommu-cells = <1>;
707 };
708
709 ipmmu_mp: mmu@ec680000 {
710 compatible = "renesas,ipmmu-vmsa";
711 reg = <0 0xec680000 0 0x1000>;
712 interrupts = <0 226 IRQ_TYPE_LEVEL_HIGH>;
713 #iommu-cells = <1>;
714 status = "disabled";
715 };
716
717 ipmmu_mx: mmu@fe951000 {
718 compatible = "renesas,ipmmu-vmsa";
719 reg = <0 0xfe951000 0 0x1000>;
720 interrupts = <0 222 IRQ_TYPE_LEVEL_HIGH>,
721 <0 221 IRQ_TYPE_LEVEL_HIGH>;
722 #iommu-cells = <1>;
723 };
724
725 ipmmu_gp: mmu@e62a0000 {
726 compatible = "renesas,ipmmu-vmsa";
727 reg = <0 0xe62a0000 0 0x1000>;
728 interrupts = <0 260 IRQ_TYPE_LEVEL_HIGH>,
729 <0 261 IRQ_TYPE_LEVEL_HIGH>;
730 #iommu-cells = <1>;
731 status = "disabled";
732 };
588}; 733};
diff --git a/arch/arm/boot/dts/rk3188-radxarock.dts b/arch/arm/boot/dts/rk3188-radxarock.dts
index 9a09579b8309..bdf85701987d 100644
--- a/arch/arm/boot/dts/rk3188-radxarock.dts
+++ b/arch/arm/boot/dts/rk3188-radxarock.dts
@@ -103,6 +103,14 @@
103 regulator-always-on; 103 regulator-always-on;
104 regulator-boot-on; 104 regulator-boot-on;
105 }; 105 };
106
107 vsys: vsys-regulator {
108 compatible = "regulator-fixed";
109 regulator-name = "vsys";
110 regulator-min-microvolt = <5000000>;
111 regulator-max-microvolt = <5000000>;
112 regulator-boot-on;
113 };
106}; 114};
107 115
108&emac { 116&emac {
@@ -148,6 +156,14 @@
148 pinctrl-names = "default"; 156 pinctrl-names = "default";
149 pinctrl-0 = <&act8846_dvs0_ctl>; 157 pinctrl-0 = <&act8846_dvs0_ctl>;
150 158
159 vp1-supply = <&vsys>;
160 vp2-supply = <&vsys>;
161 vp3-supply = <&vsys>;
162 vp4-supply = <&vsys>;
163 inl1-supply = <&vcc_io>;
164 inl2-supply = <&vsys>;
165 inl3-supply = <&vsys>;
166
151 regulators { 167 regulators {
152 vcc_ddr: REG1 { 168 vcc_ddr: REG1 {
153 regulator-name = "VCC_DDR"; 169 regulator-name = "VCC_DDR";
diff --git a/arch/arm/boot/dts/rk3288-evb-act8846.dts b/arch/arm/boot/dts/rk3288-evb-act8846.dts
index d7b8bbc0c25f..1687e8336994 100644
--- a/arch/arm/boot/dts/rk3288-evb-act8846.dts
+++ b/arch/arm/boot/dts/rk3288-evb-act8846.dts
@@ -33,6 +33,7 @@
33 regulator-max-microvolt = <1350000>; 33 regulator-max-microvolt = <1350000>;
34 regulator-always-on; 34 regulator-always-on;
35 regulator-boot-on; 35 regulator-boot-on;
36 vin-supply = <&vcc_sys>;
36 }; 37 };
37 38
38 vdd_gpu: syr828@41 { 39 vdd_gpu: syr828@41 {
@@ -43,6 +44,7 @@
43 regulator-min-microvolt = <850000>; 44 regulator-min-microvolt = <850000>;
44 regulator-max-microvolt = <1350000>; 45 regulator-max-microvolt = <1350000>;
45 regulator-always-on; 46 regulator-always-on;
47 vin-supply = <&vcc_sys>;
46 }; 48 };
47 49
48 hym8563@51 { 50 hym8563@51 {
@@ -64,6 +66,14 @@
64 reg = <0x5a>; 66 reg = <0x5a>;
65 status = "okay"; 67 status = "okay";
66 68
69 vp1-supply = <&vcc_sys>;
70 vp2-supply = <&vcc_sys>;
71 vp3-supply = <&vcc_sys>;
72 vp4-supply = <&vcc_sys>;
73 inl1-supply = <&vcc_io>;
74 inl2-supply = <&vcc_sys>;
75 inl3-supply = <&vcc_20>;
76
67 regulators { 77 regulators {
68 vcc_ddr: REG1 { 78 vcc_ddr: REG1 {
69 regulator-name = "VCC_DDR"; 79 regulator-name = "VCC_DDR";
diff --git a/arch/arm/boot/dts/rk3288-evb-rk808.dts b/arch/arm/boot/dts/rk3288-evb-rk808.dts
index a1c294bf7fed..f62ea78754a9 100644
--- a/arch/arm/boot/dts/rk3288-evb-rk808.dts
+++ b/arch/arm/boot/dts/rk3288-evb-rk808.dts
@@ -43,9 +43,16 @@
43 #clock-cells = <1>; 43 #clock-cells = <1>;
44 clock-output-names = "xin32k", "rk808-clkout2"; 44 clock-output-names = "xin32k", "rk808-clkout2";
45 45
46 vcc1-supply = <&vcc_sys>;
47 vcc2-supply = <&vcc_sys>;
48 vcc3-supply = <&vcc_sys>;
49 vcc4-supply = <&vcc_sys>;
50 vcc6-supply = <&vcc_sys>;
51 vcc7-supply = <&vcc_sys>;
46 vcc8-supply = <&vcc_18>; 52 vcc8-supply = <&vcc_18>;
47 vcc9-supply = <&vcc_io>; 53 vcc9-supply = <&vcc_io>;
48 vcc10-supply = <&vcc_io>; 54 vcc10-supply = <&vcc_io>;
55 vcc11-supply = <&vcc_sys>;
49 vcc12-supply = <&vcc_io>; 56 vcc12-supply = <&vcc_io>;
50 vddio-supply = <&vccio_pmu>; 57 vddio-supply = <&vccio_pmu>;
51 58
diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi
index 5e895a514a0b..4a457518d861 100644
--- a/arch/arm/boot/dts/rk3288-evb.dtsi
+++ b/arch/arm/boot/dts/rk3288-evb.dtsi
@@ -103,6 +103,15 @@
103 regulator-always-on; 103 regulator-always-on;
104 regulator-boot-on; 104 regulator-boot-on;
105 }; 105 };
106
107 vcc_sys: vsys-regulator {
108 compatible = "regulator-fixed";
109 regulator-name = "vcc_sys";
110 regulator-min-microvolt = <5000000>;
111 regulator-max-microvolt = <5000000>;
112 regulator-always-on;
113 regulator-boot-on;
114 };
106}; 115};
107 116
108&emmc { 117&emmc {
@@ -238,6 +247,10 @@
238 }; 247 };
239}; 248};
240 249
250&usbphy {
251 status = "okay";
252};
253
241&usb_host0_ehci { 254&usb_host0_ehci {
242 status = "okay"; 255 status = "okay";
243}; 256};
diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index e6f873abbe0d..b54dd78580c1 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -179,6 +179,22 @@
179 status = "okay"; 179 status = "okay";
180}; 180};
181 181
182&gmac {
183 assigned-clocks = <&cru SCLK_MAC>;
184 assigned-clock-parents = <&ext_gmac>;
185 clock_in_out = "input";
186 pinctrl-names = "default";
187 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
188 phy-supply = <&vcc_lan>;
189 phy-mode = "rgmii";
190 snps,reset-active-low;
191 snps,reset-delays-us = <0 10000 1000000>;
192 snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
193 tx_delay = <0x30>;
194 rx_delay = <0x10>;
195 status = "ok";
196};
197
182&hdmi { 198&hdmi {
183 ddc-i2c-bus = <&i2c5>; 199 ddc-i2c-bus = <&i2c5>;
184 status = "okay"; 200 status = "okay";
@@ -459,6 +475,10 @@
459 status = "okay"; 475 status = "okay";
460}; 476};
461 477
478&usbphy {
479 status = "okay";
480};
481
462&usb_host1 { 482&usb_host1 {
463 pinctrl-names = "default"; 483 pinctrl-names = "default";
464 pinctrl-0 = <&usbhub_rst>; 484 pinctrl-0 = <&usbhub_rst>;
diff --git a/arch/arm/boot/dts/rk3288-popmetal.dts b/arch/arm/boot/dts/rk3288-popmetal.dts
new file mode 100644
index 000000000000..d081f0e0da36
--- /dev/null
+++ b/arch/arm/boot/dts/rk3288-popmetal.dts
@@ -0,0 +1,447 @@
1/*
2 * Copyright (c) 2014, 2015 Andy Yan <andy.yan@rock-chips.com>
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 * a) This file is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This file is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44
45#include "rk3288.dtsi"
46
47/ {
48 model = "PopMetal-RK3288";
49 compatible = "chipspark,popmetal-rk3288", "rockchip,rk3288";
50
51 memory{
52 reg = <0 0x80000000>;
53 };
54
55 ext_gmac: external-gmac-clock {
56 compatible = "fixed-clock";
57 clock-frequency = <125000000>;
58 clock-output-names = "ext_gmac";
59 #clock-cells = <0>;
60 };
61
62 gpio-keys {
63 compatible = "gpio-keys";
64 #address-cells = <1>;
65 #size-cells = <0>;
66 autorepeat;
67
68 pinctrl-names = "default";
69 pinctrl-0 = <&pwrbtn>;
70
71 button@0 {
72 gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
73 linux,code = <116>;
74 label = "GPIO Key Power";
75 linux,input-type = <1>;
76 gpio-key,wakeup = <1>;
77 debounce-interval = <100>;
78 };
79 };
80
81 ir: ir-receiver {
82 compatible = "gpio-ir-receiver";
83 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
84 pinctrl-names = "default";
85 pinctrl-0 = <&ir_int>;
86 };
87
88 vcc_sys: vsys-regulator {
89 compatible = "regulator-fixed";
90 regulator-name = "vcc_sys";
91 regulator-min-microvolt = <5000000>;
92 regulator-max-microvolt = <5000000>;
93 regulator-always-on;
94 regulator-boot-on;
95 };
96};
97
98&cpu0 {
99 cpu0-supply = <&vdd_cpu>;
100};
101
102&emmc {
103 broken-cd;
104 bus-width = <8>;
105 cap-mmc-highspeed;
106 disable-wp;
107 non-removable;
108 num-slots = <1>;
109 pinctrl-names = "default";
110 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
111 status = "okay";
112};
113
114&sdmmc {
115 bus-width = <4>;
116 cap-mmc-highspeed;
117 cap-sd-highspeed;
118 card-detect-delay = <200>;
119 disable-wp; /* wp not hooked up */
120 num-slots = <1>;
121 pinctrl-names = "default";
122 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
123 status = "okay";
124};
125
126&gmac {
127 phy-supply = <&vcc_lan>;
128 phy-mode = "rgmii";
129 clock_in_out = "input";
130 snps,reset-gpio = <&gpio4 7 0>;
131 snps,reset-active-low;
132 snps,reset-delays-us = <0 10000 1000000>;
133 assigned-clocks = <&cru SCLK_MAC>;
134 assigned-clock-parents = <&ext_gmac>;
135 pinctrl-names = "default";
136 pinctrl-0 = <&rgmii_pins>;
137 tx_delay = <0x30>;
138 rx_delay = <0x10>;
139 status = "ok";
140};
141
142&hdmi {
143 ddc-i2c-bus = <&i2c5>;
144 status = "okay";
145};
146
147&i2c0 {
148 status = "okay";
149 clock-frequency = <400000>;
150
151 rk808: pmic@1b {
152 compatible = "rockchip,rk808";
153 reg = <0x1b>;
154 interrupt-parent = <&gpio0>;
155 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&pmic_int &global_pwroff>;
158 rockchip,system-power-controller;
159 wakeup-source;
160 #clock-cells = <1>;
161 clock-output-names = "xin32k", "rk808-clkout2";
162
163 vcc1-supply = <&vcc_sys>;
164 vcc2-supply = <&vcc_sys>;
165 vcc3-supply = <&vcc_sys>;
166 vcc4-supply = <&vcc_sys>;
167 vcc6-supply = <&vcc_sys>;
168 vcc7-supply = <&vcc_sys>;
169 vcc8-supply = <&vcc_18>;
170 vcc9-supply = <&vcc_io>;
171 vcc10-supply = <&vcc_io>;
172 vcc11-supply = <&vcc_sys>;
173 vcc12-supply = <&vcc_io>;
174 vddio-supply = <&vcc_io>;
175
176 regulators {
177 vdd_cpu: DCDC_REG1 {
178 regulator-always-on;
179 regulator-boot-on;
180 regulator-min-microvolt = <750000>;
181 regulator-max-microvolt = <1350000>;
182 regulator-name = "vdd_arm";
183 regulator-state-mem {
184 regulator-off-in-suspend;
185 };
186 };
187
188 vdd_gpu: DCDC_REG2 {
189 regulator-always-on;
190 regulator-boot-on;
191 regulator-min-microvolt = <850000>;
192 regulator-max-microvolt = <1250000>;
193 regulator-name = "vdd_gpu";
194 regulator-state-mem {
195 regulator-on-in-suspend;
196 regulator-suspend-microvolt = <1000000>;
197 };
198 };
199
200 vcc_ddr: DCDC_REG3 {
201 regulator-always-on;
202 regulator-boot-on;
203 regulator-name = "vcc_ddr";
204 regulator-state-mem {
205 regulator-on-in-suspend;
206 };
207 };
208
209 vcc_io: DCDC_REG4 {
210 regulator-always-on;
211 regulator-boot-on;
212 regulator-min-microvolt = <3300000>;
213 regulator-max-microvolt = <3300000>;
214 regulator-name = "vcc_io";
215 regulator-state-mem {
216 regulator-on-in-suspend;
217 regulator-suspend-microvolt = <3300000>;
218 };
219 };
220
221 vcc_lan: LDO_REG1 {
222 regulator-always-on;
223 regulator-boot-on;
224 regulator-min-microvolt = <3300000>;
225 regulator-max-microvolt = <3300000>;
226 regulator-name = "vcc_lan";
227 regulator-state-mem {
228 regulator-on-in-suspend;
229 regulator-suspend-microvolt = <3300000>;
230 };
231 };
232
233 vccio_sd: LDO_REG2 {
234 regulator-always-on;
235 regulator-boot-on;
236 regulator-min-microvolt = <3300000>;
237 regulator-max-microvolt = <3300000>;
238 regulator-name = "vccio_sd";
239 regulator-state-mem {
240 regulator-off-in-suspend;
241 };
242 };
243
244 vdd_10: LDO_REG3 {
245 regulator-always-on;
246 regulator-boot-on;
247 regulator-min-microvolt = <1000000>;
248 regulator-max-microvolt = <1000000>;
249 regulator-name = "vdd_10";
250 regulator-state-mem {
251 regulator-on-in-suspend;
252 regulator-suspend-microvolt = <1000000>;
253 };
254 };
255
256 vcc18_lcd: LDO_REG4 {
257 regulator-always-on;
258 regulator-boot-on;
259 regulator-min-microvolt = <1800000>;
260 regulator-max-microvolt = <1800000>;
261 regulator-name = "vcc18_lcd";
262 regulator-state-mem {
263 regulator-on-in-suspend;
264 regulator-suspend-microvolt = <1800000>;
265 };
266 };
267
268 ldo5: LDO_REG5 {
269 regulator-always-on;
270 regulator-min-microvolt = <1800000>;
271 regulator-max-microvolt = <3300000>;
272 regulator-name = "ldo5";
273 };
274
275 vdd10_lcd: LDO_REG6 {
276 regulator-always-on;
277 regulator-boot-on;
278 regulator-min-microvolt = <1000000>;
279 regulator-max-microvolt = <1000000>;
280 regulator-name = "vdd10_lcd";
281 regulator-state-mem {
282 regulator-on-in-suspend;
283 regulator-suspend-microvolt = <1000000>;
284 };
285 };
286
287 vcc_18: LDO_REG7 {
288 regulator-always-on;
289 regulator-boot-on;
290 regulator-min-microvolt = <1800000>;
291 regulator-max-microvolt = <1800000>;
292 regulator-name = "vcc_18";
293 regulator-state-mem {
294 regulator-on-in-suspend;
295 regulator-suspend-microvolt = <1800000>;
296 };
297 };
298
299 vcca_codec: LDO_REG8 {
300 regulator-always-on;
301 regulator-boot-on;
302 regulator-min-microvolt = <3300000>;
303 regulator-max-microvolt = <3300000>;
304 regulator-name = "vcca_codec";
305 regulator-state-mem {
306 regulator-on-in-suspend;
307 regulator-suspend-microvolt = <3300000>;
308 };
309 };
310
311 vcc_wl: SWITCH_REG1 {
312 regulator-always-on;
313 regulator-boot-on;
314 regulator-name = "vcc_wl";
315 regulator-state-mem {
316 regulator-on-in-suspend;
317 };
318 };
319
320 vcc_lcd: SWITCH_REG2 {
321 regulator-always-on;
322 regulator-boot-on;
323 regulator-name = "vcc_lcd";
324 regulator-state-mem {
325 regulator-on-in-suspend;
326 };
327 };
328 };
329 };
330};
331
332&i2c1 {
333 status = "okay";
334 clock-frequency = <400000>;
335
336 ak8963: ak8963@0d {
337 compatible = "asahi-kasei,ak8975";
338 reg = <0x0d>;
339 interrupt-parent = <&gpio8>;
340 interrupts = <1 IRQ_TYPE_EDGE_RISING>;
341 pinctrl-names = "default";
342 pinctrl-0 = <&comp_int>;
343 };
344
345 l3g4200d: l3g4200d@68 {
346 compatible = "st,l3g4200d-gyro";
347 st,drdy-int-pin = <2>;
348 reg = <0x6b>;
349 };
350
351 mma8452: mma8452@1d {
352 compatible = "fsl,mma8452";
353 reg = <0x1d>;
354 interrupt-parent = <&gpio8>;
355 interrupts = <0 IRQ_TYPE_EDGE_RISING>;
356 pinctrl-names = "default";
357 pinctrl-0 = <&gsensor_int>;
358 };
359};
360
361&i2c2 {
362 status = "okay";
363};
364
365&i2c3 {
366 status = "okay";
367};
368
369&i2c4 {
370 status = "okay";
371};
372
373&i2c5 {
374 status = "okay";
375};
376
377&pinctrl {
378 ak8963 {
379 comp_int: comp-int {
380 rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
381 };
382 };
383
384 buttons {
385 pwrbtn: pwrbtn {
386 rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
387 };
388 };
389
390 ir {
391 ir_int: ir-int {
392 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
393 };
394 };
395
396 mma8452 {
397 gsensor_int: gsensor-int {
398 rockchip,pins = <8 0 RK_FUNC_GPIO &pcfg_pull_up>;
399 };
400 };
401
402 pmic {
403 pmic_int: pmic-int {
404 rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
405 };
406 };
407};
408
409&vopb {
410 status = "okay";
411};
412
413&vopb_mmu {
414 status = "okay";
415};
416
417&vopl {
418 status = "okay";
419};
420
421&vopl_mmu {
422 status = "okay";
423};
424
425&uart0 {
426 status = "okay";
427};
428
429&uart1 {
430 status = "okay";
431};
432
433&uart2 {
434 status = "okay";
435};
436
437&uart3 {
438 status = "okay";
439};
440
441&uart4 {
442 status = "okay";
443};
444
445&usbphy {
446 status = "okay";
447};
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index eccc78d3220b..165968d51d8f 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -420,6 +420,8 @@
420 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; 420 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
421 clocks = <&cru HCLK_USBHOST0>; 421 clocks = <&cru HCLK_USBHOST0>;
422 clock-names = "usbhost"; 422 clock-names = "usbhost";
423 phys = <&usbphy1>;
424 phy-names = "usb";
423 status = "disabled"; 425 status = "disabled";
424 }; 426 };
425 427
@@ -432,6 +434,8 @@
432 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 434 interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
433 clocks = <&cru HCLK_USBHOST1>; 435 clocks = <&cru HCLK_USBHOST1>;
434 clock-names = "otg"; 436 clock-names = "otg";
437 phys = <&usbphy2>;
438 phy-names = "usb2-phy";
435 status = "disabled"; 439 status = "disabled";
436 }; 440 };
437 441
@@ -442,6 +446,8 @@
442 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>; 446 interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
443 clocks = <&cru HCLK_OTG0>; 447 clocks = <&cru HCLK_OTG0>;
444 clock-names = "otg"; 448 clock-names = "otg";
449 phys = <&usbphy0>;
450 phy-names = "usb2-phy";
445 status = "disabled"; 451 status = "disabled";
446 }; 452 };
447 453
@@ -698,6 +704,35 @@
698 interrupts = <GIC_PPI 9 0xf04>; 704 interrupts = <GIC_PPI 9 0xf04>;
699 }; 705 };
700 706
707 usbphy: phy {
708 compatible = "rockchip,rk3288-usb-phy";
709 rockchip,grf = <&grf>;
710 #address-cells = <1>;
711 #size-cells = <0>;
712 status = "disabled";
713
714 usbphy0: usb-phy0 {
715 #phy-cells = <0>;
716 reg = <0x320>;
717 clocks = <&cru SCLK_OTGPHY0>;
718 clock-names = "phyclk";
719 };
720
721 usbphy1: usb-phy1 {
722 #phy-cells = <0>;
723 reg = <0x334>;
724 clocks = <&cru SCLK_OTGPHY1>;
725 clock-names = "phyclk";
726 };
727
728 usbphy2: usb-phy2 {
729 #phy-cells = <0>;
730 reg = <0x348>;
731 clocks = <&cru SCLK_OTGPHY2>;
732 clock-names = "phyclk";
733 };
734 };
735
701 pinctrl: pinctrl { 736 pinctrl: pinctrl {
702 compatible = "rockchip,rk3288-pinctrl"; 737 compatible = "rockchip,rk3288-pinctrl";
703 rockchip,grf = <&grf>; 738 rockchip,grf = <&grf>;
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 367af53c1b84..57ab8587f7b9 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -26,6 +26,7 @@
26 serial2 = &usart1; 26 serial2 = &usart1;
27 serial3 = &usart2; 27 serial3 = &usart2;
28 serial4 = &usart3; 28 serial4 = &usart3;
29 serial5 = &uart0;
29 gpio0 = &pioA; 30 gpio0 = &pioA;
30 gpio1 = &pioB; 31 gpio1 = &pioB;
31 gpio2 = &pioC; 32 gpio2 = &pioC;
@@ -206,6 +207,17 @@
206 status = "disabled"; 207 status = "disabled";
207 }; 208 };
208 209
210 uart0: serial@f0024000 {
211 compatible = "atmel,at91sam9260-usart";
212 reg = <0xf0024000 0x100>;
213 interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>;
214 pinctrl-names = "default";
215 pinctrl-0 = <&pinctrl_uart0>;
216 clocks = <&uart0_clk>;
217 clock-names = "usart";
218 status = "disabled";
219 };
220
209 pwm0: pwm@f002c000 { 221 pwm0: pwm@f002c000 {
210 compatible = "atmel,sama5d3-pwm"; 222 compatible = "atmel,sama5d3-pwm";
211 reg = <0xf002c000 0x300>; 223 reg = <0xf002c000 0x300>;
@@ -439,7 +451,7 @@
439 }; 451 };
440 452
441 dbgu: serial@ffffee00 { 453 dbgu: serial@ffffee00 {
442 compatible = "atmel,at91sam9260-usart"; 454 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
443 reg = <0xffffee00 0x200>; 455 reg = <0xffffee00 0x200>;
444 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; 456 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>;
445 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(13)>, 457 dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(13)>,
@@ -764,6 +776,22 @@
764 }; 776 };
765 }; 777 };
766 778
779 uart0 {
780 pinctrl_uart0: uart0-0 {
781 atmel,pins =
782 <AT91_PIOC 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* conflicts with PWMFI2, ISI_D8 */
783 AT91_PIOC 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>; /* conflicts with ISI_PCK */
784 };
785 };
786
787 uart1 {
788 pinctrl_uart1: uart1-0 {
789 atmel,pins =
790 <AT91_PIOA 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* conflicts with TWD0, ISI_VSYNC */
791 AT91_PIOA 31 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>; /* conflicts with TWCK0, ISI_HSYNC */
792 };
793 };
794
767 usart0 { 795 usart0 {
768 pinctrl_usart0: usart0-0 { 796 pinctrl_usart0: usart0-0 {
769 atmel,pins = 797 atmel,pins =
@@ -1098,6 +1126,12 @@
1098 atmel,clk-output-range = <0 66000000>; 1126 atmel,clk-output-range = <0 66000000>;
1099 }; 1127 };
1100 1128
1129 uart0_clk: uart0_clk {
1130 #clock-cells = <0>;
1131 reg = <16>;
1132 atmel,clk-output-range = <0 66000000>;
1133 };
1134
1101 twi0_clk: twi0_clk { 1135 twi0_clk: twi0_clk {
1102 reg = <18>; 1136 reg = <18>;
1103 #clock-cells = <0>; 1137 #clock-cells = <0>;
diff --git a/arch/arm/boot/dts/sama5d35ek.dts b/arch/arm/boot/dts/sama5d35ek.dts
index 9089c7c6cea8..d9a9aca1ccfd 100644
--- a/arch/arm/boot/dts/sama5d35ek.dts
+++ b/arch/arm/boot/dts/sama5d35ek.dts
@@ -44,8 +44,6 @@
44 44
45 gpio_keys { 45 gpio_keys {
46 compatible = "gpio-keys"; 46 compatible = "gpio-keys";
47 #address-cells = <1>;
48 #size-cells = <0>;
49 47
50 pb_user1 { 48 pb_user1 {
51 label = "pb_user1"; 49 label = "pb_user1";
diff --git a/arch/arm/boot/dts/sama5d3_can.dtsi b/arch/arm/boot/dts/sama5d3_can.dtsi
index eaf41451ad0c..c5a3772741bf 100644
--- a/arch/arm/boot/dts/sama5d3_can.dtsi
+++ b/arch/arm/boot/dts/sama5d3_can.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_can.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_can.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * CAN support 3 * CAN support
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d3_emac.dtsi b/arch/arm/boot/dts/sama5d3_emac.dtsi
index b4544cf11bad..7cb235ef0fb6 100644
--- a/arch/arm/boot/dts/sama5d3_emac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_emac.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_emac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_emac.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * Ethernet. 3 * Ethernet.
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d3_gmac.dtsi b/arch/arm/boot/dts/sama5d3_gmac.dtsi
index de5ed59fb446..23f225fbb756 100644
--- a/arch/arm/boot/dts/sama5d3_gmac.dtsi
+++ b/arch/arm/boot/dts/sama5d3_gmac.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_gmac.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_gmac.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * Gigabit Ethernet. 3 * Gigabit Ethernet.
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 85d302701565..be7cfefc6c31 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_lcd.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_lcd.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * LCD support 3 * LCD support
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
@@ -13,40 +13,183 @@
13/ { 13/ {
14 ahb { 14 ahb {
15 apb { 15 apb {
16 hlcdc: hlcdc@f0030000 {
17 compatible = "atmel,sama5d3-hlcdc";
18 reg = <0xf0030000 0x2000>;
19 interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
20 clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
21 clock-names = "periph_clk","sys_clk", "slow_clk";
22 status = "disabled";
23
24 hlcdc-display-controller {
25 compatible = "atmel,hlcdc-display-controller";
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 port@0 {
30 #address-cells = <1>;
31 #size-cells = <0>;
32 reg = <0>;
33 };
34 };
35
36 hlcdc_pwm: hlcdc-pwm {
37 compatible = "atmel,hlcdc-pwm";
38 pinctrl-names = "default";
39 pinctrl-0 = <&pinctrl_lcd_pwm>;
40 #pwm-cells = <3>;
41 };
42 };
43
16 pinctrl@fffff200 { 44 pinctrl@fffff200 {
17 lcd { 45 lcd {
18 pinctrl_lcd: lcd-0 { 46 pinctrl_lcd_base: lcd-base-0 {
47 atmel,pins =
48 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDVSYNC */
49 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDHSYNC */
50 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDDISP */
51 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDDEN */
52 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
53 };
54
55 pinctrl_lcd_pwm: lcd-pwm-0 {
56 atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPWM */
57 };
58
59 pinctrl_lcd_rgb444: lcd-rgb-0 {
60 atmel,pins =
61 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
62 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
63 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
64 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
65 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
66 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
67 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
68 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
69 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
70 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
71 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
72 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD11 pin */
73 };
74
75 pinctrl_lcd_rgb565: lcd-rgb-1 {
76 atmel,pins =
77 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
78 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
79 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
80 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
81 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
82 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
83 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
84 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
85 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
86 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
87 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
88 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
89 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
90 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
91 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
92 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD15 pin */
93 };
94
95 pinctrl_lcd_rgb666: lcd-rgb-2 {
96 atmel,pins =
97 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
98 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
99 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
100 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
101 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
102 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
103 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
104 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
105 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
106 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
107 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
108 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
109 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
110 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
111 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
112 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
113 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD16 pin */
114 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD17 pin */
115 };
116
117 pinctrl_lcd_rgb666_alt: lcd-rgb-2-alt {
118 atmel,pins =
119 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
120 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
121 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
122 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
123 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
124 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
125 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
126 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
127 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
128 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
129 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
130 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
131 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
132 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
133 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
134 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
135 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD16 pin */
136 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* LCDD17 pin */
137 };
138
139 pinctrl_lcd_rgb888: lcd-rgb-3 {
140 atmel,pins =
141 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
142 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
143 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
144 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
145 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
146 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
147 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
148 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
149 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
150 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
151 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
152 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
153 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
154 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
155 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
156 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
157 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD16 pin */
158 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD17 pin */
159 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD18 pin */
160 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD19 pin */
161 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD20 pin */
162 AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD21 pin */
163 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */
164 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
165 };
166
167 pinctrl_lcd_rgb888_alt: lcd-rgb-3-alt {
19 atmel,pins = 168 atmel,pins =
20 <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA24 periph A LCDPWM */ 169 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
21 AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA26 periph A LCDVSYNC */ 170 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
22 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA27 periph A LCDHSYNC */ 171 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
23 AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA25 periph A LCDDISP */ 172 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
24 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA29 periph A LCDDEN */ 173 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
25 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA28 periph A LCDPCK */ 174 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
26 AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA0 periph A LCDD0 pin */ 175 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
27 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA1 periph A LCDD1 pin */ 176 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
28 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA2 periph A LCDD2 pin */ 177 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
29 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA3 periph A LCDD3 pin */ 178 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
30 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA4 periph A LCDD4 pin */ 179 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
31 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA5 periph A LCDD5 pin */ 180 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
32 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA6 periph A LCDD6 pin */ 181 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
33 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA7 periph A LCDD7 pin */ 182 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
34 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA8 periph A LCDD8 pin */ 183 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
35 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA9 periph A LCDD9 pin */ 184 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
36 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA10 periph A LCDD10 pin */ 185 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD16 pin */
37 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA11 periph A LCDD11 pin */ 186 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD17 pin */
38 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA12 periph A LCDD12 pin */ 187 AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD18 pin */
39 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA13 periph A LCDD13 pin */ 188 AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD19 pin */
40 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA14 periph A LCDD14 pin */ 189 AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD20 pin */
41 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* PA15 periph A LCDD15 pin */ 190 AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD21 pin */
42 AT91_PIOC 14 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC14 periph C LCDD16 pin */ 191 AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE /* LCDD22 pin */
43 AT91_PIOC 13 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC13 periph C LCDD17 pin */ 192 AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* LCDD23 pin */
44 AT91_PIOC 12 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC12 periph C LCDD18 pin */
45 AT91_PIOC 11 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC11 periph C LCDD19 pin */
46 AT91_PIOC 10 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC10 periph C LCDD20 pin */
47 AT91_PIOC 15 AT91_PERIPH_C AT91_PINCTRL_NONE /* PC15 periph C LCDD21 pin */
48 AT91_PIOE 27 AT91_PERIPH_C AT91_PINCTRL_NONE /* PE27 periph C LCDD22 pin */
49 AT91_PIOE 28 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* PE28 periph C LCDD23 pin */
50 }; 193 };
51 }; 194 };
52 }; 195 };
diff --git a/arch/arm/boot/dts/sama5d3_mci2.dtsi b/arch/arm/boot/dts/sama5d3_mci2.dtsi
index 1b02208ea6ff..026b252f09b3 100644
--- a/arch/arm/boot/dts/sama5d3_mci2.dtsi
+++ b/arch/arm/boot/dts/sama5d3_mci2.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_mci2.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_mci2.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * 3 MMC ports 3 * 3 MMC ports
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d3_tcb1.dtsi b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
index 02848453ca0c..f7fa58fe09f1 100644
--- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi
+++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_tcb1.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_tcb1.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * 2 TC blocks. 3 * 2 TC blocks.
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d3_uart.dtsi b/arch/arm/boot/dts/sama5d3_uart.dtsi
index 7a8d4c6115f7..2511d748867b 100644
--- a/arch/arm/boot/dts/sama5d3_uart.dtsi
+++ b/arch/arm/boot/dts/sama5d3_uart.dtsi
@@ -1,5 +1,5 @@
1/* 1/*
2 * at91sama5d3_uart.dtsi - Device Tree Include file for AT91SAM9x5 SoC with 2 * sama5d3_uart.dtsi - Device Tree Include file for SAMA5D3 SoC with
3 * UART support 3 * UART support
4 * 4 *
5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com> 5 * Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 4303874889c6..6b1bb58f9c0b 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -64,9 +64,13 @@
64 gpio2 = &pioC; 64 gpio2 = &pioC;
65 gpio3 = &pioD; 65 gpio3 = &pioD;
66 gpio4 = &pioE; 66 gpio4 = &pioE;
67 pwm0 = &pwm0;
68 ssc0 = &ssc0;
69 ssc1 = &ssc1;
67 tcb0 = &tcb0; 70 tcb0 = &tcb0;
68 tcb1 = &tcb1; 71 tcb1 = &tcb1;
69 i2c0 = &i2c0; 72 i2c0 = &i2c0;
73 i2c1 = &i2c1;
70 i2c2 = &i2c2; 74 i2c2 = &i2c2;
71 }; 75 };
72 cpus { 76 cpus {
@@ -310,6 +314,34 @@
310 #size-cells = <1>; 314 #size-cells = <1>;
311 ranges; 315 ranges;
312 316
317 hlcdc: hlcdc@f0000000 {
318 compatible = "atmel,sama5d4-hlcdc";
319 reg = <0xf0000000 0x4000>;
320 interrupts = <51 IRQ_TYPE_LEVEL_HIGH 0>;
321 clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>;
322 clock-names = "periph_clk","sys_clk", "slow_clk";
323 status = "disabled";
324
325 hlcdc-display-controller {
326 compatible = "atmel,hlcdc-display-controller";
327 #address-cells = <1>;
328 #size-cells = <0>;
329
330 port@0 {
331 #address-cells = <1>;
332 #size-cells = <0>;
333 reg = <0>;
334 };
335 };
336
337 hlcdc_pwm: hlcdc-pwm {
338 compatible = "atmel,hlcdc-pwm";
339 pinctrl-names = "default";
340 pinctrl-0 = <&pinctrl_lcd_pwm>;
341 #pwm-cells = <3>;
342 };
343 };
344
313 dma1: dma-controller@f0004000 { 345 dma1: dma-controller@f0004000 {
314 compatible = "atmel,sama5d4-dma"; 346 compatible = "atmel,sama5d4-dma";
315 reg = <0xf0004000 0x200>; 347 reg = <0xf0004000 0x200>;
@@ -319,6 +351,21 @@
319 clock-names = "dma_clk"; 351 clock-names = "dma_clk";
320 }; 352 };
321 353
354 isi: isi@f0008000 {
355 compatible = "atmel,at91sam9g45-isi";
356 reg = <0xf0008000 0x4000>;
357 interrupts = <52 IRQ_TYPE_LEVEL_HIGH 5>;
358 pinctrl-names = "default";
359 pinctrl-0 = <&pinctrl_isi_data_0_7>;
360 clocks = <&isi_clk>;
361 clock-names = "isi_clk";
362 status = "disabled";
363 port {
364 #address-cells = <1>;
365 #size-cells = <0>;
366 };
367 };
368
322 ramc0: ramc@f0010000 { 369 ramc0: ramc@f0010000 {
323 compatible = "atmel,sama5d3-ddramc"; 370 compatible = "atmel,sama5d3-ddramc";
324 reg = <0xf0010000 0x200>; 371 reg = <0xf0010000 0x200>;
@@ -800,6 +847,33 @@
800 clock-names = "mci_clk"; 847 clock-names = "mci_clk";
801 }; 848 };
802 849
850 ssc0: ssc@f8008000 {
851 compatible = "atmel,at91sam9g45-ssc";
852 reg = <0xf8008000 0x4000>;
853 interrupts = <48 IRQ_TYPE_LEVEL_HIGH 0>;
854 pinctrl-names = "default";
855 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
856 dmas = <&dma1
857 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
858 | AT91_XDMAC_DT_PERID(26))>,
859 <&dma1
860 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
861 | AT91_XDMAC_DT_PERID(27))>;
862 dma-names = "tx", "rx";
863 clocks = <&ssc0_clk>;
864 clock-names = "pclk";
865 status = "disabled";
866 };
867
868 pwm0: pwm@f800c000 {
869 compatible = "atmel,sama5d3-pwm";
870 reg = <0xf800c000 0x300>;
871 interrupts = <43 IRQ_TYPE_LEVEL_HIGH 4>;
872 #pwm-cells = <3>;
873 clocks = <&pwm_clk>;
874 status = "disabled";
875 };
876
803 spi0: spi@f8010000 { 877 spi0: spi@f8010000 {
804 #address-cells = <1>; 878 #address-cells = <1>;
805 #size-cells = <0>; 879 #size-cells = <0>;
@@ -839,6 +913,25 @@
839 status = "disabled"; 913 status = "disabled";
840 }; 914 };
841 915
916 i2c1: i2c@f8018000 {
917 compatible = "atmel,at91sam9x5-i2c";
918 reg = <0xf8018000 0x4000>;
919 interrupts = <33 IRQ_TYPE_LEVEL_HIGH 6>;
920 dmas = <&dma1
921 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
922 AT91_XDMAC_DT_PERID(4)>,
923 <&dma1
924 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
925 AT91_XDMAC_DT_PERID(5)>;
926 dma-names = "tx", "rx";
927 pinctrl-names = "default";
928 pinctrl-0 = <&pinctrl_i2c1>;
929 #address-cells = <1>;
930 #size-cells = <0>;
931 clocks = <&twi1_clk>;
932 status = "disabled";
933 };
934
842 tcb0: timer@f801c000 { 935 tcb0: timer@f801c000 {
843 compatible = "atmel,at91sam9x5-tcb"; 936 compatible = "atmel,at91sam9x5-tcb";
844 reg = <0xf801c000 0x100>; 937 reg = <0xf801c000 0x100>;
@@ -853,6 +946,8 @@
853 interrupts = <54 IRQ_TYPE_LEVEL_HIGH 3>; 946 interrupts = <54 IRQ_TYPE_LEVEL_HIGH 3>;
854 pinctrl-names = "default"; 947 pinctrl-names = "default";
855 pinctrl-0 = <&pinctrl_macb0_rmii>; 948 pinctrl-0 = <&pinctrl_macb0_rmii>;
949 #address-cells = <1>;
950 #size-cells = <0>;
856 clocks = <&macb0_clk>, <&macb0_clk>; 951 clocks = <&macb0_clk>, <&macb0_clk>;
857 clock-names = "hclk", "pclk"; 952 clock-names = "hclk", "pclk";
858 status = "disabled"; 953 status = "disabled";
@@ -953,6 +1048,24 @@
953 status = "disabled"; 1048 status = "disabled";
954 }; 1049 };
955 1050
1051 ssc1: ssc@fc014000 {
1052 compatible = "atmel,at91sam9g45-ssc";
1053 reg = <0xfc014000 0x4000>;
1054 interrupts = <49 IRQ_TYPE_LEVEL_HIGH 0>;
1055 pinctrl-names = "default";
1056 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
1057 dmas = <&dma1
1058 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
1059 | AT91_XDMAC_DT_PERID(28))>,
1060 <&dma1
1061 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
1062 | AT91_XDMAC_DT_PERID(29))>;
1063 dma-names = "tx", "rx";
1064 clocks = <&ssc1_clk>;
1065 clock-names = "pclk";
1066 status = "disabled";
1067 };
1068
956 tcb1: timer@fc020000 { 1069 tcb1: timer@fc020000 {
957 compatible = "atmel,at91sam9x5-tcb"; 1070 compatible = "atmel,at91sam9x5-tcb";
958 reg = <0xfc020000 0x100>; 1071 reg = <0xfc020000 0x100>;
@@ -1008,6 +1121,46 @@
1008 }; 1121 };
1009 }; 1122 };
1010 1123
1124 aes@fc044000 {
1125 compatible = "atmel,at91sam9g46-aes";
1126 reg = <0xfc044000 0x100>;
1127 interrupts = <12 IRQ_TYPE_LEVEL_HIGH 0>;
1128 dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
1129 AT91_XDMAC_DT_PERID(41)>,
1130 <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
1131 AT91_XDMAC_DT_PERID(40)>;
1132 dma-names = "tx", "rx";
1133 clocks = <&aes_clk>;
1134 clock-names = "aes_clk";
1135 status = "disabled";
1136 };
1137
1138 tdes@fc04c000 {
1139 compatible = "atmel,at91sam9g46-tdes";
1140 reg = <0xfc04c000 0x100>;
1141 interrupts = <14 IRQ_TYPE_LEVEL_HIGH 0>;
1142 dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
1143 AT91_XDMAC_DT_PERID(42)>,
1144 <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
1145 AT91_XDMAC_DT_PERID(43)>;
1146 dma-names = "tx", "rx";
1147 clocks = <&tdes_clk>;
1148 clock-names = "tdes_clk";
1149 status = "disabled";
1150 };
1151
1152 sha@fc050000 {
1153 compatible = "atmel,at91sam9g46-sha";
1154 reg = <0xfc050000 0x100>;
1155 interrupts = <15 IRQ_TYPE_LEVEL_HIGH 0>;
1156 dmas = <&dma0 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
1157 AT91_XDMAC_DT_PERID(44)>;
1158 dma-names = "tx";
1159 clocks = <&sha_clk>;
1160 clock-names = "sha_clk";
1161 status = "disabled";
1162 };
1163
1011 rstc@fc068600 { 1164 rstc@fc068600 {
1012 compatible = "atmel,at91sam9g45-rstc"; 1165 compatible = "atmel,at91sam9g45-rstc";
1013 reg = <0xfc068600 0x10>; 1166 reg = <0xfc068600 0x10>;
@@ -1064,7 +1217,7 @@
1064 }; 1217 };
1065 1218
1066 dbgu: serial@fc069000 { 1219 dbgu: serial@fc069000 {
1067 compatible = "atmel,at91sam9260-usart"; 1220 compatible = "atmel,at91sam9260-dbgu", "atmel,at91sam9260-usart";
1068 reg = <0xfc069000 0x200>; 1221 reg = <0xfc069000 0x200>;
1069 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>; 1222 interrupts = <2 IRQ_TYPE_LEVEL_HIGH 7>;
1070 pinctrl-names = "default"; 1223 pinctrl-names = "default";
@@ -1190,6 +1343,14 @@
1190 }; 1343 };
1191 }; 1344 };
1192 1345
1346 i2c1 {
1347 pinctrl_i2c1: i2c1-0 {
1348 atmel,pins =
1349 <AT91_PIOE 29 AT91_PERIPH_C AT91_PINCTRL_NONE /* TWD1, conflicts with UART0 RX and DIBP */
1350 AT91_PIOE 30 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* TWCK1, conflicts with UART0 TX and DIBN */
1351 };
1352 };
1353
1193 i2c2 { 1354 i2c2 {
1194 pinctrl_i2c2: i2c2-0 { 1355 pinctrl_i2c2: i2c2-0 {
1195 atmel,pins = 1356 atmel,pins =
@@ -1198,6 +1359,155 @@
1198 }; 1359 };
1199 }; 1360 };
1200 1361
1362 isi {
1363 pinctrl_isi_data_0_7: isi-0-data-0-7 {
1364 atmel,pins =
1365 <AT91_PIOC 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D0 */
1366 AT91_PIOC 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D1 */
1367 AT91_PIOC 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D2 */
1368 AT91_PIOC 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D3 */
1369 AT91_PIOC 23 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D4 */
1370 AT91_PIOC 24 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D5 */
1371 AT91_PIOC 25 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D6 */
1372 AT91_PIOC 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* ISI_D7 */
1373 AT91_PIOB 1 AT91_PERIPH_C AT91_PINCTRL_NONE /* ISI_PCK, conflict with G0_RXCK */
1374 AT91_PIOB 3 AT91_PERIPH_C AT91_PINCTRL_NONE /* ISI_VSYNC */
1375 AT91_PIOB 4 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_HSYNC */
1376 };
1377 pinctrl_isi_data_8_9: isi-0-data-8-9 {
1378 atmel,pins =
1379 <AT91_PIOC 0 AT91_PERIPH_C AT91_PINCTRL_NONE /* ISI_D8, conflicts with SPI0_MISO, PWMH2 */
1380 AT91_PIOC 1 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_D9, conflicts with SPI0_MOSI, PWML2 */
1381 };
1382 pinctrl_isi_data_10_11: isi-0-data-10-11 {
1383 atmel,pins =
1384 <AT91_PIOC 2 AT91_PERIPH_C AT91_PINCTRL_NONE /* ISI_D10, conflicts with SPI0_SPCK, PWMH3 */
1385 AT91_PIOC 3 AT91_PERIPH_C AT91_PINCTRL_NONE>; /* ISI_D11, conflicts with SPI0_NPCS0, PWML3 */
1386 };
1387 };
1388
1389 lcd {
1390 pinctrl_lcd_base: lcd-base-0 {
1391 atmel,pins =
1392 <AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDVSYNC */
1393 AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDHSYNC */
1394 AT91_PIOA 29 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDDEN */
1395 AT91_PIOA 28 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPCK */
1396 };
1397 pinctrl_lcd_pwm: lcd-pwm-0 {
1398 atmel,pins = <AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDPWM */
1399 };
1400 pinctrl_lcd_rgb444: lcd-rgb-0 {
1401 atmel,pins =
1402 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
1403 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
1404 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
1405 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
1406 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
1407 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
1408 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
1409 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
1410 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
1411 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
1412 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
1413 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD11 pin */
1414 };
1415 pinctrl_lcd_rgb565: lcd-rgb-1 {
1416 atmel,pins =
1417 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
1418 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
1419 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
1420 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
1421 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
1422 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
1423 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
1424 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
1425 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
1426 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
1427 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
1428 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
1429 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
1430 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
1431 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
1432 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD15 pin */
1433 };
1434 pinctrl_lcd_rgb666: lcd-rgb-2 {
1435 atmel,pins =
1436 <AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
1437 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
1438 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
1439 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
1440 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
1441 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
1442 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
1443 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
1444 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
1445 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
1446 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
1447 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
1448 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD18 pin */
1449 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD19 pin */
1450 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD20 pin */
1451 AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD21 pin */
1452 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */
1453 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
1454 };
1455 pinctrl_lcd_rgb777: lcd-rgb-3 {
1456 atmel,pins =
1457 /* LCDDAT0 conflicts with TMS */
1458 <AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
1459 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
1460 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
1461 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
1462 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
1463 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
1464 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
1465 /* LCDDAT8 conflicts with TCK */
1466 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
1467 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
1468 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
1469 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
1470 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
1471 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
1472 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
1473 /* LCDDAT16 conflicts with NTRST */
1474 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD17 pin */
1475 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD18 pin */
1476 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD19 pin */
1477 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD20 pin */
1478 AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD21 pin */
1479 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */
1480 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
1481 };
1482 pinctrl_lcd_rgb888: lcd-rgb-4 {
1483 atmel,pins =
1484 <AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD0 pin */
1485 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD1 pin */
1486 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD2 pin */
1487 AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD3 pin */
1488 AT91_PIOA 4 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD4 pin */
1489 AT91_PIOA 5 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD5 pin */
1490 AT91_PIOA 6 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD6 pin */
1491 AT91_PIOA 7 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD7 pin */
1492 AT91_PIOA 8 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD8 pin */
1493 AT91_PIOA 9 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD9 pin */
1494 AT91_PIOA 10 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD10 pin */
1495 AT91_PIOA 11 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD11 pin */
1496 AT91_PIOA 12 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD12 pin */
1497 AT91_PIOA 13 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD13 pin */
1498 AT91_PIOA 14 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD14 pin */
1499 AT91_PIOA 15 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD15 pin */
1500 AT91_PIOA 16 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD16 pin */
1501 AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD17 pin */
1502 AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD18 pin */
1503 AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD19 pin */
1504 AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD20 pin */
1505 AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD21 pin */
1506 AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */
1507 AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
1508 };
1509 };
1510
1201 macb0 { 1511 macb0 {
1202 pinctrl_macb0_rmii: macb0_rmii-0 { 1512 pinctrl_macb0_rmii: macb0_rmii-0 {
1203 atmel,pins = 1513 atmel,pins =
@@ -1281,6 +1591,38 @@
1281 }; 1591 };
1282 }; 1592 };
1283 1593
1594 ssc0 {
1595 pinctrl_ssc0_tx: ssc0_tx {
1596 atmel,pins =
1597 <AT91_PIOB 27 AT91_PERIPH_B AT91_PINCTRL_NONE /* TK0 */
1598 AT91_PIOB 31 AT91_PERIPH_B AT91_PINCTRL_NONE /* TF0 */
1599 AT91_PIOB 28 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TD0 */
1600 };
1601
1602 pinctrl_ssc0_rx: ssc0_rx {
1603 atmel,pins =
1604 <AT91_PIOB 26 AT91_PERIPH_B AT91_PINCTRL_NONE /* RK0 */
1605 AT91_PIOB 30 AT91_PERIPH_B AT91_PINCTRL_NONE /* RF0 */
1606 AT91_PIOB 29 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* RD0 */
1607 };
1608 };
1609
1610 ssc1 {
1611 pinctrl_ssc1_tx: ssc1_tx {
1612 atmel,pins =
1613 <AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE /* TK1 */
1614 AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE /* TF1 */
1615 AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* TD1 */
1616 };
1617
1618 pinctrl_ssc1_rx: ssc1_rx {
1619 atmel,pins =
1620 <AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE /* RK1 */
1621 AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE /* RF1 */
1622 AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* RD1 */
1623 };
1624 };
1625
1284 usart2 { 1626 usart2 {
1285 pinctrl_usart2: usart2-0 { 1627 pinctrl_usart2: usart2-0 {
1286 atmel,pins = 1628 atmel,pins =
diff --git a/arch/arm/boot/dts/sh7372-mackerel.dts b/arch/arm/boot/dts/sh7372-mackerel.dts
deleted file mode 100644
index a759a276c9a9..000000000000
--- a/arch/arm/boot/dts/sh7372-mackerel.dts
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Device Tree Source for the mackerel board
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/dts-v1/;
12#include "sh7372.dtsi"
13
14/ {
15 model = "Mackerel (AP4 EVM 2nd)";
16 compatible = "renesas,mackerel";
17
18 chosen {
19 bootargs = "console=tty0, console=ttySC0,115200 earlyprintk=sh-sci.0,115200 root=/dev/nfs nfsroot=,tcp,v3 ip=dhcp mem=240m rw";
20 };
21
22 memory {
23 device_type = "memory";
24 reg = <0x40000000 0x10000000>;
25 };
26};
diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi
deleted file mode 100644
index f863a10cb1b2..000000000000
--- a/arch/arm/boot/dts/sh7372.dtsi
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * Device Tree Source for the sh7372 SoC
3 *
4 * Copyright (C) 2012 Renesas Solutions Corp.
5 *
6 * This file is licensed under the terms of the GNU General Public License
7 * version 2. This program is licensed "as is" without any warranty of any
8 * kind, whether express or implied.
9 */
10
11/include/ "skeleton.dtsi"
12
13/ {
14 compatible = "renesas,sh7372";
15
16 cpus {
17 #address-cells = <1>;
18 #size-cells = <0>;
19
20 cpu@0 {
21 compatible = "arm,cortex-a8";
22 device_type = "cpu";
23 reg = <0x0>;
24 clock-frequency = <800000000>;
25 };
26 };
27
28 pfc: pfc@e6050000 {
29 compatible = "renesas,pfc-sh7372";
30 reg = <0xe6050000 0x8000>,
31 <0xe605801c 0x1c>;
32 gpio-controller;
33 #gpio-cells = <2>;
34 };
35};
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
deleted file mode 100644
index 6d32c87632d4..000000000000
--- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
+++ /dev/null
@@ -1,366 +0,0 @@
1/*
2 * Device Tree Source for the KZM-A9-GT board
3 *
4 * Copyright (C) 2012 Horms Solutions Ltd.
5 *
6 * Based on sh73a0-kzm9g.dts
7 * Copyright (C) 2012 Renesas Solutions Corp.
8 *
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
12 */
13
14/dts-v1/;
15#include "sh73a0.dtsi"
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/input/input.h>
18#include <dt-bindings/interrupt-controller/irq.h>
19
20/ {
21 model = "KZM-A9-GT";
22 compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
23
24 aliases {
25 serial4 = &scifa4;
26 };
27
28 cpus {
29 cpu@0 {
30 cpu0-supply = <&vdd_dvfs>;
31 operating-points = <
32 /* kHz uV */
33 1196000 1315000
34 598000 1175000
35 398667 1065000
36 >;
37 voltage-tolerance = <1>; /* 1% */
38 };
39 };
40
41 chosen {
42 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
43 stdout-path = &scifa4;
44 };
45
46 memory {
47 device_type = "memory";
48 reg = <0x41000000 0x1e800000>;
49 };
50
51 reg_1p8v: regulator@0 {
52 compatible = "regulator-fixed";
53 regulator-name = "fixed-1.8V";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
56 regulator-always-on;
57 regulator-boot-on;
58 };
59
60 reg_3p3v: regulator@1 {
61 compatible = "regulator-fixed";
62 regulator-name = "fixed-3.3V";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-always-on;
66 regulator-boot-on;
67 };
68
69 vmmc_sdhi0: regulator@2 {
70 compatible = "regulator-fixed";
71 regulator-name = "SDHI0 Vcc";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 gpio = <&pfc 15 GPIO_ACTIVE_HIGH>;
75 enable-active-high;
76 };
77
78 vmmc_sdhi2: regulator@3 {
79 compatible = "regulator-fixed";
80 regulator-name = "SDHI2 Vcc";
81 regulator-min-microvolt = <3300000>;
82 regulator-max-microvolt = <3300000>;
83 gpio = <&pfc 14 GPIO_ACTIVE_HIGH>;
84 enable-active-high;
85 };
86
87 lan9220@10000000 {
88 compatible = "smsc,lan9220", "smsc,lan9115";
89 reg = <0x10000000 0x100>;
90 phy-mode = "mii";
91 interrupt-parent = <&irqpin0>;
92 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
93 reg-io-width = <4>;
94 smsc,irq-push-pull;
95 smsc,save-mac-address;
96 vddvario-supply = <&reg_1p8v>;
97 vdd33a-supply = <&reg_3p3v>;
98 };
99
100 leds {
101 compatible = "gpio-leds";
102 led1 {
103 gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
104 label = "LED1";
105 };
106 led2 {
107 gpios = <&pfc 21 GPIO_ACTIVE_LOW>;
108 label = "LED2";
109 };
110 led3 {
111 gpios = <&pfc 22 GPIO_ACTIVE_LOW>;
112 label = "LED3";
113 };
114 led4 {
115 gpios = <&pfc 23 GPIO_ACTIVE_LOW>;
116 label = "LED4";
117 };
118 };
119
120 keyboard {
121 compatible = "gpio-keys";
122
123 back-key {
124 gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>;
125 linux,code = <KEY_BACK>;
126 label = "SW3";
127 };
128
129 right-key {
130 gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>;
131 linux,code = <KEY_RIGHT>;
132 label = "SW2-R";
133 };
134
135 left-key {
136 gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>;
137 linux,code = <KEY_LEFT>;
138 label = "SW2-L";
139 };
140
141 enter-key {
142 gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>;
143 linux,code = <KEY_ENTER>;
144 label = "SW2-P";
145 };
146
147 up-key {
148 gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>;
149 linux,code = <KEY_UP>;
150 label = "SW2-U";
151 };
152
153 down-key {
154 gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>;
155 linux,code = <KEY_DOWN>;
156 label = "SW2-D";
157 };
158
159 home-key {
160 gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
161 linux,code = <KEY_HOME>;
162 label = "SW1";
163 };
164 };
165
166 sound {
167 compatible = "simple-audio-card";
168 simple-audio-card,format = "left_j";
169 simple-audio-card,cpu {
170 sound-dai = <&sh_fsi2 0>;
171 };
172 simple-audio-card,codec {
173 sound-dai = <&ak4648>;
174 bitclock-master;
175 frame-master;
176 system-clock-frequency = <11289600>;
177 };
178 };
179};
180
181&cmt1 {
182 status = "okay";
183};
184
185&extal2_clk {
186 clock-frequency = <48000000>;
187};
188
189&i2c0 {
190 status = "okay";
191 as3711@40 {
192 compatible = "ams,as3711";
193 reg = <0x40>;
194
195 regulators {
196 vdd_dvfs: sd1 {
197 regulator-name = "1.315V CPU";
198 regulator-min-microvolt = <1050000>;
199 regulator-max-microvolt = <1350000>;
200 regulator-always-on;
201 regulator-boot-on;
202 };
203 sd2 {
204 regulator-name = "1.8V";
205 regulator-min-microvolt = <1800000>;
206 regulator-max-microvolt = <1800000>;
207 regulator-always-on;
208 regulator-boot-on;
209 };
210 sd4 {
211 regulator-name = "1.215V";
212 regulator-min-microvolt = <1215000>;
213 regulator-max-microvolt = <1235000>;
214 regulator-always-on;
215 regulator-boot-on;
216 };
217 ldo2 {
218 regulator-name = "2.8V CPU";
219 regulator-min-microvolt = <2800000>;
220 regulator-max-microvolt = <2800000>;
221 regulator-always-on;
222 regulator-boot-on;
223 };
224 ldo3 {
225 regulator-name = "3.0V CPU";
226 regulator-min-microvolt = <3000000>;
227 regulator-max-microvolt = <3000000>;
228 regulator-always-on;
229 regulator-boot-on;
230 };
231 ldo4 {
232 regulator-name = "2.8V";
233 regulator-min-microvolt = <2800000>;
234 regulator-max-microvolt = <2800000>;
235 regulator-always-on;
236 regulator-boot-on;
237 };
238 ldo5 {
239 regulator-name = "2.8V #2";
240 regulator-min-microvolt = <2800000>;
241 regulator-max-microvolt = <2800000>;
242 regulator-always-on;
243 regulator-boot-on;
244 };
245 ldo7 {
246 regulator-name = "1.15V CPU";
247 regulator-min-microvolt = <1150000>;
248 regulator-max-microvolt = <1150000>;
249 regulator-always-on;
250 regulator-boot-on;
251 };
252 ldo8 {
253 regulator-name = "1.15V CPU #2";
254 regulator-min-microvolt = <1150000>;
255 regulator-max-microvolt = <1150000>;
256 regulator-always-on;
257 regulator-boot-on;
258 };
259 };
260 };
261
262 ak4648: ak4648@12 {
263 #sound-dai-cells = <0>;
264 compatible = "asahi-kasei,ak4648";
265 reg = <0x12>;
266 };
267};
268
269&i2c3 {
270 pinctrl-0 = <&i2c3_pins>;
271 pinctrl-names = "default";
272 status = "okay";
273
274 pcf8575: gpio@20 {
275 compatible = "nxp,pcf8575";
276 reg = <0x20>;
277 interrupt-parent = <&irqpin2>;
278 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
279 gpio-controller;
280 #gpio-cells = <2>;
281 interrupt-controller;
282 #interrupt-cells = <2>;
283 };
284};
285
286&mmcif {
287 pinctrl-0 = <&mmcif_pins>;
288 pinctrl-names = "default";
289
290 bus-width = <8>;
291 vmmc-supply = <&reg_1p8v>;
292 status = "okay";
293};
294
295&pfc {
296 i2c3_pins: i2c3 {
297 renesas,groups = "i2c3_1";
298 renesas,function = "i2c3";
299 };
300
301 mmcif_pins: mmc {
302 mux {
303 renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
304 renesas,function = "mmc0";
305 };
306 cfg {
307 renesas,groups = "mmc0_data8_0";
308 renesas,pins = "PORT279";
309 bias-pull-up;
310 };
311 };
312
313 scifa4_pins: serial4 {
314 renesas,groups = "scifa4_data", "scifa4_ctrl";
315 renesas,function = "scifa4";
316 };
317
318 sdhi0_pins: sd0 {
319 renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp";
320 renesas,function = "sdhi0";
321 };
322
323 sdhi2_pins: sd2 {
324 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
325 renesas,function = "sdhi2";
326 };
327
328 fsia_pins: sounda {
329 renesas,groups = "fsia_mclk_in", "fsia_sclk_in",
330 "fsia_data_in", "fsia_data_out";
331 renesas,function = "fsia";
332 };
333};
334
335&scifa4 {
336 pinctrl-0 = <&scifa4_pins>;
337 pinctrl-names = "default";
338
339 status = "okay";
340};
341
342&sdhi0 {
343 pinctrl-0 = <&sdhi0_pins>;
344 pinctrl-names = "default";
345
346 vmmc-supply = <&vmmc_sdhi0>;
347 bus-width = <4>;
348 status = "okay";
349};
350
351&sdhi2 {
352 pinctrl-0 = <&sdhi2_pins>;
353 pinctrl-names = "default";
354
355 vmmc-supply = <&vmmc_sdhi2>;
356 bus-width = <4>;
357 broken-cd;
358 status = "okay";
359};
360
361&sh_fsi2 {
362 pinctrl-0 = <&fsia_pins>;
363 pinctrl-names = "default";
364
365 status = "okay";
366};
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g.dts b/arch/arm/boot/dts/sh73a0-kzm9g.dts
index 27c5f426d172..022ba505f573 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g.dts
@@ -1,6 +1,9 @@
1/* 1/*
2 * Device Tree Source for the KZM-A9-GT board 2 * Device Tree Source for the KZM-A9-GT board
3 * 3 *
4 * Copyright (C) 2012 Horms Solutions Ltd.
5 *
6 * Based on sh73a0-kzm9g.dts
4 * Copyright (C) 2012 Renesas Solutions Corp. 7 * Copyright (C) 2012 Renesas Solutions Corp.
5 * 8 *
6 * This file is licensed under the terms of the GNU General Public License 9 * This file is licensed under the terms of the GNU General Public License
@@ -10,17 +13,388 @@
10 13
11/dts-v1/; 14/dts-v1/;
12#include "sh73a0.dtsi" 15#include "sh73a0.dtsi"
16#include <dt-bindings/gpio/gpio.h>
17#include <dt-bindings/input/input.h>
18#include <dt-bindings/interrupt-controller/irq.h>
13 19
14/ { 20/ {
15 model = "KZM-A9-GT"; 21 model = "KZM-A9-GT";
16 compatible = "renesas,kzm9g", "renesas,sh73a0"; 22 compatible = "renesas,kzm9g", "renesas,sh73a0";
17 23
24 aliases {
25 serial4 = &scifa4;
26 };
27
28 cpus {
29 cpu@0 {
30 cpu0-supply = <&vdd_dvfs>;
31 operating-points = <
32 /* kHz uV */
33 1196000 1315000
34 598000 1175000
35 398667 1065000
36 >;
37 voltage-tolerance = <1>; /* 1% */
38 };
39 };
40
18 chosen { 41 chosen {
19 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel earlyprintk=sh-sci.4,115200 rw"; 42 bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
43 stdout-path = &scifa4;
20 }; 44 };
21 45
22 memory { 46 memory {
23 device_type = "memory"; 47 device_type = "memory";
24 reg = <0x41000000 0x1e800000>; 48 reg = <0x40000000 0x20000000>;
49 };
50
51 reg_1p8v: regulator@0 {
52 compatible = "regulator-fixed";
53 regulator-name = "fixed-1.8V";
54 regulator-min-microvolt = <1800000>;
55 regulator-max-microvolt = <1800000>;
56 regulator-always-on;
57 regulator-boot-on;
58 };
59
60 reg_3p3v: regulator@1 {
61 compatible = "regulator-fixed";
62 regulator-name = "fixed-3.3V";
63 regulator-min-microvolt = <3300000>;
64 regulator-max-microvolt = <3300000>;
65 regulator-always-on;
66 regulator-boot-on;
67 };
68
69 vmmc_sdhi0: regulator@2 {
70 compatible = "regulator-fixed";
71 regulator-name = "SDHI0 Vcc";
72 regulator-min-microvolt = <3300000>;
73 regulator-max-microvolt = <3300000>;
74 gpio = <&pfc 15 GPIO_ACTIVE_HIGH>;
75 enable-active-high;
76 };
77
78 vmmc_sdhi2: regulator@3 {
79 compatible = "regulator-fixed";
80 regulator-name = "SDHI2 Vcc";
81 regulator-min-microvolt = <3300000>;
82 regulator-max-microvolt = <3300000>;
83 gpio = <&pfc 14 GPIO_ACTIVE_HIGH>;
84 enable-active-high;
85 };
86
87 leds {
88 compatible = "gpio-leds";
89 led1 {
90 gpios = <&pfc 20 GPIO_ACTIVE_LOW>;
91 label = "LED1";
92 };
93 led2 {
94 gpios = <&pfc 21 GPIO_ACTIVE_LOW>;
95 label = "LED2";
96 };
97 led3 {
98 gpios = <&pfc 22 GPIO_ACTIVE_LOW>;
99 label = "LED3";
100 };
101 led4 {
102 gpios = <&pfc 23 GPIO_ACTIVE_LOW>;
103 label = "LED4";
104 };
105 };
106
107 keyboard {
108 compatible = "gpio-keys";
109
110 back-key {
111 gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>;
112 linux,code = <KEY_BACK>;
113 label = "SW3";
114 };
115
116 right-key {
117 gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>;
118 linux,code = <KEY_RIGHT>;
119 label = "SW2-R";
120 };
121
122 left-key {
123 gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>;
124 linux,code = <KEY_LEFT>;
125 label = "SW2-L";
126 };
127
128 enter-key {
129 gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>;
130 linux,code = <KEY_ENTER>;
131 label = "SW2-P";
132 };
133
134 up-key {
135 gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>;
136 linux,code = <KEY_UP>;
137 label = "SW2-U";
138 };
139
140 down-key {
141 gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>;
142 linux,code = <KEY_DOWN>;
143 label = "SW2-D";
144 };
145
146 home-key {
147 gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
148 linux,code = <KEY_HOME>;
149 label = "SW1";
150 };
151 };
152
153 sound {
154 compatible = "simple-audio-card";
155 simple-audio-card,format = "left_j";
156 simple-audio-card,cpu {
157 sound-dai = <&sh_fsi2 0>;
158 };
159 simple-audio-card,codec {
160 sound-dai = <&ak4648>;
161 bitclock-master;
162 frame-master;
163 system-clock-frequency = <11289600>;
164 };
165 };
166};
167
168&bsc {
169 ethernet@10000000 {
170 compatible = "smsc,lan9220", "smsc,lan9115";
171 reg = <0x10000000 0x100>;
172 phy-mode = "mii";
173 interrupt-parent = <&irqpin0>;
174 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
175 reg-io-width = <4>;
176 smsc,irq-push-pull;
177 smsc,save-mac-address;
178 vddvario-supply = <&reg_1p8v>;
179 vdd33a-supply = <&reg_3p3v>;
180 };
181};
182
183&cmt1 {
184 status = "okay";
185};
186
187&extal2_clk {
188 clock-frequency = <48000000>;
189};
190
191&i2c0 {
192 status = "okay";
193
194 compass@c {
195 compatible = "asahi-kasei,ak8975";
196 reg = <0x0c>;
197 interrupt-parent = <&irqpin3>;
198 interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
199 };
200
201 ak4648: codec@12 {
202 compatible = "asahi-kasei,ak4648";
203 reg = <0x12>;
204 #sound-dai-cells = <0>;
205 };
206
207 accelerometer@1d {
208 compatible = "adi,adxl34x";
209 reg = <0x1d>;
210 interrupt-parent = <&irqpin3>;
211 interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
212 <3 IRQ_TYPE_LEVEL_HIGH>;
25 }; 213 };
214
215 rtc@32 {
216 compatible = "ricoh,r2025sd";
217 reg = <0x32>;
218 };
219
220 as3711@40 {
221 compatible = "ams,as3711";
222 reg = <0x40>;
223
224 regulators {
225 vdd_dvfs: sd1 {
226 regulator-name = "1.315V CPU";
227 regulator-min-microvolt = <1050000>;
228 regulator-max-microvolt = <1350000>;
229 regulator-always-on;
230 regulator-boot-on;
231 };
232 sd2 {
233 regulator-name = "1.8V";
234 regulator-min-microvolt = <1800000>;
235 regulator-max-microvolt = <1800000>;
236 regulator-always-on;
237 regulator-boot-on;
238 };
239 sd4 {
240 regulator-name = "1.215V";
241 regulator-min-microvolt = <1215000>;
242 regulator-max-microvolt = <1235000>;
243 regulator-always-on;
244 regulator-boot-on;
245 };
246 ldo2 {
247 regulator-name = "2.8V CPU";
248 regulator-min-microvolt = <2800000>;
249 regulator-max-microvolt = <2800000>;
250 regulator-always-on;
251 regulator-boot-on;
252 };
253 ldo3 {
254 regulator-name = "3.0V CPU";
255 regulator-min-microvolt = <3000000>;
256 regulator-max-microvolt = <3000000>;
257 regulator-always-on;
258 regulator-boot-on;
259 };
260 ldo4 {
261 regulator-name = "2.8V";
262 regulator-min-microvolt = <2800000>;
263 regulator-max-microvolt = <2800000>;
264 regulator-always-on;
265 regulator-boot-on;
266 };
267 ldo5 {
268 regulator-name = "2.8V #2";
269 regulator-min-microvolt = <2800000>;
270 regulator-max-microvolt = <2800000>;
271 regulator-always-on;
272 regulator-boot-on;
273 };
274 ldo7 {
275 regulator-name = "1.15V CPU";
276 regulator-min-microvolt = <1150000>;
277 regulator-max-microvolt = <1150000>;
278 regulator-always-on;
279 regulator-boot-on;
280 };
281 ldo8 {
282 regulator-name = "1.15V CPU #2";
283 regulator-min-microvolt = <1150000>;
284 regulator-max-microvolt = <1150000>;
285 regulator-always-on;
286 regulator-boot-on;
287 };
288 };
289 };
290};
291
292&i2c1 {
293 status = "okay";
294
295 touchscreen@55 {
296 compatible = "sitronix,st1232";
297 reg = <0x55>;
298 interrupt-parent = <&irqpin1>;
299 interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
300 };
301};
302
303&i2c3 {
304 pinctrl-0 = <&i2c3_pins>;
305 pinctrl-names = "default";
306 status = "okay";
307
308 pcf8575: gpio@20 {
309 compatible = "nxp,pcf8575";
310 reg = <0x20>;
311 interrupt-parent = <&irqpin2>;
312 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
313 gpio-controller;
314 #gpio-cells = <2>;
315 interrupt-controller;
316 #interrupt-cells = <2>;
317 };
318};
319
320&mmcif {
321 pinctrl-0 = <&mmcif_pins>;
322 pinctrl-names = "default";
323
324 bus-width = <8>;
325 vmmc-supply = <&reg_1p8v>;
326 status = "okay";
327};
328
329&pfc {
330 i2c3_pins: i2c3 {
331 renesas,groups = "i2c3_1";
332 renesas,function = "i2c3";
333 };
334
335 mmcif_pins: mmc {
336 mux {
337 renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
338 renesas,function = "mmc0";
339 };
340 cfg {
341 renesas,groups = "mmc0_data8_0";
342 renesas,pins = "PORT279";
343 bias-pull-up;
344 };
345 };
346
347 scifa4_pins: serial4 {
348 renesas,groups = "scifa4_data", "scifa4_ctrl";
349 renesas,function = "scifa4";
350 };
351
352 sdhi0_pins: sd0 {
353 renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp";
354 renesas,function = "sdhi0";
355 };
356
357 sdhi2_pins: sd2 {
358 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
359 renesas,function = "sdhi2";
360 };
361
362 fsia_pins: sounda {
363 renesas,groups = "fsia_mclk_in", "fsia_sclk_in",
364 "fsia_data_in", "fsia_data_out";
365 renesas,function = "fsia";
366 };
367};
368
369&scifa4 {
370 pinctrl-0 = <&scifa4_pins>;
371 pinctrl-names = "default";
372
373 status = "okay";
374};
375
376&sdhi0 {
377 pinctrl-0 = <&sdhi0_pins>;
378 pinctrl-names = "default";
379
380 vmmc-supply = <&vmmc_sdhi0>;
381 bus-width = <4>;
382 status = "okay";
383};
384
385&sdhi2 {
386 pinctrl-0 = <&sdhi2_pins>;
387 pinctrl-names = "default";
388
389 vmmc-supply = <&vmmc_sdhi2>;
390 bus-width = <4>;
391 broken-cd;
392 status = "okay";
393};
394
395&sh_fsi2 {
396 pinctrl-0 = <&fsia_pins>;
397 pinctrl-names = "default";
398
399 status = "okay";
26}; 400};
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index 2dfd5b44255d..45b539ce4d35 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -11,6 +11,7 @@
11/include/ "skeleton.dtsi" 11/include/ "skeleton.dtsi"
12 12
13#include <dt-bindings/clock/sh73a0-clock.h> 13#include <dt-bindings/clock/sh73a0-clock.h>
14#include <dt-bindings/interrupt-controller/arm-gic.h>
14#include <dt-bindings/interrupt-controller/irq.h> 15#include <dt-bindings/interrupt-controller/irq.h>
15 16
16/ { 17/ {
@@ -26,15 +27,24 @@
26 compatible = "arm,cortex-a9"; 27 compatible = "arm,cortex-a9";
27 reg = <0>; 28 reg = <0>;
28 clock-frequency = <1196000000>; 29 clock-frequency = <1196000000>;
30 power-domains = <&pd_a2sl>;
29 }; 31 };
30 cpu@1 { 32 cpu@1 {
31 device_type = "cpu"; 33 device_type = "cpu";
32 compatible = "arm,cortex-a9"; 34 compatible = "arm,cortex-a9";
33 reg = <1>; 35 reg = <1>;
34 clock-frequency = <1196000000>; 36 clock-frequency = <1196000000>;
37 power-domains = <&pd_a2sl>;
35 }; 38 };
36 }; 39 };
37 40
41 timer@f0000600 {
42 compatible = "arm,cortex-a9-twd-timer";
43 reg = <0xf0000600 0x20>;
44 interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
45 clocks = <&twd_clk>;
46 };
47
38 gic: interrupt-controller@f0001000 { 48 gic: interrupt-controller@f0001000 {
39 compatible = "arm,cortex-a9-gic"; 49 compatible = "arm,cortex-a9-gic";
40 #interrupt-cells = <3>; 50 #interrupt-cells = <3>;
@@ -49,6 +59,7 @@
49 interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>, 59 interrupts = <0 37 IRQ_TYPE_LEVEL_HIGH>,
50 <0 38 IRQ_TYPE_LEVEL_HIGH>; 60 <0 38 IRQ_TYPE_LEVEL_HIGH>;
51 interrupt-names = "sec", "temp"; 61 interrupt-names = "sec", "temp";
62 power-domains = <&pd_a4bc1>;
52 }; 63 };
53 64
54 sbsc1: memory-controller@fe400000 { 65 sbsc1: memory-controller@fe400000 {
@@ -57,6 +68,7 @@
57 interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>, 68 interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>,
58 <0 36 IRQ_TYPE_LEVEL_HIGH>; 69 <0 36 IRQ_TYPE_LEVEL_HIGH>;
59 interrupt-names = "sec", "temp"; 70 interrupt-names = "sec", "temp";
71 power-domains = <&pd_a4bc0>;
60 }; 72 };
61 73
62 pmu { 74 pmu {
@@ -69,11 +81,12 @@
69 compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48"; 81 compatible = "renesas,cmt-48-sh73a0", "renesas,cmt-48";
70 reg = <0xe6138000 0x200>; 82 reg = <0xe6138000 0x200>;
71 interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>; 83 interrupts = <0 65 IRQ_TYPE_LEVEL_HIGH>;
84 clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
85 clock-names = "fck";
86 power-domains = <&pd_c5>;
72 87
73 renesas,channels-mask = <0x3f>; 88 renesas,channels-mask = <0x3f>;
74 89
75 clocks = <&mstp3_clks SH73A0_CLK_CMT1>;
76 clock-names = "fck";
77 status = "disabled"; 90 status = "disabled";
78 }; 91 };
79 92
@@ -94,6 +107,9 @@
94 0 6 IRQ_TYPE_LEVEL_HIGH 107 0 6 IRQ_TYPE_LEVEL_HIGH
95 0 7 IRQ_TYPE_LEVEL_HIGH 108 0 7 IRQ_TYPE_LEVEL_HIGH
96 0 8 IRQ_TYPE_LEVEL_HIGH>; 109 0 8 IRQ_TYPE_LEVEL_HIGH>;
110 clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
111 power-domains = <&pd_a4s>;
112 control-parent;
97 }; 113 };
98 114
99 irqpin1: irqpin@e6900004 { 115 irqpin1: irqpin@e6900004 {
@@ -113,6 +129,8 @@
113 0 14 IRQ_TYPE_LEVEL_HIGH 129 0 14 IRQ_TYPE_LEVEL_HIGH
114 0 15 IRQ_TYPE_LEVEL_HIGH 130 0 15 IRQ_TYPE_LEVEL_HIGH
115 0 16 IRQ_TYPE_LEVEL_HIGH>; 131 0 16 IRQ_TYPE_LEVEL_HIGH>;
132 clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
133 power-domains = <&pd_a4s>;
116 control-parent; 134 control-parent;
117 }; 135 };
118 136
@@ -133,6 +151,9 @@
133 0 22 IRQ_TYPE_LEVEL_HIGH 151 0 22 IRQ_TYPE_LEVEL_HIGH
134 0 23 IRQ_TYPE_LEVEL_HIGH 152 0 23 IRQ_TYPE_LEVEL_HIGH
135 0 24 IRQ_TYPE_LEVEL_HIGH>; 153 0 24 IRQ_TYPE_LEVEL_HIGH>;
154 clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
155 power-domains = <&pd_a4s>;
156 control-parent;
136 }; 157 };
137 158
138 irqpin3: irqpin@e690000c { 159 irqpin3: irqpin@e690000c {
@@ -152,6 +173,9 @@
152 0 30 IRQ_TYPE_LEVEL_HIGH 173 0 30 IRQ_TYPE_LEVEL_HIGH
153 0 31 IRQ_TYPE_LEVEL_HIGH 174 0 31 IRQ_TYPE_LEVEL_HIGH
154 0 32 IRQ_TYPE_LEVEL_HIGH>; 175 0 32 IRQ_TYPE_LEVEL_HIGH>;
176 clocks = <&mstp5_clks SH73A0_CLK_INTCA0>;
177 power-domains = <&pd_a4s>;
178 control-parent;
155 }; 179 };
156 180
157 i2c0: i2c@e6820000 { 181 i2c0: i2c@e6820000 {
@@ -164,6 +188,7 @@
164 0 169 IRQ_TYPE_LEVEL_HIGH 188 0 169 IRQ_TYPE_LEVEL_HIGH
165 0 170 IRQ_TYPE_LEVEL_HIGH>; 189 0 170 IRQ_TYPE_LEVEL_HIGH>;
166 clocks = <&mstp1_clks SH73A0_CLK_IIC0>; 190 clocks = <&mstp1_clks SH73A0_CLK_IIC0>;
191 power-domains = <&pd_a3sp>;
167 status = "disabled"; 192 status = "disabled";
168 }; 193 };
169 194
@@ -177,6 +202,7 @@
177 0 53 IRQ_TYPE_LEVEL_HIGH 202 0 53 IRQ_TYPE_LEVEL_HIGH
178 0 54 IRQ_TYPE_LEVEL_HIGH>; 203 0 54 IRQ_TYPE_LEVEL_HIGH>;
179 clocks = <&mstp3_clks SH73A0_CLK_IIC1>; 204 clocks = <&mstp3_clks SH73A0_CLK_IIC1>;
205 power-domains = <&pd_a3sp>;
180 status = "disabled"; 206 status = "disabled";
181 }; 207 };
182 208
@@ -190,6 +216,7 @@
190 0 173 IRQ_TYPE_LEVEL_HIGH 216 0 173 IRQ_TYPE_LEVEL_HIGH
191 0 174 IRQ_TYPE_LEVEL_HIGH>; 217 0 174 IRQ_TYPE_LEVEL_HIGH>;
192 clocks = <&mstp0_clks SH73A0_CLK_IIC2>; 218 clocks = <&mstp0_clks SH73A0_CLK_IIC2>;
219 power-domains = <&pd_a3sp>;
193 status = "disabled"; 220 status = "disabled";
194 }; 221 };
195 222
@@ -203,6 +230,7 @@
203 0 185 IRQ_TYPE_LEVEL_HIGH 230 0 185 IRQ_TYPE_LEVEL_HIGH
204 0 186 IRQ_TYPE_LEVEL_HIGH>; 231 0 186 IRQ_TYPE_LEVEL_HIGH>;
205 clocks = <&mstp4_clks SH73A0_CLK_IIC3>; 232 clocks = <&mstp4_clks SH73A0_CLK_IIC3>;
233 power-domains = <&pd_a3sp>;
206 status = "disabled"; 234 status = "disabled";
207 }; 235 };
208 236
@@ -216,6 +244,7 @@
216 0 189 IRQ_TYPE_LEVEL_HIGH 244 0 189 IRQ_TYPE_LEVEL_HIGH
217 0 190 IRQ_TYPE_LEVEL_HIGH>; 245 0 190 IRQ_TYPE_LEVEL_HIGH>;
218 clocks = <&mstp4_clks SH73A0_CLK_IIC4>; 246 clocks = <&mstp4_clks SH73A0_CLK_IIC4>;
247 power-domains = <&pd_c5>;
219 status = "disabled"; 248 status = "disabled";
220 }; 249 };
221 250
@@ -225,6 +254,7 @@
225 interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH 254 interrupts = <0 140 IRQ_TYPE_LEVEL_HIGH
226 0 141 IRQ_TYPE_LEVEL_HIGH>; 255 0 141 IRQ_TYPE_LEVEL_HIGH>;
227 clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>; 256 clocks = <&mstp3_clks SH73A0_CLK_MMCIF0>;
257 power-domains = <&pd_a3sp>;
228 reg-io-width = <4>; 258 reg-io-width = <4>;
229 status = "disabled"; 259 status = "disabled";
230 }; 260 };
@@ -236,6 +266,7 @@
236 0 84 IRQ_TYPE_LEVEL_HIGH 266 0 84 IRQ_TYPE_LEVEL_HIGH
237 0 85 IRQ_TYPE_LEVEL_HIGH>; 267 0 85 IRQ_TYPE_LEVEL_HIGH>;
238 clocks = <&mstp3_clks SH73A0_CLK_SDHI0>; 268 clocks = <&mstp3_clks SH73A0_CLK_SDHI0>;
269 power-domains = <&pd_a3sp>;
239 cap-sd-highspeed; 270 cap-sd-highspeed;
240 status = "disabled"; 271 status = "disabled";
241 }; 272 };
@@ -247,6 +278,7 @@
247 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH 278 interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH
248 0 89 IRQ_TYPE_LEVEL_HIGH>; 279 0 89 IRQ_TYPE_LEVEL_HIGH>;
249 clocks = <&mstp3_clks SH73A0_CLK_SDHI1>; 280 clocks = <&mstp3_clks SH73A0_CLK_SDHI1>;
281 power-domains = <&pd_a3sp>;
250 toshiba,mmc-wrprotect-disable; 282 toshiba,mmc-wrprotect-disable;
251 cap-sd-highspeed; 283 cap-sd-highspeed;
252 status = "disabled"; 284 status = "disabled";
@@ -258,6 +290,7 @@
258 interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH 290 interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH
259 0 105 IRQ_TYPE_LEVEL_HIGH>; 291 0 105 IRQ_TYPE_LEVEL_HIGH>;
260 clocks = <&mstp3_clks SH73A0_CLK_SDHI2>; 292 clocks = <&mstp3_clks SH73A0_CLK_SDHI2>;
293 power-domains = <&pd_a3sp>;
261 toshiba,mmc-wrprotect-disable; 294 toshiba,mmc-wrprotect-disable;
262 cap-sd-highspeed; 295 cap-sd-highspeed;
263 status = "disabled"; 296 status = "disabled";
@@ -269,6 +302,7 @@
269 interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>; 302 interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
270 clocks = <&mstp2_clks SH73A0_CLK_SCIFA0>; 303 clocks = <&mstp2_clks SH73A0_CLK_SCIFA0>;
271 clock-names = "sci_ick"; 304 clock-names = "sci_ick";
305 power-domains = <&pd_a3sp>;
272 status = "disabled"; 306 status = "disabled";
273 }; 307 };
274 308
@@ -278,6 +312,7 @@
278 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>; 312 interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
279 clocks = <&mstp2_clks SH73A0_CLK_SCIFA1>; 313 clocks = <&mstp2_clks SH73A0_CLK_SCIFA1>;
280 clock-names = "sci_ick"; 314 clock-names = "sci_ick";
315 power-domains = <&pd_a3sp>;
281 status = "disabled"; 316 status = "disabled";
282 }; 317 };
283 318
@@ -287,6 +322,7 @@
287 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>; 322 interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
288 clocks = <&mstp2_clks SH73A0_CLK_SCIFA2>; 323 clocks = <&mstp2_clks SH73A0_CLK_SCIFA2>;
289 clock-names = "sci_ick"; 324 clock-names = "sci_ick";
325 power-domains = <&pd_a3sp>;
290 status = "disabled"; 326 status = "disabled";
291 }; 327 };
292 328
@@ -296,6 +332,7 @@
296 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>; 332 interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
297 clocks = <&mstp2_clks SH73A0_CLK_SCIFA3>; 333 clocks = <&mstp2_clks SH73A0_CLK_SCIFA3>;
298 clock-names = "sci_ick"; 334 clock-names = "sci_ick";
335 power-domains = <&pd_a3sp>;
299 status = "disabled"; 336 status = "disabled";
300 }; 337 };
301 338
@@ -305,6 +342,7 @@
305 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>; 342 interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
306 clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>; 343 clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
307 clock-names = "sci_ick"; 344 clock-names = "sci_ick";
345 power-domains = <&pd_a3sp>;
308 status = "disabled"; 346 status = "disabled";
309 }; 347 };
310 348
@@ -314,6 +352,7 @@
314 interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>; 352 interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
315 clocks = <&mstp2_clks SH73A0_CLK_SCIFA5>; 353 clocks = <&mstp2_clks SH73A0_CLK_SCIFA5>;
316 clock-names = "sci_ick"; 354 clock-names = "sci_ick";
355 power-domains = <&pd_a3sp>;
317 status = "disabled"; 356 status = "disabled";
318 }; 357 };
319 358
@@ -323,6 +362,7 @@
323 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; 362 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
324 clocks = <&mstp3_clks SH73A0_CLK_SCIFA6>; 363 clocks = <&mstp3_clks SH73A0_CLK_SCIFA6>;
325 clock-names = "sci_ick"; 364 clock-names = "sci_ick";
365 power-domains = <&pd_a3sp>;
326 status = "disabled"; 366 status = "disabled";
327 }; 367 };
328 368
@@ -332,6 +372,7 @@
332 interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>; 372 interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
333 clocks = <&mstp2_clks SH73A0_CLK_SCIFA7>; 373 clocks = <&mstp2_clks SH73A0_CLK_SCIFA7>;
334 clock-names = "sci_ick"; 374 clock-names = "sci_ick";
375 power-domains = <&pd_a3sp>;
335 status = "disabled"; 376 status = "disabled";
336 }; 377 };
337 378
@@ -341,6 +382,7 @@
341 interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>; 382 interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
342 clocks = <&mstp2_clks SH73A0_CLK_SCIFB>; 383 clocks = <&mstp2_clks SH73A0_CLK_SCIFB>;
343 clock-names = "sci_ick"; 384 clock-names = "sci_ick";
385 power-domains = <&pd_a3sp>;
344 status = "disabled"; 386 status = "disabled";
345 }; 387 };
346 388
@@ -359,6 +401,117 @@
359 <&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>, 401 <&irqpin2 4 0>, <&irqpin2 5 0>, <&irqpin2 6 0>, <&irqpin2 7 0>,
360 <&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>, 402 <&irqpin3 0 0>, <&irqpin3 1 0>, <&irqpin3 2 0>, <&irqpin3 3 0>,
361 <&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>; 403 <&irqpin3 4 0>, <&irqpin3 5 0>, <&irqpin3 6 0>, <&irqpin3 7 0>;
404 power-domains = <&pd_c5>;
405 };
406
407 sysc: system-controller@e6180000 {
408 compatible = "renesas,sysc-sh73a0", "renesas,sysc-rmobile";
409 reg = <0xe6180000 0x8000>, <0xe6188000 0x8000>;
410
411 pm-domains {
412 pd_c5: c5 {
413 #address-cells = <1>;
414 #size-cells = <0>;
415 #power-domain-cells = <0>;
416
417 pd_c4: c4@0 {
418 reg = <0>;
419 #power-domain-cells = <0>;
420 };
421
422 pd_d4: d4@1 {
423 reg = <1>;
424 #power-domain-cells = <0>;
425 };
426
427 pd_a4bc0: a4bc0@4 {
428 reg = <4>;
429 #power-domain-cells = <0>;
430 };
431
432 pd_a4bc1: a4bc1@5 {
433 reg = <5>;
434 #power-domain-cells = <0>;
435 };
436
437 pd_a4lc0: a4lc0@6 {
438 reg = <6>;
439 #power-domain-cells = <0>;
440 };
441
442 pd_a4lc1: a4lc1@7 {
443 reg = <7>;
444 #power-domain-cells = <0>;
445 };
446
447 pd_a4mp: a4mp@8 {
448 reg = <8>;
449 #address-cells = <1>;
450 #size-cells = <0>;
451 #power-domain-cells = <0>;
452
453 pd_a3mp: a3mp@9 {
454 reg = <9>;
455 #power-domain-cells = <0>;
456 };
457
458 pd_a3vc: a3vc@10 {
459 reg = <10>;
460 #power-domain-cells = <0>;
461 };
462 };
463
464 pd_a4rm: a4rm@12 {
465 reg = <12>;
466 #address-cells = <1>;
467 #size-cells = <0>;
468 #power-domain-cells = <0>;
469
470 pd_a3r: a3r@13 {
471 reg = <13>;
472 #address-cells = <1>;
473 #size-cells = <0>;
474 #power-domain-cells = <0>;
475
476 pd_a2rv: a2rv@14 {
477 reg = <14>;
478 #address-cells = <1>;
479 #size-cells = <0>;
480 #power-domain-cells = <0>;
481 };
482 };
483 };
484
485 pd_a4s: a4s@16 {
486 reg = <16>;
487 #address-cells = <1>;
488 #size-cells = <0>;
489 #power-domain-cells = <0>;
490
491 pd_a3sp: a3sp@17 {
492 reg = <17>;
493 #power-domain-cells = <0>;
494 };
495
496 pd_a3sg: a3sg@18 {
497 reg = <18>;
498 #power-domain-cells = <0>;
499 };
500
501 pd_a3sm: a3sm@19 {
502 reg = <19>;
503 #address-cells = <1>;
504 #size-cells = <0>;
505 #power-domain-cells = <0>;
506
507 pd_a2sl: a2sl@20 {
508 reg = <20>;
509 #power-domain-cells = <0>;
510 };
511 };
512 };
513 };
514 };
362 }; 515 };
363 516
364 sh_fsi2: sound@ec230000 { 517 sh_fsi2: sound@ec230000 {
@@ -366,9 +519,22 @@
366 compatible = "renesas,fsi2-sh73a0", "renesas,sh_fsi2"; 519 compatible = "renesas,fsi2-sh73a0", "renesas,sh_fsi2";
367 reg = <0xec230000 0x400>; 520 reg = <0xec230000 0x400>;
368 interrupts = <0 146 0x4>; 521 interrupts = <0 146 0x4>;
522 power-domains = <&pd_a4mp>;
369 status = "disabled"; 523 status = "disabled";
370 }; 524 };
371 525
526 bsc: bus@fec10000 {
527 compatible = "renesas,bsc-sh73a0", "renesas,bsc",
528 "simple-pm-bus";
529 #address-cells = <1>;
530 #size-cells = <1>;
531 ranges = <0 0 0x20000000>;
532 reg = <0xfec10000 0x400>;
533 interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
534 clocks = <&zb_clk>;
535 power-domains = <&pd_a4s>;
536 };
537
372 clocks { 538 clocks {
373 #address-cells = <1>; 539 #address-cells = <1>;
374 #size-cells = <1>; 540 #size-cells = <1>;
@@ -426,133 +592,159 @@
426 vclk1_clk: vclk1_clk@e6150008 { 592 vclk1_clk: vclk1_clk@e6150008 {
427 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 593 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
428 reg = <0xe6150008 4>; 594 reg = <0xe6150008 4>;
429 clocks = <&pll1_div2_clk>; 595 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
596 <&extcki_clk>, <&extal2_clk>, <&main_div2_clk>,
597 <&extalr_clk>, <&cpg_clocks SH73A0_CLK_MAIN>,
598 <0>;
430 #clock-cells = <0>; 599 #clock-cells = <0>;
431 clock-output-names = "vclk1"; 600 clock-output-names = "vclk1";
432 }; 601 };
433 vclk2_clk: vclk2_clk@e615000c { 602 vclk2_clk: vclk2_clk@e615000c {
434 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 603 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
435 reg = <0xe615000c 4>; 604 reg = <0xe615000c 4>;
436 clocks = <&pll1_div2_clk>; 605 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
606 <&extcki_clk>, <&extal2_clk>, <&main_div2_clk>,
607 <&extalr_clk>, <&cpg_clocks SH73A0_CLK_MAIN>,
608 <0>;
437 #clock-cells = <0>; 609 #clock-cells = <0>;
438 clock-output-names = "vclk2"; 610 clock-output-names = "vclk2";
439 }; 611 };
440 vclk3_clk: vclk3_clk@e615001c { 612 vclk3_clk: vclk3_clk@e615001c {
441 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 613 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
442 reg = <0xe615001c 4>; 614 reg = <0xe615001c 4>;
443 clocks = <&pll1_div2_clk>; 615 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
616 <&extcki_clk>, <&extal2_clk>, <&main_div2_clk>,
617 <&extalr_clk>, <&cpg_clocks SH73A0_CLK_MAIN>,
618 <0>;
444 #clock-cells = <0>; 619 #clock-cells = <0>;
445 clock-output-names = "vclk3"; 620 clock-output-names = "vclk3";
446 }; 621 };
447 zb_clk: zb_clk@e6150010 { 622 zb_clk: zb_clk@e6150010 {
448 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 623 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
449 reg = <0xe6150010 4>; 624 reg = <0xe6150010 4>;
450 clocks = <&pll1_div2_clk>; 625 clocks = <&pll1_div2_clk>, <0>,
626 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
451 #clock-cells = <0>; 627 #clock-cells = <0>;
452 clock-output-names = "zb"; 628 clock-output-names = "zb";
453 }; 629 };
454 flctl_clk: flctl_clk@e6150014 { 630 flctl_clk: flctl_clk@e6150014 {
455 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 631 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
456 reg = <0xe6150014 4>; 632 reg = <0xe6150014 4>;
457 clocks = <&pll1_div2_clk>; 633 clocks = <&pll1_div2_clk>, <0>,
634 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
458 #clock-cells = <0>; 635 #clock-cells = <0>;
459 clock-output-names = "flctlck"; 636 clock-output-names = "flctlck";
460 }; 637 };
461 sdhi0_clk: sdhi0_clk@e6150074 { 638 sdhi0_clk: sdhi0_clk@e6150074 {
462 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 639 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
463 reg = <0xe6150074 4>; 640 reg = <0xe6150074 4>;
464 clocks = <&pll1_div2_clk>; 641 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
642 <&pll1_div13_clk>, <0>;
465 #clock-cells = <0>; 643 #clock-cells = <0>;
466 clock-output-names = "sdhi0ck"; 644 clock-output-names = "sdhi0ck";
467 }; 645 };
468 sdhi1_clk: sdhi1_clk@e6150078 { 646 sdhi1_clk: sdhi1_clk@e6150078 {
469 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 647 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
470 reg = <0xe6150078 4>; 648 reg = <0xe6150078 4>;
471 clocks = <&pll1_div2_clk>; 649 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
650 <&pll1_div13_clk>, <0>;
472 #clock-cells = <0>; 651 #clock-cells = <0>;
473 clock-output-names = "sdhi1ck"; 652 clock-output-names = "sdhi1ck";
474 }; 653 };
475 sdhi2_clk: sdhi2_clk@e615007c { 654 sdhi2_clk: sdhi2_clk@e615007c {
476 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 655 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
477 reg = <0xe615007c 4>; 656 reg = <0xe615007c 4>;
478 clocks = <&pll1_div2_clk>; 657 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
658 <&pll1_div13_clk>, <0>;
479 #clock-cells = <0>; 659 #clock-cells = <0>;
480 clock-output-names = "sdhi2ck"; 660 clock-output-names = "sdhi2ck";
481 }; 661 };
482 fsia_clk: fsia_clk@e6150018 { 662 fsia_clk: fsia_clk@e6150018 {
483 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 663 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
484 reg = <0xe6150018 4>; 664 reg = <0xe6150018 4>;
485 clocks = <&pll1_div2_clk>; 665 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
666 <&fsiack_clk>, <&fsiack_clk>;
486 #clock-cells = <0>; 667 #clock-cells = <0>;
487 clock-output-names = "fsia"; 668 clock-output-names = "fsia";
488 }; 669 };
489 fsib_clk: fsib_clk@e6150090 { 670 fsib_clk: fsib_clk@e6150090 {
490 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 671 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
491 reg = <0xe6150090 4>; 672 reg = <0xe6150090 4>;
492 clocks = <&pll1_div2_clk>; 673 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
674 <&fsibck_clk>, <&fsibck_clk>;
493 #clock-cells = <0>; 675 #clock-cells = <0>;
494 clock-output-names = "fsib"; 676 clock-output-names = "fsib";
495 }; 677 };
496 sub_clk: sub_clk@e6150080 { 678 sub_clk: sub_clk@e6150080 {
497 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 679 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
498 reg = <0xe6150080 4>; 680 reg = <0xe6150080 4>;
499 clocks = <&extal2_clk>; 681 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
682 <&extal2_clk>, <&extal2_clk>;
500 #clock-cells = <0>; 683 #clock-cells = <0>;
501 clock-output-names = "sub"; 684 clock-output-names = "sub";
502 }; 685 };
503 spua_clk: spua_clk@e6150084 { 686 spua_clk: spua_clk@e6150084 {
504 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 687 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
505 reg = <0xe6150084 4>; 688 reg = <0xe6150084 4>;
506 clocks = <&pll1_div2_clk>; 689 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
690 <&extal2_clk>, <&extal2_clk>;
507 #clock-cells = <0>; 691 #clock-cells = <0>;
508 clock-output-names = "spua"; 692 clock-output-names = "spua";
509 }; 693 };
510 spuv_clk: spuv_clk@e6150094 { 694 spuv_clk: spuv_clk@e6150094 {
511 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 695 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
512 reg = <0xe6150094 4>; 696 reg = <0xe6150094 4>;
513 clocks = <&pll1_div2_clk>; 697 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
698 <&extal2_clk>, <&extal2_clk>;
514 #clock-cells = <0>; 699 #clock-cells = <0>;
515 clock-output-names = "spuv"; 700 clock-output-names = "spuv";
516 }; 701 };
517 msu_clk: msu_clk@e6150088 { 702 msu_clk: msu_clk@e6150088 {
518 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 703 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
519 reg = <0xe6150088 4>; 704 reg = <0xe6150088 4>;
520 clocks = <&pll1_div2_clk>; 705 clocks = <&pll1_div2_clk>, <0>,
706 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
521 #clock-cells = <0>; 707 #clock-cells = <0>;
522 clock-output-names = "msu"; 708 clock-output-names = "msu";
523 }; 709 };
524 hsi_clk: hsi_clk@e615008c { 710 hsi_clk: hsi_clk@e615008c {
525 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 711 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
526 reg = <0xe615008c 4>; 712 reg = <0xe615008c 4>;
527 clocks = <&pll1_div2_clk>; 713 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
714 <&pll1_div7_clk>, <0>;
528 #clock-cells = <0>; 715 #clock-cells = <0>;
529 clock-output-names = "hsi"; 716 clock-output-names = "hsi";
530 }; 717 };
531 mfg1_clk: mfg1_clk@e6150098 { 718 mfg1_clk: mfg1_clk@e6150098 {
532 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 719 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
533 reg = <0xe6150098 4>; 720 reg = <0xe6150098 4>;
534 clocks = <&pll1_div2_clk>; 721 clocks = <&pll1_div2_clk>, <0>,
722 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
535 #clock-cells = <0>; 723 #clock-cells = <0>;
536 clock-output-names = "mfg1"; 724 clock-output-names = "mfg1";
537 }; 725 };
538 mfg2_clk: mfg2_clk@e615009c { 726 mfg2_clk: mfg2_clk@e615009c {
539 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 727 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
540 reg = <0xe615009c 4>; 728 reg = <0xe615009c 4>;
541 clocks = <&pll1_div2_clk>; 729 clocks = <&pll1_div2_clk>, <0>,
730 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
542 #clock-cells = <0>; 731 #clock-cells = <0>;
543 clock-output-names = "mfg2"; 732 clock-output-names = "mfg2";
544 }; 733 };
545 dsit_clk: dsit_clk@e6150060 { 734 dsit_clk: dsit_clk@e6150060 {
546 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 735 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
547 reg = <0xe6150060 4>; 736 reg = <0xe6150060 4>;
548 clocks = <&pll1_div2_clk>; 737 clocks = <&pll1_div2_clk>, <0>,
738 <&cpg_clocks SH73A0_CLK_PLL2>, <0>;
549 #clock-cells = <0>; 739 #clock-cells = <0>;
550 clock-output-names = "dsit"; 740 clock-output-names = "dsit";
551 }; 741 };
552 dsi0p_clk: dsi0p_clk@e6150064 { 742 dsi0p_clk: dsi0p_clk@e6150064 {
553 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock"; 743 compatible = "renesas,sh73a0-div6-clock", "renesas,cpg-div6-clock";
554 reg = <0xe6150064 4>; 744 reg = <0xe6150064 4>;
555 clocks = <&pll1_div2_clk>; 745 clocks = <&pll1_div2_clk>, <&cpg_clocks SH73A0_CLK_PLL2>,
746 <&cpg_clocks SH73A0_CLK_MAIN>, <&extal2_clk>,
747 <&extcki_clk>, <0>, <0>, <0>;
556 #clock-cells = <0>; 748 #clock-cells = <0>;
557 clock-output-names = "dsi0pck"; 749 clock-output-names = "dsi0pck";
558 }; 750 };
@@ -695,5 +887,16 @@
695 clock-output-names = 887 clock-output-names =
696 "iic3", "iic4", "keysc"; 888 "iic3", "iic4", "keysc";
697 }; 889 };
890 mstp5_clks: mstp5_clks@e6150144 {
891 compatible = "renesas,sh73a0-mstp-clocks", "renesas,cpg-mstp-clocks";
892 reg = <0xe6150144 4>, <0xe615003c 4>;
893 clocks = <&cpg_clocks SH73A0_CLK_HP>;
894 #clock-cells = <1>;
895 clock-indices = <
896 SH73A0_CLK_INTCA0
897 >;
898 clock-output-names =
899 "intca0";
900 };
698 }; 901 };
699}; 902};
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
new file mode 100644
index 000000000000..2c5cede686dc
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1-emc.dtsi
@@ -0,0 +1,2421 @@
1/ {
2 clock@0,60006000 {
3 emc-timings-3 {
4 nvidia,ram-code = <3>;
5
6 timing-12750000 {
7 clock-frequency = <12750000>;
8 nvidia,parent-clock-frequency = <408000000>;
9 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
10 clock-names = "emc-parent";
11 };
12 timing-20400000 {
13 clock-frequency = <20400000>;
14 nvidia,parent-clock-frequency = <408000000>;
15 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
16 clock-names = "emc-parent";
17 };
18 timing-40800000 {
19 clock-frequency = <40800000>;
20 nvidia,parent-clock-frequency = <408000000>;
21 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
22 clock-names = "emc-parent";
23 };
24 timing-68000000 {
25 clock-frequency = <68000000>;
26 nvidia,parent-clock-frequency = <408000000>;
27 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
28 clock-names = "emc-parent";
29 };
30 timing-102000000 {
31 clock-frequency = <102000000>;
32 nvidia,parent-clock-frequency = <408000000>;
33 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
34 clock-names = "emc-parent";
35 };
36 timing-204000000 {
37 clock-frequency = <204000000>;
38 nvidia,parent-clock-frequency = <408000000>;
39 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
40 clock-names = "emc-parent";
41 };
42 timing-300000000 {
43 clock-frequency = <300000000>;
44 nvidia,parent-clock-frequency = <600000000>;
45 clocks = <&tegra_car TEGRA124_CLK_PLL_C>;
46 clock-names = "emc-parent";
47 };
48 timing-396000000 {
49 clock-frequency = <396000000>;
50 nvidia,parent-clock-frequency = <792000000>;
51 clocks = <&tegra_car TEGRA124_CLK_PLL_M>;
52 clock-names = "emc-parent";
53 };
54 timing-528000000 {
55 clock-frequency = <528000000>;
56 nvidia,parent-clock-frequency = <528000000>;
57 clocks = <&tegra_car TEGRA124_CLK_PLL_M_UD>;
58 clock-names = "emc-parent";
59 };
60 timing-600000000 {
61 clock-frequency = <600000000>;
62 nvidia,parent-clock-frequency = <600000000>;
63 clocks = <&tegra_car TEGRA124_CLK_PLL_C_UD>;
64 clock-names = "emc-parent";
65 };
66 timing-792000000 {
67 clock-frequency = <792000000>;
68 nvidia,parent-clock-frequency = <792000000>;
69 clocks = <&tegra_car TEGRA124_CLK_PLL_M_UD>;
70 clock-names = "emc-parent";
71 };
72 timing-924000000 {
73 clock-frequency = <924000000>;
74 nvidia,parent-clock-frequency = <924000000>;
75 clocks = <&tegra_car TEGRA124_CLK_PLL_M_UD>;
76 clock-names = "emc-parent";
77 };
78 };
79 };
80
81 emc@0,7001b000 {
82 emc-timings-3 {
83 nvidia,ram-code = <3>;
84
85 timing-12750000 {
86 clock-frequency = <12750000>;
87
88 nvidia,emc-auto-cal-config = <0xa1430000>;
89 nvidia,emc-auto-cal-config2 = <0x00000000>;
90 nvidia,emc-auto-cal-config3 = <0x00000000>;
91 nvidia,emc-auto-cal-interval = <0x001fffff>;
92 nvidia,emc-bgbias-ctl0 = <0x00000008>;
93 nvidia,emc-cfg = <0x73240000>;
94 nvidia,emc-cfg-2 = <0x000008c5>;
95 nvidia,emc-ctt-term-ctrl = <0x00000802>;
96 nvidia,emc-mode-1 = <0x80100003>;
97 nvidia,emc-mode-2 = <0x80200008>;
98 nvidia,emc-mode-4 = <0x00000000>;
99 nvidia,emc-mode-reset = <0x80001221>;
100 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
101 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
102 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
103 nvidia,emc-zcal-cnt-long = <0x00000042>;
104 nvidia,emc-zcal-interval = <0x00000000>;
105
106 nvidia,emc-configuration = <
107 0x00000000
108 0x00000003
109 0x00000000
110 0x00000000
111 0x00000000
112 0x00000004
113 0x0000000a
114 0x00000005
115 0x0000000b
116 0x00000000
117 0x00000000
118 0x00000003
119 0x00000003
120 0x00000000
121 0x00000006
122 0x00000006
123 0x00000006
124 0x00000002
125 0x00000000
126 0x00000005
127 0x00000005
128 0x00010000
129 0x00000003
130 0x00000000
131 0x00000000
132 0x00000000
133 0x00000000
134 0x00000004
135 0x0000000c
136 0x0000000d
137 0x0000000f
138 0x00000060
139 0x00000000
140 0x00000018
141 0x00000002
142 0x00000002
143 0x00000001
144 0x00000000
145 0x00000007
146 0x0000000f
147 0x00000005
148 0x00000005
149 0x00000004
150 0x00000005
151 0x00000004
152 0x00000000
153 0x00000000
154 0x00000005
155 0x00000005
156 0x00000064
157 0x00000000
158 0x00000000
159 0x00000000
160 0x106aa298
161 0x002c00a0
162 0x00008000
163 0x00080000
164 0x00080000
165 0x00080000
166 0x00080000
167 0x00080000
168 0x00080000
169 0x00080000
170 0x00080000
171 0x00080000
172 0x00080000
173 0x00080000
174 0x00080000
175 0x00080000
176 0x00080000
177 0x00080000
178 0x00080000
179 0x00000000
180 0x00000000
181 0x00000000
182 0x00000000
183 0x00000000
184 0x00000000
185 0x00000000
186 0x00000000
187 0x00000000
188 0x00000000
189 0x00000000
190 0x00000000
191 0x00000000
192 0x00000000
193 0x00000000
194 0x00000000
195 0x00000000
196 0x00000000
197 0x00000000
198 0x00000000
199 0x00000000
200 0x00000000
201 0x00000000
202 0x00000000
203 0x00000000
204 0x00000000
205 0x00000000
206 0x00000000
207 0x00000000
208 0x00000000
209 0x00000000
210 0x00000000
211 0x00000000
212 0x00000000
213 0x00000000
214 0x00000000
215 0x00000000
216 0x00000000
217 0x000fc000
218 0x000fc000
219 0x000fc000
220 0x000fc000
221 0x0000fc00
222 0x0000fc00
223 0x0000fc00
224 0x0000fc00
225 0x10000280
226 0x00000000
227 0x00111111
228 0x00000000
229 0x00000000
230 0x77ffc081
231 0x00000e0e
232 0x81f1f108
233 0x07070004
234 0x0000003f
235 0x016eeeee
236 0x51451400
237 0x00514514
238 0x00514514
239 0x51451400
240 0x0000003f
241 0x00000007
242 0x00000000
243 0x00000042
244 0x000e000e
245 0x00000000
246 0x00000003
247 0x0000f2f3
248 0x800001c5
249 0x0000000a
250 >;
251 };
252
253 timing-20400000 {
254 clock-frequency = <20400000>;
255
256 nvidia,emc-auto-cal-config = <0xa1430000>;
257 nvidia,emc-auto-cal-config2 = <0x00000000>;
258 nvidia,emc-auto-cal-config3 = <0x00000000>;
259 nvidia,emc-auto-cal-interval = <0x001fffff>;
260 nvidia,emc-bgbias-ctl0 = <0x00000008>;
261 nvidia,emc-cfg = <0x73240000>;
262 nvidia,emc-cfg-2 = <0x000008c5>;
263 nvidia,emc-ctt-term-ctrl = <0x00000802>;
264 nvidia,emc-mode-1 = <0x80100003>;
265 nvidia,emc-mode-2 = <0x80200008>;
266 nvidia,emc-mode-4 = <0x00000000>;
267 nvidia,emc-mode-reset = <0x80001221>;
268 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
269 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
270 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
271 nvidia,emc-zcal-cnt-long = <0x00000042>;
272 nvidia,emc-zcal-interval = <0x00000000>;
273
274 nvidia,emc-configuration = <
275 0x00000000
276 0x00000005
277 0x00000000
278 0x00000000
279 0x00000000
280 0x00000004
281 0x0000000a
282 0x00000005
283 0x0000000b
284 0x00000000
285 0x00000000
286 0x00000003
287 0x00000003
288 0x00000000
289 0x00000006
290 0x00000006
291 0x00000006
292 0x00000002
293 0x00000000
294 0x00000005
295 0x00000005
296 0x00010000
297 0x00000003
298 0x00000000
299 0x00000000
300 0x00000000
301 0x00000000
302 0x00000004
303 0x0000000c
304 0x0000000d
305 0x0000000f
306 0x0000009a
307 0x00000000
308 0x00000026
309 0x00000002
310 0x00000002
311 0x00000001
312 0x00000000
313 0x00000007
314 0x0000000f
315 0x00000006
316 0x00000006
317 0x00000004
318 0x00000005
319 0x00000004
320 0x00000000
321 0x00000000
322 0x00000005
323 0x00000005
324 0x000000a0
325 0x00000000
326 0x00000000
327 0x00000000
328 0x106aa298
329 0x002c00a0
330 0x00008000
331 0x00080000
332 0x00080000
333 0x00080000
334 0x00080000
335 0x00080000
336 0x00080000
337 0x00080000
338 0x00080000
339 0x00080000
340 0x00080000
341 0x00080000
342 0x00080000
343 0x00080000
344 0x00080000
345 0x00080000
346 0x00080000
347 0x00000000
348 0x00000000
349 0x00000000
350 0x00000000
351 0x00000000
352 0x00000000
353 0x00000000
354 0x00000000
355 0x00000000
356 0x00000000
357 0x00000000
358 0x00000000
359 0x00000000
360 0x00000000
361 0x00000000
362 0x00000000
363 0x00000000
364 0x00000000
365 0x00000000
366 0x00000000
367 0x00000000
368 0x00000000
369 0x00000000
370 0x00000000
371 0x00000000
372 0x00000000
373 0x00000000
374 0x00000000
375 0x00000000
376 0x00000000
377 0x00000000
378 0x00000000
379 0x00000000
380 0x00000000
381 0x00000000
382 0x00000000
383 0x00000000
384 0x00000000
385 0x000fc000
386 0x000fc000
387 0x000fc000
388 0x000fc000
389 0x0000fc00
390 0x0000fc00
391 0x0000fc00
392 0x0000fc00
393 0x10000280
394 0x00000000
395 0x00111111
396 0x00000000
397 0x00000000
398 0x77ffc081
399 0x00000e0e
400 0x81f1f108
401 0x07070004
402 0x0000003f
403 0x016eeeee
404 0x51451400
405 0x00514514
406 0x00514514
407 0x51451400
408 0x0000003f
409 0x0000000b
410 0x00000000
411 0x00000042
412 0x000e000e
413 0x00000000
414 0x00000003
415 0x0000f2f3
416 0x8000023a
417 0x0000000a
418 >;
419 };
420
421 timing-40800000 {
422 clock-frequency = <40800000>;
423
424 nvidia,emc-auto-cal-config = <0xa1430000>;
425 nvidia,emc-auto-cal-config2 = <0x00000000>;
426 nvidia,emc-auto-cal-config3 = <0x00000000>;
427 nvidia,emc-auto-cal-interval = <0x001fffff>;
428 nvidia,emc-bgbias-ctl0 = <0x00000008>;
429 nvidia,emc-cfg = <0x73240000>;
430 nvidia,emc-cfg-2 = <0x000008c5>;
431 nvidia,emc-ctt-term-ctrl = <0x00000802>;
432 nvidia,emc-mode-1 = <0x80100003>;
433 nvidia,emc-mode-2 = <0x80200008>;
434 nvidia,emc-mode-4 = <0x00000000>;
435 nvidia,emc-mode-reset = <0x80001221>;
436 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
437 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
438 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
439 nvidia,emc-zcal-cnt-long = <0x00000042>;
440 nvidia,emc-zcal-interval = <0x00000000>;
441
442 nvidia,emc-configuration = <
443 0x00000001
444 0x0000000a
445 0x00000000
446 0x00000001
447 0x00000000
448 0x00000004
449 0x0000000a
450 0x00000005
451 0x0000000b
452 0x00000000
453 0x00000000
454 0x00000003
455 0x00000003
456 0x00000000
457 0x00000006
458 0x00000006
459 0x00000006
460 0x00000002
461 0x00000000
462 0x00000005
463 0x00000005
464 0x00010000
465 0x00000003
466 0x00000000
467 0x00000000
468 0x00000000
469 0x00000000
470 0x00000004
471 0x0000000c
472 0x0000000d
473 0x0000000f
474 0x00000134
475 0x00000000
476 0x0000004d
477 0x00000002
478 0x00000002
479 0x00000001
480 0x00000000
481 0x00000008
482 0x0000000f
483 0x0000000c
484 0x0000000c
485 0x00000004
486 0x00000005
487 0x00000004
488 0x00000000
489 0x00000000
490 0x00000005
491 0x00000005
492 0x0000013f
493 0x00000000
494 0x00000000
495 0x00000000
496 0x106aa298
497 0x002c00a0
498 0x00008000
499 0x00080000
500 0x00080000
501 0x00080000
502 0x00080000
503 0x00080000
504 0x00080000
505 0x00080000
506 0x00080000
507 0x00080000
508 0x00080000
509 0x00080000
510 0x00080000
511 0x00080000
512 0x00080000
513 0x00080000
514 0x00080000
515 0x00000000
516 0x00000000
517 0x00000000
518 0x00000000
519 0x00000000
520 0x00000000
521 0x00000000
522 0x00000000
523 0x00000000
524 0x00000000
525 0x00000000
526 0x00000000
527 0x00000000
528 0x00000000
529 0x00000000
530 0x00000000
531 0x00000000
532 0x00000000
533 0x00000000
534 0x00000000
535 0x00000000
536 0x00000000
537 0x00000000
538 0x00000000
539 0x00000000
540 0x00000000
541 0x00000000
542 0x00000000
543 0x00000000
544 0x00000000
545 0x00000000
546 0x00000000
547 0x00000000
548 0x00000000
549 0x00000000
550 0x00000000
551 0x00000000
552 0x00000000
553 0x000fc000
554 0x000fc000
555 0x000fc000
556 0x000fc000
557 0x0000fc00
558 0x0000fc00
559 0x0000fc00
560 0x0000fc00
561 0x10000280
562 0x00000000
563 0x00111111
564 0x00000000
565 0x00000000
566 0x77ffc081
567 0x00000e0e
568 0x81f1f108
569 0x07070004
570 0x0000003f
571 0x016eeeee
572 0x51451400
573 0x00514514
574 0x00514514
575 0x51451400
576 0x0000003f
577 0x00000015
578 0x00000000
579 0x00000042
580 0x000e000e
581 0x00000000
582 0x00000003
583 0x0000f2f3
584 0x80000370
585 0x0000000a
586 >;
587 };
588
589 timing-68000000 {
590 clock-frequency = <68000000>;
591
592 nvidia,emc-auto-cal-config = <0xa1430000>;
593 nvidia,emc-auto-cal-config2 = <0x00000000>;
594 nvidia,emc-auto-cal-config3 = <0x00000000>;
595 nvidia,emc-auto-cal-interval = <0x001fffff>;
596 nvidia,emc-bgbias-ctl0 = <0x00000008>;
597 nvidia,emc-cfg = <0x73240000>;
598 nvidia,emc-cfg-2 = <0x000008c5>;
599 nvidia,emc-ctt-term-ctrl = <0x00000802>;
600 nvidia,emc-mode-1 = <0x80100003>;
601 nvidia,emc-mode-2 = <0x80200008>;
602 nvidia,emc-mode-4 = <0x00000000>;
603 nvidia,emc-mode-reset = <0x80001221>;
604 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
605 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
606 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
607 nvidia,emc-zcal-cnt-long = <0x00000042>;
608 nvidia,emc-zcal-interval = <0x00000000>;
609
610 nvidia,emc-configuration = <
611 0x00000003
612 0x00000011
613 0x00000000
614 0x00000002
615 0x00000000
616 0x00000004
617 0x0000000a
618 0x00000005
619 0x0000000b
620 0x00000000
621 0x00000000
622 0x00000003
623 0x00000003
624 0x00000000
625 0x00000006
626 0x00000006
627 0x00000006
628 0x00000002
629 0x00000000
630 0x00000005
631 0x00000005
632 0x00010000
633 0x00000003
634 0x00000000
635 0x00000000
636 0x00000000
637 0x00000000
638 0x00000004
639 0x0000000c
640 0x0000000d
641 0x0000000f
642 0x00000202
643 0x00000000
644 0x00000080
645 0x00000002
646 0x00000002
647 0x00000001
648 0x00000000
649 0x0000000f
650 0x0000000f
651 0x00000013
652 0x00000013
653 0x00000004
654 0x00000005
655 0x00000004
656 0x00000001
657 0x00000000
658 0x00000005
659 0x00000005
660 0x00000213
661 0x00000000
662 0x00000000
663 0x00000000
664 0x106aa298
665 0x002c00a0
666 0x00008000
667 0x00080000
668 0x00080000
669 0x00080000
670 0x00080000
671 0x00080000
672 0x00080000
673 0x00080000
674 0x00080000
675 0x00080000
676 0x00080000
677 0x00080000
678 0x00080000
679 0x00080000
680 0x00080000
681 0x00080000
682 0x00080000
683 0x00000000
684 0x00000000
685 0x00000000
686 0x00000000
687 0x00000000
688 0x00000000
689 0x00000000
690 0x00000000
691 0x00000000
692 0x00000000
693 0x00000000
694 0x00000000
695 0x00000000
696 0x00000000
697 0x00000000
698 0x00000000
699 0x00000000
700 0x00000000
701 0x00000000
702 0x00000000
703 0x00000000
704 0x00000000
705 0x00000000
706 0x00000000
707 0x00000000
708 0x00000000
709 0x00000000
710 0x00000000
711 0x00000000
712 0x00000000
713 0x00000000
714 0x00000000
715 0x00000000
716 0x00000000
717 0x00000000
718 0x00000000
719 0x00000000
720 0x00000000
721 0x000fc000
722 0x000fc000
723 0x000fc000
724 0x000fc000
725 0x0000fc00
726 0x0000fc00
727 0x0000fc00
728 0x0000fc00
729 0x10000280
730 0x00000000
731 0x00111111
732 0x00000000
733 0x00000000
734 0x77ffc081
735 0x00000e0e
736 0x81f1f108
737 0x07070004
738 0x0000003f
739 0x016eeeee
740 0x51451400
741 0x00514514
742 0x00514514
743 0x51451400
744 0x0000003f
745 0x00000022
746 0x00000000
747 0x00000042
748 0x000e000e
749 0x00000000
750 0x00000003
751 0x0000f2f3
752 0x8000050e
753 0x0000000a
754 >;
755 };
756
757 timing-102000000 {
758 clock-frequency = <102000000>;
759
760 nvidia,emc-auto-cal-config = <0xa1430000>;
761 nvidia,emc-auto-cal-config2 = <0x00000000>;
762 nvidia,emc-auto-cal-config3 = <0x00000000>;
763 nvidia,emc-auto-cal-interval = <0x001fffff>;
764 nvidia,emc-bgbias-ctl0 = <0x00000008>;
765 nvidia,emc-cfg = <0x73240000>;
766 nvidia,emc-cfg-2 = <0x000008c5>;
767 nvidia,emc-ctt-term-ctrl = <0x00000802>;
768 nvidia,emc-mode-1 = <0x80100003>;
769 nvidia,emc-mode-2 = <0x80200008>;
770 nvidia,emc-mode-4 = <0x00000000>;
771 nvidia,emc-mode-reset = <0x80001221>;
772 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
773 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
774 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
775 nvidia,emc-zcal-cnt-long = <0x00000042>;
776 nvidia,emc-zcal-interval = <0x00000000>;
777
778 nvidia,emc-configuration = <
779 0x00000004
780 0x0000001a
781 0x00000000
782 0x00000003
783 0x00000001
784 0x00000004
785 0x0000000a
786 0x00000005
787 0x0000000b
788 0x00000001
789 0x00000001
790 0x00000003
791 0x00000003
792 0x00000000
793 0x00000006
794 0x00000006
795 0x00000006
796 0x00000002
797 0x00000000
798 0x00000005
799 0x00000005
800 0x00010000
801 0x00000003
802 0x00000000
803 0x00000000
804 0x00000000
805 0x00000000
806 0x00000004
807 0x0000000c
808 0x0000000d
809 0x0000000f
810 0x00000304
811 0x00000000
812 0x000000c1
813 0x00000002
814 0x00000002
815 0x00000001
816 0x00000000
817 0x00000018
818 0x0000000f
819 0x0000001c
820 0x0000001c
821 0x00000004
822 0x00000005
823 0x00000004
824 0x00000002
825 0x00000000
826 0x00000005
827 0x00000005
828 0x0000031c
829 0x00000000
830 0x00000000
831 0x00000000
832 0x106aa298
833 0x002c00a0
834 0x00008000
835 0x00080000
836 0x00080000
837 0x00080000
838 0x00080000
839 0x00080000
840 0x00080000
841 0x00080000
842 0x00080000
843 0x00080000
844 0x00080000
845 0x00080000
846 0x00080000
847 0x00080000
848 0x00080000
849 0x00080000
850 0x00080000
851 0x00000000
852 0x00000000
853 0x00000000
854 0x00000000
855 0x00000000
856 0x00000000
857 0x00000000
858 0x00000000
859 0x00000000
860 0x00000000
861 0x00000000
862 0x00000000
863 0x00000000
864 0x00000000
865 0x00000000
866 0x00000000
867 0x00000000
868 0x00000000
869 0x00000000
870 0x00000000
871 0x00000000
872 0x00000000
873 0x00000000
874 0x00000000
875 0x00000000
876 0x00000000
877 0x00000000
878 0x00000000
879 0x00000000
880 0x00000000
881 0x00000000
882 0x00000000
883 0x00000000
884 0x00000000
885 0x00000000
886 0x00000000
887 0x00000000
888 0x00000000
889 0x000fc000
890 0x000fc000
891 0x000fc000
892 0x000fc000
893 0x0000fc00
894 0x0000fc00
895 0x0000fc00
896 0x0000fc00
897 0x10000280
898 0x00000000
899 0x00111111
900 0x00000000
901 0x00000000
902 0x77ffc081
903 0x00000e0e
904 0x81f1f108
905 0x07070004
906 0x0000003f
907 0x016eeeee
908 0x51451400
909 0x00514514
910 0x00514514
911 0x51451400
912 0x0000003f
913 0x00000033
914 0x00000000
915 0x00000042
916 0x000e000e
917 0x00000000
918 0x00000003
919 0x0000f2f3
920 0x80000713
921 0x0000000a
922 >;
923 };
924
925 timing-204000000 {
926 clock-frequency = <204000000>;
927
928 nvidia,emc-auto-cal-config = <0xa1430000>;
929 nvidia,emc-auto-cal-config2 = <0x00000000>;
930 nvidia,emc-auto-cal-config3 = <0x00000000>;
931 nvidia,emc-auto-cal-interval = <0x001fffff>;
932 nvidia,emc-bgbias-ctl0 = <0x00000008>;
933 nvidia,emc-cfg = <0x73240000>;
934 nvidia,emc-cfg-2 = <0x000008cd>;
935 nvidia,emc-ctt-term-ctrl = <0x00000802>;
936 nvidia,emc-mode-1 = <0x80100003>;
937 nvidia,emc-mode-2 = <0x80200008>;
938 nvidia,emc-mode-4 = <0x00000000>;
939 nvidia,emc-mode-reset = <0x80001221>;
940 nvidia,emc-mrs-wait-cnt = <0x000e000e>;
941 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
942 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
943 nvidia,emc-zcal-cnt-long = <0x00000042>;
944 nvidia,emc-zcal-interval = <0x00020000>;
945
946 nvidia,emc-configuration = <
947 0x00000009
948 0x00000035
949 0x00000000
950 0x00000006
951 0x00000002
952 0x00000005
953 0x0000000a
954 0x00000005
955 0x0000000b
956 0x00000002
957 0x00000002
958 0x00000003
959 0x00000003
960 0x00000000
961 0x00000005
962 0x00000005
963 0x00000006
964 0x00000002
965 0x00000000
966 0x00000004
967 0x00000006
968 0x00010000
969 0x00000003
970 0x00000000
971 0x00000000
972 0x00000000
973 0x00000000
974 0x00000003
975 0x0000000d
976 0x0000000f
977 0x00000011
978 0x00000607
979 0x00000000
980 0x00000181
981 0x00000002
982 0x00000002
983 0x00000001
984 0x00000000
985 0x00000032
986 0x0000000f
987 0x00000038
988 0x00000038
989 0x00000004
990 0x00000005
991 0x00000004
992 0x00000006
993 0x00000000
994 0x00000005
995 0x00000005
996 0x00000638
997 0x00000000
998 0x00000000
999 0x00000000
1000 0x106aa298
1001 0x002c00a0
1002 0x00008000
1003 0x00080000
1004 0x00080000
1005 0x00080000
1006 0x00080000
1007 0x00080000
1008 0x00080000
1009 0x00080000
1010 0x00080000
1011 0x00080000
1012 0x00080000
1013 0x00080000
1014 0x00080000
1015 0x00080000
1016 0x00080000
1017 0x00080000
1018 0x00080000
1019 0x00000000
1020 0x00000000
1021 0x00000000
1022 0x00000000
1023 0x00000000
1024 0x00000000
1025 0x00000000
1026 0x00000000
1027 0x00000000
1028 0x00000000
1029 0x00008000
1030 0x00000000
1031 0x00000000
1032 0x00008000
1033 0x00000000
1034 0x00000000
1035 0x00000000
1036 0x00000000
1037 0x00000000
1038 0x00000000
1039 0x00000000
1040 0x00000000
1041 0x00000000
1042 0x00000000
1043 0x00000000
1044 0x00000000
1045 0x00000000
1046 0x00000000
1047 0x00000000
1048 0x00000000
1049 0x00000000
1050 0x00000000
1051 0x00000000
1052 0x00000000
1053 0x00000000
1054 0x00000000
1055 0x00000000
1056 0x00000000
1057 0x00090000
1058 0x00090000
1059 0x00090000
1060 0x00090000
1061 0x00009000
1062 0x00009000
1063 0x00009000
1064 0x00009000
1065 0x10000280
1066 0x00000000
1067 0x00111111
1068 0x00000000
1069 0x00000000
1070 0x77ffc081
1071 0x00000707
1072 0x81f1f108
1073 0x07070004
1074 0x0000003f
1075 0x016eeeee
1076 0x51451400
1077 0x00514514
1078 0x00514514
1079 0x51451400
1080 0x0000003f
1081 0x00000066
1082 0x00000000
1083 0x00000100
1084 0x000e000e
1085 0x00000000
1086 0x00000003
1087 0x0000d2b3
1088 0x80000d22
1089 0x0000000a
1090 >;
1091 };
1092
1093 timing-300000000 {
1094 clock-frequency = <300000000>;
1095
1096 nvidia,emc-auto-cal-config = <0xa1430000>;
1097 nvidia,emc-auto-cal-config2 = <0x00000000>;
1098 nvidia,emc-auto-cal-config3 = <0x00000000>;
1099 nvidia,emc-auto-cal-interval = <0x001fffff>;
1100 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1101 nvidia,emc-cfg = <0x73340000>;
1102 nvidia,emc-cfg-2 = <0x000008d5>;
1103 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1104 nvidia,emc-mode-1 = <0x80100002>;
1105 nvidia,emc-mode-2 = <0x80200000>;
1106 nvidia,emc-mode-4 = <0x00000000>;
1107 nvidia,emc-mode-reset = <0x80000321>;
1108 nvidia,emc-mrs-wait-cnt = <0x0173000e>;
1109 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
1110 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1111 nvidia,emc-zcal-cnt-long = <0x00000042>;
1112 nvidia,emc-zcal-interval = <0x00020000>;
1113
1114 nvidia,emc-configuration = <
1115 0x0000000d
1116 0x0000004d
1117 0x00000000
1118 0x00000009
1119 0x00000003
1120 0x00000004
1121 0x00000008
1122 0x00000002
1123 0x00000009
1124 0x00000003
1125 0x00000003
1126 0x00000002
1127 0x00000002
1128 0x00000000
1129 0x00000003
1130 0x00000003
1131 0x00000005
1132 0x00000002
1133 0x00000000
1134 0x00000002
1135 0x00000007
1136 0x00020000
1137 0x00000003
1138 0x00000000
1139 0x00000000
1140 0x00000000
1141 0x00000000
1142 0x00000001
1143 0x0000000e
1144 0x00000010
1145 0x00000012
1146 0x000008e4
1147 0x00000000
1148 0x00000239
1149 0x00000001
1150 0x00000008
1151 0x00000001
1152 0x00000000
1153 0x0000004b
1154 0x0000000e
1155 0x00000052
1156 0x00000200
1157 0x00000004
1158 0x00000005
1159 0x00000004
1160 0x00000008
1161 0x00000000
1162 0x00000005
1163 0x00000005
1164 0x00000924
1165 0x00000000
1166 0x00000000
1167 0x00000000
1168 0x104ab098
1169 0x002c00a0
1170 0x00008000
1171 0x00030000
1172 0x00030000
1173 0x00030000
1174 0x00030000
1175 0x00030000
1176 0x00030000
1177 0x00030000
1178 0x00030000
1179 0x00030000
1180 0x00030000
1181 0x00030000
1182 0x00030000
1183 0x00030000
1184 0x00030000
1185 0x00030000
1186 0x00030000
1187 0x00000000
1188 0x00000000
1189 0x00000000
1190 0x00000000
1191 0x00000000
1192 0x00000000
1193 0x00000000
1194 0x00000000
1195 0x00098000
1196 0x00098000
1197 0x00000000
1198 0x00098000
1199 0x00098000
1200 0x00000000
1201 0x00000000
1202 0x00000000
1203 0x00000000
1204 0x00000000
1205 0x00000000
1206 0x00000000
1207 0x00000000
1208 0x00000000
1209 0x00000000
1210 0x00000000
1211 0x00000000
1212 0x00000000
1213 0x00000000
1214 0x00000000
1215 0x00000000
1216 0x00000000
1217 0x00000000
1218 0x00000000
1219 0x00000000
1220 0x00000000
1221 0x00000000
1222 0x00000000
1223 0x00000000
1224 0x00000000
1225 0x00050000
1226 0x00050000
1227 0x00050000
1228 0x00050000
1229 0x00005000
1230 0x00005000
1231 0x00005000
1232 0x00005000
1233 0x10000280
1234 0x00000000
1235 0x00111111
1236 0x00000000
1237 0x00000000
1238 0x77ffc081
1239 0x00000505
1240 0x81f1f108
1241 0x07070004
1242 0x00000000
1243 0x016eeeee
1244 0x51451420
1245 0x00514514
1246 0x00514514
1247 0x51451400
1248 0x0000003f
1249 0x00000096
1250 0x00000000
1251 0x00000100
1252 0x0173000e
1253 0x00000000
1254 0x00000003
1255 0x000052a3
1256 0x800012d7
1257 0x00000009
1258 >;
1259 };
1260
1261 timing-396000000 {
1262 clock-frequency = <396000000>;
1263
1264 nvidia,emc-auto-cal-config = <0xa1430000>;
1265 nvidia,emc-auto-cal-config2 = <0x00000000>;
1266 nvidia,emc-auto-cal-config3 = <0x00000000>;
1267 nvidia,emc-auto-cal-interval = <0x001fffff>;
1268 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1269 nvidia,emc-cfg = <0x73340000>;
1270 nvidia,emc-cfg-2 = <0x00000895>;
1271 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1272 nvidia,emc-mode-1 = <0x80100002>;
1273 nvidia,emc-mode-2 = <0x80200000>;
1274 nvidia,emc-mode-4 = <0x00000000>;
1275 nvidia,emc-mode-reset = <0x80000521>;
1276 nvidia,emc-mrs-wait-cnt = <0x015b000e>;
1277 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1278 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1279 nvidia,emc-zcal-cnt-long = <0x00000042>;
1280 nvidia,emc-zcal-interval = <0x00020000>;
1281
1282 nvidia,emc-configuration = <
1283 0x00000011
1284 0x00000066
1285 0x00000000
1286 0x0000000c
1287 0x00000004
1288 0x00000004
1289 0x00000008
1290 0x00000002
1291 0x0000000a
1292 0x00000004
1293 0x00000004
1294 0x00000002
1295 0x00000002
1296 0x00000000
1297 0x00000003
1298 0x00000003
1299 0x00000005
1300 0x00000002
1301 0x00000000
1302 0x00000001
1303 0x00000008
1304 0x00020000
1305 0x00000003
1306 0x00000000
1307 0x00000000
1308 0x00000000
1309 0x00000000
1310 0x00000000
1311 0x0000000f
1312 0x00000010
1313 0x00000012
1314 0x00000bd1
1315 0x00000000
1316 0x000002f4
1317 0x00000001
1318 0x00000008
1319 0x00000001
1320 0x00000000
1321 0x00000063
1322 0x0000000f
1323 0x0000006c
1324 0x00000200
1325 0x00000004
1326 0x00000005
1327 0x00000004
1328 0x0000000b
1329 0x00000000
1330 0x00000005
1331 0x00000005
1332 0x00000c11
1333 0x00000000
1334 0x00000000
1335 0x00000000
1336 0x104ab098
1337 0x002c00a0
1338 0x00008000
1339 0x00030000
1340 0x00030000
1341 0x00030000
1342 0x00030000
1343 0x00030000
1344 0x00030000
1345 0x00030000
1346 0x00030000
1347 0x00030000
1348 0x00030000
1349 0x00030000
1350 0x00030000
1351 0x00030000
1352 0x00030000
1353 0x00030000
1354 0x00030000
1355 0x00000000
1356 0x00000000
1357 0x00000000
1358 0x00000000
1359 0x00000000
1360 0x00000000
1361 0x00000000
1362 0x00000000
1363 0x00070000
1364 0x00070000
1365 0x00000000
1366 0x00070000
1367 0x00070000
1368 0x00000000
1369 0x00000000
1370 0x00000000
1371 0x00000000
1372 0x00000000
1373 0x00000000
1374 0x00000000
1375 0x00000000
1376 0x00000000
1377 0x00000000
1378 0x00000000
1379 0x00000000
1380 0x00000000
1381 0x00000000
1382 0x00000000
1383 0x00000000
1384 0x00000000
1385 0x00000000
1386 0x00000000
1387 0x00000000
1388 0x00000000
1389 0x00000000
1390 0x00000000
1391 0x00000000
1392 0x00000000
1393 0x00038000
1394 0x00038000
1395 0x00038000
1396 0x00038000
1397 0x00003800
1398 0x00003800
1399 0x00003800
1400 0x00003800
1401 0x10000280
1402 0x00000000
1403 0x00111111
1404 0x00000000
1405 0x00000000
1406 0x77ffc081
1407 0x00000505
1408 0x81f1f108
1409 0x07070004
1410 0x00000000
1411 0x016eeeee
1412 0x51451420
1413 0x00514514
1414 0x00514514
1415 0x51451400
1416 0x0000003f
1417 0x000000c6
1418 0x00000000
1419 0x00000100
1420 0x015b000e
1421 0x00000000
1422 0x00000003
1423 0x000052a3
1424 0x8000188b
1425 0x00000009
1426 >;
1427 };
1428
1429 timing-528000000 {
1430 clock-frequency = <528000000>;
1431
1432 nvidia,emc-auto-cal-config = <0xa1430000>;
1433 nvidia,emc-auto-cal-config2 = <0x00000000>;
1434 nvidia,emc-auto-cal-config3 = <0x00000000>;
1435 nvidia,emc-auto-cal-interval = <0x001fffff>;
1436 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1437 nvidia,emc-cfg = <0x73300000>;
1438 nvidia,emc-cfg-2 = <0x0000089d>;
1439 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1440 nvidia,emc-mode-1 = <0x80100002>;
1441 nvidia,emc-mode-2 = <0x80200008>;
1442 nvidia,emc-mode-4 = <0x00000000>;
1443 nvidia,emc-mode-reset = <0x80000941>;
1444 nvidia,emc-mrs-wait-cnt = <0x0139000e>;
1445 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1446 nvidia,emc-xm2dqspadctrl2 = <0x0123133d>;
1447 nvidia,emc-zcal-cnt-long = <0x00000042>;
1448 nvidia,emc-zcal-interval = <0x00020000>;
1449
1450 nvidia,emc-configuration = <
1451 0x00000018
1452 0x00000088
1453 0x00000000
1454 0x00000010
1455 0x00000006
1456 0x00000006
1457 0x00000009
1458 0x00000002
1459 0x0000000d
1460 0x00000006
1461 0x00000006
1462 0x00000002
1463 0x00000002
1464 0x00000000
1465 0x00000003
1466 0x00000003
1467 0x00000006
1468 0x00000002
1469 0x00000000
1470 0x00000001
1471 0x00000009
1472 0x00030000
1473 0x00000003
1474 0x00000000
1475 0x00000000
1476 0x00000000
1477 0x00000000
1478 0x00000000
1479 0x00000010
1480 0x00000012
1481 0x00000014
1482 0x00000fd6
1483 0x00000000
1484 0x000003f5
1485 0x00000002
1486 0x0000000b
1487 0x00000001
1488 0x00000000
1489 0x00000085
1490 0x00000012
1491 0x00000090
1492 0x00000200
1493 0x00000004
1494 0x00000005
1495 0x00000004
1496 0x00000010
1497 0x00000000
1498 0x00000006
1499 0x00000006
1500 0x00001017
1501 0x00000000
1502 0x00000000
1503 0x00000000
1504 0x104ab098
1505 0xe01200b1
1506 0x00008000
1507 0x0000000a
1508 0x0000000a
1509 0x0000000a
1510 0x0000000a
1511 0x0000000a
1512 0x0000000a
1513 0x0000000a
1514 0x0000000a
1515 0x0000000a
1516 0x0000000a
1517 0x0000000a
1518 0x0000000a
1519 0x0000000a
1520 0x0000000a
1521 0x0000000a
1522 0x0000000a
1523 0x00000000
1524 0x00000000
1525 0x00000000
1526 0x00000000
1527 0x00000000
1528 0x00000000
1529 0x00000000
1530 0x00000000
1531 0x00054000
1532 0x00054000
1533 0x00000000
1534 0x00054000
1535 0x00054000
1536 0x00000000
1537 0x00000000
1538 0x00000000
1539 0x00000000
1540 0x00000000
1541 0x00000000
1542 0x00000000
1543 0x00000000
1544 0x00000000
1545 0x00000000
1546 0x00000000
1547 0x00000000
1548 0x00000000
1549 0x00000000
1550 0x00000000
1551 0x00000000
1552 0x00000000
1553 0x00000000
1554 0x00000000
1555 0x00000000
1556 0x00000000
1557 0x00000000
1558 0x00000000
1559 0x00000000
1560 0x00000000
1561 0x0000000c
1562 0x0000000c
1563 0x0000000c
1564 0x0000000c
1565 0x0000000c
1566 0x0000000c
1567 0x0000000c
1568 0x0000000c
1569 0x100002a0
1570 0x00000000
1571 0x00111111
1572 0x00000000
1573 0x00000000
1574 0x77ffc085
1575 0x00000505
1576 0x81f1f108
1577 0x07070004
1578 0x00000000
1579 0x016eeeee
1580 0x51451420
1581 0x00514514
1582 0x00514514
1583 0x51451400
1584 0x0606003f
1585 0x00000000
1586 0x00000000
1587 0x00000100
1588 0x0139000e
1589 0x00000000
1590 0x00000003
1591 0x000042a0
1592 0x80002062
1593 0x0000000a
1594 >;
1595 };
1596
1597 timing-600000000 {
1598 clock-frequency = <600000000>;
1599
1600 nvidia,emc-auto-cal-config = <0xa1430000>;
1601 nvidia,emc-auto-cal-config2 = <0x00000000>;
1602 nvidia,emc-auto-cal-config3 = <0x00000000>;
1603 nvidia,emc-auto-cal-interval = <0x001fffff>;
1604 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1605 nvidia,emc-cfg = <0x73300000>;
1606 nvidia,emc-cfg-2 = <0x0000089d>;
1607 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1608 nvidia,emc-mode-1 = <0x80100002>;
1609 nvidia,emc-mode-2 = <0x80200010>;
1610 nvidia,emc-mode-4 = <0x00000000>;
1611 nvidia,emc-mode-reset = <0x80000b61>;
1612 nvidia,emc-mrs-wait-cnt = <0x0127000e>;
1613 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1614 nvidia,emc-xm2dqspadctrl2 = <0x0121113d>;
1615 nvidia,emc-zcal-cnt-long = <0x00000042>;
1616 nvidia,emc-zcal-interval = <0x00020000>;
1617
1618 nvidia,emc-configuration = <
1619 0x0000001b
1620 0x0000009b
1621 0x00000000
1622 0x00000013
1623 0x00000007
1624 0x00000007
1625 0x0000000b
1626 0x00000003
1627 0x00000010
1628 0x00000007
1629 0x00000007
1630 0x00000002
1631 0x00000002
1632 0x00000000
1633 0x00000005
1634 0x00000005
1635 0x0000000a
1636 0x00000002
1637 0x00000000
1638 0x00000003
1639 0x0000000b
1640 0x00070000
1641 0x00000003
1642 0x00000000
1643 0x00000000
1644 0x00000000
1645 0x00000000
1646 0x00000002
1647 0x00000012
1648 0x00000016
1649 0x00000018
1650 0x00001208
1651 0x00000000
1652 0x00000482
1653 0x00000002
1654 0x0000000d
1655 0x00000001
1656 0x00000000
1657 0x00000097
1658 0x00000015
1659 0x000000a3
1660 0x00000200
1661 0x00000004
1662 0x00000005
1663 0x00000004
1664 0x00000013
1665 0x00000000
1666 0x00000006
1667 0x00000006
1668 0x00001248
1669 0x00000000
1670 0x00000000
1671 0x00000000
1672 0x104ab098
1673 0xe00e00b1
1674 0x00008000
1675 0x0000000a
1676 0x0000000a
1677 0x0000000a
1678 0x0000000a
1679 0x0000000a
1680 0x0000000a
1681 0x0000000a
1682 0x0000000a
1683 0x0000000a
1684 0x0000000a
1685 0x0000000a
1686 0x0000000a
1687 0x0000000a
1688 0x0000000a
1689 0x0000000a
1690 0x0000000a
1691 0x00000000
1692 0x00000000
1693 0x00000000
1694 0x00000000
1695 0x00000000
1696 0x00000000
1697 0x00000000
1698 0x00000000
1699 0x00048000
1700 0x00048000
1701 0x00000000
1702 0x00048000
1703 0x00048000
1704 0x00000000
1705 0x00000000
1706 0x00000000
1707 0x00000000
1708 0x00000000
1709 0x00000000
1710 0x00000000
1711 0x00000000
1712 0x00000000
1713 0x00000000
1714 0x00000000
1715 0x00000000
1716 0x00000000
1717 0x00000000
1718 0x00000000
1719 0x00000000
1720 0x00000000
1721 0x00000000
1722 0x00000000
1723 0x00000000
1724 0x00000000
1725 0x00000000
1726 0x00000000
1727 0x00000000
1728 0x00000000
1729 0x0000000d
1730 0x0000000d
1731 0x0000000d
1732 0x0000000d
1733 0x0000000d
1734 0x0000000d
1735 0x0000000d
1736 0x0000000d
1737 0x100002a0
1738 0x00000000
1739 0x00111111
1740 0x00000000
1741 0x00000000
1742 0x77ffc085
1743 0x00000505
1744 0x81f1f108
1745 0x07070004
1746 0x00000000
1747 0x016eeeee
1748 0x51451420
1749 0x00514514
1750 0x00514514
1751 0x51451400
1752 0x0606003f
1753 0x00000000
1754 0x00000000
1755 0x00000100
1756 0x0127000e
1757 0x00000000
1758 0x00000003
1759 0x000040a0
1760 0x800024aa
1761 0x0000000e
1762 >;
1763 };
1764
1765 timing-792000000 {
1766 clock-frequency = <792000000>;
1767
1768 nvidia,emc-auto-cal-config = <0xa1430000>;
1769 nvidia,emc-auto-cal-config2 = <0x00000000>;
1770 nvidia,emc-auto-cal-config3 = <0x00000000>;
1771 nvidia,emc-auto-cal-interval = <0x001fffff>;
1772 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1773 nvidia,emc-cfg = <0x73300000>;
1774 nvidia,emc-cfg-2 = <0x0000089d>;
1775 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1776 nvidia,emc-mode-1 = <0x80100002>;
1777 nvidia,emc-mode-2 = <0x80200018>;
1778 nvidia,emc-mode-4 = <0x00000000>;
1779 nvidia,emc-mode-reset = <0x80000d71>;
1780 nvidia,emc-mrs-wait-cnt = <0x00f7000e>;
1781 nvidia,emc-sel-dpd-ctrl = <0x00040000>;
1782 nvidia,emc-xm2dqspadctrl2 = <0x0120113d>;
1783 nvidia,emc-zcal-cnt-long = <0x00000042>;
1784 nvidia,emc-zcal-interval = <0x00020000>;
1785
1786 nvidia,emc-configuration = <
1787 0x00000024
1788 0x000000cd
1789 0x00000000
1790 0x00000019
1791 0x0000000a
1792 0x00000008
1793 0x0000000d
1794 0x00000004
1795 0x00000013
1796 0x0000000a
1797 0x0000000a
1798 0x00000004
1799 0x00000002
1800 0x00000000
1801 0x00000006
1802 0x00000006
1803 0x0000000b
1804 0x00000002
1805 0x00000000
1806 0x00000002
1807 0x0000000d
1808 0x00080000
1809 0x00000004
1810 0x00000000
1811 0x00000000
1812 0x00000000
1813 0x00000000
1814 0x00000001
1815 0x00000014
1816 0x00000018
1817 0x0000001a
1818 0x000017e2
1819 0x00000000
1820 0x000005f8
1821 0x00000003
1822 0x00000011
1823 0x00000001
1824 0x00000000
1825 0x000000c7
1826 0x00000018
1827 0x000000d7
1828 0x00000200
1829 0x00000005
1830 0x00000006
1831 0x00000005
1832 0x00000019
1833 0x00000000
1834 0x00000008
1835 0x00000008
1836 0x00001822
1837 0x00000000
1838 0x00000000
1839 0x00000000
1840 0x104ab098
1841 0xe00700b1
1842 0x00008000
1843 0x007fc008
1844 0x007fc008
1845 0x007fc008
1846 0x007fc008
1847 0x007fc008
1848 0x007fc008
1849 0x007fc008
1850 0x007fc008
1851 0x007fc008
1852 0x007fc008
1853 0x007fc008
1854 0x007fc008
1855 0x007fc008
1856 0x007fc008
1857 0x007fc008
1858 0x007fc008
1859 0x00000000
1860 0x00000000
1861 0x00000000
1862 0x00000000
1863 0x00000000
1864 0x00000000
1865 0x00000000
1866 0x00000000
1867 0x00034000
1868 0x00034000
1869 0x00000000
1870 0x00034000
1871 0x00034000
1872 0x00000000
1873 0x00000000
1874 0x00000000
1875 0x00000000
1876 0x00000000
1877 0x00000000
1878 0x00000000
1879 0x00000000
1880 0x00000000
1881 0x00000005
1882 0x00000005
1883 0x00000005
1884 0x00000005
1885 0x00000005
1886 0x00000005
1887 0x00000005
1888 0x00000005
1889 0x00000005
1890 0x00000005
1891 0x00000005
1892 0x00000005
1893 0x00000005
1894 0x00000005
1895 0x00000005
1896 0x00000005
1897 0x0000000a
1898 0x0000000a
1899 0x0000000a
1900 0x0000000a
1901 0x0000000a
1902 0x0000000a
1903 0x0000000a
1904 0x0000000a
1905 0x100002a0
1906 0x00000000
1907 0x00111111
1908 0x00000000
1909 0x00000000
1910 0x77ffc085
1911 0x00000000
1912 0x81f1f108
1913 0x07070004
1914 0x00000000
1915 0x016eeeee
1916 0x61861820
1917 0x00514514
1918 0x00514514
1919 0x61861800
1920 0x0606003f
1921 0x00000000
1922 0x00000000
1923 0x00000100
1924 0x00f7000e
1925 0x00000000
1926 0x00000004
1927 0x00004080
1928 0x80003012
1929 0x0000000f
1930 >;
1931 };
1932
1933 timing-924000000 {
1934 clock-frequency = <924000000>;
1935
1936 nvidia,emc-auto-cal-config = <0xa1430303>;
1937 nvidia,emc-auto-cal-config2 = <0x00000000>;
1938 nvidia,emc-auto-cal-config3 = <0x00000000>;
1939 nvidia,emc-auto-cal-interval = <0x001fffff>;
1940 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1941 nvidia,emc-cfg = <0x73300000>;
1942 nvidia,emc-cfg-2 = <0x0000089d>;
1943 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1944 nvidia,emc-mode-1 = <0x80100002>;
1945 nvidia,emc-mode-2 = <0x80200020>;
1946 nvidia,emc-mode-4 = <0x00000000>;
1947 nvidia,emc-mode-reset = <0x80000f15>;
1948 nvidia,emc-mrs-wait-cnt = <0x00cd000e>;
1949 nvidia,emc-sel-dpd-ctrl = <0x00040000>;
1950 nvidia,emc-xm2dqspadctrl2 = <0x0120113d>;
1951 nvidia,emc-zcal-cnt-long = <0x0000004c>;
1952 nvidia,emc-zcal-interval = <0x00020000>;
1953
1954 nvidia,emc-configuration = <
1955 0x0000002b
1956 0x000000f0
1957 0x00000000
1958 0x0000001e
1959 0x0000000b
1960 0x00000009
1961 0x0000000f
1962 0x00000005
1963 0x00000016
1964 0x0000000b
1965 0x0000000b
1966 0x00000004
1967 0x00000002
1968 0x00000000
1969 0x00000007
1970 0x00000007
1971 0x0000000d
1972 0x00000002
1973 0x00000000
1974 0x00000002
1975 0x0000000f
1976 0x000a0000
1977 0x00000004
1978 0x00000000
1979 0x00000000
1980 0x00000000
1981 0x00000000
1982 0x00000001
1983 0x00000016
1984 0x0000001a
1985 0x0000001c
1986 0x00001be7
1987 0x00000000
1988 0x000006f9
1989 0x00000004
1990 0x00000015
1991 0x00000001
1992 0x00000000
1993 0x000000e7
1994 0x0000001b
1995 0x000000fb
1996 0x00000200
1997 0x00000006
1998 0x00000007
1999 0x00000006
2000 0x0000001e
2001 0x00000000
2002 0x0000000a
2003 0x0000000a
2004 0x00001c28
2005 0x00000000
2006 0x00000000
2007 0x00000000
2008 0x104ab898
2009 0xe00400b1
2010 0x00008000
2011 0x007f800a
2012 0x007f800a
2013 0x007f800a
2014 0x007f800a
2015 0x007f800a
2016 0x007f800a
2017 0x007f800a
2018 0x007f800a
2019 0x007f800a
2020 0x007f800a
2021 0x007f800a
2022 0x007f800a
2023 0x007f800a
2024 0x007f800a
2025 0x007f800a
2026 0x007f800a
2027 0x00000000
2028 0x00000000
2029 0x00000000
2030 0x00000000
2031 0x00000000
2032 0x00000000
2033 0x00000000
2034 0x00000000
2035 0x0002c000
2036 0x0002c000
2037 0x00000000
2038 0x0002c000
2039 0x0002c000
2040 0x00000000
2041 0x00000000
2042 0x00000000
2043 0x00000000
2044 0x00000000
2045 0x00000000
2046 0x00000000
2047 0x00000000
2048 0x00000000
2049 0x00000004
2050 0x00000004
2051 0x00000004
2052 0x00000004
2053 0x00000004
2054 0x00000004
2055 0x00000004
2056 0x00000004
2057 0x00000004
2058 0x00000004
2059 0x00000004
2060 0x00000004
2061 0x00000004
2062 0x00000004
2063 0x00000004
2064 0x00000004
2065 0x00000008
2066 0x00000008
2067 0x00000008
2068 0x00000008
2069 0x00000008
2070 0x00000008
2071 0x00000008
2072 0x00000008
2073 0x100002a0
2074 0x00000000
2075 0x00111111
2076 0x00000000
2077 0x00000000
2078 0x77ffc085
2079 0x00000000
2080 0x81f1f108
2081 0x07070004
2082 0x00000000
2083 0x016eeeee
2084 0x5d75d720
2085 0x00514514
2086 0x00514514
2087 0x5d75d700
2088 0x0606003f
2089 0x00000000
2090 0x00000000
2091 0x00000128
2092 0x00cd000e
2093 0x00000000
2094 0x00000004
2095 0x00004080
2096 0x800037ea
2097 0x00000011
2098 >;
2099 };
2100
2101 };
2102 };
2103
2104 memory-controller@0,70019000 {
2105 emc-timings-3 {
2106 nvidia,ram-code = <3>;
2107
2108 timing-12750000 {
2109 clock-frequency = <12750000>;
2110
2111 nvidia,emem-configuration = <
2112 0x40040001
2113 0x8000000a
2114 0x00000001
2115 0x00000001
2116 0x00000002
2117 0x00000000
2118 0x00000002
2119 0x00000001
2120 0x00000003
2121 0x00000008
2122 0x00000003
2123 0x00000002
2124 0x00000003
2125 0x00000006
2126 0x06030203
2127 0x000a0502
2128 0x77e30303
2129 0x70000f03
2130 0x001f0000
2131 >;
2132 };
2133
2134 timing-20400000 {
2135 clock-frequency = <20400000>;
2136
2137 nvidia,emem-configuration = <
2138 0x40020001
2139 0x80000012
2140 0x00000001
2141 0x00000001
2142 0x00000002
2143 0x00000000
2144 0x00000002
2145 0x00000001
2146 0x00000003
2147 0x00000008
2148 0x00000003
2149 0x00000002
2150 0x00000003
2151 0x00000006
2152 0x06030203
2153 0x000a0502
2154 0x76230303
2155 0x70000f03
2156 0x001f0000
2157 >;
2158 };
2159
2160 timing-40800000 {
2161 clock-frequency = <40800000>;
2162
2163 nvidia,emem-configuration = <
2164 0xa0000001
2165 0x80000017
2166 0x00000001
2167 0x00000001
2168 0x00000002
2169 0x00000000
2170 0x00000002
2171 0x00000001
2172 0x00000003
2173 0x00000008
2174 0x00000003
2175 0x00000002
2176 0x00000003
2177 0x00000006
2178 0x06030203
2179 0x000a0502
2180 0x74a30303
2181 0x70000f03
2182 0x001f0000
2183 >;
2184 };
2185
2186 timing-68000000 {
2187 clock-frequency = <68000000>;
2188
2189 nvidia,emem-configuration = <
2190 0x00000001
2191 0x8000001e
2192 0x00000001
2193 0x00000001
2194 0x00000002
2195 0x00000000
2196 0x00000002
2197 0x00000001
2198 0x00000003
2199 0x00000008
2200 0x00000003
2201 0x00000002
2202 0x00000003
2203 0x00000006
2204 0x06030203
2205 0x000a0502
2206 0x74230403
2207 0x70000f03
2208 0x001f0000
2209 >;
2210 };
2211
2212 timing-102000000 {
2213 clock-frequency = <102000000>;
2214
2215 nvidia,emem-configuration = <
2216 0x08000001
2217 0x80000026
2218 0x00000001
2219 0x00000001
2220 0x00000003
2221 0x00000000
2222 0x00000002
2223 0x00000001
2224 0x00000003
2225 0x00000008
2226 0x00000003
2227 0x00000002
2228 0x00000003
2229 0x00000006
2230 0x06030203
2231 0x000a0503
2232 0x73c30504
2233 0x70000f03
2234 0x001f0000
2235 >;
2236 };
2237
2238 timing-204000000 {
2239 clock-frequency = <204000000>;
2240
2241 nvidia,emem-configuration = <
2242 0x01000003
2243 0x80000040
2244 0x00000001
2245 0x00000001
2246 0x00000004
2247 0x00000002
2248 0x00000003
2249 0x00000001
2250 0x00000003
2251 0x00000008
2252 0x00000003
2253 0x00000002
2254 0x00000004
2255 0x00000006
2256 0x06040203
2257 0x000a0504
2258 0x73840a05
2259 0x70000f03
2260 0x001f0000
2261 >;
2262 };
2263
2264 timing-300000000 {
2265 clock-frequency = <300000000>;
2266
2267 nvidia,emem-configuration = <
2268 0x08000004
2269 0x80000040
2270 0x00000001
2271 0x00000002
2272 0x00000007
2273 0x00000004
2274 0x00000004
2275 0x00000001
2276 0x00000002
2277 0x00000007
2278 0x00000002
2279 0x00000002
2280 0x00000004
2281 0x00000006
2282 0x06040202
2283 0x000b0607
2284 0x77450e08
2285 0x70000f03
2286 0x001f0000
2287 >;
2288 };
2289
2290 timing-396000000 {
2291 clock-frequency = <396000000>;
2292
2293 nvidia,emem-configuration = <
2294 0x0f000005
2295 0x80000040
2296 0x00000001
2297 0x00000002
2298 0x00000009
2299 0x00000005
2300 0x00000006
2301 0x00000001
2302 0x00000002
2303 0x00000008
2304 0x00000002
2305 0x00000002
2306 0x00000004
2307 0x00000006
2308 0x06040202
2309 0x000d0709
2310 0x7586120a
2311 0x70000f03
2312 0x001f0000
2313 >;
2314 };
2315
2316 timing-528000000 {
2317 clock-frequency = <528000000>;
2318
2319 nvidia,emem-configuration = <
2320 0x0f000007
2321 0x80000040
2322 0x00000002
2323 0x00000003
2324 0x0000000c
2325 0x00000007
2326 0x00000008
2327 0x00000001
2328 0x00000002
2329 0x00000009
2330 0x00000002
2331 0x00000002
2332 0x00000005
2333 0x00000006
2334 0x06050202
2335 0x0010090c
2336 0x7428180d
2337 0x70000f03
2338 0x001f0000
2339 >;
2340 };
2341
2342 timing-600000000 {
2343 clock-frequency = <600000000>;
2344
2345 nvidia,emem-configuration = <
2346 0x00000009
2347 0x80000040
2348 0x00000003
2349 0x00000004
2350 0x0000000e
2351 0x00000009
2352 0x0000000a
2353 0x00000001
2354 0x00000003
2355 0x0000000b
2356 0x00000002
2357 0x00000002
2358 0x00000005
2359 0x00000007
2360 0x07050202
2361 0x00130b0e
2362 0x73a91b0f
2363 0x70000f03
2364 0x001f0000
2365 >;
2366 };
2367
2368 timing-792000000 {
2369 clock-frequency = <792000000>;
2370
2371 nvidia,emem-configuration = <
2372 0x0e00000b
2373 0x80000040
2374 0x00000004
2375 0x00000005
2376 0x00000013
2377 0x0000000c
2378 0x0000000d
2379 0x00000002
2380 0x00000003
2381 0x0000000c
2382 0x00000002
2383 0x00000002
2384 0x00000006
2385 0x00000008
2386 0x08060202
2387 0x00170e13
2388 0x736c2414
2389 0x70000f02
2390 0x001f0000
2391 >;
2392 };
2393
2394 timing-924000000 {
2395 clock-frequency = <924000000>;
2396
2397 nvidia,emem-configuration = <
2398 0x0e00000d
2399 0x80000040
2400 0x00000005
2401 0x00000006
2402 0x00000016
2403 0x0000000e
2404 0x0000000f
2405 0x00000002
2406 0x00000004
2407 0x0000000e
2408 0x00000002
2409 0x00000002
2410 0x00000006
2411 0x00000009
2412 0x09060202
2413 0x001a1016
2414 0x734e2a17
2415 0x70000f02
2416 0x001f0000
2417 >;
2418 };
2419 };
2420 };
2421};
diff --git a/arch/arm/boot/dts/tegra124-jetson-tk1.dts b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
index dbfaba09703a..ed8a8acd3d34 100644
--- a/arch/arm/boot/dts/tegra124-jetson-tk1.dts
+++ b/arch/arm/boot/dts/tegra124-jetson-tk1.dts
@@ -3,6 +3,8 @@
3#include <dt-bindings/input/input.h> 3#include <dt-bindings/input/input.h>
4#include "tegra124.dtsi" 4#include "tegra124.dtsi"
5 5
6#include "tegra124-jetson-tk1-emc.dtsi"
7
6/ { 8/ {
7 model = "NVIDIA Tegra124 Jetson TK1"; 9 model = "NVIDIA Tegra124 Jetson TK1";
8 compatible = "nvidia,jetson-tk1", "nvidia,tegra124"; 10 compatible = "nvidia,jetson-tk1", "nvidia,tegra124";
@@ -60,35 +62,35 @@
60 nvidia,pins = "clk_32k_out_pa0"; 62 nvidia,pins = "clk_32k_out_pa0";
61 nvidia,function = "soc"; 63 nvidia,function = "soc";
62 nvidia,pull = <TEGRA_PIN_PULL_UP>; 64 nvidia,pull = <TEGRA_PIN_PULL_UP>;
63 nvidia,tristate = <TEGRA_PIN_DISABLE>; 65 nvidia,tristate = <TEGRA_PIN_ENABLE>;
64 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 66 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
65 }; 67 };
66 uart3_cts_n_pa1 { 68 uart3_cts_n_pa1 {
67 nvidia,pins = "uart3_cts_n_pa1"; 69 nvidia,pins = "uart3_cts_n_pa1";
68 nvidia,function = "uartc"; 70 nvidia,function = "gmi";
69 nvidia,pull = <TEGRA_PIN_PULL_UP>; 71 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
70 nvidia,tristate = <TEGRA_PIN_DISABLE>; 72 nvidia,tristate = <TEGRA_PIN_ENABLE>;
71 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 73 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
72 }; 74 };
73 dap2_fs_pa2 { 75 dap2_fs_pa2 {
74 nvidia,pins = "dap2_fs_pa2"; 76 nvidia,pins = "dap2_fs_pa2";
75 nvidia,function = "i2s1"; 77 nvidia,function = "i2s1";
76 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 78 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
77 nvidia,tristate = <TEGRA_PIN_DISABLE>; 79 nvidia,tristate = <TEGRA_PIN_DISABLE>;
78 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 80 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
79 }; 81 };
80 dap2_sclk_pa3 { 82 dap2_sclk_pa3 {
81 nvidia,pins = "dap2_sclk_pa3"; 83 nvidia,pins = "dap2_sclk_pa3";
82 nvidia,function = "i2s1"; 84 nvidia,function = "i2s1";
83 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 85 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
84 nvidia,tristate = <TEGRA_PIN_DISABLE>; 86 nvidia,tristate = <TEGRA_PIN_DISABLE>;
85 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 87 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
86 }; 88 };
87 dap2_din_pa4 { 89 dap2_din_pa4 {
88 nvidia,pins = "dap2_din_pa4"; 90 nvidia,pins = "dap2_din_pa4";
89 nvidia,function = "i2s1"; 91 nvidia,function = "i2s1";
90 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 92 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
91 nvidia,tristate = <TEGRA_PIN_DISABLE>; 93 nvidia,tristate = <TEGRA_PIN_ENABLE>;
92 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 94 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
93 }; 95 };
94 dap2_dout_pa5 { 96 dap2_dout_pa5 {
@@ -96,14 +98,14 @@
96 nvidia,function = "i2s1"; 98 nvidia,function = "i2s1";
97 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 99 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
98 nvidia,tristate = <TEGRA_PIN_DISABLE>; 100 nvidia,tristate = <TEGRA_PIN_DISABLE>;
99 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 101 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
100 }; 102 };
101 sdmmc3_clk_pa6 { 103 sdmmc3_clk_pa6 {
102 nvidia,pins = "sdmmc3_clk_pa6"; 104 nvidia,pins = "sdmmc3_clk_pa6";
103 nvidia,function = "sdmmc3"; 105 nvidia,function = "sdmmc3";
104 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 106 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
105 nvidia,tristate = <TEGRA_PIN_DISABLE>; 107 nvidia,tristate = <TEGRA_PIN_DISABLE>;
106 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 108 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
107 }; 109 };
108 sdmmc3_cmd_pa7 { 110 sdmmc3_cmd_pa7 {
109 nvidia,pins = "sdmmc3_cmd_pa7"; 111 nvidia,pins = "sdmmc3_cmd_pa7";
@@ -116,14 +118,14 @@
116 nvidia,pins = "pb0"; 118 nvidia,pins = "pb0";
117 nvidia,function = "uartd"; 119 nvidia,function = "uartd";
118 nvidia,pull = <TEGRA_PIN_PULL_UP>; 120 nvidia,pull = <TEGRA_PIN_PULL_UP>;
119 nvidia,tristate = <TEGRA_PIN_DISABLE>; 121 nvidia,tristate = <TEGRA_PIN_ENABLE>;
120 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 122 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
121 }; 123 };
122 pb1 { 124 pb1 {
123 nvidia,pins = "pb1"; 125 nvidia,pins = "pb1";
124 nvidia,function = "uartd"; 126 nvidia,function = "uartd";
125 nvidia,pull = <TEGRA_PIN_PULL_UP>; 127 nvidia,pull = <TEGRA_PIN_PULL_UP>;
126 nvidia,tristate = <TEGRA_PIN_DISABLE>; 128 nvidia,tristate = <TEGRA_PIN_ENABLE>;
127 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 129 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
128 }; 130 };
129 sdmmc3_dat3_pb4 { 131 sdmmc3_dat3_pb4 {
@@ -156,9 +158,9 @@
156 }; 158 };
157 uart3_rts_n_pc0 { 159 uart3_rts_n_pc0 {
158 nvidia,pins = "uart3_rts_n_pc0"; 160 nvidia,pins = "uart3_rts_n_pc0";
159 nvidia,function = "uartc"; 161 nvidia,function = "gmi";
160 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 162 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
161 nvidia,tristate = <TEGRA_PIN_DISABLE>; 163 nvidia,tristate = <TEGRA_PIN_ENABLE>;
162 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 164 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
163 }; 165 };
164 uart2_txd_pc2 { 166 uart2_txd_pc2 {
@@ -172,7 +174,7 @@
172 nvidia,pins = "uart2_rxd_pc3"; 174 nvidia,pins = "uart2_rxd_pc3";
173 nvidia,function = "irda"; 175 nvidia,function = "irda";
174 nvidia,pull = <TEGRA_PIN_PULL_UP>; 176 nvidia,pull = <TEGRA_PIN_PULL_UP>;
175 nvidia,tristate = <TEGRA_PIN_DISABLE>; 177 nvidia,tristate = <TEGRA_PIN_ENABLE>;
176 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 178 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
177 }; 179 };
178 gen1_i2c_scl_pc4 { 180 gen1_i2c_scl_pc4 {
@@ -194,44 +196,39 @@
194 pc7 { 196 pc7 {
195 nvidia,pins = "pc7"; 197 nvidia,pins = "pc7";
196 nvidia,function = "rsvd1"; 198 nvidia,function = "rsvd1";
197 nvidia,pull = <TEGRA_PIN_PULL_UP>; 199 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
198 nvidia,tristate = <TEGRA_PIN_DISABLE>; 200 nvidia,tristate = <TEGRA_PIN_ENABLE>;
199 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 201 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
200 }; 202 };
201 pg0 { 203 pg0 {
202 nvidia,pins = "pg0"; 204 nvidia,pins = "pg0";
203 nvidia,function = "rsvd1";
204 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 205 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
205 nvidia,tristate = <TEGRA_PIN_DISABLE>; 206 nvidia,tristate = <TEGRA_PIN_ENABLE>;
206 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 207 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
207 }; 208 };
208 pg1 { 209 pg1 {
209 nvidia,pins = "pg1"; 210 nvidia,pins = "pg1";
210 nvidia,function = "rsvd1";
211 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 211 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
212 nvidia,tristate = <TEGRA_PIN_DISABLE>; 212 nvidia,tristate = <TEGRA_PIN_ENABLE>;
213 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 213 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
214 }; 214 };
215 pg2 { 215 pg2 {
216 nvidia,pins = "pg2"; 216 nvidia,pins = "pg2";
217 nvidia,function = "rsvd1"; 217 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
218 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 218 nvidia,tristate = <TEGRA_PIN_ENABLE>;
219 nvidia,tristate = <TEGRA_PIN_DISABLE>;
220 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 219 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
221 }; 220 };
222 pg3 { 221 pg3 {
223 nvidia,pins = "pg3"; 222 nvidia,pins = "pg3";
224 nvidia,function = "rsvd1"; 223 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
225 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 224 nvidia,tristate = <TEGRA_PIN_ENABLE>;
226 nvidia,tristate = <TEGRA_PIN_DISABLE>;
227 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 225 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
228 }; 226 };
229 pg4 { 227 pg4 {
230 nvidia,pins = "pg4"; 228 nvidia,pins = "pg4";
231 nvidia,function = "spi4";
232 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 229 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
233 nvidia,tristate = <TEGRA_PIN_DISABLE>; 230 nvidia,tristate = <TEGRA_PIN_ENABLE>;
234 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 231 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
235 }; 232 };
236 pg5 { 233 pg5 {
237 nvidia,pins = "pg5"; 234 nvidia,pins = "pg5";
@@ -251,7 +248,7 @@
251 nvidia,pins = "pg7"; 248 nvidia,pins = "pg7";
252 nvidia,function = "spi4"; 249 nvidia,function = "spi4";
253 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 250 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
254 nvidia,tristate = <TEGRA_PIN_DISABLE>; 251 nvidia,tristate = <TEGRA_PIN_ENABLE>;
255 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 252 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
256 }; 253 };
257 ph0 { 254 ph0 {
@@ -270,7 +267,6 @@
270 }; 267 };
271 ph2 { 268 ph2 {
272 nvidia,pins = "ph2"; 269 nvidia,pins = "ph2";
273 nvidia,function = "gmi";
274 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 270 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
275 nvidia,tristate = <TEGRA_PIN_DISABLE>; 271 nvidia,tristate = <TEGRA_PIN_DISABLE>;
276 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 272 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -278,57 +274,53 @@
278 ph3 { 274 ph3 {
279 nvidia,pins = "ph3"; 275 nvidia,pins = "ph3";
280 nvidia,function = "gmi"; 276 nvidia,function = "gmi";
281 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 277 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
282 nvidia,tristate = <TEGRA_PIN_DISABLE>; 278 nvidia,tristate = <TEGRA_PIN_ENABLE>;
283 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 279 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
284 }; 280 };
285 ph4 { 281 ph4 {
286 nvidia,pins = "ph4"; 282 nvidia,pins = "ph4";
287 nvidia,function = "rsvd2"; 283 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
288 nvidia,pull = <TEGRA_PIN_PULL_UP>; 284 nvidia,tristate = <TEGRA_PIN_ENABLE>;
289 nvidia,tristate = <TEGRA_PIN_DISABLE>;
290 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 285 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
291 }; 286 };
292 ph5 { 287 ph5 {
293 nvidia,pins = "ph5"; 288 nvidia,pins = "ph5";
294 nvidia,function = "rsvd2"; 289 nvidia,function = "rsvd2";
295 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 290 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
296 nvidia,tristate = <TEGRA_PIN_DISABLE>; 291 nvidia,tristate = <TEGRA_PIN_ENABLE>;
297 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 292 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
298 }; 293 };
299 ph6 { 294 ph6 {
300 nvidia,pins = "ph6"; 295 nvidia,pins = "ph6";
301 nvidia,function = "gmi"; 296 nvidia,function = "gmi";
302 nvidia,pull = <TEGRA_PIN_PULL_UP>; 297 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
303 nvidia,tristate = <TEGRA_PIN_DISABLE>; 298 nvidia,tristate = <TEGRA_PIN_ENABLE>;
304 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 299 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
305 }; 300 };
306 ph7 { 301 ph7 {
307 nvidia,pins = "ph7"; 302 nvidia,pins = "ph7";
308 nvidia,function = "gmi";
309 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 303 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
310 nvidia,tristate = <TEGRA_PIN_DISABLE>; 304 nvidia,tristate = <TEGRA_PIN_DISABLE>;
311 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 305 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
312 }; 306 };
313 pi0 { 307 pi0 {
314 nvidia,pins = "pi0"; 308 nvidia,pins = "pi0";
315 nvidia,function = "rsvd1";
316 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 309 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
317 nvidia,tristate = <TEGRA_PIN_DISABLE>; 310 nvidia,tristate = <TEGRA_PIN_DISABLE>;
318 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 311 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
319 }; 312 };
320 pi1 { 313 pi1 {
321 nvidia,pins = "pi1"; 314 nvidia,pins = "pi1";
322 nvidia,function = "rsvd1"; 315 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
323 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
324 nvidia,tristate = <TEGRA_PIN_ENABLE>; 316 nvidia,tristate = <TEGRA_PIN_ENABLE>;
325 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 317 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
326 }; 318 };
327 pi2 { 319 pi2 {
328 nvidia,pins = "pi2"; 320 nvidia,pins = "pi2";
329 nvidia,function = "rsvd4"; 321 nvidia,function = "rsvd4";
330 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 322 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
331 nvidia,tristate = <TEGRA_PIN_DISABLE>; 323 nvidia,tristate = <TEGRA_PIN_ENABLE>;
332 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 324 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
333 }; 325 };
334 pi3 { 326 pi3 {
@@ -341,22 +333,21 @@
341 pi4 { 333 pi4 {
342 nvidia,pins = "pi4"; 334 nvidia,pins = "pi4";
343 nvidia,function = "gmi"; 335 nvidia,function = "gmi";
344 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 336 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
345 nvidia,tristate = <TEGRA_PIN_DISABLE>; 337 nvidia,tristate = <TEGRA_PIN_ENABLE>;
346 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 338 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
347 }; 339 };
348 pi5 { 340 pi5 {
349 nvidia,pins = "pi5"; 341 nvidia,pins = "pi5";
350 nvidia,function = "rsvd2"; 342 nvidia,function = "rsvd2";
351 nvidia,pull = <TEGRA_PIN_PULL_UP>; 343 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
352 nvidia,tristate = <TEGRA_PIN_DISABLE>; 344 nvidia,tristate = <TEGRA_PIN_ENABLE>;
353 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 345 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
354 }; 346 };
355 pi6 { 347 pi6 {
356 nvidia,pins = "pi6"; 348 nvidia,pins = "pi6";
357 nvidia,function = "rsvd1"; 349 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
358 nvidia,pull = <TEGRA_PIN_PULL_UP>; 350 nvidia,tristate = <TEGRA_PIN_ENABLE>;
359 nvidia,tristate = <TEGRA_PIN_DISABLE>;
360 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 351 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
361 }; 352 };
362 pi7 { 353 pi7 {
@@ -368,23 +359,22 @@
368 }; 359 };
369 pj0 { 360 pj0 {
370 nvidia,pins = "pj0"; 361 nvidia,pins = "pj0";
371 nvidia,function = "rsvd1"; 362 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
372 nvidia,pull = <TEGRA_PIN_PULL_UP>; 363 nvidia,tristate = <TEGRA_PIN_ENABLE>;
373 nvidia,tristate = <TEGRA_PIN_DISABLE>;
374 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 364 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
375 }; 365 };
376 pj2 { 366 pj2 {
377 nvidia,pins = "pj2"; 367 nvidia,pins = "pj2";
378 nvidia,function = "rsvd1"; 368 nvidia,function = "rsvd1";
379 nvidia,pull = <TEGRA_PIN_PULL_UP>; 369 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
380 nvidia,tristate = <TEGRA_PIN_DISABLE>; 370 nvidia,tristate = <TEGRA_PIN_ENABLE>;
381 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 371 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
382 }; 372 };
383 uart2_cts_n_pj5 { 373 uart2_cts_n_pj5 {
384 nvidia,pins = "uart2_cts_n_pj5"; 374 nvidia,pins = "uart2_cts_n_pj5";
385 nvidia,function = "uartb"; 375 nvidia,function = "uartb";
386 nvidia,pull = <TEGRA_PIN_PULL_UP>; 376 nvidia,pull = <TEGRA_PIN_PULL_UP>;
387 nvidia,tristate = <TEGRA_PIN_DISABLE>; 377 nvidia,tristate = <TEGRA_PIN_ENABLE>;
388 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 378 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
389 }; 379 };
390 uart2_rts_n_pj6 { 380 uart2_rts_n_pj6 {
@@ -403,35 +393,32 @@
403 }; 393 };
404 pk0 { 394 pk0 {
405 nvidia,pins = "pk0"; 395 nvidia,pins = "pk0";
406 nvidia,function = "soc"; 396 nvidia,function = "rsvd1";
407 nvidia,pull = <TEGRA_PIN_PULL_UP>; 397 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
408 nvidia,tristate = <TEGRA_PIN_DISABLE>; 398 nvidia,tristate = <TEGRA_PIN_ENABLE>;
409 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 399 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
410 }; 400 };
411 pk1 { 401 pk1 {
412 nvidia,pins = "pk1"; 402 nvidia,pins = "pk1";
413 nvidia,function = "rsvd4";
414 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 403 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
415 nvidia,tristate = <TEGRA_PIN_DISABLE>; 404 nvidia,tristate = <TEGRA_PIN_DISABLE>;
416 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 405 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
417 }; 406 };
418 pk2 { 407 pk2 {
419 nvidia,pins = "pk2"; 408 nvidia,pins = "pk2";
420 nvidia,function = "rsvd1"; 409 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
421 nvidia,pull = <TEGRA_PIN_PULL_UP>;
422 nvidia,tristate = <TEGRA_PIN_DISABLE>; 410 nvidia,tristate = <TEGRA_PIN_DISABLE>;
423 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 411 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
424 }; 412 };
425 pk3 { 413 pk3 {
426 nvidia,pins = "pk3"; 414 nvidia,pins = "pk3";
427 nvidia,function = "gmi"; 415 nvidia,function = "gmi";
428 nvidia,pull = <TEGRA_PIN_PULL_UP>; 416 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
429 nvidia,tristate = <TEGRA_PIN_DISABLE>; 417 nvidia,tristate = <TEGRA_PIN_ENABLE>;
430 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 418 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
431 }; 419 };
432 pk4 { 420 pk4 {
433 nvidia,pins = "pk4"; 421 nvidia,pins = "pk4";
434 nvidia,function = "rsvd2";
435 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 422 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
436 nvidia,tristate = <TEGRA_PIN_DISABLE>; 423 nvidia,tristate = <TEGRA_PIN_DISABLE>;
437 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 424 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -439,13 +426,12 @@
439 spdif_out_pk5 { 426 spdif_out_pk5 {
440 nvidia,pins = "spdif_out_pk5"; 427 nvidia,pins = "spdif_out_pk5";
441 nvidia,function = "rsvd2"; 428 nvidia,function = "rsvd2";
442 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 429 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
443 nvidia,tristate = <TEGRA_PIN_DISABLE>; 430 nvidia,tristate = <TEGRA_PIN_ENABLE>;
444 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 431 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
445 }; 432 };
446 spdif_in_pk6 { 433 spdif_in_pk6 {
447 nvidia,pins = "spdif_in_pk6"; 434 nvidia,pins = "spdif_in_pk6";
448 nvidia,function = "rsvd2";
449 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 435 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
450 nvidia,tristate = <TEGRA_PIN_DISABLE>; 436 nvidia,tristate = <TEGRA_PIN_DISABLE>;
451 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 437 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -459,17 +445,17 @@
459 }; 445 };
460 dap1_fs_pn0 { 446 dap1_fs_pn0 {
461 nvidia,pins = "dap1_fs_pn0"; 447 nvidia,pins = "dap1_fs_pn0";
462 nvidia,function = "i2s0"; 448 nvidia,function = "rsvd4";
463 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 449 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
464 nvidia,tristate = <TEGRA_PIN_DISABLE>; 450 nvidia,tristate = <TEGRA_PIN_ENABLE>;
465 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 451 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
466 }; 452 };
467 dap1_din_pn1 { 453 dap1_din_pn1 {
468 nvidia,pins = "dap1_din_pn1"; 454 nvidia,pins = "dap1_din_pn1";
469 nvidia,function = "i2s0"; 455 nvidia,function = "rsvd4";
470 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 456 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
471 nvidia,tristate = <TEGRA_PIN_DISABLE>; 457 nvidia,tristate = <TEGRA_PIN_ENABLE>;
472 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 458 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
473 }; 459 };
474 dap1_dout_pn2 { 460 dap1_dout_pn2 {
475 nvidia,pins = "dap1_dout_pn2"; 461 nvidia,pins = "dap1_dout_pn2";
@@ -480,108 +466,104 @@
480 }; 466 };
481 dap1_sclk_pn3 { 467 dap1_sclk_pn3 {
482 nvidia,pins = "dap1_sclk_pn3"; 468 nvidia,pins = "dap1_sclk_pn3";
483 nvidia,function = "i2s0"; 469 nvidia,function = "rsvd4";
484 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 470 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
485 nvidia,tristate = <TEGRA_PIN_DISABLE>; 471 nvidia,tristate = <TEGRA_PIN_ENABLE>;
486 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 472 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
487 }; 473 };
488 usb_vbus_en0_pn4 { 474 usb_vbus_en0_pn4 {
489 nvidia,pins = "usb_vbus_en0_pn4"; 475 nvidia,pins = "usb_vbus_en0_pn4";
490 nvidia,function = "usb"; 476 nvidia,function = "usb";
491 nvidia,pull = <TEGRA_PIN_PULL_UP>; 477 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
492 nvidia,tristate = <TEGRA_PIN_DISABLE>; 478 nvidia,tristate = <TEGRA_PIN_DISABLE>;
493 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 479 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
494 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 480 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
495 }; 481 };
496 usb_vbus_en1_pn5 { 482 usb_vbus_en1_pn5 {
497 nvidia,pins = "usb_vbus_en1_pn5"; 483 nvidia,pins = "usb_vbus_en1_pn5";
498 nvidia,function = "usb"; 484 nvidia,function = "usb";
499 nvidia,pull = <TEGRA_PIN_PULL_UP>; 485 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
500 nvidia,tristate = <TEGRA_PIN_DISABLE>; 486 nvidia,tristate = <TEGRA_PIN_DISABLE>;
501 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 487 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
502 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 488 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
503 }; 489 };
504 hdmi_int_pn7 { 490 hdmi_int_pn7 {
505 nvidia,pins = "hdmi_int_pn7"; 491 nvidia,pins = "hdmi_int_pn7";
506 nvidia,function = "rsvd1";
507 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 492 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
508 nvidia,tristate = <TEGRA_PIN_DISABLE>; 493 nvidia,tristate = <TEGRA_PIN_ENABLE>;
509 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 494 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
510 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>; 495 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
511 }; 496 };
512 ulpi_data7_po0 { 497 ulpi_data7_po0 {
513 nvidia,pins = "ulpi_data7_po0"; 498 nvidia,pins = "ulpi_data7_po0";
514 nvidia,function = "ulpi"; 499 nvidia,function = "ulpi";
515 nvidia,pull = <TEGRA_PIN_PULL_UP>; 500 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
516 nvidia,tristate = <TEGRA_PIN_DISABLE>; 501 nvidia,tristate = <TEGRA_PIN_ENABLE>;
517 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 502 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
518 }; 503 };
519 ulpi_data0_po1 { 504 ulpi_data0_po1 {
520 nvidia,pins = "ulpi_data0_po1"; 505 nvidia,pins = "ulpi_data0_po1";
521 nvidia,function = "ulpi"; 506 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
522 nvidia,pull = <TEGRA_PIN_PULL_UP>; 507 nvidia,tristate = <TEGRA_PIN_ENABLE>;
523 nvidia,tristate = <TEGRA_PIN_DISABLE>;
524 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 508 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
525 }; 509 };
526 ulpi_data1_po2 { 510 ulpi_data1_po2 {
527 nvidia,pins = "ulpi_data1_po2"; 511 nvidia,pins = "ulpi_data1_po2";
528 nvidia,function = "ulpi"; 512 nvidia,function = "ulpi";
529 nvidia,pull = <TEGRA_PIN_PULL_UP>; 513 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
530 nvidia,tristate = <TEGRA_PIN_DISABLE>; 514 nvidia,tristate = <TEGRA_PIN_ENABLE>;
531 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 515 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
532 }; 516 };
533 ulpi_data2_po3 { 517 ulpi_data2_po3 {
534 nvidia,pins = "ulpi_data2_po3"; 518 nvidia,pins = "ulpi_data2_po3";
535 nvidia,function = "ulpi"; 519 nvidia,function = "ulpi";
536 nvidia,pull = <TEGRA_PIN_PULL_UP>; 520 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
537 nvidia,tristate = <TEGRA_PIN_DISABLE>; 521 nvidia,tristate = <TEGRA_PIN_ENABLE>;
538 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 522 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
539 }; 523 };
540 ulpi_data3_po4 { 524 ulpi_data3_po4 {
541 nvidia,pins = "ulpi_data3_po4"; 525 nvidia,pins = "ulpi_data3_po4";
542 nvidia,function = "ulpi"; 526 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
543 nvidia,pull = <TEGRA_PIN_PULL_UP>; 527 nvidia,tristate = <TEGRA_PIN_ENABLE>;
544 nvidia,tristate = <TEGRA_PIN_DISABLE>;
545 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 528 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
546 }; 529 };
547 ulpi_data4_po5 { 530 ulpi_data4_po5 {
548 nvidia,pins = "ulpi_data4_po5"; 531 nvidia,pins = "ulpi_data4_po5";
549 nvidia,function = "ulpi"; 532 nvidia,function = "ulpi";
550 nvidia,pull = <TEGRA_PIN_PULL_UP>; 533 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
551 nvidia,tristate = <TEGRA_PIN_DISABLE>; 534 nvidia,tristate = <TEGRA_PIN_ENABLE>;
552 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 535 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
553 }; 536 };
554 ulpi_data5_po6 { 537 ulpi_data5_po6 {
555 nvidia,pins = "ulpi_data5_po6"; 538 nvidia,pins = "ulpi_data5_po6";
556 nvidia,function = "ulpi"; 539 nvidia,function = "ulpi";
557 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 540 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
558 nvidia,tristate = <TEGRA_PIN_DISABLE>; 541 nvidia,tristate = <TEGRA_PIN_ENABLE>;
559 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 542 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
560 }; 543 };
561 ulpi_data6_po7 { 544 ulpi_data6_po7 {
562 nvidia,pins = "ulpi_data6_po7"; 545 nvidia,pins = "ulpi_data6_po7";
563 nvidia,function = "ulpi"; 546 nvidia,function = "ulpi";
564 nvidia,pull = <TEGRA_PIN_PULL_UP>; 547 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
565 nvidia,tristate = <TEGRA_PIN_DISABLE>; 548 nvidia,tristate = <TEGRA_PIN_ENABLE>;
566 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 549 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
567 }; 550 };
568 dap3_fs_pp0 { 551 dap3_fs_pp0 {
569 nvidia,pins = "dap3_fs_pp0"; 552 nvidia,pins = "dap3_fs_pp0";
570 nvidia,function = "i2s2"; 553 nvidia,function = "i2s2";
571 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 554 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
572 nvidia,tristate = <TEGRA_PIN_DISABLE>; 555 nvidia,tristate = <TEGRA_PIN_ENABLE>;
573 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 556 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
574 }; 557 };
575 dap3_din_pp1 { 558 dap3_din_pp1 {
576 nvidia,pins = "dap3_din_pp1"; 559 nvidia,pins = "dap3_din_pp1";
577 nvidia,function = "i2s2"; 560 nvidia,function = "i2s2";
578 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 561 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
579 nvidia,tristate = <TEGRA_PIN_DISABLE>; 562 nvidia,tristate = <TEGRA_PIN_ENABLE>;
580 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 563 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
581 }; 564 };
582 dap3_dout_pp2 { 565 dap3_dout_pp2 {
583 nvidia,pins = "dap3_dout_pp2"; 566 nvidia,pins = "dap3_dout_pp2";
584 nvidia,function = "rsvd4";
585 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 567 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
586 nvidia,tristate = <TEGRA_PIN_DISABLE>; 568 nvidia,tristate = <TEGRA_PIN_DISABLE>;
587 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 569 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -595,91 +577,87 @@
595 }; 577 };
596 dap4_fs_pp4 { 578 dap4_fs_pp4 {
597 nvidia,pins = "dap4_fs_pp4"; 579 nvidia,pins = "dap4_fs_pp4";
598 nvidia,function = "i2s3"; 580 nvidia,function = "rsvd4";
599 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 581 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
600 nvidia,tristate = <TEGRA_PIN_DISABLE>; 582 nvidia,tristate = <TEGRA_PIN_ENABLE>;
601 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 583 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
602 }; 584 };
603 dap4_din_pp5 { 585 dap4_din_pp5 {
604 nvidia,pins = "dap4_din_pp5"; 586 nvidia,pins = "dap4_din_pp5";
605 nvidia,function = "i2s3"; 587 nvidia,function = "rsvd3";
606 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 588 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
607 nvidia,tristate = <TEGRA_PIN_DISABLE>; 589 nvidia,tristate = <TEGRA_PIN_ENABLE>;
608 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 590 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
609 }; 591 };
610 dap4_dout_pp6 { 592 dap4_dout_pp6 {
611 nvidia,pins = "dap4_dout_pp6"; 593 nvidia,pins = "dap4_dout_pp6";
612 nvidia,function = "i2s3"; 594 nvidia,function = "rsvd4";
613 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 595 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
614 nvidia,tristate = <TEGRA_PIN_DISABLE>; 596 nvidia,tristate = <TEGRA_PIN_ENABLE>;
615 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 597 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
616 }; 598 };
617 dap4_sclk_pp7 { 599 dap4_sclk_pp7 {
618 nvidia,pins = "dap4_sclk_pp7"; 600 nvidia,pins = "dap4_sclk_pp7";
619 nvidia,function = "i2s3"; 601 nvidia,function = "rsvd3";
620 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 602 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
621 nvidia,tristate = <TEGRA_PIN_DISABLE>; 603 nvidia,tristate = <TEGRA_PIN_ENABLE>;
622 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 604 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
623 }; 605 };
624 kb_col0_pq0 { 606 kb_col0_pq0 {
625 nvidia,pins = "kb_col0_pq0"; 607 nvidia,pins = "kb_col0_pq0";
626 nvidia,function = "rsvd2";
627 nvidia,pull = <TEGRA_PIN_PULL_UP>; 608 nvidia,pull = <TEGRA_PIN_PULL_UP>;
628 nvidia,tristate = <TEGRA_PIN_DISABLE>; 609 nvidia,tristate = <TEGRA_PIN_ENABLE>;
629 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 610 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
630 }; 611 };
631 kb_col1_pq1 { 612 kb_col1_pq1 {
632 nvidia,pins = "kb_col1_pq1"; 613 nvidia,pins = "kb_col1_pq1";
633 nvidia,function = "rsvd2"; 614 nvidia,function = "rsvd2";
634 nvidia,pull = <TEGRA_PIN_PULL_UP>; 615 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
635 nvidia,tristate = <TEGRA_PIN_DISABLE>; 616 nvidia,tristate = <TEGRA_PIN_ENABLE>;
636 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 617 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
637 }; 618 };
638 kb_col2_pq2 { 619 kb_col2_pq2 {
639 nvidia,pins = "kb_col2_pq2"; 620 nvidia,pins = "kb_col2_pq2";
640 nvidia,function = "rsvd2"; 621 nvidia,function = "rsvd2";
641 nvidia,pull = <TEGRA_PIN_PULL_UP>; 622 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
642 nvidia,tristate = <TEGRA_PIN_DISABLE>; 623 nvidia,tristate = <TEGRA_PIN_ENABLE>;
643 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 624 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
644 }; 625 };
645 kb_col3_pq3 { 626 kb_col3_pq3 {
646 nvidia,pins = "kb_col3_pq3"; 627 nvidia,pins = "kb_col3_pq3";
647 nvidia,function = "kbc"; 628 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
648 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
649 nvidia,tristate = <TEGRA_PIN_ENABLE>; 629 nvidia,tristate = <TEGRA_PIN_ENABLE>;
650 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 630 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
651 }; 631 };
652 kb_col4_pq4 { 632 kb_col4_pq4 {
653 nvidia,pins = "kb_col4_pq4"; 633 nvidia,pins = "kb_col4_pq4";
654 nvidia,function = "sdmmc3"; 634 nvidia,function = "sdmmc3";
655 nvidia,pull = <TEGRA_PIN_PULL_UP>; 635 nvidia,pull = <TEGRA_PIN_PULL_UP>;
656 nvidia,tristate = <TEGRA_PIN_DISABLE>; 636 nvidia,tristate = <TEGRA_PIN_ENABLE>;
657 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 637 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
658 }; 638 };
659 kb_col5_pq5 { 639 kb_col5_pq5 {
660 nvidia,pins = "kb_col5_pq5"; 640 nvidia,pins = "kb_col5_pq5";
661 nvidia,function = "rsvd2"; 641 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
662 nvidia,pull = <TEGRA_PIN_PULL_UP>; 642 nvidia,tristate = <TEGRA_PIN_ENABLE>;
663 nvidia,tristate = <TEGRA_PIN_DISABLE>;
664 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 643 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
665 }; 644 };
666 kb_col6_pq6 { 645 kb_col6_pq6 {
667 nvidia,pins = "kb_col6_pq6"; 646 nvidia,pins = "kb_col6_pq6";
668 nvidia,function = "rsvd2"; 647 nvidia,function = "rsvd2";
669 nvidia,pull = <TEGRA_PIN_PULL_UP>; 648 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
670 nvidia,tristate = <TEGRA_PIN_DISABLE>; 649 nvidia,tristate = <TEGRA_PIN_ENABLE>;
671 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 650 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
672 }; 651 };
673 kb_col7_pq7 { 652 kb_col7_pq7 {
674 nvidia,pins = "kb_col7_pq7"; 653 nvidia,pins = "kb_col7_pq7";
675 nvidia,function = "rsvd2"; 654 nvidia,function = "rsvd2";
676 nvidia,pull = <TEGRA_PIN_PULL_UP>; 655 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
677 nvidia,tristate = <TEGRA_PIN_DISABLE>; 656 nvidia,tristate = <TEGRA_PIN_ENABLE>;
678 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 657 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
679 }; 658 };
680 kb_row0_pr0 { 659 kb_row0_pr0 {
681 nvidia,pins = "kb_row0_pr0"; 660 nvidia,pins = "kb_row0_pr0";
682 nvidia,function = "rsvd2";
683 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 661 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
684 nvidia,tristate = <TEGRA_PIN_DISABLE>; 662 nvidia,tristate = <TEGRA_PIN_DISABLE>;
685 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 663 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -687,121 +665,115 @@
687 kb_row1_pr1 { 665 kb_row1_pr1 {
688 nvidia,pins = "kb_row1_pr1"; 666 nvidia,pins = "kb_row1_pr1";
689 nvidia,function = "rsvd2"; 667 nvidia,function = "rsvd2";
690 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 668 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
691 nvidia,tristate = <TEGRA_PIN_DISABLE>; 669 nvidia,tristate = <TEGRA_PIN_ENABLE>;
692 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 670 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
693 }; 671 };
694 kb_row2_pr2 { 672 kb_row2_pr2 {
695 nvidia,pins = "kb_row2_pr2"; 673 nvidia,pins = "kb_row2_pr2";
696 nvidia,function = "rsvd2";
697 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 674 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
698 nvidia,tristate = <TEGRA_PIN_DISABLE>; 675 nvidia,tristate = <TEGRA_PIN_DISABLE>;
699 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 676 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
700 }; 677 };
701 kb_row3_pr3 { 678 kb_row3_pr3 {
702 nvidia,pins = "kb_row3_pr3"; 679 nvidia,pins = "kb_row3_pr3";
703 nvidia,function = "sys"; 680 nvidia,function = "kbc";
704 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 681 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
705 nvidia,tristate = <TEGRA_PIN_DISABLE>; 682 nvidia,tristate = <TEGRA_PIN_ENABLE>;
706 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 683 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
707 }; 684 };
708 kb_row4_pr4 { 685 kb_row4_pr4 {
709 nvidia,pins = "kb_row4_pr4"; 686 nvidia,pins = "kb_row4_pr4";
710 nvidia,function = "rsvd3"; 687 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
711 nvidia,pull = <TEGRA_PIN_PULL_UP>; 688 nvidia,tristate = <TEGRA_PIN_ENABLE>;
712 nvidia,tristate = <TEGRA_PIN_DISABLE>;
713 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 689 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
714 }; 690 };
715 kb_row5_pr5 { 691 kb_row5_pr5 {
716 nvidia,pins = "kb_row5_pr5"; 692 nvidia,pins = "kb_row5_pr5";
717 nvidia,function = "rsvd3"; 693 nvidia,function = "rsvd3";
718 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 694 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
719 nvidia,tristate = <TEGRA_PIN_DISABLE>; 695 nvidia,tristate = <TEGRA_PIN_ENABLE>;
720 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 696 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
721 }; 697 };
722 kb_row6_pr6 { 698 kb_row6_pr6 {
723 nvidia,pins = "kb_row6_pr6"; 699 nvidia,pins = "kb_row6_pr6";
724 nvidia,function = "displaya_alt"; 700 nvidia,function = "displaya_alt";
725 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 701 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
726 nvidia,tristate = <TEGRA_PIN_DISABLE>; 702 nvidia,tristate = <TEGRA_PIN_ENABLE>;
727 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 703 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
728 }; 704 };
729 kb_row7_pr7 { 705 kb_row7_pr7 {
730 nvidia,pins = "kb_row7_pr7"; 706 nvidia,pins = "kb_row7_pr7";
731 nvidia,function = "rsvd2"; 707 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
732 nvidia,pull = <TEGRA_PIN_PULL_UP>; 708 nvidia,tristate = <TEGRA_PIN_ENABLE>;
733 nvidia,tristate = <TEGRA_PIN_DISABLE>;
734 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 709 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
735 }; 710 };
736 kb_row8_ps0 { 711 kb_row8_ps0 {
737 nvidia,pins = "kb_row8_ps0"; 712 nvidia,pins = "kb_row8_ps0";
738 nvidia,function = "rsvd2"; 713 nvidia,function = "rsvd2";
739 nvidia,pull = <TEGRA_PIN_PULL_UP>; 714 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
740 nvidia,tristate = <TEGRA_PIN_DISABLE>; 715 nvidia,tristate = <TEGRA_PIN_ENABLE>;
741 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 716 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
742 }; 717 };
743 kb_row9_ps1 { 718 kb_row9_ps1 {
744 nvidia,pins = "kb_row9_ps1"; 719 nvidia,pins = "kb_row9_ps1";
745 nvidia,function = "rsvd2"; 720 nvidia,function = "uarta";
746 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 721 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
747 nvidia,tristate = <TEGRA_PIN_DISABLE>; 722 nvidia,tristate = <TEGRA_PIN_DISABLE>;
748 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 723 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
749 }; 724 };
750 kb_row10_ps2 { 725 kb_row10_ps2 {
751 nvidia,pins = "kb_row10_ps2"; 726 nvidia,pins = "kb_row10_ps2";
752 nvidia,function = "rsvd2"; 727 nvidia,function = "uarta";
753 nvidia,pull = <TEGRA_PIN_PULL_UP>; 728 nvidia,pull = <TEGRA_PIN_PULL_UP>;
754 nvidia,tristate = <TEGRA_PIN_DISABLE>; 729 nvidia,tristate = <TEGRA_PIN_ENABLE>;
755 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 730 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
756 }; 731 };
757 kb_row11_ps3 { 732 kb_row11_ps3 {
758 nvidia,pins = "kb_row11_ps3"; 733 nvidia,pins = "kb_row11_ps3";
759 nvidia,function = "rsvd2"; 734 nvidia,function = "rsvd2";
760 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 735 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
761 nvidia,tristate = <TEGRA_PIN_DISABLE>; 736 nvidia,tristate = <TEGRA_PIN_ENABLE>;
762 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 737 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
763 }; 738 };
764 kb_row12_ps4 { 739 kb_row12_ps4 {
765 nvidia,pins = "kb_row12_ps4"; 740 nvidia,pins = "kb_row12_ps4";
766 nvidia,function = "rsvd2"; 741 nvidia,function = "rsvd2";
767 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 742 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
768 nvidia,tristate = <TEGRA_PIN_DISABLE>; 743 nvidia,tristate = <TEGRA_PIN_ENABLE>;
769 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 744 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
770 }; 745 };
771 kb_row13_ps5 { 746 kb_row13_ps5 {
772 nvidia,pins = "kb_row13_ps5"; 747 nvidia,pins = "kb_row13_ps5";
773 nvidia,function = "rsvd2"; 748 nvidia,function = "rsvd2";
774 nvidia,pull = <TEGRA_PIN_PULL_UP>; 749 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
775 nvidia,tristate = <TEGRA_PIN_DISABLE>; 750 nvidia,tristate = <TEGRA_PIN_ENABLE>;
776 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 751 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
777 }; 752 };
778 kb_row14_ps6 { 753 kb_row14_ps6 {
779 nvidia,pins = "kb_row14_ps6"; 754 nvidia,pins = "kb_row14_ps6";
780 nvidia,function = "rsvd2"; 755 nvidia,function = "rsvd2";
781 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 756 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
782 nvidia,tristate = <TEGRA_PIN_DISABLE>; 757 nvidia,tristate = <TEGRA_PIN_ENABLE>;
783 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 758 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
784 }; 759 };
785 kb_row15_ps7 { 760 kb_row15_ps7 {
786 nvidia,pins = "kb_row15_ps7"; 761 nvidia,pins = "kb_row15_ps7";
787 nvidia,function = "soc"; 762 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
788 nvidia,pull = <TEGRA_PIN_PULL_UP>; 763 nvidia,tristate = <TEGRA_PIN_ENABLE>;
789 nvidia,tristate = <TEGRA_PIN_DISABLE>;
790 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 764 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
791 }; 765 };
792 kb_row16_pt0 { 766 kb_row16_pt0 {
793 nvidia,pins = "kb_row16_pt0"; 767 nvidia,pins = "kb_row16_pt0";
794 nvidia,function = "rsvd2";
795 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 768 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
796 nvidia,tristate = <TEGRA_PIN_DISABLE>; 769 nvidia,tristate = <TEGRA_PIN_DISABLE>;
797 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 770 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
798 }; 771 };
799 kb_row17_pt1 { 772 kb_row17_pt1 {
800 nvidia,pins = "kb_row17_pt1"; 773 nvidia,pins = "kb_row17_pt1";
801 nvidia,function = "rsvd2";
802 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 774 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
803 nvidia,tristate = <TEGRA_PIN_DISABLE>; 775 nvidia,tristate = <TEGRA_PIN_ENABLE>;
804 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 776 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
805 }; 777 };
806 gen2_i2c_scl_pt5 { 778 gen2_i2c_scl_pt5 {
807 nvidia,pins = "gen2_i2c_scl_pt5"; 779 nvidia,pins = "gen2_i2c_scl_pt5";
@@ -828,72 +800,63 @@
828 }; 800 };
829 pu0 { 801 pu0 {
830 nvidia,pins = "pu0"; 802 nvidia,pins = "pu0";
831 nvidia,function = "rsvd4";
832 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 803 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
833 nvidia,tristate = <TEGRA_PIN_DISABLE>; 804 nvidia,tristate = <TEGRA_PIN_DISABLE>;
834 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 805 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
835 }; 806 };
836 pu1 { 807 pu1 {
837 nvidia,pins = "pu1"; 808 nvidia,pins = "pu1";
838 nvidia,function = "rsvd1"; 809 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
839 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
840 nvidia,tristate = <TEGRA_PIN_DISABLE>; 810 nvidia,tristate = <TEGRA_PIN_DISABLE>;
841 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 811 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
842 }; 812 };
843 pu2 { 813 pu2 {
844 nvidia,pins = "pu2"; 814 nvidia,pins = "pu2";
845 nvidia,function = "rsvd1"; 815 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
846 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
847 nvidia,tristate = <TEGRA_PIN_DISABLE>; 816 nvidia,tristate = <TEGRA_PIN_DISABLE>;
848 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 817 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
849 }; 818 };
850 pu3 { 819 pu3 {
851 nvidia,pins = "pu3"; 820 nvidia,pins = "pu3";
852 nvidia,function = "gmi";
853 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 821 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
854 nvidia,tristate = <TEGRA_PIN_DISABLE>; 822 nvidia,tristate = <TEGRA_PIN_DISABLE>;
855 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 823 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
856 }; 824 };
857 pu4 { 825 pu4 {
858 nvidia,pins = "pu4"; 826 nvidia,pins = "pu4";
859 nvidia,function = "gmi";
860 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 827 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
861 nvidia,tristate = <TEGRA_PIN_DISABLE>; 828 nvidia,tristate = <TEGRA_PIN_DISABLE>;
862 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 829 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
863 }; 830 };
864 pu5 { 831 pu5 {
865 nvidia,pins = "pu5"; 832 nvidia,pins = "pu5";
866 nvidia,function = "gmi"; 833 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
867 nvidia,pull = <TEGRA_PIN_PULL_UP>;
868 nvidia,tristate = <TEGRA_PIN_DISABLE>; 834 nvidia,tristate = <TEGRA_PIN_DISABLE>;
869 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 835 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
870 }; 836 };
871 pu6 { 837 pu6 {
872 nvidia,pins = "pu6"; 838 nvidia,pins = "pu6";
873 nvidia,function = "rsvd3"; 839 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
874 nvidia,pull = <TEGRA_PIN_PULL_UP>;
875 nvidia,tristate = <TEGRA_PIN_DISABLE>; 840 nvidia,tristate = <TEGRA_PIN_DISABLE>;
876 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 841 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
877 }; 842 };
878 pv0 { 843 pv0 {
879 nvidia,pins = "pv0"; 844 nvidia,pins = "pv0";
880 nvidia,function = "rsvd1"; 845 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
881 nvidia,pull = <TEGRA_PIN_PULL_UP>; 846 nvidia,tristate = <TEGRA_PIN_ENABLE>;
882 nvidia,tristate = <TEGRA_PIN_DISABLE>;
883 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 847 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
884 }; 848 };
885 pv1 { 849 pv1 {
886 nvidia,pins = "pv1"; 850 nvidia,pins = "pv1";
887 nvidia,function = "rsvd1"; 851 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
888 nvidia,pull = <TEGRA_PIN_PULL_UP>; 852 nvidia,tristate = <TEGRA_PIN_ENABLE>;
889 nvidia,tristate = <TEGRA_PIN_DISABLE>;
890 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 853 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
891 }; 854 };
892 sdmmc3_cd_n_pv2 { 855 sdmmc3_cd_n_pv2 {
893 nvidia,pins = "sdmmc3_cd_n_pv2"; 856 nvidia,pins = "sdmmc3_cd_n_pv2";
894 nvidia,function = "sdmmc3"; 857 nvidia,function = "sdmmc3";
895 nvidia,pull = <TEGRA_PIN_PULL_UP>; 858 nvidia,pull = <TEGRA_PIN_PULL_UP>;
896 nvidia,tristate = <TEGRA_PIN_DISABLE>; 859 nvidia,tristate = <TEGRA_PIN_ENABLE>;
897 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 860 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
898 }; 861 };
899 sdmmc1_wp_n_pv3 { 862 sdmmc1_wp_n_pv3 {
@@ -922,16 +885,16 @@
922 gpio_w2_aud_pw2 { 885 gpio_w2_aud_pw2 {
923 nvidia,pins = "gpio_w2_aud_pw2"; 886 nvidia,pins = "gpio_w2_aud_pw2";
924 nvidia,function = "rsvd2"; 887 nvidia,function = "rsvd2";
925 nvidia,pull = <TEGRA_PIN_PULL_UP>; 888 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
926 nvidia,tristate = <TEGRA_PIN_DISABLE>; 889 nvidia,tristate = <TEGRA_PIN_ENABLE>;
927 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 890 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
928 }; 891 };
929 gpio_w3_aud_pw3 { 892 gpio_w3_aud_pw3 {
930 nvidia,pins = "gpio_w3_aud_pw3"; 893 nvidia,pins = "gpio_w3_aud_pw3";
931 nvidia,function = "spi6"; 894 nvidia,function = "spi6";
932 nvidia,pull = <TEGRA_PIN_PULL_UP>; 895 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
933 nvidia,tristate = <TEGRA_PIN_DISABLE>; 896 nvidia,tristate = <TEGRA_PIN_ENABLE>;
934 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 897 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
935 }; 898 };
936 dap_mclk1_pw4 { 899 dap_mclk1_pw4 {
937 nvidia,pins = "dap_mclk1_pw4"; 900 nvidia,pins = "dap_mclk1_pw4";
@@ -949,17 +912,17 @@
949 }; 912 };
950 uart3_txd_pw6 { 913 uart3_txd_pw6 {
951 nvidia,pins = "uart3_txd_pw6"; 914 nvidia,pins = "uart3_txd_pw6";
952 nvidia,function = "uartc"; 915 nvidia,function = "rsvd2";
953 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 916 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
954 nvidia,tristate = <TEGRA_PIN_DISABLE>; 917 nvidia,tristate = <TEGRA_PIN_ENABLE>;
955 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 918 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
956 }; 919 };
957 uart3_rxd_pw7 { 920 uart3_rxd_pw7 {
958 nvidia,pins = "uart3_rxd_pw7"; 921 nvidia,pins = "uart3_rxd_pw7";
959 nvidia,function = "uartc"; 922 nvidia,function = "rsvd2";
960 nvidia,pull = <TEGRA_PIN_PULL_UP>; 923 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
961 nvidia,tristate = <TEGRA_PIN_DISABLE>; 924 nvidia,tristate = <TEGRA_PIN_ENABLE>;
962 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 925 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
963 }; 926 };
964 dvfs_pwm_px0 { 927 dvfs_pwm_px0 {
965 nvidia,pins = "dvfs_pwm_px0"; 928 nvidia,pins = "dvfs_pwm_px0";
@@ -970,10 +933,9 @@
970 }; 933 };
971 gpio_x1_aud_px1 { 934 gpio_x1_aud_px1 {
972 nvidia,pins = "gpio_x1_aud_px1"; 935 nvidia,pins = "gpio_x1_aud_px1";
973 nvidia,function = "rsvd2";
974 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 936 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
975 nvidia,tristate = <TEGRA_PIN_DISABLE>; 937 nvidia,tristate = <TEGRA_PIN_ENABLE>;
976 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 938 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
977 }; 939 };
978 dvfs_clk_px2 { 940 dvfs_clk_px2 {
979 nvidia,pins = "dvfs_clk_px2"; 941 nvidia,pins = "dvfs_clk_px2";
@@ -985,34 +947,32 @@
985 gpio_x3_aud_px3 { 947 gpio_x3_aud_px3 {
986 nvidia,pins = "gpio_x3_aud_px3"; 948 nvidia,pins = "gpio_x3_aud_px3";
987 nvidia,function = "rsvd4"; 949 nvidia,function = "rsvd4";
988 nvidia,pull = <TEGRA_PIN_PULL_UP>; 950 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
989 nvidia,tristate = <TEGRA_PIN_DISABLE>; 951 nvidia,tristate = <TEGRA_PIN_ENABLE>;
990 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 952 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
991 }; 953 };
992 gpio_x4_aud_px4 { 954 gpio_x4_aud_px4 {
993 nvidia,pins = "gpio_x4_aud_px4"; 955 nvidia,pins = "gpio_x4_aud_px4";
994 nvidia,function = "gmi";
995 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 956 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
996 nvidia,tristate = <TEGRA_PIN_DISABLE>; 957 nvidia,tristate = <TEGRA_PIN_ENABLE>;
997 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 958 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
998 }; 959 };
999 gpio_x5_aud_px5 { 960 gpio_x5_aud_px5 {
1000 nvidia,pins = "gpio_x5_aud_px5"; 961 nvidia,pins = "gpio_x5_aud_px5";
1001 nvidia,function = "rsvd4"; 962 nvidia,function = "rsvd4";
1002 nvidia,pull = <TEGRA_PIN_PULL_UP>; 963 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1003 nvidia,tristate = <TEGRA_PIN_DISABLE>; 964 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1004 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 965 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1005 }; 966 };
1006 gpio_x6_aud_px6 { 967 gpio_x6_aud_px6 {
1007 nvidia,pins = "gpio_x6_aud_px6"; 968 nvidia,pins = "gpio_x6_aud_px6";
1008 nvidia,function = "gmi"; 969 nvidia,function = "gmi";
1009 nvidia,pull = <TEGRA_PIN_PULL_UP>; 970 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1010 nvidia,tristate = <TEGRA_PIN_DISABLE>; 971 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1011 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 972 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1012 }; 973 };
1013 gpio_x7_aud_px7 { 974 gpio_x7_aud_px7 {
1014 nvidia,pins = "gpio_x7_aud_px7"; 975 nvidia,pins = "gpio_x7_aud_px7";
1015 nvidia,function = "rsvd1";
1016 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 976 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1017 nvidia,tristate = <TEGRA_PIN_DISABLE>; 977 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1018 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 978 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -1027,8 +987,8 @@
1027 ulpi_dir_py1 { 987 ulpi_dir_py1 {
1028 nvidia,pins = "ulpi_dir_py1"; 988 nvidia,pins = "ulpi_dir_py1";
1029 nvidia,function = "spi1"; 989 nvidia,function = "spi1";
1030 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 990 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1031 nvidia,tristate = <TEGRA_PIN_DISABLE>; 991 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1032 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 992 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1033 }; 993 };
1034 ulpi_nxt_py2 { 994 ulpi_nxt_py2 {
@@ -1048,44 +1008,44 @@
1048 sdmmc1_dat3_py4 { 1008 sdmmc1_dat3_py4 {
1049 nvidia,pins = "sdmmc1_dat3_py4"; 1009 nvidia,pins = "sdmmc1_dat3_py4";
1050 nvidia,function = "sdmmc1"; 1010 nvidia,function = "sdmmc1";
1051 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1011 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1052 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1012 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1053 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1013 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1054 }; 1014 };
1055 sdmmc1_dat2_py5 { 1015 sdmmc1_dat2_py5 {
1056 nvidia,pins = "sdmmc1_dat2_py5"; 1016 nvidia,pins = "sdmmc1_dat2_py5";
1057 nvidia,function = "sdmmc1"; 1017 nvidia,function = "sdmmc1";
1058 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1018 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1059 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1019 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1060 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1020 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1061 }; 1021 };
1062 sdmmc1_dat1_py6 { 1022 sdmmc1_dat1_py6 {
1063 nvidia,pins = "sdmmc1_dat1_py6"; 1023 nvidia,pins = "sdmmc1_dat1_py6";
1064 nvidia,function = "sdmmc1"; 1024 nvidia,function = "sdmmc1";
1065 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1025 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1066 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1026 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1067 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1027 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1068 }; 1028 };
1069 sdmmc1_dat0_py7 { 1029 sdmmc1_dat0_py7 {
1070 nvidia,pins = "sdmmc1_dat0_py7"; 1030 nvidia,pins = "sdmmc1_dat0_py7";
1071 nvidia,function = "sdmmc1"; 1031 nvidia,function = "rsvd2";
1072 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1032 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1073 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1033 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1074 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1034 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1075 }; 1035 };
1076 sdmmc1_clk_pz0 { 1036 sdmmc1_clk_pz0 {
1077 nvidia,pins = "sdmmc1_clk_pz0"; 1037 nvidia,pins = "sdmmc1_clk_pz0";
1078 nvidia,function = "sdmmc1"; 1038 nvidia,function = "rsvd3";
1079 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1039 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1080 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1040 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1081 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1041 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1082 }; 1042 };
1083 sdmmc1_cmd_pz1 { 1043 sdmmc1_cmd_pz1 {
1084 nvidia,pins = "sdmmc1_cmd_pz1"; 1044 nvidia,pins = "sdmmc1_cmd_pz1";
1085 nvidia,function = "sdmmc1"; 1045 nvidia,function = "sdmmc1";
1086 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1046 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1087 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1047 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1088 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1048 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1089 }; 1049 };
1090 pwr_i2c_scl_pz6 { 1050 pwr_i2c_scl_pz6 {
1091 nvidia,pins = "pwr_i2c_scl_pz6"; 1051 nvidia,pins = "pwr_i2c_scl_pz6";
@@ -1184,7 +1144,6 @@
1184 }; 1144 };
1185 pbb3 { 1145 pbb3 {
1186 nvidia,pins = "pbb3"; 1146 nvidia,pins = "pbb3";
1187 nvidia,function = "vgp3";
1188 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1147 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1189 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1148 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1190 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1149 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -1198,21 +1157,18 @@
1198 }; 1157 };
1199 pbb5 { 1158 pbb5 {
1200 nvidia,pins = "pbb5"; 1159 nvidia,pins = "pbb5";
1201 nvidia,function = "rsvd3";
1202 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1160 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1203 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1161 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1204 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1162 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1205 }; 1163 };
1206 pbb6 { 1164 pbb6 {
1207 nvidia,pins = "pbb6"; 1165 nvidia,pins = "pbb6";
1208 nvidia,function = "rsvd2";
1209 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1166 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1210 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1167 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1211 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1168 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1212 }; 1169 };
1213 pbb7 { 1170 pbb7 {
1214 nvidia,pins = "pbb7"; 1171 nvidia,pins = "pbb7";
1215 nvidia,function = "rsvd2";
1216 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1172 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1217 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1173 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1218 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1174 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -1226,15 +1182,13 @@
1226 }; 1182 };
1227 pcc1 { 1183 pcc1 {
1228 nvidia,pins = "pcc1"; 1184 nvidia,pins = "pcc1";
1229 nvidia,function = "rsvd2"; 1185 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1230 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1231 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1186 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1232 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1187 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1233 }; 1188 };
1234 pcc2 { 1189 pcc2 {
1235 nvidia,pins = "pcc2"; 1190 nvidia,pins = "pcc2";
1236 nvidia,function = "rsvd2"; 1191 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1237 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1238 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1192 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1239 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1193 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1240 }; 1194 };
@@ -1248,8 +1202,8 @@
1248 clk2_req_pcc5 { 1202 clk2_req_pcc5 {
1249 nvidia,pins = "clk2_req_pcc5"; 1203 nvidia,pins = "clk2_req_pcc5";
1250 nvidia,function = "rsvd2"; 1204 nvidia,function = "rsvd2";
1251 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1205 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1252 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1206 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1253 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1207 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1254 }; 1208 };
1255 pex_l0_rst_n_pdd1 { 1209 pex_l0_rst_n_pdd1 {
@@ -1262,15 +1216,15 @@
1262 pex_l0_clkreq_n_pdd2 { 1216 pex_l0_clkreq_n_pdd2 {
1263 nvidia,pins = "pex_l0_clkreq_n_pdd2"; 1217 nvidia,pins = "pex_l0_clkreq_n_pdd2";
1264 nvidia,function = "pe0"; 1218 nvidia,function = "pe0";
1265 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1219 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1266 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1220 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1267 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1221 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1268 }; 1222 };
1269 pex_wake_n_pdd3 { 1223 pex_wake_n_pdd3 {
1270 nvidia,pins = "pex_wake_n_pdd3"; 1224 nvidia,pins = "pex_wake_n_pdd3";
1271 nvidia,function = "pe"; 1225 nvidia,function = "pe";
1272 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1226 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1273 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1227 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1274 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1228 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1275 }; 1229 };
1276 pex_l1_rst_n_pdd5 { 1230 pex_l1_rst_n_pdd5 {
@@ -1283,8 +1237,8 @@
1283 pex_l1_clkreq_n_pdd6 { 1237 pex_l1_clkreq_n_pdd6 {
1284 nvidia,pins = "pex_l1_clkreq_n_pdd6"; 1238 nvidia,pins = "pex_l1_clkreq_n_pdd6";
1285 nvidia,function = "pe1"; 1239 nvidia,function = "pe1";
1286 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1240 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1287 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1241 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1288 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1242 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1289 }; 1243 };
1290 clk3_out_pee0 { 1244 clk3_out_pee0 {
@@ -1297,13 +1251,12 @@
1297 clk3_req_pee1 { 1251 clk3_req_pee1 {
1298 nvidia,pins = "clk3_req_pee1"; 1252 nvidia,pins = "clk3_req_pee1";
1299 nvidia,function = "rsvd2"; 1253 nvidia,function = "rsvd2";
1300 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1254 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1301 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1255 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1302 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1256 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1303 }; 1257 };
1304 dap_mclk1_req_pee2 { 1258 dap_mclk1_req_pee2 {
1305 nvidia,pins = "dap_mclk1_req_pee2"; 1259 nvidia,pins = "dap_mclk1_req_pee2";
1306 nvidia,function = "sata";
1307 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1260 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1308 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1261 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1309 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1262 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -1314,7 +1267,7 @@
1314 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1267 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1315 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1268 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1316 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1269 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1317 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 1270 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1318 }; 1271 };
1319 sdmmc3_clk_lb_out_pee4 { 1272 sdmmc3_clk_lb_out_pee4 {
1320 nvidia,pins = "sdmmc3_clk_lb_out_pee4"; 1273 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
@@ -1333,24 +1286,24 @@
1333 dp_hpd_pff0 { 1286 dp_hpd_pff0 {
1334 nvidia,pins = "dp_hpd_pff0"; 1287 nvidia,pins = "dp_hpd_pff0";
1335 nvidia,function = "dp"; 1288 nvidia,function = "dp";
1336 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1289 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1337 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1290 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1338 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1291 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1339 }; 1292 };
1340 usb_vbus_en2_pff1 { 1293 usb_vbus_en2_pff1 {
1341 nvidia,pins = "usb_vbus_en2_pff1"; 1294 nvidia,pins = "usb_vbus_en2_pff1";
1342 nvidia,function = "rsvd2"; 1295 nvidia,function = "rsvd2";
1343 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1296 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1344 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1297 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1345 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1298 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1346 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 1299 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1347 }; 1300 };
1348 pff2 { 1301 pff2 {
1349 nvidia,pins = "pff2"; 1302 nvidia,pins = "pff2";
1350 nvidia,function = "rsvd2"; 1303 nvidia,function = "rsvd2";
1351 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1304 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1352 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1305 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1353 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1306 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1354 nvidia,open-drain = <TEGRA_PIN_DISABLE>; 1307 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1355 }; 1308 };
1356 core_pwr_req { 1309 core_pwr_req {
@@ -1362,7 +1315,7 @@
1362 }; 1315 };
1363 cpu_pwr_req { 1316 cpu_pwr_req {
1364 nvidia,pins = "cpu_pwr_req"; 1317 nvidia,pins = "cpu_pwr_req";
1365 nvidia,function = "rsvd2"; 1318 nvidia,function = "cpu";
1366 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1319 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1367 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1320 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1368 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1321 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
@@ -1371,7 +1324,7 @@
1371 nvidia,pins = "pwr_int_n"; 1324 nvidia,pins = "pwr_int_n";
1372 nvidia,function = "pmi"; 1325 nvidia,function = "pmi";
1373 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1326 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1374 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1327 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1375 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1328 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1376 }; 1329 };
1377 reset_out_n { 1330 reset_out_n {
@@ -1379,7 +1332,7 @@
1379 nvidia,function = "reset_out_n"; 1332 nvidia,function = "reset_out_n";
1380 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1333 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1381 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1334 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1382 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1335 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1383 }; 1336 };
1384 owr { 1337 owr {
1385 nvidia,pins = "owr"; 1338 nvidia,pins = "owr";
@@ -1391,9 +1344,9 @@
1391 }; 1344 };
1392 clk_32k_in { 1345 clk_32k_in {
1393 nvidia,pins = "clk_32k_in"; 1346 nvidia,pins = "clk_32k_in";
1394 nvidia,function = "rsvd2"; 1347 nvidia,function = "clk";
1395 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1348 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1396 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1349 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1397 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1350 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1398 }; 1351 };
1399 jtag_rtck { 1352 jtag_rtck {
diff --git a/arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi b/arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi
new file mode 100644
index 000000000000..1a5748d05dda
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-nyan-big-emc.dtsi
@@ -0,0 +1,2023 @@
1/ {
2 clock@0,60006000 {
3 emc-timings-1 {
4 nvidia,ram-code = <1>;
5
6 timing-12750000 {
7 clock-frequency = <12750000>;
8 nvidia,parent-clock-frequency = <408000000>;
9 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
10 clock-names = "emc-parent";
11 };
12 timing-20400000 {
13 clock-frequency = <20400000>;
14 nvidia,parent-clock-frequency = <408000000>;
15 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
16 clock-names = "emc-parent";
17 };
18 timing-40800000 {
19 clock-frequency = <40800000>;
20 nvidia,parent-clock-frequency = <408000000>;
21 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
22 clock-names = "emc-parent";
23 };
24 timing-68000000 {
25 clock-frequency = <68000000>;
26 nvidia,parent-clock-frequency = <408000000>;
27 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
28 clock-names = "emc-parent";
29 };
30 timing-102000000 {
31 clock-frequency = <102000000>;
32 nvidia,parent-clock-frequency = <408000000>;
33 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
34 clock-names = "emc-parent";
35 };
36 timing-204000000 {
37 clock-frequency = <204000000>;
38 nvidia,parent-clock-frequency = <408000000>;
39 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
40 clock-names = "emc-parent";
41 };
42 timing-300000000 {
43 clock-frequency = <300000000>;
44 nvidia,parent-clock-frequency = <600000000>;
45 clocks = <&tegra_car TEGRA124_CLK_PLL_C>;
46 clock-names = "emc-parent";
47 };
48 timing-396000000 {
49 clock-frequency = <396000000>;
50 nvidia,parent-clock-frequency = <792000000>;
51 clocks = <&tegra_car TEGRA124_CLK_PLL_M>;
52 clock-names = "emc-parent";
53 };
54 /* TODO: Add 528MHz frequency */
55 timing-600000000 {
56 clock-frequency = <600000000>;
57 nvidia,parent-clock-frequency = <600000000>;
58 clocks = <&tegra_car TEGRA124_CLK_PLL_C_UD>;
59 clock-names = "emc-parent";
60 };
61 timing-792000000 {
62 clock-frequency = <792000000>;
63 nvidia,parent-clock-frequency = <792000000>;
64 clocks = <&tegra_car TEGRA124_CLK_PLL_M_UD>;
65 clock-names = "emc-parent";
66 };
67 };
68 };
69
70 emc@0,7001b000 {
71 emc-timings-1 {
72 nvidia,ram-code = <1>;
73
74 timing-12750000 {
75 clock-frequency = <12750000>;
76
77 nvidia,emc-auto-cal-config = <0xa1430000>;
78 nvidia,emc-auto-cal-config2 = <0x00000000>;
79 nvidia,emc-auto-cal-config3 = <0x00000000>;
80 nvidia,emc-auto-cal-interval = <0x001fffff>;
81 nvidia,emc-bgbias-ctl0 = <0x00000008>;
82 nvidia,emc-cfg = <0x73240000>;
83 nvidia,emc-cfg-2 = <0x000008c5>;
84 nvidia,emc-ctt-term-ctrl = <0x00000802>;
85 nvidia,emc-mode-1 = <0x80100003>;
86 nvidia,emc-mode-2 = <0x80200008>;
87 nvidia,emc-mode-4 = <0x00000000>;
88 nvidia,emc-mode-reset = <0x80001221>;
89 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
90 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
91 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
92 nvidia,emc-zcal-cnt-long = <0x00000042>;
93 nvidia,emc-zcal-interval = <0x00000000>;
94
95 nvidia,emc-configuration = <
96 0x00000000
97 0x00000003
98 0x00000000
99 0x00000000
100 0x00000000
101 0x00000004
102 0x0000000a
103 0x00000003
104 0x0000000b
105 0x00000000
106 0x00000000
107 0x00000003
108 0x00000003
109 0x00000000
110 0x00000006
111 0x00000006
112 0x00000006
113 0x00000002
114 0x00000000
115 0x00000005
116 0x00000005
117 0x00010000
118 0x00000003
119 0x00000000
120 0x00000000
121 0x00000000
122 0x00000000
123 0x00000004
124 0x0000000c
125 0x0000000d
126 0x0000000f
127 0x00000060
128 0x00000000
129 0x00000018
130 0x00000002
131 0x00000002
132 0x00000001
133 0x00000000
134 0x00000007
135 0x0000000f
136 0x00000005
137 0x00000005
138 0x00000004
139 0x00000005
140 0x00000004
141 0x00000000
142 0x00000000
143 0x00000005
144 0x00000005
145 0x00000064
146 0x00000000
147 0x00000000
148 0x00000000
149 0x106aa298
150 0x002c00a0
151 0x00008000
152 0x00064000
153 0x00064000
154 0x00064000
155 0x00064000
156 0x00064000
157 0x00064000
158 0x00064000
159 0x00064000
160 0x00064000
161 0x00064000
162 0x00064000
163 0x00064000
164 0x00064000
165 0x00064000
166 0x00064000
167 0x00064000
168 0x00000000
169 0x00000000
170 0x00000000
171 0x00000000
172 0x00000000
173 0x00000000
174 0x00000000
175 0x00000000
176 0x00000000
177 0x00000000
178 0x00004000
179 0x00000000
180 0x00000000
181 0x00004000
182 0x00000000
183 0x00000000
184 0x00000000
185 0x00000000
186 0x00000000
187 0x00000000
188 0x00000000
189 0x00000000
190 0x00000000
191 0x00000000
192 0x00000000
193 0x00000000
194 0x00000000
195 0x00000000
196 0x00000000
197 0x00000000
198 0x00000000
199 0x00000000
200 0x00000000
201 0x00000000
202 0x00000000
203 0x00000000
204 0x00000000
205 0x00000000
206 0x000fc000
207 0x000fc000
208 0x000fc000
209 0x000fc000
210 0x0000fc00
211 0x0000fc00
212 0x0000fc00
213 0x0000fc00
214 0x10000280
215 0x00000000
216 0x00111111
217 0x00000000
218 0x00000000
219 0x77ffc081
220 0x00000303
221 0x81f1f108
222 0x07070004
223 0x0000003f
224 0x016eeeee
225 0x51451400
226 0x00514514
227 0x00514514
228 0x51451400
229 0x0000003f
230 0x00000007
231 0x00000000
232 0x00000042
233 0x000c000c
234 0x00000000
235 0x00000003
236 0x0000f2f3
237 0x800001c5
238 0x0000000a
239 >;
240 };
241
242 timing-20400000 {
243 clock-frequency = <20400000>;
244
245 nvidia,emc-auto-cal-config = <0xa1430000>;
246 nvidia,emc-auto-cal-config2 = <0x00000000>;
247 nvidia,emc-auto-cal-config3 = <0x00000000>;
248 nvidia,emc-auto-cal-interval = <0x001fffff>;
249 nvidia,emc-bgbias-ctl0 = <0x00000008>;
250 nvidia,emc-cfg = <0x73240000>;
251 nvidia,emc-cfg-2 = <0x000008c5>;
252 nvidia,emc-ctt-term-ctrl = <0x00000802>;
253 nvidia,emc-mode-1 = <0x80100003>;
254 nvidia,emc-mode-2 = <0x80200008>;
255 nvidia,emc-mode-4 = <0x00000000>;
256 nvidia,emc-mode-reset = <0x80001221>;
257 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
258 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
259 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
260 nvidia,emc-zcal-cnt-long = <0x00000042>;
261 nvidia,emc-zcal-interval = <0x00000000>;
262
263 nvidia,emc-configuration = <
264 0x00000000
265 0x00000005
266 0x00000000
267 0x00000000
268 0x00000000
269 0x00000004
270 0x0000000a
271 0x00000003
272 0x0000000b
273 0x00000000
274 0x00000000
275 0x00000003
276 0x00000003
277 0x00000000
278 0x00000006
279 0x00000006
280 0x00000006
281 0x00000002
282 0x00000000
283 0x00000005
284 0x00000005
285 0x00010000
286 0x00000003
287 0x00000000
288 0x00000000
289 0x00000000
290 0x00000000
291 0x00000004
292 0x0000000c
293 0x0000000d
294 0x0000000f
295 0x0000009a
296 0x00000000
297 0x00000026
298 0x00000002
299 0x00000002
300 0x00000001
301 0x00000000
302 0x00000007
303 0x0000000f
304 0x00000006
305 0x00000006
306 0x00000004
307 0x00000005
308 0x00000004
309 0x00000000
310 0x00000000
311 0x00000005
312 0x00000005
313 0x000000a0
314 0x00000000
315 0x00000000
316 0x00000000
317 0x106aa298
318 0x002c00a0
319 0x00008000
320 0x00064000
321 0x00064000
322 0x00064000
323 0x00064000
324 0x00064000
325 0x00064000
326 0x00064000
327 0x00064000
328 0x00064000
329 0x00064000
330 0x00064000
331 0x00064000
332 0x00064000
333 0x00064000
334 0x00064000
335 0x00064000
336 0x00000000
337 0x00000000
338 0x00000000
339 0x00000000
340 0x00000000
341 0x00000000
342 0x00000000
343 0x00000000
344 0x00000000
345 0x00000000
346 0x00004000
347 0x00000000
348 0x00000000
349 0x00004000
350 0x00000000
351 0x00000000
352 0x00000000
353 0x00000000
354 0x00000000
355 0x00000000
356 0x00000000
357 0x00000000
358 0x00000000
359 0x00000000
360 0x00000000
361 0x00000000
362 0x00000000
363 0x00000000
364 0x00000000
365 0x00000000
366 0x00000000
367 0x00000000
368 0x00000000
369 0x00000000
370 0x00000000
371 0x00000000
372 0x00000000
373 0x00000000
374 0x000fc000
375 0x000fc000
376 0x000fc000
377 0x000fc000
378 0x0000fc00
379 0x0000fc00
380 0x0000fc00
381 0x0000fc00
382 0x10000280
383 0x00000000
384 0x00111111
385 0x00000000
386 0x00000000
387 0x77ffc081
388 0x00000303
389 0x81f1f108
390 0x07070004
391 0x0000003f
392 0x016eeeee
393 0x51451400
394 0x00514514
395 0x00514514
396 0x51451400
397 0x0000003f
398 0x0000000b
399 0x00000000
400 0x00000042
401 0x000c000c
402 0x00000000
403 0x00000003
404 0x0000f2f3
405 0x8000023a
406 0x0000000a
407 >;
408 };
409
410 timing-40800000 {
411 clock-frequency = <40800000>;
412
413 nvidia,emc-auto-cal-config = <0xa1430000>;
414 nvidia,emc-auto-cal-config2 = <0x00000000>;
415 nvidia,emc-auto-cal-config3 = <0x00000000>;
416 nvidia,emc-auto-cal-interval = <0x001fffff>;
417 nvidia,emc-bgbias-ctl0 = <0x00000008>;
418 nvidia,emc-cfg = <0x73240000>;
419 nvidia,emc-cfg-2 = <0x000008c5>;
420 nvidia,emc-ctt-term-ctrl = <0x00000802>;
421 nvidia,emc-mode-1 = <0x80100003>;
422 nvidia,emc-mode-2 = <0x80200008>;
423 nvidia,emc-mode-4 = <0x00000000>;
424 nvidia,emc-mode-reset = <0x80001221>;
425 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
426 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
427 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
428 nvidia,emc-zcal-cnt-long = <0x00000042>;
429 nvidia,emc-zcal-interval = <0x00000000>;
430
431 nvidia,emc-configuration = <
432 0x00000001
433 0x0000000a
434 0x00000000
435 0x00000001
436 0x00000000
437 0x00000004
438 0x0000000a
439 0x00000003
440 0x0000000b
441 0x00000000
442 0x00000000
443 0x00000003
444 0x00000003
445 0x00000000
446 0x00000006
447 0x00000006
448 0x00000006
449 0x00000002
450 0x00000000
451 0x00000005
452 0x00000005
453 0x00010000
454 0x00000003
455 0x00000000
456 0x00000000
457 0x00000000
458 0x00000000
459 0x00000004
460 0x0000000c
461 0x0000000d
462 0x0000000f
463 0x00000134
464 0x00000000
465 0x0000004d
466 0x00000002
467 0x00000002
468 0x00000001
469 0x00000000
470 0x00000008
471 0x0000000f
472 0x0000000c
473 0x0000000c
474 0x00000004
475 0x00000005
476 0x00000004
477 0x00000000
478 0x00000000
479 0x00000005
480 0x00000005
481 0x0000013f
482 0x00000000
483 0x00000000
484 0x00000000
485 0x106aa298
486 0x002c00a0
487 0x00008000
488 0x00064000
489 0x00064000
490 0x00064000
491 0x00064000
492 0x00064000
493 0x00064000
494 0x00064000
495 0x00064000
496 0x00064000
497 0x00064000
498 0x00064000
499 0x00064000
500 0x00064000
501 0x00064000
502 0x00064000
503 0x00064000
504 0x00000000
505 0x00000000
506 0x00000000
507 0x00000000
508 0x00000000
509 0x00000000
510 0x00000000
511 0x00000000
512 0x00000000
513 0x00000000
514 0x00004000
515 0x00000000
516 0x00000000
517 0x00004000
518 0x00000000
519 0x00000000
520 0x00000000
521 0x00000000
522 0x00000000
523 0x00000000
524 0x00000000
525 0x00000000
526 0x00000000
527 0x00000000
528 0x00000000
529 0x00000000
530 0x00000000
531 0x00000000
532 0x00000000
533 0x00000000
534 0x00000000
535 0x00000000
536 0x00000000
537 0x00000000
538 0x00000000
539 0x00000000
540 0x00000000
541 0x00000000
542 0x000fc000
543 0x000fc000
544 0x000fc000
545 0x000fc000
546 0x0000fc00
547 0x0000fc00
548 0x0000fc00
549 0x0000fc00
550 0x10000280
551 0x00000000
552 0x00111111
553 0x00000000
554 0x00000000
555 0x77ffc081
556 0x00000303
557 0x81f1f108
558 0x07070004
559 0x0000003f
560 0x016eeeee
561 0x51451400
562 0x00514514
563 0x00514514
564 0x51451400
565 0x0000003f
566 0x00000015
567 0x00000000
568 0x00000042
569 0x000c000c
570 0x00000000
571 0x00000003
572 0x0000f2f3
573 0x80000370
574 0x0000000a
575 >;
576 };
577
578 timing-68000000 {
579 clock-frequency = <68000000>;
580
581 nvidia,emc-auto-cal-config = <0xa1430000>;
582 nvidia,emc-auto-cal-config2 = <0x00000000>;
583 nvidia,emc-auto-cal-config3 = <0x00000000>;
584 nvidia,emc-auto-cal-interval = <0x001fffff>;
585 nvidia,emc-bgbias-ctl0 = <0x00000008>;
586 nvidia,emc-cfg = <0x73240000>;
587 nvidia,emc-cfg-2 = <0x000008c5>;
588 nvidia,emc-ctt-term-ctrl = <0x00000802>;
589 nvidia,emc-mode-1 = <0x80100003>;
590 nvidia,emc-mode-2 = <0x80200008>;
591 nvidia,emc-mode-4 = <0x00000000>;
592 nvidia,emc-mode-reset = <0x80001221>;
593 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
594 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
595 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
596 nvidia,emc-zcal-cnt-long = <0x00000042>;
597 nvidia,emc-zcal-interval = <0x00000000>;
598
599 nvidia,emc-configuration = <
600 0x00000003
601 0x00000011
602 0x00000000
603 0x00000002
604 0x00000000
605 0x00000004
606 0x0000000a
607 0x00000003
608 0x0000000b
609 0x00000000
610 0x00000000
611 0x00000003
612 0x00000003
613 0x00000000
614 0x00000006
615 0x00000006
616 0x00000006
617 0x00000002
618 0x00000000
619 0x00000005
620 0x00000005
621 0x00010000
622 0x00000003
623 0x00000000
624 0x00000000
625 0x00000000
626 0x00000000
627 0x00000004
628 0x0000000c
629 0x0000000d
630 0x0000000f
631 0x00000202
632 0x00000000
633 0x00000080
634 0x00000002
635 0x00000002
636 0x00000001
637 0x00000000
638 0x0000000f
639 0x0000000f
640 0x00000013
641 0x00000013
642 0x00000004
643 0x00000005
644 0x00000004
645 0x00000001
646 0x00000000
647 0x00000005
648 0x00000005
649 0x00000213
650 0x00000000
651 0x00000000
652 0x00000000
653 0x106aa298
654 0x002c00a0
655 0x00008000
656 0x00064000
657 0x00064000
658 0x00064000
659 0x00064000
660 0x00064000
661 0x00064000
662 0x00064000
663 0x00064000
664 0x00064000
665 0x00064000
666 0x00064000
667 0x00064000
668 0x00064000
669 0x00064000
670 0x00064000
671 0x00064000
672 0x00000000
673 0x00000000
674 0x00000000
675 0x00000000
676 0x00000000
677 0x00000000
678 0x00000000
679 0x00000000
680 0x00000000
681 0x00000000
682 0x00004000
683 0x00000000
684 0x00000000
685 0x00004000
686 0x00000000
687 0x00000000
688 0x00000000
689 0x00000000
690 0x00000000
691 0x00000000
692 0x00000000
693 0x00000000
694 0x00000000
695 0x00000000
696 0x00000000
697 0x00000000
698 0x00000000
699 0x00000000
700 0x00000000
701 0x00000000
702 0x00000000
703 0x00000000
704 0x00000000
705 0x00000000
706 0x00000000
707 0x00000000
708 0x00000000
709 0x00000000
710 0x000fc000
711 0x000fc000
712 0x000fc000
713 0x000fc000
714 0x0000fc00
715 0x0000fc00
716 0x0000fc00
717 0x0000fc00
718 0x10000280
719 0x00000000
720 0x00111111
721 0x00000000
722 0x00000000
723 0x77ffc081
724 0x00000303
725 0x81f1f108
726 0x07070004
727 0x0000003f
728 0x016eeeee
729 0x51451400
730 0x00514514
731 0x00514514
732 0x51451400
733 0x0000003f
734 0x00000022
735 0x00000000
736 0x00000042
737 0x000c000c
738 0x00000000
739 0x00000003
740 0x0000f2f3
741 0x8000050e
742 0x0000000a
743 >;
744 };
745
746 timing-102000000 {
747 clock-frequency = <102000000>;
748
749 nvidia,emc-auto-cal-config = <0xa1430000>;
750 nvidia,emc-auto-cal-config2 = <0x00000000>;
751 nvidia,emc-auto-cal-config3 = <0x00000000>;
752 nvidia,emc-auto-cal-interval = <0x001fffff>;
753 nvidia,emc-bgbias-ctl0 = <0x00000008>;
754 nvidia,emc-cfg = <0x73240000>;
755 nvidia,emc-cfg-2 = <0x000008c5>;
756 nvidia,emc-ctt-term-ctrl = <0x00000802>;
757 nvidia,emc-mode-1 = <0x80100003>;
758 nvidia,emc-mode-2 = <0x80200008>;
759 nvidia,emc-mode-4 = <0x00000000>;
760 nvidia,emc-mode-reset = <0x80001221>;
761 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
762 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
763 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
764 nvidia,emc-zcal-cnt-long = <0x00000042>;
765 nvidia,emc-zcal-interval = <0x00000000>;
766
767 nvidia,emc-configuration = <
768 0x00000004
769 0x0000001a
770 0x00000000
771 0x00000003
772 0x00000001
773 0x00000004
774 0x0000000a
775 0x00000003
776 0x0000000b
777 0x00000001
778 0x00000001
779 0x00000003
780 0x00000003
781 0x00000000
782 0x00000006
783 0x00000006
784 0x00000006
785 0x00000002
786 0x00000000
787 0x00000005
788 0x00000005
789 0x00010000
790 0x00000003
791 0x00000000
792 0x00000000
793 0x00000000
794 0x00000000
795 0x00000004
796 0x0000000c
797 0x0000000d
798 0x0000000f
799 0x00000304
800 0x00000000
801 0x000000c1
802 0x00000002
803 0x00000002
804 0x00000001
805 0x00000000
806 0x00000018
807 0x0000000f
808 0x0000001c
809 0x0000001c
810 0x00000004
811 0x00000005
812 0x00000004
813 0x00000003
814 0x00000000
815 0x00000005
816 0x00000005
817 0x0000031c
818 0x00000000
819 0x00000000
820 0x00000000
821 0x106aa298
822 0x002c00a0
823 0x00008000
824 0x00064000
825 0x00064000
826 0x00064000
827 0x00064000
828 0x00064000
829 0x00064000
830 0x00064000
831 0x00064000
832 0x00064000
833 0x00064000
834 0x00064000
835 0x00064000
836 0x00064000
837 0x00064000
838 0x00064000
839 0x00064000
840 0x00000000
841 0x00000000
842 0x00000000
843 0x00000000
844 0x00000000
845 0x00000000
846 0x00000000
847 0x00000000
848 0x00000000
849 0x00000000
850 0x00004000
851 0x00000000
852 0x00000000
853 0x00004000
854 0x00000000
855 0x00000000
856 0x00000000
857 0x00000000
858 0x00000000
859 0x00000000
860 0x00000000
861 0x00000000
862 0x00000000
863 0x00000000
864 0x00000000
865 0x00000000
866 0x00000000
867 0x00000000
868 0x00000000
869 0x00000000
870 0x00000000
871 0x00000000
872 0x00000000
873 0x00000000
874 0x00000000
875 0x00000000
876 0x00000000
877 0x00000000
878 0x000fc000
879 0x000fc000
880 0x000fc000
881 0x000fc000
882 0x0000fc00
883 0x0000fc00
884 0x0000fc00
885 0x0000fc00
886 0x10000280
887 0x00000000
888 0x00111111
889 0x00000000
890 0x00000000
891 0x77ffc081
892 0x00000303
893 0x81f1f108
894 0x07070004
895 0x0000003f
896 0x016eeeee
897 0x51451400
898 0x00514514
899 0x00514514
900 0x51451400
901 0x0000003f
902 0x00000033
903 0x00000000
904 0x00000042
905 0x000c000c
906 0x00000000
907 0x00000003
908 0x0000f2f3
909 0x80000713
910 0x0000000a
911 >;
912 };
913
914 timing-204000000 {
915 clock-frequency = <204000000>;
916
917 nvidia,emc-auto-cal-config = <0xa1430000>;
918 nvidia,emc-auto-cal-config2 = <0x00000000>;
919 nvidia,emc-auto-cal-config3 = <0x00000000>;
920 nvidia,emc-auto-cal-interval = <0x001fffff>;
921 nvidia,emc-bgbias-ctl0 = <0x00000008>;
922 nvidia,emc-cfg = <0x73240000>;
923 nvidia,emc-cfg-2 = <0x0000088d>;
924 nvidia,emc-ctt-term-ctrl = <0x00000802>;
925 nvidia,emc-mode-1 = <0x80100003>;
926 nvidia,emc-mode-2 = <0x80200008>;
927 nvidia,emc-mode-4 = <0x00000000>;
928 nvidia,emc-mode-reset = <0x80001221>;
929 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
930 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
931 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
932 nvidia,emc-zcal-cnt-long = <0x00000042>;
933 nvidia,emc-zcal-interval = <0x00020000>;
934
935 nvidia,emc-configuration = <
936 0x00000009
937 0x00000035
938 0x00000000
939 0x00000007
940 0x00000002
941 0x00000005
942 0x0000000a
943 0x00000003
944 0x0000000b
945 0x00000002
946 0x00000002
947 0x00000003
948 0x00000003
949 0x00000000
950 0x00000005
951 0x00000005
952 0x00000006
953 0x00000002
954 0x00000000
955 0x00000004
956 0x00000006
957 0x00010000
958 0x00000003
959 0x00000000
960 0x00000000
961 0x00000000
962 0x00000000
963 0x00000003
964 0x0000000d
965 0x0000000f
966 0x00000011
967 0x00000607
968 0x00000000
969 0x00000181
970 0x00000002
971 0x00000002
972 0x00000001
973 0x00000000
974 0x00000032
975 0x0000000f
976 0x00000038
977 0x00000038
978 0x00000004
979 0x00000005
980 0x00000004
981 0x00000007
982 0x00000000
983 0x00000005
984 0x00000005
985 0x00000638
986 0x00000000
987 0x00000000
988 0x00000000
989 0x106aa298
990 0x002c00a0
991 0x00008000
992 0x00064000
993 0x00064000
994 0x00064000
995 0x00064000
996 0x00064000
997 0x00064000
998 0x00064000
999 0x00064000
1000 0x00064000
1001 0x00064000
1002 0x00064000
1003 0x00064000
1004 0x00064000
1005 0x00064000
1006 0x00064000
1007 0x00064000
1008 0x00000000
1009 0x00000000
1010 0x00000000
1011 0x00000000
1012 0x00000000
1013 0x00000000
1014 0x00000000
1015 0x00000000
1016 0x00000000
1017 0x00000000
1018 0x00004000
1019 0x00000000
1020 0x00000000
1021 0x00004000
1022 0x00000000
1023 0x00000000
1024 0x00000000
1025 0x00000000
1026 0x00000000
1027 0x00000000
1028 0x00000000
1029 0x00000000
1030 0x00000000
1031 0x00000000
1032 0x00000000
1033 0x00000000
1034 0x00000000
1035 0x00000000
1036 0x00000000
1037 0x00000000
1038 0x00000000
1039 0x00000000
1040 0x00000000
1041 0x00000000
1042 0x00000000
1043 0x00000000
1044 0x00000000
1045 0x00000000
1046 0x00090000
1047 0x00090000
1048 0x00094000
1049 0x00094000
1050 0x00009400
1051 0x00009000
1052 0x00009000
1053 0x00009000
1054 0x10000280
1055 0x00000000
1056 0x00111111
1057 0x00000000
1058 0x00000000
1059 0x77ffc081
1060 0x00000303
1061 0x81f1f108
1062 0x07070004
1063 0x0000003f
1064 0x016eeeee
1065 0x51451400
1066 0x00514514
1067 0x00514514
1068 0x51451400
1069 0x0000003f
1070 0x00000066
1071 0x00000000
1072 0x00000100
1073 0x000c000c
1074 0x00000000
1075 0x00000003
1076 0x0000d2b3
1077 0x80000d22
1078 0x0000000a
1079 >;
1080 };
1081
1082 timing-300000000 {
1083 clock-frequency = <300000000>;
1084
1085 nvidia,emc-auto-cal-config = <0xa1430000>;
1086 nvidia,emc-auto-cal-config2 = <0x00000000>;
1087 nvidia,emc-auto-cal-config3 = <0x00000000>;
1088 nvidia,emc-auto-cal-interval = <0x001fffff>;
1089 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1090 nvidia,emc-cfg = <0x73340000>;
1091 nvidia,emc-cfg-2 = <0x000008d5>;
1092 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1093 nvidia,emc-mode-1 = <0x80100002>;
1094 nvidia,emc-mode-2 = <0x80200000>;
1095 nvidia,emc-mode-4 = <0x00000000>;
1096 nvidia,emc-mode-reset = <0x80000321>;
1097 nvidia,emc-mrs-wait-cnt = <0x0174000c>;
1098 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
1099 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1100 nvidia,emc-zcal-cnt-long = <0x00000042>;
1101 nvidia,emc-zcal-interval = <0x00020000>;
1102
1103 nvidia,emc-configuration = <
1104 0x0000000d
1105 0x0000004c
1106 0x00000000
1107 0x00000009
1108 0x00000003
1109 0x00000004
1110 0x00000008
1111 0x00000002
1112 0x00000009
1113 0x00000003
1114 0x00000003
1115 0x00000002
1116 0x00000002
1117 0x00000000
1118 0x00000003
1119 0x00000003
1120 0x00000005
1121 0x00000002
1122 0x00000000
1123 0x00000002
1124 0x00000007
1125 0x00020000
1126 0x00000003
1127 0x00000000
1128 0x00000000
1129 0x00000000
1130 0x00000000
1131 0x00000001
1132 0x0000000e
1133 0x00000010
1134 0x00000012
1135 0x000008e4
1136 0x00000000
1137 0x00000239
1138 0x00000001
1139 0x00000008
1140 0x00000001
1141 0x00000000
1142 0x0000004a
1143 0x0000000e
1144 0x00000051
1145 0x00000200
1146 0x00000004
1147 0x00000005
1148 0x00000004
1149 0x00000009
1150 0x00000000
1151 0x00000005
1152 0x00000005
1153 0x00000924
1154 0x00000000
1155 0x00000000
1156 0x00000000
1157 0x104ab098
1158 0x002c00a0
1159 0x00008000
1160 0x00030000
1161 0x00030000
1162 0x00030000
1163 0x00030000
1164 0x00030000
1165 0x00030000
1166 0x00030000
1167 0x00030000
1168 0x00030000
1169 0x00030000
1170 0x00030000
1171 0x00030000
1172 0x00030000
1173 0x00030000
1174 0x00030000
1175 0x00030000
1176 0x00000000
1177 0x00000000
1178 0x00000000
1179 0x00000000
1180 0x00000000
1181 0x00000000
1182 0x00000000
1183 0x00000000
1184 0x00098000
1185 0x00098000
1186 0x00000000
1187 0x00098000
1188 0x00098000
1189 0x00000000
1190 0x00000000
1191 0x00000000
1192 0x00000000
1193 0x00000000
1194 0x00000000
1195 0x00000000
1196 0x00000000
1197 0x00000000
1198 0x00000000
1199 0x00000000
1200 0x00000000
1201 0x00000000
1202 0x00000000
1203 0x00000000
1204 0x00000000
1205 0x00000000
1206 0x00000000
1207 0x00000000
1208 0x00000000
1209 0x00000000
1210 0x00000000
1211 0x00000000
1212 0x00000000
1213 0x00000000
1214 0x00060000
1215 0x00060000
1216 0x00060000
1217 0x00060000
1218 0x00006000
1219 0x00006000
1220 0x00006000
1221 0x00006000
1222 0x10000280
1223 0x00000000
1224 0x00111111
1225 0x00000000
1226 0x00000000
1227 0x77ffc081
1228 0x00000101
1229 0x81f1f108
1230 0x07070004
1231 0x00000000
1232 0x016eeeee
1233 0x51451420
1234 0x00514514
1235 0x00514514
1236 0x51451400
1237 0x0000003f
1238 0x00000096
1239 0x00000000
1240 0x00000100
1241 0x0174000c
1242 0x00000000
1243 0x00000003
1244 0x000052a3
1245 0x800012d7
1246 0x00000009
1247 >;
1248 };
1249
1250 timing-396000000 {
1251 clock-frequency = <396000000>;
1252
1253 nvidia,emc-auto-cal-config = <0xa1430000>;
1254 nvidia,emc-auto-cal-config2 = <0x00000000>;
1255 nvidia,emc-auto-cal-config3 = <0x00000000>;
1256 nvidia,emc-auto-cal-interval = <0x001fffff>;
1257 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1258 nvidia,emc-cfg = <0x73340000>;
1259 nvidia,emc-cfg-2 = <0x00000895>;
1260 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1261 nvidia,emc-mode-1 = <0x80100002>;
1262 nvidia,emc-mode-2 = <0x80200000>;
1263 nvidia,emc-mode-4 = <0x00000000>;
1264 nvidia,emc-mode-reset = <0x80000521>;
1265 nvidia,emc-mrs-wait-cnt = <0x015b000c>;
1266 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1267 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1268 nvidia,emc-zcal-cnt-long = <0x00000042>;
1269 nvidia,emc-zcal-interval = <0x00020000>;
1270
1271 nvidia,emc-configuration = <
1272 0x00000012
1273 0x00000065
1274 0x00000000
1275 0x0000000c
1276 0x00000004
1277 0x00000005
1278 0x00000008
1279 0x00000002
1280 0x0000000a
1281 0x00000004
1282 0x00000004
1283 0x00000002
1284 0x00000002
1285 0x00000000
1286 0x00000003
1287 0x00000003
1288 0x00000005
1289 0x00000002
1290 0x00000000
1291 0x00000001
1292 0x00000008
1293 0x00020000
1294 0x00000003
1295 0x00000000
1296 0x00000000
1297 0x00000000
1298 0x00000000
1299 0x00000000
1300 0x0000000f
1301 0x00000010
1302 0x00000012
1303 0x00000bd1
1304 0x00000000
1305 0x000002f4
1306 0x00000001
1307 0x00000008
1308 0x00000001
1309 0x00000000
1310 0x00000063
1311 0x0000000f
1312 0x0000006b
1313 0x00000200
1314 0x00000004
1315 0x00000005
1316 0x00000004
1317 0x0000000d
1318 0x00000000
1319 0x00000005
1320 0x00000005
1321 0x00000c11
1322 0x00000000
1323 0x00000000
1324 0x00000000
1325 0x104ab098
1326 0x002c00a0
1327 0x00008000
1328 0x00030000
1329 0x00030000
1330 0x00030000
1331 0x00030000
1332 0x00030000
1333 0x00030000
1334 0x00030000
1335 0x00030000
1336 0x00030000
1337 0x00030000
1338 0x00030000
1339 0x00030000
1340 0x00030000
1341 0x00030000
1342 0x00030000
1343 0x00030000
1344 0x00000000
1345 0x00000000
1346 0x00000000
1347 0x00000000
1348 0x00000000
1349 0x00000000
1350 0x00000000
1351 0x00000000
1352 0x00070000
1353 0x00070000
1354 0x00000000
1355 0x00070000
1356 0x00070000
1357 0x00000000
1358 0x00000000
1359 0x00000000
1360 0x00000000
1361 0x00000000
1362 0x00000000
1363 0x00000000
1364 0x00000000
1365 0x00000000
1366 0x00000000
1367 0x00000000
1368 0x00000000
1369 0x00000000
1370 0x00000000
1371 0x00000000
1372 0x00000000
1373 0x00000000
1374 0x00000000
1375 0x00000000
1376 0x00000000
1377 0x00000000
1378 0x00000000
1379 0x00000000
1380 0x00000000
1381 0x00000000
1382 0x00048000
1383 0x00048000
1384 0x00048000
1385 0x00048000
1386 0x00004800
1387 0x00004800
1388 0x00004800
1389 0x00004800
1390 0x10000280
1391 0x00000000
1392 0x00111111
1393 0x00000000
1394 0x00000000
1395 0x77ffc081
1396 0x00000101
1397 0x81f1f108
1398 0x07070004
1399 0x00000000
1400 0x016eeeee
1401 0x51451420
1402 0x00514514
1403 0x00514514
1404 0x51451400
1405 0x0000003f
1406 0x000000c6
1407 0x00000000
1408 0x00000100
1409 0x015b000c
1410 0x00000000
1411 0x00000003
1412 0x000052a3
1413 0x8000188b
1414 0x00000009
1415 >;
1416 };
1417
1418 timing-600000000 {
1419 clock-frequency = <600000000>;
1420
1421 nvidia,emc-auto-cal-config = <0xa1430000>;
1422 nvidia,emc-auto-cal-config2 = <0x00000000>;
1423 nvidia,emc-auto-cal-config3 = <0x00000000>;
1424 nvidia,emc-auto-cal-interval = <0x001fffff>;
1425 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1426 nvidia,emc-cfg = <0x73300000>;
1427 nvidia,emc-cfg-2 = <0x0000089d>;
1428 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1429 nvidia,emc-mode-1 = <0x80100002>;
1430 nvidia,emc-mode-2 = <0x80200010>;
1431 nvidia,emc-mode-4 = <0x00000000>;
1432 nvidia,emc-mode-reset = <0x80000b61>;
1433 nvidia,emc-mrs-wait-cnt = <0x0128000c>;
1434 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1435 nvidia,emc-xm2dqspadctrl2 = <0x0121113d>;
1436 nvidia,emc-zcal-cnt-long = <0x00000042>;
1437 nvidia,emc-zcal-interval = <0x00020000>;
1438
1439 nvidia,emc-configuration = <
1440 0x0000001c
1441 0x0000009a
1442 0x00000000
1443 0x00000013
1444 0x00000007
1445 0x00000007
1446 0x0000000b
1447 0x00000003
1448 0x00000010
1449 0x00000007
1450 0x00000007
1451 0x00000002
1452 0x00000002
1453 0x00000000
1454 0x00000005
1455 0x00000005
1456 0x0000000a
1457 0x00000002
1458 0x00000000
1459 0x00000003
1460 0x0000000b
1461 0x00070000
1462 0x00000003
1463 0x00000000
1464 0x00000000
1465 0x00000000
1466 0x00000000
1467 0x00000002
1468 0x00000012
1469 0x00000016
1470 0x00000018
1471 0x00001208
1472 0x00000000
1473 0x00000482
1474 0x00000002
1475 0x0000000d
1476 0x00000001
1477 0x00000000
1478 0x00000096
1479 0x00000015
1480 0x000000a2
1481 0x00000200
1482 0x00000004
1483 0x00000005
1484 0x00000004
1485 0x00000015
1486 0x00000000
1487 0x00000006
1488 0x00000006
1489 0x00001249
1490 0x00000000
1491 0x00000000
1492 0x00000000
1493 0x104ab098
1494 0xe00e00b1
1495 0x00008000
1496 0x0000000a
1497 0x0000000a
1498 0x0000000a
1499 0x0000000a
1500 0x0000000a
1501 0x0000000a
1502 0x0000000a
1503 0x0000000a
1504 0x0000000a
1505 0x0000000a
1506 0x0000000a
1507 0x0000000a
1508 0x0000000a
1509 0x0000000a
1510 0x0000000a
1511 0x0000000a
1512 0x00000000
1513 0x00000000
1514 0x00000000
1515 0x00000000
1516 0x00000000
1517 0x00000000
1518 0x00000000
1519 0x00000000
1520 0x00048000
1521 0x00048000
1522 0x00000000
1523 0x00048000
1524 0x00048000
1525 0x00000000
1526 0x00000000
1527 0x00000000
1528 0x00000000
1529 0x00000000
1530 0x00000000
1531 0x00000000
1532 0x00000000
1533 0x00000000
1534 0x00000004
1535 0x00000004
1536 0x00000002
1537 0x00000005
1538 0x00000006
1539 0x00000003
1540 0x00000006
1541 0x00000005
1542 0x00000004
1543 0x00000004
1544 0x00000002
1545 0x00000005
1546 0x00000006
1547 0x00000003
1548 0x00000006
1549 0x00000005
1550 0x0000000e
1551 0x0000000e
1552 0x0000000e
1553 0x0000000e
1554 0x0000000e
1555 0x0000000e
1556 0x0000000e
1557 0x0000000e
1558 0x100002a0
1559 0x00000000
1560 0x00111111
1561 0x00000000
1562 0x00000000
1563 0x77ffc085
1564 0x00000101
1565 0x81f1f108
1566 0x07070004
1567 0x00000000
1568 0x016eeeee
1569 0x51451420
1570 0x00514514
1571 0x00514514
1572 0x51451400
1573 0x0606003f
1574 0x00000000
1575 0x00000000
1576 0x00000100
1577 0x0128000c
1578 0x00000000
1579 0x00000003
1580 0x000040a0
1581 0x800024aa
1582 0x0000000e
1583 >;
1584 };
1585
1586 timing-792000000 {
1587 clock-frequency = <792000000>;
1588
1589 nvidia,emc-auto-cal-config = <0xa1430000>;
1590 nvidia,emc-auto-cal-config2 = <0x00000000>;
1591 nvidia,emc-auto-cal-config3 = <0x00000000>;
1592 nvidia,emc-auto-cal-interval = <0x001fffff>;
1593 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1594 nvidia,emc-cfg = <0x73300000>;
1595 nvidia,emc-cfg-2 = <0x0080089d>;
1596 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1597 nvidia,emc-mode-1 = <0x80100002>;
1598 nvidia,emc-mode-2 = <0x80200418>;
1599 nvidia,emc-mode-4 = <0x00000000>;
1600 nvidia,emc-mode-reset = <0x80000d71>;
1601 nvidia,emc-mrs-wait-cnt = <0x00f8000c>;
1602 nvidia,emc-sel-dpd-ctrl = <0x00040000>;
1603 nvidia,emc-xm2dqspadctrl2 = <0x0120113d>;
1604 nvidia,emc-zcal-cnt-long = <0x00000042>;
1605 nvidia,emc-zcal-interval = <0x00020000>;
1606
1607 nvidia,emc-configuration = <
1608 0x00000025
1609 0x000000cc
1610 0x00000000
1611 0x0000001a
1612 0x00000009
1613 0x00000008
1614 0x0000000d
1615 0x00000004
1616 0x00000013
1617 0x00000009
1618 0x00000009
1619 0x00000003
1620 0x00000002
1621 0x00000000
1622 0x00000006
1623 0x00000006
1624 0x0000000b
1625 0x00000002
1626 0x00000000
1627 0x00000002
1628 0x0000000d
1629 0x00080000
1630 0x00000004
1631 0x00000000
1632 0x00000000
1633 0x00000000
1634 0x00000000
1635 0x00000001
1636 0x00000014
1637 0x00000018
1638 0x0000001a
1639 0x000017e2
1640 0x00000000
1641 0x000005f8
1642 0x00000003
1643 0x00000011
1644 0x00000001
1645 0x00000000
1646 0x000000c6
1647 0x00000018
1648 0x000000d6
1649 0x00000200
1650 0x00000005
1651 0x00000006
1652 0x00000005
1653 0x0000001d
1654 0x00000000
1655 0x00000008
1656 0x00000008
1657 0x00001822
1658 0x00000000
1659 0x80000005
1660 0x00000000
1661 0x104ab198
1662 0xe00700b1
1663 0x00008000
1664 0x00000005
1665 0x00000005
1666 0x00000005
1667 0x00000005
1668 0x00000005
1669 0x00000005
1670 0x00000005
1671 0x00000005
1672 0x00000005
1673 0x00000005
1674 0x00000005
1675 0x00000005
1676 0x00000005
1677 0x00000005
1678 0x00000005
1679 0x00000005
1680 0x00000000
1681 0x00000000
1682 0x00000000
1683 0x00000000
1684 0x00000000
1685 0x00000000
1686 0x00000000
1687 0x00000000
1688 0x00034000
1689 0x00034000
1690 0x00000000
1691 0x00034000
1692 0x00034000
1693 0x00000000
1694 0x00000000
1695 0x00000000
1696 0x00000000
1697 0x00000000
1698 0x00000000
1699 0x00000000
1700 0x00000000
1701 0x00000000
1702 0x00000008
1703 0x00000008
1704 0x00000005
1705 0x00000009
1706 0x00000009
1707 0x00000007
1708 0x00000009
1709 0x00000008
1710 0x00000008
1711 0x00000008
1712 0x00000005
1713 0x00000009
1714 0x00000009
1715 0x00000007
1716 0x00000009
1717 0x00000008
1718 0x0000000a
1719 0x0000000a
1720 0x0000000a
1721 0x0000000a
1722 0x0000000a
1723 0x0000000a
1724 0x0000000a
1725 0x0000000a
1726 0x100002a0
1727 0x00000000
1728 0x00111111
1729 0x00000000
1730 0x00000000
1731 0x77ffc085
1732 0x00000101
1733 0x81f1f108
1734 0x07070004
1735 0x00000000
1736 0x016eeeee
1737 0x61861820
1738 0x00514514
1739 0x00514514
1740 0x61861800
1741 0x0606003f
1742 0x00000000
1743 0x00000000
1744 0x00000100
1745 0x00f8000c
1746 0x00000007
1747 0x00000004
1748 0x00004080
1749 0x80003012
1750 0x0000000f
1751 >;
1752 };
1753
1754 };
1755 };
1756
1757 memory-controller@0,70019000 {
1758 emc-timings-1 {
1759 nvidia,ram-code = <1>;
1760
1761
1762 timing-12750000 {
1763 clock-frequency = <12750000>;
1764
1765 nvidia,emem-configuration = <
1766 0x40040001
1767 0x8000000a
1768 0x00000001
1769 0x00000001
1770 0x00000002
1771 0x00000000
1772 0x00000002
1773 0x00000001
1774 0x00000002
1775 0x00000008
1776 0x00000003
1777 0x00000002
1778 0x00000003
1779 0x00000006
1780 0x06030203
1781 0x000a0402
1782 0x77e30303
1783 0x70000f03
1784 0x001f0000
1785 >;
1786 };
1787
1788 timing-20400000 {
1789 clock-frequency = <20400000>;
1790
1791 nvidia,emem-configuration = <
1792 0x40020001
1793 0x80000012
1794 0x00000001
1795 0x00000001
1796 0x00000002
1797 0x00000000
1798 0x00000002
1799 0x00000001
1800 0x00000002
1801 0x00000008
1802 0x00000003
1803 0x00000002
1804 0x00000003
1805 0x00000006
1806 0x06030203
1807 0x000a0402
1808 0x76230303
1809 0x70000f03
1810 0x001f0000
1811 >;
1812 };
1813
1814 timing-40800000 {
1815 clock-frequency = <40800000>;
1816
1817 nvidia,emem-configuration = <
1818 0xa0000001
1819 0x80000017
1820 0x00000001
1821 0x00000001
1822 0x00000002
1823 0x00000000
1824 0x00000002
1825 0x00000001
1826 0x00000002
1827 0x00000008
1828 0x00000003
1829 0x00000002
1830 0x00000003
1831 0x00000006
1832 0x06030203
1833 0x000a0402
1834 0x74a30303
1835 0x70000f03
1836 0x001f0000
1837 >;
1838 };
1839
1840 timing-68000000 {
1841 clock-frequency = <68000000>;
1842
1843 nvidia,emem-configuration = <
1844 0x00000001
1845 0x8000001e
1846 0x00000001
1847 0x00000001
1848 0x00000002
1849 0x00000000
1850 0x00000002
1851 0x00000001
1852 0x00000002
1853 0x00000008
1854 0x00000003
1855 0x00000002
1856 0x00000003
1857 0x00000006
1858 0x06030203
1859 0x000a0402
1860 0x74230403
1861 0x70000f03
1862 0x001f0000
1863 >;
1864 };
1865
1866 timing-102000000 {
1867 clock-frequency = <102000000>;
1868
1869 nvidia,emem-configuration = <
1870 0x08000001
1871 0x80000026
1872 0x00000001
1873 0x00000001
1874 0x00000003
1875 0x00000000
1876 0x00000002
1877 0x00000001
1878 0x00000002
1879 0x00000008
1880 0x00000003
1881 0x00000002
1882 0x00000003
1883 0x00000006
1884 0x06030203
1885 0x000a0403
1886 0x73c30504
1887 0x70000f03
1888 0x001f0000
1889 >;
1890 };
1891
1892 timing-204000000 {
1893 clock-frequency = <204000000>;
1894
1895 nvidia,emem-configuration = <
1896 0x01000003
1897 0x80000040
1898 0x00000001
1899 0x00000001
1900 0x00000005
1901 0x00000002
1902 0x00000004
1903 0x00000001
1904 0x00000002
1905 0x00000008
1906 0x00000003
1907 0x00000002
1908 0x00000004
1909 0x00000006
1910 0x06040203
1911 0x000a0405
1912 0x73840a06
1913 0x70000f03
1914 0x001f0000
1915 >;
1916 };
1917
1918 timing-300000000 {
1919 clock-frequency = <300000000>;
1920
1921 nvidia,emem-configuration = <
1922 0x08000004
1923 0x80000040
1924 0x00000001
1925 0x00000002
1926 0x00000007
1927 0x00000004
1928 0x00000005
1929 0x00000001
1930 0x00000002
1931 0x00000007
1932 0x00000002
1933 0x00000002
1934 0x00000004
1935 0x00000006
1936 0x06040202
1937 0x000b0607
1938 0x77450e08
1939 0x70000f03
1940 0x001f0000
1941 >;
1942 };
1943
1944 timing-396000000 {
1945 clock-frequency = <396000000>;
1946
1947 nvidia,emem-configuration = <
1948 0x0f000005
1949 0x80000040
1950 0x00000001
1951 0x00000002
1952 0x00000009
1953 0x00000005
1954 0x00000007
1955 0x00000001
1956 0x00000002
1957 0x00000008
1958 0x00000002
1959 0x00000002
1960 0x00000004
1961 0x00000006
1962 0x06040202
1963 0x000d0709
1964 0x7586120a
1965 0x70000f03
1966 0x001f0000
1967 >;
1968 };
1969
1970 timing-600000000 {
1971 clock-frequency = <600000000>;
1972
1973 nvidia,emem-configuration = <
1974 0x00000009
1975 0x80000040
1976 0x00000003
1977 0x00000004
1978 0x0000000e
1979 0x00000009
1980 0x0000000b
1981 0x00000001
1982 0x00000003
1983 0x0000000b
1984 0x00000002
1985 0x00000002
1986 0x00000005
1987 0x00000007
1988 0x07050202
1989 0x00130b0e
1990 0x73a91b0f
1991 0x70000f03
1992 0x001f0000
1993 >;
1994 };
1995
1996 timing-792000000 {
1997 clock-frequency = <792000000>;
1998
1999 nvidia,emem-configuration = <
2000 0x0e00000b
2001 0x80000040
2002 0x00000004
2003 0x00000005
2004 0x00000013
2005 0x0000000c
2006 0x0000000f
2007 0x00000002
2008 0x00000003
2009 0x0000000c
2010 0x00000002
2011 0x00000002
2012 0x00000006
2013 0x00000008
2014 0x08060202
2015 0x00160d13
2016 0x734c2414
2017 0x70000f02
2018 0x001f0000
2019 >;
2020 };
2021 };
2022 };
2023};
diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts
index 004e8e4e1c04..2d21253ea4e3 100644
--- a/arch/arm/boot/dts/tegra124-nyan-big.dts
+++ b/arch/arm/boot/dts/tegra124-nyan-big.dts
@@ -1,46 +1,29 @@
1/dts-v1/; 1/dts-v1/;
2 2
3#include <dt-bindings/input/input.h> 3#include "tegra124-nyan.dtsi"
4#include "tegra124.dtsi" 4
5#include "tegra124-nyan-big-emc.dtsi"
5 6
6/ { 7/ {
7 model = "Acer Chromebook 13 CB5-311"; 8 model = "Acer Chromebook 13 CB5-311";
8 compatible = "google,nyan-big", "nvidia,tegra124"; 9 compatible = "google,nyan-big", "nvidia,tegra124";
9 10
10 aliases { 11 panel: panel {
11 rtc0 = "/i2c@0,7000d000/pmic@40"; 12 compatible = "auo,b133xtn01";
12 rtc1 = "/rtc@0,7000e000";
13 serial0 = &uarta;
14 };
15 13
16 memory { 14 backlight = <&backlight>;
17 reg = <0x0 0x80000000 0x0 0x80000000>; 15 ddc-i2c-bus = <&dpaux>;
18 }; 16 };
19 17
20 host1x@0,50000000 { 18 sdhci@0,700b0400 { /* SD Card on this bus */
21 hdmi@0,54280000 { 19 wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
22 status = "okay"; 20 };
23
24 vdd-supply = <&vdd_3v3_hdmi>;
25 pll-supply = <&vdd_hdmi_pll>;
26 hdmi-supply = <&vdd_5v0_hdmi>;
27
28 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
29 nvidia,hpd-gpio =
30 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
31 };
32
33 sor@0,54540000 {
34 status = "okay";
35
36 nvidia,dpaux = <&dpaux>;
37 nvidia,panel = <&panel>;
38 };
39 21
40 dpaux@0,545c0000 { 22 sound {
41 vdd-supply = <&vdd_3v3_panel>; 23 compatible = "nvidia,tegra-audio-max98090-nyan-big",
42 status = "okay"; 24 "nvidia,tegra-audio-max98090-nyan",
43 }; 25 "nvidia,tegra-audio-max98090";
26 nvidia,model = "GoogleNyanBig";
44 }; 27 };
45 28
46 pinmux@0,70000868 { 29 pinmux@0,70000868 {
@@ -48,1092 +31,1308 @@
48 pinctrl-0 = <&pinmux_default>; 31 pinctrl-0 = <&pinmux_default>;
49 32
50 pinmux_default: common { 33 pinmux_default: common {
51 dap_mclk1_pw4 { 34 clk_32k_out_pa0 {
52 nvidia,pins = "dap_mclk1_pw4"; 35 nvidia,pins = "clk_32k_out_pa0";
53 nvidia,function = "extperiph1"; 36 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
37 nvidia,tristate = <TEGRA_PIN_DISABLE>;
38 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
39 };
40 uart3_cts_n_pa1 {
41 nvidia,pins = "uart3_cts_n_pa1";
42 nvidia,function = "gmi";
43 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
44 nvidia,tristate = <TEGRA_PIN_ENABLE>;
54 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 45 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
46 };
47 dap2_fs_pa2 {
48 nvidia,pins = "dap2_fs_pa2";
49 nvidia,function = "i2s1";
55 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 50 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
56 nvidia,tristate = <TEGRA_PIN_DISABLE>; 51 nvidia,tristate = <TEGRA_PIN_DISABLE>;
52 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
53 };
54 dap2_sclk_pa3 {
55 nvidia,pins = "dap2_sclk_pa3";
56 nvidia,function = "i2s1";
57 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
58 nvidia,tristate = <TEGRA_PIN_DISABLE>;
59 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
57 }; 60 };
58 dap2_din_pa4 { 61 dap2_din_pa4 {
59 nvidia,pins = "dap2_din_pa4"; 62 nvidia,pins = "dap2_din_pa4";
60 nvidia,function = "i2s1"; 63 nvidia,function = "i2s1";
61 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
62 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 64 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
63 nvidia,tristate = <TEGRA_PIN_DISABLE>; 65 nvidia,tristate = <TEGRA_PIN_DISABLE>;
66 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
64 }; 67 };
65 dap2_dout_pa5 { 68 dap2_dout_pa5 {
66 nvidia,pins = "dap2_dout_pa5", 69 nvidia,pins = "dap2_dout_pa5";
67 "dap2_fs_pa2",
68 "dap2_sclk_pa3";
69 nvidia,function = "i2s1"; 70 nvidia,function = "i2s1";
70 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
71 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 71 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
72 nvidia,tristate = <TEGRA_PIN_DISABLE>; 72 nvidia,tristate = <TEGRA_PIN_DISABLE>;
73 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
73 }; 74 };
74 dvfs_pwm_px0 { 75 sdmmc3_clk_pa6 {
75 nvidia,pins = "dvfs_pwm_px0", 76 nvidia,pins = "sdmmc3_clk_pa6";
76 "dvfs_clk_px2"; 77 nvidia,function = "sdmmc3";
77 nvidia,function = "cldvfs";
78 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
79 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 78 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
80 nvidia,tristate = <TEGRA_PIN_DISABLE>; 79 nvidia,tristate = <TEGRA_PIN_DISABLE>;
80 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
81 }; 81 };
82 ulpi_clk_py0 { 82 sdmmc3_cmd_pa7 {
83 nvidia,pins = "ulpi_clk_py0", 83 nvidia,pins = "sdmmc3_cmd_pa7";
84 "ulpi_nxt_py2", 84 nvidia,function = "sdmmc3";
85 "ulpi_stp_py3"; 85 nvidia,pull = <TEGRA_PIN_PULL_UP>;
86 nvidia,function = "spi1"; 86 nvidia,tristate = <TEGRA_PIN_DISABLE>;
87 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
88 };
89 pb0 {
90 nvidia,pins = "pb0";
91 nvidia,function = "rsvd2";
92 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
93 nvidia,tristate = <TEGRA_PIN_ENABLE>;
94 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
95 };
96 pb1 {
97 nvidia,pins = "pb1";
98 nvidia,function = "rsvd2";
99 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
100 nvidia,tristate = <TEGRA_PIN_ENABLE>;
87 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 101 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
102 };
103 sdmmc3_dat3_pb4 {
104 nvidia,pins = "sdmmc3_dat3_pb4";
105 nvidia,function = "sdmmc3";
106 nvidia,pull = <TEGRA_PIN_PULL_UP>;
107 nvidia,tristate = <TEGRA_PIN_DISABLE>;
108 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
109 };
110 sdmmc3_dat2_pb5 {
111 nvidia,pins = "sdmmc3_dat2_pb5";
112 nvidia,function = "sdmmc3";
113 nvidia,pull = <TEGRA_PIN_PULL_UP>;
114 nvidia,tristate = <TEGRA_PIN_DISABLE>;
115 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
116 };
117 sdmmc3_dat1_pb6 {
118 nvidia,pins = "sdmmc3_dat1_pb6";
119 nvidia,function = "sdmmc3";
120 nvidia,pull = <TEGRA_PIN_PULL_UP>;
121 nvidia,tristate = <TEGRA_PIN_DISABLE>;
122 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
123 };
124 sdmmc3_dat0_pb7 {
125 nvidia,pins = "sdmmc3_dat0_pb7";
126 nvidia,function = "sdmmc3";
127 nvidia,pull = <TEGRA_PIN_PULL_UP>;
128 nvidia,tristate = <TEGRA_PIN_DISABLE>;
129 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
130 };
131 uart3_rts_n_pc0 {
132 nvidia,pins = "uart3_rts_n_pc0";
133 nvidia,function = "gmi";
134 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
135 nvidia,tristate = <TEGRA_PIN_ENABLE>;
136 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
137 };
138 uart2_txd_pc2 {
139 nvidia,pins = "uart2_txd_pc2";
140 nvidia,function = "irda";
141 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
142 nvidia,tristate = <TEGRA_PIN_ENABLE>;
143 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
144 };
145 uart2_rxd_pc3 {
146 nvidia,pins = "uart2_rxd_pc3";
147 nvidia,function = "irda";
148 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
149 nvidia,tristate = <TEGRA_PIN_ENABLE>;
150 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
151 };
152 gen1_i2c_scl_pc4 {
153 nvidia,pins = "gen1_i2c_scl_pc4";
154 nvidia,function = "i2c1";
88 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 155 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
89 nvidia,tristate = <TEGRA_PIN_DISABLE>; 156 nvidia,tristate = <TEGRA_PIN_DISABLE>;
157 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
158 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
90 }; 159 };
91 ulpi_dir_py1 { 160 gen1_i2c_sda_pc5 {
92 nvidia,pins = "ulpi_dir_py1"; 161 nvidia,pins = "gen1_i2c_sda_pc5";
93 nvidia,function = "spi1"; 162 nvidia,function = "i2c1";
163 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
164 nvidia,tristate = <TEGRA_PIN_DISABLE>;
94 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 165 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
166 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
167 };
168 pc7 {
169 nvidia,pins = "pc7";
95 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 170 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
96 nvidia,tristate = <TEGRA_PIN_DISABLE>; 171 nvidia,tristate = <TEGRA_PIN_DISABLE>;
172 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
97 }; 173 };
98 cam_i2c_scl_pbb1 { 174 pg0 {
99 nvidia,pins = "cam_i2c_scl_pbb1", 175 nvidia,pins = "pg0";
100 "cam_i2c_sda_pbb2"; 176 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
101 nvidia,function = "i2c3"; 177 nvidia,tristate = <TEGRA_PIN_DISABLE>;
102 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 178 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
179 };
180 pg1 {
181 nvidia,pins = "pg1";
103 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 182 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
104 nvidia,tristate = <TEGRA_PIN_DISABLE>; 183 nvidia,tristate = <TEGRA_PIN_DISABLE>;
105 nvidia,lock = <TEGRA_PIN_DISABLE>; 184 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
106 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
107 }; 185 };
108 gen2_i2c_scl_pt5 { 186 pg2 {
109 nvidia,pins = "gen2_i2c_scl_pt5", 187 nvidia,pins = "pg2";
110 "gen2_i2c_sda_pt6"; 188 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
111 nvidia,function = "i2c2"; 189 nvidia,tristate = <TEGRA_PIN_DISABLE>;
112 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 190 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
191 };
192 pg3 {
193 nvidia,pins = "pg3";
113 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 194 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
114 nvidia,tristate = <TEGRA_PIN_DISABLE>; 195 nvidia,tristate = <TEGRA_PIN_DISABLE>;
115 nvidia,lock = <TEGRA_PIN_DISABLE>; 196 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
116 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
117 }; 197 };
118 pg4 { 198 pg4 {
119 nvidia,pins = "pg4", 199 nvidia,pins = "pg4";
120 "pg5", 200 nvidia,function = "spi4";
121 "pg6", 201 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
122 "pi3"; 202 nvidia,tristate = <TEGRA_PIN_DISABLE>;
203 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
204 };
205 pg5 {
206 nvidia,pins = "pg5";
123 nvidia,function = "spi4"; 207 nvidia,function = "spi4";
208 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
209 nvidia,tristate = <TEGRA_PIN_DISABLE>;
124 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 210 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
211 };
212 pg6 {
213 nvidia,pins = "pg6";
214 nvidia,function = "spi4";
125 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 215 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
126 nvidia,tristate = <TEGRA_PIN_DISABLE>; 216 nvidia,tristate = <TEGRA_PIN_DISABLE>;
217 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
127 }; 218 };
128 pg7 { 219 pg7 {
129 nvidia,pins = "pg7"; 220 nvidia,pins = "pg7";
130 nvidia,function = "spi4"; 221 nvidia,function = "spi4";
131 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
132 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 222 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
133 nvidia,tristate = <TEGRA_PIN_DISABLE>; 223 nvidia,tristate = <TEGRA_PIN_DISABLE>;
224 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
225 };
226 ph0 {
227 nvidia,pins = "ph0";
228 nvidia,function = "gmi";
229 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
230 nvidia,tristate = <TEGRA_PIN_ENABLE>;
231 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
134 }; 232 };
135 ph1 { 233 ph1 {
136 nvidia,pins = "ph1"; 234 nvidia,pins = "ph1";
137 nvidia,function = "pwm1"; 235 nvidia,function = "pwm1";
236 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
237 nvidia,tristate = <TEGRA_PIN_DISABLE>;
138 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 238 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
239 };
240 ph2 {
241 nvidia,pins = "ph2";
139 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 242 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
140 nvidia,tristate = <TEGRA_PIN_DISABLE>; 243 nvidia,tristate = <TEGRA_PIN_DISABLE>;
244 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
141 }; 245 };
142 pk0 { 246 ph3 {
143 nvidia,pins = "pk0", 247 nvidia,pins = "ph3";
144 "kb_row15_ps7", 248 nvidia,function = "gmi";
145 "clk_32k_out_pa0"; 249 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
146 nvidia,function = "soc"; 250 nvidia,tristate = <TEGRA_PIN_ENABLE>;
147 nvidia,pull = <TEGRA_PIN_PULL_UP>; 251 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
252 };
253 ph4 {
254 nvidia,pins = "ph4";
255 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
148 nvidia,tristate = <TEGRA_PIN_DISABLE>; 256 nvidia,tristate = <TEGRA_PIN_DISABLE>;
149 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 257 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
150 }; 258 };
151 sdmmc1_clk_pz0 { 259 ph5 {
152 nvidia,pins = "sdmmc1_clk_pz0"; 260 nvidia,pins = "ph5";
153 nvidia,function = "sdmmc1"; 261 nvidia,function = "rsvd2";
262 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
263 nvidia,tristate = <TEGRA_PIN_ENABLE>;
154 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 264 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
265 };
266 ph6 {
267 nvidia,pins = "ph6";
155 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 268 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
156 nvidia,tristate = <TEGRA_PIN_DISABLE>; 269 nvidia,tristate = <TEGRA_PIN_DISABLE>;
270 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
157 }; 271 };
158 sdmmc1_cmd_pz1 { 272 ph7 {
159 nvidia,pins = "sdmmc1_cmd_pz1", 273 nvidia,pins = "ph7";
160 "sdmmc1_dat0_py7", 274 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
161 "sdmmc1_dat1_py6", 275 nvidia,tristate = <TEGRA_PIN_DISABLE>;
162 "sdmmc1_dat2_py5", 276 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
163 "sdmmc1_dat3_py4"; 277 };
164 nvidia,function = "sdmmc1"; 278 pi0 {
279 nvidia,pins = "pi0";
280 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
281 nvidia,tristate = <TEGRA_PIN_DISABLE>;
282 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
283 };
284 pi1 {
285 nvidia,pins = "pi1";
286 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
287 nvidia,tristate = <TEGRA_PIN_DISABLE>;
165 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 288 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
289 };
290 pi2 {
291 nvidia,pins = "pi2";
292 nvidia,function = "rsvd4";
293 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
294 nvidia,tristate = <TEGRA_PIN_ENABLE>;
295 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
296 };
297 pi3 {
298 nvidia,pins = "pi3";
299 nvidia,function = "spi4";
300 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
301 nvidia,tristate = <TEGRA_PIN_DISABLE>;
302 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
303 };
304 pi4 {
305 nvidia,pins = "pi4";
306 nvidia,function = "gmi";
307 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
308 nvidia,tristate = <TEGRA_PIN_ENABLE>;
309 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
310 };
311 pi5 {
312 nvidia,pins = "pi5";
166 nvidia,pull = <TEGRA_PIN_PULL_UP>; 313 nvidia,pull = <TEGRA_PIN_PULL_UP>;
167 nvidia,tristate = <TEGRA_PIN_DISABLE>; 314 nvidia,tristate = <TEGRA_PIN_DISABLE>;
315 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
168 }; 316 };
169 sdmmc3_clk_pa6 { 317 pi6 {
170 nvidia,pins = "sdmmc3_clk_pa6"; 318 nvidia,pins = "pi6";
171 nvidia,function = "sdmmc3";
172 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
173 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 319 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
174 nvidia,tristate = <TEGRA_PIN_DISABLE>; 320 nvidia,tristate = <TEGRA_PIN_DISABLE>;
321 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
175 }; 322 };
176 sdmmc3_cmd_pa7 { 323 pi7 {
177 nvidia,pins = "sdmmc3_cmd_pa7", 324 nvidia,pins = "pi7";
178 "sdmmc3_dat0_pb7", 325 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
179 "sdmmc3_dat1_pb6", 326 nvidia,tristate = <TEGRA_PIN_DISABLE>;
180 "sdmmc3_dat2_pb5",
181 "sdmmc3_dat3_pb4",
182 "kb_col4_pq4",
183 "sdmmc3_clk_lb_out_pee4",
184 "sdmmc3_clk_lb_in_pee5",
185 "sdmmc3_cd_n_pv2";
186 nvidia,function = "sdmmc3";
187 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 327 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
328 };
329 pj0 {
330 nvidia,pins = "pj0";
188 nvidia,pull = <TEGRA_PIN_PULL_UP>; 331 nvidia,pull = <TEGRA_PIN_PULL_UP>;
189 nvidia,tristate = <TEGRA_PIN_DISABLE>; 332 nvidia,tristate = <TEGRA_PIN_DISABLE>;
333 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
190 }; 334 };
191 sdmmc4_clk_pcc4 { 335 pj2 {
192 nvidia,pins = "sdmmc4_clk_pcc4"; 336 nvidia,pins = "pj2";
193 nvidia,function = "sdmmc4"; 337 nvidia,function = "rsvd1";
338 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
339 nvidia,tristate = <TEGRA_PIN_ENABLE>;
340 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
341 };
342 uart2_cts_n_pj5 {
343 nvidia,pins = "uart2_cts_n_pj5";
344 nvidia,function = "gmi";
345 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
346 nvidia,tristate = <TEGRA_PIN_ENABLE>;
347 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
348 };
349 uart2_rts_n_pj6 {
350 nvidia,pins = "uart2_rts_n_pj6";
351 nvidia,function = "gmi";
352 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
353 nvidia,tristate = <TEGRA_PIN_ENABLE>;
354 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
355 };
356 pj7 {
357 nvidia,pins = "pj7";
358 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
359 nvidia,tristate = <TEGRA_PIN_DISABLE>;
194 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 360 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
361 };
362 pk0 {
363 nvidia,pins = "pk0";
364 nvidia,function = "rsvd1";
365 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
366 nvidia,tristate = <TEGRA_PIN_ENABLE>;
367 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
368 };
369 pk1 {
370 nvidia,pins = "pk1";
195 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 371 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
196 nvidia,tristate = <TEGRA_PIN_DISABLE>; 372 nvidia,tristate = <TEGRA_PIN_DISABLE>;
373 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
197 }; 374 };
198 sdmmc4_cmd_pt7 { 375 pk2 {
199 nvidia,pins = "sdmmc4_cmd_pt7", 376 nvidia,pins = "pk2";
200 "sdmmc4_dat0_paa0", 377 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
201 "sdmmc4_dat1_paa1", 378 nvidia,tristate = <TEGRA_PIN_DISABLE>;
202 "sdmmc4_dat2_paa2",
203 "sdmmc4_dat3_paa3",
204 "sdmmc4_dat4_paa4",
205 "sdmmc4_dat5_paa5",
206 "sdmmc4_dat6_paa6",
207 "sdmmc4_dat7_paa7";
208 nvidia,function = "sdmmc4";
209 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 379 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
380 };
381 pk3 {
382 nvidia,pins = "pk3";
383 nvidia,function = "gmi";
384 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
385 nvidia,tristate = <TEGRA_PIN_ENABLE>;
386 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
387 };
388 pk4 {
389 nvidia,pins = "pk4";
210 nvidia,pull = <TEGRA_PIN_PULL_UP>; 390 nvidia,pull = <TEGRA_PIN_PULL_UP>;
211 nvidia,tristate = <TEGRA_PIN_DISABLE>; 391 nvidia,tristate = <TEGRA_PIN_DISABLE>;
392 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
212 }; 393 };
213 pwr_i2c_scl_pz6 { 394 spdif_out_pk5 {
214 nvidia,pins = "pwr_i2c_scl_pz6", 395 nvidia,pins = "spdif_out_pk5";
215 "pwr_i2c_sda_pz7"; 396 nvidia,function = "rsvd2";
216 nvidia,function = "i2cpwr"; 397 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
398 nvidia,tristate = <TEGRA_PIN_ENABLE>;
399 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
400 };
401 spdif_in_pk6 {
402 nvidia,pins = "spdif_in_pk6";
403 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
404 nvidia,tristate = <TEGRA_PIN_DISABLE>;
405 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
406 };
407 pk7 {
408 nvidia,pins = "pk7";
409 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
410 nvidia,tristate = <TEGRA_PIN_DISABLE>;
217 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 411 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
412 };
413 dap1_fs_pn0 {
414 nvidia,pins = "dap1_fs_pn0";
415 nvidia,function = "rsvd4";
416 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
417 nvidia,tristate = <TEGRA_PIN_ENABLE>;
418 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
419 };
420 dap1_din_pn1 {
421 nvidia,pins = "dap1_din_pn1";
422 nvidia,function = "rsvd4";
423 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
424 nvidia,tristate = <TEGRA_PIN_ENABLE>;
425 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
426 };
427 dap1_dout_pn2 {
428 nvidia,pins = "dap1_dout_pn2";
429 nvidia,function = "i2s0";
430 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
431 nvidia,tristate = <TEGRA_PIN_ENABLE>;
432 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
433 };
434 dap1_sclk_pn3 {
435 nvidia,pins = "dap1_sclk_pn3";
436 nvidia,function = "rsvd4";
437 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
438 nvidia,tristate = <TEGRA_PIN_ENABLE>;
439 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
440 };
441 usb_vbus_en0_pn4 {
442 nvidia,pins = "usb_vbus_en0_pn4";
443 nvidia,function = "usb";
218 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 444 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
219 nvidia,tristate = <TEGRA_PIN_DISABLE>; 445 nvidia,tristate = <TEGRA_PIN_DISABLE>;
220 nvidia,lock = <TEGRA_PIN_DISABLE>; 446 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
221 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 447 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
222 }; 448 };
223 jtag_rtck { 449 usb_vbus_en1_pn5 {
224 nvidia,pins = "jtag_rtck"; 450 nvidia,pins = "usb_vbus_en1_pn5";
225 nvidia,function = "rtck"; 451 nvidia,function = "usb";
452 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
453 nvidia,tristate = <TEGRA_PIN_DISABLE>;
454 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
455 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
456 };
457 hdmi_int_pn7 {
458 nvidia,pins = "hdmi_int_pn7";
459 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
460 nvidia,tristate = <TEGRA_PIN_DISABLE>;
461 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
462 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
463 };
464 ulpi_data7_po0 {
465 nvidia,pins = "ulpi_data7_po0";
466 nvidia,function = "ulpi";
467 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
468 nvidia,tristate = <TEGRA_PIN_ENABLE>;
469 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
470 };
471 ulpi_data0_po1 {
472 nvidia,pins = "ulpi_data0_po1";
473 nvidia,function = "ulpi";
474 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
475 nvidia,tristate = <TEGRA_PIN_ENABLE>;
476 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
477 };
478 ulpi_data1_po2 {
479 nvidia,pins = "ulpi_data1_po2";
480 nvidia,function = "ulpi";
481 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
482 nvidia,tristate = <TEGRA_PIN_ENABLE>;
483 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
484 };
485 ulpi_data2_po3 {
486 nvidia,pins = "ulpi_data2_po3";
487 nvidia,function = "ulpi";
488 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
489 nvidia,tristate = <TEGRA_PIN_ENABLE>;
490 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
491 };
492 ulpi_data3_po4 {
493 nvidia,pins = "ulpi_data3_po4";
494 nvidia,function = "ulpi";
495 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
496 nvidia,tristate = <TEGRA_PIN_ENABLE>;
226 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 497 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
498 };
499 ulpi_data4_po5 {
500 nvidia,pins = "ulpi_data4_po5";
501 nvidia,function = "ulpi";
502 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
503 nvidia,tristate = <TEGRA_PIN_ENABLE>;
504 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
505 };
506 ulpi_data5_po6 {
507 nvidia,pins = "ulpi_data5_po6";
508 nvidia,function = "ulpi";
509 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
510 nvidia,tristate = <TEGRA_PIN_ENABLE>;
511 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
512 };
513 ulpi_data6_po7 {
514 nvidia,pins = "ulpi_data6_po7";
515 nvidia,function = "ulpi";
516 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
517 nvidia,tristate = <TEGRA_PIN_ENABLE>;
518 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
519 };
520 dap3_fs_pp0 {
521 nvidia,pins = "dap3_fs_pp0";
522 nvidia,function = "i2s2";
523 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
524 nvidia,tristate = <TEGRA_PIN_ENABLE>;
525 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
526 };
527 dap3_din_pp1 {
528 nvidia,pins = "dap3_din_pp1";
529 nvidia,function = "i2s2";
530 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
531 nvidia,tristate = <TEGRA_PIN_ENABLE>;
532 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
533 };
534 dap3_dout_pp2 {
535 nvidia,pins = "dap3_dout_pp2";
536 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
537 nvidia,tristate = <TEGRA_PIN_DISABLE>;
538 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
539 };
540 dap3_sclk_pp3 {
541 nvidia,pins = "dap3_sclk_pp3";
542 nvidia,function = "rsvd3";
543 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
544 nvidia,tristate = <TEGRA_PIN_ENABLE>;
545 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
546 };
547 dap4_fs_pp4 {
548 nvidia,pins = "dap4_fs_pp4";
549 nvidia,function = "rsvd4";
550 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
551 nvidia,tristate = <TEGRA_PIN_ENABLE>;
552 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
553 };
554 dap4_din_pp5 {
555 nvidia,pins = "dap4_din_pp5";
556 nvidia,function = "rsvd3";
557 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
558 nvidia,tristate = <TEGRA_PIN_ENABLE>;
559 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
560 };
561 dap4_dout_pp6 {
562 nvidia,pins = "dap4_dout_pp6";
563 nvidia,function = "rsvd4";
564 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
565 nvidia,tristate = <TEGRA_PIN_ENABLE>;
566 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
567 };
568 dap4_sclk_pp7 {
569 nvidia,pins = "dap4_sclk_pp7";
570 nvidia,function = "rsvd3";
571 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
572 nvidia,tristate = <TEGRA_PIN_ENABLE>;
573 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
574 };
575 kb_col0_pq0 {
576 nvidia,pins = "kb_col0_pq0";
577 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
578 nvidia,tristate = <TEGRA_PIN_DISABLE>;
579 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
580 };
581 kb_col1_pq1 {
582 nvidia,pins = "kb_col1_pq1";
583 nvidia,function = "rsvd2";
584 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
585 nvidia,tristate = <TEGRA_PIN_ENABLE>;
586 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
587 };
588 kb_col2_pq2 {
589 nvidia,pins = "kb_col2_pq2";
590 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
591 nvidia,tristate = <TEGRA_PIN_DISABLE>;
592 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
593 };
594 kb_col3_pq3 {
595 nvidia,pins = "kb_col3_pq3";
596 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
597 nvidia,tristate = <TEGRA_PIN_DISABLE>;
598 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
599 };
600 kb_col4_pq4 {
601 nvidia,pins = "kb_col4_pq4";
602 nvidia,function = "sdmmc3";
227 nvidia,pull = <TEGRA_PIN_PULL_UP>; 603 nvidia,pull = <TEGRA_PIN_PULL_UP>;
228 nvidia,tristate = <TEGRA_PIN_DISABLE>; 604 nvidia,tristate = <TEGRA_PIN_DISABLE>;
605 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
229 }; 606 };
230 clk_32k_in { 607 kb_col5_pq5 {
231 nvidia,pins = "clk_32k_in"; 608 nvidia,pins = "kb_col5_pq5";
232 nvidia,function = "clk"; 609 nvidia,function = "rsvd2";
610 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
611 nvidia,tristate = <TEGRA_PIN_ENABLE>;
612 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
613 };
614 kb_col6_pq6 {
615 nvidia,pins = "kb_col6_pq6";
616 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
617 nvidia,tristate = <TEGRA_PIN_DISABLE>;
233 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 618 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
619 };
620 kb_col7_pq7 {
621 nvidia,pins = "kb_col7_pq7";
234 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 622 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
235 nvidia,tristate = <TEGRA_PIN_DISABLE>; 623 nvidia,tristate = <TEGRA_PIN_DISABLE>;
624 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
236 }; 625 };
237 core_pwr_req { 626 kb_row0_pr0 {
238 nvidia,pins = "core_pwr_req"; 627 nvidia,pins = "kb_row0_pr0";
239 nvidia,function = "pwron"; 628 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
629 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 630 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
631 };
632 kb_row1_pr1 {
633 nvidia,pins = "kb_row1_pr1";
241 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 634 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
242 nvidia,tristate = <TEGRA_PIN_DISABLE>; 635 nvidia,tristate = <TEGRA_PIN_DISABLE>;
636 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
243 }; 637 };
244 cpu_pwr_req { 638 kb_row2_pr2 {
245 nvidia,pins = "cpu_pwr_req"; 639 nvidia,pins = "kb_row2_pr2";
246 nvidia,function = "cpu"; 640 nvidia,function = "rsvd2";
641 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
642 nvidia,tristate = <TEGRA_PIN_ENABLE>;
247 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 643 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
644 };
645 kb_row3_pr3 {
646 nvidia,pins = "kb_row3_pr3";
647 nvidia,function = "kbc";
648 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
649 nvidia,tristate = <TEGRA_PIN_ENABLE>;
650 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
651 };
652 kb_row4_pr4 {
653 nvidia,pins = "kb_row4_pr4";
248 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 654 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
249 nvidia,tristate = <TEGRA_PIN_DISABLE>; 655 nvidia,tristate = <TEGRA_PIN_DISABLE>;
656 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
250 }; 657 };
251 pwr_int_n { 658 kb_row5_pr5 {
252 nvidia,pins = "pwr_int_n"; 659 nvidia,pins = "kb_row5_pr5";
253 nvidia,function = "pmi"; 660 nvidia,function = "rsvd3";
661 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
662 nvidia,tristate = <TEGRA_PIN_ENABLE>;
663 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
664 };
665 kb_row6_pr6 {
666 nvidia,pins = "kb_row6_pr6";
667 nvidia,function = "kbc";
668 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
669 nvidia,tristate = <TEGRA_PIN_ENABLE>;
670 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
671 };
672 kb_row7_pr7 {
673 nvidia,pins = "kb_row7_pr7";
674 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
675 nvidia,tristate = <TEGRA_PIN_DISABLE>;
254 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 676 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
255 nvidia,pull = <TEGRA_PIN_PULL_UP>; 677 };
678 kb_row8_ps0 {
679 nvidia,pins = "kb_row8_ps0";
680 nvidia,function = "rsvd2";
681 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
682 nvidia,tristate = <TEGRA_PIN_ENABLE>;
683 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
684 };
685 kb_row9_ps1 {
686 nvidia,pins = "kb_row9_ps1";
687 nvidia,function = "uarta";
688 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
256 nvidia,tristate = <TEGRA_PIN_DISABLE>; 689 nvidia,tristate = <TEGRA_PIN_DISABLE>;
690 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
257 }; 691 };
258 reset_out_n { 692 kb_row10_ps2 {
259 nvidia,pins = "reset_out_n"; 693 nvidia,pins = "kb_row10_ps2";
260 nvidia,function = "reset_out_n"; 694 nvidia,function = "uarta";
695 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
696 nvidia,tristate = <TEGRA_PIN_DISABLE>;
697 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
698 };
699 kb_row11_ps3 {
700 nvidia,pins = "kb_row11_ps3";
701 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
702 nvidia,tristate = <TEGRA_PIN_DISABLE>;
261 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 703 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
704 };
705 kb_row12_ps4 {
706 nvidia,pins = "kb_row12_ps4";
262 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 707 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
263 nvidia,tristate = <TEGRA_PIN_DISABLE>; 708 nvidia,tristate = <TEGRA_PIN_DISABLE>;
709 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
264 }; 710 };
265 clk3_out_pee0 { 711 kb_row13_ps5 {
266 nvidia,pins = "clk3_out_pee0"; 712 nvidia,pins = "kb_row13_ps5";
267 nvidia,function = "extperiph3"; 713 nvidia,function = "rsvd2";
714 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
715 nvidia,tristate = <TEGRA_PIN_ENABLE>;
268 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 716 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
717 };
718 kb_row14_ps6 {
719 nvidia,pins = "kb_row14_ps6";
720 nvidia,function = "rsvd2";
721 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
722 nvidia,tristate = <TEGRA_PIN_ENABLE>;
723 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
724 };
725 kb_row15_ps7 {
726 nvidia,pins = "kb_row15_ps7";
269 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 727 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
270 nvidia,tristate = <TEGRA_PIN_DISABLE>; 728 nvidia,tristate = <TEGRA_PIN_DISABLE>;
729 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
271 }; 730 };
272 gen1_i2c_sda_pc5 { 731 kb_row16_pt0 {
273 nvidia,pins = "gen1_i2c_sda_pc5", 732 nvidia,pins = "kb_row16_pt0";
274 "gen1_i2c_scl_pc4"; 733 nvidia,function = "rsvd2";
275 nvidia,function = "i2c1"; 734 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
735 nvidia,tristate = <TEGRA_PIN_ENABLE>;
736 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
737 };
738 kb_row17_pt1 {
739 nvidia,pins = "kb_row17_pt1";
740 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
741 nvidia,tristate = <TEGRA_PIN_DISABLE>;
276 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 742 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
743 };
744 gen2_i2c_scl_pt5 {
745 nvidia,pins = "gen2_i2c_scl_pt5";
746 nvidia,function = "i2c2";
277 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 747 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
278 nvidia,tristate = <TEGRA_PIN_DISABLE>; 748 nvidia,tristate = <TEGRA_PIN_DISABLE>;
279 nvidia,lock = <TEGRA_PIN_DISABLE>; 749 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
280 nvidia,open-drain = <TEGRA_PIN_ENABLE>; 750 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
281 }; 751 };
282 hdmi_cec_pee3 { 752 gen2_i2c_sda_pt6 {
283 nvidia,pins = "hdmi_cec_pee3"; 753 nvidia,pins = "gen2_i2c_sda_pt6";
284 nvidia,function = "cec"; 754 nvidia,function = "i2c2";
755 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
756 nvidia,tristate = <TEGRA_PIN_DISABLE>;
285 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 757 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
758 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
759 };
760 sdmmc4_cmd_pt7 {
761 nvidia,pins = "sdmmc4_cmd_pt7";
762 nvidia,function = "sdmmc4";
286 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 763 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
287 nvidia,tristate = <TEGRA_PIN_DISABLE>; 764 nvidia,tristate = <TEGRA_PIN_DISABLE>;
288 nvidia,lock = <TEGRA_PIN_DISABLE>; 765 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
289 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
290 }; 766 };
291 hdmi_int_pn7 { 767 pu0 {
292 nvidia,pins = "hdmi_int_pn7"; 768 nvidia,pins = "pu0";
769 nvidia,function = "rsvd4";
770 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
771 nvidia,tristate = <TEGRA_PIN_ENABLE>;
772 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
773 };
774 pu1 {
775 nvidia,pins = "pu1";
776 nvidia,function = "rsvd1";
777 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
778 nvidia,tristate = <TEGRA_PIN_ENABLE>;
779 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
780 };
781 pu2 {
782 nvidia,pins = "pu2";
293 nvidia,function = "rsvd1"; 783 nvidia,function = "rsvd1";
784 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
785 nvidia,tristate = <TEGRA_PIN_ENABLE>;
786 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
787 };
788 pu3 {
789 nvidia,pins = "pu3";
790 nvidia,function = "gmi";
791 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
792 nvidia,tristate = <TEGRA_PIN_ENABLE>;
793 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
794 };
795 pu4 {
796 nvidia,pins = "pu4";
797 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
798 nvidia,tristate = <TEGRA_PIN_DISABLE>;
799 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
800 };
801 pu5 {
802 nvidia,pins = "pu5";
803 nvidia,pull = <TEGRA_PIN_PULL_UP>;
804 nvidia,tristate = <TEGRA_PIN_DISABLE>;
294 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 805 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
806 };
807 pu6 {
808 nvidia,pins = "pu6";
809 nvidia,pull = <TEGRA_PIN_PULL_UP>;
810 nvidia,tristate = <TEGRA_PIN_DISABLE>;
811 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
812 };
813 pv0 {
814 nvidia,pins = "pv0";
815 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
816 nvidia,tristate = <TEGRA_PIN_DISABLE>;
817 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
818 };
819 pv1 {
820 nvidia,pins = "pv1";
821 nvidia,function = "rsvd1";
295 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 822 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
823 nvidia,tristate = <TEGRA_PIN_ENABLE>;
824 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
825 };
826 sdmmc3_cd_n_pv2 {
827 nvidia,pins = "sdmmc3_cd_n_pv2";
828 nvidia,function = "sdmmc3";
829 nvidia,pull = <TEGRA_PIN_PULL_UP>;
296 nvidia,tristate = <TEGRA_PIN_DISABLE>; 830 nvidia,tristate = <TEGRA_PIN_DISABLE>;
831 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
832 };
833 sdmmc1_wp_n_pv3 {
834 nvidia,pins = "sdmmc1_wp_n_pv3";
835 nvidia,function = "sdmmc1";
836 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
837 nvidia,tristate = <TEGRA_PIN_ENABLE>;
838 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
297 }; 839 };
298 ddc_scl_pv4 { 840 ddc_scl_pv4 {
299 nvidia,pins = "ddc_scl_pv4", 841 nvidia,pins = "ddc_scl_pv4";
300 "ddc_sda_pv5";
301 nvidia,function = "i2c4"; 842 nvidia,function = "i2c4";
843 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
844 nvidia,tristate = <TEGRA_PIN_DISABLE>;
302 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 845 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
846 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
847 };
848 ddc_sda_pv5 {
849 nvidia,pins = "ddc_sda_pv5";
850 nvidia,function = "i2c4";
303 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 851 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
304 nvidia,tristate = <TEGRA_PIN_DISABLE>; 852 nvidia,tristate = <TEGRA_PIN_DISABLE>;
305 nvidia,lock = <TEGRA_PIN_DISABLE>; 853 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
306 nvidia,rcv-sel = <TEGRA_PIN_ENABLE>; 854 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
307 }; 855 };
308 kb_row10_ps2 { 856 gpio_w2_aud_pw2 {
309 nvidia,pins = "kb_row10_ps2"; 857 nvidia,pins = "gpio_w2_aud_pw2";
310 nvidia,function = "uarta"; 858 nvidia,function = "rsvd2";
311 nvidia,pull = <TEGRA_PIN_PULL_UP>; 859 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
860 nvidia,tristate = <TEGRA_PIN_ENABLE>;
861 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
862 };
863 gpio_w3_aud_pw3 {
864 nvidia,pins = "gpio_w3_aud_pw3";
865 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
312 nvidia,tristate = <TEGRA_PIN_DISABLE>; 866 nvidia,tristate = <TEGRA_PIN_DISABLE>;
313 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 867 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
314 }; 868 };
315 kb_row9_ps1 { 869 dap_mclk1_pw4 {
316 nvidia,pins = "kb_row9_ps1"; 870 nvidia,pins = "dap_mclk1_pw4";
317 nvidia,function = "uarta"; 871 nvidia,function = "extperiph1";
318 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 872 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
319 nvidia,tristate = <TEGRA_PIN_DISABLE>; 873 nvidia,tristate = <TEGRA_PIN_DISABLE>;
320 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 874 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
321 }; 875 };
322 usb_vbus_en0_pn4 { 876 clk2_out_pw5 {
323 nvidia,pins = "usb_vbus_en0_pn4", 877 nvidia,pins = "clk2_out_pw5";
324 "usb_vbus_en1_pn5"; 878 nvidia,function = "rsvd2";
325 nvidia,function = "usb"; 879 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
880 nvidia,tristate = <TEGRA_PIN_ENABLE>;
881 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
882 };
883 uart3_txd_pw6 {
884 nvidia,pins = "uart3_txd_pw6";
885 nvidia,function = "rsvd2";
886 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
887 nvidia,tristate = <TEGRA_PIN_ENABLE>;
888 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
889 };
890 uart3_rxd_pw7 {
891 nvidia,pins = "uart3_rxd_pw7";
892 nvidia,function = "rsvd2";
893 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
894 nvidia,tristate = <TEGRA_PIN_ENABLE>;
895 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
896 };
897 dvfs_pwm_px0 {
898 nvidia,pins = "dvfs_pwm_px0";
899 nvidia,function = "cldvfs";
900 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
901 nvidia,tristate = <TEGRA_PIN_DISABLE>;
902 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
903 };
904 gpio_x1_aud_px1 {
905 nvidia,pins = "gpio_x1_aud_px1";
906 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
907 nvidia,tristate = <TEGRA_PIN_DISABLE>;
326 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 908 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
909 };
910 dvfs_clk_px2 {
911 nvidia,pins = "dvfs_clk_px2";
912 nvidia,function = "cldvfs";
327 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 913 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
328 nvidia,tristate = <TEGRA_PIN_DISABLE>; 914 nvidia,tristate = <TEGRA_PIN_DISABLE>;
329 nvidia,lock = <TEGRA_PIN_DISABLE>; 915 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
330 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
331 }; 916 };
332 drive_sdio1 { 917 gpio_x3_aud_px3 {
333 nvidia,pins = "drive_sdio1"; 918 nvidia,pins = "gpio_x3_aud_px3";
334 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>; 919 nvidia,function = "rsvd4";
335 nvidia,schmitt = <TEGRA_PIN_DISABLE>; 920 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
336 nvidia,pull-down-strength = <36>; 921 nvidia,tristate = <TEGRA_PIN_ENABLE>;
337 nvidia,pull-up-strength = <20>; 922 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
338 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_SLOW>; 923 };
339 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_SLOW>; 924 gpio_x4_aud_px4 {
340 }; 925 nvidia,pins = "gpio_x4_aud_px4";
341 drive_sdio3 {
342 nvidia,pins = "drive_sdio3";
343 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
344 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
345 nvidia,pull-down-strength = <22>;
346 nvidia,pull-up-strength = <36>;
347 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
348 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
349 };
350 drive_gma {
351 nvidia,pins = "drive_gma";
352 nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
353 nvidia,schmitt = <TEGRA_PIN_DISABLE>;
354 nvidia,pull-down-strength = <2>;
355 nvidia,pull-up-strength = <1>;
356 nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
357 nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
358 nvidia,drive-type = <1>;
359 };
360 codec_irq_l {
361 nvidia,pins = "ph4";
362 nvidia,function = "gmi";
363 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 926 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
364 nvidia,tristate = <TEGRA_PIN_DISABLE>; 927 nvidia,tristate = <TEGRA_PIN_DISABLE>;
365 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 928 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
366 }; 929 };
367 lcd_bl_en { 930 gpio_x5_aud_px5 {
368 nvidia,pins = "ph2"; 931 nvidia,pins = "gpio_x5_aud_px5";
932 nvidia,function = "rsvd4";
933 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
934 nvidia,tristate = <TEGRA_PIN_ENABLE>;
935 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
936 };
937 gpio_x6_aud_px6 {
938 nvidia,pins = "gpio_x6_aud_px6";
369 nvidia,function = "gmi"; 939 nvidia,function = "gmi";
370 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 940 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
941 nvidia,tristate = <TEGRA_PIN_ENABLE>;
942 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
943 };
944 gpio_x7_aud_px7 {
945 nvidia,pins = "gpio_x7_aud_px7";
946 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
371 nvidia,tristate = <TEGRA_PIN_DISABLE>; 947 nvidia,tristate = <TEGRA_PIN_DISABLE>;
372 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 948 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
373 }; 949 };
374 touch_irq_l { 950 ulpi_clk_py0 {
375 nvidia,pins = "gpio_w3_aud_pw3"; 951 nvidia,pins = "ulpi_clk_py0";
376 nvidia,function = "spi6"; 952 nvidia,function = "spi1";
377 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 953 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
378 nvidia,tristate = <TEGRA_PIN_DISABLE>; 954 nvidia,tristate = <TEGRA_PIN_DISABLE>;
379 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 955 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
380 }; 956 };
381 tpm_davint_l { 957 ulpi_dir_py1 {
382 nvidia,pins = "ph6"; 958 nvidia,pins = "ulpi_dir_py1";
383 nvidia,function = "gmi"; 959 nvidia,function = "spi1";
384 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 960 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
385 nvidia,tristate = <TEGRA_PIN_DISABLE>; 961 nvidia,tristate = <TEGRA_PIN_DISABLE>;
386 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 962 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
387 }; 963 };
388 ts_irq_l { 964 ulpi_nxt_py2 {
389 nvidia,pins = "pk2"; 965 nvidia,pins = "ulpi_nxt_py2";
390 nvidia,function = "gmi"; 966 nvidia,function = "spi1";
391 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 967 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
392 nvidia,tristate = <TEGRA_PIN_DISABLE>; 968 nvidia,tristate = <TEGRA_PIN_DISABLE>;
393 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 969 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
394 }; 970 };
395 ts_reset_l { 971 ulpi_stp_py3 {
396 nvidia,pins = "pk4"; 972 nvidia,pins = "ulpi_stp_py3";
397 nvidia,function = "gmi"; 973 nvidia,function = "spi1";
398 nvidia,pull = <TEGRA_PIN_PULL_UP>; 974 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
399 nvidia,tristate = <TEGRA_PIN_DISABLE>; 975 nvidia,tristate = <TEGRA_PIN_DISABLE>;
400 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 976 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
401 }; 977 };
402 ts_shdn_l { 978 sdmmc1_dat3_py4 {
403 nvidia,pins = "pk1"; 979 nvidia,pins = "sdmmc1_dat3_py4";
404 nvidia,function = "gmi"; 980 nvidia,function = "sdmmc1";
405 nvidia,pull = <TEGRA_PIN_PULL_UP>; 981 nvidia,pull = <TEGRA_PIN_PULL_UP>;
406 nvidia,tristate = <TEGRA_PIN_DISABLE>; 982 nvidia,tristate = <TEGRA_PIN_DISABLE>;
407 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 983 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
408 }; 984 };
409 ph7 { 985 sdmmc1_dat2_py5 {
410 nvidia,pins = "ph7"; 986 nvidia,pins = "sdmmc1_dat2_py5";
411 nvidia,function = "gmi"; 987 nvidia,function = "sdmmc1";
412 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 988 nvidia,pull = <TEGRA_PIN_PULL_UP>;
413 nvidia,tristate = <TEGRA_PIN_DISABLE>; 989 nvidia,tristate = <TEGRA_PIN_DISABLE>;
414 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 990 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
415 }; 991 };
416 kb_col0_ap { 992 sdmmc1_dat1_py6 {
417 nvidia,pins = "kb_col0_pq0"; 993 nvidia,pins = "sdmmc1_dat1_py6";
418 nvidia,function = "rsvd4"; 994 nvidia,function = "sdmmc1";
419 nvidia,pull = <TEGRA_PIN_PULL_UP>; 995 nvidia,pull = <TEGRA_PIN_PULL_UP>;
420 nvidia,tristate = <TEGRA_PIN_DISABLE>; 996 nvidia,tristate = <TEGRA_PIN_DISABLE>;
421 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 997 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
422 }; 998 };
423 lid_open { 999 sdmmc1_dat0_py7 {
424 nvidia,pins = "kb_row4_pr4"; 1000 nvidia,pins = "sdmmc1_dat0_py7";
425 nvidia,function = "rsvd3"; 1001 nvidia,function = "sdmmc1";
426 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1002 nvidia,pull = <TEGRA_PIN_PULL_UP>;
427 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1003 nvidia,tristate = <TEGRA_PIN_DISABLE>;
428 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1004 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
429 }; 1005 };
430 en_vdd_sd { 1006 sdmmc1_clk_pz0 {
431 nvidia,pins = "kb_row0_pr0"; 1007 nvidia,pins = "sdmmc1_clk_pz0";
432 nvidia,function = "rsvd4"; 1008 nvidia,function = "sdmmc1";
433 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1009 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
434 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1010 nvidia,tristate = <TEGRA_PIN_DISABLE>;
435 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1011 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
436 }; 1012 };
437 ac_ok { 1013 sdmmc1_cmd_pz1 {
438 nvidia,pins = "pj0"; 1014 nvidia,pins = "sdmmc1_cmd_pz1";
439 nvidia,function = "gmi"; 1015 nvidia,function = "sdmmc1";
440 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1016 nvidia,pull = <TEGRA_PIN_PULL_UP>;
441 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1017 nvidia,tristate = <TEGRA_PIN_DISABLE>;
442 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1018 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
443 }; 1019 };
444 sensor_irq_l { 1020 pwr_i2c_scl_pz6 {
445 nvidia,pins = "pi6"; 1021 nvidia,pins = "pwr_i2c_scl_pz6";
446 nvidia,function = "gmi"; 1022 nvidia,function = "i2cpwr";
447 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1023 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
448 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1024 nvidia,tristate = <TEGRA_PIN_DISABLE>;
449 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1025 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1026 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
450 }; 1027 };
451 wifi_en { 1028 pwr_i2c_sda_pz7 {
452 nvidia,pins = "gpio_x7_aud_px7"; 1029 nvidia,pins = "pwr_i2c_sda_pz7";
453 nvidia,function = "rsvd4"; 1030 nvidia,function = "i2cpwr";
454 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1031 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
455 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1032 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1033 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1034 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1035 };
1036 sdmmc4_dat0_paa0 {
1037 nvidia,pins = "sdmmc4_dat0_paa0";
1038 nvidia,function = "sdmmc4";
1039 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1040 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1041 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1042 };
1043 sdmmc4_dat1_paa1 {
1044 nvidia,pins = "sdmmc4_dat1_paa1";
1045 nvidia,function = "sdmmc4";
1046 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1047 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1048 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1049 };
1050 sdmmc4_dat2_paa2 {
1051 nvidia,pins = "sdmmc4_dat2_paa2";
1052 nvidia,function = "sdmmc4";
1053 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1054 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1055 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1056 };
1057 sdmmc4_dat3_paa3 {
1058 nvidia,pins = "sdmmc4_dat3_paa3";
1059 nvidia,function = "sdmmc4";
1060 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1061 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1062 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1063 };
1064 sdmmc4_dat4_paa4 {
1065 nvidia,pins = "sdmmc4_dat4_paa4";
1066 nvidia,function = "sdmmc4";
1067 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1068 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1069 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1070 };
1071 sdmmc4_dat5_paa5 {
1072 nvidia,pins = "sdmmc4_dat5_paa5";
1073 nvidia,function = "sdmmc4";
1074 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1075 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1076 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1077 };
1078 sdmmc4_dat6_paa6 {
1079 nvidia,pins = "sdmmc4_dat6_paa6";
1080 nvidia,function = "sdmmc4";
1081 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1082 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1083 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1084 };
1085 sdmmc4_dat7_paa7 {
1086 nvidia,pins = "sdmmc4_dat7_paa7";
1087 nvidia,function = "sdmmc4";
1088 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1089 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1090 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1091 };
1092 pbb0 {
1093 nvidia,pins = "pbb0";
1094 nvidia,function = "vgp6";
1095 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1096 nvidia,tristate = <TEGRA_PIN_ENABLE>;
456 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1097 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
457 }; 1098 };
458 en_vdd_bl { 1099 cam_i2c_scl_pbb1 {
459 nvidia,pins = "dap3_dout_pp2"; 1100 nvidia,pins = "cam_i2c_scl_pbb1";
460 nvidia,function = "i2s2"; 1101 nvidia,function = "rsvd3";
1102 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1103 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1104 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1105 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1106 };
1107 cam_i2c_sda_pbb2 {
1108 nvidia,pins = "cam_i2c_sda_pbb2";
1109 nvidia,function = "rsvd3";
1110 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1111 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1112 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1113 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1114 };
1115 pbb3 {
1116 nvidia,pins = "pbb3";
1117 nvidia,function = "vgp3";
1118 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1119 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1120 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1121 };
1122 pbb4 {
1123 nvidia,pins = "pbb4";
1124 nvidia,function = "vgp4";
1125 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1126 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1127 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1128 };
1129 pbb5 {
1130 nvidia,pins = "pbb5";
1131 nvidia,function = "rsvd3";
1132 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1133 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1134 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1135 };
1136 pbb6 {
1137 nvidia,pins = "pbb6";
1138 nvidia,function = "rsvd2";
1139 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1140 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1141 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1142 };
1143 pbb7 {
1144 nvidia,pins = "pbb7";
1145 nvidia,function = "rsvd2";
1146 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1147 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1148 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1149 };
1150 cam_mclk_pcc0 {
1151 nvidia,pins = "cam_mclk_pcc0";
1152 nvidia,function = "vi";
1153 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1154 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1155 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1156 };
1157 pcc1 {
1158 nvidia,pins = "pcc1";
1159 nvidia,function = "rsvd2";
461 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1160 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1161 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1162 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1163 };
1164 pcc2 {
1165 nvidia,pins = "pcc2";
1166 nvidia,function = "rsvd2";
1167 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1168 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1169 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1170 };
1171 sdmmc4_clk_pcc4 {
1172 nvidia,pins = "sdmmc4_clk_pcc4";
1173 nvidia,function = "sdmmc4";
1174 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
462 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1175 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1176 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1177 };
1178 clk2_req_pcc5 {
1179 nvidia,pins = "clk2_req_pcc5";
1180 nvidia,function = "rsvd2";
1181 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1182 nvidia,tristate = <TEGRA_PIN_ENABLE>;
463 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1183 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
464 }; 1184 };
465 en_vdd_hdmi { 1185 pex_l0_rst_n_pdd1 {
466 nvidia,pins = "spdif_in_pk6"; 1186 nvidia,pins = "pex_l0_rst_n_pdd1";
467 nvidia,function = "spdif"; 1187 nvidia,function = "rsvd2";
1188 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1189 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1190 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1191 };
1192 pex_l0_clkreq_n_pdd2 {
1193 nvidia,pins = "pex_l0_clkreq_n_pdd2";
1194 nvidia,function = "rsvd2";
1195 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1196 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1197 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1198 };
1199 pex_wake_n_pdd3 {
1200 nvidia,pins = "pex_wake_n_pdd3";
1201 nvidia,function = "rsvd2";
1202 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1203 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1204 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1205 };
1206 pex_l1_rst_n_pdd5 {
1207 nvidia,pins = "pex_l1_rst_n_pdd5";
1208 nvidia,function = "rsvd2";
1209 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1210 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1211 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1212 };
1213 pex_l1_clkreq_n_pdd6 {
1214 nvidia,pins = "pex_l1_clkreq_n_pdd6";
1215 nvidia,function = "rsvd2";
1216 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1217 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1218 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1219 };
1220 clk3_out_pee0 {
1221 nvidia,pins = "clk3_out_pee0";
1222 nvidia,function = "rsvd2";
468 nvidia,pull = <TEGRA_PIN_PULL_DOWN>; 1223 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1224 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1225 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1226 };
1227 clk3_req_pee1 {
1228 nvidia,pins = "clk3_req_pee1";
1229 nvidia,function = "rsvd2";
1230 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1231 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1232 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1233 };
1234 dap_mclk1_req_pee2 {
1235 nvidia,pins = "dap_mclk1_req_pee2";
1236 nvidia,function = "rsvd4";
1237 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1238 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1239 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1240 };
1241 hdmi_cec_pee3 {
1242 nvidia,pins = "hdmi_cec_pee3";
1243 nvidia,function = "cec";
1244 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1245 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1246 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1247 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1248 };
1249 sdmmc3_clk_lb_out_pee4 {
1250 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
1251 nvidia,function = "sdmmc3";
1252 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
469 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1253 nvidia,tristate = <TEGRA_PIN_DISABLE>;
470 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1254 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
471 }; 1255 };
472 soc_warm_reset_l { 1256 sdmmc3_clk_lb_in_pee5 {
473 nvidia,pins = "pi5"; 1257 nvidia,pins = "sdmmc3_clk_lb_in_pee5";
474 nvidia,function = "gmi"; 1258 nvidia,function = "sdmmc3";
475 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1259 nvidia,pull = <TEGRA_PIN_PULL_UP>;
476 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1260 nvidia,tristate = <TEGRA_PIN_DISABLE>;
477 nvidia,enable-input = <TEGRA_PIN_DISABLE>; 1261 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
478 }; 1262 };
479 hp_det_l { 1263 dp_hpd_pff0 {
480 nvidia,pins = "pi7"; 1264 nvidia,pins = "dp_hpd_pff0";
481 nvidia,function = "rsvd1"; 1265 nvidia,function = "dp";
482 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1266 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
483 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1267 nvidia,tristate = <TEGRA_PIN_DISABLE>;
484 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1268 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
485 }; 1269 };
486 mic_det_l { 1270 usb_vbus_en2_pff1 {
487 nvidia,pins = "kb_row7_pr7"; 1271 nvidia,pins = "usb_vbus_en2_pff1";
488 nvidia,function = "rsvd2"; 1272 nvidia,function = "rsvd2";
489 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1273 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1274 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1275 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1276 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1277 };
1278 pff2 {
1279 nvidia,pins = "pff2";
1280 nvidia,function = "rsvd2";
1281 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1282 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1283 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1284 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1285 };
1286 core_pwr_req {
1287 nvidia,pins = "core_pwr_req";
1288 nvidia,function = "pwron";
1289 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1290 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1291 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1292 };
1293 cpu_pwr_req {
1294 nvidia,pins = "cpu_pwr_req";
1295 nvidia,function = "cpu";
1296 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1297 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1298 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1299 };
1300 pwr_int_n {
1301 nvidia,pins = "pwr_int_n";
1302 nvidia,function = "pmi";
1303 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
490 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1304 nvidia,tristate = <TEGRA_PIN_DISABLE>;
491 nvidia,enable-input = <TEGRA_PIN_ENABLE>; 1305 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
492 }; 1306 };
493 }; 1307 reset_out_n {
494 }; 1308 nvidia,pins = "reset_out_n";
495 1309 nvidia,function = "reset_out_n";
496 serial@0,70006000 { 1310 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
497 /* Debug connector on the bottom of the board near SD card. */ 1311 nvidia,tristate = <TEGRA_PIN_DISABLE>;
498 status = "okay"; 1312 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
499 };
500
501 pwm@0,7000a000 {
502 status = "okay";
503 };
504
505 i2c@0,7000c000 {
506 status = "okay";
507 clock-frequency = <100000>;
508
509 acodec: audio-codec@10 {
510 compatible = "maxim,max98090";
511 reg = <0x10>;
512 interrupt-parent = <&gpio>;
513 interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
514 };
515
516 temperature-sensor@4c {
517 compatible = "ti,tmp451";
518 reg = <0x4c>;
519 interrupt-parent = <&gpio>;
520 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
521
522 #thermal-sensor-cells = <1>;
523 };
524 };
525
526 i2c@0,7000c400 {
527 status = "okay";
528 clock-frequency = <100000>;
529 };
530
531 i2c@0,7000c500 {
532 status = "okay";
533 clock-frequency = <400000>;
534
535 tpm@20 {
536 compatible = "infineon,slb9645tt";
537 reg = <0x20>;
538 };
539 };
540
541 hdmi_ddc: i2c@0,7000c700 {
542 status = "okay";
543 clock-frequency = <100000>;
544 };
545
546 i2c@0,7000d000 {
547 status = "okay";
548 clock-frequency = <400000>;
549
550 pmic: pmic@40 {
551 compatible = "ams,as3722";
552 reg = <0x40>;
553 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
554
555 ams,system-power-controller;
556
557 #interrupt-cells = <2>;
558 interrupt-controller;
559
560 gpio-controller;
561 #gpio-cells = <2>;
562
563 pinctrl-names = "default";
564 pinctrl-0 = <&as3722_default>;
565
566 as3722_default: pinmux {
567 gpio0 {
568 pins = "gpio0";
569 function = "gpio";
570 bias-pull-down;
571 };
572
573 gpio1 {
574 pins = "gpio1";
575 function = "gpio";
576 bias-pull-up;
577 };
578
579 gpio2_4_7 {
580 pins = "gpio2", "gpio4", "gpio7";
581 function = "gpio";
582 bias-pull-up;
583 };
584
585 gpio3_6 {
586 pins = "gpio3", "gpio6";
587 bias-high-impedance;
588 };
589
590 gpio5 {
591 pins = "gpio5";
592 function = "clk32k-out";
593 bias-pull-down;
594 };
595 }; 1313 };
596 1314 owr {
597 regulators { 1315 nvidia,pins = "owr";
598 vsup-sd2-supply = <&vdd_5v0_sys>; 1316 nvidia,function = "rsvd2";
599 vsup-sd3-supply = <&vdd_5v0_sys>; 1317 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
600 vsup-sd4-supply = <&vdd_5v0_sys>; 1318 nvidia,tristate = <TEGRA_PIN_ENABLE>;
601 vsup-sd5-supply = <&vdd_5v0_sys>; 1319 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
602 vin-ldo0-supply = <&vdd_1v35_lp0>; 1320 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
603 vin-ldo1-6-supply = <&vdd_3v3_run>;
604 vin-ldo2-5-7-supply = <&vddio_1v8>;
605 vin-ldo3-4-supply = <&vdd_3v3_sys>;
606 vin-ldo9-10-supply = <&vdd_5v0_sys>;
607 vin-ldo11-supply = <&vdd_3v3_run>;
608
609 sd0 {
610 regulator-name = "+VDD_CPU_AP";
611 regulator-min-microvolt = <700000>;
612 regulator-max-microvolt = <1350000>;
613 regulator-min-microamp = <3500000>;
614 regulator-max-microamp = <3500000>;
615 regulator-always-on;
616 regulator-boot-on;
617 ams,ext-control = <2>;
618 };
619
620 sd1 {
621 regulator-name = "+VDD_CORE";
622 regulator-min-microvolt = <700000>;
623 regulator-max-microvolt = <1350000>;
624 regulator-min-microamp = <2500000>;
625 regulator-max-microamp = <4000000>;
626 regulator-always-on;
627 regulator-boot-on;
628 ams,ext-control = <1>;
629 };
630
631 vdd_1v35_lp0: sd2 {
632 regulator-name = "+1.35V_LP0(sd2)";
633 regulator-min-microvolt = <1350000>;
634 regulator-max-microvolt = <1350000>;
635 regulator-always-on;
636 regulator-boot-on;
637 };
638
639 sd3 {
640 regulator-name = "+1.35V_LP0(sd3)";
641 regulator-min-microvolt = <1350000>;
642 regulator-max-microvolt = <1350000>;
643 regulator-always-on;
644 regulator-boot-on;
645 };
646
647 vdd_1v05_run: sd4 {
648 regulator-name = "+1.05V_RUN";
649 regulator-min-microvolt = <1050000>;
650 regulator-max-microvolt = <1050000>;
651 };
652
653 vddio_1v8: sd5 {
654 regulator-name = "+1.8V_VDDIO";
655 regulator-min-microvolt = <1800000>;
656 regulator-max-microvolt = <1800000>;
657 regulator-boot-on;
658 regulator-always-on;
659 };
660
661 sd6 {
662 regulator-name = "+VDD_GPU_AP";
663 regulator-min-microvolt = <650000>;
664 regulator-max-microvolt = <1200000>;
665 regulator-min-microamp = <3500000>;
666 regulator-max-microamp = <3500000>;
667 regulator-boot-on;
668 regulator-always-on;
669 };
670
671 ldo0 {
672 regulator-name = "+1.05V_RUN_AVDD";
673 regulator-min-microvolt = <1050000>;
674 regulator-max-microvolt = <1050000>;
675 regulator-boot-on;
676 regulator-always-on;
677 ams,ext-control = <1>;
678 };
679
680 ldo1 {
681 regulator-name = "+1.8V_RUN_CAM";
682 regulator-min-microvolt = <1800000>;
683 regulator-max-microvolt = <1800000>;
684 };
685
686 ldo2 {
687 regulator-name = "+1.2V_GEN_AVDD";
688 regulator-min-microvolt = <1200000>;
689 regulator-max-microvolt = <1200000>;
690 regulator-boot-on;
691 regulator-always-on;
692 };
693
694 ldo3 {
695 regulator-name = "+1.00V_LP0_VDD_RTC";
696 regulator-min-microvolt = <1000000>;
697 regulator-max-microvolt = <1000000>;
698 regulator-boot-on;
699 regulator-always-on;
700 ams,enable-tracking;
701 };
702
703 vdd_run_cam: ldo4 {
704 regulator-name = "+3.3V_RUN_CAM";
705 regulator-min-microvolt = <2800000>;
706 regulator-max-microvolt = <2800000>;
707 };
708
709 ldo5 {
710 regulator-name = "+1.2V_RUN_CAM_FRONT";
711 regulator-min-microvolt = <1200000>;
712 regulator-max-microvolt = <1200000>;
713 };
714
715 vddio_sdmmc3: ldo6 {
716 regulator-name = "+VDDIO_SDMMC3";
717 regulator-min-microvolt = <1800000>;
718 regulator-max-microvolt = <3300000>;
719 };
720
721 ldo7 {
722 regulator-name = "+1.05V_RUN_CAM_REAR";
723 regulator-min-microvolt = <1050000>;
724 regulator-max-microvolt = <1050000>;
725 };
726
727 ldo9 {
728 regulator-name = "+2.8V_RUN_TOUCH";
729 regulator-min-microvolt = <2800000>;
730 regulator-max-microvolt = <2800000>;
731 };
732
733 ldo10 {
734 regulator-name = "+2.8V_RUN_CAM_AF";
735 regulator-min-microvolt = <2800000>;
736 regulator-max-microvolt = <2800000>;
737 };
738
739 ldo11 {
740 regulator-name = "+1.8V_RUN_VPP_FUSE";
741 regulator-min-microvolt = <1800000>;
742 regulator-max-microvolt = <1800000>;
743 };
744 }; 1321 };
745 }; 1322 clk_32k_in {
746 }; 1323 nvidia,pins = "clk_32k_in";
747 1324 nvidia,function = "clk";
748 spi@0,7000d400 { 1325 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
749 status = "okay"; 1326 nvidia,tristate = <TEGRA_PIN_DISABLE>;
750 1327 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
751 cros_ec: cros-ec@0 { 1328 };
752 compatible = "google,cros-ec-spi"; 1329 jtag_rtck {
753 spi-max-frequency = <3000000>; 1330 nvidia,pins = "jtag_rtck";
754 interrupt-parent = <&gpio>; 1331 nvidia,function = "rtck";
755 interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>; 1332 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
756 reg = <0>; 1333 nvidia,tristate = <TEGRA_PIN_DISABLE>;
757 1334 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
758 google,cros-ec-spi-msg-delay = <2000>;
759
760 i2c-tunnel {
761 compatible = "google,cros-ec-i2c-tunnel";
762 #address-cells = <1>;
763 #size-cells = <0>;
764
765 google,remote-bus = <0>;
766
767 charger: bq24735@9 {
768 compatible = "ti,bq24735";
769 reg = <0x9>;
770 interrupt-parent = <&gpio>;
771 interrupts = <TEGRA_GPIO(J, 0)
772 GPIO_ACTIVE_HIGH>;
773 ti,ac-detect-gpios = <&gpio
774 TEGRA_GPIO(J, 0)
775 GPIO_ACTIVE_HIGH>;
776 };
777
778 battery: sbs-battery@b {
779 compatible = "sbs,sbs-battery";
780 reg = <0xb>;
781 sbs,i2c-retry-count = <2>;
782 sbs,poll-retry-count = <10>;
783 power-supplies = <&charger>;
784 };
785 }; 1335 };
786 }; 1336 };
787 }; 1337 };
788
789 spi@0,7000da00 {
790 status = "okay";
791 spi-max-frequency = <25000000>;
792
793 flash@0 {
794 compatible = "winbond,w25q32dw";
795 reg = <0>;
796 };
797 };
798
799 pmc@0,7000e400 {
800 nvidia,invert-interrupt;
801 nvidia,suspend-mode = <0>;
802 nvidia,cpu-pwr-good-time = <500>;
803 nvidia,cpu-pwr-off-time = <300>;
804 nvidia,core-pwr-good-time = <641 3845>;
805 nvidia,core-pwr-off-time = <61036>;
806 nvidia,core-power-req-active-high;
807 nvidia,sys-clock-req-active-high;
808 };
809
810 hda@0,70030000 {
811 status = "okay";
812 };
813
814 sdhci@0,700b0000 { /* WiFi/BT on this bus */
815 status = "okay";
816 power-gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_HIGH>;
817 bus-width = <4>;
818 no-1-8-v;
819 non-removable;
820 };
821
822 sdhci@0,700b0400 { /* SD Card on this bus */
823 status = "okay";
824 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
825 power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
826 wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
827 bus-width = <4>;
828 no-1-8-v;
829 vqmmc-supply = <&vddio_sdmmc3>;
830 };
831
832 sdhci@0,700b0600 { /* eMMC on this bus */
833 status = "okay";
834 bus-width = <8>;
835 no-1-8-v;
836 non-removable;
837 };
838
839 ahub@0,70300000 {
840 i2s@0,70301100 {
841 status = "okay";
842 };
843 };
844
845 usb@0,7d000000 { /* Rear external USB port. */
846 status = "okay";
847 };
848
849 usb-phy@0,7d000000 {
850 status = "okay";
851 vbus-supply = <&vdd_usb1_vbus>;
852 };
853
854 usb@0,7d004000 { /* Internal webcam. */
855 status = "okay";
856 };
857
858 usb-phy@0,7d004000 {
859 status = "okay";
860 vbus-supply = <&vdd_run_cam>;
861 };
862
863 usb@0,7d008000 { /* Left external USB port. */
864 status = "okay";
865 };
866
867 usb-phy@0,7d008000 {
868 status = "okay";
869 vbus-supply = <&vdd_usb3_vbus>;
870 };
871
872 backlight: backlight {
873 compatible = "pwm-backlight";
874
875 enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
876 power-supply = <&vdd_led>;
877 pwms = <&pwm 1 1000000>;
878
879 default-brightness-level = <224>;
880 brightness-levels =
881 < 0 1 2 3 4 5 6 7
882 8 9 10 11 12 13 14 15
883 16 17 18 19 20 21 22 23
884 24 25 26 27 28 29 30 31
885 32 33 34 35 36 37 38 39
886 40 41 42 43 44 45 46 47
887 48 49 50 51 52 53 54 55
888 56 57 58 59 60 61 62 63
889 64 65 66 67 68 69 70 71
890 72 73 74 75 76 77 78 79
891 80 81 82 83 84 85 86 87
892 88 89 90 91 92 93 94 95
893 96 97 98 99 100 101 102 103
894 104 105 106 107 108 109 110 111
895 112 113 114 115 116 117 118 119
896 120 121 122 123 124 125 126 127
897 128 129 130 131 132 133 134 135
898 136 137 138 139 140 141 142 143
899 144 145 146 147 148 149 150 151
900 152 153 154 155 156 157 158 159
901 160 161 162 163 164 165 166 167
902 168 169 170 171 172 173 174 175
903 176 177 178 179 180 181 182 183
904 184 185 186 187 188 189 190 191
905 192 193 194 195 196 197 198 199
906 200 201 202 203 204 205 206 207
907 208 209 210 211 212 213 214 215
908 216 217 218 219 220 221 222 223
909 224 225 226 227 228 229 230 231
910 232 233 234 235 236 237 238 239
911 240 241 242 243 244 245 246 247
912 248 249 250 251 252 253 254 255
913 256>;
914 };
915
916 clocks {
917 compatible = "simple-bus";
918 #address-cells = <1>;
919 #size-cells = <0>;
920
921 clk32k_in: clock@0 {
922 compatible = "fixed-clock";
923 reg = <0>;
924 #clock-cells = <0>;
925 clock-frequency = <32768>;
926 };
927 };
928
929 gpio-keys {
930 compatible = "gpio-keys";
931
932 lid {
933 label = "Lid";
934 gpios = <&gpio TEGRA_GPIO(R, 4) GPIO_ACTIVE_LOW>;
935 linux,input-type = <5>;
936 linux,code = <KEY_RESERVED>;
937 debounce-interval = <1>;
938 gpio-key,wakeup;
939 };
940
941 power {
942 label = "Power";
943 gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
944 linux,code = <KEY_POWER>;
945 debounce-interval = <30>;
946 gpio-key,wakeup;
947 };
948 };
949
950 panel: panel {
951 compatible = "auo,b133xtn01";
952
953 backlight = <&backlight>;
954 ddc-i2c-bus = <&dpaux>;
955 };
956
957 regulators {
958 compatible = "simple-bus";
959 #address-cells = <1>;
960 #size-cells = <0>;
961
962 vdd_mux: regulator@0 {
963 compatible = "regulator-fixed";
964 reg = <0>;
965 regulator-name = "+VDD_MUX";
966 regulator-min-microvolt = <12000000>;
967 regulator-max-microvolt = <12000000>;
968 regulator-always-on;
969 regulator-boot-on;
970 };
971
972 vdd_5v0_sys: regulator@1 {
973 compatible = "regulator-fixed";
974 reg = <1>;
975 regulator-name = "+5V_SYS";
976 regulator-min-microvolt = <5000000>;
977 regulator-max-microvolt = <5000000>;
978 regulator-always-on;
979 regulator-boot-on;
980 vin-supply = <&vdd_mux>;
981 };
982
983 vdd_3v3_sys: regulator@2 {
984 compatible = "regulator-fixed";
985 reg = <2>;
986 regulator-name = "+3.3V_SYS";
987 regulator-min-microvolt = <3300000>;
988 regulator-max-microvolt = <3300000>;
989 regulator-always-on;
990 regulator-boot-on;
991 vin-supply = <&vdd_mux>;
992 };
993
994 vdd_3v3_run: regulator@3 {
995 compatible = "regulator-fixed";
996 reg = <3>;
997 regulator-name = "+3.3V_RUN";
998 regulator-min-microvolt = <3300000>;
999 regulator-max-microvolt = <3300000>;
1000 regulator-always-on;
1001 regulator-boot-on;
1002 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
1003 enable-active-high;
1004 vin-supply = <&vdd_3v3_sys>;
1005 };
1006
1007 vdd_3v3_hdmi: regulator@4 {
1008 compatible = "regulator-fixed";
1009 reg = <4>;
1010 regulator-name = "+3.3V_AVDD_HDMI_AP_GATED";
1011 regulator-min-microvolt = <3300000>;
1012 regulator-max-microvolt = <3300000>;
1013 vin-supply = <&vdd_3v3_run>;
1014 };
1015
1016 vdd_led: regulator@5 {
1017 compatible = "regulator-fixed";
1018 reg = <5>;
1019 regulator-name = "+VDD_LED";
1020 gpio = <&gpio TEGRA_GPIO(P, 2) GPIO_ACTIVE_HIGH>;
1021 enable-active-high;
1022 vin-supply = <&vdd_mux>;
1023 };
1024
1025 vdd_5v0_ts: regulator@6 {
1026 compatible = "regulator-fixed";
1027 reg = <6>;
1028 regulator-name = "+5V_VDD_TS_SW";
1029 regulator-min-microvolt = <5000000>;
1030 regulator-max-microvolt = <5000000>;
1031 regulator-boot-on;
1032 gpio = <&gpio TEGRA_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
1033 enable-active-high;
1034 vin-supply = <&vdd_5v0_sys>;
1035 };
1036
1037 vdd_usb1_vbus: regulator@7 {
1038 compatible = "regulator-fixed";
1039 reg = <7>;
1040 regulator-name = "+5V_USB_HS";
1041 regulator-min-microvolt = <5000000>;
1042 regulator-max-microvolt = <5000000>;
1043 gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
1044 enable-active-high;
1045 gpio-open-drain;
1046 vin-supply = <&vdd_5v0_sys>;
1047 };
1048
1049 vdd_usb3_vbus: regulator@8 {
1050 compatible = "regulator-fixed";
1051 reg = <8>;
1052 regulator-name = "+5V_USB_SS";
1053 regulator-min-microvolt = <5000000>;
1054 regulator-max-microvolt = <5000000>;
1055 gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
1056 enable-active-high;
1057 gpio-open-drain;
1058 vin-supply = <&vdd_5v0_sys>;
1059 };
1060
1061 vdd_3v3_panel: regulator@9 {
1062 compatible = "regulator-fixed";
1063 reg = <9>;
1064 regulator-name = "+3.3V_PANEL";
1065 regulator-min-microvolt = <3300000>;
1066 regulator-max-microvolt = <3300000>;
1067 gpio = <&pmic 4 GPIO_ACTIVE_HIGH>;
1068 enable-active-high;
1069 vin-supply = <&vdd_3v3_run>;
1070 };
1071
1072 vdd_3v3_lp0: regulator@10 {
1073 compatible = "regulator-fixed";
1074 reg = <10>;
1075 regulator-name = "+3.3V_LP0";
1076 regulator-min-microvolt = <3300000>;
1077 regulator-max-microvolt = <3300000>;
1078 /*
1079 * TODO: find a way to wire this up with the USB EHCI
1080 * controllers so that it can be enabled on demand.
1081 */
1082 regulator-always-on;
1083 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
1084 enable-active-high;
1085 vin-supply = <&vdd_3v3_sys>;
1086 };
1087
1088 vdd_hdmi_pll: regulator@11 {
1089 compatible = "regulator-fixed";
1090 reg = <11>;
1091 regulator-name = "+1.05V_RUN_AVDD_HDMI_PLL";
1092 regulator-min-microvolt = <1050000>;
1093 regulator-max-microvolt = <1050000>;
1094 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
1095 vin-supply = <&vdd_1v05_run>;
1096 };
1097
1098 vdd_5v0_hdmi: regulator@12 {
1099 compatible = "regulator-fixed";
1100 reg = <12>;
1101 regulator-name = "+5V_HDMI_CON";
1102 regulator-min-microvolt = <5000000>;
1103 regulator-max-microvolt = <5000000>;
1104 gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
1105 enable-active-high;
1106 vin-supply = <&vdd_5v0_sys>;
1107 };
1108 };
1109
1110 sound {
1111 compatible = "nvidia,tegra-audio-max98090-nyan-big",
1112 "nvidia,tegra-audio-max98090";
1113 nvidia,model = "Acer Chromebook 13";
1114
1115 nvidia,audio-routing =
1116 "Headphones", "HPR",
1117 "Headphones", "HPL",
1118 "Speakers", "SPKR",
1119 "Speakers", "SPKL",
1120 "Mic Jack", "MICBIAS",
1121 "DMICL", "Int Mic",
1122 "DMICR", "Int Mic",
1123 "IN34", "Mic Jack";
1124
1125 nvidia,i2s-controller = <&tegra_i2s1>;
1126 nvidia,audio-codec = <&acodec>;
1127
1128 clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
1129 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
1130 <&tegra_car TEGRA124_CLK_EXTERN1>;
1131 clock-names = "pll_a", "pll_a_out0", "mclk";
1132
1133 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
1134 nvidia,mic-det-gpios =
1135 <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
1136 };
1137}; 1338};
1138
1139#include "cros-ec-keyboard.dtsi"
diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi b/arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi
new file mode 100644
index 000000000000..9ecd108f56cf
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-nyan-blaze-emc.dtsi
@@ -0,0 +1,2049 @@
1/ {
2 clock@0,60006000 {
3 emc-timings-1 {
4 nvidia,ram-code = <1>;
5
6 timing-12750000 {
7 clock-frequency = <12750000>;
8 nvidia,parent-clock-frequency = <408000000>;
9 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
10 clock-names = "emc-parent";
11 };
12 timing-20400000 {
13 clock-frequency = <20400000>;
14 nvidia,parent-clock-frequency = <408000000>;
15 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
16 clock-names = "emc-parent";
17 };
18 timing-40800000 {
19 clock-frequency = <40800000>;
20 nvidia,parent-clock-frequency = <408000000>;
21 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
22 clock-names = "emc-parent";
23 };
24 timing-68000000 {
25 clock-frequency = <68000000>;
26 nvidia,parent-clock-frequency = <408000000>;
27 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
28 clock-names = "emc-parent";
29 };
30 timing-102000000 {
31 clock-frequency = <102000000>;
32 nvidia,parent-clock-frequency = <408000000>;
33 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
34 clock-names = "emc-parent";
35 };
36 timing-204000000 {
37 clock-frequency = <204000000>;
38 nvidia,parent-clock-frequency = <408000000>;
39 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
40 clock-names = "emc-parent";
41 };
42 timing-300000000 {
43 clock-frequency = <300000000>;
44 nvidia,parent-clock-frequency = <600000000>;
45 clocks = <&tegra_car TEGRA124_CLK_PLL_C>;
46 clock-names = "emc-parent";
47 };
48 timing-396000000 {
49 clock-frequency = <396000000>;
50 nvidia,parent-clock-frequency = <792000000>;
51 clocks = <&tegra_car TEGRA124_CLK_PLL_M>;
52 clock-names = "emc-parent";
53 };
54 /* TODO: Add 528MHz frequency */
55 timing-600000000 {
56 clock-frequency = <600000000>;
57 nvidia,parent-clock-frequency = <600000000>;
58 clocks = <&tegra_car TEGRA124_CLK_PLL_C_UD>;
59 clock-names = "emc-parent";
60 };
61 timing-792000000 {
62 clock-frequency = <792000000>;
63 nvidia,parent-clock-frequency = <792000000>;
64 clocks = <&tegra_car TEGRA124_CLK_PLL_M_UD>;
65 clock-names = "emc-parent";
66 };
67 };
68 };
69
70 emc@0,7001b000 {
71 emc-timings-1 {
72 nvidia,ram-code = <1>;
73
74 timing-12750000 {
75 clock-frequency = <12750000>;
76
77 nvidia,emc-auto-cal-config = <0xa1430000>;
78 nvidia,emc-auto-cal-config2 = <0x00000000>;
79 nvidia,emc-auto-cal-config3 = <0x00000000>;
80 nvidia,emc-auto-cal-interval = <0x001fffff>;
81 nvidia,emc-bgbias-ctl0 = <0x00000008>;
82 nvidia,emc-cfg = <0x73240000>;
83 nvidia,emc-cfg-2 = <0x000008c5>;
84 nvidia,emc-ctt-term-ctrl = <0x00000802>;
85 nvidia,emc-mode-1 = <0x80100003>;
86 nvidia,emc-mode-2 = <0x80200008>;
87 nvidia,emc-mode-4 = <0x00000000>;
88 nvidia,emc-mode-reset = <0x80001221>;
89 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
90 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
91 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
92 nvidia,emc-zcal-cnt-long = <0x00000042>;
93 nvidia,emc-zcal-interval = <0x00000000>;
94
95 nvidia,emc-configuration = <
96 0x00000000
97 0x00000003
98 0x00000000
99 0x00000000
100 0x00000000
101 0x00000004
102 0x0000000a
103 0x00000003
104 0x0000000b
105 0x00000000
106 0x00000000
107 0x00000003
108 0x00000003
109 0x00000000
110 0x00000006
111 0x00000006
112 0x00000006
113 0x00000002
114 0x00000000
115 0x00000005
116 0x00000005
117 0x00010000
118 0x00000003
119 0x00000000
120 0x00000000
121 0x00000000
122 0x00000000
123 0x00000004
124 0x0000000c
125 0x0000000d
126 0x0000000f
127 0x00000060
128 0x00000000
129 0x00000018
130 0x00000002
131 0x00000002
132 0x00000001
133 0x00000000
134 0x00000007
135 0x0000000f
136 0x00000005
137 0x00000005
138 0x00000004
139 0x00000005
140 0x00000004
141 0x00000000
142 0x00000000
143 0x00000005
144 0x00000005
145 0x00000064
146 0x00000000
147 0x00000000
148 0x00000000
149 0x106aa298
150 0x002c00a0
151 0x00008000
152 0x00064000
153 0x00064000
154 0x00064000
155 0x00064000
156 0x00064000
157 0x00064000
158 0x00064000
159 0x00064000
160 0x00064000
161 0x00064000
162 0x00064000
163 0x00064000
164 0x00064000
165 0x00064000
166 0x00064000
167 0x00064000
168 0x00000000
169 0x00000000
170 0x00000000
171 0x00000000
172 0x00000000
173 0x00000000
174 0x00000000
175 0x00000000
176 0x00000000
177 0x00000000
178 0x0000c000
179 0x00000000
180 0x00000000
181 0x0000c000
182 0x00000000
183 0x00000000
184 0x00000000
185 0x00000000
186 0x00000000
187 0x00000000
188 0x00000000
189 0x00000000
190 0x00000000
191 0x00000000
192 0x00000000
193 0x00000000
194 0x00000000
195 0x00000000
196 0x00000000
197 0x00000000
198 0x00000000
199 0x00000000
200 0x00000000
201 0x00000000
202 0x00000000
203 0x00000000
204 0x00000000
205 0x00000000
206 0x000fc000
207 0x000fc000
208 0x000fc000
209 0x000fc000
210 0x0000fc00
211 0x0000fc00
212 0x0000fc00
213 0x0000fc00
214 0x10000280
215 0x00000000
216 0x00111111
217 0x00000000
218 0x00000000
219 0x77ffc081
220 0x00000505
221 0x81f1f108
222 0x07070004
223 0x0000003f
224 0x016eeeee
225 0x51451400
226 0x00514514
227 0x00514514
228 0x51451400
229 0x0000003f
230 0x00000007
231 0x00000000
232 0x00000042
233 0x000c000c
234 0x00000000
235 0x00000003
236 0x0000f2f3
237 0x800001c5
238 0x0000000a
239 >;
240 };
241
242 timing-20400000 {
243 clock-frequency = <20400000>;
244
245 nvidia,emc-auto-cal-config = <0xa1430000>;
246 nvidia,emc-auto-cal-config2 = <0x00000000>;
247 nvidia,emc-auto-cal-config3 = <0x00000000>;
248 nvidia,emc-auto-cal-interval = <0x001fffff>;
249 nvidia,emc-bgbias-ctl0 = <0x00000008>;
250 nvidia,emc-cfg = <0x73240000>;
251 nvidia,emc-cfg-2 = <0x000008c5>;
252 nvidia,emc-ctt-term-ctrl = <0x00000802>;
253 nvidia,emc-mode-1 = <0x80100003>;
254 nvidia,emc-mode-2 = <0x80200008>;
255 nvidia,emc-mode-4 = <0x00000000>;
256 nvidia,emc-mode-reset = <0x80001221>;
257 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
258 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
259 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
260 nvidia,emc-zcal-cnt-long = <0x00000042>;
261 nvidia,emc-zcal-interval = <0x00000000>;
262
263 nvidia,emc-configuration = <
264 0x00000000
265 0x00000005
266 0x00000000
267 0x00000000
268 0x00000000
269 0x00000004
270 0x0000000a
271 0x00000003
272 0x0000000b
273 0x00000000
274 0x00000000
275 0x00000003
276 0x00000003
277 0x00000000
278 0x00000006
279 0x00000006
280 0x00000006
281 0x00000002
282 0x00000000
283 0x00000005
284 0x00000005
285 0x00010000
286 0x00000003
287 0x00000000
288 0x00000000
289 0x00000000
290 0x00000000
291 0x00000004
292 0x0000000c
293 0x0000000d
294 0x0000000f
295 0x0000009a
296 0x00000000
297 0x00000026
298 0x00000002
299 0x00000002
300 0x00000001
301 0x00000000
302 0x00000007
303 0x0000000f
304 0x00000006
305 0x00000006
306 0x00000004
307 0x00000005
308 0x00000004
309 0x00000000
310 0x00000000
311 0x00000005
312 0x00000005
313 0x000000a0
314 0x00000000
315 0x00000000
316 0x00000000
317 0x106aa298
318 0x002c00a0
319 0x00008000
320 0x00064000
321 0x00064000
322 0x00064000
323 0x00064000
324 0x00064000
325 0x00064000
326 0x00064000
327 0x00064000
328 0x00064000
329 0x00064000
330 0x00064000
331 0x00064000
332 0x00064000
333 0x00064000
334 0x00064000
335 0x00064000
336 0x00000000
337 0x00000000
338 0x00000000
339 0x00000000
340 0x00000000
341 0x00000000
342 0x00000000
343 0x00000000
344 0x00000000
345 0x00000000
346 0x0000c000
347 0x00000000
348 0x00000000
349 0x0000c000
350 0x00000000
351 0x00000000
352 0x00000000
353 0x00000000
354 0x00000000
355 0x00000000
356 0x00000000
357 0x00000000
358 0x00000000
359 0x00000000
360 0x00000000
361 0x00000000
362 0x00000000
363 0x00000000
364 0x00000000
365 0x00000000
366 0x00000000
367 0x00000000
368 0x00000000
369 0x00000000
370 0x00000000
371 0x00000000
372 0x00000000
373 0x00000000
374 0x000fc000
375 0x000fc000
376 0x000fc000
377 0x000fc000
378 0x0000fc00
379 0x0000fc00
380 0x0000fc00
381 0x0000fc00
382 0x10000280
383 0x00000000
384 0x00111111
385 0x00000000
386 0x00000000
387 0x77ffc081
388 0x00000505
389 0x81f1f108
390 0x07070004
391 0x0000003f
392 0x016eeeee
393 0x51451400
394 0x00514514
395 0x00514514
396 0x51451400
397 0x0000003f
398 0x0000000b
399 0x00000000
400 0x00000042
401 0x000c000c
402 0x00000000
403 0x00000003
404 0x0000f2f3
405 0x8000023a
406 0x0000000a
407 >;
408 };
409
410 timing-40800000 {
411 clock-frequency = <40800000>;
412
413 nvidia,emc-auto-cal-config = <0xa1430000>;
414 nvidia,emc-auto-cal-config2 = <0x00000000>;
415 nvidia,emc-auto-cal-config3 = <0x00000000>;
416 nvidia,emc-auto-cal-interval = <0x001fffff>;
417 nvidia,emc-bgbias-ctl0 = <0x00000008>;
418 nvidia,emc-cfg = <0x73240000>;
419 nvidia,emc-cfg-2 = <0x000008c5>;
420 nvidia,emc-ctt-term-ctrl = <0x00000802>;
421 nvidia,emc-mode-1 = <0x80100003>;
422 nvidia,emc-mode-2 = <0x80200008>;
423 nvidia,emc-mode-4 = <0x00000000>;
424 nvidia,emc-mode-reset = <0x80001221>;
425 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
426 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
427 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
428 nvidia,emc-zcal-cnt-long = <0x00000042>;
429 nvidia,emc-zcal-interval = <0x00000000>;
430
431 nvidia,emc-configuration = <
432 0x00000001
433 0x0000000a
434 0x00000000
435 0x00000001
436 0x00000000
437 0x00000004
438 0x0000000a
439 0x00000003
440 0x0000000b
441 0x00000000
442 0x00000000
443 0x00000003
444 0x00000003
445 0x00000000
446 0x00000006
447 0x00000006
448 0x00000006
449 0x00000002
450 0x00000000
451 0x00000005
452 0x00000005
453 0x00010000
454 0x00000003
455 0x00000000
456 0x00000000
457 0x00000000
458 0x00000000
459 0x00000004
460 0x0000000c
461 0x0000000d
462 0x0000000f
463 0x00000134
464 0x00000000
465 0x0000004d
466 0x00000002
467 0x00000002
468 0x00000001
469 0x00000000
470 0x00000008
471 0x0000000f
472 0x0000000c
473 0x0000000c
474 0x00000004
475 0x00000005
476 0x00000004
477 0x00000000
478 0x00000000
479 0x00000005
480 0x00000005
481 0x0000013f
482 0x00000000
483 0x00000000
484 0x00000000
485 0x106aa298
486 0x002c00a0
487 0x00008000
488 0x00064000
489 0x00064000
490 0x00064000
491 0x00064000
492 0x00064000
493 0x00064000
494 0x00064000
495 0x00064000
496 0x00064000
497 0x00064000
498 0x00064000
499 0x00064000
500 0x00064000
501 0x00064000
502 0x00064000
503 0x00064000
504 0x00000000
505 0x00000000
506 0x00000000
507 0x00000000
508 0x00000000
509 0x00000000
510 0x00000000
511 0x00000000
512 0x00000000
513 0x00000000
514 0x0000c000
515 0x00000000
516 0x00000000
517 0x0000c000
518 0x00000000
519 0x00000000
520 0x00000000
521 0x00000000
522 0x00000000
523 0x00000000
524 0x00000000
525 0x00000000
526 0x00000000
527 0x00000000
528 0x00000000
529 0x00000000
530 0x00000000
531 0x00000000
532 0x00000000
533 0x00000000
534 0x00000000
535 0x00000000
536 0x00000000
537 0x00000000
538 0x00000000
539 0x00000000
540 0x00000000
541 0x00000000
542 0x000fc000
543 0x000fc000
544 0x000fc000
545 0x000fc000
546 0x0000fc00
547 0x0000fc00
548 0x0000fc00
549 0x0000fc00
550 0x10000280
551 0x00000000
552 0x00111111
553 0x00000000
554 0x00000000
555 0x77ffc081
556 0x00000505
557 0x81f1f108
558 0x07070004
559 0x0000003f
560 0x016eeeee
561 0x51451400
562 0x00514514
563 0x00514514
564 0x51451400
565 0x0000003f
566 0x00000015
567 0x00000000
568 0x00000042
569 0x000c000c
570 0x00000000
571 0x00000003
572 0x0000f2f3
573 0x80000370
574 0x0000000a
575 >;
576 };
577
578 timing-68000000 {
579 clock-frequency = <68000000>;
580
581 nvidia,emc-auto-cal-config = <0xa1430000>;
582 nvidia,emc-auto-cal-config2 = <0x00000000>;
583 nvidia,emc-auto-cal-config3 = <0x00000000>;
584 nvidia,emc-auto-cal-interval = <0x001fffff>;
585 nvidia,emc-bgbias-ctl0 = <0x00000008>;
586 nvidia,emc-cfg = <0x73240000>;
587 nvidia,emc-cfg-2 = <0x000008c5>;
588 nvidia,emc-ctt-term-ctrl = <0x00000802>;
589 nvidia,emc-mode-1 = <0x80100003>;
590 nvidia,emc-mode-2 = <0x80200008>;
591 nvidia,emc-mode-4 = <0x00000000>;
592 nvidia,emc-mode-reset = <0x80001221>;
593 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
594 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
595 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
596 nvidia,emc-zcal-cnt-long = <0x00000042>;
597 nvidia,emc-zcal-interval = <0x00000000>;
598
599 nvidia,emc-configuration = <
600 0x00000003
601 0x00000011
602 0x00000000
603 0x00000002
604 0x00000000
605 0x00000004
606 0x0000000a
607 0x00000003
608 0x0000000b
609 0x00000000
610 0x00000000
611 0x00000003
612 0x00000003
613 0x00000000
614 0x00000006
615 0x00000006
616 0x00000006
617 0x00000002
618 0x00000000
619 0x00000005
620 0x00000005
621 0x00010000
622 0x00000003
623 0x00000000
624 0x00000000
625 0x00000000
626 0x00000000
627 0x00000004
628 0x0000000c
629 0x0000000d
630 0x0000000f
631 0x00000202
632 0x00000000
633 0x00000080
634 0x00000002
635 0x00000002
636 0x00000001
637 0x00000000
638 0x0000000f
639 0x0000000f
640 0x00000013
641 0x00000013
642 0x00000004
643 0x00000005
644 0x00000004
645 0x00000001
646 0x00000000
647 0x00000005
648 0x00000005
649 0x00000213
650 0x00000000
651 0x00000000
652 0x00000000
653 0x106aa298
654 0x002c00a0
655 0x00008000
656 0x00064000
657 0x00064000
658 0x00064000
659 0x00064000
660 0x00064000
661 0x00064000
662 0x00064000
663 0x00064000
664 0x00064000
665 0x00064000
666 0x00064000
667 0x00064000
668 0x00064000
669 0x00064000
670 0x00064000
671 0x00064000
672 0x00000000
673 0x00000000
674 0x00000000
675 0x00000000
676 0x00000000
677 0x00000000
678 0x00000000
679 0x00000000
680 0x00000000
681 0x00000000
682 0x0000c000
683 0x00000000
684 0x00000000
685 0x0000c000
686 0x00000000
687 0x00000000
688 0x00000000
689 0x00000000
690 0x00000000
691 0x00000000
692 0x00000000
693 0x00000000
694 0x00000000
695 0x00000000
696 0x00000000
697 0x00000000
698 0x00000000
699 0x00000000
700 0x00000000
701 0x00000000
702 0x00000000
703 0x00000000
704 0x00000000
705 0x00000000
706 0x00000000
707 0x00000000
708 0x00000000
709 0x00000000
710 0x000fc000
711 0x000fc000
712 0x000fc000
713 0x000fc000
714 0x0000fc00
715 0x0000fc00
716 0x0000fc00
717 0x0000fc00
718 0x10000280
719 0x00000000
720 0x00111111
721 0x00000000
722 0x00000000
723 0x77ffc081
724 0x00000505
725 0x81f1f108
726 0x07070004
727 0x0000003f
728 0x016eeeee
729 0x51451400
730 0x00514514
731 0x00514514
732 0x51451400
733 0x0000003f
734 0x00000022
735 0x00000000
736 0x00000042
737 0x000c000c
738 0x00000000
739 0x00000003
740 0x0000f2f3
741 0x8000050e
742 0x0000000a
743 >;
744 };
745
746 timing-102000000 {
747 clock-frequency = <102000000>;
748
749 nvidia,emc-auto-cal-config = <0xa1430000>;
750 nvidia,emc-auto-cal-config2 = <0x00000000>;
751 nvidia,emc-auto-cal-config3 = <0x00000000>;
752 nvidia,emc-auto-cal-interval = <0x001fffff>;
753 nvidia,emc-bgbias-ctl0 = <0x00000008>;
754 nvidia,emc-cfg = <0x73240000>;
755 nvidia,emc-cfg-2 = <0x000008c5>;
756 nvidia,emc-ctt-term-ctrl = <0x00000802>;
757 nvidia,emc-mode-1 = <0x80100003>;
758 nvidia,emc-mode-2 = <0x80200008>;
759 nvidia,emc-mode-4 = <0x00000000>;
760 nvidia,emc-mode-reset = <0x80001221>;
761 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
762 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
763 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
764 nvidia,emc-zcal-cnt-long = <0x00000042>;
765 nvidia,emc-zcal-interval = <0x00000000>;
766
767 nvidia,emc-configuration = <
768 0x00000004
769 0x0000001a
770 0x00000000
771 0x00000003
772 0x00000001
773 0x00000004
774 0x0000000a
775 0x00000003
776 0x0000000b
777 0x00000001
778 0x00000001
779 0x00000003
780 0x00000003
781 0x00000000
782 0x00000006
783 0x00000006
784 0x00000006
785 0x00000002
786 0x00000000
787 0x00000005
788 0x00000005
789 0x00010000
790 0x00000003
791 0x00000000
792 0x00000000
793 0x00000000
794 0x00000000
795 0x00000004
796 0x0000000c
797 0x0000000d
798 0x0000000f
799 0x00000304
800 0x00000000
801 0x000000c1
802 0x00000002
803 0x00000002
804 0x00000001
805 0x00000000
806 0x00000018
807 0x0000000f
808 0x0000001c
809 0x0000001c
810 0x00000004
811 0x00000005
812 0x00000004
813 0x00000003
814 0x00000000
815 0x00000005
816 0x00000005
817 0x0000031c
818 0x00000000
819 0x00000000
820 0x00000000
821 0x106aa298
822 0x002c00a0
823 0x00008000
824 0x00064000
825 0x00064000
826 0x00064000
827 0x00064000
828 0x00064000
829 0x00064000
830 0x00064000
831 0x00064000
832 0x00064000
833 0x00064000
834 0x00064000
835 0x00064000
836 0x00064000
837 0x00064000
838 0x00064000
839 0x00064000
840 0x00000000
841 0x00000000
842 0x00000000
843 0x00000000
844 0x00000000
845 0x00000000
846 0x00000000
847 0x00000000
848 0x00000000
849 0x00000000
850 0x0000c000
851 0x00000000
852 0x00000000
853 0x0000c000
854 0x00000000
855 0x00000000
856 0x00000000
857 0x00000000
858 0x00000000
859 0x00000000
860 0x00000000
861 0x00000000
862 0x00000000
863 0x00000000
864 0x00000000
865 0x00000000
866 0x00000000
867 0x00000000
868 0x00000000
869 0x00000000
870 0x00000000
871 0x00000000
872 0x00000000
873 0x00000000
874 0x00000000
875 0x00000000
876 0x00000000
877 0x00000000
878 0x000fc000
879 0x000fc000
880 0x000fc000
881 0x000fc000
882 0x0000fc00
883 0x0000fc00
884 0x0000fc00
885 0x0000fc00
886 0x10000280
887 0x00000000
888 0x00111111
889 0x00000000
890 0x00000000
891 0x77ffc081
892 0x00000505
893 0x81f1f108
894 0x07070004
895 0x0000003f
896 0x016eeeee
897 0x51451400
898 0x00514514
899 0x00514514
900 0x51451400
901 0x0000003f
902 0x00000033
903 0x00000000
904 0x00000042
905 0x000c000c
906 0x00000000
907 0x00000003
908 0x0000f2f3
909 0x80000713
910 0x0000000a
911 >;
912 };
913
914 timing-204000000 {
915 clock-frequency = <204000000>;
916
917 nvidia,emc-auto-cal-config = <0xa1430000>;
918 nvidia,emc-auto-cal-config2 = <0x00000000>;
919 nvidia,emc-auto-cal-config3 = <0x00000000>;
920 nvidia,emc-auto-cal-interval = <0x001fffff>;
921 nvidia,emc-bgbias-ctl0 = <0x00000008>;
922 nvidia,emc-cfg = <0x73240000>;
923 nvidia,emc-cfg-2 = <0x0000088d>;
924 nvidia,emc-ctt-term-ctrl = <0x00000802>;
925 nvidia,emc-mode-1 = <0x80100003>;
926 nvidia,emc-mode-2 = <0x80200008>;
927 nvidia,emc-mode-4 = <0x00000000>;
928 nvidia,emc-mode-reset = <0x80001221>;
929 nvidia,emc-mrs-wait-cnt = <0x000c000c>;
930 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
931 nvidia,emc-xm2dqspadctrl2 = <0x0130b118>;
932 nvidia,emc-zcal-cnt-long = <0x00000042>;
933 nvidia,emc-zcal-interval = <0x00020000>;
934
935 nvidia,emc-configuration = <
936 0x00000009
937 0x00000035
938 0x00000000
939 0x00000007
940 0x00000002
941 0x00000005
942 0x0000000a
943 0x00000003
944 0x0000000b
945 0x00000002
946 0x00000002
947 0x00000003
948 0x00000003
949 0x00000000
950 0x00000005
951 0x00000005
952 0x00000006
953 0x00000002
954 0x00000000
955 0x00000004
956 0x00000006
957 0x00010000
958 0x00000003
959 0x00000000
960 0x00000000
961 0x00000000
962 0x00000000
963 0x00000003
964 0x0000000d
965 0x0000000f
966 0x00000011
967 0x00000607
968 0x00000000
969 0x00000181
970 0x00000002
971 0x00000002
972 0x00000001
973 0x00000000
974 0x00000032
975 0x0000000f
976 0x00000038
977 0x00000038
978 0x00000004
979 0x00000005
980 0x00000004
981 0x00000007
982 0x00000000
983 0x00000005
984 0x00000005
985 0x00000638
986 0x00000000
987 0x00000000
988 0x00000000
989 0x106aa298
990 0x002c00a0
991 0x00008000
992 0x00064000
993 0x00064000
994 0x00064000
995 0x00064000
996 0x00064000
997 0x00064000
998 0x00064000
999 0x00064000
1000 0x00064000
1001 0x00064000
1002 0x00064000
1003 0x00064000
1004 0x00064000
1005 0x00064000
1006 0x00064000
1007 0x00064000
1008 0x00000000
1009 0x00000000
1010 0x00000000
1011 0x00000000
1012 0x00000000
1013 0x00000000
1014 0x00000000
1015 0x00000000
1016 0x00000000
1017 0x00000000
1018 0x0000c000
1019 0x00000000
1020 0x00000000
1021 0x0000c000
1022 0x00000000
1023 0x00000000
1024 0x00000000
1025 0x00000000
1026 0x00000000
1027 0x00000000
1028 0x00000000
1029 0x00000000
1030 0x00000000
1031 0x00000000
1032 0x00000000
1033 0x00000000
1034 0x00000000
1035 0x00000000
1036 0x00000000
1037 0x00000000
1038 0x00000000
1039 0x00000000
1040 0x00000000
1041 0x00000000
1042 0x00000000
1043 0x00000000
1044 0x00000000
1045 0x00000000
1046 0x00090000
1047 0x00090000
1048 0x00090000
1049 0x00090000
1050 0x00009000
1051 0x00009000
1052 0x00009000
1053 0x00009000
1054 0x10000280
1055 0x00000000
1056 0x00111111
1057 0x00000000
1058 0x00000000
1059 0x77ffc081
1060 0x00000505
1061 0x81f1f108
1062 0x07070004
1063 0x0000003f
1064 0x016eeeee
1065 0x51451400
1066 0x00514514
1067 0x00514514
1068 0x51451400
1069 0x0000003f
1070 0x00000066
1071 0x00000000
1072 0x00000100
1073 0x000c000c
1074 0x00000000
1075 0x00000003
1076 0x0000d2b3
1077 0x80000d22
1078 0x0000000a
1079 >;
1080 };
1081
1082 timing-300000000 {
1083 clock-frequency = <300000000>;
1084
1085 nvidia,emc-auto-cal-config = <0xa1430000>;
1086 nvidia,emc-auto-cal-config2 = <0x00000000>;
1087 nvidia,emc-auto-cal-config3 = <0x00000000>;
1088 nvidia,emc-auto-cal-interval = <0x001fffff>;
1089 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1090 nvidia,emc-cfg = <0x73340000>;
1091 nvidia,emc-cfg-2 = <0x000008d5>;
1092 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1093 nvidia,emc-mode-1 = <0x80100002>;
1094 nvidia,emc-mode-2 = <0x80200000>;
1095 nvidia,emc-mode-4 = <0x00000000>;
1096 nvidia,emc-mode-reset = <0x80000321>;
1097 nvidia,emc-mrs-wait-cnt = <0x0174000c>;
1098 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
1099 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1100 nvidia,emc-zcal-cnt-long = <0x00000042>;
1101 nvidia,emc-zcal-interval = <0x00020000>;
1102
1103 nvidia,emc-configuration = <
1104 0x0000000d
1105 0x0000004c
1106 0x00000000
1107 0x00000009
1108 0x00000003
1109 0x00000004
1110 0x00000008
1111 0x00000002
1112 0x00000009
1113 0x00000003
1114 0x00000003
1115 0x00000002
1116 0x00000002
1117 0x00000000
1118 0x00000003
1119 0x00000003
1120 0x00000005
1121 0x00000002
1122 0x00000000
1123 0x00000002
1124 0x00000007
1125 0x00020000
1126 0x00000003
1127 0x00000000
1128 0x00000000
1129 0x00000000
1130 0x00000000
1131 0x00000001
1132 0x0000000e
1133 0x00000010
1134 0x00000012
1135 0x000008e4
1136 0x00000000
1137 0x00000239
1138 0x00000001
1139 0x00000008
1140 0x00000001
1141 0x00000000
1142 0x0000004a
1143 0x0000000e
1144 0x00000051
1145 0x00000200
1146 0x00000004
1147 0x00000005
1148 0x00000004
1149 0x00000009
1150 0x00000000
1151 0x00000005
1152 0x00000005
1153 0x00000924
1154 0x00000000
1155 0x00000000
1156 0x00000000
1157 0x104ab098
1158 0x002c00a0
1159 0x00008000
1160 0x00030000
1161 0x00030000
1162 0x00030000
1163 0x00030000
1164 0x00030000
1165 0x00030000
1166 0x00030000
1167 0x00030000
1168 0x00030000
1169 0x00030000
1170 0x00030000
1171 0x00030000
1172 0x00030000
1173 0x00030000
1174 0x00030000
1175 0x00030000
1176 0x00000000
1177 0x00000000
1178 0x00000000
1179 0x00000000
1180 0x00000000
1181 0x00000000
1182 0x00000000
1183 0x00000000
1184 0x00090000
1185 0x00090000
1186 0x00000000
1187 0x00090000
1188 0x00090000
1189 0x00000000
1190 0x00000000
1191 0x00000000
1192 0x00000000
1193 0x00000000
1194 0x00000000
1195 0x00000000
1196 0x00000000
1197 0x00000000
1198 0x00000000
1199 0x00000000
1200 0x00000000
1201 0x00000000
1202 0x00000000
1203 0x00000000
1204 0x00000000
1205 0x00000000
1206 0x00000000
1207 0x00000000
1208 0x00000000
1209 0x00000000
1210 0x00000000
1211 0x00000000
1212 0x00000000
1213 0x00000000
1214 0x00060000
1215 0x00060000
1216 0x00060000
1217 0x00060000
1218 0x00006000
1219 0x00006000
1220 0x00006000
1221 0x00006000
1222 0x10000280
1223 0x00000000
1224 0x00111111
1225 0x00000000
1226 0x00000000
1227 0x77ffc081
1228 0x00000202
1229 0x81f1f108
1230 0x07070004
1231 0x00000000
1232 0x016eeeee
1233 0x51451420
1234 0x00514514
1235 0x00514514
1236 0x51451400
1237 0x0000003f
1238 0x00000096
1239 0x00000000
1240 0x00000100
1241 0x0174000c
1242 0x00000000
1243 0x00000003
1244 0x000052a3
1245 0x800012d7
1246 0x00000009
1247 >;
1248 };
1249
1250 timing-396000000 {
1251 clock-frequency = <396000000>;
1252
1253 nvidia,emc-auto-cal-config = <0xa1430000>;
1254 nvidia,emc-auto-cal-config2 = <0x00000000>;
1255 nvidia,emc-auto-cal-config3 = <0x00000000>;
1256 nvidia,emc-auto-cal-interval = <0x001fffff>;
1257 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1258 nvidia,emc-cfg = <0x73340000>;
1259 nvidia,emc-cfg-2 = <0x00000895>;
1260 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1261 nvidia,emc-mode-1 = <0x80100002>;
1262 nvidia,emc-mode-2 = <0x80200000>;
1263 nvidia,emc-mode-4 = <0x00000000>;
1264 nvidia,emc-mode-reset = <0x80000521>;
1265 nvidia,emc-mrs-wait-cnt = <0x015b000c>;
1266 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1267 nvidia,emc-xm2dqspadctrl2 = <0x01231339>;
1268 nvidia,emc-zcal-cnt-long = <0x00000042>;
1269 nvidia,emc-zcal-interval = <0x00020000>;
1270
1271 nvidia,emc-configuration = <
1272 0x00000012
1273 0x00000065
1274 0x00000000
1275 0x0000000c
1276 0x00000004
1277 0x00000005
1278 0x00000008
1279 0x00000002
1280 0x0000000a
1281 0x00000004
1282 0x00000004
1283 0x00000002
1284 0x00000002
1285 0x00000000
1286 0x00000003
1287 0x00000003
1288 0x00000005
1289 0x00000002
1290 0x00000000
1291 0x00000001
1292 0x00000008
1293 0x00020000
1294 0x00000003
1295 0x00000000
1296 0x00000000
1297 0x00000000
1298 0x00000000
1299 0x00000000
1300 0x0000000f
1301 0x00000010
1302 0x00000012
1303 0x00000bd1
1304 0x00000000
1305 0x000002f4
1306 0x00000001
1307 0x00000008
1308 0x00000001
1309 0x00000000
1310 0x00000063
1311 0x0000000f
1312 0x0000006b
1313 0x00000200
1314 0x00000004
1315 0x00000005
1316 0x00000004
1317 0x0000000d
1318 0x00000000
1319 0x00000005
1320 0x00000005
1321 0x00000c11
1322 0x00000000
1323 0x00000000
1324 0x00000000
1325 0x104ab098
1326 0x002c00a0
1327 0x00008000
1328 0x00030000
1329 0x00030000
1330 0x00030000
1331 0x00030000
1332 0x00030000
1333 0x00030000
1334 0x00030000
1335 0x00030000
1336 0x00030000
1337 0x00030000
1338 0x00030000
1339 0x00030000
1340 0x00030000
1341 0x00030000
1342 0x00030000
1343 0x00030000
1344 0x00000000
1345 0x00000000
1346 0x00000000
1347 0x00000000
1348 0x00000000
1349 0x00000000
1350 0x00000000
1351 0x00000000
1352 0x00068000
1353 0x00068000
1354 0x00000000
1355 0x00068000
1356 0x00068000
1357 0x00000000
1358 0x00000000
1359 0x00000000
1360 0x00000000
1361 0x00000000
1362 0x00000000
1363 0x00000000
1364 0x00000000
1365 0x00000000
1366 0x00000000
1367 0x00000000
1368 0x00000000
1369 0x00000000
1370 0x00000000
1371 0x00000000
1372 0x00000000
1373 0x00000000
1374 0x00000000
1375 0x00000000
1376 0x00000000
1377 0x00000000
1378 0x00000000
1379 0x00000000
1380 0x00000000
1381 0x00000000
1382 0x00058000
1383 0x00058000
1384 0x00058000
1385 0x00058000
1386 0x00005800
1387 0x00005800
1388 0x00005800
1389 0x00005800
1390 0x10000280
1391 0x00000000
1392 0x00111111
1393 0x00000000
1394 0x00000000
1395 0x77ffc081
1396 0x00000202
1397 0x81f1f108
1398 0x07070004
1399 0x00000000
1400 0x016eeeee
1401 0x51451420
1402 0x00514514
1403 0x00514514
1404 0x51451400
1405 0x0000003f
1406 0x000000c6
1407 0x00000000
1408 0x00000100
1409 0x015b000c
1410 0x00000000
1411 0x00000003
1412 0x000052a3
1413 0x8000188b
1414 0x00000009
1415 >;
1416 };
1417
1418 timing-600000000 {
1419 clock-frequency = <600000000>;
1420
1421 nvidia,emc-auto-cal-config = <0xa1430000>;
1422 nvidia,emc-auto-cal-config2 = <0x00000000>;
1423 nvidia,emc-auto-cal-config3 = <0x00000000>;
1424 nvidia,emc-auto-cal-interval = <0x001fffff>;
1425 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1426 nvidia,emc-cfg = <0x73300000>;
1427 nvidia,emc-cfg-2 = <0x0000089d>;
1428 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1429 nvidia,emc-mode-1 = <0x80100002>;
1430 nvidia,emc-mode-2 = <0x80200010>;
1431 nvidia,emc-mode-4 = <0x00000000>;
1432 nvidia,emc-mode-reset = <0x80000b61>;
1433 nvidia,emc-mrs-wait-cnt = <0x0128000c>;
1434 nvidia,emc-sel-dpd-ctrl = <0x00040008>;
1435 nvidia,emc-xm2dqspadctrl2 = <0x0121113d>;
1436 nvidia,emc-zcal-cnt-long = <0x00000042>;
1437 nvidia,emc-zcal-interval = <0x00020000>;
1438
1439 nvidia,emc-configuration = <
1440 0x0000001c
1441 0x0000009a
1442 0x00000000
1443 0x00000013
1444 0x00000007
1445 0x00000007
1446 0x0000000b
1447 0x00000003
1448 0x00000010
1449 0x00000007
1450 0x00000007
1451 0x00000002
1452 0x00000002
1453 0x00000000
1454 0x00000005
1455 0x00000005
1456 0x0000000a
1457 0x00000002
1458 0x00000000
1459 0x00000003
1460 0x0000000b
1461 0x00070000
1462 0x00000003
1463 0x00000000
1464 0x00000000
1465 0x00000000
1466 0x00000000
1467 0x00000002
1468 0x00000012
1469 0x00000016
1470 0x00000018
1471 0x00001208
1472 0x00000000
1473 0x00000482
1474 0x00000002
1475 0x0000000d
1476 0x00000001
1477 0x00000000
1478 0x00000096
1479 0x00000015
1480 0x000000a2
1481 0x00000200
1482 0x00000004
1483 0x00000005
1484 0x00000004
1485 0x00000015
1486 0x00000000
1487 0x00000006
1488 0x00000006
1489 0x00001248
1490 0x00000000
1491 0x00000000
1492 0x00000000
1493 0x104ab098
1494 0xe00e00b1
1495 0x00008000
1496 0x0000000a
1497 0x0000000a
1498 0x0000000a
1499 0x0000000a
1500 0x0000000a
1501 0x0000000a
1502 0x0000000a
1503 0x0000000a
1504 0x0000000a
1505 0x0000000a
1506 0x0000000a
1507 0x0000000a
1508 0x0000000a
1509 0x0000000a
1510 0x0000000a
1511 0x0000000a
1512 0x00000000
1513 0x00000000
1514 0x00000000
1515 0x00000000
1516 0x00000000
1517 0x00000000
1518 0x00000000
1519 0x00000000
1520 0x00040000
1521 0x00040000
1522 0x00000000
1523 0x00040000
1524 0x00040000
1525 0x00000000
1526 0x00000000
1527 0x00000000
1528 0x00000000
1529 0x00000000
1530 0x00000000
1531 0x00000000
1532 0x00000000
1533 0x00000000
1534 0x00000004
1535 0x00000004
1536 0x00000001
1537 0x00000005
1538 0x00000007
1539 0x00000004
1540 0x00000006
1541 0x00000007
1542 0x00000004
1543 0x00000004
1544 0x00000001
1545 0x00000005
1546 0x00000007
1547 0x00000004
1548 0x00000006
1549 0x00000007
1550 0x0000000e
1551 0x0000000e
1552 0x0000000e
1553 0x0000000e
1554 0x0000000e
1555 0x0000000e
1556 0x0000000e
1557 0x0000000e
1558 0x100002a0
1559 0x00000000
1560 0x00111111
1561 0x00000000
1562 0x00000000
1563 0x77ffc085
1564 0x00000202
1565 0x81f1f108
1566 0x07070004
1567 0x00000000
1568 0x016eeeee
1569 0x51451420
1570 0x00514514
1571 0x00514514
1572 0x51451400
1573 0x0606003f
1574 0x00000000
1575 0x00000000
1576 0x00000100
1577 0x0128000c
1578 0x00000000
1579 0x00000003
1580 0x000040a0
1581 0x800024a9
1582 0x0000000e
1583 >;
1584 };
1585
1586 timing-792000000 {
1587 clock-frequency = <792000000>;
1588
1589 nvidia,emc-auto-cal-config = <0xa1430000>;
1590 nvidia,emc-auto-cal-config2 = <0x00000000>;
1591 nvidia,emc-auto-cal-config3 = <0x00000000>;
1592 nvidia,emc-auto-cal-interval = <0x001fffff>;
1593 nvidia,emc-bgbias-ctl0 = <0x00000000>;
1594 nvidia,emc-cfg = <0x73300000>;
1595 nvidia,emc-cfg-2 = <0x0000089d>;
1596 nvidia,emc-ctt-term-ctrl = <0x00000802>;
1597 nvidia,emc-mode-1 = <0x80100002>;
1598 nvidia,emc-mode-2 = <0x80200018>;
1599 nvidia,emc-mode-4 = <0x00000000>;
1600 nvidia,emc-mode-reset = <0x80000d71>;
1601 nvidia,emc-mrs-wait-cnt = <0x00f8000c>;
1602 nvidia,emc-sel-dpd-ctrl = <0x00040000>;
1603 nvidia,emc-xm2dqspadctrl2 = <0x0120113d>;
1604 nvidia,emc-zcal-cnt-long = <0x00000042>;
1605 nvidia,emc-zcal-interval = <0x00020000>;
1606
1607 nvidia,emc-configuration = <
1608 0x00000025
1609 0x000000cc
1610 0x00000000
1611 0x0000001a
1612 0x00000009
1613 0x00000008
1614 0x0000000d
1615 0x00000004
1616 0x00000013
1617 0x00000009
1618 0x00000009
1619 0x00000003
1620 0x00000002
1621 0x00000000
1622 0x00000006
1623 0x00000006
1624 0x0000000b
1625 0x00000002
1626 0x00000000
1627 0x00000002
1628 0x0000000d
1629 0x00080000
1630 0x00000004
1631 0x00000000
1632 0x00000000
1633 0x00000000
1634 0x00000000
1635 0x00000001
1636 0x00000014
1637 0x00000018
1638 0x0000001a
1639 0x000017e2
1640 0x00000000
1641 0x000005f8
1642 0x00000003
1643 0x00000011
1644 0x00000001
1645 0x00000000
1646 0x000000c6
1647 0x00000018
1648 0x000000d6
1649 0x00000200
1650 0x00000005
1651 0x00000006
1652 0x00000005
1653 0x0000001d
1654 0x00000000
1655 0x00000008
1656 0x00000008
1657 0x00001822
1658 0x00000000
1659 0x00000000
1660 0x00000000
1661 0x104ab098
1662 0xe00700b1
1663 0x00008000
1664 0x00000008
1665 0x00000008
1666 0x00000008
1667 0x00000008
1668 0x00000008
1669 0x00000008
1670 0x00000008
1671 0x00000008
1672 0x00000008
1673 0x00000008
1674 0x00000008
1675 0x00000008
1676 0x00000008
1677 0x00000008
1678 0x00000008
1679 0x00000008
1680 0x00000000
1681 0x00000000
1682 0x00000000
1683 0x00000000
1684 0x00000000
1685 0x00000000
1686 0x00000000
1687 0x00000000
1688 0x0002c000
1689 0x0002c000
1690 0x00000000
1691 0x0002c000
1692 0x0002c000
1693 0x00000000
1694 0x00000000
1695 0x00000000
1696 0x00000000
1697 0x00000000
1698 0x00000000
1699 0x00000000
1700 0x00000000
1701 0x00000000
1702 0x00000008
1703 0x00000008
1704 0x00000005
1705 0x00000008
1706 0x0000000a
1707 0x00000008
1708 0x0000000a
1709 0x0000000a
1710 0x00000008
1711 0x00000008
1712 0x00000005
1713 0x00000008
1714 0x0000000a
1715 0x00000008
1716 0x0000000a
1717 0x0000000a
1718 0x0000000e
1719 0x0000000e
1720 0x0000000e
1721 0x0000000e
1722 0x0000000e
1723 0x0000000e
1724 0x0000000e
1725 0x0000000e
1726 0x100002a0
1727 0x00000000
1728 0x00111111
1729 0x00000000
1730 0x00000000
1731 0x77ffc085
1732 0x00000202
1733 0x81f1f108
1734 0x07070004
1735 0x00000000
1736 0x016eeeee
1737 0x61861820
1738 0x00492492
1739 0x00492492
1740 0x61861800
1741 0x0606003f
1742 0x00000000
1743 0x00000000
1744 0x00000100
1745 0x00f8000c
1746 0x00000000
1747 0x00000004
1748 0x00004080
1749 0x80003012
1750 0x0000000f
1751 >;
1752 };
1753
1754 };
1755 };
1756
1757 memory-controller@0,70019000 {
1758 emc-timings-1 {
1759 nvidia,ram-code = <1>;
1760
1761
1762 timing-12750000 {
1763 clock-frequency = <12750000>;
1764
1765 nvidia,emem-configuration = <
1766 0x40040001
1767 0x8000000a
1768 0x00000001
1769 0x00000001
1770 0x00000002
1771 0x00000000
1772 0x00000002
1773 0x00000001
1774 0x00000002
1775 0x00000008
1776 0x00000003
1777 0x00000002
1778 0x00000003
1779 0x00000006
1780 0x06030203
1781 0x000a0402
1782 0x77e30303
1783 0x70000f03
1784 0x001f0000
1785 >;
1786 };
1787
1788 timing-20400000 {
1789 clock-frequency = <20400000>;
1790
1791 nvidia,emem-configuration = <
1792 0x40020001
1793 0x80000012
1794 0x00000001
1795 0x00000001
1796 0x00000002
1797 0x00000000
1798 0x00000002
1799 0x00000001
1800 0x00000002
1801 0x00000008
1802 0x00000003
1803 0x00000002
1804 0x00000003
1805 0x00000006
1806 0x06030203
1807 0x000a0402
1808 0x76230303
1809 0x70000f03
1810 0x001f0000
1811 >;
1812 };
1813
1814 timing-40800000 {
1815 clock-frequency = <40800000>;
1816
1817 nvidia,emem-configuration = <
1818 0xa0000001
1819 0x80000017
1820 0x00000001
1821 0x00000001
1822 0x00000002
1823 0x00000000
1824 0x00000002
1825 0x00000001
1826 0x00000002
1827 0x00000008
1828 0x00000003
1829 0x00000002
1830 0x00000003
1831 0x00000006
1832 0x06030203
1833 0x000a0402
1834 0x74a30303
1835 0x70000f03
1836 0x001f0000
1837 >;
1838 };
1839
1840 timing-68000000 {
1841 clock-frequency = <68000000>;
1842
1843 nvidia,emem-configuration = <
1844 0x00000001
1845 0x8000001e
1846 0x00000001
1847 0x00000001
1848 0x00000002
1849 0x00000000
1850 0x00000002
1851 0x00000001
1852 0x00000002
1853 0x00000008
1854 0x00000003
1855 0x00000002
1856 0x00000003
1857 0x00000006
1858 0x06030203
1859 0x000a0402
1860 0x74230403
1861 0x70000f03
1862 0x001f0000
1863 >;
1864 };
1865
1866 timing-102000000 {
1867 clock-frequency = <102000000>;
1868
1869 nvidia,emem-configuration = <
1870 0x08000001
1871 0x80000026
1872 0x00000001
1873 0x00000001
1874 0x00000003
1875 0x00000000
1876 0x00000002
1877 0x00000001
1878 0x00000002
1879 0x00000008
1880 0x00000003
1881 0x00000002
1882 0x00000003
1883 0x00000006
1884 0x06030203
1885 0x000a0403
1886 0x73c30504
1887 0x70000f03
1888 0x001f0000
1889 >;
1890 };
1891
1892 timing-204000000 {
1893 clock-frequency = <204000000>;
1894
1895 nvidia,emem-configuration = <
1896 0x01000003
1897 0x80000040
1898 0x00000001
1899 0x00000001
1900 0x00000005
1901 0x00000002
1902 0x00000004
1903 0x00000001
1904 0x00000002
1905 0x00000008
1906 0x00000003
1907 0x00000002
1908 0x00000004
1909 0x00000006
1910 0x06040203
1911 0x000a0405
1912 0x73840a06
1913 0x70000f03
1914 0x001f0000
1915 >;
1916 };
1917
1918 timing-300000000 {
1919 clock-frequency = <300000000>;
1920
1921 nvidia,emem-configuration = <
1922 0x08000004
1923 0x80000040
1924 0x00000001
1925 0x00000002
1926 0x00000007
1927 0x00000004
1928 0x00000005
1929 0x00000001
1930 0x00000002
1931 0x00000007
1932 0x00000002
1933 0x00000002
1934 0x00000004
1935 0x00000006
1936 0x06040202
1937 0x000b0607
1938 0x77450e08
1939 0x70000f03
1940 0x001f0000
1941 >;
1942 };
1943
1944 timing-396000000 {
1945 clock-frequency = <396000000>;
1946
1947 nvidia,emem-configuration = <
1948 0x0f000005
1949 0x80000040
1950 0x00000001
1951 0x00000002
1952 0x00000009
1953 0x00000005
1954 0x00000007
1955 0x00000001
1956 0x00000002
1957 0x00000008
1958 0x00000002
1959 0x00000002
1960 0x00000004
1961 0x00000006
1962 0x06040202
1963 0x000d0709
1964 0x7586120a
1965 0x70000f03
1966 0x001f0000
1967 >;
1968 };
1969
1970 timing-528000000 {
1971 clock-frequency = <528000000>;
1972
1973 nvidia,emem-configuration = <
1974 0x0f000007
1975 0x80000040
1976 0x00000002
1977 0x00000003
1978 0x0000000d
1979 0x00000008
1980 0x0000000a
1981 0x00000001
1982 0x00000002
1983 0x00000009
1984 0x00000002
1985 0x00000002
1986 0x00000005
1987 0x00000006
1988 0x06050202
1989 0x0010090d
1990 0x7428180e
1991 0x70000f03
1992 0x001f0000
1993 >;
1994 };
1995
1996 timing-600000000 {
1997 clock-frequency = <600000000>;
1998
1999 nvidia,emem-configuration = <
2000 0x00000009
2001 0x80000040
2002 0x00000003
2003 0x00000004
2004 0x0000000e
2005 0x00000009
2006 0x0000000b
2007 0x00000001
2008 0x00000003
2009 0x0000000b
2010 0x00000002
2011 0x00000002
2012 0x00000005
2013 0x00000007
2014 0x07050202
2015 0x00130b0e
2016 0x73a91b0f
2017 0x70000f03
2018 0x001f0000
2019 >;
2020 };
2021
2022 timing-792000000 {
2023 clock-frequency = <792000000>;
2024
2025 nvidia,emem-configuration = <
2026 0x0e00000b
2027 0x80000040
2028 0x00000004
2029 0x00000005
2030 0x00000013
2031 0x0000000c
2032 0x0000000f
2033 0x00000002
2034 0x00000003
2035 0x0000000c
2036 0x00000002
2037 0x00000002
2038 0x00000006
2039 0x00000008
2040 0x08060202
2041 0x00160d13
2042 0x734c2414
2043 0x70000f02
2044 0x001f0000
2045 >;
2046 };
2047 };
2048 };
2049};
diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
new file mode 100644
index 000000000000..0d30c514ffad
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts
@@ -0,0 +1,1334 @@
1/dts-v1/;
2
3#include "tegra124-nyan.dtsi"
4
5#include "tegra124-nyan-blaze-emc.dtsi"
6
7/ {
8 model = "HP Chromebook 14";
9 compatible = "google,nyan-blaze", "google,nyan", "nvidia,tegra124";
10
11 panel: panel {
12 compatible = "samsung,ltn140at29-301";
13
14 backlight = <&backlight>;
15 ddc-i2c-bus = <&dpaux>;
16 };
17
18 sound {
19 compatible = "nvidia,tegra-audio-max98090-nyan-blaze",
20 "nvidia,tegra-audio-max98090-nyan",
21 "nvidia,tegra-audio-max98090";
22 nvidia,model = "GoogleNyanBlaze";
23 };
24
25 pinmux@0,70000868 {
26 pinctrl-names = "default";
27 pinctrl-0 = <&pinmux_default>;
28
29 pinmux_default: common {
30 clk_32k_out_pa0 {
31 nvidia,pins = "clk_32k_out_pa0";
32 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
33 nvidia,tristate = <TEGRA_PIN_DISABLE>;
34 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
35 };
36 uart3_cts_n_pa1 {
37 nvidia,pins = "uart3_cts_n_pa1";
38 nvidia,function = "gmi";
39 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
40 nvidia,tristate = <TEGRA_PIN_ENABLE>;
41 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
42 };
43 dap2_fs_pa2 {
44 nvidia,pins = "dap2_fs_pa2";
45 nvidia,function = "i2s1";
46 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
47 nvidia,tristate = <TEGRA_PIN_DISABLE>;
48 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
49 };
50 dap2_sclk_pa3 {
51 nvidia,pins = "dap2_sclk_pa3";
52 nvidia,function = "i2s1";
53 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
54 nvidia,tristate = <TEGRA_PIN_DISABLE>;
55 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
56 };
57 dap2_din_pa4 {
58 nvidia,pins = "dap2_din_pa4";
59 nvidia,function = "i2s1";
60 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
61 nvidia,tristate = <TEGRA_PIN_DISABLE>;
62 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
63 };
64 dap2_dout_pa5 {
65 nvidia,pins = "dap2_dout_pa5";
66 nvidia,function = "i2s1";
67 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
68 nvidia,tristate = <TEGRA_PIN_DISABLE>;
69 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
70 };
71 sdmmc3_clk_pa6 {
72 nvidia,pins = "sdmmc3_clk_pa6";
73 nvidia,function = "sdmmc3";
74 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
75 nvidia,tristate = <TEGRA_PIN_DISABLE>;
76 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
77 };
78 sdmmc3_cmd_pa7 {
79 nvidia,pins = "sdmmc3_cmd_pa7";
80 nvidia,function = "sdmmc3";
81 nvidia,pull = <TEGRA_PIN_PULL_UP>;
82 nvidia,tristate = <TEGRA_PIN_DISABLE>;
83 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
84 };
85 pb0 {
86 nvidia,pins = "pb0";
87 nvidia,function = "rsvd2";
88 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
89 nvidia,tristate = <TEGRA_PIN_ENABLE>;
90 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
91 };
92 pb1 {
93 nvidia,pins = "pb1";
94 nvidia,function = "rsvd2";
95 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
96 nvidia,tristate = <TEGRA_PIN_ENABLE>;
97 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
98 };
99 sdmmc3_dat3_pb4 {
100 nvidia,pins = "sdmmc3_dat3_pb4";
101 nvidia,function = "sdmmc3";
102 nvidia,pull = <TEGRA_PIN_PULL_UP>;
103 nvidia,tristate = <TEGRA_PIN_DISABLE>;
104 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
105 };
106 sdmmc3_dat2_pb5 {
107 nvidia,pins = "sdmmc3_dat2_pb5";
108 nvidia,function = "sdmmc3";
109 nvidia,pull = <TEGRA_PIN_PULL_UP>;
110 nvidia,tristate = <TEGRA_PIN_DISABLE>;
111 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
112 };
113 sdmmc3_dat1_pb6 {
114 nvidia,pins = "sdmmc3_dat1_pb6";
115 nvidia,function = "sdmmc3";
116 nvidia,pull = <TEGRA_PIN_PULL_UP>;
117 nvidia,tristate = <TEGRA_PIN_DISABLE>;
118 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
119 };
120 sdmmc3_dat0_pb7 {
121 nvidia,pins = "sdmmc3_dat0_pb7";
122 nvidia,function = "sdmmc3";
123 nvidia,pull = <TEGRA_PIN_PULL_UP>;
124 nvidia,tristate = <TEGRA_PIN_DISABLE>;
125 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
126 };
127 uart3_rts_n_pc0 {
128 nvidia,pins = "uart3_rts_n_pc0";
129 nvidia,function = "gmi";
130 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
131 nvidia,tristate = <TEGRA_PIN_ENABLE>;
132 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
133 };
134 uart2_txd_pc2 {
135 nvidia,pins = "uart2_txd_pc2";
136 nvidia,function = "irda";
137 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
138 nvidia,tristate = <TEGRA_PIN_ENABLE>;
139 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
140 };
141 uart2_rxd_pc3 {
142 nvidia,pins = "uart2_rxd_pc3";
143 nvidia,function = "irda";
144 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
145 nvidia,tristate = <TEGRA_PIN_ENABLE>;
146 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
147 };
148 gen1_i2c_scl_pc4 {
149 nvidia,pins = "gen1_i2c_scl_pc4";
150 nvidia,function = "i2c1";
151 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
152 nvidia,tristate = <TEGRA_PIN_DISABLE>;
153 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
154 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
155 };
156 gen1_i2c_sda_pc5 {
157 nvidia,pins = "gen1_i2c_sda_pc5";
158 nvidia,function = "i2c1";
159 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
160 nvidia,tristate = <TEGRA_PIN_DISABLE>;
161 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
162 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
163 };
164 pc7 {
165 nvidia,pins = "pc7";
166 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
167 nvidia,tristate = <TEGRA_PIN_DISABLE>;
168 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
169 };
170 pg0 {
171 nvidia,pins = "pg0";
172 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
173 nvidia,tristate = <TEGRA_PIN_DISABLE>;
174 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
175 };
176 pg1 {
177 nvidia,pins = "pg1";
178 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
179 nvidia,tristate = <TEGRA_PIN_DISABLE>;
180 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
181 };
182 pg2 {
183 nvidia,pins = "pg2";
184 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
185 nvidia,tristate = <TEGRA_PIN_DISABLE>;
186 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
187 };
188 pg3 {
189 nvidia,pins = "pg3";
190 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
191 nvidia,tristate = <TEGRA_PIN_DISABLE>;
192 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
193 };
194 pg4 {
195 nvidia,pins = "pg4";
196 nvidia,function = "spi4";
197 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
198 nvidia,tristate = <TEGRA_PIN_DISABLE>;
199 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
200 };
201 pg5 {
202 nvidia,pins = "pg5";
203 nvidia,function = "spi4";
204 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
205 nvidia,tristate = <TEGRA_PIN_DISABLE>;
206 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
207 };
208 pg6 {
209 nvidia,pins = "pg6";
210 nvidia,function = "spi4";
211 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
212 nvidia,tristate = <TEGRA_PIN_DISABLE>;
213 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
214 };
215 pg7 {
216 nvidia,pins = "pg7";
217 nvidia,function = "spi4";
218 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
219 nvidia,tristate = <TEGRA_PIN_DISABLE>;
220 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
221 };
222 ph0 {
223 nvidia,pins = "ph0";
224 nvidia,function = "gmi";
225 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
226 nvidia,tristate = <TEGRA_PIN_ENABLE>;
227 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
228 };
229 ph1 {
230 nvidia,pins = "ph1";
231 nvidia,function = "pwm1";
232 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
233 nvidia,tristate = <TEGRA_PIN_DISABLE>;
234 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
235 };
236 ph2 {
237 nvidia,pins = "ph2";
238 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
239 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
241 };
242 ph3 {
243 nvidia,pins = "ph3";
244 nvidia,function = "gmi";
245 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
246 nvidia,tristate = <TEGRA_PIN_ENABLE>;
247 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
248 };
249 ph4 {
250 nvidia,pins = "ph4";
251 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
252 nvidia,tristate = <TEGRA_PIN_DISABLE>;
253 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
254 };
255 ph5 {
256 nvidia,pins = "ph5";
257 nvidia,function = "rsvd2";
258 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
259 nvidia,tristate = <TEGRA_PIN_ENABLE>;
260 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
261 };
262 ph6 {
263 nvidia,pins = "ph6";
264 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
265 nvidia,tristate = <TEGRA_PIN_DISABLE>;
266 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
267 };
268 ph7 {
269 nvidia,pins = "ph7";
270 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
271 nvidia,tristate = <TEGRA_PIN_DISABLE>;
272 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
273 };
274 pi0 {
275 nvidia,pins = "pi0";
276 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
277 nvidia,tristate = <TEGRA_PIN_DISABLE>;
278 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
279 };
280 pi1 {
281 nvidia,pins = "pi1";
282 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
283 nvidia,tristate = <TEGRA_PIN_DISABLE>;
284 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
285 };
286 pi2 {
287 nvidia,pins = "pi2";
288 nvidia,function = "rsvd4";
289 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
290 nvidia,tristate = <TEGRA_PIN_ENABLE>;
291 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
292 };
293 pi3 {
294 nvidia,pins = "pi3";
295 nvidia,function = "spi4";
296 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
297 nvidia,tristate = <TEGRA_PIN_DISABLE>;
298 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
299 };
300 pi4 {
301 nvidia,pins = "pi4";
302 nvidia,function = "gmi";
303 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
304 nvidia,tristate = <TEGRA_PIN_ENABLE>;
305 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
306 };
307 pi5 {
308 nvidia,pins = "pi5";
309 nvidia,pull = <TEGRA_PIN_PULL_UP>;
310 nvidia,tristate = <TEGRA_PIN_DISABLE>;
311 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
312 };
313 pi6 {
314 nvidia,pins = "pi6";
315 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
316 nvidia,tristate = <TEGRA_PIN_DISABLE>;
317 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
318 };
319 pi7 {
320 nvidia,pins = "pi7";
321 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
322 nvidia,tristate = <TEGRA_PIN_DISABLE>;
323 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
324 };
325 pj0 {
326 nvidia,pins = "pj0";
327 nvidia,pull = <TEGRA_PIN_PULL_UP>;
328 nvidia,tristate = <TEGRA_PIN_DISABLE>;
329 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
330 };
331 pj2 {
332 nvidia,pins = "pj2";
333 nvidia,function = "rsvd1";
334 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
335 nvidia,tristate = <TEGRA_PIN_ENABLE>;
336 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
337 };
338 uart2_cts_n_pj5 {
339 nvidia,pins = "uart2_cts_n_pj5";
340 nvidia,function = "gmi";
341 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
342 nvidia,tristate = <TEGRA_PIN_ENABLE>;
343 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
344 };
345 uart2_rts_n_pj6 {
346 nvidia,pins = "uart2_rts_n_pj6";
347 nvidia,function = "gmi";
348 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
349 nvidia,tristate = <TEGRA_PIN_ENABLE>;
350 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
351 };
352 pj7 {
353 nvidia,pins = "pj7";
354 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
355 nvidia,tristate = <TEGRA_PIN_DISABLE>;
356 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
357 };
358 pk0 {
359 nvidia,pins = "pk0";
360 nvidia,function = "rsvd1";
361 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
362 nvidia,tristate = <TEGRA_PIN_ENABLE>;
363 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
364 };
365 pk1 {
366 nvidia,pins = "pk1";
367 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
368 nvidia,tristate = <TEGRA_PIN_DISABLE>;
369 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
370 };
371 pk2 {
372 nvidia,pins = "pk2";
373 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
374 nvidia,tristate = <TEGRA_PIN_DISABLE>;
375 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
376 };
377 pk3 {
378 nvidia,pins = "pk3";
379 nvidia,function = "gmi";
380 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
381 nvidia,tristate = <TEGRA_PIN_ENABLE>;
382 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
383 };
384 pk4 {
385 nvidia,pins = "pk4";
386 nvidia,pull = <TEGRA_PIN_PULL_UP>;
387 nvidia,tristate = <TEGRA_PIN_DISABLE>;
388 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
389 };
390 spdif_out_pk5 {
391 nvidia,pins = "spdif_out_pk5";
392 nvidia,function = "rsvd2";
393 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
394 nvidia,tristate = <TEGRA_PIN_ENABLE>;
395 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
396 };
397 spdif_in_pk6 {
398 nvidia,pins = "spdif_in_pk6";
399 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
400 nvidia,tristate = <TEGRA_PIN_DISABLE>;
401 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
402 };
403 pk7 {
404 nvidia,pins = "pk7";
405 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
406 nvidia,tristate = <TEGRA_PIN_DISABLE>;
407 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
408 };
409 dap1_fs_pn0 {
410 nvidia,pins = "dap1_fs_pn0";
411 nvidia,function = "rsvd4";
412 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
413 nvidia,tristate = <TEGRA_PIN_ENABLE>;
414 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
415 };
416 dap1_din_pn1 {
417 nvidia,pins = "dap1_din_pn1";
418 nvidia,function = "rsvd4";
419 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
420 nvidia,tristate = <TEGRA_PIN_ENABLE>;
421 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
422 };
423 dap1_dout_pn2 {
424 nvidia,pins = "dap1_dout_pn2";
425 nvidia,function = "i2s0";
426 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
427 nvidia,tristate = <TEGRA_PIN_ENABLE>;
428 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
429 };
430 dap1_sclk_pn3 {
431 nvidia,pins = "dap1_sclk_pn3";
432 nvidia,function = "rsvd4";
433 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
434 nvidia,tristate = <TEGRA_PIN_ENABLE>;
435 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
436 };
437 usb_vbus_en0_pn4 {
438 nvidia,pins = "usb_vbus_en0_pn4";
439 nvidia,function = "usb";
440 nvidia,pull = <TEGRA_PIN_PULL_UP>;
441 nvidia,tristate = <TEGRA_PIN_DISABLE>;
442 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
443 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
444 };
445 usb_vbus_en1_pn5 {
446 nvidia,pins = "usb_vbus_en1_pn5";
447 nvidia,function = "usb";
448 nvidia,pull = <TEGRA_PIN_PULL_UP>;
449 nvidia,tristate = <TEGRA_PIN_DISABLE>;
450 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
451 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
452 };
453 hdmi_int_pn7 {
454 nvidia,pins = "hdmi_int_pn7";
455 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
456 nvidia,tristate = <TEGRA_PIN_DISABLE>;
457 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
458 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
459 };
460 ulpi_data7_po0 {
461 nvidia,pins = "ulpi_data7_po0";
462 nvidia,function = "ulpi";
463 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
464 nvidia,tristate = <TEGRA_PIN_ENABLE>;
465 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
466 };
467 ulpi_data0_po1 {
468 nvidia,pins = "ulpi_data0_po1";
469 nvidia,function = "ulpi";
470 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
471 nvidia,tristate = <TEGRA_PIN_ENABLE>;
472 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
473 };
474 ulpi_data1_po2 {
475 nvidia,pins = "ulpi_data1_po2";
476 nvidia,function = "ulpi";
477 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
478 nvidia,tristate = <TEGRA_PIN_ENABLE>;
479 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
480 };
481 ulpi_data2_po3 {
482 nvidia,pins = "ulpi_data2_po3";
483 nvidia,function = "ulpi";
484 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
485 nvidia,tristate = <TEGRA_PIN_ENABLE>;
486 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
487 };
488 ulpi_data3_po4 {
489 nvidia,pins = "ulpi_data3_po4";
490 nvidia,function = "ulpi";
491 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
492 nvidia,tristate = <TEGRA_PIN_ENABLE>;
493 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
494 };
495 ulpi_data4_po5 {
496 nvidia,pins = "ulpi_data4_po5";
497 nvidia,function = "ulpi";
498 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
499 nvidia,tristate = <TEGRA_PIN_ENABLE>;
500 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
501 };
502 ulpi_data5_po6 {
503 nvidia,pins = "ulpi_data5_po6";
504 nvidia,function = "ulpi";
505 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
506 nvidia,tristate = <TEGRA_PIN_ENABLE>;
507 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
508 };
509 ulpi_data6_po7 {
510 nvidia,pins = "ulpi_data6_po7";
511 nvidia,function = "ulpi";
512 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
513 nvidia,tristate = <TEGRA_PIN_ENABLE>;
514 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
515 };
516 dap3_fs_pp0 {
517 nvidia,pins = "dap3_fs_pp0";
518 nvidia,function = "i2s2";
519 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
520 nvidia,tristate = <TEGRA_PIN_ENABLE>;
521 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
522 };
523 dap3_din_pp1 {
524 nvidia,pins = "dap3_din_pp1";
525 nvidia,function = "i2s2";
526 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
527 nvidia,tristate = <TEGRA_PIN_ENABLE>;
528 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
529 };
530 dap3_dout_pp2 {
531 nvidia,pins = "dap3_dout_pp2";
532 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
533 nvidia,tristate = <TEGRA_PIN_DISABLE>;
534 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
535 };
536 dap3_sclk_pp3 {
537 nvidia,pins = "dap3_sclk_pp3";
538 nvidia,function = "rsvd3";
539 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
540 nvidia,tristate = <TEGRA_PIN_ENABLE>;
541 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
542 };
543 dap4_fs_pp4 {
544 nvidia,pins = "dap4_fs_pp4";
545 nvidia,function = "rsvd4";
546 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
547 nvidia,tristate = <TEGRA_PIN_ENABLE>;
548 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
549 };
550 dap4_din_pp5 {
551 nvidia,pins = "dap4_din_pp5";
552 nvidia,function = "rsvd3";
553 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
554 nvidia,tristate = <TEGRA_PIN_ENABLE>;
555 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
556 };
557 dap4_dout_pp6 {
558 nvidia,pins = "dap4_dout_pp6";
559 nvidia,function = "rsvd4";
560 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
561 nvidia,tristate = <TEGRA_PIN_ENABLE>;
562 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
563 };
564 dap4_sclk_pp7 {
565 nvidia,pins = "dap4_sclk_pp7";
566 nvidia,function = "rsvd3";
567 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
568 nvidia,tristate = <TEGRA_PIN_ENABLE>;
569 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
570 };
571 kb_col0_pq0 {
572 nvidia,pins = "kb_col0_pq0";
573 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
574 nvidia,tristate = <TEGRA_PIN_DISABLE>;
575 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
576 };
577 kb_col1_pq1 {
578 nvidia,pins = "kb_col1_pq1";
579 nvidia,function = "rsvd2";
580 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
581 nvidia,tristate = <TEGRA_PIN_ENABLE>;
582 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
583 };
584 kb_col2_pq2 {
585 nvidia,pins = "kb_col2_pq2";
586 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
587 nvidia,tristate = <TEGRA_PIN_DISABLE>;
588 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
589 };
590 kb_col3_pq3 {
591 nvidia,pins = "kb_col3_pq3";
592 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
593 nvidia,tristate = <TEGRA_PIN_DISABLE>;
594 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
595 };
596 kb_col4_pq4 {
597 nvidia,pins = "kb_col4_pq4";
598 nvidia,function = "sdmmc3";
599 nvidia,pull = <TEGRA_PIN_PULL_UP>;
600 nvidia,tristate = <TEGRA_PIN_DISABLE>;
601 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
602 };
603 kb_col5_pq5 {
604 nvidia,pins = "kb_col5_pq5";
605 nvidia,function = "rsvd2";
606 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
607 nvidia,tristate = <TEGRA_PIN_ENABLE>;
608 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
609 };
610 kb_col6_pq6 {
611 nvidia,pins = "kb_col6_pq6";
612 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
613 nvidia,tristate = <TEGRA_PIN_DISABLE>;
614 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
615 };
616 kb_col7_pq7 {
617 nvidia,pins = "kb_col7_pq7";
618 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
619 nvidia,tristate = <TEGRA_PIN_DISABLE>;
620 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
621 };
622 kb_row0_pr0 {
623 nvidia,pins = "kb_row0_pr0";
624 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
625 nvidia,tristate = <TEGRA_PIN_DISABLE>;
626 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
627 };
628 kb_row1_pr1 {
629 nvidia,pins = "kb_row1_pr1";
630 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
631 nvidia,tristate = <TEGRA_PIN_DISABLE>;
632 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
633 };
634 kb_row2_pr2 {
635 nvidia,pins = "kb_row2_pr2";
636 nvidia,function = "rsvd2";
637 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
638 nvidia,tristate = <TEGRA_PIN_ENABLE>;
639 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
640 };
641 kb_row3_pr3 {
642 nvidia,pins = "kb_row3_pr3";
643 nvidia,function = "kbc";
644 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
645 nvidia,tristate = <TEGRA_PIN_ENABLE>;
646 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
647 };
648 kb_row4_pr4 {
649 nvidia,pins = "kb_row4_pr4";
650 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
651 nvidia,tristate = <TEGRA_PIN_DISABLE>;
652 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
653 };
654 kb_row5_pr5 {
655 nvidia,pins = "kb_row5_pr5";
656 nvidia,function = "rsvd3";
657 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
658 nvidia,tristate = <TEGRA_PIN_ENABLE>;
659 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
660 };
661 kb_row6_pr6 {
662 nvidia,pins = "kb_row6_pr6";
663 nvidia,function = "kbc";
664 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
665 nvidia,tristate = <TEGRA_PIN_ENABLE>;
666 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
667 };
668 kb_row7_pr7 {
669 nvidia,pins = "kb_row7_pr7";
670 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
671 nvidia,tristate = <TEGRA_PIN_DISABLE>;
672 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
673 };
674 kb_row8_ps0 {
675 nvidia,pins = "kb_row8_ps0";
676 nvidia,function = "rsvd2";
677 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
678 nvidia,tristate = <TEGRA_PIN_ENABLE>;
679 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
680 };
681 kb_row9_ps1 {
682 nvidia,pins = "kb_row9_ps1";
683 nvidia,function = "uarta";
684 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
685 nvidia,tristate = <TEGRA_PIN_DISABLE>;
686 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
687 };
688 kb_row10_ps2 {
689 nvidia,pins = "kb_row10_ps2";
690 nvidia,function = "uarta";
691 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
692 nvidia,tristate = <TEGRA_PIN_DISABLE>;
693 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
694 };
695 kb_row11_ps3 {
696 nvidia,pins = "kb_row11_ps3";
697 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
698 nvidia,tristate = <TEGRA_PIN_DISABLE>;
699 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
700 };
701 kb_row12_ps4 {
702 nvidia,pins = "kb_row12_ps4";
703 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
704 nvidia,tristate = <TEGRA_PIN_DISABLE>;
705 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
706 };
707 kb_row13_ps5 {
708 nvidia,pins = "kb_row13_ps5";
709 nvidia,function = "rsvd2";
710 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
711 nvidia,tristate = <TEGRA_PIN_ENABLE>;
712 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
713 };
714 kb_row14_ps6 {
715 nvidia,pins = "kb_row14_ps6";
716 nvidia,function = "rsvd2";
717 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
718 nvidia,tristate = <TEGRA_PIN_ENABLE>;
719 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
720 };
721 kb_row15_ps7 {
722 nvidia,pins = "kb_row15_ps7";
723 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
724 nvidia,tristate = <TEGRA_PIN_DISABLE>;
725 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
726 };
727 kb_row16_pt0 {
728 nvidia,pins = "kb_row16_pt0";
729 nvidia,function = "rsvd2";
730 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
731 nvidia,tristate = <TEGRA_PIN_ENABLE>;
732 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
733 };
734 kb_row17_pt1 {
735 nvidia,pins = "kb_row17_pt1";
736 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
737 nvidia,tristate = <TEGRA_PIN_DISABLE>;
738 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
739 };
740 gen2_i2c_scl_pt5 {
741 nvidia,pins = "gen2_i2c_scl_pt5";
742 nvidia,function = "i2c2";
743 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
744 nvidia,tristate = <TEGRA_PIN_DISABLE>;
745 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
746 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
747 };
748 gen2_i2c_sda_pt6 {
749 nvidia,pins = "gen2_i2c_sda_pt6";
750 nvidia,function = "i2c2";
751 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
752 nvidia,tristate = <TEGRA_PIN_DISABLE>;
753 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
754 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
755 };
756 sdmmc4_cmd_pt7 {
757 nvidia,pins = "sdmmc4_cmd_pt7";
758 nvidia,function = "sdmmc4";
759 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
760 nvidia,tristate = <TEGRA_PIN_DISABLE>;
761 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
762 };
763 pu0 {
764 nvidia,pins = "pu0";
765 nvidia,function = "rsvd4";
766 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
767 nvidia,tristate = <TEGRA_PIN_ENABLE>;
768 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
769 };
770 pu1 {
771 nvidia,pins = "pu1";
772 nvidia,function = "rsvd1";
773 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
774 nvidia,tristate = <TEGRA_PIN_ENABLE>;
775 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
776 };
777 pu2 {
778 nvidia,pins = "pu2";
779 nvidia,function = "rsvd1";
780 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
781 nvidia,tristate = <TEGRA_PIN_ENABLE>;
782 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
783 };
784 pu3 {
785 nvidia,pins = "pu3";
786 nvidia,function = "gmi";
787 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
788 nvidia,tristate = <TEGRA_PIN_ENABLE>;
789 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
790 };
791 pu4 {
792 nvidia,pins = "pu4";
793 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
794 nvidia,tristate = <TEGRA_PIN_DISABLE>;
795 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
796 };
797 pu5 {
798 nvidia,pins = "pu5";
799 nvidia,pull = <TEGRA_PIN_PULL_UP>;
800 nvidia,tristate = <TEGRA_PIN_DISABLE>;
801 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
802 };
803 pu6 {
804 nvidia,pins = "pu6";
805 nvidia,pull = <TEGRA_PIN_PULL_UP>;
806 nvidia,tristate = <TEGRA_PIN_DISABLE>;
807 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
808 };
809 pv0 {
810 nvidia,pins = "pv0";
811 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
812 nvidia,tristate = <TEGRA_PIN_DISABLE>;
813 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
814 };
815 pv1 {
816 nvidia,pins = "pv1";
817 nvidia,function = "rsvd1";
818 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
819 nvidia,tristate = <TEGRA_PIN_ENABLE>;
820 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
821 };
822 sdmmc3_cd_n_pv2 {
823 nvidia,pins = "sdmmc3_cd_n_pv2";
824 nvidia,function = "sdmmc3";
825 nvidia,pull = <TEGRA_PIN_PULL_UP>;
826 nvidia,tristate = <TEGRA_PIN_DISABLE>;
827 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
828 };
829 sdmmc1_wp_n_pv3 {
830 nvidia,pins = "sdmmc1_wp_n_pv3";
831 nvidia,function = "sdmmc1";
832 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
833 nvidia,tristate = <TEGRA_PIN_ENABLE>;
834 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
835 };
836 ddc_scl_pv4 {
837 nvidia,pins = "ddc_scl_pv4";
838 nvidia,function = "i2c4";
839 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
840 nvidia,tristate = <TEGRA_PIN_DISABLE>;
841 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
842 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
843 };
844 ddc_sda_pv5 {
845 nvidia,pins = "ddc_sda_pv5";
846 nvidia,function = "i2c4";
847 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
848 nvidia,tristate = <TEGRA_PIN_DISABLE>;
849 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
850 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
851 };
852 gpio_w2_aud_pw2 {
853 nvidia,pins = "gpio_w2_aud_pw2";
854 nvidia,function = "rsvd2";
855 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
856 nvidia,tristate = <TEGRA_PIN_ENABLE>;
857 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
858 };
859 gpio_w3_aud_pw3 {
860 nvidia,pins = "gpio_w3_aud_pw3";
861 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
862 nvidia,tristate = <TEGRA_PIN_DISABLE>;
863 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
864 };
865 dap_mclk1_pw4 {
866 nvidia,pins = "dap_mclk1_pw4";
867 nvidia,function = "extperiph1";
868 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
869 nvidia,tristate = <TEGRA_PIN_DISABLE>;
870 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
871 };
872 clk2_out_pw5 {
873 nvidia,pins = "clk2_out_pw5";
874 nvidia,function = "rsvd2";
875 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
876 nvidia,tristate = <TEGRA_PIN_ENABLE>;
877 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
878 };
879 uart3_txd_pw6 {
880 nvidia,pins = "uart3_txd_pw6";
881 nvidia,function = "rsvd2";
882 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
883 nvidia,tristate = <TEGRA_PIN_ENABLE>;
884 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
885 };
886 uart3_rxd_pw7 {
887 nvidia,pins = "uart3_rxd_pw7";
888 nvidia,function = "rsvd2";
889 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
890 nvidia,tristate = <TEGRA_PIN_ENABLE>;
891 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
892 };
893 dvfs_pwm_px0 {
894 nvidia,pins = "dvfs_pwm_px0";
895 nvidia,function = "cldvfs";
896 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
897 nvidia,tristate = <TEGRA_PIN_DISABLE>;
898 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
899 };
900 gpio_x1_aud_px1 {
901 nvidia,pins = "gpio_x1_aud_px1";
902 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
903 nvidia,tristate = <TEGRA_PIN_DISABLE>;
904 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
905 };
906 dvfs_clk_px2 {
907 nvidia,pins = "dvfs_clk_px2";
908 nvidia,function = "cldvfs";
909 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
910 nvidia,tristate = <TEGRA_PIN_DISABLE>;
911 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
912 };
913 gpio_x3_aud_px3 {
914 nvidia,pins = "gpio_x3_aud_px3";
915 nvidia,function = "rsvd4";
916 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
917 nvidia,tristate = <TEGRA_PIN_ENABLE>;
918 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
919 };
920 gpio_x4_aud_px4 {
921 nvidia,pins = "gpio_x4_aud_px4";
922 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
923 nvidia,tristate = <TEGRA_PIN_DISABLE>;
924 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
925 };
926 gpio_x5_aud_px5 {
927 nvidia,pins = "gpio_x5_aud_px5";
928 nvidia,function = "rsvd4";
929 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
930 nvidia,tristate = <TEGRA_PIN_ENABLE>;
931 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
932 };
933 gpio_x6_aud_px6 {
934 nvidia,pins = "gpio_x6_aud_px6";
935 nvidia,function = "gmi";
936 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
937 nvidia,tristate = <TEGRA_PIN_ENABLE>;
938 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
939 };
940 gpio_x7_aud_px7 {
941 nvidia,pins = "gpio_x7_aud_px7";
942 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
943 nvidia,tristate = <TEGRA_PIN_DISABLE>;
944 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
945 };
946 ulpi_clk_py0 {
947 nvidia,pins = "ulpi_clk_py0";
948 nvidia,function = "spi1";
949 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
950 nvidia,tristate = <TEGRA_PIN_DISABLE>;
951 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
952 };
953 ulpi_dir_py1 {
954 nvidia,pins = "ulpi_dir_py1";
955 nvidia,function = "spi1";
956 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
957 nvidia,tristate = <TEGRA_PIN_DISABLE>;
958 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
959 };
960 ulpi_nxt_py2 {
961 nvidia,pins = "ulpi_nxt_py2";
962 nvidia,function = "spi1";
963 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
964 nvidia,tristate = <TEGRA_PIN_DISABLE>;
965 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
966 };
967 ulpi_stp_py3 {
968 nvidia,pins = "ulpi_stp_py3";
969 nvidia,function = "spi1";
970 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
971 nvidia,tristate = <TEGRA_PIN_DISABLE>;
972 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
973 };
974 sdmmc1_dat3_py4 {
975 nvidia,pins = "sdmmc1_dat3_py4";
976 nvidia,function = "sdmmc1";
977 nvidia,pull = <TEGRA_PIN_PULL_UP>;
978 nvidia,tristate = <TEGRA_PIN_DISABLE>;
979 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
980 };
981 sdmmc1_dat2_py5 {
982 nvidia,pins = "sdmmc1_dat2_py5";
983 nvidia,function = "sdmmc1";
984 nvidia,pull = <TEGRA_PIN_PULL_UP>;
985 nvidia,tristate = <TEGRA_PIN_DISABLE>;
986 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
987 };
988 sdmmc1_dat1_py6 {
989 nvidia,pins = "sdmmc1_dat1_py6";
990 nvidia,function = "sdmmc1";
991 nvidia,pull = <TEGRA_PIN_PULL_UP>;
992 nvidia,tristate = <TEGRA_PIN_DISABLE>;
993 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
994 };
995 sdmmc1_dat0_py7 {
996 nvidia,pins = "sdmmc1_dat0_py7";
997 nvidia,function = "sdmmc1";
998 nvidia,pull = <TEGRA_PIN_PULL_UP>;
999 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1000 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1001 };
1002 sdmmc1_clk_pz0 {
1003 nvidia,pins = "sdmmc1_clk_pz0";
1004 nvidia,function = "sdmmc1";
1005 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1006 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1007 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1008 };
1009 sdmmc1_cmd_pz1 {
1010 nvidia,pins = "sdmmc1_cmd_pz1";
1011 nvidia,function = "sdmmc1";
1012 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1013 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1014 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1015 };
1016 pwr_i2c_scl_pz6 {
1017 nvidia,pins = "pwr_i2c_scl_pz6";
1018 nvidia,function = "i2cpwr";
1019 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1020 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1021 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1022 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1023 };
1024 pwr_i2c_sda_pz7 {
1025 nvidia,pins = "pwr_i2c_sda_pz7";
1026 nvidia,function = "i2cpwr";
1027 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1028 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1029 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1030 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1031 };
1032 sdmmc4_dat0_paa0 {
1033 nvidia,pins = "sdmmc4_dat0_paa0";
1034 nvidia,function = "sdmmc4";
1035 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1036 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1037 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1038 };
1039 sdmmc4_dat1_paa1 {
1040 nvidia,pins = "sdmmc4_dat1_paa1";
1041 nvidia,function = "sdmmc4";
1042 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1043 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1044 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1045 };
1046 sdmmc4_dat2_paa2 {
1047 nvidia,pins = "sdmmc4_dat2_paa2";
1048 nvidia,function = "sdmmc4";
1049 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1050 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1051 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1052 };
1053 sdmmc4_dat3_paa3 {
1054 nvidia,pins = "sdmmc4_dat3_paa3";
1055 nvidia,function = "sdmmc4";
1056 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1057 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1058 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1059 };
1060 sdmmc4_dat4_paa4 {
1061 nvidia,pins = "sdmmc4_dat4_paa4";
1062 nvidia,function = "sdmmc4";
1063 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1064 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1065 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1066 };
1067 sdmmc4_dat5_paa5 {
1068 nvidia,pins = "sdmmc4_dat5_paa5";
1069 nvidia,function = "sdmmc4";
1070 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1071 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1072 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1073 };
1074 sdmmc4_dat6_paa6 {
1075 nvidia,pins = "sdmmc4_dat6_paa6";
1076 nvidia,function = "sdmmc4";
1077 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1078 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1079 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1080 };
1081 sdmmc4_dat7_paa7 {
1082 nvidia,pins = "sdmmc4_dat7_paa7";
1083 nvidia,function = "sdmmc4";
1084 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1085 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1086 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1087 };
1088 pbb0 {
1089 nvidia,pins = "pbb0";
1090 nvidia,function = "vgp6";
1091 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1092 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1093 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1094 };
1095 cam_i2c_scl_pbb1 {
1096 nvidia,pins = "cam_i2c_scl_pbb1";
1097 nvidia,function = "rsvd3";
1098 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1099 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1100 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1101 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1102 };
1103 cam_i2c_sda_pbb2 {
1104 nvidia,pins = "cam_i2c_sda_pbb2";
1105 nvidia,function = "rsvd3";
1106 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1107 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1108 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1109 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1110 };
1111 pbb3 {
1112 nvidia,pins = "pbb3";
1113 nvidia,function = "vgp3";
1114 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1115 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1116 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1117 };
1118 pbb4 {
1119 nvidia,pins = "pbb4";
1120 nvidia,function = "vgp4";
1121 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1122 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1123 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1124 };
1125 pbb5 {
1126 nvidia,pins = "pbb5";
1127 nvidia,function = "rsvd3";
1128 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1129 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1130 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1131 };
1132 pbb6 {
1133 nvidia,pins = "pbb6";
1134 nvidia,function = "rsvd2";
1135 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1136 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1137 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1138 };
1139 pbb7 {
1140 nvidia,pins = "pbb7";
1141 nvidia,function = "rsvd2";
1142 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1143 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1144 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1145 };
1146 cam_mclk_pcc0 {
1147 nvidia,pins = "cam_mclk_pcc0";
1148 nvidia,function = "vi";
1149 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1150 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1151 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1152 };
1153 pcc1 {
1154 nvidia,pins = "pcc1";
1155 nvidia,function = "rsvd2";
1156 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1157 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1158 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1159 };
1160 pcc2 {
1161 nvidia,pins = "pcc2";
1162 nvidia,function = "rsvd2";
1163 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1164 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1165 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1166 };
1167 sdmmc4_clk_pcc4 {
1168 nvidia,pins = "sdmmc4_clk_pcc4";
1169 nvidia,function = "sdmmc4";
1170 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1171 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1172 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1173 };
1174 clk2_req_pcc5 {
1175 nvidia,pins = "clk2_req_pcc5";
1176 nvidia,function = "rsvd2";
1177 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1178 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1179 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1180 };
1181 pex_l0_rst_n_pdd1 {
1182 nvidia,pins = "pex_l0_rst_n_pdd1";
1183 nvidia,function = "rsvd2";
1184 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1185 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1186 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1187 };
1188 pex_l0_clkreq_n_pdd2 {
1189 nvidia,pins = "pex_l0_clkreq_n_pdd2";
1190 nvidia,function = "rsvd2";
1191 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1192 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1193 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1194 };
1195 pex_wake_n_pdd3 {
1196 nvidia,pins = "pex_wake_n_pdd3";
1197 nvidia,function = "rsvd2";
1198 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1199 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1200 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1201 };
1202 pex_l1_rst_n_pdd5 {
1203 nvidia,pins = "pex_l1_rst_n_pdd5";
1204 nvidia,function = "rsvd2";
1205 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1206 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1207 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1208 };
1209 pex_l1_clkreq_n_pdd6 {
1210 nvidia,pins = "pex_l1_clkreq_n_pdd6";
1211 nvidia,function = "rsvd2";
1212 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1213 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1214 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1215 };
1216 clk3_out_pee0 {
1217 nvidia,pins = "clk3_out_pee0";
1218 nvidia,function = "rsvd2";
1219 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1220 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1221 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1222 };
1223 clk3_req_pee1 {
1224 nvidia,pins = "clk3_req_pee1";
1225 nvidia,function = "rsvd2";
1226 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1227 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1228 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1229 };
1230 dap_mclk1_req_pee2 {
1231 nvidia,pins = "dap_mclk1_req_pee2";
1232 nvidia,function = "rsvd4";
1233 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1234 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1235 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1236 };
1237 hdmi_cec_pee3 {
1238 nvidia,pins = "hdmi_cec_pee3";
1239 nvidia,function = "cec";
1240 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1241 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1242 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1243 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1244 };
1245 sdmmc3_clk_lb_out_pee4 {
1246 nvidia,pins = "sdmmc3_clk_lb_out_pee4";
1247 nvidia,function = "sdmmc3";
1248 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1249 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1250 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1251 };
1252 sdmmc3_clk_lb_in_pee5 {
1253 nvidia,pins = "sdmmc3_clk_lb_in_pee5";
1254 nvidia,function = "sdmmc3";
1255 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1256 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1257 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1258 };
1259 dp_hpd_pff0 {
1260 nvidia,pins = "dp_hpd_pff0";
1261 nvidia,function = "dp";
1262 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1263 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1264 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1265 };
1266 usb_vbus_en2_pff1 {
1267 nvidia,pins = "usb_vbus_en2_pff1";
1268 nvidia,function = "rsvd2";
1269 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1270 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1271 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1272 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1273 };
1274 pff2 {
1275 nvidia,pins = "pff2";
1276 nvidia,function = "rsvd2";
1277 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1278 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1279 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1280 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1281 };
1282 core_pwr_req {
1283 nvidia,pins = "core_pwr_req";
1284 nvidia,function = "pwron";
1285 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1286 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1287 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1288 };
1289 cpu_pwr_req {
1290 nvidia,pins = "cpu_pwr_req";
1291 nvidia,function = "cpu";
1292 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1293 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1294 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1295 };
1296 pwr_int_n {
1297 nvidia,pins = "pwr_int_n";
1298 nvidia,function = "pmi";
1299 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1300 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1301 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1302 };
1303 reset_out_n {
1304 nvidia,pins = "reset_out_n";
1305 nvidia,function = "reset_out_n";
1306 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1307 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1308 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1309 };
1310 owr {
1311 nvidia,pins = "owr";
1312 nvidia,function = "rsvd2";
1313 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1314 nvidia,tristate = <TEGRA_PIN_ENABLE>;
1315 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1316 nvidia,rcv-sel = <TEGRA_PIN_DISABLE>;
1317 };
1318 clk_32k_in {
1319 nvidia,pins = "clk_32k_in";
1320 nvidia,function = "clk";
1321 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1322 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1323 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1324 };
1325 jtag_rtck {
1326 nvidia,pins = "jtag_rtck";
1327 nvidia,function = "rtck";
1328 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1329 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1330 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1331 };
1332 };
1333 };
1334};
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
new file mode 100644
index 000000000000..a9aec23e06f2
--- /dev/null
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -0,0 +1,695 @@
1#include <dt-bindings/input/input.h>
2#include "tegra124.dtsi"
3
4/ {
5 aliases {
6 rtc0 = "/i2c@0,7000d000/pmic@40";
7 rtc1 = "/rtc@0,7000e000";
8 serial0 = &uarta;
9 };
10
11 memory {
12 reg = <0x0 0x80000000 0x0 0x80000000>;
13 };
14
15 host1x@0,50000000 {
16 hdmi@0,54280000 {
17 status = "okay";
18
19 vdd-supply = <&vdd_3v3_hdmi>;
20 pll-supply = <&vdd_hdmi_pll>;
21 hdmi-supply = <&vdd_5v0_hdmi>;
22
23 nvidia,ddc-i2c-bus = <&hdmi_ddc>;
24 nvidia,hpd-gpio =
25 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
26 };
27
28 sor@0,54540000 {
29 status = "okay";
30
31 nvidia,dpaux = <&dpaux>;
32 nvidia,panel = <&panel>;
33 };
34
35 dpaux@0,545c0000 {
36 vdd-supply = <&vdd_3v3_panel>;
37 status = "okay";
38 };
39 };
40
41 serial@0,70006000 {
42 /* Debug connector on the bottom of the board near SD card. */
43 status = "okay";
44 };
45
46 pwm@0,7000a000 {
47 status = "okay";
48 };
49
50 i2c@0,7000c000 {
51 status = "okay";
52 clock-frequency = <100000>;
53
54 acodec: audio-codec@10 {
55 compatible = "maxim,max98090";
56 reg = <0x10>;
57 interrupt-parent = <&gpio>;
58 interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
59 };
60
61 temperature-sensor@4c {
62 compatible = "ti,tmp451";
63 reg = <0x4c>;
64 interrupt-parent = <&gpio>;
65 interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
66
67 #thermal-sensor-cells = <1>;
68 };
69 };
70
71 i2c@0,7000c400 {
72 status = "okay";
73 clock-frequency = <100000>;
74
75 trackpad@15 {
76 compatible = "elan,ekth3000";
77 reg = <0x15>;
78 interrupt-parent = <&gpio>;
79 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_EDGE_FALLING>;
80 wakeup-source;
81 };
82 };
83
84 i2c@0,7000c500 {
85 status = "okay";
86 clock-frequency = <400000>;
87
88 tpm@20 {
89 compatible = "infineon,slb9645tt";
90 reg = <0x20>;
91 };
92 };
93
94 hdmi_ddc: i2c@0,7000c700 {
95 status = "okay";
96 clock-frequency = <100000>;
97 };
98
99 i2c@0,7000d000 {
100 status = "okay";
101 clock-frequency = <400000>;
102
103 pmic: pmic@40 {
104 compatible = "ams,as3722";
105 reg = <0x40>;
106 interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
107
108 ams,system-power-controller;
109
110 #interrupt-cells = <2>;
111 interrupt-controller;
112
113 gpio-controller;
114 #gpio-cells = <2>;
115
116 pinctrl-names = "default";
117 pinctrl-0 = <&as3722_default>;
118
119 as3722_default: pinmux {
120 gpio0 {
121 pins = "gpio0";
122 function = "gpio";
123 bias-pull-down;
124 };
125
126 gpio1 {
127 pins = "gpio1";
128 function = "gpio";
129 bias-pull-up;
130 };
131
132 gpio2_4_7 {
133 pins = "gpio2", "gpio4", "gpio7";
134 function = "gpio";
135 bias-pull-up;
136 };
137
138 gpio3_6 {
139 pins = "gpio3", "gpio6";
140 bias-high-impedance;
141 };
142
143 gpio5 {
144 pins = "gpio5";
145 function = "clk32k-out";
146 bias-pull-down;
147 };
148 };
149
150 regulators {
151 vsup-sd2-supply = <&vdd_5v0_sys>;
152 vsup-sd3-supply = <&vdd_5v0_sys>;
153 vsup-sd4-supply = <&vdd_5v0_sys>;
154 vsup-sd5-supply = <&vdd_5v0_sys>;
155 vin-ldo0-supply = <&vdd_1v35_lp0>;
156 vin-ldo1-6-supply = <&vdd_3v3_run>;
157 vin-ldo2-5-7-supply = <&vddio_1v8>;
158 vin-ldo3-4-supply = <&vdd_3v3_sys>;
159 vin-ldo9-10-supply = <&vdd_5v0_sys>;
160 vin-ldo11-supply = <&vdd_3v3_run>;
161
162 sd0 {
163 regulator-name = "+VDD_CPU_AP";
164 regulator-min-microvolt = <700000>;
165 regulator-max-microvolt = <1350000>;
166 regulator-min-microamp = <3500000>;
167 regulator-max-microamp = <3500000>;
168 regulator-always-on;
169 regulator-boot-on;
170 ams,ext-control = <2>;
171 };
172
173 sd1 {
174 regulator-name = "+VDD_CORE";
175 regulator-min-microvolt = <700000>;
176 regulator-max-microvolt = <1350000>;
177 regulator-min-microamp = <2500000>;
178 regulator-max-microamp = <4000000>;
179 regulator-always-on;
180 regulator-boot-on;
181 ams,ext-control = <1>;
182 };
183
184 vdd_1v35_lp0: sd2 {
185 regulator-name = "+1.35V_LP0(sd2)";
186 regulator-min-microvolt = <1350000>;
187 regulator-max-microvolt = <1350000>;
188 regulator-always-on;
189 regulator-boot-on;
190 };
191
192 sd3 {
193 regulator-name = "+1.35V_LP0(sd3)";
194 regulator-min-microvolt = <1350000>;
195 regulator-max-microvolt = <1350000>;
196 regulator-always-on;
197 regulator-boot-on;
198 };
199
200 vdd_1v05_run: sd4 {
201 regulator-name = "+1.05V_RUN";
202 regulator-min-microvolt = <1050000>;
203 regulator-max-microvolt = <1050000>;
204 };
205
206 vddio_1v8: sd5 {
207 regulator-name = "+1.8V_VDDIO";
208 regulator-min-microvolt = <1800000>;
209 regulator-max-microvolt = <1800000>;
210 regulator-always-on;
211 };
212
213 sd6 {
214 regulator-name = "+VDD_GPU_AP";
215 regulator-min-microvolt = <650000>;
216 regulator-max-microvolt = <1200000>;
217 regulator-min-microamp = <3500000>;
218 regulator-max-microamp = <3500000>;
219 regulator-boot-on;
220 regulator-always-on;
221 };
222
223 ldo0 {
224 regulator-name = "+1.05V_RUN_AVDD";
225 regulator-min-microvolt = <1050000>;
226 regulator-max-microvolt = <1050000>;
227 regulator-boot-on;
228 regulator-always-on;
229 ams,ext-control = <1>;
230 };
231
232 ldo1 {
233 regulator-name = "+1.8V_RUN_CAM";
234 regulator-min-microvolt = <1800000>;
235 regulator-max-microvolt = <1800000>;
236 };
237
238 ldo2 {
239 regulator-name = "+1.2V_GEN_AVDD";
240 regulator-min-microvolt = <1200000>;
241 regulator-max-microvolt = <1200000>;
242 regulator-boot-on;
243 regulator-always-on;
244 };
245
246 ldo3 {
247 regulator-name = "+1.00V_LP0_VDD_RTC";
248 regulator-min-microvolt = <1000000>;
249 regulator-max-microvolt = <1000000>;
250 regulator-boot-on;
251 regulator-always-on;
252 ams,enable-tracking;
253 };
254
255 vdd_run_cam: ldo4 {
256 regulator-name = "+3.3V_RUN_CAM";
257 regulator-min-microvolt = <2800000>;
258 regulator-max-microvolt = <2800000>;
259 };
260
261 ldo5 {
262 regulator-name = "+1.2V_RUN_CAM_FRONT";
263 regulator-min-microvolt = <1200000>;
264 regulator-max-microvolt = <1200000>;
265 };
266
267 vddio_sdmmc3: ldo6 {
268 regulator-name = "+VDDIO_SDMMC3";
269 regulator-min-microvolt = <1800000>;
270 regulator-max-microvolt = <3300000>;
271 };
272
273 ldo7 {
274 regulator-name = "+1.05V_RUN_CAM_REAR";
275 regulator-min-microvolt = <1050000>;
276 regulator-max-microvolt = <1050000>;
277 };
278
279 ldo9 {
280 regulator-name = "+2.8V_RUN_TOUCH";
281 regulator-min-microvolt = <2800000>;
282 regulator-max-microvolt = <2800000>;
283 };
284
285 ldo10 {
286 regulator-name = "+2.8V_RUN_CAM_AF";
287 regulator-min-microvolt = <2800000>;
288 regulator-max-microvolt = <2800000>;
289 };
290
291 ldo11 {
292 regulator-name = "+1.8V_RUN_VPP_FUSE";
293 regulator-min-microvolt = <1800000>;
294 regulator-max-microvolt = <1800000>;
295 };
296 };
297 };
298 };
299
300 spi@0,7000d400 {
301 status = "okay";
302
303 cros_ec: cros-ec@0 {
304 compatible = "google,cros-ec-spi";
305 spi-max-frequency = <3000000>;
306 interrupt-parent = <&gpio>;
307 interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>;
308 reg = <0>;
309
310 google,cros-ec-spi-msg-delay = <2000>;
311
312 i2c-tunnel {
313 compatible = "google,cros-ec-i2c-tunnel";
314 #address-cells = <1>;
315 #size-cells = <0>;
316
317 google,remote-bus = <0>;
318
319 charger: bq24735@9 {
320 compatible = "ti,bq24735";
321 reg = <0x9>;
322 interrupt-parent = <&gpio>;
323 interrupts = <TEGRA_GPIO(J, 0)
324 GPIO_ACTIVE_HIGH>;
325 ti,ac-detect-gpios = <&gpio
326 TEGRA_GPIO(J, 0)
327 GPIO_ACTIVE_HIGH>;
328 };
329
330 battery: sbs-battery@b {
331 compatible = "sbs,sbs-battery";
332 reg = <0xb>;
333 sbs,i2c-retry-count = <2>;
334 sbs,poll-retry-count = <10>;
335 power-supplies = <&charger>;
336 };
337 };
338 };
339 };
340
341 spi@0,7000da00 {
342 status = "okay";
343 spi-max-frequency = <25000000>;
344
345 flash@0 {
346 compatible = "winbond,w25q32dw";
347 spi-max-frequency = <25000000>;
348 reg = <0>;
349 };
350 };
351
352 pmc@0,7000e400 {
353 nvidia,invert-interrupt;
354 nvidia,suspend-mode = <0>;
355 nvidia,cpu-pwr-good-time = <500>;
356 nvidia,cpu-pwr-off-time = <300>;
357 nvidia,core-pwr-good-time = <641 3845>;
358 nvidia,core-pwr-off-time = <61036>;
359 nvidia,core-power-req-active-high;
360 nvidia,sys-clock-req-active-high;
361 };
362
363 hda@0,70030000 {
364 status = "okay";
365 };
366
367 sdhci0_pwrseq: sdhci0_pwrseq {
368 compatible = "mmc-pwrseq-simple";
369
370 reset-gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>;
371 };
372
373 sdhci@0,700b0000 { /* WiFi/BT on this bus */
374 status = "okay";
375 bus-width = <4>;
376 no-1-8-v;
377 non-removable;
378 mmc-pwrseq = <&sdhci0_pwrseq>;
379 vmmc-supply = <&vdd_3v3_lp0>;
380 vqmmc-supply = <&vddio_1v8>;
381 keep-power-in-suspend;
382 };
383
384 sdhci@0,700b0400 { /* SD Card on this bus */
385 status = "okay";
386 cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
387 power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
388 bus-width = <4>;
389 no-1-8-v;
390 vqmmc-supply = <&vddio_sdmmc3>;
391 };
392
393 sdhci@0,700b0600 { /* eMMC on this bus */
394 status = "okay";
395 bus-width = <8>;
396 no-1-8-v;
397 non-removable;
398 };
399
400 ahub@0,70300000 {
401 i2s@0,70301100 {
402 status = "okay";
403 };
404 };
405
406 usb@0,7d000000 { /* Rear external USB port. */
407 status = "okay";
408 };
409
410 usb-phy@0,7d000000 {
411 status = "okay";
412 vbus-supply = <&vdd_usb1_vbus>;
413 };
414
415 usb@0,7d004000 { /* Internal webcam. */
416 status = "okay";
417 };
418
419 usb-phy@0,7d004000 {
420 status = "okay";
421 vbus-supply = <&vdd_run_cam>;
422 };
423
424 usb@0,7d008000 { /* Left external USB port. */
425 status = "okay";
426 };
427
428 usb-phy@0,7d008000 {
429 status = "okay";
430 vbus-supply = <&vdd_usb3_vbus>;
431 };
432
433 backlight: backlight {
434 compatible = "pwm-backlight";
435
436 enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
437 power-supply = <&vdd_led>;
438 pwms = <&pwm 1 1000000>;
439
440 default-brightness-level = <224>;
441 brightness-levels =
442 < 0 1 2 3 4 5 6 7
443 8 9 10 11 12 13 14 15
444 16 17 18 19 20 21 22 23
445 24 25 26 27 28 29 30 31
446 32 33 34 35 36 37 38 39
447 40 41 42 43 44 45 46 47
448 48 49 50 51 52 53 54 55
449 56 57 58 59 60 61 62 63
450 64 65 66 67 68 69 70 71
451 72 73 74 75 76 77 78 79
452 80 81 82 83 84 85 86 87
453 88 89 90 91 92 93 94 95
454 96 97 98 99 100 101 102 103
455 104 105 106 107 108 109 110 111
456 112 113 114 115 116 117 118 119
457 120 121 122 123 124 125 126 127
458 128 129 130 131 132 133 134 135
459 136 137 138 139 140 141 142 143
460 144 145 146 147 148 149 150 151
461 152 153 154 155 156 157 158 159
462 160 161 162 163 164 165 166 167
463 168 169 170 171 172 173 174 175
464 176 177 178 179 180 181 182 183
465 184 185 186 187 188 189 190 191
466 192 193 194 195 196 197 198 199
467 200 201 202 203 204 205 206 207
468 208 209 210 211 212 213 214 215
469 216 217 218 219 220 221 222 223
470 224 225 226 227 228 229 230 231
471 232 233 234 235 236 237 238 239
472 240 241 242 243 244 245 246 247
473 248 249 250 251 252 253 254 255
474 256>;
475 };
476
477 clocks {
478 compatible = "simple-bus";
479 #address-cells = <1>;
480 #size-cells = <0>;
481
482 clk32k_in: clock@0 {
483 compatible = "fixed-clock";
484 reg = <0>;
485 #clock-cells = <0>;
486 clock-frequency = <32768>;
487 };
488 };
489
490 gpio-keys {
491 compatible = "gpio-keys";
492
493 lid {
494 label = "Lid";
495 gpios = <&gpio TEGRA_GPIO(R, 4) GPIO_ACTIVE_LOW>;
496 linux,input-type = <5>;
497 linux,code = <KEY_RESERVED>;
498 debounce-interval = <1>;
499 gpio-key,wakeup;
500 };
501
502 power {
503 label = "Power";
504 gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
505 linux,code = <KEY_POWER>;
506 debounce-interval = <30>;
507 gpio-key,wakeup;
508 };
509 };
510
511 regulators {
512 compatible = "simple-bus";
513 #address-cells = <1>;
514 #size-cells = <0>;
515
516 vdd_mux: regulator@0 {
517 compatible = "regulator-fixed";
518 reg = <0>;
519 regulator-name = "+VDD_MUX";
520 regulator-min-microvolt = <12000000>;
521 regulator-max-microvolt = <12000000>;
522 regulator-always-on;
523 regulator-boot-on;
524 };
525
526 vdd_5v0_sys: regulator@1 {
527 compatible = "regulator-fixed";
528 reg = <1>;
529 regulator-name = "+5V_SYS";
530 regulator-min-microvolt = <5000000>;
531 regulator-max-microvolt = <5000000>;
532 regulator-always-on;
533 regulator-boot-on;
534 vin-supply = <&vdd_mux>;
535 };
536
537 vdd_3v3_sys: regulator@2 {
538 compatible = "regulator-fixed";
539 reg = <2>;
540 regulator-name = "+3.3V_SYS";
541 regulator-min-microvolt = <3300000>;
542 regulator-max-microvolt = <3300000>;
543 regulator-always-on;
544 regulator-boot-on;
545 vin-supply = <&vdd_mux>;
546 };
547
548 vdd_3v3_run: regulator@3 {
549 compatible = "regulator-fixed";
550 reg = <3>;
551 regulator-name = "+3.3V_RUN";
552 regulator-min-microvolt = <3300000>;
553 regulator-max-microvolt = <3300000>;
554 regulator-always-on;
555 regulator-boot-on;
556 gpio = <&pmic 1 GPIO_ACTIVE_HIGH>;
557 enable-active-high;
558 vin-supply = <&vdd_3v3_sys>;
559 };
560
561 vdd_3v3_hdmi: regulator@4 {
562 compatible = "regulator-fixed";
563 reg = <4>;
564 regulator-name = "+3.3V_AVDD_HDMI_AP_GATED";
565 regulator-min-microvolt = <3300000>;
566 regulator-max-microvolt = <3300000>;
567 vin-supply = <&vdd_3v3_run>;
568 };
569
570 vdd_led: regulator@5 {
571 compatible = "regulator-fixed";
572 reg = <5>;
573 regulator-name = "+VDD_LED";
574 gpio = <&gpio TEGRA_GPIO(P, 2) GPIO_ACTIVE_HIGH>;
575 enable-active-high;
576 vin-supply = <&vdd_mux>;
577 };
578
579 vdd_5v0_ts: regulator@6 {
580 compatible = "regulator-fixed";
581 reg = <6>;
582 regulator-name = "+5V_VDD_TS_SW";
583 regulator-min-microvolt = <5000000>;
584 regulator-max-microvolt = <5000000>;
585 regulator-boot-on;
586 gpio = <&gpio TEGRA_GPIO(K, 1) GPIO_ACTIVE_HIGH>;
587 enable-active-high;
588 vin-supply = <&vdd_5v0_sys>;
589 };
590
591 vdd_usb1_vbus: regulator@7 {
592 compatible = "regulator-fixed";
593 reg = <7>;
594 regulator-name = "+5V_USB_HS";
595 regulator-min-microvolt = <5000000>;
596 regulator-max-microvolt = <5000000>;
597 gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
598 enable-active-high;
599 gpio-open-drain;
600 vin-supply = <&vdd_5v0_sys>;
601 };
602
603 vdd_usb3_vbus: regulator@8 {
604 compatible = "regulator-fixed";
605 reg = <8>;
606 regulator-name = "+5V_USB_SS";
607 regulator-min-microvolt = <5000000>;
608 regulator-max-microvolt = <5000000>;
609 gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
610 enable-active-high;
611 gpio-open-drain;
612 vin-supply = <&vdd_5v0_sys>;
613 };
614
615 vdd_3v3_panel: regulator@9 {
616 compatible = "regulator-fixed";
617 reg = <9>;
618 regulator-name = "+3.3V_PANEL";
619 regulator-min-microvolt = <3300000>;
620 regulator-max-microvolt = <3300000>;
621 gpio = <&pmic 4 GPIO_ACTIVE_HIGH>;
622 enable-active-high;
623 vin-supply = <&vdd_3v3_run>;
624 };
625
626 vdd_3v3_lp0: regulator@10 {
627 compatible = "regulator-fixed";
628 reg = <10>;
629 regulator-name = "+3.3V_LP0";
630 regulator-min-microvolt = <3300000>;
631 regulator-max-microvolt = <3300000>;
632 /*
633 * TODO: find a way to wire this up with the USB EHCI
634 * controllers so that it can be enabled on demand.
635 */
636 regulator-always-on;
637 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
638 enable-active-high;
639 vin-supply = <&vdd_3v3_sys>;
640 };
641
642 vdd_hdmi_pll: regulator@11 {
643 compatible = "regulator-fixed";
644 reg = <11>;
645 regulator-name = "+1.05V_RUN_AVDD_HDMI_PLL";
646 regulator-min-microvolt = <1050000>;
647 regulator-max-microvolt = <1050000>;
648 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
649 vin-supply = <&vdd_1v05_run>;
650 };
651
652 vdd_5v0_hdmi: regulator@12 {
653 compatible = "regulator-fixed";
654 reg = <12>;
655 regulator-name = "+5V_HDMI_CON";
656 regulator-min-microvolt = <5000000>;
657 regulator-max-microvolt = <5000000>;
658 gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
659 enable-active-high;
660 vin-supply = <&vdd_5v0_sys>;
661 };
662 };
663
664 sound {
665 nvidia,audio-routing =
666 "Headphones", "HPR",
667 "Headphones", "HPL",
668 "Speakers", "SPKR",
669 "Speakers", "SPKL",
670 "Mic Jack", "MICBIAS",
671 "DMICL", "Int Mic",
672 "DMICR", "Int Mic",
673 "IN34", "Mic Jack";
674
675 nvidia,i2s-controller = <&tegra_i2s1>;
676 nvidia,audio-codec = <&acodec>;
677
678 clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
679 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
680 <&tegra_car TEGRA124_CLK_EXTERN1>;
681 clock-names = "pll_a", "pll_a_out0", "mclk";
682
683 nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
684 nvidia,mic-det-gpios =
685 <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
686 };
687
688 gpio-restart {
689 compatible = "gpio-restart";
690 gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
691 priority = <200>;
692 };
693};
694
695#include "cros-ec-keyboard.dtsi"
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index db85695aa7aa..cf01c818b8ea 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -220,6 +220,7 @@
220 reg = <0x0 0x60006000 0x0 0x1000>; 220 reg = <0x0 0x60006000 0x0 0x1000>;
221 #clock-cells = <1>; 221 #clock-cells = <1>;
222 #reset-cells = <1>; 222 #reset-cells = <1>;
223 nvidia,external-memory-controller = <&emc>;
223 }; 224 };
224 225
225 flow-controller@0,60007000 { 226 flow-controller@0,60007000 {
@@ -227,6 +228,17 @@
227 reg = <0x0 0x60007000 0x0 0x1000>; 228 reg = <0x0 0x60007000 0x0 0x1000>;
228 }; 229 };
229 230
231 actmon@0,6000c800 {
232 compatible = "nvidia,tegra124-actmon";
233 reg = <0x0 0x6000c800 0x0 0x400>;
234 interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
235 clocks = <&tegra_car TEGRA124_CLK_ACTMON>,
236 <&tegra_car TEGRA124_CLK_EMC>;
237 clock-names = "actmon", "emc";
238 resets = <&tegra_car 119>;
239 reset-names = "actmon";
240 };
241
230 gpio: gpio@0,6000d000 { 242 gpio: gpio@0,6000d000 {
231 compatible = "nvidia,tegra124-gpio", "nvidia,tegra30-gpio"; 243 compatible = "nvidia,tegra124-gpio", "nvidia,tegra30-gpio";
232 reg = <0x0 0x6000d000 0x0 0x1000>; 244 reg = <0x0 0x6000d000 0x0 0x1000>;
@@ -582,6 +594,13 @@
582 #iommu-cells = <1>; 594 #iommu-cells = <1>;
583 }; 595 };
584 596
597 emc: emc@0,7001b000 {
598 compatible = "nvidia,tegra124-emc";
599 reg = <0x0 0x7001b000 0x0 0x1000>;
600
601 nvidia,memory-controller = <&mc>;
602 };
603
585 sata@0,70020000 { 604 sata@0,70020000 {
586 compatible = "nvidia,tegra124-ahci"; 605 compatible = "nvidia,tegra124-ahci";
587 606
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index 6b157eeabcc5..3dede3934446 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -62,71 +62,1652 @@
62 pinctrl-0 = <&state_default>; 62 pinctrl-0 = <&state_default>;
63 63
64 state_default: pinmux { 64 state_default: pinmux {
65 sdmmc1_clk_pz0 { 65 clk_32k_out_pa0 {
66 nvidia,pins = "sdmmc1_clk_pz0"; 66 nvidia,pins = "clk_32k_out_pa0";
67 nvidia,function = "sdmmc1"; 67 nvidia,function = "blink";
68 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 68 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
69 nvidia,tristate = <TEGRA_PIN_DISABLE>; 69 nvidia,tristate = <TEGRA_PIN_DISABLE>;
70 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
70 }; 71 };
71 sdmmc1_cmd_pz1 { 72 uart3_cts_n_pa1 {
72 nvidia,pins = "sdmmc1_cmd_pz1", 73 nvidia,pins = "uart3_cts_n_pa1";
73 "sdmmc1_dat0_py7", 74 nvidia,function = "uartc";
74 "sdmmc1_dat1_py6", 75 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
75 "sdmmc1_dat2_py5", 76 nvidia,tristate = <TEGRA_PIN_DISABLE>;
76 "sdmmc1_dat3_py4"; 77 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
77 nvidia,function = "sdmmc1"; 78 };
78 nvidia,pull = <TEGRA_PIN_PULL_UP>; 79 dap2_fs_pa2 {
80 nvidia,pins = "dap2_fs_pa2";
81 nvidia,function = "i2s1";
82 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
83 nvidia,tristate = <TEGRA_PIN_DISABLE>;
84 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
85 };
86 dap2_sclk_pa3 {
87 nvidia,pins = "dap2_sclk_pa3";
88 nvidia,function = "i2s1";
89 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
90 nvidia,tristate = <TEGRA_PIN_DISABLE>;
91 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
92 };
93 dap2_din_pa4 {
94 nvidia,pins = "dap2_din_pa4";
95 nvidia,function = "i2s1";
96 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
97 nvidia,tristate = <TEGRA_PIN_DISABLE>;
98 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
99 };
100 dap2_dout_pa5 {
101 nvidia,pins = "dap2_dout_pa5";
102 nvidia,function = "i2s1";
103 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
79 nvidia,tristate = <TEGRA_PIN_DISABLE>; 104 nvidia,tristate = <TEGRA_PIN_DISABLE>;
105 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
80 }; 106 };
81 sdmmc3_clk_pa6 { 107 sdmmc3_clk_pa6 {
82 nvidia,pins = "sdmmc3_clk_pa6"; 108 nvidia,pins = "sdmmc3_clk_pa6";
83 nvidia,function = "sdmmc3"; 109 nvidia,function = "sdmmc3";
84 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 110 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
85 nvidia,tristate = <TEGRA_PIN_DISABLE>; 111 nvidia,tristate = <TEGRA_PIN_DISABLE>;
112 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
86 }; 113 };
87 sdmmc3_cmd_pa7 { 114 sdmmc3_cmd_pa7 {
88 nvidia,pins = "sdmmc3_cmd_pa7", 115 nvidia,pins = "sdmmc3_cmd_pa7";
89 "sdmmc3_dat0_pb7",
90 "sdmmc3_dat1_pb6",
91 "sdmmc3_dat2_pb5",
92 "sdmmc3_dat3_pb4";
93 nvidia,function = "sdmmc3"; 116 nvidia,function = "sdmmc3";
94 nvidia,pull = <TEGRA_PIN_PULL_UP>; 117 nvidia,pull = <TEGRA_PIN_PULL_UP>;
95 nvidia,tristate = <TEGRA_PIN_DISABLE>; 118 nvidia,tristate = <TEGRA_PIN_DISABLE>;
119 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
96 }; 120 };
97 sdmmc4_clk_pcc4 { 121 gmi_a17_pb0 {
98 nvidia,pins = "sdmmc4_clk_pcc4", 122 nvidia,pins = "gmi_a17_pb0";
99 "sdmmc4_rst_n_pcc3"; 123 nvidia,function = "spi4";
124 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
125 nvidia,tristate = <TEGRA_PIN_DISABLE>;
126 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
127 };
128 gmi_a18_pb1 {
129 nvidia,pins = "gmi_a18_pb1";
130 nvidia,function = "spi4";
131 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
132 nvidia,tristate = <TEGRA_PIN_DISABLE>;
133 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
134 };
135 lcd_pwr0_pb2 {
136 nvidia,pins = "lcd_pwr0_pb2";
137 nvidia,function = "displaya";
138 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
139 nvidia,tristate = <TEGRA_PIN_DISABLE>;
140 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
141 };
142 lcd_pclk_pb3 {
143 nvidia,pins = "lcd_pclk_pb3";
144 nvidia,function = "displaya";
145 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
146 nvidia,tristate = <TEGRA_PIN_DISABLE>;
147 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
148 };
149 sdmmc3_dat3_pb4 {
150 nvidia,pins = "sdmmc3_dat3_pb4";
151 nvidia,function = "sdmmc3";
152 nvidia,pull = <TEGRA_PIN_PULL_UP>;
153 nvidia,tristate = <TEGRA_PIN_DISABLE>;
154 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
155 };
156 sdmmc3_dat2_pb5 {
157 nvidia,pins = "sdmmc3_dat2_pb5";
158 nvidia,function = "sdmmc3";
159 nvidia,pull = <TEGRA_PIN_PULL_UP>;
160 nvidia,tristate = <TEGRA_PIN_DISABLE>;
161 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
162 };
163 sdmmc3_dat1_pb6 {
164 nvidia,pins = "sdmmc3_dat1_pb6";
165 nvidia,function = "sdmmc3";
166 nvidia,pull = <TEGRA_PIN_PULL_UP>;
167 nvidia,tristate = <TEGRA_PIN_DISABLE>;
168 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
169 };
170 sdmmc3_dat0_pb7 {
171 nvidia,pins = "sdmmc3_dat0_pb7";
172 nvidia,function = "sdmmc3";
173 nvidia,pull = <TEGRA_PIN_PULL_UP>;
174 nvidia,tristate = <TEGRA_PIN_DISABLE>;
175 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
176 };
177 uart3_rts_n_pc0 {
178 nvidia,pins = "uart3_rts_n_pc0";
179 nvidia,function = "uartc";
180 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
181 nvidia,tristate = <TEGRA_PIN_DISABLE>;
182 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
183 };
184 lcd_pwr1_pc1 {
185 nvidia,pins = "lcd_pwr1_pc1";
186 nvidia,function = "displaya";
187 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
188 nvidia,tristate = <TEGRA_PIN_DISABLE>;
189 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
190 };
191 uart2_txd_pc2 {
192 nvidia,pins = "uart2_txd_pc2";
193 nvidia,function = "uartb";
194 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
195 nvidia,tristate = <TEGRA_PIN_DISABLE>;
196 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
197 };
198 uart2_rxd_pc3 {
199 nvidia,pins = "uart2_rxd_pc3";
200 nvidia,function = "uartb";
201 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
202 nvidia,tristate = <TEGRA_PIN_DISABLE>;
203 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
204 };
205 gen1_i2c_scl_pc4 {
206 nvidia,pins = "gen1_i2c_scl_pc4";
207 nvidia,function = "i2c1";
208 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
209 nvidia,tristate = <TEGRA_PIN_DISABLE>;
210 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
211 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
212 };
213 gen1_i2c_sda_pc5 {
214 nvidia,pins = "gen1_i2c_sda_pc5";
215 nvidia,function = "i2c1";
216 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
217 nvidia,tristate = <TEGRA_PIN_DISABLE>;
218 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
219 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
220 };
221 lcd_pwr2_pc6 {
222 nvidia,pins = "lcd_pwr2_pc6";
223 nvidia,function = "displaya";
224 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
225 nvidia,tristate = <TEGRA_PIN_DISABLE>;
226 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
227 };
228 gmi_wp_n_pc7 {
229 nvidia,pins = "gmi_wp_n_pc7";
230 nvidia,function = "gmi";
231 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
232 nvidia,tristate = <TEGRA_PIN_DISABLE>;
233 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
234 };
235 sdmmc3_dat5_pd0 {
236 nvidia,pins = "sdmmc3_dat5_pd0";
237 nvidia,function = "sdmmc3";
238 nvidia,pull = <TEGRA_PIN_PULL_UP>;
239 nvidia,tristate = <TEGRA_PIN_DISABLE>;
240 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
241 };
242 sdmmc3_dat4_pd1 {
243 nvidia,pins = "sdmmc3_dat4_pd1";
244 nvidia,function = "sdmmc3";
245 nvidia,pull = <TEGRA_PIN_PULL_UP>;
246 nvidia,tristate = <TEGRA_PIN_DISABLE>;
247 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
248 };
249 lcd_dc1_pd2 {
250 nvidia,pins = "lcd_dc1_pd2";
251 nvidia,function = "displaya";
252 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
253 nvidia,tristate = <TEGRA_PIN_DISABLE>;
254 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
255 };
256 sdmmc3_dat6_pd3 {
257 nvidia,pins = "sdmmc3_dat6_pd3";
258 nvidia,function = "rsvd1";
259 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
260 nvidia,tristate = <TEGRA_PIN_DISABLE>;
261 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
262 };
263 sdmmc3_dat7_pd4 {
264 nvidia,pins = "sdmmc3_dat7_pd4";
265 nvidia,function = "rsvd1";
266 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
267 nvidia,tristate = <TEGRA_PIN_DISABLE>;
268 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
269 };
270 vi_d1_pd5 {
271 nvidia,pins = "vi_d1_pd5";
272 nvidia,function = "sdmmc2";
273 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
274 nvidia,tristate = <TEGRA_PIN_DISABLE>;
275 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
276 };
277 vi_vsync_pd6 {
278 nvidia,pins = "vi_vsync_pd6";
279 nvidia,function = "rsvd1";
280 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
281 nvidia,tristate = <TEGRA_PIN_DISABLE>;
282 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
283 };
284 vi_hsync_pd7 {
285 nvidia,pins = "vi_hsync_pd7";
286 nvidia,function = "rsvd1";
287 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
288 nvidia,tristate = <TEGRA_PIN_DISABLE>;
289 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
290 };
291 lcd_d0_pe0 {
292 nvidia,pins = "lcd_d0_pe0";
293 nvidia,function = "displaya";
294 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
295 nvidia,tristate = <TEGRA_PIN_DISABLE>;
296 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
297 };
298 lcd_d1_pe1 {
299 nvidia,pins = "lcd_d1_pe1";
300 nvidia,function = "displaya";
301 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
302 nvidia,tristate = <TEGRA_PIN_DISABLE>;
303 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
304 };
305 lcd_d2_pe2 {
306 nvidia,pins = "lcd_d2_pe2";
307 nvidia,function = "displaya";
308 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
309 nvidia,tristate = <TEGRA_PIN_DISABLE>;
310 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
311 };
312 lcd_d3_pe3 {
313 nvidia,pins = "lcd_d3_pe3";
314 nvidia,function = "displaya";
315 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
316 nvidia,tristate = <TEGRA_PIN_DISABLE>;
317 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
318 };
319 lcd_d4_pe4 {
320 nvidia,pins = "lcd_d4_pe4";
321 nvidia,function = "displaya";
322 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
323 nvidia,tristate = <TEGRA_PIN_DISABLE>;
324 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
325 };
326 lcd_d5_pe5 {
327 nvidia,pins = "lcd_d5_pe5";
328 nvidia,function = "displaya";
329 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
330 nvidia,tristate = <TEGRA_PIN_DISABLE>;
331 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
332 };
333 lcd_d6_pe6 {
334 nvidia,pins = "lcd_d6_pe6";
335 nvidia,function = "displaya";
336 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
337 nvidia,tristate = <TEGRA_PIN_DISABLE>;
338 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
339 };
340 lcd_d7_pe7 {
341 nvidia,pins = "lcd_d7_pe7";
342 nvidia,function = "displaya";
343 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
344 nvidia,tristate = <TEGRA_PIN_DISABLE>;
345 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
346 };
347 lcd_d8_pf0 {
348 nvidia,pins = "lcd_d8_pf0";
349 nvidia,function = "displaya";
350 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
351 nvidia,tristate = <TEGRA_PIN_DISABLE>;
352 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
353 };
354 lcd_d9_pf1 {
355 nvidia,pins = "lcd_d9_pf1";
356 nvidia,function = "displaya";
357 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
358 nvidia,tristate = <TEGRA_PIN_DISABLE>;
359 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
360 };
361 lcd_d10_pf2 {
362 nvidia,pins = "lcd_d10_pf2";
363 nvidia,function = "displaya";
364 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
365 nvidia,tristate = <TEGRA_PIN_DISABLE>;
366 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
367 };
368 lcd_d11_pf3 {
369 nvidia,pins = "lcd_d11_pf3";
370 nvidia,function = "displaya";
371 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
372 nvidia,tristate = <TEGRA_PIN_DISABLE>;
373 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
374 };
375 lcd_d12_pf4 {
376 nvidia,pins = "lcd_d12_pf4";
377 nvidia,function = "displaya";
378 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
379 nvidia,tristate = <TEGRA_PIN_DISABLE>;
380 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
381 };
382 lcd_d13_pf5 {
383 nvidia,pins = "lcd_d13_pf5";
384 nvidia,function = "displaya";
385 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
386 nvidia,tristate = <TEGRA_PIN_DISABLE>;
387 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
388 };
389 lcd_d14_pf6 {
390 nvidia,pins = "lcd_d14_pf6";
391 nvidia,function = "displaya";
392 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
393 nvidia,tristate = <TEGRA_PIN_DISABLE>;
394 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
395 };
396 lcd_d15_pf7 {
397 nvidia,pins = "lcd_d15_pf7";
398 nvidia,function = "displaya";
399 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
400 nvidia,tristate = <TEGRA_PIN_DISABLE>;
401 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
402 };
403 gmi_ad0_pg0 {
404 nvidia,pins = "gmi_ad0_pg0";
405 nvidia,function = "nand";
406 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
407 nvidia,tristate = <TEGRA_PIN_ENABLE>;
408 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
409 };
410 gmi_ad1_pg1 {
411 nvidia,pins = "gmi_ad1_pg1";
412 nvidia,function = "nand";
413 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
414 nvidia,tristate = <TEGRA_PIN_ENABLE>;
415 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
416 };
417 gmi_ad2_pg2 {
418 nvidia,pins = "gmi_ad2_pg2";
419 nvidia,function = "nand";
420 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
421 nvidia,tristate = <TEGRA_PIN_ENABLE>;
422 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
423 };
424 gmi_ad3_pg3 {
425 nvidia,pins = "gmi_ad3_pg3";
426 nvidia,function = "nand";
427 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
428 nvidia,tristate = <TEGRA_PIN_ENABLE>;
429 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
430 };
431 gmi_ad4_pg4 {
432 nvidia,pins = "gmi_ad4_pg4";
433 nvidia,function = "nand";
434 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
435 nvidia,tristate = <TEGRA_PIN_ENABLE>;
436 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
437 };
438 gmi_ad5_pg5 {
439 nvidia,pins = "gmi_ad5_pg5";
440 nvidia,function = "nand";
441 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
442 nvidia,tristate = <TEGRA_PIN_ENABLE>;
443 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
444 };
445 gmi_ad6_pg6 {
446 nvidia,pins = "gmi_ad6_pg6";
447 nvidia,function = "nand";
448 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
449 nvidia,tristate = <TEGRA_PIN_ENABLE>;
450 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
451 };
452 gmi_ad7_pg7 {
453 nvidia,pins = "gmi_ad7_pg7";
454 nvidia,function = "nand";
455 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
456 nvidia,tristate = <TEGRA_PIN_ENABLE>;
457 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
458 };
459 gmi_ad8_ph0 {
460 nvidia,pins = "gmi_ad8_ph0";
461 nvidia,function = "pwm0";
462 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
463 nvidia,tristate = <TEGRA_PIN_DISABLE>;
464 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
465 };
466 gmi_ad9_ph1 {
467 nvidia,pins = "gmi_ad9_ph1";
468 nvidia,function = "pwm1";
469 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
470 nvidia,tristate = <TEGRA_PIN_ENABLE>;
471 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
472 };
473 gmi_ad10_ph2 {
474 nvidia,pins = "gmi_ad10_ph2";
475 nvidia,function = "nand";
476 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
477 nvidia,tristate = <TEGRA_PIN_DISABLE>;
478 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
479 };
480 gmi_ad11_ph3 {
481 nvidia,pins = "gmi_ad11_ph3";
482 nvidia,function = "nand";
483 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
484 nvidia,tristate = <TEGRA_PIN_ENABLE>;
485 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
486 };
487 gmi_ad12_ph4 {
488 nvidia,pins = "gmi_ad12_ph4";
489 nvidia,function = "nand";
490 nvidia,pull = <TEGRA_PIN_PULL_UP>;
491 nvidia,tristate = <TEGRA_PIN_DISABLE>;
492 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
493 };
494 gmi_ad13_ph5 {
495 nvidia,pins = "gmi_ad13_ph5";
496 nvidia,function = "nand";
497 nvidia,pull = <TEGRA_PIN_PULL_UP>;
498 nvidia,tristate = <TEGRA_PIN_ENABLE>;
499 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
500 };
501 gmi_ad14_ph6 {
502 nvidia,pins = "gmi_ad14_ph6";
503 nvidia,function = "nand";
504 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
505 nvidia,tristate = <TEGRA_PIN_DISABLE>;
506 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
507 };
508 gmi_wr_n_pi0 {
509 nvidia,pins = "gmi_wr_n_pi0";
510 nvidia,function = "nand";
511 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
512 nvidia,tristate = <TEGRA_PIN_ENABLE>;
513 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
514 };
515 gmi_oe_n_pi1 {
516 nvidia,pins = "gmi_oe_n_pi1";
517 nvidia,function = "nand";
518 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
519 nvidia,tristate = <TEGRA_PIN_ENABLE>;
520 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
521 };
522 gmi_dqs_pi2 {
523 nvidia,pins = "gmi_dqs_pi2";
524 nvidia,function = "nand";
525 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
526 nvidia,tristate = <TEGRA_PIN_ENABLE>;
527 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
528 };
529 gmi_iordy_pi5 {
530 nvidia,pins = "gmi_iordy_pi5";
531 nvidia,function = "rsvd1";
532 nvidia,pull = <TEGRA_PIN_PULL_UP>;
533 nvidia,tristate = <TEGRA_PIN_DISABLE>;
534 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
535 };
536 gmi_cs7_n_pi6 {
537 nvidia,pins = "gmi_cs7_n_pi6";
538 nvidia,function = "nand";
539 nvidia,pull = <TEGRA_PIN_PULL_UP>;
540 nvidia,tristate = <TEGRA_PIN_ENABLE>;
541 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
542 };
543 gmi_wait_pi7 {
544 nvidia,pins = "gmi_wait_pi7";
545 nvidia,function = "nand";
546 nvidia,pull = <TEGRA_PIN_PULL_UP>;
547 nvidia,tristate = <TEGRA_PIN_ENABLE>;
548 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
549 };
550 lcd_de_pj1 {
551 nvidia,pins = "lcd_de_pj1";
552 nvidia,function = "displaya";
553 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
554 nvidia,tristate = <TEGRA_PIN_DISABLE>;
555 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
556 };
557 lcd_hsync_pj3 {
558 nvidia,pins = "lcd_hsync_pj3";
559 nvidia,function = "displaya";
560 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
561 nvidia,tristate = <TEGRA_PIN_DISABLE>;
562 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
563 };
564 lcd_vsync_pj4 {
565 nvidia,pins = "lcd_vsync_pj4";
566 nvidia,function = "displaya";
567 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
568 nvidia,tristate = <TEGRA_PIN_DISABLE>;
569 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
570 };
571 uart2_cts_n_pj5 {
572 nvidia,pins = "uart2_cts_n_pj5";
573 nvidia,function = "uartb";
574 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
575 nvidia,tristate = <TEGRA_PIN_DISABLE>;
576 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
577 };
578 uart2_rts_n_pj6 {
579 nvidia,pins = "uart2_rts_n_pj6";
580 nvidia,function = "uartb";
581 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
582 nvidia,tristate = <TEGRA_PIN_DISABLE>;
583 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
584 };
585 gmi_a16_pj7 {
586 nvidia,pins = "gmi_a16_pj7";
587 nvidia,function = "spi4";
588 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
589 nvidia,tristate = <TEGRA_PIN_DISABLE>;
590 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
591 };
592 gmi_adv_n_pk0 {
593 nvidia,pins = "gmi_adv_n_pk0";
594 nvidia,function = "nand";
595 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
596 nvidia,tristate = <TEGRA_PIN_ENABLE>;
597 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
598 };
599 gmi_clk_pk1 {
600 nvidia,pins = "gmi_clk_pk1";
601 nvidia,function = "nand";
602 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
603 nvidia,tristate = <TEGRA_PIN_ENABLE>;
604 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
605 };
606 gmi_cs2_n_pk3 {
607 nvidia,pins = "gmi_cs2_n_pk3";
608 nvidia,function = "rsvd1";
609 nvidia,pull = <TEGRA_PIN_PULL_UP>;
610 nvidia,tristate = <TEGRA_PIN_DISABLE>;
611 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
612 };
613 gmi_cs3_n_pk4 {
614 nvidia,pins = "gmi_cs3_n_pk4";
615 nvidia,function = "nand";
616 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
617 nvidia,tristate = <TEGRA_PIN_ENABLE>;
618 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
619 };
620 spdif_out_pk5 {
621 nvidia,pins = "spdif_out_pk5";
622 nvidia,function = "spdif";
623 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
624 nvidia,tristate = <TEGRA_PIN_DISABLE>;
625 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
626 };
627 spdif_in_pk6 {
628 nvidia,pins = "spdif_in_pk6";
629 nvidia,function = "spdif";
630 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
631 nvidia,tristate = <TEGRA_PIN_DISABLE>;
632 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
633 };
634 gmi_a19_pk7 {
635 nvidia,pins = "gmi_a19_pk7";
636 nvidia,function = "spi4";
637 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
638 nvidia,tristate = <TEGRA_PIN_DISABLE>;
639 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
640 };
641 vi_d2_pl0 {
642 nvidia,pins = "vi_d2_pl0";
643 nvidia,function = "sdmmc2";
644 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
645 nvidia,tristate = <TEGRA_PIN_DISABLE>;
646 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
647 };
648 vi_d3_pl1 {
649 nvidia,pins = "vi_d3_pl1";
650 nvidia,function = "sdmmc2";
651 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
652 nvidia,tristate = <TEGRA_PIN_DISABLE>;
653 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
654 };
655 vi_d4_pl2 {
656 nvidia,pins = "vi_d4_pl2";
657 nvidia,function = "vi";
658 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
659 nvidia,tristate = <TEGRA_PIN_DISABLE>;
660 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
661 };
662 vi_d5_pl3 {
663 nvidia,pins = "vi_d5_pl3";
664 nvidia,function = "sdmmc2";
665 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
666 nvidia,tristate = <TEGRA_PIN_DISABLE>;
667 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
668 };
669 vi_d6_pl4 {
670 nvidia,pins = "vi_d6_pl4";
671 nvidia,function = "vi";
672 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
673 nvidia,tristate = <TEGRA_PIN_DISABLE>;
674 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
675 };
676 vi_d7_pl5 {
677 nvidia,pins = "vi_d7_pl5";
678 nvidia,function = "sdmmc2";
679 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
680 nvidia,tristate = <TEGRA_PIN_DISABLE>;
681 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
682 };
683 vi_d8_pl6 {
684 nvidia,pins = "vi_d8_pl6";
685 nvidia,function = "sdmmc2";
686 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
687 nvidia,tristate = <TEGRA_PIN_DISABLE>;
688 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
689 };
690 vi_d9_pl7 {
691 nvidia,pins = "vi_d9_pl7";
692 nvidia,function = "sdmmc2";
693 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
694 nvidia,tristate = <TEGRA_PIN_DISABLE>;
695 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
696 };
697 lcd_d16_pm0 {
698 nvidia,pins = "lcd_d16_pm0";
699 nvidia,function = "displaya";
700 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
701 nvidia,tristate = <TEGRA_PIN_DISABLE>;
702 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
703 };
704 lcd_d17_pm1 {
705 nvidia,pins = "lcd_d17_pm1";
706 nvidia,function = "displaya";
707 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
708 nvidia,tristate = <TEGRA_PIN_DISABLE>;
709 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
710 };
711 lcd_d18_pm2 {
712 nvidia,pins = "lcd_d18_pm2";
713 nvidia,function = "displaya";
714 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
715 nvidia,tristate = <TEGRA_PIN_DISABLE>;
716 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
717 };
718 lcd_d19_pm3 {
719 nvidia,pins = "lcd_d19_pm3";
720 nvidia,function = "displaya";
721 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
722 nvidia,tristate = <TEGRA_PIN_DISABLE>;
723 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
724 };
725 lcd_d20_pm4 {
726 nvidia,pins = "lcd_d20_pm4";
727 nvidia,function = "displaya";
728 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
729 nvidia,tristate = <TEGRA_PIN_DISABLE>;
730 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
731 };
732 lcd_d21_pm5 {
733 nvidia,pins = "lcd_d21_pm5";
734 nvidia,function = "displaya";
735 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
736 nvidia,tristate = <TEGRA_PIN_DISABLE>;
737 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
738 };
739 lcd_d22_pm6 {
740 nvidia,pins = "lcd_d22_pm6";
741 nvidia,function = "displaya";
742 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
743 nvidia,tristate = <TEGRA_PIN_DISABLE>;
744 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
745 };
746 lcd_d23_pm7 {
747 nvidia,pins = "lcd_d23_pm7";
748 nvidia,function = "displaya";
749 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
750 nvidia,tristate = <TEGRA_PIN_DISABLE>;
751 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
752 };
753 dap1_fs_pn0 {
754 nvidia,pins = "dap1_fs_pn0";
755 nvidia,function = "i2s0";
756 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
757 nvidia,tristate = <TEGRA_PIN_DISABLE>;
758 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
759 };
760 dap1_din_pn1 {
761 nvidia,pins = "dap1_din_pn1";
762 nvidia,function = "i2s0";
763 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
764 nvidia,tristate = <TEGRA_PIN_DISABLE>;
765 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
766 };
767 dap1_dout_pn2 {
768 nvidia,pins = "dap1_dout_pn2";
769 nvidia,function = "i2s0";
770 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
771 nvidia,tristate = <TEGRA_PIN_DISABLE>;
772 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
773 };
774 dap1_sclk_pn3 {
775 nvidia,pins = "dap1_sclk_pn3";
776 nvidia,function = "i2s0";
777 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
778 nvidia,tristate = <TEGRA_PIN_DISABLE>;
779 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
780 };
781 lcd_cs0_n_pn4 {
782 nvidia,pins = "lcd_cs0_n_pn4";
783 nvidia,function = "displaya";
784 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
785 nvidia,tristate = <TEGRA_PIN_DISABLE>;
786 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
787 };
788 lcd_sdout_pn5 {
789 nvidia,pins = "lcd_sdout_pn5";
790 nvidia,function = "displaya";
791 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
792 nvidia,tristate = <TEGRA_PIN_DISABLE>;
793 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
794 };
795 lcd_dc0_pn6 {
796 nvidia,pins = "lcd_dc0_pn6";
797 nvidia,function = "displaya";
798 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
799 nvidia,tristate = <TEGRA_PIN_DISABLE>;
800 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
801 };
802 hdmi_int_pn7 {
803 nvidia,pins = "hdmi_int_pn7";
804 nvidia,function = "rsvd1";
805 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
806 nvidia,tristate = <TEGRA_PIN_ENABLE>;
807 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
808 };
809 ulpi_data7_po0 {
810 nvidia,pins = "ulpi_data7_po0";
811 nvidia,function = "uarta";
812 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
813 nvidia,tristate = <TEGRA_PIN_DISABLE>;
814 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
815 };
816 ulpi_data0_po1 {
817 nvidia,pins = "ulpi_data0_po1";
818 nvidia,function = "uarta";
819 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
820 nvidia,tristate = <TEGRA_PIN_DISABLE>;
821 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
822 };
823 ulpi_data1_po2 {
824 nvidia,pins = "ulpi_data1_po2";
825 nvidia,function = "uarta";
826 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
827 nvidia,tristate = <TEGRA_PIN_DISABLE>;
828 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
829 };
830 ulpi_data2_po3 {
831 nvidia,pins = "ulpi_data2_po3";
832 nvidia,function = "uarta";
833 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
834 nvidia,tristate = <TEGRA_PIN_DISABLE>;
835 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
836 };
837 ulpi_data3_po4 {
838 nvidia,pins = "ulpi_data3_po4";
839 nvidia,function = "rsvd1";
840 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
841 nvidia,tristate = <TEGRA_PIN_DISABLE>;
842 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
843 };
844 ulpi_data4_po5 {
845 nvidia,pins = "ulpi_data4_po5";
846 nvidia,function = "uarta";
847 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
848 nvidia,tristate = <TEGRA_PIN_DISABLE>;
849 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
850 };
851 ulpi_data5_po6 {
852 nvidia,pins = "ulpi_data5_po6";
853 nvidia,function = "uarta";
854 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
855 nvidia,tristate = <TEGRA_PIN_DISABLE>;
856 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
857 };
858 ulpi_data6_po7 {
859 nvidia,pins = "ulpi_data6_po7";
860 nvidia,function = "uarta";
861 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
862 nvidia,tristate = <TEGRA_PIN_DISABLE>;
863 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
864 };
865 dap3_fs_pp0 {
866 nvidia,pins = "dap3_fs_pp0";
867 nvidia,function = "i2s2";
868 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
869 nvidia,tristate = <TEGRA_PIN_DISABLE>;
870 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
871 };
872 dap3_din_pp1 {
873 nvidia,pins = "dap3_din_pp1";
874 nvidia,function = "i2s2";
875 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
876 nvidia,tristate = <TEGRA_PIN_DISABLE>;
877 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
878 };
879 dap3_dout_pp2 {
880 nvidia,pins = "dap3_dout_pp2";
881 nvidia,function = "i2s2";
882 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
883 nvidia,tristate = <TEGRA_PIN_DISABLE>;
884 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
885 };
886 dap3_sclk_pp3 {
887 nvidia,pins = "dap3_sclk_pp3";
888 nvidia,function = "i2s2";
889 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
890 nvidia,tristate = <TEGRA_PIN_DISABLE>;
891 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
892 };
893 dap4_fs_pp4 {
894 nvidia,pins = "dap4_fs_pp4";
895 nvidia,function = "i2s3";
896 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
897 nvidia,tristate = <TEGRA_PIN_DISABLE>;
898 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
899 };
900 dap4_din_pp5 {
901 nvidia,pins = "dap4_din_pp5";
902 nvidia,function = "i2s3";
903 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
904 nvidia,tristate = <TEGRA_PIN_DISABLE>;
905 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
906 };
907 dap4_dout_pp6 {
908 nvidia,pins = "dap4_dout_pp6";
909 nvidia,function = "i2s3";
910 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
911 nvidia,tristate = <TEGRA_PIN_DISABLE>;
912 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
913 };
914 dap4_sclk_pp7 {
915 nvidia,pins = "dap4_sclk_pp7";
916 nvidia,function = "i2s3";
917 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
918 nvidia,tristate = <TEGRA_PIN_DISABLE>;
919 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
920 };
921 kb_col0_pq0 {
922 nvidia,pins = "kb_col0_pq0";
923 nvidia,function = "kbc";
924 nvidia,pull = <TEGRA_PIN_PULL_UP>;
925 nvidia,tristate = <TEGRA_PIN_DISABLE>;
926 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
927 };
928 kb_col1_pq1 {
929 nvidia,pins = "kb_col1_pq1";
930 nvidia,function = "kbc";
931 nvidia,pull = <TEGRA_PIN_PULL_UP>;
932 nvidia,tristate = <TEGRA_PIN_DISABLE>;
933 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
934 };
935 kb_col2_pq2 {
936 nvidia,pins = "kb_col2_pq2";
937 nvidia,function = "kbc";
938 nvidia,pull = <TEGRA_PIN_PULL_UP>;
939 nvidia,tristate = <TEGRA_PIN_DISABLE>;
940 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
941 };
942 kb_col3_pq3 {
943 nvidia,pins = "kb_col3_pq3";
944 nvidia,function = "kbc";
945 nvidia,pull = <TEGRA_PIN_PULL_UP>;
946 nvidia,tristate = <TEGRA_PIN_DISABLE>;
947 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
948 };
949 kb_col4_pq4 {
950 nvidia,pins = "kb_col4_pq4";
951 nvidia,function = "kbc";
952 nvidia,pull = <TEGRA_PIN_PULL_UP>;
953 nvidia,tristate = <TEGRA_PIN_DISABLE>;
954 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
955 };
956 kb_col5_pq5 {
957 nvidia,pins = "kb_col5_pq5";
958 nvidia,function = "kbc";
959 nvidia,pull = <TEGRA_PIN_PULL_UP>;
960 nvidia,tristate = <TEGRA_PIN_DISABLE>;
961 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
962 };
963 kb_col6_pq6 {
964 nvidia,pins = "kb_col6_pq6";
965 nvidia,function = "kbc";
966 nvidia,pull = <TEGRA_PIN_PULL_UP>;
967 nvidia,tristate = <TEGRA_PIN_DISABLE>;
968 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
969 };
970 kb_col7_pq7 {
971 nvidia,pins = "kb_col7_pq7";
972 nvidia,function = "kbc";
973 nvidia,pull = <TEGRA_PIN_PULL_UP>;
974 nvidia,tristate = <TEGRA_PIN_DISABLE>;
975 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
976 };
977 kb_row0_pr0 {
978 nvidia,pins = "kb_row0_pr0";
979 nvidia,function = "kbc";
980 nvidia,pull = <TEGRA_PIN_PULL_UP>;
981 nvidia,tristate = <TEGRA_PIN_DISABLE>;
982 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
983 };
984 kb_row1_pr1 {
985 nvidia,pins = "kb_row1_pr1";
986 nvidia,function = "kbc";
987 nvidia,pull = <TEGRA_PIN_PULL_UP>;
988 nvidia,tristate = <TEGRA_PIN_DISABLE>;
989 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
990 };
991 kb_row2_pr2 {
992 nvidia,pins = "kb_row2_pr2";
993 nvidia,function = "kbc";
994 nvidia,pull = <TEGRA_PIN_PULL_UP>;
995 nvidia,tristate = <TEGRA_PIN_DISABLE>;
996 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
997 };
998 kb_row3_pr3 {
999 nvidia,pins = "kb_row3_pr3";
1000 nvidia,function = "kbc";
1001 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1002 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1003 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1004 };
1005 kb_row4_pr4 {
1006 nvidia,pins = "kb_row4_pr4";
1007 nvidia,function = "kbc";
1008 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1009 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1010 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1011 };
1012 kb_row5_pr5 {
1013 nvidia,pins = "kb_row5_pr5";
1014 nvidia,function = "kbc";
1015 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1016 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1017 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1018 };
1019 kb_row6_pr6 {
1020 nvidia,pins = "kb_row6_pr6";
1021 nvidia,function = "kbc";
1022 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1023 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1024 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1025 };
1026 kb_row7_pr7 {
1027 nvidia,pins = "kb_row7_pr7";
1028 nvidia,function = "kbc";
1029 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1030 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1031 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1032 };
1033 kb_row8_ps0 {
1034 nvidia,pins = "kb_row8_ps0";
1035 nvidia,function = "kbc";
1036 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1037 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1038 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1039 };
1040 kb_row9_ps1 {
1041 nvidia,pins = "kb_row9_ps1";
1042 nvidia,function = "kbc";
1043 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1044 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1045 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1046 };
1047 kb_row10_ps2 {
1048 nvidia,pins = "kb_row10_ps2";
1049 nvidia,function = "kbc";
1050 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1051 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1052 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1053 };
1054 kb_row11_ps3 {
1055 nvidia,pins = "kb_row11_ps3";
1056 nvidia,function = "kbc";
1057 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1058 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1059 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1060 };
1061 kb_row12_ps4 {
1062 nvidia,pins = "kb_row12_ps4";
1063 nvidia,function = "kbc";
1064 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1065 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1066 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1067 };
1068 kb_row13_ps5 {
1069 nvidia,pins = "kb_row13_ps5";
1070 nvidia,function = "kbc";
1071 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1072 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1073 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1074 };
1075 kb_row14_ps6 {
1076 nvidia,pins = "kb_row14_ps6";
1077 nvidia,function = "kbc";
1078 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1079 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1080 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1081 };
1082 kb_row15_ps7 {
1083 nvidia,pins = "kb_row15_ps7";
1084 nvidia,function = "kbc";
1085 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1086 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1087 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1088 };
1089 vi_pclk_pt0 {
1090 nvidia,pins = "vi_pclk_pt0";
1091 nvidia,function = "rsvd1";
1092 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1093 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1094 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1095 };
1096 vi_mclk_pt1 {
1097 nvidia,pins = "vi_mclk_pt1";
1098 nvidia,function = "vi";
1099 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1100 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1101 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1102 };
1103 vi_d10_pt2 {
1104 nvidia,pins = "vi_d10_pt2";
1105 nvidia,function = "rsvd1";
1106 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1107 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1108 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1109 };
1110 vi_d11_pt3 {
1111 nvidia,pins = "vi_d11_pt3";
1112 nvidia,function = "rsvd1";
1113 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1114 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1115 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1116 };
1117 vi_d0_pt4 {
1118 nvidia,pins = "vi_d0_pt4";
1119 nvidia,function = "rsvd1";
1120 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1121 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1122 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1123 };
1124 gen2_i2c_scl_pt5 {
1125 nvidia,pins = "gen2_i2c_scl_pt5";
1126 nvidia,function = "i2c2";
1127 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1128 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1129 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1130 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1131 };
1132 gen2_i2c_sda_pt6 {
1133 nvidia,pins = "gen2_i2c_sda_pt6";
1134 nvidia,function = "i2c2";
1135 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1136 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1137 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1138 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1139 };
1140 sdmmc4_cmd_pt7 {
1141 nvidia,pins = "sdmmc4_cmd_pt7";
100 nvidia,function = "sdmmc4"; 1142 nvidia,function = "sdmmc4";
1143 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1144 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1145 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1146 };
1147 pu0 {
1148 nvidia,pins = "pu0";
1149 nvidia,function = "rsvd1";
1150 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1151 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1152 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1153 };
1154 pu1 {
1155 nvidia,pins = "pu1";
1156 nvidia,function = "rsvd1";
1157 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1158 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1159 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1160 };
1161 pu2 {
1162 nvidia,pins = "pu2";
1163 nvidia,function = "rsvd1";
1164 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1165 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1166 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1167 };
1168 pu3 {
1169 nvidia,pins = "pu3";
1170 nvidia,function = "rsvd1";
1171 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1172 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1173 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1174 };
1175 pu4 {
1176 nvidia,pins = "pu4";
1177 nvidia,function = "pwm1";
1178 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1179 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1180 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1181 };
1182 pu5 {
1183 nvidia,pins = "pu5";
1184 nvidia,function = "pwm2";
1185 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1186 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1187 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1188 };
1189 pu6 {
1190 nvidia,pins = "pu6";
1191 nvidia,function = "rsvd1";
1192 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1193 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1194 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1195 };
1196 jtag_rtck_pu7 {
1197 nvidia,pins = "jtag_rtck_pu7";
1198 nvidia,function = "rtck";
1199 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1200 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1201 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1202 };
1203 pv0 {
1204 nvidia,pins = "pv0";
1205 nvidia,function = "rsvd1";
1206 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1207 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1208 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1209 };
1210 pv2 {
1211 nvidia,pins = "pv2";
1212 nvidia,function = "owr";
1213 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1214 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1215 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1216 };
1217 pv3 {
1218 nvidia,pins = "pv3";
1219 nvidia,function = "rsvd1";
1220 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1221 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1222 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1223 };
1224 ddc_scl_pv4 {
1225 nvidia,pins = "ddc_scl_pv4";
1226 nvidia,function = "i2c4";
1227 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1228 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1229 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1230 };
1231 ddc_sda_pv5 {
1232 nvidia,pins = "ddc_sda_pv5";
1233 nvidia,function = "i2c4";
1234 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1235 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1236 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1237 };
1238 crt_hsync_pv6 {
1239 nvidia,pins = "crt_hsync_pv6";
1240 nvidia,function = "crt";
1241 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1242 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1243 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1244 };
1245 crt_vsync_pv7 {
1246 nvidia,pins = "crt_vsync_pv7";
1247 nvidia,function = "crt";
1248 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1249 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1250 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1251 };
1252 lcd_cs1_n_pw0 {
1253 nvidia,pins = "lcd_cs1_n_pw0";
1254 nvidia,function = "displaya";
1255 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1256 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1257 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1258 };
1259 lcd_m1_pw1 {
1260 nvidia,pins = "lcd_m1_pw1";
1261 nvidia,function = "displaya";
1262 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1263 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1264 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1265 };
1266 spi2_cs1_n_pw2 {
1267 nvidia,pins = "spi2_cs1_n_pw2";
1268 nvidia,function = "spi2";
1269 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1270 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1271 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1272 };
1273 clk1_out_pw4 {
1274 nvidia,pins = "clk1_out_pw4";
1275 nvidia,function = "extperiph1";
1276 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1277 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1278 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1279 };
1280 clk2_out_pw5 {
1281 nvidia,pins = "clk2_out_pw5";
1282 nvidia,function = "extperiph2";
1283 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1284 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1285 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1286 };
1287 uart3_txd_pw6 {
1288 nvidia,pins = "uart3_txd_pw6";
1289 nvidia,function = "uartc";
1290 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1291 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1292 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1293 };
1294 uart3_rxd_pw7 {
1295 nvidia,pins = "uart3_rxd_pw7";
1296 nvidia,function = "uartc";
1297 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1298 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1299 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1300 };
1301 spi2_sck_px2 {
1302 nvidia,pins = "spi2_sck_px2";
1303 nvidia,function = "gmi";
1304 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1305 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1306 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1307 };
1308 spi1_mosi_px4 {
1309 nvidia,pins = "spi1_mosi_px4";
1310 nvidia,function = "spi1";
1311 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1312 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1313 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1314 };
1315 spi1_sck_px5 {
1316 nvidia,pins = "spi1_sck_px5";
1317 nvidia,function = "spi1";
1318 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1319 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1320 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1321 };
1322 spi1_cs0_n_px6 {
1323 nvidia,pins = "spi1_cs0_n_px6";
1324 nvidia,function = "spi1";
101 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1325 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
102 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1326 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1327 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1328 };
1329 spi1_miso_px7 {
1330 nvidia,pins = "spi1_miso_px7";
1331 nvidia,function = "spi1";
1332 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1333 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1334 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1335 };
1336 ulpi_clk_py0 {
1337 nvidia,pins = "ulpi_clk_py0";
1338 nvidia,function = "uartd";
1339 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1340 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1341 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1342 };
1343 ulpi_dir_py1 {
1344 nvidia,pins = "ulpi_dir_py1";
1345 nvidia,function = "uartd";
1346 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1347 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1348 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1349 };
1350 ulpi_nxt_py2 {
1351 nvidia,pins = "ulpi_nxt_py2";
1352 nvidia,function = "uartd";
1353 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1354 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1355 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1356 };
1357 ulpi_stp_py3 {
1358 nvidia,pins = "ulpi_stp_py3";
1359 nvidia,function = "uartd";
1360 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1361 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1362 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1363 };
1364 sdmmc1_dat3_py4 {
1365 nvidia,pins = "sdmmc1_dat3_py4";
1366 nvidia,function = "sdmmc1";
1367 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1368 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1369 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1370 };
1371 sdmmc1_dat2_py5 {
1372 nvidia,pins = "sdmmc1_dat2_py5";
1373 nvidia,function = "sdmmc1";
1374 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1375 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1376 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1377 };
1378 sdmmc1_dat1_py6 {
1379 nvidia,pins = "sdmmc1_dat1_py6";
1380 nvidia,function = "sdmmc1";
1381 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1382 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1383 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1384 };
1385 sdmmc1_dat0_py7 {
1386 nvidia,pins = "sdmmc1_dat0_py7";
1387 nvidia,function = "sdmmc1";
1388 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1389 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1390 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1391 };
1392 sdmmc1_clk_pz0 {
1393 nvidia,pins = "sdmmc1_clk_pz0";
1394 nvidia,function = "sdmmc1";
1395 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1396 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1397 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1398 };
1399 sdmmc1_cmd_pz1 {
1400 nvidia,pins = "sdmmc1_cmd_pz1";
1401 nvidia,function = "sdmmc1";
1402 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1403 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1404 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1405 };
1406 lcd_sdin_pz2 {
1407 nvidia,pins = "lcd_sdin_pz2";
1408 nvidia,function = "displaya";
1409 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1410 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1411 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1412 };
1413 lcd_wr_n_pz3 {
1414 nvidia,pins = "lcd_wr_n_pz3";
1415 nvidia,function = "displaya";
1416 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1417 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1418 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1419 };
1420 lcd_sck_pz4 {
1421 nvidia,pins = "lcd_sck_pz4";
1422 nvidia,function = "displaya";
1423 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1424 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1425 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1426 };
1427 sys_clk_req_pz5 {
1428 nvidia,pins = "sys_clk_req_pz5";
1429 nvidia,function = "sysclk";
1430 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1431 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1432 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1433 };
1434 pwr_i2c_scl_pz6 {
1435 nvidia,pins = "pwr_i2c_scl_pz6";
1436 nvidia,function = "i2cpwr";
1437 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1438 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1439 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1440 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1441 };
1442 pwr_i2c_sda_pz7 {
1443 nvidia,pins = "pwr_i2c_sda_pz7";
1444 nvidia,function = "i2cpwr";
1445 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1446 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1447 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1448 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
103 }; 1449 };
104 sdmmc4_dat0_paa0 { 1450 sdmmc4_dat0_paa0 {
105 nvidia,pins = "sdmmc4_dat0_paa0", 1451 nvidia,pins = "sdmmc4_dat0_paa0";
106 "sdmmc4_dat1_paa1",
107 "sdmmc4_dat2_paa2",
108 "sdmmc4_dat3_paa3",
109 "sdmmc4_dat4_paa4",
110 "sdmmc4_dat5_paa5",
111 "sdmmc4_dat6_paa6",
112 "sdmmc4_dat7_paa7";
113 nvidia,function = "sdmmc4"; 1452 nvidia,function = "sdmmc4";
114 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1453 nvidia,pull = <TEGRA_PIN_PULL_UP>;
115 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1454 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1455 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
116 }; 1456 };
117 dap2_fs_pa2 { 1457 sdmmc4_dat1_paa1 {
118 nvidia,pins = "dap2_fs_pa2", 1458 nvidia,pins = "sdmmc4_dat1_paa1";
119 "dap2_sclk_pa3", 1459 nvidia,function = "sdmmc4";
120 "dap2_din_pa4", 1460 nvidia,pull = <TEGRA_PIN_PULL_UP>;
121 "dap2_dout_pa5"; 1461 nvidia,tristate = <TEGRA_PIN_DISABLE>;
122 nvidia,function = "i2s1"; 1462 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1463 };
1464 sdmmc4_dat2_paa2 {
1465 nvidia,pins = "sdmmc4_dat2_paa2";
1466 nvidia,function = "sdmmc4";
1467 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1468 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1469 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1470 };
1471 sdmmc4_dat3_paa3 {
1472 nvidia,pins = "sdmmc4_dat3_paa3";
1473 nvidia,function = "sdmmc4";
1474 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1475 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1476 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1477 };
1478 sdmmc4_dat4_paa4 {
1479 nvidia,pins = "sdmmc4_dat4_paa4";
1480 nvidia,function = "sdmmc4";
1481 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1482 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1483 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1484 };
1485 sdmmc4_dat5_paa5 {
1486 nvidia,pins = "sdmmc4_dat5_paa5";
1487 nvidia,function = "sdmmc4";
1488 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1489 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1490 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1491 };
1492 sdmmc4_dat6_paa6 {
1493 nvidia,pins = "sdmmc4_dat6_paa6";
1494 nvidia,function = "sdmmc4";
1495 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1496 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1497 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1498 };
1499 sdmmc4_dat7_paa7 {
1500 nvidia,pins = "sdmmc4_dat7_paa7";
1501 nvidia,function = "sdmmc4";
1502 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1503 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1504 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1505 };
1506 pbb0 {
1507 nvidia,pins = "pbb0";
1508 nvidia,function = "rsvd1";
1509 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1510 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1511 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1512 };
1513 cam_i2c_scl_pbb1 {
1514 nvidia,pins = "cam_i2c_scl_pbb1";
1515 nvidia,function = "i2c3";
1516 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1517 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1518 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1519 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1520 };
1521 cam_i2c_sda_pbb2 {
1522 nvidia,pins = "cam_i2c_sda_pbb2";
1523 nvidia,function = "i2c3";
1524 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1525 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1526 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1527 nvidia,open-drain = <TEGRA_PIN_ENABLE>;
1528 };
1529 pbb3 {
1530 nvidia,pins = "pbb3";
1531 nvidia,function = "vgp3";
1532 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1533 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1534 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1535 };
1536 pbb4 {
1537 nvidia,pins = "pbb4";
1538 nvidia,function = "vgp4";
1539 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1540 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1541 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1542 };
1543 pbb5 {
1544 nvidia,pins = "pbb5";
1545 nvidia,function = "vgp5";
1546 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1547 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1548 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1549 };
1550 pbb6 {
1551 nvidia,pins = "pbb6";
1552 nvidia,function = "vgp6";
1553 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1554 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1555 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1556 };
1557 pbb7 {
1558 nvidia,pins = "pbb7";
1559 nvidia,function = "i2s4";
1560 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1561 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1562 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1563 };
1564 cam_mclk_pcc0 {
1565 nvidia,pins = "cam_mclk_pcc0";
1566 nvidia,function = "vi_alt3";
1567 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1568 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1569 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1570 };
1571 pcc1 {
1572 nvidia,pins = "pcc1";
1573 nvidia,function = "rsvd1";
1574 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1575 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1576 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1577 };
1578 pcc2 {
1579 nvidia,pins = "pcc2";
1580 nvidia,function = "i2s4";
1581 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1582 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1583 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1584 };
1585 sdmmc4_rst_n_pcc3 {
1586 nvidia,pins = "sdmmc4_rst_n_pcc3";
1587 nvidia,function = "sdmmc4";
1588 nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
1589 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1590 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1591 };
1592 sdmmc4_clk_pcc4 {
1593 nvidia,pins = "sdmmc4_clk_pcc4";
1594 nvidia,function = "sdmmc4";
1595 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1596 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1597 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1598 };
1599 clk2_req_pcc5 {
1600 nvidia,pins = "clk2_req_pcc5";
1601 nvidia,function = "dap";
123 nvidia,pull = <TEGRA_PIN_PULL_NONE>; 1602 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
124 nvidia,tristate = <TEGRA_PIN_DISABLE>; 1603 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1604 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1605 };
1606 pex_l2_rst_n_pcc6 {
1607 nvidia,pins = "pex_l2_rst_n_pcc6";
1608 nvidia,function = "pcie";
1609 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1610 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1611 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1612 };
1613 pex_l2_clkreq_n_pcc7 {
1614 nvidia,pins = "pex_l2_clkreq_n_pcc7";
1615 nvidia,function = "pcie";
1616 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1617 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1618 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1619 };
1620 pex_l0_prsnt_n_pdd0 {
1621 nvidia,pins = "pex_l0_prsnt_n_pdd0";
1622 nvidia,function = "pcie";
1623 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1624 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1625 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1626 };
1627 pex_l0_rst_n_pdd1 {
1628 nvidia,pins = "pex_l0_rst_n_pdd1";
1629 nvidia,function = "pcie";
1630 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1631 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1632 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1633 };
1634 pex_l0_clkreq_n_pdd2 {
1635 nvidia,pins = "pex_l0_clkreq_n_pdd2";
1636 nvidia,function = "pcie";
1637 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1638 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1639 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1640 };
1641 pex_wake_n_pdd3 {
1642 nvidia,pins = "pex_wake_n_pdd3";
1643 nvidia,function = "pcie";
1644 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1645 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1646 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
125 }; 1647 };
126 pex_l1_prsnt_n_pdd4 { 1648 pex_l1_prsnt_n_pdd4 {
127 nvidia,pins = "pex_l1_prsnt_n_pdd4", 1649 nvidia,pins = "pex_l1_prsnt_n_pdd4";
128 "pex_l1_clkreq_n_pdd6"; 1650 nvidia,function = "pcie";
129 nvidia,pull = <TEGRA_PIN_PULL_UP>; 1651 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1652 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1653 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1654 };
1655 pex_l1_rst_n_pdd5 {
1656 nvidia,pins = "pex_l1_rst_n_pdd5";
1657 nvidia,function = "pcie";
1658 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1659 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1660 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1661 };
1662 pex_l1_clkreq_n_pdd6 {
1663 nvidia,pins = "pex_l1_clkreq_n_pdd6";
1664 nvidia,function = "pcie";
1665 nvidia,pull = <TEGRA_PIN_PULL_UP>;
1666 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1667 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1668 };
1669 pex_l2_prsnt_n_pdd7 {
1670 nvidia,pins = "pex_l2_prsnt_n_pdd7";
1671 nvidia,function = "pcie";
1672 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1673 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1674 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1675 };
1676 clk3_out_pee0 {
1677 nvidia,pins = "clk3_out_pee0";
1678 nvidia,function = "extperiph3";
1679 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1680 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1681 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
1682 };
1683 clk3_req_pee1 {
1684 nvidia,pins = "clk3_req_pee1";
1685 nvidia,function = "dev3";
1686 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1687 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1688 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1689 };
1690 clk1_req_pee2 {
1691 nvidia,pins = "clk1_req_pee2";
1692 nvidia,function = "dap";
1693 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1694 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1695 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1696 };
1697 hdmi_cec_pee3 {
1698 nvidia,pins = "hdmi_cec_pee3";
1699 nvidia,function = "cec";
1700 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1701 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1702 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
1703 nvidia,open-drain = <TEGRA_PIN_DISABLE>;
1704 };
1705 owr {
1706 nvidia,pins = "owr";
1707 nvidia,function = "owr";
1708 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
1709 nvidia,tristate = <TEGRA_PIN_DISABLE>;
1710 nvidia,enable-input = <TEGRA_PIN_ENABLE>;
130 }; 1711 };
131 sdio3 { 1712 sdio3 {
132 nvidia,pins = "drive_sdio3"; 1713 nvidia,pins = "drive_sdio3";
diff --git a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
index 36cafbfa1bfa..606753eb72c8 100644
--- a/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/vf-colibri-eval-v3.dtsi
@@ -12,6 +12,12 @@
12 bootargs = "console=ttyLP0,115200"; 12 bootargs = "console=ttyLP0,115200";
13 }; 13 };
14 14
15 clk16m: clk16m {
16 compatible = "fixed-clock";
17 #clock-cells = <0>;
18 clock-frequency = <16000000>;
19 };
20
15 regulators { 21 regulators {
16 compatible = "simple-bus"; 22 compatible = "simple-bus";
17 #address-cells = <1>; 23 #address-cells = <1>;
@@ -47,6 +53,21 @@
47 status = "okay"; 53 status = "okay";
48}; 54};
49 55
56&dspi1 {
57 status = "okay";
58
59 mcp2515can: can@0 {
60 compatible = "microchip,mcp2515";
61 pinctrl-names = "default";
62 pinctrl-0 = <&pinctrl_can_int>;
63 reg = <0>;
64 clocks = <&clk16m>;
65 spi-max-frequency = <10000000>;
66 interrupt-parent = <&gpio1>;
67 interrupts = <11 GPIO_ACTIVE_LOW>;
68 };
69};
70
50&esdhc1 { 71&esdhc1 {
51 pinctrl-names = "default"; 72 pinctrl-names = "default";
52 pinctrl-0 = <&pinctrl_esdhc1>; 73 pinctrl-0 = <&pinctrl_esdhc1>;
@@ -94,3 +115,13 @@
94&usbh1 { 115&usbh1 {
95 vbus-supply = <&usbh_vbus_reg>; 116 vbus-supply = <&usbh_vbus_reg>;
96}; 117};
118
119&iomuxc {
120 vf610-colibri {
121 pinctrl_can_int: can_int {
122 fsl,pins = <
123 VF610_PAD_PTB21__GPIO_43 0x22ed
124 >;
125 };
126 };
127};
diff --git a/arch/arm/boot/dts/vf-colibri.dtsi b/arch/arm/boot/dts/vf-colibri.dtsi
index 5c2b7320856d..fbef0828e930 100644
--- a/arch/arm/boot/dts/vf-colibri.dtsi
+++ b/arch/arm/boot/dts/vf-colibri.dtsi
@@ -23,6 +23,12 @@
23 status = "okay"; 23 status = "okay";
24}; 24};
25 25
26&dspi1 {
27 bus-num = <1>;
28 pinctrl-names = "default";
29 pinctrl-0 = <&pinctrl_dspi1>;
30};
31
26&edma0 { 32&edma0 {
27 status = "okay"; 33 status = "okay";
28}; 34};
@@ -107,6 +113,15 @@
107 >; 113 >;
108 }; 114 };
109 115
116 pinctrl_dspi1: dspi1grp {
117 fsl,pins = <
118 VF610_PAD_PTD5__DSPI1_CS0 0x33e2
119 VF610_PAD_PTD6__DSPI1_SIN 0x33e1
120 VF610_PAD_PTD7__DSPI1_SOUT 0x33e2
121 VF610_PAD_PTD8__DSPI1_SCK 0x33e2
122 >;
123 };
124
110 pinctrl_esdhc1: esdhc1grp { 125 pinctrl_esdhc1: esdhc1grp {
111 fsl,pins = < 126 fsl,pins = <
112 VF610_PAD_PTA24__ESDHC1_CLK 0x31ef 127 VF610_PAD_PTA24__ESDHC1_CLK 0x31ef
diff --git a/arch/arm/boot/dts/vf500.dtsi b/arch/arm/boot/dts/vf500.dtsi
index 1dbf8d2d1ddf..e976d2fa1527 100644
--- a/arch/arm/boot/dts/vf500.dtsi
+++ b/arch/arm/boot/dts/vf500.dtsi
@@ -24,14 +24,13 @@
24 }; 24 };
25 25
26 soc { 26 soc {
27 interrupt-parent = <&intc>;
28
29 aips-bus@40000000 { 27 aips-bus@40000000 {
30 28
31 intc: interrupt-controller@40002000 { 29 intc: interrupt-controller@40002000 {
32 compatible = "arm,cortex-a9-gic"; 30 compatible = "arm,cortex-a9-gic";
33 #interrupt-cells = <3>; 31 #interrupt-cells = <3>;
34 interrupt-controller; 32 interrupt-controller;
33 interrupt-parent = <&intc>;
35 reg = <0x40003000 0x1000>, 34 reg = <0x40003000 0x1000>,
36 <0x40002100 0x100>; 35 <0x40002100 0x100>;
37 }; 36 };
@@ -40,145 +39,17 @@
40 compatible = "arm,cortex-a9-global-timer"; 39 compatible = "arm,cortex-a9-global-timer";
41 reg = <0x40002200 0x20>; 40 reg = <0x40002200 0x20>;
42 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; 41 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
42 interrupt-parent = <&intc>;
43 clocks = <&clks VF610_CLK_PLATFORM_BUS>; 43 clocks = <&clks VF610_CLK_PLATFORM_BUS>;
44 }; 44 };
45 }; 45 };
46 }; 46 };
47}; 47};
48 48
49&adc0 { 49&mscm_ir {
50 interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>; 50 interrupt-parent = <&intc>;
51};
52
53&adc1 {
54 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
55};
56
57&can0 {
58 interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
59};
60
61&can1 {
62 interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
63};
64
65&dspi0 {
66 interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
67};
68
69&edma0 {
70 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
71 <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
72 interrupt-names = "edma-tx", "edma-err";
73};
74
75&edma1 {
76 interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
77 <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
78 interrupt-names = "edma-tx", "edma-err";
79};
80
81&esdhc1 {
82 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
83};
84
85&fec0 {
86 interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
87};
88
89&fec1 {
90 interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
91};
92
93&ftm {
94 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
95};
96
97&gpio0 {
98 interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
99};
100
101&gpio1 {
102 interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
103};
104
105&gpio2 {
106 interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
107};
108
109&gpio3 {
110 interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
111};
112
113&gpio4 {
114 interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
115};
116
117&i2c0 {
118 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
119};
120
121&pit {
122 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
123};
124
125&qspi0 {
126 interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
127};
128
129&sai2 {
130 interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
131};
132
133&snvsrtc {
134 interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
135};
136
137&src {
138 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
139};
140
141&uart0 {
142 interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
143};
144
145&uart1 {
146 interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
147};
148
149&uart2 {
150 interrupts = <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
151};
152
153&uart3 {
154 interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
155};
156
157&uart4 {
158 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
159};
160
161&uart5 {
162 interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
163};
164
165&usbdev0 {
166 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
167};
168
169&usbh1 {
170 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
171};
172
173&usbphy0 {
174 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
175};
176
177&usbphy1 {
178 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
179}; 51};
180 52
181&wdoga5 { 53&wdoga5 {
182 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
183 status = "okay"; 54 status = "okay";
184}; 55};
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index a29c7ce15eaf..4aa335166be7 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -54,6 +54,7 @@
54 #address-cells = <1>; 54 #address-cells = <1>;
55 #size-cells = <1>; 55 #size-cells = <1>;
56 compatible = "simple-bus"; 56 compatible = "simple-bus";
57 interrupt-parent = <&mscm_ir>;
57 ranges; 58 ranges;
58 59
59 aips0: aips-bus@40000000 { 60 aips0: aips-bus@40000000 {
@@ -62,6 +63,19 @@
62 #size-cells = <1>; 63 #size-cells = <1>;
63 ranges; 64 ranges;
64 65
66 mscm_cpucfg: cpucfg@40001000 {
67 compatible = "fsl,vf610-mscm-cpucfg", "syscon";
68 reg = <0x40001000 0x800>;
69 };
70
71 mscm_ir: interrupt-controller@40001800 {
72 compatible = "fsl,vf610-mscm-ir";
73 reg = <0x40001800 0x400>;
74 fsl,cpucfg = <&mscm_cpucfg>;
75 interrupt-controller;
76 #interrupt-cells = <2>;
77 };
78
65 edma0: dma-controller@40018000 { 79 edma0: dma-controller@40018000 {
66 #dma-cells = <2>; 80 #dma-cells = <2>;
67 compatible = "fsl,vf610-edma"; 81 compatible = "fsl,vf610-edma";
@@ -69,6 +83,9 @@
69 <0x40024000 0x1000>, 83 <0x40024000 0x1000>,
70 <0x40025000 0x1000>; 84 <0x40025000 0x1000>;
71 dma-channels = <32>; 85 dma-channels = <32>;
86 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>,
87 <9 IRQ_TYPE_LEVEL_HIGH>;
88 interrupt-names = "edma-tx", "edma-err";
72 clock-names = "dmamux0", "dmamux1"; 89 clock-names = "dmamux0", "dmamux1";
73 clocks = <&clks VF610_CLK_DMAMUX0>, 90 clocks = <&clks VF610_CLK_DMAMUX0>,
74 <&clks VF610_CLK_DMAMUX1>; 91 <&clks VF610_CLK_DMAMUX1>;
@@ -78,6 +95,7 @@
78 can0: flexcan@40020000 { 95 can0: flexcan@40020000 {
79 compatible = "fsl,vf610-flexcan"; 96 compatible = "fsl,vf610-flexcan";
80 reg = <0x40020000 0x4000>; 97 reg = <0x40020000 0x4000>;
98 interrupts = <58 IRQ_TYPE_LEVEL_HIGH>;
81 clocks = <&clks VF610_CLK_FLEXCAN0>, 99 clocks = <&clks VF610_CLK_FLEXCAN0>,
82 <&clks VF610_CLK_FLEXCAN0>; 100 <&clks VF610_CLK_FLEXCAN0>;
83 clock-names = "ipg", "per"; 101 clock-names = "ipg", "per";
@@ -87,6 +105,7 @@
87 uart0: serial@40027000 { 105 uart0: serial@40027000 {
88 compatible = "fsl,vf610-lpuart"; 106 compatible = "fsl,vf610-lpuart";
89 reg = <0x40027000 0x1000>; 107 reg = <0x40027000 0x1000>;
108 interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
90 clocks = <&clks VF610_CLK_UART0>; 109 clocks = <&clks VF610_CLK_UART0>;
91 clock-names = "ipg"; 110 clock-names = "ipg";
92 dmas = <&edma0 0 2>, 111 dmas = <&edma0 0 2>,
@@ -98,6 +117,7 @@
98 uart1: serial@40028000 { 117 uart1: serial@40028000 {
99 compatible = "fsl,vf610-lpuart"; 118 compatible = "fsl,vf610-lpuart";
100 reg = <0x40028000 0x1000>; 119 reg = <0x40028000 0x1000>;
120 interrupts = <62 IRQ_TYPE_LEVEL_HIGH>;
101 clocks = <&clks VF610_CLK_UART1>; 121 clocks = <&clks VF610_CLK_UART1>;
102 clock-names = "ipg"; 122 clock-names = "ipg";
103 dmas = <&edma0 0 4>, 123 dmas = <&edma0 0 4>,
@@ -109,6 +129,7 @@
109 uart2: serial@40029000 { 129 uart2: serial@40029000 {
110 compatible = "fsl,vf610-lpuart"; 130 compatible = "fsl,vf610-lpuart";
111 reg = <0x40029000 0x1000>; 131 reg = <0x40029000 0x1000>;
132 interrupts = <63 IRQ_TYPE_LEVEL_HIGH>;
112 clocks = <&clks VF610_CLK_UART2>; 133 clocks = <&clks VF610_CLK_UART2>;
113 clock-names = "ipg"; 134 clock-names = "ipg";
114 dmas = <&edma0 0 6>, 135 dmas = <&edma0 0 6>,
@@ -120,6 +141,7 @@
120 uart3: serial@4002a000 { 141 uart3: serial@4002a000 {
121 compatible = "fsl,vf610-lpuart"; 142 compatible = "fsl,vf610-lpuart";
122 reg = <0x4002a000 0x1000>; 143 reg = <0x4002a000 0x1000>;
144 interrupts = <64 IRQ_TYPE_LEVEL_HIGH>;
123 clocks = <&clks VF610_CLK_UART3>; 145 clocks = <&clks VF610_CLK_UART3>;
124 clock-names = "ipg"; 146 clock-names = "ipg";
125 dmas = <&edma0 0 8>, 147 dmas = <&edma0 0 8>,
@@ -133,15 +155,29 @@
133 #size-cells = <0>; 155 #size-cells = <0>;
134 compatible = "fsl,vf610-dspi"; 156 compatible = "fsl,vf610-dspi";
135 reg = <0x4002c000 0x1000>; 157 reg = <0x4002c000 0x1000>;
158 interrupts = <67 IRQ_TYPE_LEVEL_HIGH>;
136 clocks = <&clks VF610_CLK_DSPI0>; 159 clocks = <&clks VF610_CLK_DSPI0>;
137 clock-names = "dspi"; 160 clock-names = "dspi";
138 spi-num-chipselects = <5>; 161 spi-num-chipselects = <5>;
139 status = "disabled"; 162 status = "disabled";
140 }; 163 };
141 164
165 dspi1: dspi1@4002d000 {
166 #address-cells = <1>;
167 #size-cells = <0>;
168 compatible = "fsl,vf610-dspi";
169 reg = <0x4002d000 0x1000>;
170 interrupts = <68 IRQ_TYPE_LEVEL_HIGH>;
171 clocks = <&clks VF610_CLK_DSPI1>;
172 clock-names = "dspi";
173 spi-num-chipselects = <5>;
174 status = "disabled";
175 };
176
142 sai2: sai@40031000 { 177 sai2: sai@40031000 {
143 compatible = "fsl,vf610-sai"; 178 compatible = "fsl,vf610-sai";
144 reg = <0x40031000 0x1000>; 179 reg = <0x40031000 0x1000>;
180 interrupts = <86 IRQ_TYPE_LEVEL_HIGH>;
145 clocks = <&clks VF610_CLK_SAI2>; 181 clocks = <&clks VF610_CLK_SAI2>;
146 clock-names = "sai"; 182 clock-names = "sai";
147 dma-names = "tx", "rx"; 183 dma-names = "tx", "rx";
@@ -153,6 +189,7 @@
153 pit: pit@40037000 { 189 pit: pit@40037000 {
154 compatible = "fsl,vf610-pit"; 190 compatible = "fsl,vf610-pit";
155 reg = <0x40037000 0x1000>; 191 reg = <0x40037000 0x1000>;
192 interrupts = <39 IRQ_TYPE_LEVEL_HIGH>;
156 clocks = <&clks VF610_CLK_PIT>; 193 clocks = <&clks VF610_CLK_PIT>;
157 clock-names = "pit"; 194 clock-names = "pit";
158 }; 195 };
@@ -186,6 +223,7 @@
186 adc0: adc@4003b000 { 223 adc0: adc@4003b000 {
187 compatible = "fsl,vf610-adc"; 224 compatible = "fsl,vf610-adc";
188 reg = <0x4003b000 0x1000>; 225 reg = <0x4003b000 0x1000>;
226 interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
189 clocks = <&clks VF610_CLK_ADC0>; 227 clocks = <&clks VF610_CLK_ADC0>;
190 clock-names = "adc"; 228 clock-names = "adc";
191 status = "disabled"; 229 status = "disabled";
@@ -194,6 +232,7 @@
194 wdoga5: wdog@4003e000 { 232 wdoga5: wdog@4003e000 {
195 compatible = "fsl,vf610-wdt", "fsl,imx21-wdt"; 233 compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
196 reg = <0x4003e000 0x1000>; 234 reg = <0x4003e000 0x1000>;
235 interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
197 clocks = <&clks VF610_CLK_WDT>; 236 clocks = <&clks VF610_CLK_WDT>;
198 clock-names = "wdog"; 237 clock-names = "wdog";
199 status = "disabled"; 238 status = "disabled";
@@ -204,6 +243,7 @@
204 #size-cells = <0>; 243 #size-cells = <0>;
205 compatible = "fsl,vf610-qspi"; 244 compatible = "fsl,vf610-qspi";
206 reg = <0x40044000 0x1000>; 245 reg = <0x40044000 0x1000>;
246 interrupts = <24 IRQ_TYPE_LEVEL_HIGH>;
207 clocks = <&clks VF610_CLK_QSPI0_EN>, 247 clocks = <&clks VF610_CLK_QSPI0_EN>,
208 <&clks VF610_CLK_QSPI0>; 248 <&clks VF610_CLK_QSPI0>;
209 clock-names = "qspi_en", "qspi"; 249 clock-names = "qspi_en", "qspi";
@@ -213,7 +253,6 @@
213 iomuxc: iomuxc@40048000 { 253 iomuxc: iomuxc@40048000 {
214 compatible = "fsl,vf610-iomuxc"; 254 compatible = "fsl,vf610-iomuxc";
215 reg = <0x40048000 0x1000>; 255 reg = <0x40048000 0x1000>;
216 #gpio-range-cells = <3>;
217 }; 256 };
218 257
219 gpio0: gpio@40049000 { 258 gpio0: gpio@40049000 {
@@ -221,6 +260,7 @@
221 reg = <0x40049000 0x1000 0x400ff000 0x40>; 260 reg = <0x40049000 0x1000 0x400ff000 0x40>;
222 gpio-controller; 261 gpio-controller;
223 #gpio-cells = <2>; 262 #gpio-cells = <2>;
263 interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
224 interrupt-controller; 264 interrupt-controller;
225 #interrupt-cells = <2>; 265 #interrupt-cells = <2>;
226 gpio-ranges = <&iomuxc 0 0 32>; 266 gpio-ranges = <&iomuxc 0 0 32>;
@@ -231,6 +271,7 @@
231 reg = <0x4004a000 0x1000 0x400ff040 0x40>; 271 reg = <0x4004a000 0x1000 0x400ff040 0x40>;
232 gpio-controller; 272 gpio-controller;
233 #gpio-cells = <2>; 273 #gpio-cells = <2>;
274 interrupts = <108 IRQ_TYPE_LEVEL_HIGH>;
234 interrupt-controller; 275 interrupt-controller;
235 #interrupt-cells = <2>; 276 #interrupt-cells = <2>;
236 gpio-ranges = <&iomuxc 0 32 32>; 277 gpio-ranges = <&iomuxc 0 32 32>;
@@ -241,6 +282,7 @@
241 reg = <0x4004b000 0x1000 0x400ff080 0x40>; 282 reg = <0x4004b000 0x1000 0x400ff080 0x40>;
242 gpio-controller; 283 gpio-controller;
243 #gpio-cells = <2>; 284 #gpio-cells = <2>;
285 interrupts = <109 IRQ_TYPE_LEVEL_HIGH>;
244 interrupt-controller; 286 interrupt-controller;
245 #interrupt-cells = <2>; 287 #interrupt-cells = <2>;
246 gpio-ranges = <&iomuxc 0 64 32>; 288 gpio-ranges = <&iomuxc 0 64 32>;
@@ -251,6 +293,7 @@
251 reg = <0x4004c000 0x1000 0x400ff0c0 0x40>; 293 reg = <0x4004c000 0x1000 0x400ff0c0 0x40>;
252 gpio-controller; 294 gpio-controller;
253 #gpio-cells = <2>; 295 #gpio-cells = <2>;
296 interrupts = <110 IRQ_TYPE_LEVEL_HIGH>;
254 interrupt-controller; 297 interrupt-controller;
255 #interrupt-cells = <2>; 298 #interrupt-cells = <2>;
256 gpio-ranges = <&iomuxc 0 96 32>; 299 gpio-ranges = <&iomuxc 0 96 32>;
@@ -261,6 +304,7 @@
261 reg = <0x4004d000 0x1000 0x400ff100 0x40>; 304 reg = <0x4004d000 0x1000 0x400ff100 0x40>;
262 gpio-controller; 305 gpio-controller;
263 #gpio-cells = <2>; 306 #gpio-cells = <2>;
307 interrupts = <111 IRQ_TYPE_LEVEL_HIGH>;
264 interrupt-controller; 308 interrupt-controller;
265 #interrupt-cells = <2>; 309 #interrupt-cells = <2>;
266 gpio-ranges = <&iomuxc 0 128 7>; 310 gpio-ranges = <&iomuxc 0 128 7>;
@@ -274,6 +318,7 @@
274 usbphy0: usbphy@40050800 { 318 usbphy0: usbphy@40050800 {
275 compatible = "fsl,vf610-usbphy"; 319 compatible = "fsl,vf610-usbphy";
276 reg = <0x40050800 0x400>; 320 reg = <0x40050800 0x400>;
321 interrupts = <50 IRQ_TYPE_LEVEL_HIGH>;
277 clocks = <&clks VF610_CLK_USBPHY0>; 322 clocks = <&clks VF610_CLK_USBPHY0>;
278 fsl,anatop = <&anatop>; 323 fsl,anatop = <&anatop>;
279 status = "disabled"; 324 status = "disabled";
@@ -282,6 +327,7 @@
282 usbphy1: usbphy@40050c00 { 327 usbphy1: usbphy@40050c00 {
283 compatible = "fsl,vf610-usbphy"; 328 compatible = "fsl,vf610-usbphy";
284 reg = <0x40050c00 0x400>; 329 reg = <0x40050c00 0x400>;
330 interrupts = <51 IRQ_TYPE_LEVEL_HIGH>;
285 clocks = <&clks VF610_CLK_USBPHY1>; 331 clocks = <&clks VF610_CLK_USBPHY1>;
286 fsl,anatop = <&anatop>; 332 fsl,anatop = <&anatop>;
287 status = "disabled"; 333 status = "disabled";
@@ -292,6 +338,7 @@
292 #size-cells = <0>; 338 #size-cells = <0>;
293 compatible = "fsl,vf610-i2c"; 339 compatible = "fsl,vf610-i2c";
294 reg = <0x40066000 0x1000>; 340 reg = <0x40066000 0x1000>;
341 interrupts = <71 IRQ_TYPE_LEVEL_HIGH>;
295 clocks = <&clks VF610_CLK_I2C0>; 342 clocks = <&clks VF610_CLK_I2C0>;
296 clock-names = "ipg"; 343 clock-names = "ipg";
297 dmas = <&edma0 0 50>, 344 dmas = <&edma0 0 50>,
@@ -311,6 +358,7 @@
311 usbdev0: usb@40034000 { 358 usbdev0: usb@40034000 {
312 compatible = "fsl,vf610-usb", "fsl,imx27-usb"; 359 compatible = "fsl,vf610-usb", "fsl,imx27-usb";
313 reg = <0x40034000 0x800>; 360 reg = <0x40034000 0x800>;
361 interrupts = <75 IRQ_TYPE_LEVEL_HIGH>;
314 clocks = <&clks VF610_CLK_USBC0>; 362 clocks = <&clks VF610_CLK_USBC0>;
315 fsl,usbphy = <&usbphy0>; 363 fsl,usbphy = <&usbphy0>;
316 fsl,usbmisc = <&usbmisc0 0>; 364 fsl,usbmisc = <&usbmisc0 0>;
@@ -329,6 +377,7 @@
329 src: src@4006e000 { 377 src: src@4006e000 {
330 compatible = "fsl,vf610-src", "syscon"; 378 compatible = "fsl,vf610-src", "syscon";
331 reg = <0x4006e000 0x1000>; 379 reg = <0x4006e000 0x1000>;
380 interrupts = <96 IRQ_TYPE_LEVEL_HIGH>;
332 }; 381 };
333 }; 382 };
334 383
@@ -345,6 +394,9 @@
345 <0x400a1000 0x1000>, 394 <0x400a1000 0x1000>,
346 <0x400a2000 0x1000>; 395 <0x400a2000 0x1000>;
347 dma-channels = <32>; 396 dma-channels = <32>;
397 interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
398 <11 IRQ_TYPE_LEVEL_HIGH>;
399 interrupt-names = "edma-tx", "edma-err";
348 clock-names = "dmamux0", "dmamux1"; 400 clock-names = "dmamux0", "dmamux1";
349 clocks = <&clks VF610_CLK_DMAMUX2>, 401 clocks = <&clks VF610_CLK_DMAMUX2>,
350 <&clks VF610_CLK_DMAMUX3>; 402 <&clks VF610_CLK_DMAMUX3>;
@@ -360,6 +412,7 @@
360 snvsrtc: snvs-rtc-lp@34 { 412 snvsrtc: snvs-rtc-lp@34 {
361 compatible = "fsl,sec-v4.0-mon-rtc-lp"; 413 compatible = "fsl,sec-v4.0-mon-rtc-lp";
362 reg = <0x34 0x58>; 414 reg = <0x34 0x58>;
415 interrupts = <100 IRQ_TYPE_LEVEL_HIGH>;
363 clocks = <&clks VF610_CLK_SNVS>; 416 clocks = <&clks VF610_CLK_SNVS>;
364 clock-names = "snvs-rtc"; 417 clock-names = "snvs-rtc";
365 }; 418 };
@@ -368,6 +421,7 @@
368 uart4: serial@400a9000 { 421 uart4: serial@400a9000 {
369 compatible = "fsl,vf610-lpuart"; 422 compatible = "fsl,vf610-lpuart";
370 reg = <0x400a9000 0x1000>; 423 reg = <0x400a9000 0x1000>;
424 interrupts = <65 IRQ_TYPE_LEVEL_HIGH>;
371 clocks = <&clks VF610_CLK_UART4>; 425 clocks = <&clks VF610_CLK_UART4>;
372 clock-names = "ipg"; 426 clock-names = "ipg";
373 status = "disabled"; 427 status = "disabled";
@@ -376,6 +430,7 @@
376 uart5: serial@400aa000 { 430 uart5: serial@400aa000 {
377 compatible = "fsl,vf610-lpuart"; 431 compatible = "fsl,vf610-lpuart";
378 reg = <0x400aa000 0x1000>; 432 reg = <0x400aa000 0x1000>;
433 interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
379 clocks = <&clks VF610_CLK_UART5>; 434 clocks = <&clks VF610_CLK_UART5>;
380 clock-names = "ipg"; 435 clock-names = "ipg";
381 status = "disabled"; 436 status = "disabled";
@@ -384,6 +439,7 @@
384 adc1: adc@400bb000 { 439 adc1: adc@400bb000 {
385 compatible = "fsl,vf610-adc"; 440 compatible = "fsl,vf610-adc";
386 reg = <0x400bb000 0x1000>; 441 reg = <0x400bb000 0x1000>;
442 interrupts = <54 IRQ_TYPE_LEVEL_HIGH>;
387 clocks = <&clks VF610_CLK_ADC1>; 443 clocks = <&clks VF610_CLK_ADC1>;
388 clock-names = "adc"; 444 clock-names = "adc";
389 status = "disabled"; 445 status = "disabled";
@@ -392,6 +448,7 @@
392 esdhc1: esdhc@400b2000 { 448 esdhc1: esdhc@400b2000 {
393 compatible = "fsl,imx53-esdhc"; 449 compatible = "fsl,imx53-esdhc";
394 reg = <0x400b2000 0x1000>; 450 reg = <0x400b2000 0x1000>;
451 interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
395 clocks = <&clks VF610_CLK_IPG_BUS>, 452 clocks = <&clks VF610_CLK_IPG_BUS>,
396 <&clks VF610_CLK_PLATFORM_BUS>, 453 <&clks VF610_CLK_PLATFORM_BUS>,
397 <&clks VF610_CLK_ESDHC1>; 454 <&clks VF610_CLK_ESDHC1>;
@@ -402,6 +459,7 @@
402 usbh1: usb@400b4000 { 459 usbh1: usb@400b4000 {
403 compatible = "fsl,vf610-usb", "fsl,imx27-usb"; 460 compatible = "fsl,vf610-usb", "fsl,imx27-usb";
404 reg = <0x400b4000 0x800>; 461 reg = <0x400b4000 0x800>;
462 interrupts = <76 IRQ_TYPE_LEVEL_HIGH>;
405 clocks = <&clks VF610_CLK_USBC1>; 463 clocks = <&clks VF610_CLK_USBC1>;
406 fsl,usbphy = <&usbphy1>; 464 fsl,usbphy = <&usbphy1>;
407 fsl,usbmisc = <&usbmisc1 0>; 465 fsl,usbmisc = <&usbmisc1 0>;
@@ -420,6 +478,7 @@
420 ftm: ftm@400b8000 { 478 ftm: ftm@400b8000 {
421 compatible = "fsl,ftm-timer"; 479 compatible = "fsl,ftm-timer";
422 reg = <0x400b8000 0x1000 0x400b9000 0x1000>; 480 reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
481 interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
423 clock-names = "ftm-evt", "ftm-src", 482 clock-names = "ftm-evt", "ftm-src",
424 "ftm-evt-counter-en", "ftm-src-counter-en"; 483 "ftm-evt-counter-en", "ftm-src-counter-en";
425 clocks = <&clks VF610_CLK_FTM2>, 484 clocks = <&clks VF610_CLK_FTM2>,
@@ -432,6 +491,7 @@
432 fec0: ethernet@400d0000 { 491 fec0: ethernet@400d0000 {
433 compatible = "fsl,mvf600-fec"; 492 compatible = "fsl,mvf600-fec";
434 reg = <0x400d0000 0x1000>; 493 reg = <0x400d0000 0x1000>;
494 interrupts = <78 IRQ_TYPE_LEVEL_HIGH>;
435 clocks = <&clks VF610_CLK_ENET0>, 495 clocks = <&clks VF610_CLK_ENET0>,
436 <&clks VF610_CLK_ENET0>, 496 <&clks VF610_CLK_ENET0>,
437 <&clks VF610_CLK_ENET>; 497 <&clks VF610_CLK_ENET>;
@@ -442,6 +502,7 @@
442 fec1: ethernet@400d1000 { 502 fec1: ethernet@400d1000 {
443 compatible = "fsl,mvf600-fec"; 503 compatible = "fsl,mvf600-fec";
444 reg = <0x400d1000 0x1000>; 504 reg = <0x400d1000 0x1000>;
505 interrupts = <79 IRQ_TYPE_LEVEL_HIGH>;
445 clocks = <&clks VF610_CLK_ENET1>, 506 clocks = <&clks VF610_CLK_ENET1>,
446 <&clks VF610_CLK_ENET1>, 507 <&clks VF610_CLK_ENET1>,
447 <&clks VF610_CLK_ENET>; 508 <&clks VF610_CLK_ENET>;
@@ -452,6 +513,7 @@
452 can1: flexcan@400d4000 { 513 can1: flexcan@400d4000 {
453 compatible = "fsl,vf610-flexcan"; 514 compatible = "fsl,vf610-flexcan";
454 reg = <0x400d4000 0x4000>; 515 reg = <0x400d4000 0x4000>;
516 interrupts = <59 IRQ_TYPE_LEVEL_HIGH>;
455 clocks = <&clks VF610_CLK_FLEXCAN1>, 517 clocks = <&clks VF610_CLK_FLEXCAN1>,
456 <&clks VF610_CLK_FLEXCAN1>; 518 <&clks VF610_CLK_FLEXCAN1>;
457 clock-names = "ipg", "per"; 519 clock-names = "ipg", "per";
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index 3c165fc2dce2..5f8a52ac7edf 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -55,22 +55,81 @@ bool mcpm_is_available(void)
55 return (platform_ops) ? true : false; 55 return (platform_ops) ? true : false;
56} 56}
57 57
58/*
59 * We can't use regular spinlocks. In the switcher case, it is possible
60 * for an outbound CPU to call power_down() after its inbound counterpart
61 * is already live using the same logical CPU number which trips lockdep
62 * debugging.
63 */
64static arch_spinlock_t mcpm_lock = __ARCH_SPIN_LOCK_UNLOCKED;
65
66static int mcpm_cpu_use_count[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER];
67
68static inline bool mcpm_cluster_unused(unsigned int cluster)
69{
70 int i, cnt;
71 for (i = 0, cnt = 0; i < MAX_CPUS_PER_CLUSTER; i++)
72 cnt |= mcpm_cpu_use_count[cluster][i];
73 return !cnt;
74}
75
58int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster) 76int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster)
59{ 77{
78 bool cpu_is_down, cluster_is_down;
79 int ret = 0;
80
60 if (!platform_ops) 81 if (!platform_ops)
61 return -EUNATCH; /* try not to shadow power_up errors */ 82 return -EUNATCH; /* try not to shadow power_up errors */
62 might_sleep(); 83 might_sleep();
63 return platform_ops->power_up(cpu, cluster); 84
85 /* backward compatibility callback */
86 if (platform_ops->power_up)
87 return platform_ops->power_up(cpu, cluster);
88
89 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
90
91 /*
92 * Since this is called with IRQs enabled, and no arch_spin_lock_irq
93 * variant exists, we need to disable IRQs manually here.
94 */
95 local_irq_disable();
96 arch_spin_lock(&mcpm_lock);
97
98 cpu_is_down = !mcpm_cpu_use_count[cluster][cpu];
99 cluster_is_down = mcpm_cluster_unused(cluster);
100
101 mcpm_cpu_use_count[cluster][cpu]++;
102 /*
103 * The only possible values are:
104 * 0 = CPU down
105 * 1 = CPU (still) up
106 * 2 = CPU requested to be up before it had a chance
107 * to actually make itself down.
108 * Any other value is a bug.
109 */
110 BUG_ON(mcpm_cpu_use_count[cluster][cpu] != 1 &&
111 mcpm_cpu_use_count[cluster][cpu] != 2);
112
113 if (cluster_is_down)
114 ret = platform_ops->cluster_powerup(cluster);
115 if (cpu_is_down && !ret)
116 ret = platform_ops->cpu_powerup(cpu, cluster);
117
118 arch_spin_unlock(&mcpm_lock);
119 local_irq_enable();
120 return ret;
64} 121}
65 122
66typedef void (*phys_reset_t)(unsigned long); 123typedef void (*phys_reset_t)(unsigned long);
67 124
68void mcpm_cpu_power_down(void) 125void mcpm_cpu_power_down(void)
69{ 126{
127 unsigned int mpidr, cpu, cluster;
128 bool cpu_going_down, last_man;
70 phys_reset_t phys_reset; 129 phys_reset_t phys_reset;
71 130
72 if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down)) 131 if (WARN_ON_ONCE(!platform_ops))
73 return; 132 return;
74 BUG_ON(!irqs_disabled()); 133 BUG_ON(!irqs_disabled());
75 134
76 /* 135 /*
@@ -79,28 +138,65 @@ void mcpm_cpu_power_down(void)
79 */ 138 */
80 setup_mm_for_reboot(); 139 setup_mm_for_reboot();
81 140
82 platform_ops->power_down(); 141 /* backward compatibility callback */
142 if (platform_ops->power_down) {
143 platform_ops->power_down();
144 goto not_dead;
145 }
146
147 mpidr = read_cpuid_mpidr();
148 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
149 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
150 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
151
152 __mcpm_cpu_going_down(cpu, cluster);
83 153
154 arch_spin_lock(&mcpm_lock);
155 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP);
156
157 mcpm_cpu_use_count[cluster][cpu]--;
158 BUG_ON(mcpm_cpu_use_count[cluster][cpu] != 0 &&
159 mcpm_cpu_use_count[cluster][cpu] != 1);
160 cpu_going_down = !mcpm_cpu_use_count[cluster][cpu];
161 last_man = mcpm_cluster_unused(cluster);
162
163 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
164 platform_ops->cpu_powerdown_prepare(cpu, cluster);
165 platform_ops->cluster_powerdown_prepare(cluster);
166 arch_spin_unlock(&mcpm_lock);
167 platform_ops->cluster_cache_disable();
168 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
169 } else {
170 if (cpu_going_down)
171 platform_ops->cpu_powerdown_prepare(cpu, cluster);
172 arch_spin_unlock(&mcpm_lock);
173 /*
174 * If cpu_going_down is false here, that means a power_up
175 * request raced ahead of us. Even if we do not want to
176 * shut this CPU down, the caller still expects execution
177 * to return through the system resume entry path, like
178 * when the WFI is aborted due to a new IRQ or the like..
179 * So let's continue with cache cleaning in all cases.
180 */
181 platform_ops->cpu_cache_disable();
182 }
183
184 __mcpm_cpu_down(cpu, cluster);
185
186 /* Now we are prepared for power-down, do it: */
187 if (cpu_going_down)
188 wfi();
189
190not_dead:
84 /* 191 /*
85 * It is possible for a power_up request to happen concurrently 192 * It is possible for a power_up request to happen concurrently
86 * with a power_down request for the same CPU. In this case the 193 * with a power_down request for the same CPU. In this case the
87 * power_down method might not be able to actually enter a 194 * CPU might not be able to actually enter a powered down state
88 * powered down state with the WFI instruction if the power_up 195 * with the WFI instruction if the power_up request has removed
89 * method has removed the required reset condition. The 196 * the required reset condition. We must perform a re-entry in
90 * power_down method is then allowed to return. We must perform 197 * the kernel as if the power_up method just had deasserted reset
91 * a re-entry in the kernel as if the power_up method just had 198 * on the CPU.
92 * deasserted reset on the CPU.
93 *
94 * To simplify race issues, the platform specific implementation
95 * must accommodate for the possibility of unordered calls to
96 * power_down and power_up with a usage count. Therefore, if a
97 * call to power_up is issued for a CPU that is not down, then
98 * the next call to power_down must not attempt a full shutdown
99 * but only do the minimum (normally disabling L1 cache and CPU
100 * coherency) and return just as if a concurrent power_up request
101 * had happened as described above.
102 */ 199 */
103
104 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 200 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset);
105 phys_reset(virt_to_phys(mcpm_entry_point)); 201 phys_reset(virt_to_phys(mcpm_entry_point));
106 202
@@ -125,26 +221,66 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
125 221
126void mcpm_cpu_suspend(u64 expected_residency) 222void mcpm_cpu_suspend(u64 expected_residency)
127{ 223{
128 phys_reset_t phys_reset; 224 if (WARN_ON_ONCE(!platform_ops))
129
130 if (WARN_ON_ONCE(!platform_ops || !platform_ops->suspend))
131 return; 225 return;
132 BUG_ON(!irqs_disabled());
133 226
134 /* Very similar to mcpm_cpu_power_down() */ 227 /* backward compatibility callback */
135 setup_mm_for_reboot(); 228 if (platform_ops->suspend) {
136 platform_ops->suspend(expected_residency); 229 phys_reset_t phys_reset;
137 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 230 BUG_ON(!irqs_disabled());
138 phys_reset(virt_to_phys(mcpm_entry_point)); 231 setup_mm_for_reboot();
139 BUG(); 232 platform_ops->suspend(expected_residency);
233 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset);
234 phys_reset(virt_to_phys(mcpm_entry_point));
235 BUG();
236 }
237
238 /* Some platforms might have to enable special resume modes, etc. */
239 if (platform_ops->cpu_suspend_prepare) {
240 unsigned int mpidr = read_cpuid_mpidr();
241 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
242 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
243 arch_spin_lock(&mcpm_lock);
244 platform_ops->cpu_suspend_prepare(cpu, cluster);
245 arch_spin_unlock(&mcpm_lock);
246 }
247 mcpm_cpu_power_down();
140} 248}
141 249
142int mcpm_cpu_powered_up(void) 250int mcpm_cpu_powered_up(void)
143{ 251{
252 unsigned int mpidr, cpu, cluster;
253 bool cpu_was_down, first_man;
254 unsigned long flags;
255
144 if (!platform_ops) 256 if (!platform_ops)
145 return -EUNATCH; 257 return -EUNATCH;
146 if (platform_ops->powered_up) 258
259 /* backward compatibility callback */
260 if (platform_ops->powered_up) {
147 platform_ops->powered_up(); 261 platform_ops->powered_up();
262 return 0;
263 }
264
265 mpidr = read_cpuid_mpidr();
266 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
267 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
268 local_irq_save(flags);
269 arch_spin_lock(&mcpm_lock);
270
271 cpu_was_down = !mcpm_cpu_use_count[cluster][cpu];
272 first_man = mcpm_cluster_unused(cluster);
273
274 if (first_man && platform_ops->cluster_is_up)
275 platform_ops->cluster_is_up(cluster);
276 if (cpu_was_down)
277 mcpm_cpu_use_count[cluster][cpu] = 1;
278 if (platform_ops->cpu_is_up)
279 platform_ops->cpu_is_up(cpu, cluster);
280
281 arch_spin_unlock(&mcpm_lock);
282 local_irq_restore(flags);
283
148 return 0; 284 return 0;
149} 285}
150 286
@@ -334,8 +470,10 @@ int __init mcpm_sync_init(
334 } 470 }
335 mpidr = read_cpuid_mpidr(); 471 mpidr = read_cpuid_mpidr();
336 this_cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 472 this_cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
337 for_each_online_cpu(i) 473 for_each_online_cpu(i) {
474 mcpm_cpu_use_count[this_cluster][i] = 1;
338 mcpm_sync.clusters[this_cluster].cpus[i].cpu = CPU_UP; 475 mcpm_sync.clusters[this_cluster].cpus[i].cpu = CPU_UP;
476 }
339 mcpm_sync.clusters[this_cluster].cluster = CLUSTER_UP; 477 mcpm_sync.clusters[this_cluster].cluster = CLUSTER_UP;
340 sync_cache_w(&mcpm_sync); 478 sync_cache_w(&mcpm_sync);
341 479
diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig
deleted file mode 100644
index 9e9a72e3d30f..000000000000
--- a/arch/arm/configs/ape6evm_defconfig
+++ /dev/null
@@ -1,109 +0,0 @@
1CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y
3CONFIG_NO_HZ=y
4CONFIG_HIGH_RES_TIMERS=y
5CONFIG_BSD_PROCESS_ACCT=y
6CONFIG_IKCONFIG=y
7CONFIG_IKCONFIG_PROC=y
8CONFIG_LOG_BUF_SHIFT=16
9CONFIG_CGROUPS=y
10CONFIG_CGROUP_SCHED=y
11CONFIG_KALLSYMS_ALL=y
12CONFIG_EMBEDDED=y
13CONFIG_PERF_EVENTS=y
14CONFIG_SLAB=y
15CONFIG_ARCH_SHMOBILE_LEGACY=y
16CONFIG_ARCH_R8A73A4=y
17CONFIG_MACH_APE6EVM=y
18# CONFIG_ARM_THUMB is not set
19CONFIG_CPU_BPREDICT_DISABLE=y
20CONFIG_PL310_ERRATA_588369=y
21CONFIG_ARM_ERRATA_754322=y
22CONFIG_SMP=y
23CONFIG_SCHED_MC=y
24CONFIG_HAVE_ARM_ARCH_TIMER=y
25CONFIG_NR_CPUS=8
26CONFIG_AEABI=y
27CONFIG_HIGHMEM=y
28CONFIG_HIGHPTE=y
29# CONFIG_HW_PERF_EVENTS is not set
30# CONFIG_COMPACTION is not set
31# CONFIG_CROSS_MEMORY_ATTACH is not set
32CONFIG_ARM_APPENDED_DTB=y
33CONFIG_VFP=y
34CONFIG_NEON=y
35CONFIG_BINFMT_MISC=y
36CONFIG_PM=y
37CONFIG_NET=y
38CONFIG_PACKET=y
39CONFIG_UNIX=y
40CONFIG_XFRM_USER=y
41CONFIG_NET_KEY=y
42CONFIG_NET_KEY_MIGRATE=y
43CONFIG_INET=y
44CONFIG_IP_MULTICAST=y
45CONFIG_IP_PNP=y
46CONFIG_IP_PNP_DHCP=y
47# CONFIG_INET_LRO is not set
48# CONFIG_IPV6_SIT is not set
49CONFIG_NETFILTER=y
50CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
51CONFIG_DEVTMPFS=y
52CONFIG_DEVTMPFS_MOUNT=y
53# CONFIG_FW_LOADER_USER_HELPER is not set
54CONFIG_NETDEVICES=y
55# CONFIG_NET_CADENCE is not set
56CONFIG_SMC91X=y
57CONFIG_SMSC911X=y
58# CONFIG_INPUT_MOUSEDEV is not set
59CONFIG_INPUT_EVDEV=y
60CONFIG_KEYBOARD_GPIO=y
61# CONFIG_INPUT_MOUSE is not set
62# CONFIG_SERIO is not set
63CONFIG_SERIAL_NONSTANDARD=y
64CONFIG_SERIAL_SH_SCI=y
65CONFIG_SERIAL_SH_SCI_NR_UARTS=12
66CONFIG_SERIAL_SH_SCI_CONSOLE=y
67CONFIG_I2C=y
68CONFIG_I2C_SH_MOBILE=y
69CONFIG_GPIO_SH_PFC=y
70CONFIG_GPIOLIB=y
71# CONFIG_HWMON is not set
72CONFIG_THERMAL=y
73CONFIG_RCAR_THERMAL=y
74CONFIG_REGULATOR=y
75CONFIG_REGULATOR_FIXED_VOLTAGE=y
76CONFIG_REGULATOR_GPIO=y
77CONFIG_REGULATOR_MAX8973=y
78# CONFIG_HID is not set
79# CONFIG_USB_SUPPORT is not set
80CONFIG_MMC=y
81CONFIG_MMC_SDHI=y
82CONFIG_MMC_SH_MMCIF=y
83CONFIG_NEW_LEDS=y
84CONFIG_LEDS_CLASS=y
85CONFIG_LEDS_GPIO=y
86CONFIG_DMADEVICES=y
87CONFIG_SH_DMAE=y
88# CONFIG_IOMMU_SUPPORT is not set
89# CONFIG_DNOTIFY is not set
90CONFIG_TMPFS=y
91# CONFIG_MISC_FILESYSTEMS is not set
92CONFIG_NFS_FS=y
93CONFIG_NFS_V3_ACL=y
94CONFIG_NFS_V4=y
95CONFIG_NFS_V4_1=y
96CONFIG_ROOT_NFS=y
97CONFIG_MAGIC_SYSRQ=y
98CONFIG_ENABLE_DEFAULT_TRACERS=y
99CONFIG_CRYPTO_CBC=y
100CONFIG_CRYPTO_ECB=y
101CONFIG_CRYPTO_MD5=y
102CONFIG_CRYPTO_MICHAEL_MIC=y
103CONFIG_CRYPTO_TWOFISH=y
104CONFIG_CRC_CCITT=y
105CONFIG_CRC16=y
106CONFIG_CRC_T10DIF=y
107CONFIG_CRC_ITU_T=y
108CONFIG_CRC7=y
109CONFIG_LIBCRC32C=y
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 811e72bbe642..bcef49a21801 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -13,10 +13,13 @@ CONFIG_MODULE_UNLOAD=y
13# CONFIG_BLK_DEV_BSG is not set 13# CONFIG_BLK_DEV_BSG is not set
14# CONFIG_IOSCHED_DEADLINE is not set 14# CONFIG_IOSCHED_DEADLINE is not set
15# CONFIG_IOSCHED_CFQ is not set 15# CONFIG_IOSCHED_CFQ is not set
16CONFIG_ARCH_MULTI_V4T=y
17CONFIG_ARCH_MULTI_V5=y
18# CONFIG_ARCH_MULTI_V7 is not set
16CONFIG_ARCH_AT91=y 19CONFIG_ARCH_AT91=y
20CONFIG_SOC_SAM_V4_V5=y
17CONFIG_SOC_AT91RM9200=y 21CONFIG_SOC_AT91RM9200=y
18CONFIG_SOC_AT91SAM9=y 22CONFIG_SOC_AT91SAM9=y
19CONFIG_AT91_TIMER_HZ=128
20CONFIG_AEABI=y 23CONFIG_AEABI=y
21CONFIG_UACCESS_WITH_MEMCPY=y 24CONFIG_UACCESS_WITH_MEMCPY=y
22CONFIG_ZBOOT_ROM_TEXT=0x0 25CONFIG_ZBOOT_ROM_TEXT=0x0
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 1d8935359fd0..d034c96c039b 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -26,6 +26,8 @@ CONFIG_ZBOOT_ROM_BSS=0x0
26CONFIG_ARM_APPENDED_DTB=y 26CONFIG_ARM_APPENDED_DTB=y
27CONFIG_ARM_ATAG_DTB_COMPAT=y 27CONFIG_ARM_ATAG_DTB_COMPAT=y
28CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" 28CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
29CONFIG_CPU_IDLE=y
30CONFIG_ARM_EXYNOS_CPUIDLE=y
29CONFIG_VFP=y 31CONFIG_VFP=y
30CONFIG_NEON=y 32CONFIG_NEON=y
31CONFIG_PM=y 33CONFIG_PM=y
@@ -34,6 +36,14 @@ CONFIG_PACKET=y
34CONFIG_UNIX=y 36CONFIG_UNIX=y
35CONFIG_NET_KEY=y 37CONFIG_NET_KEY=y
36CONFIG_INET=y 38CONFIG_INET=y
39CONFIG_IP_PNP=y
40CONFIG_IP_PNP_DHCP=y
41CONFIG_IP_PNP_BOOTP=y
42CONFIG_IP_PNP_RARP=y
43CONFIG_WIRELESS=y
44CONFIG_CFG80211=y
45CONFIG_MWIFIEX=y
46CONFIG_MWIFIEX_SDIO=y
37CONFIG_RFKILL_REGULATOR=y 47CONFIG_RFKILL_REGULATOR=y
38CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 48CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
39CONFIG_DEVTMPFS=y 49CONFIG_DEVTMPFS=y
@@ -91,9 +101,11 @@ CONFIG_CHARGER_MAX77693=y
91CONFIG_CHARGER_TPS65090=y 101CONFIG_CHARGER_TPS65090=y
92CONFIG_HWMON=y 102CONFIG_HWMON=y
93CONFIG_SENSORS_LM90=y 103CONFIG_SENSORS_LM90=y
104CONFIG_CPU_FREQ=y
105CONFIG_CPU_THERMAL=y
94CONFIG_THERMAL=y 106CONFIG_THERMAL=y
95CONFIG_EXYNOS_THERMAL=y 107CONFIG_EXYNOS_THERMAL=y
96CONFIG_EXYNOS_THERMAL_CORE=y 108CONFIG_THERMAL_EMULATION=y
97CONFIG_WATCHDOG=y 109CONFIG_WATCHDOG=y
98CONFIG_S3C2410_WATCHDOG=y 110CONFIG_S3C2410_WATCHDOG=y
99CONFIG_MFD_CROS_EC=y 111CONFIG_MFD_CROS_EC=y
@@ -118,6 +130,7 @@ CONFIG_REGULATOR_S2MPS11=y
118CONFIG_REGULATOR_S5M8767=y 130CONFIG_REGULATOR_S5M8767=y
119CONFIG_REGULATOR_TPS65090=y 131CONFIG_REGULATOR_TPS65090=y
120CONFIG_DRM=y 132CONFIG_DRM=y
133CONFIG_DRM_EXYNOS_HDMI=y
121CONFIG_DRM_BRIDGE=y 134CONFIG_DRM_BRIDGE=y
122CONFIG_DRM_PTN3460=y 135CONFIG_DRM_PTN3460=y
123CONFIG_DRM_PS8622=y 136CONFIG_DRM_PS8622=y
@@ -171,10 +184,11 @@ CONFIG_RTC_DRV_S5M=y
171CONFIG_RTC_DRV_S3C=y 184CONFIG_RTC_DRV_S3C=y
172CONFIG_DMADEVICES=y 185CONFIG_DMADEVICES=y
173CONFIG_PL330_DMA=y 186CONFIG_PL330_DMA=y
187CONFIG_CHROME_PLATFORMS=y
188CONFIG_CROS_EC_CHARDEV=y
174CONFIG_COMMON_CLK_MAX77686=y 189CONFIG_COMMON_CLK_MAX77686=y
175CONFIG_COMMON_CLK_MAX77802=y 190CONFIG_COMMON_CLK_MAX77802=y
176CONFIG_COMMON_CLK_S2MPS11=y 191CONFIG_COMMON_CLK_S2MPS11=y
177CONFIG_EXYNOS_IOMMU=y
178CONFIG_EXTCON=y 192CONFIG_EXTCON=y
179CONFIG_EXTCON_MAX14577=y 193CONFIG_EXTCON_MAX14577=y
180CONFIG_EXTCON_MAX77693=y 194CONFIG_EXTCON_MAX77693=y
@@ -197,6 +211,8 @@ CONFIG_TMPFS=y
197CONFIG_TMPFS_POSIX_ACL=y 211CONFIG_TMPFS_POSIX_ACL=y
198CONFIG_CRAMFS=y 212CONFIG_CRAMFS=y
199CONFIG_ROMFS_FS=y 213CONFIG_ROMFS_FS=y
214CONFIG_NFS_FS=y
215CONFIG_ROOT_NFS=y
200CONFIG_NLS_CODEPAGE_437=y 216CONFIG_NLS_CODEPAGE_437=y
201CONFIG_NLS_ASCII=y 217CONFIG_NLS_ASCII=y
202CONFIG_NLS_ISO8859_1=y 218CONFIG_NLS_ISO8859_1=y
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index e6b0007355f8..d3a8018639de 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -24,9 +24,8 @@ CONFIG_ARCH_MXC=y
24CONFIG_MACH_SCB9328=y 24CONFIG_MACH_SCB9328=y
25CONFIG_MACH_APF9328=y 25CONFIG_MACH_APF9328=y
26CONFIG_MACH_MX21ADS=y 26CONFIG_MACH_MX21ADS=y
27CONFIG_MACH_MX25_3DS=y
28CONFIG_MACH_EUKREA_CPUIMX25SD=y 27CONFIG_MACH_EUKREA_CPUIMX25SD=y
29CONFIG_MACH_IMX25_DT=y 28CONFIG_SOC_IMX25=y
30CONFIG_MACH_MX27ADS=y 29CONFIG_MACH_MX27ADS=y
31CONFIG_MACH_MX27_3DS=y 30CONFIG_MACH_MX27_3DS=y
32CONFIG_MACH_IMX27_VISSTRIM_M10=y 31CONFIG_MACH_IMX27_VISSTRIM_M10=y
@@ -177,6 +176,7 @@ CONFIG_EXT2_FS=y
177CONFIG_EXT3_FS=y 176CONFIG_EXT3_FS=y
178CONFIG_EXT4_FS=y 177CONFIG_EXT4_FS=y
179# CONFIG_DNOTIFY is not set 178# CONFIG_DNOTIFY is not set
179CONFIG_VFAT_FS=y
180# CONFIG_PROC_PAGE_MONITOR is not set 180# CONFIG_PROC_PAGE_MONITOR is not set
181CONFIG_TMPFS=y 181CONFIG_TMPFS=y
182CONFIG_JFFS2_FS=y 182CONFIG_JFFS2_FS=y
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index cf1e71e2f60a..fdeb1c83dcb5 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -71,6 +71,9 @@ CONFIG_IPV6=y
71CONFIG_NETFILTER=y 71CONFIG_NETFILTER=y
72CONFIG_CAN=y 72CONFIG_CAN=y
73CONFIG_CAN_FLEXCAN=y 73CONFIG_CAN_FLEXCAN=y
74CONFIG_BT=y
75CONFIG_BT_HCIUART=y
76CONFIG_BT_HCIUART_3WIRE=y
74CONFIG_CFG80211=y 77CONFIG_CFG80211=y
75CONFIG_MAC80211=y 78CONFIG_MAC80211=y
76CONFIG_RFKILL=y 79CONFIG_RFKILL=y
@@ -168,6 +171,7 @@ CONFIG_SPI=y
168CONFIG_SPI_IMX=y 171CONFIG_SPI_IMX=y
169CONFIG_GPIO_SYSFS=y 172CONFIG_GPIO_SYSFS=y
170CONFIG_GPIO_MC9S08DZ60=y 173CONFIG_GPIO_MC9S08DZ60=y
174CONFIG_GPIO_PCA953X=y
171CONFIG_GPIO_STMPE=y 175CONFIG_GPIO_STMPE=y
172CONFIG_POWER_SUPPLY=y 176CONFIG_POWER_SUPPLY=y
173CONFIG_POWER_RESET=y 177CONFIG_POWER_RESET=y
diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig
deleted file mode 100644
index 05a529311b4d..000000000000
--- a/arch/arm/configs/mackerel_defconfig
+++ /dev/null
@@ -1,157 +0,0 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y
3CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y
5CONFIG_LOG_BUF_SHIFT=16
6# CONFIG_UTS_NS is not set
7# CONFIG_IPC_NS is not set
8# CONFIG_USER_NS is not set
9# CONFIG_PID_NS is not set
10# CONFIG_NET_NS is not set
11CONFIG_SLAB=y
12CONFIG_MODULES=y
13CONFIG_MODULE_UNLOAD=y
14# CONFIG_BLK_DEV_BSG is not set
15# CONFIG_IOSCHED_DEADLINE is not set
16# CONFIG_IOSCHED_CFQ is not set
17CONFIG_ARCH_SHMOBILE_LEGACY=y
18CONFIG_ARCH_SH7372=y
19CONFIG_MACH_MACKEREL=y
20CONFIG_MEMORY_SIZE=0x10000000
21CONFIG_AEABI=y
22# CONFIG_OABI_COMPAT is not set
23CONFIG_FORCE_MAX_ZONEORDER=15
24CONFIG_ZBOOT_ROM_TEXT=0x0
25CONFIG_ZBOOT_ROM_BSS=0x0
26CONFIG_ARM_APPENDED_DTB=y
27CONFIG_KEXEC=y
28CONFIG_VFP=y
29# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
30CONFIG_PM=y
31CONFIG_NET=y
32CONFIG_PACKET=y
33CONFIG_UNIX=y
34CONFIG_INET=y
35CONFIG_IP_MULTICAST=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
39# CONFIG_INET_XFRM_MODE_TUNNEL is not set
40# CONFIG_INET_XFRM_MODE_BEET is not set
41# CONFIG_IPV6 is not set
42# CONFIG_WIRELESS is not set
43CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
44CONFIG_DEVTMPFS=y
45CONFIG_DEVTMPFS_MOUNT=y
46# CONFIG_FIRMWARE_IN_KERNEL is not set
47CONFIG_MTD=y
48CONFIG_MTD_CONCAT=y
49CONFIG_MTD_PARTITIONS=y
50CONFIG_MTD_CHAR=y
51CONFIG_MTD_BLOCK=y
52CONFIG_MTD_CFI=y
53CONFIG_MTD_CFI_ADV_OPTIONS=y
54CONFIG_MTD_CFI_INTELEXT=y
55CONFIG_MTD_PHYSMAP=y
56CONFIG_MTD_ARM_INTEGRATOR=y
57CONFIG_MTD_BLOCK2MTD=y
58CONFIG_SCSI=y
59CONFIG_BLK_DEV_SD=y
60# CONFIG_SCSI_LOWLEVEL is not set
61CONFIG_NETDEVICES=y
62CONFIG_NET_ETHERNET=y
63CONFIG_SMSC911X=y
64# CONFIG_NETDEV_1000 is not set
65# CONFIG_NETDEV_10000 is not set
66# CONFIG_WLAN is not set
67# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
68# CONFIG_INPUT_KEYBOARD is not set
69# CONFIG_INPUT_MOUSE is not set
70CONFIG_SERIAL_SH_SCI=y
71CONFIG_SERIAL_SH_SCI_NR_UARTS=8
72CONFIG_SERIAL_SH_SCI_CONSOLE=y
73# CONFIG_LEGACY_PTYS is not set
74# CONFIG_HW_RANDOM is not set
75CONFIG_I2C=y
76CONFIG_I2C_SH_MOBILE=y
77# CONFIG_HWMON is not set
78# CONFIG_MFD_SUPPORT is not set
79CONFIG_REGULATOR=y
80CONFIG_FB=y
81CONFIG_FB_MODE_HELPERS=y
82CONFIG_FB_SH_MOBILE_LCDC=y
83CONFIG_FB_SH_MOBILE_HDMI=y
84CONFIG_FRAMEBUFFER_CONSOLE=y
85CONFIG_LOGO=y
86# CONFIG_LOGO_LINUX_MONO is not set
87# CONFIG_LOGO_LINUX_CLUT224 is not set
88# CONFIG_SND_SUPPORT_OLD_API is not set
89# CONFIG_SND_VERBOSE_PROCFS is not set
90# CONFIG_SND_DRIVERS is not set
91# CONFIG_SND_ARM is not set
92CONFIG_SND_SOC_SH4_FSI=y
93CONFIG_USB=y
94CONFIG_USB_RENESAS_USBHS_HCD=y
95CONFIG_USB_RENESAS_USBHS=y
96CONFIG_USB_STORAGE=y
97CONFIG_USB_GADGET=y
98CONFIG_USB_RENESAS_USBHS_UDC=y
99CONFIG_MMC=y
100CONFIG_MMC_SDHI=y
101CONFIG_MMC_SH_MMCIF=y
102CONFIG_DMADEVICES=y
103CONFIG_SH_DMAE=y
104CONFIG_EXT2_FS=y
105CONFIG_EXT2_FS_XATTR=y
106CONFIG_EXT2_FS_POSIX_ACL=y
107CONFIG_EXT2_FS_SECURITY=y
108CONFIG_EXT2_FS_XIP=y
109CONFIG_EXT3_FS=y
110# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
111CONFIG_EXT3_FS_POSIX_ACL=y
112CONFIG_EXT3_FS_SECURITY=y
113# CONFIG_DNOTIFY is not set
114CONFIG_MSDOS_FS=y
115CONFIG_VFAT_FS=y
116CONFIG_TMPFS=y
117# CONFIG_MISC_FILESYSTEMS is not set
118CONFIG_NFS_FS=y
119CONFIG_NFS_V3=y
120CONFIG_NFS_V3_ACL=y
121CONFIG_NFS_V4=y
122CONFIG_NFS_V4_1=y
123CONFIG_ROOT_NFS=y
124CONFIG_NLS_CODEPAGE_437=y
125CONFIG_NLS_CODEPAGE_737=y
126CONFIG_NLS_CODEPAGE_775=y
127CONFIG_NLS_CODEPAGE_850=y
128CONFIG_NLS_CODEPAGE_852=y
129CONFIG_NLS_CODEPAGE_855=y
130CONFIG_NLS_CODEPAGE_857=y
131CONFIG_NLS_CODEPAGE_860=y
132CONFIG_NLS_CODEPAGE_861=y
133CONFIG_NLS_CODEPAGE_862=y
134CONFIG_NLS_CODEPAGE_863=y
135CONFIG_NLS_CODEPAGE_864=y
136CONFIG_NLS_CODEPAGE_865=y
137CONFIG_NLS_CODEPAGE_866=y
138CONFIG_NLS_CODEPAGE_869=y
139CONFIG_NLS_ISO8859_1=y
140CONFIG_NLS_ISO8859_2=y
141CONFIG_NLS_ISO8859_3=y
142CONFIG_NLS_ISO8859_4=y
143CONFIG_NLS_ISO8859_5=y
144CONFIG_NLS_ISO8859_6=y
145CONFIG_NLS_ISO8859_7=y
146CONFIG_NLS_ISO8859_9=y
147CONFIG_NLS_ISO8859_13=y
148CONFIG_NLS_ISO8859_14=y
149CONFIG_NLS_ISO8859_15=y
150CONFIG_NLS_KOI8_R=y
151CONFIG_NLS_KOI8_U=y
152CONFIG_NLS_UTF8=y
153# CONFIG_ENABLE_WARN_DEPRECATED is not set
154# CONFIG_ENABLE_MUST_CHECK is not set
155# CONFIG_ARM_UNWIND is not set
156CONFIG_CRYPTO=y
157CONFIG_CRYPTO_ANSI_CPRNG=y
diff --git a/arch/arm/configs/msm_defconfig b/arch/arm/configs/msm_defconfig
deleted file mode 100644
index dd18c9e527d6..000000000000
--- a/arch/arm/configs/msm_defconfig
+++ /dev/null
@@ -1,121 +0,0 @@
1CONFIG_SYSVIPC=y
2CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y
4CONFIG_IKCONFIG=y
5CONFIG_IKCONFIG_PROC=y
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_SYSCTL_SYSCALL=y
8CONFIG_KALLSYMS_ALL=y
9CONFIG_EMBEDDED=y
10# CONFIG_SLUB_DEBUG is not set
11# CONFIG_COMPAT_BRK is not set
12CONFIG_PROFILING=y
13CONFIG_OPROFILE=y
14CONFIG_KPROBES=y
15CONFIG_MODULES=y
16CONFIG_MODULE_UNLOAD=y
17CONFIG_MODULE_FORCE_UNLOAD=y
18CONFIG_MODVERSIONS=y
19CONFIG_PARTITION_ADVANCED=y
20CONFIG_ARCH_MSM=y
21CONFIG_PREEMPT=y
22CONFIG_AEABI=y
23CONFIG_HIGHMEM=y
24CONFIG_HIGHPTE=y
25CONFIG_CLEANCACHE=y
26CONFIG_AUTO_ZRELADDR=y
27CONFIG_VFP=y
28# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
29CONFIG_NET=y
30CONFIG_PACKET=y
31CONFIG_UNIX=y
32CONFIG_INET=y
33CONFIG_IP_ADVANCED_ROUTER=y
34CONFIG_IP_MULTIPLE_TABLES=y
35CONFIG_IP_ROUTE_VERBOSE=y
36CONFIG_IP_PNP=y
37CONFIG_IP_PNP_DHCP=y
38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
39# CONFIG_INET_XFRM_MODE_TUNNEL is not set
40# CONFIG_INET_XFRM_MODE_BEET is not set
41# CONFIG_INET_LRO is not set
42# CONFIG_IPV6 is not set
43CONFIG_CFG80211=y
44CONFIG_RFKILL=y
45CONFIG_BLK_DEV_LOOP=y
46CONFIG_BLK_DEV_RAM=y
47CONFIG_SCSI=y
48CONFIG_BLK_DEV_SD=y
49CONFIG_CHR_DEV_SG=y
50CONFIG_CHR_DEV_SCH=y
51CONFIG_SCSI_MULTI_LUN=y
52CONFIG_SCSI_CONSTANTS=y
53CONFIG_SCSI_LOGGING=y
54CONFIG_SCSI_SCAN_ASYNC=y
55CONFIG_NETDEVICES=y
56CONFIG_DUMMY=y
57CONFIG_SLIP=y
58CONFIG_SLIP_COMPRESSED=y
59CONFIG_SLIP_MODE_SLIP6=y
60CONFIG_USB_USBNET=y
61# CONFIG_USB_NET_AX8817X is not set
62# CONFIG_USB_NET_ZAURUS is not set
63CONFIG_INPUT_EVDEV=y
64# CONFIG_KEYBOARD_ATKBD is not set
65# CONFIG_MOUSE_PS2 is not set
66CONFIG_INPUT_JOYSTICK=y
67CONFIG_INPUT_TOUCHSCREEN=y
68CONFIG_INPUT_MISC=y
69CONFIG_INPUT_UINPUT=y
70CONFIG_SERIO_LIBPS2=y
71# CONFIG_LEGACY_PTYS is not set
72CONFIG_SERIAL_MSM=y
73CONFIG_SERIAL_MSM_CONSOLE=y
74# CONFIG_HW_RANDOM is not set
75CONFIG_I2C=y
76CONFIG_I2C_CHARDEV=y
77CONFIG_SPI=y
78CONFIG_DEBUG_GPIO=y
79CONFIG_GPIO_SYSFS=y
80CONFIG_THERMAL=y
81CONFIG_REGULATOR=y
82CONFIG_MEDIA_SUPPORT=y
83CONFIG_FB=y
84CONFIG_SOUND=y
85CONFIG_SND=y
86CONFIG_SND_DYNAMIC_MINORS=y
87# CONFIG_SND_ARM is not set
88# CONFIG_SND_SPI is not set
89# CONFIG_SND_USB is not set
90CONFIG_SND_SOC=y
91CONFIG_USB=y
92CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
93CONFIG_USB_MON=y
94CONFIG_USB_EHCI_HCD=y
95CONFIG_USB_ACM=y
96CONFIG_USB_SERIAL=y
97CONFIG_USB_GADGET=y
98CONFIG_USB_GADGET_DEBUG_FILES=y
99CONFIG_USB_GADGET_VBUS_DRAW=500
100CONFIG_RTC_CLASS=y
101CONFIG_STAGING=y
102CONFIG_EXT2_FS=y
103CONFIG_EXT2_FS_XATTR=y
104CONFIG_EXT3_FS=y
105# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
106CONFIG_EXT4_FS=y
107CONFIG_FUSE_FS=y
108CONFIG_VFAT_FS=y
109CONFIG_TMPFS=y
110CONFIG_NFS_FS=y
111CONFIG_NFS_V3_ACL=y
112CONFIG_NFS_V4=y
113CONFIG_CIFS=y
114CONFIG_PRINTK_TIME=y
115CONFIG_DYNAMIC_DEBUG=y
116CONFIG_DEBUG_INFO=y
117CONFIG_MAGIC_SYSRQ=y
118CONFIG_LOCKUP_DETECTOR=y
119# CONFIG_DETECT_HUNG_TASK is not set
120# CONFIG_SCHED_DEBUG is not set
121CONFIG_TIMER_STATS=y
diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v5_defconfig
index 9d56781a8f80..f69a459f4f92 100644
--- a/arch/arm/configs/multi_v5_defconfig
+++ b/arch/arm/configs/multi_v5_defconfig
@@ -13,7 +13,7 @@ CONFIG_ARCH_MVEBU=y
13CONFIG_MACH_KIRKWOOD=y 13CONFIG_MACH_KIRKWOOD=y
14CONFIG_MACH_NETXBIG=y 14CONFIG_MACH_NETXBIG=y
15CONFIG_ARCH_MXC=y 15CONFIG_ARCH_MXC=y
16CONFIG_MACH_IMX25_DT=y 16CONFIG_SOC_IMX25=y
17CONFIG_MACH_IMX27_DT=y 17CONFIG_MACH_IMX27_DT=y
18CONFIG_ARCH_U300=y 18CONFIG_ARCH_U300=y
19CONFIG_PCI_MVEBU=y 19CONFIG_PCI_MVEBU=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 06075b6d2463..ab86655c1f4b 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -12,10 +12,12 @@ CONFIG_MODULE_UNLOAD=y
12CONFIG_PARTITION_ADVANCED=y 12CONFIG_PARTITION_ADVANCED=y
13CONFIG_CMDLINE_PARTITION=y 13CONFIG_CMDLINE_PARTITION=y
14CONFIG_ARCH_VIRT=y 14CONFIG_ARCH_VIRT=y
15CONFIG_ARCH_ALPINE=y
15CONFIG_ARCH_MVEBU=y 16CONFIG_ARCH_MVEBU=y
16CONFIG_MACH_ARMADA_370=y 17CONFIG_MACH_ARMADA_370=y
17CONFIG_MACH_ARMADA_375=y 18CONFIG_MACH_ARMADA_375=y
18CONFIG_MACH_ARMADA_38X=y 19CONFIG_MACH_ARMADA_38X=y
20CONFIG_MACH_ARMADA_39X=y
19CONFIG_MACH_ARMADA_XP=y 21CONFIG_MACH_ARMADA_XP=y
20CONFIG_MACH_DOVE=y 22CONFIG_MACH_DOVE=y
21CONFIG_ARCH_BCM=y 23CONFIG_ARCH_BCM=y
@@ -91,6 +93,7 @@ CONFIG_ARCH_WM8850=y
91CONFIG_ARCH_ZYNQ=y 93CONFIG_ARCH_ZYNQ=y
92CONFIG_TRUSTED_FOUNDATIONS=y 94CONFIG_TRUSTED_FOUNDATIONS=y
93CONFIG_PCI=y 95CONFIG_PCI=y
96CONFIG_PCI_HOST_GENERIC=y
94CONFIG_PCI_KEYSTONE=y 97CONFIG_PCI_KEYSTONE=y
95CONFIG_PCI_MSI=y 98CONFIG_PCI_MSI=y
96CONFIG_PCI_MVEBU=y 99CONFIG_PCI_MVEBU=y
@@ -133,6 +136,9 @@ CONFIG_CAN_BCM=y
133CONFIG_CAN_DEV=y 136CONFIG_CAN_DEV=y
134CONFIG_CAN_XILINXCAN=y 137CONFIG_CAN_XILINXCAN=y
135CONFIG_CAN_MCP251X=y 138CONFIG_CAN_MCP251X=y
139CONFIG_BT=m
140CONFIG_BT_MRVL=m
141CONFIG_BT_MRVL_SDIO=m
136CONFIG_CFG80211=m 142CONFIG_CFG80211=m
137CONFIG_MAC80211=m 143CONFIG_MAC80211=m
138CONFIG_RFKILL=y 144CONFIG_RFKILL=y
@@ -200,6 +206,8 @@ CONFIG_USB_NET_SMSC95XX=y
200CONFIG_BRCMFMAC=m 206CONFIG_BRCMFMAC=m
201CONFIG_RT2X00=m 207CONFIG_RT2X00=m
202CONFIG_RT2800USB=m 208CONFIG_RT2800USB=m
209CONFIG_MWIFIEX=m
210CONFIG_MWIFIEX_SDIO=m
203CONFIG_INPUT_JOYDEV=y 211CONFIG_INPUT_JOYDEV=y
204CONFIG_INPUT_EVDEV=y 212CONFIG_INPUT_EVDEV=y
205CONFIG_KEYBOARD_GPIO=y 213CONFIG_KEYBOARD_GPIO=y
@@ -208,6 +216,7 @@ CONFIG_KEYBOARD_SPEAR=y
208CONFIG_KEYBOARD_ST_KEYSCAN=y 216CONFIG_KEYBOARD_ST_KEYSCAN=y
209CONFIG_KEYBOARD_CROS_EC=y 217CONFIG_KEYBOARD_CROS_EC=y
210CONFIG_MOUSE_PS2_ELANTECH=y 218CONFIG_MOUSE_PS2_ELANTECH=y
219CONFIG_MOUSE_ELAN_I2C=y
211CONFIG_INPUT_TOUCHSCREEN=y 220CONFIG_INPUT_TOUCHSCREEN=y
212CONFIG_TOUCHSCREEN_ATMEL_MXT=y 221CONFIG_TOUCHSCREEN_ATMEL_MXT=y
213CONFIG_TOUCHSCREEN_ST1232=m 222CONFIG_TOUCHSCREEN_ST1232=m
@@ -308,6 +317,7 @@ CONFIG_BATTERY_SBS=y
308CONFIG_CHARGER_TPS65090=y 317CONFIG_CHARGER_TPS65090=y
309CONFIG_POWER_RESET_AS3722=y 318CONFIG_POWER_RESET_AS3722=y
310CONFIG_POWER_RESET_GPIO=y 319CONFIG_POWER_RESET_GPIO=y
320CONFIG_POWER_RESET_GPIO_RESTART=y
311CONFIG_POWER_RESET_KEYSTONE=y 321CONFIG_POWER_RESET_KEYSTONE=y
312CONFIG_POWER_RESET_SUN6I=y 322CONFIG_POWER_RESET_SUN6I=y
313CONFIG_POWER_RESET_RMOBILE=y 323CONFIG_POWER_RESET_RMOBILE=y
@@ -505,7 +515,6 @@ CONFIG_DW_DMAC=y
505CONFIG_MV_XOR=y 515CONFIG_MV_XOR=y
506CONFIG_TEGRA20_APB_DMA=y 516CONFIG_TEGRA20_APB_DMA=y
507CONFIG_SH_DMAE=y 517CONFIG_SH_DMAE=y
508CONFIG_RCAR_AUDMAC_PP=m
509CONFIG_RCAR_DMAC=y 518CONFIG_RCAR_DMAC=y
510CONFIG_STE_DMA40=y 519CONFIG_STE_DMA40=y
511CONFIG_SIRF_DMA=y 520CONFIG_SIRF_DMA=y
@@ -533,6 +542,8 @@ CONFIG_MSM_MMCC_8960=y
533CONFIG_MSM_MMCC_8974=y 542CONFIG_MSM_MMCC_8974=y
534CONFIG_TEGRA_IOMMU_GART=y 543CONFIG_TEGRA_IOMMU_GART=y
535CONFIG_TEGRA_IOMMU_SMMU=y 544CONFIG_TEGRA_IOMMU_SMMU=y
545CONFIG_PM_DEVFREQ=y
546CONFIG_ARM_TEGRA_DEVFREQ=m
536CONFIG_MEMORY=y 547CONFIG_MEMORY=y
537CONFIG_TI_AEMIF=y 548CONFIG_TI_AEMIF=y
538CONFIG_IIO=y 549CONFIG_IIO=y
@@ -550,6 +561,7 @@ CONFIG_PHY_MIPHY365X=y
550CONFIG_PHY_STIH41X_USB=y 561CONFIG_PHY_STIH41X_USB=y
551CONFIG_PHY_STIH407_USB=y 562CONFIG_PHY_STIH407_USB=y
552CONFIG_PHY_SUN4I_USB=y 563CONFIG_PHY_SUN4I_USB=y
564CONFIG_PHY_SUN9I_USB=y
553CONFIG_EXT4_FS=y 565CONFIG_EXT4_FS=y
554CONFIG_AUTOFS4_FS=y 566CONFIG_AUTOFS4_FS=y
555CONFIG_MSDOS_FS=y 567CONFIG_MSDOS_FS=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 73673e95f23c..cacc9f4055a7 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -5,6 +5,7 @@ CONFIG_HIGH_RES_TIMERS=y
5CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
6CONFIG_BLK_DEV_INITRD=y 6CONFIG_BLK_DEV_INITRD=y
7CONFIG_EXPERT=y 7CONFIG_EXPERT=y
8CONFIG_PERF_EVENTS=y
8CONFIG_SLAB=y 9CONFIG_SLAB=y
9CONFIG_MODULES=y 10CONFIG_MODULES=y
10CONFIG_MODULE_UNLOAD=y 11CONFIG_MODULE_UNLOAD=y
@@ -12,6 +13,7 @@ CONFIG_ARCH_MVEBU=y
12CONFIG_MACH_ARMADA_370=y 13CONFIG_MACH_ARMADA_370=y
13CONFIG_MACH_ARMADA_375=y 14CONFIG_MACH_ARMADA_375=y
14CONFIG_MACH_ARMADA_38X=y 15CONFIG_MACH_ARMADA_38X=y
16CONFIG_MACH_ARMADA_39X=y
15CONFIG_MACH_ARMADA_XP=y 17CONFIG_MACH_ARMADA_XP=y
16CONFIG_MACH_DOVE=y 18CONFIG_MACH_DOVE=y
17CONFIG_PCI=y 19CONFIG_PCI=y
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index c7906c2fd645..b47e7c6628c9 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -149,6 +149,7 @@ CONFIG_EXT4_FS=y
149CONFIG_FSCACHE=m 149CONFIG_FSCACHE=m
150CONFIG_FSCACHE_STATS=y 150CONFIG_FSCACHE_STATS=y
151CONFIG_CACHEFILES=m 151CONFIG_CACHEFILES=m
152CONFIG_VFAT_FS=y
152CONFIG_TMPFS=y 153CONFIG_TMPFS=y
153CONFIG_TMPFS_POSIX_ACL=y 154CONFIG_TMPFS_POSIX_ACL=y
154CONFIG_JFFS2_FS=y 155CONFIG_JFFS2_FS=y
diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
index a7dce674f1be..0c8a78734536 100644
--- a/arch/arm/configs/omap1_defconfig
+++ b/arch/arm/configs/omap1_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2# CONFIG_SWAP is not set 1# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
4CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
@@ -34,7 +33,6 @@ CONFIG_ARCH_OMAP16XX=y
34CONFIG_MACH_OMAP_INNOVATOR=y 33CONFIG_MACH_OMAP_INNOVATOR=y
35CONFIG_MACH_OMAP_H2=y 34CONFIG_MACH_OMAP_H2=y
36CONFIG_MACH_OMAP_H3=y 35CONFIG_MACH_OMAP_H3=y
37CONFIG_MACH_OMAP_HTCWIZARD=y
38CONFIG_MACH_HERALD=y 36CONFIG_MACH_HERALD=y
39CONFIG_MACH_OMAP_OSK=y 37CONFIG_MACH_OMAP_OSK=y
40CONFIG_MACH_OMAP_PERSEUS2=y 38CONFIG_MACH_OMAP_PERSEUS2=y
@@ -55,7 +53,6 @@ CONFIG_HIGH_RES_TIMERS=y
55CONFIG_PREEMPT=y 53CONFIG_PREEMPT=y
56CONFIG_AEABI=y 54CONFIG_AEABI=y
57CONFIG_LEDS=y 55CONFIG_LEDS=y
58CONFIG_LEDS_CPU=y
59CONFIG_ZBOOT_ROM_TEXT=0x0 56CONFIG_ZBOOT_ROM_TEXT=0x0
60CONFIG_ZBOOT_ROM_BSS=0x0 57CONFIG_ZBOOT_ROM_BSS=0x0
61CONFIG_CMDLINE="root=1f03 rootfstype=jffs2" 58CONFIG_CMDLINE="root=1f03 rootfstype=jffs2"
@@ -80,8 +77,6 @@ CONFIG_IP_PNP_BOOTP=y
80CONFIG_IPV6=y 77CONFIG_IPV6=y
81CONFIG_NETFILTER=y 78CONFIG_NETFILTER=y
82CONFIG_BT=y 79CONFIG_BT=y
83CONFIG_BT_L2CAP=y
84CONFIG_BT_SCO=y
85CONFIG_BT_RFCOMM=y 80CONFIG_BT_RFCOMM=y
86CONFIG_BT_RFCOMM_TTY=y 81CONFIG_BT_RFCOMM_TTY=y
87CONFIG_BT_BNEP=y 82CONFIG_BT_BNEP=y
@@ -92,11 +87,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
92CONFIG_CONNECTOR=y 87CONFIG_CONNECTOR=y
93# CONFIG_PROC_EVENTS is not set 88# CONFIG_PROC_EVENTS is not set
94CONFIG_MTD=y 89CONFIG_MTD=y
95CONFIG_MTD_DEBUG=y
96CONFIG_MTD_DEBUG_VERBOSE=3
97CONFIG_MTD_PARTITIONS=y
98CONFIG_MTD_CMDLINE_PARTS=y 90CONFIG_MTD_CMDLINE_PARTS=y
99CONFIG_MTD_CHAR=y
100CONFIG_MTD_BLOCK=y 91CONFIG_MTD_BLOCK=y
101CONFIG_MTD_CFI=y 92CONFIG_MTD_CFI=y
102CONFIG_MTD_CFI_INTELEXT=y 93CONFIG_MTD_CFI_INTELEXT=y
@@ -113,11 +104,9 @@ CONFIG_BLK_DEV_SD=y
113CONFIG_CHR_DEV_ST=y 104CONFIG_CHR_DEV_ST=y
114CONFIG_BLK_DEV_SR=y 105CONFIG_BLK_DEV_SR=y
115CONFIG_CHR_DEV_SG=y 106CONFIG_CHR_DEV_SG=y
116CONFIG_SCSI_MULTI_LUN=y
117CONFIG_NETDEVICES=y 107CONFIG_NETDEVICES=y
118CONFIG_TUN=y 108CONFIG_TUN=y
119CONFIG_PHYLIB=y 109CONFIG_PHYLIB=y
120CONFIG_NET_ETHERNET=y
121CONFIG_SMC91X=y 110CONFIG_SMC91X=y
122CONFIG_USB_CATC=y 111CONFIG_USB_CATC=y
123CONFIG_USB_KAWETH=y 112CONFIG_USB_KAWETH=y
@@ -158,7 +147,6 @@ CONFIG_SPI_OMAP_UWIRE=y
158CONFIG_WATCHDOG=y 147CONFIG_WATCHDOG=y
159CONFIG_WATCHDOG_NOWAYOUT=y 148CONFIG_WATCHDOG_NOWAYOUT=y
160CONFIG_OMAP_WATCHDOG=y 149CONFIG_OMAP_WATCHDOG=y
161CONFIG_VIDEO_OUTPUT_CONTROL=y
162CONFIG_FB=y 150CONFIG_FB=y
163CONFIG_FIRMWARE_EDID=y 151CONFIG_FIRMWARE_EDID=y
164CONFIG_FB_MODE_HELPERS=y 152CONFIG_FB_MODE_HELPERS=y
@@ -168,7 +156,6 @@ CONFIG_FB_OMAP_LCDC_EXTERNAL=y
168CONFIG_FB_OMAP_LCDC_HWA742=y 156CONFIG_FB_OMAP_LCDC_HWA742=y
169CONFIG_FB_OMAP_MANUAL_UPDATE=y 157CONFIG_FB_OMAP_MANUAL_UPDATE=y
170CONFIG_FB_OMAP_LCD_MIPID=y 158CONFIG_FB_OMAP_LCD_MIPID=y
171CONFIG_FB_OMAP_BOOTLOADER_INIT=y
172CONFIG_BACKLIGHT_LCD_SUPPORT=y 159CONFIG_BACKLIGHT_LCD_SUPPORT=y
173CONFIG_LCD_CLASS_DEVICE=y 160CONFIG_LCD_CLASS_DEVICE=y
174CONFIG_FRAMEBUFFER_CONSOLE=y 161CONFIG_FRAMEBUFFER_CONSOLE=y
@@ -194,7 +181,6 @@ CONFIG_SND_OMAP_SOC=y
194# CONFIG_USB_HID is not set 181# CONFIG_USB_HID is not set
195CONFIG_USB=y 182CONFIG_USB=y
196CONFIG_USB_PHY=y 183CONFIG_USB_PHY=y
197# CONFIG_USB_DEVICE_CLASS is not set
198CONFIG_USB_MON=y 184CONFIG_USB_MON=y
199CONFIG_USB_OHCI_HCD=y 185CONFIG_USB_OHCI_HCD=y
200CONFIG_USB_STORAGE=y 186CONFIG_USB_STORAGE=y
@@ -261,9 +247,7 @@ CONFIG_DEBUG_SPINLOCK=y
261CONFIG_DEBUG_MUTEXES=y 247CONFIG_DEBUG_MUTEXES=y
262# CONFIG_DEBUG_BUGVERBOSE is not set 248# CONFIG_DEBUG_BUGVERBOSE is not set
263CONFIG_DEBUG_INFO=y 249CONFIG_DEBUG_INFO=y
264# CONFIG_RCU_CPU_STALL_DETECTOR is not set
265CONFIG_DEBUG_USER=y 250CONFIG_DEBUG_USER=y
266CONFIG_DEBUG_ERRORS=y
267CONFIG_SECURITY=y 251CONFIG_SECURITY=y
268CONFIG_CRYPTO_ECB=y 252CONFIG_CRYPTO_ECB=y
269CONFIG_CRYPTO_PCBC=y 253CONFIG_CRYPTO_PCBC=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 8e108599e1af..9ff7b54b2a83 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -1,3 +1,4 @@
1CONFIG_KERNEL_LZMA=y
1CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
2CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
3CONFIG_FHANDLE=y 4CONFIG_FHANDLE=y
@@ -86,17 +87,33 @@ CONFIG_IP_PNP_BOOTP=y
86CONFIG_IP_PNP_RARP=y 87CONFIG_IP_PNP_RARP=y
87# CONFIG_INET_LRO is not set 88# CONFIG_INET_LRO is not set
88CONFIG_NETFILTER=y 89CONFIG_NETFILTER=y
90CONFIG_PHONET=m
89CONFIG_CAN=m 91CONFIG_CAN=m
90CONFIG_CAN_C_CAN=m 92CONFIG_CAN_C_CAN=m
91CONFIG_CAN_C_CAN_PLATFORM=m 93CONFIG_CAN_C_CAN_PLATFORM=m
92CONFIG_BT=m 94CONFIG_BT=m
95CONFIG_BT_RFCOMM=m
96CONFIG_BT_RFCOMM_TTY=y
97CONFIG_BT_BNEP=m
98CONFIG_BT_BNEP_MC_FILTER=y
99CONFIG_BT_BNEP_PROTO_FILTER=y
100CONFIG_BT_HIDP=m
101CONFIG_BT_HCIBTUSB=m
102CONFIG_BT_HCIBTSDIO=m
93CONFIG_BT_HCIUART=m 103CONFIG_BT_HCIUART=m
94CONFIG_BT_HCIUART_H4=y 104CONFIG_BT_HCIUART_H4=y
95CONFIG_BT_HCIUART_BCSP=y 105CONFIG_BT_HCIUART_BCSP=y
96CONFIG_BT_HCIUART_LL=y 106CONFIG_BT_HCIUART_LL=y
107CONFIG_BT_HCIUART_3WIRE=y
97CONFIG_BT_HCIBCM203X=m 108CONFIG_BT_HCIBCM203X=m
98CONFIG_BT_HCIBPA10X=m 109CONFIG_BT_HCIBPA10X=m
99CONFIG_CFG80211=m 110CONFIG_CFG80211=m
111CONFIG_BT_HCIBFUSB=m
112CONFIG_BT_HCIVHCI=m
113CONFIG_BT_MRVL=m
114CONFIG_BT_MRVL_SDIO=m
115CONFIG_AF_RXRPC=m
116CONFIG_RXKAD=m
100CONFIG_MAC80211=m 117CONFIG_MAC80211=m
101CONFIG_DEVTMPFS=y 118CONFIG_DEVTMPFS=y
102CONFIG_DEVTMPFS_MOUNT=y 119CONFIG_DEVTMPFS_MOUNT=y
@@ -163,6 +180,7 @@ CONFIG_USB_EPSON2888=y
163CONFIG_USB_EHCI_HCD=m 180CONFIG_USB_EHCI_HCD=m
164CONFIG_USB_OHCI_HCD=m 181CONFIG_USB_OHCI_HCD=m
165CONFIG_USB_KC2190=y 182CONFIG_USB_KC2190=y
183CONFIG_USB_CDC_PHONET=m
166CONFIG_LIBERTAS=m 184CONFIG_LIBERTAS=m
167CONFIG_LIBERTAS_USB=m 185CONFIG_LIBERTAS_USB=m
168CONFIG_LIBERTAS_SDIO=m 186CONFIG_LIBERTAS_SDIO=m
@@ -209,6 +227,10 @@ CONFIG_I2C_CHARDEV=y
209CONFIG_SPI=y 227CONFIG_SPI=y
210CONFIG_SPI_OMAP24XX=y 228CONFIG_SPI_OMAP24XX=y
211CONFIG_SPI_TI_QSPI=m 229CONFIG_SPI_TI_QSPI=m
230CONFIG_HSI=m
231CONFIG_OMAP_SSI=m
232CONFIG_NOKIA_MODEM=m
233CONFIG_SSI_PROTOCOL=m
212CONFIG_PINCTRL_SINGLE=y 234CONFIG_PINCTRL_SINGLE=y
213CONFIG_DEBUG_GPIO=y 235CONFIG_DEBUG_GPIO=y
214CONFIG_GPIO_SYSFS=y 236CONFIG_GPIO_SYSFS=y
@@ -334,6 +356,7 @@ CONFIG_USB_CONFIGFS_ECM=y
334CONFIG_USB_CONFIGFS_ECM_SUBSET=y 356CONFIG_USB_CONFIGFS_ECM_SUBSET=y
335CONFIG_USB_CONFIGFS_RNDIS=y 357CONFIG_USB_CONFIGFS_RNDIS=y
336CONFIG_USB_CONFIGFS_EEM=y 358CONFIG_USB_CONFIGFS_EEM=y
359CONFIG_USB_CONFIGFS_PHONET=y
337CONFIG_USB_CONFIGFS_MASS_STORAGE=y 360CONFIG_USB_CONFIGFS_MASS_STORAGE=y
338CONFIG_USB_CONFIGFS_F_LB_SS=y 361CONFIG_USB_CONFIGFS_F_LB_SS=y
339CONFIG_USB_CONFIGFS_F_FS=y 362CONFIG_USB_CONFIGFS_F_FS=y
@@ -342,6 +365,7 @@ CONFIG_USB_CONFIGFS_F_UAC2=y
342CONFIG_USB_CONFIGFS_F_MIDI=y 365CONFIG_USB_CONFIGFS_F_MIDI=y
343CONFIG_USB_CONFIGFS_F_HID=y 366CONFIG_USB_CONFIGFS_F_HID=y
344CONFIG_USB_ZERO=m 367CONFIG_USB_ZERO=m
368CONFIG_USB_G_NOKIA=m
345CONFIG_MMC=y 369CONFIG_MMC=y
346CONFIG_SDIO_UART=y 370CONFIG_SDIO_UART=y
347CONFIG_MMC_OMAP=y 371CONFIG_MMC_OMAP=y
@@ -349,6 +373,7 @@ CONFIG_MMC_OMAP_HS=y
349CONFIG_NEW_LEDS=y 373CONFIG_NEW_LEDS=y
350CONFIG_LEDS_CLASS=m 374CONFIG_LEDS_CLASS=m
351CONFIG_LEDS_GPIO=m 375CONFIG_LEDS_GPIO=m
376CONFIG_LEDS_PWM=m
352CONFIG_LEDS_TRIGGERS=y 377CONFIG_LEDS_TRIGGERS=y
353CONFIG_LEDS_TRIGGER_TIMER=m 378CONFIG_LEDS_TRIGGER_TIMER=m
354CONFIG_LEDS_TRIGGER_ONESHOT=m 379CONFIG_LEDS_TRIGGER_ONESHOT=m
@@ -368,6 +393,7 @@ CONFIG_TI_EDMA=y
368CONFIG_DMA_OMAP=y 393CONFIG_DMA_OMAP=y
369# CONFIG_IOMMU_SUPPORT is not set 394# CONFIG_IOMMU_SUPPORT is not set
370CONFIG_EXTCON=m 395CONFIG_EXTCON=m
396CONFIG_EXTCON_GPIO=m
371CONFIG_EXTCON_PALMAS=m 397CONFIG_EXTCON_PALMAS=m
372CONFIG_TI_EMIF=m 398CONFIG_TI_EMIF=m
373CONFIG_PWM=y 399CONFIG_PWM=y
@@ -390,6 +416,7 @@ CONFIG_MSDOS_FS=y
390CONFIG_VFAT_FS=y 416CONFIG_VFAT_FS=y
391CONFIG_TMPFS=y 417CONFIG_TMPFS=y
392CONFIG_TMPFS_POSIX_ACL=y 418CONFIG_TMPFS_POSIX_ACL=y
419CONFIG_CONFIGFS_FS=y
393CONFIG_JFFS2_FS=y 420CONFIG_JFFS2_FS=y
394CONFIG_JFFS2_SUMMARY=y 421CONFIG_JFFS2_SUMMARY=y
395CONFIG_JFFS2_FS_XATTR=y 422CONFIG_JFFS2_FS_XATTR=y
diff --git a/arch/arm/configs/qcom_defconfig b/arch/arm/configs/qcom_defconfig
index 8c7da3319d82..d2f2babfd47a 100644
--- a/arch/arm/configs/qcom_defconfig
+++ b/arch/arm/configs/qcom_defconfig
@@ -97,9 +97,9 @@ CONFIG_PINCTRL_APQ8084=y
97CONFIG_PINCTRL_IPQ8064=y 97CONFIG_PINCTRL_IPQ8064=y
98CONFIG_PINCTRL_MSM8960=y 98CONFIG_PINCTRL_MSM8960=y
99CONFIG_PINCTRL_MSM8X74=y 99CONFIG_PINCTRL_MSM8X74=y
100CONFIG_GPIOLIB=y
100CONFIG_DEBUG_GPIO=y 101CONFIG_DEBUG_GPIO=y
101CONFIG_GPIO_SYSFS=y 102CONFIG_GPIO_SYSFS=y
102CONFIG_POWER_SUPPLY=y
103CONFIG_POWER_RESET=y 103CONFIG_POWER_RESET=y
104CONFIG_POWER_RESET_MSM=y 104CONFIG_POWER_RESET_MSM=y
105CONFIG_THERMAL=y 105CONFIG_THERMAL=y
@@ -125,7 +125,7 @@ CONFIG_USB_GADGET=y
125CONFIG_USB_GADGET_DEBUG_FILES=y 125CONFIG_USB_GADGET_DEBUG_FILES=y
126CONFIG_USB_GADGET_VBUS_DRAW=500 126CONFIG_USB_GADGET_VBUS_DRAW=500
127CONFIG_MMC=y 127CONFIG_MMC=y
128CONFIG_MMC_BLOCK_MINORS=16 128CONFIG_MMC_BLOCK_MINORS=32
129CONFIG_MMC_ARMMMCI=y 129CONFIG_MMC_ARMMMCI=y
130CONFIG_MMC_SDHCI=y 130CONFIG_MMC_SDHCI=y
131CONFIG_MMC_SDHCI_PLTFM=y 131CONFIG_MMC_SDHCI_PLTFM=y
@@ -134,14 +134,15 @@ CONFIG_RTC_CLASS=y
134CONFIG_DMADEVICES=y 134CONFIG_DMADEVICES=y
135CONFIG_QCOM_BAM_DMA=y 135CONFIG_QCOM_BAM_DMA=y
136CONFIG_STAGING=y 136CONFIG_STAGING=y
137CONFIG_QCOM_GSBI=y
138CONFIG_COMMON_CLK_QCOM=y 137CONFIG_COMMON_CLK_QCOM=y
139CONFIG_APQ_MMCC_8084=y 138CONFIG_APQ_MMCC_8084=y
140CONFIG_IPQ_GCC_806X=y 139CONFIG_IPQ_LCC_806X=y
141CONFIG_MSM_GCC_8660=y 140CONFIG_MSM_GCC_8660=y
141CONFIG_MSM_LCC_8960=y
142CONFIG_MSM_MMCC_8960=y 142CONFIG_MSM_MMCC_8960=y
143CONFIG_MSM_MMCC_8974=y 143CONFIG_MSM_MMCC_8974=y
144CONFIG_MSM_IOMMU=y 144CONFIG_MSM_IOMMU=y
145CONFIG_QCOM_GSBI=y
145CONFIG_PHY_QCOM_APQ8064_SATA=y 146CONFIG_PHY_QCOM_APQ8064_SATA=y
146CONFIG_PHY_QCOM_IPQ806X_SATA=y 147CONFIG_PHY_QCOM_IPQ806X_SATA=y
147CONFIG_EXT2_FS=y 148CONFIG_EXT2_FS=y
diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index b17036088726..b58618e2d13c 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -12,7 +12,9 @@ CONFIG_SLAB=y
12CONFIG_ARCH_SHMOBILE_MULTI=y 12CONFIG_ARCH_SHMOBILE_MULTI=y
13CONFIG_ARCH_EMEV2=y 13CONFIG_ARCH_EMEV2=y
14CONFIG_ARCH_R7S72100=y 14CONFIG_ARCH_R7S72100=y
15CONFIG_ARCH_R8A73A4=y
15CONFIG_ARCH_R8A7740=y 16CONFIG_ARCH_R8A7740=y
17CONFIG_ARCH_R8A7778=y
16CONFIG_ARCH_R8A7779=y 18CONFIG_ARCH_R8A7779=y
17CONFIG_ARCH_R8A7790=y 19CONFIG_ARCH_R8A7790=y
18CONFIG_ARCH_R8A7791=y 20CONFIG_ARCH_R8A7791=y
@@ -92,7 +94,6 @@ CONFIG_INPUT_ADXL34X=y
92# CONFIG_LEGACY_PTYS is not set 94# CONFIG_LEGACY_PTYS is not set
93CONFIG_SERIAL_8250=y 95CONFIG_SERIAL_8250=y
94CONFIG_SERIAL_8250_CONSOLE=y 96CONFIG_SERIAL_8250_CONSOLE=y
95CONFIG_SERIAL_8250_EXTENDED=y
96CONFIG_SERIAL_8250_EM=y 97CONFIG_SERIAL_8250_EM=y
97CONFIG_SERIAL_SH_SCI=y 98CONFIG_SERIAL_SH_SCI=y
98CONFIG_SERIAL_SH_SCI_NR_UARTS=20 99CONFIG_SERIAL_SH_SCI_NR_UARTS=20
@@ -109,6 +110,9 @@ CONFIG_SPI_SH_HSPI=y
109CONFIG_GPIO_EM=y 110CONFIG_GPIO_EM=y
110CONFIG_GPIO_RCAR=y 111CONFIG_GPIO_RCAR=y
111CONFIG_GPIO_PCF857X=y 112CONFIG_GPIO_PCF857X=y
113CONFIG_POWER_SUPPLY=y
114CONFIG_POWER_RESET=y
115CONFIG_POWER_RESET_RMOBILE=y
112# CONFIG_HWMON is not set 116# CONFIG_HWMON is not set
113CONFIG_THERMAL=y 117CONFIG_THERMAL=y
114CONFIG_CPU_THERMAL=y 118CONFIG_CPU_THERMAL=y
@@ -121,6 +125,7 @@ CONFIG_REGULATOR=y
121CONFIG_REGULATOR_AS3711=y 125CONFIG_REGULATOR_AS3711=y
122CONFIG_REGULATOR_DA9210=y 126CONFIG_REGULATOR_DA9210=y
123CONFIG_REGULATOR_GPIO=y 127CONFIG_REGULATOR_GPIO=y
128CONFIG_REGULATOR_MAX8973=y
124CONFIG_MEDIA_SUPPORT=y 129CONFIG_MEDIA_SUPPORT=y
125CONFIG_MEDIA_CAMERA_SUPPORT=y 130CONFIG_MEDIA_CAMERA_SUPPORT=y
126CONFIG_MEDIA_CONTROLLER=y 131CONFIG_MEDIA_CONTROLLER=y
@@ -133,6 +138,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
133CONFIG_VIDEO_RENESAS_VSP1=y 138CONFIG_VIDEO_RENESAS_VSP1=y
134# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set 139# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
135CONFIG_VIDEO_ADV7180=y 140CONFIG_VIDEO_ADV7180=y
141CONFIG_VIDEO_ML86V7667=y
136CONFIG_DRM=y 142CONFIG_DRM=y
137CONFIG_DRM_RCAR_DU=y 143CONFIG_DRM_RCAR_DU=y
138CONFIG_FB_SH_MOBILE_LCDC=y 144CONFIG_FB_SH_MOBILE_LCDC=y
@@ -167,6 +173,7 @@ CONFIG_LEDS_GPIO=y
167CONFIG_RTC_CLASS=y 173CONFIG_RTC_CLASS=y
168CONFIG_RTC_DRV_RS5C372=y 174CONFIG_RTC_DRV_RS5C372=y
169CONFIG_RTC_DRV_S35390A=y 175CONFIG_RTC_DRV_S35390A=y
176CONFIG_RTC_DRV_RX8581=y
170CONFIG_DMADEVICES=y 177CONFIG_DMADEVICES=y
171CONFIG_SH_DMAE=y 178CONFIG_SH_DMAE=y
172CONFIG_RCAR_DMAC=y 179CONFIG_RCAR_DMAC=y
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig
index 8f6a5702b696..8ecba00dcd83 100644
--- a/arch/arm/configs/sunxi_defconfig
+++ b/arch/arm/configs/sunxi_defconfig
@@ -107,6 +107,7 @@ CONFIG_RTC_DRV_SUN6I=y
107CONFIG_RTC_DRV_SUNXI=y 107CONFIG_RTC_DRV_SUNXI=y
108# CONFIG_IOMMU_SUPPORT is not set 108# CONFIG_IOMMU_SUPPORT is not set
109CONFIG_PHY_SUN4I_USB=y 109CONFIG_PHY_SUN4I_USB=y
110CONFIG_PHY_SUN9I_USB=y
110CONFIG_EXT4_FS=y 111CONFIG_EXT4_FS=y
111CONFIG_VFAT_FS=y 112CONFIG_VFAT_FS=y
112CONFIG_TMPFS=y 113CONFIG_TMPFS=y
diff --git a/arch/arm/include/asm/arm-cci.h b/arch/arm/include/asm/arm-cci.h
new file mode 100644
index 000000000000..fe77f7ab7e6b
--- /dev/null
+++ b/arch/arm/include/asm/arm-cci.h
@@ -0,0 +1,42 @@
1/*
2 * arch/arm/include/asm/arm-cci.h
3 *
4 * Copyright (C) 2015 ARM Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __ASM_ARM_CCI_H
20#define __ASM_ARM_CCI_H
21
22#ifdef CONFIG_MCPM
23#include <asm/mcpm.h>
24
25/*
26 * We don't have a reliable way of detecting whether,
27 * if we have access to secure-only registers, unless
28 * mcpm is registered.
29 */
30static inline bool platform_has_secure_cci_access(void)
31{
32 return mcpm_is_available();
33}
34
35#else
36static inline bool platform_has_secure_cci_access(void)
37{
38 return false;
39}
40#endif
41
42#endif
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index 3446f6a1d9fa..50b378f59e08 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -171,12 +171,73 @@ void mcpm_cpu_suspend(u64 expected_residency);
171int mcpm_cpu_powered_up(void); 171int mcpm_cpu_powered_up(void);
172 172
173/* 173/*
174 * Platform specific methods used in the implementation of the above API. 174 * Platform specific callbacks used in the implementation of the above API.
175 *
176 * cpu_powerup:
177 * Make given CPU runable. Called with MCPM lock held and IRQs disabled.
178 * The given cluster is assumed to be set up (cluster_powerup would have
179 * been called beforehand). Must return 0 for success or negative error code.
180 *
181 * cluster_powerup:
182 * Set up power for given cluster. Called with MCPM lock held and IRQs
183 * disabled. Called before first cpu_powerup when cluster is down. Must
184 * return 0 for success or negative error code.
185 *
186 * cpu_suspend_prepare:
187 * Special suspend configuration. Called on target CPU with MCPM lock held
188 * and IRQs disabled. This callback is optional. If provided, it is called
189 * before cpu_powerdown_prepare.
190 *
191 * cpu_powerdown_prepare:
192 * Configure given CPU for power down. Called on target CPU with MCPM lock
193 * held and IRQs disabled. Power down must be effective only at the next WFI instruction.
194 *
195 * cluster_powerdown_prepare:
196 * Configure given cluster for power down. Called on one CPU from target
197 * cluster with MCPM lock held and IRQs disabled. A cpu_powerdown_prepare
198 * for each CPU in the cluster has happened when this occurs.
199 *
200 * cpu_cache_disable:
201 * Clean and disable CPU level cache for the calling CPU. Called on with IRQs
202 * disabled only. The CPU is no longer cache coherent with the rest of the
203 * system when this returns.
204 *
205 * cluster_cache_disable:
206 * Clean and disable the cluster wide cache as well as the CPU level cache
207 * for the calling CPU. No call to cpu_cache_disable will happen for this
208 * CPU. Called with IRQs disabled and only when all the other CPUs are done
209 * with their own cpu_cache_disable. The cluster is no longer cache coherent
210 * with the rest of the system when this returns.
211 *
212 * cpu_is_up:
213 * Called on given CPU after it has been powered up or resumed. The MCPM lock
214 * is held and IRQs disabled. This callback is optional.
215 *
216 * cluster_is_up:
217 * Called by the first CPU to be powered up or resumed in given cluster.
218 * The MCPM lock is held and IRQs disabled. This callback is optional. If
219 * provided, it is called before cpu_is_up for that CPU.
220 *
221 * wait_for_powerdown:
222 * Wait until given CPU is powered down. This is called in sleeping context.
223 * Some reasonable timeout must be considered. Must return 0 for success or
224 * negative error code.
175 */ 225 */
176struct mcpm_platform_ops { 226struct mcpm_platform_ops {
227 int (*cpu_powerup)(unsigned int cpu, unsigned int cluster);
228 int (*cluster_powerup)(unsigned int cluster);
229 void (*cpu_suspend_prepare)(unsigned int cpu, unsigned int cluster);
230 void (*cpu_powerdown_prepare)(unsigned int cpu, unsigned int cluster);
231 void (*cluster_powerdown_prepare)(unsigned int cluster);
232 void (*cpu_cache_disable)(void);
233 void (*cluster_cache_disable)(void);
234 void (*cpu_is_up)(unsigned int cpu, unsigned int cluster);
235 void (*cluster_is_up)(unsigned int cluster);
236 int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
237
238 /* deprecated callbacks */
177 int (*power_up)(unsigned int cpu, unsigned int cluster); 239 int (*power_up)(unsigned int cpu, unsigned int cluster);
178 void (*power_down)(void); 240 void (*power_down)(void);
179 int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
180 void (*suspend)(u64); 241 void (*suspend)(u64);
181 void (*powered_up)(void); 242 void (*powered_up)(void);
182}; 243};
diff --git a/arch/arm/include/debug/msm.S b/arch/arm/include/debug/msm.S
index e55a9426b496..b03024fa671f 100644
--- a/arch/arm/include/debug/msm.S
+++ b/arch/arm/include/debug/msm.S
@@ -16,24 +16,17 @@
16 */ 16 */
17 17
18 .macro addruart, rp, rv, tmp 18 .macro addruart, rp, rv, tmp
19#ifdef CONFIG_DEBUG_UART_PHYS
20 ldr \rp, =CONFIG_DEBUG_UART_PHYS 19 ldr \rp, =CONFIG_DEBUG_UART_PHYS
21 ldr \rv, =CONFIG_DEBUG_UART_VIRT 20 ldr \rv, =CONFIG_DEBUG_UART_VIRT
22#endif
23 .endm 21 .endm
24 22
25 .macro senduart, rd, rx 23 .macro senduart, rd, rx
26ARM_BE8(rev \rd, \rd ) 24ARM_BE8(rev \rd, \rd )
27#ifdef CONFIG_DEBUG_QCOM_UARTDM
28 @ Write the 1 character to UARTDM_TF 25 @ Write the 1 character to UARTDM_TF
29 str \rd, [\rx, #0x70] 26 str \rd, [\rx, #0x70]
30#else
31 str \rd, [\rx, #0x0C]
32#endif
33 .endm 27 .endm
34 28
35 .macro waituart, rd, rx 29 .macro waituart, rd, rx
36#ifdef CONFIG_DEBUG_QCOM_UARTDM
37 @ check for TX_EMT in UARTDM_SR 30 @ check for TX_EMT in UARTDM_SR
38 ldr \rd, [\rx, #0x08] 31 ldr \rd, [\rx, #0x08]
39ARM_BE8(rev \rd, \rd ) 32ARM_BE8(rev \rd, \rd )
@@ -55,13 +48,6 @@ ARM_BE8(rev \rd, \rd )
55 str \rd, [\rx, #0x40] 48 str \rd, [\rx, #0x40]
56 @ UARTDM reg. Read to induce delay 49 @ UARTDM reg. Read to induce delay
57 ldr \rd, [\rx, #0x08] 50 ldr \rd, [\rx, #0x08]
58#else
59 @ wait for TX_READY
601001: ldr \rd, [\rx, #0x08]
61ARM_BE8(rev \rd, \rd )
62 tst \rd, #0x04
63 beq 1001b
64#endif
65 .endm 51 .endm
66 52
67 .macro busyuart, rd, rx 53 .macro busyuart, rd, rx
diff --git a/arch/arm/mach-alpine/Kconfig b/arch/arm/mach-alpine/Kconfig
new file mode 100644
index 000000000000..2c44b930505a
--- /dev/null
+++ b/arch/arm/mach-alpine/Kconfig
@@ -0,0 +1,12 @@
1config ARCH_ALPINE
2 bool "Annapurna Labs Alpine platform" if ARCH_MULTI_V7
3 select ARM_AMBA
4 select ARM_GIC
5 select GENERIC_IRQ_CHIP
6 select HAVE_ARM_ARCH_TIMER
7 select HAVE_SMP
8 select MFD_SYSCON
9 select PCI
10 select PCI_HOST_GENERIC
11 help
12 This enables support for the Annapurna Labs Alpine V1 boards.
diff --git a/arch/arm/mach-alpine/Makefile b/arch/arm/mach-alpine/Makefile
new file mode 100644
index 000000000000..b6674890be71
--- /dev/null
+++ b/arch/arm/mach-alpine/Makefile
@@ -0,0 +1,2 @@
1obj-y += alpine_machine.o
2obj-$(CONFIG_SMP) += platsmp.o alpine_cpu_pm.o
diff --git a/arch/arm/mach-alpine/alpine_cpu_pm.c b/arch/arm/mach-alpine/alpine_cpu_pm.c
new file mode 100644
index 000000000000..121c77c4b53c
--- /dev/null
+++ b/arch/arm/mach-alpine/alpine_cpu_pm.c
@@ -0,0 +1,70 @@
1/*
2 * Low-level power-management support for Alpine platform.
3 *
4 * Copyright (C) 2015 Annapurna Labs Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/io.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
20#include <linux/regmap.h>
21#include <linux/mfd/syscon.h>
22
23#include "alpine_cpu_pm.h"
24#include "alpine_cpu_resume.h"
25
26/* NB registers */
27#define AL_SYSFAB_POWER_CONTROL(cpu) (0x2000 + (cpu)*0x100 + 0x20)
28
29static struct regmap *al_sysfabric;
30static struct al_cpu_resume_regs __iomem *al_cpu_resume_regs;
31static int wakeup_supported;
32
33int alpine_cpu_wakeup(unsigned int phys_cpu, uint32_t phys_resume_addr)
34{
35 if (!wakeup_supported)
36 return -ENOSYS;
37
38 /*
39 * Set CPU resume address -
40 * secure firmware running on boot will jump to this address
41 * after setting proper CPU mode, and initialiing e.g. secure
42 * regs (the same mode all CPUs are booted to - usually HYP)
43 */
44 writel(phys_resume_addr,
45 &al_cpu_resume_regs->per_cpu[phys_cpu].resume_addr);
46
47 /* Power-up the CPU */
48 regmap_write(al_sysfabric, AL_SYSFAB_POWER_CONTROL(phys_cpu), 0);
49
50 return 0;
51}
52
53void __init alpine_cpu_pm_init(void)
54{
55 struct device_node *np;
56 uint32_t watermark;
57
58 al_sysfabric = syscon_regmap_lookup_by_compatible("al,alpine-sysfabric-service");
59
60 np = of_find_compatible_node(NULL, NULL, "al,alpine-cpu-resume");
61 al_cpu_resume_regs = of_iomap(np, 0);
62
63 wakeup_supported = !IS_ERR(al_sysfabric) && al_cpu_resume_regs;
64
65 if (wakeup_supported) {
66 watermark = readl(&al_cpu_resume_regs->watermark);
67 wakeup_supported = (watermark & AL_CPU_RESUME_MAGIC_NUM_MASK)
68 == AL_CPU_RESUME_MAGIC_NUM;
69 }
70}
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-alpine/alpine_cpu_pm.h
index 2d9ca0455745..5179e697c492 100644
--- a/arch/arm/mach-at91/include/mach/io.h
+++ b/arch/arm/mach-alpine/alpine_cpu_pm.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-at91/include/mach/io.h 2 * Low-level power-management support for Alpine platform.
3 * 3 *
4 * Copyright (C) 2003 SAN People 4 * Copyright (C) 2015 Annapurna Labs Ltd.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -12,16 +12,15 @@
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 15 */
20 16
21#ifndef __ASM_ARCH_IO_H 17#ifndef __ALPINE_CPU_PM_H__
22#define __ASM_ARCH_IO_H 18#define __ALPINE_CPU_PM_H__
19
20/* Alpine CPU Power Management Services Initialization */
21void alpine_cpu_pm_init(void);
23 22
24#define IO_SPACE_LIMIT 0xFFFFFFFF 23/* Wake-up a CPU */
25#define __io(a) __typesafe_io(a) 24int alpine_cpu_wakeup(unsigned int phys_cpu, uint32_t phys_resume_addr);
26 25
27#endif 26#endif /* __ALPINE_CPU_PM_H__ */
diff --git a/arch/arm/mach-alpine/alpine_cpu_resume.h b/arch/arm/mach-alpine/alpine_cpu_resume.h
new file mode 100644
index 000000000000..c80150c0d2d8
--- /dev/null
+++ b/arch/arm/mach-alpine/alpine_cpu_resume.h
@@ -0,0 +1,38 @@
1/*
2 * Annapurna labs cpu-resume register structure.
3 *
4 * Copyright (C) 2015 Annapurna Labs Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef ALPINE_CPU_RESUME_H_
18#define ALPINE_CPU_RESUME_H_
19
20/* Per-cpu regs */
21struct al_cpu_resume_regs_per_cpu {
22 uint32_t flags;
23 uint32_t resume_addr;
24};
25
26/* general regs */
27struct al_cpu_resume_regs {
28 /* Watermark for validating the CPU resume struct */
29 uint32_t watermark;
30 uint32_t flags;
31 struct al_cpu_resume_regs_per_cpu per_cpu[];
32};
33
34/* The expected magic number for validating the resume addresses */
35#define AL_CPU_RESUME_MAGIC_NUM 0xf0e1d200
36#define AL_CPU_RESUME_MAGIC_NUM_MASK 0xffffff00
37
38#endif /* ALPINE_CPU_RESUME_H_ */
diff --git a/arch/arm/mach-alpine/alpine_machine.c b/arch/arm/mach-alpine/alpine_machine.c
new file mode 100644
index 000000000000..b8e2145e962b
--- /dev/null
+++ b/arch/arm/mach-alpine/alpine_machine.c
@@ -0,0 +1,28 @@
1/*
2 * Machine declaration for Alpine platforms.
3 *
4 * Copyright (C) 2015 Annapurna Labs Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/of_platform.h>
18
19#include <asm/mach/arch.h>
20
21static const char * const al_match[] __initconst = {
22 "al,alpine",
23 NULL,
24};
25
26DT_MACHINE_START(AL_DT, "Annapurna Labs Alpine")
27 .dt_compat = al_match,
28MACHINE_END
diff --git a/arch/arm/mach-alpine/platsmp.c b/arch/arm/mach-alpine/platsmp.c
new file mode 100644
index 000000000000..f78429f48bd6
--- /dev/null
+++ b/arch/arm/mach-alpine/platsmp.c
@@ -0,0 +1,49 @@
1/*
2 * SMP operations for Alpine platform.
3 *
4 * Copyright (C) 2015 Annapurna Labs Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/init.h>
18#include <linux/errno.h>
19#include <linux/io.h>
20#include <linux/of.h>
21
22#include <asm/smp_plat.h>
23
24#include "alpine_cpu_pm.h"
25
26static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle)
27{
28 phys_addr_t addr;
29
30 addr = virt_to_phys(secondary_startup);
31
32 if (addr > (phys_addr_t)(uint32_t)(-1)) {
33 pr_err("FAIL: resume address over 32bit (%pa)", &addr);
34 return -EINVAL;
35 }
36
37 return alpine_cpu_wakeup(cpu_logical_map(cpu), (uint32_t)addr);
38}
39
40static void __init alpine_smp_prepare_cpus(unsigned int max_cpus)
41{
42 alpine_cpu_pm_init();
43}
44
45static struct smp_operations alpine_smp_ops __initdata = {
46 .smp_prepare_cpus = alpine_smp_prepare_cpus,
47 .smp_boot_secondary = alpine_boot_secondary,
48};
49CPU_METHOD_OF_DECLARE(alpine_smp, "al,alpine-smp", &alpine_smp_ops);
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index c74a44324e5b..fd95f34945f4 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -1,55 +1,15 @@
1if ARCH_AT91 1menuconfig ARCH_AT91
2 2 bool "Atmel SoCs"
3config HAVE_AT91_UTMI 3 depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7
4 bool 4 select ARCH_REQUIRE_GPIOLIB
5
6config HAVE_AT91_USB_CLK
7 bool
8
9config COMMON_CLK_AT91
10 bool
11 select COMMON_CLK
12
13config HAVE_AT91_SMD
14 bool
15
16config HAVE_AT91_H32MX
17 bool
18
19config SOC_SAMA5
20 bool
21 select ATMEL_AIC5_IRQ
22 select COMMON_CLK_AT91 5 select COMMON_CLK_AT91
23 select CPU_V7 6 select PINCTRL
24 select GENERIC_CLOCKEVENTS 7 select PINCTRL_AT91
25 select MEMORY 8 select SOC_BUS
26 select ATMEL_SDRAMC
27 select PHYLIB if NETDEVICES
28
29menu "Atmel AT91 System-on-Chip"
30
31choice
32
33 prompt "Core type"
34
35config SOC_SAM_V4_V5
36 bool "ARM9 AT91SAM9/AT91RM9200"
37 help
38 Select this if you are using one of Atmel's AT91SAM9 or
39 AT91RM9200 SoC.
40
41config SOC_SAM_V7
42 bool "Cortex A5"
43 help
44 Select this if you are using one of Atmel's SAMA5D3 SoC.
45
46endchoice
47 9
48comment "Atmel AT91 Processor" 10if ARCH_AT91
49
50if SOC_SAM_V7
51config SOC_SAMA5D3 11config SOC_SAMA5D3
52 bool "SAMA5D3 family" 12 bool "SAMA5D3 family" if ARCH_MULTI_V7
53 select SOC_SAMA5 13 select SOC_SAMA5
54 select HAVE_FB_ATMEL 14 select HAVE_FB_ATMEL
55 select HAVE_AT91_UTMI 15 select HAVE_AT91_UTMI
@@ -60,9 +20,8 @@ config SOC_SAMA5D3
60 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. 20 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
61 21
62config SOC_SAMA5D4 22config SOC_SAMA5D4
63 bool "SAMA5D4 family" 23 bool "SAMA5D4 family" if ARCH_MULTI_V7
64 select SOC_SAMA5 24 select SOC_SAMA5
65 select CLKSRC_MMIO
66 select CACHE_L2X0 25 select CACHE_L2X0
67 select HAVE_FB_ATMEL 26 select HAVE_FB_ATMEL
68 select HAVE_AT91_UTMI 27 select HAVE_AT91_UTMI
@@ -71,29 +30,31 @@ config SOC_SAMA5D4
71 select HAVE_AT91_H32MX 30 select HAVE_AT91_H32MX
72 help 31 help
73 Select this if you are using one of Atmel's SAMA5D4 family SoC. 32 Select this if you are using one of Atmel's SAMA5D4 family SoC.
74endif
75 33
76if SOC_SAM_V4_V5
77config SOC_AT91RM9200 34config SOC_AT91RM9200
78 bool "AT91RM9200" 35 bool "AT91RM9200" if ARCH_MULTI_V4T
79 select ATMEL_AIC_IRQ 36 select ATMEL_AIC_IRQ
80 select COMMON_CLK_AT91 37 select ATMEL_ST
81 select CPU_ARM920T 38 select CPU_ARM920T
82 select GENERIC_CLOCKEVENTS
83 select HAVE_AT91_USB_CLK 39 select HAVE_AT91_USB_CLK
40 select MIGHT_HAVE_PCI
41 select SOC_SAM_V4_V5
42 select SRAM if PM
43 help
44 Select this if you are using Atmel's AT91RM9200 SoC.
84 45
85config SOC_AT91SAM9 46config SOC_AT91SAM9
86 bool "AT91SAM9" 47 bool "AT91SAM9" if ARCH_MULTI_V5
87 select ATMEL_AIC_IRQ 48 select ATMEL_AIC_IRQ
88 select ATMEL_SDRAMC 49 select ATMEL_SDRAMC
89 select COMMON_CLK_AT91
90 select CPU_ARM926T 50 select CPU_ARM926T
91 select GENERIC_CLOCKEVENTS
92 select HAVE_AT91_SMD 51 select HAVE_AT91_SMD
93 select HAVE_AT91_USB_CLK 52 select HAVE_AT91_USB_CLK
94 select HAVE_AT91_UTMI 53 select HAVE_AT91_UTMI
95 select HAVE_FB_ATMEL 54 select HAVE_FB_ATMEL
96 select MEMORY 55 select MEMORY
56 select SOC_SAM_V4_V5
57 select SRAM if PM
97 help 58 help
98 Select this if you are using one of those Atmel SoC: 59 Select this if you are using one of those Atmel SoC:
99 AT91SAM9260 60 AT91SAM9260
@@ -112,40 +73,35 @@ config SOC_AT91SAM9
112 AT91SAM9X25 73 AT91SAM9X25
113 AT91SAM9X35 74 AT91SAM9X35
114 AT91SAM9XE 75 AT91SAM9XE
115endif # SOC_SAM_V4_V5
116 76
117comment "AT91 Feature Selections" 77config HAVE_AT91_UTMI
78 bool
118 79
119config AT91_SLOW_CLOCK 80config HAVE_AT91_USB_CLK
120 bool "Suspend-to-RAM disables main oscillator" 81 bool
121 select SRAM
122 depends on SUSPEND
123 help
124 Select this if you want Suspend-to-RAM to save the most power
125 possible (without powering off the CPU) by disabling the PLLs
126 and main oscillator so that only the 32 KiHz clock is available.
127 82
128 When only that slow-clock is available, some peripherals lose 83config COMMON_CLK_AT91
129 functionality. Many can't issue wakeup events unless faster 84 bool
130 clocks are available. Some lose their operating state and 85 select COMMON_CLK
131 need to be completely re-initialized.
132 86
133config AT91_TIMER_HZ 87config HAVE_AT91_SMD
134 int "Kernel HZ (jiffies per second)" 88 bool
135 range 32 1024 89
136 depends on ARCH_AT91 90config HAVE_AT91_H32MX
137 default "128" if SOC_AT91RM9200 91 bool
138 default "100"
139 help
140 On AT91rm9200 chips where you're using a system clock derived
141 from the 32768 Hz hardware clock, this tick rate should divide
142 it exactly: use a power-of-two value, such as 128 or 256, to
143 reduce timing errors caused by rounding.
144 92
145 On AT91sam926x chips, or otherwise when using a higher precision 93config SOC_SAM_V4_V5
146 system clock (of at least several MHz), rounding is less of a 94 bool
147 problem so it can be safer to use a decimal values like 100.
148 95
149endmenu 96config SOC_SAM_V7
97 bool
98
99config SOC_SAMA5
100 bool
101 select ATMEL_AIC5_IRQ
102 select ATMEL_SDRAMC
103 select MEMORY
104 select SOC_SAM_V7
105 select SRAM if PM
150 106
151endif 107endif
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 827fdbcce1c7..4fa8b4541e64 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -1,20 +1,25 @@
1# 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
5asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
4 6
5obj-y := setup.o 7obj-y := soc.o
6 8
7obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o 9obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o
8 10
9# CPU-specific support 11# CPU-specific support
10obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o 12obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o
11obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o 13obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
12obj-$(CONFIG_SOC_SAMA5) += sama5.o 14obj-$(CONFIG_SOC_SAMA5) += sama5.o
13 15
14# Power Management 16# Power Management
15obj-$(CONFIG_PM) += pm.o 17obj-$(CONFIG_PM) += pm.o
16obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o 18obj-$(CONFIG_PM) += pm_suspend.o
17 19
20ifeq ($(CONFIG_CPU_V7),y)
21AFLAGS_pm_suspend.o := -march=armv7-a
22endif
18ifeq ($(CONFIG_PM_DEBUG),y) 23ifeq ($(CONFIG_PM_DEBUG),y)
19CFLAGS_pm.o += -DDEBUG 24CFLAGS_pm.o += -DDEBUG
20endif 25endif
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 8fcfb70f7124..eaf58f88ef5d 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -8,60 +8,42 @@
8 * Licensed under GPLv2 or later. 8 * Licensed under GPLv2 or later.
9 */ 9 */
10 10
11#include <linux/types.h> 11#include <linux/clk-provider.h>
12#include <linux/init.h>
13#include <linux/module.h>
14#include <linux/gpio.h>
15#include <linux/of.h> 12#include <linux/of.h>
16#include <linux/of_irq.h>
17#include <linux/of_platform.h> 13#include <linux/of_platform.h>
18#include <linux/clk-provider.h>
19 14
20#include <asm/setup.h>
21#include <asm/irq.h>
22#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
23#include <asm/mach/map.h>
24#include <asm/mach/irq.h>
25#include <asm/system_misc.h> 16#include <asm/system_misc.h>
26 17
27#include <mach/at91_st.h>
28
29#include "generic.h" 18#include "generic.h"
19#include "soc.h"
30 20
31static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd) 21static const struct at91_soc rm9200_socs[] = {
32{ 22 AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
33 /* 23 { /* sentinel */ },
34 * Perform a hardware reset with the use of the Watchdog timer. 24};
35 */
36 at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
37 at91_st_write(AT91_ST_CR, AT91_ST_WDRST);
38}
39
40static void __init at91rm9200_dt_timer_init(void)
41{
42 of_clk_init(NULL);
43 at91rm9200_timer_init();
44}
45 25
46static void __init at91rm9200_dt_device_init(void) 26static void __init at91rm9200_dt_device_init(void)
47{ 27{
48 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 28 struct soc_device *soc;
29 struct device *soc_dev = NULL;
30
31 soc = at91_soc_init(rm9200_socs);
32 if (soc != NULL)
33 soc_dev = soc_device_to_device(soc);
34
35 of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
49 36
50 arm_pm_idle = at91rm9200_idle; 37 arm_pm_idle = at91rm9200_idle;
51 arm_pm_restart = at91rm9200_restart;
52 at91rm9200_pm_init(); 38 at91rm9200_pm_init();
53} 39}
54 40
55
56
57static const char *at91rm9200_dt_board_compat[] __initconst = { 41static const char *at91rm9200_dt_board_compat[] __initconst = {
58 "atmel,at91rm9200", 42 "atmel,at91rm9200",
59 NULL 43 NULL
60}; 44};
61 45
62DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200") 46DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
63 .init_time = at91rm9200_dt_timer_init,
64 .map_io = at91_map_io,
65 .init_machine = at91rm9200_dt_device_init, 47 .init_machine = at91rm9200_dt_device_init,
66 .dt_compat = at91rm9200_dt_board_compat, 48 .dt_compat = at91rm9200_dt_board_compat,
67MACHINE_END 49MACHINE_END
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
deleted file mode 100644
index b00d09555f2b..000000000000
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ /dev/null
@@ -1,251 +0,0 @@
1/*
2 * linux/arch/arm/mach-at91/at91rm9200_time.c
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <linux/kernel.h>
23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/clockchips.h>
26#include <linux/export.h>
27#include <linux/of.h>
28#include <linux/of_address.h>
29#include <linux/of_irq.h>
30
31#include <asm/mach/time.h>
32
33#include <mach/at91_st.h>
34#include <mach/hardware.h>
35
36static unsigned long last_crtr;
37static u32 irqmask;
38static struct clock_event_device clkevt;
39
40#define RM9200_TIMER_LATCH ((AT91_SLOW_CLOCK + HZ/2) / HZ)
41
42/*
43 * The ST_CRTR is updated asynchronously to the master clock ... but
44 * the updates as seen by the CPU don't seem to be strictly monotonic.
45 * Waiting until we read the same value twice avoids glitching.
46 */
47static inline unsigned long read_CRTR(void)
48{
49 unsigned long x1, x2;
50
51 x1 = at91_st_read(AT91_ST_CRTR);
52 do {
53 x2 = at91_st_read(AT91_ST_CRTR);
54 if (x1 == x2)
55 break;
56 x1 = x2;
57 } while (1);
58 return x1;
59}
60
61/*
62 * IRQ handler for the timer.
63 */
64static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
65{
66 u32 sr = at91_st_read(AT91_ST_SR) & irqmask;
67
68 /*
69 * irqs should be disabled here, but as the irq is shared they are only
70 * guaranteed to be off if the timer irq is registered first.
71 */
72 WARN_ON_ONCE(!irqs_disabled());
73
74 /* simulate "oneshot" timer with alarm */
75 if (sr & AT91_ST_ALMS) {
76 clkevt.event_handler(&clkevt);
77 return IRQ_HANDLED;
78 }
79
80 /* periodic mode should handle delayed ticks */
81 if (sr & AT91_ST_PITS) {
82 u32 crtr = read_CRTR();
83
84 while (((crtr - last_crtr) & AT91_ST_CRTV) >= RM9200_TIMER_LATCH) {
85 last_crtr += RM9200_TIMER_LATCH;
86 clkevt.event_handler(&clkevt);
87 }
88 return IRQ_HANDLED;
89 }
90
91 /* this irq is shared ... */
92 return IRQ_NONE;
93}
94
95static struct irqaction at91rm9200_timer_irq = {
96 .name = "at91_tick",
97 .flags = IRQF_SHARED | IRQF_TIMER | IRQF_IRQPOLL,
98 .handler = at91rm9200_timer_interrupt,
99 .irq = NR_IRQS_LEGACY + AT91_ID_SYS,
100};
101
102static cycle_t read_clk32k(struct clocksource *cs)
103{
104 return read_CRTR();
105}
106
107static struct clocksource clk32k = {
108 .name = "32k_counter",
109 .rating = 150,
110 .read = read_clk32k,
111 .mask = CLOCKSOURCE_MASK(20),
112 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
113};
114
115static void
116clkevt32k_mode(enum clock_event_mode mode, struct clock_event_device *dev)
117{
118 /* Disable and flush pending timer interrupts */
119 at91_st_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_ALMS);
120 at91_st_read(AT91_ST_SR);
121
122 last_crtr = read_CRTR();
123 switch (mode) {
124 case CLOCK_EVT_MODE_PERIODIC:
125 /* PIT for periodic irqs; fixed rate of 1/HZ */
126 irqmask = AT91_ST_PITS;
127 at91_st_write(AT91_ST_PIMR, RM9200_TIMER_LATCH);
128 break;
129 case CLOCK_EVT_MODE_ONESHOT:
130 /* ALM for oneshot irqs, set by next_event()
131 * before 32 seconds have passed
132 */
133 irqmask = AT91_ST_ALMS;
134 at91_st_write(AT91_ST_RTAR, last_crtr);
135 break;
136 case CLOCK_EVT_MODE_SHUTDOWN:
137 case CLOCK_EVT_MODE_UNUSED:
138 case CLOCK_EVT_MODE_RESUME:
139 irqmask = 0;
140 break;
141 }
142 at91_st_write(AT91_ST_IER, irqmask);
143}
144
145static int
146clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev)
147{
148 u32 alm;
149 int status = 0;
150
151 BUG_ON(delta < 2);
152
153 /* The alarm IRQ uses absolute time (now+delta), not the relative
154 * time (delta) in our calling convention. Like all clockevents
155 * using such "match" hardware, we have a race to defend against.
156 *
157 * Our defense here is to have set up the clockevent device so the
158 * delta is at least two. That way we never end up writing RTAR
159 * with the value then held in CRTR ... which would mean the match
160 * wouldn't trigger until 32 seconds later, after CRTR wraps.
161 */
162 alm = read_CRTR();
163
164 /* Cancel any pending alarm; flush any pending IRQ */
165 at91_st_write(AT91_ST_RTAR, alm);
166 at91_st_read(AT91_ST_SR);
167
168 /* Schedule alarm by writing RTAR. */
169 alm += delta;
170 at91_st_write(AT91_ST_RTAR, alm);
171
172 return status;
173}
174
175static struct clock_event_device clkevt = {
176 .name = "at91_tick",
177 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
178 .rating = 150,
179 .set_next_event = clkevt32k_next_event,
180 .set_mode = clkevt32k_mode,
181};
182
183void __iomem *at91_st_base;
184EXPORT_SYMBOL_GPL(at91_st_base);
185
186static const struct of_device_id at91rm9200_st_timer_ids[] = {
187 { .compatible = "atmel,at91rm9200-st" },
188 { /* sentinel */ }
189};
190
191static int __init of_at91rm9200_st_init(void)
192{
193 struct device_node *np;
194 int ret;
195
196 np = of_find_matching_node(NULL, at91rm9200_st_timer_ids);
197 if (!np)
198 goto err;
199
200 at91_st_base = of_iomap(np, 0);
201 if (!at91_st_base)
202 goto node_err;
203
204 /* Get the interrupts property */
205 ret = irq_of_parse_and_map(np, 0);
206 if (!ret)
207 goto ioremap_err;
208 at91rm9200_timer_irq.irq = ret;
209
210 of_node_put(np);
211
212 return 0;
213
214ioremap_err:
215 iounmap(at91_st_base);
216node_err:
217 of_node_put(np);
218err:
219 return -EINVAL;
220}
221
222/*
223 * ST (system timer) module supports both clockevents and clocksource.
224 */
225void __init at91rm9200_timer_init(void)
226{
227 /* For device tree enabled device: initialize here */
228 of_at91rm9200_st_init();
229
230 /* Disable all timer interrupts, and clear any pending ones */
231 at91_st_write(AT91_ST_IDR,
232 AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
233 at91_st_read(AT91_ST_SR);
234
235 /* Make IRQs happen for the system timer */
236 setup_irq(at91rm9200_timer_irq.irq, &at91rm9200_timer_irq);
237
238 /* The 32KiHz "Slow Clock" (tick every 30517.58 nanoseconds) is used
239 * directly for the clocksource and all clockevents, after adjusting
240 * its prescaler from the 1 Hz default.
241 */
242 at91_st_write(AT91_ST_RTMR, 1);
243
244 /* Setup timer clockevent, with minimum of two ticks (important!!) */
245 clkevt.cpumask = cpumask_of(0);
246 clockevents_config_and_register(&clkevt, AT91_SLOW_CLOCK,
247 2, AT91_ST_ALMV);
248
249 /* register clocksource */
250 clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);
251}
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 56e3ba73ec40..e47a2093a0e7 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -7,29 +7,68 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9 9
10#include <linux/types.h>
11#include <linux/init.h>
12#include <linux/module.h>
13#include <linux/gpio.h>
14#include <linux/of.h> 10#include <linux/of.h>
15#include <linux/of_irq.h>
16#include <linux/of_platform.h> 11#include <linux/of_platform.h>
17#include <linux/clk-provider.h>
18 12
19#include <asm/system_misc.h>
20#include <asm/setup.h>
21#include <asm/irq.h>
22#include <asm/mach/arch.h> 13#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 14#include <asm/system_misc.h>
24#include <asm/mach/irq.h>
25 15
26#include "generic.h" 16#include "generic.h"
17#include "soc.h"
27 18
28static void __init at91sam9_dt_device_init(void) 19static const struct at91_soc at91sam9_socs[] = {
20 AT91_SOC(AT91SAM9260_CIDR_MATCH, 0, "at91sam9260", NULL),
21 AT91_SOC(AT91SAM9261_CIDR_MATCH, 0, "at91sam9261", NULL),
22 AT91_SOC(AT91SAM9263_CIDR_MATCH, 0, "at91sam9263", NULL),
23 AT91_SOC(AT91SAM9G20_CIDR_MATCH, 0, "at91sam9g20", NULL),
24 AT91_SOC(AT91SAM9RL64_CIDR_MATCH, 0, "at91sam9rl64", NULL),
25 AT91_SOC(AT91SAM9G45_CIDR_MATCH, AT91SAM9M11_EXID_MATCH,
26 "at91sam9m11", "at91sam9g45"),
27 AT91_SOC(AT91SAM9G45_CIDR_MATCH, AT91SAM9M10_EXID_MATCH,
28 "at91sam9m10", "at91sam9g45"),
29 AT91_SOC(AT91SAM9G45_CIDR_MATCH, AT91SAM9G46_EXID_MATCH,
30 "at91sam9g46", "at91sam9g45"),
31 AT91_SOC(AT91SAM9G45_CIDR_MATCH, AT91SAM9G45_EXID_MATCH,
32 "at91sam9g45", "at91sam9g45"),
33 AT91_SOC(AT91SAM9X5_CIDR_MATCH, AT91SAM9G15_EXID_MATCH,
34 "at91sam9g15", "at91sam9x5"),
35 AT91_SOC(AT91SAM9X5_CIDR_MATCH, AT91SAM9G35_EXID_MATCH,
36 "at91sam9g35", "at91sam9x5"),
37 AT91_SOC(AT91SAM9X5_CIDR_MATCH, AT91SAM9X35_EXID_MATCH,
38 "at91sam9x35", "at91sam9x5"),
39 AT91_SOC(AT91SAM9X5_CIDR_MATCH, AT91SAM9G25_EXID_MATCH,
40 "at91sam9g25", "at91sam9x5"),
41 AT91_SOC(AT91SAM9X5_CIDR_MATCH, AT91SAM9X25_EXID_MATCH,
42 "at91sam9x25", "at91sam9x5"),
43 AT91_SOC(AT91SAM9N12_CIDR_MATCH, AT91SAM9CN12_EXID_MATCH,
44 "at91sam9cn12", "at91sam9n12"),
45 AT91_SOC(AT91SAM9N12_CIDR_MATCH, AT91SAM9N12_EXID_MATCH,
46 "at91sam9n12", "at91sam9n12"),
47 AT91_SOC(AT91SAM9N12_CIDR_MATCH, AT91SAM9CN11_EXID_MATCH,
48 "at91sam9cn11", "at91sam9n12"),
49 AT91_SOC(AT91SAM9XE128_CIDR_MATCH, 0, "at91sam9xe128", "at91sam9xe128"),
50 AT91_SOC(AT91SAM9XE256_CIDR_MATCH, 0, "at91sam9xe256", "at91sam9xe256"),
51 AT91_SOC(AT91SAM9XE512_CIDR_MATCH, 0, "at91sam9xe512", "at91sam9xe512"),
52 { /* sentinel */ },
53};
54
55static void __init at91sam9_common_init(void)
29{ 56{
30 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 57 struct soc_device *soc;
58 struct device *soc_dev = NULL;
59
60 soc = at91_soc_init(at91sam9_socs);
61 if (soc != NULL)
62 soc_dev = soc_device_to_device(soc);
63
64 of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
31 65
32 arm_pm_idle = at91sam9_idle; 66 arm_pm_idle = at91sam9_idle;
67}
68
69static void __init at91sam9_dt_device_init(void)
70{
71 at91sam9_common_init();
33 at91sam9260_pm_init(); 72 at91sam9260_pm_init();
34} 73}
35 74
@@ -40,16 +79,13 @@ static const char *at91_dt_board_compat[] __initconst = {
40 79
41DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9") 80DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9")
42 /* Maintainer: Atmel */ 81 /* Maintainer: Atmel */
43 .map_io = at91_map_io,
44 .init_machine = at91sam9_dt_device_init, 82 .init_machine = at91sam9_dt_device_init,
45 .dt_compat = at91_dt_board_compat, 83 .dt_compat = at91_dt_board_compat,
46MACHINE_END 84MACHINE_END
47 85
48static void __init at91sam9g45_dt_device_init(void) 86static void __init at91sam9g45_dt_device_init(void)
49{ 87{
50 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 88 at91sam9_common_init();
51
52 arm_pm_idle = at91sam9_idle;
53 at91sam9g45_pm_init(); 89 at91sam9g45_pm_init();
54} 90}
55 91
@@ -60,16 +96,13 @@ static const char *at91sam9g45_board_compat[] __initconst = {
60 96
61DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45") 97DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45")
62 /* Maintainer: Atmel */ 98 /* Maintainer: Atmel */
63 .map_io = at91_map_io,
64 .init_machine = at91sam9g45_dt_device_init, 99 .init_machine = at91sam9g45_dt_device_init,
65 .dt_compat = at91sam9g45_board_compat, 100 .dt_compat = at91sam9g45_board_compat,
66MACHINE_END 101MACHINE_END
67 102
68static void __init at91sam9x5_dt_device_init(void) 103static void __init at91sam9x5_dt_device_init(void)
69{ 104{
70 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 105 at91sam9_common_init();
71
72 arm_pm_idle = at91sam9_idle;
73 at91sam9x5_pm_init(); 106 at91sam9x5_pm_init();
74} 107}
75 108
@@ -81,7 +114,6 @@ static const char *at91sam9x5_board_compat[] __initconst = {
81 114
82DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9") 115DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9")
83 /* Maintainer: Atmel */ 116 /* Maintainer: Atmel */
84 .map_io = at91_map_io,
85 .init_machine = at91sam9x5_dt_device_init, 117 .init_machine = at91sam9x5_dt_device_init,
86 .dt_compat = at91sam9x5_board_compat, 118 .dt_compat = at91sam9x5_board_compat,
87MACHINE_END 119MACHINE_END
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 583369ffc284..b0fa7dc7286d 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -18,17 +18,10 @@
18extern void __init at91_map_io(void); 18extern void __init at91_map_io(void);
19extern void __init at91_alt_map_io(void); 19extern void __init at91_alt_map_io(void);
20 20
21 /* Timer */
22extern void at91rm9200_timer_init(void);
23
24/* idle */ 21/* idle */
25extern void at91rm9200_idle(void); 22extern void at91rm9200_idle(void);
26extern void at91sam9_idle(void); 23extern void at91sam9_idle(void);
27 24
28/* Matrix */
29extern void at91_ioremap_matrix(u32 base_addr);
30
31
32#ifdef CONFIG_PM 25#ifdef CONFIG_PM
33extern void __init at91rm9200_pm_init(void); 26extern void __init at91rm9200_pm_init(void);
34extern void __init at91sam9260_pm_init(void); 27extern void __init at91sam9260_pm_init(void);
diff --git a/arch/arm/mach-at91/include/mach/at91_dbgu.h b/arch/arm/mach-at91/include/mach/at91_dbgu.h
deleted file mode 100644
index 42925e8f78e4..000000000000
--- a/arch/arm/mach-at91/include/mach/at91_dbgu.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_dbgu.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Debug Unit (DBGU) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_DBGU_H
17#define AT91_DBGU_H
18
19#define AT91_DBGU_CR (0x00) /* Control Register */
20#define AT91_DBGU_MR (0x04) /* Mode Register */
21#define AT91_DBGU_IER (0x08) /* Interrupt Enable Register */
22#define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */
23#define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */
24#define AT91_DBGU_IDR (0x0c) /* Interrupt Disable Register */
25#define AT91_DBGU_IMR (0x10) /* Interrupt Mask Register */
26#define AT91_DBGU_SR (0x14) /* Status Register */
27#define AT91_DBGU_RHR (0x18) /* Receiver Holding Register */
28#define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */
29#define AT91_DBGU_BRGR (0x20) /* Baud Rate Generator Register */
30
31#define AT91_DBGU_CIDR (0x40) /* Chip ID Register */
32#define AT91_DBGU_EXID (0x44) /* Chip ID Extension Register */
33#define AT91_DBGU_FNR (0x48) /* Force NTRST Register [SAM9 only] */
34#define AT91_DBGU_FNTRST (1 << 0) /* Force NTRST */
35
36/*
37 * Some AT91 parts that don't have full DEBUG units still support the ID
38 * and extensions register.
39 */
40#define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */
41#define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */
42#define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */
43#define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */
44#define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */
45#define AT91_CIDR_SRAMSIZ_1K (1 << 16)
46#define AT91_CIDR_SRAMSIZ_2K (2 << 16)
47#define AT91_CIDR_SRAMSIZ_112K (4 << 16)
48#define AT91_CIDR_SRAMSIZ_4K (5 << 16)
49#define AT91_CIDR_SRAMSIZ_80K (6 << 16)
50#define AT91_CIDR_SRAMSIZ_160K (7 << 16)
51#define AT91_CIDR_SRAMSIZ_8K (8 << 16)
52#define AT91_CIDR_SRAMSIZ_16K (9 << 16)
53#define AT91_CIDR_SRAMSIZ_32K (10 << 16)
54#define AT91_CIDR_SRAMSIZ_64K (11 << 16)
55#define AT91_CIDR_SRAMSIZ_128K (12 << 16)
56#define AT91_CIDR_SRAMSIZ_256K (13 << 16)
57#define AT91_CIDR_SRAMSIZ_96K (14 << 16)
58#define AT91_CIDR_SRAMSIZ_512K (15 << 16)
59#define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */
60#define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */
61#define AT91_CIDR_EXT (1 << 31) /* Extension Flag */
62
63#endif
diff --git a/arch/arm/mach-at91/include/mach/at91_matrix.h b/arch/arm/mach-at91/include/mach/at91_matrix.h
deleted file mode 100644
index f8996c954131..000000000000
--- a/arch/arm/mach-at91/include/mach/at91_matrix.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
3 *
4 * Under GPLv2
5 */
6
7#ifndef __MACH_AT91_MATRIX_H__
8#define __MACH_AT91_MATRIX_H__
9
10#ifndef __ASSEMBLY__
11extern void __iomem *at91_matrix_base;
12
13#define at91_matrix_read(field) \
14 __raw_readl(at91_matrix_base + field)
15
16#define at91_matrix_write(field, value) \
17 __raw_writel(value, at91_matrix_base + field)
18
19#else
20.extern at91_matrix_base
21#endif
22
23#endif /* __MACH_AT91_MATRIX_H__ */
diff --git a/arch/arm/mach-at91/include/mach/at91_ramc.h b/arch/arm/mach-at91/include/mach/at91_ramc.h
index e4492b151fee..493bc486e858 100644
--- a/arch/arm/mach-at91/include/mach/at91_ramc.h
+++ b/arch/arm/mach-at91/include/mach/at91_ramc.h
@@ -21,10 +21,6 @@ extern void __iomem *at91_ramc_base[];
21.extern at91_ramc_base 21.extern at91_ramc_base
22#endif 22#endif
23 23
24#define AT91_MEMCTRL_MC 0
25#define AT91_MEMCTRL_SDRAMC 1
26#define AT91_MEMCTRL_DDRSDR 2
27
28#include <soc/at91/at91rm9200_sdramc.h> 24#include <soc/at91/at91rm9200_sdramc.h>
29#include <soc/at91/at91sam9_ddrsdr.h> 25#include <soc/at91/at91sam9_ddrsdr.h>
30#include <soc/at91/at91sam9_sdramc.h> 26#include <soc/at91/at91sam9_sdramc.h>
diff --git a/arch/arm/mach-at91/include/mach/at91_st.h b/arch/arm/mach-at91/include/mach/at91_st.h
deleted file mode 100644
index 67fdbd13c3ed..000000000000
--- a/arch/arm/mach-at91/include/mach/at91_st.h
+++ /dev/null
@@ -1,61 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91_st.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * System Timer (ST) - System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91_ST_H
17#define AT91_ST_H
18
19#ifndef __ASSEMBLY__
20extern void __iomem *at91_st_base;
21
22#define at91_st_read(field) \
23 __raw_readl(at91_st_base + field)
24
25#define at91_st_write(field, value) \
26 __raw_writel(value, at91_st_base + field)
27#else
28.extern at91_st_base
29#endif
30
31#define AT91_ST_CR 0x00 /* Control Register */
32#define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */
33
34#define AT91_ST_PIMR 0x04 /* Period Interval Mode Register */
35#define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */
36
37#define AT91_ST_WDMR 0x08 /* Watchdog Mode Register */
38#define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */
39#define AT91_ST_RSTEN (1 << 16) /* Reset Enable */
40#define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */
41
42#define AT91_ST_RTMR 0x0c /* Real-time Mode Register */
43#define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */
44
45#define AT91_ST_SR 0x10 /* Status Register */
46#define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */
47#define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */
48#define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */
49#define AT91_ST_ALMS (1 << 3) /* Alarm Status */
50
51#define AT91_ST_IER 0x14 /* Interrupt Enable Register */
52#define AT91_ST_IDR 0x18 /* Interrupt Disable Register */
53#define AT91_ST_IMR 0x1c /* Interrupt Mask Register */
54
55#define AT91_ST_RTAR 0x20 /* Real-time Alarm Register */
56#define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */
57
58#define AT91_ST_CRTR 0x24 /* Current Real-time Register */
59#define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */
60
61#endif
diff --git a/arch/arm/mach-at91/include/mach/at91rm9200.h b/arch/arm/mach-at91/include/mach/at91rm9200.h
deleted file mode 100644
index e67317c67761..000000000000
--- a/arch/arm/mach-at91/include/mach/at91rm9200.h
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91rm9200.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Common definitions.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_H
17#define AT91RM9200_H
18
19/*
20 * Peripheral identifiers/interrupts.
21 */
22#define AT91RM9200_ID_PIOA 2 /* Parallel IO Controller A */
23#define AT91RM9200_ID_PIOB 3 /* Parallel IO Controller B */
24#define AT91RM9200_ID_PIOC 4 /* Parallel IO Controller C */
25#define AT91RM9200_ID_PIOD 5 /* Parallel IO Controller D */
26#define AT91RM9200_ID_US0 6 /* USART 0 */
27#define AT91RM9200_ID_US1 7 /* USART 1 */
28#define AT91RM9200_ID_US2 8 /* USART 2 */
29#define AT91RM9200_ID_US3 9 /* USART 3 */
30#define AT91RM9200_ID_MCI 10 /* Multimedia Card Interface */
31#define AT91RM9200_ID_UDP 11 /* USB Device Port */
32#define AT91RM9200_ID_TWI 12 /* Two-Wire Interface */
33#define AT91RM9200_ID_SPI 13 /* Serial Peripheral Interface */
34#define AT91RM9200_ID_SSC0 14 /* Serial Synchronous Controller 0 */
35#define AT91RM9200_ID_SSC1 15 /* Serial Synchronous Controller 1 */
36#define AT91RM9200_ID_SSC2 16 /* Serial Synchronous Controller 2 */
37#define AT91RM9200_ID_TC0 17 /* Timer Counter 0 */
38#define AT91RM9200_ID_TC1 18 /* Timer Counter 1 */
39#define AT91RM9200_ID_TC2 19 /* Timer Counter 2 */
40#define AT91RM9200_ID_TC3 20 /* Timer Counter 3 */
41#define AT91RM9200_ID_TC4 21 /* Timer Counter 4 */
42#define AT91RM9200_ID_TC5 22 /* Timer Counter 5 */
43#define AT91RM9200_ID_UHP 23 /* USB Host port */
44#define AT91RM9200_ID_EMAC 24 /* Ethernet MAC */
45#define AT91RM9200_ID_IRQ0 25 /* Advanced Interrupt Controller (IRQ0) */
46#define AT91RM9200_ID_IRQ1 26 /* Advanced Interrupt Controller (IRQ1) */
47#define AT91RM9200_ID_IRQ2 27 /* Advanced Interrupt Controller (IRQ2) */
48#define AT91RM9200_ID_IRQ3 28 /* Advanced Interrupt Controller (IRQ3) */
49#define AT91RM9200_ID_IRQ4 29 /* Advanced Interrupt Controller (IRQ4) */
50#define AT91RM9200_ID_IRQ5 30 /* Advanced Interrupt Controller (IRQ5) */
51#define AT91RM9200_ID_IRQ6 31 /* Advanced Interrupt Controller (IRQ6) */
52
53
54/*
55 * Peripheral physical base addresses.
56 */
57#define AT91RM9200_BASE_TCB0 0xfffa0000
58#define AT91RM9200_BASE_TC0 0xfffa0000
59#define AT91RM9200_BASE_TC1 0xfffa0040
60#define AT91RM9200_BASE_TC2 0xfffa0080
61#define AT91RM9200_BASE_TCB1 0xfffa4000
62#define AT91RM9200_BASE_TC3 0xfffa4000
63#define AT91RM9200_BASE_TC4 0xfffa4040
64#define AT91RM9200_BASE_TC5 0xfffa4080
65#define AT91RM9200_BASE_UDP 0xfffb0000
66#define AT91RM9200_BASE_MCI 0xfffb4000
67#define AT91RM9200_BASE_TWI 0xfffb8000
68#define AT91RM9200_BASE_EMAC 0xfffbc000
69#define AT91RM9200_BASE_US0 0xfffc0000
70#define AT91RM9200_BASE_US1 0xfffc4000
71#define AT91RM9200_BASE_US2 0xfffc8000
72#define AT91RM9200_BASE_US3 0xfffcc000
73#define AT91RM9200_BASE_SSC0 0xfffd0000
74#define AT91RM9200_BASE_SSC1 0xfffd4000
75#define AT91RM9200_BASE_SSC2 0xfffd8000
76#define AT91RM9200_BASE_SPI 0xfffe0000
77
78
79/*
80 * System Peripherals
81 */
82#define AT91RM9200_BASE_DBGU AT91_BASE_DBGU0 /* Debug Unit */
83#define AT91RM9200_BASE_PIOA 0xfffff400 /* PIO Controller A */
84#define AT91RM9200_BASE_PIOB 0xfffff600 /* PIO Controller B */
85#define AT91RM9200_BASE_PIOC 0xfffff800 /* PIO Controller C */
86#define AT91RM9200_BASE_PIOD 0xfffffa00 /* PIO Controller D */
87#define AT91RM9200_BASE_ST 0xfffffd00 /* System Timer */
88#define AT91RM9200_BASE_RTC 0xfffffe00 /* Real-Time Clock */
89#define AT91RM9200_BASE_MC 0xffffff00 /* Memory Controllers */
90
91/*
92 * Internal Memory.
93 */
94#define AT91RM9200_ROM_BASE 0x00100000 /* Internal ROM base address */
95#define AT91RM9200_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
96
97#define AT91RM9200_SRAM_BASE 0x00200000 /* Internal SRAM base address */
98#define AT91RM9200_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
99
100#define AT91RM9200_UHP_BASE 0x00300000 /* USB Host controller */
101
102
103#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260.h b/arch/arm/mach-at91/include/mach/at91sam9260.h
deleted file mode 100644
index 416c7b6c56d3..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9260.h
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260.h
3 *
4 * (C) 2006 Andrew Victor
5 *
6 * Common definitions.
7 * Based on AT91SAM9260 datasheet revision A (Preliminary).
8 *
9 * Includes also definitions for AT91SAM9XE and AT91SAM9G families
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 */
16
17#ifndef AT91SAM9260_H
18#define AT91SAM9260_H
19
20/*
21 * Peripheral identifiers/interrupts.
22 */
23#define AT91SAM9260_ID_PIOA 2 /* Parallel IO Controller A */
24#define AT91SAM9260_ID_PIOB 3 /* Parallel IO Controller B */
25#define AT91SAM9260_ID_PIOC 4 /* Parallel IO Controller C */
26#define AT91SAM9260_ID_ADC 5 /* Analog-to-Digital Converter */
27#define AT91SAM9260_ID_US0 6 /* USART 0 */
28#define AT91SAM9260_ID_US1 7 /* USART 1 */
29#define AT91SAM9260_ID_US2 8 /* USART 2 */
30#define AT91SAM9260_ID_MCI 9 /* Multimedia Card Interface */
31#define AT91SAM9260_ID_UDP 10 /* USB Device Port */
32#define AT91SAM9260_ID_TWI 11 /* Two-Wire Interface */
33#define AT91SAM9260_ID_SPI0 12 /* Serial Peripheral Interface 0 */
34#define AT91SAM9260_ID_SPI1 13 /* Serial Peripheral Interface 1 */
35#define AT91SAM9260_ID_SSC 14 /* Serial Synchronous Controller */
36#define AT91SAM9260_ID_TC0 17 /* Timer Counter 0 */
37#define AT91SAM9260_ID_TC1 18 /* Timer Counter 1 */
38#define AT91SAM9260_ID_TC2 19 /* Timer Counter 2 */
39#define AT91SAM9260_ID_UHP 20 /* USB Host port */
40#define AT91SAM9260_ID_EMAC 21 /* Ethernet */
41#define AT91SAM9260_ID_ISI 22 /* Image Sensor Interface */
42#define AT91SAM9260_ID_US3 23 /* USART 3 */
43#define AT91SAM9260_ID_US4 24 /* USART 4 */
44#define AT91SAM9260_ID_US5 25 /* USART 5 */
45#define AT91SAM9260_ID_TC3 26 /* Timer Counter 3 */
46#define AT91SAM9260_ID_TC4 27 /* Timer Counter 4 */
47#define AT91SAM9260_ID_TC5 28 /* Timer Counter 5 */
48#define AT91SAM9260_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
49#define AT91SAM9260_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
50#define AT91SAM9260_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
51
52
53/*
54 * User Peripheral physical base addresses.
55 */
56#define AT91SAM9260_BASE_TCB0 0xfffa0000
57#define AT91SAM9260_BASE_TC0 0xfffa0000
58#define AT91SAM9260_BASE_TC1 0xfffa0040
59#define AT91SAM9260_BASE_TC2 0xfffa0080
60#define AT91SAM9260_BASE_UDP 0xfffa4000
61#define AT91SAM9260_BASE_MCI 0xfffa8000
62#define AT91SAM9260_BASE_TWI 0xfffac000
63#define AT91SAM9260_BASE_US0 0xfffb0000
64#define AT91SAM9260_BASE_US1 0xfffb4000
65#define AT91SAM9260_BASE_US2 0xfffb8000
66#define AT91SAM9260_BASE_SSC 0xfffbc000
67#define AT91SAM9260_BASE_ISI 0xfffc0000
68#define AT91SAM9260_BASE_EMAC 0xfffc4000
69#define AT91SAM9260_BASE_SPI0 0xfffc8000
70#define AT91SAM9260_BASE_SPI1 0xfffcc000
71#define AT91SAM9260_BASE_US3 0xfffd0000
72#define AT91SAM9260_BASE_US4 0xfffd4000
73#define AT91SAM9260_BASE_US5 0xfffd8000
74#define AT91SAM9260_BASE_TCB1 0xfffdc000
75#define AT91SAM9260_BASE_TC3 0xfffdc000
76#define AT91SAM9260_BASE_TC4 0xfffdc040
77#define AT91SAM9260_BASE_TC5 0xfffdc080
78#define AT91SAM9260_BASE_ADC 0xfffe0000
79
80/*
81 * System Peripherals
82 */
83#define AT91SAM9260_BASE_ECC 0xffffe800
84#define AT91SAM9260_BASE_SDRAMC 0xffffea00
85#define AT91SAM9260_BASE_SMC 0xffffec00
86#define AT91SAM9260_BASE_MATRIX 0xffffee00
87#define AT91SAM9260_BASE_DBGU AT91_BASE_DBGU0
88#define AT91SAM9260_BASE_PIOA 0xfffff400
89#define AT91SAM9260_BASE_PIOB 0xfffff600
90#define AT91SAM9260_BASE_PIOC 0xfffff800
91#define AT91SAM9260_BASE_RSTC 0xfffffd00
92#define AT91SAM9260_BASE_SHDWC 0xfffffd10
93#define AT91SAM9260_BASE_RTT 0xfffffd20
94#define AT91SAM9260_BASE_PIT 0xfffffd30
95#define AT91SAM9260_BASE_WDT 0xfffffd40
96#define AT91SAM9260_BASE_GPBR 0xfffffd50
97
98
99/*
100 * Internal Memory.
101 */
102#define AT91SAM9260_ROM_BASE 0x00100000 /* Internal ROM base address */
103#define AT91SAM9260_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
104
105#define AT91SAM9260_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
106#define AT91SAM9260_SRAM0_SIZE SZ_4K /* Internal SRAM 0 size (4Kb) */
107#define AT91SAM9260_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
108#define AT91SAM9260_SRAM1_SIZE SZ_4K /* Internal SRAM 1 size (4Kb) */
109#define AT91SAM9260_SRAM_BASE 0x002FF000 /* Internal SRAM base address */
110#define AT91SAM9260_SRAM_SIZE SZ_8K /* Internal SRAM size (8Kb) */
111
112#define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */
113
114#define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */
115#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */
116
117#define AT91SAM9G20_ROM_BASE 0x00100000 /* Internal ROM base address */
118#define AT91SAM9G20_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
119
120#define AT91SAM9G20_SRAM0_BASE 0x00200000 /* Internal SRAM 0 base address */
121#define AT91SAM9G20_SRAM0_SIZE SZ_16K /* Internal SRAM 0 size (16Kb) */
122#define AT91SAM9G20_SRAM1_BASE 0x00300000 /* Internal SRAM 1 base address */
123#define AT91SAM9G20_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
124#define AT91SAM9G20_SRAM_BASE 0x002FC000 /* Internal SRAM base address */
125#define AT91SAM9G20_SRAM_SIZE SZ_32K /* Internal SRAM size (32Kb) */
126
127#define AT91SAM9G20_UHP_BASE 0x00500000 /* USB Host controller */
128
129#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
deleted file mode 100644
index f459df420629..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260_matrix.h
3 *
4 * Copyright (C) 2007 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9260 datasheet revision B.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9260_MATRIX_H
16#define AT91SAM9260_MATRIX_H
17
18#define AT91_MATRIX_MCFG0 0x00 /* Master Configuration Register 0 */
19#define AT91_MATRIX_MCFG1 0x04 /* Master Configuration Register 1 */
20#define AT91_MATRIX_MCFG2 0x08 /* Master Configuration Register 2 */
21#define AT91_MATRIX_MCFG3 0x0C /* Master Configuration Register 3 */
22#define AT91_MATRIX_MCFG4 0x10 /* Master Configuration Register 4 */
23#define AT91_MATRIX_MCFG5 0x14 /* Master Configuration Register 5 */
24#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
25#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
26#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
27#define AT91_MATRIX_ULBT_FOUR (2 << 0)
28#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
29#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
30
31#define AT91_MATRIX_SCFG0 0x40 /* Slave Configuration Register 0 */
32#define AT91_MATRIX_SCFG1 0x44 /* Slave Configuration Register 1 */
33#define AT91_MATRIX_SCFG2 0x48 /* Slave Configuration Register 2 */
34#define AT91_MATRIX_SCFG3 0x4C /* Slave Configuration Register 3 */
35#define AT91_MATRIX_SCFG4 0x50 /* Slave Configuration Register 4 */
36#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
37#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
38#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
39#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
40#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
41#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
42#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
43#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
44#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
45
46#define AT91_MATRIX_PRAS0 0x80 /* Priority Register A for Slave 0 */
47#define AT91_MATRIX_PRAS1 0x88 /* Priority Register A for Slave 1 */
48#define AT91_MATRIX_PRAS2 0x90 /* Priority Register A for Slave 2 */
49#define AT91_MATRIX_PRAS3 0x98 /* Priority Register A for Slave 3 */
50#define AT91_MATRIX_PRAS4 0xA0 /* Priority Register A for Slave 4 */
51#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
52#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
53#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
54#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
55#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
56#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
57
58#define AT91_MATRIX_MRCR 0x100 /* Master Remap Control Register */
59#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
60#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
61
62#define AT91_MATRIX_EBICSA 0x11C /* EBI Chip Select Assignment Register */
63#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
64#define AT91_MATRIX_CS1A_SMC (0 << 1)
65#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
66#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
67#define AT91_MATRIX_CS3A_SMC (0 << 3)
68#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
69#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
70#define AT91_MATRIX_CS4A_SMC (0 << 4)
71#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
72#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
73#define AT91_MATRIX_CS5A_SMC (0 << 5)
74#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
75#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
76#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
77#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
78#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
79
80#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261.h b/arch/arm/mach-at91/include/mach/at91sam9261.h
deleted file mode 100644
index a041406d06ee..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9261.h
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9261.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Common definitions.
7 * Based on AT91SAM9261 datasheet revision E. (Preliminary)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9261_H
16#define AT91SAM9261_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91SAM9261_ID_PIOA 2 /* Parallel IO Controller A */
22#define AT91SAM9261_ID_PIOB 3 /* Parallel IO Controller B */
23#define AT91SAM9261_ID_PIOC 4 /* Parallel IO Controller C */
24#define AT91SAM9261_ID_US0 6 /* USART 0 */
25#define AT91SAM9261_ID_US1 7 /* USART 1 */
26#define AT91SAM9261_ID_US2 8 /* USART 2 */
27#define AT91SAM9261_ID_MCI 9 /* Multimedia Card Interface */
28#define AT91SAM9261_ID_UDP 10 /* USB Device Port */
29#define AT91SAM9261_ID_TWI 11 /* Two-Wire Interface */
30#define AT91SAM9261_ID_SPI0 12 /* Serial Peripheral Interface 0 */
31#define AT91SAM9261_ID_SPI1 13 /* Serial Peripheral Interface 1 */
32#define AT91SAM9261_ID_SSC0 14 /* Serial Synchronous Controller 0 */
33#define AT91SAM9261_ID_SSC1 15 /* Serial Synchronous Controller 1 */
34#define AT91SAM9261_ID_SSC2 16 /* Serial Synchronous Controller 2 */
35#define AT91SAM9261_ID_TC0 17 /* Timer Counter 0 */
36#define AT91SAM9261_ID_TC1 18 /* Timer Counter 1 */
37#define AT91SAM9261_ID_TC2 19 /* Timer Counter 2 */
38#define AT91SAM9261_ID_UHP 20 /* USB Host port */
39#define AT91SAM9261_ID_LCDC 21 /* LDC Controller */
40#define AT91SAM9261_ID_IRQ0 29 /* Advanced Interrupt Controller (IRQ0) */
41#define AT91SAM9261_ID_IRQ1 30 /* Advanced Interrupt Controller (IRQ1) */
42#define AT91SAM9261_ID_IRQ2 31 /* Advanced Interrupt Controller (IRQ2) */
43
44
45/*
46 * User Peripheral physical base addresses.
47 */
48#define AT91SAM9261_BASE_TCB0 0xfffa0000
49#define AT91SAM9261_BASE_TC0 0xfffa0000
50#define AT91SAM9261_BASE_TC1 0xfffa0040
51#define AT91SAM9261_BASE_TC2 0xfffa0080
52#define AT91SAM9261_BASE_UDP 0xfffa4000
53#define AT91SAM9261_BASE_MCI 0xfffa8000
54#define AT91SAM9261_BASE_TWI 0xfffac000
55#define AT91SAM9261_BASE_US0 0xfffb0000
56#define AT91SAM9261_BASE_US1 0xfffb4000
57#define AT91SAM9261_BASE_US2 0xfffb8000
58#define AT91SAM9261_BASE_SSC0 0xfffbc000
59#define AT91SAM9261_BASE_SSC1 0xfffc0000
60#define AT91SAM9261_BASE_SSC2 0xfffc4000
61#define AT91SAM9261_BASE_SPI0 0xfffc8000
62#define AT91SAM9261_BASE_SPI1 0xfffcc000
63
64
65/*
66 * System Peripherals
67 */
68#define AT91SAM9261_BASE_SMC 0xffffec00
69#define AT91SAM9261_BASE_MATRIX 0xffffee00
70#define AT91SAM9261_BASE_SDRAMC 0xffffea00
71#define AT91SAM9261_BASE_DBGU AT91_BASE_DBGU0
72#define AT91SAM9261_BASE_PIOA 0xfffff400
73#define AT91SAM9261_BASE_PIOB 0xfffff600
74#define AT91SAM9261_BASE_PIOC 0xfffff800
75#define AT91SAM9261_BASE_RSTC 0xfffffd00
76#define AT91SAM9261_BASE_SHDWC 0xfffffd10
77#define AT91SAM9261_BASE_RTT 0xfffffd20
78#define AT91SAM9261_BASE_PIT 0xfffffd30
79#define AT91SAM9261_BASE_WDT 0xfffffd40
80#define AT91SAM9261_BASE_GPBR 0xfffffd50
81
82
83/*
84 * Internal Memory.
85 */
86#define AT91SAM9261_SRAM_BASE 0x00300000 /* Internal SRAM base address */
87#define AT91SAM9261_SRAM_SIZE 0x00028000 /* Internal SRAM size (160Kb) */
88
89#define AT91SAM9G10_SRAM_BASE AT91SAM9261_SRAM_BASE /* Internal SRAM base address */
90#define AT91SAM9G10_SRAM_SIZE 0x00004000 /* Internal SRAM size (16Kb) */
91
92#define AT91SAM9261_ROM_BASE 0x00400000 /* Internal ROM base address */
93#define AT91SAM9261_ROM_SIZE SZ_32K /* Internal ROM size (32Kb) */
94
95#define AT91SAM9261_UHP_BASE 0x00500000 /* USB Host controller */
96#define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */
97
98
99#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
deleted file mode 100644
index a50cdf8b8ca4..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9261_matrix.h
3 *
4 * Copyright (C) 2007 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9261 datasheet revision D.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9261_MATRIX_H
16#define AT91SAM9261_MATRIX_H
17
18#define AT91_MATRIX_MCFG 0x00 /* Master Configuration Register */
19#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
20#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
21
22#define AT91_MATRIX_SCFG0 0x04 /* Slave Configuration Register 0 */
23#define AT91_MATRIX_SCFG1 0x08 /* Slave Configuration Register 1 */
24#define AT91_MATRIX_SCFG2 0x0C /* Slave Configuration Register 2 */
25#define AT91_MATRIX_SCFG3 0x10 /* Slave Configuration Register 3 */
26#define AT91_MATRIX_SCFG4 0x14 /* Slave Configuration Register 4 */
27#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
28#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
29#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
30#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
31#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
32#define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */
33
34#define AT91_MATRIX_TCR 0x24 /* TCM Configuration Register */
35#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
36#define AT91_MATRIX_ITCM_0 (0 << 0)
37#define AT91_MATRIX_ITCM_16 (5 << 0)
38#define AT91_MATRIX_ITCM_32 (6 << 0)
39#define AT91_MATRIX_ITCM_64 (7 << 0)
40#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
41#define AT91_MATRIX_DTCM_0 (0 << 4)
42#define AT91_MATRIX_DTCM_16 (5 << 4)
43#define AT91_MATRIX_DTCM_32 (6 << 4)
44#define AT91_MATRIX_DTCM_64 (7 << 4)
45
46#define AT91_MATRIX_EBICSA 0x30 /* EBI Chip Select Assignment Register */
47#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
48#define AT91_MATRIX_CS1A_SMC (0 << 1)
49#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
50#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
51#define AT91_MATRIX_CS3A_SMC (0 << 3)
52#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
53#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
54#define AT91_MATRIX_CS4A_SMC (0 << 4)
55#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
56#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
57#define AT91_MATRIX_CS5A_SMC (0 << 5)
58#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
59#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
60
61#define AT91_MATRIX_USBPUCR 0x34 /* USB Pad Pull-Up Control Register */
62#define AT91_MATRIX_USBPUCR_PUON (1 << 30) /* USB Device PAD Pull-up Enable */
63
64#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263.h b/arch/arm/mach-at91/include/mach/at91sam9263.h
deleted file mode 100644
index d201029d60b3..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9263.h
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9263.h
3 *
4 * (C) 2007 Atmel Corporation.
5 *
6 * Common definitions.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_H
16#define AT91SAM9263_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */
22#define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */
23#define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */
24#define AT91SAM9263_ID_US0 7 /* USART 0 */
25#define AT91SAM9263_ID_US1 8 /* USART 1 */
26#define AT91SAM9263_ID_US2 9 /* USART 2 */
27#define AT91SAM9263_ID_MCI0 10 /* Multimedia Card Interface 0 */
28#define AT91SAM9263_ID_MCI1 11 /* Multimedia Card Interface 1 */
29#define AT91SAM9263_ID_CAN 12 /* CAN */
30#define AT91SAM9263_ID_TWI 13 /* Two-Wire Interface */
31#define AT91SAM9263_ID_SPI0 14 /* Serial Peripheral Interface 0 */
32#define AT91SAM9263_ID_SPI1 15 /* Serial Peripheral Interface 1 */
33#define AT91SAM9263_ID_SSC0 16 /* Serial Synchronous Controller 0 */
34#define AT91SAM9263_ID_SSC1 17 /* Serial Synchronous Controller 1 */
35#define AT91SAM9263_ID_AC97C 18 /* AC97 Controller */
36#define AT91SAM9263_ID_TCB 19 /* Timer Counter 0, 1 and 2 */
37#define AT91SAM9263_ID_PWMC 20 /* Pulse Width Modulation Controller */
38#define AT91SAM9263_ID_EMAC 21 /* Ethernet */
39#define AT91SAM9263_ID_2DGE 23 /* 2D Graphic Engine */
40#define AT91SAM9263_ID_UDP 24 /* USB Device Port */
41#define AT91SAM9263_ID_ISI 25 /* Image Sensor Interface */
42#define AT91SAM9263_ID_LCDC 26 /* LCD Controller */
43#define AT91SAM9263_ID_DMA 27 /* DMA Controller */
44#define AT91SAM9263_ID_UHP 29 /* USB Host port */
45#define AT91SAM9263_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */
46#define AT91SAM9263_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */
47
48
49/*
50 * User Peripheral physical base addresses.
51 */
52#define AT91SAM9263_BASE_UDP 0xfff78000
53#define AT91SAM9263_BASE_TCB0 0xfff7c000
54#define AT91SAM9263_BASE_TC0 0xfff7c000
55#define AT91SAM9263_BASE_TC1 0xfff7c040
56#define AT91SAM9263_BASE_TC2 0xfff7c080
57#define AT91SAM9263_BASE_MCI0 0xfff80000
58#define AT91SAM9263_BASE_MCI1 0xfff84000
59#define AT91SAM9263_BASE_TWI 0xfff88000
60#define AT91SAM9263_BASE_US0 0xfff8c000
61#define AT91SAM9263_BASE_US1 0xfff90000
62#define AT91SAM9263_BASE_US2 0xfff94000
63#define AT91SAM9263_BASE_SSC0 0xfff98000
64#define AT91SAM9263_BASE_SSC1 0xfff9c000
65#define AT91SAM9263_BASE_AC97C 0xfffa0000
66#define AT91SAM9263_BASE_SPI0 0xfffa4000
67#define AT91SAM9263_BASE_SPI1 0xfffa8000
68#define AT91SAM9263_BASE_CAN 0xfffac000
69#define AT91SAM9263_BASE_PWMC 0xfffb8000
70#define AT91SAM9263_BASE_EMAC 0xfffbc000
71#define AT91SAM9263_BASE_ISI 0xfffc4000
72#define AT91SAM9263_BASE_2DGE 0xfffc8000
73
74/*
75 * System Peripherals
76 */
77#define AT91SAM9263_BASE_ECC0 0xffffe000
78#define AT91SAM9263_BASE_SDRAMC0 0xffffe200
79#define AT91SAM9263_BASE_SMC0 0xffffe400
80#define AT91SAM9263_BASE_ECC1 0xffffe600
81#define AT91SAM9263_BASE_SDRAMC1 0xffffe800
82#define AT91SAM9263_BASE_SMC1 0xffffea00
83#define AT91SAM9263_BASE_MATRIX 0xffffec00
84#define AT91SAM9263_BASE_DBGU AT91_BASE_DBGU1
85#define AT91SAM9263_BASE_PIOA 0xfffff200
86#define AT91SAM9263_BASE_PIOB 0xfffff400
87#define AT91SAM9263_BASE_PIOC 0xfffff600
88#define AT91SAM9263_BASE_PIOD 0xfffff800
89#define AT91SAM9263_BASE_PIOE 0xfffffa00
90#define AT91SAM9263_BASE_RSTC 0xfffffd00
91#define AT91SAM9263_BASE_SHDWC 0xfffffd10
92#define AT91SAM9263_BASE_RTT0 0xfffffd20
93#define AT91SAM9263_BASE_PIT 0xfffffd30
94#define AT91SAM9263_BASE_WDT 0xfffffd40
95#define AT91SAM9263_BASE_RTT1 0xfffffd50
96#define AT91SAM9263_BASE_GPBR 0xfffffd60
97
98#define AT91_SMC AT91_SMC0
99
100/*
101 * Internal Memory.
102 */
103#define AT91SAM9263_SRAM0_BASE 0x00300000 /* Internal SRAM 0 base address */
104#define AT91SAM9263_SRAM0_SIZE (80 * SZ_1K) /* Internal SRAM 0 size (80Kb) */
105
106#define AT91SAM9263_ROM_BASE 0x00400000 /* Internal ROM base address */
107#define AT91SAM9263_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
108
109#define AT91SAM9263_SRAM1_BASE 0x00500000 /* Internal SRAM 1 base address */
110#define AT91SAM9263_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */
111
112#define AT91SAM9263_LCDC_BASE 0x00700000 /* LCD Controller */
113#define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */
114#define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */
115
116
117#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
deleted file mode 100644
index ebb5fdb565e0..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
+++ /dev/null
@@ -1,129 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9263_matrix.h
3 *
4 * Copyright (C) 2006 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9263 datasheet revision B (Preliminary).
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9263_MATRIX_H
16#define AT91SAM9263_MATRIX_H
17
18#define AT91_MATRIX_MCFG0 0x00 /* Master Configuration Register 0 */
19#define AT91_MATRIX_MCFG1 0x04 /* Master Configuration Register 1 */
20#define AT91_MATRIX_MCFG2 0x08 /* Master Configuration Register 2 */
21#define AT91_MATRIX_MCFG3 0x0C /* Master Configuration Register 3 */
22#define AT91_MATRIX_MCFG4 0x10 /* Master Configuration Register 4 */
23#define AT91_MATRIX_MCFG5 0x14 /* Master Configuration Register 5 */
24#define AT91_MATRIX_MCFG6 0x18 /* Master Configuration Register 6 */
25#define AT91_MATRIX_MCFG7 0x1C /* Master Configuration Register 7 */
26#define AT91_MATRIX_MCFG8 0x20 /* Master Configuration Register 8 */
27#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
28#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
29#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
30#define AT91_MATRIX_ULBT_FOUR (2 << 0)
31#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
32#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
33
34#define AT91_MATRIX_SCFG0 0x40 /* Slave Configuration Register 0 */
35#define AT91_MATRIX_SCFG1 0x44 /* Slave Configuration Register 1 */
36#define AT91_MATRIX_SCFG2 0x48 /* Slave Configuration Register 2 */
37#define AT91_MATRIX_SCFG3 0x4C /* Slave Configuration Register 3 */
38#define AT91_MATRIX_SCFG4 0x50 /* Slave Configuration Register 4 */
39#define AT91_MATRIX_SCFG5 0x54 /* Slave Configuration Register 5 */
40#define AT91_MATRIX_SCFG6 0x58 /* Slave Configuration Register 6 */
41#define AT91_MATRIX_SCFG7 0x5C /* Slave Configuration Register 7 */
42#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
43#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
44#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
45#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
46#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
47#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
48#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
49#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
50#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
51
52#define AT91_MATRIX_PRAS0 0x80 /* Priority Register A for Slave 0 */
53#define AT91_MATRIX_PRBS0 0x84 /* Priority Register B for Slave 0 */
54#define AT91_MATRIX_PRAS1 0x88 /* Priority Register A for Slave 1 */
55#define AT91_MATRIX_PRBS1 0x8C /* Priority Register B for Slave 1 */
56#define AT91_MATRIX_PRAS2 0x90 /* Priority Register A for Slave 2 */
57#define AT91_MATRIX_PRBS2 0x94 /* Priority Register B for Slave 2 */
58#define AT91_MATRIX_PRAS3 0x98 /* Priority Register A for Slave 3 */
59#define AT91_MATRIX_PRBS3 0x9C /* Priority Register B for Slave 3 */
60#define AT91_MATRIX_PRAS4 0xA0 /* Priority Register A for Slave 4 */
61#define AT91_MATRIX_PRBS4 0xA4 /* Priority Register B for Slave 4 */
62#define AT91_MATRIX_PRAS5 0xA8 /* Priority Register A for Slave 5 */
63#define AT91_MATRIX_PRBS5 0xAC /* Priority Register B for Slave 5 */
64#define AT91_MATRIX_PRAS6 0xB0 /* Priority Register A for Slave 6 */
65#define AT91_MATRIX_PRBS6 0xB4 /* Priority Register B for Slave 6 */
66#define AT91_MATRIX_PRAS7 0xB8 /* Priority Register A for Slave 7 */
67#define AT91_MATRIX_PRBS7 0xBC /* Priority Register B for Slave 7 */
68#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
69#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
70#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
71#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
72#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
73#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
74#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
75#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
76#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
77
78#define AT91_MATRIX_MRCR 0x100 /* Master Remap Control Register */
79#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
80#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
81#define AT91_MATRIX_RCB2 (1 << 2)
82#define AT91_MATRIX_RCB3 (1 << 3)
83#define AT91_MATRIX_RCB4 (1 << 4)
84#define AT91_MATRIX_RCB5 (1 << 5)
85#define AT91_MATRIX_RCB6 (1 << 6)
86#define AT91_MATRIX_RCB7 (1 << 7)
87#define AT91_MATRIX_RCB8 (1 << 8)
88
89#define AT91_MATRIX_TCMR 0x114 /* TCM Configuration Register */
90#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
91#define AT91_MATRIX_ITCM_0 (0 << 0)
92#define AT91_MATRIX_ITCM_16 (5 << 0)
93#define AT91_MATRIX_ITCM_32 (6 << 0)
94#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
95#define AT91_MATRIX_DTCM_0 (0 << 4)
96#define AT91_MATRIX_DTCM_16 (5 << 4)
97#define AT91_MATRIX_DTCM_32 (6 << 4)
98
99#define AT91_MATRIX_EBI0CSA 0x120 /* EBI0 Chip Select Assignment Register */
100#define AT91_MATRIX_EBI0_CS1A (1 << 1) /* Chip Select 1 Assignment */
101#define AT91_MATRIX_EBI0_CS1A_SMC (0 << 1)
102#define AT91_MATRIX_EBI0_CS1A_SDRAMC (1 << 1)
103#define AT91_MATRIX_EBI0_CS3A (1 << 3) /* Chip Select 3 Assignment */
104#define AT91_MATRIX_EBI0_CS3A_SMC (0 << 3)
105#define AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA (1 << 3)
106#define AT91_MATRIX_EBI0_CS4A (1 << 4) /* Chip Select 4 Assignment */
107#define AT91_MATRIX_EBI0_CS4A_SMC (0 << 4)
108#define AT91_MATRIX_EBI0_CS4A_SMC_CF1 (1 << 4)
109#define AT91_MATRIX_EBI0_CS5A (1 << 5) /* Chip Select 5 Assignment */
110#define AT91_MATRIX_EBI0_CS5A_SMC (0 << 5)
111#define AT91_MATRIX_EBI0_CS5A_SMC_CF2 (1 << 5)
112#define AT91_MATRIX_EBI0_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
113#define AT91_MATRIX_EBI0_VDDIOMSEL (1 << 16) /* Memory voltage selection */
114#define AT91_MATRIX_EBI0_VDDIOMSEL_1_8V (0 << 16)
115#define AT91_MATRIX_EBI0_VDDIOMSEL_3_3V (1 << 16)
116
117#define AT91_MATRIX_EBI1CSA 0x124 /* EBI1 Chip Select Assignment Register */
118#define AT91_MATRIX_EBI1_CS1A (1 << 1) /* Chip Select 1 Assignment */
119#define AT91_MATRIX_EBI1_CS1A_SMC (0 << 1)
120#define AT91_MATRIX_EBI1_CS1A_SDRAMC (1 << 1)
121#define AT91_MATRIX_EBI1_CS2A (1 << 3) /* Chip Select 3 Assignment */
122#define AT91_MATRIX_EBI1_CS2A_SMC (0 << 3)
123#define AT91_MATRIX_EBI1_CS2A_SMC_SMARTMEDIA (1 << 3)
124#define AT91_MATRIX_EBI1_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
125#define AT91_MATRIX_EBI1_VDDIOMSEL (1 << 16) /* Memory voltage selection */
126#define AT91_MATRIX_EBI1_VDDIOMSEL_1_8V (0 << 16)
127#define AT91_MATRIX_EBI1_VDDIOMSEL_3_3V (1 << 16)
128
129#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9_smc.h b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
index 175e1fdd9fe8..ff54a0ce90e3 100644
--- a/arch/arm/mach-at91/include/mach/at91sam9_smc.h
+++ b/arch/arm/mach-at91/include/mach/at91sam9_smc.h
@@ -16,8 +16,6 @@
16#ifndef AT91SAM9_SMC_H 16#ifndef AT91SAM9_SMC_H
17#define AT91SAM9_SMC_H 17#define AT91SAM9_SMC_H
18 18
19#include <mach/cpu.h>
20
21#ifndef __ASSEMBLY__ 19#ifndef __ASSEMBLY__
22struct sam9_smc_config { 20struct sam9_smc_config {
23 /* Setup register */ 21 /* Setup register */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45.h b/arch/arm/mach-at91/include/mach/at91sam9g45.h
deleted file mode 100644
index 8eba1021f533..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9g45.h
+++ /dev/null
@@ -1,143 +0,0 @@
1/*
2 * Chip-specific header file for the AT91SAM9G45 family
3 *
4 * Copyright (C) 2008-2009 Atmel Corporation.
5 *
6 * Common definitions.
7 * Based on AT91SAM9G45 preliminary datasheet.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9G45_H
16#define AT91SAM9G45_H
17
18/*
19 * Peripheral identifiers/interrupts.
20 */
21#define AT91SAM9G45_ID_PIOA 2 /* Parallel I/O Controller A */
22#define AT91SAM9G45_ID_PIOB 3 /* Parallel I/O Controller B */
23#define AT91SAM9G45_ID_PIOC 4 /* Parallel I/O Controller C */
24#define AT91SAM9G45_ID_PIODE 5 /* Parallel I/O Controller D and E */
25#define AT91SAM9G45_ID_TRNG 6 /* True Random Number Generator */
26#define AT91SAM9G45_ID_US0 7 /* USART 0 */
27#define AT91SAM9G45_ID_US1 8 /* USART 1 */
28#define AT91SAM9G45_ID_US2 9 /* USART 2 */
29#define AT91SAM9G45_ID_US3 10 /* USART 3 */
30#define AT91SAM9G45_ID_MCI0 11 /* High Speed Multimedia Card Interface 0 */
31#define AT91SAM9G45_ID_TWI0 12 /* Two-Wire Interface 0 */
32#define AT91SAM9G45_ID_TWI1 13 /* Two-Wire Interface 1 */
33#define AT91SAM9G45_ID_SPI0 14 /* Serial Peripheral Interface 0 */
34#define AT91SAM9G45_ID_SPI1 15 /* Serial Peripheral Interface 1 */
35#define AT91SAM9G45_ID_SSC0 16 /* Synchronous Serial Controller 0 */
36#define AT91SAM9G45_ID_SSC1 17 /* Synchronous Serial Controller 1 */
37#define AT91SAM9G45_ID_TCB 18 /* Timer Counter 0, 1, 2, 3, 4 and 5 */
38#define AT91SAM9G45_ID_PWMC 19 /* Pulse Width Modulation Controller */
39#define AT91SAM9G45_ID_TSC 20 /* Touch Screen ADC Controller */
40#define AT91SAM9G45_ID_DMA 21 /* DMA Controller */
41#define AT91SAM9G45_ID_UHPHS 22 /* USB Host High Speed */
42#define AT91SAM9G45_ID_LCDC 23 /* LCD Controller */
43#define AT91SAM9G45_ID_AC97C 24 /* AC97 Controller */
44#define AT91SAM9G45_ID_EMAC 25 /* Ethernet MAC */
45#define AT91SAM9G45_ID_ISI 26 /* Image Sensor Interface */
46#define AT91SAM9G45_ID_UDPHS 27 /* USB Device High Speed */
47#define AT91SAM9G45_ID_AESTDESSHA 28 /* AES + T-DES + SHA */
48#define AT91SAM9G45_ID_MCI1 29 /* High Speed Multimedia Card Interface 1 */
49#define AT91SAM9G45_ID_VDEC 30 /* Video Decoder */
50#define AT91SAM9G45_ID_IRQ0 31 /* Advanced Interrupt Controller */
51
52/*
53 * User Peripheral physical base addresses.
54 */
55#define AT91SAM9G45_BASE_UDPHS 0xfff78000
56#define AT91SAM9G45_BASE_TCB0 0xfff7c000
57#define AT91SAM9G45_BASE_TC0 0xfff7c000
58#define AT91SAM9G45_BASE_TC1 0xfff7c040
59#define AT91SAM9G45_BASE_TC2 0xfff7c080
60#define AT91SAM9G45_BASE_MCI0 0xfff80000
61#define AT91SAM9G45_BASE_TWI0 0xfff84000
62#define AT91SAM9G45_BASE_TWI1 0xfff88000
63#define AT91SAM9G45_BASE_US0 0xfff8c000
64#define AT91SAM9G45_BASE_US1 0xfff90000
65#define AT91SAM9G45_BASE_US2 0xfff94000
66#define AT91SAM9G45_BASE_US3 0xfff98000
67#define AT91SAM9G45_BASE_SSC0 0xfff9c000
68#define AT91SAM9G45_BASE_SSC1 0xfffa0000
69#define AT91SAM9G45_BASE_SPI0 0xfffa4000
70#define AT91SAM9G45_BASE_SPI1 0xfffa8000
71#define AT91SAM9G45_BASE_AC97C 0xfffac000
72#define AT91SAM9G45_BASE_TSC 0xfffb0000
73#define AT91SAM9G45_BASE_ISI 0xfffb4000
74#define AT91SAM9G45_BASE_PWMC 0xfffb8000
75#define AT91SAM9G45_BASE_EMAC 0xfffbc000
76#define AT91SAM9G45_BASE_AES 0xfffc0000
77#define AT91SAM9G45_BASE_TDES 0xfffc4000
78#define AT91SAM9G45_BASE_SHA 0xfffc8000
79#define AT91SAM9G45_BASE_TRNG 0xfffcc000
80#define AT91SAM9G45_BASE_MCI1 0xfffd0000
81#define AT91SAM9G45_BASE_TCB1 0xfffd4000
82#define AT91SAM9G45_BASE_TC3 0xfffd4000
83#define AT91SAM9G45_BASE_TC4 0xfffd4040
84#define AT91SAM9G45_BASE_TC5 0xfffd4080
85
86/*
87 * System Peripherals
88 */
89#define AT91SAM9G45_BASE_ECC 0xffffe200
90#define AT91SAM9G45_BASE_DDRSDRC1 0xffffe400
91#define AT91SAM9G45_BASE_DDRSDRC0 0xffffe600
92#define AT91SAM9G45_BASE_DMA 0xffffec00
93#define AT91SAM9G45_BASE_SMC 0xffffe800
94#define AT91SAM9G45_BASE_MATRIX 0xffffea00
95#define AT91SAM9G45_BASE_DBGU AT91_BASE_DBGU1
96#define AT91SAM9G45_BASE_PIOA 0xfffff200
97#define AT91SAM9G45_BASE_PIOB 0xfffff400
98#define AT91SAM9G45_BASE_PIOC 0xfffff600
99#define AT91SAM9G45_BASE_PIOD 0xfffff800
100#define AT91SAM9G45_BASE_PIOE 0xfffffa00
101#define AT91SAM9G45_BASE_RSTC 0xfffffd00
102#define AT91SAM9G45_BASE_SHDWC 0xfffffd10
103#define AT91SAM9G45_BASE_RTT 0xfffffd20
104#define AT91SAM9G45_BASE_PIT 0xfffffd30
105#define AT91SAM9G45_BASE_WDT 0xfffffd40
106#define AT91SAM9G45_BASE_RTC 0xfffffdb0
107#define AT91SAM9G45_BASE_GPBR 0xfffffd60
108
109/*
110 * Internal Memory.
111 */
112#define AT91SAM9G45_SRAM_BASE 0x00300000 /* Internal SRAM base address */
113#define AT91SAM9G45_SRAM_SIZE SZ_64K /* Internal SRAM size (64Kb) */
114
115#define AT91SAM9G45_ROM_BASE 0x00400000 /* Internal ROM base address */
116#define AT91SAM9G45_ROM_SIZE SZ_64K /* Internal ROM size (64Kb) */
117
118#define AT91SAM9G45_LCDC_BASE 0x00500000 /* LCD Controller */
119#define AT91SAM9G45_UDPHS_FIFO 0x00600000 /* USB Device HS controller */
120#define AT91SAM9G45_OHCI_BASE 0x00700000 /* USB Host controller (OHCI) */
121#define AT91SAM9G45_EHCI_BASE 0x00800000 /* USB Host controller (EHCI) */
122#define AT91SAM9G45_VDEC_BASE 0x00900000 /* Video Decoder Controller */
123
124/*
125 * DMA peripheral identifiers
126 * for hardware handshaking interface
127 */
128#define AT_DMA_ID_MCI0 0
129#define AT_DMA_ID_SPI0_TX 1
130#define AT_DMA_ID_SPI0_RX 2
131#define AT_DMA_ID_SPI1_TX 3
132#define AT_DMA_ID_SPI1_RX 4
133#define AT_DMA_ID_SSC0_TX 5
134#define AT_DMA_ID_SSC0_RX 6
135#define AT_DMA_ID_SSC1_TX 7
136#define AT_DMA_ID_SSC1_RX 8
137#define AT_DMA_ID_AC97_TX 9
138#define AT_DMA_ID_AC97_RX 10
139#define AT_DMA_ID_AES_TX 11
140#define AT_DMA_ID_AES_RX 12
141#define AT_DMA_ID_MCI1 13
142
143#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
deleted file mode 100644
index b76e2ed2fbc2..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9g45_matrix.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/*
2 * Matrix-centric header file for the AT91SAM9G45 family
3 *
4 * Copyright (C) 2008-2009 Atmel Corporation.
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9G45 preliminary datasheet.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 */
14
15#ifndef AT91SAM9G45_MATRIX_H
16#define AT91SAM9G45_MATRIX_H
17
18#define AT91_MATRIX_MCFG0 0x00 /* Master Configuration Register 0 */
19#define AT91_MATRIX_MCFG1 0x04 /* Master Configuration Register 1 */
20#define AT91_MATRIX_MCFG2 0x08 /* Master Configuration Register 2 */
21#define AT91_MATRIX_MCFG3 0x0C /* Master Configuration Register 3 */
22#define AT91_MATRIX_MCFG4 0x10 /* Master Configuration Register 4 */
23#define AT91_MATRIX_MCFG5 0x14 /* Master Configuration Register 5 */
24#define AT91_MATRIX_MCFG6 0x18 /* Master Configuration Register 6 */
25#define AT91_MATRIX_MCFG7 0x1C /* Master Configuration Register 7 */
26#define AT91_MATRIX_MCFG8 0x20 /* Master Configuration Register 8 */
27#define AT91_MATRIX_MCFG9 0x24 /* Master Configuration Register 9 */
28#define AT91_MATRIX_MCFG10 0x28 /* Master Configuration Register 10 */
29#define AT91_MATRIX_MCFG11 0x2C /* Master Configuration Register 11 */
30#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
31#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
32#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
33#define AT91_MATRIX_ULBT_FOUR (2 << 0)
34#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
35#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
36#define AT91_MATRIX_ULBT_THIRTYTWO (5 << 0)
37#define AT91_MATRIX_ULBT_SIXTYFOUR (6 << 0)
38#define AT91_MATRIX_ULBT_128 (7 << 0)
39
40#define AT91_MATRIX_SCFG0 0x40 /* Slave Configuration Register 0 */
41#define AT91_MATRIX_SCFG1 0x44 /* Slave Configuration Register 1 */
42#define AT91_MATRIX_SCFG2 0x48 /* Slave Configuration Register 2 */
43#define AT91_MATRIX_SCFG3 0x4C /* Slave Configuration Register 3 */
44#define AT91_MATRIX_SCFG4 0x50 /* Slave Configuration Register 4 */
45#define AT91_MATRIX_SCFG5 0x54 /* Slave Configuration Register 5 */
46#define AT91_MATRIX_SCFG6 0x58 /* Slave Configuration Register 6 */
47#define AT91_MATRIX_SCFG7 0x5C /* Slave Configuration Register 7 */
48#define AT91_MATRIX_SLOT_CYCLE (0x1ff << 0) /* Maximum Number of Allowed Cycles for a Burst */
49#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
50#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
51#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
52#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
53#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
54
55#define AT91_MATRIX_PRAS0 0x80 /* Priority Register A for Slave 0 */
56#define AT91_MATRIX_PRBS0 0x84 /* Priority Register B for Slave 0 */
57#define AT91_MATRIX_PRAS1 0x88 /* Priority Register A for Slave 1 */
58#define AT91_MATRIX_PRBS1 0x8C /* Priority Register B for Slave 1 */
59#define AT91_MATRIX_PRAS2 0x90 /* Priority Register A for Slave 2 */
60#define AT91_MATRIX_PRBS2 0x94 /* Priority Register B for Slave 2 */
61#define AT91_MATRIX_PRAS3 0x98 /* Priority Register A for Slave 3 */
62#define AT91_MATRIX_PRBS3 0x9C /* Priority Register B for Slave 3 */
63#define AT91_MATRIX_PRAS4 0xA0 /* Priority Register A for Slave 4 */
64#define AT91_MATRIX_PRBS4 0xA4 /* Priority Register B for Slave 4 */
65#define AT91_MATRIX_PRAS5 0xA8 /* Priority Register A for Slave 5 */
66#define AT91_MATRIX_PRBS5 0xAC /* Priority Register B for Slave 5 */
67#define AT91_MATRIX_PRAS6 0xB0 /* Priority Register A for Slave 6 */
68#define AT91_MATRIX_PRBS6 0xB4 /* Priority Register B for Slave 6 */
69#define AT91_MATRIX_PRAS7 0xB8 /* Priority Register A for Slave 7 */
70#define AT91_MATRIX_PRBS7 0xBC /* Priority Register B for Slave 7 */
71#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
72#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
73#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
74#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
75#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
76#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
77#define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */
78#define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */
79#define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */
80#define AT91_MATRIX_M9PR (3 << 4) /* Master 9 Priority (in Register B) */
81#define AT91_MATRIX_M10PR (3 << 8) /* Master 10 Priority (in Register B) */
82#define AT91_MATRIX_M11PR (3 << 12) /* Master 11 Priority (in Register B) */
83
84#define AT91_MATRIX_MRCR 0x100 /* Master Remap Control Register */
85#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
86#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
87#define AT91_MATRIX_RCB2 (1 << 2)
88#define AT91_MATRIX_RCB3 (1 << 3)
89#define AT91_MATRIX_RCB4 (1 << 4)
90#define AT91_MATRIX_RCB5 (1 << 5)
91#define AT91_MATRIX_RCB6 (1 << 6)
92#define AT91_MATRIX_RCB7 (1 << 7)
93#define AT91_MATRIX_RCB8 (1 << 8)
94#define AT91_MATRIX_RCB9 (1 << 9)
95#define AT91_MATRIX_RCB10 (1 << 10)
96#define AT91_MATRIX_RCB11 (1 << 11)
97
98#define AT91_MATRIX_TCMR 0x110 /* TCM Configuration Register */
99#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
100#define AT91_MATRIX_ITCM_0 (0 << 0)
101#define AT91_MATRIX_ITCM_32 (6 << 0)
102#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
103#define AT91_MATRIX_DTCM_0 (0 << 4)
104#define AT91_MATRIX_DTCM_32 (6 << 4)
105#define AT91_MATRIX_DTCM_64 (7 << 4)
106#define AT91_MATRIX_TCM_NWS (0x1 << 11) /* Wait state TCM register */
107#define AT91_MATRIX_TCM_NO_WS (0x0 << 11)
108#define AT91_MATRIX_TCM_ONE_WS (0x1 << 11)
109
110#define AT91_MATRIX_VIDEO 0x118 /* Video Mode Configuration Register */
111#define AT91C_VDEC_SEL (0x1 << 0) /* Video Mode Selection */
112#define AT91C_VDEC_SEL_OFF (0 << 0)
113#define AT91C_VDEC_SEL_ON (1 << 0)
114
115#define AT91_MATRIX_EBICSA 0x128 /* EBI Chip Select Assignment Register */
116#define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
117#define AT91_MATRIX_EBI_CS1A_SMC (0 << 1)
118#define AT91_MATRIX_EBI_CS1A_SDRAMC (1 << 1)
119#define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */
120#define AT91_MATRIX_EBI_CS3A_SMC (0 << 3)
121#define AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
122#define AT91_MATRIX_EBI_CS4A (1 << 4) /* Chip Select 4 Assignment */
123#define AT91_MATRIX_EBI_CS4A_SMC (0 << 4)
124#define AT91_MATRIX_EBI_CS4A_SMC_CF0 (1 << 4)
125#define AT91_MATRIX_EBI_CS5A (1 << 5) /* Chip Select 5 Assignment */
126#define AT91_MATRIX_EBI_CS5A_SMC (0 << 5)
127#define AT91_MATRIX_EBI_CS5A_SMC_CF1 (1 << 5)
128#define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
129#define AT91_MATRIX_EBI_DBPU_ON (0 << 8)
130#define AT91_MATRIX_EBI_DBPU_OFF (1 << 8)
131#define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */
132#define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16)
133#define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16)
134#define AT91_MATRIX_EBI_EBI_IOSR (1 << 17) /* EBI I/O slew rate selection */
135#define AT91_MATRIX_EBI_EBI_IOSR_REDUCED (0 << 17)
136#define AT91_MATRIX_EBI_EBI_IOSR_NORMAL (1 << 17)
137#define AT91_MATRIX_EBI_DDR_IOSR (1 << 18) /* DDR2 dedicated port I/O slew rate selection */
138#define AT91_MATRIX_EBI_DDR_IOSR_REDUCED (0 << 18)
139#define AT91_MATRIX_EBI_DDR_IOSR_NORMAL (1 << 18)
140
141#define AT91_MATRIX_WPMR 0x1E4 /* Write Protect Mode Register */
142#define AT91_MATRIX_WPMR_WPEN (1 << 0) /* Write Protect ENable */
143#define AT91_MATRIX_WPMR_WP_WPDIS (0 << 0)
144#define AT91_MATRIX_WPMR_WP_WPEN (1 << 0)
145#define AT91_MATRIX_WPMR_WPKEY (0xFFFFFF << 8) /* Write Protect KEY */
146
147#define AT91_MATRIX_WPSR 0x1E8 /* Write Protect Status Register */
148#define AT91_MATRIX_WPSR_WPVS (1 << 0) /* Write Protect Violation Status */
149#define AT91_MATRIX_WPSR_NO_WPV (0 << 0)
150#define AT91_MATRIX_WPSR_WPV (1 << 0)
151#define AT91_MATRIX_WPSR_WPVSRC (0xFFFF << 8) /* Write Protect Violation Source */
152
153#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/arch/arm/mach-at91/include/mach/at91sam9n12.h
deleted file mode 100644
index 0151bcf6163c..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9n12.h
+++ /dev/null
@@ -1,65 +0,0 @@
1/*
2 * SoC specific header file for the AT91SAM9N12
3 *
4 * Copyright (C) 2012 Atmel Corporation
5 *
6 * Common definitions, based on AT91SAM9N12 SoC datasheet
7 *
8 * Licensed under GPLv2 or later
9 */
10
11#ifndef _AT91SAM9N12_H_
12#define _AT91SAM9N12_H_
13
14/*
15 * Peripheral identifiers/interrupts.
16 */
17#define AT91SAM9N12_ID_PIOAB 2 /* Parallel I/O Controller A and B */
18#define AT91SAM9N12_ID_PIOCD 3 /* Parallel I/O Controller C and D */
19#define AT91SAM9N12_ID_FUSE 4 /* FUSE Controller */
20#define AT91SAM9N12_ID_USART0 5 /* USART 0 */
21#define AT91SAM9N12_ID_USART1 6 /* USART 1 */
22#define AT91SAM9N12_ID_USART2 7 /* USART 2 */
23#define AT91SAM9N12_ID_USART3 8 /* USART 3 */
24#define AT91SAM9N12_ID_TWI0 9 /* Two-Wire Interface 0 */
25#define AT91SAM9N12_ID_TWI1 10 /* Two-Wire Interface 1 */
26#define AT91SAM9N12_ID_MCI 12 /* High Speed Multimedia Card Interface */
27#define AT91SAM9N12_ID_SPI0 13 /* Serial Peripheral Interface 0 */
28#define AT91SAM9N12_ID_SPI1 14 /* Serial Peripheral Interface 1 */
29#define AT91SAM9N12_ID_UART0 15 /* UART 0 */
30#define AT91SAM9N12_ID_UART1 16 /* UART 1 */
31#define AT91SAM9N12_ID_TCB 17 /* Timer Counter 0, 1, 2, 3, 4 and 5 */
32#define AT91SAM9N12_ID_PWM 18 /* Pulse Width Modulation Controller */
33#define AT91SAM9N12_ID_ADC 19 /* ADC Controller */
34#define AT91SAM9N12_ID_DMA 20 /* DMA Controller */
35#define AT91SAM9N12_ID_UHP 22 /* USB Host High Speed */
36#define AT91SAM9N12_ID_UDP 23 /* USB Device High Speed */
37#define AT91SAM9N12_ID_LCDC 25 /* LCD Controller */
38#define AT91SAM9N12_ID_ISI 25 /* Image Sensor Interface */
39#define AT91SAM9N12_ID_SSC 28 /* Synchronous Serial Controller */
40#define AT91SAM9N12_ID_TRNG 30 /* TRNG */
41#define AT91SAM9N12_ID_IRQ0 31 /* Advanced Interrupt Controller */
42
43/*
44 * User Peripheral physical base addresses.
45 */
46#define AT91SAM9N12_BASE_USART0 0xf801c000
47#define AT91SAM9N12_BASE_USART1 0xf8020000
48#define AT91SAM9N12_BASE_USART2 0xf8024000
49#define AT91SAM9N12_BASE_USART3 0xf8028000
50
51/*
52 * System Peripherals
53 */
54#define AT91SAM9N12_BASE_RTC 0xfffffeb0
55
56/*
57 * Internal Memory.
58 */
59#define AT91SAM9N12_SRAM_BASE 0x00300000 /* Internal SRAM base address */
60#define AT91SAM9N12_SRAM_SIZE SZ_32K /* Internal SRAM size (32Kb) */
61
62#define AT91SAM9N12_ROM_BASE 0x00100000 /* Internal ROM base address */
63#define AT91SAM9N12_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */
64
65#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
deleted file mode 100644
index 40060cd62fa9..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Matrix-centric header file for the AT91SAM9N12
3 *
4 * Copyright (C) 2012 Atmel Corporation.
5 *
6 * Only EBI related registers.
7 * Write Protect register definitions may be useful.
8 *
9 * Licensed under GPLv2 or later.
10 */
11
12#ifndef _AT91SAM9N12_MATRIX_H_
13#define _AT91SAM9N12_MATRIX_H_
14
15#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x118) /* EBI Chip Select Assignment Register */
16#define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
17#define AT91_MATRIX_EBI_CS1A_SMC (0 << 1)
18#define AT91_MATRIX_EBI_CS1A_SDRAMC (1 << 1)
19#define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */
20#define AT91_MATRIX_EBI_CS3A_SMC (0 << 3)
21#define AT91_MATRIX_EBI_CS3A_SMC_NANDFLASH (1 << 3)
22#define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
23#define AT91_MATRIX_EBI_DBPU_ON (0 << 8)
24#define AT91_MATRIX_EBI_DBPU_OFF (1 << 8)
25#define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */
26#define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16)
27#define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16)
28#define AT91_MATRIX_EBI_EBI_IOSR (1 << 17) /* EBI I/O slew rate selection */
29#define AT91_MATRIX_EBI_EBI_IOSR_REDUCED (0 << 17)
30#define AT91_MATRIX_EBI_EBI_IOSR_NORMAL (1 << 17)
31#define AT91_MATRIX_EBI_DDR_IOSR (1 << 18) /* DDR2 dedicated port I/O slew rate selection */
32#define AT91_MATRIX_EBI_DDR_IOSR_REDUCED (0 << 18)
33#define AT91_MATRIX_EBI_DDR_IOSR_NORMAL (1 << 18)
34#define AT91_MATRIX_NFD0_SELECT (1 << 24) /* NAND Flash Data Bus Selection */
35#define AT91_MATRIX_NFD0_ON_D0 (0 << 24)
36#define AT91_MATRIX_NFD0_ON_D16 (1 << 24)
37#define AT91_MATRIX_DDR_MP_EN (1 << 25) /* DDR Multi-port Enable */
38#define AT91_MATRIX_MP_OFF (0 << 25)
39#define AT91_MATRIX_MP_ON (1 << 25)
40
41#define AT91_MATRIX_WPMR (AT91_MATRIX + 0x1E4) /* Write Protect Mode Register */
42#define AT91_MATRIX_WPMR_WPEN (1 << 0) /* Write Protect ENable */
43#define AT91_MATRIX_WPMR_WP_WPDIS (0 << 0)
44#define AT91_MATRIX_WPMR_WP_WPEN (1 << 0)
45#define AT91_MATRIX_WPMR_WPKEY (0xFFFFFF << 8) /* Write Protect KEY */
46
47#define AT91_MATRIX_WPSR (AT91_MATRIX + 0x1E8) /* Write Protect Status Register */
48#define AT91_MATRIX_WPSR_WPVS (1 << 0) /* Write Protect Violation Status */
49#define AT91_MATRIX_WPSR_NO_WPV (0 << 0)
50#define AT91_MATRIX_WPSR_WPV (1 << 0)
51#define AT91_MATRIX_WPSR_WPVSRC (0xFFFF << 8) /* Write Protect Violation Source */
52
53#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl.h b/arch/arm/mach-at91/include/mach/at91sam9rl.h
deleted file mode 100644
index a15db56d33fa..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9rl.h
+++ /dev/null
@@ -1,105 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9260.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Common definitions.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_H
15#define AT91SAM9RL_H
16
17/*
18 * Peripheral identifiers/interrupts.
19 */
20#define AT91SAM9RL_ID_PIOA 2 /* Parallel IO Controller A */
21#define AT91SAM9RL_ID_PIOB 3 /* Parallel IO Controller B */
22#define AT91SAM9RL_ID_PIOC 4 /* Parallel IO Controller C */
23#define AT91SAM9RL_ID_PIOD 5 /* Parallel IO Controller D */
24#define AT91SAM9RL_ID_US0 6 /* USART 0 */
25#define AT91SAM9RL_ID_US1 7 /* USART 1 */
26#define AT91SAM9RL_ID_US2 8 /* USART 2 */
27#define AT91SAM9RL_ID_US3 9 /* USART 3 */
28#define AT91SAM9RL_ID_MCI 10 /* Multimedia Card Interface */
29#define AT91SAM9RL_ID_TWI0 11 /* TWI 0 */
30#define AT91SAM9RL_ID_TWI1 12 /* TWI 1 */
31#define AT91SAM9RL_ID_SPI 13 /* Serial Peripheral Interface */
32#define AT91SAM9RL_ID_SSC0 14 /* Serial Synchronous Controller 0 */
33#define AT91SAM9RL_ID_SSC1 15 /* Serial Synchronous Controller 1 */
34#define AT91SAM9RL_ID_TC0 16 /* Timer Counter 0 */
35#define AT91SAM9RL_ID_TC1 17 /* Timer Counter 1 */
36#define AT91SAM9RL_ID_TC2 18 /* Timer Counter 2 */
37#define AT91SAM9RL_ID_PWMC 19 /* Pulse Width Modulation Controller */
38#define AT91SAM9RL_ID_TSC 20 /* Touch Screen Controller */
39#define AT91SAM9RL_ID_DMA 21 /* DMA Controller */
40#define AT91SAM9RL_ID_UDPHS 22 /* USB Device HS */
41#define AT91SAM9RL_ID_LCDC 23 /* LCD Controller */
42#define AT91SAM9RL_ID_AC97C 24 /* AC97 Controller */
43#define AT91SAM9RL_ID_IRQ0 31 /* Advanced Interrupt Controller (IRQ0) */
44
45
46/*
47 * User Peripheral physical base addresses.
48 */
49#define AT91SAM9RL_BASE_TCB0 0xfffa0000
50#define AT91SAM9RL_BASE_TC0 0xfffa0000
51#define AT91SAM9RL_BASE_TC1 0xfffa0040
52#define AT91SAM9RL_BASE_TC2 0xfffa0080
53#define AT91SAM9RL_BASE_MCI 0xfffa4000
54#define AT91SAM9RL_BASE_TWI0 0xfffa8000
55#define AT91SAM9RL_BASE_TWI1 0xfffac000
56#define AT91SAM9RL_BASE_US0 0xfffb0000
57#define AT91SAM9RL_BASE_US1 0xfffb4000
58#define AT91SAM9RL_BASE_US2 0xfffb8000
59#define AT91SAM9RL_BASE_US3 0xfffbc000
60#define AT91SAM9RL_BASE_SSC0 0xfffc0000
61#define AT91SAM9RL_BASE_SSC1 0xfffc4000
62#define AT91SAM9RL_BASE_PWMC 0xfffc8000
63#define AT91SAM9RL_BASE_SPI 0xfffcc000
64#define AT91SAM9RL_BASE_TSC 0xfffd0000
65#define AT91SAM9RL_BASE_UDPHS 0xfffd4000
66#define AT91SAM9RL_BASE_AC97C 0xfffd8000
67
68
69/*
70 * System Peripherals (offset from AT91_BASE_SYS)
71 */
72#define AT91_SCKCR (0xfffffd50 - AT91_BASE_SYS)
73
74#define AT91SAM9RL_BASE_DMA 0xffffe600
75#define AT91SAM9RL_BASE_ECC 0xffffe800
76#define AT91SAM9RL_BASE_SDRAMC 0xffffea00
77#define AT91SAM9RL_BASE_SMC 0xffffec00
78#define AT91SAM9RL_BASE_MATRIX 0xffffee00
79#define AT91SAM9RL_BASE_DBGU AT91_BASE_DBGU0
80#define AT91SAM9RL_BASE_PIOA 0xfffff400
81#define AT91SAM9RL_BASE_PIOB 0xfffff600
82#define AT91SAM9RL_BASE_PIOC 0xfffff800
83#define AT91SAM9RL_BASE_PIOD 0xfffffa00
84#define AT91SAM9RL_BASE_RSTC 0xfffffd00
85#define AT91SAM9RL_BASE_SHDWC 0xfffffd10
86#define AT91SAM9RL_BASE_RTT 0xfffffd20
87#define AT91SAM9RL_BASE_PIT 0xfffffd30
88#define AT91SAM9RL_BASE_WDT 0xfffffd40
89#define AT91SAM9RL_BASE_GPBR 0xfffffd60
90#define AT91SAM9RL_BASE_RTC 0xfffffe00
91
92
93/*
94 * Internal Memory.
95 */
96#define AT91SAM9RL_SRAM_BASE 0x00300000 /* Internal SRAM base address */
97#define AT91SAM9RL_SRAM_SIZE SZ_16K /* Internal SRAM size (16Kb) */
98
99#define AT91SAM9RL_ROM_BASE 0x00400000 /* Internal ROM base address */
100#define AT91SAM9RL_ROM_SIZE (2 * SZ_16K) /* Internal ROM size (32Kb) */
101
102#define AT91SAM9RL_LCDC_BASE 0x00500000 /* LCD Controller */
103#define AT91SAM9RL_UDPHS_FIFO 0x00600000 /* USB Device HS controller */
104
105#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
deleted file mode 100644
index 6d160adadafc..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/at91sam9rl_matrix.h
3 *
4 * Copyright (C) 2007 Atmel Corporation
5 *
6 * Memory Controllers (MATRIX, EBI) - System peripherals registers.
7 * Based on AT91SAM9RL datasheet revision A. (Preliminary)
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive for
11 * more details.
12 */
13
14#ifndef AT91SAM9RL_MATRIX_H
15#define AT91SAM9RL_MATRIX_H
16
17#define AT91_MATRIX_MCFG0 0x00 /* Master Configuration Register 0 */
18#define AT91_MATRIX_MCFG1 0x04 /* Master Configuration Register 1 */
19#define AT91_MATRIX_MCFG2 0x08 /* Master Configuration Register 2 */
20#define AT91_MATRIX_MCFG3 0x0C /* Master Configuration Register 3 */
21#define AT91_MATRIX_MCFG4 0x10 /* Master Configuration Register 4 */
22#define AT91_MATRIX_MCFG5 0x14 /* Master Configuration Register 5 */
23#define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */
24#define AT91_MATRIX_ULBT_INFINITE (0 << 0)
25#define AT91_MATRIX_ULBT_SINGLE (1 << 0)
26#define AT91_MATRIX_ULBT_FOUR (2 << 0)
27#define AT91_MATRIX_ULBT_EIGHT (3 << 0)
28#define AT91_MATRIX_ULBT_SIXTEEN (4 << 0)
29
30#define AT91_MATRIX_SCFG0 0x40 /* Slave Configuration Register 0 */
31#define AT91_MATRIX_SCFG1 0x44 /* Slave Configuration Register 1 */
32#define AT91_MATRIX_SCFG2 0x48 /* Slave Configuration Register 2 */
33#define AT91_MATRIX_SCFG3 0x4C /* Slave Configuration Register 3 */
34#define AT91_MATRIX_SCFG4 0x50 /* Slave Configuration Register 4 */
35#define AT91_MATRIX_SCFG5 0x54 /* Slave Configuration Register 5 */
36#define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */
37#define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */
38#define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16)
39#define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16)
40#define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16)
41#define AT91_MATRIX_FIXED_DEFMSTR (0xf << 18) /* Fixed Index of Default Master */
42#define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */
43#define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24)
44#define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24)
45
46#define AT91_MATRIX_PRAS0 0x80 /* Priority Register A for Slave 0 */
47#define AT91_MATRIX_PRAS1 0x88 /* Priority Register A for Slave 1 */
48#define AT91_MATRIX_PRAS2 0x90 /* Priority Register A for Slave 2 */
49#define AT91_MATRIX_PRAS3 0x98 /* Priority Register A for Slave 3 */
50#define AT91_MATRIX_PRAS4 0xA0 /* Priority Register A for Slave 4 */
51#define AT91_MATRIX_PRAS5 0xA8 /* Priority Register A for Slave 5 */
52#define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */
53#define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */
54#define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */
55#define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */
56#define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */
57#define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */
58
59#define AT91_MATRIX_MRCR 0x100 /* Master Remap Control Register */
60#define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
61#define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
62#define AT91_MATRIX_RCB2 (1 << 2)
63#define AT91_MATRIX_RCB3 (1 << 3)
64#define AT91_MATRIX_RCB4 (1 << 4)
65#define AT91_MATRIX_RCB5 (1 << 5)
66
67#define AT91_MATRIX_TCMR 0x114 /* TCM Configuration Register */
68#define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */
69#define AT91_MATRIX_ITCM_0 (0 << 0)
70#define AT91_MATRIX_ITCM_16 (5 << 0)
71#define AT91_MATRIX_ITCM_32 (6 << 0)
72#define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */
73#define AT91_MATRIX_DTCM_0 (0 << 4)
74#define AT91_MATRIX_DTCM_16 (5 << 4)
75#define AT91_MATRIX_DTCM_32 (6 << 4)
76
77#define AT91_MATRIX_EBICSA 0x120 /* EBI0 Chip Select Assignment Register */
78#define AT91_MATRIX_CS1A (1 << 1) /* Chip Select 1 Assignment */
79#define AT91_MATRIX_CS1A_SMC (0 << 1)
80#define AT91_MATRIX_CS1A_SDRAMC (1 << 1)
81#define AT91_MATRIX_CS3A (1 << 3) /* Chip Select 3 Assignment */
82#define AT91_MATRIX_CS3A_SMC (0 << 3)
83#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA (1 << 3)
84#define AT91_MATRIX_CS4A (1 << 4) /* Chip Select 4 Assignment */
85#define AT91_MATRIX_CS4A_SMC (0 << 4)
86#define AT91_MATRIX_CS4A_SMC_CF1 (1 << 4)
87#define AT91_MATRIX_CS5A (1 << 5) /* Chip Select 5 Assignment */
88#define AT91_MATRIX_CS5A_SMC (0 << 5)
89#define AT91_MATRIX_CS5A_SMC_CF2 (1 << 5)
90#define AT91_MATRIX_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
91#define AT91_MATRIX_VDDIOMSEL (1 << 16) /* Memory voltage selection */
92#define AT91_MATRIX_VDDIOMSEL_1_8V (0 << 16)
93#define AT91_MATRIX_VDDIOMSEL_3_3V (1 << 16)
94
95
96#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5.h b/arch/arm/mach-at91/include/mach/at91sam9x5.h
deleted file mode 100644
index 2fc76c49e97c..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9x5.h
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * Chip-specific header file for the AT91SAM9x5 family
3 *
4 * Copyright (C) 2009-2012 Atmel Corporation.
5 *
6 * Common definitions.
7 * Based on AT91SAM9x5 datasheet.
8 *
9 * Licensed under GPLv2 or later.
10 */
11
12#ifndef AT91SAM9X5_H
13#define AT91SAM9X5_H
14
15/*
16 * Peripheral identifiers/interrupts.
17 */
18#define AT91SAM9X5_ID_PIOAB 2 /* Parallel I/O Controller A and B */
19#define AT91SAM9X5_ID_PIOCD 3 /* Parallel I/O Controller C and D */
20#define AT91SAM9X5_ID_SMD 4 /* SMD Soft Modem (SMD) */
21#define AT91SAM9X5_ID_USART0 5 /* USART 0 */
22#define AT91SAM9X5_ID_USART1 6 /* USART 1 */
23#define AT91SAM9X5_ID_USART2 7 /* USART 2 */
24#define AT91SAM9X5_ID_USART3 8 /* USART 3 */
25#define AT91SAM9X5_ID_TWI0 9 /* Two-Wire Interface 0 */
26#define AT91SAM9X5_ID_TWI1 10 /* Two-Wire Interface 1 */
27#define AT91SAM9X5_ID_TWI2 11 /* Two-Wire Interface 2 */
28#define AT91SAM9X5_ID_MCI0 12 /* High Speed Multimedia Card Interface 0 */
29#define AT91SAM9X5_ID_SPI0 13 /* Serial Peripheral Interface 0 */
30#define AT91SAM9X5_ID_SPI1 14 /* Serial Peripheral Interface 1 */
31#define AT91SAM9X5_ID_UART0 15 /* UART 0 */
32#define AT91SAM9X5_ID_UART1 16 /* UART 1 */
33#define AT91SAM9X5_ID_TCB 17 /* Timer Counter 0, 1, 2, 3, 4 and 5 */
34#define AT91SAM9X5_ID_PWM 18 /* Pulse Width Modulation Controller */
35#define AT91SAM9X5_ID_ADC 19 /* ADC Controller */
36#define AT91SAM9X5_ID_DMA0 20 /* DMA Controller 0 */
37#define AT91SAM9X5_ID_DMA1 21 /* DMA Controller 1 */
38#define AT91SAM9X5_ID_UHPHS 22 /* USB Host High Speed */
39#define AT91SAM9X5_ID_UDPHS 23 /* USB Device High Speed */
40#define AT91SAM9X5_ID_EMAC0 24 /* Ethernet MAC0 */
41#define AT91SAM9X5_ID_LCDC 25 /* LCD Controller */
42#define AT91SAM9X5_ID_ISI 25 /* Image Sensor Interface */
43#define AT91SAM9X5_ID_MCI1 26 /* High Speed Multimedia Card Interface 1 */
44#define AT91SAM9X5_ID_EMAC1 27 /* Ethernet MAC1 */
45#define AT91SAM9X5_ID_SSC 28 /* Synchronous Serial Controller */
46#define AT91SAM9X5_ID_CAN0 29 /* CAN Controller 0 */
47#define AT91SAM9X5_ID_CAN1 30 /* CAN Controller 1 */
48#define AT91SAM9X5_ID_IRQ0 31 /* Advanced Interrupt Controller */
49
50/*
51 * User Peripheral physical base addresses.
52 */
53#define AT91SAM9X5_BASE_USART0 0xf801c000
54#define AT91SAM9X5_BASE_USART1 0xf8020000
55#define AT91SAM9X5_BASE_USART2 0xf8024000
56
57/*
58 * System Peripherals
59 */
60#define AT91SAM9X5_BASE_RTC 0xfffffeb0
61
62/*
63 * Internal Memory.
64 */
65#define AT91SAM9X5_SRAM_BASE 0x00300000 /* Internal SRAM base address */
66#define AT91SAM9X5_SRAM_SIZE SZ_32K /* Internal SRAM size (32Kb) */
67
68#define AT91SAM9X5_ROM_BASE 0x00400000 /* Internal ROM base address */
69#define AT91SAM9X5_ROM_SIZE SZ_64K /* Internal ROM size (64Kb) */
70
71#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
deleted file mode 100644
index a606d3966470..000000000000
--- a/arch/arm/mach-at91/include/mach/at91sam9x5_matrix.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Matrix-centric header file for the AT91SAM9x5 family
3 *
4 * Copyright (C) 2009-2012 Atmel Corporation.
5 *
6 * Only EBI related registers.
7 * Write Protect register definitions may be useful.
8 *
9 * Licensed under GPLv2 or later.
10 */
11
12#ifndef AT91SAM9X5_MATRIX_H
13#define AT91SAM9X5_MATRIX_H
14
15#define AT91_MATRIX_EBICSA (AT91_MATRIX + 0x120) /* EBI Chip Select Assignment Register */
16#define AT91_MATRIX_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
17#define AT91_MATRIX_EBI_CS1A_SMC (0 << 1)
18#define AT91_MATRIX_EBI_CS1A_SDRAMC (1 << 1)
19#define AT91_MATRIX_EBI_CS3A (1 << 3) /* Chip Select 3 Assignment */
20#define AT91_MATRIX_EBI_CS3A_SMC (0 << 3)
21#define AT91_MATRIX_EBI_CS3A_SMC_NANDFLASH (1 << 3)
22#define AT91_MATRIX_EBI_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */
23#define AT91_MATRIX_EBI_DBPU_ON (0 << 8)
24#define AT91_MATRIX_EBI_DBPU_OFF (1 << 8)
25#define AT91_MATRIX_EBI_VDDIOMSEL (1 << 16) /* Memory voltage selection */
26#define AT91_MATRIX_EBI_VDDIOMSEL_1_8V (0 << 16)
27#define AT91_MATRIX_EBI_VDDIOMSEL_3_3V (1 << 16)
28#define AT91_MATRIX_EBI_EBI_IOSR (1 << 17) /* EBI I/O slew rate selection */
29#define AT91_MATRIX_EBI_EBI_IOSR_REDUCED (0 << 17)
30#define AT91_MATRIX_EBI_EBI_IOSR_NORMAL (1 << 17)
31#define AT91_MATRIX_EBI_DDR_IOSR (1 << 18) /* DDR2 dedicated port I/O slew rate selection */
32#define AT91_MATRIX_EBI_DDR_IOSR_REDUCED (0 << 18)
33#define AT91_MATRIX_EBI_DDR_IOSR_NORMAL (1 << 18)
34#define AT91_MATRIX_NFD0_SELECT (1 << 24) /* NAND Flash Data Bus Selection */
35#define AT91_MATRIX_NFD0_ON_D0 (0 << 24)
36#define AT91_MATRIX_NFD0_ON_D16 (1 << 24)
37#define AT91_MATRIX_DDR_MP_EN (1 << 25) /* DDR Multi-port Enable */
38#define AT91_MATRIX_MP_OFF (0 << 25)
39#define AT91_MATRIX_MP_ON (1 << 25)
40
41#define AT91_MATRIX_WPMR (AT91_MATRIX + 0x1E4) /* Write Protect Mode Register */
42#define AT91_MATRIX_WPMR_WPEN (1 << 0) /* Write Protect ENable */
43#define AT91_MATRIX_WPMR_WP_WPDIS (0 << 0)
44#define AT91_MATRIX_WPMR_WP_WPEN (1 << 0)
45#define AT91_MATRIX_WPMR_WPKEY (0xFFFFFF << 8) /* Write Protect KEY */
46
47#define AT91_MATRIX_WPSR (AT91_MATRIX + 0x1E8) /* Write Protect Status Register */
48#define AT91_MATRIX_WPSR_WPVS (1 << 0) /* Write Protect Violation Status */
49#define AT91_MATRIX_WPSR_NO_WPV (0 << 0)
50#define AT91_MATRIX_WPSR_WPV (1 << 0)
51#define AT91_MATRIX_WPSR_WPVSRC (0xFFFF << 8) /* Write Protect Violation Source */
52
53#endif
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h
deleted file mode 100644
index ce7c80a44983..000000000000
--- a/arch/arm/mach-at91/include/mach/cpu.h
+++ /dev/null
@@ -1,216 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/cpu.h
3 *
4 * Copyright (C) 2006 SAN People
5 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13
14#ifndef __MACH_CPU_H__
15#define __MACH_CPU_H__
16
17#define ARCH_ID_AT91RM9200 0x09290780
18#define ARCH_ID_AT91SAM9260 0x019803a0
19#define ARCH_ID_AT91SAM9261 0x019703a0
20#define ARCH_ID_AT91SAM9263 0x019607a0
21#define ARCH_ID_AT91SAM9G10 0x019903a0
22#define ARCH_ID_AT91SAM9G20 0x019905a0
23#define ARCH_ID_AT91SAM9RL64 0x019b03a0
24#define ARCH_ID_AT91SAM9G45 0x819b05a0
25#define ARCH_ID_AT91SAM9G45MRL 0x819b05a2 /* aka 9G45-ES2 & non ES lots */
26#define ARCH_ID_AT91SAM9G45ES 0x819b05a1 /* 9G45-ES (Engineering Sample) */
27#define ARCH_ID_AT91SAM9X5 0x819a05a0
28#define ARCH_ID_AT91SAM9N12 0x819a07a0
29
30#define ARCH_ID_AT91SAM9XE128 0x329973a0
31#define ARCH_ID_AT91SAM9XE256 0x329a93a0
32#define ARCH_ID_AT91SAM9XE512 0x329aa3a0
33
34#define ARCH_ID_AT91M40800 0x14080044
35#define ARCH_ID_AT91R40807 0x44080746
36#define ARCH_ID_AT91M40807 0x14080745
37#define ARCH_ID_AT91R40008 0x44000840
38
39#define ARCH_ID_SAMA5 0x8A5C07C0
40
41#define ARCH_EXID_AT91SAM9M11 0x00000001
42#define ARCH_EXID_AT91SAM9M10 0x00000002
43#define ARCH_EXID_AT91SAM9G46 0x00000003
44#define ARCH_EXID_AT91SAM9G45 0x00000004
45
46#define ARCH_EXID_AT91SAM9G15 0x00000000
47#define ARCH_EXID_AT91SAM9G35 0x00000001
48#define ARCH_EXID_AT91SAM9X35 0x00000002
49#define ARCH_EXID_AT91SAM9G25 0x00000003
50#define ARCH_EXID_AT91SAM9X25 0x00000004
51
52#define ARCH_EXID_SAMA5D3 0x00004300
53#define ARCH_EXID_SAMA5D31 0x00444300
54#define ARCH_EXID_SAMA5D33 0x00414300
55#define ARCH_EXID_SAMA5D34 0x00414301
56#define ARCH_EXID_SAMA5D35 0x00584300
57#define ARCH_EXID_SAMA5D36 0x00004301
58
59#define ARCH_EXID_SAMA5D4 0x00000007
60#define ARCH_EXID_SAMA5D41 0x00000001
61#define ARCH_EXID_SAMA5D42 0x00000002
62#define ARCH_EXID_SAMA5D43 0x00000003
63#define ARCH_EXID_SAMA5D44 0x00000004
64
65#define ARCH_FAMILY_AT91SAM9 0x01900000
66#define ARCH_FAMILY_AT91SAM9XE 0x02900000
67
68/* RM9200 type */
69#define ARCH_REVISON_9200_BGA (0 << 0)
70#define ARCH_REVISON_9200_PQFP (1 << 0)
71
72#ifndef __ASSEMBLY__
73enum at91_soc_type {
74 /* 920T */
75 AT91_SOC_RM9200,
76
77 /* SAM92xx */
78 AT91_SOC_SAM9260, AT91_SOC_SAM9261, AT91_SOC_SAM9263,
79
80 /* SAM9Gxx */
81 AT91_SOC_SAM9G10, AT91_SOC_SAM9G20, AT91_SOC_SAM9G45,
82
83 /* SAM9RL */
84 AT91_SOC_SAM9RL,
85
86 /* SAM9X5 */
87 AT91_SOC_SAM9X5,
88
89 /* SAM9N12 */
90 AT91_SOC_SAM9N12,
91
92 /* SAMA5D3 */
93 AT91_SOC_SAMA5D3,
94
95 /* SAMA5D4 */
96 AT91_SOC_SAMA5D4,
97
98 /* Unknown type */
99 AT91_SOC_UNKNOWN,
100};
101
102enum at91_soc_subtype {
103 /* RM9200 */
104 AT91_SOC_RM9200_BGA, AT91_SOC_RM9200_PQFP,
105
106 /* SAM9260 */
107 AT91_SOC_SAM9XE,
108
109 /* SAM9G45 */
110 AT91_SOC_SAM9G45ES, AT91_SOC_SAM9M10, AT91_SOC_SAM9G46, AT91_SOC_SAM9M11,
111
112 /* SAM9X5 */
113 AT91_SOC_SAM9G15, AT91_SOC_SAM9G35, AT91_SOC_SAM9X35,
114 AT91_SOC_SAM9G25, AT91_SOC_SAM9X25,
115
116 /* SAMA5D3 */
117 AT91_SOC_SAMA5D31, AT91_SOC_SAMA5D33, AT91_SOC_SAMA5D34,
118 AT91_SOC_SAMA5D35, AT91_SOC_SAMA5D36,
119
120 /* SAMA5D4 */
121 AT91_SOC_SAMA5D41, AT91_SOC_SAMA5D42, AT91_SOC_SAMA5D43,
122 AT91_SOC_SAMA5D44,
123
124 /* No subtype for this SoC */
125 AT91_SOC_SUBTYPE_NONE,
126
127 /* Unknown subtype */
128 AT91_SOC_SUBTYPE_UNKNOWN,
129};
130
131struct at91_socinfo {
132 unsigned int type, subtype;
133 unsigned int cidr, exid;
134};
135
136extern struct at91_socinfo at91_soc_initdata;
137const char *at91_get_soc_type(struct at91_socinfo *c);
138const char *at91_get_soc_subtype(struct at91_socinfo *c);
139
140static inline int at91_soc_is_detected(void)
141{
142 return at91_soc_initdata.type != AT91_SOC_UNKNOWN;
143}
144
145#ifdef CONFIG_SOC_AT91RM9200
146#define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)
147#define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
148#define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)
149#else
150#define cpu_is_at91rm9200() (0)
151#define cpu_is_at91rm9200_bga() (0)
152#define cpu_is_at91rm9200_pqfp() (0)
153#endif
154
155#ifdef CONFIG_SOC_AT91SAM9
156#define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
157#define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)
158#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
159#define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261)
160#define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)
161#define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)
162#define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)
163#define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)
164#define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
165#define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)
166#define cpu_is_at91sam9g46() (at91_soc_initdata.subtype == AT91_SOC_SAM9G46)
167#define cpu_is_at91sam9m11() (at91_soc_initdata.subtype == AT91_SOC_SAM9M11)
168#define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)
169#define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
170#define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)
171#define cpu_is_at91sam9x35() (at91_soc_initdata.subtype == AT91_SOC_SAM9X35)
172#define cpu_is_at91sam9g25() (at91_soc_initdata.subtype == AT91_SOC_SAM9G25)
173#define cpu_is_at91sam9x25() (at91_soc_initdata.subtype == AT91_SOC_SAM9X25)
174#define cpu_is_at91sam9n12() (at91_soc_initdata.type == AT91_SOC_SAM9N12)
175#else
176#define cpu_is_at91sam9xe() (0)
177#define cpu_is_at91sam9260() (0)
178#define cpu_is_at91sam9g20() (0)
179#define cpu_is_at91sam9261() (0)
180#define cpu_is_at91sam9g10() (0)
181#define cpu_is_at91sam9263() (0)
182#define cpu_is_at91sam9rl() (0)
183#define cpu_is_at91sam9g45() (0)
184#define cpu_is_at91sam9g45es() (0)
185#define cpu_is_at91sam9m10() (0)
186#define cpu_is_at91sam9g46() (0)
187#define cpu_is_at91sam9m11() (0)
188#define cpu_is_at91sam9x5() (0)
189#define cpu_is_at91sam9g15() (0)
190#define cpu_is_at91sam9g35() (0)
191#define cpu_is_at91sam9x35() (0)
192#define cpu_is_at91sam9g25() (0)
193#define cpu_is_at91sam9x25() (0)
194#define cpu_is_at91sam9n12() (0)
195#endif
196
197#ifdef CONFIG_SOC_SAMA5D3
198#define cpu_is_sama5d3() (at91_soc_initdata.type == AT91_SOC_SAMA5D3)
199#else
200#define cpu_is_sama5d3() (0)
201#endif
202
203#ifdef CONFIG_SOC_SAMA5D4
204#define cpu_is_sama5d4() (at91_soc_initdata.type == AT91_SOC_SAMA5D4)
205#else
206#define cpu_is_sama5d4() (0)
207#endif
208
209/*
210 * Since this is ARM, we will never run on any AVR32 CPU. But these
211 * definitions may reduce clutter in common drivers.
212 */
213#define cpu_is_at32ap7000() (0)
214#endif /* __ASSEMBLY__ */
215
216#endif /* __MACH_CPU_H__ */
diff --git a/arch/arm/mach-at91/include/mach/hardware.h b/arch/arm/mach-at91/include/mach/hardware.h
deleted file mode 100644
index cacbaa52418f..000000000000
--- a/arch/arm/mach-at91/include/mach/hardware.h
+++ /dev/null
@@ -1,134 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/hardware.h
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19/* DBGU base */
20/* rm9200, 9260/9g20, 9261/9g10, 9rl */
21#define AT91_BASE_DBGU0 0xfffff200
22/* 9263, 9g45, sama5d3 */
23#define AT91_BASE_DBGU1 0xffffee00
24/* sama5d4 */
25#define AT91_BASE_DBGU2 0xfc069000
26
27#include <mach/at91rm9200.h>
28#include <mach/at91sam9260.h>
29#include <mach/at91sam9261.h>
30#include <mach/at91sam9263.h>
31#include <mach/at91sam9rl.h>
32#include <mach/at91sam9g45.h>
33#include <mach/at91sam9x5.h>
34#include <mach/at91sam9n12.h>
35#include <mach/sama5d3.h>
36#include <mach/sama5d4.h>
37
38/*
39 * On all at91 except rm9200 and x40 have the System Controller starts
40 * at address 0xffffc000 and has a size of 16KiB.
41 *
42 * On rm9200 it's start at 0xfffe4000 of 111KiB with non reserved data starting
43 * at 0xfffff000
44 *
45 * Removes the individual definitions of AT91_BASE_SYS and
46 * replaces them with a common version at base 0xfffffc000 and size 16KiB
47 * and map the same memory space
48 */
49#define AT91_BASE_SYS 0xffffc000
50
51/*
52 * On sama5d4 there is no system controller, we map some needed peripherals
53 */
54#define AT91_ALT_BASE_SYS 0xfc069000
55
56/*
57 * On all at91 have the Advanced Interrupt Controller starts at address
58 * 0xfffff000 and the Power Management Controller starts at 0xfffffc00
59 */
60#define AT91_AIC 0xfffff000
61#define AT91_PMC 0xfffffc00
62
63/*
64 * Peripheral identifiers/interrupts.
65 */
66#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
67#define AT91_ID_SYS 1 /* System Peripherals */
68
69#ifdef CONFIG_MMU
70/*
71 * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF
72 * to 0xFEF78000 .. 0xFF000000. (544Kb)
73 */
74#define AT91_IO_PHYS_BASE 0xFFF78000
75#define AT91_IO_VIRT_BASE IOMEM(0xFF000000 - AT91_IO_SIZE)
76
77/*
78 * On sama5d4, remap the peripherals from address 0xFC069000 .. 0xFC06F000
79 * to 0xFB069000 .. 0xFB06F000. (24Kb)
80 */
81#define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS
82#define AT91_ALT_IO_VIRT_BASE IOMEM(0xFB069000)
83#else
84/*
85 * Identity mapping for the non MMU case.
86 */
87#define AT91_IO_PHYS_BASE AT91_BASE_SYS
88#define AT91_IO_VIRT_BASE IOMEM(AT91_IO_PHYS_BASE)
89
90#define AT91_ALT_IO_PHYS_BASE AT91_ALT_BASE_SYS
91#define AT91_ALT_IO_VIRT_BASE IOMEM(AT91_ALT_BASE_SYS)
92#endif
93
94#define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
95
96 /* Convert a physical IO address to virtual IO address */
97#define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE)
98#define AT91_ALT_IO_P2V(x) ((x) - AT91_ALT_IO_PHYS_BASE + AT91_ALT_IO_VIRT_BASE)
99
100/*
101 * Virtual to Physical Address mapping for IO devices.
102 */
103#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
104#define AT91_ALT_VA_BASE_SYS AT91_ALT_IO_P2V(AT91_ALT_BASE_SYS)
105
106 /* Internal SRAM is mapped below the IO devices */
107#define AT91_SRAM_MAX SZ_1M
108#define AT91_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_MAX)
109
110/* External Memory Map */
111#define AT91_CHIPSELECT_0 0x10000000
112#define AT91_CHIPSELECT_1 0x20000000
113#define AT91_CHIPSELECT_2 0x30000000
114#define AT91_CHIPSELECT_3 0x40000000
115#define AT91_CHIPSELECT_4 0x50000000
116#define AT91_CHIPSELECT_5 0x60000000
117#define AT91_CHIPSELECT_6 0x70000000
118#define AT91_CHIPSELECT_7 0x80000000
119
120/* Clocks */
121#define AT91_SLOW_CLOCK 32768 /* slow clock */
122
123/*
124 * FIXME: this is needed to communicate between the pinctrl driver and
125 * the PM implementation in the machine. Possibly part of the PM
126 * implementation should be moved down into the pinctrl driver and get
127 * called as part of the generic suspend/resume path.
128 */
129#ifndef __ASSEMBLY__
130extern void at91_pinctrl_gpio_suspend(void);
131extern void at91_pinctrl_gpio_resume(void);
132#endif
133
134#endif
diff --git a/arch/arm/mach-at91/include/mach/sama5d3.h b/arch/arm/mach-at91/include/mach/sama5d3.h
deleted file mode 100644
index 25613d8c6dcd..000000000000
--- a/arch/arm/mach-at91/include/mach/sama5d3.h
+++ /dev/null
@@ -1,86 +0,0 @@
1/*
2 * Chip-specific header file for the SAMA5D3 family
3 *
4 * Copyright (C) 2013 Atmel,
5 * 2013 Ludovic Desroches <ludovic.desroches@atmel.com>
6 *
7 * Common definitions.
8 * Based on SAMA5D3 datasheet.
9 *
10 * Licensed under GPLv2 or later.
11 */
12
13#ifndef SAMA5D3_H
14#define SAMA5D3_H
15
16/*
17 * Peripheral identifiers/interrupts.
18 */
19#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
20#define AT91_ID_SYS 1 /* System Peripherals */
21#define SAMA5D3_ID_DBGU 2 /* debug Unit (usually no special interrupt line) */
22#define AT91_ID_PIT 3 /* PIT */
23#define SAMA5D3_ID_WDT 4 /* Watchdog Timer Interrupt */
24#define SAMA5D3_ID_HSMC 5 /* Static Memory Controller */
25#define SAMA5D3_ID_PIOA 6 /* PIOA */
26#define SAMA5D3_ID_PIOB 7 /* PIOB */
27#define SAMA5D3_ID_PIOC 8 /* PIOC */
28#define SAMA5D3_ID_PIOD 9 /* PIOD */
29#define SAMA5D3_ID_PIOE 10 /* PIOE */
30#define SAMA5D3_ID_SMD 11 /* SMD Soft Modem */
31#define SAMA5D3_ID_USART0 12 /* USART0 */
32#define SAMA5D3_ID_USART1 13 /* USART1 */
33#define SAMA5D3_ID_USART2 14 /* USART2 */
34#define SAMA5D3_ID_USART3 15 /* USART3 */
35#define SAMA5D3_ID_UART0 16 /* UART 0 */
36#define SAMA5D3_ID_UART1 17 /* UART 1 */
37#define SAMA5D3_ID_TWI0 18 /* Two-Wire Interface 0 */
38#define SAMA5D3_ID_TWI1 19 /* Two-Wire Interface 1 */
39#define SAMA5D3_ID_TWI2 20 /* Two-Wire Interface 2 */
40#define SAMA5D3_ID_HSMCI0 21 /* MCI */
41#define SAMA5D3_ID_HSMCI1 22 /* MCI */
42#define SAMA5D3_ID_HSMCI2 23 /* MCI */
43#define SAMA5D3_ID_SPI0 24 /* Serial Peripheral Interface 0 */
44#define SAMA5D3_ID_SPI1 25 /* Serial Peripheral Interface 1 */
45#define SAMA5D3_ID_TC0 26 /* Timer Counter 0 */
46#define SAMA5D3_ID_TC1 27 /* Timer Counter 2 */
47#define SAMA5D3_ID_PWM 28 /* Pulse Width Modulation Controller */
48#define SAMA5D3_ID_ADC 29 /* Touch Screen ADC Controller */
49#define SAMA5D3_ID_DMA0 30 /* DMA Controller 0 */
50#define SAMA5D3_ID_DMA1 31 /* DMA Controller 1 */
51#define SAMA5D3_ID_UHPHS 32 /* USB Host High Speed */
52#define SAMA5D3_ID_UDPHS 33 /* USB Device High Speed */
53#define SAMA5D3_ID_GMAC 34 /* Gigabit Ethernet MAC */
54#define SAMA5D3_ID_EMAC 35 /* Ethernet MAC */
55#define SAMA5D3_ID_LCDC 36 /* LCD Controller */
56#define SAMA5D3_ID_ISI 37 /* Image Sensor Interface */
57#define SAMA5D3_ID_SSC0 38 /* Synchronous Serial Controller 0 */
58#define SAMA5D3_ID_SSC1 39 /* Synchronous Serial Controller 1 */
59#define SAMA5D3_ID_CAN0 40 /* CAN Controller 0 */
60#define SAMA5D3_ID_CAN1 41 /* CAN Controller 1 */
61#define SAMA5D3_ID_SHA 42 /* Secure Hash Algorithm */
62#define SAMA5D3_ID_AES 43 /* Advanced Encryption Standard */
63#define SAMA5D3_ID_TDES 44 /* Triple Data Encryption Standard */
64#define SAMA5D3_ID_TRNG 45 /* True Random Generator Number */
65#define SAMA5D3_ID_IRQ0 47 /* Advanced Interrupt Controller (IRQ0) */
66
67/*
68 * User Peripheral physical base addresses.
69 */
70#define SAMA5D3_BASE_USART0 0xf001c000
71#define SAMA5D3_BASE_USART1 0xf0020000
72#define SAMA5D3_BASE_USART2 0xf8020000
73#define SAMA5D3_BASE_USART3 0xf8024000
74
75/*
76 * System Peripherals
77 */
78#define SAMA5D3_BASE_RTC 0xfffffeb0
79
80/*
81 * Internal Memory
82 */
83#define SAMA5D3_SRAM_BASE 0x00300000 /* Internal SRAM base address */
84#define SAMA5D3_SRAM_SIZE (128 * SZ_1K) /* Internal SRAM size (128Kb) */
85
86#endif
diff --git a/arch/arm/mach-at91/include/mach/sama5d4.h b/arch/arm/mach-at91/include/mach/sama5d4.h
deleted file mode 100644
index f256a45d9854..000000000000
--- a/arch/arm/mach-at91/include/mach/sama5d4.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Chip-specific header file for the SAMA5D4 family
3 *
4 * Copyright (C) 2013 Atmel Corporation,
5 * Nicolas Ferre <nicolas.ferre@atmel.com>
6 *
7 * Common definitions.
8 * Based on SAMA5D4 datasheet.
9 *
10 * Licensed under GPLv2 or later.
11 */
12
13#ifndef SAMA5D4_H
14#define SAMA5D4_H
15
16/*
17 * User Peripheral physical base addresses.
18 */
19#define SAMA5D4_BASE_USART3 0xfc00c000 /* (USART3 non-secure) Base Address */
20#define SAMA5D4_BASE_PMC 0xf0018000 /* (PMC) Base Address */
21#define SAMA5D4_BASE_MPDDRC 0xf0010000 /* (MPDDRC) Base Address */
22#define SAMA5D4_BASE_PIOD 0xfc068000 /* (PIOD) Base Address */
23
24/* Some other peripherals */
25#define SAMA5D4_BASE_SYS2 SAMA5D4_BASE_PIOD
26
27/*
28 * Internal Memory.
29 */
30#define SAMA5D4_NS_SRAM_BASE 0x00210000 /* Internal SRAM base address Non-Secure */
31#define SAMA5D4_NS_SRAM_SIZE (64 * SZ_1K) /* Internal SRAM size Non-Secure part (64Kb) */
32
33#endif
diff --git a/arch/arm/mach-at91/include/mach/uncompress.h b/arch/arm/mach-at91/include/mach/uncompress.h
deleted file mode 100644
index 4ebb609369e3..000000000000
--- a/arch/arm/mach-at91/include/mach/uncompress.h
+++ /dev/null
@@ -1,218 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/uncompress.h
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __ASM_ARCH_UNCOMPRESS_H
23#define __ASM_ARCH_UNCOMPRESS_H
24
25#include <linux/io.h>
26#include <linux/atmel_serial.h>
27#include <mach/hardware.h>
28
29#include <mach/at91_dbgu.h>
30#include <mach/cpu.h>
31
32void __iomem *at91_uart;
33
34static const u32 uarts_rm9200[] = {
35 AT91_BASE_DBGU0,
36 AT91RM9200_BASE_US0,
37 AT91RM9200_BASE_US1,
38 AT91RM9200_BASE_US2,
39 AT91RM9200_BASE_US3,
40 0,
41};
42
43static const u32 uarts_sam9260[] = {
44 AT91_BASE_DBGU0,
45 AT91SAM9260_BASE_US0,
46 AT91SAM9260_BASE_US1,
47 AT91SAM9260_BASE_US2,
48 AT91SAM9260_BASE_US3,
49 AT91SAM9260_BASE_US4,
50 AT91SAM9260_BASE_US5,
51 0,
52};
53
54static const u32 uarts_sam9261[] = {
55 AT91_BASE_DBGU0,
56 AT91SAM9261_BASE_US0,
57 AT91SAM9261_BASE_US1,
58 AT91SAM9261_BASE_US2,
59 0,
60};
61
62static const u32 uarts_sam9263[] = {
63 AT91_BASE_DBGU1,
64 AT91SAM9263_BASE_US0,
65 AT91SAM9263_BASE_US1,
66 AT91SAM9263_BASE_US2,
67 0,
68};
69
70static const u32 uarts_sam9g45[] = {
71 AT91_BASE_DBGU1,
72 AT91SAM9G45_BASE_US0,
73 AT91SAM9G45_BASE_US1,
74 AT91SAM9G45_BASE_US2,
75 AT91SAM9G45_BASE_US3,
76 0,
77};
78
79static const u32 uarts_sam9rl[] = {
80 AT91_BASE_DBGU0,
81 AT91SAM9RL_BASE_US0,
82 AT91SAM9RL_BASE_US1,
83 AT91SAM9RL_BASE_US2,
84 AT91SAM9RL_BASE_US3,
85 0,
86};
87
88static const u32 uarts_sam9x5[] = {
89 AT91_BASE_DBGU0,
90 AT91SAM9X5_BASE_USART0,
91 AT91SAM9X5_BASE_USART1,
92 AT91SAM9X5_BASE_USART2,
93 0,
94};
95
96static const u32 uarts_sama5d3[] = {
97 AT91_BASE_DBGU1,
98 SAMA5D3_BASE_USART0,
99 SAMA5D3_BASE_USART1,
100 SAMA5D3_BASE_USART2,
101 SAMA5D3_BASE_USART3,
102 0,
103};
104
105static const u32 uarts_sama5d4[] = {
106 AT91_BASE_DBGU2,
107 SAMA5D4_BASE_USART3,
108 0,
109};
110
111static inline const u32* decomp_soc_detect(void __iomem *dbgu_base)
112{
113 u32 cidr, socid;
114
115 cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR);
116 socid = cidr & ~AT91_CIDR_VERSION;
117
118 switch (socid) {
119 case ARCH_ID_AT91RM9200:
120 return uarts_rm9200;
121
122 case ARCH_ID_AT91SAM9G20:
123 case ARCH_ID_AT91SAM9260:
124 return uarts_sam9260;
125
126 case ARCH_ID_AT91SAM9261:
127 return uarts_sam9261;
128
129 case ARCH_ID_AT91SAM9263:
130 return uarts_sam9263;
131
132 case ARCH_ID_AT91SAM9G45:
133 return uarts_sam9g45;
134
135 case ARCH_ID_AT91SAM9RL64:
136 return uarts_sam9rl;
137
138 case ARCH_ID_AT91SAM9N12:
139 case ARCH_ID_AT91SAM9X5:
140 return uarts_sam9x5;
141
142 case ARCH_ID_SAMA5:
143 cidr = __raw_readl(dbgu_base + AT91_DBGU_EXID);
144 if (cidr & ARCH_EXID_SAMA5D3)
145 return uarts_sama5d3;
146 else if (cidr & ARCH_EXID_SAMA5D4)
147 return uarts_sama5d4;
148
149 break;
150 }
151
152 /* at91sam9g10 */
153 if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
154 return uarts_sam9261;
155 }
156 /* at91sam9xe */
157 else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) {
158 return uarts_sam9260;
159 }
160
161 return NULL;
162}
163
164static inline void arch_decomp_setup(void)
165{
166 int i = 0;
167 const u32* usarts;
168
169 usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU0);
170 if (!usarts)
171 usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU1);
172 if (!usarts)
173 usarts = decomp_soc_detect((void __iomem *)AT91_BASE_DBGU2);
174 if (!usarts) {
175 at91_uart = NULL;
176 return;
177 }
178
179 do {
180 /* physical address */
181 at91_uart = (void __iomem *)usarts[i];
182
183 if (__raw_readl(at91_uart + ATMEL_US_BRGR))
184 return;
185 i++;
186 } while (usarts[i]);
187
188 at91_uart = NULL;
189}
190
191/*
192 * The following code assumes the serial port has already been
193 * initialized by the bootloader. If you didn't setup a port in
194 * your bootloader then nothing will appear (which might be desired).
195 *
196 * This does not append a newline
197 */
198static void putc(int c)
199{
200 if (!at91_uart)
201 return;
202
203 while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY))
204 barrier();
205 __raw_writel(c, at91_uart + ATMEL_US_THR);
206}
207
208static inline void flush(void)
209{
210 if (!at91_uart)
211 return;
212
213 /* wait for transmission to complete */
214 while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
215 barrier();
216}
217
218#endif
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index aa4116e9452f..5062699cbb12 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -29,19 +29,26 @@
29#include <linux/atomic.h> 29#include <linux/atomic.h>
30#include <asm/mach/time.h> 30#include <asm/mach/time.h>
31#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
32 32#include <asm/fncpy.h>
33#include <mach/cpu.h> 33#include <asm/cacheflush.h>
34#include <mach/hardware.h>
35 34
36#include "generic.h" 35#include "generic.h"
37#include "pm.h" 36#include "pm.h"
38 37
38/*
39 * FIXME: this is needed to communicate between the pinctrl driver and
40 * the PM implementation in the machine. Possibly part of the PM
41 * implementation should be moved down into the pinctrl driver and get
42 * called as part of the generic suspend/resume path.
43 */
44extern void at91_pinctrl_gpio_suspend(void);
45extern void at91_pinctrl_gpio_resume(void);
46
39static struct { 47static struct {
40 unsigned long uhp_udp_mask; 48 unsigned long uhp_udp_mask;
41 int memctrl; 49 int memctrl;
42} at91_pm_data; 50} at91_pm_data;
43 51
44static void (*at91_pm_standby)(void);
45void __iomem *at91_ramc_base[2]; 52void __iomem *at91_ramc_base[2];
46 53
47static int at91_pm_valid_state(suspend_state_t state) 54static int at91_pm_valid_state(suspend_state_t state)
@@ -119,76 +126,67 @@ int at91_suspend_entering_slow_clock(void)
119} 126}
120EXPORT_SYMBOL(at91_suspend_entering_slow_clock); 127EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
121 128
122 129static void (*at91_suspend_sram_fn)(void __iomem *pmc, void __iomem *ramc0,
123static void (*slow_clock)(void __iomem *pmc, void __iomem *ramc0,
124 void __iomem *ramc1, int memctrl); 130 void __iomem *ramc1, int memctrl);
125 131
126#ifdef CONFIG_AT91_SLOW_CLOCK 132extern void at91_pm_suspend_in_sram(void __iomem *pmc, void __iomem *ramc0,
127extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0,
128 void __iomem *ramc1, int memctrl); 133 void __iomem *ramc1, int memctrl);
129extern u32 at91_slow_clock_sz; 134extern u32 at91_pm_suspend_in_sram_sz;
130#endif 135
136static void at91_pm_suspend(suspend_state_t state)
137{
138 unsigned int pm_data = at91_pm_data.memctrl;
139
140 pm_data |= (state == PM_SUSPEND_MEM) ?
141 AT91_PM_MODE(AT91_PM_SLOW_CLOCK) : 0;
142
143 flush_cache_all();
144 outer_disable();
145
146 at91_suspend_sram_fn(at91_pmc_base, at91_ramc_base[0],
147 at91_ramc_base[1], pm_data);
148
149 outer_resume();
150}
131 151
132static int at91_pm_enter(suspend_state_t state) 152static int at91_pm_enter(suspend_state_t state)
133{ 153{
134 at91_pinctrl_gpio_suspend(); 154 at91_pinctrl_gpio_suspend();
135 155
136 switch (state) { 156 switch (state) {
157 /*
158 * Suspend-to-RAM is like STANDBY plus slow clock mode, so
159 * drivers must suspend more deeply, the master clock switches
160 * to the clk32k and turns off the main oscillator
161 */
162 case PM_SUSPEND_MEM:
137 /* 163 /*
138 * Suspend-to-RAM is like STANDBY plus slow clock mode, so 164 * Ensure that clocks are in a valid state.
139 * drivers must suspend more deeply: only the master clock
140 * controller may be using the main oscillator.
141 */ 165 */
142 case PM_SUSPEND_MEM: 166 if (!at91_pm_verify_clocks())
143 /* 167 goto error;
144 * Ensure that clocks are in a valid state.
145 */
146 if (!at91_pm_verify_clocks())
147 goto error;
148
149 /*
150 * Enter slow clock mode by switching over to clk32k and
151 * turning off the main oscillator; reverse on wakeup.
152 */
153 if (slow_clock) {
154#ifdef CONFIG_AT91_SLOW_CLOCK
155 /* copy slow_clock handler to SRAM, and call it */
156 memcpy(slow_clock, at91_slow_clock, at91_slow_clock_sz);
157#endif
158 slow_clock(at91_pmc_base, at91_ramc_base[0],
159 at91_ramc_base[1],
160 at91_pm_data.memctrl);
161 break;
162 } else {
163 pr_info("AT91: PM - no slow clock mode enabled ...\n");
164 /* FALLTHROUGH leaving master clock alone */
165 }
166 168
167 /* 169 at91_pm_suspend(state);
168 * STANDBY mode has *all* drivers suspended; ignores irqs not
169 * marked as 'wakeup' event sources; and reduces DRAM power.
170 * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and
171 * nothing fancy done with main or cpu clocks.
172 */
173 case PM_SUSPEND_STANDBY:
174 /*
175 * NOTE: the Wait-for-Interrupt instruction needs to be
176 * in icache so no SDRAM accesses are needed until the
177 * wakeup IRQ occurs and self-refresh is terminated.
178 * For ARM 926 based chips, this requirement is weaker
179 * as at91sam9 can access a RAM in self-refresh mode.
180 */
181 if (at91_pm_standby)
182 at91_pm_standby();
183 break;
184 170
185 case PM_SUSPEND_ON: 171 break;
186 cpu_do_idle();
187 break;
188 172
189 default: 173 /*
190 pr_debug("AT91: PM - bogus suspend state %d\n", state); 174 * STANDBY mode has *all* drivers suspended; ignores irqs not
191 goto error; 175 * marked as 'wakeup' event sources; and reduces DRAM power.
176 * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and
177 * nothing fancy done with main or cpu clocks.
178 */
179 case PM_SUSPEND_STANDBY:
180 at91_pm_suspend(state);
181 break;
182
183 case PM_SUSPEND_ON:
184 cpu_do_idle();
185 break;
186
187 default:
188 pr_debug("AT91: PM - bogus suspend state %d\n", state);
189 goto error;
192 } 190 }
193 191
194error: 192error:
@@ -218,12 +216,99 @@ static struct platform_device at91_cpuidle_device = {
218 .name = "cpuidle-at91", 216 .name = "cpuidle-at91",
219}; 217};
220 218
221void at91_pm_set_standby(void (*at91_standby)(void)) 219static void at91_pm_set_standby(void (*at91_standby)(void))
222{ 220{
223 if (at91_standby) { 221 if (at91_standby)
224 at91_cpuidle_device.dev.platform_data = at91_standby; 222 at91_cpuidle_device.dev.platform_data = at91_standby;
225 at91_pm_standby = at91_standby; 223}
224
225/*
226 * The AT91RM9200 goes into self-refresh mode with this command, and will
227 * terminate self-refresh automatically on the next SDRAM access.
228 *
229 * Self-refresh mode is exited as soon as a memory access is made, but we don't
230 * know for sure when that happens. However, we need to restore the low-power
231 * mode if it was enabled before going idle. Restoring low-power mode while
232 * still in self-refresh is "not recommended", but seems to work.
233 */
234static void at91rm9200_standby(void)
235{
236 u32 lpr = at91_ramc_read(0, AT91RM9200_SDRAMC_LPR);
237
238 asm volatile(
239 "b 1f\n\t"
240 ".align 5\n\t"
241 "1: mcr p15, 0, %0, c7, c10, 4\n\t"
242 " str %0, [%1, %2]\n\t"
243 " str %3, [%1, %4]\n\t"
244 " mcr p15, 0, %0, c7, c0, 4\n\t"
245 " str %5, [%1, %2]"
246 :
247 : "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR),
248 "r" (1), "r" (AT91RM9200_SDRAMC_SRR),
249 "r" (lpr));
250}
251
252/* We manage both DDRAM/SDRAM controllers, we need more than one value to
253 * remember.
254 */
255static void at91_ddr_standby(void)
256{
257 /* Those two values allow us to delay self-refresh activation
258 * to the maximum. */
259 u32 lpr0, lpr1 = 0;
260 u32 saved_lpr0, saved_lpr1 = 0;
261
262 if (at91_ramc_base[1]) {
263 saved_lpr1 = at91_ramc_read(1, AT91_DDRSDRC_LPR);
264 lpr1 = saved_lpr1 & ~AT91_DDRSDRC_LPCB;
265 lpr1 |= AT91_DDRSDRC_LPCB_SELF_REFRESH;
266 }
267
268 saved_lpr0 = at91_ramc_read(0, AT91_DDRSDRC_LPR);
269 lpr0 = saved_lpr0 & ~AT91_DDRSDRC_LPCB;
270 lpr0 |= AT91_DDRSDRC_LPCB_SELF_REFRESH;
271
272 /* self-refresh mode now */
273 at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0);
274 if (at91_ramc_base[1])
275 at91_ramc_write(1, AT91_DDRSDRC_LPR, lpr1);
276
277 cpu_do_idle();
278
279 at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0);
280 if (at91_ramc_base[1])
281 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
282}
283
284/* We manage both DDRAM/SDRAM controllers, we need more than one value to
285 * remember.
286 */
287static void at91sam9_sdram_standby(void)
288{
289 u32 lpr0, lpr1 = 0;
290 u32 saved_lpr0, saved_lpr1 = 0;
291
292 if (at91_ramc_base[1]) {
293 saved_lpr1 = at91_ramc_read(1, AT91_SDRAMC_LPR);
294 lpr1 = saved_lpr1 & ~AT91_SDRAMC_LPCB;
295 lpr1 |= AT91_SDRAMC_LPCB_SELF_REFRESH;
226 } 296 }
297
298 saved_lpr0 = at91_ramc_read(0, AT91_SDRAMC_LPR);
299 lpr0 = saved_lpr0 & ~AT91_SDRAMC_LPCB;
300 lpr0 |= AT91_SDRAMC_LPCB_SELF_REFRESH;
301
302 /* self-refresh mode now */
303 at91_ramc_write(0, AT91_SDRAMC_LPR, lpr0);
304 if (at91_ramc_base[1])
305 at91_ramc_write(1, AT91_SDRAMC_LPR, lpr1);
306
307 cpu_do_idle();
308
309 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr0);
310 if (at91_ramc_base[1])
311 at91_ramc_write(1, AT91_SDRAMC_LPR, saved_lpr1);
227} 312}
228 313
229static const struct of_device_id ramc_ids[] __initconst = { 314static const struct of_device_id ramc_ids[] __initconst = {
@@ -263,7 +348,6 @@ static __init void at91_dt_ramc(void)
263 at91_pm_set_standby(standby); 348 at91_pm_set_standby(standby);
264} 349}
265 350
266#ifdef CONFIG_AT91_SLOW_CLOCK
267static void __init at91_pm_sram_init(void) 351static void __init at91_pm_sram_init(void)
268{ 352{
269 struct gen_pool *sram_pool; 353 struct gen_pool *sram_pool;
@@ -291,30 +375,36 @@ static void __init at91_pm_sram_init(void)
291 return; 375 return;
292 } 376 }
293 377
294 sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); 378 sram_base = gen_pool_alloc(sram_pool, at91_pm_suspend_in_sram_sz);
295 if (!sram_base) { 379 if (!sram_base) {
296 pr_warn("%s: unable to alloc ocram!\n", __func__); 380 pr_warn("%s: unable to alloc sram!\n", __func__);
297 return; 381 return;
298 } 382 }
299 383
300 sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); 384 sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base);
301 slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); 385 at91_suspend_sram_fn = __arm_ioremap_exec(sram_pbase,
302} 386 at91_pm_suspend_in_sram_sz, false);
303#endif 387 if (!at91_suspend_sram_fn) {
388 pr_warn("SRAM: Could not map\n");
389 return;
390 }
304 391
392 /* Copy the pm suspend handler to SRAM */
393 at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
394 &at91_pm_suspend_in_sram, at91_pm_suspend_in_sram_sz);
395}
305 396
306static void __init at91_pm_init(void) 397static void __init at91_pm_init(void)
307{ 398{
308#ifdef CONFIG_AT91_SLOW_CLOCK
309 at91_pm_sram_init(); 399 at91_pm_sram_init();
310#endif
311
312 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
313 400
314 if (at91_cpuidle_device.dev.platform_data) 401 if (at91_cpuidle_device.dev.platform_data)
315 platform_device_register(&at91_cpuidle_device); 402 platform_device_register(&at91_cpuidle_device);
316 403
317 suspend_set_ops(&at91_pm_ops); 404 if (at91_suspend_sram_fn)
405 suspend_set_ops(&at91_pm_ops);
406 else
407 pr_info("AT91: PM not supported, due to no SRAM allocated\n");
318} 408}
319 409
320void __init at91rm9200_pm_init(void) 410void __init at91rm9200_pm_init(void)
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h
index 86c0aa819d25..ecd875a91d52 100644
--- a/arch/arm/mach-at91/pm.h
+++ b/arch/arm/mach-at91/pm.h
@@ -15,100 +15,16 @@
15 15
16#include <mach/at91_ramc.h> 16#include <mach/at91_ramc.h>
17 17
18#ifdef CONFIG_PM 18#define AT91_MEMCTRL_MC 0
19extern void at91_pm_set_standby(void (*at91_standby)(void)); 19#define AT91_MEMCTRL_SDRAMC 1
20#else 20#define AT91_MEMCTRL_DDRSDR 2
21static inline void at91_pm_set_standby(void (*at91_standby)(void)) { }
22#endif
23
24/*
25 * The AT91RM9200 goes into self-refresh mode with this command, and will
26 * terminate self-refresh automatically on the next SDRAM access.
27 *
28 * Self-refresh mode is exited as soon as a memory access is made, but we don't
29 * know for sure when that happens. However, we need to restore the low-power
30 * mode if it was enabled before going idle. Restoring low-power mode while
31 * still in self-refresh is "not recommended", but seems to work.
32 */
33
34static inline void at91rm9200_standby(void)
35{
36 u32 lpr = at91_ramc_read(0, AT91RM9200_SDRAMC_LPR);
37
38 asm volatile(
39 "b 1f\n\t"
40 ".align 5\n\t"
41 "1: mcr p15, 0, %0, c7, c10, 4\n\t"
42 " str %0, [%1, %2]\n\t"
43 " str %3, [%1, %4]\n\t"
44 " mcr p15, 0, %0, c7, c0, 4\n\t"
45 " str %5, [%1, %2]"
46 :
47 : "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR),
48 "r" (1), "r" (AT91RM9200_SDRAMC_SRR),
49 "r" (lpr));
50}
51
52/* We manage both DDRAM/SDRAM controllers, we need more than one value to
53 * remember.
54 */
55static inline void at91_ddr_standby(void)
56{
57 /* Those two values allow us to delay self-refresh activation
58 * to the maximum. */
59 u32 lpr0, lpr1 = 0;
60 u32 saved_lpr0, saved_lpr1 = 0;
61
62 if (at91_ramc_base[1]) {
63 saved_lpr1 = at91_ramc_read(1, AT91_DDRSDRC_LPR);
64 lpr1 = saved_lpr1 & ~AT91_DDRSDRC_LPCB;
65 lpr1 |= AT91_DDRSDRC_LPCB_SELF_REFRESH;
66 }
67
68 saved_lpr0 = at91_ramc_read(0, AT91_DDRSDRC_LPR);
69 lpr0 = saved_lpr0 & ~AT91_DDRSDRC_LPCB;
70 lpr0 |= AT91_DDRSDRC_LPCB_SELF_REFRESH;
71
72 /* self-refresh mode now */
73 at91_ramc_write(0, AT91_DDRSDRC_LPR, lpr0);
74 if (at91_ramc_base[1])
75 at91_ramc_write(1, AT91_DDRSDRC_LPR, lpr1);
76
77 cpu_do_idle();
78
79 at91_ramc_write(0, AT91_DDRSDRC_LPR, saved_lpr0);
80 if (at91_ramc_base[1])
81 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
82}
83
84/* We manage both DDRAM/SDRAM controllers, we need more than one value to
85 * remember.
86 */
87static inline void at91sam9_sdram_standby(void)
88{
89 u32 lpr0, lpr1 = 0;
90 u32 saved_lpr0, saved_lpr1 = 0;
91
92 if (at91_ramc_base[1]) {
93 saved_lpr1 = at91_ramc_read(1, AT91_SDRAMC_LPR);
94 lpr1 = saved_lpr1 & ~AT91_SDRAMC_LPCB;
95 lpr1 |= AT91_SDRAMC_LPCB_SELF_REFRESH;
96 }
97
98 saved_lpr0 = at91_ramc_read(0, AT91_SDRAMC_LPR);
99 lpr0 = saved_lpr0 & ~AT91_SDRAMC_LPCB;
100 lpr0 |= AT91_SDRAMC_LPCB_SELF_REFRESH;
101 21
102 /* self-refresh mode now */ 22#define AT91_PM_MEMTYPE_MASK 0x0f
103 at91_ramc_write(0, AT91_SDRAMC_LPR, lpr0);
104 if (at91_ramc_base[1])
105 at91_ramc_write(1, AT91_SDRAMC_LPR, lpr1);
106 23
107 cpu_do_idle(); 24#define AT91_PM_MODE_OFFSET 4
25#define AT91_PM_MODE_MASK 0x01
26#define AT91_PM_MODE(x) (((x) & AT91_PM_MODE_MASK) << AT91_PM_MODE_OFFSET)
108 27
109 at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr0); 28#define AT91_PM_SLOW_CLOCK 0x01
110 if (at91_ramc_base[1])
111 at91_ramc_write(1, AT91_SDRAMC_LPR, saved_lpr1);
112}
113 29
114#endif 30#endif
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S
deleted file mode 100644
index 931f0e302c03..000000000000
--- a/arch/arm/mach-at91/pm_slowclock.S
+++ /dev/null
@@ -1,335 +0,0 @@
1/*
2 * arch/arm/mach-at91/pm_slow_clock.S
3 *
4 * Copyright (C) 2006 Savin Zlobec
5 *
6 * AT91SAM9 support:
7 * Copyright (C) 2007 Anti Sullin <anti.sullin@artecdesign.ee
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#include <linux/linkage.h>
16#include <linux/clk/at91_pmc.h>
17#include <mach/hardware.h>
18#include <mach/at91_ramc.h>
19
20/*
21 * When SLOWDOWN_MASTER_CLOCK is defined we will also slow down the Master
22 * clock during suspend by adjusting its prescalar and divisor.
23 * NOTE: This hasn't been shown to be stable on SAM9s; and on the RM9200 there
24 * are errata regarding adjusting the prescalar and divisor.
25 */
26#undef SLOWDOWN_MASTER_CLOCK
27
28pmc .req r0
29sdramc .req r1
30ramc1 .req r2
31memctrl .req r3
32tmp1 .req r4
33tmp2 .req r5
34
35/*
36 * Wait until master clock is ready (after switching master clock source)
37 */
38 .macro wait_mckrdy
391: ldr tmp1, [pmc, #AT91_PMC_SR]
40 tst tmp1, #AT91_PMC_MCKRDY
41 beq 1b
42 .endm
43
44/*
45 * Wait until master oscillator has stabilized.
46 */
47 .macro wait_moscrdy
481: ldr tmp1, [pmc, #AT91_PMC_SR]
49 tst tmp1, #AT91_PMC_MOSCS
50 beq 1b
51 .endm
52
53/*
54 * Wait until PLLA has locked.
55 */
56 .macro wait_pllalock
571: ldr tmp1, [pmc, #AT91_PMC_SR]
58 tst tmp1, #AT91_PMC_LOCKA
59 beq 1b
60 .endm
61
62/*
63 * Wait until PLLB has locked.
64 */
65 .macro wait_pllblock
661: ldr tmp1, [pmc, #AT91_PMC_SR]
67 tst tmp1, #AT91_PMC_LOCKB
68 beq 1b
69 .endm
70
71 .text
72
73 .arm
74
75/* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc,
76 * void __iomem *ramc1, int memctrl)
77 */
78ENTRY(at91_slow_clock)
79 /* Save registers on stack */
80 stmfd sp!, {r4 - r12, lr}
81
82 /*
83 * Register usage:
84 * R0 = Base address of AT91_PMC
85 * R1 = Base address of RAM Controller (SDRAM, DDRSDR, or AT91_SYS)
86 * R2 = Base address of second RAM Controller or 0 if not present
87 * R3 = Memory controller
88 * R4 = temporary register
89 * R5 = temporary register
90 */
91
92 /* Drain write buffer */
93 mov tmp1, #0
94 mcr p15, 0, tmp1, c7, c10, 4
95
96 cmp memctrl, #AT91_MEMCTRL_MC
97 bne ddr_sr_enable
98
99 /*
100 * at91rm9200 Memory controller
101 */
102 /* Put SDRAM in self-refresh mode */
103 mov tmp1, #1
104 str tmp1, [sdramc, #AT91RM9200_SDRAMC_SRR]
105 b sdr_sr_done
106
107 /*
108 * DDRSDR Memory controller
109 */
110ddr_sr_enable:
111 cmp memctrl, #AT91_MEMCTRL_DDRSDR
112 bne sdr_sr_enable
113
114 /* LPDDR1 --> force DDR2 mode during self-refresh */
115 ldr tmp1, [sdramc, #AT91_DDRSDRC_MDR]
116 str tmp1, .saved_sam9_mdr
117 bic tmp1, tmp1, #~AT91_DDRSDRC_MD
118 cmp tmp1, #AT91_DDRSDRC_MD_LOW_POWER_DDR
119 ldreq tmp1, [sdramc, #AT91_DDRSDRC_MDR]
120 biceq tmp1, tmp1, #AT91_DDRSDRC_MD
121 orreq tmp1, tmp1, #AT91_DDRSDRC_MD_DDR2
122 streq tmp1, [sdramc, #AT91_DDRSDRC_MDR]
123
124 /* prepare for DDRAM self-refresh mode */
125 ldr tmp1, [sdramc, #AT91_DDRSDRC_LPR]
126 str tmp1, .saved_sam9_lpr
127 bic tmp1, #AT91_DDRSDRC_LPCB
128 orr tmp1, #AT91_DDRSDRC_LPCB_SELF_REFRESH
129
130 /* figure out if we use the second ram controller */
131 cmp ramc1, #0
132 beq ddr_no_2nd_ctrl
133
134 ldr tmp2, [ramc1, #AT91_DDRSDRC_MDR]
135 str tmp2, .saved_sam9_mdr1
136 bic tmp2, tmp2, #~AT91_DDRSDRC_MD
137 cmp tmp2, #AT91_DDRSDRC_MD_LOW_POWER_DDR
138 ldreq tmp2, [ramc1, #AT91_DDRSDRC_MDR]
139 biceq tmp2, tmp2, #AT91_DDRSDRC_MD
140 orreq tmp2, tmp2, #AT91_DDRSDRC_MD_DDR2
141 streq tmp2, [ramc1, #AT91_DDRSDRC_MDR]
142
143 ldr tmp2, [ramc1, #AT91_DDRSDRC_LPR]
144 str tmp2, .saved_sam9_lpr1
145 bic tmp2, #AT91_DDRSDRC_LPCB
146 orr tmp2, #AT91_DDRSDRC_LPCB_SELF_REFRESH
147
148 /* Enable DDRAM self-refresh mode */
149 str tmp2, [ramc1, #AT91_DDRSDRC_LPR]
150ddr_no_2nd_ctrl:
151 str tmp1, [sdramc, #AT91_DDRSDRC_LPR]
152
153 b sdr_sr_done
154
155 /*
156 * SDRAMC Memory controller
157 */
158sdr_sr_enable:
159 /* Enable SDRAM self-refresh mode */
160 ldr tmp1, [sdramc, #AT91_SDRAMC_LPR]
161 str tmp1, .saved_sam9_lpr
162
163 bic tmp1, #AT91_SDRAMC_LPCB
164 orr tmp1, #AT91_SDRAMC_LPCB_SELF_REFRESH
165 str tmp1, [sdramc, #AT91_SDRAMC_LPR]
166
167sdr_sr_done:
168 /* Save Master clock setting */
169 ldr tmp1, [pmc, #AT91_PMC_MCKR]
170 str tmp1, .saved_mckr
171
172 /*
173 * Set the Master clock source to slow clock
174 */
175 bic tmp1, tmp1, #AT91_PMC_CSS
176 str tmp1, [pmc, #AT91_PMC_MCKR]
177
178 wait_mckrdy
179
180#ifdef SLOWDOWN_MASTER_CLOCK
181 /*
182 * Set the Master Clock PRES and MDIV fields.
183 *
184 * See AT91RM9200 errata #27 and #28 for details.
185 */
186 mov tmp1, #0
187 str tmp1, [pmc, #AT91_PMC_MCKR]
188
189 wait_mckrdy
190#endif
191
192 /* Save PLLA setting and disable it */
193 ldr tmp1, [pmc, #AT91_CKGR_PLLAR]
194 str tmp1, .saved_pllar
195
196 mov tmp1, #AT91_PMC_PLLCOUNT
197 orr tmp1, tmp1, #(1 << 29) /* bit 29 always set */
198 str tmp1, [pmc, #AT91_CKGR_PLLAR]
199
200 /* Save PLLB setting and disable it */
201 ldr tmp1, [pmc, #AT91_CKGR_PLLBR]
202 str tmp1, .saved_pllbr
203
204 mov tmp1, #AT91_PMC_PLLCOUNT
205 str tmp1, [pmc, #AT91_CKGR_PLLBR]
206
207 /* Turn off the main oscillator */
208 ldr tmp1, [pmc, #AT91_CKGR_MOR]
209 bic tmp1, tmp1, #AT91_PMC_MOSCEN
210 orr tmp1, tmp1, #AT91_PMC_KEY
211 str tmp1, [pmc, #AT91_CKGR_MOR]
212
213 /* Wait for interrupt */
214 mcr p15, 0, tmp1, c7, c0, 4
215
216 /* Turn on the main oscillator */
217 ldr tmp1, [pmc, #AT91_CKGR_MOR]
218 orr tmp1, tmp1, #AT91_PMC_MOSCEN
219 orr tmp1, tmp1, #AT91_PMC_KEY
220 str tmp1, [pmc, #AT91_CKGR_MOR]
221
222 wait_moscrdy
223
224 /* Restore PLLB setting */
225 ldr tmp1, .saved_pllbr
226 str tmp1, [pmc, #AT91_CKGR_PLLBR]
227
228 tst tmp1, #(AT91_PMC_MUL & 0xff0000)
229 bne 1f
230 tst tmp1, #(AT91_PMC_MUL & ~0xff0000)
231 beq 2f
2321:
233 wait_pllblock
2342:
235
236 /* Restore PLLA setting */
237 ldr tmp1, .saved_pllar
238 str tmp1, [pmc, #AT91_CKGR_PLLAR]
239
240 tst tmp1, #(AT91_PMC_MUL & 0xff0000)
241 bne 3f
242 tst tmp1, #(AT91_PMC_MUL & ~0xff0000)
243 beq 4f
2443:
245 wait_pllalock
2464:
247
248#ifdef SLOWDOWN_MASTER_CLOCK
249 /*
250 * First set PRES if it was not 0,
251 * than set CSS and MDIV fields.
252 *
253 * See AT91RM9200 errata #27 and #28 for details.
254 */
255 ldr tmp1, .saved_mckr
256 tst tmp1, #AT91_PMC_PRES
257 beq 2f
258 and tmp1, tmp1, #AT91_PMC_PRES
259 str tmp1, [pmc, #AT91_PMC_MCKR]
260
261 wait_mckrdy
262#endif
263
264 /*
265 * Restore master clock setting
266 */
2672: ldr tmp1, .saved_mckr
268 str tmp1, [pmc, #AT91_PMC_MCKR]
269
270 wait_mckrdy
271
272 /*
273 * at91rm9200 Memory controller
274 * Do nothing - self-refresh is automatically disabled.
275 */
276 cmp memctrl, #AT91_MEMCTRL_MC
277 beq ram_restored
278
279 /*
280 * DDRSDR Memory controller
281 */
282 cmp memctrl, #AT91_MEMCTRL_DDRSDR
283 bne sdr_en_restore
284 /* Restore MDR in case of LPDDR1 */
285 ldr tmp1, .saved_sam9_mdr
286 str tmp1, [sdramc, #AT91_DDRSDRC_MDR]
287 /* Restore LPR on AT91 with DDRAM */
288 ldr tmp1, .saved_sam9_lpr
289 str tmp1, [sdramc, #AT91_DDRSDRC_LPR]
290
291 /* if we use the second ram controller */
292 cmp ramc1, #0
293 ldrne tmp2, .saved_sam9_mdr1
294 strne tmp2, [ramc1, #AT91_DDRSDRC_MDR]
295 ldrne tmp2, .saved_sam9_lpr1
296 strne tmp2, [ramc1, #AT91_DDRSDRC_LPR]
297
298 b ram_restored
299
300 /*
301 * SDRAMC Memory controller
302 */
303sdr_en_restore:
304 /* Restore LPR on AT91 with SDRAM */
305 ldr tmp1, .saved_sam9_lpr
306 str tmp1, [sdramc, #AT91_SDRAMC_LPR]
307
308ram_restored:
309 /* Restore registers, and return */
310 ldmfd sp!, {r4 - r12, pc}
311
312
313.saved_mckr:
314 .word 0
315
316.saved_pllar:
317 .word 0
318
319.saved_pllbr:
320 .word 0
321
322.saved_sam9_lpr:
323 .word 0
324
325.saved_sam9_lpr1:
326 .word 0
327
328.saved_sam9_mdr:
329 .word 0
330
331.saved_sam9_mdr1:
332 .word 0
333
334ENTRY(at91_slow_clock_sz)
335 .word .-at91_slow_clock
diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S
new file mode 100644
index 000000000000..bd22b2c8a051
--- /dev/null
+++ b/arch/arm/mach-at91/pm_suspend.S
@@ -0,0 +1,337 @@
1/*
2 * arch/arm/mach-at91/pm_slow_clock.S
3 *
4 * Copyright (C) 2006 Savin Zlobec
5 *
6 * AT91SAM9 support:
7 * Copyright (C) 2007 Anti Sullin <anti.sullin@artecdesign.ee
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14#include <linux/linkage.h>
15#include <linux/clk/at91_pmc.h>
16#include <mach/at91_ramc.h>
17#include "pm.h"
18
19#define SRAMC_SELF_FRESH_ACTIVE 0x01
20#define SRAMC_SELF_FRESH_EXIT 0x00
21
22pmc .req r0
23tmp1 .req r4
24tmp2 .req r5
25
26/*
27 * Wait until master clock is ready (after switching master clock source)
28 */
29 .macro wait_mckrdy
301: ldr tmp1, [pmc, #AT91_PMC_SR]
31 tst tmp1, #AT91_PMC_MCKRDY
32 beq 1b
33 .endm
34
35/*
36 * Wait until master oscillator has stabilized.
37 */
38 .macro wait_moscrdy
391: ldr tmp1, [pmc, #AT91_PMC_SR]
40 tst tmp1, #AT91_PMC_MOSCS
41 beq 1b
42 .endm
43
44/*
45 * Wait until PLLA has locked.
46 */
47 .macro wait_pllalock
481: ldr tmp1, [pmc, #AT91_PMC_SR]
49 tst tmp1, #AT91_PMC_LOCKA
50 beq 1b
51 .endm
52
53/*
54 * Put the processor to enter the idle state
55 */
56 .macro at91_cpu_idle
57
58#if defined(CONFIG_CPU_V7)
59 mov tmp1, #AT91_PMC_PCK
60 str tmp1, [pmc, #AT91_PMC_SCDR]
61
62 dsb
63
64 wfi @ Wait For Interrupt
65#else
66 mcr p15, 0, tmp1, c7, c0, 4
67#endif
68
69 .endm
70
71 .text
72
73 .arm
74
75/*
76 * void at91_pm_suspend_in_sram(void __iomem *pmc, void __iomem *sdramc,
77 * void __iomem *ramc1, int memctrl)
78 * @input param:
79 * @r0: base address of AT91_PMC
80 * @r1: base address of SDRAM Controller (SDRAM, DDRSDR, or AT91_SYS)
81 * @r2: base address of second SDRAM Controller or 0 if not present
82 * @r3: pm information
83 */
84ENTRY(at91_pm_suspend_in_sram)
85 /* Save registers on stack */
86 stmfd sp!, {r4 - r12, lr}
87
88 /* Drain write buffer */
89 mov tmp1, #0
90 mcr p15, 0, tmp1, c7, c10, 4
91
92 str r0, .pmc_base
93 str r1, .sramc_base
94 str r2, .sramc1_base
95
96 and r0, r3, #AT91_PM_MEMTYPE_MASK
97 str r0, .memtype
98
99 lsr r0, r3, #AT91_PM_MODE_OFFSET
100 and r0, r0, #AT91_PM_MODE_MASK
101 str r0, .pm_mode
102
103 /* Active the self-refresh mode */
104 mov r0, #SRAMC_SELF_FRESH_ACTIVE
105 bl at91_sramc_self_refresh
106
107 ldr r0, .pm_mode
108 tst r0, #AT91_PM_SLOW_CLOCK
109 beq skip_disable_main_clock
110
111 ldr pmc, .pmc_base
112
113 /* Save Master clock setting */
114 ldr tmp1, [pmc, #AT91_PMC_MCKR]
115 str tmp1, .saved_mckr
116
117 /*
118 * Set the Master clock source to slow clock
119 */
120 bic tmp1, tmp1, #AT91_PMC_CSS
121 str tmp1, [pmc, #AT91_PMC_MCKR]
122
123 wait_mckrdy
124
125 /* Save PLLA setting and disable it */
126 ldr tmp1, [pmc, #AT91_CKGR_PLLAR]
127 str tmp1, .saved_pllar
128
129 mov tmp1, #AT91_PMC_PLLCOUNT
130 orr tmp1, tmp1, #(1 << 29) /* bit 29 always set */
131 str tmp1, [pmc, #AT91_CKGR_PLLAR]
132
133 /* Turn off the main oscillator */
134 ldr tmp1, [pmc, #AT91_CKGR_MOR]
135 bic tmp1, tmp1, #AT91_PMC_MOSCEN
136 orr tmp1, tmp1, #AT91_PMC_KEY
137 str tmp1, [pmc, #AT91_CKGR_MOR]
138
139skip_disable_main_clock:
140 ldr pmc, .pmc_base
141
142 /* Wait for interrupt */
143 at91_cpu_idle
144
145 ldr r0, .pm_mode
146 tst r0, #AT91_PM_SLOW_CLOCK
147 beq skip_enable_main_clock
148
149 ldr pmc, .pmc_base
150
151 /* Turn on the main oscillator */
152 ldr tmp1, [pmc, #AT91_CKGR_MOR]
153 orr tmp1, tmp1, #AT91_PMC_MOSCEN
154 orr tmp1, tmp1, #AT91_PMC_KEY
155 str tmp1, [pmc, #AT91_CKGR_MOR]
156
157 wait_moscrdy
158
159 /* Restore PLLA setting */
160 ldr tmp1, .saved_pllar
161 str tmp1, [pmc, #AT91_CKGR_PLLAR]
162
163 tst tmp1, #(AT91_PMC_MUL & 0xff0000)
164 bne 3f
165 tst tmp1, #(AT91_PMC_MUL & ~0xff0000)
166 beq 4f
1673:
168 wait_pllalock
1694:
170
171 /*
172 * Restore master clock setting
173 */
174 ldr tmp1, .saved_mckr
175 str tmp1, [pmc, #AT91_PMC_MCKR]
176
177 wait_mckrdy
178
179skip_enable_main_clock:
180 /* Exit the self-refresh mode */
181 mov r0, #SRAMC_SELF_FRESH_EXIT
182 bl at91_sramc_self_refresh
183
184 /* Restore registers, and return */
185 ldmfd sp!, {r4 - r12, pc}
186ENDPROC(at91_pm_suspend_in_sram)
187
188/*
189 * void at91_sramc_self_refresh(unsigned int is_active)
190 *
191 * @input param:
192 * @r0: 1 - active self-refresh mode
193 * 0 - exit self-refresh mode
194 * register usage:
195 * @r1: memory type
196 * @r2: base address of the sram controller
197 */
198
199ENTRY(at91_sramc_self_refresh)
200 ldr r1, .memtype
201 ldr r2, .sramc_base
202
203 cmp r1, #AT91_MEMCTRL_MC
204 bne ddrc_sf
205
206 /*
207 * at91rm9200 Memory controller
208 */
209
210 /*
211 * For exiting the self-refresh mode, do nothing,
212 * automatically exit the self-refresh mode.
213 */
214 tst r0, #SRAMC_SELF_FRESH_ACTIVE
215 beq exit_sramc_sf
216
217 /* Active SDRAM self-refresh mode */
218 mov r3, #1
219 str r3, [r2, #AT91RM9200_SDRAMC_SRR]
220 b exit_sramc_sf
221
222ddrc_sf:
223 cmp r1, #AT91_MEMCTRL_DDRSDR
224 bne sdramc_sf
225
226 /*
227 * DDR Memory controller
228 */
229 tst r0, #SRAMC_SELF_FRESH_ACTIVE
230 beq ddrc_exit_sf
231
232 /* LPDDR1 --> force DDR2 mode during self-refresh */
233 ldr r3, [r2, #AT91_DDRSDRC_MDR]
234 str r3, .saved_sam9_mdr
235 bic r3, r3, #~AT91_DDRSDRC_MD
236 cmp r3, #AT91_DDRSDRC_MD_LOW_POWER_DDR
237 ldreq r3, [r2, #AT91_DDRSDRC_MDR]
238 biceq r3, r3, #AT91_DDRSDRC_MD
239 orreq r3, r3, #AT91_DDRSDRC_MD_DDR2
240 streq r3, [r2, #AT91_DDRSDRC_MDR]
241
242 /* Active DDRC self-refresh mode */
243 ldr r3, [r2, #AT91_DDRSDRC_LPR]
244 str r3, .saved_sam9_lpr
245 bic r3, r3, #AT91_DDRSDRC_LPCB
246 orr r3, r3, #AT91_DDRSDRC_LPCB_SELF_REFRESH
247 str r3, [r2, #AT91_DDRSDRC_LPR]
248
249 /* If using the 2nd ddr controller */
250 ldr r2, .sramc1_base
251 cmp r2, #0
252 beq no_2nd_ddrc
253
254 ldr r3, [r2, #AT91_DDRSDRC_MDR]
255 str r3, .saved_sam9_mdr1
256 bic r3, r3, #~AT91_DDRSDRC_MD
257 cmp r3, #AT91_DDRSDRC_MD_LOW_POWER_DDR
258 ldreq r3, [r2, #AT91_DDRSDRC_MDR]
259 biceq r3, r3, #AT91_DDRSDRC_MD
260 orreq r3, r3, #AT91_DDRSDRC_MD_DDR2
261 streq r3, [r2, #AT91_DDRSDRC_MDR]
262
263 /* Active DDRC self-refresh mode */
264 ldr r3, [r2, #AT91_DDRSDRC_LPR]
265 str r3, .saved_sam9_lpr1
266 bic r3, r3, #AT91_DDRSDRC_LPCB
267 orr r3, r3, #AT91_DDRSDRC_LPCB_SELF_REFRESH
268 str r3, [r2, #AT91_DDRSDRC_LPR]
269
270no_2nd_ddrc:
271 b exit_sramc_sf
272
273ddrc_exit_sf:
274 /* Restore MDR in case of LPDDR1 */
275 ldr r3, .saved_sam9_mdr
276 str r3, [r2, #AT91_DDRSDRC_MDR]
277 /* Restore LPR on AT91 with DDRAM */
278 ldr r3, .saved_sam9_lpr
279 str r3, [r2, #AT91_DDRSDRC_LPR]
280
281 /* If using the 2nd ddr controller */
282 ldr r2, .sramc1_base
283 cmp r2, #0
284 ldrne r3, .saved_sam9_mdr1
285 strne r3, [r2, #AT91_DDRSDRC_MDR]
286 ldrne r3, .saved_sam9_lpr1
287 strne r3, [r2, #AT91_DDRSDRC_LPR]
288
289 b exit_sramc_sf
290
291 /*
292 * SDRAMC Memory controller
293 */
294sdramc_sf:
295 tst r0, #SRAMC_SELF_FRESH_ACTIVE
296 beq sdramc_exit_sf
297
298 /* Active SDRAMC self-refresh mode */
299 ldr r3, [r2, #AT91_SDRAMC_LPR]
300 str r3, .saved_sam9_lpr
301 bic r3, r3, #AT91_SDRAMC_LPCB
302 orr r3, r3, #AT91_SDRAMC_LPCB_SELF_REFRESH
303 str r3, [r2, #AT91_SDRAMC_LPR]
304
305sdramc_exit_sf:
306 ldr r3, .saved_sam9_lpr
307 str r3, [r2, #AT91_SDRAMC_LPR]
308
309exit_sramc_sf:
310 mov pc, lr
311ENDPROC(at91_sramc_self_refresh)
312
313.pmc_base:
314 .word 0
315.sramc_base:
316 .word 0
317.sramc1_base:
318 .word 0
319.memtype:
320 .word 0
321.pm_mode:
322 .word 0
323.saved_mckr:
324 .word 0
325.saved_pllar:
326 .word 0
327.saved_sam9_lpr:
328 .word 0
329.saved_sam9_lpr1:
330 .word 0
331.saved_sam9_mdr:
332 .word 0
333.saved_sam9_mdr1:
334 .word 0
335
336ENTRY(at91_pm_suspend_in_sram_sz)
337 .word .-at91_pm_suspend_in_sram
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index 03dcb441f3d2..41d829d8e7d5 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -7,48 +7,48 @@
7 * Licensed under GPLv2 or later. 7 * Licensed under GPLv2 or later.
8 */ 8 */
9 9
10#include <linux/types.h>
11#include <linux/init.h>
12#include <linux/module.h>
13#include <linux/gpio.h>
14#include <linux/micrel_phy.h>
15#include <linux/of.h> 10#include <linux/of.h>
16#include <linux/of_irq.h>
17#include <linux/of_platform.h> 11#include <linux/of_platform.h>
18#include <linux/phy.h>
19#include <linux/clk-provider.h>
20#include <linux/phy.h>
21 12
22#include <mach/hardware.h>
23
24#include <asm/setup.h>
25#include <asm/irq.h>
26#include <asm/mach/arch.h> 13#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 14#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 15#include <asm/system_misc.h>
29 16
30#include "generic.h" 17#include "generic.h"
18#include "soc.h"
31 19
32static int ksz8081_phy_fixup(struct phy_device *phy) 20static const struct at91_soc sama5_socs[] = {
33{ 21 AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D31_EXID_MATCH,
34 int value; 22 "sama5d31", "sama5d3"),
35 23 AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D33_EXID_MATCH,
36 value = phy_read(phy, 0x16); 24 "sama5d33", "sama5d3"),
37 value &= ~0x20; 25 AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D34_EXID_MATCH,
38 phy_write(phy, 0x16, value); 26 "sama5d34", "sama5d3"),
39 27 AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D35_EXID_MATCH,
40 return 0; 28 "sama5d35", "sama5d3"),
41} 29 AT91_SOC(SAMA5D3_CIDR_MATCH, SAMA5D36_EXID_MATCH,
30 "sama5d36", "sama5d3"),
31 AT91_SOC(SAMA5D4_CIDR_MATCH, SAMA5D41_EXID_MATCH,
32 "sama5d41", "sama5d4"),
33 AT91_SOC(SAMA5D4_CIDR_MATCH, SAMA5D42_EXID_MATCH,
34 "sama5d42", "sama5d4"),
35 AT91_SOC(SAMA5D4_CIDR_MATCH, SAMA5D43_EXID_MATCH,
36 "sama5d43", "sama5d4"),
37 AT91_SOC(SAMA5D4_CIDR_MATCH, SAMA5D44_EXID_MATCH,
38 "sama5d44", "sama5d4"),
39 { /* sentinel */ },
40};
42 41
43static void __init sama5_dt_device_init(void) 42static void __init sama5_dt_device_init(void)
44{ 43{
45 if (of_machine_is_compatible("atmel,sama5d4ek") && 44 struct soc_device *soc;
46 IS_ENABLED(CONFIG_PHYLIB)) { 45 struct device *soc_dev = NULL;
47 phy_register_fixup_for_id("fc028000.etherne:00",
48 ksz8081_phy_fixup);
49 }
50 46
51 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 47 soc = at91_soc_init(sama5_socs);
48 if (soc != NULL)
49 soc_dev = soc_device_to_device(soc);
50
51 of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);
52 at91sam9x5_pm_init(); 52 at91sam9x5_pm_init();
53} 53}
54 54
@@ -59,44 +59,10 @@ static const char *sama5_dt_board_compat[] __initconst = {
59 59
60DT_MACHINE_START(sama5_dt, "Atmel SAMA5") 60DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
61 /* Maintainer: Atmel */ 61 /* Maintainer: Atmel */
62 .map_io = at91_map_io,
63 .init_machine = sama5_dt_device_init, 62 .init_machine = sama5_dt_device_init,
64 .dt_compat = sama5_dt_board_compat, 63 .dt_compat = sama5_dt_board_compat,
65MACHINE_END 64MACHINE_END
66 65
67static struct map_desc at91_io_desc[] __initdata = {
68 {
69 .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_MPDDRC),
70 .pfn = __phys_to_pfn(SAMA5D4_BASE_MPDDRC),
71 .length = SZ_512,
72 .type = MT_DEVICE,
73 },
74 {
75 .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_PMC),
76 .pfn = __phys_to_pfn(SAMA5D4_BASE_PMC),
77 .length = SZ_512,
78 .type = MT_DEVICE,
79 },
80 { /* On sama5d4, we use USART3 as serial console */
81 .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_USART3),
82 .pfn = __phys_to_pfn(SAMA5D4_BASE_USART3),
83 .length = SZ_256,
84 .type = MT_DEVICE,
85 },
86 { /* A bunch of peripheral with fine grained IO space */
87 .virtual = (unsigned long)AT91_ALT_IO_P2V(SAMA5D4_BASE_SYS2),
88 .pfn = __phys_to_pfn(SAMA5D4_BASE_SYS2),
89 .length = SZ_2K,
90 .type = MT_DEVICE,
91 },
92};
93
94static void __init sama5_alt_map_io(void)
95{
96 at91_alt_map_io();
97 iotable_init(at91_io_desc, ARRAY_SIZE(at91_io_desc));
98}
99
100static const char *sama5_alt_dt_board_compat[] __initconst = { 66static const char *sama5_alt_dt_board_compat[] __initconst = {
101 "atmel,sama5d4", 67 "atmel,sama5d4",
102 NULL 68 NULL
@@ -104,7 +70,6 @@ static const char *sama5_alt_dt_board_compat[] __initconst = {
104 70
105DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5") 71DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
106 /* Maintainer: Atmel */ 72 /* Maintainer: Atmel */
107 .map_io = sama5_alt_map_io,
108 .init_machine = sama5_dt_device_init, 73 .init_machine = sama5_dt_device_init,
109 .dt_compat = sama5_alt_dt_board_compat, 74 .dt_compat = sama5_alt_dt_board_compat,
110 .l2c_aux_mask = ~0UL, 75 .l2c_aux_mask = ~0UL,
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
deleted file mode 100644
index 4e58bc90ed21..000000000000
--- a/arch/arm/mach-at91/setup.c
+++ /dev/null
@@ -1,330 +0,0 @@
1/*
2 * Copyright (C) 2007 Atmel Corporation.
3 * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
4 *
5 * Under GPLv2
6 */
7
8#define pr_fmt(fmt) "AT91: " fmt
9
10#include <linux/module.h>
11#include <linux/io.h>
12#include <linux/mm.h>
13#include <linux/pm.h>
14#include <linux/of_address.h>
15#include <linux/pinctrl/machine.h>
16#include <linux/clk/at91_pmc.h>
17
18#include <asm/system_misc.h>
19#include <asm/mach/map.h>
20
21#include <mach/hardware.h>
22#include <mach/cpu.h>
23#include <mach/at91_dbgu.h>
24
25#include "generic.h"
26#include "pm.h"
27
28struct at91_socinfo at91_soc_initdata;
29EXPORT_SYMBOL(at91_soc_initdata);
30
31static struct map_desc at91_io_desc __initdata __maybe_unused = {
32 .virtual = (unsigned long)AT91_VA_BASE_SYS,
33 .pfn = __phys_to_pfn(AT91_BASE_SYS),
34 .length = SZ_16K,
35 .type = MT_DEVICE,
36};
37
38static struct map_desc at91_alt_io_desc __initdata __maybe_unused = {
39 .virtual = (unsigned long)AT91_ALT_VA_BASE_SYS,
40 .pfn = __phys_to_pfn(AT91_ALT_BASE_SYS),
41 .length = 24 * SZ_1K,
42 .type = MT_DEVICE,
43};
44
45static void __init soc_detect(u32 dbgu_base)
46{
47 u32 cidr, socid;
48
49 cidr = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_CIDR);
50 socid = cidr & ~AT91_CIDR_VERSION;
51
52 switch (socid) {
53 case ARCH_ID_AT91RM9200:
54 at91_soc_initdata.type = AT91_SOC_RM9200;
55 if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_UNKNOWN)
56 at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
57 break;
58
59 case ARCH_ID_AT91SAM9260:
60 at91_soc_initdata.type = AT91_SOC_SAM9260;
61 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
62 break;
63
64 case ARCH_ID_AT91SAM9261:
65 at91_soc_initdata.type = AT91_SOC_SAM9261;
66 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
67 break;
68
69 case ARCH_ID_AT91SAM9263:
70 at91_soc_initdata.type = AT91_SOC_SAM9263;
71 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
72 break;
73
74 case ARCH_ID_AT91SAM9G20:
75 at91_soc_initdata.type = AT91_SOC_SAM9G20;
76 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
77 break;
78
79 case ARCH_ID_AT91SAM9G45:
80 at91_soc_initdata.type = AT91_SOC_SAM9G45;
81 if (cidr == ARCH_ID_AT91SAM9G45ES)
82 at91_soc_initdata.subtype = AT91_SOC_SAM9G45ES;
83 break;
84
85 case ARCH_ID_AT91SAM9RL64:
86 at91_soc_initdata.type = AT91_SOC_SAM9RL;
87 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
88 break;
89
90 case ARCH_ID_AT91SAM9X5:
91 at91_soc_initdata.type = AT91_SOC_SAM9X5;
92 break;
93
94 case ARCH_ID_AT91SAM9N12:
95 at91_soc_initdata.type = AT91_SOC_SAM9N12;
96 break;
97
98 case ARCH_ID_SAMA5:
99 at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
100 if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) {
101 at91_soc_initdata.type = AT91_SOC_SAMA5D3;
102 }
103 break;
104 }
105
106 /* at91sam9g10 */
107 if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
108 at91_soc_initdata.type = AT91_SOC_SAM9G10;
109 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE;
110 }
111 /* at91sam9xe */
112 else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) {
113 at91_soc_initdata.type = AT91_SOC_SAM9260;
114 at91_soc_initdata.subtype = AT91_SOC_SAM9XE;
115 }
116
117 if (!at91_soc_is_detected())
118 return;
119
120 at91_soc_initdata.cidr = cidr;
121
122 /* sub version of soc */
123 if (!at91_soc_initdata.exid)
124 at91_soc_initdata.exid = __raw_readl(AT91_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
125
126 if (at91_soc_initdata.type == AT91_SOC_SAM9G45) {
127 switch (at91_soc_initdata.exid) {
128 case ARCH_EXID_AT91SAM9M10:
129 at91_soc_initdata.subtype = AT91_SOC_SAM9M10;
130 break;
131 case ARCH_EXID_AT91SAM9G46:
132 at91_soc_initdata.subtype = AT91_SOC_SAM9G46;
133 break;
134 case ARCH_EXID_AT91SAM9M11:
135 at91_soc_initdata.subtype = AT91_SOC_SAM9M11;
136 break;
137 }
138 }
139
140 if (at91_soc_initdata.type == AT91_SOC_SAM9X5) {
141 switch (at91_soc_initdata.exid) {
142 case ARCH_EXID_AT91SAM9G15:
143 at91_soc_initdata.subtype = AT91_SOC_SAM9G15;
144 break;
145 case ARCH_EXID_AT91SAM9G35:
146 at91_soc_initdata.subtype = AT91_SOC_SAM9G35;
147 break;
148 case ARCH_EXID_AT91SAM9X35:
149 at91_soc_initdata.subtype = AT91_SOC_SAM9X35;
150 break;
151 case ARCH_EXID_AT91SAM9G25:
152 at91_soc_initdata.subtype = AT91_SOC_SAM9G25;
153 break;
154 case ARCH_EXID_AT91SAM9X25:
155 at91_soc_initdata.subtype = AT91_SOC_SAM9X25;
156 break;
157 }
158 }
159
160 if (at91_soc_initdata.type == AT91_SOC_SAMA5D3) {
161 switch (at91_soc_initdata.exid) {
162 case ARCH_EXID_SAMA5D31:
163 at91_soc_initdata.subtype = AT91_SOC_SAMA5D31;
164 break;
165 case ARCH_EXID_SAMA5D33:
166 at91_soc_initdata.subtype = AT91_SOC_SAMA5D33;
167 break;
168 case ARCH_EXID_SAMA5D34:
169 at91_soc_initdata.subtype = AT91_SOC_SAMA5D34;
170 break;
171 case ARCH_EXID_SAMA5D35:
172 at91_soc_initdata.subtype = AT91_SOC_SAMA5D35;
173 break;
174 case ARCH_EXID_SAMA5D36:
175 at91_soc_initdata.subtype = AT91_SOC_SAMA5D36;
176 break;
177 }
178 }
179}
180
181static void __init alt_soc_detect(u32 dbgu_base)
182{
183 u32 cidr, socid;
184
185 /* SoC ID */
186 cidr = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_CIDR);
187 socid = cidr & ~AT91_CIDR_VERSION;
188
189 switch (socid) {
190 case ARCH_ID_SAMA5:
191 at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
192 if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D3) {
193 at91_soc_initdata.type = AT91_SOC_SAMA5D3;
194 } else if (at91_soc_initdata.exid & ARCH_EXID_SAMA5D4) {
195 at91_soc_initdata.type = AT91_SOC_SAMA5D4;
196 }
197 break;
198 }
199
200 if (!at91_soc_is_detected())
201 return;
202
203 at91_soc_initdata.cidr = cidr;
204
205 /* sub version of soc */
206 if (!at91_soc_initdata.exid)
207 at91_soc_initdata.exid = __raw_readl(AT91_ALT_IO_P2V(dbgu_base) + AT91_DBGU_EXID);
208
209 if (at91_soc_initdata.type == AT91_SOC_SAMA5D4) {
210 switch (at91_soc_initdata.exid) {
211 case ARCH_EXID_SAMA5D41:
212 at91_soc_initdata.subtype = AT91_SOC_SAMA5D41;
213 break;
214 case ARCH_EXID_SAMA5D42:
215 at91_soc_initdata.subtype = AT91_SOC_SAMA5D42;
216 break;
217 case ARCH_EXID_SAMA5D43:
218 at91_soc_initdata.subtype = AT91_SOC_SAMA5D43;
219 break;
220 case ARCH_EXID_SAMA5D44:
221 at91_soc_initdata.subtype = AT91_SOC_SAMA5D44;
222 break;
223 }
224 }
225}
226
227static const char *soc_name[] = {
228 [AT91_SOC_RM9200] = "at91rm9200",
229 [AT91_SOC_SAM9260] = "at91sam9260",
230 [AT91_SOC_SAM9261] = "at91sam9261",
231 [AT91_SOC_SAM9263] = "at91sam9263",
232 [AT91_SOC_SAM9G10] = "at91sam9g10",
233 [AT91_SOC_SAM9G20] = "at91sam9g20",
234 [AT91_SOC_SAM9G45] = "at91sam9g45",
235 [AT91_SOC_SAM9RL] = "at91sam9rl",
236 [AT91_SOC_SAM9X5] = "at91sam9x5",
237 [AT91_SOC_SAM9N12] = "at91sam9n12",
238 [AT91_SOC_SAMA5D3] = "sama5d3",
239 [AT91_SOC_SAMA5D4] = "sama5d4",
240 [AT91_SOC_UNKNOWN] = "Unknown",
241};
242
243const char *at91_get_soc_type(struct at91_socinfo *c)
244{
245 return soc_name[c->type];
246}
247EXPORT_SYMBOL(at91_get_soc_type);
248
249static const char *soc_subtype_name[] = {
250 [AT91_SOC_RM9200_BGA] = "at91rm9200 BGA",
251 [AT91_SOC_RM9200_PQFP] = "at91rm9200 PQFP",
252 [AT91_SOC_SAM9XE] = "at91sam9xe",
253 [AT91_SOC_SAM9G45ES] = "at91sam9g45es",
254 [AT91_SOC_SAM9M10] = "at91sam9m10",
255 [AT91_SOC_SAM9G46] = "at91sam9g46",
256 [AT91_SOC_SAM9M11] = "at91sam9m11",
257 [AT91_SOC_SAM9G15] = "at91sam9g15",
258 [AT91_SOC_SAM9G35] = "at91sam9g35",
259 [AT91_SOC_SAM9X35] = "at91sam9x35",
260 [AT91_SOC_SAM9G25] = "at91sam9g25",
261 [AT91_SOC_SAM9X25] = "at91sam9x25",
262 [AT91_SOC_SAMA5D31] = "sama5d31",
263 [AT91_SOC_SAMA5D33] = "sama5d33",
264 [AT91_SOC_SAMA5D34] = "sama5d34",
265 [AT91_SOC_SAMA5D35] = "sama5d35",
266 [AT91_SOC_SAMA5D36] = "sama5d36",
267 [AT91_SOC_SAMA5D41] = "sama5d41",
268 [AT91_SOC_SAMA5D42] = "sama5d42",
269 [AT91_SOC_SAMA5D43] = "sama5d43",
270 [AT91_SOC_SAMA5D44] = "sama5d44",
271 [AT91_SOC_SUBTYPE_NONE] = "None",
272 [AT91_SOC_SUBTYPE_UNKNOWN] = "Unknown",
273};
274
275const char *at91_get_soc_subtype(struct at91_socinfo *c)
276{
277 return soc_subtype_name[c->subtype];
278}
279EXPORT_SYMBOL(at91_get_soc_subtype);
280
281void __init at91_map_io(void)
282{
283 /* Map peripherals */
284 iotable_init(&at91_io_desc, 1);
285
286 at91_soc_initdata.type = AT91_SOC_UNKNOWN;
287 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_UNKNOWN;
288
289 soc_detect(AT91_BASE_DBGU0);
290 if (!at91_soc_is_detected())
291 soc_detect(AT91_BASE_DBGU1);
292
293 if (!at91_soc_is_detected())
294 panic(pr_fmt("Impossible to detect the SOC type"));
295
296 pr_info("Detected soc type: %s\n",
297 at91_get_soc_type(&at91_soc_initdata));
298 if (at91_soc_initdata.subtype != AT91_SOC_SUBTYPE_NONE)
299 pr_info("Detected soc subtype: %s\n",
300 at91_get_soc_subtype(&at91_soc_initdata));
301}
302
303void __init at91_alt_map_io(void)
304{
305 /* Map peripherals */
306 iotable_init(&at91_alt_io_desc, 1);
307
308 at91_soc_initdata.type = AT91_SOC_UNKNOWN;
309 at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_UNKNOWN;
310
311 alt_soc_detect(AT91_BASE_DBGU2);
312 if (!at91_soc_is_detected())
313 panic("AT91: Impossible to detect the SOC type");
314
315 pr_info("AT91: Detected soc type: %s\n",
316 at91_get_soc_type(&at91_soc_initdata));
317 if (at91_soc_initdata.subtype != AT91_SOC_SUBTYPE_NONE)
318 pr_info("AT91: Detected soc subtype: %s\n",
319 at91_get_soc_subtype(&at91_soc_initdata));
320}
321
322void __iomem *at91_matrix_base;
323EXPORT_SYMBOL_GPL(at91_matrix_base);
324
325void __init at91_ioremap_matrix(u32 base_addr)
326{
327 at91_matrix_base = ioremap(base_addr, 512);
328 if (!at91_matrix_base)
329 panic(pr_fmt("Impossible to ioremap at91_matrix_base\n"));
330}
diff --git a/arch/arm/mach-at91/soc.c b/arch/arm/mach-at91/soc.c
new file mode 100644
index 000000000000..54343ffa3e53
--- /dev/null
+++ b/arch/arm/mach-at91/soc.c
@@ -0,0 +1,97 @@
1/*
2 * Copyright (C) 2015 Atmel
3 *
4 * Alexandre Belloni <alexandre.belloni@free-electrons.com
5 * Boris Brezillon <boris.brezillon@free-electrons.com
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 *
11 */
12
13#define pr_fmt(fmt) "AT91: " fmt
14
15#include <linux/io.h>
16#include <linux/of.h>
17#include <linux/of_address.h>
18#include <linux/of_platform.h>
19#include <linux/slab.h>
20#include <linux/sys_soc.h>
21
22#include "soc.h"
23
24#define AT91_DBGU_CIDR 0x40
25#define AT91_DBGU_CIDR_VERSION(x) ((x) & 0x1f)
26#define AT91_DBGU_CIDR_EXT BIT(31)
27#define AT91_DBGU_CIDR_MATCH_MASK 0x7fffffe0
28#define AT91_DBGU_EXID 0x44
29
30struct soc_device * __init at91_soc_init(const struct at91_soc *socs)
31{
32 struct soc_device_attribute *soc_dev_attr;
33 const struct at91_soc *soc;
34 struct soc_device *soc_dev;
35 struct device_node *np;
36 void __iomem *regs;
37 u32 cidr, exid;
38
39 np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-dbgu");
40 if (!np)
41 np = of_find_compatible_node(NULL, NULL,
42 "atmel,at91sam9260-dbgu");
43
44 if (!np) {
45 pr_warn("Could not find DBGU node");
46 return NULL;
47 }
48
49 regs = of_iomap(np, 0);
50 of_node_put(np);
51
52 if (!regs) {
53 pr_warn("Could not map DBGU iomem range");
54 return NULL;
55 }
56
57 cidr = readl(regs + AT91_DBGU_CIDR);
58 exid = readl(regs + AT91_DBGU_EXID);
59
60 iounmap(regs);
61
62 for (soc = socs; soc->name; soc++) {
63 if (soc->cidr_match != (cidr & AT91_DBGU_CIDR_MATCH_MASK))
64 continue;
65
66 if (!(cidr & AT91_DBGU_CIDR_EXT) || soc->exid_match == exid)
67 break;
68 }
69
70 if (!soc->name) {
71 pr_warn("Could not find matching SoC description\n");
72 return NULL;
73 }
74
75 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
76 if (!soc_dev_attr)
77 return NULL;
78
79 soc_dev_attr->family = soc->family;
80 soc_dev_attr->soc_id = soc->name;
81 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%X",
82 AT91_DBGU_CIDR_VERSION(cidr));
83 soc_dev = soc_device_register(soc_dev_attr);
84 if (IS_ERR(soc_dev)) {
85 kfree(soc_dev_attr->revision);
86 kfree(soc_dev_attr);
87 pr_warn("Could not register SoC device\n");
88 return NULL;
89 }
90
91 if (soc->family)
92 pr_info("Detected SoC family: %s\n", soc->family);
93 pr_info("Detected SoC: %s, revision %X\n", soc->name,
94 AT91_DBGU_CIDR_VERSION(cidr));
95
96 return soc_dev;
97}
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h
new file mode 100644
index 000000000000..be23c400596b
--- /dev/null
+++ b/arch/arm/mach-at91/soc.h
@@ -0,0 +1,78 @@
1/*
2 * Copyright (C) 2015 Atmel
3 *
4 * Boris Brezillon <boris.brezillon@free-electrons.com
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 *
10 */
11
12#ifndef __AT91_SOC_H
13#define __AT91_SOC_H
14
15#include <linux/sys_soc.h>
16
17struct at91_soc {
18 u32 cidr_match;
19 u32 exid_match;
20 const char *name;
21 const char *family;
22};
23
24#define AT91_SOC(__cidr, __exid, __name, __family) \
25 { \
26 .cidr_match = (__cidr), \
27 .exid_match = (__exid), \
28 .name = (__name), \
29 .family = (__family), \
30 }
31
32struct soc_device * __init
33at91_soc_init(const struct at91_soc *socs);
34
35#define AT91RM9200_CIDR_MATCH 0x09290780
36
37#define AT91SAM9260_CIDR_MATCH 0x019803a0
38#define AT91SAM9261_CIDR_MATCH 0x019703a0
39#define AT91SAM9263_CIDR_MATCH 0x019607a0
40#define AT91SAM9G20_CIDR_MATCH 0x019905a0
41#define AT91SAM9RL64_CIDR_MATCH 0x019b03a0
42#define AT91SAM9G45_CIDR_MATCH 0x019b05a0
43#define AT91SAM9X5_CIDR_MATCH 0x019a05a0
44#define AT91SAM9N12_CIDR_MATCH 0x019a07a0
45
46#define AT91SAM9M11_EXID_MATCH 0x00000001
47#define AT91SAM9M10_EXID_MATCH 0x00000002
48#define AT91SAM9G46_EXID_MATCH 0x00000003
49#define AT91SAM9G45_EXID_MATCH 0x00000004
50
51#define AT91SAM9G15_EXID_MATCH 0x00000000
52#define AT91SAM9G35_EXID_MATCH 0x00000001
53#define AT91SAM9X35_EXID_MATCH 0x00000002
54#define AT91SAM9G25_EXID_MATCH 0x00000003
55#define AT91SAM9X25_EXID_MATCH 0x00000004
56
57#define AT91SAM9CN12_EXID_MATCH 0x00000005
58#define AT91SAM9N12_EXID_MATCH 0x00000006
59#define AT91SAM9CN11_EXID_MATCH 0x00000009
60
61#define AT91SAM9XE128_CIDR_MATCH 0x329973a0
62#define AT91SAM9XE256_CIDR_MATCH 0x329a93a0
63#define AT91SAM9XE512_CIDR_MATCH 0x329aa3a0
64
65#define SAMA5D3_CIDR_MATCH 0x0a5c07c0
66#define SAMA5D31_EXID_MATCH 0x00444300
67#define SAMA5D33_EXID_MATCH 0x00414300
68#define SAMA5D34_EXID_MATCH 0x00414301
69#define SAMA5D35_EXID_MATCH 0x00584300
70#define SAMA5D36_EXID_MATCH 0x00004301
71
72#define SAMA5D4_CIDR_MATCH 0x0a5c07c0
73#define SAMA5D41_EXID_MATCH 0x00000001
74#define SAMA5D42_EXID_MATCH 0x00000002
75#define SAMA5D43_EXID_MATCH 0x00000003
76#define SAMA5D44_EXID_MATCH 0x00000004
77
78#endif /* __AT91_SOC_H */
diff --git a/arch/arm/mach-bcm/bcm_cygnus.c b/arch/arm/mach-bcm/bcm_cygnus.c
index 30dc58be51b8..7ae894c7849b 100644
--- a/arch/arm/mach-bcm/bcm_cygnus.c
+++ b/arch/arm/mach-bcm/bcm_cygnus.c
@@ -13,7 +13,7 @@
13 13
14#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
15 15
16static const char const *bcm_cygnus_dt_compat[] = { 16static const char * const bcm_cygnus_dt_compat[] __initconst = {
17 "brcm,cygnus", 17 "brcm,cygnus",
18 NULL, 18 NULL,
19}; 19};
diff --git a/arch/arm/mach-cns3xxx/pm.c b/arch/arm/mach-cns3xxx/pm.c
index fb38c726e987..f46b78dd6136 100644
--- a/arch/arm/mach-cns3xxx/pm.c
+++ b/arch/arm/mach-cns3xxx/pm.c
@@ -73,7 +73,6 @@ static void cns3xxx_pwr_soft_rst_force(unsigned int block)
73 73
74 __raw_writel(reg, PM_SOFT_RST_REG); 74 __raw_writel(reg, PM_SOFT_RST_REG);
75} 75}
76EXPORT_SYMBOL(cns3xxx_pwr_soft_rst_force);
77 76
78void cns3xxx_pwr_soft_rst(unsigned int block) 77void cns3xxx_pwr_soft_rst(unsigned int block)
79{ 78{
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index cd30f6f5f2ff..dd8f5312b2c0 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -200,17 +200,6 @@ config DA850_UI_SD_VIDEO_PORT
200 200
201endchoice 201endchoice
202 202
203config DA850_WL12XX
204 bool "AM18x wl1271 daughter board"
205 depends on MACH_DAVINCI_DA850_EVM
206 help
207 The wl1271 daughter card for AM18x EVMs is a combo wireless
208 connectivity add-on card, based on the LS Research TiWi module with
209 Texas Instruments' wl1271 solution.
210 Say Y if you want to use a wl1271 expansion card connected to the
211 AM18x EVM.
212
213
214config MACH_MITYOMAPL138 203config MACH_MITYOMAPL138
215 bool "Critical Link MityDSP-L138/MityARM-1808 SoM" 204 bool "Critical Link MityDSP-L138/MityARM-1808 SoM"
216 depends on ARCH_DAVINCI_DA850 205 depends on ARCH_DAVINCI_DA850
diff --git a/arch/arm/mach-davinci/asp.h b/arch/arm/mach-davinci/asp.h
index d9b2acd12393..1128e1d8e4b4 100644
--- a/arch/arm/mach-davinci/asp.h
+++ b/arch/arm/mach-davinci/asp.h
@@ -21,6 +21,9 @@
21/* Bases of da830 McASP1 register banks */ 21/* Bases of da830 McASP1 register banks */
22#define DAVINCI_DA830_MCASP1_REG_BASE 0x01D04000 22#define DAVINCI_DA830_MCASP1_REG_BASE 0x01D04000
23 23
24/* Bases of da830 McASP2 register banks */
25#define DAVINCI_DA830_MCASP2_REG_BASE 0x01D08000
26
24/* EDMA channels of dm644x and dm355 */ 27/* EDMA channels of dm644x and dm355 */
25#define DAVINCI_DMA_ASP0_TX 2 28#define DAVINCI_DMA_ASP0_TX 2
26#define DAVINCI_DMA_ASP0_RX 3 29#define DAVINCI_DMA_ASP0_RX 3
@@ -40,6 +43,10 @@
40#define DAVINCI_DA830_DMA_MCASP1_AREVT 2 43#define DAVINCI_DA830_DMA_MCASP1_AREVT 2
41#define DAVINCI_DA830_DMA_MCASP1_AXEVT 3 44#define DAVINCI_DA830_DMA_MCASP1_AXEVT 3
42 45
46/* EDMA channels of da830 McASP2 */
47#define DAVINCI_DA830_DMA_MCASP2_AREVT 4
48#define DAVINCI_DA830_DMA_MCASP2_AXEVT 5
49
43/* Interrupts */ 50/* Interrupts */
44#define DAVINCI_ASP0_RX_INT IRQ_MBRINT 51#define DAVINCI_ASP0_RX_INT IRQ_MBRINT
45#define DAVINCI_ASP0_TX_INT IRQ_MBXINT 52#define DAVINCI_ASP0_TX_INT IRQ_MBXINT
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 6b5a97da9fe3..1ed545cc2b83 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -38,7 +38,6 @@
38#include <linux/regulator/fixed.h> 38#include <linux/regulator/fixed.h>
39#include <linux/spi/spi.h> 39#include <linux/spi/spi.h>
40#include <linux/spi/flash.h> 40#include <linux/spi/flash.h>
41#include <linux/wl12xx.h>
42 41
43#include <mach/common.h> 42#include <mach/common.h>
44#include <mach/cp_intc.h> 43#include <mach/cp_intc.h>
@@ -60,9 +59,6 @@
60#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) 59#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
61#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) 60#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
62 61
63#define DA850_WLAN_EN GPIO_TO_PIN(6, 9)
64#define DA850_WLAN_IRQ GPIO_TO_PIN(6, 10)
65
66#define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6) 62#define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
67 63
68static struct mtd_partition da850evm_spiflash_part[] = { 64static struct mtd_partition da850evm_spiflash_part[] = {
@@ -1343,109 +1339,6 @@ static __init void da850_vpif_init(void)
1343static __init void da850_vpif_init(void) {} 1339static __init void da850_vpif_init(void) {}
1344#endif 1340#endif
1345 1341
1346#ifdef CONFIG_DA850_WL12XX
1347
1348static void wl12xx_set_power(int index, bool power_on)
1349{
1350 static bool power_state;
1351
1352 pr_debug("Powering %s wl12xx", power_on ? "on" : "off");
1353
1354 if (power_on == power_state)
1355 return;
1356 power_state = power_on;
1357
1358 if (power_on) {
1359 /* Power up sequence required for wl127x devices */
1360 gpio_set_value(DA850_WLAN_EN, 1);
1361 usleep_range(15000, 15000);
1362 gpio_set_value(DA850_WLAN_EN, 0);
1363 usleep_range(1000, 1000);
1364 gpio_set_value(DA850_WLAN_EN, 1);
1365 msleep(70);
1366 } else {
1367 gpio_set_value(DA850_WLAN_EN, 0);
1368 }
1369}
1370
1371static struct davinci_mmc_config da850_wl12xx_mmc_config = {
1372 .set_power = wl12xx_set_power,
1373 .wires = 4,
1374 .max_freq = 25000000,
1375 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_NONREMOVABLE |
1376 MMC_CAP_POWER_OFF_CARD,
1377};
1378
1379static const short da850_wl12xx_pins[] __initconst = {
1380 DA850_MMCSD1_DAT_0, DA850_MMCSD1_DAT_1, DA850_MMCSD1_DAT_2,
1381 DA850_MMCSD1_DAT_3, DA850_MMCSD1_CLK, DA850_MMCSD1_CMD,
1382 DA850_GPIO6_9, DA850_GPIO6_10,
1383 -1
1384};
1385
1386static struct wl12xx_platform_data da850_wl12xx_wlan_data __initdata = {
1387 .irq = -1,
1388 .board_ref_clock = WL12XX_REFCLOCK_38,
1389 .platform_quirks = WL12XX_PLATFORM_QUIRK_EDGE_IRQ,
1390};
1391
1392static __init int da850_wl12xx_init(void)
1393{
1394 int ret;
1395
1396 ret = davinci_cfg_reg_list(da850_wl12xx_pins);
1397 if (ret) {
1398 pr_err("wl12xx/mmc mux setup failed: %d\n", ret);
1399 goto exit;
1400 }
1401
1402 ret = da850_register_mmcsd1(&da850_wl12xx_mmc_config);
1403 if (ret) {
1404 pr_err("wl12xx/mmc registration failed: %d\n", ret);
1405 goto exit;
1406 }
1407
1408 ret = gpio_request_one(DA850_WLAN_EN, GPIOF_OUT_INIT_LOW, "wl12xx_en");
1409 if (ret) {
1410 pr_err("Could not request wl12xx enable gpio: %d\n", ret);
1411 goto exit;
1412 }
1413
1414 ret = gpio_request_one(DA850_WLAN_IRQ, GPIOF_IN, "wl12xx_irq");
1415 if (ret) {
1416 pr_err("Could not request wl12xx irq gpio: %d\n", ret);
1417 goto free_wlan_en;
1418 }
1419
1420 da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
1421
1422 ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
1423 if (ret) {
1424 pr_err("Could not set wl12xx data: %d\n", ret);
1425 goto free_wlan_irq;
1426 }
1427
1428 return 0;
1429
1430free_wlan_irq:
1431 gpio_free(DA850_WLAN_IRQ);
1432
1433free_wlan_en:
1434 gpio_free(DA850_WLAN_EN);
1435
1436exit:
1437 return ret;
1438}
1439
1440#else /* CONFIG_DA850_WL12XX */
1441
1442static __init int da850_wl12xx_init(void)
1443{
1444 return 0;
1445}
1446
1447#endif /* CONFIG_DA850_WL12XX */
1448
1449#define DA850EVM_SATA_REFCLKPN_RATE (100 * 1000 * 1000) 1342#define DA850EVM_SATA_REFCLKPN_RATE (100 * 1000 * 1000)
1450 1343
1451static __init void da850_evm_init(void) 1344static __init void da850_evm_init(void)
@@ -1502,11 +1395,6 @@ static __init void da850_evm_init(void)
1502 if (ret) 1395 if (ret)
1503 pr_warn("%s: MMCSD0 registration failed: %d\n", 1396 pr_warn("%s: MMCSD0 registration failed: %d\n",
1504 __func__, ret); 1397 __func__, ret);
1505
1506 ret = da850_wl12xx_init();
1507 if (ret)
1508 pr_warn("%s: WL12xx initialization failed: %d\n",
1509 __func__, ret);
1510 } 1398 }
1511 1399
1512 davinci_serial_init(da8xx_serial_device); 1400 davinci_serial_init(da8xx_serial_device);
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index b85b781b05fd..ddfdd820e6f2 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -463,16 +463,23 @@ static struct resource da830_mcasp1_resources[] = {
463 }, 463 },
464 /* TX event */ 464 /* TX event */
465 { 465 {
466 .name = "tx",
466 .start = DAVINCI_DA830_DMA_MCASP1_AXEVT, 467 .start = DAVINCI_DA830_DMA_MCASP1_AXEVT,
467 .end = DAVINCI_DA830_DMA_MCASP1_AXEVT, 468 .end = DAVINCI_DA830_DMA_MCASP1_AXEVT,
468 .flags = IORESOURCE_DMA, 469 .flags = IORESOURCE_DMA,
469 }, 470 },
470 /* RX event */ 471 /* RX event */
471 { 472 {
473 .name = "rx",
472 .start = DAVINCI_DA830_DMA_MCASP1_AREVT, 474 .start = DAVINCI_DA830_DMA_MCASP1_AREVT,
473 .end = DAVINCI_DA830_DMA_MCASP1_AREVT, 475 .end = DAVINCI_DA830_DMA_MCASP1_AREVT,
474 .flags = IORESOURCE_DMA, 476 .flags = IORESOURCE_DMA,
475 }, 477 },
478 {
479 .name = "common",
480 .start = IRQ_DA8XX_MCASPINT,
481 .flags = IORESOURCE_IRQ,
482 },
476}; 483};
477 484
478static struct platform_device da830_mcasp1_device = { 485static struct platform_device da830_mcasp1_device = {
@@ -482,6 +489,41 @@ static struct platform_device da830_mcasp1_device = {
482 .resource = da830_mcasp1_resources, 489 .resource = da830_mcasp1_resources,
483}; 490};
484 491
492static struct resource da830_mcasp2_resources[] = {
493 {
494 .name = "mpu",
495 .start = DAVINCI_DA830_MCASP2_REG_BASE,
496 .end = DAVINCI_DA830_MCASP2_REG_BASE + (SZ_1K * 12) - 1,
497 .flags = IORESOURCE_MEM,
498 },
499 /* TX event */
500 {
501 .name = "tx",
502 .start = DAVINCI_DA830_DMA_MCASP2_AXEVT,
503 .end = DAVINCI_DA830_DMA_MCASP2_AXEVT,
504 .flags = IORESOURCE_DMA,
505 },
506 /* RX event */
507 {
508 .name = "rx",
509 .start = DAVINCI_DA830_DMA_MCASP2_AREVT,
510 .end = DAVINCI_DA830_DMA_MCASP2_AREVT,
511 .flags = IORESOURCE_DMA,
512 },
513 {
514 .name = "common",
515 .start = IRQ_DA8XX_MCASPINT,
516 .flags = IORESOURCE_IRQ,
517 },
518};
519
520static struct platform_device da830_mcasp2_device = {
521 .name = "davinci-mcasp",
522 .id = 2,
523 .num_resources = ARRAY_SIZE(da830_mcasp2_resources),
524 .resource = da830_mcasp2_resources,
525};
526
485static struct resource da850_mcasp_resources[] = { 527static struct resource da850_mcasp_resources[] = {
486 { 528 {
487 .name = "mpu", 529 .name = "mpu",
@@ -491,16 +533,23 @@ static struct resource da850_mcasp_resources[] = {
491 }, 533 },
492 /* TX event */ 534 /* TX event */
493 { 535 {
536 .name = "tx",
494 .start = DAVINCI_DA8XX_DMA_MCASP0_AXEVT, 537 .start = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
495 .end = DAVINCI_DA8XX_DMA_MCASP0_AXEVT, 538 .end = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
496 .flags = IORESOURCE_DMA, 539 .flags = IORESOURCE_DMA,
497 }, 540 },
498 /* RX event */ 541 /* RX event */
499 { 542 {
543 .name = "rx",
500 .start = DAVINCI_DA8XX_DMA_MCASP0_AREVT, 544 .start = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
501 .end = DAVINCI_DA8XX_DMA_MCASP0_AREVT, 545 .end = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
502 .flags = IORESOURCE_DMA, 546 .flags = IORESOURCE_DMA,
503 }, 547 },
548 {
549 .name = "common",
550 .start = IRQ_DA8XX_MCASPINT,
551 .flags = IORESOURCE_IRQ,
552 },
504}; 553};
505 554
506static struct platform_device da850_mcasp_device = { 555static struct platform_device da850_mcasp_device = {
@@ -512,14 +561,31 @@ static struct platform_device da850_mcasp_device = {
512 561
513void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) 562void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata)
514{ 563{
515 /* DA830/OMAP-L137 has 3 instances of McASP */ 564 struct platform_device *pdev;
516 if (cpu_is_davinci_da830() && id == 1) { 565
517 da830_mcasp1_device.dev.platform_data = pdata; 566 switch (id) {
518 platform_device_register(&da830_mcasp1_device); 567 case 0:
519 } else if (cpu_is_davinci_da850()) { 568 /* Valid for DA830/OMAP-L137 or DA850/OMAP-L138 */
520 da850_mcasp_device.dev.platform_data = pdata; 569 pdev = &da850_mcasp_device;
521 platform_device_register(&da850_mcasp_device); 570 break;
571 case 1:
572 /* Valid for DA830/OMAP-L137 only */
573 if (!cpu_is_davinci_da830())
574 return;
575 pdev = &da830_mcasp1_device;
576 break;
577 case 2:
578 /* Valid for DA830/OMAP-L137 only */
579 if (!cpu_is_davinci_da830())
580 return;
581 pdev = &da830_mcasp2_device;
582 break;
583 default:
584 return;
522 } 585 }
586
587 pdev->dev.platform_data = pdata;
588 platform_device_register(pdev);
523} 589}
524 590
525static struct resource da8xx_pruss_resources[] = { 591static struct resource da8xx_pruss_resources[] = {
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 6c3bbea7d77d..3f842bb266d6 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -493,7 +493,6 @@ static u8 dm646x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
493 [IRQ_DM646X_EMACMISCINT] = 7, 493 [IRQ_DM646X_EMACMISCINT] = 7,
494 [IRQ_DM646X_MCASP0TXINT] = 7, 494 [IRQ_DM646X_MCASP0TXINT] = 7,
495 [IRQ_DM646X_MCASP0RXINT] = 7, 495 [IRQ_DM646X_MCASP0RXINT] = 7,
496 [IRQ_AEMIFINT] = 7,
497 [IRQ_DM646X_RESERVED_3] = 7, 496 [IRQ_DM646X_RESERVED_3] = 7,
498 [IRQ_DM646X_MCASP1TXINT] = 7, /* clockevent */ 497 [IRQ_DM646X_MCASP1TXINT] = 7, /* clockevent */
499 [IRQ_TINT0_TINT34] = 7, /* clocksource */ 498 [IRQ_TINT0_TINT34] = 7, /* clocksource */
@@ -610,19 +609,31 @@ static struct resource dm646x_mcasp0_resources[] = {
610 .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1, 609 .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1,
611 .flags = IORESOURCE_MEM, 610 .flags = IORESOURCE_MEM,
612 }, 611 },
613 /* first TX, then RX */
614 { 612 {
613 .name = "tx",
615 .start = DAVINCI_DM646X_DMA_MCASP0_AXEVT0, 614 .start = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
616 .end = DAVINCI_DM646X_DMA_MCASP0_AXEVT0, 615 .end = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
617 .flags = IORESOURCE_DMA, 616 .flags = IORESOURCE_DMA,
618 }, 617 },
619 { 618 {
619 .name = "rx",
620 .start = DAVINCI_DM646X_DMA_MCASP0_AREVT0, 620 .start = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
621 .end = DAVINCI_DM646X_DMA_MCASP0_AREVT0, 621 .end = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
622 .flags = IORESOURCE_DMA, 622 .flags = IORESOURCE_DMA,
623 }, 623 },
624 {
625 .name = "tx",
626 .start = IRQ_DM646X_MCASP0TXINT,
627 .flags = IORESOURCE_IRQ,
628 },
629 {
630 .name = "rx",
631 .start = IRQ_DM646X_MCASP0RXINT,
632 .flags = IORESOURCE_IRQ,
633 },
624}; 634};
625 635
636/* DIT mode only, rx is not supported */
626static struct resource dm646x_mcasp1_resources[] = { 637static struct resource dm646x_mcasp1_resources[] = {
627 { 638 {
628 .name = "mpu", 639 .name = "mpu",
@@ -630,17 +641,16 @@ static struct resource dm646x_mcasp1_resources[] = {
630 .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1, 641 .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1,
631 .flags = IORESOURCE_MEM, 642 .flags = IORESOURCE_MEM,
632 }, 643 },
633 /* DIT mode, only TX event */
634 { 644 {
645 .name = "tx",
635 .start = DAVINCI_DM646X_DMA_MCASP1_AXEVT1, 646 .start = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
636 .end = DAVINCI_DM646X_DMA_MCASP1_AXEVT1, 647 .end = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
637 .flags = IORESOURCE_DMA, 648 .flags = IORESOURCE_DMA,
638 }, 649 },
639 /* DIT mode, dummy entry */
640 { 650 {
641 .start = -1, 651 .name = "tx",
642 .end = -1, 652 .start = IRQ_DM646X_MCASP1TXINT,
643 .flags = IORESOURCE_DMA, 653 .flags = IORESOURCE_IRQ,
644 }, 654 },
645}; 655};
646 656
diff --git a/arch/arm/mach-davinci/include/mach/irqs.h b/arch/arm/mach-davinci/include/mach/irqs.h
index 354af71798dc..edb2ca62321a 100644
--- a/arch/arm/mach-davinci/include/mach/irqs.h
+++ b/arch/arm/mach-davinci/include/mach/irqs.h
@@ -129,8 +129,8 @@
129#define IRQ_DM646X_EMACMISCINT 27 129#define IRQ_DM646X_EMACMISCINT 27
130#define IRQ_DM646X_MCASP0TXINT 28 130#define IRQ_DM646X_MCASP0TXINT 28
131#define IRQ_DM646X_MCASP0RXINT 29 131#define IRQ_DM646X_MCASP0RXINT 29
132#define IRQ_DM646X_MCASP1TXINT 30
132#define IRQ_DM646X_RESERVED_3 31 133#define IRQ_DM646X_RESERVED_3 31
133#define IRQ_DM646X_MCASP1TXINT 32
134#define IRQ_DM646X_VLQINT 38 134#define IRQ_DM646X_VLQINT 38
135#define IRQ_DM646X_UARTINT2 42 135#define IRQ_DM646X_UARTINT2 42
136#define IRQ_DM646X_SPINT0 43 136#define IRQ_DM646X_SPINT0 43
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 603820e5aba7..81064cd61a0a 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -123,7 +123,7 @@ config SOC_EXYNOS5800
123config EXYNOS5420_MCPM 123config EXYNOS5420_MCPM
124 bool "Exynos5420 Multi-Cluster PM support" 124 bool "Exynos5420 Multi-Cluster PM support"
125 depends on MCPM && SOC_EXYNOS5420 125 depends on MCPM && SOC_EXYNOS5420
126 select ARM_CCI 126 select ARM_CCI400_PORT_CTRL
127 select ARM_CPU_SUSPEND 127 select ARM_CPU_SUSPEND
128 help 128 help
129 This is needed to provide CPU and cluster power management 129 This is needed to provide CPU and cluster power management
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index f70eca7ee705..acd5b560b728 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -126,6 +126,12 @@ enum {
126 126
127void exynos_firmware_init(void); 127void exynos_firmware_init(void);
128 128
129/* CPU BOOT mode flag for Exynos3250 SoC bootloader */
130#define C2_STATE (1 << 3)
131
132void exynos_set_boot_flag(unsigned int cpu, unsigned int mode);
133void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode);
134
129extern u32 exynos_get_eint_wake_mask(void); 135extern u32 exynos_get_eint_wake_mask(void);
130 136
131#ifdef CONFIG_PM_SLEEP 137#ifdef CONFIG_PM_SLEEP
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index f44c2e05c82e..bcde0dd668df 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -206,7 +206,7 @@ static void __init exynos_dt_machine_init(void)
206 if (!IS_ENABLED(CONFIG_SMP)) 206 if (!IS_ENABLED(CONFIG_SMP))
207 exynos_sysram_init(); 207 exynos_sysram_init();
208 208
209#ifdef CONFIG_ARM_EXYNOS_CPUIDLE 209#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
210 if (of_machine_is_compatible("samsung,exynos4210")) 210 if (of_machine_is_compatible("samsung,exynos4210"))
211 exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data; 211 exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data;
212#endif 212#endif
@@ -214,6 +214,7 @@ static void __init exynos_dt_machine_init(void)
214 of_machine_is_compatible("samsung,exynos4212") || 214 of_machine_is_compatible("samsung,exynos4212") ||
215 (of_machine_is_compatible("samsung,exynos4412") && 215 (of_machine_is_compatible("samsung,exynos4412") &&
216 of_machine_is_compatible("samsung,trats2")) || 216 of_machine_is_compatible("samsung,trats2")) ||
217 of_machine_is_compatible("samsung,exynos3250") ||
217 of_machine_is_compatible("samsung,exynos5250")) 218 of_machine_is_compatible("samsung,exynos5250"))
218 platform_device_register(&exynos_cpuidle); 219 platform_device_register(&exynos_cpuidle);
219 220
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 4791a3cc00f9..1bd35763f12e 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -48,7 +48,13 @@ static int exynos_do_idle(unsigned long mode)
48 __raw_writel(virt_to_phys(exynos_cpu_resume_ns), 48 __raw_writel(virt_to_phys(exynos_cpu_resume_ns),
49 sysram_ns_base_addr + 0x24); 49 sysram_ns_base_addr + 0x24);
50 __raw_writel(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20); 50 __raw_writel(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20);
51 exynos_smc(SMC_CMD_CPU0AFTR, 0, 0, 0); 51 if (soc_is_exynos3250()) {
52 exynos_smc(SMC_CMD_SAVE, OP_TYPE_CORE,
53 SMC_POWERSTATE_IDLE, 0);
54 exynos_smc(SMC_CMD_SHUTDOWN, OP_TYPE_CLUSTER,
55 SMC_POWERSTATE_IDLE, 0);
56 } else
57 exynos_smc(SMC_CMD_CPU0AFTR, 0, 0, 0);
52 break; 58 break;
53 case FW_DO_IDLE_SLEEP: 59 case FW_DO_IDLE_SLEEP:
54 exynos_smc(SMC_CMD_SLEEP, 0, 0, 0); 60 exynos_smc(SMC_CMD_SLEEP, 0, 0, 0);
@@ -206,3 +212,28 @@ void __init exynos_firmware_init(void)
206 outer_cache.configure = exynos_l2_configure; 212 outer_cache.configure = exynos_l2_configure;
207 } 213 }
208} 214}
215
216#define REG_CPU_STATE_ADDR (sysram_ns_base_addr + 0x28)
217#define BOOT_MODE_MASK 0x1f
218
219void exynos_set_boot_flag(unsigned int cpu, unsigned int mode)
220{
221 unsigned int tmp;
222
223 tmp = __raw_readl(REG_CPU_STATE_ADDR + cpu * 4);
224
225 if (mode & BOOT_MODE_MASK)
226 tmp &= ~BOOT_MODE_MASK;
227
228 tmp |= mode;
229 __raw_writel(tmp, REG_CPU_STATE_ADDR + cpu * 4);
230}
231
232void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode)
233{
234 unsigned int tmp;
235
236 tmp = __raw_readl(REG_CPU_STATE_ADDR + cpu * 4);
237 tmp &= ~mode;
238 __raw_writel(tmp, REG_CPU_STATE_ADDR + cpu * 4);
239}
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c
index b0d3c2e876fb..9bdf54795f05 100644
--- a/arch/arm/mach-exynos/mcpm-exynos.c
+++ b/arch/arm/mach-exynos/mcpm-exynos.c
@@ -61,25 +61,7 @@ static void __iomem *ns_sram_base_addr;
61 : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ 61 : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
62 "r9", "r10", "lr", "memory") 62 "r9", "r10", "lr", "memory")
63 63
64/* 64static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster)
65 * We can't use regular spinlocks. In the switcher case, it is possible
66 * for an outbound CPU to call power_down() after its inbound counterpart
67 * is already live using the same logical CPU number which trips lockdep
68 * debugging.
69 */
70static arch_spinlock_t exynos_mcpm_lock = __ARCH_SPIN_LOCK_UNLOCKED;
71static int
72cpu_use_count[EXYNOS5420_CPUS_PER_CLUSTER][EXYNOS5420_NR_CLUSTERS];
73
74#define exynos_cluster_usecnt(cluster) \
75 (cpu_use_count[0][cluster] + \
76 cpu_use_count[1][cluster] + \
77 cpu_use_count[2][cluster] + \
78 cpu_use_count[3][cluster])
79
80#define exynos_cluster_unused(cluster) !exynos_cluster_usecnt(cluster)
81
82static int exynos_power_up(unsigned int cpu, unsigned int cluster)
83{ 65{
84 unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER); 66 unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
85 67
@@ -88,127 +70,65 @@ static int exynos_power_up(unsigned int cpu, unsigned int cluster)
88 cluster >= EXYNOS5420_NR_CLUSTERS) 70 cluster >= EXYNOS5420_NR_CLUSTERS)
89 return -EINVAL; 71 return -EINVAL;
90 72
91 /* 73 exynos_cpu_power_up(cpunr);
92 * Since this is called with IRQs enabled, and no arch_spin_lock_irq 74 return 0;
93 * variant exists, we need to disable IRQs manually here. 75}
94 */
95 local_irq_disable();
96 arch_spin_lock(&exynos_mcpm_lock);
97
98 cpu_use_count[cpu][cluster]++;
99 if (cpu_use_count[cpu][cluster] == 1) {
100 bool was_cluster_down =
101 (exynos_cluster_usecnt(cluster) == 1);
102
103 /*
104 * Turn on the cluster (L2/COMMON) and then power on the
105 * cores.
106 */
107 if (was_cluster_down)
108 exynos_cluster_power_up(cluster);
109
110 exynos_cpu_power_up(cpunr);
111 } else if (cpu_use_count[cpu][cluster] != 2) {
112 /*
113 * The only possible values are:
114 * 0 = CPU down
115 * 1 = CPU (still) up
116 * 2 = CPU requested to be up before it had a chance
117 * to actually make itself down.
118 * Any other value is a bug.
119 */
120 BUG();
121 }
122 76
123 arch_spin_unlock(&exynos_mcpm_lock); 77static int exynos_cluster_powerup(unsigned int cluster)
124 local_irq_enable(); 78{
79 pr_debug("%s: cluster %u\n", __func__, cluster);
80 if (cluster >= EXYNOS5420_NR_CLUSTERS)
81 return -EINVAL;
125 82
83 exynos_cluster_power_up(cluster);
126 return 0; 84 return 0;
127} 85}
128 86
129/* 87static void exynos_cpu_powerdown_prepare(unsigned int cpu, unsigned int cluster)
130 * NOTE: This function requires the stack data to be visible through power down
131 * and can only be executed on processors like A15 and A7 that hit the cache
132 * with the C bit clear in the SCTLR register.
133 */
134static void exynos_power_down(void)
135{ 88{
136 unsigned int mpidr, cpu, cluster; 89 unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
137 bool last_man = false, skip_wfi = false;
138 unsigned int cpunr;
139
140 mpidr = read_cpuid_mpidr();
141 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
142 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
143 cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
144 90
145 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 91 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
146 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER || 92 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
147 cluster >= EXYNOS5420_NR_CLUSTERS); 93 cluster >= EXYNOS5420_NR_CLUSTERS);
94 exynos_cpu_power_down(cpunr);
95}
148 96
149 __mcpm_cpu_going_down(cpu, cluster); 97static void exynos_cluster_powerdown_prepare(unsigned int cluster)
150 98{
151 arch_spin_lock(&exynos_mcpm_lock); 99 pr_debug("%s: cluster %u\n", __func__, cluster);
152 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP); 100 BUG_ON(cluster >= EXYNOS5420_NR_CLUSTERS);
153 cpu_use_count[cpu][cluster]--; 101 exynos_cluster_power_down(cluster);
154 if (cpu_use_count[cpu][cluster] == 0) { 102}
155 exynos_cpu_power_down(cpunr);
156
157 if (exynos_cluster_unused(cluster)) {
158 exynos_cluster_power_down(cluster);
159 last_man = true;
160 }
161 } else if (cpu_use_count[cpu][cluster] == 1) {
162 /*
163 * A power_up request went ahead of us.
164 * Even if we do not want to shut this CPU down,
165 * the caller expects a certain state as if the WFI
166 * was aborted. So let's continue with cache cleaning.
167 */
168 skip_wfi = true;
169 } else {
170 BUG();
171 }
172
173 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
174 arch_spin_unlock(&exynos_mcpm_lock);
175
176 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
177 /*
178 * On the Cortex-A15 we need to disable
179 * L2 prefetching before flushing the cache.
180 */
181 asm volatile(
182 "mcr p15, 1, %0, c15, c0, 3\n\t"
183 "isb\n\t"
184 "dsb"
185 : : "r" (0x400));
186 }
187 103
188 /* Flush all cache levels for this cluster. */ 104static void exynos_cpu_cache_disable(void)
189 exynos_v7_exit_coherency_flush(all); 105{
106 /* Disable and flush the local CPU cache. */
107 exynos_v7_exit_coherency_flush(louis);
108}
190 109
110static void exynos_cluster_cache_disable(void)
111{
112 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
191 /* 113 /*
192 * Disable cluster-level coherency by masking 114 * On the Cortex-A15 we need to disable
193 * incoming snoops and DVM messages: 115 * L2 prefetching before flushing the cache.
194 */ 116 */
195 cci_disable_port_by_cpu(mpidr); 117 asm volatile(
196 118 "mcr p15, 1, %0, c15, c0, 3\n\t"
197 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN); 119 "isb\n\t"
198 } else { 120 "dsb"
199 arch_spin_unlock(&exynos_mcpm_lock); 121 : : "r" (0x400));
200
201 /* Disable and flush the local CPU cache. */
202 exynos_v7_exit_coherency_flush(louis);
203 } 122 }
204 123
205 __mcpm_cpu_down(cpu, cluster); 124 /* Flush all cache levels for this cluster. */
206 125 exynos_v7_exit_coherency_flush(all);
207 /* Now we are prepared for power-down, do it: */
208 if (!skip_wfi)
209 wfi();
210 126
211 /* Not dead at this point? Let our caller cope. */ 127 /*
128 * Disable cluster-level coherency by masking
129 * incoming snoops and DVM messages:
130 */
131 cci_disable_port_by_cpu(read_cpuid_mpidr());
212} 132}
213 133
214static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster) 134static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
@@ -222,10 +142,8 @@ static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
222 142
223 /* Wait for the core state to be OFF */ 143 /* Wait for the core state to be OFF */
224 while (tries--) { 144 while (tries--) {
225 if (ACCESS_ONCE(cpu_use_count[cpu][cluster]) == 0) { 145 if ((exynos_cpu_power_state(cpunr) == 0))
226 if ((exynos_cpu_power_state(cpunr) == 0)) 146 return 0; /* success: the CPU is halted */
227 return 0; /* success: the CPU is halted */
228 }
229 147
230 /* Otherwise, wait and retry: */ 148 /* Otherwise, wait and retry: */
231 msleep(1); 149 msleep(1);
@@ -234,63 +152,23 @@ static int exynos_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
234 return -ETIMEDOUT; /* timeout */ 152 return -ETIMEDOUT; /* timeout */
235} 153}
236 154
237static void exynos_powered_up(void) 155static void exynos_cpu_is_up(unsigned int cpu, unsigned int cluster)
238{
239 unsigned int mpidr, cpu, cluster;
240
241 mpidr = read_cpuid_mpidr();
242 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
243 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
244
245 arch_spin_lock(&exynos_mcpm_lock);
246 if (cpu_use_count[cpu][cluster] == 0)
247 cpu_use_count[cpu][cluster] = 1;
248 arch_spin_unlock(&exynos_mcpm_lock);
249}
250
251static void exynos_suspend(u64 residency)
252{ 156{
253 unsigned int mpidr, cpunr; 157 /* especially when resuming: make sure power control is set */
254 158 exynos_cpu_powerup(cpu, cluster);
255 exynos_power_down();
256
257 /*
258 * Execution reaches here only if cpu did not power down.
259 * Hence roll back the changes done in exynos_power_down function.
260 *
261 * CAUTION: "This function requires the stack data to be visible through
262 * power down and can only be executed on processors like A15 and A7
263 * that hit the cache with the C bit clear in the SCTLR register."
264 */
265 mpidr = read_cpuid_mpidr();
266 cpunr = exynos_pmu_cpunr(mpidr);
267
268 exynos_cpu_power_up(cpunr);
269} 159}
270 160
271static const struct mcpm_platform_ops exynos_power_ops = { 161static const struct mcpm_platform_ops exynos_power_ops = {
272 .power_up = exynos_power_up, 162 .cpu_powerup = exynos_cpu_powerup,
273 .power_down = exynos_power_down, 163 .cluster_powerup = exynos_cluster_powerup,
164 .cpu_powerdown_prepare = exynos_cpu_powerdown_prepare,
165 .cluster_powerdown_prepare = exynos_cluster_powerdown_prepare,
166 .cpu_cache_disable = exynos_cpu_cache_disable,
167 .cluster_cache_disable = exynos_cluster_cache_disable,
274 .wait_for_powerdown = exynos_wait_for_powerdown, 168 .wait_for_powerdown = exynos_wait_for_powerdown,
275 .suspend = exynos_suspend, 169 .cpu_is_up = exynos_cpu_is_up,
276 .powered_up = exynos_powered_up,
277}; 170};
278 171
279static void __init exynos_mcpm_usage_count_init(void)
280{
281 unsigned int mpidr, cpu, cluster;
282
283 mpidr = read_cpuid_mpidr();
284 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
285 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
286
287 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
288 BUG_ON(cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
289 cluster >= EXYNOS5420_NR_CLUSTERS);
290
291 cpu_use_count[cpu][cluster] = 1;
292}
293
294/* 172/*
295 * Enable cluster-level coherency, in preparation for turning on the MMU. 173 * Enable cluster-level coherency, in preparation for turning on the MMU.
296 */ 174 */
@@ -302,19 +180,6 @@ static void __naked exynos_pm_power_up_setup(unsigned int affinity_level)
302 "b cci_enable_port_for_self"); 180 "b cci_enable_port_for_self");
303} 181}
304 182
305static void __init exynos_cache_off(void)
306{
307 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
308 /* disable L2 prefetching on the Cortex-A15 */
309 asm volatile(
310 "mcr p15, 1, %0, c15, c0, 3\n\t"
311 "isb\n\t"
312 "dsb"
313 : : "r" (0x400));
314 }
315 exynos_v7_exit_coherency_flush(all);
316}
317
318static const struct of_device_id exynos_dt_mcpm_match[] = { 183static const struct of_device_id exynos_dt_mcpm_match[] = {
319 { .compatible = "samsung,exynos5420" }, 184 { .compatible = "samsung,exynos5420" },
320 { .compatible = "samsung,exynos5800" }, 185 { .compatible = "samsung,exynos5800" },
@@ -370,13 +235,11 @@ static int __init exynos_mcpm_init(void)
370 */ 235 */
371 pmu_raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3); 236 pmu_raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3);
372 237
373 exynos_mcpm_usage_count_init();
374
375 ret = mcpm_platform_register(&exynos_power_ops); 238 ret = mcpm_platform_register(&exynos_power_ops);
376 if (!ret) 239 if (!ret)
377 ret = mcpm_sync_init(exynos_pm_power_up_setup); 240 ret = mcpm_sync_init(exynos_pm_power_up_setup);
378 if (!ret) 241 if (!ret)
379 ret = mcpm_loopback(exynos_cache_off); /* turn on the CCI */ 242 ret = mcpm_loopback(exynos_cluster_cache_disable); /* turn on the CCI */
380 if (ret) { 243 if (ret) {
381 iounmap(ns_sram_base_addr); 244 iounmap(ns_sram_base_addr);
382 return ret; 245 return ret;
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index d2e9f12d12f1..ebd135bb0995 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -126,6 +126,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
126 */ 126 */
127void exynos_cpu_power_down(int cpu) 127void exynos_cpu_power_down(int cpu)
128{ 128{
129 u32 core_conf;
130
129 if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) { 131 if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) {
130 /* 132 /*
131 * Bypass power down for CPU0 during suspend. Check for 133 * Bypass power down for CPU0 during suspend. Check for
@@ -137,7 +139,10 @@ void exynos_cpu_power_down(int cpu)
137 if (!(val & S5P_CORE_LOCAL_PWR_EN)) 139 if (!(val & S5P_CORE_LOCAL_PWR_EN))
138 return; 140 return;
139 } 141 }
140 pmu_raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); 142
143 core_conf = pmu_raw_readl(EXYNOS_ARM_CORE_CONFIGURATION(cpu));
144 core_conf &= ~S5P_CORE_LOCAL_PWR_EN;
145 pmu_raw_writel(core_conf, EXYNOS_ARM_CORE_CONFIGURATION(cpu));
141} 146}
142 147
143/** 148/**
@@ -148,7 +153,12 @@ void exynos_cpu_power_down(int cpu)
148 */ 153 */
149void exynos_cpu_power_up(int cpu) 154void exynos_cpu_power_up(int cpu)
150{ 155{
151 pmu_raw_writel(S5P_CORE_LOCAL_PWR_EN, 156 u32 core_conf = S5P_CORE_LOCAL_PWR_EN;
157
158 if (soc_is_exynos3250())
159 core_conf |= S5P_CORE_AUTOWAKEUP_EN;
160
161 pmu_raw_writel(core_conf,
152 EXYNOS_ARM_CORE_CONFIGURATION(cpu)); 162 EXYNOS_ARM_CORE_CONFIGURATION(cpu));
153} 163}
154 164
@@ -226,6 +236,10 @@ static void exynos_core_restart(u32 core_id)
226 if (!of_machine_is_compatible("samsung,exynos3250")) 236 if (!of_machine_is_compatible("samsung,exynos3250"))
227 return; 237 return;
228 238
239 while (!pmu_raw_readl(S5P_PMU_SPARE2))
240 udelay(10);
241 udelay(10);
242
229 val = pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(core_id)); 243 val = pmu_raw_readl(EXYNOS_ARM_CORE_STATUS(core_id));
230 val |= S5P_CORE_WAKEUP_FROM_LOCAL_CFG; 244 val |= S5P_CORE_WAKEUP_FROM_LOCAL_CFG;
231 pmu_raw_writel(val, EXYNOS_ARM_CORE_STATUS(core_id)); 245 pmu_raw_writel(val, EXYNOS_ARM_CORE_STATUS(core_id));
@@ -346,7 +360,10 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
346 360
347 call_firmware_op(cpu_boot, core_id); 361 call_firmware_op(cpu_boot, core_id);
348 362
349 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 363 if (soc_is_exynos3250())
364 dsb_sev();
365 else
366 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
350 367
351 if (pen_release == -1) 368 if (pen_release == -1)
352 break; 369 break;
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index e6209dadc00d..cc75ab448be3 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -127,6 +127,8 @@ int exynos_pm_central_resume(void)
127static void exynos_set_wakeupmask(long mask) 127static void exynos_set_wakeupmask(long mask)
128{ 128{
129 pmu_raw_writel(mask, S5P_WAKEUP_MASK); 129 pmu_raw_writel(mask, S5P_WAKEUP_MASK);
130 if (soc_is_exynos3250())
131 pmu_raw_writel(0x0, S5P_WAKEUP_MASK2);
130} 132}
131 133
132static void exynos_cpu_set_boot_vector(long flags) 134static void exynos_cpu_set_boot_vector(long flags)
@@ -140,7 +142,7 @@ static int exynos_aftr_finisher(unsigned long flags)
140{ 142{
141 int ret; 143 int ret;
142 144
143 exynos_set_wakeupmask(0x0000ff3e); 145 exynos_set_wakeupmask(soc_is_exynos3250() ? 0x40003ffe : 0x0000ff3e);
144 /* Set value of power down register for aftr mode */ 146 /* Set value of power down register for aftr mode */
145 exynos_sys_powerdown_conf(SYS_AFTR); 147 exynos_sys_powerdown_conf(SYS_AFTR);
146 148
@@ -157,8 +159,13 @@ static int exynos_aftr_finisher(unsigned long flags)
157 159
158void exynos_enter_aftr(void) 160void exynos_enter_aftr(void)
159{ 161{
162 unsigned int cpuid = smp_processor_id();
163
160 cpu_pm_enter(); 164 cpu_pm_enter();
161 165
166 if (soc_is_exynos3250())
167 exynos_set_boot_flag(cpuid, C2_STATE);
168
162 exynos_pm_central_suspend(); 169 exynos_pm_central_suspend();
163 170
164 if (of_machine_is_compatible("samsung,exynos4212") || 171 if (of_machine_is_compatible("samsung,exynos4212") ||
@@ -178,9 +185,13 @@ void exynos_enter_aftr(void)
178 185
179 exynos_pm_central_resume(); 186 exynos_pm_central_resume();
180 187
188 if (soc_is_exynos3250())
189 exynos_clear_boot_flag(cpuid, C2_STATE);
190
181 cpu_pm_exit(); 191 cpu_pm_exit();
182} 192}
183 193
194#if defined(CONFIG_SMP) && defined(CONFIG_ARM_EXYNOS_CPUIDLE)
184static atomic_t cpu1_wakeup = ATOMIC_INIT(0); 195static atomic_t cpu1_wakeup = ATOMIC_INIT(0);
185 196
186static int exynos_cpu0_enter_aftr(void) 197static int exynos_cpu0_enter_aftr(void)
@@ -302,3 +313,4 @@ struct cpuidle_exynos_data cpuidle_coupled_exynos_data = {
302 .pre_enter_aftr = exynos_pre_enter_aftr, 313 .pre_enter_aftr = exynos_pre_enter_aftr,
303 .post_enter_aftr = exynos_post_enter_aftr, 314 .post_enter_aftr = exynos_post_enter_aftr,
304}; 315};
316#endif /* CONFIG_SMP && CONFIG_ARM_EXYNOS_CPUIDLE */
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index 37266a826437..cbe56b35aea0 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -37,6 +37,7 @@ struct exynos_pm_domain {
37 struct clk *oscclk; 37 struct clk *oscclk;
38 struct clk *clk[MAX_CLK_PER_DOMAIN]; 38 struct clk *clk[MAX_CLK_PER_DOMAIN];
39 struct clk *pclk[MAX_CLK_PER_DOMAIN]; 39 struct clk *pclk[MAX_CLK_PER_DOMAIN];
40 struct clk *asb_clk[MAX_CLK_PER_DOMAIN];
40}; 41};
41 42
42static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on) 43static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
@@ -45,14 +46,19 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
45 void __iomem *base; 46 void __iomem *base;
46 u32 timeout, pwr; 47 u32 timeout, pwr;
47 char *op; 48 char *op;
49 int i;
48 50
49 pd = container_of(domain, struct exynos_pm_domain, pd); 51 pd = container_of(domain, struct exynos_pm_domain, pd);
50 base = pd->base; 52 base = pd->base;
51 53
54 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
55 if (IS_ERR(pd->asb_clk[i]))
56 break;
57 clk_prepare_enable(pd->asb_clk[i]);
58 }
59
52 /* Set oscclk before powering off a domain*/ 60 /* Set oscclk before powering off a domain*/
53 if (!power_on) { 61 if (!power_on) {
54 int i;
55
56 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) { 62 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
57 if (IS_ERR(pd->clk[i])) 63 if (IS_ERR(pd->clk[i]))
58 break; 64 break;
@@ -81,8 +87,6 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
81 87
82 /* Restore clocks after powering on a domain*/ 88 /* Restore clocks after powering on a domain*/
83 if (power_on) { 89 if (power_on) {
84 int i;
85
86 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) { 90 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
87 if (IS_ERR(pd->clk[i])) 91 if (IS_ERR(pd->clk[i]))
88 break; 92 break;
@@ -92,6 +96,12 @@ static int exynos_pd_power(struct generic_pm_domain *domain, bool power_on)
92 } 96 }
93 } 97 }
94 98
99 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
100 if (IS_ERR(pd->asb_clk[i]))
101 break;
102 clk_disable_unprepare(pd->asb_clk[i]);
103 }
104
95 return 0; 105 return 0;
96} 106}
97 107
@@ -125,12 +135,21 @@ static __init int exynos4_pm_init_power_domain(void)
125 return -ENOMEM; 135 return -ENOMEM;
126 } 136 }
127 137
128 pd->pd.name = kstrdup(np->name, GFP_KERNEL); 138 pd->pd.name = kstrdup(dev_name(dev), GFP_KERNEL);
129 pd->name = pd->pd.name; 139 pd->name = pd->pd.name;
130 pd->base = of_iomap(np, 0); 140 pd->base = of_iomap(np, 0);
131 pd->pd.power_off = exynos_pd_power_off; 141 pd->pd.power_off = exynos_pd_power_off;
132 pd->pd.power_on = exynos_pd_power_on; 142 pd->pd.power_on = exynos_pd_power_on;
133 143
144 for (i = 0; i < MAX_CLK_PER_DOMAIN; i++) {
145 char clk_name[8];
146
147 snprintf(clk_name, sizeof(clk_name), "asb%d", i);
148 pd->asb_clk[i] = clk_get(dev, clk_name);
149 if (IS_ERR(pd->asb_clk[i]))
150 break;
151 }
152
134 pd->oscclk = clk_get(dev, "oscclk"); 153 pd->oscclk = clk_get(dev, "oscclk");
135 if (IS_ERR(pd->oscclk)) 154 if (IS_ERR(pd->oscclk))
136 goto no_clk; 155 goto no_clk;
diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
index eb461e1c325a..b7614333d296 100644
--- a/arch/arm/mach-exynos/regs-pmu.h
+++ b/arch/arm/mach-exynos/regs-pmu.h
@@ -43,12 +43,14 @@
43#define S5P_WAKEUP_STAT 0x0600 43#define S5P_WAKEUP_STAT 0x0600
44#define S5P_EINT_WAKEUP_MASK 0x0604 44#define S5P_EINT_WAKEUP_MASK 0x0604
45#define S5P_WAKEUP_MASK 0x0608 45#define S5P_WAKEUP_MASK 0x0608
46#define S5P_WAKEUP_MASK2 0x0614
46 47
47#define S5P_INFORM0 0x0800 48#define S5P_INFORM0 0x0800
48#define S5P_INFORM1 0x0804 49#define S5P_INFORM1 0x0804
49#define S5P_INFORM5 0x0814 50#define S5P_INFORM5 0x0814
50#define S5P_INFORM6 0x0818 51#define S5P_INFORM6 0x0818
51#define S5P_INFORM7 0x081C 52#define S5P_INFORM7 0x081C
53#define S5P_PMU_SPARE2 0x0908
52#define S5P_PMU_SPARE3 0x090C 54#define S5P_PMU_SPARE3 0x090C
53 55
54#define EXYNOS_IROM_DATA2 0x0988 56#define EXYNOS_IROM_DATA2 0x0988
@@ -182,6 +184,7 @@
182 184
183#define S5P_CORE_LOCAL_PWR_EN 0x3 185#define S5P_CORE_LOCAL_PWR_EN 0x3
184#define S5P_CORE_WAKEUP_FROM_LOCAL_CFG (0x3 << 8) 186#define S5P_CORE_WAKEUP_FROM_LOCAL_CFG (0x3 << 8)
187#define S5P_CORE_AUTOWAKEUP_EN (1 << 31)
185 188
186/* Only for EXYNOS4210 */ 189/* Only for EXYNOS4210 */
187#define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154 190#define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154
diff --git a/arch/arm/mach-exynos/smc.h b/arch/arm/mach-exynos/smc.h
index f7b82f9c1e21..c2845717bc8f 100644
--- a/arch/arm/mach-exynos/smc.h
+++ b/arch/arm/mach-exynos/smc.h
@@ -17,6 +17,8 @@
17#define SMC_CMD_SLEEP (-3) 17#define SMC_CMD_SLEEP (-3)
18#define SMC_CMD_CPU1BOOT (-4) 18#define SMC_CMD_CPU1BOOT (-4)
19#define SMC_CMD_CPU0AFTR (-5) 19#define SMC_CMD_CPU0AFTR (-5)
20#define SMC_CMD_SAVE (-6)
21#define SMC_CMD_SHUTDOWN (-7)
20/* For CP15 Access */ 22/* For CP15 Access */
21#define SMC_CMD_C15RESUME (-11) 23#define SMC_CMD_C15RESUME (-11)
22/* For L2 Cache Access */ 24/* For L2 Cache Access */
@@ -32,4 +34,11 @@ extern void exynos_smc(u32 cmd, u32 arg1, u32 arg2, u32 arg3);
32 34
33#endif /* __ASSEMBLY__ */ 35#endif /* __ASSEMBLY__ */
34 36
37/* op type for SMC_CMD_SAVE and SMC_CMD_SHUTDOWN */
38#define OP_TYPE_CORE 0x0
39#define OP_TYPE_CLUSTER 0x1
40
41/* Power State required for SMC_CMD_SAVE and SMC_CMD_SHUTDOWN */
42#define SMC_POWERSTATE_IDLE 0x1
43
35#endif 44#endif
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 2146d918aedd..3e6aea7f83af 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -65,8 +65,6 @@ static struct sleep_save exynos_core_save[] = {
65 65
66struct exynos_pm_data { 66struct exynos_pm_data {
67 const struct exynos_wkup_irq *wkup_irq; 67 const struct exynos_wkup_irq *wkup_irq;
68 struct sleep_save *extra_save;
69 int num_extra_save;
70 unsigned int wake_disable_mask; 68 unsigned int wake_disable_mask;
71 unsigned int *release_ret_regs; 69 unsigned int *release_ret_regs;
72 70
@@ -77,7 +75,7 @@ struct exynos_pm_data {
77 int (*cpu_suspend)(unsigned long); 75 int (*cpu_suspend)(unsigned long);
78}; 76};
79 77
80struct exynos_pm_data *pm_data; 78static const struct exynos_pm_data *pm_data;
81 79
82static int exynos5420_cpu_state; 80static int exynos5420_cpu_state;
83static unsigned int exynos_pmu_spare3; 81static unsigned int exynos_pmu_spare3;
@@ -106,7 +104,7 @@ static const struct exynos_wkup_irq exynos5250_wkup_irq[] = {
106 { /* sentinel */ }, 104 { /* sentinel */ },
107}; 105};
108 106
109unsigned int exynos_release_ret_regs[] = { 107static unsigned int exynos_release_ret_regs[] = {
110 S5P_PAD_RET_MAUDIO_OPTION, 108 S5P_PAD_RET_MAUDIO_OPTION,
111 S5P_PAD_RET_GPIO_OPTION, 109 S5P_PAD_RET_GPIO_OPTION,
112 S5P_PAD_RET_UART_OPTION, 110 S5P_PAD_RET_UART_OPTION,
@@ -117,7 +115,7 @@ unsigned int exynos_release_ret_regs[] = {
117 REG_TABLE_END, 115 REG_TABLE_END,
118}; 116};
119 117
120unsigned int exynos3250_release_ret_regs[] = { 118static unsigned int exynos3250_release_ret_regs[] = {
121 S5P_PAD_RET_MAUDIO_OPTION, 119 S5P_PAD_RET_MAUDIO_OPTION,
122 S5P_PAD_RET_GPIO_OPTION, 120 S5P_PAD_RET_GPIO_OPTION,
123 S5P_PAD_RET_UART_OPTION, 121 S5P_PAD_RET_UART_OPTION,
@@ -130,7 +128,7 @@ unsigned int exynos3250_release_ret_regs[] = {
130 REG_TABLE_END, 128 REG_TABLE_END,
131}; 129};
132 130
133unsigned int exynos5420_release_ret_regs[] = { 131static unsigned int exynos5420_release_ret_regs[] = {
134 EXYNOS_PAD_RET_DRAM_OPTION, 132 EXYNOS_PAD_RET_DRAM_OPTION,
135 EXYNOS_PAD_RET_MAUDIO_OPTION, 133 EXYNOS_PAD_RET_MAUDIO_OPTION,
136 EXYNOS_PAD_RET_JTAG_OPTION, 134 EXYNOS_PAD_RET_JTAG_OPTION,
@@ -349,10 +347,6 @@ static void exynos_pm_prepare(void)
349 347
350 s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); 348 s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save));
351 349
352 if (pm_data->extra_save)
353 s3c_pm_do_save(pm_data->extra_save,
354 pm_data->num_extra_save);
355
356 exynos_pm_enter_sleep_mode(); 350 exynos_pm_enter_sleep_mode();
357 351
358 /* ensure at least INFORM0 has the resume address */ 352 /* ensure at least INFORM0 has the resume address */
@@ -475,10 +469,6 @@ static void exynos_pm_resume(void)
475 /* For release retention */ 469 /* For release retention */
476 exynos_pm_release_retention(); 470 exynos_pm_release_retention();
477 471
478 if (pm_data->extra_save)
479 s3c_pm_do_restore_core(pm_data->extra_save,
480 pm_data->num_extra_save);
481
482 s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); 472 s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save));
483 473
484 if (cpuid == ARM_CPU_PART_CORTEX_A9) 474 if (cpuid == ARM_CPU_PART_CORTEX_A9)
@@ -685,7 +675,7 @@ static const struct exynos_pm_data exynos5250_pm_data = {
685 .cpu_suspend = exynos_cpu_suspend, 675 .cpu_suspend = exynos_cpu_suspend,
686}; 676};
687 677
688static struct exynos_pm_data exynos5420_pm_data = { 678static const struct exynos_pm_data exynos5420_pm_data = {
689 .wkup_irq = exynos5250_wkup_irq, 679 .wkup_irq = exynos5250_wkup_irq,
690 .wake_disable_mask = (0x7F << 7) | (0x1F << 1), 680 .wake_disable_mask = (0x7F << 7) | (0x1F << 1),
691 .release_ret_regs = exynos5420_release_ret_regs, 681 .release_ret_regs = exynos5420_release_ret_regs,
@@ -736,7 +726,7 @@ void __init exynos_pm_init(void)
736 if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) 726 if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL)))
737 pr_warn("Outdated DT detected, suspend/resume will NOT work\n"); 727 pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
738 728
739 pm_data = (struct exynos_pm_data *) match->data; 729 pm_data = (const struct exynos_pm_data *) match->data;
740 730
741 /* All wakeup disable */ 731 /* All wakeup disable */
742 tmp = pmu_raw_readl(S5P_WAKEUP_MASK); 732 tmp = pmu_raw_readl(S5P_WAKEUP_MASK);
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index c8dffcee9736..3a3d3e9d7bfd 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -21,6 +21,7 @@ config MXC_AVIC
21 21
22config MXC_DEBUG_BOARD 22config MXC_DEBUG_BOARD
23 bool "Enable MXC debug board(for 3-stack)" 23 bool "Enable MXC debug board(for 3-stack)"
24 depends on MACH_MX27_3DS || MACH_MX31_3DS || MACH_MX35_3DS
24 help 25 help
25 The debug board is an integral part of the MXC 3-stack(PDK) 26 The debug board is an integral part of the MXC 3-stack(PDK)
26 platforms, it can be attached or removed from the peripheral 27 platforms, it can be attached or removed from the peripheral
@@ -50,6 +51,7 @@ config HAVE_IMX_ANATOP
50 51
51config HAVE_IMX_GPC 52config HAVE_IMX_GPC
52 bool 53 bool
54 select PM_GENERIC_DOMAINS if PM
53 55
54config HAVE_IMX_MMDC 56config HAVE_IMX_MMDC
55 bool 57 bool
@@ -77,13 +79,6 @@ config SOC_IMX21
77 select IMX_HAVE_IOMUX_V1 79 select IMX_HAVE_IOMUX_V1
78 select MXC_AVIC 80 select MXC_AVIC
79 81
80config SOC_IMX25
81 bool
82 select ARCH_MXC_IOMUX_V3
83 select CPU_ARM926T
84 select MXC_AVIC
85 select PINCTRL_IMX25
86
87config SOC_IMX27 82config SOC_IMX27
88 bool 83 bool
89 select CPU_ARM926T 84 select CPU_ARM926T
@@ -149,62 +144,6 @@ config MACH_MX21ADS
149 Include support for MX21ADS platform. This includes specific 144 Include support for MX21ADS platform. This includes specific
150 configurations for the board and its peripherals. 145 configurations for the board and its peripherals.
151 146
152comment "MX25 platforms:"
153
154config MACH_MX25_3DS
155 bool "Support MX25PDK (3DS) Platform"
156 select IMX_HAVE_PLATFORM_FLEXCAN
157 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
158 select IMX_HAVE_PLATFORM_IMX2_WDT
159 select IMX_HAVE_PLATFORM_IMXDI_RTC
160 select IMX_HAVE_PLATFORM_IMX_FB
161 select IMX_HAVE_PLATFORM_IMX_I2C
162 select IMX_HAVE_PLATFORM_IMX_KEYPAD
163 select IMX_HAVE_PLATFORM_IMX_UART
164 select IMX_HAVE_PLATFORM_MXC_EHCI
165 select IMX_HAVE_PLATFORM_MXC_NAND
166 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
167 select SOC_IMX25
168
169config MACH_EUKREA_CPUIMX25SD
170 bool "Support Eukrea CPUIMX25 Platform"
171 select IMX_HAVE_PLATFORM_FLEXCAN
172 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
173 select IMX_HAVE_PLATFORM_IMX2_WDT
174 select IMX_HAVE_PLATFORM_IMXDI_RTC
175 select IMX_HAVE_PLATFORM_IMX_FB
176 select IMX_HAVE_PLATFORM_IMX_I2C
177 select IMX_HAVE_PLATFORM_IMX_UART
178 select IMX_HAVE_PLATFORM_MXC_EHCI
179 select IMX_HAVE_PLATFORM_MXC_NAND
180 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
181 select USB_ULPI_VIEWPORT if USB_ULPI
182 select SOC_IMX25
183
184choice
185 prompt "Baseboard"
186 depends on MACH_EUKREA_CPUIMX25SD
187 default MACH_EUKREA_MBIMXSD25_BASEBOARD
188
189config MACH_EUKREA_MBIMXSD25_BASEBOARD
190 bool "Eukrea MBIMXSD development board"
191 select IMX_HAVE_PLATFORM_GPIO_KEYS
192 select IMX_HAVE_PLATFORM_IMX_SSI
193 select IMX_HAVE_PLATFORM_SPI_IMX
194 select LEDS_GPIO_REGISTER
195 help
196 This adds board specific devices that can be found on Eukrea's
197 MBIMXSD evaluation board.
198
199endchoice
200
201config MACH_IMX25_DT
202 bool "Support i.MX25 platforms from device tree"
203 select SOC_IMX25
204 help
205 Include support for Freescale i.MX25 based platforms
206 using the device tree for discovery
207
208comment "MX27 platforms:" 147comment "MX27 platforms:"
209 148
210config MACH_MX27ADS 149config MACH_MX27ADS
@@ -557,6 +496,20 @@ config MACH_VPR200
557 496
558endif 497endif
559 498
499if ARCH_MULTI_V5
500
501comment "Device tree only"
502
503config SOC_IMX25
504 bool "i.MX25 support"
505 select ARCH_MXC_IOMUX_V3
506 select CPU_ARM926T
507 select MXC_AVIC
508 select PINCTRL_IMX25
509 help
510 This enables support for Freescale i.MX25 processor
511endif
512
560if ARCH_MULTI_V7 513if ARCH_MULTI_V7
561 514
562comment "Device tree only" 515comment "Device tree only"
@@ -635,9 +588,10 @@ config SOC_VF610
635 select ARM_GIC 588 select ARM_GIC
636 select PINCTRL_VF610 589 select PINCTRL_VF610
637 select PL310_ERRATA_769419 if CACHE_L2X0 590 select PL310_ERRATA_769419 if CACHE_L2X0
591 select SMP_ON_UP if SMP
638 592
639 help 593 help
640 This enable support for Freescale Vybrid VF610 processor. 594 This enables support for Freescale Vybrid VF610 processor.
641 595
642choice 596choice
643 prompt "Clocksource for scheduler clock" 597 prompt "Clocksource for scheduler clock"
@@ -667,7 +621,7 @@ config SOC_LS1021A
667 select ZONE_DMA if ARM_LPAE 621 select ZONE_DMA if ARM_LPAE
668 622
669 help 623 help
670 This enable support for Freescale LS1021A processor. 624 This enables support for Freescale LS1021A processor.
671 625
672endif 626endif
673 627
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 8d1b10180908..3244cf1d2773 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -3,7 +3,7 @@ obj-y := time.o cpu.o system.o irq-common.o
3obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o 3obj-$(CONFIG_SOC_IMX1) += clk-imx1.o mm-imx1.o
4obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o 4obj-$(CONFIG_SOC_IMX21) += clk-imx21.o mm-imx21.o
5 5
6obj-$(CONFIG_SOC_IMX25) += clk-imx25.o mm-imx25.o ehci-imx25.o cpu-imx25.o 6obj-$(CONFIG_SOC_IMX25) += clk-imx25.o cpu-imx25.o mach-imx25.o
7 7
8obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o 8obj-$(CONFIG_SOC_IMX27) += cpu-imx27.o pm-imx27.o
9obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o 9obj-$(CONFIG_SOC_IMX27) += clk-imx27.o mm-imx27.o ehci-imx27.o
@@ -48,12 +48,6 @@ obj-$(CONFIG_MACH_IMX1_DT) += imx1-dt.o
48# i.MX21 based machines 48# i.MX21 based machines
49obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o 49obj-$(CONFIG_MACH_MX21ADS) += mach-mx21ads.o
50 50
51# i.MX25 based machines
52obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o
53obj-$(CONFIG_MACH_EUKREA_CPUIMX25SD) += mach-eukrea_cpuimx25.o
54obj-$(CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD) += eukrea_mbimxsd25-baseboard.o
55obj-$(CONFIG_MACH_IMX25_DT) += imx25-dt.o
56
57# i.MX27 based machines 51# i.MX27 based machines
58obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o 52obj-$(CONFIG_MACH_MX27ADS) += mach-mx27ads.o
59obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o 53obj-$(CONFIG_MACH_MX27_3DS) += mach-mx27_3ds.o
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index 59c0c8558c6b..9c2633a9de9f 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -30,7 +30,6 @@
30#include "clk.h" 30#include "clk.h"
31#include "common.h" 31#include "common.h"
32#include "hardware.h" 32#include "hardware.h"
33#include "mx25.h"
34 33
35#define CCM_MPCTL 0x00 34#define CCM_MPCTL 0x00
36#define CCM_UPCTL 0x04 35#define CCM_UPCTL 0x04
@@ -239,80 +238,6 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
239 return 0; 238 return 0;
240} 239}
241 240
242int __init mx25_clocks_init(void)
243{
244 void __iomem *ccm;
245
246 ccm = ioremap(MX25_CRM_BASE_ADDR, SZ_16K);
247
248 __mx25_clocks_init(24000000, ccm);
249
250 clk_register_clkdev(clk[gpt1_ipg], "ipg", "imx-gpt.0");
251 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
252 /* i.mx25 has the i.mx21 type uart */
253 clk_register_clkdev(clk[uart1_ipg], "ipg", "imx21-uart.0");
254 clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.0");
255 clk_register_clkdev(clk[uart2_ipg], "ipg", "imx21-uart.1");
256 clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.1");
257 clk_register_clkdev(clk[uart3_ipg], "ipg", "imx21-uart.2");
258 clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.2");
259 clk_register_clkdev(clk[uart4_ipg], "ipg", "imx21-uart.3");
260 clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.3");
261 clk_register_clkdev(clk[uart5_ipg], "ipg", "imx21-uart.4");
262 clk_register_clkdev(clk[uart_ipg_per], "per", "imx21-uart.4");
263 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0");
264 clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.0");
265 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0");
266 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1");
267 clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.1");
268 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1");
269 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
270 clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2");
271 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
272 clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
273 clk_register_clkdev(clk[usbotg_ahb], "ahb", "imx-udc-mx27");
274 clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
275 clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0");
276 /* i.mx25 has the i.mx35 type cspi */
277 clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
278 clk_register_clkdev(clk[cspi2_ipg], NULL, "imx35-cspi.1");
279 clk_register_clkdev(clk[cspi3_ipg], NULL, "imx35-cspi.2");
280 clk_register_clkdev(clk[kpp_ipg], NULL, "imx-keypad");
281 clk_register_clkdev(clk[tsc_ipg], NULL, "mx25-adc");
282 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.0");
283 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.1");
284 clk_register_clkdev(clk[i2c_ipg_per], NULL, "imx21-i2c.2");
285 clk_register_clkdev(clk[fec_ipg], "ipg", "imx25-fec.0");
286 clk_register_clkdev(clk[fec_ahb], "ahb", "imx25-fec.0");
287 clk_register_clkdev(clk[dryice_ipg], NULL, "imxdi_rtc.0");
288 clk_register_clkdev(clk[lcdc_ipg_per], "per", "imx21-fb.0");
289 clk_register_clkdev(clk[lcdc_ipg], "ipg", "imx21-fb.0");
290 clk_register_clkdev(clk[lcdc_ahb], "ahb", "imx21-fb.0");
291 clk_register_clkdev(clk[wdt_ipg], NULL, "imx2-wdt.0");
292 clk_register_clkdev(clk[ssi1_ipg], NULL, "imx-ssi.0");
293 clk_register_clkdev(clk[ssi2_ipg], NULL, "imx-ssi.1");
294 clk_register_clkdev(clk[esdhc1_ipg_per], "per", "sdhci-esdhc-imx25.0");
295 clk_register_clkdev(clk[esdhc1_ipg], "ipg", "sdhci-esdhc-imx25.0");
296 clk_register_clkdev(clk[esdhc1_ahb], "ahb", "sdhci-esdhc-imx25.0");
297 clk_register_clkdev(clk[esdhc2_ipg_per], "per", "sdhci-esdhc-imx25.1");
298 clk_register_clkdev(clk[esdhc2_ipg], "ipg", "sdhci-esdhc-imx25.1");
299 clk_register_clkdev(clk[esdhc2_ahb], "ahb", "sdhci-esdhc-imx25.1");
300 clk_register_clkdev(clk[csi_ipg_per], "per", "imx25-camera.0");
301 clk_register_clkdev(clk[csi_ipg], "ipg", "imx25-camera.0");
302 clk_register_clkdev(clk[csi_ahb], "ahb", "imx25-camera.0");
303 clk_register_clkdev(clk[dummy], "audmux", NULL);
304 clk_register_clkdev(clk[can1_ipg], NULL, "flexcan.0");
305 clk_register_clkdev(clk[can2_ipg], NULL, "flexcan.1");
306 /* i.mx25 has the i.mx35 type sdma */
307 clk_register_clkdev(clk[sdma_ipg], "ipg", "imx35-sdma");
308 clk_register_clkdev(clk[sdma_ahb], "ahb", "imx35-sdma");
309 clk_register_clkdev(clk[iim_ipg], "iim", NULL);
310
311 mxc_timer_init(MX25_IO_ADDRESS(MX25_GPT1_BASE_ADDR), MX25_INT_GPT1);
312
313 return 0;
314}
315
316static void __init mx25_clocks_init_dt(struct device_node *np) 241static void __init mx25_clocks_init_dt(struct device_node *np)
317{ 242{
318 struct device_node *refnp; 243 struct device_node *refnp;
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index d04a430607b8..469a150bf98f 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -119,6 +119,7 @@ static unsigned int share_count_asrc;
119static unsigned int share_count_ssi1; 119static unsigned int share_count_ssi1;
120static unsigned int share_count_ssi2; 120static unsigned int share_count_ssi2;
121static unsigned int share_count_ssi3; 121static unsigned int share_count_ssi3;
122static unsigned int share_count_mipi_core_cfg;
122 123
123static void __init imx6q_clocks_init(struct device_node *ccm_node) 124static void __init imx6q_clocks_init(struct device_node *ccm_node)
124{ 125{
@@ -246,6 +247,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
246 clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); 247 clk[IMX6QDL_CLK_PLL3_60M] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8);
247 clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2); 248 clk[IMX6QDL_CLK_TWD] = imx_clk_fixed_factor("twd", "arm", 1, 2);
248 clk[IMX6QDL_CLK_GPT_3M] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8); 249 clk[IMX6QDL_CLK_GPT_3M] = imx_clk_fixed_factor("gpt_3m", "osc", 1, 8);
250 clk[IMX6QDL_CLK_VIDEO_27M] = imx_clk_fixed_factor("video_27m", "pll3_pfd1_540m", 1, 20);
249 if (cpu_is_imx6dl()) { 251 if (cpu_is_imx6dl()) {
250 clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_fixed_factor("gpu2d_axi", "mmdc_ch0_axi_podf", 1, 1); 252 clk[IMX6QDL_CLK_GPU2D_AXI] = imx_clk_fixed_factor("gpu2d_axi", "mmdc_ch0_axi_podf", 1, 1);
251 clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_fixed_factor("gpu3d_axi", "mmdc_ch0_axi_podf", 1, 1); 253 clk[IMX6QDL_CLK_GPU3D_AXI] = imx_clk_fixed_factor("gpu3d_axi", "mmdc_ch0_axi_podf", 1, 1);
@@ -400,7 +402,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
400 clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24); 402 clk[IMX6QDL_CLK_GPU2D_CORE] = imx_clk_gate2("gpu2d_core", "gpu2d_core_podf", base + 0x6c, 24);
401 clk[IMX6QDL_CLK_GPU3D_CORE] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26); 403 clk[IMX6QDL_CLK_GPU3D_CORE] = imx_clk_gate2("gpu3d_core", "gpu3d_core_podf", base + 0x6c, 26);
402 clk[IMX6QDL_CLK_HDMI_IAHB] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0); 404 clk[IMX6QDL_CLK_HDMI_IAHB] = imx_clk_gate2("hdmi_iahb", "ahb", base + 0x70, 0);
403 clk[IMX6QDL_CLK_HDMI_ISFR] = imx_clk_gate2("hdmi_isfr", "pll3_pfd1_540m", base + 0x70, 4); 405 clk[IMX6QDL_CLK_HDMI_ISFR] = imx_clk_gate2("hdmi_isfr", "video_27m", base + 0x70, 4);
404 clk[IMX6QDL_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6); 406 clk[IMX6QDL_CLK_I2C1] = imx_clk_gate2("i2c1", "ipg_per", base + 0x70, 6);
405 clk[IMX6QDL_CLK_I2C2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8); 407 clk[IMX6QDL_CLK_I2C2] = imx_clk_gate2("i2c2", "ipg_per", base + 0x70, 8);
406 clk[IMX6QDL_CLK_I2C3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10); 408 clk[IMX6QDL_CLK_I2C3] = imx_clk_gate2("i2c3", "ipg_per", base + 0x70, 10);
@@ -415,7 +417,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node)
415 clk[IMX6QDL_CLK_LDB_DI0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12); 417 clk[IMX6QDL_CLK_LDB_DI0] = imx_clk_gate2("ldb_di0", "ldb_di0_podf", base + 0x74, 12);
416 clk[IMX6QDL_CLK_LDB_DI1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14); 418 clk[IMX6QDL_CLK_LDB_DI1] = imx_clk_gate2("ldb_di1", "ldb_di1_podf", base + 0x74, 14);
417 clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10); 419 clk[IMX6QDL_CLK_IPU2_DI1] = imx_clk_gate2("ipu2_di1", "ipu2_di1_sel", base + 0x74, 10);
418 clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2("hsi_tx", "hsi_tx_podf", base + 0x74, 16); 420 clk[IMX6QDL_CLK_HSI_TX] = imx_clk_gate2_shared("hsi_tx", "hsi_tx_podf", base + 0x74, 16, &share_count_mipi_core_cfg);
421 clk[IMX6QDL_CLK_MIPI_CORE_CFG] = imx_clk_gate2_shared("mipi_core_cfg", "video_27m", base + 0x74, 16, &share_count_mipi_core_cfg);
422 clk[IMX6QDL_CLK_MIPI_IPG] = imx_clk_gate2_shared("mipi_ipg", "ipg", base + 0x74, 16, &share_count_mipi_core_cfg);
419 if (cpu_is_imx6dl()) 423 if (cpu_is_imx6dl())
420 /* 424 /*
421 * The multiplexer and divider of the imx6q clock gpu2d get 425 * The multiplexer and divider of the imx6q clock gpu2d get
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 1028b6c505c4..0f04e30b726d 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -23,13 +23,11 @@ struct of_device_id;
23 23
24void mx1_map_io(void); 24void mx1_map_io(void);
25void mx21_map_io(void); 25void mx21_map_io(void);
26void mx25_map_io(void);
27void mx27_map_io(void); 26void mx27_map_io(void);
28void mx31_map_io(void); 27void mx31_map_io(void);
29void mx35_map_io(void); 28void mx35_map_io(void);
30void imx1_init_early(void); 29void imx1_init_early(void);
31void imx21_init_early(void); 30void imx21_init_early(void);
32void imx25_init_early(void);
33void imx27_init_early(void); 31void imx27_init_early(void);
34void imx31_init_early(void); 32void imx31_init_early(void);
35void imx35_init_early(void); 33void imx35_init_early(void);
@@ -37,13 +35,11 @@ void mxc_init_irq(void __iomem *);
37void tzic_init_irq(void); 35void tzic_init_irq(void);
38void mx1_init_irq(void); 36void mx1_init_irq(void);
39void mx21_init_irq(void); 37void mx21_init_irq(void);
40void mx25_init_irq(void);
41void mx27_init_irq(void); 38void mx27_init_irq(void);
42void mx31_init_irq(void); 39void mx31_init_irq(void);
43void mx35_init_irq(void); 40void mx35_init_irq(void);
44void imx1_soc_init(void); 41void imx1_soc_init(void);
45void imx21_soc_init(void); 42void imx21_soc_init(void);
46void imx25_soc_init(void);
47void imx27_soc_init(void); 43void imx27_soc_init(void);
48void imx31_soc_init(void); 44void imx31_soc_init(void);
49void imx35_soc_init(void); 45void imx35_soc_init(void);
@@ -51,7 +47,6 @@ void epit_timer_init(void __iomem *base, int irq);
51void mxc_timer_init(void __iomem *, int); 47void mxc_timer_init(void __iomem *, int);
52int mx1_clocks_init(unsigned long fref); 48int mx1_clocks_init(unsigned long fref);
53int mx21_clocks_init(unsigned long lref, unsigned long fref); 49int mx21_clocks_init(unsigned long lref, unsigned long fref);
54int mx25_clocks_init(void);
55int mx27_clocks_init(unsigned long fref); 50int mx27_clocks_init(unsigned long fref);
56int mx31_clocks_init(unsigned long fref); 51int mx31_clocks_init(unsigned long fref);
57int mx35_clocks_init(void); 52int mx35_clocks_init(void);
@@ -71,6 +66,7 @@ unsigned int imx_get_soc_revision(void);
71void imx_init_revision_from_anatop(void); 66void imx_init_revision_from_anatop(void);
72struct device *imx_soc_device_init(void); 67struct device *imx_soc_device_init(void);
73void imx6_enable_rbc(bool enable); 68void imx6_enable_rbc(bool enable);
69void imx_gpc_check_dt(void);
74void imx_gpc_set_arm_power_in_lpm(bool power_off); 70void imx_gpc_set_arm_power_in_lpm(bool power_off);
75void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw); 71void imx_gpc_set_arm_power_up_timing(u32 sw2iso, u32 sw);
76void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw); 72void imx_gpc_set_arm_power_down_timing(u32 sw2iso, u32 sw);
@@ -106,7 +102,6 @@ static inline void imx_scu_map_io(void) {}
106static inline void imx_smp_prepare(void) {} 102static inline void imx_smp_prepare(void) {}
107#endif 103#endif
108void imx_src_init(void); 104void imx_src_init(void);
109void imx_gpc_init(void);
110void imx_gpc_pre_suspend(bool arm_power_off); 105void imx_gpc_pre_suspend(bool arm_power_off);
111void imx_gpc_post_resume(void); 106void imx_gpc_post_resume(void);
112void imx_gpc_mask_all(void); 107void imx_gpc_mask_all(void);
diff --git a/arch/arm/mach-imx/cpu-imx25.c b/arch/arm/mach-imx/cpu-imx25.c
index 96ec64b5ff7d..d0ad67e802d3 100644
--- a/arch/arm/mach-imx/cpu-imx25.c
+++ b/arch/arm/mach-imx/cpu-imx25.c
@@ -11,6 +11,8 @@
11 */ 11 */
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/of.h>
15#include <linux/of_address.h>
14 16
15#include "iim.h" 17#include "iim.h"
16#include "hardware.h" 18#include "hardware.h"
@@ -20,8 +22,15 @@ static int mx25_cpu_rev = -1;
20static int mx25_read_cpu_rev(void) 22static int mx25_read_cpu_rev(void)
21{ 23{
22 u32 rev; 24 u32 rev;
25 void __iomem *iim_base;
26 struct device_node *np;
27
28 np = of_find_compatible_node(NULL, NULL, "fsl,imx25-iim");
29 iim_base = of_iomap(np, 0);
30 BUG_ON(!iim_base);
31 rev = readl(iim_base + MXC_IIMSREV);
32 iounmap(iim_base);
23 33
24 rev = __raw_readl(MX25_IO_ADDRESS(MX25_IIM_BASE_ADDR + MXC_IIMSREV));
25 switch (rev) { 34 switch (rev) {
26 case 0x00: 35 case 0x00:
27 return IMX_CHIP_REVISION_1_0; 36 return IMX_CHIP_REVISION_1_0;
diff --git a/arch/arm/mach-imx/devices-imx25.h b/arch/arm/mach-imx/devices-imx25.h
deleted file mode 100644
index 61a114cddc39..000000000000
--- a/arch/arm/mach-imx/devices-imx25.h
+++ /dev/null
@@ -1,85 +0,0 @@
1/*
2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
8 */
9#include "devices/devices-common.h"
10
11extern const struct imx_fec_data imx25_fec_data;
12#define imx25_add_fec(pdata) \
13 imx_add_fec(&imx25_fec_data, pdata)
14
15extern const struct imx_flexcan_data imx25_flexcan_data[];
16#define imx25_add_flexcan(id) \
17 imx_add_flexcan(&imx25_flexcan_data[id])
18#define imx25_add_flexcan0() imx25_add_flexcan(0)
19#define imx25_add_flexcan1() imx25_add_flexcan(1)
20
21extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data;
22#define imx25_add_fsl_usb2_udc(pdata) \
23 imx_add_fsl_usb2_udc(&imx25_fsl_usb2_udc_data, pdata)
24
25extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data;
26#define imx25_add_imxdi_rtc() \
27 imx_add_imxdi_rtc(&imx25_imxdi_rtc_data)
28
29extern const struct imx_imx2_wdt_data imx25_imx2_wdt_data;
30#define imx25_add_imx2_wdt() \
31 imx_add_imx2_wdt(&imx25_imx2_wdt_data)
32
33extern const struct imx_imx_fb_data imx25_imx_fb_data;
34#define imx25_add_imx_fb(pdata) \
35 imx_add_imx_fb(&imx25_imx_fb_data, pdata)
36
37extern const struct imx_imx_i2c_data imx25_imx_i2c_data[];
38#define imx25_add_imx_i2c(id, pdata) \
39 imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata)
40#define imx25_add_imx_i2c0(pdata) imx25_add_imx_i2c(0, pdata)
41#define imx25_add_imx_i2c1(pdata) imx25_add_imx_i2c(1, pdata)
42#define imx25_add_imx_i2c2(pdata) imx25_add_imx_i2c(2, pdata)
43
44extern const struct imx_imx_keypad_data imx25_imx_keypad_data;
45#define imx25_add_imx_keypad(pdata) \
46 imx_add_imx_keypad(&imx25_imx_keypad_data, pdata)
47
48extern const struct imx_imx_ssi_data imx25_imx_ssi_data[];
49#define imx25_add_imx_ssi(id, pdata) \
50 imx_add_imx_ssi(&imx25_imx_ssi_data[id], pdata)
51
52extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[];
53#define imx25_add_imx_uart(id, pdata) \
54 imx_add_imx_uart_1irq(&imx25_imx_uart_data[id], pdata)
55#define imx25_add_imx_uart0(pdata) imx25_add_imx_uart(0, pdata)
56#define imx25_add_imx_uart1(pdata) imx25_add_imx_uart(1, pdata)
57#define imx25_add_imx_uart2(pdata) imx25_add_imx_uart(2, pdata)
58#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata)
59#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata)
60
61extern const struct imx_mx2_camera_data imx25_mx2_camera_data;
62#define imx25_add_mx2_camera(pdata) \
63 imx_add_mx2_camera(&imx25_mx2_camera_data, pdata)
64
65extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data;
66#define imx25_add_mxc_ehci_otg(pdata) \
67 imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata)
68extern const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data;
69#define imx25_add_mxc_ehci_hs(pdata) \
70 imx_add_mxc_ehci(&imx25_mxc_ehci_hs_data, pdata)
71
72extern const struct imx_mxc_nand_data imx25_mxc_nand_data;
73#define imx25_add_mxc_nand(pdata) \
74 imx_add_mxc_nand(&imx25_mxc_nand_data, pdata)
75
76extern const struct imx_sdhci_esdhc_imx_data imx25_sdhci_esdhc_imx_data[];
77#define imx25_add_sdhci_esdhc_imx(id, pdata) \
78 imx_add_sdhci_esdhc_imx(&imx25_sdhci_esdhc_imx_data[id], pdata)
79
80extern const struct imx_spi_imx_data imx25_cspi_data[];
81#define imx25_add_spi_imx(id, pdata) \
82 imx_add_spi_imx(&imx25_cspi_data[id], pdata)
83#define imx25_add_spi_imx0(pdata) imx25_add_spi_imx(0, pdata)
84#define imx25_add_spi_imx1(pdata) imx25_add_spi_imx(1, pdata)
85#define imx25_add_spi_imx2(pdata) imx25_add_spi_imx(2, pdata)
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
index 1d2cc1805f3e..3a552989248e 100644
--- a/arch/arm/mach-imx/devices/Kconfig
+++ b/arch/arm/mach-imx/devices/Kconfig
@@ -21,9 +21,6 @@ config IMX_HAVE_PLATFORM_IMX27_CODA
21config IMX_HAVE_PLATFORM_IMX2_WDT 21config IMX_HAVE_PLATFORM_IMX2_WDT
22 bool 22 bool
23 23
24config IMX_HAVE_PLATFORM_IMXDI_RTC
25 bool
26
27config IMX_HAVE_PLATFORM_IMX_FB 24config IMX_HAVE_PLATFORM_IMX_FB
28 bool 25 bool
29 26
diff --git a/arch/arm/mach-imx/devices/Makefile b/arch/arm/mach-imx/devices/Makefile
index 8fdb12b4ca7e..e5cf587bc1a0 100644
--- a/arch/arm/mach-imx/devices/Makefile
+++ b/arch/arm/mach-imx/devices/Makefile
@@ -8,7 +8,6 @@ obj-y += platform-gpio-mxc.o
8obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o 8obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o
9obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o 9obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX27_CODA) += platform-imx27-coda.o
10obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o 10obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT) += platform-imx2-wdt.o
11obj-$(CONFIG_IMX_HAVE_PLATFORM_IMXDI_RTC) += platform-imxdi_rtc.o
12obj-y += platform-imx-dma.o 11obj-y += platform-imx-dma.o
13obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o 12obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FB) += platform-imx-fb.o
14obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o 13obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_I2C) += platform-imx-i2c.o
diff --git a/arch/arm/mach-imx/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c
index d86f9250b4ee..b403a4fe2892 100644
--- a/arch/arm/mach-imx/devices/platform-fec.c
+++ b/arch/arm/mach-imx/devices/platform-fec.c
@@ -19,11 +19,6 @@
19 .irq = soc ## _INT_FEC, \ 19 .irq = soc ## _INT_FEC, \
20 } 20 }
21 21
22#ifdef CONFIG_SOC_IMX25
23const struct imx_fec_data imx25_fec_data __initconst =
24 imx_fec_data_entry_single(MX25, "imx25-fec");
25#endif /* ifdef CONFIG_SOC_IMX25 */
26
27#ifdef CONFIG_SOC_IMX27 22#ifdef CONFIG_SOC_IMX27
28const struct imx_fec_data imx27_fec_data __initconst = 23const struct imx_fec_data imx27_fec_data __initconst =
29 imx_fec_data_entry_single(MX27, "imx27-fec"); 24 imx_fec_data_entry_single(MX27, "imx27-fec");
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
index 23b0061347cb..25e1de6f3a47 100644
--- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
+++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
@@ -18,11 +18,6 @@
18 .irq = soc ## _INT_USB_OTG, \ 18 .irq = soc ## _INT_USB_OTG, \
19 } 19 }
20 20
21#ifdef CONFIG_SOC_IMX25
22const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
23 imx_fsl_usb2_udc_data_entry_single(MX25, "imx-udc-mx27");
24#endif /* ifdef CONFIG_SOC_IMX25 */
25
26#ifdef CONFIG_SOC_IMX27 21#ifdef CONFIG_SOC_IMX27
27const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = 22const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
28 imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27"); 23 imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27");
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c
index 25a47c616b2d..7df6328306f9 100644
--- a/arch/arm/mach-imx/devices/platform-imx-fb.c
+++ b/arch/arm/mach-imx/devices/platform-imx-fb.c
@@ -29,11 +29,6 @@ const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
29 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K); 29 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
30#endif /* ifdef CONFIG_SOC_IMX21 */ 30#endif /* ifdef CONFIG_SOC_IMX21 */
31 31
32#ifdef CONFIG_SOC_IMX25
33const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
34 imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
35#endif /* ifdef CONFIG_SOC_IMX25 */
36
37#ifdef CONFIG_SOC_IMX27 32#ifdef CONFIG_SOC_IMX27
38const struct imx_imx_fb_data imx27_imx_fb_data __initconst = 33const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
39 imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K); 34 imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c
index 644ac2689882..ae9791522fc8 100644
--- a/arch/arm/mach-imx/devices/platform-imx-i2c.c
+++ b/arch/arm/mach-imx/devices/platform-imx-i2c.c
@@ -31,16 +31,6 @@ const struct imx_imx_i2c_data imx21_imx_i2c_data __initconst =
31 imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K); 31 imx_imx_i2c_data_entry_single(MX21, "imx21-i2c", 0, , SZ_4K);
32#endif /* ifdef CONFIG_SOC_IMX21 */ 32#endif /* ifdef CONFIG_SOC_IMX21 */
33 33
34#ifdef CONFIG_SOC_IMX25
35const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst = {
36#define imx25_imx_i2c_data_entry(_id, _hwid) \
37 imx_imx_i2c_data_entry(MX25, "imx21-i2c", _id, _hwid, SZ_16K)
38 imx25_imx_i2c_data_entry(0, 1),
39 imx25_imx_i2c_data_entry(1, 2),
40 imx25_imx_i2c_data_entry(2, 3),
41};
42#endif /* ifdef CONFIG_SOC_IMX25 */
43
44#ifdef CONFIG_SOC_IMX27 34#ifdef CONFIG_SOC_IMX27
45const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = { 35const struct imx_imx_i2c_data imx27_imx_i2c_data[] __initconst = {
46#define imx27_imx_i2c_data_entry(_id, _hwid) \ 36#define imx27_imx_i2c_data_entry(_id, _hwid) \
diff --git a/arch/arm/mach-imx/devices/platform-imx-keypad.c b/arch/arm/mach-imx/devices/platform-imx-keypad.c
index f42200b7aca9..479e4d70dbf9 100644
--- a/arch/arm/mach-imx/devices/platform-imx-keypad.c
+++ b/arch/arm/mach-imx/devices/platform-imx-keypad.c
@@ -21,11 +21,6 @@ const struct imx_imx_keypad_data imx21_imx_keypad_data __initconst =
21 imx_imx_keypad_data_entry_single(MX21, SZ_16); 21 imx_imx_keypad_data_entry_single(MX21, SZ_16);
22#endif /* ifdef CONFIG_SOC_IMX21 */ 22#endif /* ifdef CONFIG_SOC_IMX21 */
23 23
24#ifdef CONFIG_SOC_IMX25
25const struct imx_imx_keypad_data imx25_imx_keypad_data __initconst =
26 imx_imx_keypad_data_entry_single(MX25, SZ_16K);
27#endif /* ifdef CONFIG_SOC_IMX25 */
28
29#ifdef CONFIG_SOC_IMX27 24#ifdef CONFIG_SOC_IMX27
30const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst = 25const struct imx_imx_keypad_data imx27_imx_keypad_data __initconst =
31 imx_imx_keypad_data_entry_single(MX27, SZ_16); 26 imx_imx_keypad_data_entry_single(MX27, SZ_16);
diff --git a/arch/arm/mach-imx/devices/platform-imx-ssi.c b/arch/arm/mach-imx/devices/platform-imx-ssi.c
index 1c7c721ebff1..6f0e94eb29ee 100644
--- a/arch/arm/mach-imx/devices/platform-imx-ssi.c
+++ b/arch/arm/mach-imx/devices/platform-imx-ssi.c
@@ -30,15 +30,6 @@ const struct imx_imx_ssi_data imx21_imx_ssi_data[] __initconst = {
30}; 30};
31#endif /* ifdef CONFIG_SOC_IMX21 */ 31#endif /* ifdef CONFIG_SOC_IMX21 */
32 32
33#ifdef CONFIG_SOC_IMX25
34const struct imx_imx_ssi_data imx25_imx_ssi_data[] __initconst = {
35#define imx25_imx_ssi_data_entry(_id, _hwid) \
36 imx_imx_ssi_data_entry(MX25, _id, _hwid, SZ_4K)
37 imx25_imx_ssi_data_entry(0, 1),
38 imx25_imx_ssi_data_entry(1, 2),
39};
40#endif /* ifdef CONFIG_SOC_IMX25 */
41
42#ifdef CONFIG_SOC_IMX27 33#ifdef CONFIG_SOC_IMX27
43const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = { 34const struct imx_imx_ssi_data imx27_imx_ssi_data[] __initconst = {
44#define imx27_imx_ssi_data_entry(_id, _hwid) \ 35#define imx27_imx_ssi_data_entry(_id, _hwid) \
diff --git a/arch/arm/mach-imx/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c
index 8c01836bc1d4..6962cff4a950 100644
--- a/arch/arm/mach-imx/devices/platform-imx-uart.c
+++ b/arch/arm/mach-imx/devices/platform-imx-uart.c
@@ -47,18 +47,6 @@ const struct imx_imx_uart_1irq_data imx21_imx_uart_data[] __initconst = {
47}; 47};
48#endif 48#endif
49 49
50#ifdef CONFIG_SOC_IMX25
51const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst = {
52#define imx25_imx_uart_data_entry(_id, _hwid) \
53 imx_imx_uart_1irq_data_entry(MX25, _id, _hwid, SZ_16K)
54 imx25_imx_uart_data_entry(0, 1),
55 imx25_imx_uart_data_entry(1, 2),
56 imx25_imx_uart_data_entry(2, 3),
57 imx25_imx_uart_data_entry(3, 4),
58 imx25_imx_uart_data_entry(4, 5),
59};
60#endif /* ifdef CONFIG_SOC_IMX25 */
61
62#ifdef CONFIG_SOC_IMX27 50#ifdef CONFIG_SOC_IMX27
63const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = { 51const struct imx_imx_uart_1irq_data imx27_imx_uart_data[] __initconst = {
64#define imx27_imx_uart_data_entry(_id, _hwid) \ 52#define imx27_imx_uart_data_entry(_id, _hwid) \
diff --git a/arch/arm/mach-imx/devices/platform-imx2-wdt.c b/arch/arm/mach-imx/devices/platform-imx2-wdt.c
index 54f63bc25ca4..8c134c8d7500 100644
--- a/arch/arm/mach-imx/devices/platform-imx2-wdt.c
+++ b/arch/arm/mach-imx/devices/platform-imx2-wdt.c
@@ -25,11 +25,6 @@ const struct imx_imx2_wdt_data imx21_imx2_wdt_data __initconst =
25 imx_imx2_wdt_data_entry_single(MX21, 0, , SZ_4K); 25 imx_imx2_wdt_data_entry_single(MX21, 0, , SZ_4K);
26#endif /* ifdef CONFIG_SOC_IMX21 */ 26#endif /* ifdef CONFIG_SOC_IMX21 */
27 27
28#ifdef CONFIG_SOC_IMX25
29const struct imx_imx2_wdt_data imx25_imx2_wdt_data __initconst =
30 imx_imx2_wdt_data_entry_single(MX25, 0, , SZ_16K);
31#endif /* ifdef CONFIG_SOC_IMX25 */
32
33#ifdef CONFIG_SOC_IMX27 28#ifdef CONFIG_SOC_IMX27
34const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst = 29const struct imx_imx2_wdt_data imx27_imx2_wdt_data __initconst =
35 imx_imx2_wdt_data_entry_single(MX27, 0, , SZ_4K); 30 imx_imx2_wdt_data_entry_single(MX27, 0, , SZ_4K);
diff --git a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c b/arch/arm/mach-imx/devices/platform-imxdi_rtc.c
deleted file mode 100644
index 5bb490d556ea..000000000000
--- a/arch/arm/mach-imx/devices/platform-imxdi_rtc.c
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
8 */
9#include <asm/sizes.h>
10
11#include "../hardware.h"
12#include "devices-common.h"
13
14#define imx_imxdi_rtc_data_entry_single(soc) \
15 { \
16 .iobase = soc ## _DRYICE_BASE_ADDR, \
17 .irq = soc ## _INT_DRYICE, \
18 }
19
20#ifdef CONFIG_SOC_IMX25
21const struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst =
22 imx_imxdi_rtc_data_entry_single(MX25);
23#endif /* ifdef CONFIG_SOC_IMX25 */
24
25struct platform_device *__init imx_add_imxdi_rtc(
26 const struct imx_imxdi_rtc_data *data)
27{
28 struct resource res[] = {
29 {
30 .start = data->iobase,
31 .end = data->iobase + SZ_16K - 1,
32 .flags = IORESOURCE_MEM,
33 }, {
34 .start = data->irq,
35 .end = data->irq,
36 .flags = IORESOURCE_IRQ,
37 },
38 };
39
40 return imx_add_platform_device("imxdi_rtc", 0,
41 res, ARRAY_SIZE(res), NULL, 0);
42}
diff --git a/arch/arm/mach-imx/devices/platform-mx2-camera.c b/arch/arm/mach-imx/devices/platform-mx2-camera.c
index b53e1f348f51..4c377c33242c 100644
--- a/arch/arm/mach-imx/devices/platform-mx2-camera.c
+++ b/arch/arm/mach-imx/devices/platform-mx2-camera.c
@@ -27,11 +27,6 @@
27 .irqemmaprp = soc ## _INT_EMMAPRP, \ 27 .irqemmaprp = soc ## _INT_EMMAPRP, \
28 } 28 }
29 29
30#ifdef CONFIG_SOC_IMX25
31const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst =
32 imx_mx2_camera_data_entry_single(MX25, "imx25-camera");
33#endif /* ifdef CONFIG_SOC_IMX25 */
34
35#ifdef CONFIG_SOC_IMX27 30#ifdef CONFIG_SOC_IMX27
36const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst = 31const struct imx_mx2_camera_data imx27_mx2_camera_data __initconst =
37 imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera"); 32 imx_mx2_camera_data_entry_single_emma(MX27, "imx27-camera");
diff --git a/arch/arm/mach-imx/devices/platform-mxc-ehci.c b/arch/arm/mach-imx/devices/platform-mxc-ehci.c
index 296353662ff0..4537abd2a8f2 100644
--- a/arch/arm/mach-imx/devices/platform-mxc-ehci.c
+++ b/arch/arm/mach-imx/devices/platform-mxc-ehci.c
@@ -18,13 +18,6 @@
18 .irq = soc ## _INT_USB_ ## hs, \ 18 .irq = soc ## _INT_USB_ ## hs, \
19 } 19 }
20 20
21#ifdef CONFIG_SOC_IMX25
22const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst =
23 imx_mxc_ehci_data_entry_single(MX25, 0, OTG);
24const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst =
25 imx_mxc_ehci_data_entry_single(MX25, 1, HS);
26#endif /* ifdef CONFIG_SOC_IMX25 */
27
28#ifdef CONFIG_SOC_IMX27 21#ifdef CONFIG_SOC_IMX27
29const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst = 22const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
30 imx_mxc_ehci_data_entry_single(MX27, 0, OTG); 23 imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
diff --git a/arch/arm/mach-imx/devices/platform-mxc_nand.c b/arch/arm/mach-imx/devices/platform-mxc_nand.c
index fa618a34f462..676df4920c7b 100644
--- a/arch/arm/mach-imx/devices/platform-mxc_nand.c
+++ b/arch/arm/mach-imx/devices/platform-mxc_nand.c
@@ -34,11 +34,6 @@ const struct imx_mxc_nand_data imx21_mxc_nand_data __initconst =
34 imx_mxc_nand_data_entry_single(MX21, "imx21-nand", SZ_4K); 34 imx_mxc_nand_data_entry_single(MX21, "imx21-nand", SZ_4K);
35#endif /* ifdef CONFIG_SOC_IMX21 */ 35#endif /* ifdef CONFIG_SOC_IMX21 */
36 36
37#ifdef CONFIG_SOC_IMX25
38const struct imx_mxc_nand_data imx25_mxc_nand_data __initconst =
39 imx_mxc_nand_data_entry_single(MX25, "imx25-nand", SZ_8K);
40#endif /* ifdef CONFIG_SOC_IMX25 */
41
42#ifdef CONFIG_SOC_IMX27 37#ifdef CONFIG_SOC_IMX27
43const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst = 38const struct imx_mxc_nand_data imx27_mxc_nand_data __initconst =
44 imx_mxc_nand_data_entry_single(MX27, "imx27-nand", SZ_4K); 39 imx_mxc_nand_data_entry_single(MX27, "imx27-nand", SZ_4K);
diff --git a/arch/arm/mach-imx/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c
index aca825d74c48..5e9707b47f92 100644
--- a/arch/arm/mach-imx/devices/platform-spi_imx.c
+++ b/arch/arm/mach-imx/devices/platform-spi_imx.c
@@ -39,17 +39,6 @@ const struct imx_spi_imx_data imx21_cspi_data[] __initconst = {
39}; 39};
40#endif 40#endif
41 41
42#ifdef CONFIG_SOC_IMX25
43/* i.mx25 has the i.mx35 type cspi */
44const struct imx_spi_imx_data imx25_cspi_data[] __initconst = {
45#define imx25_cspi_data_entry(_id, _hwid) \
46 imx_spi_imx_data_entry(MX25, CSPI, "imx35-cspi", _id, _hwid, SZ_16K)
47 imx25_cspi_data_entry(0, 1),
48 imx25_cspi_data_entry(1, 2),
49 imx25_cspi_data_entry(2, 3),
50};
51#endif /* ifdef CONFIG_SOC_IMX25 */
52
53#ifdef CONFIG_SOC_IMX27 42#ifdef CONFIG_SOC_IMX27
54const struct imx_spi_imx_data imx27_cspi_data[] __initconst = { 43const struct imx_spi_imx_data imx27_cspi_data[] __initconst = {
55#define imx27_cspi_data_entry(_id, _hwid) \ 44#define imx27_cspi_data_entry(_id, _hwid) \
diff --git a/arch/arm/mach-imx/ehci-imx25.c b/arch/arm/mach-imx/ehci-imx25.c
deleted file mode 100644
index 42a5a3d14c5f..000000000000
--- a/arch/arm/mach-imx/ehci-imx25.c
+++ /dev/null
@@ -1,99 +0,0 @@
1/*
2 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
3 * Copyright (C) 2010 Freescale Semiconductor, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16#include <linux/platform_device.h>
17#include <linux/io.h>
18#include <linux/platform_data/usb-ehci-mxc.h>
19
20#include "ehci.h"
21#include "hardware.h"
22
23#define USBCTRL_OTGBASE_OFFSET 0x600
24
25#define MX25_OTG_SIC_SHIFT 29
26#define MX25_OTG_SIC_MASK (0x3 << MX25_OTG_SIC_SHIFT)
27#define MX25_OTG_PM_BIT (1 << 24)
28#define MX25_OTG_PP_BIT (1 << 11)
29#define MX25_OTG_OCPOL_BIT (1 << 3)
30
31#define MX25_H1_SIC_SHIFT 21
32#define MX25_H1_SIC_MASK (0x3 << MX25_H1_SIC_SHIFT)
33#define MX25_H1_PP_BIT (1 << 18)
34#define MX25_H1_PM_BIT (1 << 16)
35#define MX25_H1_IPPUE_UP_BIT (1 << 7)
36#define MX25_H1_IPPUE_DOWN_BIT (1 << 6)
37#define MX25_H1_TLL_BIT (1 << 5)
38#define MX25_H1_USBTE_BIT (1 << 4)
39#define MX25_H1_OCPOL_BIT (1 << 2)
40
41int mx25_initialize_usb_hw(int port, unsigned int flags)
42{
43 unsigned int v;
44
45 v = readl(MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
46
47 switch (port) {
48 case 0: /* OTG port */
49 v &= ~(MX25_OTG_SIC_MASK | MX25_OTG_PM_BIT | MX25_OTG_PP_BIT |
50 MX25_OTG_OCPOL_BIT);
51 v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_OTG_SIC_SHIFT;
52
53 if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
54 v |= MX25_OTG_PM_BIT;
55
56 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
57 v |= MX25_OTG_PP_BIT;
58
59 if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW))
60 v |= MX25_OTG_OCPOL_BIT;
61
62 break;
63 case 1: /* H1 port */
64 v &= ~(MX25_H1_SIC_MASK | MX25_H1_PM_BIT | MX25_H1_PP_BIT |
65 MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT | MX25_H1_USBTE_BIT |
66 MX25_H1_IPPUE_DOWN_BIT | MX25_H1_IPPUE_UP_BIT);
67 v |= (flags & MXC_EHCI_INTERFACE_MASK) << MX25_H1_SIC_SHIFT;
68
69 if (!(flags & MXC_EHCI_POWER_PINS_ENABLED))
70 v |= MX25_H1_PM_BIT;
71
72 if (flags & MXC_EHCI_PWR_PIN_ACTIVE_HIGH)
73 v |= MX25_H1_PP_BIT;
74
75 if (!(flags & MXC_EHCI_OC_PIN_ACTIVE_LOW))
76 v |= MX25_H1_OCPOL_BIT;
77
78 if (!(flags & MXC_EHCI_TTL_ENABLED))
79 v |= MX25_H1_TLL_BIT;
80
81 if (flags & MXC_EHCI_INTERNAL_PHY)
82 v |= MX25_H1_USBTE_BIT;
83
84 if (flags & MXC_EHCI_IPPUE_DOWN)
85 v |= MX25_H1_IPPUE_DOWN_BIT;
86
87 if (flags & MXC_EHCI_IPPUE_UP)
88 v |= MX25_H1_IPPUE_UP_BIT;
89
90 break;
91 default:
92 return -EINVAL;
93 }
94
95 writel(v, MX25_IO_ADDRESS(MX25_USB_BASE_ADDR + USBCTRL_OTGBASE_OFFSET));
96
97 return 0;
98}
99
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
deleted file mode 100644
index e77cc3af6db2..000000000000
--- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
+++ /dev/null
@@ -1,310 +0,0 @@
1/*
2 * Copyright (C) 2010 Eric Benard - eric@eukrea.com
3 *
4 * Based on pcm970-baseboard.c which is :
5 * Copyright (C) 2008 Juergen Beisert (kernel@pengutronix.de)
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22#include <linux/gpio.h>
23#include <linux/leds.h>
24#include <linux/platform_device.h>
25#include <linux/input.h>
26#include <linux/spi/spi.h>
27#include <video/platform_lcd.h>
28
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31
32#include "common.h"
33#include "devices-imx25.h"
34#include "hardware.h"
35#include "iomux-mx25.h"
36#include "mx25.h"
37
38static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = {
39 /* LCD */
40 MX25_PAD_LD0__LD0,
41 MX25_PAD_LD1__LD1,
42 MX25_PAD_LD2__LD2,
43 MX25_PAD_LD3__LD3,
44 MX25_PAD_LD4__LD4,
45 MX25_PAD_LD5__LD5,
46 MX25_PAD_LD6__LD6,
47 MX25_PAD_LD7__LD7,
48 MX25_PAD_LD8__LD8,
49 MX25_PAD_LD9__LD9,
50 MX25_PAD_LD10__LD10,
51 MX25_PAD_LD11__LD11,
52 MX25_PAD_LD12__LD12,
53 MX25_PAD_LD13__LD13,
54 MX25_PAD_LD14__LD14,
55 MX25_PAD_LD15__LD15,
56 MX25_PAD_GPIO_E__LD16,
57 MX25_PAD_GPIO_F__LD17,
58 MX25_PAD_HSYNC__HSYNC,
59 MX25_PAD_VSYNC__VSYNC,
60 MX25_PAD_LSCLK__LSCLK,
61 MX25_PAD_OE_ACD__OE_ACD,
62 MX25_PAD_CONTRAST__CONTRAST,
63 /* LCD_PWR */
64 MX25_PAD_PWM__GPIO_1_26,
65 /* LED */
66 MX25_PAD_POWER_FAIL__GPIO_3_19,
67 /* SWITCH */
68 MX25_PAD_VSTBY_ACK__GPIO_3_18,
69 /* UART2 */
70 MX25_PAD_UART2_RTS__UART2_RTS,
71 MX25_PAD_UART2_CTS__UART2_CTS,
72 MX25_PAD_UART2_TXD__UART2_TXD,
73 MX25_PAD_UART2_RXD__UART2_RXD,
74 /* SD1 */
75 MX25_PAD_SD1_CMD__SD1_CMD,
76 MX25_PAD_SD1_CLK__SD1_CLK,
77 MX25_PAD_SD1_DATA0__SD1_DATA0,
78 MX25_PAD_SD1_DATA1__SD1_DATA1,
79 MX25_PAD_SD1_DATA2__SD1_DATA2,
80 MX25_PAD_SD1_DATA3__SD1_DATA3,
81 /* SD1 CD */
82 MX25_PAD_DE_B__GPIO_2_20,
83 /* I2S */
84 MX25_PAD_KPP_COL3__AUD5_TXFS,
85 MX25_PAD_KPP_COL2__AUD5_TXC,
86 MX25_PAD_KPP_COL1__AUD5_RXD,
87 MX25_PAD_KPP_COL0__AUD5_TXD,
88 /* CAN */
89 MX25_PAD_GPIO_D__CAN2_RX,
90 MX25_PAD_GPIO_C__CAN2_TX,
91 /* SPI1 */
92 MX25_PAD_CSPI1_MOSI__CSPI1_MOSI,
93 MX25_PAD_CSPI1_MISO__CSPI1_MISO,
94 MX25_PAD_CSPI1_SS0__GPIO_1_16,
95 MX25_PAD_CSPI1_SS1__GPIO_1_17,
96 MX25_PAD_CSPI1_SCLK__CSPI1_SCLK,
97 MX25_PAD_CSPI1_RDY__GPIO_2_22,
98};
99
100#define GPIO_LED1 IMX_GPIO_NR(3, 19)
101#define GPIO_SWITCH1 IMX_GPIO_NR(3, 18)
102#define GPIO_SD1CD IMX_GPIO_NR(2, 20)
103#define GPIO_LCDPWR IMX_GPIO_NR(1, 26)
104#define GPIO_SPI1_SS0 IMX_GPIO_NR(1, 16)
105#define GPIO_SPI1_SS1 IMX_GPIO_NR(1, 17)
106#define GPIO_SPI1_IRQ IMX_GPIO_NR(2, 22)
107
108static struct imx_fb_videomode eukrea_mximxsd_modes[] = {
109 {
110 .mode = {
111 .name = "CMO-QVGA",
112 .refresh = 60,
113 .xres = 320,
114 .yres = 240,
115 .pixclock = KHZ2PICOS(6500),
116 .left_margin = 30,
117 .right_margin = 38,
118 .upper_margin = 20,
119 .lower_margin = 3,
120 .hsync_len = 15,
121 .vsync_len = 4,
122 },
123 .bpp = 16,
124 .pcr = 0xCAD08B80,
125 }, {
126 .mode = {
127 .name = "DVI-VGA",
128 .refresh = 60,
129 .xres = 640,
130 .yres = 480,
131 .pixclock = 32000,
132 .hsync_len = 7,
133 .left_margin = 100,
134 .right_margin = 100,
135 .vsync_len = 7,
136 .upper_margin = 7,
137 .lower_margin = 100,
138 },
139 .pcr = 0xFA208B80,
140 .bpp = 16,
141 }, {
142 .mode = {
143 .name = "DVI-SVGA",
144 .refresh = 60,
145 .xres = 800,
146 .yres = 600,
147 .pixclock = 25000,
148 .hsync_len = 7,
149 .left_margin = 75,
150 .right_margin = 75,
151 .vsync_len = 7,
152 .upper_margin = 7,
153 .lower_margin = 75,
154 },
155 .pcr = 0xFA208B80,
156 .bpp = 16,
157 },
158};
159
160static const struct imx_fb_platform_data eukrea_mximxsd_fb_pdata __initconst = {
161 .mode = eukrea_mximxsd_modes,
162 .num_modes = ARRAY_SIZE(eukrea_mximxsd_modes),
163 .pwmr = 0x00A903FF,
164 .lscr1 = 0x00120300,
165 .dmacr = 0x00040060,
166};
167
168static void eukrea_mbimxsd_lcd_power_set(struct plat_lcd_data *pd,
169 unsigned int power)
170{
171 if (power)
172 gpio_direction_output(GPIO_LCDPWR, 1);
173 else
174 gpio_direction_output(GPIO_LCDPWR, 0);
175}
176
177static struct plat_lcd_data eukrea_mbimxsd_lcd_power_data = {
178 .set_power = eukrea_mbimxsd_lcd_power_set,
179};
180
181static struct platform_device eukrea_mbimxsd_lcd_powerdev = {
182 .name = "platform-lcd",
183 .dev.platform_data = &eukrea_mbimxsd_lcd_power_data,
184};
185
186static const struct gpio_led eukrea_mbimxsd_leds[] __initconst = {
187 {
188 .name = "led1",
189 .default_trigger = "heartbeat",
190 .active_low = 1,
191 .gpio = GPIO_LED1,
192 },
193};
194
195static const struct gpio_led_platform_data
196 eukrea_mbimxsd_led_info __initconst = {
197 .leds = eukrea_mbimxsd_leds,
198 .num_leds = ARRAY_SIZE(eukrea_mbimxsd_leds),
199};
200
201static struct gpio_keys_button eukrea_mbimxsd_gpio_buttons[] = {
202 {
203 .gpio = GPIO_SWITCH1,
204 .code = BTN_0,
205 .desc = "BP1",
206 .active_low = 1,
207 .wakeup = 1,
208 },
209};
210
211static const struct gpio_keys_platform_data
212 eukrea_mbimxsd_button_data __initconst = {
213 .buttons = eukrea_mbimxsd_gpio_buttons,
214 .nbuttons = ARRAY_SIZE(eukrea_mbimxsd_gpio_buttons),
215};
216
217static struct platform_device *platform_devices[] __initdata = {
218 &eukrea_mbimxsd_lcd_powerdev,
219};
220
221static const struct imxuart_platform_data uart_pdata __initconst = {
222 .flags = IMXUART_HAVE_RTSCTS,
223};
224
225static struct i2c_board_info eukrea_mbimxsd_i2c_devices[] = {
226 {
227 I2C_BOARD_INFO("tlv320aic23", 0x1a),
228 },
229};
230
231static const
232struct imx_ssi_platform_data eukrea_mbimxsd_ssi_pdata __initconst = {
233 .flags = IMX_SSI_SYN | IMX_SSI_NET | IMX_SSI_USE_I2S_SLAVE,
234};
235
236static struct esdhc_platform_data sd1_pdata = {
237 .cd_gpio = GPIO_SD1CD,
238 .cd_type = ESDHC_CD_GPIO,
239 .wp_type = ESDHC_WP_NONE,
240};
241
242static struct spi_board_info eukrea_mbimxsd25_spi_board_info[] __initdata = {
243 {
244 .modalias = "spidev",
245 .max_speed_hz = 20000000,
246 .bus_num = 0,
247 .chip_select = 0,
248 .mode = SPI_MODE_0,
249 },
250 {
251 .modalias = "spidev",
252 .max_speed_hz = 20000000,
253 .bus_num = 0,
254 .chip_select = 1,
255 .mode = SPI_MODE_0,
256 },
257};
258
259static int eukrea_mbimxsd25_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1};
260
261static const struct spi_imx_master eukrea_mbimxsd25_spi0_data __initconst = {
262 .chipselect = eukrea_mbimxsd25_spi_cs,
263 .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd25_spi_cs),
264};
265
266/*
267 * system init for baseboard usage. Will be called by cpuimx25 init.
268 *
269 * Add platform devices present on this baseboard and init
270 * them from CPU side as far as required to use them later on
271 */
272void __init eukrea_mbimxsd25_baseboard_init(void)
273{
274 if (mxc_iomux_v3_setup_multiple_pads(eukrea_mbimxsd_pads,
275 ARRAY_SIZE(eukrea_mbimxsd_pads)))
276 printk(KERN_ERR "error setting mbimxsd pads !\n");
277
278 imx25_add_imx_uart1(&uart_pdata);
279 imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata);
280 imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
281
282 imx25_add_flexcan1();
283 imx25_add_sdhci_esdhc_imx(0, &sd1_pdata);
284
285 gpio_request(GPIO_LED1, "LED1");
286 gpio_direction_output(GPIO_LED1, 1);
287 gpio_free(GPIO_LED1);
288
289 gpio_request(GPIO_SWITCH1, "SWITCH1");
290 gpio_direction_input(GPIO_SWITCH1);
291 gpio_free(GPIO_SWITCH1);
292
293 gpio_request(GPIO_LCDPWR, "LCDPWR");
294 gpio_direction_output(GPIO_LCDPWR, 1);
295
296 i2c_register_board_info(0, eukrea_mbimxsd_i2c_devices,
297 ARRAY_SIZE(eukrea_mbimxsd_i2c_devices));
298
299 gpio_request(GPIO_SPI1_IRQ, "SPI1_IRQ");
300 gpio_direction_input(GPIO_SPI1_IRQ);
301 gpio_free(GPIO_SPI1_IRQ);
302 imx25_add_spi_imx0(&eukrea_mbimxsd25_spi0_data);
303 spi_register_board_info(eukrea_mbimxsd25_spi_board_info,
304 ARRAY_SIZE(eukrea_mbimxsd25_spi_board_info));
305
306 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
307 gpio_led_register_device(-1, &eukrea_mbimxsd_led_info);
308 imx_add_gpio_keys(&eukrea_mbimxsd_button_data);
309 imx_add_platform_device("eukrea_tlv320", 0, NULL, 0, NULL, 0);
310}
diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
index 14d6c8249b76..6edc940e0865 100644
--- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
+++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
@@ -100,7 +100,7 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = {
100 .num_modes = ARRAY_SIZE(fb_modedb), 100 .num_modes = ARRAY_SIZE(fb_modedb),
101}; 101};
102 102
103static iomux_v3_cfg_t eukrea_mbimxsd_pads[] = { 103static const iomux_v3_cfg_t eukrea_mbimxsd_pads[] __initconst = {
104 /* LCD */ 104 /* LCD */
105 MX35_PAD_LD0__IPU_DISPB_DAT_0, 105 MX35_PAD_LD0__IPU_DISPB_DAT_0,
106 MX35_PAD_LD1__IPU_DISPB_DAT_1, 106 MX35_PAD_LD1__IPU_DISPB_DAT_1,
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 745caa18ab2c..4d60005e9277 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -10,15 +10,25 @@
10 * http://www.gnu.org/copyleft/gpl.html 10 * http://www.gnu.org/copyleft/gpl.html
11 */ 11 */
12 12
13#include <linux/clk.h>
14#include <linux/delay.h>
13#include <linux/io.h> 15#include <linux/io.h>
14#include <linux/irq.h> 16#include <linux/irq.h>
15#include <linux/of.h> 17#include <linux/of.h>
16#include <linux/of_address.h> 18#include <linux/of_address.h>
17#include <linux/of_irq.h> 19#include <linux/of_irq.h>
20#include <linux/platform_device.h>
21#include <linux/pm_domain.h>
22#include <linux/regulator/consumer.h>
18#include <linux/irqchip/arm-gic.h> 23#include <linux/irqchip/arm-gic.h>
19#include "common.h" 24#include "common.h"
25#include "hardware.h"
20 26
27#define GPC_CNTR 0x000
21#define GPC_IMR1 0x008 28#define GPC_IMR1 0x008
29#define GPC_PGC_GPU_PDN 0x260
30#define GPC_PGC_GPU_PUPSCR 0x264
31#define GPC_PGC_GPU_PDNSCR 0x268
22#define GPC_PGC_CPU_PDN 0x2a0 32#define GPC_PGC_CPU_PDN 0x2a0
23#define GPC_PGC_CPU_PUPSCR 0x2a4 33#define GPC_PGC_CPU_PUPSCR 0x2a4
24#define GPC_PGC_CPU_PDNSCR 0x2a8 34#define GPC_PGC_CPU_PDNSCR 0x2a8
@@ -26,6 +36,19 @@
26#define GPC_PGC_SW_SHIFT 0x0 36#define GPC_PGC_SW_SHIFT 0x0
27 37
28#define IMR_NUM 4 38#define IMR_NUM 4
39#define GPC_MAX_IRQS (IMR_NUM * 32)
40
41#define GPU_VPU_PUP_REQ BIT(1)
42#define GPU_VPU_PDN_REQ BIT(0)
43
44#define GPC_CLK_MAX 6
45
46struct pu_domain {
47 struct generic_pm_domain base;
48 struct regulator *reg;
49 struct clk *clk[GPC_CLK_MAX];
50 int num_clks;
51};
29 52
30static void __iomem *gpc_base; 53static void __iomem *gpc_base;
31static u32 gpc_wake_irqs[IMR_NUM]; 54static u32 gpc_wake_irqs[IMR_NUM];
@@ -77,17 +100,17 @@ void imx_gpc_post_resume(void)
77 100
78static int imx_gpc_irq_set_wake(struct irq_data *d, unsigned int on) 101static int imx_gpc_irq_set_wake(struct irq_data *d, unsigned int on)
79{ 102{
80 unsigned int idx = d->hwirq / 32 - 1; 103 unsigned int idx = d->hwirq / 32;
81 u32 mask; 104 u32 mask;
82 105
83 /* Sanity check for SPI irq */
84 if (d->hwirq < 32)
85 return -EINVAL;
86
87 mask = 1 << d->hwirq % 32; 106 mask = 1 << d->hwirq % 32;
88 gpc_wake_irqs[idx] = on ? gpc_wake_irqs[idx] | mask : 107 gpc_wake_irqs[idx] = on ? gpc_wake_irqs[idx] | mask :
89 gpc_wake_irqs[idx] & ~mask; 108 gpc_wake_irqs[idx] & ~mask;
90 109
110 /*
111 * Do *not* call into the parent, as the GIC doesn't have any
112 * wake-up facility...
113 */
91 return 0; 114 return 0;
92} 115}
93 116
@@ -117,7 +140,7 @@ void imx_gpc_hwirq_unmask(unsigned int hwirq)
117 void __iomem *reg; 140 void __iomem *reg;
118 u32 val; 141 u32 val;
119 142
120 reg = gpc_base + GPC_IMR1 + (hwirq / 32 - 1) * 4; 143 reg = gpc_base + GPC_IMR1 + hwirq / 32 * 4;
121 val = readl_relaxed(reg); 144 val = readl_relaxed(reg);
122 val &= ~(1 << hwirq % 32); 145 val &= ~(1 << hwirq % 32);
123 writel_relaxed(val, reg); 146 writel_relaxed(val, reg);
@@ -128,7 +151,7 @@ void imx_gpc_hwirq_mask(unsigned int hwirq)
128 void __iomem *reg; 151 void __iomem *reg;
129 u32 val; 152 u32 val;
130 153
131 reg = gpc_base + GPC_IMR1 + (hwirq / 32 - 1) * 4; 154 reg = gpc_base + GPC_IMR1 + hwirq / 32 * 4;
132 val = readl_relaxed(reg); 155 val = readl_relaxed(reg);
133 val |= 1 << (hwirq % 32); 156 val |= 1 << (hwirq % 32);
134 writel_relaxed(val, reg); 157 writel_relaxed(val, reg);
@@ -136,37 +159,319 @@ void imx_gpc_hwirq_mask(unsigned int hwirq)
136 159
137static void imx_gpc_irq_unmask(struct irq_data *d) 160static void imx_gpc_irq_unmask(struct irq_data *d)
138{ 161{
139 /* Sanity check for SPI irq */
140 if (d->hwirq < 32)
141 return;
142
143 imx_gpc_hwirq_unmask(d->hwirq); 162 imx_gpc_hwirq_unmask(d->hwirq);
163 irq_chip_unmask_parent(d);
144} 164}
145 165
146static void imx_gpc_irq_mask(struct irq_data *d) 166static void imx_gpc_irq_mask(struct irq_data *d)
147{ 167{
148 /* Sanity check for SPI irq */
149 if (d->hwirq < 32)
150 return;
151
152 imx_gpc_hwirq_mask(d->hwirq); 168 imx_gpc_hwirq_mask(d->hwirq);
169 irq_chip_mask_parent(d);
153} 170}
154 171
155void __init imx_gpc_init(void) 172static struct irq_chip imx_gpc_chip = {
173 .name = "GPC",
174 .irq_eoi = irq_chip_eoi_parent,
175 .irq_mask = imx_gpc_irq_mask,
176 .irq_unmask = imx_gpc_irq_unmask,
177 .irq_retrigger = irq_chip_retrigger_hierarchy,
178 .irq_set_wake = imx_gpc_irq_set_wake,
179#ifdef CONFIG_SMP
180 .irq_set_affinity = irq_chip_set_affinity_parent,
181#endif
182};
183
184static int imx_gpc_domain_xlate(struct irq_domain *domain,
185 struct device_node *controller,
186 const u32 *intspec,
187 unsigned int intsize,
188 unsigned long *out_hwirq,
189 unsigned int *out_type)
156{ 190{
157 struct device_node *np; 191 if (domain->of_node != controller)
192 return -EINVAL; /* Shouldn't happen, really... */
193 if (intsize != 3)
194 return -EINVAL; /* Not GIC compliant */
195 if (intspec[0] != 0)
196 return -EINVAL; /* No PPI should point to this domain */
197
198 *out_hwirq = intspec[1];
199 *out_type = intspec[2];
200 return 0;
201}
202
203static int imx_gpc_domain_alloc(struct irq_domain *domain,
204 unsigned int irq,
205 unsigned int nr_irqs, void *data)
206{
207 struct of_phandle_args *args = data;
208 struct of_phandle_args parent_args;
209 irq_hw_number_t hwirq;
158 int i; 210 int i;
159 211
160 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc"); 212 if (args->args_count != 3)
161 gpc_base = of_iomap(np, 0); 213 return -EINVAL; /* Not GIC compliant */
162 WARN_ON(!gpc_base); 214 if (args->args[0] != 0)
215 return -EINVAL; /* No PPI should point to this domain */
216
217 hwirq = args->args[1];
218 if (hwirq >= GPC_MAX_IRQS)
219 return -EINVAL; /* Can't deal with this */
220
221 for (i = 0; i < nr_irqs; i++)
222 irq_domain_set_hwirq_and_chip(domain, irq + i, hwirq + i,
223 &imx_gpc_chip, NULL);
224
225 parent_args = *args;
226 parent_args.np = domain->parent->of_node;
227 return irq_domain_alloc_irqs_parent(domain, irq, nr_irqs, &parent_args);
228}
229
230static struct irq_domain_ops imx_gpc_domain_ops = {
231 .xlate = imx_gpc_domain_xlate,
232 .alloc = imx_gpc_domain_alloc,
233 .free = irq_domain_free_irqs_common,
234};
235
236static int __init imx_gpc_init(struct device_node *node,
237 struct device_node *parent)
238{
239 struct irq_domain *parent_domain, *domain;
240 int i;
241
242 if (!parent) {
243 pr_err("%s: no parent, giving up\n", node->full_name);
244 return -ENODEV;
245 }
246
247 parent_domain = irq_find_host(parent);
248 if (!parent_domain) {
249 pr_err("%s: unable to obtain parent domain\n", node->full_name);
250 return -ENXIO;
251 }
252
253 gpc_base = of_iomap(node, 0);
254 if (WARN_ON(!gpc_base))
255 return -ENOMEM;
256
257 domain = irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS,
258 node, &imx_gpc_domain_ops,
259 NULL);
260 if (!domain) {
261 iounmap(gpc_base);
262 return -ENOMEM;
263 }
163 264
164 /* Initially mask all interrupts */ 265 /* Initially mask all interrupts */
165 for (i = 0; i < IMR_NUM; i++) 266 for (i = 0; i < IMR_NUM; i++)
166 writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4); 267 writel_relaxed(~0, gpc_base + GPC_IMR1 + i * 4);
167 268
168 /* Register GPC as the secondary interrupt controller behind GIC */ 269 return 0;
169 gic_arch_extn.irq_mask = imx_gpc_irq_mask; 270}
170 gic_arch_extn.irq_unmask = imx_gpc_irq_unmask; 271
171 gic_arch_extn.irq_set_wake = imx_gpc_irq_set_wake; 272/*
273 * We cannot use the IRQCHIP_DECLARE macro that lives in
274 * drivers/irqchip, so we're forced to roll our own. Not very nice.
275 */
276OF_DECLARE_2(irqchip, imx_gpc, "fsl,imx6q-gpc", imx_gpc_init);
277
278void __init imx_gpc_check_dt(void)
279{
280 struct device_node *np;
281
282 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpc");
283 if (WARN_ON(!np ||
284 !of_find_property(np, "interrupt-controller", NULL)))
285 pr_warn("Outdated DT detected, system is about to crash!!!\n");
286}
287
288#ifdef CONFIG_PM_GENERIC_DOMAINS
289
290static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd)
291{
292 int iso, iso2sw;
293 u32 val;
294
295 /* Read ISO and ISO2SW power down delays */
296 val = readl_relaxed(gpc_base + GPC_PGC_GPU_PDNSCR);
297 iso = val & 0x3f;
298 iso2sw = (val >> 8) & 0x3f;
299
300 /* Gate off PU domain when GPU/VPU when powered down */
301 writel_relaxed(0x1, gpc_base + GPC_PGC_GPU_PDN);
302
303 /* Request GPC to power down GPU/VPU */
304 val = readl_relaxed(gpc_base + GPC_CNTR);
305 val |= GPU_VPU_PDN_REQ;
306 writel_relaxed(val, gpc_base + GPC_CNTR);
307
308 /* Wait ISO + ISO2SW IPG clock cycles */
309 ndelay((iso + iso2sw) * 1000 / 66);
310}
311
312static int imx6q_pm_pu_power_off(struct generic_pm_domain *genpd)
313{
314 struct pu_domain *pu = container_of(genpd, struct pu_domain, base);
315
316 _imx6q_pm_pu_power_off(genpd);
317
318 if (pu->reg)
319 regulator_disable(pu->reg);
320
321 return 0;
322}
323
324static int imx6q_pm_pu_power_on(struct generic_pm_domain *genpd)
325{
326 struct pu_domain *pu = container_of(genpd, struct pu_domain, base);
327 int i, ret, sw, sw2iso;
328 u32 val;
329
330 if (pu->reg)
331 ret = regulator_enable(pu->reg);
332 if (pu->reg && ret) {
333 pr_err("%s: failed to enable regulator: %d\n", __func__, ret);
334 return ret;
335 }
336
337 /* Enable reset clocks for all devices in the PU domain */
338 for (i = 0; i < pu->num_clks; i++)
339 clk_prepare_enable(pu->clk[i]);
340
341 /* Gate off PU domain when GPU/VPU when powered down */
342 writel_relaxed(0x1, gpc_base + GPC_PGC_GPU_PDN);
343
344 /* Read ISO and ISO2SW power down delays */
345 val = readl_relaxed(gpc_base + GPC_PGC_GPU_PUPSCR);
346 sw = val & 0x3f;
347 sw2iso = (val >> 8) & 0x3f;
348
349 /* Request GPC to power up GPU/VPU */
350 val = readl_relaxed(gpc_base + GPC_CNTR);
351 val |= GPU_VPU_PUP_REQ;
352 writel_relaxed(val, gpc_base + GPC_CNTR);
353
354 /* Wait ISO + ISO2SW IPG clock cycles */
355 ndelay((sw + sw2iso) * 1000 / 66);
356
357 /* Disable reset clocks for all devices in the PU domain */
358 for (i = 0; i < pu->num_clks; i++)
359 clk_disable_unprepare(pu->clk[i]);
360
361 return 0;
362}
363
364static struct generic_pm_domain imx6q_arm_domain = {
365 .name = "ARM",
366};
367
368static struct pu_domain imx6q_pu_domain = {
369 .base = {
370 .name = "PU",
371 .power_off = imx6q_pm_pu_power_off,
372 .power_on = imx6q_pm_pu_power_on,
373 .power_off_latency_ns = 25000,
374 .power_on_latency_ns = 2000000,
375 },
376};
377
378static struct generic_pm_domain imx6sl_display_domain = {
379 .name = "DISPLAY",
380};
381
382static struct generic_pm_domain *imx_gpc_domains[] = {
383 &imx6q_arm_domain,
384 &imx6q_pu_domain.base,
385 &imx6sl_display_domain,
386};
387
388static struct genpd_onecell_data imx_gpc_onecell_data = {
389 .domains = imx_gpc_domains,
390 .num_domains = ARRAY_SIZE(imx_gpc_domains),
391};
392
393static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg)
394{
395 struct clk *clk;
396 bool is_off;
397 int i;
398
399 imx6q_pu_domain.reg = pu_reg;
400
401 for (i = 0; ; i++) {
402 clk = of_clk_get(dev->of_node, i);
403 if (IS_ERR(clk))
404 break;
405 if (i >= GPC_CLK_MAX) {
406 dev_err(dev, "more than %d clocks\n", GPC_CLK_MAX);
407 goto clk_err;
408 }
409 imx6q_pu_domain.clk[i] = clk;
410 }
411 imx6q_pu_domain.num_clks = i;
412
413 is_off = IS_ENABLED(CONFIG_PM);
414 if (is_off) {
415 _imx6q_pm_pu_power_off(&imx6q_pu_domain.base);
416 } else {
417 /*
418 * Enable power if compiled without CONFIG_PM in case the
419 * bootloader disabled it.
420 */
421 imx6q_pm_pu_power_on(&imx6q_pu_domain.base);
422 }
423
424 pm_genpd_init(&imx6q_pu_domain.base, NULL, is_off);
425 return of_genpd_add_provider_onecell(dev->of_node,
426 &imx_gpc_onecell_data);
427
428clk_err:
429 while (i--)
430 clk_put(imx6q_pu_domain.clk[i]);
431 return -EINVAL;
432}
433
434#else
435static inline int imx_gpc_genpd_init(struct device *dev, struct regulator *reg)
436{
437 return 0;
438}
439#endif /* CONFIG_PM_GENERIC_DOMAINS */
440
441static int imx_gpc_probe(struct platform_device *pdev)
442{
443 struct regulator *pu_reg;
444 int ret;
445
446 pu_reg = devm_regulator_get_optional(&pdev->dev, "pu");
447 if (PTR_ERR(pu_reg) == -ENODEV)
448 pu_reg = NULL;
449 if (IS_ERR(pu_reg)) {
450 ret = PTR_ERR(pu_reg);
451 dev_err(&pdev->dev, "failed to get pu regulator: %d\n", ret);
452 return ret;
453 }
454
455 return imx_gpc_genpd_init(&pdev->dev, pu_reg);
456}
457
458static const struct of_device_id imx_gpc_dt_ids[] = {
459 { .compatible = "fsl,imx6q-gpc" },
460 { .compatible = "fsl,imx6sl-gpc" },
461 { }
462};
463
464static struct platform_driver imx_gpc_driver = {
465 .driver = {
466 .name = "imx-gpc",
467 .owner = THIS_MODULE,
468 .of_match_table = imx_gpc_dt_ids,
469 },
470 .probe = imx_gpc_probe,
471};
472
473static int __init imx_pgc_init(void)
474{
475 return platform_driver_register(&imx_gpc_driver);
172} 476}
477subsys_initcall(imx_pgc_init);
diff --git a/arch/arm/mach-imx/hardware.h b/arch/arm/mach-imx/hardware.h
index 66b2b564c463..76af2c03c241 100644
--- a/arch/arm/mach-imx/hardware.h
+++ b/arch/arm/mach-imx/hardware.h
@@ -112,7 +112,6 @@
112#include "mx21.h" 112#include "mx21.h"
113#include "mx27.h" 113#include "mx27.h"
114#include "mx1.h" 114#include "mx1.h"
115#include "mx25.h"
116 115
117#define imx_map_entry(soc, name, _type) { \ 116#define imx_map_entry(soc, name, _type) { \
118 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \ 117 .virtual = soc ## _IO_P2V(soc ## _ ## name ## _BASE_ADDR), \
diff --git a/arch/arm/mach-imx/iomux-mx25.h b/arch/arm/mach-imx/iomux-mx25.h
deleted file mode 100644
index be51e838375c..000000000000
--- a/arch/arm/mach-imx/iomux-mx25.h
+++ /dev/null
@@ -1,524 +0,0 @@
1/*
2 * arch/arm/plat-mxc/include/mach/iomux-mx25.h
3 *
4 * Copyright (C) 2009 by Lothar Wassmann <LW@KARO-electronics.de>
5 *
6 * based on arch/arm/mach-mx25/mx25_pins.h
7 * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
8 * and
9 * arch/arm/plat-mxc/include/mach/iomux-mx35.h
10 * Copyright (C) 2009 by Jan Weitzel Phytec Messtechnik GmbH <armlinux@phytec.de>
11 *
12 * The code contained herein is licensed under the GNU General Public
13 * License. You may obtain a copy of the GNU General Public License
14 * Version 2 or later at the following locations:
15 *
16 * http://www.opensource.org/licenses/gpl-license.html
17 * http://www.gnu.org/copyleft/gpl.html
18 */
19#ifndef __MACH_IOMUX_MX25_H__
20#define __MACH_IOMUX_MX25_H__
21
22#include "iomux-v3.h"
23
24/*
25 * IOMUX/PAD Bit field definitions
26 */
27
28#define MX25_PAD_A10__A10 IOMUX_PAD(0x000, 0x008, 0x00, 0, 0, NO_PAD_CTRL)
29#define MX25_PAD_A10__GPIO_4_0 IOMUX_PAD(0x000, 0x008, 0x05, 0, 0, NO_PAD_CTRL)
30
31#define MX25_PAD_A13__A13 IOMUX_PAD(0x22C, 0x00c, 0x00, 0, 0, NO_PAD_CTRL)
32#define MX25_PAD_A13__GPIO_4_1 IOMUX_PAD(0x22C, 0x00c, 0x05, 0, 0, NO_PAD_CTRL)
33
34#define MX25_PAD_A14__A14 IOMUX_PAD(0x230, 0x010, 0x10, 0, 0, NO_PAD_CTRL)
35#define MX25_PAD_A14__GPIO_2_0 IOMUX_PAD(0x230, 0x010, 0x15, 0, 0, NO_PAD_CTRL)
36
37#define MX25_PAD_A15__A15 IOMUX_PAD(0x234, 0x014, 0x10, 0, 0, NO_PAD_CTRL)
38#define MX25_PAD_A15__GPIO_2_1 IOMUX_PAD(0x234, 0x014, 0x15, 0, 0, NO_PAD_CTRL)
39
40#define MX25_PAD_A16__A16 IOMUX_PAD(0x000, 0x018, 0x10, 0, 0, NO_PAD_CTRL)
41#define MX25_PAD_A16__GPIO_2_2 IOMUX_PAD(0x000, 0x018, 0x15, 0, 0, NO_PAD_CTRL)
42
43#define MX25_PAD_A17__A17 IOMUX_PAD(0x238, 0x01c, 0x10, 0, 0, NO_PAD_CTRL)
44#define MX25_PAD_A17__GPIO_2_3 IOMUX_PAD(0x238, 0x01c, 0x15, 0, 0, NO_PAD_CTRL)
45
46#define MX25_PAD_A18__A18 IOMUX_PAD(0x23c, 0x020, 0x10, 0, 0, NO_PAD_CTRL)
47#define MX25_PAD_A18__GPIO_2_4 IOMUX_PAD(0x23c, 0x020, 0x15, 0, 0, NO_PAD_CTRL)
48#define MX25_PAD_A18__FEC_COL IOMUX_PAD(0x23c, 0x020, 0x17, 0x504, 0, NO_PAD_CTRL)
49
50#define MX25_PAD_A19__A19 IOMUX_PAD(0x240, 0x024, 0x10, 0, 0, NO_PAD_CTRL)
51#define MX25_PAD_A19__FEC_RX_ER IOMUX_PAD(0x240, 0x024, 0x17, 0x518, 0, NO_PAD_CTRL)
52#define MX25_PAD_A19__GPIO_2_5 IOMUX_PAD(0x240, 0x024, 0x15, 0, 0, NO_PAD_CTRL)
53
54#define MX25_PAD_A20__A20 IOMUX_PAD(0x244, 0x028, 0x10, 0, 0, NO_PAD_CTRL)
55#define MX25_PAD_A20__GPIO_2_6 IOMUX_PAD(0x244, 0x028, 0x15, 0, 0, NO_PAD_CTRL)
56#define MX25_PAD_A20__FEC_RDATA2 IOMUX_PAD(0x244, 0x028, 0x17, 0x50c, 0, NO_PAD_CTRL)
57
58#define MX25_PAD_A21__A21 IOMUX_PAD(0x248, 0x02c, 0x10, 0, 0, NO_PAD_CTRL)
59#define MX25_PAD_A21__GPIO_2_7 IOMUX_PAD(0x248, 0x02c, 0x15, 0, 0, NO_PAD_CTRL)
60#define MX25_PAD_A21__FEC_RDATA3 IOMUX_PAD(0x248, 0x02c, 0x17, 0x510, 0, NO_PAD_CTRL)
61
62#define MX25_PAD_A22__A22 IOMUX_PAD(0x000, 0x030, 0x10, 0, 0, NO_PAD_CTRL)
63#define MX25_PAD_A22__GPIO_2_8 IOMUX_PAD(0x000, 0x030, 0x15, 0, 0, NO_PAD_CTRL)
64
65#define MX25_PAD_A23__A23 IOMUX_PAD(0x24c, 0x034, 0x10, 0, 0, NO_PAD_CTRL)
66#define MX25_PAD_A23__GPIO_2_9 IOMUX_PAD(0x24c, 0x034, 0x15, 0, 0, NO_PAD_CTRL)
67
68#define MX25_PAD_A24__A24 IOMUX_PAD(0x250, 0x038, 0x10, 0, 0, NO_PAD_CTRL)
69#define MX25_PAD_A24__GPIO_2_10 IOMUX_PAD(0x250, 0x038, 0x15, 0, 0, NO_PAD_CTRL)
70#define MX25_PAD_A24__FEC_RX_CLK IOMUX_PAD(0x250, 0x038, 0x17, 0x514, 0, NO_PAD_CTRL)
71
72#define MX25_PAD_A25__A25 IOMUX_PAD(0x254, 0x03c, 0x10, 0, 0, NO_PAD_CTRL)
73#define MX25_PAD_A25__GPIO_2_11 IOMUX_PAD(0x254, 0x03c, 0x15, 0, 0, NO_PAD_CTRL)
74#define MX25_PAD_A25__FEC_CRS IOMUX_PAD(0x254, 0x03c, 0x17, 0x508, 0, NO_PAD_CTRL)
75
76#define MX25_PAD_EB0__EB0 IOMUX_PAD(0x258, 0x040, 0x10, 0, 0, NO_PAD_CTRL)
77#define MX25_PAD_EB0__AUD4_TXD IOMUX_PAD(0x258, 0x040, 0x14, 0x464, 0, NO_PAD_CTRL)
78#define MX25_PAD_EB0__GPIO_2_12 IOMUX_PAD(0x258, 0x040, 0x15, 0, 0, NO_PAD_CTRL)
79
80#define MX25_PAD_EB1__EB1 IOMUX_PAD(0x25c, 0x044, 0x10, 0, 0, NO_PAD_CTRL)
81#define MX25_PAD_EB1__AUD4_RXD IOMUX_PAD(0x25c, 0x044, 0x14, 0x460, 0, NO_PAD_CTRL)
82#define MX25_PAD_EB1__GPIO_2_13 IOMUX_PAD(0x25c, 0x044, 0x15, 0, 0, NO_PAD_CTRL)
83
84#define MX25_PAD_OE__OE IOMUX_PAD(0x260, 0x048, 0x10, 0, 0, NO_PAD_CTRL)
85#define MX25_PAD_OE__AUD4_TXC IOMUX_PAD(0x260, 0x048, 0x14, 0, 0, NO_PAD_CTRL)
86#define MX25_PAD_OE__GPIO_2_14 IOMUX_PAD(0x260, 0x048, 0x15, 0, 0, NO_PAD_CTRL)
87
88#define MX25_PAD_CS0__CS0 IOMUX_PAD(0x000, 0x04c, 0x00, 0, 0, NO_PAD_CTRL)
89#define MX25_PAD_CS0__GPIO_4_2 IOMUX_PAD(0x000, 0x04c, 0x05, 0, 0, NO_PAD_CTRL)
90
91#define MX25_PAD_CS1__CS1 IOMUX_PAD(0x000, 0x050, 0x00, 0, 0, NO_PAD_CTRL)
92#define MX25_PAD_CS1__NF_CE3 IOMUX_PAD(0x000, 0x050, 0x01, 0, 0, NO_PAD_CTRL)
93#define MX25_PAD_CS1__GPIO_4_3 IOMUX_PAD(0x000, 0x050, 0x05, 0, 0, NO_PAD_CTRL)
94
95#define MX25_PAD_CS4__CS4 IOMUX_PAD(0x264, 0x054, 0x10, 0, 0, NO_PAD_CTRL)
96#define MX25_PAD_CS4__NF_CE1 IOMUX_PAD(0x264, 0x054, 0x01, 0, 0, NO_PAD_CTRL)
97#define MX25_PAD_CS4__UART5_CTS IOMUX_PAD(0x264, 0x054, 0x13, 0, 0, NO_PAD_CTRL)
98#define MX25_PAD_CS4__GPIO_3_20 IOMUX_PAD(0x264, 0x054, 0x15, 0, 0, NO_PAD_CTRL)
99
100#define MX25_PAD_CS5__CS5 IOMUX_PAD(0x268, 0x058, 0x10, 0, 0, NO_PAD_CTRL)
101#define MX25_PAD_CS5__NF_CE2 IOMUX_PAD(0x268, 0x058, 0x01, 0, 0, NO_PAD_CTRL)
102#define MX25_PAD_CS5__UART5_RTS IOMUX_PAD(0x268, 0x058, 0x13, 0x574, 0, NO_PAD_CTRL)
103#define MX25_PAD_CS5__GPIO_3_21 IOMUX_PAD(0x268, 0x058, 0x15, 0, 0, NO_PAD_CTRL)
104
105#define MX25_PAD_NF_CE0__NF_CE0 IOMUX_PAD(0x26c, 0x05c, 0x10, 0, 0, NO_PAD_CTRL)
106#define MX25_PAD_NF_CE0__GPIO_3_22 IOMUX_PAD(0x26c, 0x05c, 0x15, 0, 0, NO_PAD_CTRL)
107
108#define MX25_PAD_ECB__ECB IOMUX_PAD(0x270, 0x060, 0x10, 0, 0, NO_PAD_CTRL)
109#define MX25_PAD_ECB__UART5_TXD_MUX IOMUX_PAD(0x270, 0x060, 0x13, 0, 0, NO_PAD_CTRL)
110#define MX25_PAD_ECB__GPIO_3_23 IOMUX_PAD(0x270, 0x060, 0x15, 0, 0, NO_PAD_CTRL)
111
112#define MX25_PAD_LBA__LBA IOMUX_PAD(0x274, 0x064, 0x10, 0, 0, NO_PAD_CTRL)
113#define MX25_PAD_LBA__UART5_RXD_MUX IOMUX_PAD(0x274, 0x064, 0x13, 0x578, 0, NO_PAD_CTRL)
114#define MX25_PAD_LBA__GPIO_3_24 IOMUX_PAD(0x274, 0x064, 0x15, 0, 0, NO_PAD_CTRL)
115
116#define MX25_PAD_BCLK__BCLK IOMUX_PAD(0x000, 0x068, 0x00, 0, 0, NO_PAD_CTRL)
117#define MX25_PAD_BCLK__GPIO_4_4 IOMUX_PAD(0x000, 0x068, 0x05, 0, 0, NO_PAD_CTRL)
118
119#define MX25_PAD_RW__RW IOMUX_PAD(0x278, 0x06c, 0x10, 0, 0, NO_PAD_CTRL)
120#define MX25_PAD_RW__AUD4_TXFS IOMUX_PAD(0x278, 0x06c, 0x14, 0x474, 0, NO_PAD_CTRL)
121#define MX25_PAD_RW__GPIO_3_25 IOMUX_PAD(0x278, 0x06c, 0x15, 0, 0, NO_PAD_CTRL)
122
123#define MX25_PAD_NFWE_B__NFWE_B IOMUX_PAD(0x000, 0x070, 0x10, 0, 0, NO_PAD_CTRL)
124#define MX25_PAD_NFWE_B__GPIO_3_26 IOMUX_PAD(0x000, 0x070, 0x15, 0, 0, NO_PAD_CTRL)
125
126#define MX25_PAD_NFRE_B__NFRE_B IOMUX_PAD(0x000, 0x074, 0x10, 0, 0, NO_PAD_CTRL)
127#define MX25_PAD_NFRE_B__GPIO_3_27 IOMUX_PAD(0x000, 0x074, 0x15, 0, 0, NO_PAD_CTRL)
128
129#define MX25_PAD_NFALE__NFALE IOMUX_PAD(0x000, 0x078, 0x10, 0, 0, NO_PAD_CTRL)
130#define MX25_PAD_NFALE__GPIO_3_28 IOMUX_PAD(0x000, 0x078, 0x15, 0, 0, NO_PAD_CTRL)
131
132#define MX25_PAD_NFCLE__NFCLE IOMUX_PAD(0x000, 0x07c, 0x10, 0, 0, NO_PAD_CTRL)
133#define MX25_PAD_NFCLE__GPIO_3_29 IOMUX_PAD(0x000, 0x07c, 0x15, 0, 0, NO_PAD_CTRL)
134
135#define MX25_PAD_NFWP_B__NFWP_B IOMUX_PAD(0x000, 0x080, 0x10, 0, 0, NO_PAD_CTRL)
136#define MX25_PAD_NFWP_B__GPIO_3_30 IOMUX_PAD(0x000, 0x080, 0x15, 0, 0, NO_PAD_CTRL)
137
138#define MX25_PAD_NFRB__NFRB IOMUX_PAD(0x27c, 0x084, 0x10, 0, 0, PAD_CTL_PKE)
139#define MX25_PAD_NFRB__GPIO_3_31 IOMUX_PAD(0x27c, 0x084, 0x15, 0, 0, NO_PAD_CTRL)
140
141#define MX25_PAD_D15__D15 IOMUX_PAD(0x280, 0x088, 0x00, 0, 0, NO_PAD_CTRL)
142#define MX25_PAD_D15__LD16 IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, PAD_CTL_SRE_FAST)
143#define MX25_PAD_D15__GPIO_4_5 IOMUX_PAD(0x280, 0x088, 0x05, 0, 0, NO_PAD_CTRL)
144
145#define MX25_PAD_D14__D14 IOMUX_PAD(0x284, 0x08c, 0x00, 0, 0, NO_PAD_CTRL)
146#define MX25_PAD_D14__LD17 IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, PAD_CTL_SRE_FAST)
147#define MX25_PAD_D14__GPIO_4_6 IOMUX_PAD(0x284, 0x08c, 0x05, 0, 0, NO_PAD_CTRL)
148
149#define MX25_PAD_D13__D13 IOMUX_PAD(0x288, 0x090, 0x00, 0, 0, NO_PAD_CTRL)
150#define MX25_PAD_D13__LD18 IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, PAD_CTL_SRE_FAST)
151#define MX25_PAD_D13__GPIO_4_7 IOMUX_PAD(0x288, 0x090, 0x05, 0, 0, NO_PAD_CTRL)
152
153#define MX25_PAD_D12__D12 IOMUX_PAD(0x28c, 0x094, 0x00, 0, 0, NO_PAD_CTRL)
154#define MX25_PAD_D12__GPIO_4_8 IOMUX_PAD(0x28c, 0x094, 0x05, 0, 0, NO_PAD_CTRL)
155
156#define MX25_PAD_D11__D11 IOMUX_PAD(0x290, 0x098, 0x00, 0, 0, NO_PAD_CTRL)
157#define MX25_PAD_D11__GPIO_4_9 IOMUX_PAD(0x290, 0x098, 0x05, 0, 0, NO_PAD_CTRL)
158
159#define MX25_PAD_D10__D10 IOMUX_PAD(0x294, 0x09c, 0x00, 0, 0, NO_PAD_CTRL)
160#define MX25_PAD_D10__GPIO_4_10 IOMUX_PAD(0x294, 0x09c, 0x05, 0, 0, NO_PAD_CTRL)
161#define MX25_PAD_D10__USBOTG_OC IOMUX_PAD(0x294, 0x09c, 0x06, 0x57c, 0, PAD_CTL_PUS_100K_UP)
162
163#define MX25_PAD_D9__D9 IOMUX_PAD(0x298, 0x0a0, 0x00, 0, 0, NO_PAD_CTRL)
164#define MX25_PAD_D9__GPIO_4_11 IOMUX_PAD(0x298, 0x0a0, 0x05, 0, 0, NO_PAD_CTRL)
165#define MX25_PAD_D9__USBH2_PWR IOMUX_PAD(0x298, 0x0a0, 0x06, 0, 0, PAD_CTL_PKE)
166
167#define MX25_PAD_D8__D8 IOMUX_PAD(0x29c, 0x0a4, 0x00, 0, 0, NO_PAD_CTRL)
168#define MX25_PAD_D8__GPIO_4_12 IOMUX_PAD(0x29c, 0x0a4, 0x05, 0, 0, NO_PAD_CTRL)
169#define MX25_PAD_D8__USBH2_OC IOMUX_PAD(0x29c, 0x0a4, 0x06, 0x580, 0, PAD_CTL_PUS_100K_UP)
170
171#define MX25_PAD_D7__D7 IOMUX_PAD(0x2a0, 0x0a8, 0x00, 0, 0, NO_PAD_CTRL)
172#define MX25_PAD_D7__GPIO_4_13 IOMUX_PAD(0x2a0, 0x0a8, 0x05, 0, 0, NO_PAD_CTRL)
173
174#define MX25_PAD_D6__D6 IOMUX_PAD(0x2a4, 0x0ac, 0x00, 0, 0, NO_PAD_CTRL)
175#define MX25_PAD_D6__GPIO_4_14 IOMUX_PAD(0x2a4, 0x0ac, 0x05, 0, 0, NO_PAD_CTRL)
176
177#define MX25_PAD_D5__D5 IOMUX_PAD(0x2a8, 0x0b0, 0x00, 0, 0, NO_PAD_CTRL)
178#define MX25_PAD_D5__GPIO_4_15 IOMUX_PAD(0x2a8, 0x0b0, 0x05, 0, 0, NO_PAD_CTRL)
179
180#define MX25_PAD_D4__D4 IOMUX_PAD(0x2ac, 0x0b4, 0x00, 0, 0, NO_PAD_CTRL)
181#define MX25_PAD_D4__GPIO_4_16 IOMUX_PAD(0x2ac, 0x0b4, 0x05, 0, 0, NO_PAD_CTRL)
182
183#define MX25_PAD_D3__D3 IOMUX_PAD(0x2b0, 0x0b8, 0x00, 0, 0, NO_PAD_CTRL)
184#define MX25_PAD_D3__GPIO_4_17 IOMUX_PAD(0x2b0, 0x0b8, 0x05, 0, 0, NO_PAD_CTRL)
185
186#define MX25_PAD_D2__D2 IOMUX_PAD(0x2b4, 0x0bc, 0x00, 0, 0, NO_PAD_CTRL)
187#define MX25_PAD_D2__GPIO_4_18 IOMUX_PAD(0x2b4, 0x0bc, 0x05, 0, 0, NO_PAD_CTRL)
188
189#define MX25_PAD_D1__D1 IOMUX_PAD(0x2b8, 0x0c0, 0x00, 0, 0, NO_PAD_CTRL)
190#define MX25_PAD_D1__GPIO_4_19 IOMUX_PAD(0x2b8, 0x0c0, 0x05, 0, 0, NO_PAD_CTRL)
191
192#define MX25_PAD_D0__D0 IOMUX_PAD(0x2bc, 0x0c4, 0x00, 0, 0, NO_PAD_CTRL)
193#define MX25_PAD_D0__GPIO_4_20 IOMUX_PAD(0x2bc, 0x0c4, 0x05, 0, 0, NO_PAD_CTRL)
194
195#define MX25_PAD_LD0__LD0 IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
196#define MX25_PAD_LD0__CSI_D0 IOMUX_PAD(0x2c0, 0x0c8, 0x12, 0x488, 0, NO_PAD_CTRL)
197#define MX25_PAD_LD0__GPIO_2_15 IOMUX_PAD(0x2c0, 0x0c8, 0x15, 0, 0, NO_PAD_CTRL)
198
199#define MX25_PAD_LD1__LD1 IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
200#define MX25_PAD_LD1__CSI_D1 IOMUX_PAD(0x2c4, 0x0cc, 0x12, 0x48c, 0, NO_PAD_CTRL)
201#define MX25_PAD_LD1__GPIO_2_16 IOMUX_PAD(0x2c4, 0x0cc, 0x15, 0, 0, NO_PAD_CTRL)
202
203#define MX25_PAD_LD2__LD2 IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
204#define MX25_PAD_LD2__GPIO_2_17 IOMUX_PAD(0x2c8, 0x0d0, 0x15, 0, 0, NO_PAD_CTRL)
205
206#define MX25_PAD_LD3__LD3 IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
207#define MX25_PAD_LD3__GPIO_2_18 IOMUX_PAD(0x2cc, 0x0d4, 0x15, 0, 0, NO_PAD_CTRL)
208
209#define MX25_PAD_LD4__LD4 IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
210#define MX25_PAD_LD4__GPIO_2_19 IOMUX_PAD(0x2d0, 0x0d8, 0x15, 0, 0, NO_PAD_CTRL)
211
212#define MX25_PAD_LD5__LD5 IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
213#define MX25_PAD_LD5__GPIO_1_19 IOMUX_PAD(0x2d4, 0x0dc, 0x15, 0, 0, NO_PAD_CTRL)
214
215#define MX25_PAD_LD6__LD6 IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
216#define MX25_PAD_LD6__GPIO_1_20 IOMUX_PAD(0x2d8, 0x0e0, 0x15, 0, 0, NO_PAD_CTRL)
217
218#define MX25_PAD_LD7__LD7 IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
219#define MX25_PAD_LD7__GPIO_1_21 IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL)
220
221#define MX25_PAD_LD8__LD8 IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
222#define MX25_PAD_LD8__FEC_TX_ERR IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL)
223
224#define MX25_PAD_LD9__LD9 IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, PAD_CTL_SRE_FAST)
225#define MX25_PAD_LD9__FEC_COL IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL)
226
227#define MX25_PAD_LD10__LD10 IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
228#define MX25_PAD_LD10__FEC_RX_ER IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL)
229
230#define MX25_PAD_LD11__LD11 IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
231#define MX25_PAD_LD11__FEC_RDATA2 IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL)
232
233#define MX25_PAD_LD12__LD12 IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
234#define MX25_PAD_LD12__FEC_RDATA3 IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL)
235
236#define MX25_PAD_LD13__LD13 IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
237#define MX25_PAD_LD13__FEC_TDATA2 IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL)
238
239#define MX25_PAD_LD14__LD14 IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, PAD_CTL_SRE_FAST)
240#define MX25_PAD_LD14__FEC_TDATA3 IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL)
241
242#define MX25_PAD_LD15__LD15 IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, PAD_CTL_SRE_FAST)
243#define MX25_PAD_LD15__FEC_RX_CLK IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL)
244
245#define MX25_PAD_HSYNC__HSYNC IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL)
246#define MX25_PAD_HSYNC__GPIO_1_22 IOMUX_PAD(0x300, 0x108, 0x15, 0, 0, NO_PAD_CTRL)
247
248#define MX25_PAD_VSYNC__VSYNC IOMUX_PAD(0x304, 0x10c, 0x10, 0, 0, NO_PAD_CTRL)
249#define MX25_PAD_VSYNC__GPIO_1_23 IOMUX_PAD(0x304, 0x10c, 0x15, 0, 0, NO_PAD_CTRL)
250
251#define MX25_PAD_LSCLK__LSCLK IOMUX_PAD(0x308, 0x110, 0x10, 0, 0, NO_PAD_CTRL)
252#define MX25_PAD_LSCLK__GPIO_1_24 IOMUX_PAD(0x308, 0x110, 0x15, 0, 0, NO_PAD_CTRL)
253
254#define MX25_PAD_OE_ACD__OE_ACD IOMUX_PAD(0x30c, 0x114, 0x10, 0, 0, NO_PAD_CTRL)
255#define MX25_PAD_OE_ACD__GPIO_1_25 IOMUX_PAD(0x30c, 0x114, 0x15, 0, 0, NO_PAD_CTRL)
256
257#define MX25_PAD_CONTRAST__CONTRAST IOMUX_PAD(0x310, 0x118, 0x10, 0, 0, NO_PAD_CTRL)
258#define MX25_PAD_CONTRAST__PWM4_PWMO IOMUX_PAD(0x310, 0x118, 0x14, 0, 0, NO_PAD_CTRL)
259#define MX25_PAD_CONTRAST__FEC_CRS IOMUX_PAD(0x310, 0x118, 0x15, 0x508, 1, NO_PAD_CTRL)
260
261#define MX25_PAD_PWM__PWM IOMUX_PAD(0x314, 0x11c, 0x10, 0, 0, NO_PAD_CTRL)
262#define MX25_PAD_PWM__GPIO_1_26 IOMUX_PAD(0x314, 0x11c, 0x15, 0, 0, NO_PAD_CTRL)
263#define MX25_PAD_PWM__USBH2_OC IOMUX_PAD(0x314, 0x11c, 0x16, 0x580, 1, PAD_CTL_PUS_100K_UP)
264
265#define MX25_PAD_CSI_D2__CSI_D2 IOMUX_PAD(0x318, 0x120, 0x10, 0, 0, NO_PAD_CTRL)
266#define MX25_PAD_CSI_D2__UART5_RXD_MUX IOMUX_PAD(0x318, 0x120, 0x11, 0x578, 1, NO_PAD_CTRL)
267#define MX25_PAD_CSI_D2__GPIO_1_27 IOMUX_PAD(0x318, 0x120, 0x15, 0, 0, NO_PAD_CTRL)
268#define MX25_PAD_CSI_D2__CSPI3_MOSI IOMUX_PAD(0x318, 0x120, 0x17, 0, 0, NO_PAD_CTRL)
269
270#define MX25_PAD_CSI_D3__CSI_D3 IOMUX_PAD(0x31c, 0x124, 0x10, 0, 0, NO_PAD_CTRL)
271#define MX25_PAD_CSI_D3__GPIO_1_28 IOMUX_PAD(0x31c, 0x124, 0x15, 0, 0, NO_PAD_CTRL)
272#define MX25_PAD_CSI_D3__CSPI3_MISO IOMUX_PAD(0x31c, 0x124, 0x17, 0x4b4, 1, NO_PAD_CTRL)
273
274#define MX25_PAD_CSI_D4__CSI_D4 IOMUX_PAD(0x320, 0x128, 0x10, 0, 0, NO_PAD_CTRL)
275#define MX25_PAD_CSI_D4__UART5_RTS IOMUX_PAD(0x320, 0x128, 0x11, 0x574, 1, NO_PAD_CTRL)
276#define MX25_PAD_CSI_D4__GPIO_1_29 IOMUX_PAD(0x320, 0x128, 0x15, 0, 0, NO_PAD_CTRL)
277#define MX25_PAD_CSI_D4__CSPI3_SCLK IOMUX_PAD(0x320, 0x128, 0x17, 0, 0, NO_PAD_CTRL)
278
279#define MX25_PAD_CSI_D5__CSI_D5 IOMUX_PAD(0x324, 0x12c, 0x10, 0, 0, NO_PAD_CTRL)
280#define MX25_PAD_CSI_D5__GPIO_1_30 IOMUX_PAD(0x324, 0x12c, 0x15, 0, 0, NO_PAD_CTRL)
281#define MX25_PAD_CSI_D5__CSPI3_RDY IOMUX_PAD(0x324, 0x12c, 0x17, 0, 0, NO_PAD_CTRL)
282
283#define MX25_PAD_CSI_D6__CSI_D6 IOMUX_PAD(0x328, 0x130, 0x10, 0, 0, NO_PAD_CTRL)
284#define MX25_PAD_CSI_D6__GPIO_1_31 IOMUX_PAD(0x328, 0x130, 0x15, 0, 0, NO_PAD_CTRL)
285
286#define MX25_PAD_CSI_D7__CSI_D7 IOMUX_PAD(0x32c, 0x134, 0x10, 0, 0, NO_PAD_CTRL)
287#define MX25_PAD_CSI_D7__GPIO_1_6 IOMUX_PAD(0x32c, 0x134, 0x15, 0, 0, NO_PAD_CTRL)
288
289#define MX25_PAD_CSI_D8__CSI_D8 IOMUX_PAD(0x330, 0x138, 0x10, 0, 0, NO_PAD_CTRL)
290#define MX25_PAD_CSI_D8__GPIO_1_7 IOMUX_PAD(0x330, 0x138, 0x15, 0, 0, NO_PAD_CTRL)
291
292#define MX25_PAD_CSI_D9__CSI_D9 IOMUX_PAD(0x334, 0x13c, 0x10, 0, 0, NO_PAD_CTRL)
293#define MX25_PAD_CSI_D9__GPIO_4_21 IOMUX_PAD(0x334, 0x13c, 0x15, 0, 0, NO_PAD_CTRL)
294
295#define MX25_PAD_CSI_MCLK__CSI_MCLK IOMUX_PAD(0x338, 0x140, 0x10, 0, 0, NO_PAD_CTRL)
296#define MX25_PAD_CSI_MCLK__GPIO_1_8 IOMUX_PAD(0x338, 0x140, 0x15, 0, 0, NO_PAD_CTRL)
297
298#define MX25_PAD_CSI_VSYNC__CSI_VSYNC IOMUX_PAD(0x33c, 0x144, 0x10, 0, 0, NO_PAD_CTRL)
299#define MX25_PAD_CSI_VSYNC__GPIO_1_9 IOMUX_PAD(0x33c, 0x144, 0x15, 0, 0, NO_PAD_CTRL)
300
301#define MX25_PAD_CSI_HSYNC__CSI_HSYNC IOMUX_PAD(0x340, 0x148, 0x10, 0, 0, NO_PAD_CTRL)
302#define MX25_PAD_CSI_HSYNC__GPIO_1_10 IOMUX_PAD(0x340, 0x148, 0x15, 0, 0, NO_PAD_CTRL)
303
304#define MX25_PAD_CSI_PIXCLK__CSI_PIXCLK IOMUX_PAD(0x344, 0x14c, 0x10, 0, 0, NO_PAD_CTRL)
305#define MX25_PAD_CSI_PIXCLK__GPIO_1_11 IOMUX_PAD(0x344, 0x14c, 0x15, 0, 0, NO_PAD_CTRL)
306
307#define MX25_PAD_I2C1_CLK__I2C1_CLK IOMUX_PAD(0x348, 0x150, 0x10, 0, 0, NO_PAD_CTRL)
308#define MX25_PAD_I2C1_CLK__GPIO_1_12 IOMUX_PAD(0x348, 0x150, 0x15, 0, 0, NO_PAD_CTRL)
309
310#define MX25_PAD_I2C1_DAT__I2C1_DAT IOMUX_PAD(0x34c, 0x154, 0x10, 0, 0, NO_PAD_CTRL)
311#define MX25_PAD_I2C1_DAT__GPIO_1_13 IOMUX_PAD(0x34c, 0x154, 0x15, 0, 0, NO_PAD_CTRL)
312
313#define MX25_PAD_CSPI1_MOSI__CSPI1_MOSI IOMUX_PAD(0x350, 0x158, 0x10, 0, 0, NO_PAD_CTRL)
314#define MX25_PAD_CSPI1_MOSI__GPIO_1_14 IOMUX_PAD(0x350, 0x158, 0x15, 0, 0, NO_PAD_CTRL)
315
316#define MX25_PAD_CSPI1_MISO__CSPI1_MISO IOMUX_PAD(0x354, 0x15c, 0x10, 0, 0, NO_PAD_CTRL)
317#define MX25_PAD_CSPI1_MISO__GPIO_1_15 IOMUX_PAD(0x354, 0x15c, 0x15, 0, 0, NO_PAD_CTRL)
318
319#define MX25_PAD_CSPI1_SS0__CSPI1_SS0 IOMUX_PAD(0x358, 0x160, 0x10, 0, 0, NO_PAD_CTRL)
320#define MX25_PAD_CSPI1_SS0__GPIO_1_16 IOMUX_PAD(0x358, 0x160, 0x15, 0, 0, NO_PAD_CTRL)
321
322#define MX25_PAD_CSPI1_SS1__CSPI1_SS1 IOMUX_PAD(0x35c, 0x164, 0x10, 0, 0, NO_PAD_CTRL)
323#define MX25_PAD_CSPI1_SS1__GPIO_1_17 IOMUX_PAD(0x35c, 0x164, 0x15, 0, 0, NO_PAD_CTRL)
324
325#define MX25_PAD_CSPI1_SCLK__CSPI1_SCLK IOMUX_PAD(0x360, 0x168, 0x10, 0, 0, NO_PAD_CTRL)
326#define MX25_PAD_CSPI1_SCLK__GPIO_1_18 IOMUX_PAD(0x360, 0x168, 0x15, 0, 0, NO_PAD_CTRL)
327
328#define MX25_PAD_CSPI1_RDY__CSPI1_RDY IOMUX_PAD(0x364, 0x16c, 0x10, 0, 0, PAD_CTL_PKE)
329#define MX25_PAD_CSPI1_RDY__GPIO_2_22 IOMUX_PAD(0x364, 0x16c, 0x15, 0, 0, NO_PAD_CTRL)
330
331#define MX25_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x368, 0x170, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN)
332#define MX25_PAD_UART1_RXD__GPIO_4_22 IOMUX_PAD(0x368, 0x170, 0x15, 0, 0, NO_PAD_CTRL)
333
334#define MX25_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x36c, 0x174, 0x10, 0, 0, NO_PAD_CTRL)
335#define MX25_PAD_UART1_TXD__GPIO_4_23 IOMUX_PAD(0x36c, 0x174, 0x15, 0, 0, NO_PAD_CTRL)
336
337#define MX25_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x370, 0x178, 0x10, 0, 0, PAD_CTL_PUS_100K_UP)
338#define MX25_PAD_UART1_RTS__CSI_D0 IOMUX_PAD(0x370, 0x178, 0x11, 0x488, 1, NO_PAD_CTRL)
339#define MX25_PAD_UART1_RTS__GPIO_4_24 IOMUX_PAD(0x370, 0x178, 0x15, 0, 0, NO_PAD_CTRL)
340
341#define MX25_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x374, 0x17c, 0x10, 0, 0, PAD_CTL_PUS_100K_UP)
342#define MX25_PAD_UART1_CTS__CSI_D1 IOMUX_PAD(0x374, 0x17c, 0x11, 0x48c, 1, NO_PAD_CTRL)
343#define MX25_PAD_UART1_CTS__GPIO_4_25 IOMUX_PAD(0x374, 0x17c, 0x15, 0, 0, NO_PAD_CTRL)
344
345#define MX25_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x378, 0x180, 0x10, 0, 0, NO_PAD_CTRL)
346#define MX25_PAD_UART2_RXD__GPIO_4_26 IOMUX_PAD(0x378, 0x180, 0x15, 0, 0, NO_PAD_CTRL)
347
348#define MX25_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x37c, 0x184, 0x10, 0, 0, NO_PAD_CTRL)
349#define MX25_PAD_UART2_TXD__GPIO_4_27 IOMUX_PAD(0x37c, 0x184, 0x15, 0, 0, NO_PAD_CTRL)
350
351#define MX25_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x380, 0x188, 0x10, 0, 0, NO_PAD_CTRL)
352#define MX25_PAD_UART2_RTS__FEC_COL IOMUX_PAD(0x380, 0x188, 0x12, 0x504, 2, NO_PAD_CTRL)
353#define MX25_PAD_UART2_RTS__GPIO_4_28 IOMUX_PAD(0x380, 0x188, 0x15, 0, 0, NO_PAD_CTRL)
354
355#define MX25_PAD_UART2_CTS__FEC_RX_ER IOMUX_PAD(0x384, 0x18c, 0x12, 0x518, 2, NO_PAD_CTRL)
356#define MX25_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x384, 0x18c, 0x10, 0, 0, NO_PAD_CTRL)
357#define MX25_PAD_UART2_CTS__GPIO_4_29 IOMUX_PAD(0x384, 0x18c, 0x15, 0, 0, NO_PAD_CTRL)
358
359#define MX25_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x388, 0x190, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
360#define MX25_PAD_SD1_CMD__FEC_RDATA2 IOMUX_PAD(0x388, 0x190, 0x12, 0x50c, 2, NO_PAD_CTRL)
361#define MX25_PAD_SD1_CMD__GPIO_2_23 IOMUX_PAD(0x388, 0x190, 0x15, 0, 0, NO_PAD_CTRL)
362
363#define MX25_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x38c, 0x194, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
364#define MX25_PAD_SD1_CLK__FEC_RDATA3 IOMUX_PAD(0x38c, 0x194, 0x12, 0x510, 2, NO_PAD_CTRL)
365#define MX25_PAD_SD1_CLK__GPIO_2_24 IOMUX_PAD(0x38c, 0x194, 0x15, 0, 0, NO_PAD_CTRL)
366
367#define MX25_PAD_SD1_DATA0__SD1_DATA0 IOMUX_PAD(0x390, 0x198, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
368#define MX25_PAD_SD1_DATA0__GPIO_2_25 IOMUX_PAD(0x390, 0x198, 0x15, 0, 0, NO_PAD_CTRL)
369
370#define MX25_PAD_SD1_DATA1__SD1_DATA1 IOMUX_PAD(0x394, 0x19c, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
371#define MX25_PAD_SD1_DATA1__AUD7_RXD IOMUX_PAD(0x394, 0x19c, 0x13, 0x478, 0, NO_PAD_CTRL)
372#define MX25_PAD_SD1_DATA1__GPIO_2_26 IOMUX_PAD(0x394, 0x19c, 0x15, 0, 0, NO_PAD_CTRL)
373
374#define MX25_PAD_SD1_DATA2__SD1_DATA2 IOMUX_PAD(0x398, 0x1a0, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
375#define MX25_PAD_SD1_DATA2__FEC_RX_CLK IOMUX_PAD(0x398, 0x1a0, 0x15, 0x514, 2, NO_PAD_CTRL)
376#define MX25_PAD_SD1_DATA2__GPIO_2_27 IOMUX_PAD(0x398, 0x1a0, 0x15, 0, 0, NO_PAD_CTRL)
377
378#define MX25_PAD_SD1_DATA3__SD1_DATA3 IOMUX_PAD(0x39c, 0x1a4, 0x10, 0, 0, PAD_CTL_PUS_47K_UP)
379#define MX25_PAD_SD1_DATA3__FEC_CRS IOMUX_PAD(0x39c, 0x1a4, 0x10, 0x508, 2, NO_PAD_CTRL)
380#define MX25_PAD_SD1_DATA3__GPIO_2_28 IOMUX_PAD(0x39c, 0x1a4, 0x15, 0, 0, NO_PAD_CTRL)
381
382#define KPP_CTL_ROW (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
383#define KPP_CTL_COL (PAD_CTL_PKE | PAD_CTL_PUE | PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
384
385#define MX25_PAD_KPP_ROW0__KPP_ROW0 IOMUX_PAD(0x3a0, 0x1a8, 0x10, 0, 0, KPP_CTL_ROW)
386#define MX25_PAD_KPP_ROW0__GPIO_2_29 IOMUX_PAD(0x3a0, 0x1a8, 0x15, 0, 0, NO_PAD_CTRL)
387
388#define MX25_PAD_KPP_ROW1__KPP_ROW1 IOMUX_PAD(0x3a4, 0x1ac, 0x10, 0, 0, KPP_CTL_ROW)
389#define MX25_PAD_KPP_ROW1__GPIO_2_30 IOMUX_PAD(0x3a4, 0x1ac, 0x15, 0, 0, NO_PAD_CTRL)
390
391#define MX25_PAD_KPP_ROW2__KPP_ROW2 IOMUX_PAD(0x3a8, 0x1b0, 0x10, 0, 0, KPP_CTL_ROW)
392#define MX25_PAD_KPP_ROW2__CSI_D0 IOMUX_PAD(0x3a8, 0x1b0, 0x13, 0x488, 2, NO_PAD_CTRL)
393#define MX25_PAD_KPP_ROW2__GPIO_2_31 IOMUX_PAD(0x3a8, 0x1b0, 0x15, 0, 0, NO_PAD_CTRL)
394
395#define MX25_PAD_KPP_ROW3__KPP_ROW3 IOMUX_PAD(0x3ac, 0x1b4, 0x10, 0, 0, KPP_CTL_ROW)
396#define MX25_PAD_KPP_ROW3__CSI_LD1 IOMUX_PAD(0x3ac, 0x1b4, 0x13, 0x48c, 2, NO_PAD_CTRL)
397#define MX25_PAD_KPP_ROW3__GPIO_3_0 IOMUX_PAD(0x3ac, 0x1b4, 0x15, 0, 0, NO_PAD_CTRL)
398
399#define MX25_PAD_KPP_COL0__KPP_COL0 IOMUX_PAD(0x3b0, 0x1b8, 0x10, 0, 0, KPP_CTL_COL)
400#define MX25_PAD_KPP_COL0__UART4_RXD_MUX IOMUX_PAD(0x3b0, 0x1b8, 0x11, 0x570, 1, NO_PAD_CTRL)
401#define MX25_PAD_KPP_COL0__AUD5_TXD IOMUX_PAD(0x3b0, 0x1b8, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP)
402#define MX25_PAD_KPP_COL0__GPIO_3_1 IOMUX_PAD(0x3b0, 0x1b8, 0x15, 0, 0, NO_PAD_CTRL)
403
404#define MX25_PAD_KPP_COL1__KPP_COL1 IOMUX_PAD(0x3b4, 0x1bc, 0x10, 0, 0, KPP_CTL_COL)
405#define MX25_PAD_KPP_COL1__UART4_TXD_MUX IOMUX_PAD(0x3b4, 0x1bc, 0x11, 0, 0, NO_PAD_CTRL)
406#define MX25_PAD_KPP_COL1__AUD5_RXD IOMUX_PAD(0x3b4, 0x1bc, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP)
407#define MX25_PAD_KPP_COL1__GPIO_3_2 IOMUX_PAD(0x3b4, 0x1bc, 0x15, 0, 0, NO_PAD_CTRL)
408
409#define MX25_PAD_KPP_COL2__KPP_COL2 IOMUX_PAD(0x3b8, 0x1c0, 0x10, 0, 0, KPP_CTL_COL)
410#define MX25_PAD_KPP_COL2__UART4_RTS IOMUX_PAD(0x3b8, 0x1c0, 0x11, 0, 0, NO_PAD_CTRL)
411#define MX25_PAD_KPP_COL2__AUD5_TXC IOMUX_PAD(0x3b8, 0x1c0, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP)
412#define MX25_PAD_KPP_COL2__GPIO_3_3 IOMUX_PAD(0x3b8, 0x1c0, 0x15, 0, 0, NO_PAD_CTRL)
413
414#define MX25_PAD_KPP_COL3__KPP_COL3 IOMUX_PAD(0x3bc, 0x1c4, 0x10, 0, 0, KPP_CTL_COL)
415#define MX25_PAD_KPP_COL3__UART4_CTS IOMUX_PAD(0x3bc, 0x1c4, 0x11, 0, 0, NO_PAD_CTRL)
416#define MX25_PAD_KPP_COL3__AUD5_TXFS IOMUX_PAD(0x3bc, 0x1c4, 0x12, 0, 0, PAD_CTL_PKE | PAD_CTL_PUS_100K_UP)
417#define MX25_PAD_KPP_COL3__GPIO_3_4 IOMUX_PAD(0x3bc, 0x1c4, 0x15, 0, 0, NO_PAD_CTRL)
418
419#define MX25_PAD_FEC_MDC__FEC_MDC IOMUX_PAD(0x3c0, 0x1c8, 0x10, 0, 0, NO_PAD_CTRL)
420#define MX25_PAD_FEC_MDC__AUD4_TXD IOMUX_PAD(0x3c0, 0x1c8, 0x12, 0x464, 1, NO_PAD_CTRL)
421#define MX25_PAD_FEC_MDC__GPIO_3_5 IOMUX_PAD(0x3c0, 0x1c8, 0x15, 0, 0, NO_PAD_CTRL)
422
423#define MX25_PAD_FEC_MDIO__FEC_MDIO IOMUX_PAD(0x3c4, 0x1cc, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_22K_UP)
424#define MX25_PAD_FEC_MDIO__AUD4_RXD IOMUX_PAD(0x3c4, 0x1cc, 0x12, 0x460, 1, NO_PAD_CTRL)
425#define MX25_PAD_FEC_MDIO__GPIO_3_6 IOMUX_PAD(0x3c4, 0x1cc, 0x15, 0, 0, NO_PAD_CTRL)
426
427#define MX25_PAD_FEC_TDATA0__FEC_TDATA0 IOMUX_PAD(0x3c8, 0x1d0, 0x10, 0, 0, NO_PAD_CTRL)
428#define MX25_PAD_FEC_TDATA0__GPIO_3_7 IOMUX_PAD(0x3c8, 0x1d0, 0x15, 0, 0, NO_PAD_CTRL)
429
430#define MX25_PAD_FEC_TDATA1__FEC_TDATA1 IOMUX_PAD(0x3cc, 0x1d4, 0x10, 0, 0, NO_PAD_CTRL)
431#define MX25_PAD_FEC_TDATA1__AUD4_TXFS IOMUX_PAD(0x3cc, 0x1d4, 0x12, 0x474, 1, NO_PAD_CTRL)
432#define MX25_PAD_FEC_TDATA1__GPIO_3_8 IOMUX_PAD(0x3cc, 0x1d4, 0x15, 0, 0, NO_PAD_CTRL)
433
434#define MX25_PAD_FEC_TX_EN__FEC_TX_EN IOMUX_PAD(0x3d0, 0x1d8, 0x10, 0, 0, NO_PAD_CTRL)
435#define MX25_PAD_FEC_TX_EN__GPIO_3_9 IOMUX_PAD(0x3d0, 0x1d8, 0x15, 0, 0, NO_PAD_CTRL)
436
437#define MX25_PAD_FEC_RDATA0__FEC_RDATA0 IOMUX_PAD(0x3d4, 0x1dc, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL)
438#define MX25_PAD_FEC_RDATA0__GPIO_3_10 IOMUX_PAD(0x3d4, 0x1dc, 0x15, 0, 0, NO_PAD_CTRL)
439
440#define MX25_PAD_FEC_RDATA1__FEC_RDATA1 IOMUX_PAD(0x3d8, 0x1e0, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL)
441#define MX25_PAD_FEC_RDATA1__GPIO_3_11 IOMUX_PAD(0x3d8, 0x1e0, 0x15, 0, 0, NO_PAD_CTRL)
442
443#define MX25_PAD_FEC_RX_DV__FEC_RX_DV IOMUX_PAD(0x3dc, 0x1e4, 0x10, 0, 0, PAD_CTL_PUS_100K_DOWN | NO_PAD_CTRL)
444#define MX25_PAD_FEC_RX_DV__CAN2_RX IOMUX_PAD(0x3dc, 0x1e4, 0x14, 0x484, 0, PAD_CTL_PUS_22K_UP)
445#define MX25_PAD_FEC_RX_DV__GPIO_3_12 IOMUX_PAD(0x3dc, 0x1e4, 0x15, 0, 0, NO_PAD_CTRL)
446
447#define MX25_PAD_FEC_TX_CLK__FEC_TX_CLK IOMUX_PAD(0x3e0, 0x1e8, 0x10, 0, 0, PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN)
448#define MX25_PAD_FEC_TX_CLK__GPIO_3_13 IOMUX_PAD(0x3e0, 0x1e8, 0x15, 0, 0, NO_PAD_CTRL)
449
450#define MX25_PAD_RTCK__RTCK IOMUX_PAD(0x3e4, 0x1ec, 0x10, 0, 0, NO_PAD_CTRL)
451#define MX25_PAD_RTCK__OWIRE IOMUX_PAD(0x3e4, 0x1ec, 0x11, 0, 0, NO_PAD_CTRL)
452#define MX25_PAD_RTCK__GPIO_3_14 IOMUX_PAD(0x3e4, 0x1ec, 0x15, 0, 0, NO_PAD_CTRL)
453
454#define MX25_PAD_DE_B__DE_B IOMUX_PAD(0x3ec, 0x1f0, 0x10, 0, 0, NO_PAD_CTRL)
455#define MX25_PAD_DE_B__GPIO_2_20 IOMUX_PAD(0x3ec, 0x1f0, 0x15, 0, 0, NO_PAD_CTRL)
456
457#define MX25_PAD_TDO__TDO IOMUX_PAD(0x3e8, 0x000, 0x00, 0, 0, NO_PAD_CTRL)
458
459#define MX25_PAD_GPIO_A__GPIO_A IOMUX_PAD(0x3f0, 0x1f4, 0x10, 0, 0, NO_PAD_CTRL)
460#define MX25_PAD_GPIO_A__CAN1_TX IOMUX_PAD(0x3f0, 0x1f4, 0x16, 0, 0, PAD_CTL_PUS_22K_UP)
461#define MX25_PAD_GPIO_A__USBOTG_PWR IOMUX_PAD(0x3f0, 0x1f4, 0x12, 0, 0, PAD_CTL_PKE)
462
463#define MX25_PAD_GPIO_B__GPIO_B IOMUX_PAD(0x3f4, 0x1f8, 0x10, 0, 0, NO_PAD_CTRL)
464#define MX25_PAD_GPIO_B__CAN1_RX IOMUX_PAD(0x3f4, 0x1f8, 0x16, 0x480, 1, PAD_CTL_PUS_22K_UP)
465#define MX25_PAD_GPIO_B__USBOTG_OC IOMUX_PAD(0x3f4, 0x1f8, 0x12, 0x57c, 1, PAD_CTL_PUS_100K_UP)
466
467#define MX25_PAD_GPIO_C__GPIO_C IOMUX_PAD(0x3f8, 0x1fc, 0x10, 0, 0, NO_PAD_CTRL)
468#define MX25_PAD_GPIO_C__CAN2_TX IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP)
469
470#define MX25_PAD_GPIO_D__GPIO_D IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL)
471#define MX25_PAD_GPIO_E__LD16 IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, PAD_CTL_SRE_FAST)
472#define MX25_PAD_GPIO_D__CAN2_RX IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP)
473
474#define MX25_PAD_GPIO_E__GPIO_E IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL)
475#define MX25_PAD_GPIO_F__LD17 IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, PAD_CTL_SRE_FAST)
476#define MX25_PAD_GPIO_E__AUD7_TXD IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL)
477
478#define MX25_PAD_GPIO_F__GPIO_F IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL)
479#define MX25_PAD_GPIO_F__AUD7_TXC IOMUX_PAD(0x404, 0x208, 0x14, 0, 0, NO_PAD_CTRL)
480
481#define MX25_PAD_EXT_ARMCLK__EXT_ARMCLK IOMUX_PAD(0x000, 0x20c, 0x10, 0, 0, NO_PAD_CTRL)
482#define MX25_PAD_EXT_ARMCLK__GPIO_3_15 IOMUX_PAD(0x000, 0x20c, 0x15, 0, 0, NO_PAD_CTRL)
483
484#define MX25_PAD_UPLL_BYPCLK__UPLL_BYPCLK IOMUX_PAD(0x000, 0x210, 0x10, 0, 0, NO_PAD_CTRL)
485#define MX25_PAD_UPLL_BYPCLK__GPIO_3_16 IOMUX_PAD(0x000, 0x210, 0x15, 0, 0, NO_PAD_CTRL)
486
487#define MX25_PAD_VSTBY_REQ__VSTBY_REQ IOMUX_PAD(0x408, 0x214, 0x10, 0, 0, NO_PAD_CTRL)
488#define MX25_PAD_VSTBY_REQ__AUD7_TXFS IOMUX_PAD(0x408, 0x214, 0x14, 0, 0, NO_PAD_CTRL)
489#define MX25_PAD_VSTBY_REQ__GPIO_3_17 IOMUX_PAD(0x408, 0x214, 0x15, 0, 0, NO_PAD_CTRL)
490#define MX25_PAD_VSTBY_ACK__VSTBY_ACK IOMUX_PAD(0x40c, 0x218, 0x10, 0, 0, NO_PAD_CTRL)
491#define MX25_PAD_VSTBY_ACK__GPIO_3_18 IOMUX_PAD(0x40c, 0x218, 0x15, 0, 0, NO_PAD_CTRL)
492
493#define MX25_PAD_POWER_FAIL__POWER_FAIL IOMUX_PAD(0x410, 0x21c, 0x10, 0, 0, NO_PAD_CTRL)
494#define MX25_PAD_POWER_FAIL__AUD7_RXD IOMUX_PAD(0x410, 0x21c, 0x14, 0x478, 1, NO_PAD_CTRL)
495#define MX25_PAD_POWER_FAIL__GPIO_3_19 IOMUX_PAD(0x410, 0x21c, 0x15, 0, 0, NO_PAD_CTRL)
496
497#define MX25_PAD_CLKO__CLKO IOMUX_PAD(0x414, 0x220, 0x10, 0, 0, NO_PAD_CTRL)
498#define MX25_PAD_CLKO__GPIO_2_21 IOMUX_PAD(0x414, 0x220, 0x15, 0, 0, NO_PAD_CTRL)
499
500#define MX25_PAD_BOOT_MODE0__BOOT_MODE0 IOMUX_PAD(0x000, 0x224, 0x00, 0, 0, NO_PAD_CTRL)
501#define MX25_PAD_BOOT_MODE0__GPIO_4_30 IOMUX_PAD(0x000, 0x224, 0x05, 0, 0, NO_PAD_CTRL)
502#define MX25_PAD_BOOT_MODE1__BOOT_MODE1 IOMUX_PAD(0x000, 0x228, 0x00, 0, 0, NO_PAD_CTRL)
503#define MX25_PAD_BOOT_MODE1__GPIO_4_31 IOMUX_PAD(0x000, 0x228, 0x05, 0, 0, NO_PAD_CTRL)
504
505#define MX25_PAD_CTL_GRP_DVS_MISC IOMUX_PAD(0x418, 0x000, 0, 0, 0, NO_PAD_CTRL)
506#define MX25_PAD_CTL_GRP_DSE_FEC IOMUX_PAD(0x41c, 0x000, 0, 0, 0, NO_PAD_CTRL)
507#define MX25_PAD_CTL_GRP_DVS_JTAG IOMUX_PAD(0x420, 0x000, 0, 0, 0, NO_PAD_CTRL)
508#define MX25_PAD_CTL_GRP_DSE_NFC IOMUX_PAD(0x424, 0x000, 0, 0, 0, NO_PAD_CTRL)
509#define MX25_PAD_CTL_GRP_DSE_CSI IOMUX_PAD(0x428, 0x000, 0, 0, 0, NO_PAD_CTRL)
510#define MX25_PAD_CTL_GRP_DSE_WEIM IOMUX_PAD(0x42c, 0x000, 0, 0, 0, NO_PAD_CTRL)
511#define MX25_PAD_CTL_GRP_DSE_DDR IOMUX_PAD(0x430, 0x000, 0, 0, 0, NO_PAD_CTRL)
512#define MX25_PAD_CTL_GRP_DVS_CRM IOMUX_PAD(0x434, 0x000, 0, 0, 0, NO_PAD_CTRL)
513#define MX25_PAD_CTL_GRP_DSE_KPP IOMUX_PAD(0x438, 0x000, 0, 0, 0, NO_PAD_CTRL)
514#define MX25_PAD_CTL_GRP_DSE_SDHC1 IOMUX_PAD(0x43c, 0x000, 0, 0, 0, NO_PAD_CTRL)
515#define MX25_PAD_CTL_GRP_DSE_LCD IOMUX_PAD(0x440, 0x000, 0, 0, 0, NO_PAD_CTRL)
516#define MX25_PAD_CTL_GRP_DSE_UART IOMUX_PAD(0x444, 0x000, 0, 0, 0, NO_PAD_CTRL)
517#define MX25_PAD_CTL_GRP_DVS_NFC IOMUX_PAD(0x448, 0x000, 0, 0, 0, NO_PAD_CTRL)
518#define MX25_PAD_CTL_GRP_DVS_CSI IOMUX_PAD(0x44c, 0x000, 0, 0, 0, NO_PAD_CTRL)
519#define MX25_PAD_CTL_GRP_DSE_CSPI1 IOMUX_PAD(0x450, 0x000, 0, 0, 0, NO_PAD_CTRL)
520#define MX25_PAD_CTL_GRP_DDRTYPE IOMUX_PAD(0x454, 0x000, 0, 0, 0, NO_PAD_CTRL)
521#define MX25_PAD_CTL_GRP_DVS_SDHC1 IOMUX_PAD(0x458, 0x000, 0, 0, 0, NO_PAD_CTRL)
522#define MX25_PAD_CTL_GRP_DVS_LCD IOMUX_PAD(0x45c, 0x000, 0, 0, 0, NO_PAD_CTRL)
523
524#endif /* __MACH_IOMUX_MX25_H__ */
diff --git a/arch/arm/mach-imx/iomux-mx3.h b/arch/arm/mach-imx/iomux-mx3.h
index 0a5adba61e0b..2e4a0ddca76c 100644
--- a/arch/arm/mach-imx/iomux-mx3.h
+++ b/arch/arm/mach-imx/iomux-mx3.h
@@ -114,7 +114,7 @@ enum iomux_gp_func {
114 */ 114 */
115int mxc_iomux_alloc_pin(unsigned int pin, const char *label); 115int mxc_iomux_alloc_pin(unsigned int pin, const char *label);
116/* 116/*
117 * setups mutliple pins 117 * setups multiple pins
118 * convenient way to call the above function with tables 118 * convenient way to call the above function with tables
119 */ 119 */
120int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count, 120int mxc_iomux_setup_multiple_pins(const unsigned int *pin_list, unsigned count,
diff --git a/arch/arm/mach-imx/iomux-v3.c b/arch/arm/mach-imx/iomux-v3.c
index d61f9606fc56..a53b2e64f98d 100644
--- a/arch/arm/mach-imx/iomux-v3.c
+++ b/arch/arm/mach-imx/iomux-v3.c
@@ -56,9 +56,10 @@ int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
56 return 0; 56 return 0;
57} 57}
58 58
59int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count) 59int mxc_iomux_v3_setup_multiple_pads(const iomux_v3_cfg_t *pad_list,
60 unsigned count)
60{ 61{
61 iomux_v3_cfg_t *p = pad_list; 62 const iomux_v3_cfg_t *p = pad_list;
62 int i; 63 int i;
63 int ret; 64 int ret;
64 65
diff --git a/arch/arm/mach-imx/iomux-v3.h b/arch/arm/mach-imx/iomux-v3.h
index 2fa3b5430102..f79e165a3b3c 100644
--- a/arch/arm/mach-imx/iomux-v3.h
+++ b/arch/arm/mach-imx/iomux-v3.h
@@ -128,10 +128,11 @@ typedef u64 iomux_v3_cfg_t;
128int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad); 128int mxc_iomux_v3_setup_pad(iomux_v3_cfg_t pad);
129 129
130/* 130/*
131 * setups mutliple pads 131 * setups multiple pads
132 * convenient way to call the above function with tables 132 * convenient way to call the above function with tables
133 */ 133 */
134int mxc_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t *pad_list, unsigned count); 134int mxc_iomux_v3_setup_multiple_pads(const iomux_v3_cfg_t *pad_list,
135 unsigned count);
135 136
136/* 137/*
137 * Initialise the iomux controller 138 * Initialise the iomux controller
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 62a6e02f4763..922ffd6ca039 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -75,7 +75,7 @@ static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
75 }, 75 },
76}; 76};
77 77
78static iomux_v3_cfg_t eukrea_cpuimx35_pads[] = { 78static const iomux_v3_cfg_t eukrea_cpuimx35_pads[] __initconst = {
79 /* UART1 */ 79 /* UART1 */
80 MX35_PAD_CTS1__UART1_CTS, 80 MX35_PAD_CTS1__UART1_CTS,
81 MX35_PAD_RTS1__UART1_RTS, 81 MX35_PAD_RTS1__UART1_RTS,
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
deleted file mode 100644
index b2ee6e009fe4..000000000000
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ /dev/null
@@ -1,172 +0,0 @@
1/*
2 * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
3 * Copyright 2010 Eric Bénard - Eukréa Electromatique, <eric@eukrea.com>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#include <linux/types.h>
21#include <linux/init.h>
22#include <linux/delay.h>
23#include <linux/clk.h>
24#include <linux/irq.h>
25#include <linux/gpio.h>
26#include <linux/platform_device.h>
27#include <linux/usb/otg.h>
28#include <linux/usb/ulpi.h>
29
30#include <asm/mach-types.h>
31#include <asm/mach/arch.h>
32#include <asm/mach/time.h>
33#include <asm/memory.h>
34#include <asm/mach/map.h>
35
36#include "common.h"
37#include "devices-imx25.h"
38#include "ehci.h"
39#include "eukrea-baseboards.h"
40#include "hardware.h"
41#include "iomux-mx25.h"
42#include "mx25.h"
43
44static const struct imxuart_platform_data uart_pdata __initconst = {
45 .flags = IMXUART_HAVE_RTSCTS,
46};
47
48static iomux_v3_cfg_t eukrea_cpuimx25_pads[] = {
49 /* FEC - RMII */
50 MX25_PAD_FEC_MDC__FEC_MDC,
51 MX25_PAD_FEC_MDIO__FEC_MDIO,
52 MX25_PAD_FEC_TDATA0__FEC_TDATA0,
53 MX25_PAD_FEC_TDATA1__FEC_TDATA1,
54 MX25_PAD_FEC_TX_EN__FEC_TX_EN,
55 MX25_PAD_FEC_RDATA0__FEC_RDATA0,
56 MX25_PAD_FEC_RDATA1__FEC_RDATA1,
57 MX25_PAD_FEC_RX_DV__FEC_RX_DV,
58 MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
59 /* I2C1 */
60 MX25_PAD_I2C1_CLK__I2C1_CLK,
61 MX25_PAD_I2C1_DAT__I2C1_DAT,
62};
63
64static const struct fec_platform_data mx25_fec_pdata __initconst = {
65 .phy = PHY_INTERFACE_MODE_RMII,
66};
67
68static const struct mxc_nand_platform_data
69eukrea_cpuimx25_nand_board_info __initconst = {
70 .width = 1,
71 .hw_ecc = 1,
72 .flash_bbt = 1,
73};
74
75static const struct imxi2c_platform_data
76eukrea_cpuimx25_i2c0_data __initconst = {
77 .bitrate = 100000,
78};
79
80static struct i2c_board_info eukrea_cpuimx25_i2c_devices[] = {
81 {
82 I2C_BOARD_INFO("pcf8563", 0x51),
83 },
84};
85
86static int eukrea_cpuimx25_otg_init(struct platform_device *pdev)
87{
88 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
89}
90
91static const struct mxc_usbh_platform_data otg_pdata __initconst = {
92 .init = eukrea_cpuimx25_otg_init,
93 .portsc = MXC_EHCI_MODE_UTMI,
94};
95
96static int eukrea_cpuimx25_usbh2_init(struct platform_device *pdev)
97{
98 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
99 MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
100}
101
102static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
103 .init = eukrea_cpuimx25_usbh2_init,
104 .portsc = MXC_EHCI_MODE_SERIAL,
105};
106
107static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
108 .operating_mode = FSL_USB2_DR_DEVICE,
109 .phy_mode = FSL_USB2_PHY_UTMI,
110 .workaround = FLS_USB2_WORKAROUND_ENGCM09152,
111};
112
113static bool otg_mode_host __initdata;
114
115static int __init eukrea_cpuimx25_otg_mode(char *options)
116{
117 if (!strcmp(options, "host"))
118 otg_mode_host = true;
119 else if (!strcmp(options, "device"))
120 otg_mode_host = false;
121 else
122 pr_info("otg_mode neither \"host\" nor \"device\". "
123 "Defaulting to device\n");
124 return 1;
125}
126__setup("otg_mode=", eukrea_cpuimx25_otg_mode);
127
128static void __init eukrea_cpuimx25_init(void)
129{
130 imx25_soc_init();
131
132 if (mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads,
133 ARRAY_SIZE(eukrea_cpuimx25_pads)))
134 printk(KERN_ERR "error setting cpuimx25 pads !\n");
135
136 imx25_add_imx_uart0(&uart_pdata);
137 imx25_add_mxc_nand(&eukrea_cpuimx25_nand_board_info);
138 imx25_add_imxdi_rtc();
139 imx25_add_fec(&mx25_fec_pdata);
140 imx25_add_imx2_wdt();
141
142 i2c_register_board_info(0, eukrea_cpuimx25_i2c_devices,
143 ARRAY_SIZE(eukrea_cpuimx25_i2c_devices));
144 imx25_add_imx_i2c0(&eukrea_cpuimx25_i2c0_data);
145
146 if (otg_mode_host)
147 imx25_add_mxc_ehci_otg(&otg_pdata);
148 else
149 imx25_add_fsl_usb2_udc(&otg_device_pdata);
150
151 imx25_add_mxc_ehci_hs(&usbh2_pdata);
152
153#ifdef CONFIG_MACH_EUKREA_MBIMXSD25_BASEBOARD
154 eukrea_mbimxsd25_baseboard_init();
155#endif
156}
157
158static void __init eukrea_cpuimx25_timer_init(void)
159{
160 mx25_clocks_init();
161}
162
163MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
164 /* Maintainer: Eukrea Electromatique */
165 .atag_offset = 0x100,
166 .map_io = mx25_map_io,
167 .init_early = imx25_init_early,
168 .init_irq = mx25_init_irq,
169 .init_time = eukrea_cpuimx25_timer_init,
170 .init_machine = eukrea_cpuimx25_init,
171 .restart = mxc_restart,
172MACHINE_END
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/mach-imx25.c
index 25defbdb06c4..9379fd0a7b4d 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/mach-imx25.c
@@ -10,12 +10,29 @@
10 */ 10 */
11 11
12#include <linux/irq.h> 12#include <linux/irq.h>
13#include <linux/of_address.h>
13#include <linux/of_irq.h> 14#include <linux/of_irq.h>
14#include <linux/of_platform.h> 15#include <linux/of_platform.h>
15#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
16#include <asm/mach/time.h> 17#include <asm/mach/time.h>
17#include "common.h" 18#include "common.h"
18#include "mx25.h" 19#include "hardware.h"
20
21static void __init imx25_init_early(void)
22{
23 mxc_set_cpu_type(MXC_CPU_MX25);
24}
25
26static void __init mx25_init_irq(void)
27{
28 struct device_node *np;
29 void __iomem *avic_base;
30
31 np = of_find_compatible_node(NULL, NULL, "fsl,avic");
32 avic_base = of_iomap(np, 0);
33 BUG_ON(!avic_base);
34 mxc_init_irq(avic_base);
35}
19 36
20static const char * const imx25_dt_board_compat[] __initconst = { 37static const char * const imx25_dt_board_compat[] __initconst = {
21 "fsl,imx25", 38 "fsl,imx25",
@@ -23,7 +40,6 @@ static const char * const imx25_dt_board_compat[] __initconst = {
23}; 40};
24 41
25DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") 42DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
26 .map_io = mx25_map_io,
27 .init_early = imx25_init_early, 43 .init_early = imx25_init_early,
28 .init_irq = mx25_init_irq, 44 .init_irq = mx25_init_irq,
29 .dt_compat = imx25_dt_board_compat, 45 .dt_compat = imx25_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 9de3412af406..3ab61549ce0f 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -388,10 +388,10 @@ static void __init imx6q_map_io(void)
388 388
389static void __init imx6q_init_irq(void) 389static void __init imx6q_init_irq(void)
390{ 390{
391 imx_gpc_check_dt();
391 imx_init_revision_from_anatop(); 392 imx_init_revision_from_anatop();
392 imx_init_l2cache(); 393 imx_init_l2cache();
393 imx_src_init(); 394 imx_src_init();
394 imx_gpc_init();
395 irqchip_init(); 395 irqchip_init();
396} 396}
397 397
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index 24bfaaf944c8..12a1b098fc6a 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -61,10 +61,10 @@ static void __init imx6sl_init_machine(void)
61 61
62static void __init imx6sl_init_irq(void) 62static void __init imx6sl_init_irq(void)
63{ 63{
64 imx_gpc_check_dt();
64 imx_init_revision_from_anatop(); 65 imx_init_revision_from_anatop();
65 imx_init_l2cache(); 66 imx_init_l2cache();
66 imx_src_init(); 67 imx_src_init();
67 imx_gpc_init();
68 irqchip_init(); 68 irqchip_init();
69} 69}
70 70
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 66988eb6a3a4..f17b7004c24b 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -81,10 +81,10 @@ static void __init imx6sx_init_machine(void)
81 81
82static void __init imx6sx_init_irq(void) 82static void __init imx6sx_init_irq(void)
83{ 83{
84 imx_gpc_check_dt();
84 imx_init_revision_from_anatop(); 85 imx_init_revision_from_anatop();
85 imx_init_l2cache(); 86 imx_init_l2cache();
86 imx_src_init(); 87 imx_src_init();
87 imx_gpc_init();
88 irqchip_init(); 88 irqchip_init();
89} 89}
90 90
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
deleted file mode 100644
index 0d01e367b062..000000000000
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ /dev/null
@@ -1,270 +0,0 @@
1/*
2 * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17 */
18
19/*
20 * This machine is known as:
21 * - i.MX25 3-Stack Development System
22 * - i.MX25 Platform Development Kit (i.MX25 PDK)
23 */
24
25#include <linux/types.h>
26#include <linux/init.h>
27#include <linux/delay.h>
28#include <linux/clk.h>
29#include <linux/irq.h>
30#include <linux/gpio.h>
31#include <linux/platform_device.h>
32#include <linux/usb/otg.h>
33
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/time.h>
37#include <asm/memory.h>
38#include <asm/mach/map.h>
39
40#include "common.h"
41#include "devices-imx25.h"
42#include "ehci.h"
43#include "hardware.h"
44#include "iomux-mx25.h"
45#include "mx25.h"
46
47#define MX25PDK_CAN_PWDN IMX_GPIO_NR(4, 6)
48
49static const struct imxuart_platform_data uart_pdata __initconst = {
50 .flags = IMXUART_HAVE_RTSCTS,
51};
52
53static iomux_v3_cfg_t mx25pdk_pads[] = {
54 MX25_PAD_FEC_MDC__FEC_MDC,
55 MX25_PAD_FEC_MDIO__FEC_MDIO,
56 MX25_PAD_FEC_TDATA0__FEC_TDATA0,
57 MX25_PAD_FEC_TDATA1__FEC_TDATA1,
58 MX25_PAD_FEC_TX_EN__FEC_TX_EN,
59 MX25_PAD_FEC_RDATA0__FEC_RDATA0,
60 MX25_PAD_FEC_RDATA1__FEC_RDATA1,
61 MX25_PAD_FEC_RX_DV__FEC_RX_DV,
62 MX25_PAD_FEC_TX_CLK__FEC_TX_CLK,
63 MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */
64 MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */
65
66 /* LCD */
67 MX25_PAD_LD0__LD0,
68 MX25_PAD_LD1__LD1,
69 MX25_PAD_LD2__LD2,
70 MX25_PAD_LD3__LD3,
71 MX25_PAD_LD4__LD4,
72 MX25_PAD_LD5__LD5,
73 MX25_PAD_LD6__LD6,
74 MX25_PAD_LD7__LD7,
75 MX25_PAD_LD8__LD8,
76 MX25_PAD_LD9__LD9,
77 MX25_PAD_LD10__LD10,
78 MX25_PAD_LD11__LD11,
79 MX25_PAD_LD12__LD12,
80 MX25_PAD_LD13__LD13,
81 MX25_PAD_LD14__LD14,
82 MX25_PAD_LD15__LD15,
83 MX25_PAD_GPIO_E__LD16,
84 MX25_PAD_GPIO_F__LD17,
85 MX25_PAD_HSYNC__HSYNC,
86 MX25_PAD_VSYNC__VSYNC,
87 MX25_PAD_LSCLK__LSCLK,
88 MX25_PAD_OE_ACD__OE_ACD,
89 MX25_PAD_CONTRAST__CONTRAST,
90
91 /* Keypad */
92 MX25_PAD_KPP_ROW0__KPP_ROW0,
93 MX25_PAD_KPP_ROW1__KPP_ROW1,
94 MX25_PAD_KPP_ROW2__KPP_ROW2,
95 MX25_PAD_KPP_ROW3__KPP_ROW3,
96 MX25_PAD_KPP_COL0__KPP_COL0,
97 MX25_PAD_KPP_COL1__KPP_COL1,
98 MX25_PAD_KPP_COL2__KPP_COL2,
99 MX25_PAD_KPP_COL3__KPP_COL3,
100
101 /* SD1 */
102 MX25_PAD_SD1_CMD__SD1_CMD,
103 MX25_PAD_SD1_CLK__SD1_CLK,
104 MX25_PAD_SD1_DATA0__SD1_DATA0,
105 MX25_PAD_SD1_DATA1__SD1_DATA1,
106 MX25_PAD_SD1_DATA2__SD1_DATA2,
107 MX25_PAD_SD1_DATA3__SD1_DATA3,
108 MX25_PAD_A14__GPIO_2_0, /* WriteProtect */
109 MX25_PAD_A15__GPIO_2_1, /* CardDetect */
110
111 /* I2C1 */
112 MX25_PAD_I2C1_CLK__I2C1_CLK,
113 MX25_PAD_I2C1_DAT__I2C1_DAT,
114
115 /* CAN1 */
116 MX25_PAD_GPIO_A__CAN1_TX,
117 MX25_PAD_GPIO_B__CAN1_RX,
118 MX25_PAD_D14__GPIO_4_6, /* CAN_PWDN */
119};
120
121static const struct fec_platform_data mx25_fec_pdata __initconst = {
122 .phy = PHY_INTERFACE_MODE_RMII,
123};
124
125#define FEC_ENABLE_GPIO IMX_GPIO_NR(2, 3)
126#define FEC_RESET_B_GPIO IMX_GPIO_NR(4, 8)
127
128static void __init mx25pdk_fec_reset(void)
129{
130 gpio_request(FEC_ENABLE_GPIO, "FEC PHY enable");
131 gpio_request(FEC_RESET_B_GPIO, "FEC PHY reset");
132
133 gpio_direction_output(FEC_ENABLE_GPIO, 0); /* drop PHY power */
134 gpio_direction_output(FEC_RESET_B_GPIO, 0); /* assert reset */
135 udelay(2);
136
137 /* turn on PHY power and lift reset */
138 gpio_set_value(FEC_ENABLE_GPIO, 1);
139 gpio_set_value(FEC_RESET_B_GPIO, 1);
140}
141
142static const struct mxc_nand_platform_data
143mx25pdk_nand_board_info __initconst = {
144 .width = 1,
145 .hw_ecc = 1,
146 .flash_bbt = 1,
147};
148
149static struct imx_fb_videomode mx25pdk_modes[] = {
150 {
151 .mode = {
152 .name = "CRT-VGA",
153 .refresh = 60,
154 .xres = 640,
155 .yres = 480,
156 .pixclock = 39683,
157 .left_margin = 45,
158 .right_margin = 114,
159 .upper_margin = 33,
160 .lower_margin = 11,
161 .hsync_len = 1,
162 .vsync_len = 1,
163 },
164 .bpp = 16,
165 .pcr = 0xFA208B80,
166 },
167};
168
169static const struct imx_fb_platform_data mx25pdk_fb_pdata __initconst = {
170 .mode = mx25pdk_modes,
171 .num_modes = ARRAY_SIZE(mx25pdk_modes),
172 .pwmr = 0x00A903FF,
173 .lscr1 = 0x00120300,
174 .dmacr = 0x00020010,
175};
176
177static const uint32_t mx25pdk_keymap[] = {
178 KEY(0, 0, KEY_UP),
179 KEY(0, 1, KEY_DOWN),
180 KEY(0, 2, KEY_VOLUMEDOWN),
181 KEY(0, 3, KEY_HOME),
182 KEY(1, 0, KEY_RIGHT),
183 KEY(1, 1, KEY_LEFT),
184 KEY(1, 2, KEY_ENTER),
185 KEY(1, 3, KEY_VOLUMEUP),
186 KEY(2, 0, KEY_F6),
187 KEY(2, 1, KEY_F8),
188 KEY(2, 2, KEY_F9),
189 KEY(2, 3, KEY_F10),
190 KEY(3, 0, KEY_F1),
191 KEY(3, 1, KEY_F2),
192 KEY(3, 2, KEY_F3),
193 KEY(3, 3, KEY_POWER),
194};
195
196static const struct matrix_keymap_data mx25pdk_keymap_data __initconst = {
197 .keymap = mx25pdk_keymap,
198 .keymap_size = ARRAY_SIZE(mx25pdk_keymap),
199};
200
201static int mx25pdk_usbh2_init(struct platform_device *pdev)
202{
203 return mx25_initialize_usb_hw(pdev->id, MXC_EHCI_INTERNAL_PHY);
204}
205
206static const struct mxc_usbh_platform_data usbh2_pdata __initconst = {
207 .init = mx25pdk_usbh2_init,
208 .portsc = MXC_EHCI_MODE_SERIAL,
209};
210
211static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
212 .operating_mode = FSL_USB2_DR_DEVICE,
213 .phy_mode = FSL_USB2_PHY_UTMI,
214};
215
216static const struct imxi2c_platform_data mx25_3ds_i2c0_data __initconst = {
217 .bitrate = 100000,
218};
219
220#define SD1_GPIO_WP IMX_GPIO_NR(2, 0)
221#define SD1_GPIO_CD IMX_GPIO_NR(2, 1)
222
223static const struct esdhc_platform_data mx25pdk_esdhc_pdata __initconst = {
224 .wp_gpio = SD1_GPIO_WP,
225 .cd_gpio = SD1_GPIO_CD,
226 .wp_type = ESDHC_WP_GPIO,
227 .cd_type = ESDHC_CD_GPIO,
228};
229
230static void __init mx25pdk_init(void)
231{
232 imx25_soc_init();
233
234 mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
235 ARRAY_SIZE(mx25pdk_pads));
236
237 imx25_add_imx_uart0(&uart_pdata);
238 imx25_add_fsl_usb2_udc(&otg_device_pdata);
239 imx25_add_mxc_ehci_hs(&usbh2_pdata);
240 imx25_add_mxc_nand(&mx25pdk_nand_board_info);
241 imx25_add_imxdi_rtc();
242 imx25_add_imx_fb(&mx25pdk_fb_pdata);
243 imx25_add_imx2_wdt();
244
245 mx25pdk_fec_reset();
246 imx25_add_fec(&mx25_fec_pdata);
247 imx25_add_imx_keypad(&mx25pdk_keymap_data);
248
249 imx25_add_sdhci_esdhc_imx(0, &mx25pdk_esdhc_pdata);
250 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
251
252 gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
253 imx25_add_flexcan0();
254}
255
256static void __init mx25pdk_timer_init(void)
257{
258 mx25_clocks_init();
259}
260
261MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
262 /* Maintainer: Freescale Semiconductor, Inc. */
263 .atag_offset = 0x100,
264 .map_io = mx25_map_io,
265 .init_early = imx25_init_early,
266 .init_irq = mx25_init_irq,
267 .init_time = mx25pdk_timer_init,
268 .init_machine = mx25pdk_init,
269 .restart = mxc_restart,
270MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 72cd77d21f63..7e315f00648d 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -166,7 +166,7 @@ static struct platform_device *devices[] __initdata = {
166 &mx35pdk_flash, 166 &mx35pdk_flash,
167}; 167};
168 168
169static iomux_v3_cfg_t mx35pdk_pads[] = { 169static const iomux_v3_cfg_t mx35pdk_pads[] __initconst = {
170 /* UART1 */ 170 /* UART1 */
171 MX35_PAD_CTS1__UART1_CTS, 171 MX35_PAD_CTS1__UART1_CTS,
172 MX35_PAD_RTS1__UART1_RTS, 172 MX35_PAD_RTS1__UART1_RTS,
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index b623bcaca76c..e447e59c0604 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -129,7 +129,7 @@ static struct platform_device *devices[] __initdata = {
129 &pcm043_flash, 129 &pcm043_flash,
130}; 130};
131 131
132static iomux_v3_cfg_t pcm043_pads[] = { 132static const iomux_v3_cfg_t pcm043_pads[] __initconst = {
133 /* UART1 */ 133 /* UART1 */
134 MX35_PAD_CTS1__UART1_CTS, 134 MX35_PAD_CTS1__UART1_CTS,
135 MX35_PAD_RTS1__UART1_RTS, 135 MX35_PAD_RTS1__UART1_RTS,
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 97836e94451c..27a8f7e3ec08 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -161,7 +161,7 @@ static struct i2c_board_info vpr200_i2c_devices[] = {
161 } 161 }
162}; 162};
163 163
164static iomux_v3_cfg_t vpr200_pads[] = { 164static const iomux_v3_cfg_t vpr200_pads[] __initconst = {
165 /* UART1 */ 165 /* UART1 */
166 MX35_PAD_TXD1__UART1_TXD_MUX, 166 MX35_PAD_TXD1__UART1_TXD_MUX,
167 MX35_PAD_RXD1__UART1_RXD_MUX, 167 MX35_PAD_RXD1__UART1_RXD_MUX,
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c
deleted file mode 100644
index 5211f62c624e..000000000000
--- a/arch/arm/mach-imx/mm-imx25.c
+++ /dev/null
@@ -1,89 +0,0 @@
1/*
2 * Copyright (C) 1999,2000 Arm Limited
3 * Copyright (C) 2000 Deep Blue Solutions Ltd
4 * Copyright (C) 2002 Shane Nay (shane@minirl.com)
5 * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
6 * - add MX31 specific definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#include <linux/mm.h>
20#include <linux/init.h>
21#include <linux/err.h>
22#include <linux/pinctrl/machine.h>
23
24#include <asm/pgtable.h>
25#include <asm/mach/map.h>
26
27#include "common.h"
28#include "devices/devices-common.h"
29#include "hardware.h"
30#include "iomux-v3.h"
31#include "mx25.h"
32
33/*
34 * This table defines static virtual address mappings for I/O regions.
35 * These are the mappings common across all MX25 boards.
36 */
37static struct map_desc mx25_io_desc[] __initdata = {
38 imx_map_entry(MX25, AVIC, MT_DEVICE_NONSHARED),
39 imx_map_entry(MX25, AIPS1, MT_DEVICE_NONSHARED),
40 imx_map_entry(MX25, AIPS2, MT_DEVICE_NONSHARED),
41};
42
43/*
44 * This function initializes the memory map. It is called during the
45 * system startup to create static physical to virtual memory mappings
46 * for the IO modules.
47 */
48void __init mx25_map_io(void)
49{
50 iotable_init(mx25_io_desc, ARRAY_SIZE(mx25_io_desc));
51}
52
53void __init imx25_init_early(void)
54{
55 mxc_set_cpu_type(MXC_CPU_MX25);
56 mxc_iomux_v3_init(MX25_IO_ADDRESS(MX25_IOMUXC_BASE_ADDR));
57}
58
59void __init mx25_init_irq(void)
60{
61 mxc_init_irq(MX25_IO_ADDRESS(MX25_AVIC_BASE_ADDR));
62}
63
64static struct sdma_platform_data imx25_sdma_pdata __initdata = {
65 .fw_name = "sdma-imx25.bin",
66};
67
68static const struct resource imx25_audmux_res[] __initconst = {
69 DEFINE_RES_MEM(MX25_AUDMUX_BASE_ADDR, SZ_16K),
70};
71
72void __init imx25_soc_init(void)
73{
74 mxc_arch_reset_init(MX25_IO_ADDRESS(MX25_WDOG_BASE_ADDR));
75 mxc_device_init();
76
77 /* i.mx25 has the i.mx35 type gpio */
78 mxc_register_gpio("imx35-gpio", 0, MX25_GPIO1_BASE_ADDR, SZ_16K, MX25_INT_GPIO1, 0);
79 mxc_register_gpio("imx35-gpio", 1, MX25_GPIO2_BASE_ADDR, SZ_16K, MX25_INT_GPIO2, 0);
80 mxc_register_gpio("imx35-gpio", 2, MX25_GPIO3_BASE_ADDR, SZ_16K, MX25_INT_GPIO3, 0);
81 mxc_register_gpio("imx35-gpio", 3, MX25_GPIO4_BASE_ADDR, SZ_16K, MX25_INT_GPIO4, 0);
82
83 pinctrl_provide_dummies();
84 /* i.mx25 has the i.mx35 type sdma */
85 imx_add_imx_sdma("imx35-sdma", MX25_SDMA_BASE_ADDR, MX25_INT_SDMA, &imx25_sdma_pdata);
86 /* i.mx25 has the i.mx31 type audmux */
87 platform_device_register_simple("imx31-audmux", 0, imx25_audmux_res,
88 ARRAY_SIZE(imx25_audmux_res));
89}
diff --git a/arch/arm/mach-imx/mx25.h b/arch/arm/mach-imx/mx25.h
deleted file mode 100644
index ec466400a200..000000000000
--- a/arch/arm/mach-imx/mx25.h
+++ /dev/null
@@ -1,117 +0,0 @@
1#ifndef __MACH_MX25_H__
2#define __MACH_MX25_H__
3
4#define MX25_AIPS1_BASE_ADDR 0x43f00000
5#define MX25_AIPS1_SIZE SZ_1M
6#define MX25_AIPS2_BASE_ADDR 0x53f00000
7#define MX25_AIPS2_SIZE SZ_1M
8#define MX25_AVIC_BASE_ADDR 0x68000000
9#define MX25_AVIC_SIZE SZ_1M
10
11#define MX25_I2C1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x80000)
12#define MX25_I2C3_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x84000)
13#define MX25_CAN1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x88000)
14#define MX25_CAN2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x8c000)
15#define MX25_I2C2_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0x98000)
16#define MX25_CSPI1_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xa4000)
17#define MX25_IOMUXC_BASE_ADDR (MX25_AIPS1_BASE_ADDR + 0xac000)
18
19#define MX25_CRM_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x80000)
20#define MX25_GPT1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x90000)
21#define MX25_GPIO4_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0x9c000)
22#define MX25_PWM2_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa0000)
23#define MX25_GPIO3_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa4000)
24#define MX25_PWM3_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xa8000)
25#define MX25_PWM4_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xc8000)
26#define MX25_GPIO1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xcc000)
27#define MX25_GPIO2_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xd0000)
28#define MX25_WDOG_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xdc000)
29#define MX25_PWM1_BASE_ADDR (MX25_AIPS2_BASE_ADDR + 0xe0000)
30
31#define MX25_UART1_BASE_ADDR 0x43f90000
32#define MX25_UART2_BASE_ADDR 0x43f94000
33#define MX25_AUDMUX_BASE_ADDR 0x43fb0000
34#define MX25_UART3_BASE_ADDR 0x5000c000
35#define MX25_UART4_BASE_ADDR 0x50008000
36#define MX25_UART5_BASE_ADDR 0x5002c000
37
38#define MX25_CSPI3_BASE_ADDR 0x50004000
39#define MX25_CSPI2_BASE_ADDR 0x50010000
40#define MX25_FEC_BASE_ADDR 0x50038000
41#define MX25_SSI2_BASE_ADDR 0x50014000
42#define MX25_SSI1_BASE_ADDR 0x50034000
43#define MX25_NFC_BASE_ADDR 0xbb000000
44#define MX25_IIM_BASE_ADDR 0x53ff0000
45#define MX25_DRYICE_BASE_ADDR 0x53ffc000
46#define MX25_ESDHC1_BASE_ADDR 0x53fb4000
47#define MX25_ESDHC2_BASE_ADDR 0x53fb8000
48#define MX25_LCDC_BASE_ADDR 0x53fbc000
49#define MX25_KPP_BASE_ADDR 0x43fa8000
50#define MX25_SDMA_BASE_ADDR 0x53fd4000
51#define MX25_USB_BASE_ADDR 0x53ff4000
52#define MX25_USB_OTG_BASE_ADDR (MX25_USB_BASE_ADDR + 0x0000)
53/*
54 * The reference manual (IMX25RM, Rev. 1, 06/2009) specifies an offset of 0x200
55 * for the host controller. Early documentation drafts specified 0x400 and
56 * Freescale internal sources confirm only the latter value to work.
57 */
58#define MX25_USB_HS_BASE_ADDR (MX25_USB_BASE_ADDR + 0x0400)
59#define MX25_CSI_BASE_ADDR 0x53ff8000
60
61#define MX25_IO_P2V(x) IMX_IO_P2V(x)
62#define MX25_IO_ADDRESS(x) IOMEM(MX25_IO_P2V(x))
63
64/*
65 * Interrupt numbers
66 */
67#include <asm/irq.h>
68#define MX25_INT_CSPI3 (NR_IRQS_LEGACY + 0)
69#define MX25_INT_I2C1 (NR_IRQS_LEGACY + 3)
70#define MX25_INT_I2C2 (NR_IRQS_LEGACY + 4)
71#define MX25_INT_UART4 (NR_IRQS_LEGACY + 5)
72#define MX25_INT_ESDHC2 (NR_IRQS_LEGACY + 8)
73#define MX25_INT_ESDHC1 (NR_IRQS_LEGACY + 9)
74#define MX25_INT_I2C3 (NR_IRQS_LEGACY + 10)
75#define MX25_INT_SSI2 (NR_IRQS_LEGACY + 11)
76#define MX25_INT_SSI1 (NR_IRQS_LEGACY + 12)
77#define MX25_INT_CSPI2 (NR_IRQS_LEGACY + 13)
78#define MX25_INT_CSPI1 (NR_IRQS_LEGACY + 14)
79#define MX25_INT_GPIO3 (NR_IRQS_LEGACY + 16)
80#define MX25_INT_CSI (NR_IRQS_LEGACY + 17)
81#define MX25_INT_UART3 (NR_IRQS_LEGACY + 18)
82#define MX25_INT_GPIO4 (NR_IRQS_LEGACY + 23)
83#define MX25_INT_KPP (NR_IRQS_LEGACY + 24)
84#define MX25_INT_DRYICE (NR_IRQS_LEGACY + 25)
85#define MX25_INT_PWM1 (NR_IRQS_LEGACY + 26)
86#define MX25_INT_UART2 (NR_IRQS_LEGACY + 32)
87#define MX25_INT_NFC (NR_IRQS_LEGACY + 33)
88#define MX25_INT_SDMA (NR_IRQS_LEGACY + 34)
89#define MX25_INT_USB_HS (NR_IRQS_LEGACY + 35)
90#define MX25_INT_PWM2 (NR_IRQS_LEGACY + 36)
91#define MX25_INT_USB_OTG (NR_IRQS_LEGACY + 37)
92#define MX25_INT_LCDC (NR_IRQS_LEGACY + 39)
93#define MX25_INT_UART5 (NR_IRQS_LEGACY + 40)
94#define MX25_INT_PWM3 (NR_IRQS_LEGACY + 41)
95#define MX25_INT_PWM4 (NR_IRQS_LEGACY + 42)
96#define MX25_INT_CAN1 (NR_IRQS_LEGACY + 43)
97#define MX25_INT_CAN2 (NR_IRQS_LEGACY + 44)
98#define MX25_INT_UART1 (NR_IRQS_LEGACY + 45)
99#define MX25_INT_GPIO2 (NR_IRQS_LEGACY + 51)
100#define MX25_INT_GPIO1 (NR_IRQS_LEGACY + 52)
101#define MX25_INT_GPT1 (NR_IRQS_LEGACY + 54)
102#define MX25_INT_FEC (NR_IRQS_LEGACY + 57)
103
104#define MX25_DMA_REQ_SSI2_RX1 22
105#define MX25_DMA_REQ_SSI2_TX1 23
106#define MX25_DMA_REQ_SSI2_RX0 24
107#define MX25_DMA_REQ_SSI2_TX0 25
108#define MX25_DMA_REQ_SSI1_RX1 26
109#define MX25_DMA_REQ_SSI1_TX1 27
110#define MX25_DMA_REQ_SSI1_RX0 28
111#define MX25_DMA_REQ_SSI1_TX0 29
112
113#ifndef __ASSEMBLY__
114extern int mx25_revision(void);
115#endif
116
117#endif /* ifndef __MACH_MX25_H__ */
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 46fd695203c7..6a7c6fc780cc 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -310,10 +310,12 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
310 * Low-Power mode. 310 * Low-Power mode.
311 * 3) Software should mask IRQ #32 right after CCM Low-Power mode 311 * 3) Software should mask IRQ #32 right after CCM Low-Power mode
312 * is set (set bits 0-1 of CCM_CLPCR). 312 * is set (set bits 0-1 of CCM_CLPCR).
313 *
314 * Note that IRQ #32 is GIC SPI #0.
313 */ 315 */
314 imx_gpc_hwirq_unmask(32); 316 imx_gpc_hwirq_unmask(0);
315 writel_relaxed(val, ccm_base + CLPCR); 317 writel_relaxed(val, ccm_base + CLPCR);
316 imx_gpc_hwirq_mask(32); 318 imx_gpc_hwirq_mask(0);
317 319
318 return 0; 320 return 0;
319} 321}
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index f7e463ca0287..9f59e58da3a4 100644
--- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig
@@ -1,6 +1,7 @@
1menuconfig ARCH_MEDIATEK 1menuconfig ARCH_MEDIATEK
2 bool "Mediatek MT65xx & MT81xx SoC" if ARCH_MULTI_V7 2 bool "Mediatek MT65xx & MT81xx SoC" if ARCH_MULTI_V7
3 select ARM_GIC 3 select ARM_GIC
4 select PINCTRL
4 select MTK_TIMER 5 select MTK_TIMER
5 help 6 help
6 Support for Mediatek MT65xx & MT81xx SoCs 7 Support for Mediatek MT65xx & MT81xx SoCs
diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index 18301dc9d2e7..0743e2059645 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -1,8 +1,11 @@
1menuconfig ARCH_MESON 1menuconfig ARCH_MESON
2 bool "Amlogic Meson SoCs" if ARCH_MULTI_V7 2 bool "Amlogic Meson SoCs" if ARCH_MULTI_V7
3 select ARCH_REQUIRE_GPIOLIB
3 select GENERIC_IRQ_CHIP 4 select GENERIC_IRQ_CHIP
4 select ARM_GIC 5 select ARM_GIC
5 select CACHE_L2X0 6 select CACHE_L2X0
7 select PINCTRL
8 select PINCTRL_MESON
6 9
7if ARCH_MESON 10if ARCH_MESON
8 11
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
deleted file mode 100644
index a6b50e62a495..000000000000
--- a/arch/arm/mach-msm/Kconfig
+++ /dev/null
@@ -1,109 +0,0 @@
1if ARCH_MSM
2
3choice
4 prompt "Qualcomm MSM SoC Type"
5 default ARCH_MSM7X00A
6 depends on ARCH_MSM
7
8config ARCH_MSM7X00A
9 bool "MSM7x00A / MSM7x01A"
10 select ARCH_MSM_ARM11
11 select CPU_V6
12 select GPIO_MSM_V1
13 select MACH_TROUT if !MACH_HALIBUT
14 select MSM_PROC_COMM
15 select MSM_SMD
16 select CLKSRC_QCOM
17 select MSM_SMD_PKG3
18
19config ARCH_MSM7X30
20 bool "MSM7x30"
21 select ARCH_MSM_SCORPION
22 select CPU_V7
23 select GPIO_MSM_V1
24 select MACH_MSM7X30_SURF # if !
25 select MSM_GPIOMUX
26 select MSM_PROC_COMM
27 select MSM_SMD
28 select CLKSRC_QCOM
29 select MSM_VIC
30
31config ARCH_QSD8X50
32 bool "QSD8X50"
33 select ARCH_MSM_SCORPION
34 select CPU_V7
35 select GPIO_MSM_V1
36 select MACH_QSD8X50_SURF if !MACH_QSD8X50A_ST1_5
37 select MSM_GPIOMUX
38 select MSM_PROC_COMM
39 select MSM_SMD
40 select CLKSRC_QCOM
41 select MSM_VIC
42
43endchoice
44
45config MSM_SOC_REV_A
46 bool
47
48config ARCH_MSM_ARM11
49 bool
50
51config ARCH_MSM_SCORPION
52 bool
53
54config MSM_VIC
55 bool
56
57menu "Qualcomm MSM Board Type"
58 depends on ARCH_MSM
59
60config MACH_HALIBUT
61 depends on ARCH_MSM
62 depends on ARCH_MSM7X00A
63 bool "Halibut Board (QCT SURF7201A)"
64 help
65 Support for the Qualcomm SURF7201A eval board.
66
67config MACH_TROUT
68 depends on ARCH_MSM
69 depends on ARCH_MSM7X00A
70 bool "HTC Dream (aka trout)"
71 help
72 Support for the HTC Dream, T-Mobile G1, Android ADP1 devices.
73
74config MACH_MSM7X30_SURF
75 depends on ARCH_MSM7X30
76 bool "MSM7x30 SURF"
77 help
78 Support for the Qualcomm MSM7x30 SURF eval board.
79
80config MACH_QSD8X50_SURF
81 depends on ARCH_QSD8X50
82 bool "QSD8x50 SURF"
83 help
84 Support for the Qualcomm QSD8x50 SURF eval board.
85
86config MACH_QSD8X50A_ST1_5
87 depends on ARCH_QSD8X50
88 bool "QSD8x50A ST1.5"
89 select MSM_SOC_REV_A
90 help
91 Support for the Qualcomm ST1.5.
92
93endmenu
94
95config MSM_SMD_PKG3
96 bool
97
98config MSM_PROC_COMM
99 bool
100
101config MSM_SMD
102 bool
103
104config MSM_GPIOMUX
105 bool
106 help
107 Support for MSM V1 TLMM GPIOMUX architecture.
108
109endif
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
deleted file mode 100644
index 27c078a568df..000000000000
--- a/arch/arm/mach-msm/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1obj-$(CONFIG_MSM_PROC_COMM) += clock.o
2
3obj-$(CONFIG_MSM_VIC) += irq-vic.o
4
5obj-$(CONFIG_ARCH_MSM7X00A) += irq.o
6obj-$(CONFIG_ARCH_QSD8X50) += sirc.o
7
8obj-$(CONFIG_MSM_PROC_COMM) += proc_comm.o clock-pcom.o vreg.o
9
10obj-$(CONFIG_ARCH_MSM7X00A) += dma.o io.o
11obj-$(CONFIG_ARCH_MSM7X30) += dma.o io.o
12obj-$(CONFIG_ARCH_QSD8X50) += dma.o io.o
13
14obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o
15obj-$(CONFIG_MSM_SMD) += last_radio_log.o
16
17obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o
18obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o board-trout-panel.o devices-msm7x00.o
19obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o
20obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o
21obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o
22obj-$(CONFIG_MSM_GPIOMUX) += gpiomux.o
23obj-$(CONFIG_ARCH_QSD8X50) += gpiomux-8x50.o
diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot
deleted file mode 100644
index 9b803a578b4d..000000000000
--- a/arch/arm/mach-msm/Makefile.boot
+++ /dev/null
@@ -1,3 +0,0 @@
1 zreladdr-y += 0x10008000
2params_phys-y := 0x10000100
3initrd_phys-y := 0x10800000
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
deleted file mode 100644
index fc832040c6e9..000000000000
--- a/arch/arm/mach-msm/board-halibut.c
+++ /dev/null
@@ -1,110 +0,0 @@
1/* linux/arch/arm/mach-msm/board-halibut.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/input.h>
21#include <linux/io.h>
22#include <linux/delay.h>
23#include <linux/smc91x.h>
24
25#include <mach/hardware.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/flash.h>
30#include <asm/setup.h>
31
32#include <mach/irqs.h>
33#include <mach/msm_iomap.h>
34
35#include <linux/mtd/nand.h>
36#include <linux/mtd/partitions.h>
37
38#include "devices.h"
39#include "common.h"
40
41static struct resource smc91x_resources[] = {
42 [0] = {
43 .start = 0x9C004300,
44 .end = 0x9C004400,
45 .flags = IORESOURCE_MEM,
46 },
47 [1] = {
48 .start = MSM_GPIO_TO_INT(49),
49 .end = MSM_GPIO_TO_INT(49),
50 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
51 },
52};
53
54static struct smc91x_platdata smc91x_platdata = {
55 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
56};
57
58static struct platform_device smc91x_device = {
59 .name = "smc91x",
60 .id = 0,
61 .num_resources = ARRAY_SIZE(smc91x_resources),
62 .resource = smc91x_resources,
63 .dev.platform_data = &smc91x_platdata,
64};
65
66static struct platform_device *devices[] __initdata = {
67 &msm_clock_7x01a,
68 &msm_device_gpio_7201,
69 &msm_device_uart3,
70 &msm_device_smd,
71 &msm_device_nand,
72 &msm_device_hsusb,
73 &msm_device_i2c,
74 &smc91x_device,
75};
76
77static void __init halibut_init_early(void)
78{
79 arch_ioremap_caller = __msm_ioremap_caller;
80}
81
82static void __init halibut_init_irq(void)
83{
84 msm_init_irq();
85}
86
87static void __init halibut_init(void)
88{
89 platform_add_devices(devices, ARRAY_SIZE(devices));
90}
91
92static void __init halibut_map_io(void)
93{
94 msm_map_common_io();
95}
96
97static void __init halibut_init_late(void)
98{
99 smd_debugfs_init();
100}
101
102MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
103 .atag_offset = 0x100,
104 .map_io = halibut_map_io,
105 .init_early = halibut_init_early,
106 .init_irq = halibut_init_irq,
107 .init_machine = halibut_init,
108 .init_late = halibut_init_late,
109 .init_time = msm7x01_timer_init,
110MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
deleted file mode 100644
index 8f5ecdc4f3ce..000000000000
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ /dev/null
@@ -1,191 +0,0 @@
1/* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include <linux/gpio.h>
18#include <linux/kernel.h>
19#include <linux/irq.h>
20#include <linux/platform_device.h>
21#include <linux/delay.h>
22#include <linux/io.h>
23#include <linux/smsc911x.h>
24#include <linux/usb/msm_hsusb.h>
25#include <linux/clkdev.h>
26#include <linux/memblock.h>
27
28#include <asm/mach-types.h>
29#include <asm/mach/arch.h>
30#include <asm/memory.h>
31#include <asm/setup.h>
32
33#include <mach/clk.h>
34#include <mach/msm_iomap.h>
35#include <mach/dma.h>
36
37#include <mach/vreg.h>
38#include "devices.h"
39#include "gpiomux.h"
40#include "proc_comm.h"
41#include "common.h"
42
43static void __init msm7x30_fixup(struct tag *tag, char **cmdline)
44{
45 for (; tag->hdr.size; tag = tag_next(tag))
46 if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
47 tag->u.mem.start = 0;
48 tag->u.mem.size += SZ_2M;
49 }
50}
51
52static void __init msm7x30_reserve(void)
53{
54 memblock_remove(0x0, SZ_2M);
55}
56
57static int hsusb_phy_init_seq[] = {
58 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
59 0x02, 0x36, /* Disable CDR Auto Reset feature */
60 -1
61};
62
63static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
64{
65 int ret;
66
67 if (assert) {
68 ret = clk_reset(link_clk, CLK_RESET_ASSERT);
69 if (ret)
70 pr_err("usb hs_clk assert failed\n");
71 } else {
72 ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
73 if (ret)
74 pr_err("usb hs_clk deassert failed\n");
75 }
76 return ret;
77}
78
79static int hsusb_phy_clk_reset(struct clk *phy_clk)
80{
81 int ret;
82
83 ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
84 if (ret) {
85 pr_err("usb phy clk assert failed\n");
86 return ret;
87 }
88 usleep_range(10000, 12000);
89 ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
90 if (ret)
91 pr_err("usb phy clk deassert failed\n");
92 return ret;
93}
94
95static struct msm_otg_platform_data msm_otg_pdata = {
96 .phy_init_seq = hsusb_phy_init_seq,
97 .mode = USB_DR_MODE_PERIPHERAL,
98 .otg_control = OTG_PHY_CONTROL,
99 .link_clk_reset = hsusb_link_clk_reset,
100 .phy_clk_reset = hsusb_phy_clk_reset,
101};
102
103struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
104#ifdef CONFIG_SERIAL_MSM_CONSOLE
105 [49] = { /* UART2 RFR */
106 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
107 GPIOMUX_FUNC_2 | GPIOMUX_VALID,
108 },
109 [50] = { /* UART2 CTS */
110 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
111 GPIOMUX_FUNC_2 | GPIOMUX_VALID,
112 },
113 [51] = { /* UART2 RX */
114 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
115 GPIOMUX_FUNC_2 | GPIOMUX_VALID,
116 },
117 [52] = { /* UART2 TX */
118 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
119 GPIOMUX_FUNC_2 | GPIOMUX_VALID,
120 },
121#endif
122};
123
124static struct platform_device *devices[] __initdata = {
125 &msm_clock_7x30,
126 &msm_device_gpio_7x30,
127#if defined(CONFIG_SERIAL_MSM)
128 &msm_device_uart2,
129#endif
130 &msm_device_smd,
131 &msm_device_otg,
132 &msm_device_hsusb,
133 &msm_device_hsusb_host,
134};
135
136static void __init msm7x30_init_irq(void)
137{
138 msm_init_irq();
139}
140
141static void __init msm7x30_init(void)
142{
143 msm_device_otg.dev.platform_data = &msm_otg_pdata;
144 msm_device_hsusb.dev.parent = &msm_device_otg.dev;
145 msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
146
147 platform_add_devices(devices, ARRAY_SIZE(devices));
148}
149
150static void __init msm7x30_map_io(void)
151{
152 msm_map_msm7x30_io();
153}
154
155static void __init msm7x30_init_late(void)
156{
157 smd_debugfs_init();
158}
159
160MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
161 .atag_offset = 0x100,
162 .fixup = msm7x30_fixup,
163 .reserve = msm7x30_reserve,
164 .map_io = msm7x30_map_io,
165 .init_irq = msm7x30_init_irq,
166 .init_machine = msm7x30_init,
167 .init_late = msm7x30_init_late,
168 .init_time = msm7x30_timer_init,
169MACHINE_END
170
171MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
172 .atag_offset = 0x100,
173 .fixup = msm7x30_fixup,
174 .reserve = msm7x30_reserve,
175 .map_io = msm7x30_map_io,
176 .init_irq = msm7x30_init_irq,
177 .init_machine = msm7x30_init,
178 .init_late = msm7x30_init_late,
179 .init_time = msm7x30_timer_init,
180MACHINE_END
181
182MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
183 .atag_offset = 0x100,
184 .fixup = msm7x30_fixup,
185 .reserve = msm7x30_reserve,
186 .map_io = msm7x30_map_io,
187 .init_irq = msm7x30_init_irq,
188 .init_machine = msm7x30_init,
189 .init_late = msm7x30_init_late,
190 .init_time = msm7x30_timer_init,
191MACHINE_END
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
deleted file mode 100644
index 10016a3bc698..000000000000
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ /dev/null
@@ -1,254 +0,0 @@
1/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include <linux/gpio.h>
18#include <linux/kernel.h>
19#include <linux/irq.h>
20#include <linux/platform_device.h>
21#include <linux/delay.h>
22#include <linux/usb/msm_hsusb.h>
23#include <linux/err.h>
24#include <linux/clkdev.h>
25#include <linux/smc91x.h>
26
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h>
29#include <asm/io.h>
30#include <asm/setup.h>
31
32#include <mach/irqs.h>
33#include <mach/sirc.h>
34#include <mach/vreg.h>
35#include <mach/clk.h>
36#include <linux/platform_data/mmc-msm_sdcc.h>
37
38#include "devices.h"
39#include "common.h"
40
41static const resource_size_t qsd8x50_surf_smc91x_base __initconst = 0x70000300;
42static const unsigned qsd8x50_surf_smc91x_gpio __initconst = 156;
43
44/* Leave smc91x resources empty here, as we'll fill them in
45 * at run-time: they vary from board to board, and the true
46 * configuration won't be known until boot.
47 */
48static struct resource smc91x_resources[] = {
49 [0] = {
50 .flags = IORESOURCE_MEM,
51 },
52 [1] = {
53 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
54 },
55};
56
57static struct smc91x_platdata smc91x_platdata = {
58 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
59};
60
61static struct platform_device smc91x_device = {
62 .name = "smc91x",
63 .id = 0,
64 .num_resources = ARRAY_SIZE(smc91x_resources),
65 .resource = smc91x_resources,
66 .dev.platform_data = &smc91x_platdata,
67};
68
69static int __init msm_init_smc91x(void)
70{
71 if (machine_is_qsd8x50_surf()) {
72 smc91x_resources[0].start = qsd8x50_surf_smc91x_base;
73 smc91x_resources[0].end = qsd8x50_surf_smc91x_base + 0xff;
74 smc91x_resources[1].start =
75 gpio_to_irq(qsd8x50_surf_smc91x_gpio);
76 smc91x_resources[1].end =
77 gpio_to_irq(qsd8x50_surf_smc91x_gpio);
78 platform_device_register(&smc91x_device);
79 }
80
81 return 0;
82}
83module_init(msm_init_smc91x);
84
85static int hsusb_phy_init_seq[] = {
86 0x08, 0x31, /* Increase HS Driver Amplitude */
87 0x20, 0x32, /* Enable and set Pre-Emphasis Depth to 10% */
88 -1
89};
90
91static int hsusb_link_clk_reset(struct clk *link_clk, bool assert)
92{
93 int ret;
94
95 if (assert) {
96 ret = clk_reset(link_clk, CLK_RESET_ASSERT);
97 if (ret)
98 pr_err("usb hs_clk assert failed\n");
99 } else {
100 ret = clk_reset(link_clk, CLK_RESET_DEASSERT);
101 if (ret)
102 pr_err("usb hs_clk deassert failed\n");
103 }
104 return ret;
105}
106
107static int hsusb_phy_clk_reset(struct clk *phy_clk)
108{
109 int ret;
110
111 ret = clk_reset(phy_clk, CLK_RESET_ASSERT);
112 if (ret) {
113 pr_err("usb phy clk assert failed\n");
114 return ret;
115 }
116 usleep_range(10000, 12000);
117 ret = clk_reset(phy_clk, CLK_RESET_DEASSERT);
118 if (ret)
119 pr_err("usb phy clk deassert failed\n");
120 return ret;
121}
122
123static struct msm_otg_platform_data msm_otg_pdata = {
124 .phy_init_seq = hsusb_phy_init_seq,
125 .mode = USB_DR_MODE_PERIPHERAL,
126 .otg_control = OTG_PHY_CONTROL,
127 .link_clk_reset = hsusb_link_clk_reset,
128 .phy_clk_reset = hsusb_phy_clk_reset,
129};
130
131static struct platform_device *devices[] __initdata = {
132 &msm_clock_8x50,
133 &msm_device_gpio_8x50,
134 &msm_device_uart3,
135 &msm_device_smd,
136 &msm_device_otg,
137 &msm_device_hsusb,
138 &msm_device_hsusb_host,
139};
140
141static struct msm_mmc_gpio sdc1_gpio_cfg[] = {
142 {51, "sdc1_dat_3"},
143 {52, "sdc1_dat_2"},
144 {53, "sdc1_dat_1"},
145 {54, "sdc1_dat_0"},
146 {55, "sdc1_cmd"},
147 {56, "sdc1_clk"}
148};
149
150static struct vreg *vreg_mmc;
151static unsigned long vreg_sts;
152
153static uint32_t msm_sdcc_setup_power(struct device *dv, unsigned int vdd)
154{
155 int rc = 0;
156 struct platform_device *pdev;
157
158 pdev = container_of(dv, struct platform_device, dev);
159
160 if (vdd == 0) {
161 if (!vreg_sts)
162 return 0;
163
164 clear_bit(pdev->id, &vreg_sts);
165
166 if (!vreg_sts) {
167 rc = vreg_disable(vreg_mmc);
168 if (rc)
169 pr_err("vreg_mmc disable failed for slot "
170 "%d: %d\n", pdev->id, rc);
171 }
172 return 0;
173 }
174
175 if (!vreg_sts) {
176 rc = vreg_set_level(vreg_mmc, 2900);
177 if (rc)
178 pr_err("vreg_mmc set level failed for slot %d: %d\n",
179 pdev->id, rc);
180 rc = vreg_enable(vreg_mmc);
181 if (rc)
182 pr_err("vreg_mmc enable failed for slot %d: %d\n",
183 pdev->id, rc);
184 }
185 set_bit(pdev->id, &vreg_sts);
186 return 0;
187}
188
189static struct msm_mmc_gpio_data sdc1_gpio = {
190 .gpio = sdc1_gpio_cfg,
191 .size = ARRAY_SIZE(sdc1_gpio_cfg),
192};
193
194static struct msm_mmc_platform_data qsd8x50_sdc1_data = {
195 .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
196 .translate_vdd = msm_sdcc_setup_power,
197 .gpio_data = &sdc1_gpio,
198};
199
200static void __init qsd8x50_init_mmc(void)
201{
202 vreg_mmc = vreg_get(NULL, "gp5");
203
204 if (IS_ERR(vreg_mmc)) {
205 pr_err("vreg get for vreg_mmc failed (%ld)\n",
206 PTR_ERR(vreg_mmc));
207 return;
208 }
209
210 msm_add_sdcc(1, &qsd8x50_sdc1_data, 0, 0);
211}
212
213static void __init qsd8x50_map_io(void)
214{
215 msm_map_qsd8x50_io();
216}
217
218static void __init qsd8x50_init_irq(void)
219{
220 msm_init_irq();
221 msm_init_sirc();
222}
223
224static void __init qsd8x50_init(void)
225{
226 msm_device_otg.dev.platform_data = &msm_otg_pdata;
227 msm_device_hsusb.dev.parent = &msm_device_otg.dev;
228 msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
229 platform_add_devices(devices, ARRAY_SIZE(devices));
230 qsd8x50_init_mmc();
231}
232
233static void __init qsd8x50_init_late(void)
234{
235 smd_debugfs_init();
236}
237
238MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
239 .atag_offset = 0x100,
240 .map_io = qsd8x50_map_io,
241 .init_irq = qsd8x50_init_irq,
242 .init_machine = qsd8x50_init,
243 .init_late = qsd8x50_init_late,
244 .init_time = qsd8x50_timer_init,
245MACHINE_END
246
247MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
248 .atag_offset = 0x100,
249 .map_io = qsd8x50_map_io,
250 .init_irq = qsd8x50_init_irq,
251 .init_machine = qsd8x50_init,
252 .init_late = qsd8x50_init_late,
253 .init_time = qsd8x50_timer_init,
254MACHINE_END
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
deleted file mode 100644
index e50967926dcd..000000000000
--- a/arch/arm/mach-msm/board-sapphire.c
+++ /dev/null
@@ -1,114 +0,0 @@
1/* linux/arch/arm/mach-msm/board-sapphire.c
2 * Copyright (C) 2007-2009 HTC Corporation.
3 * Author: Thomas Tsai <thomas_tsai@htc.com>
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13*/
14#include <linux/gpio.h>
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/input.h>
19#include <linux/interrupt.h>
20#include <linux/irq.h>
21#include <linux/device.h>
22
23#include <linux/delay.h>
24
25#include <mach/hardware.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
28#include <asm/mach/map.h>
29#include <asm/mach/flash.h>
30#include <mach/vreg.h>
31
32#include <asm/io.h>
33#include <asm/delay.h>
34#include <asm/setup.h>
35
36#include <linux/mtd/nand.h>
37#include <linux/mtd/partitions.h>
38#include <linux/memblock.h>
39
40#include "gpio_chip.h"
41#include "board-sapphire.h"
42#include "proc_comm.h"
43#include "devices.h"
44#include "common.h"
45
46void msm_init_irq(void);
47void msm_init_gpio(void);
48
49static struct platform_device *devices[] __initdata = {
50 &msm_device_smd,
51 &msm_device_dmov,
52 &msm_device_nand,
53 &msm_device_uart1,
54 &msm_device_uart3,
55};
56
57void msm_timer_init(void);
58
59static void __init sapphire_init_irq(void)
60{
61 msm_init_irq();
62}
63
64static void __init sapphire_init(void)
65{
66 platform_add_devices(devices, ARRAY_SIZE(devices));
67}
68
69static struct map_desc sapphire_io_desc[] __initdata = {
70 {
71 .virtual = SAPPHIRE_CPLD_BASE,
72 .pfn = __phys_to_pfn(SAPPHIRE_CPLD_START),
73 .length = SAPPHIRE_CPLD_SIZE,
74 .type = MT_DEVICE_NONSHARED
75 }
76};
77
78static void __init sapphire_fixup(struct tag *tags, char **cmdline)
79{
80 int smi_sz = parse_tag_smi((const struct tag *)tags);
81
82 if (smi_sz == 32) {
83 memblock_add(PHYS_OFFSET, 84*SZ_1M);
84 } else if (smi_sz == 64) {
85 memblock_add(PHYS_OFFSET, 101*SZ_1M);
86 } else {
87 memblock_add(PHYS_OFFSET, 101*SZ_1M);
88 /* Give a default value when not get smi size */
89 smi_sz = 64;
90 }
91}
92
93static void __init sapphire_map_io(void)
94{
95 msm_map_common_io();
96 iotable_init(sapphire_io_desc, ARRAY_SIZE(sapphire_io_desc));
97 msm_clock_init();
98}
99
100static void __init sapphire_init_late(void)
101{
102 smd_debugfs_init();
103}
104
105MACHINE_START(SAPPHIRE, "sapphire")
106/* Maintainer: Brian Swetland <swetland@google.com> */
107 .atag_offset = 0x100,
108 .fixup = sapphire_fixup,
109 .map_io = sapphire_map_io,
110 .init_irq = sapphire_init_irq,
111 .init_machine = sapphire_init,
112 .init_late = sapphire_init_late,
113 .init_time = msm_timer_init,
114MACHINE_END
diff --git a/arch/arm/mach-msm/board-trout-gpio.c b/arch/arm/mach-msm/board-trout-gpio.c
deleted file mode 100644
index 722ad63b7edc..000000000000
--- a/arch/arm/mach-msm/board-trout-gpio.c
+++ /dev/null
@@ -1,233 +0,0 @@
1/*
2 * linux/arch/arm/mach-msm/gpio.c
3 *
4 * Copyright (C) 2005 HP Labs
5 * Copyright (C) 2008 Google, Inc.
6 * Copyright (C) 2009 Pavel Machek <pavel@ucw.cz>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#include <linux/kernel.h>
15#include <linux/module.h>
16#include <linux/io.h>
17#include <linux/irq.h>
18#include <linux/interrupt.h>
19#include <linux/gpio.h>
20
21#include "board-trout.h"
22
23static uint8_t trout_int_mask[2] = {
24 [0] = 0xff, /* mask all interrupts */
25 [1] = 0xff,
26};
27static uint8_t trout_sleep_int_mask[] = {
28 [0] = 0xff,
29 [1] = 0xff,
30};
31
32struct msm_gpio_chip {
33 struct gpio_chip chip;
34 void __iomem *reg; /* Base of register bank */
35 u8 shadow;
36};
37
38#define to_msm_gpio_chip(c) container_of(c, struct msm_gpio_chip, chip)
39
40static int msm_gpiolib_get(struct gpio_chip *chip, unsigned offset)
41{
42 struct msm_gpio_chip *msm_gpio = to_msm_gpio_chip(chip);
43 unsigned mask = 1 << offset;
44
45 return !!(readb(msm_gpio->reg) & mask);
46}
47
48static void msm_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val)
49{
50 struct msm_gpio_chip *msm_gpio = to_msm_gpio_chip(chip);
51 unsigned mask = 1 << offset;
52
53 if (val)
54 msm_gpio->shadow |= mask;
55 else
56 msm_gpio->shadow &= ~mask;
57
58 writeb(msm_gpio->shadow, msm_gpio->reg);
59}
60
61static int msm_gpiolib_direction_input(struct gpio_chip *chip,
62 unsigned offset)
63{
64 msm_gpiolib_set(chip, offset, 0);
65 return 0;
66}
67
68static int msm_gpiolib_direction_output(struct gpio_chip *chip,
69 unsigned offset, int val)
70{
71 msm_gpiolib_set(chip, offset, val);
72 return 0;
73}
74
75static int trout_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
76{
77 return TROUT_GPIO_TO_INT(offset + chip->base);
78}
79
80#define TROUT_GPIO_BANK(name, reg_num, base_gpio, shadow_val) \
81 { \
82 .chip = { \
83 .label = name, \
84 .direction_input = msm_gpiolib_direction_input,\
85 .direction_output = msm_gpiolib_direction_output, \
86 .get = msm_gpiolib_get, \
87 .set = msm_gpiolib_set, \
88 .to_irq = trout_gpio_to_irq, \
89 .base = base_gpio, \
90 .ngpio = 8, \
91 }, \
92 .reg = reg_num + TROUT_CPLD_BASE, \
93 .shadow = shadow_val, \
94 }
95
96static struct msm_gpio_chip msm_gpio_banks[] = {
97#if defined(CONFIG_DEBUG_MSM_UART) && (CONFIG_DEBUG_UART_PHYS == 0xa9a00000)
98 /* H2W pins <-> UART1 */
99 TROUT_GPIO_BANK("MISC2", 0x00, TROUT_GPIO_MISC2_BASE, 0x40),
100#else
101 /* H2W pins <-> UART3, Bluetooth <-> UART1 */
102 TROUT_GPIO_BANK("MISC2", 0x00, TROUT_GPIO_MISC2_BASE, 0x80),
103#endif
104 /* I2C pull */
105 TROUT_GPIO_BANK("MISC3", 0x02, TROUT_GPIO_MISC3_BASE, 0x04),
106 TROUT_GPIO_BANK("MISC4", 0x04, TROUT_GPIO_MISC4_BASE, 0),
107 /* mmdi 32k en */
108 TROUT_GPIO_BANK("MISC5", 0x06, TROUT_GPIO_MISC5_BASE, 0x04),
109 TROUT_GPIO_BANK("INT2", 0x08, TROUT_GPIO_INT2_BASE, 0),
110 TROUT_GPIO_BANK("MISC1", 0x0a, TROUT_GPIO_MISC1_BASE, 0),
111 TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0),
112};
113
114static void trout_gpio_irq_ack(struct irq_data *d)
115{
116 int bank = TROUT_INT_TO_BANK(d->irq);
117 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
118 int reg = TROUT_BANK_TO_STAT_REG(bank);
119 /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", d->irq);*/
120 writeb(mask, TROUT_CPLD_BASE + reg);
121}
122
123static void trout_gpio_irq_mask(struct irq_data *d)
124{
125 unsigned long flags;
126 uint8_t reg_val;
127 int bank = TROUT_INT_TO_BANK(d->irq);
128 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
129 int reg = TROUT_BANK_TO_MASK_REG(bank);
130
131 local_irq_save(flags);
132 reg_val = trout_int_mask[bank] |= mask;
133 /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n",
134 d->irq, bank, reg_val);*/
135 writeb(reg_val, TROUT_CPLD_BASE + reg);
136 local_irq_restore(flags);
137}
138
139static void trout_gpio_irq_unmask(struct irq_data *d)
140{
141 unsigned long flags;
142 uint8_t reg_val;
143 int bank = TROUT_INT_TO_BANK(d->irq);
144 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
145 int reg = TROUT_BANK_TO_MASK_REG(bank);
146
147 local_irq_save(flags);
148 reg_val = trout_int_mask[bank] &= ~mask;
149 /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n",
150 d->irq, bank, reg_val);*/
151 writeb(reg_val, TROUT_CPLD_BASE + reg);
152 local_irq_restore(flags);
153}
154
155int trout_gpio_irq_set_wake(struct irq_data *d, unsigned int on)
156{
157 unsigned long flags;
158 int bank = TROUT_INT_TO_BANK(d->irq);
159 uint8_t mask = TROUT_INT_TO_MASK(d->irq);
160
161 local_irq_save(flags);
162 if(on)
163 trout_sleep_int_mask[bank] &= ~mask;
164 else
165 trout_sleep_int_mask[bank] |= mask;
166 local_irq_restore(flags);
167 return 0;
168}
169
170static void trout_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
171{
172 int j, m;
173 unsigned v;
174 int bank;
175 int stat_reg;
176 int int_base = TROUT_INT_START;
177 uint8_t int_mask;
178
179 for (bank = 0; bank < 2; bank++) {
180 stat_reg = TROUT_BANK_TO_STAT_REG(bank);
181 v = readb(TROUT_CPLD_BASE + stat_reg);
182 int_mask = trout_int_mask[bank];
183 if (v & int_mask) {
184 writeb(v & int_mask, TROUT_CPLD_BASE + stat_reg);
185 printk(KERN_ERR "trout_gpio_irq_handler: got masked "
186 "interrupt: %d:%02x\n", bank, v & int_mask);
187 }
188 v &= ~int_mask;
189 while (v) {
190 m = v & -v;
191 j = fls(m) - 1;
192 /*printk(KERN_INFO "msm_gpio_irq_handler %d:%02x %02x b"
193 "it %d irq %d\n", bank, v, m, j, int_base + j);*/
194 v &= ~m;
195 generic_handle_irq(int_base + j);
196 }
197 int_base += TROUT_INT_BANK0_COUNT;
198 }
199 desc->irq_data.chip->irq_ack(&desc->irq_data);
200}
201
202static struct irq_chip trout_gpio_irq_chip = {
203 .name = "troutgpio",
204 .irq_ack = trout_gpio_irq_ack,
205 .irq_mask = trout_gpio_irq_mask,
206 .irq_unmask = trout_gpio_irq_unmask,
207 .irq_set_wake = trout_gpio_irq_set_wake,
208};
209
210/*
211 * Called from the processor-specific init to enable GPIO pin support.
212 */
213int __init trout_init_gpio(void)
214{
215 int i;
216 for(i = TROUT_INT_START; i <= TROUT_INT_END; i++) {
217 irq_set_chip_and_handler(i, &trout_gpio_irq_chip,
218 handle_edge_irq);
219 set_irq_flags(i, IRQF_VALID);
220 }
221
222 for (i = 0; i < ARRAY_SIZE(msm_gpio_banks); i++)
223 gpiochip_add(&msm_gpio_banks[i].chip);
224
225 irq_set_irq_type(MSM_GPIO_TO_INT(17), IRQF_TRIGGER_HIGH);
226 irq_set_chained_handler(MSM_GPIO_TO_INT(17), trout_gpio_irq_handler);
227 irq_set_irq_wake(MSM_GPIO_TO_INT(17), 1);
228
229 return 0;
230}
231
232postcore_initcall(trout_init_gpio);
233
diff --git a/arch/arm/mach-msm/board-trout-mmc.c b/arch/arm/mach-msm/board-trout-mmc.c
deleted file mode 100644
index 3723e55819d6..000000000000
--- a/arch/arm/mach-msm/board-trout-mmc.c
+++ /dev/null
@@ -1,185 +0,0 @@
1/* linux/arch/arm/mach-msm/board-trout-mmc.c
2** Author: Brian Swetland <swetland@google.com>
3*/
4#include <linux/gpio.h>
5#include <linux/kernel.h>
6#include <linux/init.h>
7#include <linux/platform_device.h>
8#include <linux/delay.h>
9#include <linux/mmc/host.h>
10#include <linux/mmc/sdio_ids.h>
11#include <linux/err.h>
12#include <linux/debugfs.h>
13
14#include <asm/io.h>
15
16#include <mach/vreg.h>
17
18#include <linux/platform_data/mmc-msm_sdcc.h>
19
20#include "devices.h"
21
22#include "board-trout.h"
23
24#include "proc_comm.h"
25
26#define DEBUG_SDSLOT_VDD 1
27
28/* ---- COMMON ---- */
29static void config_gpio_table(uint32_t *table, int len)
30{
31 int n;
32 unsigned id;
33 for(n = 0; n < len; n++) {
34 id = table[n];
35 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &id, 0);
36 }
37}
38
39/* ---- SDCARD ---- */
40
41static uint32_t sdcard_on_gpio_table[] = {
42 PCOM_GPIO_CFG(62, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* CLK */
43 PCOM_GPIO_CFG(63, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */
44 PCOM_GPIO_CFG(64, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT3 */
45 PCOM_GPIO_CFG(65, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT2 */
46 PCOM_GPIO_CFG(66, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT1 */
47 PCOM_GPIO_CFG(67, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT0 */
48};
49
50static uint32_t sdcard_off_gpio_table[] = {
51 PCOM_GPIO_CFG(62, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CLK */
52 PCOM_GPIO_CFG(63, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CMD */
53 PCOM_GPIO_CFG(64, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT3 */
54 PCOM_GPIO_CFG(65, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT2 */
55 PCOM_GPIO_CFG(66, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */
56 PCOM_GPIO_CFG(67, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */
57};
58
59static uint opt_disable_sdcard;
60
61static int __init trout_disablesdcard_setup(char *str)
62{
63 int cal = simple_strtol(str, NULL, 0);
64
65 opt_disable_sdcard = cal;
66 return 1;
67}
68
69__setup("board_trout.disable_sdcard=", trout_disablesdcard_setup);
70
71static struct vreg *vreg_sdslot; /* SD slot power */
72
73struct mmc_vdd_xlat {
74 int mask;
75 int level;
76};
77
78static struct mmc_vdd_xlat mmc_vdd_table[] = {
79 { MMC_VDD_165_195, 1800 },
80 { MMC_VDD_20_21, 2050 },
81 { MMC_VDD_21_22, 2150 },
82 { MMC_VDD_22_23, 2250 },
83 { MMC_VDD_23_24, 2350 },
84 { MMC_VDD_24_25, 2450 },
85 { MMC_VDD_25_26, 2550 },
86 { MMC_VDD_26_27, 2650 },
87 { MMC_VDD_27_28, 2750 },
88 { MMC_VDD_28_29, 2850 },
89 { MMC_VDD_29_30, 2950 },
90};
91
92static unsigned int sdslot_vdd = 0xffffffff;
93static unsigned int sdslot_vreg_enabled;
94
95static uint32_t trout_sdslot_switchvdd(struct device *dev, unsigned int vdd)
96{
97 int i, rc;
98
99 BUG_ON(!vreg_sdslot);
100
101 if (vdd == sdslot_vdd)
102 return 0;
103
104 sdslot_vdd = vdd;
105
106 if (vdd == 0) {
107#if DEBUG_SDSLOT_VDD
108 printk("%s: Disabling SD slot power\n", __func__);
109#endif
110 config_gpio_table(sdcard_off_gpio_table,
111 ARRAY_SIZE(sdcard_off_gpio_table));
112 vreg_disable(vreg_sdslot);
113 sdslot_vreg_enabled = 0;
114 return 0;
115 }
116
117 if (!sdslot_vreg_enabled) {
118 rc = vreg_enable(vreg_sdslot);
119 if (rc) {
120 printk(KERN_ERR "%s: Error enabling vreg (%d)\n",
121 __func__, rc);
122 }
123 config_gpio_table(sdcard_on_gpio_table,
124 ARRAY_SIZE(sdcard_on_gpio_table));
125 sdslot_vreg_enabled = 1;
126 }
127
128 for (i = 0; i < ARRAY_SIZE(mmc_vdd_table); i++) {
129 if (mmc_vdd_table[i].mask == (1 << vdd)) {
130#if DEBUG_SDSLOT_VDD
131 printk("%s: Setting level to %u\n",
132 __func__, mmc_vdd_table[i].level);
133#endif
134 rc = vreg_set_level(vreg_sdslot,
135 mmc_vdd_table[i].level);
136 if (rc) {
137 printk(KERN_ERR
138 "%s: Error setting vreg level (%d)\n",
139 __func__, rc);
140 }
141 return 0;
142 }
143 }
144
145 printk(KERN_ERR "%s: Invalid VDD %d specified\n", __func__, vdd);
146 return 0;
147}
148
149static unsigned int trout_sdslot_status(struct device *dev)
150{
151 unsigned int status;
152
153 status = (unsigned int) gpio_get_value(TROUT_GPIO_SDMC_CD_N);
154 return (!status);
155}
156
157#define TROUT_MMC_VDD MMC_VDD_165_195 | MMC_VDD_20_21 | MMC_VDD_21_22 \
158 | MMC_VDD_22_23 | MMC_VDD_23_24 | MMC_VDD_24_25 \
159 | MMC_VDD_25_26 | MMC_VDD_26_27 | MMC_VDD_27_28 \
160 | MMC_VDD_28_29 | MMC_VDD_29_30
161
162static struct msm_mmc_platform_data trout_sdslot_data = {
163 .ocr_mask = TROUT_MMC_VDD,
164 .status = trout_sdslot_status,
165 .translate_vdd = trout_sdslot_switchvdd,
166};
167
168int __init trout_init_mmc(unsigned int sys_rev)
169{
170 sdslot_vreg_enabled = 0;
171
172 vreg_sdslot = vreg_get(0, "gp6");
173 if (IS_ERR(vreg_sdslot))
174 return PTR_ERR(vreg_sdslot);
175
176 irq_set_irq_wake(TROUT_GPIO_TO_INT(TROUT_GPIO_SDMC_CD_N), 1);
177
178 if (!opt_disable_sdcard)
179 msm_add_sdcc(2, &trout_sdslot_data,
180 TROUT_GPIO_TO_INT(TROUT_GPIO_SDMC_CD_N), 0);
181 else
182 printk(KERN_INFO "trout: SD-Card interface disabled\n");
183 return 0;
184}
185
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c
deleted file mode 100644
index 77b0a26f897f..000000000000
--- a/arch/arm/mach-msm/board-trout-panel.c
+++ /dev/null
@@ -1,292 +0,0 @@
1/* linux/arch/arm/mach-msm/board-trout-mddi.c
2** Author: Brian Swetland <swetland@google.com>
3*/
4#include <linux/gpio.h>
5#include <linux/kernel.h>
6#include <linux/init.h>
7#include <linux/platform_device.h>
8#include <linux/delay.h>
9#include <linux/leds.h>
10#include <linux/err.h>
11
12#include <asm/io.h>
13#include <asm/mach-types.h>
14#include <asm/system_info.h>
15
16#include <linux/platform_data/video-msm_fb.h>
17#include <mach/vreg.h>
18
19#include "board-trout.h"
20#include "proc_comm.h"
21#include "clock-pcom.h"
22#include "devices.h"
23
24#define TROUT_DEFAULT_BACKLIGHT_BRIGHTNESS 255
25
26#define MDDI_CLIENT_CORE_BASE 0x108000
27#define LCD_CONTROL_BLOCK_BASE 0x110000
28#define SPI_BLOCK_BASE 0x120000
29#define I2C_BLOCK_BASE 0x130000
30#define PWM_BLOCK_BASE 0x140000
31#define GPIO_BLOCK_BASE 0x150000
32#define SYSTEM_BLOCK1_BASE 0x160000
33#define SYSTEM_BLOCK2_BASE 0x170000
34
35
36#define DPSUS (MDDI_CLIENT_CORE_BASE|0x24)
37#define SYSCLKENA (MDDI_CLIENT_CORE_BASE|0x2C)
38#define PWM0OFF (PWM_BLOCK_BASE|0x1C)
39
40#define V_VDDE2E_VDD2_GPIO 0
41#define MDDI_RST_N 82
42
43#define MDDICAP0 (MDDI_CLIENT_CORE_BASE|0x00)
44#define MDDICAP1 (MDDI_CLIENT_CORE_BASE|0x04)
45#define MDDICAP2 (MDDI_CLIENT_CORE_BASE|0x08)
46#define MDDICAP3 (MDDI_CLIENT_CORE_BASE|0x0C)
47#define MDCAPCHG (MDDI_CLIENT_CORE_BASE|0x10)
48#define MDCRCERC (MDDI_CLIENT_CORE_BASE|0x14)
49#define TTBUSSEL (MDDI_CLIENT_CORE_BASE|0x18)
50#define DPSET0 (MDDI_CLIENT_CORE_BASE|0x1C)
51#define DPSET1 (MDDI_CLIENT_CORE_BASE|0x20)
52#define DPSUS (MDDI_CLIENT_CORE_BASE|0x24)
53#define DPRUN (MDDI_CLIENT_CORE_BASE|0x28)
54#define SYSCKENA (MDDI_CLIENT_CORE_BASE|0x2C)
55#define TESTMODE (MDDI_CLIENT_CORE_BASE|0x30)
56#define FIFOMONI (MDDI_CLIENT_CORE_BASE|0x34)
57#define INTMONI (MDDI_CLIENT_CORE_BASE|0x38)
58#define MDIOBIST (MDDI_CLIENT_CORE_BASE|0x3C)
59#define MDIOPSET (MDDI_CLIENT_CORE_BASE|0x40)
60#define BITMAP0 (MDDI_CLIENT_CORE_BASE|0x44)
61#define BITMAP1 (MDDI_CLIENT_CORE_BASE|0x48)
62#define BITMAP2 (MDDI_CLIENT_CORE_BASE|0x4C)
63#define BITMAP3 (MDDI_CLIENT_CORE_BASE|0x50)
64#define BITMAP4 (MDDI_CLIENT_CORE_BASE|0x54)
65
66#define SRST (LCD_CONTROL_BLOCK_BASE|0x00)
67#define PORT_ENB (LCD_CONTROL_BLOCK_BASE|0x04)
68#define START (LCD_CONTROL_BLOCK_BASE|0x08)
69#define PORT (LCD_CONTROL_BLOCK_BASE|0x0C)
70#define CMN (LCD_CONTROL_BLOCK_BASE|0x10)
71#define GAMMA (LCD_CONTROL_BLOCK_BASE|0x14)
72#define INTFLG (LCD_CONTROL_BLOCK_BASE|0x18)
73#define INTMSK (LCD_CONTROL_BLOCK_BASE|0x1C)
74#define MPLFBUF (LCD_CONTROL_BLOCK_BASE|0x20)
75#define HDE_LEFT (LCD_CONTROL_BLOCK_BASE|0x24)
76#define VDE_TOP (LCD_CONTROL_BLOCK_BASE|0x28)
77#define PXL (LCD_CONTROL_BLOCK_BASE|0x30)
78#define HCYCLE (LCD_CONTROL_BLOCK_BASE|0x34)
79#define HSW (LCD_CONTROL_BLOCK_BASE|0x38)
80#define HDE_START (LCD_CONTROL_BLOCK_BASE|0x3C)
81#define HDE_SIZE (LCD_CONTROL_BLOCK_BASE|0x40)
82#define VCYCLE (LCD_CONTROL_BLOCK_BASE|0x44)
83#define VSW (LCD_CONTROL_BLOCK_BASE|0x48)
84#define VDE_START (LCD_CONTROL_BLOCK_BASE|0x4C)
85#define VDE_SIZE (LCD_CONTROL_BLOCK_BASE|0x50)
86#define WAKEUP (LCD_CONTROL_BLOCK_BASE|0x54)
87#define WSYN_DLY (LCD_CONTROL_BLOCK_BASE|0x58)
88#define REGENB (LCD_CONTROL_BLOCK_BASE|0x5C)
89#define VSYNIF (LCD_CONTROL_BLOCK_BASE|0x60)
90#define WRSTB (LCD_CONTROL_BLOCK_BASE|0x64)
91#define RDSTB (LCD_CONTROL_BLOCK_BASE|0x68)
92#define ASY_DATA (LCD_CONTROL_BLOCK_BASE|0x6C)
93#define ASY_DATB (LCD_CONTROL_BLOCK_BASE|0x70)
94#define ASY_DATC (LCD_CONTROL_BLOCK_BASE|0x74)
95#define ASY_DATD (LCD_CONTROL_BLOCK_BASE|0x78)
96#define ASY_DATE (LCD_CONTROL_BLOCK_BASE|0x7C)
97#define ASY_DATF (LCD_CONTROL_BLOCK_BASE|0x80)
98#define ASY_DATG (LCD_CONTROL_BLOCK_BASE|0x84)
99#define ASY_DATH (LCD_CONTROL_BLOCK_BASE|0x88)
100#define ASY_CMDSET (LCD_CONTROL_BLOCK_BASE|0x8C)
101
102#define SSICTL (SPI_BLOCK_BASE|0x00)
103#define SSITIME (SPI_BLOCK_BASE|0x04)
104#define SSITX (SPI_BLOCK_BASE|0x08)
105#define SSIRX (SPI_BLOCK_BASE|0x0C)
106#define SSIINTC (SPI_BLOCK_BASE|0x10)
107#define SSIINTS (SPI_BLOCK_BASE|0x14)
108#define SSIDBG1 (SPI_BLOCK_BASE|0x18)
109#define SSIDBG2 (SPI_BLOCK_BASE|0x1C)
110#define SSIID (SPI_BLOCK_BASE|0x20)
111
112#define WKREQ (SYSTEM_BLOCK1_BASE|0x00)
113#define CLKENB (SYSTEM_BLOCK1_BASE|0x04)
114#define DRAMPWR (SYSTEM_BLOCK1_BASE|0x08)
115#define INTMASK (SYSTEM_BLOCK1_BASE|0x0C)
116#define GPIOSEL (SYSTEM_BLOCK2_BASE|0x00)
117
118#define GPIODATA (GPIO_BLOCK_BASE|0x00)
119#define GPIODIR (GPIO_BLOCK_BASE|0x04)
120#define GPIOIS (GPIO_BLOCK_BASE|0x08)
121#define GPIOIBE (GPIO_BLOCK_BASE|0x0C)
122#define GPIOIEV (GPIO_BLOCK_BASE|0x10)
123#define GPIOIE (GPIO_BLOCK_BASE|0x14)
124#define GPIORIS (GPIO_BLOCK_BASE|0x18)
125#define GPIOMIS (GPIO_BLOCK_BASE|0x1C)
126#define GPIOIC (GPIO_BLOCK_BASE|0x20)
127#define GPIOOMS (GPIO_BLOCK_BASE|0x24)
128#define GPIOPC (GPIO_BLOCK_BASE|0x28)
129#define GPIOID (GPIO_BLOCK_BASE|0x30)
130
131#define SPI_WRITE(reg, val) \
132 { SSITX, 0x00010000 | (((reg) & 0xff) << 8) | ((val) & 0xff) }, \
133 { 0, 5 },
134
135#define SPI_WRITE1(reg) \
136 { SSITX, (reg) & 0xff }, \
137 { 0, 5 },
138
139struct mddi_table {
140 uint32_t reg;
141 uint32_t value;
142};
143static struct mddi_table mddi_toshiba_init_table[] = {
144 { DPSET0, 0x09e90046 },
145 { DPSET1, 0x00000118 },
146 { DPSUS, 0x00000000 },
147 { DPRUN, 0x00000001 },
148 { 1, 14 }, /* msleep 14 */
149 { SYSCKENA, 0x00000001 },
150 { CLKENB, 0x0000A1EF }, /* # SYS.CLKENB # Enable clocks for each module (without DCLK , i2cCLK) */
151
152 { GPIODATA, 0x02000200 }, /* # GPI .GPIODATA # GPIO2(RESET_LCD_N) set to 0 , GPIO3(eDRAM_Power) set to 0 */
153 { GPIODIR, 0x000030D }, /* 24D # GPI .GPIODIR # Select direction of GPIO port (0,2,3,6,9 output) */
154 { GPIOSEL, 0/*0x00000173*/}, /* # SYS.GPIOSEL # GPIO port multiplexing control */
155 { GPIOPC, 0x03C300C0 }, /* # GPI .GPIOPC # GPIO2,3 PD cut */
156 { WKREQ, 0x00000000 }, /* # SYS.WKREQ # Wake-up request event is VSYNC alignment */
157
158 { GPIOIBE, 0x000003FF },
159 { GPIOIS, 0x00000000 },
160 { GPIOIC, 0x000003FF },
161 { GPIOIE, 0x00000000 },
162
163 { GPIODATA, 0x00040004 }, /* # GPI .GPIODATA # eDRAM VD supply */
164 { 1, 1 }, /* msleep 1 */
165 { GPIODATA, 0x02040004 }, /* # GPI .GPIODATA # eDRAM VD supply */
166 { DRAMPWR, 0x00000001 }, /* eDRAM power */
167};
168
169#define GPIOSEL_VWAKEINT (1U << 0)
170#define INTMASK_VWAKEOUT (1U << 0)
171
172
173static int trout_new_backlight = 1;
174static struct vreg *vreg_mddi_1v5;
175static struct vreg *vreg_lcm_2v85;
176
177static void trout_process_mddi_table(struct msm_mddi_client_data *client_data,
178 struct mddi_table *table, size_t count)
179{
180 int i;
181 for (i = 0; i < count; i++) {
182 uint32_t reg = table[i].reg;
183 uint32_t value = table[i].value;
184
185 if (reg == 0)
186 udelay(value);
187 else if (reg == 1)
188 msleep(value);
189 else
190 client_data->remote_write(client_data, value, reg);
191 }
192}
193
194static int trout_mddi_toshiba_client_init(
195 struct msm_mddi_bridge_platform_data *bridge_data,
196 struct msm_mddi_client_data *client_data)
197{
198 int panel_id;
199
200 client_data->auto_hibernate(client_data, 0);
201 trout_process_mddi_table(client_data, mddi_toshiba_init_table,
202 ARRAY_SIZE(mddi_toshiba_init_table));
203 client_data->auto_hibernate(client_data, 1);
204 panel_id = (client_data->remote_read(client_data, GPIODATA) >> 4) & 3;
205 if (panel_id > 1) {
206 printk(KERN_WARNING "unknown panel id at mddi_enable\n");
207 return -1;
208 }
209 return 0;
210}
211
212static int trout_mddi_toshiba_client_uninit(
213 struct msm_mddi_bridge_platform_data *bridge_data,
214 struct msm_mddi_client_data *client_data)
215{
216 return 0;
217}
218
219static struct resource resources_msm_fb[] = {
220 {
221 .start = MSM_FB_BASE,
222 .end = MSM_FB_BASE + MSM_FB_SIZE,
223 .flags = IORESOURCE_MEM,
224 },
225};
226
227struct msm_mddi_bridge_platform_data toshiba_client_data = {
228 .init = trout_mddi_toshiba_client_init,
229 .uninit = trout_mddi_toshiba_client_uninit,
230 .fb_data = {
231 .xres = 320,
232 .yres = 480,
233 .width = 45,
234 .height = 67,
235 .output_format = 0,
236 },
237};
238
239static struct msm_mddi_platform_data mddi_pdata = {
240 .clk_rate = 122880000,
241 .fb_resource = resources_msm_fb,
242 .num_clients = 1,
243 .client_platform_data = {
244 {
245 .product_id = (0xd263 << 16 | 0),
246 .name = "mddi_c_d263_0000",
247 .id = 0,
248 .client_data = &toshiba_client_data,
249 .clk_rate = 0,
250 },
251 },
252};
253
254int __init trout_init_panel(void)
255{
256 int rc;
257
258 if (!machine_is_trout())
259 return 0;
260 vreg_mddi_1v5 = vreg_get(0, "gp2");
261 if (IS_ERR(vreg_mddi_1v5))
262 return PTR_ERR(vreg_mddi_1v5);
263 vreg_lcm_2v85 = vreg_get(0, "gp4");
264 if (IS_ERR(vreg_lcm_2v85))
265 return PTR_ERR(vreg_lcm_2v85);
266
267 trout_new_backlight = system_rev >= 5;
268 if (trout_new_backlight) {
269 uint32_t config = PCOM_GPIO_CFG(27, 0, GPIO_OUTPUT,
270 GPIO_NO_PULL, GPIO_8MA);
271 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
272 } else {
273 uint32_t config = PCOM_GPIO_CFG(27, 1, GPIO_OUTPUT,
274 GPIO_NO_PULL, GPIO_8MA);
275 uint32_t id = P_GP_CLK;
276 uint32_t rate = 19200000;
277
278 msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &config, 0);
279
280 msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
281 if (id < 0)
282 pr_err("trout_init_panel: set clock rate failed\n");
283 }
284
285 rc = platform_device_register(&msm_device_mdp);
286 if (rc)
287 return rc;
288 msm_device_mddi0.dev.platform_data = &mddi_pdata;
289 return platform_device_register(&msm_device_mddi0);
290}
291
292device_initcall(trout_init_panel);
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
deleted file mode 100644
index ba3edd3a46cb..000000000000
--- a/arch/arm/mach-msm/board-trout.c
+++ /dev/null
@@ -1,111 +0,0 @@
1/* linux/arch/arm/mach-msm/board-trout.c
2 *
3 * Copyright (C) 2009 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16#define pr_fmt(fmt) "%s: " fmt, __func__
17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/platform_device.h>
21#include <linux/clkdev.h>
22#include <linux/memblock.h>
23
24#include <asm/system_info.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/setup.h>
29
30#include <mach/hardware.h>
31#include <mach/msm_iomap.h>
32
33#include "devices.h"
34#include "board-trout.h"
35#include "common.h"
36
37extern int trout_init_mmc(unsigned int);
38
39static struct platform_device *devices[] __initdata = {
40 &msm_clock_7x01a,
41 &msm_device_gpio_7201,
42 &msm_device_uart3,
43 &msm_device_smd,
44 &msm_device_nand,
45 &msm_device_hsusb,
46 &msm_device_i2c,
47};
48
49static void __init trout_init_early(void)
50{
51 arch_ioremap_caller = __msm_ioremap_caller;
52}
53
54static void __init trout_init_irq(void)
55{
56 msm_init_irq();
57}
58
59static void __init trout_fixup(struct tag *tags, char **cmdline)
60{
61 memblock_add(PHYS_OFFSET, 101*SZ_1M);
62}
63
64static void __init trout_init(void)
65{
66 int rc;
67
68 platform_add_devices(devices, ARRAY_SIZE(devices));
69
70 if (IS_ENABLED(CONFIG_MMC)) {
71 rc = trout_init_mmc(system_rev);
72 if (rc)
73 pr_crit("MMC init failure (%d)\n", rc);
74 }
75}
76
77static struct map_desc trout_io_desc[] __initdata = {
78 {
79 .virtual = (unsigned long)TROUT_CPLD_BASE,
80 .pfn = __phys_to_pfn(TROUT_CPLD_START),
81 .length = TROUT_CPLD_SIZE,
82 .type = MT_DEVICE_NONSHARED
83 }
84};
85
86static void __init trout_map_io(void)
87{
88 msm_map_common_io();
89 iotable_init(trout_io_desc, ARRAY_SIZE(trout_io_desc));
90
91#if defined(CONFIG_DEBUG_MSM_UART) && (CONFIG_DEBUG_UART_PHYS == 0xa9c00000)
92 /* route UART3 to the "H2W" extended usb connector */
93 writeb(0x80, TROUT_CPLD_BASE + 0x00);
94#endif
95}
96
97static void __init trout_init_late(void)
98{
99 smd_debugfs_init();
100}
101
102MACHINE_START(TROUT, "HTC Dream")
103 .atag_offset = 0x100,
104 .fixup = trout_fixup,
105 .map_io = trout_map_io,
106 .init_early = trout_init_early,
107 .init_irq = trout_init_irq,
108 .init_machine = trout_init,
109 .init_late = trout_init_late,
110 .init_time = msm7x01_timer_init,
111MACHINE_END
diff --git a/arch/arm/mach-msm/board-trout.h b/arch/arm/mach-msm/board-trout.h
deleted file mode 100644
index adb757abbb92..000000000000
--- a/arch/arm/mach-msm/board-trout.h
+++ /dev/null
@@ -1,162 +0,0 @@
1/* linux/arch/arm/mach-msm/board-trout.h
2** Author: Brian Swetland <swetland@google.com>
3*/
4#ifndef __ARCH_ARM_MACH_MSM_BOARD_TROUT_H
5#define __ARCH_ARM_MACH_MSM_BOARD_TROUT_H
6
7#include "common.h"
8
9#define MSM_SMI_BASE 0x00000000
10#define MSM_SMI_SIZE 0x00800000
11
12#define MSM_EBI_BASE 0x10000000
13#define MSM_EBI_SIZE 0x06e00000
14
15#define MSM_PMEM_GPU0_BASE 0x00000000
16#define MSM_PMEM_GPU0_SIZE 0x00700000
17
18#define MSM_PMEM_MDP_BASE 0x02000000
19#define MSM_PMEM_MDP_SIZE 0x00800000
20
21#define MSM_PMEM_ADSP_BASE 0x02800000
22#define MSM_PMEM_ADSP_SIZE 0x00800000
23
24#define MSM_PMEM_CAMERA_BASE 0x03000000
25#define MSM_PMEM_CAMERA_SIZE 0x00800000
26
27#define MSM_FB_BASE 0x03800000
28#define MSM_FB_SIZE 0x00100000
29
30#define MSM_LINUX_BASE MSM_EBI_BASE
31#define MSM_LINUX_SIZE 0x06500000
32
33#define MSM_PMEM_GPU1_SIZE 0x800000
34#define MSM_PMEM_GPU1_BASE (MSM_RAM_CONSOLE_BASE - MSM_PMEM_GPU1_SIZE)
35
36#define MSM_RAM_CONSOLE_BASE (MSM_EBI_BASE + 0x6d00000)
37#define MSM_RAM_CONSOLE_SIZE (128 * SZ_1K)
38
39#if (MSM_FB_BASE + MSM_FB_SIZE) >= (MSM_PMEM_GPU1_BASE)
40#error invalid memory map
41#endif
42
43#define DECLARE_MSM_IOMAP
44#include <mach/msm_iomap.h>
45
46#define TROUT_4_BALL_UP_0 1
47#define TROUT_4_BALL_LEFT_0 18
48#define TROUT_4_BALL_DOWN_0 57
49#define TROUT_4_BALL_RIGHT_0 91
50
51#define TROUT_5_BALL_UP_0 94
52#define TROUT_5_BALL_LEFT_0 18
53#define TROUT_5_BALL_DOWN_0 90
54#define TROUT_5_BALL_RIGHT_0 19
55
56#define TROUT_POWER_KEY 20
57
58#define TROUT_4_TP_LS_EN 19
59#define TROUT_5_TP_LS_EN 1
60
61#define TROUT_CPLD_BASE IOMEM(0xE8100000)
62#define TROUT_CPLD_START 0x98000000
63#define TROUT_CPLD_SIZE SZ_4K
64
65#define TROUT_GPIO_CABLE_IN1 (83)
66#define TROUT_GPIO_CABLE_IN2 (49)
67
68#define TROUT_GPIO_START (128)
69
70#define TROUT_GPIO_INT_MASK0_REG (0x0c)
71#define TROUT_GPIO_INT_STAT0_REG (0x0e)
72#define TROUT_GPIO_INT_MASK1_REG (0x14)
73#define TROUT_GPIO_INT_STAT1_REG (0x10)
74
75#define TROUT_GPIO_HAPTIC_PWM (28)
76#define TROUT_GPIO_PS_HOLD (25)
77
78#define TROUT_GPIO_MISC2_BASE (TROUT_GPIO_START + 0x00)
79#define TROUT_GPIO_MISC3_BASE (TROUT_GPIO_START + 0x08)
80#define TROUT_GPIO_MISC4_BASE (TROUT_GPIO_START + 0x10)
81#define TROUT_GPIO_MISC5_BASE (TROUT_GPIO_START + 0x18)
82#define TROUT_GPIO_INT2_BASE (TROUT_GPIO_START + 0x20)
83#define TROUT_GPIO_MISC1_BASE (TROUT_GPIO_START + 0x28)
84#define TROUT_GPIO_VIRTUAL_BASE (TROUT_GPIO_START + 0x30)
85#define TROUT_GPIO_INT5_BASE (TROUT_GPIO_START + 0x48)
86
87#define TROUT_GPIO_CHARGER_EN (TROUT_GPIO_MISC2_BASE + 0)
88#define TROUT_GPIO_ISET (TROUT_GPIO_MISC2_BASE + 1)
89#define TROUT_GPIO_H2W_DAT_DIR (TROUT_GPIO_MISC2_BASE + 2)
90#define TROUT_GPIO_H2W_CLK_DIR (TROUT_GPIO_MISC2_BASE + 3)
91#define TROUT_GPIO_H2W_DAT_GPO (TROUT_GPIO_MISC2_BASE + 4)
92#define TROUT_GPIO_H2W_CLK_GPO (TROUT_GPIO_MISC2_BASE + 5)
93#define TROUT_GPIO_H2W_SEL0 (TROUT_GPIO_MISC2_BASE + 6)
94#define TROUT_GPIO_H2W_SEL1 (TROUT_GPIO_MISC2_BASE + 7)
95
96#define TROUT_GPIO_SPOTLIGHT_EN (TROUT_GPIO_MISC3_BASE + 0)
97#define TROUT_GPIO_FLASH_EN (TROUT_GPIO_MISC3_BASE + 1)
98#define TROUT_GPIO_I2C_PULL (TROUT_GPIO_MISC3_BASE + 2)
99#define TROUT_GPIO_TP_I2C_PULL (TROUT_GPIO_MISC3_BASE + 3)
100#define TROUT_GPIO_TP_EN (TROUT_GPIO_MISC3_BASE + 4)
101#define TROUT_GPIO_JOG_EN (TROUT_GPIO_MISC3_BASE + 5)
102#define TROUT_GPIO_UI_LED_EN (TROUT_GPIO_MISC3_BASE + 6)
103#define TROUT_GPIO_QTKEY_LED_EN (TROUT_GPIO_MISC3_BASE + 7)
104
105#define TROUT_GPIO_VCM_PWDN (TROUT_GPIO_MISC4_BASE + 0)
106#define TROUT_GPIO_USB_H2W_SW (TROUT_GPIO_MISC4_BASE + 1)
107#define TROUT_GPIO_COMPASS_RST_N (TROUT_GPIO_MISC4_BASE + 2)
108#define TROUT_GPIO_HAPTIC_EN_UP (TROUT_GPIO_MISC4_BASE + 3)
109#define TROUT_GPIO_HAPTIC_EN_MAIN (TROUT_GPIO_MISC4_BASE + 4)
110#define TROUT_GPIO_USB_PHY_RST_N (TROUT_GPIO_MISC4_BASE + 5)
111#define TROUT_GPIO_WIFI_PA_RESETX (TROUT_GPIO_MISC4_BASE + 6)
112#define TROUT_GPIO_WIFI_EN (TROUT_GPIO_MISC4_BASE + 7)
113
114#define TROUT_GPIO_BT_32K_EN (TROUT_GPIO_MISC5_BASE + 0)
115#define TROUT_GPIO_MAC_32K_EN (TROUT_GPIO_MISC5_BASE + 1)
116#define TROUT_GPIO_MDDI_32K_EN (TROUT_GPIO_MISC5_BASE + 2)
117#define TROUT_GPIO_COMPASS_32K_EN (TROUT_GPIO_MISC5_BASE + 3)
118
119#define TROUT_GPIO_NAVI_ACT_N (TROUT_GPIO_INT2_BASE + 0)
120#define TROUT_GPIO_COMPASS_IRQ (TROUT_GPIO_INT2_BASE + 1)
121#define TROUT_GPIO_SLIDING_DET (TROUT_GPIO_INT2_BASE + 2)
122#define TROUT_GPIO_AUD_HSMIC_DET_N (TROUT_GPIO_INT2_BASE + 3)
123#define TROUT_GPIO_SD_DOOR_N (TROUT_GPIO_INT2_BASE + 4)
124#define TROUT_GPIO_CAM_BTN_STEP1_N (TROUT_GPIO_INT2_BASE + 5)
125#define TROUT_GPIO_CAM_BTN_STEP2_N (TROUT_GPIO_INT2_BASE + 6)
126#define TROUT_GPIO_TP_ATT_N (TROUT_GPIO_INT2_BASE + 7)
127#define TROUT_GPIO_BANK0_FIRST_INT_SOURCE (TROUT_GPIO_NAVI_ACT_N)
128#define TROUT_GPIO_BANK0_LAST_INT_SOURCE (TROUT_GPIO_TP_ATT_N)
129
130#define TROUT_GPIO_H2W_DAT_GPI (TROUT_GPIO_MISC1_BASE + 0)
131#define TROUT_GPIO_H2W_CLK_GPI (TROUT_GPIO_MISC1_BASE + 1)
132#define TROUT_GPIO_CPLD128_VER_0 (TROUT_GPIO_MISC1_BASE + 4)
133#define TROUT_GPIO_CPLD128_VER_1 (TROUT_GPIO_MISC1_BASE + 5)
134#define TROUT_GPIO_CPLD128_VER_2 (TROUT_GPIO_MISC1_BASE + 6)
135#define TROUT_GPIO_CPLD128_VER_3 (TROUT_GPIO_MISC1_BASE + 7)
136
137#define TROUT_GPIO_SDMC_CD_N (TROUT_GPIO_VIRTUAL_BASE + 0)
138#define TROUT_GPIO_END (TROUT_GPIO_SDMC_CD_N)
139#define TROUT_GPIO_BANK1_FIRST_INT_SOURCE (TROUT_GPIO_SDMC_CD_N)
140#define TROUT_GPIO_BANK1_LAST_INT_SOURCE (TROUT_GPIO_SDMC_CD_N)
141
142#define TROUT_GPIO_VIRTUAL_TO_REAL_OFFSET \
143 (TROUT_GPIO_INT5_BASE - TROUT_GPIO_VIRTUAL_BASE)
144
145#define TROUT_INT_START (NR_MSM_IRQS + NR_GPIO_IRQS)
146#define TROUT_INT_BANK0_COUNT (8)
147#define TROUT_INT_BANK1_START (TROUT_INT_START + TROUT_INT_BANK0_COUNT)
148#define TROUT_INT_BANK1_COUNT (1)
149#define TROUT_INT_END (TROUT_INT_START + TROUT_INT_BANK0_COUNT + \
150 TROUT_INT_BANK1_COUNT - 1)
151#define TROUT_GPIO_TO_INT(n) (((n) <= TROUT_GPIO_BANK0_LAST_INT_SOURCE) ? \
152 (TROUT_INT_START - TROUT_GPIO_BANK0_FIRST_INT_SOURCE + (n)) : \
153 (TROUT_INT_BANK1_START - TROUT_GPIO_BANK1_FIRST_INT_SOURCE + (n)))
154
155#define TROUT_INT_TO_BANK(n) ((n - TROUT_INT_START) / TROUT_INT_BANK0_COUNT)
156#define TROUT_INT_TO_MASK(n) (1U << ((n - TROUT_INT_START) & 7))
157#define TROUT_BANK_TO_MASK_REG(bank) \
158 (bank ? TROUT_GPIO_INT_MASK1_REG : TROUT_GPIO_INT_MASK0_REG)
159#define TROUT_BANK_TO_STAT_REG(bank) \
160 (bank ? TROUT_GPIO_INT_STAT1_REG : TROUT_GPIO_INT_STAT0_REG)
161
162#endif /* GUARD */
diff --git a/arch/arm/mach-msm/clock-pcom.c b/arch/arm/mach-msm/clock-pcom.c
deleted file mode 100644
index f5b69d736ee5..000000000000
--- a/arch/arm/mach-msm/clock-pcom.c
+++ /dev/null
@@ -1,176 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/err.h>
18#include <linux/platform_device.h>
19#include <linux/module.h>
20#include <linux/clk-provider.h>
21#include <linux/clkdev.h>
22
23#include <mach/clk.h>
24
25#include "proc_comm.h"
26#include "clock.h"
27#include "clock-pcom.h"
28
29struct clk_pcom {
30 unsigned id;
31 unsigned long flags;
32 struct msm_clk msm_clk;
33};
34
35static inline struct clk_pcom *to_clk_pcom(struct clk_hw *hw)
36{
37 return container_of(to_msm_clk(hw), struct clk_pcom, msm_clk);
38}
39
40static int pc_clk_enable(struct clk_hw *hw)
41{
42 unsigned id = to_clk_pcom(hw)->id;
43 int rc = msm_proc_comm(PCOM_CLKCTL_RPC_ENABLE, &id, NULL);
44 if (rc < 0)
45 return rc;
46 else
47 return (int)id < 0 ? -EINVAL : 0;
48}
49
50static void pc_clk_disable(struct clk_hw *hw)
51{
52 unsigned id = to_clk_pcom(hw)->id;
53 msm_proc_comm(PCOM_CLKCTL_RPC_DISABLE, &id, NULL);
54}
55
56static int pc_clk_reset(struct clk_hw *hw, enum clk_reset_action action)
57{
58 int rc;
59 unsigned id = to_clk_pcom(hw)->id;
60
61 if (action == CLK_RESET_ASSERT)
62 rc = msm_proc_comm(PCOM_CLKCTL_RPC_RESET_ASSERT, &id, NULL);
63 else
64 rc = msm_proc_comm(PCOM_CLKCTL_RPC_RESET_DEASSERT, &id, NULL);
65
66 if (rc < 0)
67 return rc;
68 else
69 return (int)id < 0 ? -EINVAL : 0;
70}
71
72static int pc_clk_set_rate(struct clk_hw *hw, unsigned long new_rate,
73 unsigned long p_rate)
74{
75 struct clk_pcom *p = to_clk_pcom(hw);
76 unsigned id = p->id, rate = new_rate;
77 int rc;
78
79 /*
80 * The rate _might_ be rounded off to the nearest KHz value by the
81 * remote function. So a return value of 0 doesn't necessarily mean
82 * that the exact rate was set successfully.
83 */
84 if (p->flags & CLKFLAG_MIN)
85 rc = msm_proc_comm(PCOM_CLKCTL_RPC_MIN_RATE, &id, &rate);
86 else
87 rc = msm_proc_comm(PCOM_CLKCTL_RPC_SET_RATE, &id, &rate);
88 if (rc < 0)
89 return rc;
90 else
91 return (int)id < 0 ? -EINVAL : 0;
92}
93
94static unsigned long pc_clk_recalc_rate(struct clk_hw *hw, unsigned long p_rate)
95{
96 unsigned id = to_clk_pcom(hw)->id;
97 if (msm_proc_comm(PCOM_CLKCTL_RPC_RATE, &id, NULL))
98 return 0;
99 else
100 return id;
101}
102
103static int pc_clk_is_enabled(struct clk_hw *hw)
104{
105 unsigned id = to_clk_pcom(hw)->id;
106 if (msm_proc_comm(PCOM_CLKCTL_RPC_ENABLED, &id, NULL))
107 return 0;
108 else
109 return id;
110}
111
112static long pc_clk_round_rate(struct clk_hw *hw, unsigned long rate,
113 unsigned long *p_rate)
114{
115 /* Not really supported; pc_clk_set_rate() does rounding on it's own. */
116 return rate;
117}
118
119static struct clk_ops clk_ops_pcom = {
120 .enable = pc_clk_enable,
121 .disable = pc_clk_disable,
122 .set_rate = pc_clk_set_rate,
123 .recalc_rate = pc_clk_recalc_rate,
124 .is_enabled = pc_clk_is_enabled,
125 .round_rate = pc_clk_round_rate,
126};
127
128static int msm_clock_pcom_probe(struct platform_device *pdev)
129{
130 const struct pcom_clk_pdata *pdata = pdev->dev.platform_data;
131 int i, ret;
132
133 for (i = 0; i < pdata->num_lookups; i++) {
134 const struct clk_pcom_desc *desc = &pdata->lookup[i];
135 struct clk *c;
136 struct clk_pcom *p;
137 struct clk_hw *hw;
138 struct clk_init_data init;
139
140 p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
141 if (!p)
142 return -ENOMEM;
143
144 p->id = desc->id;
145 p->flags = desc->flags;
146 p->msm_clk.reset = pc_clk_reset;
147
148 hw = &p->msm_clk.hw;
149 hw->init = &init;
150
151 init.name = desc->name;
152 init.ops = &clk_ops_pcom;
153 init.num_parents = 0;
154 init.flags = CLK_IS_ROOT;
155
156 if (!(p->flags & CLKFLAG_AUTO_OFF))
157 init.flags |= CLK_IGNORE_UNUSED;
158
159 c = devm_clk_register(&pdev->dev, hw);
160 ret = clk_register_clkdev(c, desc->con, desc->dev);
161 if (ret)
162 return ret;
163 }
164
165 return 0;
166}
167
168static struct platform_driver msm_clock_pcom_driver = {
169 .probe = msm_clock_pcom_probe,
170 .driver = {
171 .name = "msm-clock-pcom",
172 },
173};
174module_platform_driver(msm_clock_pcom_driver);
175
176MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/mach-msm/clock-pcom.h b/arch/arm/mach-msm/clock-pcom.h
deleted file mode 100644
index 5bb164fd46a8..000000000000
--- a/arch/arm/mach-msm/clock-pcom.h
+++ /dev/null
@@ -1,145 +0,0 @@
1/*
2 * Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#ifndef __ARCH_ARM_MACH_MSM_CLOCK_PCOM_H
15#define __ARCH_ARM_MACH_MSM_CLOCK_PCOM_H
16
17/* clock IDs used by the modem processor */
18
19#define P_ACPU_CLK 0 /* Applications processor clock */
20#define P_ADM_CLK 1 /* Applications data mover clock */
21#define P_ADSP_CLK 2 /* ADSP clock */
22#define P_EBI1_CLK 3 /* External bus interface 1 clock */
23#define P_EBI2_CLK 4 /* External bus interface 2 clock */
24#define P_ECODEC_CLK 5 /* External CODEC clock */
25#define P_EMDH_CLK 6 /* External MDDI host clock */
26#define P_GP_CLK 7 /* General purpose clock */
27#define P_GRP_3D_CLK 8 /* Graphics clock */
28#define P_I2C_CLK 9 /* I2C clock */
29#define P_ICODEC_RX_CLK 10 /* Internal CODEX RX clock */
30#define P_ICODEC_TX_CLK 11 /* Internal CODEX TX clock */
31#define P_IMEM_CLK 12 /* Internal graphics memory clock */
32#define P_MDC_CLK 13 /* MDDI client clock */
33#define P_MDP_CLK 14 /* Mobile display processor clock */
34#define P_PBUS_CLK 15 /* Peripheral bus clock */
35#define P_PCM_CLK 16 /* PCM clock */
36#define P_PMDH_CLK 17 /* Primary MDDI host clock */
37#define P_SDAC_CLK 18 /* Stereo DAC clock */
38#define P_SDC1_CLK 19 /* Secure Digital Card clocks */
39#define P_SDC1_P_CLK 20
40#define P_SDC2_CLK 21
41#define P_SDC2_P_CLK 22
42#define P_SDC3_CLK 23
43#define P_SDC3_P_CLK 24
44#define P_SDC4_CLK 25
45#define P_SDC4_P_CLK 26
46#define P_TSIF_CLK 27 /* Transport Stream Interface clocks */
47#define P_TSIF_REF_CLK 28
48#define P_TV_DAC_CLK 29 /* TV clocks */
49#define P_TV_ENC_CLK 30
50#define P_UART1_CLK 31 /* UART clocks */
51#define P_UART2_CLK 32
52#define P_UART3_CLK 33
53#define P_UART1DM_CLK 34
54#define P_UART2DM_CLK 35
55#define P_USB_HS_CLK 36 /* High speed USB core clock */
56#define P_USB_HS_P_CLK 37 /* High speed USB pbus clock */
57#define P_USB_OTG_CLK 38 /* Full speed USB clock */
58#define P_VDC_CLK 39 /* Video controller clock */
59#define P_VFE_MDC_CLK 40 /* Camera / Video Front End clock */
60#define P_VFE_CLK 41 /* VFE MDDI client clock */
61#define P_MDP_LCDC_PCLK_CLK 42
62#define P_MDP_LCDC_PAD_PCLK_CLK 43
63#define P_MDP_VSYNC_CLK 44
64#define P_SPI_CLK 45
65#define P_VFE_AXI_CLK 46
66#define P_USB_HS2_CLK 47 /* High speed USB 2 core clock */
67#define P_USB_HS2_P_CLK 48 /* High speed USB 2 pbus clock */
68#define P_USB_HS3_CLK 49 /* High speed USB 3 core clock */
69#define P_USB_HS3_P_CLK 50 /* High speed USB 3 pbus clock */
70#define P_GRP_3D_P_CLK 51 /* Graphics pbus clock */
71#define P_USB_PHY_CLK 52 /* USB PHY clock */
72#define P_USB_HS_CORE_CLK 53 /* High speed USB 1 core clock */
73#define P_USB_HS2_CORE_CLK 54 /* High speed USB 2 core clock */
74#define P_USB_HS3_CORE_CLK 55 /* High speed USB 3 core clock */
75#define P_CAM_M_CLK 56
76#define P_CAMIF_PAD_P_CLK 57
77#define P_GRP_2D_CLK 58
78#define P_GRP_2D_P_CLK 59
79#define P_I2S_CLK 60
80#define P_JPEG_CLK 61
81#define P_JPEG_P_CLK 62
82#define P_LPA_CODEC_CLK 63
83#define P_LPA_CORE_CLK 64
84#define P_LPA_P_CLK 65
85#define P_MDC_IO_CLK 66
86#define P_MDC_P_CLK 67
87#define P_MFC_CLK 68
88#define P_MFC_DIV2_CLK 69
89#define P_MFC_P_CLK 70
90#define P_QUP_I2C_CLK 71
91#define P_ROTATOR_IMEM_CLK 72
92#define P_ROTATOR_P_CLK 73
93#define P_VFE_CAMIF_CLK 74
94#define P_VFE_P_CLK 75
95#define P_VPE_CLK 76
96#define P_I2C_2_CLK 77
97#define P_MI2S_CODEC_RX_S_CLK 78
98#define P_MI2S_CODEC_RX_M_CLK 79
99#define P_MI2S_CODEC_TX_S_CLK 80
100#define P_MI2S_CODEC_TX_M_CLK 81
101#define P_PMDH_P_CLK 82
102#define P_EMDH_P_CLK 83
103#define P_SPI_P_CLK 84
104#define P_TSIF_P_CLK 85
105#define P_MDP_P_CLK 86
106#define P_SDAC_M_CLK 87
107#define P_MI2S_S_CLK 88
108#define P_MI2S_M_CLK 89
109#define P_AXI_ROTATOR_CLK 90
110#define P_HDMI_CLK 91
111#define P_CSI0_CLK 92
112#define P_CSI0_VFE_CLK 93
113#define P_CSI0_P_CLK 94
114#define P_CSI1_CLK 95
115#define P_CSI1_VFE_CLK 96
116#define P_CSI1_P_CLK 97
117#define P_GSBI_CLK 98
118#define P_GSBI_P_CLK 99
119#define P_CE_CLK 100 /* Crypto engine */
120#define P_CODEC_SSBI_CLK 101
121
122#define P_NR_CLKS 102
123
124struct clk_pcom_desc {
125 unsigned id;
126 const char *name;
127 const char *con;
128 const char *dev;
129 unsigned long flags;
130};
131
132struct pcom_clk_pdata {
133 struct clk_pcom_desc *lookup;
134 u32 num_lookups;
135};
136
137#define CLK_PCOM(clk_name, clk_id, clk_dev, clk_flags) { \
138 .id = P_##clk_id, \
139 .name = #clk_id, \
140 .con = clk_name, \
141 .dev = clk_dev, \
142 .flags = clk_flags, \
143 }
144
145#endif
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c
deleted file mode 100644
index 35ea02b52483..000000000000
--- a/arch/arm/mach-msm/clock.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/* arch/arm/mach-msm/clock.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/clk-provider.h>
18#include <linux/module.h>
19
20#include "clock.h"
21
22int clk_reset(struct clk *clk, enum clk_reset_action action)
23{
24 struct clk_hw *hw = __clk_get_hw(clk);
25 struct msm_clk *m = to_msm_clk(hw);
26 return m->reset(hw, action);
27}
28EXPORT_SYMBOL(clk_reset);
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
deleted file mode 100644
index 42d29dd7aafc..000000000000
--- a/arch/arm/mach-msm/clock.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/* arch/arm/mach-msm/clock.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2007-2012, The Linux Foundation. All rights reserved.
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ARCH_ARM_MACH_MSM_CLOCK_H
18#define __ARCH_ARM_MACH_MSM_CLOCK_H
19
20#include <linux/clk-provider.h>
21#include <mach/clk.h>
22
23#define CLK_FIRST_AVAILABLE_FLAG 0x00000100
24#define CLKFLAG_AUTO_OFF 0x00000200
25#define CLKFLAG_MIN 0x00000400
26#define CLKFLAG_MAX 0x00000800
27
28#define OFF CLKFLAG_AUTO_OFF
29#define CLK_MIN CLKFLAG_MIN
30#define CLK_MAX CLKFLAG_MAX
31#define CLK_MINMAX (CLK_MIN | CLK_MAX)
32
33struct msm_clk {
34 int (*reset)(struct clk_hw *hw, enum clk_reset_action action);
35 struct clk_hw hw;
36};
37
38static inline struct msm_clk *to_msm_clk(struct clk_hw *hw)
39{
40 return container_of(hw, struct msm_clk, hw);
41}
42
43#endif
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
deleted file mode 100644
index 572479a3c7be..000000000000
--- a/arch/arm/mach-msm/common.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef __MACH_COMMON_H
13#define __MACH_COMMON_H
14
15extern void msm7x01_timer_init(void);
16extern void msm7x30_timer_init(void);
17extern void qsd8x50_timer_init(void);
18
19extern void msm_map_common_io(void);
20extern void msm_map_msm7x30_io(void);
21extern void msm_map_qsd8x50_io(void);
22
23extern void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
24 unsigned int mtype, void *caller);
25
26struct msm_mmc_platform_data;
27
28extern void msm_add_devices(void);
29extern void msm_init_irq(void);
30extern void msm_init_gpio(void);
31extern int msm_add_sdcc(unsigned int controller,
32 struct msm_mmc_platform_data *plat,
33 unsigned int stat_irq, unsigned long stat_irq_flags);
34
35#if defined(CONFIG_MSM_SMD) && defined(CONFIG_DEBUG_FS)
36extern int smd_debugfs_init(void);
37#else
38static inline int smd_debugfs_init(void) { return 0; }
39#endif
40
41#endif
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c
deleted file mode 100644
index d83404d4b328..000000000000
--- a/arch/arm/mach-msm/devices-msm7x00.c
+++ /dev/null
@@ -1,480 +0,0 @@
1/* linux/arch/arm/mach-msm/devices.c
2 *
3 * Copyright (C) 2008 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18#include <linux/clkdev.h>
19
20#include <mach/irqs.h>
21#include <mach/msm_iomap.h>
22#include "devices.h"
23
24#include <asm/mach/flash.h>
25#include <linux/mtd/nand.h>
26#include <linux/mtd/partitions.h>
27
28#include "clock.h"
29#include "clock-pcom.h"
30#include <linux/platform_data/mmc-msm_sdcc.h>
31
32static struct resource msm_gpio_resources[] = {
33 {
34 .start = 32 + 0,
35 .end = 32 + 0,
36 .flags = IORESOURCE_IRQ,
37 },
38 {
39 .start = 32 + 1,
40 .end = 32 + 1,
41 .flags = IORESOURCE_IRQ,
42 },
43 {
44 .start = 0xa9200800,
45 .end = 0xa9200800 + SZ_4K - 1,
46 .flags = IORESOURCE_MEM,
47 .name = "gpio1"
48 },
49 {
50 .start = 0xa9300C00,
51 .end = 0xa9300C00 + SZ_4K - 1,
52 .flags = IORESOURCE_MEM,
53 .name = "gpio2"
54 },
55};
56
57struct platform_device msm_device_gpio_7201 = {
58 .name = "gpio-msm-7201",
59 .num_resources = ARRAY_SIZE(msm_gpio_resources),
60 .resource = msm_gpio_resources,
61};
62
63static struct resource resources_uart1[] = {
64 {
65 .start = INT_UART1,
66 .end = INT_UART1,
67 .flags = IORESOURCE_IRQ,
68 },
69 {
70 .start = MSM_UART1_PHYS,
71 .end = MSM_UART1_PHYS + MSM_UART1_SIZE - 1,
72 .flags = IORESOURCE_MEM,
73 .name = "uart_resource"
74 },
75};
76
77static struct resource resources_uart2[] = {
78 {
79 .start = INT_UART2,
80 .end = INT_UART2,
81 .flags = IORESOURCE_IRQ,
82 },
83 {
84 .start = MSM_UART2_PHYS,
85 .end = MSM_UART2_PHYS + MSM_UART2_SIZE - 1,
86 .flags = IORESOURCE_MEM,
87 .name = "uart_resource"
88 },
89};
90
91static struct resource resources_uart3[] = {
92 {
93 .start = INT_UART3,
94 .end = INT_UART3,
95 .flags = IORESOURCE_IRQ,
96 },
97 {
98 .start = MSM_UART3_PHYS,
99 .end = MSM_UART3_PHYS + MSM_UART3_SIZE - 1,
100 .flags = IORESOURCE_MEM,
101 .name = "uart_resource"
102 },
103};
104
105struct platform_device msm_device_uart1 = {
106 .name = "msm_serial",
107 .id = 0,
108 .num_resources = ARRAY_SIZE(resources_uart1),
109 .resource = resources_uart1,
110};
111
112struct platform_device msm_device_uart2 = {
113 .name = "msm_serial",
114 .id = 1,
115 .num_resources = ARRAY_SIZE(resources_uart2),
116 .resource = resources_uart2,
117};
118
119struct platform_device msm_device_uart3 = {
120 .name = "msm_serial",
121 .id = 2,
122 .num_resources = ARRAY_SIZE(resources_uart3),
123 .resource = resources_uart3,
124};
125
126static struct resource resources_i2c[] = {
127 {
128 .start = MSM_I2C_PHYS,
129 .end = MSM_I2C_PHYS + MSM_I2C_SIZE - 1,
130 .flags = IORESOURCE_MEM,
131 },
132 {
133 .start = INT_PWB_I2C,
134 .end = INT_PWB_I2C,
135 .flags = IORESOURCE_IRQ,
136 },
137};
138
139struct platform_device msm_device_i2c = {
140 .name = "msm_i2c",
141 .id = 0,
142 .num_resources = ARRAY_SIZE(resources_i2c),
143 .resource = resources_i2c,
144};
145
146static struct resource resources_hsusb[] = {
147 {
148 .start = MSM_HSUSB_PHYS,
149 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
150 .flags = IORESOURCE_MEM,
151 },
152 {
153 .start = INT_USB_HS,
154 .end = INT_USB_HS,
155 .flags = IORESOURCE_IRQ,
156 },
157};
158
159struct platform_device msm_device_hsusb = {
160 .name = "msm_hsusb",
161 .id = -1,
162 .num_resources = ARRAY_SIZE(resources_hsusb),
163 .resource = resources_hsusb,
164 .dev = {
165 .coherent_dma_mask = 0xffffffff,
166 },
167};
168
169struct flash_platform_data msm_nand_data = {
170 .parts = NULL,
171 .nr_parts = 0,
172};
173
174static struct resource resources_nand[] = {
175 [0] = {
176 .start = 7,
177 .end = 7,
178 .flags = IORESOURCE_DMA,
179 },
180};
181
182struct platform_device msm_device_nand = {
183 .name = "msm_nand",
184 .id = -1,
185 .num_resources = ARRAY_SIZE(resources_nand),
186 .resource = resources_nand,
187 .dev = {
188 .platform_data = &msm_nand_data,
189 },
190};
191
192struct platform_device msm_device_smd = {
193 .name = "msm_smd",
194 .id = -1,
195};
196
197static struct resource resources_sdc1[] = {
198 {
199 .start = MSM_SDC1_PHYS,
200 .end = MSM_SDC1_PHYS + MSM_SDC1_SIZE - 1,
201 .flags = IORESOURCE_MEM,
202 },
203 {
204 .start = INT_SDC1_0,
205 .end = INT_SDC1_0,
206 .flags = IORESOURCE_IRQ,
207 .name = "cmd_irq",
208 },
209 {
210 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
211 .name = "status_irq"
212 },
213 {
214 .start = 8,
215 .end = 8,
216 .flags = IORESOURCE_DMA,
217 },
218};
219
220static struct resource resources_sdc2[] = {
221 {
222 .start = MSM_SDC2_PHYS,
223 .end = MSM_SDC2_PHYS + MSM_SDC2_SIZE - 1,
224 .flags = IORESOURCE_MEM,
225 },
226 {
227 .start = INT_SDC2_0,
228 .end = INT_SDC2_0,
229 .flags = IORESOURCE_IRQ,
230 .name = "cmd_irq",
231 },
232 {
233 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
234 .name = "status_irq"
235 },
236 {
237 .start = 8,
238 .end = 8,
239 .flags = IORESOURCE_DMA,
240 },
241};
242
243static struct resource resources_sdc3[] = {
244 {
245 .start = MSM_SDC3_PHYS,
246 .end = MSM_SDC3_PHYS + MSM_SDC3_SIZE - 1,
247 .flags = IORESOURCE_MEM,
248 },
249 {
250 .start = INT_SDC3_0,
251 .end = INT_SDC3_0,
252 .flags = IORESOURCE_IRQ,
253 .name = "cmd_irq",
254 },
255 {
256 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
257 .name = "status_irq"
258 },
259 {
260 .start = 8,
261 .end = 8,
262 .flags = IORESOURCE_DMA,
263 },
264};
265
266static struct resource resources_sdc4[] = {
267 {
268 .start = MSM_SDC4_PHYS,
269 .end = MSM_SDC4_PHYS + MSM_SDC4_SIZE - 1,
270 .flags = IORESOURCE_MEM,
271 },
272 {
273 .start = INT_SDC4_0,
274 .end = INT_SDC4_0,
275 .flags = IORESOURCE_IRQ,
276 .name = "cmd_irq",
277 },
278 {
279 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
280 .name = "status_irq"
281 },
282 {
283 .start = 8,
284 .end = 8,
285 .flags = IORESOURCE_DMA,
286 },
287};
288
289struct platform_device msm_device_sdc1 = {
290 .name = "msm_sdcc",
291 .id = 1,
292 .num_resources = ARRAY_SIZE(resources_sdc1),
293 .resource = resources_sdc1,
294 .dev = {
295 .coherent_dma_mask = 0xffffffff,
296 },
297};
298
299struct platform_device msm_device_sdc2 = {
300 .name = "msm_sdcc",
301 .id = 2,
302 .num_resources = ARRAY_SIZE(resources_sdc2),
303 .resource = resources_sdc2,
304 .dev = {
305 .coherent_dma_mask = 0xffffffff,
306 },
307};
308
309struct platform_device msm_device_sdc3 = {
310 .name = "msm_sdcc",
311 .id = 3,
312 .num_resources = ARRAY_SIZE(resources_sdc3),
313 .resource = resources_sdc3,
314 .dev = {
315 .coherent_dma_mask = 0xffffffff,
316 },
317};
318
319struct platform_device msm_device_sdc4 = {
320 .name = "msm_sdcc",
321 .id = 4,
322 .num_resources = ARRAY_SIZE(resources_sdc4),
323 .resource = resources_sdc4,
324 .dev = {
325 .coherent_dma_mask = 0xffffffff,
326 },
327};
328
329static struct platform_device *msm_sdcc_devices[] __initdata = {
330 &msm_device_sdc1,
331 &msm_device_sdc2,
332 &msm_device_sdc3,
333 &msm_device_sdc4,
334};
335
336int __init msm_add_sdcc(unsigned int controller,
337 struct msm_mmc_platform_data *plat,
338 unsigned int stat_irq, unsigned long stat_irq_flags)
339{
340 struct platform_device *pdev;
341 struct resource *res;
342
343 if (controller < 1 || controller > 4)
344 return -EINVAL;
345
346 pdev = msm_sdcc_devices[controller-1];
347 pdev->dev.platform_data = plat;
348
349 res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "status_irq");
350 if (!res)
351 return -EINVAL;
352 else if (stat_irq) {
353 res->start = res->end = stat_irq;
354 res->flags &= ~IORESOURCE_DISABLED;
355 res->flags |= stat_irq_flags;
356 }
357
358 return platform_device_register(pdev);
359}
360
361static struct resource resources_mddi0[] = {
362 {
363 .start = MSM_PMDH_PHYS,
364 .end = MSM_PMDH_PHYS + MSM_PMDH_SIZE - 1,
365 .flags = IORESOURCE_MEM,
366 },
367 {
368 .start = INT_MDDI_PRI,
369 .end = INT_MDDI_PRI,
370 .flags = IORESOURCE_IRQ,
371 },
372};
373
374static struct resource resources_mddi1[] = {
375 {
376 .start = MSM_EMDH_PHYS,
377 .end = MSM_EMDH_PHYS + MSM_EMDH_SIZE - 1,
378 .flags = IORESOURCE_MEM,
379 },
380 {
381 .start = INT_MDDI_EXT,
382 .end = INT_MDDI_EXT,
383 .flags = IORESOURCE_IRQ,
384 },
385};
386
387struct platform_device msm_device_mddi0 = {
388 .name = "msm_mddi",
389 .id = 0,
390 .num_resources = ARRAY_SIZE(resources_mddi0),
391 .resource = resources_mddi0,
392 .dev = {
393 .coherent_dma_mask = 0xffffffff,
394 },
395};
396
397struct platform_device msm_device_mddi1 = {
398 .name = "msm_mddi",
399 .id = 1,
400 .num_resources = ARRAY_SIZE(resources_mddi1),
401 .resource = resources_mddi1,
402 .dev = {
403 .coherent_dma_mask = 0xffffffff,
404 },
405};
406
407static struct resource resources_mdp[] = {
408 {
409 .start = MSM_MDP_PHYS,
410 .end = MSM_MDP_PHYS + MSM_MDP_SIZE - 1,
411 .name = "mdp",
412 .flags = IORESOURCE_MEM
413 },
414 {
415 .start = INT_MDP,
416 .end = INT_MDP,
417 .flags = IORESOURCE_IRQ,
418 },
419};
420
421struct platform_device msm_device_mdp = {
422 .name = "msm_mdp",
423 .id = 0,
424 .num_resources = ARRAY_SIZE(resources_mdp),
425 .resource = resources_mdp,
426};
427
428static struct clk_pcom_desc msm_clocks_7x01a[] = {
429 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
430 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0),
431 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, 0),
432 CLK_PCOM("ebi2_clk", EBI2_CLK, NULL, 0),
433 CLK_PCOM("ecodec_clk", ECODEC_CLK, NULL, 0),
434 CLK_PCOM("emdh_clk", EMDH_CLK, NULL, OFF),
435 CLK_PCOM("gp_clk", GP_CLK, NULL, 0),
436 CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, OFF),
437 CLK_PCOM("i2c_clk", I2C_CLK, "msm_i2c.0", 0),
438 CLK_PCOM("icodec_rx_clk", ICODEC_RX_CLK, NULL, 0),
439 CLK_PCOM("icodec_tx_clk", ICODEC_TX_CLK, NULL, 0),
440 CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF),
441 CLK_PCOM("mdc_clk", MDC_CLK, NULL, 0),
442 CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
443 CLK_PCOM("pbus_clk", PBUS_CLK, NULL, 0),
444 CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
445 CLK_PCOM("mddi_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
446 CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
447 CLK_PCOM("sdc_clk", SDC1_CLK, "msm_sdcc.1", OFF),
448 CLK_PCOM("sdc_pclk", SDC1_P_CLK, "msm_sdcc.1", OFF),
449 CLK_PCOM("sdc_clk", SDC2_CLK, "msm_sdcc.2", OFF),
450 CLK_PCOM("sdc_pclk", SDC2_P_CLK, "msm_sdcc.2", OFF),
451 CLK_PCOM("sdc_clk", SDC3_CLK, "msm_sdcc.3", OFF),
452 CLK_PCOM("sdc_pclk", SDC3_P_CLK, "msm_sdcc.3", OFF),
453 CLK_PCOM("sdc_clk", SDC4_CLK, "msm_sdcc.4", OFF),
454 CLK_PCOM("sdc_pclk", SDC4_P_CLK, "msm_sdcc.4", OFF),
455 CLK_PCOM("tsif_clk", TSIF_CLK, NULL, 0),
456 CLK_PCOM("tsif_ref_clk", TSIF_REF_CLK, NULL, 0),
457 CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0),
458 CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0),
459 CLK_PCOM("core", UART1_CLK, "msm_serial.0", OFF),
460 CLK_PCOM("core", UART2_CLK, "msm_serial.1", 0),
461 CLK_PCOM("core", UART3_CLK, "msm_serial.2", OFF),
462 CLK_PCOM("uart1dm_clk", UART1DM_CLK, NULL, OFF),
463 CLK_PCOM("uart2dm_clk", UART2DM_CLK, NULL, 0),
464 CLK_PCOM("usb_hs_clk", USB_HS_CLK, "msm_hsusb", OFF),
465 CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, "msm_hsusb", OFF),
466 CLK_PCOM("usb_otg_clk", USB_OTG_CLK, NULL, 0),
467 CLK_PCOM("vdc_clk", VDC_CLK, NULL, OFF ),
468 CLK_PCOM("vfe_clk", VFE_CLK, NULL, OFF),
469 CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, OFF),
470};
471
472static struct pcom_clk_pdata msm_clock_7x01a_pdata = {
473 .lookup = msm_clocks_7x01a,
474 .num_lookups = ARRAY_SIZE(msm_clocks_7x01a),
475};
476
477struct platform_device msm_clock_7x01a = {
478 .name = "msm-clock-pcom",
479 .dev.platform_data = &msm_clock_7x01a_pdata,
480};
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
deleted file mode 100644
index c15ea8ab20a7..000000000000
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ /dev/null
@@ -1,246 +0,0 @@
1/*
2 * Copyright (C) 2008 Google, Inc.
3 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18
19#include <linux/dma-mapping.h>
20#include <linux/clkdev.h>
21#include <mach/irqs.h>
22#include <mach/msm_iomap.h>
23#include <mach/dma.h>
24
25#include "devices.h"
26#include "smd_private.h"
27#include "common.h"
28
29#include <asm/mach/flash.h>
30
31#include "clock.h"
32#include "clock-pcom.h"
33
34#include <linux/platform_data/mmc-msm_sdcc.h>
35
36static struct resource msm_gpio_resources[] = {
37 {
38 .start = 32 + 18,
39 .end = 32 + 18,
40 .flags = IORESOURCE_IRQ,
41 },
42 {
43 .start = 32 + 19,
44 .end = 32 + 19,
45 .flags = IORESOURCE_IRQ,
46 },
47 {
48 .start = 0xac001000,
49 .end = 0xac001000 + SZ_4K - 1,
50 .flags = IORESOURCE_MEM,
51 .name = "gpio1"
52 },
53 {
54 .start = 0xac101400,
55 .end = 0xac101400 + SZ_4K - 1,
56 .flags = IORESOURCE_MEM,
57 .name = "gpio2"
58 },
59};
60
61struct platform_device msm_device_gpio_7x30 = {
62 .name = "gpio-msm-7x30",
63 .num_resources = ARRAY_SIZE(msm_gpio_resources),
64 .resource = msm_gpio_resources,
65};
66
67static struct resource resources_uart2[] = {
68 {
69 .start = INT_UART2,
70 .end = INT_UART2,
71 .flags = IORESOURCE_IRQ,
72 },
73 {
74 .start = MSM_UART2_PHYS,
75 .end = MSM_UART2_PHYS + MSM_UART2_SIZE - 1,
76 .flags = IORESOURCE_MEM,
77 .name = "uart_resource"
78 },
79};
80
81struct platform_device msm_device_uart2 = {
82 .name = "msm_serial",
83 .id = 1,
84 .num_resources = ARRAY_SIZE(resources_uart2),
85 .resource = resources_uart2,
86};
87
88struct platform_device msm_device_smd = {
89 .name = "msm_smd",
90 .id = -1,
91};
92
93static struct resource resources_otg[] = {
94 {
95 .start = MSM_HSUSB_PHYS,
96 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
97 .flags = IORESOURCE_MEM,
98 },
99 {
100 .start = INT_USB_HS,
101 .end = INT_USB_HS,
102 .flags = IORESOURCE_IRQ,
103 },
104};
105
106struct platform_device msm_device_otg = {
107 .name = "msm_otg",
108 .id = -1,
109 .num_resources = ARRAY_SIZE(resources_otg),
110 .resource = resources_otg,
111 .dev = {
112 .coherent_dma_mask = 0xffffffff,
113 },
114};
115
116static struct resource resources_hsusb[] = {
117 {
118 .start = MSM_HSUSB_PHYS,
119 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
120 .flags = IORESOURCE_MEM,
121 },
122 {
123 .start = INT_USB_HS,
124 .end = INT_USB_HS,
125 .flags = IORESOURCE_IRQ,
126 },
127};
128
129struct platform_device msm_device_hsusb = {
130 .name = "msm_hsusb",
131 .id = -1,
132 .num_resources = ARRAY_SIZE(resources_hsusb),
133 .resource = resources_hsusb,
134 .dev = {
135 .coherent_dma_mask = 0xffffffff,
136 },
137};
138
139static u64 dma_mask = 0xffffffffULL;
140static struct resource resources_hsusb_host[] = {
141 {
142 .start = MSM_HSUSB_PHYS,
143 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
144 .flags = IORESOURCE_MEM,
145 },
146 {
147 .start = INT_USB_HS,
148 .end = INT_USB_HS,
149 .flags = IORESOURCE_IRQ,
150 },
151};
152
153struct platform_device msm_device_hsusb_host = {
154 .name = "msm_hsusb_host",
155 .id = -1,
156 .num_resources = ARRAY_SIZE(resources_hsusb_host),
157 .resource = resources_hsusb_host,
158 .dev = {
159 .dma_mask = &dma_mask,
160 .coherent_dma_mask = 0xffffffffULL,
161 },
162};
163
164static struct clk_pcom_desc msm_clocks_7x30[] = {
165 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
166 CLK_PCOM("adsp_clk", ADSP_CLK, NULL, 0),
167 CLK_PCOM("cam_m_clk", CAM_M_CLK, NULL, 0),
168 CLK_PCOM("camif_pad_pclk", CAMIF_PAD_P_CLK, NULL, OFF),
169 CLK_PCOM("ce_clk", CE_CLK, NULL, 0),
170 CLK_PCOM("codec_ssbi_clk", CODEC_SSBI_CLK, NULL, 0),
171 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, CLK_MIN),
172 CLK_PCOM("ecodec_clk", ECODEC_CLK, NULL, 0),
173 CLK_PCOM("emdh_clk", EMDH_CLK, NULL, OFF | CLK_MINMAX),
174 CLK_PCOM("emdh_pclk", EMDH_P_CLK, NULL, OFF),
175 CLK_PCOM("gp_clk", GP_CLK, NULL, 0),
176 CLK_PCOM("grp_2d_clk", GRP_2D_CLK, NULL, 0),
177 CLK_PCOM("grp_2d_pclk", GRP_2D_P_CLK, NULL, 0),
178 CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, 0),
179 CLK_PCOM("grp_pclk", GRP_3D_P_CLK, NULL, 0),
180 CLK_PCOM("hdmi_clk", HDMI_CLK, NULL, 0),
181 CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF),
182 CLK_PCOM("jpeg_clk", JPEG_CLK, NULL, OFF),
183 CLK_PCOM("jpeg_pclk", JPEG_P_CLK, NULL, OFF),
184 CLK_PCOM("lpa_codec_clk", LPA_CODEC_CLK, NULL, 0),
185 CLK_PCOM("lpa_core_clk", LPA_CORE_CLK, NULL, 0),
186 CLK_PCOM("lpa_pclk", LPA_P_CLK, NULL, 0),
187 CLK_PCOM("mdc_clk", MDC_CLK, NULL, 0),
188 CLK_PCOM("mddi_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
189 CLK_PCOM("mddi_pclk", PMDH_P_CLK, NULL, 0),
190 CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
191 CLK_PCOM("mdp_pclk", MDP_P_CLK, NULL, 0),
192 CLK_PCOM("mdp_lcdc_pclk_clk", MDP_LCDC_PCLK_CLK, NULL, 0),
193 CLK_PCOM("mdp_lcdc_pad_pclk_clk", MDP_LCDC_PAD_PCLK_CLK, NULL, 0),
194 CLK_PCOM("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, 0),
195 CLK_PCOM("mfc_clk", MFC_CLK, NULL, 0),
196 CLK_PCOM("mfc_div2_clk", MFC_DIV2_CLK, NULL, 0),
197 CLK_PCOM("mfc_pclk", MFC_P_CLK, NULL, 0),
198 CLK_PCOM("mi2s_m_clk", MI2S_M_CLK, NULL, 0),
199 CLK_PCOM("mi2s_s_clk", MI2S_S_CLK, NULL, 0),
200 CLK_PCOM("mi2s_codec_rx_m_clk", MI2S_CODEC_RX_M_CLK, NULL, 0),
201 CLK_PCOM("mi2s_codec_rx_s_clk", MI2S_CODEC_RX_S_CLK, NULL, 0),
202 CLK_PCOM("mi2s_codec_tx_m_clk", MI2S_CODEC_TX_M_CLK, NULL, 0),
203 CLK_PCOM("mi2s_codec_tx_s_clk", MI2S_CODEC_TX_S_CLK, NULL, 0),
204 CLK_PCOM("pbus_clk", PBUS_CLK, NULL, CLK_MIN),
205 CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
206 CLK_PCOM("rotator_clk", AXI_ROTATOR_CLK, NULL, 0),
207 CLK_PCOM("rotator_imem_clk", ROTATOR_IMEM_CLK, NULL, OFF),
208 CLK_PCOM("rotator_pclk", ROTATOR_P_CLK, NULL, OFF),
209 CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
210 CLK_PCOM("spi_clk", SPI_CLK, NULL, 0),
211 CLK_PCOM("spi_pclk", SPI_P_CLK, NULL, 0),
212 CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0),
213 CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0),
214 CLK_PCOM("core", UART2_CLK, "msm_serial.1", 0),
215 CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0),
216 CLK_PCOM("usb_hs_clk", USB_HS_CLK, NULL, OFF),
217 CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, NULL, OFF),
218 CLK_PCOM("usb_hs_core_clk", USB_HS_CORE_CLK, NULL, OFF),
219 CLK_PCOM("usb_hs2_clk", USB_HS2_CLK, NULL, OFF),
220 CLK_PCOM("usb_hs2_pclk", USB_HS2_P_CLK, NULL, OFF),
221 CLK_PCOM("usb_hs2_core_clk", USB_HS2_CORE_CLK, NULL, OFF),
222 CLK_PCOM("usb_hs3_clk", USB_HS3_CLK, NULL, OFF),
223 CLK_PCOM("usb_hs3_pclk", USB_HS3_P_CLK, NULL, OFF),
224 CLK_PCOM("usb_hs3_core_clk", USB_HS3_CORE_CLK, NULL, OFF),
225 CLK_PCOM("vdc_clk", VDC_CLK, NULL, OFF | CLK_MIN),
226 CLK_PCOM("vfe_camif_clk", VFE_CAMIF_CLK, NULL, 0),
227 CLK_PCOM("vfe_clk", VFE_CLK, NULL, 0),
228 CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, 0),
229 CLK_PCOM("vfe_pclk", VFE_P_CLK, NULL, OFF),
230 CLK_PCOM("vpe_clk", VPE_CLK, NULL, 0),
231
232 /* 7x30 v2 hardware only. */
233 CLK_PCOM("csi_clk", CSI0_CLK, NULL, 0),
234 CLK_PCOM("csi_pclk", CSI0_P_CLK, NULL, 0),
235 CLK_PCOM("csi_vfe_clk", CSI0_VFE_CLK, NULL, 0),
236};
237
238static struct pcom_clk_pdata msm_clock_7x30_pdata = {
239 .lookup = msm_clocks_7x30,
240 .num_lookups = ARRAY_SIZE(msm_clocks_7x30),
241};
242
243struct platform_device msm_clock_7x30 = {
244 .name = "msm-clock-pcom",
245 .dev.platform_data = &msm_clock_7x30_pdata,
246};
diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c
deleted file mode 100644
index 9e1e9ce07b1a..000000000000
--- a/arch/arm/mach-msm/devices-qsd8x50.c
+++ /dev/null
@@ -1,388 +0,0 @@
1/*
2 * Copyright (C) 2008 Google, Inc.
3 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18#include <linux/clkdev.h>
19#include <linux/dma-mapping.h>
20
21#include <mach/irqs.h>
22#include <mach/msm_iomap.h>
23#include <mach/dma.h>
24
25#include "devices.h"
26#include "common.h"
27
28#include <asm/mach/flash.h>
29
30#include <linux/platform_data/mmc-msm_sdcc.h>
31#include "clock.h"
32#include "clock-pcom.h"
33
34static struct resource msm_gpio_resources[] = {
35 {
36 .start = 64 + 165 + 9,
37 .end = 64 + 165 + 9,
38 .flags = IORESOURCE_IRQ,
39 },
40 {
41 .start = 64 + 165 + 10,
42 .end = 64 + 165 + 10,
43 .flags = IORESOURCE_IRQ,
44 },
45 {
46 .start = 0xa9000800,
47 .end = 0xa9000800 + SZ_4K - 1,
48 .flags = IORESOURCE_MEM,
49 .name = "gpio1"
50 },
51 {
52 .start = 0xa9100C00,
53 .end = 0xa9100C00 + SZ_4K - 1,
54 .flags = IORESOURCE_MEM,
55 .name = "gpio2"
56 },
57};
58
59struct platform_device msm_device_gpio_8x50 = {
60 .name = "gpio-msm-8x50",
61 .num_resources = ARRAY_SIZE(msm_gpio_resources),
62 .resource = msm_gpio_resources,
63};
64
65static struct resource resources_uart3[] = {
66 {
67 .start = INT_UART3,
68 .end = INT_UART3,
69 .flags = IORESOURCE_IRQ,
70 },
71 {
72 .start = MSM_UART3_PHYS,
73 .end = MSM_UART3_PHYS + MSM_UART3_SIZE - 1,
74 .flags = IORESOURCE_MEM,
75 .name = "uart_resource"
76 },
77};
78
79struct platform_device msm_device_uart3 = {
80 .name = "msm_serial",
81 .id = 2,
82 .num_resources = ARRAY_SIZE(resources_uart3),
83 .resource = resources_uart3,
84};
85
86struct platform_device msm_device_smd = {
87 .name = "msm_smd",
88 .id = -1,
89};
90
91static struct resource resources_otg[] = {
92 {
93 .start = MSM_HSUSB_PHYS,
94 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
95 .flags = IORESOURCE_MEM,
96 },
97 {
98 .start = INT_USB_HS,
99 .end = INT_USB_HS,
100 .flags = IORESOURCE_IRQ,
101 },
102};
103
104struct platform_device msm_device_otg = {
105 .name = "msm_otg",
106 .id = -1,
107 .num_resources = ARRAY_SIZE(resources_otg),
108 .resource = resources_otg,
109 .dev = {
110 .coherent_dma_mask = 0xffffffff,
111 },
112};
113
114static struct resource resources_hsusb[] = {
115 {
116 .start = MSM_HSUSB_PHYS,
117 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
118 .flags = IORESOURCE_MEM,
119 },
120 {
121 .start = INT_USB_HS,
122 .end = INT_USB_HS,
123 .flags = IORESOURCE_IRQ,
124 },
125};
126
127struct platform_device msm_device_hsusb = {
128 .name = "msm_hsusb",
129 .id = -1,
130 .num_resources = ARRAY_SIZE(resources_hsusb),
131 .resource = resources_hsusb,
132 .dev = {
133 .coherent_dma_mask = 0xffffffff,
134 },
135};
136
137static u64 dma_mask = 0xffffffffULL;
138static struct resource resources_hsusb_host[] = {
139 {
140 .start = MSM_HSUSB_PHYS,
141 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
142 .flags = IORESOURCE_MEM,
143 },
144 {
145 .start = INT_USB_HS,
146 .end = INT_USB_HS,
147 .flags = IORESOURCE_IRQ,
148 },
149};
150
151struct platform_device msm_device_hsusb_host = {
152 .name = "msm_hsusb_host",
153 .id = -1,
154 .num_resources = ARRAY_SIZE(resources_hsusb_host),
155 .resource = resources_hsusb_host,
156 .dev = {
157 .dma_mask = &dma_mask,
158 .coherent_dma_mask = 0xffffffffULL,
159 },
160};
161
162static struct resource resources_sdc1[] = {
163 {
164 .start = MSM_SDC1_PHYS,
165 .end = MSM_SDC1_PHYS + MSM_SDC1_SIZE - 1,
166 .flags = IORESOURCE_MEM,
167 },
168 {
169 .start = INT_SDC1_0,
170 .end = INT_SDC1_0,
171 .flags = IORESOURCE_IRQ,
172 .name = "cmd_irq",
173 },
174 {
175 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
176 .name = "status_irq"
177 },
178 {
179 .start = 8,
180 .end = 8,
181 .flags = IORESOURCE_DMA,
182 },
183};
184
185static struct resource resources_sdc2[] = {
186 {
187 .start = MSM_SDC2_PHYS,
188 .end = MSM_SDC2_PHYS + MSM_SDC2_SIZE - 1,
189 .flags = IORESOURCE_MEM,
190 },
191 {
192 .start = INT_SDC2_0,
193 .end = INT_SDC2_0,
194 .flags = IORESOURCE_IRQ,
195 .name = "cmd_irq",
196 },
197 {
198 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
199 .name = "status_irq"
200 },
201 {
202 .start = 8,
203 .end = 8,
204 .flags = IORESOURCE_DMA,
205 },
206};
207
208static struct resource resources_sdc3[] = {
209 {
210 .start = MSM_SDC3_PHYS,
211 .end = MSM_SDC3_PHYS + MSM_SDC3_SIZE - 1,
212 .flags = IORESOURCE_MEM,
213 },
214 {
215 .start = INT_SDC3_0,
216 .end = INT_SDC3_0,
217 .flags = IORESOURCE_IRQ,
218 .name = "cmd_irq",
219 },
220 {
221 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
222 .name = "status_irq"
223 },
224 {
225 .start = 8,
226 .end = 8,
227 .flags = IORESOURCE_DMA,
228 },
229};
230
231static struct resource resources_sdc4[] = {
232 {
233 .start = MSM_SDC4_PHYS,
234 .end = MSM_SDC4_PHYS + MSM_SDC4_SIZE - 1,
235 .flags = IORESOURCE_MEM,
236 },
237 {
238 .start = INT_SDC4_0,
239 .end = INT_SDC4_0,
240 .flags = IORESOURCE_IRQ,
241 .name = "cmd_irq",
242 },
243 {
244 .flags = IORESOURCE_IRQ | IORESOURCE_DISABLED,
245 .name = "status_irq"
246 },
247 {
248 .start = 8,
249 .end = 8,
250 .flags = IORESOURCE_DMA,
251 },
252};
253
254struct platform_device msm_device_sdc1 = {
255 .name = "msm_sdcc",
256 .id = 1,
257 .num_resources = ARRAY_SIZE(resources_sdc1),
258 .resource = resources_sdc1,
259 .dev = {
260 .coherent_dma_mask = 0xffffffff,
261 },
262};
263
264struct platform_device msm_device_sdc2 = {
265 .name = "msm_sdcc",
266 .id = 2,
267 .num_resources = ARRAY_SIZE(resources_sdc2),
268 .resource = resources_sdc2,
269 .dev = {
270 .coherent_dma_mask = 0xffffffff,
271 },
272};
273
274struct platform_device msm_device_sdc3 = {
275 .name = "msm_sdcc",
276 .id = 3,
277 .num_resources = ARRAY_SIZE(resources_sdc3),
278 .resource = resources_sdc3,
279 .dev = {
280 .coherent_dma_mask = 0xffffffff,
281 },
282};
283
284struct platform_device msm_device_sdc4 = {
285 .name = "msm_sdcc",
286 .id = 4,
287 .num_resources = ARRAY_SIZE(resources_sdc4),
288 .resource = resources_sdc4,
289 .dev = {
290 .coherent_dma_mask = 0xffffffff,
291 },
292};
293
294static struct platform_device *msm_sdcc_devices[] __initdata = {
295 &msm_device_sdc1,
296 &msm_device_sdc2,
297 &msm_device_sdc3,
298 &msm_device_sdc4,
299};
300
301int __init msm_add_sdcc(unsigned int controller,
302 struct msm_mmc_platform_data *plat,
303 unsigned int stat_irq, unsigned long stat_irq_flags)
304{
305 struct platform_device *pdev;
306 struct resource *res;
307
308 if (controller < 1 || controller > 4)
309 return -EINVAL;
310
311 pdev = msm_sdcc_devices[controller-1];
312 pdev->dev.platform_data = plat;
313
314 res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "status_irq");
315 if (!res)
316 return -EINVAL;
317 else if (stat_irq) {
318 res->start = res->end = stat_irq;
319 res->flags &= ~IORESOURCE_DISABLED;
320 res->flags |= stat_irq_flags;
321 }
322
323 return platform_device_register(pdev);
324}
325
326static struct clk_pcom_desc msm_clocks_8x50[] = {
327 CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
328 CLK_PCOM("ce_clk", CE_CLK, NULL, 0),
329 CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, CLK_MIN),
330 CLK_PCOM("ebi2_clk", EBI2_CLK, NULL, 0),
331 CLK_PCOM("ecodec_clk", ECODEC_CLK, NULL, 0),
332 CLK_PCOM("emdh_clk", EMDH_CLK, NULL, OFF | CLK_MINMAX),
333 CLK_PCOM("gp_clk", GP_CLK, NULL, 0),
334 CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, 0),
335 CLK_PCOM("i2c_clk", I2C_CLK, NULL, 0),
336 CLK_PCOM("icodec_rx_clk", ICODEC_RX_CLK, NULL, 0),
337 CLK_PCOM("icodec_tx_clk", ICODEC_TX_CLK, NULL, 0),
338 CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF),
339 CLK_PCOM("mdc_clk", MDC_CLK, NULL, 0),
340 CLK_PCOM("mddi_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
341 CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
342 CLK_PCOM("mdp_lcdc_pclk_clk", MDP_LCDC_PCLK_CLK, NULL, 0),
343 CLK_PCOM("mdp_lcdc_pad_pclk_clk", MDP_LCDC_PAD_PCLK_CLK, NULL, 0),
344 CLK_PCOM("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, 0),
345 CLK_PCOM("pbus_clk", PBUS_CLK, NULL, CLK_MIN),
346 CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
347 CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
348 CLK_PCOM("sdc_clk", SDC1_CLK, "msm_sdcc.1", OFF),
349 CLK_PCOM("sdc_pclk", SDC1_P_CLK, "msm_sdcc.1", OFF),
350 CLK_PCOM("sdc_clk", SDC2_CLK, "msm_sdcc.2", OFF),
351 CLK_PCOM("sdc_pclk", SDC2_P_CLK, "msm_sdcc.2", OFF),
352 CLK_PCOM("sdc_clk", SDC3_CLK, "msm_sdcc.3", OFF),
353 CLK_PCOM("sdc_pclk", SDC3_P_CLK, "msm_sdcc.3", OFF),
354 CLK_PCOM("sdc_clk", SDC4_CLK, "msm_sdcc.4", OFF),
355 CLK_PCOM("sdc_pclk", SDC4_P_CLK, "msm_sdcc.4", OFF),
356 CLK_PCOM("spi_clk", SPI_CLK, NULL, 0),
357 CLK_PCOM("tsif_clk", TSIF_CLK, NULL, 0),
358 CLK_PCOM("tsif_ref_clk", TSIF_REF_CLK, NULL, 0),
359 CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0),
360 CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0),
361 CLK_PCOM("core", UART1_CLK, NULL, OFF),
362 CLK_PCOM("core", UART2_CLK, NULL, 0),
363 CLK_PCOM("core", UART3_CLK, "msm_serial.2", OFF),
364 CLK_PCOM("uartdm_clk", UART1DM_CLK, NULL, OFF),
365 CLK_PCOM("uartdm_clk", UART2DM_CLK, NULL, 0),
366 CLK_PCOM("usb_hs_clk", USB_HS_CLK, NULL, OFF),
367 CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, NULL, OFF),
368 CLK_PCOM("usb_otg_clk", USB_OTG_CLK, NULL, 0),
369 CLK_PCOM("vdc_clk", VDC_CLK, NULL, OFF | CLK_MIN),
370 CLK_PCOM("vfe_clk", VFE_CLK, NULL, OFF),
371 CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, OFF),
372 CLK_PCOM("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
373 CLK_PCOM("usb_hs2_clk", USB_HS2_CLK, NULL, OFF),
374 CLK_PCOM("usb_hs2_pclk", USB_HS2_P_CLK, NULL, OFF),
375 CLK_PCOM("usb_hs3_clk", USB_HS3_CLK, NULL, OFF),
376 CLK_PCOM("usb_hs3_pclk", USB_HS3_P_CLK, NULL, OFF),
377 CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0),
378};
379
380static struct pcom_clk_pdata msm_clock_8x50_pdata = {
381 .lookup = msm_clocks_8x50,
382 .num_lookups = ARRAY_SIZE(msm_clocks_8x50),
383};
384
385struct platform_device msm_clock_8x50 = {
386 .name = "msm-clock-pcom",
387 .dev.platform_data = &msm_clock_8x50_pdata,
388};
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
deleted file mode 100644
index dccefad9f9b9..000000000000
--- a/arch/arm/mach-msm/devices.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/* linux/arch/arm/mach-msm/devices.h
2 *
3 * Copyright (C) 2008 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ARCH_ARM_MACH_MSM_DEVICES_H
17#define __ARCH_ARM_MACH_MSM_DEVICES_H
18
19extern struct platform_device msm_device_gpio_7201;
20extern struct platform_device msm_device_gpio_7x30;
21extern struct platform_device msm_device_gpio_8x50;
22
23extern struct platform_device msm_device_uart1;
24extern struct platform_device msm_device_uart2;
25extern struct platform_device msm_device_uart3;
26
27extern struct platform_device msm8960_device_uart_gsbi2;
28extern struct platform_device msm8960_device_uart_gsbi5;
29
30extern struct platform_device msm_device_sdc1;
31extern struct platform_device msm_device_sdc2;
32extern struct platform_device msm_device_sdc3;
33extern struct platform_device msm_device_sdc4;
34
35extern struct platform_device msm_device_hsusb;
36extern struct platform_device msm_device_otg;
37extern struct platform_device msm_device_hsusb_host;
38
39extern struct platform_device msm_device_i2c;
40
41extern struct platform_device msm_device_smd;
42
43extern struct platform_device msm_device_nand;
44
45extern struct platform_device msm_device_mddi0;
46extern struct platform_device msm_device_mddi1;
47extern struct platform_device msm_device_mdp;
48
49extern struct platform_device msm_clock_7x01a;
50extern struct platform_device msm_clock_7x30;
51extern struct platform_device msm_clock_8x50;
52
53#endif
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c
deleted file mode 100644
index fb9762464718..000000000000
--- a/arch/arm/mach-msm/dma.c
+++ /dev/null
@@ -1,298 +0,0 @@
1/* linux/arch/arm/mach-msm/dma.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/clk.h>
17#include <linux/err.h>
18#include <linux/io.h>
19#include <linux/interrupt.h>
20#include <linux/completion.h>
21#include <linux/module.h>
22#include <mach/dma.h>
23#include <mach/msm_iomap.h>
24
25#define MSM_DMOV_CHANNEL_COUNT 16
26
27#define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2))
28#define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2))
29#define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2))
30#define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2))
31
32#if defined(CONFIG_ARCH_MSM7X30)
33#define DMOV_SD_AARM DMOV_SD2
34#else
35#define DMOV_SD_AARM DMOV_SD3
36#endif
37
38#define DMOV_CMD_PTR(ch) DMOV_SD_AARM(0x000, ch)
39#define DMOV_RSLT(ch) DMOV_SD_AARM(0x040, ch)
40#define DMOV_FLUSH0(ch) DMOV_SD_AARM(0x080, ch)
41#define DMOV_FLUSH1(ch) DMOV_SD_AARM(0x0C0, ch)
42#define DMOV_FLUSH2(ch) DMOV_SD_AARM(0x100, ch)
43#define DMOV_FLUSH3(ch) DMOV_SD_AARM(0x140, ch)
44#define DMOV_FLUSH4(ch) DMOV_SD_AARM(0x180, ch)
45#define DMOV_FLUSH5(ch) DMOV_SD_AARM(0x1C0, ch)
46
47#define DMOV_STATUS(ch) DMOV_SD_AARM(0x200, ch)
48#define DMOV_ISR DMOV_SD_AARM(0x380, 0)
49
50#define DMOV_CONFIG(ch) DMOV_SD_AARM(0x300, ch)
51
52enum {
53 MSM_DMOV_PRINT_ERRORS = 1,
54 MSM_DMOV_PRINT_IO = 2,
55 MSM_DMOV_PRINT_FLOW = 4
56};
57
58static DEFINE_SPINLOCK(msm_dmov_lock);
59static struct clk *msm_dmov_clk;
60static unsigned int channel_active;
61static struct list_head ready_commands[MSM_DMOV_CHANNEL_COUNT];
62static struct list_head active_commands[MSM_DMOV_CHANNEL_COUNT];
63unsigned int msm_dmov_print_mask = MSM_DMOV_PRINT_ERRORS;
64
65#define MSM_DMOV_DPRINTF(mask, format, args...) \
66 do { \
67 if ((mask) & msm_dmov_print_mask) \
68 printk(KERN_ERR format, args); \
69 } while (0)
70#define PRINT_ERROR(format, args...) \
71 MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_ERRORS, format, args);
72#define PRINT_IO(format, args...) \
73 MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_IO, format, args);
74#define PRINT_FLOW(format, args...) \
75 MSM_DMOV_DPRINTF(MSM_DMOV_PRINT_FLOW, format, args);
76
77void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd, int graceful)
78{
79 writel((graceful << 31), DMOV_FLUSH0(id));
80}
81EXPORT_SYMBOL_GPL(msm_dmov_stop_cmd);
82
83void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd)
84{
85 unsigned long irq_flags;
86 unsigned int status;
87
88 spin_lock_irqsave(&msm_dmov_lock, irq_flags);
89 if (!channel_active)
90 clk_enable(msm_dmov_clk);
91 dsb();
92 status = readl(DMOV_STATUS(id));
93 if (list_empty(&ready_commands[id]) &&
94 (status & DMOV_STATUS_CMD_PTR_RDY)) {
95#if 0
96 if (list_empty(&active_commands[id])) {
97 PRINT_FLOW("msm_dmov_enqueue_cmd(%d), enable interrupt\n", id);
98 writel(DMOV_CONFIG_IRQ_EN, DMOV_CONFIG(id));
99 }
100#endif
101 if (cmd->execute_func)
102 cmd->execute_func(cmd);
103 PRINT_IO("msm_dmov_enqueue_cmd(%d), start command, status %x\n", id, status);
104 list_add_tail(&cmd->list, &active_commands[id]);
105 if (!channel_active)
106 enable_irq(INT_ADM_AARM);
107 channel_active |= 1U << id;
108 writel(cmd->cmdptr, DMOV_CMD_PTR(id));
109 } else {
110 if (!channel_active)
111 clk_disable(msm_dmov_clk);
112 if (list_empty(&active_commands[id]))
113 PRINT_ERROR("msm_dmov_enqueue_cmd(%d), error datamover stalled, status %x\n", id, status);
114
115 PRINT_IO("msm_dmov_enqueue_cmd(%d), enqueue command, status %x\n", id, status);
116 list_add_tail(&cmd->list, &ready_commands[id]);
117 }
118 spin_unlock_irqrestore(&msm_dmov_lock, irq_flags);
119}
120EXPORT_SYMBOL_GPL(msm_dmov_enqueue_cmd);
121
122struct msm_dmov_exec_cmdptr_cmd {
123 struct msm_dmov_cmd dmov_cmd;
124 struct completion complete;
125 unsigned id;
126 unsigned int result;
127 struct msm_dmov_errdata err;
128};
129
130static void
131dmov_exec_cmdptr_complete_func(struct msm_dmov_cmd *_cmd,
132 unsigned int result,
133 struct msm_dmov_errdata *err)
134{
135 struct msm_dmov_exec_cmdptr_cmd *cmd = container_of(_cmd, struct msm_dmov_exec_cmdptr_cmd, dmov_cmd);
136 cmd->result = result;
137 if (result != 0x80000002 && err)
138 memcpy(&cmd->err, err, sizeof(struct msm_dmov_errdata));
139
140 complete(&cmd->complete);
141}
142
143int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr)
144{
145 struct msm_dmov_exec_cmdptr_cmd cmd;
146
147 PRINT_FLOW("dmov_exec_cmdptr(%d, %x)\n", id, cmdptr);
148
149 cmd.dmov_cmd.cmdptr = cmdptr;
150 cmd.dmov_cmd.complete_func = dmov_exec_cmdptr_complete_func;
151 cmd.dmov_cmd.execute_func = NULL;
152 cmd.id = id;
153 init_completion(&cmd.complete);
154
155 msm_dmov_enqueue_cmd(id, &cmd.dmov_cmd);
156 wait_for_completion(&cmd.complete);
157
158 if (cmd.result != 0x80000002) {
159 PRINT_ERROR("dmov_exec_cmdptr(%d): ERROR, result: %x\n", id, cmd.result);
160 PRINT_ERROR("dmov_exec_cmdptr(%d): flush: %x %x %x %x\n",
161 id, cmd.err.flush[0], cmd.err.flush[1], cmd.err.flush[2], cmd.err.flush[3]);
162 return -EIO;
163 }
164 PRINT_FLOW("dmov_exec_cmdptr(%d, %x) done\n", id, cmdptr);
165 return 0;
166}
167
168
169static irqreturn_t msm_datamover_irq_handler(int irq, void *dev_id)
170{
171 unsigned int int_status, mask, id;
172 unsigned long irq_flags;
173 unsigned int ch_status;
174 unsigned int ch_result;
175 struct msm_dmov_cmd *cmd;
176
177 spin_lock_irqsave(&msm_dmov_lock, irq_flags);
178
179 int_status = readl(DMOV_ISR); /* read and clear interrupt */
180 PRINT_FLOW("msm_datamover_irq_handler: DMOV_ISR %x\n", int_status);
181
182 while (int_status) {
183 mask = int_status & -int_status;
184 id = fls(mask) - 1;
185 PRINT_FLOW("msm_datamover_irq_handler %08x %08x id %d\n", int_status, mask, id);
186 int_status &= ~mask;
187 ch_status = readl(DMOV_STATUS(id));
188 if (!(ch_status & DMOV_STATUS_RSLT_VALID)) {
189 PRINT_FLOW("msm_datamover_irq_handler id %d, result not valid %x\n", id, ch_status);
190 continue;
191 }
192 do {
193 ch_result = readl(DMOV_RSLT(id));
194 if (list_empty(&active_commands[id])) {
195 PRINT_ERROR("msm_datamover_irq_handler id %d, got result "
196 "with no active command, status %x, result %x\n",
197 id, ch_status, ch_result);
198 cmd = NULL;
199 } else
200 cmd = list_entry(active_commands[id].next, typeof(*cmd), list);
201 PRINT_FLOW("msm_datamover_irq_handler id %d, status %x, result %x\n", id, ch_status, ch_result);
202 if (ch_result & DMOV_RSLT_DONE) {
203 PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n",
204 id, ch_status);
205 PRINT_IO("msm_datamover_irq_handler id %d, got result "
206 "for %p, result %x\n", id, cmd, ch_result);
207 if (cmd) {
208 list_del(&cmd->list);
209 dsb();
210 cmd->complete_func(cmd, ch_result, NULL);
211 }
212 }
213 if (ch_result & DMOV_RSLT_FLUSH) {
214 struct msm_dmov_errdata errdata;
215
216 errdata.flush[0] = readl(DMOV_FLUSH0(id));
217 errdata.flush[1] = readl(DMOV_FLUSH1(id));
218 errdata.flush[2] = readl(DMOV_FLUSH2(id));
219 errdata.flush[3] = readl(DMOV_FLUSH3(id));
220 errdata.flush[4] = readl(DMOV_FLUSH4(id));
221 errdata.flush[5] = readl(DMOV_FLUSH5(id));
222 PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
223 PRINT_FLOW("msm_datamover_irq_handler id %d, flush, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
224 if (cmd) {
225 list_del(&cmd->list);
226 dsb();
227 cmd->complete_func(cmd, ch_result, &errdata);
228 }
229 }
230 if (ch_result & DMOV_RSLT_ERROR) {
231 struct msm_dmov_errdata errdata;
232
233 errdata.flush[0] = readl(DMOV_FLUSH0(id));
234 errdata.flush[1] = readl(DMOV_FLUSH1(id));
235 errdata.flush[2] = readl(DMOV_FLUSH2(id));
236 errdata.flush[3] = readl(DMOV_FLUSH3(id));
237 errdata.flush[4] = readl(DMOV_FLUSH4(id));
238 errdata.flush[5] = readl(DMOV_FLUSH5(id));
239
240 PRINT_ERROR("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
241 PRINT_ERROR("msm_datamover_irq_handler id %d, error, result %x, flush0 %x\n", id, ch_result, errdata.flush[0]);
242 if (cmd) {
243 list_del(&cmd->list);
244 dsb();
245 cmd->complete_func(cmd, ch_result, &errdata);
246 }
247 /* this does not seem to work, once we get an error */
248 /* the datamover will no longer accept commands */
249 writel(0, DMOV_FLUSH0(id));
250 }
251 ch_status = readl(DMOV_STATUS(id));
252 PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
253 if ((ch_status & DMOV_STATUS_CMD_PTR_RDY) && !list_empty(&ready_commands[id])) {
254 cmd = list_entry(ready_commands[id].next, typeof(*cmd), list);
255 list_move_tail(&cmd->list, &active_commands[id]);
256 if (cmd->execute_func)
257 cmd->execute_func(cmd);
258 PRINT_FLOW("msm_datamover_irq_handler id %d, start command\n", id);
259 writel(cmd->cmdptr, DMOV_CMD_PTR(id));
260 }
261 } while (ch_status & DMOV_STATUS_RSLT_VALID);
262 if (list_empty(&active_commands[id]) && list_empty(&ready_commands[id]))
263 channel_active &= ~(1U << id);
264 PRINT_FLOW("msm_datamover_irq_handler id %d, status %x\n", id, ch_status);
265 }
266
267 if (!channel_active) {
268 disable_irq_nosync(INT_ADM_AARM);
269 clk_disable(msm_dmov_clk);
270 }
271
272 spin_unlock_irqrestore(&msm_dmov_lock, irq_flags);
273 return IRQ_HANDLED;
274}
275
276static int __init msm_init_datamover(void)
277{
278 int i;
279 int ret;
280 struct clk *clk;
281
282 for (i = 0; i < MSM_DMOV_CHANNEL_COUNT; i++) {
283 INIT_LIST_HEAD(&ready_commands[i]);
284 INIT_LIST_HEAD(&active_commands[i]);
285 writel(DMOV_CONFIG_IRQ_EN | DMOV_CONFIG_FORCE_TOP_PTR_RSLT | DMOV_CONFIG_FORCE_FLUSH_RSLT, DMOV_CONFIG(i));
286 }
287 clk = clk_get(NULL, "adm_clk");
288 if (IS_ERR(clk))
289 return PTR_ERR(clk);
290 clk_prepare(clk);
291 msm_dmov_clk = clk;
292 ret = request_irq(INT_ADM_AARM, msm_datamover_irq_handler, 0, "msmdatamover", NULL);
293 if (ret)
294 return ret;
295 disable_irq(INT_ADM_AARM);
296 return 0;
297}
298module_init(msm_init_datamover);
diff --git a/arch/arm/mach-msm/gpiomux-8x50.c b/arch/arm/mach-msm/gpiomux-8x50.c
deleted file mode 100644
index f7a4ea593c95..000000000000
--- a/arch/arm/mach-msm/gpiomux-8x50.c
+++ /dev/null
@@ -1,51 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include "gpiomux.h"
18
19#if defined(CONFIG_MMC_MSM) || defined(CONFIG_MMC_MSM_MODULE)
20 #define SDCC_DAT_0_3_CMD_ACTV_CFG (GPIOMUX_VALID | GPIOMUX_PULL_UP\
21 | GPIOMUX_FUNC_1 | GPIOMUX_DRV_8MA)
22 #define SDCC_CLK_ACTV_CFG (GPIOMUX_VALID | GPIOMUX_PULL_NONE\
23 | GPIOMUX_FUNC_1 | GPIOMUX_DRV_8MA)
24#else
25 #define SDCC_DAT_0_3_CMD_ACTV_CFG 0
26 #define SDCC_CLK_ACTV_CFG 0
27#endif
28
29#define SDC1_SUSPEND_CONFIG (GPIOMUX_VALID | GPIOMUX_PULL_DOWN\
30 | GPIOMUX_FUNC_GPIO | GPIOMUX_DRV_2MA)
31
32struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {
33 [86] = { /* UART3 RX */
34 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
35 GPIOMUX_FUNC_1 | GPIOMUX_VALID,
36 },
37 [87] = { /* UART3 TX */
38 .suspended = GPIOMUX_DRV_2MA | GPIOMUX_PULL_DOWN |
39 GPIOMUX_FUNC_1 | GPIOMUX_VALID,
40 },
41 /* SDC1 data[3:0] & CMD */
42 [51 ... 55] = {
43 .active = SDCC_DAT_0_3_CMD_ACTV_CFG,
44 .suspended = SDC1_SUSPEND_CONFIG
45 },
46 /* SDC1 CLK */
47 [56] = {
48 .active = SDCC_CLK_ACTV_CFG,
49 .suspended = SDC1_SUSPEND_CONFIG
50 },
51};
diff --git a/arch/arm/mach-msm/gpiomux-v1.h b/arch/arm/mach-msm/gpiomux-v1.h
deleted file mode 100644
index 71d86feba450..000000000000
--- a/arch/arm/mach-msm/gpiomux-v1.h
+++ /dev/null
@@ -1,67 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_V1_H
18#define __ARCH_ARM_MACH_MSM_GPIOMUX_V1_H
19
20#if defined(CONFIG_ARCH_MSM7X30)
21#define GPIOMUX_NGPIOS 182
22#elif defined(CONFIG_ARCH_QSD8X50)
23#define GPIOMUX_NGPIOS 165
24#else
25#define GPIOMUX_NGPIOS 133
26#endif
27
28typedef u32 gpiomux_config_t;
29
30enum {
31 GPIOMUX_DRV_2MA = 0UL << 17,
32 GPIOMUX_DRV_4MA = 1UL << 17,
33 GPIOMUX_DRV_6MA = 2UL << 17,
34 GPIOMUX_DRV_8MA = 3UL << 17,
35 GPIOMUX_DRV_10MA = 4UL << 17,
36 GPIOMUX_DRV_12MA = 5UL << 17,
37 GPIOMUX_DRV_14MA = 6UL << 17,
38 GPIOMUX_DRV_16MA = 7UL << 17,
39};
40
41enum {
42 GPIOMUX_FUNC_GPIO = 0UL,
43 GPIOMUX_FUNC_1 = 1UL,
44 GPIOMUX_FUNC_2 = 2UL,
45 GPIOMUX_FUNC_3 = 3UL,
46 GPIOMUX_FUNC_4 = 4UL,
47 GPIOMUX_FUNC_5 = 5UL,
48 GPIOMUX_FUNC_6 = 6UL,
49 GPIOMUX_FUNC_7 = 7UL,
50 GPIOMUX_FUNC_8 = 8UL,
51 GPIOMUX_FUNC_9 = 9UL,
52 GPIOMUX_FUNC_A = 10UL,
53 GPIOMUX_FUNC_B = 11UL,
54 GPIOMUX_FUNC_C = 12UL,
55 GPIOMUX_FUNC_D = 13UL,
56 GPIOMUX_FUNC_E = 14UL,
57 GPIOMUX_FUNC_F = 15UL,
58};
59
60enum {
61 GPIOMUX_PULL_NONE = 0UL << 15,
62 GPIOMUX_PULL_DOWN = 1UL << 15,
63 GPIOMUX_PULL_KEEPER = 2UL << 15,
64 GPIOMUX_PULL_UP = 3UL << 15,
65};
66
67#endif
diff --git a/arch/arm/mach-msm/gpiomux.c b/arch/arm/mach-msm/gpiomux.c
deleted file mode 100644
index 2b8e2d217082..000000000000
--- a/arch/arm/mach-msm/gpiomux.c
+++ /dev/null
@@ -1,111 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#include <linux/module.h>
18#include <linux/spinlock.h>
19#include "gpiomux.h"
20#include "proc_comm.h"
21
22static DEFINE_SPINLOCK(gpiomux_lock);
23
24static void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
25{
26 unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) |
27 ((gpio & 0x3ff) << 4);
28 unsigned tlmm_disable = 0;
29 int rc;
30
31 rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
32 &tlmm_config, &tlmm_disable);
33 if (rc)
34 pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
35 __func__, rc, tlmm_config, tlmm_disable);
36}
37
38int msm_gpiomux_write(unsigned gpio,
39 gpiomux_config_t active,
40 gpiomux_config_t suspended)
41{
42 struct msm_gpiomux_config *cfg = msm_gpiomux_configs + gpio;
43 unsigned long irq_flags;
44 gpiomux_config_t setting;
45
46 if (gpio >= GPIOMUX_NGPIOS)
47 return -EINVAL;
48
49 spin_lock_irqsave(&gpiomux_lock, irq_flags);
50
51 if (active & GPIOMUX_VALID)
52 cfg->active = active;
53
54 if (suspended & GPIOMUX_VALID)
55 cfg->suspended = suspended;
56
57 setting = cfg->ref ? active : suspended;
58 if (setting & GPIOMUX_VALID)
59 __msm_gpiomux_write(gpio, setting);
60
61 spin_unlock_irqrestore(&gpiomux_lock, irq_flags);
62 return 0;
63}
64EXPORT_SYMBOL(msm_gpiomux_write);
65
66int msm_gpiomux_get(unsigned gpio)
67{
68 struct msm_gpiomux_config *cfg = msm_gpiomux_configs + gpio;
69 unsigned long irq_flags;
70
71 if (gpio >= GPIOMUX_NGPIOS)
72 return -EINVAL;
73
74 spin_lock_irqsave(&gpiomux_lock, irq_flags);
75 if (cfg->ref++ == 0 && cfg->active & GPIOMUX_VALID)
76 __msm_gpiomux_write(gpio, cfg->active);
77 spin_unlock_irqrestore(&gpiomux_lock, irq_flags);
78 return 0;
79}
80EXPORT_SYMBOL(msm_gpiomux_get);
81
82int msm_gpiomux_put(unsigned gpio)
83{
84 struct msm_gpiomux_config *cfg = msm_gpiomux_configs + gpio;
85 unsigned long irq_flags;
86
87 if (gpio >= GPIOMUX_NGPIOS)
88 return -EINVAL;
89
90 spin_lock_irqsave(&gpiomux_lock, irq_flags);
91 BUG_ON(cfg->ref == 0);
92 if (--cfg->ref == 0 && cfg->suspended & GPIOMUX_VALID)
93 __msm_gpiomux_write(gpio, cfg->suspended);
94 spin_unlock_irqrestore(&gpiomux_lock, irq_flags);
95 return 0;
96}
97EXPORT_SYMBOL(msm_gpiomux_put);
98
99static int __init gpiomux_init(void)
100{
101 unsigned n;
102
103 for (n = 0; n < GPIOMUX_NGPIOS; ++n) {
104 msm_gpiomux_configs[n].ref = 0;
105 if (!(msm_gpiomux_configs[n].suspended & GPIOMUX_VALID))
106 continue;
107 __msm_gpiomux_write(n, msm_gpiomux_configs[n].suspended);
108 }
109 return 0;
110}
111postcore_initcall(gpiomux_init);
diff --git a/arch/arm/mach-msm/gpiomux.h b/arch/arm/mach-msm/gpiomux.h
deleted file mode 100644
index 4410d7766f93..000000000000
--- a/arch/arm/mach-msm/gpiomux.h
+++ /dev/null
@@ -1,84 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17#ifndef __ARCH_ARM_MACH_MSM_GPIOMUX_H
18#define __ARCH_ARM_MACH_MSM_GPIOMUX_H
19
20#include <linux/bitops.h>
21#include <linux/errno.h>
22#include <mach/msm_gpiomux.h>
23#include "gpiomux-v1.h"
24
25/**
26 * struct msm_gpiomux_config: gpiomux settings for one gpio line.
27 *
28 * A complete gpiomux config is the bitwise-or of a drive-strength,
29 * function, and pull. For functions other than GPIO, the OE
30 * is hard-wired according to the function. For GPIO mode,
31 * OE is controlled by gpiolib.
32 *
33 * Available settings differ by target; see the gpiomux header
34 * specific to your target arch for available configurations.
35 *
36 * @active: The configuration to be installed when the line is
37 * active, or its reference count is > 0.
38 * @suspended: The configuration to be installed when the line
39 * is suspended, or its reference count is 0.
40 * @ref: The reference count of the line. For internal use of
41 * the gpiomux framework only.
42 */
43struct msm_gpiomux_config {
44 gpiomux_config_t active;
45 gpiomux_config_t suspended;
46 unsigned ref;
47};
48
49/**
50 * @GPIOMUX_VALID: If set, the config field contains 'good data'.
51 * The absence of this bit will prevent the gpiomux
52 * system from applying the configuration under all
53 * circumstances.
54 */
55enum {
56 GPIOMUX_VALID = BIT(sizeof(gpiomux_config_t) * BITS_PER_BYTE - 1),
57 GPIOMUX_CTL_MASK = GPIOMUX_VALID,
58};
59
60#ifdef CONFIG_MSM_GPIOMUX
61
62/* Each architecture must provide its own instance of this table.
63 * To avoid having gpiomux manage any given gpio, one or both of
64 * the entries can avoid setting GPIOMUX_VALID - the absence
65 * of that flag will prevent the configuration from being applied
66 * during state transitions.
67 */
68extern struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS];
69
70/* Install a new configuration to the gpio line. To avoid overwriting
71 * a configuration, leave the VALID bit out.
72 */
73int msm_gpiomux_write(unsigned gpio,
74 gpiomux_config_t active,
75 gpiomux_config_t suspended);
76#else
77static inline int msm_gpiomux_write(unsigned gpio,
78 gpiomux_config_t active,
79 gpiomux_config_t suspended)
80{
81 return -ENOSYS;
82}
83#endif
84#endif
diff --git a/arch/arm/mach-msm/include/mach/clk.h b/arch/arm/mach-msm/include/mach/clk.h
deleted file mode 100644
index fd4f4a7a83b3..000000000000
--- a/arch/arm/mach-msm/include/mach/clk.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef __MACH_CLK_H
13#define __MACH_CLK_H
14
15/* Magic rate value for use with PM QOS to request the board's maximum
16 * supported AXI rate. PM QOS will only pass positive s32 rate values
17 * through to the clock driver, so INT_MAX is used.
18 */
19#define MSM_AXI_MAX_FREQ LONG_MAX
20
21enum clk_reset_action {
22 CLK_RESET_DEASSERT = 0,
23 CLK_RESET_ASSERT = 1
24};
25
26struct clk;
27
28/* Assert/Deassert reset to a hardware block associated with a clock */
29int clk_reset(struct clk *clk, enum clk_reset_action action);
30
31#endif
diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h
deleted file mode 100644
index a72d48d42342..000000000000
--- a/arch/arm/mach-msm/include/mach/dma.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/* linux/include/asm-arm/arch-msm/dma.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_DMA_H
17
18#include <linux/list.h>
19
20struct msm_dmov_errdata {
21 uint32_t flush[6];
22};
23
24struct msm_dmov_cmd {
25 struct list_head list;
26 unsigned int cmdptr;
27 void (*complete_func)(struct msm_dmov_cmd *cmd,
28 unsigned int result,
29 struct msm_dmov_errdata *err);
30 void (*execute_func)(struct msm_dmov_cmd *cmd);
31 void *data;
32};
33
34#ifndef CONFIG_ARCH_MSM8X60
35void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd);
36void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd, int graceful);
37int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr);
38#else
39static inline
40void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd) { }
41static inline
42void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd, int graceful) { }
43static inline
44int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) { return -EIO; }
45#endif
46
47#define DMOV_CMD_LIST (0 << 29) /* does not work */
48#define DMOV_CMD_PTR_LIST (1 << 29) /* works */
49#define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */
50#define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */
51#define DMOV_CMD_ADDR(addr) ((addr) >> 3)
52
53#define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */
54#define DMOV_RSLT_ERROR (1 << 3)
55#define DMOV_RSLT_FLUSH (1 << 2)
56#define DMOV_RSLT_DONE (1 << 1) /* top pointer done */
57#define DMOV_RSLT_USER (1 << 0) /* command with FR force result */
58
59#define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29))
60#define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3)
61#define DMOV_STATUS_RSLT_VALID (1 << 1)
62#define DMOV_STATUS_CMD_PTR_RDY (1 << 0)
63
64#define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2)
65#define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1)
66#define DMOV_CONFIG_IRQ_EN (1 << 0)
67
68/* channel assignments */
69
70#define DMOV_NAND_CHAN 7
71#define DMOV_NAND_CRCI_CMD 5
72#define DMOV_NAND_CRCI_DATA 4
73
74#define DMOV_SDC1_CHAN 8
75#define DMOV_SDC1_CRCI 6
76
77#define DMOV_SDC2_CHAN 8
78#define DMOV_SDC2_CRCI 7
79
80#define DMOV_TSIF_CHAN 10
81#define DMOV_TSIF_CRCI 10
82
83#define DMOV_USB_CHAN 11
84
85/* no client rate control ifc (eg, ram) */
86#define DMOV_NONE_CRCI 0
87
88
89/* If the CMD_PTR register has CMD_PTR_LIST selected, the data mover
90 * is going to walk a list of 32bit pointers as described below. Each
91 * pointer points to a *array* of dmov_s, etc structs. The last pointer
92 * in the list is marked with CMD_PTR_LP. The last struct in each array
93 * is marked with CMD_LC (see below).
94 */
95#define CMD_PTR_ADDR(addr) ((addr) >> 3)
96#define CMD_PTR_LP (1 << 31) /* last pointer */
97#define CMD_PTR_PT (3 << 29) /* ? */
98
99/* Single Item Mode */
100typedef struct {
101 unsigned cmd;
102 unsigned src;
103 unsigned dst;
104 unsigned len;
105} dmov_s;
106
107/* Scatter/Gather Mode */
108typedef struct {
109 unsigned cmd;
110 unsigned src_dscr;
111 unsigned dst_dscr;
112 unsigned _reserved;
113} dmov_sg;
114
115/* Box mode */
116typedef struct {
117 uint32_t cmd;
118 uint32_t src_row_addr;
119 uint32_t dst_row_addr;
120 uint32_t src_dst_len;
121 uint32_t num_rows;
122 uint32_t row_offset;
123} dmov_box;
124
125/* bits for the cmd field of the above structures */
126
127#define CMD_LC (1 << 31) /* last command */
128#define CMD_FR (1 << 22) /* force result -- does not work? */
129#define CMD_OCU (1 << 21) /* other channel unblock */
130#define CMD_OCB (1 << 20) /* other channel block */
131#define CMD_TCB (1 << 19) /* ? */
132#define CMD_DAH (1 << 18) /* destination address hold -- does not work?*/
133#define CMD_SAH (1 << 17) /* source address hold -- does not work? */
134
135#define CMD_MODE_SINGLE (0 << 0) /* dmov_s structure used */
136#define CMD_MODE_SG (1 << 0) /* untested */
137#define CMD_MODE_IND_SG (2 << 0) /* untested */
138#define CMD_MODE_BOX (3 << 0) /* untested */
139
140#define CMD_DST_SWAP_BYTES (1 << 14) /* exchange each byte n with byte n+1 */
141#define CMD_DST_SWAP_SHORTS (1 << 15) /* exchange each short n with short n+1 */
142#define CMD_DST_SWAP_WORDS (1 << 16) /* exchange each word n with word n+1 */
143
144#define CMD_SRC_SWAP_BYTES (1 << 11) /* exchange each byte n with byte n+1 */
145#define CMD_SRC_SWAP_SHORTS (1 << 12) /* exchange each short n with short n+1 */
146#define CMD_SRC_SWAP_WORDS (1 << 13) /* exchange each word n with word n+1 */
147
148#define CMD_DST_CRCI(n) (((n) & 15) << 7)
149#define CMD_SRC_CRCI(n) (((n) & 15) << 3)
150
151#endif
diff --git a/arch/arm/mach-msm/include/mach/entry-macro.S b/arch/arm/mach-msm/include/mach/entry-macro.S
deleted file mode 100644
index f2ae9087f654..000000000000
--- a/arch/arm/mach-msm/include/mach/entry-macro.S
+++ /dev/null
@@ -1,36 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 *
17 */
18
19#if !defined(CONFIG_ARM_GIC)
20#include <mach/msm_iomap.h>
21
22 .macro get_irqnr_preamble, base, tmp
23 @ enable imprecise aborts
24 cpsie a
25 mov \base, #MSM_VIC_BASE
26 .endm
27
28 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
29 @ 0xD0 has irq# or old irq# if the irq has been handled
30 @ 0xD4 has irq# or -1 if none pending *but* if you just
31 @ read 0xD4 you never get the first irq for some reason
32 ldr \irqnr, [\base, #0xD0]
33 ldr \irqnr, [\base, #0xD4]
34 cmp \irqnr, #0xffffffff
35 .endm
36#endif
diff --git a/arch/arm/mach-msm/include/mach/hardware.h b/arch/arm/mach-msm/include/mach/hardware.h
deleted file mode 100644
index 2d126091ae41..000000000000
--- a/arch/arm/mach-msm/include/mach/hardware.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* arch/arm/mach-msm/include/mach/hardware.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef __ASM_ARCH_MSM_HARDWARE_H
17
18#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs-7x00.h b/arch/arm/mach-msm/include/mach/irqs-7x00.h
deleted file mode 100644
index f1fe70612fe9..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs-7x00.h
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 */
6
7#ifndef __ASM_ARCH_MSM_IRQS_7X00_H
8#define __ASM_ARCH_MSM_IRQS_7X00_H
9
10/* MSM ARM11 Interrupt Numbers */
11/* See 80-VE113-1 A, pp219-221 */
12
13#define INT_A9_M2A_0 0
14#define INT_A9_M2A_1 1
15#define INT_A9_M2A_2 2
16#define INT_A9_M2A_3 3
17#define INT_A9_M2A_4 4
18#define INT_A9_M2A_5 5
19#define INT_A9_M2A_6 6
20#define INT_GP_TIMER_EXP 7
21#define INT_DEBUG_TIMER_EXP 8
22#define INT_UART1 9
23#define INT_UART2 10
24#define INT_UART3 11
25#define INT_UART1_RX 12
26#define INT_UART2_RX 13
27#define INT_UART3_RX 14
28#define INT_USB_OTG 15
29#define INT_MDDI_PRI 16
30#define INT_MDDI_EXT 17
31#define INT_MDDI_CLIENT 18
32#define INT_MDP 19
33#define INT_GRAPHICS 20
34#define INT_ADM_AARM 21
35#define INT_ADSP_A11 22
36#define INT_ADSP_A9_A11 23
37#define INT_SDC1_0 24
38#define INT_SDC1_1 25
39#define INT_SDC2_0 26
40#define INT_SDC2_1 27
41#define INT_KEYSENSE 28
42#define INT_TCHSCRN_SSBI 29
43#define INT_TCHSCRN1 30
44#define INT_TCHSCRN2 31
45
46#define INT_GPIO_GROUP1 (32 + 0)
47#define INT_GPIO_GROUP2 (32 + 1)
48#define INT_PWB_I2C (32 + 2)
49#define INT_SOFTRESET (32 + 3)
50#define INT_NAND_WR_ER_DONE (32 + 4)
51#define INT_NAND_OP_DONE (32 + 5)
52#define INT_PBUS_ARM11 (32 + 6)
53#define INT_AXI_MPU_SMI (32 + 7)
54#define INT_AXI_MPU_EBI1 (32 + 8)
55#define INT_AD_HSSD (32 + 9)
56#define INT_ARM11_PMU (32 + 10)
57#define INT_ARM11_DMA (32 + 11)
58#define INT_TSIF_IRQ (32 + 12)
59#define INT_UART1DM_IRQ (32 + 13)
60#define INT_UART1DM_RX (32 + 14)
61#define INT_USB_HS (32 + 15)
62#define INT_SDC3_0 (32 + 16)
63#define INT_SDC3_1 (32 + 17)
64#define INT_SDC4_0 (32 + 18)
65#define INT_SDC4_1 (32 + 19)
66#define INT_UART2DM_RX (32 + 20)
67#define INT_UART2DM_IRQ (32 + 21)
68
69/* 22-31 are reserved */
70
71#define NR_MSM_IRQS 64
72#define NR_GPIO_IRQS 122
73#define NR_BOARD_IRQS 64
74
75#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs-7x30.h b/arch/arm/mach-msm/include/mach/irqs-7x30.h
deleted file mode 100644
index 1f15902655fd..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs-7x30.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/* Copyright (c) 2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ASM_ARCH_MSM_IRQS_7X30_H
14#define __ASM_ARCH_MSM_IRQS_7X30_H
15
16/* MSM ACPU Interrupt Numbers */
17
18#define INT_DEBUG_TIMER_EXP 0
19#define INT_GPT0_TIMER_EXP 1
20#define INT_GPT1_TIMER_EXP 2
21#define INT_WDT0_ACCSCSSBARK 3
22#define INT_WDT1_ACCSCSSBARK 4
23#define INT_AVS_SVIC 5
24#define INT_AVS_SVIC_SW_DONE 6
25#define INT_SC_DBG_RX_FULL 7
26#define INT_SC_DBG_TX_EMPTY 8
27#define INT_ARM11_PM 9
28#define INT_AVS_REQ_DOWN 10
29#define INT_AVS_REQ_UP 11
30#define INT_SC_ACG 12
31/* SCSS_VICFIQSTS0[13:15] are RESERVED */
32#define INT_L2_SVICCPUIRPTREQ 16
33#define INT_L2_SVICDMANSIRPTREQ 17
34#define INT_L2_SVICDMASIRPTREQ 18
35#define INT_L2_SVICSLVIRPTREQ 19
36#define INT_AD5A_MPROC_APPS_0 20
37#define INT_AD5A_MPROC_APPS_1 21
38#define INT_A9_M2A_0 22
39#define INT_A9_M2A_1 23
40#define INT_A9_M2A_2 24
41#define INT_A9_M2A_3 25
42#define INT_A9_M2A_4 26
43#define INT_A9_M2A_5 27
44#define INT_A9_M2A_6 28
45#define INT_A9_M2A_7 29
46#define INT_A9_M2A_8 30
47#define INT_A9_M2A_9 31
48
49#define INT_AXI_EBI1_SC (32 + 0)
50#define INT_IMEM_ERR (32 + 1)
51#define INT_AXI_EBI0_SC (32 + 2)
52#define INT_PBUS_SC_IRQC (32 + 3)
53#define INT_PERPH_BUS_BPM (32 + 4)
54#define INT_CC_TEMP_SENSE (32 + 5)
55#define INT_UXMC_EBI0 (32 + 6)
56#define INT_UXMC_EBI1 (32 + 7)
57#define INT_EBI2_OP_DONE (32 + 8)
58#define INT_EBI2_WR_ER_DONE (32 + 9)
59#define INT_TCSR_SPSS_CE (32 + 10)
60#define INT_EMDH (32 + 11)
61#define INT_PMDH (32 + 12)
62#define INT_MDC (32 + 13)
63#define INT_MIDI_TO_SUPSS (32 + 14)
64#define INT_LPA_2 (32 + 15)
65#define INT_GPIO_GROUP1_SECURE (32 + 16)
66#define INT_GPIO_GROUP2_SECURE (32 + 17)
67#define INT_GPIO_GROUP1 (32 + 18)
68#define INT_GPIO_GROUP2 (32 + 19)
69#define INT_MPRPH_SOFTRESET (32 + 20)
70#define INT_PWB_I2C (32 + 21)
71#define INT_PWB_I2C_2 (32 + 22)
72#define INT_TSSC_SAMPLE (32 + 23)
73#define INT_TSSC_PENUP (32 + 24)
74#define INT_TCHSCRN_SSBI (32 + 25)
75#define INT_FM_RDS (32 + 26)
76#define INT_KEYSENSE (32 + 27)
77#define INT_USB_OTG_HS (32 + 28)
78#define INT_USB_OTG_HS2 (32 + 29)
79#define INT_USB_OTG_HS3 (32 + 30)
80#define INT_CSI (32 + 31)
81
82#define INT_SPI_OUTPUT (64 + 0)
83#define INT_SPI_INPUT (64 + 1)
84#define INT_SPI_ERROR (64 + 2)
85#define INT_UART1 (64 + 3)
86#define INT_UART1_RX (64 + 4)
87#define INT_UART2 (64 + 5)
88#define INT_UART2_RX (64 + 6)
89#define INT_UART3 (64 + 7)
90#define INT_UART3_RX (64 + 8)
91#define INT_UART1DM_IRQ (64 + 9)
92#define INT_UART1DM_RX (64 + 10)
93#define INT_UART2DM_IRQ (64 + 11)
94#define INT_UART2DM_RX (64 + 12)
95#define INT_TSIF (64 + 13)
96#define INT_ADM_SC1 (64 + 14)
97#define INT_ADM_SC2 (64 + 15)
98#define INT_MDP (64 + 16)
99#define INT_VPE (64 + 17)
100#define INT_GRP_2D (64 + 18)
101#define INT_GRP_3D (64 + 19)
102#define INT_ROTATOR (64 + 20)
103#define INT_MFC720 (64 + 21)
104#define INT_JPEG (64 + 22)
105#define INT_VFE (64 + 23)
106#define INT_TV_ENC (64 + 24)
107#define INT_PMIC_SSBI (64 + 25)
108#define INT_MPM_1 (64 + 26)
109#define INT_TCSR_SPSS_SAMPLE (64 + 27)
110#define INT_TCSR_SPSS_PENUP (64 + 28)
111#define INT_MPM_2 (64 + 29)
112#define INT_SDC1_0 (64 + 30)
113#define INT_SDC1_1 (64 + 31)
114
115#define INT_SDC3_0 (96 + 0)
116#define INT_SDC3_1 (96 + 1)
117#define INT_SDC2_0 (96 + 2)
118#define INT_SDC2_1 (96 + 3)
119#define INT_SDC4_0 (96 + 4)
120#define INT_SDC4_1 (96 + 5)
121#define INT_PWB_QUP_IN (96 + 6)
122#define INT_PWB_QUP_OUT (96 + 7)
123#define INT_PWB_QUP_ERR (96 + 8)
124#define INT_SCSS_WDT0_BITE (96 + 9)
125/* SCSS_VICFIQSTS3[10:31] are RESERVED */
126
127/* Retrofit universal macro names */
128#define INT_ADM_AARM INT_ADM_SC2
129#define INT_USB_HS INT_USB_OTG_HS
130#define INT_USB_OTG INT_USB_OTG_HS
131#define INT_TCHSCRN1 INT_TSSC_SAMPLE
132#define INT_TCHSCRN2 INT_TSSC_PENUP
133#define INT_GP_TIMER_EXP INT_GPT0_TIMER_EXP
134#define INT_ADSP_A11 INT_AD5A_MPROC_APPS_0
135#define INT_ADSP_A9_A11 INT_AD5A_MPROC_APPS_1
136#define INT_MDDI_EXT INT_EMDH
137#define INT_MDDI_PRI INT_PMDH
138#define INT_MDDI_CLIENT INT_MDC
139#define INT_NAND_WR_ER_DONE INT_EBI2_WR_ER_DONE
140#define INT_NAND_OP_DONE INT_EBI2_OP_DONE
141
142#define NR_MSM_IRQS 128
143#define NR_GPIO_IRQS 182
144#define PMIC8058_IRQ_BASE (NR_MSM_IRQS + NR_GPIO_IRQS)
145#define NR_PMIC8058_GPIO_IRQS 40
146#define NR_PMIC8058_MPP_IRQS 12
147#define NR_PMIC8058_MISC_IRQS 8
148#define NR_PMIC8058_IRQS (NR_PMIC8058_GPIO_IRQS +\
149 NR_PMIC8058_MPP_IRQS +\
150 NR_PMIC8058_MISC_IRQS)
151#define NR_BOARD_IRQS NR_PMIC8058_IRQS
152
153#endif /* __ASM_ARCH_MSM_IRQS_7X30_H */
diff --git a/arch/arm/mach-msm/include/mach/irqs-8x50.h b/arch/arm/mach-msm/include/mach/irqs-8x50.h
deleted file mode 100644
index 26adbe0e9406..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs-8x50.h
+++ /dev/null
@@ -1,88 +0,0 @@
1/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ASM_ARCH_MSM_IRQS_8XXX_H
14#define __ASM_ARCH_MSM_IRQS_8XXX_H
15
16/* MSM ACPU Interrupt Numbers */
17
18#define INT_A9_M2A_0 0
19#define INT_A9_M2A_1 1
20#define INT_A9_M2A_2 2
21#define INT_A9_M2A_3 3
22#define INT_A9_M2A_4 4
23#define INT_A9_M2A_5 5
24#define INT_A9_M2A_6 6
25#define INT_GP_TIMER_EXP 7
26#define INT_DEBUG_TIMER_EXP 8
27#define INT_SIRC_0 9
28#define INT_SDC3_0 10
29#define INT_SDC3_1 11
30#define INT_SDC4_0 12
31#define INT_SDC4_1 13
32#define INT_AD6_EXT_VFR 14
33#define INT_USB_OTG 15
34#define INT_MDDI_PRI 16
35#define INT_MDDI_EXT 17
36#define INT_MDDI_CLIENT 18
37#define INT_MDP 19
38#define INT_GRAPHICS 20
39#define INT_ADM_AARM 21
40#define INT_ADSP_A11 22
41#define INT_ADSP_A9_A11 23
42#define INT_SDC1_0 24
43#define INT_SDC1_1 25
44#define INT_SDC2_0 26
45#define INT_SDC2_1 27
46#define INT_KEYSENSE 28
47#define INT_TCHSCRN_SSBI 29
48#define INT_TCHSCRN1 30
49#define INT_TCHSCRN2 31
50
51#define INT_TCSR_MPRPH_SC1 (32 + 0)
52#define INT_USB_FS2 (32 + 1)
53#define INT_PWB_I2C (32 + 2)
54#define INT_SOFTRESET (32 + 3)
55#define INT_NAND_WR_ER_DONE (32 + 4)
56#define INT_NAND_OP_DONE (32 + 5)
57#define INT_TCSR_MPRPH_SC2 (32 + 6)
58#define INT_OP_PEN (32 + 7)
59#define INT_AD_HSSD (32 + 8)
60#define INT_ARM11_PM (32 + 9)
61#define INT_SDMA_NON_SECURE (32 + 10)
62#define INT_TSIF_IRQ (32 + 11)
63#define INT_UART1DM_IRQ (32 + 12)
64#define INT_UART1DM_RX (32 + 13)
65#define INT_SDMA_SECURE (32 + 14)
66#define INT_SI2S_SLAVE (32 + 15)
67#define INT_SC_I2CPU (32 + 16)
68#define INT_SC_DBG_RDTRFULL (32 + 17)
69#define INT_SC_DBG_WDTRFULL (32 + 18)
70#define INT_SCPLL_CTL_DONE (32 + 19)
71#define INT_UART2DM_IRQ (32 + 20)
72#define INT_UART2DM_RX (32 + 21)
73#define INT_VDC_MEC (32 + 22)
74#define INT_VDC_DB (32 + 23)
75#define INT_VDC_AXI (32 + 24)
76#define INT_VFE (32 + 25)
77#define INT_USB_HS (32 + 26)
78#define INT_AUDIO_OUT0 (32 + 27)
79#define INT_AUDIO_OUT1 (32 + 28)
80#define INT_CRYPTO (32 + 29)
81#define INT_AD6M_IDLE (32 + 30)
82#define INT_SIRC_1 (32 + 31)
83
84#define NR_GPIO_IRQS 165
85#define NR_MSM_IRQS 64
86#define NR_BOARD_IRQS 64
87
88#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs.h b/arch/arm/mach-msm/include/mach/irqs.h
deleted file mode 100644
index 164d355c96ea..000000000000
--- a/arch/arm/mach-msm/include/mach/irqs.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_IRQS_H
18#define __ASM_ARCH_MSM_IRQS_H
19
20#define MSM_IRQ_BIT(irq) (1 << ((irq) & 31))
21
22#if defined(CONFIG_ARCH_MSM7X30)
23#include "irqs-7x30.h"
24#elif defined(CONFIG_ARCH_QSD8X50)
25#include "irqs-8x50.h"
26#include "sirc.h"
27#elif defined(CONFIG_ARCH_MSM_ARM11)
28#include "irqs-7x00.h"
29#else
30#error "Unknown architecture specification"
31#endif
32
33#define NR_IRQS (NR_MSM_IRQS + NR_GPIO_IRQS + NR_BOARD_IRQS)
34#define MSM_GPIO_TO_INT(n) (NR_MSM_IRQS + (n))
35#define MSM_INT_TO_REG(base, irq) (base + irq / 32)
36
37#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_gpiomux.h b/arch/arm/mach-msm/include/mach/msm_gpiomux.h
deleted file mode 100644
index 0c7d3936e02f..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_gpiomux.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef _LINUX_MSM_GPIOMUX_H
14#define _LINUX_MSM_GPIOMUX_H
15
16#ifdef CONFIG_MSM_GPIOMUX
17
18/* Increment a gpio's reference count, possibly activating the line. */
19int __must_check msm_gpiomux_get(unsigned gpio);
20
21/* Decrement a gpio's reference count, possibly suspending the line. */
22int msm_gpiomux_put(unsigned gpio);
23
24#else
25
26static inline int __must_check msm_gpiomux_get(unsigned gpio)
27{
28 return -ENOSYS;
29}
30
31static inline int msm_gpiomux_put(unsigned gpio)
32{
33 return -ENOSYS;
34}
35
36#endif
37
38#endif /* _LINUX_MSM_GPIOMUX_H */
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
deleted file mode 100644
index 67dc0e98b958..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x00.h
+++ /dev/null
@@ -1,108 +0,0 @@
1/* arch/arm/mach-msm/include/mach/msm_iomap.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
5 * Author: Brian Swetland <swetland@google.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 *
17 * The MSM peripherals are spread all over across 768MB of physical
18 * space, which makes just having a simple IO_ADDRESS macro to slide
19 * them into the right virtual location rough. Instead, we will
20 * provide a master phys->virt mapping for peripherals here.
21 *
22 */
23
24#ifndef __ASM_ARCH_MSM_IOMAP_7X00_H
25#define __ASM_ARCH_MSM_IOMAP_7X00_H
26
27#include <asm/sizes.h>
28
29/* Physical base address and size of peripherals.
30 * Ordered by the virtual base addresses they will be mapped at.
31 *
32 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
33 * instruction, otherwise entry-macro.S will not compile.
34 *
35 * If you add or remove entries here, you'll want to edit the
36 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
37 * changes.
38 *
39 */
40
41#define MSM_VIC_BASE IOMEM(0xE0000000)
42#define MSM_VIC_PHYS 0xC0000000
43#define MSM_VIC_SIZE SZ_4K
44
45#define MSM7X00_CSR_PHYS 0xC0100000
46#define MSM7X00_CSR_SIZE SZ_4K
47
48#define MSM_DMOV_BASE IOMEM(0xE0002000)
49#define MSM_DMOV_PHYS 0xA9700000
50#define MSM_DMOV_SIZE SZ_4K
51
52#define MSM7X00_GPIO1_PHYS 0xA9200000
53#define MSM7X00_GPIO1_SIZE SZ_4K
54
55#define MSM7X00_GPIO2_PHYS 0xA9300000
56#define MSM7X00_GPIO2_SIZE SZ_4K
57
58#define MSM_CLK_CTL_BASE IOMEM(0xE0005000)
59#define MSM_CLK_CTL_PHYS 0xA8600000
60#define MSM_CLK_CTL_SIZE SZ_4K
61
62#define MSM_SHARED_RAM_BASE IOMEM(0xE0100000)
63#define MSM_SHARED_RAM_PHYS 0x01F00000
64#define MSM_SHARED_RAM_SIZE SZ_1M
65
66#define MSM_UART1_PHYS 0xA9A00000
67#define MSM_UART1_SIZE SZ_4K
68
69#define MSM_UART2_PHYS 0xA9B00000
70#define MSM_UART2_SIZE SZ_4K
71
72#define MSM_UART3_PHYS 0xA9C00000
73#define MSM_UART3_SIZE SZ_4K
74
75#define MSM_SDC1_PHYS 0xA0400000
76#define MSM_SDC1_SIZE SZ_4K
77
78#define MSM_SDC2_PHYS 0xA0500000
79#define MSM_SDC2_SIZE SZ_4K
80
81#define MSM_SDC3_PHYS 0xA0600000
82#define MSM_SDC3_SIZE SZ_4K
83
84#define MSM_SDC4_PHYS 0xA0700000
85#define MSM_SDC4_SIZE SZ_4K
86
87#define MSM_I2C_PHYS 0xA9900000
88#define MSM_I2C_SIZE SZ_4K
89
90#define MSM_HSUSB_PHYS 0xA0800000
91#define MSM_HSUSB_SIZE SZ_4K
92
93#define MSM_PMDH_PHYS 0xAA600000
94#define MSM_PMDH_SIZE SZ_4K
95
96#define MSM_EMDH_PHYS 0xAA700000
97#define MSM_EMDH_SIZE SZ_4K
98
99#define MSM_MDP_PHYS 0xAA200000
100#define MSM_MDP_SIZE 0x000F0000
101
102#define MSM_MDC_PHYS 0xAA500000
103#define MSM_MDC_SIZE SZ_1M
104
105#define MSM_AD5_PHYS 0xAC000000
106#define MSM_AD5_SIZE (SZ_1M*13)
107
108#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h b/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
deleted file mode 100644
index 198202c267c8..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap-7x30.h
+++ /dev/null
@@ -1,103 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2011 Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_7X30_H
24#define __ASM_ARCH_MSM_IOMAP_7X30_H
25
26/* Physical base address and size of peripherals.
27 * Ordered by the virtual base addresses they will be mapped at.
28 *
29 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
30 * instruction, otherwise entry-macro.S will not compile.
31 *
32 * If you add or remove entries here, you'll want to edit the
33 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
34 * changes.
35 *
36 */
37
38#define MSM_VIC_BASE IOMEM(0xE0000000)
39#define MSM_VIC_PHYS 0xC0080000
40#define MSM_VIC_SIZE SZ_4K
41
42#define MSM7X30_CSR_PHYS 0xC0100000
43#define MSM7X30_CSR_SIZE SZ_4K
44
45#define MSM_DMOV_BASE IOMEM(0xE0002000)
46#define MSM_DMOV_PHYS 0xAC400000
47#define MSM_DMOV_SIZE SZ_4K
48
49#define MSM7X30_GPIO1_PHYS 0xAC001000
50#define MSM7X30_GPIO1_SIZE SZ_4K
51
52#define MSM7X30_GPIO2_PHYS 0xAC101000
53#define MSM7X30_GPIO2_SIZE SZ_4K
54
55#define MSM_CLK_CTL_BASE IOMEM(0xE0005000)
56#define MSM_CLK_CTL_PHYS 0xAB800000
57#define MSM_CLK_CTL_SIZE SZ_4K
58
59#define MSM_CLK_CTL_SH2_BASE IOMEM(0xE0006000)
60#define MSM_CLK_CTL_SH2_PHYS 0xABA01000
61#define MSM_CLK_CTL_SH2_SIZE SZ_4K
62
63#define MSM_ACC_BASE IOMEM(0xE0007000)
64#define MSM_ACC_PHYS 0xC0101000
65#define MSM_ACC_SIZE SZ_4K
66
67#define MSM_SAW_BASE IOMEM(0xE0008000)
68#define MSM_SAW_PHYS 0xC0102000
69#define MSM_SAW_SIZE SZ_4K
70
71#define MSM_GCC_BASE IOMEM(0xE0009000)
72#define MSM_GCC_PHYS 0xC0182000
73#define MSM_GCC_SIZE SZ_4K
74
75#define MSM_TCSR_BASE IOMEM(0xE000A000)
76#define MSM_TCSR_PHYS 0xAB600000
77#define MSM_TCSR_SIZE SZ_4K
78
79#define MSM_SHARED_RAM_BASE IOMEM(0xE0100000)
80#define MSM_SHARED_RAM_PHYS 0x00100000
81#define MSM_SHARED_RAM_SIZE SZ_1M
82
83#define MSM_UART1_PHYS 0xACA00000
84#define MSM_UART1_SIZE SZ_4K
85
86#define MSM_UART2_PHYS 0xACB00000
87#define MSM_UART2_SIZE SZ_4K
88
89#define MSM_UART3_PHYS 0xACC00000
90#define MSM_UART3_SIZE SZ_4K
91
92#define MSM_MDC_BASE IOMEM(0xE0200000)
93#define MSM_MDC_PHYS 0xAA500000
94#define MSM_MDC_SIZE SZ_1M
95
96#define MSM_AD5_BASE IOMEM(0xE0300000)
97#define MSM_AD5_PHYS 0xA7000000
98#define MSM_AD5_SIZE (SZ_1M*13)
99
100#define MSM_HSUSB_PHYS 0xA3600000
101#define MSM_HSUSB_SIZE SZ_1K
102
103#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h b/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
deleted file mode 100644
index 0faa894729b7..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap-8x50.h
+++ /dev/null
@@ -1,125 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2011 Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_8X50_H
24#define __ASM_ARCH_MSM_IOMAP_8X50_H
25
26/* Physical base address and size of peripherals.
27 * Ordered by the virtual base addresses they will be mapped at.
28 *
29 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
30 * instruction, otherwise entry-macro.S will not compile.
31 *
32 * If you add or remove entries here, you'll want to edit the
33 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
34 * changes.
35 *
36 */
37
38#define MSM_VIC_BASE IOMEM(0xE0000000)
39#define MSM_VIC_PHYS 0xAC000000
40#define MSM_VIC_SIZE SZ_4K
41
42#define QSD8X50_CSR_PHYS 0xAC100000
43#define QSD8X50_CSR_SIZE SZ_4K
44
45#define MSM_DMOV_BASE IOMEM(0xE0002000)
46#define MSM_DMOV_PHYS 0xA9700000
47#define MSM_DMOV_SIZE SZ_4K
48
49#define QSD8X50_GPIO1_PHYS 0xA9000000
50#define QSD8X50_GPIO1_SIZE SZ_4K
51
52#define QSD8X50_GPIO2_PHYS 0xA9100000
53#define QSD8X50_GPIO2_SIZE SZ_4K
54
55#define MSM_CLK_CTL_BASE IOMEM(0xE0005000)
56#define MSM_CLK_CTL_PHYS 0xA8600000
57#define MSM_CLK_CTL_SIZE SZ_4K
58
59#define MSM_SIRC_BASE IOMEM(0xE1006000)
60#define MSM_SIRC_PHYS 0xAC200000
61#define MSM_SIRC_SIZE SZ_4K
62
63#define MSM_SCPLL_BASE IOMEM(0xE1007000)
64#define MSM_SCPLL_PHYS 0xA8800000
65#define MSM_SCPLL_SIZE SZ_4K
66
67#ifdef CONFIG_MSM_SOC_REV_A
68#define MSM_SMI_BASE 0xE0000000
69#else
70#define MSM_SMI_BASE 0x00000000
71#endif
72
73#define MSM_SHARED_RAM_BASE IOMEM(0xE0100000)
74#define MSM_SHARED_RAM_PHYS (MSM_SMI_BASE + 0x00100000)
75#define MSM_SHARED_RAM_SIZE SZ_1M
76
77#define MSM_UART1_PHYS 0xA9A00000
78#define MSM_UART1_SIZE SZ_4K
79
80#define MSM_UART2_PHYS 0xA9B00000
81#define MSM_UART2_SIZE SZ_4K
82
83#define MSM_UART3_PHYS 0xA9C00000
84#define MSM_UART3_SIZE SZ_4K
85
86#define MSM_MDC_BASE IOMEM(0xE0200000)
87#define MSM_MDC_PHYS 0xAA500000
88#define MSM_MDC_SIZE SZ_1M
89
90#define MSM_AD5_BASE IOMEM(0xE0300000)
91#define MSM_AD5_PHYS 0xAC000000
92#define MSM_AD5_SIZE (SZ_1M*13)
93
94
95#define MSM_I2C_SIZE SZ_4K
96#define MSM_I2C_PHYS 0xA9900000
97
98#define MSM_HSUSB_PHYS 0xA0800000
99#define MSM_HSUSB_SIZE SZ_1K
100
101#define MSM_NAND_PHYS 0xA0A00000
102
103
104#define MSM_TSIF_PHYS (0xa0100000)
105#define MSM_TSIF_SIZE (0x200)
106
107#define MSM_TSSC_PHYS 0xAA300000
108
109#define MSM_UART1DM_PHYS 0xA0200000
110#define MSM_UART2DM_PHYS 0xA0900000
111
112
113#define MSM_SDC1_PHYS 0xA0300000
114#define MSM_SDC1_SIZE SZ_4K
115
116#define MSM_SDC2_PHYS 0xA0400000
117#define MSM_SDC2_SIZE SZ_4K
118
119#define MSM_SDC3_PHYS 0xA0500000
120#define MSM_SDC3_SIZE SZ_4K
121
122#define MSM_SDC4_PHYS 0xA0600000
123#define MSM_SDC4_SIZE SZ_4K
124
125#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
deleted file mode 100644
index 0e4f49157684..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 *
16 * The MSM peripherals are spread all over across 768MB of physical
17 * space, which makes just having a simple IO_ADDRESS macro to slide
18 * them into the right virtual location rough. Instead, we will
19 * provide a master phys->virt mapping for peripherals here.
20 *
21 */
22
23#ifndef __ASM_ARCH_MSM_IOMAP_H
24#define __ASM_ARCH_MSM_IOMAP_H
25
26#include <asm/sizes.h>
27
28/* Physical base address and size of peripherals.
29 * Ordered by the virtual base addresses they will be mapped at.
30 *
31 * MSM_VIC_BASE must be an value that can be loaded via a "mov"
32 * instruction, otherwise entry-macro.S will not compile.
33 *
34 * If you add or remove entries here, you'll want to edit the
35 * msm_io_desc array in arch/arm/mach-msm/io.c to reflect your
36 * changes.
37 *
38 */
39
40#if defined(CONFIG_ARCH_MSM7X30)
41#include "msm_iomap-7x30.h"
42#elif defined(CONFIG_ARCH_QSD8X50)
43#include "msm_iomap-8x50.h"
44#else
45#include "msm_iomap-7x00.h"
46#endif
47
48/* Virtual addresses shared across all MSM targets. */
49#define MSM_CSR_BASE IOMEM(0xE0001000)
50#define MSM_GPIO1_BASE IOMEM(0xE0003000)
51#define MSM_GPIO2_BASE IOMEM(0xE0004000)
52
53#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_smd.h b/arch/arm/mach-msm/include/mach/msm_smd.h
deleted file mode 100644
index 029463ec8756..000000000000
--- a/arch/arm/mach-msm/include/mach/msm_smd.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/* linux/include/asm-arm/arch-msm/msm_smd.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ASM_ARCH_MSM_SMD_H
18#define __ASM_ARCH_MSM_SMD_H
19
20typedef struct smd_channel smd_channel_t;
21
22extern int (*msm_check_for_modem_crash)(void);
23
24/* warning: notify() may be called before open returns */
25int smd_open(const char *name, smd_channel_t **ch, void *priv,
26 void (*notify)(void *priv, unsigned event));
27
28#define SMD_EVENT_DATA 1
29#define SMD_EVENT_OPEN 2
30#define SMD_EVENT_CLOSE 3
31
32int smd_close(smd_channel_t *ch);
33
34/* passing a null pointer for data reads and discards */
35int smd_read(smd_channel_t *ch, void *data, int len);
36
37/* Write to stream channels may do a partial write and return
38** the length actually written.
39** Write to packet channels will never do a partial write --
40** it will return the requested length written or an error.
41*/
42int smd_write(smd_channel_t *ch, const void *data, int len);
43int smd_write_atomic(smd_channel_t *ch, const void *data, int len);
44
45int smd_write_avail(smd_channel_t *ch);
46int smd_read_avail(smd_channel_t *ch);
47
48/* Returns the total size of the current packet being read.
49** Returns 0 if no packets available or a stream channel.
50*/
51int smd_cur_packet_size(smd_channel_t *ch);
52
53/* used for tty unthrottling and the like -- causes the notify()
54** callback to be called from the same lock context as is used
55** when it is called from channel updates
56*/
57void smd_kick(smd_channel_t *ch);
58
59
60#if 0
61/* these are interruptable waits which will block you until the specified
62** number of bytes are readable or writable.
63*/
64int smd_wait_until_readable(smd_channel_t *ch, int bytes);
65int smd_wait_until_writable(smd_channel_t *ch, int bytes);
66#endif
67
68typedef enum {
69 SMD_PORT_DS = 0,
70 SMD_PORT_DIAG,
71 SMD_PORT_RPC_CALL,
72 SMD_PORT_RPC_REPLY,
73 SMD_PORT_BT,
74 SMD_PORT_CONTROL,
75 SMD_PORT_MEMCPY_SPARE1,
76 SMD_PORT_DATA1,
77 SMD_PORT_DATA2,
78 SMD_PORT_DATA3,
79 SMD_PORT_DATA4,
80 SMD_PORT_DATA5,
81 SMD_PORT_DATA6,
82 SMD_PORT_DATA7,
83 SMD_PORT_DATA8,
84 SMD_PORT_DATA9,
85 SMD_PORT_DATA10,
86 SMD_PORT_DATA11,
87 SMD_PORT_DATA12,
88 SMD_PORT_DATA13,
89 SMD_PORT_DATA14,
90 SMD_PORT_DATA15,
91 SMD_PORT_DATA16,
92 SMD_PORT_DATA17,
93 SMD_PORT_DATA18,
94 SMD_PORT_DATA19,
95 SMD_PORT_DATA20,
96 SMD_PORT_GPS_NMEA,
97 SMD_PORT_BRIDGE_1,
98 SMD_PORT_BRIDGE_2,
99 SMD_PORT_BRIDGE_3,
100 SMD_PORT_BRIDGE_4,
101 SMD_PORT_BRIDGE_5,
102 SMD_PORT_LOOPBACK,
103 SMD_PORT_CS_APPS_MODEM,
104 SMD_PORT_CS_APPS_DSP,
105 SMD_PORT_CS_MODEM_DSP,
106 SMD_NUM_PORTS,
107} smd_port_id_type;
108
109#endif
diff --git a/arch/arm/mach-msm/include/mach/sirc.h b/arch/arm/mach-msm/include/mach/sirc.h
deleted file mode 100644
index ef55868a5b8a..000000000000
--- a/arch/arm/mach-msm/include/mach/sirc.h
+++ /dev/null
@@ -1,98 +0,0 @@
1/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ASM_ARCH_MSM_SIRC_H
14#define __ASM_ARCH_MSM_SIRC_H
15
16struct sirc_regs_t {
17 void *int_enable;
18 void *int_enable_clear;
19 void *int_enable_set;
20 void *int_type;
21 void *int_polarity;
22 void *int_clear;
23};
24
25struct sirc_cascade_regs {
26 void *int_status;
27 unsigned int cascade_irq;
28};
29
30void msm_init_sirc(void);
31void msm_sirc_enter_sleep(void);
32void msm_sirc_exit_sleep(void);
33
34#if defined(CONFIG_ARCH_MSM_SCORPION)
35
36#include <mach/msm_iomap.h>
37
38/*
39 * Secondary interrupt controller interrupts
40 */
41
42#define FIRST_SIRC_IRQ (NR_MSM_IRQS + NR_GPIO_IRQS)
43
44#define INT_UART1 (FIRST_SIRC_IRQ + 0)
45#define INT_UART2 (FIRST_SIRC_IRQ + 1)
46#define INT_UART3 (FIRST_SIRC_IRQ + 2)
47#define INT_UART1_RX (FIRST_SIRC_IRQ + 3)
48#define INT_UART2_RX (FIRST_SIRC_IRQ + 4)
49#define INT_UART3_RX (FIRST_SIRC_IRQ + 5)
50#define INT_SPI_INPUT (FIRST_SIRC_IRQ + 6)
51#define INT_SPI_OUTPUT (FIRST_SIRC_IRQ + 7)
52#define INT_SPI_ERROR (FIRST_SIRC_IRQ + 8)
53#define INT_GPIO_GROUP1 (FIRST_SIRC_IRQ + 9)
54#define INT_GPIO_GROUP2 (FIRST_SIRC_IRQ + 10)
55#define INT_GPIO_GROUP1_SECURE (FIRST_SIRC_IRQ + 11)
56#define INT_GPIO_GROUP2_SECURE (FIRST_SIRC_IRQ + 12)
57#define INT_AVS_SVIC (FIRST_SIRC_IRQ + 13)
58#define INT_AVS_REQ_UP (FIRST_SIRC_IRQ + 14)
59#define INT_AVS_REQ_DOWN (FIRST_SIRC_IRQ + 15)
60#define INT_PBUS_ERR (FIRST_SIRC_IRQ + 16)
61#define INT_AXI_ERR (FIRST_SIRC_IRQ + 17)
62#define INT_SMI_ERR (FIRST_SIRC_IRQ + 18)
63#define INT_EBI1_ERR (FIRST_SIRC_IRQ + 19)
64#define INT_IMEM_ERR (FIRST_SIRC_IRQ + 20)
65#define INT_TEMP_SENSOR (FIRST_SIRC_IRQ + 21)
66#define INT_TV_ENC (FIRST_SIRC_IRQ + 22)
67#define INT_GRP2D (FIRST_SIRC_IRQ + 23)
68#define INT_GSBI_QUP (FIRST_SIRC_IRQ + 24)
69#define INT_SC_ACG (FIRST_SIRC_IRQ + 25)
70#define INT_WDT0 (FIRST_SIRC_IRQ + 26)
71#define INT_WDT1 (FIRST_SIRC_IRQ + 27)
72
73#if defined(CONFIG_MSM_SOC_REV_A)
74#define NR_SIRC_IRQS 28
75#define SIRC_MASK 0x0FFFFFFF
76#else
77#define NR_SIRC_IRQS 23
78#define SIRC_MASK 0x007FFFFF
79#endif
80
81#define LAST_SIRC_IRQ (FIRST_SIRC_IRQ + NR_SIRC_IRQS - 1)
82
83#define SPSS_SIRC_INT_SELECT (MSM_SIRC_BASE + 0x00)
84#define SPSS_SIRC_INT_ENABLE (MSM_SIRC_BASE + 0x04)
85#define SPSS_SIRC_INT_ENABLE_CLEAR (MSM_SIRC_BASE + 0x08)
86#define SPSS_SIRC_INT_ENABLE_SET (MSM_SIRC_BASE + 0x0C)
87#define SPSS_SIRC_INT_TYPE (MSM_SIRC_BASE + 0x10)
88#define SPSS_SIRC_INT_POLARITY (MSM_SIRC_BASE + 0x14)
89#define SPSS_SIRC_SECURITY (MSM_SIRC_BASE + 0x18)
90#define SPSS_SIRC_IRQ_STATUS (MSM_SIRC_BASE + 0x1C)
91#define SPSS_SIRC_IRQ1_STATUS (MSM_SIRC_BASE + 0x20)
92#define SPSS_SIRC_RAW_STATUS (MSM_SIRC_BASE + 0x24)
93#define SPSS_SIRC_INT_CLEAR (MSM_SIRC_BASE + 0x28)
94#define SPSS_SIRC_SOFT_INT (MSM_SIRC_BASE + 0x2C)
95
96#endif
97
98#endif
diff --git a/arch/arm/mach-msm/include/mach/vreg.h b/arch/arm/mach-msm/include/mach/vreg.h
deleted file mode 100644
index 6626e7864e28..000000000000
--- a/arch/arm/mach-msm/include/mach/vreg.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/include/asm-arm/arch-msm/vreg.h
2 *
3 * Copyright (C) 2008 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#ifndef __ARCH_ARM_MACH_MSM_VREG_H
18#define __ARCH_ARM_MACH_MSM_VREG_H
19
20struct vreg;
21
22struct vreg *vreg_get(struct device *dev, const char *id);
23void vreg_put(struct vreg *vreg);
24
25int vreg_enable(struct vreg *vreg);
26int vreg_disable(struct vreg *vreg);
27int vreg_set_level(struct vreg *vreg, unsigned mv);
28
29#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
deleted file mode 100644
index b042dca1f633..000000000000
--- a/arch/arm/mach-msm/io.c
+++ /dev/null
@@ -1,161 +0,0 @@
1/* arch/arm/mach-msm/io.c
2 *
3 * MSM7K, QSD io support
4 *
5 * Copyright (C) 2007 Google, Inc.
6 * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved.
7 * Author: Brian Swetland <swetland@google.com>
8 *
9 * This software is licensed under the terms of the GNU General Public
10 * License version 2, as published by the Free Software Foundation, and
11 * may be copied, distributed, and modified under those terms.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 */
19
20#include <linux/kernel.h>
21#include <linux/bug.h>
22#include <linux/init.h>
23#include <linux/io.h>
24#include <linux/export.h>
25
26#include <mach/hardware.h>
27#include <asm/page.h>
28#include <mach/msm_iomap.h>
29#include <asm/mach/map.h>
30
31#include "common.h"
32
33#define MSM_CHIP_DEVICE_TYPE(name, chip, mem_type) { \
34 .virtual = (unsigned long) MSM_##name##_BASE, \
35 .pfn = __phys_to_pfn(chip##_##name##_PHYS), \
36 .length = chip##_##name##_SIZE, \
37 .type = mem_type, \
38 }
39
40#define MSM_DEVICE_TYPE(name, mem_type) \
41 MSM_CHIP_DEVICE_TYPE(name, MSM, mem_type)
42#define MSM_CHIP_DEVICE(name, chip) \
43 MSM_CHIP_DEVICE_TYPE(name, chip, MT_DEVICE)
44#define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM)
45
46#if defined(CONFIG_ARCH_MSM7X00A)
47static struct map_desc msm_io_desc[] __initdata = {
48 MSM_DEVICE_TYPE(VIC, MT_DEVICE_NONSHARED),
49 MSM_CHIP_DEVICE_TYPE(CSR, MSM7X00, MT_DEVICE_NONSHARED),
50 MSM_DEVICE_TYPE(DMOV, MT_DEVICE_NONSHARED),
51 MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED),
52 MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED),
53 MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED),
54 {
55 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
56 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
57 .length = MSM_SHARED_RAM_SIZE,
58 .type = MT_DEVICE,
59 },
60#if defined(CONFIG_DEBUG_MSM_UART)
61 {
62 /* Must be last: virtual and pfn filled in by debug_ll_addr() */
63 .length = SZ_4K,
64 .type = MT_DEVICE_NONSHARED,
65 }
66#endif
67};
68
69void __init msm_map_common_io(void)
70{
71 size_t size = ARRAY_SIZE(msm_io_desc);
72
73 /* Make sure the peripheral register window is closed, since
74 * we will use PTE flags (TEX[1]=1,B=0,C=1) to determine which
75 * pages are peripheral interface or not.
76 */
77 asm("mcr p15, 0, %0, c15, c2, 4" : : "r" (0));
78#if defined(CONFIG_DEBUG_MSM_UART)
79#ifdef CONFIG_MMU
80 debug_ll_addr(&msm_io_desc[size - 1].pfn,
81 &msm_io_desc[size - 1].virtual);
82#endif
83 msm_io_desc[size - 1].pfn = __phys_to_pfn(msm_io_desc[size - 1].pfn);
84#endif
85 iotable_init(msm_io_desc, size);
86}
87#endif
88
89#ifdef CONFIG_ARCH_QSD8X50
90static struct map_desc qsd8x50_io_desc[] __initdata = {
91 MSM_DEVICE(VIC),
92 MSM_CHIP_DEVICE(CSR, QSD8X50),
93 MSM_DEVICE(DMOV),
94 MSM_CHIP_DEVICE(GPIO1, QSD8X50),
95 MSM_CHIP_DEVICE(GPIO2, QSD8X50),
96 MSM_DEVICE(CLK_CTL),
97 MSM_DEVICE(SIRC),
98 MSM_DEVICE(SCPLL),
99 MSM_DEVICE(AD5),
100 MSM_DEVICE(MDC),
101 {
102 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
103 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
104 .length = MSM_SHARED_RAM_SIZE,
105 .type = MT_DEVICE,
106 },
107};
108
109void __init msm_map_qsd8x50_io(void)
110{
111 debug_ll_io_init();
112 iotable_init(qsd8x50_io_desc, ARRAY_SIZE(qsd8x50_io_desc));
113}
114#endif /* CONFIG_ARCH_QSD8X50 */
115
116#ifdef CONFIG_ARCH_MSM7X30
117static struct map_desc msm7x30_io_desc[] __initdata = {
118 MSM_DEVICE(VIC),
119 MSM_CHIP_DEVICE(CSR, MSM7X30),
120 MSM_DEVICE(DMOV),
121 MSM_CHIP_DEVICE(GPIO1, MSM7X30),
122 MSM_CHIP_DEVICE(GPIO2, MSM7X30),
123 MSM_DEVICE(CLK_CTL),
124 MSM_DEVICE(CLK_CTL_SH2),
125 MSM_DEVICE(AD5),
126 MSM_DEVICE(MDC),
127 MSM_DEVICE(ACC),
128 MSM_DEVICE(SAW),
129 MSM_DEVICE(GCC),
130 MSM_DEVICE(TCSR),
131 {
132 .virtual = (unsigned long) MSM_SHARED_RAM_BASE,
133 .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
134 .length = MSM_SHARED_RAM_SIZE,
135 .type = MT_DEVICE,
136 },
137};
138
139void __init msm_map_msm7x30_io(void)
140{
141 debug_ll_io_init();
142 iotable_init(msm7x30_io_desc, ARRAY_SIZE(msm7x30_io_desc));
143}
144#endif /* CONFIG_ARCH_MSM7X30 */
145
146#ifdef CONFIG_ARCH_MSM7X00A
147void __iomem *__msm_ioremap_caller(phys_addr_t phys_addr, size_t size,
148 unsigned int mtype, void *caller)
149{
150 if (mtype == MT_DEVICE) {
151 /* The peripherals in the 88000000 - D0000000 range
152 * are only accessible by type MT_DEVICE_NONSHARED.
153 * Adjust mtype as necessary to make this "just work."
154 */
155 if ((phys_addr >= 0x88000000) && (phys_addr < 0xD0000000))
156 mtype = MT_DEVICE_NONSHARED;
157 }
158
159 return __arm_ioremap_caller(phys_addr, size, mtype, caller);
160}
161#endif
diff --git a/arch/arm/mach-msm/irq-vic.c b/arch/arm/mach-msm/irq-vic.c
deleted file mode 100644
index 1b54f807c2d0..000000000000
--- a/arch/arm/mach-msm/irq-vic.c
+++ /dev/null
@@ -1,363 +0,0 @@
1/*
2 * Copyright (C) 2007 Google, Inc.
3 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/sched.h>
19#include <linux/interrupt.h>
20#include <linux/ptrace.h>
21#include <linux/timer.h>
22#include <linux/irq.h>
23#include <linux/io.h>
24
25#include <asm/cacheflush.h>
26
27#include <mach/hardware.h>
28
29#include <mach/msm_iomap.h>
30
31#include "smd_private.h"
32
33enum {
34 IRQ_DEBUG_SLEEP_INT_TRIGGER = 1U << 0,
35 IRQ_DEBUG_SLEEP_INT = 1U << 1,
36 IRQ_DEBUG_SLEEP_ABORT = 1U << 2,
37 IRQ_DEBUG_SLEEP = 1U << 3,
38 IRQ_DEBUG_SLEEP_REQUEST = 1U << 4,
39};
40static int msm_irq_debug_mask;
41module_param_named(debug_mask, msm_irq_debug_mask, int,
42 S_IRUGO | S_IWUSR | S_IWGRP);
43
44#define VIC_REG(off) (MSM_VIC_BASE + (off))
45#define VIC_INT_TO_REG_ADDR(base, irq) (base + (irq / 32) * 4)
46#define VIC_INT_TO_REG_INDEX(irq) ((irq >> 5) & 3)
47
48#define VIC_INT_SELECT0 VIC_REG(0x0000) /* 1: FIQ, 0: IRQ */
49#define VIC_INT_SELECT1 VIC_REG(0x0004) /* 1: FIQ, 0: IRQ */
50#define VIC_INT_SELECT2 VIC_REG(0x0008) /* 1: FIQ, 0: IRQ */
51#define VIC_INT_SELECT3 VIC_REG(0x000C) /* 1: FIQ, 0: IRQ */
52#define VIC_INT_EN0 VIC_REG(0x0010)
53#define VIC_INT_EN1 VIC_REG(0x0014)
54#define VIC_INT_EN2 VIC_REG(0x0018)
55#define VIC_INT_EN3 VIC_REG(0x001C)
56#define VIC_INT_ENCLEAR0 VIC_REG(0x0020)
57#define VIC_INT_ENCLEAR1 VIC_REG(0x0024)
58#define VIC_INT_ENCLEAR2 VIC_REG(0x0028)
59#define VIC_INT_ENCLEAR3 VIC_REG(0x002C)
60#define VIC_INT_ENSET0 VIC_REG(0x0030)
61#define VIC_INT_ENSET1 VIC_REG(0x0034)
62#define VIC_INT_ENSET2 VIC_REG(0x0038)
63#define VIC_INT_ENSET3 VIC_REG(0x003C)
64#define VIC_INT_TYPE0 VIC_REG(0x0040) /* 1: EDGE, 0: LEVEL */
65#define VIC_INT_TYPE1 VIC_REG(0x0044) /* 1: EDGE, 0: LEVEL */
66#define VIC_INT_TYPE2 VIC_REG(0x0048) /* 1: EDGE, 0: LEVEL */
67#define VIC_INT_TYPE3 VIC_REG(0x004C) /* 1: EDGE, 0: LEVEL */
68#define VIC_INT_POLARITY0 VIC_REG(0x0050) /* 1: NEG, 0: POS */
69#define VIC_INT_POLARITY1 VIC_REG(0x0054) /* 1: NEG, 0: POS */
70#define VIC_INT_POLARITY2 VIC_REG(0x0058) /* 1: NEG, 0: POS */
71#define VIC_INT_POLARITY3 VIC_REG(0x005C) /* 1: NEG, 0: POS */
72#define VIC_NO_PEND_VAL VIC_REG(0x0060)
73
74#if defined(CONFIG_ARCH_MSM_SCORPION)
75#define VIC_NO_PEND_VAL_FIQ VIC_REG(0x0064)
76#define VIC_INT_MASTEREN VIC_REG(0x0068) /* 1: IRQ, 2: FIQ */
77#define VIC_CONFIG VIC_REG(0x006C) /* 1: USE SC VIC */
78#else
79#define VIC_INT_MASTEREN VIC_REG(0x0064) /* 1: IRQ, 2: FIQ */
80#define VIC_PROTECTION VIC_REG(0x006C) /* 1: ENABLE */
81#define VIC_CONFIG VIC_REG(0x0068) /* 1: USE ARM1136 VIC */
82#endif
83
84#define VIC_IRQ_STATUS0 VIC_REG(0x0080)
85#define VIC_IRQ_STATUS1 VIC_REG(0x0084)
86#define VIC_IRQ_STATUS2 VIC_REG(0x0088)
87#define VIC_IRQ_STATUS3 VIC_REG(0x008C)
88#define VIC_FIQ_STATUS0 VIC_REG(0x0090)
89#define VIC_FIQ_STATUS1 VIC_REG(0x0094)
90#define VIC_FIQ_STATUS2 VIC_REG(0x0098)
91#define VIC_FIQ_STATUS3 VIC_REG(0x009C)
92#define VIC_RAW_STATUS0 VIC_REG(0x00A0)
93#define VIC_RAW_STATUS1 VIC_REG(0x00A4)
94#define VIC_RAW_STATUS2 VIC_REG(0x00A8)
95#define VIC_RAW_STATUS3 VIC_REG(0x00AC)
96#define VIC_INT_CLEAR0 VIC_REG(0x00B0)
97#define VIC_INT_CLEAR1 VIC_REG(0x00B4)
98#define VIC_INT_CLEAR2 VIC_REG(0x00B8)
99#define VIC_INT_CLEAR3 VIC_REG(0x00BC)
100#define VIC_SOFTINT0 VIC_REG(0x00C0)
101#define VIC_SOFTINT1 VIC_REG(0x00C4)
102#define VIC_SOFTINT2 VIC_REG(0x00C8)
103#define VIC_SOFTINT3 VIC_REG(0x00CC)
104#define VIC_IRQ_VEC_RD VIC_REG(0x00D0) /* pending int # */
105#define VIC_IRQ_VEC_PEND_RD VIC_REG(0x00D4) /* pending vector addr */
106#define VIC_IRQ_VEC_WR VIC_REG(0x00D8)
107
108#if defined(CONFIG_ARCH_MSM_SCORPION)
109#define VIC_FIQ_VEC_RD VIC_REG(0x00DC)
110#define VIC_FIQ_VEC_PEND_RD VIC_REG(0x00E0)
111#define VIC_FIQ_VEC_WR VIC_REG(0x00E4)
112#define VIC_IRQ_IN_SERVICE VIC_REG(0x00E8)
113#define VIC_IRQ_IN_STACK VIC_REG(0x00EC)
114#define VIC_FIQ_IN_SERVICE VIC_REG(0x00F0)
115#define VIC_FIQ_IN_STACK VIC_REG(0x00F4)
116#define VIC_TEST_BUS_SEL VIC_REG(0x00F8)
117#define VIC_IRQ_CTRL_CONFIG VIC_REG(0x00FC)
118#else
119#define VIC_IRQ_IN_SERVICE VIC_REG(0x00E0)
120#define VIC_IRQ_IN_STACK VIC_REG(0x00E4)
121#define VIC_TEST_BUS_SEL VIC_REG(0x00E8)
122#endif
123
124#define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4))
125#define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4))
126
127#if defined(CONFIG_ARCH_MSM7X30)
128#define VIC_NUM_REGS 4
129#else
130#define VIC_NUM_REGS 2
131#endif
132
133#if VIC_NUM_REGS == 2
134#define DPRINT_REGS(base_reg, format, ...) \
135 printk(KERN_INFO format " %x %x\n", ##__VA_ARGS__, \
136 readl(base_reg ## 0), readl(base_reg ## 1))
137#define DPRINT_ARRAY(array, format, ...) \
138 printk(KERN_INFO format " %x %x\n", ##__VA_ARGS__, \
139 array[0], array[1])
140#elif VIC_NUM_REGS == 4
141#define DPRINT_REGS(base_reg, format, ...) \
142 printk(KERN_INFO format " %x %x %x %x\n", ##__VA_ARGS__, \
143 readl(base_reg ## 0), readl(base_reg ## 1), \
144 readl(base_reg ## 2), readl(base_reg ## 3))
145#define DPRINT_ARRAY(array, format, ...) \
146 printk(KERN_INFO format " %x %x %x %x\n", ##__VA_ARGS__, \
147 array[0], array[1], \
148 array[2], array[3])
149#else
150#error "VIC_NUM_REGS set to illegal value"
151#endif
152
153static uint32_t msm_irq_smsm_wake_enable[2];
154static struct {
155 uint32_t int_en[2];
156 uint32_t int_type;
157 uint32_t int_polarity;
158 uint32_t int_select;
159} msm_irq_shadow_reg[VIC_NUM_REGS];
160static uint32_t msm_irq_idle_disable[VIC_NUM_REGS];
161
162#define SMSM_FAKE_IRQ (0xff)
163static uint8_t msm_irq_to_smsm[NR_IRQS] = {
164 [INT_MDDI_EXT] = 1,
165 [INT_MDDI_PRI] = 2,
166 [INT_MDDI_CLIENT] = 3,
167 [INT_USB_OTG] = 4,
168
169 [INT_PWB_I2C] = 5,
170 [INT_SDC1_0] = 6,
171 [INT_SDC1_1] = 7,
172 [INT_SDC2_0] = 8,
173
174 [INT_SDC2_1] = 9,
175 [INT_ADSP_A9_A11] = 10,
176 [INT_UART1] = 11,
177 [INT_UART2] = 12,
178
179 [INT_UART3] = 13,
180 [INT_UART1_RX] = 14,
181 [INT_UART2_RX] = 15,
182 [INT_UART3_RX] = 16,
183
184 [INT_UART1DM_IRQ] = 17,
185 [INT_UART1DM_RX] = 18,
186 [INT_KEYSENSE] = 19,
187#if !defined(CONFIG_ARCH_MSM7X30)
188 [INT_AD_HSSD] = 20,
189#endif
190
191 [INT_NAND_WR_ER_DONE] = 21,
192 [INT_NAND_OP_DONE] = 22,
193 [INT_TCHSCRN1] = 23,
194 [INT_TCHSCRN2] = 24,
195
196 [INT_TCHSCRN_SSBI] = 25,
197 [INT_USB_HS] = 26,
198 [INT_UART2DM_RX] = 27,
199 [INT_UART2DM_IRQ] = 28,
200
201 [INT_SDC4_1] = 29,
202 [INT_SDC4_0] = 30,
203 [INT_SDC3_1] = 31,
204 [INT_SDC3_0] = 32,
205
206 /* fake wakeup interrupts */
207 [INT_GPIO_GROUP1] = SMSM_FAKE_IRQ,
208 [INT_GPIO_GROUP2] = SMSM_FAKE_IRQ,
209 [INT_A9_M2A_0] = SMSM_FAKE_IRQ,
210 [INT_A9_M2A_1] = SMSM_FAKE_IRQ,
211 [INT_A9_M2A_5] = SMSM_FAKE_IRQ,
212 [INT_GP_TIMER_EXP] = SMSM_FAKE_IRQ,
213 [INT_DEBUG_TIMER_EXP] = SMSM_FAKE_IRQ,
214 [INT_ADSP_A11] = SMSM_FAKE_IRQ,
215#ifdef CONFIG_ARCH_QSD8X50
216 [INT_SIRC_0] = SMSM_FAKE_IRQ,
217 [INT_SIRC_1] = SMSM_FAKE_IRQ,
218#endif
219};
220
221static inline void msm_irq_write_all_regs(void __iomem *base, unsigned int val)
222{
223 int i;
224
225 for (i = 0; i < VIC_NUM_REGS; i++)
226 writel(val, base + (i * 4));
227}
228
229static void msm_irq_ack(struct irq_data *d)
230{
231 void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_CLEAR0, d->irq);
232 writel(1 << (d->irq & 31), reg);
233}
234
235static void msm_irq_mask(struct irq_data *d)
236{
237 void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENCLEAR0, d->irq);
238 unsigned index = VIC_INT_TO_REG_INDEX(d->irq);
239 uint32_t mask = 1UL << (d->irq & 31);
240 int smsm_irq = msm_irq_to_smsm[d->irq];
241
242 msm_irq_shadow_reg[index].int_en[0] &= ~mask;
243 writel(mask, reg);
244 if (smsm_irq == 0)
245 msm_irq_idle_disable[index] &= ~mask;
246 else {
247 mask = 1UL << (smsm_irq - 1);
248 msm_irq_smsm_wake_enable[0] &= ~mask;
249 }
250}
251
252static void msm_irq_unmask(struct irq_data *d)
253{
254 void __iomem *reg = VIC_INT_TO_REG_ADDR(VIC_INT_ENSET0, d->irq);
255 unsigned index = VIC_INT_TO_REG_INDEX(d->irq);
256 uint32_t mask = 1UL << (d->irq & 31);
257 int smsm_irq = msm_irq_to_smsm[d->irq];
258
259 msm_irq_shadow_reg[index].int_en[0] |= mask;
260 writel(mask, reg);
261
262 if (smsm_irq == 0)
263 msm_irq_idle_disable[index] |= mask;
264 else {
265 mask = 1UL << (smsm_irq - 1);
266 msm_irq_smsm_wake_enable[0] |= mask;
267 }
268}
269
270static int msm_irq_set_wake(struct irq_data *d, unsigned int on)
271{
272 unsigned index = VIC_INT_TO_REG_INDEX(d->irq);
273 uint32_t mask = 1UL << (d->irq & 31);
274 int smsm_irq = msm_irq_to_smsm[d->irq];
275
276 if (smsm_irq == 0) {
277 printk(KERN_ERR "msm_irq_set_wake: bad wakeup irq %d\n", d->irq);
278 return -EINVAL;
279 }
280 if (on)
281 msm_irq_shadow_reg[index].int_en[1] |= mask;
282 else
283 msm_irq_shadow_reg[index].int_en[1] &= ~mask;
284
285 if (smsm_irq == SMSM_FAKE_IRQ)
286 return 0;
287
288 mask = 1UL << (smsm_irq - 1);
289 if (on)
290 msm_irq_smsm_wake_enable[1] |= mask;
291 else
292 msm_irq_smsm_wake_enable[1] &= ~mask;
293 return 0;
294}
295
296static int msm_irq_set_type(struct irq_data *d, unsigned int flow_type)
297{
298 void __iomem *treg = VIC_INT_TO_REG_ADDR(VIC_INT_TYPE0, d->irq);
299 void __iomem *preg = VIC_INT_TO_REG_ADDR(VIC_INT_POLARITY0, d->irq);
300 unsigned index = VIC_INT_TO_REG_INDEX(d->irq);
301 int b = 1 << (d->irq & 31);
302 uint32_t polarity;
303 uint32_t type;
304
305 polarity = msm_irq_shadow_reg[index].int_polarity;
306 if (flow_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW))
307 polarity |= b;
308 if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_HIGH))
309 polarity &= ~b;
310 writel(polarity, preg);
311 msm_irq_shadow_reg[index].int_polarity = polarity;
312
313 type = msm_irq_shadow_reg[index].int_type;
314 if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
315 type |= b;
316 __irq_set_handler_locked(d->irq, handle_edge_irq);
317 }
318 if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) {
319 type &= ~b;
320 __irq_set_handler_locked(d->irq, handle_level_irq);
321 }
322 writel(type, treg);
323 msm_irq_shadow_reg[index].int_type = type;
324 return 0;
325}
326
327static struct irq_chip msm_irq_chip = {
328 .name = "msm",
329 .irq_disable = msm_irq_mask,
330 .irq_ack = msm_irq_ack,
331 .irq_mask = msm_irq_mask,
332 .irq_unmask = msm_irq_unmask,
333 .irq_set_wake = msm_irq_set_wake,
334 .irq_set_type = msm_irq_set_type,
335};
336
337void __init msm_init_irq(void)
338{
339 unsigned n;
340
341 /* select level interrupts */
342 msm_irq_write_all_regs(VIC_INT_TYPE0, 0);
343
344 /* select highlevel interrupts */
345 msm_irq_write_all_regs(VIC_INT_POLARITY0, 0);
346
347 /* select IRQ for all INTs */
348 msm_irq_write_all_regs(VIC_INT_SELECT0, 0);
349
350 /* disable all INTs */
351 msm_irq_write_all_regs(VIC_INT_EN0, 0);
352
353 /* don't use vic */
354 writel(0, VIC_CONFIG);
355
356 /* enable interrupt controller */
357 writel(3, VIC_INT_MASTEREN);
358
359 for (n = 0; n < NR_MSM_IRQS; n++) {
360 irq_set_chip_and_handler(n, &msm_irq_chip, handle_level_irq);
361 set_irq_flags(n, IRQF_VALID);
362 }
363}
diff --git a/arch/arm/mach-msm/irq.c b/arch/arm/mach-msm/irq.c
deleted file mode 100644
index ea514be390c6..000000000000
--- a/arch/arm/mach-msm/irq.c
+++ /dev/null
@@ -1,151 +0,0 @@
1/* linux/arch/arm/mach-msm/irq.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/sched.h>
19#include <linux/interrupt.h>
20#include <linux/ptrace.h>
21#include <linux/timer.h>
22#include <linux/irq.h>
23#include <linux/io.h>
24
25#include <mach/hardware.h>
26
27#include <mach/msm_iomap.h>
28
29#define VIC_REG(off) (MSM_VIC_BASE + (off))
30
31#define VIC_INT_SELECT0 VIC_REG(0x0000) /* 1: FIQ, 0: IRQ */
32#define VIC_INT_SELECT1 VIC_REG(0x0004) /* 1: FIQ, 0: IRQ */
33#define VIC_INT_EN0 VIC_REG(0x0010)
34#define VIC_INT_EN1 VIC_REG(0x0014)
35#define VIC_INT_ENCLEAR0 VIC_REG(0x0020)
36#define VIC_INT_ENCLEAR1 VIC_REG(0x0024)
37#define VIC_INT_ENSET0 VIC_REG(0x0030)
38#define VIC_INT_ENSET1 VIC_REG(0x0034)
39#define VIC_INT_TYPE0 VIC_REG(0x0040) /* 1: EDGE, 0: LEVEL */
40#define VIC_INT_TYPE1 VIC_REG(0x0044) /* 1: EDGE, 0: LEVEL */
41#define VIC_INT_POLARITY0 VIC_REG(0x0050) /* 1: NEG, 0: POS */
42#define VIC_INT_POLARITY1 VIC_REG(0x0054) /* 1: NEG, 0: POS */
43#define VIC_NO_PEND_VAL VIC_REG(0x0060)
44#define VIC_INT_MASTEREN VIC_REG(0x0064) /* 1: IRQ, 2: FIQ */
45#define VIC_PROTECTION VIC_REG(0x006C) /* 1: ENABLE */
46#define VIC_CONFIG VIC_REG(0x0068) /* 1: USE ARM1136 VIC */
47#define VIC_IRQ_STATUS0 VIC_REG(0x0080)
48#define VIC_IRQ_STATUS1 VIC_REG(0x0084)
49#define VIC_FIQ_STATUS0 VIC_REG(0x0090)
50#define VIC_FIQ_STATUS1 VIC_REG(0x0094)
51#define VIC_RAW_STATUS0 VIC_REG(0x00A0)
52#define VIC_RAW_STATUS1 VIC_REG(0x00A4)
53#define VIC_INT_CLEAR0 VIC_REG(0x00B0)
54#define VIC_INT_CLEAR1 VIC_REG(0x00B4)
55#define VIC_SOFTINT0 VIC_REG(0x00C0)
56#define VIC_SOFTINT1 VIC_REG(0x00C4)
57#define VIC_IRQ_VEC_RD VIC_REG(0x00D0) /* pending int # */
58#define VIC_IRQ_VEC_PEND_RD VIC_REG(0x00D4) /* pending vector addr */
59#define VIC_IRQ_VEC_WR VIC_REG(0x00D8)
60#define VIC_IRQ_IN_SERVICE VIC_REG(0x00E0)
61#define VIC_IRQ_IN_STACK VIC_REG(0x00E4)
62#define VIC_TEST_BUS_SEL VIC_REG(0x00E8)
63
64#define VIC_VECTPRIORITY(n) VIC_REG(0x0200+((n) * 4))
65#define VIC_VECTADDR(n) VIC_REG(0x0400+((n) * 4))
66
67static void msm_irq_ack(struct irq_data *d)
68{
69 void __iomem *reg = VIC_INT_CLEAR0 + ((d->irq & 32) ? 4 : 0);
70 writel(1 << (d->irq & 31), reg);
71}
72
73static void msm_irq_mask(struct irq_data *d)
74{
75 void __iomem *reg = VIC_INT_ENCLEAR0 + ((d->irq & 32) ? 4 : 0);
76 writel(1 << (d->irq & 31), reg);
77}
78
79static void msm_irq_unmask(struct irq_data *d)
80{
81 void __iomem *reg = VIC_INT_ENSET0 + ((d->irq & 32) ? 4 : 0);
82 writel(1 << (d->irq & 31), reg);
83}
84
85static int msm_irq_set_wake(struct irq_data *d, unsigned int on)
86{
87 return -EINVAL;
88}
89
90static int msm_irq_set_type(struct irq_data *d, unsigned int flow_type)
91{
92 void __iomem *treg = VIC_INT_TYPE0 + ((d->irq & 32) ? 4 : 0);
93 void __iomem *preg = VIC_INT_POLARITY0 + ((d->irq & 32) ? 4 : 0);
94 int b = 1 << (d->irq & 31);
95
96 if (flow_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW))
97 writel(readl(preg) | b, preg);
98 if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_HIGH))
99 writel(readl(preg) & (~b), preg);
100
101 if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
102 writel(readl(treg) | b, treg);
103 __irq_set_handler_locked(d->irq, handle_edge_irq);
104 }
105 if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) {
106 writel(readl(treg) & (~b), treg);
107 __irq_set_handler_locked(d->irq, handle_level_irq);
108 }
109 return 0;
110}
111
112static struct irq_chip msm_irq_chip = {
113 .name = "msm",
114 .irq_ack = msm_irq_ack,
115 .irq_mask = msm_irq_mask,
116 .irq_unmask = msm_irq_unmask,
117 .irq_set_wake = msm_irq_set_wake,
118 .irq_set_type = msm_irq_set_type,
119};
120
121void __init msm_init_irq(void)
122{
123 unsigned n;
124
125 /* select level interrupts */
126 writel(0, VIC_INT_TYPE0);
127 writel(0, VIC_INT_TYPE1);
128
129 /* select highlevel interrupts */
130 writel(0, VIC_INT_POLARITY0);
131 writel(0, VIC_INT_POLARITY1);
132
133 /* select IRQ for all INTs */
134 writel(0, VIC_INT_SELECT0);
135 writel(0, VIC_INT_SELECT1);
136
137 /* disable all INTs */
138 writel(0, VIC_INT_EN0);
139 writel(0, VIC_INT_EN1);
140
141 /* don't use 1136 vic */
142 writel(0, VIC_CONFIG);
143
144 /* enable interrupt controller */
145 writel(1, VIC_INT_MASTEREN);
146
147 for (n = 0; n < NR_MSM_IRQS; n++) {
148 irq_set_chip_and_handler(n, &msm_irq_chip, handle_level_irq);
149 set_irq_flags(n, IRQF_VALID);
150 }
151}
diff --git a/arch/arm/mach-msm/last_radio_log.c b/arch/arm/mach-msm/last_radio_log.c
deleted file mode 100644
index 9c392a29fc7e..000000000000
--- a/arch/arm/mach-msm/last_radio_log.c
+++ /dev/null
@@ -1,71 +0,0 @@
1/* arch/arm/mach-msm/last_radio_log.c
2 *
3 * Extract the log from a modem crash though SMEM
4 *
5 * Copyright (C) 2007 Google, Inc.
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#include <linux/kernel.h>
19#include <linux/module.h>
20#include <linux/fs.h>
21#include <linux/proc_fs.h>
22#include <linux/uaccess.h>
23
24#include "smd_private.h"
25
26static void *radio_log_base;
27static size_t radio_log_size;
28
29extern void *smem_item(unsigned id, unsigned *size);
30
31static ssize_t last_radio_log_read(struct file *file, char __user *buf,
32 size_t len, loff_t *offset)
33{
34 return simple_read_from_buffer(buf, len, offset,
35 radio_log_base, radio_log_size);
36}
37
38static struct file_operations last_radio_log_fops = {
39 .read = last_radio_log_read,
40 .llseek = default_llseek,
41};
42
43void msm_init_last_radio_log(struct module *owner)
44{
45 struct proc_dir_entry *entry;
46
47 if (last_radio_log_fops.owner) {
48 pr_err("%s: already claimed\n", __func__);
49 return;
50 }
51
52 radio_log_base = smem_item(SMEM_CLKREGIM_BSP, &radio_log_size);
53 if (!radio_log_base) {
54 pr_err("%s: could not retrieve SMEM_CLKREGIM_BSP\n", __func__);
55 return;
56 }
57
58 entry = proc_create("last_radio_log", S_IRUGO, NULL,
59 &last_radio_log_fops);
60 if (!entry) {
61 pr_err("%s: could not create proc entry for radio log\n",
62 __func__);
63 return;
64 }
65
66 pr_err("%s: last radio log is %d bytes long\n", __func__,
67 radio_log_size);
68 last_radio_log_fops.owner = owner;
69 proc_set_size(entry, radio_log_size);
70}
71EXPORT_SYMBOL(msm_init_last_radio_log);
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
deleted file mode 100644
index 507f5ca80697..000000000000
--- a/arch/arm/mach-msm/proc_comm.c
+++ /dev/null
@@ -1,129 +0,0 @@
1/* arch/arm/mach-msm/proc_comm.c
2 *
3 * Copyright (C) 2007-2008 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/delay.h>
18#include <linux/errno.h>
19#include <linux/io.h>
20#include <linux/spinlock.h>
21#include <mach/msm_iomap.h>
22
23#include "proc_comm.h"
24
25static inline void msm_a2m_int(uint32_t irq)
26{
27#if defined(CONFIG_ARCH_MSM7X30)
28 writel(1 << irq, MSM_GCC_BASE + 0x8);
29#else
30 writel(1, MSM_CSR_BASE + 0x400 + (irq * 4));
31#endif
32}
33
34static inline void notify_other_proc_comm(void)
35{
36 msm_a2m_int(6);
37}
38
39#define APP_COMMAND 0x00
40#define APP_STATUS 0x04
41#define APP_DATA1 0x08
42#define APP_DATA2 0x0C
43
44#define MDM_COMMAND 0x10
45#define MDM_STATUS 0x14
46#define MDM_DATA1 0x18
47#define MDM_DATA2 0x1C
48
49static DEFINE_SPINLOCK(proc_comm_lock);
50
51/* The higher level SMD support will install this to
52 * provide a way to check for and handle modem restart.
53 */
54int (*msm_check_for_modem_crash)(void);
55
56/* Poll for a state change, checking for possible
57 * modem crashes along the way (so we don't wait
58 * forever while the ARM9 is blowing up).
59 *
60 * Return an error in the event of a modem crash and
61 * restart so the msm_proc_comm() routine can restart
62 * the operation from the beginning.
63 */
64static int proc_comm_wait_for(void __iomem *addr, unsigned value)
65{
66 for (;;) {
67 if (readl(addr) == value)
68 return 0;
69
70 if (msm_check_for_modem_crash)
71 if (msm_check_for_modem_crash())
72 return -EAGAIN;
73 }
74}
75
76int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
77{
78 void __iomem *base = MSM_SHARED_RAM_BASE;
79 unsigned long flags;
80 int ret;
81
82 spin_lock_irqsave(&proc_comm_lock, flags);
83
84 for (;;) {
85 if (proc_comm_wait_for(base + MDM_STATUS, PCOM_READY))
86 continue;
87
88 writel(cmd, base + APP_COMMAND);
89 writel(data1 ? *data1 : 0, base + APP_DATA1);
90 writel(data2 ? *data2 : 0, base + APP_DATA2);
91
92 notify_other_proc_comm();
93
94 if (proc_comm_wait_for(base + APP_COMMAND, PCOM_CMD_DONE))
95 continue;
96
97 if (readl(base + APP_STATUS) != PCOM_CMD_FAIL) {
98 if (data1)
99 *data1 = readl(base + APP_DATA1);
100 if (data2)
101 *data2 = readl(base + APP_DATA2);
102 ret = 0;
103 } else {
104 ret = -EIO;
105 }
106 break;
107 }
108
109 writel(PCOM_CMD_IDLE, base + APP_COMMAND);
110
111 spin_unlock_irqrestore(&proc_comm_lock, flags);
112
113 return ret;
114}
115
116/*
117 * We need to wait for the ARM9 to at least partially boot
118 * up before we can continue. Since the ARM9 does resource
119 * allocation, if we dont' wait we could end up crashing or in
120 * and unknown state. This function should be called early to
121 * wait on the ARM9.
122 */
123void proc_comm_boot_wait(void)
124{
125 void __iomem *base = MSM_SHARED_RAM_BASE;
126
127 proc_comm_wait_for(base + MDM_STATUS, PCOM_READY);
128
129}
diff --git a/arch/arm/mach-msm/proc_comm.h b/arch/arm/mach-msm/proc_comm.h
deleted file mode 100644
index e8d043a0e990..000000000000
--- a/arch/arm/mach-msm/proc_comm.h
+++ /dev/null
@@ -1,258 +0,0 @@
1/* arch/arm/mach-msm/proc_comm.h
2 *
3 * Copyright (c) 2007 QUALCOMM Incorporated
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef _ARCH_ARM_MACH_MSM_PROC_COMM_H_
17#define _ARCH_ARM_MACH_MSM_PROC_COMM_H_
18
19#include <linux/init.h>
20
21enum {
22 PCOM_CMD_IDLE = 0x0,
23 PCOM_CMD_DONE,
24 PCOM_RESET_APPS,
25 PCOM_RESET_CHIP,
26 PCOM_CONFIG_NAND_MPU,
27 PCOM_CONFIG_USB_CLKS,
28 PCOM_GET_POWER_ON_STATUS,
29 PCOM_GET_WAKE_UP_STATUS,
30 PCOM_GET_BATT_LEVEL,
31 PCOM_CHG_IS_CHARGING,
32 PCOM_POWER_DOWN,
33 PCOM_USB_PIN_CONFIG,
34 PCOM_USB_PIN_SEL,
35 PCOM_SET_RTC_ALARM,
36 PCOM_NV_READ,
37 PCOM_NV_WRITE,
38 PCOM_GET_UUID_HIGH,
39 PCOM_GET_UUID_LOW,
40 PCOM_GET_HW_ENTROPY,
41 PCOM_RPC_GPIO_TLMM_CONFIG_REMOTE,
42 PCOM_CLKCTL_RPC_ENABLE,
43 PCOM_CLKCTL_RPC_DISABLE,
44 PCOM_CLKCTL_RPC_RESET,
45 PCOM_CLKCTL_RPC_SET_FLAGS,
46 PCOM_CLKCTL_RPC_SET_RATE,
47 PCOM_CLKCTL_RPC_MIN_RATE,
48 PCOM_CLKCTL_RPC_MAX_RATE,
49 PCOM_CLKCTL_RPC_RATE,
50 PCOM_CLKCTL_RPC_PLL_REQUEST,
51 PCOM_CLKCTL_RPC_ENABLED,
52 PCOM_VREG_SWITCH,
53 PCOM_VREG_SET_LEVEL,
54 PCOM_GPIO_TLMM_CONFIG_GROUP,
55 PCOM_GPIO_TLMM_UNCONFIG_GROUP,
56 PCOM_NV_WRITE_BYTES_4_7,
57 PCOM_CONFIG_DISP,
58 PCOM_GET_FTM_BOOT_COUNT,
59 PCOM_RPC_GPIO_TLMM_CONFIG_EX,
60 PCOM_PM_MPP_CONFIG,
61 PCOM_GPIO_IN,
62 PCOM_GPIO_OUT,
63 PCOM_RESET_MODEM,
64 PCOM_RESET_CHIP_IMM,
65 PCOM_PM_VID_EN,
66 PCOM_VREG_PULLDOWN,
67 PCOM_GET_MODEM_VERSION,
68 PCOM_CLK_REGIME_SEC_RESET,
69 PCOM_CLK_REGIME_SEC_RESET_ASSERT,
70 PCOM_CLK_REGIME_SEC_RESET_DEASSERT,
71 PCOM_CLK_REGIME_SEC_PLL_REQUEST_WRP,
72 PCOM_CLK_REGIME_SEC_ENABLE,
73 PCOM_CLK_REGIME_SEC_DISABLE,
74 PCOM_CLK_REGIME_SEC_IS_ON,
75 PCOM_CLK_REGIME_SEC_SEL_CLK_INV,
76 PCOM_CLK_REGIME_SEC_SEL_CLK_SRC,
77 PCOM_CLK_REGIME_SEC_SEL_CLK_DIV,
78 PCOM_CLK_REGIME_SEC_ICODEC_CLK_ENABLE,
79 PCOM_CLK_REGIME_SEC_ICODEC_CLK_DISABLE,
80 PCOM_CLK_REGIME_SEC_SEL_SPEED,
81 PCOM_CLK_REGIME_SEC_CONFIG_GP_CLK_WRP,
82 PCOM_CLK_REGIME_SEC_CONFIG_MDH_CLK_WRP,
83 PCOM_CLK_REGIME_SEC_USB_XTAL_ON,
84 PCOM_CLK_REGIME_SEC_USB_XTAL_OFF,
85 PCOM_CLK_REGIME_SEC_SET_QDSP_DME_MODE,
86 PCOM_CLK_REGIME_SEC_SWITCH_ADSP_CLK,
87 PCOM_CLK_REGIME_SEC_GET_MAX_ADSP_CLK_KHZ,
88 PCOM_CLK_REGIME_SEC_GET_I2C_CLK_KHZ,
89 PCOM_CLK_REGIME_SEC_MSM_GET_CLK_FREQ_KHZ,
90 PCOM_CLK_REGIME_SEC_SEL_VFE_SRC,
91 PCOM_CLK_REGIME_SEC_MSM_SEL_CAMCLK,
92 PCOM_CLK_REGIME_SEC_MSM_SEL_LCDCLK,
93 PCOM_CLK_REGIME_SEC_VFE_RAIL_OFF,
94 PCOM_CLK_REGIME_SEC_VFE_RAIL_ON,
95 PCOM_CLK_REGIME_SEC_GRP_RAIL_OFF,
96 PCOM_CLK_REGIME_SEC_GRP_RAIL_ON,
97 PCOM_CLK_REGIME_SEC_VDC_RAIL_OFF,
98 PCOM_CLK_REGIME_SEC_VDC_RAIL_ON,
99 PCOM_CLK_REGIME_SEC_LCD_CTRL,
100 PCOM_CLK_REGIME_SEC_REGISTER_FOR_CPU_RESOURCE,
101 PCOM_CLK_REGIME_SEC_DEREGISTER_FOR_CPU_RESOURCE,
102 PCOM_CLK_REGIME_SEC_RESOURCE_REQUEST_WRP,
103 PCOM_CLK_REGIME_MSM_SEC_SEL_CLK_OWNER,
104 PCOM_CLK_REGIME_SEC_DEVMAN_REQUEST_WRP,
105 PCOM_GPIO_CONFIG,
106 PCOM_GPIO_CONFIGURE_GROUP,
107 PCOM_GPIO_TLMM_SET_PORT,
108 PCOM_GPIO_TLMM_CONFIG_EX,
109 PCOM_SET_FTM_BOOT_COUNT,
110 PCOM_RESERVED0,
111 PCOM_RESERVED1,
112 PCOM_CUSTOMER_CMD1,
113 PCOM_CUSTOMER_CMD2,
114 PCOM_CUSTOMER_CMD3,
115 PCOM_CLK_REGIME_ENTER_APPSBL_CHG_MODE,
116 PCOM_CLK_REGIME_EXIT_APPSBL_CHG_MODE,
117 PCOM_CLK_REGIME_SEC_RAIL_DISABLE,
118 PCOM_CLK_REGIME_SEC_RAIL_ENABLE,
119 PCOM_CLK_REGIME_SEC_RAIL_CONTROL,
120 PCOM_SET_SW_WATCHDOG_STATE,
121 PCOM_PM_MPP_CONFIG_DIGITAL_INPUT,
122 PCOM_PM_MPP_CONFIG_I_SINK,
123 PCOM_RESERVED_101,
124 PCOM_MSM_HSUSB_PHY_RESET,
125 PCOM_GET_BATT_MV_LEVEL,
126 PCOM_CHG_USB_IS_PC_CONNECTED,
127 PCOM_CHG_USB_IS_CHARGER_CONNECTED,
128 PCOM_CHG_USB_IS_DISCONNECTED,
129 PCOM_CHG_USB_IS_AVAILABLE,
130 PCOM_CLK_REGIME_SEC_MSM_SEL_FREQ,
131 PCOM_CLK_REGIME_SEC_SET_PCLK_AXI_POLICY,
132 PCOM_CLKCTL_RPC_RESET_ASSERT,
133 PCOM_CLKCTL_RPC_RESET_DEASSERT,
134 PCOM_CLKCTL_RPC_RAIL_ON,
135 PCOM_CLKCTL_RPC_RAIL_OFF,
136 PCOM_CLKCTL_RPC_RAIL_ENABLE,
137 PCOM_CLKCTL_RPC_RAIL_DISABLE,
138 PCOM_CLKCTL_RPC_RAIL_CONTROL,
139 PCOM_CLKCTL_RPC_MIN_MSMC1,
140 PCOM_NUM_CMDS,
141};
142
143enum {
144 PCOM_INVALID_STATUS = 0x0,
145 PCOM_READY,
146 PCOM_CMD_RUNNING,
147 PCOM_CMD_SUCCESS,
148 PCOM_CMD_FAIL,
149 PCOM_CMD_FAIL_FALSE_RETURNED,
150 PCOM_CMD_FAIL_CMD_OUT_OF_BOUNDS_SERVER,
151 PCOM_CMD_FAIL_CMD_OUT_OF_BOUNDS_CLIENT,
152 PCOM_CMD_FAIL_CMD_UNREGISTERED,
153 PCOM_CMD_FAIL_CMD_LOCKED,
154 PCOM_CMD_FAIL_SERVER_NOT_YET_READY,
155 PCOM_CMD_FAIL_BAD_DESTINATION,
156 PCOM_CMD_FAIL_SERVER_RESET,
157 PCOM_CMD_FAIL_SMSM_NOT_INIT,
158 PCOM_CMD_FAIL_PROC_COMM_BUSY,
159 PCOM_CMD_FAIL_PROC_COMM_NOT_INIT,
160
161};
162
163/* List of VREGs that support the Pull Down Resistor setting. */
164enum vreg_pdown_id {
165 PM_VREG_PDOWN_MSMA_ID,
166 PM_VREG_PDOWN_MSMP_ID,
167 PM_VREG_PDOWN_MSME1_ID, /* Not supported in Panoramix */
168 PM_VREG_PDOWN_MSMC1_ID, /* Not supported in PM6620 */
169 PM_VREG_PDOWN_MSMC2_ID, /* Supported in PM7500 only */
170 PM_VREG_PDOWN_GP3_ID, /* Supported in PM7500 only */
171 PM_VREG_PDOWN_MSME2_ID, /* Supported in PM7500 and Panoramix only */
172 PM_VREG_PDOWN_GP4_ID, /* Supported in PM7500 only */
173 PM_VREG_PDOWN_GP1_ID, /* Supported in PM7500 only */
174 PM_VREG_PDOWN_TCXO_ID,
175 PM_VREG_PDOWN_PA_ID,
176 PM_VREG_PDOWN_RFTX_ID,
177 PM_VREG_PDOWN_RFRX1_ID,
178 PM_VREG_PDOWN_RFRX2_ID,
179 PM_VREG_PDOWN_SYNT_ID,
180 PM_VREG_PDOWN_WLAN_ID,
181 PM_VREG_PDOWN_USB_ID,
182 PM_VREG_PDOWN_MMC_ID,
183 PM_VREG_PDOWN_RUIM_ID,
184 PM_VREG_PDOWN_MSMC0_ID, /* Supported in PM6610 only */
185 PM_VREG_PDOWN_GP2_ID, /* Supported in PM7500 only */
186 PM_VREG_PDOWN_GP5_ID, /* Supported in PM7500 only */
187 PM_VREG_PDOWN_GP6_ID, /* Supported in PM7500 only */
188 PM_VREG_PDOWN_RF_ID,
189 PM_VREG_PDOWN_RF_VCO_ID,
190 PM_VREG_PDOWN_MPLL_ID,
191 PM_VREG_PDOWN_S2_ID,
192 PM_VREG_PDOWN_S3_ID,
193 PM_VREG_PDOWN_RFUBM_ID,
194
195 /* new for HAN */
196 PM_VREG_PDOWN_RF1_ID,
197 PM_VREG_PDOWN_RF2_ID,
198 PM_VREG_PDOWN_RFA_ID,
199 PM_VREG_PDOWN_CDC2_ID,
200 PM_VREG_PDOWN_RFTX2_ID,
201 PM_VREG_PDOWN_USIM_ID,
202 PM_VREG_PDOWN_USB2P6_ID,
203 PM_VREG_PDOWN_USB3P3_ID,
204 PM_VREG_PDOWN_INVALID_ID,
205
206 /* backward compatible enums only */
207 PM_VREG_PDOWN_CAM_ID = PM_VREG_PDOWN_GP1_ID,
208 PM_VREG_PDOWN_MDDI_ID = PM_VREG_PDOWN_GP2_ID,
209 PM_VREG_PDOWN_RUIM2_ID = PM_VREG_PDOWN_GP3_ID,
210 PM_VREG_PDOWN_AUX_ID = PM_VREG_PDOWN_GP4_ID,
211 PM_VREG_PDOWN_AUX2_ID = PM_VREG_PDOWN_GP5_ID,
212 PM_VREG_PDOWN_BT_ID = PM_VREG_PDOWN_GP6_ID,
213
214 PM_VREG_PDOWN_MSME_ID = PM_VREG_PDOWN_MSME1_ID,
215 PM_VREG_PDOWN_MSMC_ID = PM_VREG_PDOWN_MSMC1_ID,
216 PM_VREG_PDOWN_RFA1_ID = PM_VREG_PDOWN_RFRX2_ID,
217 PM_VREG_PDOWN_RFA2_ID = PM_VREG_PDOWN_RFTX2_ID,
218 PM_VREG_PDOWN_XO_ID = PM_VREG_PDOWN_TCXO_ID
219};
220
221enum {
222 PCOM_CLKRGM_APPS_RESET_USB_PHY = 34,
223 PCOM_CLKRGM_APPS_RESET_USBH = 37,
224};
225
226/* gpio info for PCOM_RPC_GPIO_TLMM_CONFIG_EX */
227
228#define GPIO_ENABLE 0
229#define GPIO_DISABLE 1
230
231#define GPIO_INPUT 0
232#define GPIO_OUTPUT 1
233
234#define GPIO_NO_PULL 0
235#define GPIO_PULL_DOWN 1
236#define GPIO_KEEPER 2
237#define GPIO_PULL_UP 3
238
239#define GPIO_2MA 0
240#define GPIO_4MA 1
241#define GPIO_6MA 2
242#define GPIO_8MA 3
243#define GPIO_10MA 4
244#define GPIO_12MA 5
245#define GPIO_14MA 6
246#define GPIO_16MA 7
247
248#define PCOM_GPIO_CFG(gpio, func, dir, pull, drvstr) \
249 ((((gpio) & 0x3FF) << 4) | \
250 ((func) & 0xf) | \
251 (((dir) & 0x1) << 14) | \
252 (((pull) & 0x3) << 15) | \
253 (((drvstr) & 0xF) << 17))
254
255int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2);
256void proc_comm_boot_wait(void);
257
258#endif
diff --git a/arch/arm/mach-msm/sirc.c b/arch/arm/mach-msm/sirc.c
deleted file mode 100644
index 689e78c95f38..000000000000
--- a/arch/arm/mach-msm/sirc.c
+++ /dev/null
@@ -1,172 +0,0 @@
1/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 *
17 */
18
19#include <linux/io.h>
20#include <linux/irq.h>
21#include <linux/interrupt.h>
22#include <asm/irq.h>
23
24static unsigned int int_enable;
25static unsigned int wake_enable;
26
27static struct sirc_regs_t sirc_regs = {
28 .int_enable = SPSS_SIRC_INT_ENABLE,
29 .int_enable_clear = SPSS_SIRC_INT_ENABLE_CLEAR,
30 .int_enable_set = SPSS_SIRC_INT_ENABLE_SET,
31 .int_type = SPSS_SIRC_INT_TYPE,
32 .int_polarity = SPSS_SIRC_INT_POLARITY,
33 .int_clear = SPSS_SIRC_INT_CLEAR,
34};
35
36static struct sirc_cascade_regs sirc_reg_table[] = {
37 {
38 .int_status = SPSS_SIRC_IRQ_STATUS,
39 .cascade_irq = INT_SIRC_0,
40 }
41};
42
43/* Mask off the given interrupt. Keep the int_enable mask in sync with
44 the enable reg, so it can be restored after power collapse. */
45static void sirc_irq_mask(struct irq_data *d)
46{
47 unsigned int mask;
48
49 mask = 1 << (d->irq - FIRST_SIRC_IRQ);
50 writel(mask, sirc_regs.int_enable_clear);
51 int_enable &= ~mask;
52 return;
53}
54
55/* Unmask the given interrupt. Keep the int_enable mask in sync with
56 the enable reg, so it can be restored after power collapse. */
57static void sirc_irq_unmask(struct irq_data *d)
58{
59 unsigned int mask;
60
61 mask = 1 << (d->irq - FIRST_SIRC_IRQ);
62 writel(mask, sirc_regs.int_enable_set);
63 int_enable |= mask;
64 return;
65}
66
67static void sirc_irq_ack(struct irq_data *d)
68{
69 unsigned int mask;
70
71 mask = 1 << (d->irq - FIRST_SIRC_IRQ);
72 writel(mask, sirc_regs.int_clear);
73 return;
74}
75
76static int sirc_irq_set_wake(struct irq_data *d, unsigned int on)
77{
78 unsigned int mask;
79
80 /* Used to set the interrupt enable mask during power collapse. */
81 mask = 1 << (d->irq - FIRST_SIRC_IRQ);
82 if (on)
83 wake_enable |= mask;
84 else
85 wake_enable &= ~mask;
86
87 return 0;
88}
89
90static int sirc_irq_set_type(struct irq_data *d, unsigned int flow_type)
91{
92 unsigned int mask;
93 unsigned int val;
94
95 mask = 1 << (d->irq - FIRST_SIRC_IRQ);
96 val = readl(sirc_regs.int_polarity);
97
98 if (flow_type & (IRQF_TRIGGER_LOW | IRQF_TRIGGER_FALLING))
99 val |= mask;
100 else
101 val &= ~mask;
102
103 writel(val, sirc_regs.int_polarity);
104
105 val = readl(sirc_regs.int_type);
106 if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
107 val |= mask;
108 __irq_set_handler_locked(d->irq, handle_edge_irq);
109 } else {
110 val &= ~mask;
111 __irq_set_handler_locked(d->irq, handle_level_irq);
112 }
113
114 writel(val, sirc_regs.int_type);
115
116 return 0;
117}
118
119/* Finds the pending interrupt on the passed cascade irq and redrives it */
120static void sirc_irq_handler(unsigned int irq, struct irq_desc *desc)
121{
122 unsigned int reg = 0;
123 unsigned int sirq;
124 unsigned int status;
125
126 while ((reg < ARRAY_SIZE(sirc_reg_table)) &&
127 (sirc_reg_table[reg].cascade_irq != irq))
128 reg++;
129
130 status = readl(sirc_reg_table[reg].int_status);
131 status &= SIRC_MASK;
132 if (status == 0)
133 return;
134
135 for (sirq = 0;
136 (sirq < NR_SIRC_IRQS) && ((status & (1U << sirq)) == 0);
137 sirq++)
138 ;
139 generic_handle_irq(sirq+FIRST_SIRC_IRQ);
140
141 desc->irq_data.chip->irq_ack(&desc->irq_data);
142}
143
144static struct irq_chip sirc_irq_chip = {
145 .name = "sirc",
146 .irq_ack = sirc_irq_ack,
147 .irq_mask = sirc_irq_mask,
148 .irq_unmask = sirc_irq_unmask,
149 .irq_set_wake = sirc_irq_set_wake,
150 .irq_set_type = sirc_irq_set_type,
151};
152
153void __init msm_init_sirc(void)
154{
155 int i;
156
157 int_enable = 0;
158 wake_enable = 0;
159
160 for (i = FIRST_SIRC_IRQ; i < LAST_SIRC_IRQ; i++) {
161 irq_set_chip_and_handler(i, &sirc_irq_chip, handle_edge_irq);
162 set_irq_flags(i, IRQF_VALID);
163 }
164
165 for (i = 0; i < ARRAY_SIZE(sirc_reg_table); i++) {
166 irq_set_chained_handler(sirc_reg_table[i].cascade_irq,
167 sirc_irq_handler);
168 irq_set_irq_wake(sirc_reg_table[i].cascade_irq, 1);
169 }
170 return;
171}
172
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
deleted file mode 100644
index 7550f5a08956..000000000000
--- a/arch/arm/mach-msm/smd.c
+++ /dev/null
@@ -1,1034 +0,0 @@
1/* arch/arm/mach-msm/smd.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18
19#include <linux/platform_device.h>
20#include <linux/module.h>
21#include <linux/fs.h>
22#include <linux/cdev.h>
23#include <linux/device.h>
24#include <linux/wait.h>
25#include <linux/interrupt.h>
26#include <linux/irq.h>
27#include <linux/list.h>
28#include <linux/slab.h>
29#include <linux/debugfs.h>
30#include <linux/delay.h>
31
32#include <mach/msm_smd.h>
33
34#include "smd_private.h"
35#include "proc_comm.h"
36
37#if defined(CONFIG_ARCH_QSD8X50)
38#define CONFIG_QDSP6 1
39#endif
40
41#define MODULE_NAME "msm_smd"
42
43enum {
44 MSM_SMD_DEBUG = 1U << 0,
45 MSM_SMSM_DEBUG = 1U << 0,
46};
47
48static int msm_smd_debug_mask;
49
50struct shared_info {
51 int ready;
52 void __iomem *state;
53};
54
55static unsigned dummy_state[SMSM_STATE_COUNT];
56
57static struct shared_info smd_info = {
58 /* FIXME: not a real __iomem pointer */
59 .state = &dummy_state,
60};
61
62module_param_named(debug_mask, msm_smd_debug_mask,
63 int, S_IRUGO | S_IWUSR | S_IWGRP);
64
65static unsigned last_heap_free = 0xffffffff;
66
67static inline void notify_other_smsm(void)
68{
69 msm_a2m_int(5);
70#ifdef CONFIG_QDSP6
71 msm_a2m_int(8);
72#endif
73}
74
75static inline void notify_modem_smd(void)
76{
77 msm_a2m_int(0);
78}
79
80static inline void notify_dsp_smd(void)
81{
82 msm_a2m_int(8);
83}
84
85static void smd_diag(void)
86{
87 char *x;
88
89 x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
90 if (x != 0) {
91 x[SZ_DIAG_ERR_MSG - 1] = 0;
92 pr_debug("DIAG '%s'\n", x);
93 }
94}
95
96/* call when SMSM_RESET flag is set in the A9's smsm_state */
97static void handle_modem_crash(void)
98{
99 pr_err("ARM9 has CRASHED\n");
100 smd_diag();
101
102 /* in this case the modem or watchdog should reboot us */
103 for (;;)
104 ;
105}
106
107uint32_t raw_smsm_get_state(enum smsm_state_item item)
108{
109 return readl(smd_info.state + item * 4);
110}
111
112static int check_for_modem_crash(void)
113{
114 if (raw_smsm_get_state(SMSM_STATE_MODEM) & SMSM_RESET) {
115 handle_modem_crash();
116 return -1;
117 }
118 return 0;
119}
120
121/* the spinlock is used to synchronize between the
122 * irq handler and code that mutates the channel
123 * list or fiddles with channel state
124 */
125DEFINE_SPINLOCK(smd_lock);
126DEFINE_SPINLOCK(smem_lock);
127
128/* the mutex is used during open() and close()
129 * operations to avoid races while creating or
130 * destroying smd_channel structures
131 */
132static DEFINE_MUTEX(smd_creation_mutex);
133
134static int smd_initialized;
135
136LIST_HEAD(smd_ch_closed_list);
137LIST_HEAD(smd_ch_list_modem);
138LIST_HEAD(smd_ch_list_dsp);
139
140static unsigned char smd_ch_allocated[64];
141static struct work_struct probe_work;
142
143/* how many bytes are available for reading */
144static int smd_stream_read_avail(struct smd_channel *ch)
145{
146 return (ch->recv->head - ch->recv->tail) & ch->fifo_mask;
147}
148
149/* how many bytes we are free to write */
150static int smd_stream_write_avail(struct smd_channel *ch)
151{
152 return ch->fifo_mask -
153 ((ch->send->head - ch->send->tail) & ch->fifo_mask);
154}
155
156static int smd_packet_read_avail(struct smd_channel *ch)
157{
158 if (ch->current_packet) {
159 int n = smd_stream_read_avail(ch);
160 if (n > ch->current_packet)
161 n = ch->current_packet;
162 return n;
163 } else {
164 return 0;
165 }
166}
167
168static int smd_packet_write_avail(struct smd_channel *ch)
169{
170 int n = smd_stream_write_avail(ch);
171 return n > SMD_HEADER_SIZE ? n - SMD_HEADER_SIZE : 0;
172}
173
174static int ch_is_open(struct smd_channel *ch)
175{
176 return (ch->recv->state == SMD_SS_OPENED) &&
177 (ch->send->state == SMD_SS_OPENED);
178}
179
180/* provide a pointer and length to readable data in the fifo */
181static unsigned ch_read_buffer(struct smd_channel *ch, void **ptr)
182{
183 unsigned head = ch->recv->head;
184 unsigned tail = ch->recv->tail;
185 *ptr = (void *) (ch->recv_data + tail);
186
187 if (tail <= head)
188 return head - tail;
189 else
190 return ch->fifo_size - tail;
191}
192
193/* advance the fifo read pointer after data from ch_read_buffer is consumed */
194static void ch_read_done(struct smd_channel *ch, unsigned count)
195{
196 BUG_ON(count > smd_stream_read_avail(ch));
197 ch->recv->tail = (ch->recv->tail + count) & ch->fifo_mask;
198 ch->send->fTAIL = 1;
199}
200
201/* basic read interface to ch_read_{buffer,done} used
202 * by smd_*_read() and update_packet_state()
203 * will read-and-discard if the _data pointer is null
204 */
205static int ch_read(struct smd_channel *ch, void *_data, int len)
206{
207 void *ptr;
208 unsigned n;
209 unsigned char *data = _data;
210 int orig_len = len;
211
212 while (len > 0) {
213 n = ch_read_buffer(ch, &ptr);
214 if (n == 0)
215 break;
216
217 if (n > len)
218 n = len;
219 if (_data)
220 memcpy(data, ptr, n);
221
222 data += n;
223 len -= n;
224 ch_read_done(ch, n);
225 }
226
227 return orig_len - len;
228}
229
230static void update_stream_state(struct smd_channel *ch)
231{
232 /* streams have no special state requiring updating */
233}
234
235static void update_packet_state(struct smd_channel *ch)
236{
237 unsigned hdr[5];
238 int r;
239
240 /* can't do anything if we're in the middle of a packet */
241 if (ch->current_packet != 0)
242 return;
243
244 /* don't bother unless we can get the full header */
245 if (smd_stream_read_avail(ch) < SMD_HEADER_SIZE)
246 return;
247
248 r = ch_read(ch, hdr, SMD_HEADER_SIZE);
249 BUG_ON(r != SMD_HEADER_SIZE);
250
251 ch->current_packet = hdr[0];
252}
253
254/* provide a pointer and length to next free space in the fifo */
255static unsigned ch_write_buffer(struct smd_channel *ch, void **ptr)
256{
257 unsigned head = ch->send->head;
258 unsigned tail = ch->send->tail;
259 *ptr = (void *) (ch->send_data + head);
260
261 if (head < tail) {
262 return tail - head - 1;
263 } else {
264 if (tail == 0)
265 return ch->fifo_size - head - 1;
266 else
267 return ch->fifo_size - head;
268 }
269}
270
271/* advace the fifo write pointer after freespace
272 * from ch_write_buffer is filled
273 */
274static void ch_write_done(struct smd_channel *ch, unsigned count)
275{
276 BUG_ON(count > smd_stream_write_avail(ch));
277 ch->send->head = (ch->send->head + count) & ch->fifo_mask;
278 ch->send->fHEAD = 1;
279}
280
281static void ch_set_state(struct smd_channel *ch, unsigned n)
282{
283 if (n == SMD_SS_OPENED) {
284 ch->send->fDSR = 1;
285 ch->send->fCTS = 1;
286 ch->send->fCD = 1;
287 } else {
288 ch->send->fDSR = 0;
289 ch->send->fCTS = 0;
290 ch->send->fCD = 0;
291 }
292 ch->send->state = n;
293 ch->send->fSTATE = 1;
294 ch->notify_other_cpu();
295}
296
297static void do_smd_probe(void)
298{
299 struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE;
300 if (shared->heap_info.free_offset != last_heap_free) {
301 last_heap_free = shared->heap_info.free_offset;
302 schedule_work(&probe_work);
303 }
304}
305
306static void smd_state_change(struct smd_channel *ch,
307 unsigned last, unsigned next)
308{
309 ch->last_state = next;
310
311 pr_debug("ch %d %d -> %d\n", ch->n, last, next);
312
313 switch (next) {
314 case SMD_SS_OPENING:
315 ch->recv->tail = 0;
316 case SMD_SS_OPENED:
317 if (ch->send->state != SMD_SS_OPENED)
318 ch_set_state(ch, SMD_SS_OPENED);
319 ch->notify(ch->priv, SMD_EVENT_OPEN);
320 break;
321 case SMD_SS_FLUSHING:
322 case SMD_SS_RESET:
323 /* we should force them to close? */
324 default:
325 ch->notify(ch->priv, SMD_EVENT_CLOSE);
326 }
327}
328
329static void handle_smd_irq(struct list_head *list, void (*notify)(void))
330{
331 unsigned long flags;
332 struct smd_channel *ch;
333 int do_notify = 0;
334 unsigned ch_flags;
335 unsigned tmp;
336
337 spin_lock_irqsave(&smd_lock, flags);
338 list_for_each_entry(ch, list, ch_list) {
339 ch_flags = 0;
340 if (ch_is_open(ch)) {
341 if (ch->recv->fHEAD) {
342 ch->recv->fHEAD = 0;
343 ch_flags |= 1;
344 do_notify |= 1;
345 }
346 if (ch->recv->fTAIL) {
347 ch->recv->fTAIL = 0;
348 ch_flags |= 2;
349 do_notify |= 1;
350 }
351 if (ch->recv->fSTATE) {
352 ch->recv->fSTATE = 0;
353 ch_flags |= 4;
354 do_notify |= 1;
355 }
356 }
357 tmp = ch->recv->state;
358 if (tmp != ch->last_state)
359 smd_state_change(ch, ch->last_state, tmp);
360 if (ch_flags) {
361 ch->update_state(ch);
362 ch->notify(ch->priv, SMD_EVENT_DATA);
363 }
364 }
365 if (do_notify)
366 notify();
367 spin_unlock_irqrestore(&smd_lock, flags);
368 do_smd_probe();
369}
370
371static irqreturn_t smd_modem_irq_handler(int irq, void *data)
372{
373 handle_smd_irq(&smd_ch_list_modem, notify_modem_smd);
374 return IRQ_HANDLED;
375}
376
377#if defined(CONFIG_QDSP6)
378static irqreturn_t smd_dsp_irq_handler(int irq, void *data)
379{
380 handle_smd_irq(&smd_ch_list_dsp, notify_dsp_smd);
381 return IRQ_HANDLED;
382}
383#endif
384
385static void smd_fake_irq_handler(unsigned long arg)
386{
387 handle_smd_irq(&smd_ch_list_modem, notify_modem_smd);
388 handle_smd_irq(&smd_ch_list_dsp, notify_dsp_smd);
389}
390
391static DECLARE_TASKLET(smd_fake_irq_tasklet, smd_fake_irq_handler, 0);
392
393static inline int smd_need_int(struct smd_channel *ch)
394{
395 if (ch_is_open(ch)) {
396 if (ch->recv->fHEAD || ch->recv->fTAIL || ch->recv->fSTATE)
397 return 1;
398 if (ch->recv->state != ch->last_state)
399 return 1;
400 }
401 return 0;
402}
403
404void smd_sleep_exit(void)
405{
406 unsigned long flags;
407 struct smd_channel *ch;
408 int need_int = 0;
409
410 spin_lock_irqsave(&smd_lock, flags);
411 list_for_each_entry(ch, &smd_ch_list_modem, ch_list) {
412 if (smd_need_int(ch)) {
413 need_int = 1;
414 break;
415 }
416 }
417 list_for_each_entry(ch, &smd_ch_list_dsp, ch_list) {
418 if (smd_need_int(ch)) {
419 need_int = 1;
420 break;
421 }
422 }
423 spin_unlock_irqrestore(&smd_lock, flags);
424 do_smd_probe();
425
426 if (need_int) {
427 if (msm_smd_debug_mask & MSM_SMD_DEBUG)
428 pr_info("smd_sleep_exit need interrupt\n");
429 tasklet_schedule(&smd_fake_irq_tasklet);
430 }
431}
432
433
434void smd_kick(smd_channel_t *ch)
435{
436 unsigned long flags;
437 unsigned tmp;
438
439 spin_lock_irqsave(&smd_lock, flags);
440 ch->update_state(ch);
441 tmp = ch->recv->state;
442 if (tmp != ch->last_state) {
443 ch->last_state = tmp;
444 if (tmp == SMD_SS_OPENED)
445 ch->notify(ch->priv, SMD_EVENT_OPEN);
446 else
447 ch->notify(ch->priv, SMD_EVENT_CLOSE);
448 }
449 ch->notify(ch->priv, SMD_EVENT_DATA);
450 ch->notify_other_cpu();
451 spin_unlock_irqrestore(&smd_lock, flags);
452}
453
454static int smd_is_packet(int chn, unsigned type)
455{
456 type &= SMD_KIND_MASK;
457 if (type == SMD_KIND_PACKET)
458 return 1;
459 if (type == SMD_KIND_STREAM)
460 return 0;
461
462 /* older AMSS reports SMD_KIND_UNKNOWN always */
463 if ((chn > 4) || (chn == 1))
464 return 1;
465 else
466 return 0;
467}
468
469static int smd_stream_write(smd_channel_t *ch, const void *_data, int len)
470{
471 void *ptr;
472 const unsigned char *buf = _data;
473 unsigned xfer;
474 int orig_len = len;
475
476 if (len < 0)
477 return -EINVAL;
478
479 while ((xfer = ch_write_buffer(ch, &ptr)) != 0) {
480 if (!ch_is_open(ch))
481 break;
482 if (xfer > len)
483 xfer = len;
484 memcpy(ptr, buf, xfer);
485 ch_write_done(ch, xfer);
486 len -= xfer;
487 buf += xfer;
488 if (len == 0)
489 break;
490 }
491
492 ch->notify_other_cpu();
493
494 return orig_len - len;
495}
496
497static int smd_packet_write(smd_channel_t *ch, const void *_data, int len)
498{
499 unsigned hdr[5];
500
501 if (len < 0)
502 return -EINVAL;
503
504 if (smd_stream_write_avail(ch) < (len + SMD_HEADER_SIZE))
505 return -ENOMEM;
506
507 hdr[0] = len;
508 hdr[1] = hdr[2] = hdr[3] = hdr[4] = 0;
509
510 smd_stream_write(ch, hdr, sizeof(hdr));
511 smd_stream_write(ch, _data, len);
512
513 return len;
514}
515
516static int smd_stream_read(smd_channel_t *ch, void *data, int len)
517{
518 int r;
519
520 if (len < 0)
521 return -EINVAL;
522
523 r = ch_read(ch, data, len);
524 if (r > 0)
525 ch->notify_other_cpu();
526
527 return r;
528}
529
530static int smd_packet_read(smd_channel_t *ch, void *data, int len)
531{
532 unsigned long flags;
533 int r;
534
535 if (len < 0)
536 return -EINVAL;
537
538 if (len > ch->current_packet)
539 len = ch->current_packet;
540
541 r = ch_read(ch, data, len);
542 if (r > 0)
543 ch->notify_other_cpu();
544
545 spin_lock_irqsave(&smd_lock, flags);
546 ch->current_packet -= r;
547 update_packet_state(ch);
548 spin_unlock_irqrestore(&smd_lock, flags);
549
550 return r;
551}
552
553static int smd_alloc_channel(const char *name, uint32_t cid, uint32_t type)
554{
555 struct smd_channel *ch;
556
557 ch = kzalloc(sizeof(struct smd_channel), GFP_KERNEL);
558 if (ch == 0) {
559 pr_err("smd_alloc_channel() out of memory\n");
560 return -1;
561 }
562 ch->n = cid;
563
564 if (_smd_alloc_channel(ch)) {
565 kfree(ch);
566 return -1;
567 }
568
569 ch->fifo_mask = ch->fifo_size - 1;
570 ch->type = type;
571
572 if ((type & SMD_TYPE_MASK) == SMD_TYPE_APPS_MODEM)
573 ch->notify_other_cpu = notify_modem_smd;
574 else
575 ch->notify_other_cpu = notify_dsp_smd;
576
577 if (smd_is_packet(cid, type)) {
578 ch->read = smd_packet_read;
579 ch->write = smd_packet_write;
580 ch->read_avail = smd_packet_read_avail;
581 ch->write_avail = smd_packet_write_avail;
582 ch->update_state = update_packet_state;
583 } else {
584 ch->read = smd_stream_read;
585 ch->write = smd_stream_write;
586 ch->read_avail = smd_stream_read_avail;
587 ch->write_avail = smd_stream_write_avail;
588 ch->update_state = update_stream_state;
589 }
590
591 if ((type & 0xff) == 0)
592 memcpy(ch->name, "SMD_", 4);
593 else
594 memcpy(ch->name, "DSP_", 4);
595 memcpy(ch->name + 4, name, 20);
596 ch->name[23] = 0;
597 ch->pdev.name = ch->name;
598 ch->pdev.id = -1;
599
600 pr_debug("smd_alloc_channel() cid=%02d size=%05d '%s'\n",
601 ch->n, ch->fifo_size, ch->name);
602
603 mutex_lock(&smd_creation_mutex);
604 list_add(&ch->ch_list, &smd_ch_closed_list);
605 mutex_unlock(&smd_creation_mutex);
606
607 platform_device_register(&ch->pdev);
608 return 0;
609}
610
611static void smd_channel_probe_worker(struct work_struct *work)
612{
613 struct smd_alloc_elm *shared;
614 unsigned ctype;
615 unsigned type;
616 unsigned n;
617
618 shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
619 if (!shared) {
620 pr_err("cannot find allocation table\n");
621 return;
622 }
623 for (n = 0; n < 64; n++) {
624 if (smd_ch_allocated[n])
625 continue;
626 if (!shared[n].ref_count)
627 continue;
628 if (!shared[n].name[0])
629 continue;
630 ctype = shared[n].ctype;
631 type = ctype & SMD_TYPE_MASK;
632
633 /* DAL channels are stream but neither the modem,
634 * nor the DSP correctly indicate this. Fixup manually.
635 */
636 if (!memcmp(shared[n].name, "DAL", 3))
637 ctype = (ctype & (~SMD_KIND_MASK)) | SMD_KIND_STREAM;
638
639 type = shared[n].ctype & SMD_TYPE_MASK;
640 if ((type == SMD_TYPE_APPS_MODEM) ||
641 (type == SMD_TYPE_APPS_DSP))
642 if (!smd_alloc_channel(shared[n].name, shared[n].cid, ctype))
643 smd_ch_allocated[n] = 1;
644 }
645}
646
647static void do_nothing_notify(void *priv, unsigned flags)
648{
649}
650
651struct smd_channel *smd_get_channel(const char *name)
652{
653 struct smd_channel *ch;
654
655 mutex_lock(&smd_creation_mutex);
656 list_for_each_entry(ch, &smd_ch_closed_list, ch_list) {
657 if (!strcmp(name, ch->name)) {
658 list_del(&ch->ch_list);
659 mutex_unlock(&smd_creation_mutex);
660 return ch;
661 }
662 }
663 mutex_unlock(&smd_creation_mutex);
664
665 return NULL;
666}
667
668int smd_open(const char *name, smd_channel_t **_ch,
669 void *priv, void (*notify)(void *, unsigned))
670{
671 struct smd_channel *ch;
672 unsigned long flags;
673
674 if (smd_initialized == 0) {
675 pr_info("smd_open() before smd_init()\n");
676 return -ENODEV;
677 }
678
679 ch = smd_get_channel(name);
680 if (!ch)
681 return -ENODEV;
682
683 if (notify == 0)
684 notify = do_nothing_notify;
685
686 ch->notify = notify;
687 ch->current_packet = 0;
688 ch->last_state = SMD_SS_CLOSED;
689 ch->priv = priv;
690
691 *_ch = ch;
692
693 spin_lock_irqsave(&smd_lock, flags);
694
695 if ((ch->type & SMD_TYPE_MASK) == SMD_TYPE_APPS_MODEM)
696 list_add(&ch->ch_list, &smd_ch_list_modem);
697 else
698 list_add(&ch->ch_list, &smd_ch_list_dsp);
699
700 /* If the remote side is CLOSING, we need to get it to
701 * move to OPENING (which we'll do by moving from CLOSED to
702 * OPENING) and then get it to move from OPENING to
703 * OPENED (by doing the same state change ourselves).
704 *
705 * Otherwise, it should be OPENING and we can move directly
706 * to OPENED so that it will follow.
707 */
708 if (ch->recv->state == SMD_SS_CLOSING) {
709 ch->send->head = 0;
710 ch_set_state(ch, SMD_SS_OPENING);
711 } else {
712 ch_set_state(ch, SMD_SS_OPENED);
713 }
714 spin_unlock_irqrestore(&smd_lock, flags);
715 smd_kick(ch);
716
717 return 0;
718}
719
720int smd_close(smd_channel_t *ch)
721{
722 unsigned long flags;
723
724 if (ch == 0)
725 return -1;
726
727 spin_lock_irqsave(&smd_lock, flags);
728 ch->notify = do_nothing_notify;
729 list_del(&ch->ch_list);
730 ch_set_state(ch, SMD_SS_CLOSED);
731 spin_unlock_irqrestore(&smd_lock, flags);
732
733 mutex_lock(&smd_creation_mutex);
734 list_add(&ch->ch_list, &smd_ch_closed_list);
735 mutex_unlock(&smd_creation_mutex);
736
737 return 0;
738}
739
740int smd_read(smd_channel_t *ch, void *data, int len)
741{
742 return ch->read(ch, data, len);
743}
744
745int smd_write(smd_channel_t *ch, const void *data, int len)
746{
747 return ch->write(ch, data, len);
748}
749
750int smd_write_atomic(smd_channel_t *ch, const void *data, int len)
751{
752 unsigned long flags;
753 int res;
754 spin_lock_irqsave(&smd_lock, flags);
755 res = ch->write(ch, data, len);
756 spin_unlock_irqrestore(&smd_lock, flags);
757 return res;
758}
759
760int smd_read_avail(smd_channel_t *ch)
761{
762 return ch->read_avail(ch);
763}
764
765int smd_write_avail(smd_channel_t *ch)
766{
767 return ch->write_avail(ch);
768}
769
770int smd_wait_until_readable(smd_channel_t *ch, int bytes)
771{
772 return -1;
773}
774
775int smd_wait_until_writable(smd_channel_t *ch, int bytes)
776{
777 return -1;
778}
779
780int smd_cur_packet_size(smd_channel_t *ch)
781{
782 return ch->current_packet;
783}
784
785
786/* ------------------------------------------------------------------------- */
787
788void *smem_alloc(unsigned id, unsigned size)
789{
790 return smem_find(id, size);
791}
792
793void __iomem *smem_item(unsigned id, unsigned *size)
794{
795 struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE;
796 struct smem_heap_entry *toc = shared->heap_toc;
797
798 if (id >= SMEM_NUM_ITEMS)
799 return NULL;
800
801 if (toc[id].allocated) {
802 *size = toc[id].size;
803 return (MSM_SHARED_RAM_BASE + toc[id].offset);
804 } else {
805 *size = 0;
806 }
807
808 return NULL;
809}
810
811void *smem_find(unsigned id, unsigned size_in)
812{
813 unsigned size;
814 void *ptr;
815
816 ptr = smem_item(id, &size);
817 if (!ptr)
818 return 0;
819
820 size_in = ALIGN(size_in, 8);
821 if (size_in != size) {
822 pr_err("smem_find(%d, %d): wrong size %d\n",
823 id, size_in, size);
824 return 0;
825 }
826
827 return ptr;
828}
829
830static irqreturn_t smsm_irq_handler(int irq, void *data)
831{
832 unsigned long flags;
833 unsigned apps, modm;
834
835 spin_lock_irqsave(&smem_lock, flags);
836
837 apps = raw_smsm_get_state(SMSM_STATE_APPS);
838 modm = raw_smsm_get_state(SMSM_STATE_MODEM);
839
840 if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
841 pr_info("<SM %08x %08x>\n", apps, modm);
842 if (modm & SMSM_RESET)
843 handle_modem_crash();
844
845 do_smd_probe();
846
847 spin_unlock_irqrestore(&smem_lock, flags);
848 return IRQ_HANDLED;
849}
850
851int smsm_change_state(enum smsm_state_item item,
852 uint32_t clear_mask, uint32_t set_mask)
853{
854 void __iomem *addr = smd_info.state + item * 4;
855 unsigned long flags;
856 unsigned state;
857
858 if (!smd_info.ready)
859 return -EIO;
860
861 spin_lock_irqsave(&smem_lock, flags);
862
863 if (raw_smsm_get_state(SMSM_STATE_MODEM) & SMSM_RESET)
864 handle_modem_crash();
865
866 state = (readl(addr) & ~clear_mask) | set_mask;
867 writel(state, addr);
868
869 if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
870 pr_info("smsm_change_state %d %x\n", item, state);
871 notify_other_smsm();
872
873 spin_unlock_irqrestore(&smem_lock, flags);
874
875 return 0;
876}
877
878uint32_t smsm_get_state(enum smsm_state_item item)
879{
880 unsigned long flags;
881 uint32_t rv;
882
883 spin_lock_irqsave(&smem_lock, flags);
884
885 rv = readl(smd_info.state + item * 4);
886
887 if (item == SMSM_STATE_MODEM && (rv & SMSM_RESET))
888 handle_modem_crash();
889
890 spin_unlock_irqrestore(&smem_lock, flags);
891
892 return rv;
893}
894
895#ifdef CONFIG_ARCH_MSM_SCORPION
896
897int smsm_set_sleep_duration(uint32_t delay)
898{
899 struct msm_dem_slave_data *ptr;
900
901 ptr = smem_find(SMEM_APPS_DEM_SLAVE_DATA, sizeof(*ptr));
902 if (ptr == NULL) {
903 pr_err("smsm_set_sleep_duration <SM NO APPS_DEM_SLAVE_DATA>\n");
904 return -EIO;
905 }
906 if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
907 pr_info("smsm_set_sleep_duration %d -> %d\n",
908 ptr->sleep_time, delay);
909 ptr->sleep_time = delay;
910 return 0;
911}
912
913#else
914
915int smsm_set_sleep_duration(uint32_t delay)
916{
917 uint32_t *ptr;
918
919 ptr = smem_find(SMEM_SMSM_SLEEP_DELAY, sizeof(*ptr));
920 if (ptr == NULL) {
921 pr_err("smsm_set_sleep_duration <SM NO SLEEP_DELAY>\n");
922 return -EIO;
923 }
924 if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
925 pr_info("smsm_set_sleep_duration %d -> %d\n",
926 *ptr, delay);
927 *ptr = delay;
928 return 0;
929}
930
931#endif
932
933int smd_core_init(void)
934{
935 int r;
936
937 /* wait for essential items to be initialized */
938 for (;;) {
939 unsigned size;
940 void __iomem *state;
941 state = smem_item(SMEM_SMSM_SHARED_STATE, &size);
942 if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) {
943 smd_info.state = state;
944 break;
945 }
946 }
947
948 smd_info.ready = 1;
949
950 r = request_irq(INT_A9_M2A_0, smd_modem_irq_handler,
951 IRQF_TRIGGER_RISING, "smd_dev", 0);
952 if (r < 0)
953 return r;
954 r = enable_irq_wake(INT_A9_M2A_0);
955 if (r < 0)
956 pr_err("smd_core_init: enable_irq_wake failed for A9_M2A_0\n");
957
958 r = request_irq(INT_A9_M2A_5, smsm_irq_handler,
959 IRQF_TRIGGER_RISING, "smsm_dev", 0);
960 if (r < 0) {
961 free_irq(INT_A9_M2A_0, 0);
962 return r;
963 }
964 r = enable_irq_wake(INT_A9_M2A_5);
965 if (r < 0)
966 pr_err("smd_core_init: enable_irq_wake failed for A9_M2A_5\n");
967
968#if defined(CONFIG_QDSP6)
969 r = request_irq(INT_ADSP_A11, smd_dsp_irq_handler,
970 IRQF_TRIGGER_RISING, "smd_dsp", 0);
971 if (r < 0) {
972 free_irq(INT_A9_M2A_0, 0);
973 free_irq(INT_A9_M2A_5, 0);
974 return r;
975 }
976#endif
977
978 /* check for any SMD channels that may already exist */
979 do_smd_probe();
980
981 /* indicate that we're up and running */
982 smsm_change_state(SMSM_STATE_APPS,
983 ~0, SMSM_INIT | SMSM_SMDINIT | SMSM_RPCINIT | SMSM_RUN);
984#ifdef CONFIG_ARCH_MSM_SCORPION
985 smsm_change_state(SMSM_STATE_APPS_DEM, ~0, 0);
986#endif
987
988 return 0;
989}
990
991static int msm_smd_probe(struct platform_device *pdev)
992{
993 /*
994 * If we haven't waited for the ARM9 to boot up till now,
995 * then we need to wait here. Otherwise this should just
996 * return immediately.
997 */
998 proc_comm_boot_wait();
999
1000 INIT_WORK(&probe_work, smd_channel_probe_worker);
1001
1002 if (smd_core_init()) {
1003 pr_err("smd_core_init() failed\n");
1004 return -1;
1005 }
1006
1007 do_smd_probe();
1008
1009 msm_check_for_modem_crash = check_for_modem_crash;
1010
1011 msm_init_last_radio_log(THIS_MODULE);
1012
1013 smd_initialized = 1;
1014
1015 return 0;
1016}
1017
1018static struct platform_driver msm_smd_driver = {
1019 .probe = msm_smd_probe,
1020 .driver = {
1021 .name = MODULE_NAME,
1022 },
1023};
1024
1025static int __init msm_smd_init(void)
1026{
1027 return platform_driver_register(&msm_smd_driver);
1028}
1029
1030module_init(msm_smd_init);
1031
1032MODULE_DESCRIPTION("MSM Shared Memory Core");
1033MODULE_AUTHOR("Brian Swetland <swetland@google.com>");
1034MODULE_LICENSE("GPL");
diff --git a/arch/arm/mach-msm/smd_debug.c b/arch/arm/mach-msm/smd_debug.c
deleted file mode 100644
index 8056b3e5590f..000000000000
--- a/arch/arm/mach-msm/smd_debug.c
+++ /dev/null
@@ -1,311 +0,0 @@
1/* arch/arm/mach-msm/smd_debug.c
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/debugfs.h>
18#include <linux/list.h>
19
20#include <mach/msm_iomap.h>
21
22#include "smd_private.h"
23
24#if defined(CONFIG_DEBUG_FS)
25
26static char *chstate(unsigned n)
27{
28 switch (n) {
29 case SMD_SS_CLOSED:
30 return "CLOSED";
31 case SMD_SS_OPENING:
32 return "OPENING";
33 case SMD_SS_OPENED:
34 return "OPENED";
35 case SMD_SS_FLUSHING:
36 return "FLUSHING";
37 case SMD_SS_CLOSING:
38 return "CLOSING";
39 case SMD_SS_RESET:
40 return "RESET";
41 case SMD_SS_RESET_OPENING:
42 return "ROPENING";
43 default:
44 return "UNKNOWN";
45 }
46}
47
48
49static int dump_ch(char *buf, int max, struct smd_channel *ch)
50{
51 volatile struct smd_half_channel *s = ch->send;
52 volatile struct smd_half_channel *r = ch->recv;
53
54 return scnprintf(
55 buf, max,
56 "ch%02d:"
57 " %8s(%05d/%05d) %c%c%c%c%c%c%c <->"
58 " %8s(%05d/%05d) %c%c%c%c%c%c%c '%s'\n", ch->n,
59 chstate(s->state), s->tail, s->head,
60 s->fDSR ? 'D' : 'd',
61 s->fCTS ? 'C' : 'c',
62 s->fCD ? 'C' : 'c',
63 s->fRI ? 'I' : 'i',
64 s->fHEAD ? 'W' : 'w',
65 s->fTAIL ? 'R' : 'r',
66 s->fSTATE ? 'S' : 's',
67 chstate(r->state), r->tail, r->head,
68 r->fDSR ? 'D' : 'd',
69 r->fCTS ? 'R' : 'r',
70 r->fCD ? 'C' : 'c',
71 r->fRI ? 'I' : 'i',
72 r->fHEAD ? 'W' : 'w',
73 r->fTAIL ? 'R' : 'r',
74 r->fSTATE ? 'S' : 's',
75 ch->name
76 );
77}
78
79static int debug_read_stat(char *buf, int max)
80{
81 char *msg;
82 int i = 0;
83
84 msg = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
85
86 if (raw_smsm_get_state(SMSM_STATE_MODEM) & SMSM_RESET)
87 i += scnprintf(buf + i, max - i,
88 "smsm: ARM9 HAS CRASHED\n");
89
90 i += scnprintf(buf + i, max - i, "smsm: a9: %08x a11: %08x\n",
91 raw_smsm_get_state(SMSM_STATE_MODEM),
92 raw_smsm_get_state(SMSM_STATE_APPS));
93#ifdef CONFIG_ARCH_MSM_SCORPION
94 i += scnprintf(buf + i, max - i, "smsm dem: apps: %08x modem: %08x "
95 "qdsp6: %08x power: %08x time: %08x\n",
96 raw_smsm_get_state(SMSM_STATE_APPS_DEM),
97 raw_smsm_get_state(SMSM_STATE_MODEM_DEM),
98 raw_smsm_get_state(SMSM_STATE_QDSP6_DEM),
99 raw_smsm_get_state(SMSM_STATE_POWER_MASTER_DEM),
100 raw_smsm_get_state(SMSM_STATE_TIME_MASTER_DEM));
101#endif
102 if (msg) {
103 msg[SZ_DIAG_ERR_MSG - 1] = 0;
104 i += scnprintf(buf + i, max - i, "diag: '%s'\n", msg);
105 }
106 return i;
107}
108
109static int debug_read_mem(char *buf, int max)
110{
111 unsigned n;
112 struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE;
113 struct smem_heap_entry *toc = shared->heap_toc;
114 int i = 0;
115
116 i += scnprintf(buf + i, max - i,
117 "heap: init=%d free=%d remain=%d\n",
118 shared->heap_info.initialized,
119 shared->heap_info.free_offset,
120 shared->heap_info.heap_remaining);
121
122 for (n = 0; n < SMEM_NUM_ITEMS; n++) {
123 if (toc[n].allocated == 0)
124 continue;
125 i += scnprintf(buf + i, max - i,
126 "%04d: offset %08x size %08x\n",
127 n, toc[n].offset, toc[n].size);
128 }
129 return i;
130}
131
132static int debug_read_ch(char *buf, int max)
133{
134 struct smd_channel *ch;
135 unsigned long flags;
136 int i = 0;
137
138 spin_lock_irqsave(&smd_lock, flags);
139 list_for_each_entry(ch, &smd_ch_list_dsp, ch_list)
140 i += dump_ch(buf + i, max - i, ch);
141 list_for_each_entry(ch, &smd_ch_list_modem, ch_list)
142 i += dump_ch(buf + i, max - i, ch);
143 list_for_each_entry(ch, &smd_ch_closed_list, ch_list)
144 i += dump_ch(buf + i, max - i, ch);
145 spin_unlock_irqrestore(&smd_lock, flags);
146
147 return i;
148}
149
150static int debug_read_version(char *buf, int max)
151{
152 struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE;
153 unsigned version = shared->version[VERSION_MODEM];
154 return sprintf(buf, "%d.%d\n", version >> 16, version & 0xffff);
155}
156
157static int debug_read_build_id(char *buf, int max)
158{
159 unsigned size;
160 void *data;
161
162 data = smem_item(SMEM_HW_SW_BUILD_ID, &size);
163 if (!data)
164 return 0;
165
166 if (size >= max)
167 size = max;
168 memcpy(buf, data, size);
169
170 return size;
171}
172
173static int debug_read_alloc_tbl(char *buf, int max)
174{
175 struct smd_alloc_elm *shared;
176 int n, i = 0;
177
178 shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64);
179
180 for (n = 0; n < 64; n++) {
181 if (shared[n].ref_count == 0)
182 continue;
183 i += scnprintf(buf + i, max - i,
184 "%03d: %-20s cid=%02d type=%03d "
185 "kind=%02d ref_count=%d\n",
186 n, shared[n].name, shared[n].cid,
187 shared[n].ctype & 0xff,
188 (shared[n].ctype >> 8) & 0xf,
189 shared[n].ref_count);
190 }
191
192 return i;
193}
194
195#define DEBUG_BUFMAX 4096
196static char debug_buffer[DEBUG_BUFMAX];
197
198static ssize_t debug_read(struct file *file, char __user *buf,
199 size_t count, loff_t *ppos)
200{
201 int (*fill)(char *buf, int max) = file->private_data;
202 int bsize = fill(debug_buffer, DEBUG_BUFMAX);
203 return simple_read_from_buffer(buf, count, ppos, debug_buffer, bsize);
204}
205
206static const struct file_operations debug_ops = {
207 .read = debug_read,
208 .open = simple_open,
209 .llseek = default_llseek,
210};
211
212static void debug_create(const char *name, umode_t mode,
213 struct dentry *dent,
214 int (*fill)(char *buf, int max))
215{
216 debugfs_create_file(name, mode, dent, fill, &debug_ops);
217}
218
219int __init smd_debugfs_init(void)
220{
221 struct dentry *dent;
222
223 dent = debugfs_create_dir("smd", 0);
224 if (IS_ERR(dent))
225 return 1;
226
227 debug_create("ch", 0444, dent, debug_read_ch);
228 debug_create("stat", 0444, dent, debug_read_stat);
229 debug_create("mem", 0444, dent, debug_read_mem);
230 debug_create("version", 0444, dent, debug_read_version);
231 debug_create("tbl", 0444, dent, debug_read_alloc_tbl);
232 debug_create("build", 0444, dent, debug_read_build_id);
233
234 return 0;
235}
236
237#endif
238
239
240#define MAX_NUM_SLEEP_CLIENTS 64
241#define MAX_SLEEP_NAME_LEN 8
242
243#define NUM_GPIO_INT_REGISTERS 6
244#define GPIO_SMEM_NUM_GROUPS 2
245#define GPIO_SMEM_MAX_PC_INTERRUPTS 8
246
247struct tramp_gpio_save {
248 unsigned int enable;
249 unsigned int detect;
250 unsigned int polarity;
251};
252
253struct tramp_gpio_smem {
254 uint16_t num_fired[GPIO_SMEM_NUM_GROUPS];
255 uint16_t fired[GPIO_SMEM_NUM_GROUPS][GPIO_SMEM_MAX_PC_INTERRUPTS];
256 uint32_t enabled[NUM_GPIO_INT_REGISTERS];
257 uint32_t detection[NUM_GPIO_INT_REGISTERS];
258 uint32_t polarity[NUM_GPIO_INT_REGISTERS];
259};
260
261
262void smsm_print_sleep_info(void)
263{
264 unsigned long flags;
265 uint32_t *ptr;
266#ifndef CONFIG_ARCH_MSM_SCORPION
267 struct tramp_gpio_smem *gpio;
268 struct smsm_interrupt_info *int_info;
269#endif
270
271
272 spin_lock_irqsave(&smem_lock, flags);
273
274 ptr = smem_alloc(SMEM_SMSM_SLEEP_DELAY, sizeof(*ptr));
275 if (ptr)
276 pr_info("SMEM_SMSM_SLEEP_DELAY: %x\n", *ptr);
277
278 ptr = smem_alloc(SMEM_SMSM_LIMIT_SLEEP, sizeof(*ptr));
279 if (ptr)
280 pr_info("SMEM_SMSM_LIMIT_SLEEP: %x\n", *ptr);
281
282 ptr = smem_alloc(SMEM_SLEEP_POWER_COLLAPSE_DISABLED, sizeof(*ptr));
283 if (ptr)
284 pr_info("SMEM_SLEEP_POWER_COLLAPSE_DISABLED: %x\n", *ptr);
285
286#ifndef CONFIG_ARCH_MSM_SCORPION
287 int_info = smem_alloc(SMEM_SMSM_INT_INFO, sizeof(*int_info));
288 if (int_info)
289 pr_info("SMEM_SMSM_INT_INFO %x %x %x\n",
290 int_info->interrupt_mask,
291 int_info->pending_interrupts,
292 int_info->wakeup_reason);
293
294 gpio = smem_alloc(SMEM_GPIO_INT, sizeof(*gpio));
295 if (gpio) {
296 int i;
297 for (i = 0; i < NUM_GPIO_INT_REGISTERS; i++)
298 pr_info("SMEM_GPIO_INT: %d: e %x d %x p %x\n",
299 i, gpio->enabled[i], gpio->detection[i],
300 gpio->polarity[i]);
301
302 for (i = 0; i < GPIO_SMEM_NUM_GROUPS; i++)
303 pr_info("SMEM_GPIO_INT: %d: f %d: %d %d...\n",
304 i, gpio->num_fired[i], gpio->fired[i][0],
305 gpio->fired[i][1]);
306 }
307#else
308#endif
309 spin_unlock_irqrestore(&smem_lock, flags);
310}
311
diff --git a/arch/arm/mach-msm/smd_private.h b/arch/arm/mach-msm/smd_private.h
deleted file mode 100644
index 727bfe68aa9b..000000000000
--- a/arch/arm/mach-msm/smd_private.h
+++ /dev/null
@@ -1,403 +0,0 @@
1/* arch/arm/mach-msm/smd_private.h
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Copyright (c) 2007 QUALCOMM Incorporated
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16#ifndef _ARCH_ARM_MACH_MSM_MSM_SMD_PRIVATE_H_
17#define _ARCH_ARM_MACH_MSM_MSM_SMD_PRIVATE_H_
18
19#include <linux/platform_device.h>
20#include <linux/spinlock.h>
21#include <linux/list.h>
22#include <linux/io.h>
23
24#include <mach/msm_iomap.h>
25
26struct smem_heap_info {
27 unsigned initialized;
28 unsigned free_offset;
29 unsigned heap_remaining;
30 unsigned reserved;
31};
32
33struct smem_heap_entry {
34 unsigned allocated;
35 unsigned offset;
36 unsigned size;
37 unsigned reserved;
38};
39
40struct smem_proc_comm {
41 unsigned command;
42 unsigned status;
43 unsigned data1;
44 unsigned data2;
45};
46
47#define PC_APPS 0
48#define PC_MODEM 1
49
50#define VERSION_SMD 0
51#define VERSION_QDSP6 4
52#define VERSION_APPS_SBL 6
53#define VERSION_MODEM_SBL 7
54#define VERSION_APPS 8
55#define VERSION_MODEM 9
56
57struct smem_shared {
58 struct smem_proc_comm proc_comm[4];
59 unsigned version[32];
60 struct smem_heap_info heap_info;
61 struct smem_heap_entry heap_toc[512];
62};
63
64#define SMSM_V1_SIZE (sizeof(unsigned) * 8)
65#define SMSM_V2_SIZE (sizeof(unsigned) * 4)
66
67#ifdef CONFIG_MSM_SMD_PKG3
68struct smsm_interrupt_info {
69 uint32_t interrupt_mask;
70 uint32_t pending_interrupts;
71 uint32_t wakeup_reason;
72};
73#else
74#define DEM_MAX_PORT_NAME_LEN (20)
75struct msm_dem_slave_data {
76 uint32_t sleep_time;
77 uint32_t interrupt_mask;
78 uint32_t resources_used;
79 uint32_t reserved1;
80
81 uint32_t wakeup_reason;
82 uint32_t pending_interrupts;
83 uint32_t rpc_prog;
84 uint32_t rpc_proc;
85 char smd_port_name[DEM_MAX_PORT_NAME_LEN];
86 uint32_t reserved2;
87};
88#endif
89
90#define SZ_DIAG_ERR_MSG 0xC8
91#define ID_DIAG_ERR_MSG SMEM_DIAG_ERR_MESSAGE
92#define ID_SMD_CHANNELS SMEM_SMD_BASE_ID
93#define ID_SHARED_STATE SMEM_SMSM_SHARED_STATE
94#define ID_CH_ALLOC_TBL SMEM_CHANNEL_ALLOC_TBL
95
96#define SMSM_INIT 0x00000001
97#define SMSM_SMDINIT 0x00000008
98#define SMSM_RPCINIT 0x00000020
99#define SMSM_RESET 0x00000040
100#define SMSM_RSA 0x00000080
101#define SMSM_RUN 0x00000100
102#define SMSM_PWRC 0x00000200
103#define SMSM_TIMEWAIT 0x00000400
104#define SMSM_TIMEINIT 0x00000800
105#define SMSM_PWRC_EARLY_EXIT 0x00001000
106#define SMSM_WFPI 0x00002000
107#define SMSM_SLEEP 0x00004000
108#define SMSM_SLEEPEXIT 0x00008000
109#define SMSM_APPS_REBOOT 0x00020000
110#define SMSM_SYSTEM_POWER_DOWN 0x00040000
111#define SMSM_SYSTEM_REBOOT 0x00080000
112#define SMSM_SYSTEM_DOWNLOAD 0x00100000
113#define SMSM_PWRC_SUSPEND 0x00200000
114#define SMSM_APPS_SHUTDOWN 0x00400000
115#define SMSM_SMD_LOOPBACK 0x00800000
116#define SMSM_RUN_QUIET 0x01000000
117#define SMSM_MODEM_WAIT 0x02000000
118#define SMSM_MODEM_BREAK 0x04000000
119#define SMSM_MODEM_CONTINUE 0x08000000
120#define SMSM_UNKNOWN 0x80000000
121
122#define SMSM_WKUP_REASON_RPC 0x00000001
123#define SMSM_WKUP_REASON_INT 0x00000002
124#define SMSM_WKUP_REASON_GPIO 0x00000004
125#define SMSM_WKUP_REASON_TIMER 0x00000008
126#define SMSM_WKUP_REASON_ALARM 0x00000010
127#define SMSM_WKUP_REASON_RESET 0x00000020
128
129#ifdef CONFIG_ARCH_MSM7X00A
130enum smsm_state_item {
131 SMSM_STATE_APPS = 1,
132 SMSM_STATE_MODEM = 3,
133 SMSM_STATE_COUNT,
134};
135#else
136enum smsm_state_item {
137 SMSM_STATE_APPS,
138 SMSM_STATE_MODEM,
139 SMSM_STATE_HEXAGON,
140 SMSM_STATE_APPS_DEM,
141 SMSM_STATE_MODEM_DEM,
142 SMSM_STATE_QDSP6_DEM,
143 SMSM_STATE_POWER_MASTER_DEM,
144 SMSM_STATE_TIME_MASTER_DEM,
145 SMSM_STATE_COUNT,
146};
147#endif
148
149void *smem_alloc(unsigned id, unsigned size);
150int smsm_change_state(enum smsm_state_item item, uint32_t clear_mask, uint32_t set_mask);
151uint32_t smsm_get_state(enum smsm_state_item item);
152int smsm_set_sleep_duration(uint32_t delay);
153void smsm_print_sleep_info(void);
154
155#define SMEM_NUM_SMD_CHANNELS 64
156
157typedef enum {
158 /* fixed items */
159 SMEM_PROC_COMM = 0,
160 SMEM_HEAP_INFO,
161 SMEM_ALLOCATION_TABLE,
162 SMEM_VERSION_INFO,
163 SMEM_HW_RESET_DETECT,
164 SMEM_AARM_WARM_BOOT,
165 SMEM_DIAG_ERR_MESSAGE,
166 SMEM_SPINLOCK_ARRAY,
167 SMEM_MEMORY_BARRIER_LOCATION,
168
169 /* dynamic items */
170 SMEM_AARM_PARTITION_TABLE,
171 SMEM_AARM_BAD_BLOCK_TABLE,
172 SMEM_RESERVE_BAD_BLOCKS,
173 SMEM_WM_UUID,
174 SMEM_CHANNEL_ALLOC_TBL,
175 SMEM_SMD_BASE_ID,
176 SMEM_SMEM_LOG_IDX = SMEM_SMD_BASE_ID + SMEM_NUM_SMD_CHANNELS,
177 SMEM_SMEM_LOG_EVENTS,
178 SMEM_SMEM_STATIC_LOG_IDX,
179 SMEM_SMEM_STATIC_LOG_EVENTS,
180 SMEM_SMEM_SLOW_CLOCK_SYNC,
181 SMEM_SMEM_SLOW_CLOCK_VALUE,
182 SMEM_BIO_LED_BUF,
183 SMEM_SMSM_SHARED_STATE,
184 SMEM_SMSM_INT_INFO,
185 SMEM_SMSM_SLEEP_DELAY,
186 SMEM_SMSM_LIMIT_SLEEP,
187 SMEM_SLEEP_POWER_COLLAPSE_DISABLED,
188 SMEM_KEYPAD_KEYS_PRESSED,
189 SMEM_KEYPAD_STATE_UPDATED,
190 SMEM_KEYPAD_STATE_IDX,
191 SMEM_GPIO_INT,
192 SMEM_MDDI_LCD_IDX,
193 SMEM_MDDI_HOST_DRIVER_STATE,
194 SMEM_MDDI_LCD_DISP_STATE,
195 SMEM_LCD_CUR_PANEL,
196 SMEM_MARM_BOOT_SEGMENT_INFO,
197 SMEM_AARM_BOOT_SEGMENT_INFO,
198 SMEM_SLEEP_STATIC,
199 SMEM_SCORPION_FREQUENCY,
200 SMEM_SMD_PROFILES,
201 SMEM_TSSC_BUSY,
202 SMEM_HS_SUSPEND_FILTER_INFO,
203 SMEM_BATT_INFO,
204 SMEM_APPS_BOOT_MODE,
205 SMEM_VERSION_FIRST,
206 SMEM_VERSION_LAST = SMEM_VERSION_FIRST + 24,
207 SMEM_OSS_RRCASN1_BUF1,
208 SMEM_OSS_RRCASN1_BUF2,
209 SMEM_ID_VENDOR0,
210 SMEM_ID_VENDOR1,
211 SMEM_ID_VENDOR2,
212 SMEM_HW_SW_BUILD_ID,
213 SMEM_SMD_BLOCK_PORT_BASE_ID,
214 SMEM_SMD_BLOCK_PORT_PROC0_HEAP = SMEM_SMD_BLOCK_PORT_BASE_ID + SMEM_NUM_SMD_CHANNELS,
215 SMEM_SMD_BLOCK_PORT_PROC1_HEAP = SMEM_SMD_BLOCK_PORT_PROC0_HEAP + SMEM_NUM_SMD_CHANNELS,
216 SMEM_I2C_MUTEX = SMEM_SMD_BLOCK_PORT_PROC1_HEAP + SMEM_NUM_SMD_CHANNELS,
217 SMEM_SCLK_CONVERSION,
218 SMEM_SMD_SMSM_INTR_MUX,
219 SMEM_SMSM_CPU_INTR_MASK,
220 SMEM_APPS_DEM_SLAVE_DATA,
221 SMEM_QDSP6_DEM_SLAVE_DATA,
222 SMEM_CLKREGIM_BSP,
223 SMEM_CLKREGIM_SOURCES,
224 SMEM_SMD_FIFO_BASE_ID,
225 SMEM_USABLE_RAM_PARTITION_TABLE = SMEM_SMD_FIFO_BASE_ID + SMEM_NUM_SMD_CHANNELS,
226 SMEM_POWER_ON_STATUS_INFO,
227 SMEM_DAL_AREA,
228 SMEM_SMEM_LOG_POWER_IDX,
229 SMEM_SMEM_LOG_POWER_WRAP,
230 SMEM_SMEM_LOG_POWER_EVENTS,
231 SMEM_ERR_CRASH_LOG,
232 SMEM_ERR_F3_TRACE_LOG,
233 SMEM_NUM_ITEMS,
234} smem_mem_type;
235
236
237#define SMD_SS_CLOSED 0x00000000
238#define SMD_SS_OPENING 0x00000001
239#define SMD_SS_OPENED 0x00000002
240#define SMD_SS_FLUSHING 0x00000003
241#define SMD_SS_CLOSING 0x00000004
242#define SMD_SS_RESET 0x00000005
243#define SMD_SS_RESET_OPENING 0x00000006
244
245#define SMD_BUF_SIZE 8192
246#define SMD_CHANNELS 64
247
248#define SMD_HEADER_SIZE 20
249
250struct smd_alloc_elm {
251 char name[20];
252 uint32_t cid;
253 uint32_t ctype;
254 uint32_t ref_count;
255};
256
257struct smd_half_channel {
258 unsigned state;
259 unsigned char fDSR;
260 unsigned char fCTS;
261 unsigned char fCD;
262 unsigned char fRI;
263 unsigned char fHEAD;
264 unsigned char fTAIL;
265 unsigned char fSTATE;
266 unsigned char fUNUSED;
267 unsigned tail;
268 unsigned head;
269} __attribute__(( aligned(4), packed ));
270
271/* Only used on SMD package v3 on msm7201a */
272struct smd_shared_v1 {
273 struct smd_half_channel ch0;
274 unsigned char data0[SMD_BUF_SIZE];
275 struct smd_half_channel ch1;
276 unsigned char data1[SMD_BUF_SIZE];
277};
278
279/* Used on SMD package v4 */
280struct smd_shared_v2 {
281 struct smd_half_channel ch0;
282 struct smd_half_channel ch1;
283};
284
285struct smd_channel {
286 volatile struct smd_half_channel *send;
287 volatile struct smd_half_channel *recv;
288 unsigned char *send_data;
289 unsigned char *recv_data;
290
291 unsigned fifo_mask;
292 unsigned fifo_size;
293 unsigned current_packet;
294 unsigned n;
295
296 struct list_head ch_list;
297
298 void *priv;
299 void (*notify)(void *priv, unsigned flags);
300
301 int (*read)(struct smd_channel *ch, void *data, int len);
302 int (*write)(struct smd_channel *ch, const void *data, int len);
303 int (*read_avail)(struct smd_channel *ch);
304 int (*write_avail)(struct smd_channel *ch);
305
306 void (*update_state)(struct smd_channel *ch);
307 unsigned last_state;
308 void (*notify_other_cpu)(void);
309 unsigned type;
310
311 char name[32];
312 struct platform_device pdev;
313};
314
315#define SMD_TYPE_MASK 0x0FF
316#define SMD_TYPE_APPS_MODEM 0x000
317#define SMD_TYPE_APPS_DSP 0x001
318#define SMD_TYPE_MODEM_DSP 0x002
319
320#define SMD_KIND_MASK 0xF00
321#define SMD_KIND_UNKNOWN 0x000
322#define SMD_KIND_STREAM 0x100
323#define SMD_KIND_PACKET 0x200
324
325extern struct list_head smd_ch_closed_list;
326extern struct list_head smd_ch_list_modem;
327extern struct list_head smd_ch_list_dsp;
328
329extern spinlock_t smd_lock;
330extern spinlock_t smem_lock;
331
332void *smem_find(unsigned id, unsigned size);
333void *smem_item(unsigned id, unsigned *size);
334uint32_t raw_smsm_get_state(enum smsm_state_item item);
335
336extern void msm_init_last_radio_log(struct module *);
337
338#ifdef CONFIG_MSM_SMD_PKG3
339/*
340 * This allocator assumes an SMD Package v3 which only exists on
341 * MSM7x00 SoC's.
342 */
343static inline int _smd_alloc_channel(struct smd_channel *ch)
344{
345 struct smd_shared_v1 *shared1;
346
347 shared1 = smem_alloc(ID_SMD_CHANNELS + ch->n, sizeof(*shared1));
348 if (!shared1) {
349 pr_err("smd_alloc_channel() cid %d does not exist\n", ch->n);
350 return -1;
351 }
352 ch->send = &shared1->ch0;
353 ch->recv = &shared1->ch1;
354 ch->send_data = shared1->data0;
355 ch->recv_data = shared1->data1;
356 ch->fifo_size = SMD_BUF_SIZE;
357 return 0;
358}
359#else
360/*
361 * This allocator assumes an SMD Package v4, the most common
362 * and the default.
363 */
364static inline int _smd_alloc_channel(struct smd_channel *ch)
365{
366 struct smd_shared_v2 *shared2;
367 void *buffer;
368 unsigned buffer_sz;
369
370 shared2 = smem_alloc(SMEM_SMD_BASE_ID + ch->n, sizeof(*shared2));
371 buffer = smem_item(SMEM_SMD_FIFO_BASE_ID + ch->n, &buffer_sz);
372
373 if (!buffer)
374 return -1;
375
376 /* buffer must be a power-of-two size */
377 if (buffer_sz & (buffer_sz - 1))
378 return -1;
379
380 buffer_sz /= 2;
381 ch->send = &shared2->ch0;
382 ch->recv = &shared2->ch1;
383 ch->send_data = buffer;
384 ch->recv_data = buffer + buffer_sz;
385 ch->fifo_size = buffer_sz;
386 return 0;
387}
388#endif /* CONFIG_MSM_SMD_PKG3 */
389
390#if defined(CONFIG_ARCH_MSM7X30)
391static inline void msm_a2m_int(uint32_t irq)
392{
393 writel(1 << irq, MSM_GCC_BASE + 0x8);
394}
395#else
396static inline void msm_a2m_int(uint32_t irq)
397{
398 writel(1, MSM_CSR_BASE + 0x400 + (irq * 4));
399}
400#endif /* CONFIG_ARCH_MSM7X30 */
401
402
403#endif
diff --git a/arch/arm/mach-msm/vreg.c b/arch/arm/mach-msm/vreg.c
deleted file mode 100644
index bd66ed04d6dc..000000000000
--- a/arch/arm/mach-msm/vreg.c
+++ /dev/null
@@ -1,220 +0,0 @@
1/* arch/arm/mach-msm/vreg.c
2 *
3 * Copyright (C) 2008 Google, Inc.
4 * Copyright (c) 2009, Code Aurora Forum. All rights reserved.
5 * Author: Brian Swetland <swetland@google.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18#include <linux/kernel.h>
19#include <linux/device.h>
20#include <linux/init.h>
21#include <linux/debugfs.h>
22#include <linux/module.h>
23#include <linux/string.h>
24#include <mach/vreg.h>
25
26#include "proc_comm.h"
27
28struct vreg {
29 const char *name;
30 unsigned id;
31 int status;
32 unsigned refcnt;
33};
34
35#define VREG(_name, _id, _status, _refcnt) \
36 { .name = _name, .id = _id, .status = _status, .refcnt = _refcnt }
37
38static struct vreg vregs[] = {
39 VREG("msma", 0, 0, 0),
40 VREG("msmp", 1, 0, 0),
41 VREG("msme1", 2, 0, 0),
42 VREG("msmc1", 3, 0, 0),
43 VREG("msmc2", 4, 0, 0),
44 VREG("gp3", 5, 0, 0),
45 VREG("msme2", 6, 0, 0),
46 VREG("gp4", 7, 0, 0),
47 VREG("gp1", 8, 0, 0),
48 VREG("tcxo", 9, 0, 0),
49 VREG("pa", 10, 0, 0),
50 VREG("rftx", 11, 0, 0),
51 VREG("rfrx1", 12, 0, 0),
52 VREG("rfrx2", 13, 0, 0),
53 VREG("synt", 14, 0, 0),
54 VREG("wlan", 15, 0, 0),
55 VREG("usb", 16, 0, 0),
56 VREG("boost", 17, 0, 0),
57 VREG("mmc", 18, 0, 0),
58 VREG("ruim", 19, 0, 0),
59 VREG("msmc0", 20, 0, 0),
60 VREG("gp2", 21, 0, 0),
61 VREG("gp5", 22, 0, 0),
62 VREG("gp6", 23, 0, 0),
63 VREG("rf", 24, 0, 0),
64 VREG("rf_vco", 26, 0, 0),
65 VREG("mpll", 27, 0, 0),
66 VREG("s2", 28, 0, 0),
67 VREG("s3", 29, 0, 0),
68 VREG("rfubm", 30, 0, 0),
69 VREG("ncp", 31, 0, 0),
70 VREG("gp7", 32, 0, 0),
71 VREG("gp8", 33, 0, 0),
72 VREG("gp9", 34, 0, 0),
73 VREG("gp10", 35, 0, 0),
74 VREG("gp11", 36, 0, 0),
75 VREG("gp12", 37, 0, 0),
76 VREG("gp13", 38, 0, 0),
77 VREG("gp14", 39, 0, 0),
78 VREG("gp15", 40, 0, 0),
79 VREG("gp16", 41, 0, 0),
80 VREG("gp17", 42, 0, 0),
81 VREG("s4", 43, 0, 0),
82 VREG("usb2", 44, 0, 0),
83 VREG("wlan2", 45, 0, 0),
84 VREG("xo_out", 46, 0, 0),
85 VREG("lvsw0", 47, 0, 0),
86 VREG("lvsw1", 48, 0, 0),
87};
88
89struct vreg *vreg_get(struct device *dev, const char *id)
90{
91 int n;
92 for (n = 0; n < ARRAY_SIZE(vregs); n++) {
93 if (!strcmp(vregs[n].name, id))
94 return vregs + n;
95 }
96 return ERR_PTR(-ENOENT);
97}
98
99void vreg_put(struct vreg *vreg)
100{
101}
102
103int vreg_enable(struct vreg *vreg)
104{
105 unsigned id = vreg->id;
106 unsigned enable = 1;
107
108 if (vreg->refcnt == 0)
109 vreg->status = msm_proc_comm(PCOM_VREG_SWITCH, &id, &enable);
110
111 if ((vreg->refcnt < UINT_MAX) && (!vreg->status))
112 vreg->refcnt++;
113
114 return vreg->status;
115}
116
117int vreg_disable(struct vreg *vreg)
118{
119 unsigned id = vreg->id;
120 unsigned enable = 0;
121
122 if (!vreg->refcnt)
123 return 0;
124
125 if (vreg->refcnt == 1)
126 vreg->status = msm_proc_comm(PCOM_VREG_SWITCH, &id, &enable);
127
128 if (!vreg->status)
129 vreg->refcnt--;
130
131 return vreg->status;
132}
133
134int vreg_set_level(struct vreg *vreg, unsigned mv)
135{
136 unsigned id = vreg->id;
137
138 vreg->status = msm_proc_comm(PCOM_VREG_SET_LEVEL, &id, &mv);
139 return vreg->status;
140}
141
142#if defined(CONFIG_DEBUG_FS)
143
144static int vreg_debug_set(void *data, u64 val)
145{
146 struct vreg *vreg = data;
147 switch (val) {
148 case 0:
149 vreg_disable(vreg);
150 break;
151 case 1:
152 vreg_enable(vreg);
153 break;
154 default:
155 vreg_set_level(vreg, val);
156 break;
157 }
158 return 0;
159}
160
161static int vreg_debug_get(void *data, u64 *val)
162{
163 struct vreg *vreg = data;
164
165 if (!vreg->status)
166 *val = 0;
167 else
168 *val = 1;
169
170 return 0;
171}
172
173static int vreg_debug_count_set(void *data, u64 val)
174{
175 struct vreg *vreg = data;
176 if (val > UINT_MAX)
177 val = UINT_MAX;
178 vreg->refcnt = val;
179 return 0;
180}
181
182static int vreg_debug_count_get(void *data, u64 *val)
183{
184 struct vreg *vreg = data;
185
186 *val = vreg->refcnt;
187
188 return 0;
189}
190
191DEFINE_SIMPLE_ATTRIBUTE(vreg_fops, vreg_debug_get, vreg_debug_set, "%llu\n");
192DEFINE_SIMPLE_ATTRIBUTE(vreg_count_fops, vreg_debug_count_get,
193 vreg_debug_count_set, "%llu\n");
194
195static int __init vreg_debug_init(void)
196{
197 struct dentry *dent;
198 int n;
199 char name[32];
200 const char *refcnt_name = "_refcnt";
201
202 dent = debugfs_create_dir("vreg", 0);
203 if (IS_ERR(dent))
204 return 0;
205
206 for (n = 0; n < ARRAY_SIZE(vregs); n++) {
207 (void) debugfs_create_file(vregs[n].name, 0644,
208 dent, vregs + n, &vreg_fops);
209
210 strlcpy(name, vregs[n].name, sizeof(name));
211 strlcat(name, refcnt_name, sizeof(name));
212 (void) debugfs_create_file(name, 0644,
213 dent, vregs + n, &vreg_count_fops);
214 }
215
216 return 0;
217}
218
219device_initcall(vreg_debug_init);
220#endif
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index c1e4567a5ab3..97473168d6b6 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -64,6 +64,20 @@ config MACH_ARMADA_38X
64 Say 'Y' here if you want your kernel to support boards based 64 Say 'Y' here if you want your kernel to support boards based
65 on the Marvell Armada 380/385 SoC with device tree. 65 on the Marvell Armada 380/385 SoC with device tree.
66 66
67config MACH_ARMADA_39X
68 bool "Marvell Armada 39x boards" if ARCH_MULTI_V7
69 select ARM_GIC
70 select ARMADA_39X_CLK
71 select CACHE_L2X0
72 select HAVE_ARM_SCU
73 select HAVE_ARM_TWD if SMP
74 select HAVE_SMP
75 select MACH_MVEBU_V7
76 select PINCTRL_ARMADA_39X
77 help
78 Say 'Y' here if you want your kernel to support boards based
79 on the Marvell Armada 39x SoC with device tree.
80
67config MACH_ARMADA_XP 81config MACH_ARMADA_XP
68 bool "Marvell Armada XP boards" if ARCH_MULTI_V7 82 bool "Marvell Armada XP boards" if ARCH_MULTI_V7
69 select ARMADA_XP_CLK 83 select ARMADA_XP_CLK
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index 89a139ed7d5b..afee9083ad92 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -184,7 +184,7 @@ static void __init mvebu_dt_init(void)
184 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 184 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
185} 185}
186 186
187static const char * const armada_370_xp_dt_compat[] = { 187static const char * const armada_370_xp_dt_compat[] __initconst = {
188 "marvell,armada-370-xp", 188 "marvell,armada-370-xp",
189 NULL, 189 NULL,
190}; 190};
@@ -205,7 +205,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)")
205 .dt_compat = armada_370_xp_dt_compat, 205 .dt_compat = armada_370_xp_dt_compat,
206MACHINE_END 206MACHINE_END
207 207
208static const char * const armada_375_dt_compat[] = { 208static const char * const armada_375_dt_compat[] __initconst = {
209 "marvell,armada375", 209 "marvell,armada375",
210 NULL, 210 NULL,
211}; 211};
@@ -219,7 +219,7 @@ DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)")
219 .dt_compat = armada_375_dt_compat, 219 .dt_compat = armada_375_dt_compat,
220MACHINE_END 220MACHINE_END
221 221
222static const char * const armada_38x_dt_compat[] = { 222static const char * const armada_38x_dt_compat[] __initconst = {
223 "marvell,armada380", 223 "marvell,armada380",
224 "marvell,armada385", 224 "marvell,armada385",
225 NULL, 225 NULL,
@@ -232,3 +232,17 @@ DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)")
232 .restart = mvebu_restart, 232 .restart = mvebu_restart,
233 .dt_compat = armada_38x_dt_compat, 233 .dt_compat = armada_38x_dt_compat,
234MACHINE_END 234MACHINE_END
235
236static const char * const armada_39x_dt_compat[] __initconst = {
237 "marvell,armada390",
238 "marvell,armada398",
239 NULL,
240};
241
242DT_MACHINE_START(ARMADA_39X_DT, "Marvell Armada 39x (Device Tree)")
243 .l2c_aux_val = 0,
244 .l2c_aux_mask = ~0,
245 .init_irq = mvebu_init_irq,
246 .restart = mvebu_restart,
247 .dt_compat = armada_39x_dt_compat,
248MACHINE_END
diff --git a/arch/arm/mach-mvebu/dove.c b/arch/arm/mach-mvebu/dove.c
index b50464ec1130..5a1741500a30 100644
--- a/arch/arm/mach-mvebu/dove.c
+++ b/arch/arm/mach-mvebu/dove.c
@@ -27,7 +27,7 @@ static void __init dove_init(void)
27 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 27 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
28} 28}
29 29
30static const char * const dove_dt_compat[] = { 30static const char * const dove_dt_compat[] __initconst = {
31 "marvell,dove", 31 "marvell,dove",
32 NULL 32 NULL
33}; 33};
diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c
index 6b5310828eb2..925f75f54268 100644
--- a/arch/arm/mach-mvebu/kirkwood.c
+++ b/arch/arm/mach-mvebu/kirkwood.c
@@ -186,7 +186,7 @@ static void __init kirkwood_dt_init(void)
186 of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL); 186 of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL);
187} 187}
188 188
189static const char * const kirkwood_dt_board_compat[] = { 189static const char * const kirkwood_dt_board_compat[] __initconst = {
190 "marvell,kirkwood", 190 "marvell,kirkwood",
191 NULL 191 NULL
192}; 192};
diff --git a/arch/arm/mach-mvebu/platsmp-a9.c b/arch/arm/mach-mvebu/platsmp-a9.c
index 2ec1a42b4321..df0a9cc5da59 100644
--- a/arch/arm/mach-mvebu/platsmp-a9.c
+++ b/arch/arm/mach-mvebu/platsmp-a9.c
@@ -110,3 +110,5 @@ CPU_METHOD_OF_DECLARE(mvebu_armada_375_smp, "marvell,armada-375-smp",
110 &mvebu_cortex_a9_smp_ops); 110 &mvebu_cortex_a9_smp_ops);
111CPU_METHOD_OF_DECLARE(mvebu_armada_380_smp, "marvell,armada-380-smp", 111CPU_METHOD_OF_DECLARE(mvebu_armada_380_smp, "marvell,armada-380-smp",
112 &armada_38x_smp_ops); 112 &armada_38x_smp_ops);
113CPU_METHOD_OF_DECLARE(mvebu_armada_390_smp, "marvell,armada-390-smp",
114 &armada_38x_smp_ops);
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index 8b9f5e202ccf..4f4e22206ae5 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -415,6 +415,9 @@ static __init int armada_38x_cpuidle_init(void)
415 void __iomem *mpsoc_base; 415 void __iomem *mpsoc_base;
416 u32 reg; 416 u32 reg;
417 417
418 pr_warn("CPU idle is currently broken on Armada 38x: disabling");
419 return 0;
420
418 np = of_find_compatible_node(NULL, NULL, 421 np = of_find_compatible_node(NULL, NULL,
419 "marvell,armada-380-coherency-fabric"); 422 "marvell,armada-380-coherency-fabric");
420 if (!np) 423 if (!np)
@@ -476,6 +479,16 @@ static int __init mvebu_v7_cpu_pm_init(void)
476 return 0; 479 return 0;
477 of_node_put(np); 480 of_node_put(np);
478 481
482 /*
483 * Currently the CPU idle support for Armada 38x is broken, as
484 * the CPU hotplug uses some of the CPU idle functions it is
485 * broken too, so let's disable it
486 */
487 if (of_machine_is_compatible("marvell,armada380")) {
488 cpu_hotplug_disable();
489 pr_warn("CPU hotplug support is currently broken on Armada 38x: disabling");
490 }
491
479 if (of_machine_is_compatible("marvell,armadaxp")) 492 if (of_machine_is_compatible("marvell,armadaxp"))
480 ret = armada_xp_cpuidle_init(); 493 ret = armada_xp_cpuidle_init();
481 else if (of_machine_is_compatible("marvell,armada370")) 494 else if (of_machine_is_compatible("marvell,armada370"))
@@ -489,7 +502,8 @@ static int __init mvebu_v7_cpu_pm_init(void)
489 return ret; 502 return ret;
490 503
491 mvebu_v7_pmsu_enable_l2_powerdown_onidle(); 504 mvebu_v7_pmsu_enable_l2_powerdown_onidle();
492 platform_device_register(&mvebu_v7_cpuidle_device); 505 if (mvebu_v7_cpuidle_device.name)
506 platform_device_register(&mvebu_v7_cpuidle_device);
493 cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier); 507 cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier);
494 508
495 return 0; 509 return 0;
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 34b4c0044961..dd94567c3628 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -71,13 +71,7 @@ static unsigned int mpui7xx_sleep_save[MPUI7XX_SLEEP_SAVE_SIZE];
71static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE]; 71static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_SIZE];
72static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE]; 72static unsigned int mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_SIZE];
73 73
74#ifndef CONFIG_OMAP_32K_TIMER 74static unsigned short enable_dyn_sleep;
75
76static unsigned short enable_dyn_sleep = 0;
77
78#else
79
80static unsigned short enable_dyn_sleep = 1;
81 75
82static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr, 76static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr,
83 char *buf) 77 char *buf)
@@ -90,8 +84,9 @@ static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr,
90{ 84{
91 unsigned short value; 85 unsigned short value;
92 if (sscanf(buf, "%hu", &value) != 1 || 86 if (sscanf(buf, "%hu", &value) != 1 ||
93 (value != 0 && value != 1)) { 87 (value != 0 && value != 1) ||
94 printk(KERN_ERR "idle_sleep_store: Invalid value\n"); 88 (value != 0 && !IS_ENABLED(CONFIG_OMAP_32K_TIMER))) {
89 pr_err("idle_sleep_store: Invalid value\n");
95 return -EINVAL; 90 return -EINVAL;
96 } 91 }
97 enable_dyn_sleep = value; 92 enable_dyn_sleep = value;
@@ -101,7 +96,6 @@ static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr,
101static struct kobj_attribute sleep_while_idle_attr = 96static struct kobj_attribute sleep_while_idle_attr =
102 __ATTR(sleep_while_idle, 0644, idle_show, idle_store); 97 __ATTR(sleep_while_idle, 0644, idle_show, idle_store);
103 98
104#endif
105 99
106static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL; 100static void (*omap_sram_suspend)(unsigned long r0, unsigned long r1) = NULL;
107 101
@@ -115,16 +109,11 @@ void omap1_pm_idle(void)
115{ 109{
116 extern __u32 arm_idlect1_mask; 110 extern __u32 arm_idlect1_mask;
117 __u32 use_idlect1 = arm_idlect1_mask; 111 __u32 use_idlect1 = arm_idlect1_mask;
118 int do_sleep = 0;
119 112
120 local_fiq_disable(); 113 local_fiq_disable();
121 114
122#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER) 115#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER)
123#warning Enable 32kHz OS timer in order to allow sleep states in idle
124 use_idlect1 = use_idlect1 & ~(1 << 9); 116 use_idlect1 = use_idlect1 & ~(1 << 9);
125#else
126 if (enable_dyn_sleep)
127 do_sleep = 1;
128#endif 117#endif
129 118
130#ifdef CONFIG_OMAP_DM_TIMER 119#ifdef CONFIG_OMAP_DM_TIMER
@@ -134,10 +123,12 @@ void omap1_pm_idle(void)
134 if (omap_dma_running()) 123 if (omap_dma_running())
135 use_idlect1 &= ~(1 << 6); 124 use_idlect1 &= ~(1 << 6);
136 125
137 /* We should be able to remove the do_sleep variable and multiple 126 /*
127 * We should be able to remove the do_sleep variable and multiple
138 * tests above as soon as drivers, timer and DMA code have been fixed. 128 * tests above as soon as drivers, timer and DMA code have been fixed.
139 * Even the sleep block count should become obsolete. */ 129 * Even the sleep block count should become obsolete.
140 if ((use_idlect1 != ~0) || !do_sleep) { 130 */
131 if ((use_idlect1 != ~0) || !enable_dyn_sleep) {
141 132
142 __u32 saved_idlect1 = omap_readl(ARM_IDLECT1); 133 __u32 saved_idlect1 = omap_readl(ARM_IDLECT1);
143 if (cpu_is_omap15xx()) 134 if (cpu_is_omap15xx())
@@ -635,15 +626,25 @@ static const struct platform_suspend_ops omap_pm_ops = {
635 626
636static int __init omap_pm_init(void) 627static int __init omap_pm_init(void)
637{ 628{
638 629 int error = 0;
639#ifdef CONFIG_OMAP_32K_TIMER
640 int error;
641#endif
642 630
643 if (!cpu_class_is_omap1()) 631 if (!cpu_class_is_omap1())
644 return -ENODEV; 632 return -ENODEV;
645 633
646 printk("Power Management for TI OMAP.\n"); 634 pr_info("Power Management for TI OMAP.\n");
635
636 if (!IS_ENABLED(CONFIG_OMAP_32K_TIMER))
637 pr_info("OMAP1 PM: sleep states in idle disabled due to no 32KiHz timer\n");
638
639 if (!IS_ENABLED(CONFIG_OMAP_DM_TIMER))
640 pr_info("OMAP1 PM: sleep states in idle disabled due to no DMTIMER support\n");
641
642 if (IS_ENABLED(CONFIG_OMAP_32K_TIMER) &&
643 IS_ENABLED(CONFIG_OMAP_DM_TIMER)) {
644 /* OMAP16xx only */
645 pr_info("OMAP1 PM: sleep states in idle enabled\n");
646 enable_dyn_sleep = 1;
647 }
647 648
648 /* 649 /*
649 * We copy the assembler sleep/wakeup routines to SRAM. 650 * We copy the assembler sleep/wakeup routines to SRAM.
@@ -693,17 +694,15 @@ static int __init omap_pm_init(void)
693 omap_pm_init_debugfs(); 694 omap_pm_init_debugfs();
694#endif 695#endif
695 696
696#ifdef CONFIG_OMAP_32K_TIMER
697 error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr); 697 error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr);
698 if (error) 698 if (error)
699 printk(KERN_ERR "sysfs_create_file failed: %d\n", error); 699 printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
700#endif
701 700
702 if (cpu_is_omap16xx()) { 701 if (cpu_is_omap16xx()) {
703 /* configure LOW_PWR pin */ 702 /* configure LOW_PWR pin */
704 omap_cfg_reg(T20_1610_LOW_PWR); 703 omap_cfg_reg(T20_1610_LOW_PWR);
705 } 704 }
706 705
707 return 0; 706 return error;
708} 707}
709__initcall(omap_pm_init); 708__initcall(omap_pm_init);
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 2b8e47788062..6468f15f060c 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -69,6 +69,7 @@ config SOC_DRA7XX
69 select ARM_GIC 69 select ARM_GIC
70 select HAVE_ARM_ARCH_TIMER 70 select HAVE_ARM_ARCH_TIMER
71 select IRQ_CROSSBAR 71 select IRQ_CROSSBAR
72 select ARM_ERRATA_798181 if SMP
72 73
73config ARCH_OMAP2PLUS 74config ARCH_OMAP2PLUS
74 bool 75 bool
@@ -80,6 +81,7 @@ config ARCH_OMAP2PLUS
80 select GENERIC_IRQ_CHIP 81 select GENERIC_IRQ_CHIP
81 select MACH_OMAP_GENERIC 82 select MACH_OMAP_GENERIC
82 select MEMORY 83 select MEMORY
84 select MFD_SYSCON
83 select OMAP_DM_TIMER 85 select OMAP_DM_TIMER
84 select OMAP_GPMC 86 select OMAP_GPMC
85 select PINCTRL 87 select PINCTRL
@@ -175,12 +177,6 @@ config MACH_OMAP3_BEAGLE
175 default y 177 default y
176 select OMAP_PACKAGE_CBB 178 select OMAP_PACKAGE_CBB
177 179
178config MACH_DEVKIT8000
179 bool "DEVKIT8000 board"
180 depends on ARCH_OMAP3
181 default y
182 select OMAP_PACKAGE_CUS
183
184config MACH_OMAP_LDP 180config MACH_OMAP_LDP
185 bool "OMAP3 LDP board" 181 bool "OMAP3 LDP board"
186 depends on ARCH_OMAP3 182 depends on ARCH_OMAP3
@@ -225,12 +221,6 @@ config MACH_OMAP3_PANDORA
225 select OMAP_PACKAGE_CBB 221 select OMAP_PACKAGE_CBB
226 select REGULATOR_FIXED_VOLTAGE if REGULATOR 222 select REGULATOR_FIXED_VOLTAGE if REGULATOR
227 223
228config MACH_TOUCHBOOK
229 bool "OMAP3 Touch Book"
230 depends on ARCH_OMAP3
231 default y
232 select OMAP_PACKAGE_CBB
233
234config MACH_NOKIA_N810 224config MACH_NOKIA_N810
235 bool 225 bool
236 226
@@ -260,12 +250,6 @@ config MACH_CM_T35
260config MACH_CM_T3730 250config MACH_CM_T3730
261 bool 251 bool
262 252
263config MACH_SBC3530
264 bool "OMAP3 SBC STALKER board"
265 depends on ARCH_OMAP3
266 default y
267 select OMAP_PACKAGE_CUS
268
269config OMAP3_SDRC_AC_TIMING 253config OMAP3_SDRC_AC_TIMING
270 bool "Enable SDRC AC timing register changes" 254 bool "Enable SDRC AC timing register changes"
271 depends on ARCH_OMAP3 255 depends on ARCH_OMAP3
@@ -278,27 +262,6 @@ config OMAP3_SDRC_AC_TIMING
278 wish to say no. Selecting yes without understanding what is 262 wish to say no. Selecting yes without understanding what is
279 going on could result in system crashes; 263 going on could result in system crashes;
280 264
281config OMAP4_ERRATA_I688
282 bool "OMAP4 errata: Async Bridge Corruption"
283 depends on (ARCH_OMAP4 || SOC_OMAP5) && !ARCH_MULTIPLATFORM
284 select ARCH_HAS_BARRIERS
285 help
286 If a data is stalled inside asynchronous bridge because of back
287 pressure, it may be accepted multiple times, creating pointer
288 misalignment that will corrupt next transfers on that data path
289 until next reset of the system (No recovery procedure once the
290 issue is hit, the path remains consistently broken). Async bridge
291 can be found on path between MPU to EMIF and MPU to L3 interconnect.
292 This situation can happen only when the idle is initiated by a
293 Master Request Disconnection (which is trigged by software when
294 executing WFI on CPU).
295 The work-around for this errata needs all the initiators connected
296 through async bridge must ensure that data path is properly drained
297 before issuing WFI. This condition will be met if one Strongly ordered
298 access is performed to the target right before executing the WFI.
299 In MPU case, L3 T2ASYNC FIFO and DDR T2ASYNC FIFO needs to be drained.
300 IO barrier ensure that there is no synchronisation loss on initiators
301 operating on both interconnect port simultaneously.
302endmenu 265endmenu
303 266
304endif 267endif
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index b83f18fcec9b..ec002bd4af77 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -243,7 +243,6 @@ obj-$(CONFIG_SOC_OMAP2420) += msdi.o
243# Specific board support 243# Specific board support
244obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o pdata-quirks.o 244obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o pdata-quirks.o
245obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o 245obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o
246obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o
247obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o 246obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o
248obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o 247obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o
249obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o 248obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o
@@ -254,9 +253,6 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o sdram-nokia.o
254obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o 253obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o
255obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-video.o 254obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-video.o
256obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o 255obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o
257obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o
258
259obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o
260 256
261# Platform specific device init code 257# Platform specific device init code
262 258
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
deleted file mode 100644
index d8e4f346936a..000000000000
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ /dev/null
@@ -1,654 +0,0 @@
1/*
2 * board-devkit8000.c - TimLL Devkit8000
3 *
4 * Copyright (C) 2009 Kim Botherway
5 * Copyright (C) 2010 Thomas Weber
6 *
7 * Modified from mach-omap2/board-omap3beagle.c
8 *
9 * Initial code: Syed Mohammed Khasim
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/delay.h>
20#include <linux/err.h>
21#include <linux/clk.h>
22#include <linux/io.h>
23#include <linux/leds.h>
24#include <linux/gpio.h>
25#include <linux/input.h>
26#include <linux/gpio_keys.h>
27
28#include <linux/mtd/mtd.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/nand.h>
31#include <linux/mmc/host.h>
32#include <linux/usb/phy.h>
33
34#include <linux/regulator/machine.h>
35#include <linux/i2c/twl.h>
36#include "id.h"
37#include <asm/mach-types.h>
38#include <asm/mach/arch.h>
39#include <asm/mach/map.h>
40#include <asm/mach/flash.h>
41
42#include "common.h"
43#include "gpmc.h"
44#include <linux/platform_data/mtd-nand-omap2.h>
45#include <video/omapdss.h>
46#include <video/omap-panel-data.h>
47
48#include <linux/platform_data/spi-omap2-mcspi.h>
49#include <linux/input/matrix_keypad.h>
50#include <linux/spi/spi.h>
51#include <linux/dm9000.h>
52#include <linux/interrupt.h>
53
54#include "sdram-micron-mt46h32m32lf-6.h"
55#include "mux.h"
56#include "hsmmc.h"
57#include "board-flash.h"
58#include "common-board-devices.h"
59
60#define NAND_CS 0
61
62#define OMAP_DM9000_GPIO_IRQ 25
63#define OMAP3_DEVKIT_TS_GPIO 27
64
65static struct mtd_partition devkit8000_nand_partitions[] = {
66 /* All the partition sizes are listed in terms of NAND block size */
67 {
68 .name = "X-Loader",
69 .offset = 0,
70 .size = 4 * NAND_BLOCK_SIZE,
71 .mask_flags = MTD_WRITEABLE, /* force read-only */
72 },
73 {
74 .name = "U-Boot",
75 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
76 .size = 15 * NAND_BLOCK_SIZE,
77 .mask_flags = MTD_WRITEABLE, /* force read-only */
78 },
79 {
80 .name = "U-Boot Env",
81 .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
82 .size = 1 * NAND_BLOCK_SIZE,
83 },
84 {
85 .name = "Kernel",
86 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
87 .size = 32 * NAND_BLOCK_SIZE,
88 },
89 {
90 .name = "File System",
91 .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
92 .size = MTDPART_SIZ_FULL,
93 },
94};
95
96static struct omap2_hsmmc_info mmc[] = {
97 {
98 .mmc = 1,
99 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
100 .gpio_wp = 29,
101 .deferred = true,
102 },
103 {} /* Terminator */
104};
105
106static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
107 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
108};
109
110/* ads7846 on SPI */
111static struct regulator_consumer_supply devkit8000_vio_supply[] = {
112 REGULATOR_SUPPLY("vcc", "spi2.0"),
113};
114
115static const struct display_timing devkit8000_lcd_videomode = {
116 .pixelclock = { 0, 40000000, 0 },
117
118 .hactive = { 0, 800, 0 },
119 .hfront_porch = { 0, 1, 0 },
120 .hback_porch = { 0, 1, 0 },
121 .hsync_len = { 0, 48, 0 },
122
123 .vactive = { 0, 480, 0 },
124 .vfront_porch = { 0, 12, 0 },
125 .vback_porch = { 0, 25, 0 },
126 .vsync_len = { 0, 3, 0 },
127
128 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
129 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
130};
131
132static struct panel_dpi_platform_data devkit8000_lcd_pdata = {
133 .name = "lcd",
134 .source = "dpi.0",
135
136 .data_lines = 24,
137
138 .display_timing = &devkit8000_lcd_videomode,
139
140 .enable_gpio = -1, /* filled in code */
141 .backlight_gpio = -1,
142};
143
144static struct platform_device devkit8000_lcd_device = {
145 .name = "panel-dpi",
146 .id = 0,
147 .dev.platform_data = &devkit8000_lcd_pdata,
148};
149
150static struct connector_dvi_platform_data devkit8000_dvi_connector_pdata = {
151 .name = "dvi",
152 .source = "tfp410.0",
153 .i2c_bus_num = 1,
154};
155
156static struct platform_device devkit8000_dvi_connector_device = {
157 .name = "connector-dvi",
158 .id = 0,
159 .dev.platform_data = &devkit8000_dvi_connector_pdata,
160};
161
162static struct encoder_tfp410_platform_data devkit8000_tfp410_pdata = {
163 .name = "tfp410.0",
164 .source = "dpi.0",
165 .data_lines = 24,
166 .power_down_gpio = -1, /* filled in code */
167};
168
169static struct platform_device devkit8000_tfp410_device = {
170 .name = "tfp410",
171 .id = 0,
172 .dev.platform_data = &devkit8000_tfp410_pdata,
173};
174
175static struct connector_atv_platform_data devkit8000_tv_pdata = {
176 .name = "tv",
177 .source = "venc.0",
178 .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
179 .invert_polarity = false,
180};
181
182static struct platform_device devkit8000_tv_connector_device = {
183 .name = "connector-analog-tv",
184 .id = 0,
185 .dev.platform_data = &devkit8000_tv_pdata,
186};
187
188static struct omap_dss_board_info devkit8000_dss_data = {
189 .default_display_name = "lcd",
190};
191
192static uint32_t board_keymap[] = {
193 KEY(0, 0, KEY_1),
194 KEY(1, 0, KEY_2),
195 KEY(2, 0, KEY_3),
196 KEY(0, 1, KEY_4),
197 KEY(1, 1, KEY_5),
198 KEY(2, 1, KEY_6),
199 KEY(3, 1, KEY_F5),
200 KEY(0, 2, KEY_7),
201 KEY(1, 2, KEY_8),
202 KEY(2, 2, KEY_9),
203 KEY(3, 2, KEY_F6),
204 KEY(0, 3, KEY_F7),
205 KEY(1, 3, KEY_0),
206 KEY(2, 3, KEY_F8),
207 PERSISTENT_KEY(4, 5),
208 KEY(4, 4, KEY_VOLUMEUP),
209 KEY(5, 5, KEY_VOLUMEDOWN),
210 0
211};
212
213static struct matrix_keymap_data board_map_data = {
214 .keymap = board_keymap,
215 .keymap_size = ARRAY_SIZE(board_keymap),
216};
217
218static struct twl4030_keypad_data devkit8000_kp_data = {
219 .keymap_data = &board_map_data,
220 .rows = 6,
221 .cols = 6,
222 .rep = 1,
223};
224
225static struct gpio_led gpio_leds[];
226
227static int devkit8000_twl_gpio_setup(struct device *dev,
228 unsigned gpio, unsigned ngpio)
229{
230 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
231 mmc[0].gpio_cd = gpio + 0;
232 omap_hsmmc_late_init(mmc);
233
234 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
235 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
236
237 /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
238 devkit8000_lcd_pdata.enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
239
240 /* gpio + 7 is "DVI_PD" (out, active low) */
241 devkit8000_tfp410_pdata.power_down_gpio = gpio + 7;
242
243 return 0;
244}
245
246static struct twl4030_gpio_platform_data devkit8000_gpio_data = {
247 .use_leds = true,
248 .pulldowns = BIT(1) | BIT(2) | BIT(6) | BIT(8) | BIT(13)
249 | BIT(15) | BIT(16) | BIT(17),
250 .setup = devkit8000_twl_gpio_setup,
251};
252
253static struct regulator_consumer_supply devkit8000_vpll1_supplies[] = {
254 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
255 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dpi.0"),
256 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi.0"),
257};
258
259/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
260static struct regulator_init_data devkit8000_vmmc1 = {
261 .constraints = {
262 .min_uV = 1850000,
263 .max_uV = 3150000,
264 .valid_modes_mask = REGULATOR_MODE_NORMAL
265 | REGULATOR_MODE_STANDBY,
266 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
267 | REGULATOR_CHANGE_MODE
268 | REGULATOR_CHANGE_STATUS,
269 },
270 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply),
271 .consumer_supplies = devkit8000_vmmc1_supply,
272};
273
274/* VPLL1 for digital video outputs */
275static struct regulator_init_data devkit8000_vpll1 = {
276 .constraints = {
277 .min_uV = 1800000,
278 .max_uV = 1800000,
279 .valid_modes_mask = REGULATOR_MODE_NORMAL
280 | REGULATOR_MODE_STANDBY,
281 .valid_ops_mask = REGULATOR_CHANGE_MODE
282 | REGULATOR_CHANGE_STATUS,
283 },
284 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vpll1_supplies),
285 .consumer_supplies = devkit8000_vpll1_supplies,
286};
287
288/* VAUX4 for ads7846 and nubs */
289static struct regulator_init_data devkit8000_vio = {
290 .constraints = {
291 .min_uV = 1800000,
292 .max_uV = 1800000,
293 .apply_uV = true,
294 .valid_modes_mask = REGULATOR_MODE_NORMAL
295 | REGULATOR_MODE_STANDBY,
296 .valid_ops_mask = REGULATOR_CHANGE_MODE
297 | REGULATOR_CHANGE_STATUS,
298 },
299 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply),
300 .consumer_supplies = devkit8000_vio_supply,
301};
302
303static struct twl4030_platform_data devkit8000_twldata = {
304 /* platform_data for children goes here */
305 .gpio = &devkit8000_gpio_data,
306 .vmmc1 = &devkit8000_vmmc1,
307 .vpll1 = &devkit8000_vpll1,
308 .vio = &devkit8000_vio,
309 .keypad = &devkit8000_kp_data,
310};
311
312static int __init devkit8000_i2c_init(void)
313{
314 omap3_pmic_get_config(&devkit8000_twldata,
315 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
316 TWL_COMMON_REGULATOR_VDAC);
317 omap3_pmic_init("tps65930", &devkit8000_twldata);
318 /* Bus 3 is attached to the DVI port where devices like the pico DLP
319 * projector don't work reliably with 400kHz */
320 omap_register_i2c_bus(3, 400, NULL, 0);
321 return 0;
322}
323
324static struct gpio_led gpio_leds[] = {
325 {
326 .name = "led1",
327 .default_trigger = "heartbeat",
328 .gpio = 186,
329 .active_low = true,
330 },
331 {
332 .name = "led2",
333 .default_trigger = "mmc0",
334 .gpio = 163,
335 .active_low = true,
336 },
337 {
338 .name = "ledB",
339 .default_trigger = "none",
340 .gpio = 153,
341 .active_low = true,
342 },
343 {
344 .name = "led3",
345 .default_trigger = "none",
346 .gpio = 164,
347 .active_low = true,
348 },
349};
350
351static struct gpio_led_platform_data gpio_led_info = {
352 .leds = gpio_leds,
353 .num_leds = ARRAY_SIZE(gpio_leds),
354};
355
356static struct platform_device leds_gpio = {
357 .name = "leds-gpio",
358 .id = -1,
359 .dev = {
360 .platform_data = &gpio_led_info,
361 },
362};
363
364static struct gpio_keys_button gpio_buttons[] = {
365 {
366 .code = BTN_EXTRA,
367 .gpio = 26,
368 .desc = "user",
369 .wakeup = 1,
370 },
371};
372
373static struct gpio_keys_platform_data gpio_key_info = {
374 .buttons = gpio_buttons,
375 .nbuttons = ARRAY_SIZE(gpio_buttons),
376};
377
378static struct platform_device keys_gpio = {
379 .name = "gpio-keys",
380 .id = -1,
381 .dev = {
382 .platform_data = &gpio_key_info,
383 },
384};
385
386#define OMAP_DM9000_BASE 0x2c000000
387
388static struct resource omap_dm9000_resources[] = {
389 [0] = {
390 .start = OMAP_DM9000_BASE,
391 .end = (OMAP_DM9000_BASE + 0x4 - 1),
392 .flags = IORESOURCE_MEM,
393 },
394 [1] = {
395 .start = (OMAP_DM9000_BASE + 0x400),
396 .end = (OMAP_DM9000_BASE + 0x400 + 0x4 - 1),
397 .flags = IORESOURCE_MEM,
398 },
399 [2] = {
400 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
401 },
402};
403
404static struct dm9000_plat_data omap_dm9000_platdata = {
405 .flags = DM9000_PLATF_16BITONLY,
406};
407
408static struct platform_device omap_dm9000_dev = {
409 .name = "dm9000",
410 .id = -1,
411 .num_resources = ARRAY_SIZE(omap_dm9000_resources),
412 .resource = omap_dm9000_resources,
413 .dev = {
414 .platform_data = &omap_dm9000_platdata,
415 },
416};
417
418static void __init omap_dm9000_init(void)
419{
420 unsigned char *eth_addr = omap_dm9000_platdata.dev_addr;
421 struct omap_die_id odi;
422 int ret;
423
424 ret = gpio_request_one(OMAP_DM9000_GPIO_IRQ, GPIOF_IN, "dm9000 irq");
425 if (ret < 0) {
426 printk(KERN_ERR "Failed to request GPIO%d for dm9000 IRQ\n",
427 OMAP_DM9000_GPIO_IRQ);
428 return;
429 }
430
431 /* init the mac address using DIE id */
432 omap_get_die_id(&odi);
433
434 eth_addr[0] = 0x02; /* locally administered */
435 eth_addr[1] = odi.id_1 & 0xff;
436 eth_addr[2] = (odi.id_0 & 0xff000000) >> 24;
437 eth_addr[3] = (odi.id_0 & 0x00ff0000) >> 16;
438 eth_addr[4] = (odi.id_0 & 0x0000ff00) >> 8;
439 eth_addr[5] = (odi.id_0 & 0x000000ff);
440}
441
442static struct platform_device *devkit8000_devices[] __initdata = {
443 &leds_gpio,
444 &keys_gpio,
445 &omap_dm9000_dev,
446 &devkit8000_lcd_device,
447 &devkit8000_tfp410_device,
448 &devkit8000_dvi_connector_device,
449 &devkit8000_tv_connector_device,
450};
451
452static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
453 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
454};
455
456#ifdef CONFIG_OMAP_MUX
457static struct omap_board_mux board_mux[] __initdata = {
458 /* nCS and IRQ for Devkit8000 ethernet */
459 OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE0),
460 OMAP3_MUX(ETK_D11, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
461
462 /* McSPI 2*/
463 OMAP3_MUX(MCSPI2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
464 OMAP3_MUX(MCSPI2_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
465 OMAP3_MUX(MCSPI2_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
466 OMAP3_MUX(MCSPI2_CS0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
467 OMAP3_MUX(MCSPI2_CS1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
468
469 /* PENDOWN GPIO */
470 OMAP3_MUX(ETK_D13, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
471
472 /* mUSB */
473 OMAP3_MUX(HSUSB0_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
474 OMAP3_MUX(HSUSB0_STP, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
475 OMAP3_MUX(HSUSB0_DIR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
476 OMAP3_MUX(HSUSB0_NXT, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
477 OMAP3_MUX(HSUSB0_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
478 OMAP3_MUX(HSUSB0_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
479 OMAP3_MUX(HSUSB0_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
480 OMAP3_MUX(HSUSB0_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
481 OMAP3_MUX(HSUSB0_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
482 OMAP3_MUX(HSUSB0_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
483 OMAP3_MUX(HSUSB0_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
484 OMAP3_MUX(HSUSB0_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
485
486 /* USB 1 */
487 OMAP3_MUX(ETK_CTL, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
488 OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
489 OMAP3_MUX(ETK_D8, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
490 OMAP3_MUX(ETK_D9, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
491 OMAP3_MUX(ETK_D0, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
492 OMAP3_MUX(ETK_D1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
493 OMAP3_MUX(ETK_D2, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
494 OMAP3_MUX(ETK_D3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
495 OMAP3_MUX(ETK_D4, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
496 OMAP3_MUX(ETK_D5, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
497 OMAP3_MUX(ETK_D6, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
498 OMAP3_MUX(ETK_D7, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
499
500 /* MMC 1 */
501 OMAP3_MUX(SDMMC1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
502 OMAP3_MUX(SDMMC1_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
503 OMAP3_MUX(SDMMC1_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
504 OMAP3_MUX(SDMMC1_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
505 OMAP3_MUX(SDMMC1_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
506 OMAP3_MUX(SDMMC1_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
507 OMAP3_MUX(SDMMC1_DAT4, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
508 OMAP3_MUX(SDMMC1_DAT5, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
509 OMAP3_MUX(SDMMC1_DAT6, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
510 OMAP3_MUX(SDMMC1_DAT7, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
511
512 /* McBSP 2 */
513 OMAP3_MUX(MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
514 OMAP3_MUX(MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
515 OMAP3_MUX(MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
516 OMAP3_MUX(MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
517
518 /* I2C 1 */
519 OMAP3_MUX(I2C1_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
520 OMAP3_MUX(I2C1_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
521
522 /* I2C 2 */
523 OMAP3_MUX(I2C2_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
524 OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
525
526 /* I2C 3 */
527 OMAP3_MUX(I2C3_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
528 OMAP3_MUX(I2C3_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
529
530 /* I2C 4 */
531 OMAP3_MUX(I2C4_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
532 OMAP3_MUX(I2C4_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
533
534 /* serial ports */
535 OMAP3_MUX(MCBSP3_CLKX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
536 OMAP3_MUX(MCBSP3_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
537 OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
538 OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
539
540 /* DSS */
541 OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
542 OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
543 OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
544 OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
545 OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
546 OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
547 OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
548 OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
549 OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
550 OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
551 OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
552 OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
553 OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
554 OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
555 OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
556 OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
557 OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
558 OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
559 OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
560 OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
561 OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
562 OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
563 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
564 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
565 OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
566 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
567 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
568 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
569
570 /* expansion port */
571 /* McSPI 1 */
572 OMAP3_MUX(MCSPI1_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
573 OMAP3_MUX(MCSPI1_SIMO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
574 OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
575 OMAP3_MUX(MCSPI1_CS0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
576 OMAP3_MUX(MCSPI1_CS3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
577
578 /* HDQ */
579 OMAP3_MUX(HDQ_SIO, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
580
581 /* McSPI4 */
582 OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
583 OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
584 OMAP3_MUX(MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
585 OMAP3_MUX(MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_INPUT_PULLUP),
586
587 /* MMC 2 */
588 OMAP3_MUX(SDMMC2_DAT4, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
589 OMAP3_MUX(SDMMC2_DAT5, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
590 OMAP3_MUX(SDMMC2_DAT6, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
591 OMAP3_MUX(SDMMC2_DAT7, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
592
593 /* I2C3 */
594 OMAP3_MUX(I2C3_SCL, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
595 OMAP3_MUX(I2C3_SDA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
596
597 OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
598 OMAP3_MUX(MCBSP_CLKS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
599 OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
600
601 OMAP3_MUX(GPMC_NCS7, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
602 OMAP3_MUX(GPMC_NCS3, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
603
604 /* TPS IRQ */
605 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_WAKEUP_EN | \
606 OMAP_PIN_INPUT_PULLUP),
607
608 { .reg_offset = OMAP_MUX_TERMINATOR },
609};
610#endif
611
612static void __init devkit8000_init(void)
613{
614 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
615 omap_serial_init();
616 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
617 mt46h32m32lf6_sdrc_params);
618
619 omap_dm9000_init();
620
621 omap_hsmmc_init(mmc);
622 devkit8000_i2c_init();
623 omap_dm9000_resources[2].start = gpio_to_irq(OMAP_DM9000_GPIO_IRQ);
624 platform_add_devices(devkit8000_devices,
625 ARRAY_SIZE(devkit8000_devices));
626
627 omap_display_init(&devkit8000_dss_data);
628
629 omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
630
631 usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
632 usb_musb_init(NULL);
633 usbhs_init(&usbhs_bdata);
634 board_nand_init(devkit8000_nand_partitions,
635 ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS,
636 NAND_BUSWIDTH_16, NULL);
637 omap_twl4030_audio_init("omap3beagle", NULL);
638
639 /* Ensure SDRC pins are mux'd for self-refresh */
640 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
641 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
642}
643
644MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
645 .atag_offset = 0x100,
646 .reserve = omap_reserve,
647 .map_io = omap3_map_io,
648 .init_early = omap35xx_init_early,
649 .init_irq = omap3_init_irq,
650 .init_machine = devkit8000_init,
651 .init_late = omap35xx_init_late,
652 .init_time = omap3_secure_sync32k_timer_init,
653 .restart = omap3xxx_restart,
654MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
deleted file mode 100644
index 6311f4b1ee44..000000000000
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ /dev/null
@@ -1,433 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/board-omap3evm.c
3 *
4 * Copyright (C) 2008 Guangzhou EMA-Tech
5 *
6 * Modified from mach-omap2/board-omap3evm.c
7 *
8 * Initial code: Syed Mohammed Khasim
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/delay.h>
19#include <linux/err.h>
20#include <linux/clk.h>
21#include <linux/io.h>
22#include <linux/leds.h>
23#include <linux/gpio.h>
24#include <linux/input.h>
25#include <linux/gpio_keys.h>
26
27#include <linux/regulator/fixed.h>
28#include <linux/regulator/machine.h>
29#include <linux/i2c/twl.h>
30#include <linux/mmc/host.h>
31#include <linux/input/matrix_keypad.h>
32#include <linux/spi/spi.h>
33#include <linux/interrupt.h>
34#include <linux/smsc911x.h>
35#include <linux/platform_data/at24.h>
36#include <linux/usb/phy.h>
37
38#include <asm/mach-types.h>
39#include <asm/mach/arch.h>
40#include <asm/mach/map.h>
41#include <asm/mach/flash.h>
42
43#include "common.h"
44#include "gpmc.h"
45#include <linux/platform_data/mtd-nand-omap2.h>
46#include <video/omapdss.h>
47#include <video/omap-panel-data.h>
48
49#include <linux/platform_data/spi-omap2-mcspi.h>
50
51#include "sdram-micron-mt46h32m32lf-6.h"
52#include "mux.h"
53#include "hsmmc.h"
54#include "common-board-devices.h"
55
56#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
57#include "gpmc-smsc911x.h"
58
59#define OMAP3STALKER_ETHR_START 0x2c000000
60#define OMAP3STALKER_ETHR_SIZE 1024
61#define OMAP3STALKER_ETHR_GPIO_IRQ 19
62#define OMAP3STALKER_SMC911X_CS 5
63
64static struct omap_smsc911x_platform_data smsc911x_cfg = {
65 .cs = OMAP3STALKER_SMC911X_CS,
66 .gpio_irq = OMAP3STALKER_ETHR_GPIO_IRQ,
67 .gpio_reset = -EINVAL,
68 .flags = (SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS),
69};
70
71static inline void __init omap3stalker_init_eth(void)
72{
73 omap_mux_init_gpio(19, OMAP_PIN_INPUT_PULLUP);
74 gpmc_smsc911x_init(&smsc911x_cfg);
75}
76
77#else
78static inline void __init omap3stalker_init_eth(void)
79{
80 return;
81}
82#endif
83
84/*
85 * OMAP3 DSS control signals
86 */
87
88#define DSS_ENABLE_GPIO 199
89#define LCD_PANEL_BKLIGHT_GPIO 210
90#define ENABLE_VPLL2_DEV_GRP 0xE0
91
92static void __init omap3_stalker_display_init(void)
93{
94 return;
95}
96static struct connector_dvi_platform_data omap3stalker_dvi_connector_pdata = {
97 .name = "dvi",
98 .source = "tfp410.0",
99 .i2c_bus_num = -1,
100};
101
102static struct platform_device omap3stalker_dvi_connector_device = {
103 .name = "connector-dvi",
104 .id = 0,
105 .dev.platform_data = &omap3stalker_dvi_connector_pdata,
106};
107
108static struct encoder_tfp410_platform_data omap3stalker_tfp410_pdata = {
109 .name = "tfp410.0",
110 .source = "dpi.0",
111 .data_lines = 24,
112 .power_down_gpio = DSS_ENABLE_GPIO,
113};
114
115static struct platform_device omap3stalker_tfp410_device = {
116 .name = "tfp410",
117 .id = 0,
118 .dev.platform_data = &omap3stalker_tfp410_pdata,
119};
120
121static struct connector_atv_platform_data omap3stalker_tv_pdata = {
122 .name = "tv",
123 .source = "venc.0",
124 .connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
125 .invert_polarity = false,
126};
127
128static struct platform_device omap3stalker_tv_connector_device = {
129 .name = "connector-analog-tv",
130 .id = 0,
131 .dev.platform_data = &omap3stalker_tv_pdata,
132};
133
134static struct omap_dss_board_info omap3_stalker_dss_data = {
135 .default_display_name = "dvi",
136};
137
138static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
139 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
140};
141
142static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
143 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
144};
145
146/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
147static struct regulator_init_data omap3stalker_vmmc1 = {
148 .constraints = {
149 .min_uV = 1850000,
150 .max_uV = 3150000,
151 .valid_modes_mask = REGULATOR_MODE_NORMAL
152 | REGULATOR_MODE_STANDBY,
153 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
154 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
155 },
156 .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply),
157 .consumer_supplies = omap3stalker_vmmc1_supply,
158};
159
160/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
161static struct regulator_init_data omap3stalker_vsim = {
162 .constraints = {
163 .min_uV = 1800000,
164 .max_uV = 3000000,
165 .valid_modes_mask = REGULATOR_MODE_NORMAL
166 | REGULATOR_MODE_STANDBY,
167 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
168 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
169 },
170 .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply),
171 .consumer_supplies = omap3stalker_vsim_supply,
172};
173
174static struct omap2_hsmmc_info mmc[] = {
175 {
176 .mmc = 1,
177 .caps = MMC_CAP_4_BIT_DATA,
178 .gpio_cd = -EINVAL,
179 .gpio_wp = 23,
180 .deferred = true,
181 },
182 {} /* Terminator */
183};
184
185static struct gpio_keys_button gpio_buttons[] = {
186 {
187 .code = BTN_EXTRA,
188 .gpio = 18,
189 .desc = "user",
190 .wakeup = 1,
191 },
192};
193
194static struct gpio_keys_platform_data gpio_key_info = {
195 .buttons = gpio_buttons,
196 .nbuttons = ARRAY_SIZE(gpio_buttons),
197};
198
199static struct platform_device keys_gpio = {
200 .name = "gpio-keys",
201 .id = -1,
202 .dev = {
203 .platform_data = &gpio_key_info,
204 },
205};
206
207static struct gpio_led gpio_leds[] = {
208 {
209 .name = "stalker:D8:usr0",
210 .default_trigger = "default-on",
211 .gpio = 126,
212 },
213 {
214 .name = "stalker:D9:usr1",
215 .default_trigger = "default-on",
216 .gpio = 127,
217 },
218 {
219 .name = "stalker:D3:mmc0",
220 .gpio = -EINVAL, /* gets replaced */
221 .active_low = true,
222 .default_trigger = "mmc0",
223 },
224 {
225 .name = "stalker:D4:heartbeat",
226 .gpio = -EINVAL, /* gets replaced */
227 .active_low = true,
228 .default_trigger = "heartbeat",
229 },
230};
231
232static struct gpio_led_platform_data gpio_led_info = {
233 .leds = gpio_leds,
234 .num_leds = ARRAY_SIZE(gpio_leds),
235};
236
237static struct platform_device leds_gpio = {
238 .name = "leds-gpio",
239 .id = -1,
240 .dev = {
241 .platform_data = &gpio_led_info,
242 },
243};
244
245static int
246omap3stalker_twl_gpio_setup(struct device *dev,
247 unsigned gpio, unsigned ngpio)
248{
249 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
250 mmc[0].gpio_cd = gpio + 0;
251 omap_hsmmc_late_init(mmc);
252
253 /*
254 * Most GPIOs are for USB OTG. Some are mostly sent to
255 * the P2 connector; notably LEDA for the LCD backlight.
256 */
257
258 /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
259 gpio_request_one(gpio + TWL4030_GPIO_MAX, GPIOF_OUT_INIT_LOW,
260 "EN_LCD_BKL");
261
262 /* gpio + 7 == DVI Enable */
263 gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI");
264
265 /* TWL4030_GPIO_MAX + 1 == ledB (out, mmc0) */
266 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
267 /* GPIO + 13 == ledsync (out, heartbeat) */
268 gpio_leds[3].gpio = gpio + 13;
269
270 platform_device_register(&leds_gpio);
271 return 0;
272}
273
274static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
275 .use_leds = true,
276 .setup = omap3stalker_twl_gpio_setup,
277};
278
279static uint32_t board_keymap[] = {
280 KEY(0, 0, KEY_LEFT),
281 KEY(0, 1, KEY_DOWN),
282 KEY(0, 2, KEY_ENTER),
283 KEY(0, 3, KEY_M),
284
285 KEY(1, 0, KEY_RIGHT),
286 KEY(1, 1, KEY_UP),
287 KEY(1, 2, KEY_I),
288 KEY(1, 3, KEY_N),
289
290 KEY(2, 0, KEY_A),
291 KEY(2, 1, KEY_E),
292 KEY(2, 2, KEY_J),
293 KEY(2, 3, KEY_O),
294
295 KEY(3, 0, KEY_B),
296 KEY(3, 1, KEY_F),
297 KEY(3, 2, KEY_K),
298 KEY(3, 3, KEY_P)
299};
300
301static struct matrix_keymap_data board_map_data = {
302 .keymap = board_keymap,
303 .keymap_size = ARRAY_SIZE(board_keymap),
304};
305
306static struct twl4030_keypad_data omap3stalker_kp_data = {
307 .keymap_data = &board_map_data,
308 .rows = 4,
309 .cols = 4,
310 .rep = 1,
311};
312
313static struct twl4030_platform_data omap3stalker_twldata = {
314 /* platform_data for children goes here */
315 .keypad = &omap3stalker_kp_data,
316 .gpio = &omap3stalker_gpio_data,
317 .vmmc1 = &omap3stalker_vmmc1,
318 .vsim = &omap3stalker_vsim,
319};
320
321static struct at24_platform_data fram_info = {
322 .byte_len = (64 * 1024) / 8,
323 .page_size = 8192,
324 .flags = AT24_FLAG_ADDR16 | AT24_FLAG_IRUGO,
325};
326
327static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
328 {
329 I2C_BOARD_INFO("24c64", 0x50),
330 .flags = I2C_CLIENT_WAKE,
331 .platform_data = &fram_info,
332 },
333};
334
335static int __init omap3_stalker_i2c_init(void)
336{
337 omap3_pmic_get_config(&omap3stalker_twldata,
338 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
339 TWL_COMMON_PDATA_AUDIO,
340 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
341
342 omap3stalker_twldata.vdac->constraints.apply_uV = true;
343 omap3stalker_twldata.vpll2->constraints.apply_uV = true;
344 omap3stalker_twldata.vpll2->constraints.name = "VDVI";
345
346 omap3_pmic_init("twl4030", &omap3stalker_twldata);
347 omap_register_i2c_bus(2, 400, NULL, 0);
348 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
349 ARRAY_SIZE(omap3stalker_i2c_boardinfo3));
350 return 0;
351}
352
353#define OMAP3_STALKER_TS_GPIO 175
354
355static struct usbhs_phy_data phy_data[] __initdata = {
356 {
357 .port = 2,
358 .reset_gpio = 21,
359 .vcc_gpio = -EINVAL,
360 },
361};
362
363static struct platform_device *omap3_stalker_devices[] __initdata = {
364 &keys_gpio,
365 &omap3stalker_tfp410_device,
366 &omap3stalker_dvi_connector_device,
367 &omap3stalker_tv_connector_device,
368};
369
370static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
371 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
372};
373
374#ifdef CONFIG_OMAP_MUX
375static struct omap_board_mux board_mux[] __initdata = {
376 OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
377 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
378 OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
379 OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
380 {.reg_offset = OMAP_MUX_TERMINATOR},
381};
382#endif
383
384static struct regulator_consumer_supply dummy_supplies[] = {
385 REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
386 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
387};
388
389static void __init omap3_stalker_init(void)
390{
391 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
392 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
393
394 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
395 omap_hsmmc_init(mmc);
396
397 omap3_stalker_i2c_init();
398
399 platform_add_devices(omap3_stalker_devices,
400 ARRAY_SIZE(omap3_stalker_devices));
401
402 omap_display_init(&omap3_stalker_dss_data);
403
404 omap_serial_init();
405 omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
406 usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
407 usb_musb_init(NULL);
408
409 usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
410 usbhs_init(&usbhs_bdata);
411 omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
412
413 omap_mux_init_gpio(21, OMAP_PIN_OUTPUT);
414 omap_mux_init_gpio(18, OMAP_PIN_INPUT_PULLUP);
415
416 omap3stalker_init_eth();
417 omap3_stalker_display_init();
418/* Ensure SDRC pins are mux'd for self-refresh */
419 omap_mux_init_signal("sdr_cke0", OMAP_PIN_OUTPUT);
420 omap_mux_init_signal("sdr_cke1", OMAP_PIN_OUTPUT);
421}
422
423MACHINE_START(SBC3530, "OMAP3 STALKER")
424 /* Maintainer: Jason Lam -lzg@ema-tech.com */
425 .atag_offset = 0x100,
426 .map_io = omap3_map_io,
427 .init_early = omap35xx_init_early,
428 .init_irq = omap3_init_irq,
429 .init_machine = omap3_stalker_init,
430 .init_late = omap35xx_init_late,
431 .init_time = omap3_secure_sync32k_timer_init,
432 .restart = omap3xxx_restart,
433MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
deleted file mode 100644
index a01993e5500f..000000000000
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ /dev/null
@@ -1,395 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/board-omap3touchbook.c
3 *
4 * Copyright (C) 2009 Always Innovating
5 *
6 * Modified from mach-omap2/board-omap3beagleboard.c
7 *
8 * Initial code: Grégoire Gentil, Tim Yamin
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/platform_device.h>
18#include <linux/delay.h>
19#include <linux/err.h>
20#include <linux/clk.h>
21#include <linux/io.h>
22#include <linux/leds.h>
23#include <linux/gpio.h>
24#include <linux/input.h>
25#include <linux/gpio_keys.h>
26
27#include <linux/mtd/mtd.h>
28#include <linux/mtd/partitions.h>
29#include <linux/mtd/nand.h>
30#include <linux/mmc/host.h>
31#include <linux/usb/phy.h>
32
33#include <linux/platform_data/spi-omap2-mcspi.h>
34#include <linux/spi/spi.h>
35
36#include <linux/spi/ads7846.h>
37
38#include <linux/regulator/machine.h>
39#include <linux/i2c/twl.h>
40
41#include <asm/mach-types.h>
42#include <asm/mach/arch.h>
43#include <asm/mach/map.h>
44#include <asm/mach/flash.h>
45#include <asm/system_info.h>
46
47#include "common.h"
48#include "gpmc.h"
49#include <linux/platform_data/mtd-nand-omap2.h>
50
51#include "mux.h"
52#include "hsmmc.h"
53#include "board-flash.h"
54#include "common-board-devices.h"
55
56#include <asm/setup.h>
57
58#define OMAP3_AC_GPIO 136
59#define OMAP3_TS_GPIO 162
60#define TB_BL_PWM_TIMER 9
61#define TB_KILL_POWER_GPIO 168
62
63#define NAND_CS 0
64
65static unsigned long touchbook_revision;
66
67static struct mtd_partition omap3touchbook_nand_partitions[] = {
68 /* All the partition sizes are listed in terms of NAND block size */
69 {
70 .name = "X-Loader",
71 .offset = 0,
72 .size = 4 * NAND_BLOCK_SIZE,
73 .mask_flags = MTD_WRITEABLE, /* force read-only */
74 },
75 {
76 .name = "U-Boot",
77 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
78 .size = 15 * NAND_BLOCK_SIZE,
79 .mask_flags = MTD_WRITEABLE, /* force read-only */
80 },
81 {
82 .name = "U-Boot Env",
83 .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
84 .size = 1 * NAND_BLOCK_SIZE,
85 },
86 {
87 .name = "Kernel",
88 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
89 .size = 32 * NAND_BLOCK_SIZE,
90 },
91 {
92 .name = "File System",
93 .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
94 .size = MTDPART_SIZ_FULL,
95 },
96};
97
98#include "sdram-micron-mt46h32m32lf-6.h"
99
100static struct omap2_hsmmc_info mmc[] = {
101 {
102 .mmc = 1,
103 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
104 .gpio_wp = 29,
105 .deferred = true,
106 },
107 {} /* Terminator */
108};
109
110static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
111 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
112};
113
114static struct regulator_consumer_supply touchbook_vsim_supply[] = {
115 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
116};
117
118static struct gpio_led gpio_leds[];
119
120static int touchbook_twl_gpio_setup(struct device *dev,
121 unsigned gpio, unsigned ngpio)
122{
123 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
124 mmc[0].gpio_cd = gpio + 0;
125 omap_hsmmc_late_init(mmc);
126
127 /* REVISIT: need ehci-omap hooks for external VBUS
128 * power switch and overcurrent detect
129 */
130 gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC");
131
132 /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
133 gpio_request_one(gpio + TWL4030_GPIO_MAX, GPIOF_OUT_INIT_LOW,
134 "nEN_USB_PWR");
135
136 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
137 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
138
139 return 0;
140}
141
142static struct twl4030_gpio_platform_data touchbook_gpio_data = {
143 .use_leds = true,
144 .pullups = BIT(1),
145 .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13)
146 | BIT(15) | BIT(16) | BIT(17),
147 .setup = touchbook_twl_gpio_setup,
148};
149
150static struct regulator_consumer_supply touchbook_vdac_supply[] = {
151{
152 .supply = "vdac",
153},
154};
155
156static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
157{
158 .supply = "vdvi",
159},
160};
161
162/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
163static struct regulator_init_data touchbook_vmmc1 = {
164 .constraints = {
165 .min_uV = 1850000,
166 .max_uV = 3150000,
167 .valid_modes_mask = REGULATOR_MODE_NORMAL
168 | REGULATOR_MODE_STANDBY,
169 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
170 | REGULATOR_CHANGE_MODE
171 | REGULATOR_CHANGE_STATUS,
172 },
173 .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply),
174 .consumer_supplies = touchbook_vmmc1_supply,
175};
176
177/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
178static struct regulator_init_data touchbook_vsim = {
179 .constraints = {
180 .min_uV = 1800000,
181 .max_uV = 3000000,
182 .valid_modes_mask = REGULATOR_MODE_NORMAL
183 | REGULATOR_MODE_STANDBY,
184 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
185 | REGULATOR_CHANGE_MODE
186 | REGULATOR_CHANGE_STATUS,
187 },
188 .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply),
189 .consumer_supplies = touchbook_vsim_supply,
190};
191
192static struct twl4030_platform_data touchbook_twldata = {
193 /* platform_data for children goes here */
194 .gpio = &touchbook_gpio_data,
195 .vmmc1 = &touchbook_vmmc1,
196 .vsim = &touchbook_vsim,
197};
198
199static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
200 {
201 I2C_BOARD_INFO("bq27200", 0x55),
202 },
203};
204
205static int __init omap3_touchbook_i2c_init(void)
206{
207 /* Standard TouchBook bus */
208 omap3_pmic_get_config(&touchbook_twldata,
209 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
210 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
211
212 touchbook_twldata.vdac->num_consumer_supplies =
213 ARRAY_SIZE(touchbook_vdac_supply);
214 touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
215
216 touchbook_twldata.vpll2->constraints.name = "VDVI";
217 touchbook_twldata.vpll2->num_consumer_supplies =
218 ARRAY_SIZE(touchbook_vdvi_supply);
219 touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
220
221 omap3_pmic_init("twl4030", &touchbook_twldata);
222 /* Additional TouchBook bus */
223 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
224 ARRAY_SIZE(touchBook_i2c_boardinfo));
225
226 return 0;
227}
228
229static struct ads7846_platform_data ads7846_pdata = {
230 .x_min = 100,
231 .y_min = 265,
232 .x_max = 3950,
233 .y_max = 3750,
234 .x_plate_ohms = 40,
235 .pressure_max = 255,
236 .debounce_max = 10,
237 .debounce_tol = 5,
238 .debounce_rep = 1,
239 .gpio_pendown = OMAP3_TS_GPIO,
240 .keep_vref_on = 1,
241};
242
243static struct gpio_led gpio_leds[] = {
244 {
245 .name = "touchbook::usr0",
246 .default_trigger = "heartbeat",
247 .gpio = 150,
248 },
249 {
250 .name = "touchbook::usr1",
251 .default_trigger = "mmc0",
252 .gpio = 149,
253 },
254 {
255 .name = "touchbook::pmu_stat",
256 .gpio = -EINVAL, /* gets replaced */
257 .active_low = true,
258 },
259};
260
261static struct gpio_led_platform_data gpio_led_info = {
262 .leds = gpio_leds,
263 .num_leds = ARRAY_SIZE(gpio_leds),
264};
265
266static struct platform_device leds_gpio = {
267 .name = "leds-gpio",
268 .id = -1,
269 .dev = {
270 .platform_data = &gpio_led_info,
271 },
272};
273
274static struct gpio_keys_button gpio_buttons[] = {
275 {
276 .code = BTN_EXTRA,
277 .gpio = 7,
278 .desc = "user",
279 .wakeup = 1,
280 },
281 {
282 .code = KEY_POWER,
283 .gpio = 183,
284 .desc = "power",
285 .wakeup = 1,
286 },
287};
288
289static struct gpio_keys_platform_data gpio_key_info = {
290 .buttons = gpio_buttons,
291 .nbuttons = ARRAY_SIZE(gpio_buttons),
292};
293
294static struct platform_device keys_gpio = {
295 .name = "gpio-keys",
296 .id = -1,
297 .dev = {
298 .platform_data = &gpio_key_info,
299 },
300};
301
302#ifdef CONFIG_OMAP_MUX
303static struct omap_board_mux board_mux[] __initdata = {
304 { .reg_offset = OMAP_MUX_TERMINATOR },
305};
306#endif
307
308static struct usbhs_phy_data phy_data[] __initdata = {
309 {
310 .port = 2,
311 .reset_gpio = 147,
312 .vcc_gpio = -EINVAL,
313 },
314};
315
316static struct platform_device *omap3_touchbook_devices[] __initdata = {
317 &leds_gpio,
318 &keys_gpio,
319};
320
321static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
322 .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
323 .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
324};
325
326static void omap3_touchbook_poweroff(void)
327{
328 int pwr_off = TB_KILL_POWER_GPIO;
329
330 if (gpio_request_one(pwr_off, GPIOF_OUT_INIT_LOW, "DVI reset") < 0)
331 printk(KERN_ERR "Unable to get kill power GPIO\n");
332}
333
334static int __init early_touchbook_revision(char *p)
335{
336 if (!p)
337 return 0;
338
339 return kstrtoul(p, 10, &touchbook_revision);
340}
341early_param("tbr", early_touchbook_revision);
342
343static void __init omap3_touchbook_init(void)
344{
345 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
346
347 pm_power_off = omap3_touchbook_poweroff;
348
349 if (system_rev >= 0x20 && system_rev <= 0x34301000) {
350 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
351 mmc[0].gpio_wp = 23;
352 } else {
353 omap_mux_init_gpio(29, OMAP_PIN_INPUT);
354 }
355 omap_hsmmc_init(mmc);
356
357 omap3_touchbook_i2c_init();
358 platform_add_devices(omap3_touchbook_devices,
359 ARRAY_SIZE(omap3_touchbook_devices));
360 omap_serial_init();
361 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
362 mt46h32m32lf6_sdrc_params);
363
364 omap_mux_init_gpio(170, OMAP_PIN_INPUT);
365 /* REVISIT leave DVI powered down until it's needed ... */
366 gpio_request_one(176, GPIOF_OUT_INIT_HIGH, "DVI_nPD");
367
368 /* Touchscreen and accelerometer */
369 omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
370 usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
371 usb_musb_init(NULL);
372
373 usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data));
374 usbhs_init(&usbhs_bdata);
375 board_nand_init(omap3touchbook_nand_partitions,
376 ARRAY_SIZE(omap3touchbook_nand_partitions), NAND_CS,
377 NAND_BUSWIDTH_16, NULL);
378
379 /* Ensure SDRC pins are mux'd for self-refresh */
380 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
381 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
382}
383
384MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
385 /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
386 .atag_offset = 0x100,
387 .reserve = omap_reserve,
388 .map_io = omap3_map_io,
389 .init_early = omap3430_init_early,
390 .init_irq = omap3_init_irq,
391 .init_machine = omap3_touchbook_init,
392 .init_late = omap3430_init_late,
393 .init_time = omap3_secure_sync32k_timer_init,
394 .restart = omap3xxx_restart,
395MACHINE_END
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 6124db5c37ae..a699d7169307 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -23,6 +23,9 @@
23#include <linux/clk-provider.h> 23#include <linux/clk-provider.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <linux/regmap.h>
27#include <linux/of_address.h>
28#include <linux/bootmem.h>
26#include <asm/cpu.h> 29#include <asm/cpu.h>
27 30
28#include <trace/events/power.h> 31#include <trace/events/power.h>
@@ -72,30 +75,110 @@ struct ti_clk_features ti_clk_features;
72static bool clkdm_control = true; 75static bool clkdm_control = true;
73 76
74static LIST_HEAD(clk_hw_omap_clocks); 77static LIST_HEAD(clk_hw_omap_clocks);
75void __iomem *clk_memmaps[CLK_MAX_MEMMAPS]; 78
79struct clk_iomap {
80 struct regmap *regmap;
81 void __iomem *mem;
82};
83
84static struct clk_iomap *clk_memmaps[CLK_MAX_MEMMAPS];
85
86static void clk_memmap_writel(u32 val, void __iomem *reg)
87{
88 struct clk_omap_reg *r = (struct clk_omap_reg *)&reg;
89 struct clk_iomap *io = clk_memmaps[r->index];
90
91 if (io->regmap)
92 regmap_write(io->regmap, r->offset, val);
93 else
94 writel_relaxed(val, io->mem + r->offset);
95}
96
97static u32 clk_memmap_readl(void __iomem *reg)
98{
99 u32 val;
100 struct clk_omap_reg *r = (struct clk_omap_reg *)&reg;
101 struct clk_iomap *io = clk_memmaps[r->index];
102
103 if (io->regmap)
104 regmap_read(io->regmap, r->offset, &val);
105 else
106 val = readl_relaxed(io->mem + r->offset);
107
108 return val;
109}
76 110
77void omap2_clk_writel(u32 val, struct clk_hw_omap *clk, void __iomem *reg) 111void omap2_clk_writel(u32 val, struct clk_hw_omap *clk, void __iomem *reg)
78{ 112{
79 if (clk->flags & MEMMAP_ADDRESSING) { 113 if (WARN_ON_ONCE(!(clk->flags & MEMMAP_ADDRESSING)))
80 struct clk_omap_reg *r = (struct clk_omap_reg *)&reg;
81 writel_relaxed(val, clk_memmaps[r->index] + r->offset);
82 } else {
83 writel_relaxed(val, reg); 114 writel_relaxed(val, reg);
84 } 115 else
116 clk_memmap_writel(val, reg);
85} 117}
86 118
87u32 omap2_clk_readl(struct clk_hw_omap *clk, void __iomem *reg) 119u32 omap2_clk_readl(struct clk_hw_omap *clk, void __iomem *reg)
88{ 120{
89 u32 val; 121 if (WARN_ON_ONCE(!(clk->flags & MEMMAP_ADDRESSING)))
122 return readl_relaxed(reg);
123 else
124 return clk_memmap_readl(reg);
125}
90 126
91 if (clk->flags & MEMMAP_ADDRESSING) { 127static struct ti_clk_ll_ops omap_clk_ll_ops = {
92 struct clk_omap_reg *r = (struct clk_omap_reg *)&reg; 128 .clk_readl = clk_memmap_readl,
93 val = readl_relaxed(clk_memmaps[r->index] + r->offset); 129 .clk_writel = clk_memmap_writel,
94 } else { 130};
95 val = readl_relaxed(reg);
96 }
97 131
98 return val; 132/**
133 * omap2_clk_provider_init - initialize a clock provider
134 * @match_table: DT device table to match for devices to init
135 * @np: device node pointer for the this clock provider
136 * @index: index for the clock provider
137 + @syscon: syscon regmap pointer
138 * @mem: iomem pointer for the clock provider memory area, only used if
139 * syscon is not provided
140 *
141 * Initializes a clock provider module (CM/PRM etc.), registering
142 * the memory mapping at specified index and initializing the
143 * low level driver infrastructure. Returns 0 in success.
144 */
145int __init omap2_clk_provider_init(struct device_node *np, int index,
146 struct regmap *syscon, void __iomem *mem)
147{
148 struct clk_iomap *io;
149
150 ti_clk_ll_ops = &omap_clk_ll_ops;
151
152 io = kzalloc(sizeof(*io), GFP_KERNEL);
153
154 io->regmap = syscon;
155 io->mem = mem;
156
157 clk_memmaps[index] = io;
158
159 ti_dt_clk_init_provider(np, index);
160
161 return 0;
162}
163
164/**
165 * omap2_clk_legacy_provider_init - initialize a legacy clock provider
166 * @index: index for the clock provider
167 * @mem: iomem pointer for the clock provider memory area
168 *
169 * Initializes a legacy clock provider memory mapping.
170 */
171void __init omap2_clk_legacy_provider_init(int index, void __iomem *mem)
172{
173 struct clk_iomap *io;
174
175 ti_clk_ll_ops = &omap_clk_ll_ops;
176
177 io = memblock_virt_alloc(sizeof(*io), 0);
178
179 io->mem = mem;
180
181 clk_memmaps[index] = io;
99} 182}
100 183
101/* 184/*
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index a56742f96000..652ed0ab86ec 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -271,10 +271,14 @@ extern const struct clksel_rate div_1_3_rates[];
271extern const struct clksel_rate div_1_4_rates[]; 271extern const struct clksel_rate div_1_4_rates[];
272extern const struct clksel_rate div31_1to31_rates[]; 272extern const struct clksel_rate div31_1to31_rates[];
273 273
274extern void __iomem *clk_memmaps[];
275
276extern int omap2_clkops_enable_clkdm(struct clk_hw *hw); 274extern int omap2_clkops_enable_clkdm(struct clk_hw *hw);
277extern void omap2_clkops_disable_clkdm(struct clk_hw *hw); 275extern void omap2_clkops_disable_clkdm(struct clk_hw *hw);
278 276
277struct regmap;
278
279int __init omap2_clk_provider_init(struct device_node *np, int index,
280 struct regmap *syscon, void __iomem *mem);
281void __init omap2_clk_legacy_provider_init(int index, void __iomem *mem);
282
279void __init ti_clk_init_features(void); 283void __init ti_clk_init_features(void);
280#endif 284#endif
diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h
index 6222e87a79b6..1fe3e6b833d2 100644
--- a/arch/arm/mach-omap2/cm.h
+++ b/arch/arm/mach-omap2/cm.h
@@ -70,6 +70,8 @@ int omap_cm_module_enable(u8 mode, u8 part, u16 inst, u16 clkctrl_offs);
70int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs); 70int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs);
71extern int cm_register(struct cm_ll_data *cld); 71extern int cm_register(struct cm_ll_data *cld);
72extern int cm_unregister(struct cm_ll_data *cld); 72extern int cm_unregister(struct cm_ll_data *cld);
73int omap_cm_init(void);
74int omap2_cm_base_init(void);
73 75
74# endif 76# endif
75 77
diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c
index ef62ac9dcd05..3e5fd3587eb1 100644
--- a/arch/arm/mach-omap2/cm2xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx.c
@@ -393,7 +393,7 @@ static struct cm_ll_data omap2xxx_cm_ll_data = {
393 .wait_module_ready = &omap2xxx_cm_wait_module_ready, 393 .wait_module_ready = &omap2xxx_cm_wait_module_ready,
394}; 394};
395 395
396int __init omap2xxx_cm_init(void) 396int __init omap2xxx_cm_init(const struct omap_prcm_init_data *data)
397{ 397{
398 return cm_register(&omap2xxx_cm_ll_data); 398 return cm_register(&omap2xxx_cm_ll_data);
399} 399}
diff --git a/arch/arm/mach-omap2/cm2xxx.h b/arch/arm/mach-omap2/cm2xxx.h
index 83b6c597b0e1..7b8c79c0ce27 100644
--- a/arch/arm/mach-omap2/cm2xxx.h
+++ b/arch/arm/mach-omap2/cm2xxx.h
@@ -63,7 +63,7 @@ extern u32 omap2xxx_cm_get_core_pll_config(void);
63extern void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core, 63extern void omap2xxx_cm_set_mod_dividers(u32 mpu, u32 dsp, u32 gfx, u32 core,
64 u32 mdm); 64 u32 mdm);
65 65
66extern int __init omap2xxx_cm_init(void); 66int __init omap2xxx_cm_init(const struct omap_prcm_init_data *data);
67 67
68#endif 68#endif
69 69
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index cc5aac784278..7b181f929525 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -352,7 +352,7 @@ static struct cm_ll_data am33xx_cm_ll_data = {
352 .module_disable = &am33xx_cm_module_disable, 352 .module_disable = &am33xx_cm_module_disable,
353}; 353};
354 354
355int __init am33xx_cm_init(void) 355int __init am33xx_cm_init(const struct omap_prcm_init_data *data)
356{ 356{
357 return cm_register(&am33xx_cm_ll_data); 357 return cm_register(&am33xx_cm_ll_data);
358} 358}
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 046b4b2bc9d9..a91f7d282455 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -19,6 +19,7 @@
19 19
20#include "cm.h" 20#include "cm.h"
21#include "cm-regbits-33xx.h" 21#include "cm-regbits-33xx.h"
22#include "prcm-common.h"
22 23
23/* CM base address */ 24/* CM base address */
24#define AM33XX_CM_BASE 0x44e00000 25#define AM33XX_CM_BASE 0x44e00000
@@ -374,6 +375,6 @@
374 375
375 376
376#ifndef __ASSEMBLER__ 377#ifndef __ASSEMBLER__
377int am33xx_cm_init(void); 378int am33xx_cm_init(const struct omap_prcm_init_data *data);
378#endif /* ASSEMBLER */ 379#endif /* ASSEMBLER */
379#endif 380#endif
diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c
index ebead8f035f9..187fa4386718 100644
--- a/arch/arm/mach-omap2/cm3xxx.c
+++ b/arch/arm/mach-omap2/cm3xxx.c
@@ -671,8 +671,9 @@ static struct cm_ll_data omap3xxx_cm_ll_data = {
671 .wait_module_ready = &omap3xxx_cm_wait_module_ready, 671 .wait_module_ready = &omap3xxx_cm_wait_module_ready,
672}; 672};
673 673
674int __init omap3xxx_cm_init(void) 674int __init omap3xxx_cm_init(const struct omap_prcm_init_data *data)
675{ 675{
676 omap2_clk_legacy_provider_init(TI_CLKM_CM, cm_base + OMAP3430_IVA2_MOD);
676 return cm_register(&omap3xxx_cm_ll_data); 677 return cm_register(&omap3xxx_cm_ll_data);
677} 678}
678 679
diff --git a/arch/arm/mach-omap2/cm3xxx.h b/arch/arm/mach-omap2/cm3xxx.h
index 734a8581c0c4..bc444e2080a1 100644
--- a/arch/arm/mach-omap2/cm3xxx.h
+++ b/arch/arm/mach-omap2/cm3xxx.h
@@ -72,7 +72,7 @@ extern void omap3_cm_save_context(void);
72extern void omap3_cm_restore_context(void); 72extern void omap3_cm_restore_context(void);
73extern void omap3_cm_save_scratchpad_contents(u32 *ptr); 73extern void omap3_cm_save_scratchpad_contents(u32 *ptr);
74 74
75extern int __init omap3xxx_cm_init(void); 75int __init omap3xxx_cm_init(const struct omap_prcm_init_data *data);
76 76
77#endif 77#endif
78 78
diff --git a/arch/arm/mach-omap2/cm44xx.h b/arch/arm/mach-omap2/cm44xx.h
index 728d06a4af19..309a4c913448 100644
--- a/arch/arm/mach-omap2/cm44xx.h
+++ b/arch/arm/mach-omap2/cm44xx.h
@@ -23,7 +23,6 @@
23#define OMAP4_CM_CLKSTCTRL 0x0000 23#define OMAP4_CM_CLKSTCTRL 0x0000
24#define OMAP4_CM_STATICDEP 0x0004 24#define OMAP4_CM_STATICDEP 0x0004
25 25
26void omap_cm_base_init(void); 26int omap4_cm_init(const struct omap_prcm_init_data *data);
27int omap4_cm_init(void);
28 27
29#endif 28#endif
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c
index 8fe02fcedc48..23e8bcec34e3 100644
--- a/arch/arm/mach-omap2/cm_common.c
+++ b/arch/arm/mach-omap2/cm_common.c
@@ -15,10 +15,14 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/of.h>
19#include <linux/of_address.h>
18 20
19#include "cm2xxx.h" 21#include "cm2xxx.h"
20#include "cm3xxx.h" 22#include "cm3xxx.h"
23#include "cm33xx.h"
21#include "cm44xx.h" 24#include "cm44xx.h"
25#include "clock.h"
22 26
23/* 27/*
24 * cm_ll_data: function pointers to SoC-specific implementations of 28 * cm_ll_data: function pointers to SoC-specific implementations of
@@ -33,6 +37,9 @@ void __iomem *cm_base;
33/* cm2_base: base virtual address of the CM2 IP block (OMAP44xx only) */ 37/* cm2_base: base virtual address of the CM2 IP block (OMAP44xx only) */
34void __iomem *cm2_base; 38void __iomem *cm2_base;
35 39
40#define CM_NO_CLOCKS 0x1
41#define CM_SINGLE_INSTANCE 0x2
42
36/** 43/**
37 * omap2_set_globals_cm - set the CM/CM2 base addresses (for early use) 44 * omap2_set_globals_cm - set the CM/CM2 base addresses (for early use)
38 * @cm: CM base virtual address 45 * @cm: CM base virtual address
@@ -212,3 +219,152 @@ int cm_unregister(struct cm_ll_data *cld)
212 219
213 return 0; 220 return 0;
214} 221}
222
223#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
224 defined(CONFIG_SOC_DRA7XX)
225static struct omap_prcm_init_data cm_data __initdata = {
226 .index = TI_CLKM_CM,
227 .init = omap4_cm_init,
228};
229
230static struct omap_prcm_init_data cm2_data __initdata = {
231 .index = TI_CLKM_CM2,
232 .init = omap4_cm_init,
233};
234#endif
235
236#ifdef CONFIG_ARCH_OMAP2
237static struct omap_prcm_init_data omap2_prcm_data __initdata = {
238 .index = TI_CLKM_CM,
239 .init = omap2xxx_cm_init,
240 .flags = CM_NO_CLOCKS | CM_SINGLE_INSTANCE,
241};
242#endif
243
244#ifdef CONFIG_ARCH_OMAP3
245static struct omap_prcm_init_data omap3_cm_data __initdata = {
246 .index = TI_CLKM_CM,
247 .init = omap3xxx_cm_init,
248 .flags = CM_SINGLE_INSTANCE,
249
250 /*
251 * IVA2 offset is a negative value, must offset the cm_base address
252 * by this to get it to positive side on the iomap
253 */
254 .offset = -OMAP3430_IVA2_MOD,
255};
256#endif
257
258#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_TI81XX)
259static struct omap_prcm_init_data am3_prcm_data __initdata = {
260 .index = TI_CLKM_CM,
261 .flags = CM_NO_CLOCKS | CM_SINGLE_INSTANCE,
262 .init = am33xx_cm_init,
263};
264#endif
265
266#ifdef CONFIG_SOC_AM43XX
267static struct omap_prcm_init_data am4_prcm_data __initdata = {
268 .index = TI_CLKM_CM,
269 .flags = CM_NO_CLOCKS | CM_SINGLE_INSTANCE,
270 .init = omap4_cm_init,
271};
272#endif
273
274static const struct of_device_id omap_cm_dt_match_table[] __initconst = {
275#ifdef CONFIG_ARCH_OMAP2
276 { .compatible = "ti,omap2-prcm", .data = &omap2_prcm_data },
277#endif
278#ifdef CONFIG_ARCH_OMAP3
279 { .compatible = "ti,omap3-cm", .data = &omap3_cm_data },
280#endif
281#ifdef CONFIG_ARCH_OMAP4
282 { .compatible = "ti,omap4-cm1", .data = &cm_data },
283 { .compatible = "ti,omap4-cm2", .data = &cm2_data },
284#endif
285#ifdef CONFIG_SOC_OMAP5
286 { .compatible = "ti,omap5-cm-core-aon", .data = &cm_data },
287 { .compatible = "ti,omap5-cm-core", .data = &cm2_data },
288#endif
289#ifdef CONFIG_SOC_DRA7XX
290 { .compatible = "ti,dra7-cm-core-aon", .data = &cm_data },
291 { .compatible = "ti,dra7-cm-core", .data = &cm2_data },
292#endif
293#ifdef CONFIG_SOC_AM33XX
294 { .compatible = "ti,am3-prcm", .data = &am3_prcm_data },
295#endif
296#ifdef CONFIG_SOC_AM43XX
297 { .compatible = "ti,am4-prcm", .data = &am4_prcm_data },
298#endif
299#ifdef CONFIG_SOC_TI81XX
300 { .compatible = "ti,dm814-prcm", .data = &am3_prcm_data },
301 { .compatible = "ti,dm816-prcm", .data = &am3_prcm_data },
302#endif
303 { }
304};
305
306/**
307 * omap2_cm_base_init - initialize iomappings for the CM drivers
308 *
309 * Detects and initializes the iomappings for the CM driver, based
310 * on the DT data. Returns 0 in success, negative error value
311 * otherwise.
312 */
313int __init omap2_cm_base_init(void)
314{
315 struct device_node *np;
316 const struct of_device_id *match;
317 struct omap_prcm_init_data *data;
318 void __iomem *mem;
319
320 for_each_matching_node_and_match(np, omap_cm_dt_match_table, &match) {
321 data = (struct omap_prcm_init_data *)match->data;
322
323 mem = of_iomap(np, 0);
324 if (!mem)
325 return -ENOMEM;
326
327 if (data->index == TI_CLKM_CM)
328 cm_base = mem + data->offset;
329
330 if (data->index == TI_CLKM_CM2)
331 cm2_base = mem + data->offset;
332
333 data->mem = mem;
334
335 data->np = np;
336
337 if (data->init && (data->flags & CM_SINGLE_INSTANCE ||
338 (cm_base && cm2_base)))
339 data->init(data);
340 }
341
342 return 0;
343}
344
345/**
346 * omap_cm_init - low level init for the CM drivers
347 *
348 * Initializes the low level clock infrastructure for CM drivers.
349 * Returns 0 in success, negative error value in failure.
350 */
351int __init omap_cm_init(void)
352{
353 struct device_node *np;
354 const struct of_device_id *match;
355 const struct omap_prcm_init_data *data;
356 int ret;
357
358 for_each_matching_node_and_match(np, omap_cm_dt_match_table, &match) {
359 data = match->data;
360
361 if (data->flags & CM_NO_CLOCKS)
362 continue;
363
364 ret = omap2_clk_provider_init(np, data->index, NULL, data->mem);
365 if (ret)
366 return ret;
367 }
368
369 return 0;
370}
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index 95a8cff66aff..2c0e07ed6b99 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -63,7 +63,7 @@ static void __iomem *_cm_bases[OMAP4_MAX_PRCM_PARTITIONS];
63 * Populates the base addresses of the _cm_bases 63 * Populates the base addresses of the _cm_bases
64 * array used for read/write of cm module registers. 64 * array used for read/write of cm module registers.
65 */ 65 */
66void omap_cm_base_init(void) 66static void omap_cm_base_init(void)
67{ 67{
68 _cm_bases[OMAP4430_PRM_PARTITION] = prm_base; 68 _cm_bases[OMAP4430_PRM_PARTITION] = prm_base;
69 _cm_bases[OMAP4430_CM1_PARTITION] = cm_base; 69 _cm_bases[OMAP4430_CM1_PARTITION] = cm_base;
@@ -514,8 +514,10 @@ static struct cm_ll_data omap4xxx_cm_ll_data = {
514 .module_disable = &omap4_cminst_module_disable, 514 .module_disable = &omap4_cminst_module_disable,
515}; 515};
516 516
517int __init omap4_cm_init(void) 517int __init omap4_cm_init(const struct omap_prcm_init_data *data)
518{ 518{
519 omap_cm_base_init();
520
519 return cm_register(&omap4xxx_cm_ll_data); 521 return cm_register(&omap4xxx_cm_ll_data);
520} 522}
521 523
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 484cdadfb187..eae6a0e87c90 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -30,5 +30,4 @@ int __weak omap_secure_ram_reserve_memblock(void)
30void __init omap_reserve(void) 30void __init omap_reserve(void)
31{ 31{
32 omap_secure_ram_reserve_memblock(); 32 omap_secure_ram_reserve_memblock();
33 omap_barrier_reserve_memblock();
34} 33}
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 46e24581d624..cf3cf22ecd42 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -200,9 +200,6 @@ void __init omap4_map_io(void);
200void __init omap5_map_io(void); 200void __init omap5_map_io(void);
201void __init ti81xx_map_io(void); 201void __init ti81xx_map_io(void);
202 202
203/* omap_barriers_init() is OMAP4 only */
204void omap_barriers_init(void);
205
206/** 203/**
207 * omap_test_timeout - busy-loop, testing a condition 204 * omap_test_timeout - busy-loop, testing a condition
208 * @cond: condition to test until it evaluates to true 205 * @cond: condition to test until it evaluates to true
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index da041b4ab29c..af95a624fe71 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -14,6 +14,9 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/of_address.h>
18#include <linux/regmap.h>
19#include <linux/mfd/syscon.h>
17 20
18#include "soc.h" 21#include "soc.h"
19#include "iomap.h" 22#include "iomap.h"
@@ -25,13 +28,15 @@
25#include "sdrc.h" 28#include "sdrc.h"
26#include "pm.h" 29#include "pm.h"
27#include "control.h" 30#include "control.h"
31#include "clock.h"
28 32
29/* Used by omap3_ctrl_save_padconf() */ 33/* Used by omap3_ctrl_save_padconf() */
30#define START_PADCONF_SAVE 0x2 34#define START_PADCONF_SAVE 0x2
31#define PADCONF_SAVE_DONE 0x1 35#define PADCONF_SAVE_DONE 0x1
32 36
33static void __iomem *omap2_ctrl_base; 37static void __iomem *omap2_ctrl_base;
34static void __iomem *omap4_ctrl_pad_base; 38static s16 omap2_ctrl_offset;
39static struct regmap *omap2_ctrl_syscon;
35 40
36#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) 41#if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM)
37struct omap3_scratchpad { 42struct omap3_scratchpad {
@@ -133,66 +138,79 @@ struct omap3_control_regs {
133static struct omap3_control_regs control_context; 138static struct omap3_control_regs control_context;
134#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ 139#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
135 140
136#define OMAP_CTRL_REGADDR(reg) (omap2_ctrl_base + (reg)) 141void __init omap2_set_globals_control(void __iomem *ctrl)
137#define OMAP4_CTRL_PAD_REGADDR(reg) (omap4_ctrl_pad_base + (reg))
138
139void __init omap2_set_globals_control(void __iomem *ctrl,
140 void __iomem *ctrl_pad)
141{ 142{
142 omap2_ctrl_base = ctrl; 143 omap2_ctrl_base = ctrl;
143 omap4_ctrl_pad_base = ctrl_pad;
144}
145
146void __iomem *omap_ctrl_base_get(void)
147{
148 return omap2_ctrl_base;
149} 144}
150 145
151u8 omap_ctrl_readb(u16 offset) 146u8 omap_ctrl_readb(u16 offset)
152{ 147{
153 return readb_relaxed(OMAP_CTRL_REGADDR(offset)); 148 u32 val;
149 u8 byte_offset = offset & 0x3;
150
151 val = omap_ctrl_readl(offset);
152
153 return (val >> (byte_offset * 8)) & 0xff;
154} 154}
155 155
156u16 omap_ctrl_readw(u16 offset) 156u16 omap_ctrl_readw(u16 offset)
157{ 157{
158 return readw_relaxed(OMAP_CTRL_REGADDR(offset)); 158 u32 val;
159 u16 byte_offset = offset & 0x2;
160
161 val = omap_ctrl_readl(offset);
162
163 return (val >> (byte_offset * 8)) & 0xffff;
159} 164}
160 165
161u32 omap_ctrl_readl(u16 offset) 166u32 omap_ctrl_readl(u16 offset)
162{ 167{
163 return readl_relaxed(OMAP_CTRL_REGADDR(offset)); 168 u32 val;
169
170 offset &= 0xfffc;
171 if (!omap2_ctrl_syscon)
172 val = readl_relaxed(omap2_ctrl_base + offset);
173 else
174 regmap_read(omap2_ctrl_syscon, omap2_ctrl_offset + offset,
175 &val);
176
177 return val;
164} 178}
165 179
166void omap_ctrl_writeb(u8 val, u16 offset) 180void omap_ctrl_writeb(u8 val, u16 offset)
167{ 181{
168 writeb_relaxed(val, OMAP_CTRL_REGADDR(offset)); 182 u32 tmp;
183 u8 byte_offset = offset & 0x3;
184
185 tmp = omap_ctrl_readl(offset);
186
187 tmp &= 0xffffffff ^ (0xff << (byte_offset * 8));
188 tmp |= val << (byte_offset * 8);
189
190 omap_ctrl_writel(tmp, offset);
169} 191}
170 192
171void omap_ctrl_writew(u16 val, u16 offset) 193void omap_ctrl_writew(u16 val, u16 offset)
172{ 194{
173 writew_relaxed(val, OMAP_CTRL_REGADDR(offset)); 195 u32 tmp;
174} 196 u8 byte_offset = offset & 0x2;
175 197
176void omap_ctrl_writel(u32 val, u16 offset) 198 tmp = omap_ctrl_readl(offset);
177{
178 writel_relaxed(val, OMAP_CTRL_REGADDR(offset));
179}
180 199
181/* 200 tmp &= 0xffffffff ^ (0xffff << (byte_offset * 8));
182 * On OMAP4 control pad are not addressable from control 201 tmp |= val << (byte_offset * 8);
183 * core base. So the common omap_ctrl_read/write APIs breaks
184 * Hence export separate APIs to manage the omap4 pad control
185 * registers. This APIs will work only for OMAP4
186 */
187 202
188u32 omap4_ctrl_pad_readl(u16 offset) 203 omap_ctrl_writel(tmp, offset);
189{
190 return readl_relaxed(OMAP4_CTRL_PAD_REGADDR(offset));
191} 204}
192 205
193void omap4_ctrl_pad_writel(u32 val, u16 offset) 206void omap_ctrl_writel(u32 val, u16 offset)
194{ 207{
195 writel_relaxed(val, OMAP4_CTRL_PAD_REGADDR(offset)); 208 offset &= 0xfffc;
209 if (!omap2_ctrl_syscon)
210 writel_relaxed(val, omap2_ctrl_base + offset);
211 else
212 regmap_write(omap2_ctrl_syscon, omap2_ctrl_offset + offset,
213 val);
196} 214}
197 215
198#ifdef CONFIG_ARCH_OMAP3 216#ifdef CONFIG_ARCH_OMAP3
@@ -611,3 +629,120 @@ void __init omap3_ctrl_init(void)
611 omap3_ctrl_setup_d2d_padconf(); 629 omap3_ctrl_setup_d2d_padconf();
612} 630}
613#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ 631#endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
632
633struct control_init_data {
634 int index;
635 s16 offset;
636};
637
638static struct control_init_data ctrl_data = {
639 .index = TI_CLKM_CTRL,
640};
641
642static const struct control_init_data omap2_ctrl_data = {
643 .index = TI_CLKM_CTRL,
644 .offset = -OMAP2_CONTROL_GENERAL,
645};
646
647static const struct of_device_id omap_scrm_dt_match_table[] = {
648 { .compatible = "ti,am3-scm", .data = &ctrl_data },
649 { .compatible = "ti,am4-scm", .data = &ctrl_data },
650 { .compatible = "ti,omap2-scm", .data = &omap2_ctrl_data },
651 { .compatible = "ti,omap3-scm", .data = &omap2_ctrl_data },
652 { .compatible = "ti,dm816-scrm", .data = &ctrl_data },
653 { .compatible = "ti,omap4-scm-core", .data = &ctrl_data },
654 { .compatible = "ti,omap5-scm-core", .data = &ctrl_data },
655 { .compatible = "ti,dra7-scm-core", .data = &ctrl_data },
656 { }
657};
658
659/**
660 * omap2_control_base_init - initialize iomappings for the control driver
661 *
662 * Detects and initializes the iomappings for the control driver, based
663 * on the DT data. Returns 0 in success, negative error value
664 * otherwise.
665 */
666int __init omap2_control_base_init(void)
667{
668 struct device_node *np;
669 const struct of_device_id *match;
670 struct control_init_data *data;
671
672 for_each_matching_node_and_match(np, omap_scrm_dt_match_table, &match) {
673 data = (struct control_init_data *)match->data;
674
675 omap2_ctrl_base = of_iomap(np, 0);
676 if (!omap2_ctrl_base)
677 return -ENOMEM;
678
679 omap2_ctrl_offset = data->offset;
680 }
681
682 return 0;
683}
684
685/**
686 * omap_control_init - low level init for the control driver
687 *
688 * Initializes the low level clock infrastructure for control driver.
689 * Returns 0 in success, negative error value in failure.
690 */
691int __init omap_control_init(void)
692{
693 struct device_node *np, *scm_conf;
694 const struct of_device_id *match;
695 const struct omap_prcm_init_data *data;
696 int ret;
697 struct regmap *syscon;
698
699 for_each_matching_node_and_match(np, omap_scrm_dt_match_table, &match) {
700 data = match->data;
701
702 /*
703 * Check if we have scm_conf node, if yes, use this to
704 * access clock registers.
705 */
706 scm_conf = of_get_child_by_name(np, "scm_conf");
707
708 if (scm_conf) {
709 syscon = syscon_node_to_regmap(scm_conf);
710
711 if (IS_ERR(syscon))
712 return PTR_ERR(syscon);
713
714 omap2_ctrl_syscon = syscon;
715
716 if (of_get_child_by_name(scm_conf, "clocks")) {
717 ret = omap2_clk_provider_init(scm_conf,
718 data->index,
719 syscon, NULL);
720 if (ret)
721 return ret;
722 }
723
724 iounmap(omap2_ctrl_base);
725 omap2_ctrl_base = NULL;
726 } else {
727 /* No scm_conf found, direct access */
728 ret = omap2_clk_provider_init(np, data->index, NULL,
729 omap2_ctrl_base);
730 if (ret)
731 return ret;
732 }
733 }
734
735 return 0;
736}
737
738/**
739 * omap3_control_legacy_iomap_init - legacy iomap init for clock providers
740 *
741 * Legacy iomap init for clock provider. Needed only by legacy boot mode,
742 * where the base addresses are not parsed from DT, but still required
743 * by the clock driver to be setup properly.
744 */
745void __init omap3_control_legacy_iomap_init(void)
746{
747 omap2_clk_legacy_provider_init(TI_CLKM_SCRM, omap2_ctrl_base);
748}
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index b8a487181210..80d2b7d8e36e 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -440,15 +440,12 @@
440 440
441#ifndef __ASSEMBLY__ 441#ifndef __ASSEMBLY__
442#ifdef CONFIG_ARCH_OMAP2PLUS 442#ifdef CONFIG_ARCH_OMAP2PLUS
443extern void __iomem *omap_ctrl_base_get(void);
444extern u8 omap_ctrl_readb(u16 offset); 443extern u8 omap_ctrl_readb(u16 offset);
445extern u16 omap_ctrl_readw(u16 offset); 444extern u16 omap_ctrl_readw(u16 offset);
446extern u32 omap_ctrl_readl(u16 offset); 445extern u32 omap_ctrl_readl(u16 offset);
447extern u32 omap4_ctrl_pad_readl(u16 offset);
448extern void omap_ctrl_writeb(u8 val, u16 offset); 446extern void omap_ctrl_writeb(u8 val, u16 offset);
449extern void omap_ctrl_writew(u16 val, u16 offset); 447extern void omap_ctrl_writew(u16 val, u16 offset);
450extern void omap_ctrl_writel(u32 val, u16 offset); 448extern void omap_ctrl_writel(u32 val, u16 offset);
451extern void omap4_ctrl_pad_writel(u32 val, u16 offset);
452 449
453extern void omap3_save_scratchpad_contents(void); 450extern void omap3_save_scratchpad_contents(void);
454extern void omap3_clear_scratchpad_contents(void); 451extern void omap3_clear_scratchpad_contents(void);
@@ -464,10 +461,11 @@ extern void omap_ctrl_write_dsp_boot_mode(u8 bootmode);
464extern void omap3630_ctrl_disable_rta(void); 461extern void omap3630_ctrl_disable_rta(void);
465extern int omap3_ctrl_save_padconf(void); 462extern int omap3_ctrl_save_padconf(void);
466void omap3_ctrl_init(void); 463void omap3_ctrl_init(void);
467extern void omap2_set_globals_control(void __iomem *ctrl, 464int omap2_control_base_init(void);
468 void __iomem *ctrl_pad); 465int omap_control_init(void);
466void omap2_set_globals_control(void __iomem *ctrl);
467void __init omap3_control_legacy_iomap_init(void);
469#else 468#else
470#define omap_ctrl_base_get() 0
471#define omap_ctrl_readb(x) 0 469#define omap_ctrl_readb(x) 0
472#define omap_ctrl_readw(x) 0 470#define omap_ctrl_readw(x) 0
473#define omap_ctrl_readl(x) 0 471#define omap_ctrl_readl(x) 0
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 7a050f9c37ff..f492ae147c6a 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -26,6 +26,8 @@
26#include <linux/of.h> 26#include <linux/of.h>
27#include <linux/of_platform.h> 27#include <linux/of_platform.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/mfd/syscon.h>
30#include <linux/regmap.h>
29 31
30#include <video/omapdss.h> 32#include <video/omapdss.h>
31#include "omap_hwmod.h" 33#include "omap_hwmod.h"
@@ -104,6 +106,10 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
104 { "dss_hdmi", "omapdss_hdmi", -1 }, 106 { "dss_hdmi", "omapdss_hdmi", -1 },
105}; 107};
106 108
109#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
110
111static struct regmap *omap4_dsi_mux_syscon;
112
107static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) 113static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
108{ 114{
109 u32 enable_mask, enable_shift; 115 u32 enable_mask, enable_shift;
@@ -124,7 +130,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
124 return -ENODEV; 130 return -ENODEV;
125 } 131 }
126 132
127 reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); 133 regmap_read(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, &reg);
128 134
129 reg &= ~enable_mask; 135 reg &= ~enable_mask;
130 reg &= ~pipd_mask; 136 reg &= ~pipd_mask;
@@ -132,7 +138,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
132 reg |= (lanes << enable_shift) & enable_mask; 138 reg |= (lanes << enable_shift) & enable_mask;
133 reg |= (lanes << pipd_shift) & pipd_mask; 139 reg |= (lanes << pipd_shift) & pipd_mask;
134 140
135 omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); 141 regmap_write(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, reg);
136 142
137 return 0; 143 return 0;
138} 144}
@@ -665,5 +671,10 @@ int __init omapdss_init_of(void)
665 return r; 671 return r;
666 } 672 }
667 673
674 /* add DSI info for omap4 */
675 node = of_find_node_by_name(NULL, "omap4_padconf_global");
676 if (node)
677 omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
678
668 return 0; 679 return 0;
669} 680}
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index d5951b17b736..72918c4973ea 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -96,14 +96,6 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
96 gpmc_nand_res[1].start = gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE); 96 gpmc_nand_res[1].start = gpmc_get_client_irq(GPMC_IRQ_FIFOEVENTENABLE);
97 gpmc_nand_res[2].start = gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT); 97 gpmc_nand_res[2].start = gpmc_get_client_irq(GPMC_IRQ_COUNT_EVENT);
98 98
99 if (gpmc_t) {
100 err = gpmc_cs_set_timings(gpmc_nand_data->cs, gpmc_t);
101 if (err < 0) {
102 pr_err("omap2-gpmc: Unable to set gpmc timings: %d\n", err);
103 return err;
104 }
105 }
106
107 memset(&s, 0, sizeof(struct gpmc_settings)); 99 memset(&s, 0, sizeof(struct gpmc_settings));
108 if (gpmc_nand_data->of_node) 100 if (gpmc_nand_data->of_node)
109 gpmc_read_settings_dt(gpmc_nand_data->of_node, &s); 101 gpmc_read_settings_dt(gpmc_nand_data->of_node, &s);
@@ -111,6 +103,16 @@ int gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data,
111 gpmc_set_legacy(gpmc_nand_data, &s); 103 gpmc_set_legacy(gpmc_nand_data, &s);
112 104
113 s.device_nand = true; 105 s.device_nand = true;
106
107 if (gpmc_t) {
108 err = gpmc_cs_set_timings(gpmc_nand_data->cs, gpmc_t, &s);
109 if (err < 0) {
110 pr_err("omap2-gpmc: Unable to set gpmc timings: %d\n",
111 err);
112 return err;
113 }
114 }
115
114 err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s); 116 err = gpmc_cs_program_settings(gpmc_nand_data->cs, &s);
115 if (err < 0) 117 if (err < 0)
116 goto out_free_cs; 118 goto out_free_cs;
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 53d197e0c1f3..f899e77ff5e6 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -293,7 +293,7 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base)
293 if (ret < 0) 293 if (ret < 0)
294 return ret; 294 return ret;
295 295
296 ret = gpmc_cs_set_timings(gpmc_onenand_data->cs, &t); 296 ret = gpmc_cs_set_timings(gpmc_onenand_data->cs, &t, &onenand_async);
297 if (ret < 0) 297 if (ret < 0)
298 return ret; 298 return ret;
299 299
@@ -331,7 +331,7 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)
331 if (ret < 0) 331 if (ret < 0)
332 return ret; 332 return ret;
333 333
334 ret = gpmc_cs_set_timings(gpmc_onenand_data->cs, &t); 334 ret = gpmc_cs_set_timings(gpmc_onenand_data->cs, &t, &onenand_sync);
335 if (ret < 0) 335 if (ret < 0)
336 return ret; 336 return ret;
337 337
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 25f1beea453e..e3f713ffb06b 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -52,7 +52,10 @@ EXPORT_SYMBOL(omap_rev);
52 52
53int omap_type(void) 53int omap_type(void)
54{ 54{
55 u32 val = 0; 55 static u32 val = OMAP2_DEVICETYPE_MASK;
56
57 if (val < OMAP2_DEVICETYPE_MASK)
58 return val;
56 59
57 if (cpu_is_omap24xx()) { 60 if (cpu_is_omap24xx()) {
58 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); 61 val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index c4871c55bd8b..820dde8b5b04 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -306,7 +306,6 @@ void __init am33xx_map_io(void)
306void __init omap4_map_io(void) 306void __init omap4_map_io(void)
307{ 307{
308 iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); 308 iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc));
309 omap_barriers_init();
310} 309}
311#endif 310#endif
312 311
@@ -314,7 +313,6 @@ void __init omap4_map_io(void)
314void __init omap5_map_io(void) 313void __init omap5_map_io(void)
315{ 314{
316 iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); 315 iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
317 omap_barriers_init();
318} 316}
319#endif 317#endif
320/* 318/*
@@ -384,13 +382,9 @@ void __init omap2420_init_early(void)
384 omap2_set_globals_tap(OMAP242X_CLASS, OMAP2_L4_IO_ADDRESS(0x48014000)); 382 omap2_set_globals_tap(OMAP242X_CLASS, OMAP2_L4_IO_ADDRESS(0x48014000));
385 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE), 383 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE),
386 OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE)); 384 OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE));
387 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE), 385 omap2_control_base_init();
388 NULL);
389 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE));
390 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), NULL);
391 omap2xxx_check_revision(); 386 omap2xxx_check_revision();
392 omap2xxx_prm_init(); 387 omap2_prcm_base_init();
393 omap2xxx_cm_init();
394 omap2xxx_voltagedomains_init(); 388 omap2xxx_voltagedomains_init();
395 omap242x_powerdomains_init(); 389 omap242x_powerdomains_init();
396 omap242x_clockdomains_init(); 390 omap242x_clockdomains_init();
@@ -414,13 +408,9 @@ void __init omap2430_init_early(void)
414 omap2_set_globals_tap(OMAP243X_CLASS, OMAP2_L4_IO_ADDRESS(0x4900a000)); 408 omap2_set_globals_tap(OMAP243X_CLASS, OMAP2_L4_IO_ADDRESS(0x4900a000));
415 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE), 409 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE),
416 OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE)); 410 OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE));
417 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), 411 omap2_control_base_init();
418 NULL);
419 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE));
420 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), NULL);
421 omap2xxx_check_revision(); 412 omap2xxx_check_revision();
422 omap2xxx_prm_init(); 413 omap2_prcm_base_init();
423 omap2xxx_cm_init();
424 omap2xxx_voltagedomains_init(); 414 omap2xxx_voltagedomains_init();
425 omap243x_powerdomains_init(); 415 omap243x_powerdomains_init();
426 omap243x_clockdomains_init(); 416 omap243x_clockdomains_init();
@@ -448,21 +438,30 @@ void __init omap3_init_early(void)
448 omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000)); 438 omap2_set_globals_tap(OMAP343X_CLASS, OMAP2_L4_IO_ADDRESS(0x4830A000));
449 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 439 omap2_set_globals_sdrc(OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
450 OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE)); 440 OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE));
451 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), 441 /* XXX: remove these once OMAP3 is DT only */
452 NULL); 442 if (!of_have_populated_dt()) {
453 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE)); 443 omap2_set_globals_control(
454 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), NULL); 444 OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE));
445 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE));
446 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
447 NULL);
448 }
449 omap2_control_base_init();
455 omap3xxx_check_revision(); 450 omap3xxx_check_revision();
456 omap3xxx_check_features(); 451 omap3xxx_check_features();
457 omap3xxx_prm_init(); 452 omap2_prcm_base_init();
458 omap3xxx_cm_init(); 453 /* XXX: remove these once OMAP3 is DT only */
454 if (!of_have_populated_dt()) {
455 omap3xxx_prm_init(NULL);
456 omap3xxx_cm_init(NULL);
457 }
459 omap3xxx_voltagedomains_init(); 458 omap3xxx_voltagedomains_init();
460 omap3xxx_powerdomains_init(); 459 omap3xxx_powerdomains_init();
461 omap3xxx_clockdomains_init(); 460 omap3xxx_clockdomains_init();
462 omap3xxx_hwmod_init(); 461 omap3xxx_hwmod_init();
463 omap_hwmod_init_postsetup(); 462 omap_hwmod_init_postsetup();
464 if (!of_have_populated_dt()) { 463 if (!of_have_populated_dt()) {
465 omap3_prcm_legacy_iomaps_init(); 464 omap3_control_legacy_iomap_init();
466 if (soc_is_am35xx()) 465 if (soc_is_am35xx())
467 omap_clk_soc_init = am35xx_clk_legacy_init; 466 omap_clk_soc_init = am35xx_clk_legacy_init;
468 else if (cpu_is_omap3630()) 467 else if (cpu_is_omap3630())
@@ -549,14 +548,10 @@ void __init ti814x_init_early(void)
549{ 548{
550 omap2_set_globals_tap(TI814X_CLASS, 549 omap2_set_globals_tap(TI814X_CLASS,
551 OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 550 OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE));
552 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(TI81XX_CTRL_BASE), 551 omap2_control_base_init();
553 NULL);
554 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE));
555 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE), NULL);
556 omap3xxx_check_revision(); 552 omap3xxx_check_revision();
557 ti81xx_check_features(); 553 ti81xx_check_features();
558 am33xx_prm_init(); 554 omap2_prcm_base_init();
559 am33xx_cm_init();
560 omap3xxx_voltagedomains_init(); 555 omap3xxx_voltagedomains_init();
561 omap3xxx_powerdomains_init(); 556 omap3xxx_powerdomains_init();
562 ti81xx_clockdomains_init(); 557 ti81xx_clockdomains_init();
@@ -570,14 +565,10 @@ void __init ti816x_init_early(void)
570{ 565{
571 omap2_set_globals_tap(TI816X_CLASS, 566 omap2_set_globals_tap(TI816X_CLASS,
572 OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE)); 567 OMAP2_L4_IO_ADDRESS(TI81XX_TAP_BASE));
573 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(TI81XX_CTRL_BASE), 568 omap2_control_base_init();
574 NULL);
575 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE));
576 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(TI81XX_PRCM_BASE), NULL);
577 omap3xxx_check_revision(); 569 omap3xxx_check_revision();
578 ti81xx_check_features(); 570 ti81xx_check_features();
579 am33xx_prm_init(); 571 omap2_prcm_base_init();
580 am33xx_cm_init();
581 omap3xxx_voltagedomains_init(); 572 omap3xxx_voltagedomains_init();
582 omap3xxx_powerdomains_init(); 573 omap3xxx_powerdomains_init();
583 ti81xx_clockdomains_init(); 574 ti81xx_clockdomains_init();
@@ -593,14 +584,10 @@ void __init am33xx_init_early(void)
593{ 584{
594 omap2_set_globals_tap(AM335X_CLASS, 585 omap2_set_globals_tap(AM335X_CLASS,
595 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 586 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE));
596 omap2_set_globals_control(AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE), 587 omap2_control_base_init();
597 NULL);
598 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE));
599 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL);
600 omap3xxx_check_revision(); 588 omap3xxx_check_revision();
601 am33xx_check_features(); 589 am33xx_check_features();
602 am33xx_prm_init(); 590 omap2_prcm_base_init();
603 am33xx_cm_init();
604 am33xx_powerdomains_init(); 591 am33xx_powerdomains_init();
605 am33xx_clockdomains_init(); 592 am33xx_clockdomains_init();
606 am33xx_hwmod_init(); 593 am33xx_hwmod_init();
@@ -619,16 +606,10 @@ void __init am43xx_init_early(void)
619{ 606{
620 omap2_set_globals_tap(AM335X_CLASS, 607 omap2_set_globals_tap(AM335X_CLASS,
621 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE)); 608 AM33XX_L4_WK_IO_ADDRESS(AM33XX_TAP_BASE));
622 omap2_set_globals_control(AM33XX_L4_WK_IO_ADDRESS(AM33XX_CTRL_BASE), 609 omap2_control_base_init();
623 NULL);
624 omap2_set_globals_prm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE));
625 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
626 omap_prm_base_init();
627 omap_cm_base_init();
628 omap3xxx_check_revision(); 610 omap3xxx_check_revision();
629 am33xx_check_features(); 611 am33xx_check_features();
630 omap44xx_prm_init(); 612 omap2_prcm_base_init();
631 omap4_cm_init();
632 am43xx_powerdomains_init(); 613 am43xx_powerdomains_init();
633 am43xx_clockdomains_init(); 614 am43xx_clockdomains_init();
634 am43xx_hwmod_init(); 615 am43xx_hwmod_init();
@@ -648,19 +629,12 @@ void __init omap4430_init_early(void)
648{ 629{
649 omap2_set_globals_tap(OMAP443X_CLASS, 630 omap2_set_globals_tap(OMAP443X_CLASS,
650 OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); 631 OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE));
651 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE),
652 OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE));
653 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE));
654 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
655 OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE));
656 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); 632 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE));
657 omap_prm_base_init(); 633 omap2_control_base_init();
658 omap_cm_base_init();
659 omap4xxx_check_revision(); 634 omap4xxx_check_revision();
660 omap4xxx_check_features(); 635 omap4xxx_check_features();
661 omap4_cm_init(); 636 omap2_prcm_base_init();
662 omap4_pm_init_early(); 637 omap4_pm_init_early();
663 omap44xx_prm_init();
664 omap44xx_voltagedomains_init(); 638 omap44xx_voltagedomains_init();
665 omap44xx_powerdomains_init(); 639 omap44xx_powerdomains_init();
666 omap44xx_clockdomains_init(); 640 omap44xx_clockdomains_init();
@@ -683,18 +657,11 @@ void __init omap5_init_early(void)
683{ 657{
684 omap2_set_globals_tap(OMAP54XX_CLASS, 658 omap2_set_globals_tap(OMAP54XX_CLASS,
685 OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); 659 OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE));
686 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
687 OMAP2_L4_IO_ADDRESS(OMAP54XX_CTRL_BASE));
688 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE));
689 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_AON_BASE),
690 OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE));
691 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 660 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
661 omap2_control_base_init();
692 omap4_pm_init_early(); 662 omap4_pm_init_early();
693 omap_prm_base_init(); 663 omap2_prcm_base_init();
694 omap_cm_base_init();
695 omap44xx_prm_init();
696 omap5xxx_check_revision(); 664 omap5xxx_check_revision();
697 omap4_cm_init();
698 omap54xx_voltagedomains_init(); 665 omap54xx_voltagedomains_init();
699 omap54xx_powerdomains_init(); 666 omap54xx_powerdomains_init();
700 omap54xx_clockdomains_init(); 667 omap54xx_clockdomains_init();
@@ -715,18 +682,11 @@ void __init omap5_init_late(void)
715void __init dra7xx_init_early(void) 682void __init dra7xx_init_early(void)
716{ 683{
717 omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); 684 omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE));
718 omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE),
719 OMAP2_L4_IO_ADDRESS(DRA7XX_CTRL_BASE));
720 omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRM_BASE));
721 omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(DRA7XX_CM_CORE_AON_BASE),
722 OMAP2_L4_IO_ADDRESS(OMAP54XX_CM_CORE_BASE));
723 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); 685 omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE));
686 omap2_control_base_init();
724 omap4_pm_init_early(); 687 omap4_pm_init_early();
725 omap_prm_base_init(); 688 omap2_prcm_base_init();
726 omap_cm_base_init();
727 omap44xx_prm_init();
728 dra7xxx_check_revision(); 689 dra7xxx_check_revision();
729 omap4_cm_init();
730 dra7xx_powerdomains_init(); 690 dra7xx_powerdomains_init();
731 dra7xx_clockdomains_init(); 691 dra7xx_clockdomains_init();
732 dra7xx_hwmod_init(); 692 dra7xx_hwmod_init();
@@ -764,7 +724,11 @@ int __init omap_clk_init(void)
764 ti_clk_init_features(); 724 ti_clk_init_features();
765 725
766 if (of_have_populated_dt()) { 726 if (of_have_populated_dt()) {
767 ret = of_prcm_init(); 727 ret = omap_control_init();
728 if (ret)
729 return ret;
730
731 ret = omap_prcm_init();
768 if (ret) 732 if (ret)
769 return ret; 733 return ret;
770 734
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 78064b0d4db5..176eef6ef338 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -1053,7 +1053,7 @@ static void __init omap_mux_init_list(struct omap_mux_partition *partition,
1053 struct omap_mux *entry; 1053 struct omap_mux *entry;
1054 1054
1055#ifdef CONFIG_OMAP_MUX 1055#ifdef CONFIG_OMAP_MUX
1056 if (!superset->muxnames || !superset->muxnames[0]) { 1056 if (!superset->muxnames[0]) {
1057 superset++; 1057 superset++;
1058 continue; 1058 continue;
1059 } 1059 }
diff --git a/arch/arm/mach-omap2/omap-secure.h b/arch/arm/mach-omap2/omap-secure.h
index dec2b05d184b..af2851fbcdf0 100644
--- a/arch/arm/mach-omap2/omap-secure.h
+++ b/arch/arm/mach-omap2/omap-secure.h
@@ -70,13 +70,6 @@ extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
70extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits); 70extern u32 rx51_secure_update_aux_cr(u32 set_bits, u32 clear_bits);
71extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag); 71extern u32 rx51_secure_rng_call(u32 ptr, u32 count, u32 flag);
72 72
73#ifdef CONFIG_OMAP4_ERRATA_I688
74extern int omap_barrier_reserve_memblock(void);
75#else
76static inline void omap_barrier_reserve_memblock(void)
77{ }
78#endif
79
80#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER 73#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
81void set_cntfreq(void); 74void set_cntfreq(void);
82#else 75#else
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 7bb116a6f86f..16350eefa66c 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -51,75 +51,6 @@ static void __iomem *twd_base;
51 51
52#define IRQ_LOCALTIMER 29 52#define IRQ_LOCALTIMER 29
53 53
54#ifdef CONFIG_OMAP4_ERRATA_I688
55/* Used to implement memory barrier on DRAM path */
56#define OMAP4_DRAM_BARRIER_VA 0xfe600000
57
58void __iomem *dram_sync, *sram_sync;
59
60static phys_addr_t paddr;
61static u32 size;
62
63void omap_bus_sync(void)
64{
65 if (dram_sync && sram_sync) {
66 writel_relaxed(readl_relaxed(dram_sync), dram_sync);
67 writel_relaxed(readl_relaxed(sram_sync), sram_sync);
68 isb();
69 }
70}
71EXPORT_SYMBOL(omap_bus_sync);
72
73static int __init omap4_sram_init(void)
74{
75 struct device_node *np;
76 struct gen_pool *sram_pool;
77
78 np = of_find_compatible_node(NULL, NULL, "ti,omap4-mpu");
79 if (!np)
80 pr_warn("%s:Unable to allocate sram needed to handle errata I688\n",
81 __func__);
82 sram_pool = of_get_named_gen_pool(np, "sram", 0);
83 if (!sram_pool)
84 pr_warn("%s:Unable to get sram pool needed to handle errata I688\n",
85 __func__);
86 else
87 sram_sync = (void *)gen_pool_alloc(sram_pool, PAGE_SIZE);
88
89 return 0;
90}
91omap_arch_initcall(omap4_sram_init);
92
93/* Steal one page physical memory for barrier implementation */
94int __init omap_barrier_reserve_memblock(void)
95{
96
97 size = ALIGN(PAGE_SIZE, SZ_1M);
98 paddr = arm_memblock_steal(size, SZ_1M);
99
100 return 0;
101}
102
103void __init omap_barriers_init(void)
104{
105 struct map_desc dram_io_desc[1];
106
107 dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA;
108 dram_io_desc[0].pfn = __phys_to_pfn(paddr);
109 dram_io_desc[0].length = size;
110 dram_io_desc[0].type = MT_MEMORY_RW_SO;
111 iotable_init(dram_io_desc, ARRAY_SIZE(dram_io_desc));
112 dram_sync = (void __iomem *) dram_io_desc[0].virtual;
113
114 pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n",
115 (long long) paddr, dram_io_desc[0].virtual);
116
117}
118#else
119void __init omap_barriers_init(void)
120{}
121#endif
122
123void gic_dist_disable(void) 54void gic_dist_disable(void)
124{ 55{
125 if (gic_dist_base_addr) 56 if (gic_dist_base_addr)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index be9541e18650..166b18f515a2 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -690,6 +690,9 @@ struct dev_pm_domain omap_device_pm_domain = {
690 USE_PLATFORM_PM_SLEEP_OPS 690 USE_PLATFORM_PM_SLEEP_OPS
691 .suspend_noirq = _od_suspend_noirq, 691 .suspend_noirq = _od_suspend_noirq,
692 .resume_noirq = _od_resume_noirq, 692 .resume_noirq = _od_resume_noirq,
693 .freeze_noirq = _od_suspend_noirq,
694 .thaw_noirq = _od_resume_noirq,
695 .restore_noirq = _od_resume_noirq,
693 } 696 }
694}; 697};
695 698
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 8eb85925e444..e2223148ba4d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -20,6 +20,7 @@
20#include "omap_hwmod_33xx_43xx_common_data.h" 20#include "omap_hwmod_33xx_43xx_common_data.h"
21#include "prcm43xx.h" 21#include "prcm43xx.h"
22#include "omap_hwmod_common_data.h" 22#include "omap_hwmod_common_data.h"
23#include "hdq1w.h"
23 24
24 25
25/* IP blocks */ 26/* IP blocks */
@@ -516,6 +517,33 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
516 .parent_hwmod = &am43xx_dss_core_hwmod, 517 .parent_hwmod = &am43xx_dss_core_hwmod,
517}; 518};
518 519
520/* HDQ1W */
521static struct omap_hwmod_class_sysconfig am43xx_hdq1w_sysc = {
522 .rev_offs = 0x0000,
523 .sysc_offs = 0x0014,
524 .syss_offs = 0x0018,
525 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
526 .sysc_fields = &omap_hwmod_sysc_type1,
527};
528
529static struct omap_hwmod_class am43xx_hdq1w_hwmod_class = {
530 .name = "hdq1w",
531 .sysc = &am43xx_hdq1w_sysc,
532 .reset = &omap_hdq1w_reset,
533};
534
535static struct omap_hwmod am43xx_hdq1w_hwmod = {
536 .name = "hdq1w",
537 .class = &am43xx_hdq1w_hwmod_class,
538 .clkdm_name = "l4ls_clkdm",
539 .prcm = {
540 .omap4 = {
541 .clkctrl_offs = AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET,
542 .modulemode = MODULEMODE_SWCTRL,
543 },
544 },
545};
546
519/* Interfaces */ 547/* Interfaces */
520static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { 548static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
521 .master = &am33xx_l3_main_hwmod, 549 .master = &am33xx_l3_main_hwmod,
@@ -790,6 +818,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
790 .user = OCP_USER_MPU | OCP_USER_SDMA, 818 .user = OCP_USER_MPU | OCP_USER_SDMA,
791}; 819};
792 820
821static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = {
822 .master = &am33xx_l4_ls_hwmod,
823 .slave = &am43xx_hdq1w_hwmod,
824 .clk = "l4ls_gclk",
825 .user = OCP_USER_MPU | OCP_USER_SDMA,
826};
827
793static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { 828static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
794 &am33xx_l4_wkup__synctimer, 829 &am33xx_l4_wkup__synctimer,
795 &am43xx_l4_ls__timer8, 830 &am43xx_l4_ls__timer8,
@@ -889,6 +924,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
889 &am43xx_l4_ls__dss, 924 &am43xx_l4_ls__dss,
890 &am43xx_l4_ls__dss_dispc, 925 &am43xx_l4_ls__dss_dispc,
891 &am43xx_l4_ls__dss_rfbi, 926 &am43xx_l4_ls__dss_rfbi,
927 &am43xx_l4_ls__hdq1w,
892 NULL, 928 NULL,
893}; 929};
894 930
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 16fe7a1b7a35..0e64c2fac0b5 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1726,21 +1726,6 @@ static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1726 .sysc = &dra7xx_timer_1ms_sysc, 1726 .sysc = &dra7xx_timer_1ms_sysc,
1727}; 1727};
1728 1728
1729static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
1730 .rev_offs = 0x0000,
1731 .sysc_offs = 0x0010,
1732 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1733 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1734 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1735 SIDLE_SMART_WKUP),
1736 .sysc_fields = &omap_hwmod_sysc_type2,
1737};
1738
1739static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
1740 .name = "timer",
1741 .sysc = &dra7xx_timer_secure_sysc,
1742};
1743
1744static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = { 1729static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1745 .rev_offs = 0x0000, 1730 .rev_offs = 0x0000,
1746 .sysc_offs = 0x0010, 1731 .sysc_offs = 0x0010,
@@ -1804,7 +1789,7 @@ static struct omap_hwmod dra7xx_timer3_hwmod = {
1804/* timer4 */ 1789/* timer4 */
1805static struct omap_hwmod dra7xx_timer4_hwmod = { 1790static struct omap_hwmod dra7xx_timer4_hwmod = {
1806 .name = "timer4", 1791 .name = "timer4",
1807 .class = &dra7xx_timer_secure_hwmod_class, 1792 .class = &dra7xx_timer_hwmod_class,
1808 .clkdm_name = "l4per_clkdm", 1793 .clkdm_name = "l4per_clkdm",
1809 .main_clk = "timer4_gfclk_mux", 1794 .main_clk = "timer4_gfclk_mux",
1810 .prcm = { 1795 .prcm = {
@@ -1921,6 +1906,66 @@ static struct omap_hwmod dra7xx_timer11_hwmod = {
1921 }, 1906 },
1922}; 1907};
1923 1908
1909/* timer13 */
1910static struct omap_hwmod dra7xx_timer13_hwmod = {
1911 .name = "timer13",
1912 .class = &dra7xx_timer_hwmod_class,
1913 .clkdm_name = "l4per3_clkdm",
1914 .main_clk = "timer13_gfclk_mux",
1915 .prcm = {
1916 .omap4 = {
1917 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
1918 .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
1919 .modulemode = MODULEMODE_SWCTRL,
1920 },
1921 },
1922};
1923
1924/* timer14 */
1925static struct omap_hwmod dra7xx_timer14_hwmod = {
1926 .name = "timer14",
1927 .class = &dra7xx_timer_hwmod_class,
1928 .clkdm_name = "l4per3_clkdm",
1929 .main_clk = "timer14_gfclk_mux",
1930 .prcm = {
1931 .omap4 = {
1932 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
1933 .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
1934 .modulemode = MODULEMODE_SWCTRL,
1935 },
1936 },
1937};
1938
1939/* timer15 */
1940static struct omap_hwmod dra7xx_timer15_hwmod = {
1941 .name = "timer15",
1942 .class = &dra7xx_timer_hwmod_class,
1943 .clkdm_name = "l4per3_clkdm",
1944 .main_clk = "timer15_gfclk_mux",
1945 .prcm = {
1946 .omap4 = {
1947 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
1948 .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
1949 .modulemode = MODULEMODE_SWCTRL,
1950 },
1951 },
1952};
1953
1954/* timer16 */
1955static struct omap_hwmod dra7xx_timer16_hwmod = {
1956 .name = "timer16",
1957 .class = &dra7xx_timer_hwmod_class,
1958 .clkdm_name = "l4per3_clkdm",
1959 .main_clk = "timer16_gfclk_mux",
1960 .prcm = {
1961 .omap4 = {
1962 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
1963 .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
1964 .modulemode = MODULEMODE_SWCTRL,
1965 },
1966 },
1967};
1968
1924/* 1969/*
1925 * 'uart' class 1970 * 'uart' class
1926 * 1971 *
@@ -3059,6 +3104,38 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
3059 .user = OCP_USER_MPU | OCP_USER_SDMA, 3104 .user = OCP_USER_MPU | OCP_USER_SDMA,
3060}; 3105};
3061 3106
3107/* l4_per3 -> timer13 */
3108static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
3109 .master = &dra7xx_l4_per3_hwmod,
3110 .slave = &dra7xx_timer13_hwmod,
3111 .clk = "l3_iclk_div",
3112 .user = OCP_USER_MPU | OCP_USER_SDMA,
3113};
3114
3115/* l4_per3 -> timer14 */
3116static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
3117 .master = &dra7xx_l4_per3_hwmod,
3118 .slave = &dra7xx_timer14_hwmod,
3119 .clk = "l3_iclk_div",
3120 .user = OCP_USER_MPU | OCP_USER_SDMA,
3121};
3122
3123/* l4_per3 -> timer15 */
3124static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
3125 .master = &dra7xx_l4_per3_hwmod,
3126 .slave = &dra7xx_timer15_hwmod,
3127 .clk = "l3_iclk_div",
3128 .user = OCP_USER_MPU | OCP_USER_SDMA,
3129};
3130
3131/* l4_per3 -> timer16 */
3132static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
3133 .master = &dra7xx_l4_per3_hwmod,
3134 .slave = &dra7xx_timer16_hwmod,
3135 .clk = "l3_iclk_div",
3136 .user = OCP_USER_MPU | OCP_USER_SDMA,
3137};
3138
3062/* l4_per1 -> uart1 */ 3139/* l4_per1 -> uart1 */
3063static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = { 3140static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
3064 .master = &dra7xx_l4_per1_hwmod, 3141 .master = &dra7xx_l4_per1_hwmod,
@@ -3295,6 +3372,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3295 &dra7xx_l4_per1__timer9, 3372 &dra7xx_l4_per1__timer9,
3296 &dra7xx_l4_per1__timer10, 3373 &dra7xx_l4_per1__timer10,
3297 &dra7xx_l4_per1__timer11, 3374 &dra7xx_l4_per1__timer11,
3375 &dra7xx_l4_per3__timer13,
3376 &dra7xx_l4_per3__timer14,
3377 &dra7xx_l4_per3__timer15,
3378 &dra7xx_l4_per3__timer16,
3298 &dra7xx_l4_per1__uart1, 3379 &dra7xx_l4_per1__uart1,
3299 &dra7xx_l4_per1__uart2, 3380 &dra7xx_l4_per1__uart2,
3300 &dra7xx_l4_per1__uart3, 3381 &dra7xx_l4_per1__uart3,
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index e642b079e9f3..af11511dda50 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -14,7 +14,6 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <linux/ti_wilink_st.h> 16#include <linux/ti_wilink_st.h>
17#include <linux/wl12xx.h>
18 17
19#include <linux/platform_data/pinctrl-single.h> 18#include <linux/platform_data/pinctrl-single.h>
20#include <linux/platform_data/iommu-omap.h> 19#include <linux/platform_data/iommu-omap.h>
@@ -35,34 +34,6 @@ struct pdata_init {
35struct of_dev_auxdata omap_auxdata_lookup[]; 34struct of_dev_auxdata omap_auxdata_lookup[];
36static struct twl4030_gpio_platform_data twl_gpio_auxdata; 35static struct twl4030_gpio_platform_data twl_gpio_auxdata;
37 36
38#if IS_ENABLED(CONFIG_WL12XX)
39
40static struct wl12xx_platform_data wl12xx __initdata;
41
42static void __init __used legacy_init_wl12xx(unsigned ref_clock,
43 unsigned tcxo_clock,
44 int gpio)
45{
46 int res;
47
48 wl12xx.board_ref_clock = ref_clock;
49 wl12xx.board_tcxo_clock = tcxo_clock;
50 wl12xx.irq = gpio_to_irq(gpio);
51
52 res = wl12xx_set_platform_data(&wl12xx);
53 if (res) {
54 pr_err("error setting wl12xx data: %d\n", res);
55 return;
56 }
57}
58#else
59static inline void legacy_init_wl12xx(unsigned ref_clock,
60 unsigned tcxo_clock,
61 int gpio)
62{
63}
64#endif
65
66#ifdef CONFIG_MACH_NOKIA_N8X0 37#ifdef CONFIG_MACH_NOKIA_N8X0
67static void __init omap2420_n8x0_legacy_init(void) 38static void __init omap2420_n8x0_legacy_init(void)
68{ 39{
@@ -129,7 +100,6 @@ static void __init omap3_sbc_t3730_twl_init(void)
129static void __init omap3_sbc_t3730_legacy_init(void) 100static void __init omap3_sbc_t3730_legacy_init(void)
130{ 101{
131 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub"); 102 omap3_sbc_t3x_usb_hub_init(167, "sb-t35 usb hub");
132 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 136);
133} 103}
134 104
135static void __init omap3_sbc_t3530_legacy_init(void) 105static void __init omap3_sbc_t3530_legacy_init(void)
@@ -159,14 +129,12 @@ static struct platform_device btwilink_device = {
159 129
160static void __init omap3_igep0020_rev_f_legacy_init(void) 130static void __init omap3_igep0020_rev_f_legacy_init(void)
161{ 131{
162 legacy_init_wl12xx(0, 0, 177);
163 platform_device_register(&wl18xx_device); 132 platform_device_register(&wl18xx_device);
164 platform_device_register(&btwilink_device); 133 platform_device_register(&btwilink_device);
165} 134}
166 135
167static void __init omap3_igep0030_rev_g_legacy_init(void) 136static void __init omap3_igep0030_rev_g_legacy_init(void)
168{ 137{
169 legacy_init_wl12xx(0, 0, 136);
170 platform_device_register(&wl18xx_device); 138 platform_device_register(&wl18xx_device);
171 platform_device_register(&btwilink_device); 139 platform_device_register(&btwilink_device);
172} 140}
@@ -174,12 +142,6 @@ static void __init omap3_igep0030_rev_g_legacy_init(void)
174static void __init omap3_evm_legacy_init(void) 142static void __init omap3_evm_legacy_init(void)
175{ 143{
176 hsmmc2_internal_input_clk(); 144 hsmmc2_internal_input_clk();
177 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149);
178}
179
180static void __init omap3_zoom_legacy_init(void)
181{
182 legacy_init_wl12xx(WL12XX_REFCLOCK_26, 0, 162);
183} 145}
184 146
185static void am35xx_enable_emac_int(void) 147static void am35xx_enable_emac_int(void)
@@ -246,7 +208,6 @@ static void __init omap3_sbc_t3517_legacy_init(void)
246 am35xx_emac_reset(); 208 am35xx_emac_reset();
247 hsmmc2_internal_input_clk(); 209 hsmmc2_internal_input_clk();
248 omap3_sbc_t3517_wifi_init(); 210 omap3_sbc_t3517_wifi_init();
249 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 145);
250} 211}
251 212
252static void __init am3517_evm_legacy_init(void) 213static void __init am3517_evm_legacy_init(void)
@@ -288,24 +249,6 @@ static void __init omap3_tao3530_legacy_init(void)
288} 249}
289#endif /* CONFIG_ARCH_OMAP3 */ 250#endif /* CONFIG_ARCH_OMAP3 */
290 251
291#ifdef CONFIG_ARCH_OMAP4
292static void __init omap4_sdp_legacy_init(void)
293{
294 legacy_init_wl12xx(WL12XX_REFCLOCK_26,
295 WL12XX_TCXOCLOCK_26, 53);
296}
297
298static void __init omap4_panda_legacy_init(void)
299{
300 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 53);
301}
302
303static void __init var_som_om44_legacy_init(void)
304{
305 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 41);
306}
307#endif
308
309#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 252#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
310static struct iommu_platform_data omap4_iommu_pdata = { 253static struct iommu_platform_data omap4_iommu_pdata = {
311 .reset_name = "mmu_cache", 254 .reset_name = "mmu_cache",
@@ -314,13 +257,6 @@ static struct iommu_platform_data omap4_iommu_pdata = {
314}; 257};
315#endif 258#endif
316 259
317#ifdef CONFIG_SOC_AM33XX
318static void __init am335x_evmsk_legacy_init(void)
319{
320 legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 31);
321}
322#endif
323
324#ifdef CONFIG_SOC_OMAP5 260#ifdef CONFIG_SOC_OMAP5
325static void __init omap5_uevm_legacy_init(void) 261static void __init omap5_uevm_legacy_init(void)
326{ 262{
@@ -421,19 +357,9 @@ static struct pdata_init pdata_quirks[] __initdata = {
421 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, }, 357 { "isee,omap3-igep0020-rev-f", omap3_igep0020_rev_f_legacy_init, },
422 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, }, 358 { "isee,omap3-igep0030-rev-g", omap3_igep0030_rev_g_legacy_init, },
423 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, 359 { "ti,omap3-evm-37xx", omap3_evm_legacy_init, },
424 { "ti,omap3-zoom3", omap3_zoom_legacy_init, },
425 { "ti,am3517-evm", am3517_evm_legacy_init, }, 360 { "ti,am3517-evm", am3517_evm_legacy_init, },
426 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, }, 361 { "technexion,omap3-tao3530", omap3_tao3530_legacy_init, },
427#endif 362#endif
428#ifdef CONFIG_ARCH_OMAP4
429 { "ti,omap4-sdp", omap4_sdp_legacy_init, },
430 { "ti,omap4-panda", omap4_panda_legacy_init, },
431 { "variscite,var-dvk-om44", var_som_om44_legacy_init, },
432 { "variscite,var-stk-om44", var_som_om44_legacy_init, },
433#endif
434#ifdef CONFIG_SOC_AM33XX
435 { "ti,am335x-evmsk", am335x_evmsk_legacy_init, },
436#endif
437#ifdef CONFIG_SOC_OMAP5 363#ifdef CONFIG_SOC_OMAP5
438 { "ti,omap5-uevm", omap5_uevm_legacy_init, }, 364 { "ti,omap5-uevm", omap5_uevm_legacy_init, },
439#endif 365#endif
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index fe01c5a03aa2..b1aad7e1426c 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -75,9 +75,9 @@ static int omap2_enter_full_retention(void)
75 75
76 /* Clear old wake-up events */ 76 /* Clear old wake-up events */
77 /* REVISIT: These write to reserved bits? */ 77 /* REVISIT: These write to reserved bits? */
78 omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0); 78 omap_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
79 omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0); 79 omap_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
80 omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0); 80 omap_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0);
81 81
82 pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET); 82 pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET);
83 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET); 83 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
@@ -104,18 +104,16 @@ no_sleep:
104 clk_enable(osc_ck); 104 clk_enable(osc_ck);
105 105
106 /* clear CORE wake-up events */ 106 /* clear CORE wake-up events */
107 omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0); 107 omap_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
108 omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0); 108 omap_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
109 109
110 /* wakeup domain events - bit 1: GPT1, bit5 GPIO */ 110 /* wakeup domain events - bit 1: GPT1, bit5 GPIO */
111 omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, 0x4 | 0x1); 111 omap_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, 0x4 | 0x1);
112 112
113 /* MPU domain wake events */ 113 /* MPU domain wake events */
114 omap2xxx_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET, 114 omap_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET, 0x1);
115 0x1);
116 115
117 omap2xxx_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET, 116 omap_prm_clear_mod_irqs(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET, 0x20);
118 0x20);
119 117
120 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); 118 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON);
121 pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_ON); 119 pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_ON);
@@ -143,9 +141,9 @@ static void omap2_enter_mpu_retention(void)
143 * it is in retention mode. */ 141 * it is in retention mode. */
144 if (omap2_allow_mpu_retention()) { 142 if (omap2_allow_mpu_retention()) {
145 /* REVISIT: These write to reserved bits? */ 143 /* REVISIT: These write to reserved bits? */
146 omap2xxx_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0); 144 omap_prm_clear_mod_irqs(CORE_MOD, PM_WKST1, ~0);
147 omap2xxx_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0); 145 omap_prm_clear_mod_irqs(CORE_MOD, OMAP24XX_PM_WKST2, ~0);
148 omap2xxx_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0); 146 omap_prm_clear_mod_irqs(WKUP_MOD, PM_WKST, ~0);
149 147
150 /* Try to enter MPU retention */ 148 /* Try to enter MPU retention */
151 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET); 149 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_RET);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 88721df6001d..87b98bf92366 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -137,9 +137,8 @@ static irqreturn_t _prcm_int_handle_io(int irq, void *unused)
137{ 137{
138 int c; 138 int c;
139 139
140 c = omap3xxx_prm_clear_mod_irqs(WKUP_MOD, 1, 140 c = omap_prm_clear_mod_irqs(WKUP_MOD, 1, OMAP3430_ST_IO_MASK |
141 ~(OMAP3430_ST_IO_MASK | 141 OMAP3430_ST_IO_CHAIN_MASK);
142 OMAP3430_ST_IO_CHAIN_MASK));
143 142
144 return c ? IRQ_HANDLED : IRQ_NONE; 143 return c ? IRQ_HANDLED : IRQ_NONE;
145} 144}
@@ -153,14 +152,13 @@ static irqreturn_t _prcm_int_handle_wakeup(int irq, void *unused)
153 * these are handled in a separate handler to avoid acking 152 * these are handled in a separate handler to avoid acking
154 * IO events before parsing in mux code 153 * IO events before parsing in mux code
155 */ 154 */
156 c = omap3xxx_prm_clear_mod_irqs(WKUP_MOD, 1, 155 c = omap_prm_clear_mod_irqs(WKUP_MOD, 1, ~(OMAP3430_ST_IO_MASK |
157 OMAP3430_ST_IO_MASK | 156 OMAP3430_ST_IO_CHAIN_MASK));
158 OMAP3430_ST_IO_CHAIN_MASK); 157 c += omap_prm_clear_mod_irqs(CORE_MOD, 1, ~0);
159 c += omap3xxx_prm_clear_mod_irqs(CORE_MOD, 1, 0); 158 c += omap_prm_clear_mod_irqs(OMAP3430_PER_MOD, 1, ~0);
160 c += omap3xxx_prm_clear_mod_irqs(OMAP3430_PER_MOD, 1, 0);
161 if (omap_rev() > OMAP3430_REV_ES1_0) { 159 if (omap_rev() > OMAP3430_REV_ES1_0) {
162 c += omap3xxx_prm_clear_mod_irqs(CORE_MOD, 3, 0); 160 c += omap_prm_clear_mod_irqs(CORE_MOD, 3, ~0);
163 c += omap3xxx_prm_clear_mod_irqs(OMAP3430ES2_USBHOST_MOD, 1, 0); 161 c += omap_prm_clear_mod_irqs(OMAP3430ES2_USBHOST_MOD, 1, ~0);
164 } 162 }
165 163
166 return c ? IRQ_HANDLED : IRQ_NONE; 164 return c ? IRQ_HANDLED : IRQ_NONE;
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 6163d66102a3..6ae0b3a1781e 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -518,6 +518,26 @@ struct omap_prcm_irq_setup {
518 .priority = _priority \ 518 .priority = _priority \
519 } 519 }
520 520
521/**
522 * struct omap_prcm_init_data - PRCM driver init data
523 * @index: clock memory mapping index to be used
524 * @mem: IO mem pointer for this module
525 * @offset: module base address offset from the IO base
526 * @flags: PRCM module init flags
527 * @device_inst_offset: device instance offset within the module address space
528 * @init: low level PRCM init function for this module
529 * @np: device node for this PRCM module
530 */
531struct omap_prcm_init_data {
532 int index;
533 void __iomem *mem;
534 s16 offset;
535 u16 flags;
536 s32 device_inst_offset;
537 int (*init)(const struct omap_prcm_init_data *data);
538 struct device_node *np;
539};
540
521extern void omap_prcm_irq_cleanup(void); 541extern void omap_prcm_irq_cleanup(void);
522extern int omap_prcm_register_chain_handler( 542extern int omap_prcm_register_chain_handler(
523 struct omap_prcm_irq_setup *irq_setup); 543 struct omap_prcm_irq_setup *irq_setup);
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index ad7b3e9977f8..48df3b55057e 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -143,5 +143,6 @@
143#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268 143#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268
144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0
145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20
146#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0
146 147
147#endif 148#endif
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index b9061a6a2db8..233bc84fbc0e 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -19,8 +19,9 @@
19extern void __iomem *prm_base; 19extern void __iomem *prm_base;
20extern u16 prm_features; 20extern u16 prm_features;
21extern void omap2_set_globals_prm(void __iomem *prm); 21extern void omap2_set_globals_prm(void __iomem *prm);
22int of_prcm_init(void); 22int omap_prcm_init(void);
23void omap3_prcm_legacy_iomaps_init(void); 23int omap2_prm_base_init(void);
24int omap2_prcm_base_init(void);
24# endif 25# endif
25 26
26/* 27/*
@@ -28,9 +29,11 @@ void omap3_prcm_legacy_iomaps_init(void);
28 * 29 *
29 * PRM_HAS_IO_WAKEUP: has IO wakeup capability 30 * PRM_HAS_IO_WAKEUP: has IO wakeup capability
30 * PRM_HAS_VOLTAGE: has voltage domains 31 * PRM_HAS_VOLTAGE: has voltage domains
32 * PRM_IRQ_DEFAULT: use default irq number for PRM irq
31 */ 33 */
32#define PRM_HAS_IO_WAKEUP (1 << 0) 34#define PRM_HAS_IO_WAKEUP BIT(0)
33#define PRM_HAS_VOLTAGE (1 << 1) 35#define PRM_HAS_VOLTAGE BIT(1)
36#define PRM_IRQ_DEFAULT BIT(2)
34 37
35/* 38/*
36 * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP 39 * MAX_MODULE_SOFTRESET_WAIT: Maximum microseconds to wait for OMAP
@@ -146,6 +149,9 @@ struct prm_ll_data {
146 int (*is_hardreset_asserted)(u8 shift, u8 part, s16 prm_mod, 149 int (*is_hardreset_asserted)(u8 shift, u8 part, s16 prm_mod,
147 u16 offset); 150 u16 offset);
148 void (*reset_system)(void); 151 void (*reset_system)(void);
152 int (*clear_mod_irqs)(s16 module, u8 regs, u32 wkst_mask);
153 u32 (*vp_check_txdone)(u8 vp_id);
154 void (*vp_clear_txdone)(u8 vp_id);
149}; 155};
150 156
151extern int prm_register(struct prm_ll_data *pld); 157extern int prm_register(struct prm_ll_data *pld);
@@ -161,6 +167,19 @@ extern void prm_clear_context_loss_flags_old(u8 part, s16 inst, u16 idx);
161void omap_prm_reset_system(void); 167void omap_prm_reset_system(void);
162 168
163void omap_prm_reconfigure_io_chain(void); 169void omap_prm_reconfigure_io_chain(void);
170int omap_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask);
171
172/*
173 * Voltage Processor (VP) identifiers
174 */
175#define OMAP3_VP_VDD_MPU_ID 0
176#define OMAP3_VP_VDD_CORE_ID 1
177#define OMAP4_VP_VDD_CORE_ID 0
178#define OMAP4_VP_VDD_IVA_ID 1
179#define OMAP4_VP_VDD_MPU_ID 2
180
181u32 omap_prm_vp_check_txdone(u8 vp_id);
182void omap_prm_vp_clear_txdone(u8 vp_id);
164 183
165#endif 184#endif
166 185
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c
index af0f15278fc2..752018ce129c 100644
--- a/arch/arm/mach-omap2/prm2xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx.c
@@ -123,13 +123,14 @@ static void omap2xxx_prm_dpll_reset(void)
123 * Clears wakeup status bits for a given module, so that the device can 123 * Clears wakeup status bits for a given module, so that the device can
124 * re-enter idle. 124 * re-enter idle.
125 */ 125 */
126void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask) 126static int omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask)
127{ 127{
128 u32 wkst; 128 u32 wkst;
129 129
130 wkst = omap2_prm_read_mod_reg(module, regs); 130 wkst = omap2_prm_read_mod_reg(module, regs);
131 wkst &= wkst_mask; 131 wkst &= wkst_mask;
132 omap2_prm_write_mod_reg(wkst, module, regs); 132 omap2_prm_write_mod_reg(wkst, module, regs);
133 return 0;
133} 134}
134 135
135int omap2xxx_clkdm_sleep(struct clockdomain *clkdm) 136int omap2xxx_clkdm_sleep(struct clockdomain *clkdm)
@@ -216,9 +217,10 @@ static struct prm_ll_data omap2xxx_prm_ll_data = {
216 .deassert_hardreset = &omap2_prm_deassert_hardreset, 217 .deassert_hardreset = &omap2_prm_deassert_hardreset,
217 .is_hardreset_asserted = &omap2_prm_is_hardreset_asserted, 218 .is_hardreset_asserted = &omap2_prm_is_hardreset_asserted,
218 .reset_system = &omap2xxx_prm_dpll_reset, 219 .reset_system = &omap2xxx_prm_dpll_reset,
220 .clear_mod_irqs = &omap2xxx_prm_clear_mod_irqs,
219}; 221};
220 222
221int __init omap2xxx_prm_init(void) 223int __init omap2xxx_prm_init(const struct omap_prcm_init_data *data)
222{ 224{
223 return prm_register(&omap2xxx_prm_ll_data); 225 return prm_register(&omap2xxx_prm_ll_data);
224} 226}
diff --git a/arch/arm/mach-omap2/prm2xxx.h b/arch/arm/mach-omap2/prm2xxx.h
index 1d51643062f7..9008a9e55a1a 100644
--- a/arch/arm/mach-omap2/prm2xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx.h
@@ -124,9 +124,7 @@
124extern int omap2xxx_clkdm_sleep(struct clockdomain *clkdm); 124extern int omap2xxx_clkdm_sleep(struct clockdomain *clkdm);
125extern int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm); 125extern int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm);
126 126
127void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask); 127int __init omap2xxx_prm_init(const struct omap_prcm_init_data *data);
128
129extern int __init omap2xxx_prm_init(void);
130 128
131#endif 129#endif
132 130
diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c
index 02f628601b09..dcb5001d77da 100644
--- a/arch/arm/mach-omap2/prm33xx.c
+++ b/arch/arm/mach-omap2/prm33xx.c
@@ -378,7 +378,7 @@ static struct prm_ll_data am33xx_prm_ll_data = {
378 .reset_system = am33xx_prm_global_warm_sw_reset, 378 .reset_system = am33xx_prm_global_warm_sw_reset,
379}; 379};
380 380
381int __init am33xx_prm_init(void) 381int __init am33xx_prm_init(const struct omap_prcm_init_data *data)
382{ 382{
383 return prm_register(&am33xx_prm_ll_data); 383 return prm_register(&am33xx_prm_ll_data);
384} 384}
diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h
index 98ac41f271da..2bc4ec52ba78 100644
--- a/arch/arm/mach-omap2/prm33xx.h
+++ b/arch/arm/mach-omap2/prm33xx.h
@@ -118,7 +118,7 @@
118#define AM33XX_PM_CEFUSE_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004) 118#define AM33XX_PM_CEFUSE_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004)
119 119
120#ifndef __ASSEMBLER__ 120#ifndef __ASSEMBLER__
121int am33xx_prm_init(void); 121int am33xx_prm_init(const struct omap_prcm_init_data *data);
122 122
123#endif /* ASSEMBLER */ 123#endif /* ASSEMBLER */
124#endif 124#endif
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 5713bbdf83bc..62680aad2126 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -29,6 +29,7 @@
29#include "prm-regbits-34xx.h" 29#include "prm-regbits-34xx.h"
30#include "cm3xxx.h" 30#include "cm3xxx.h"
31#include "cm-regbits-34xx.h" 31#include "cm-regbits-34xx.h"
32#include "clock.h"
32 33
33static void omap3xxx_prm_read_pending_irqs(unsigned long *events); 34static void omap3xxx_prm_read_pending_irqs(unsigned long *events);
34static void omap3xxx_prm_ocp_barrier(void); 35static void omap3xxx_prm_ocp_barrier(void);
@@ -96,7 +97,7 @@ static struct omap3_vp omap3_vp[] = {
96 97
97#define MAX_VP_ID ARRAY_SIZE(omap3_vp); 98#define MAX_VP_ID ARRAY_SIZE(omap3_vp);
98 99
99u32 omap3_prm_vp_check_txdone(u8 vp_id) 100static u32 omap3_prm_vp_check_txdone(u8 vp_id)
100{ 101{
101 struct omap3_vp *vp = &omap3_vp[vp_id]; 102 struct omap3_vp *vp = &omap3_vp[vp_id];
102 u32 irqstatus; 103 u32 irqstatus;
@@ -106,7 +107,7 @@ u32 omap3_prm_vp_check_txdone(u8 vp_id)
106 return irqstatus & vp->tranxdone_status; 107 return irqstatus & vp->tranxdone_status;
107} 108}
108 109
109void omap3_prm_vp_clear_txdone(u8 vp_id) 110static void omap3_prm_vp_clear_txdone(u8 vp_id)
110{ 111{
111 struct omap3_vp *vp = &omap3_vp[vp_id]; 112 struct omap3_vp *vp = &omap3_vp[vp_id];
112 113
@@ -217,7 +218,7 @@ static void omap3xxx_prm_restore_irqen(u32 *saved_mask)
217 * omap3xxx_prm_clear_mod_irqs - clear wake-up events from PRCM interrupt 218 * omap3xxx_prm_clear_mod_irqs - clear wake-up events from PRCM interrupt
218 * @module: PRM module to clear wakeups from 219 * @module: PRM module to clear wakeups from
219 * @regs: register set to clear, 1 or 3 220 * @regs: register set to clear, 1 or 3
220 * @ignore_bits: wakeup status bits to ignore 221 * @wkst_mask: wkst bits to clear
221 * 222 *
222 * The purpose of this function is to clear any wake-up events latched 223 * The purpose of this function is to clear any wake-up events latched
223 * in the PRCM PM_WKST_x registers. It is possible that a wake-up event 224 * in the PRCM PM_WKST_x registers. It is possible that a wake-up event
@@ -226,7 +227,7 @@ static void omap3xxx_prm_restore_irqen(u32 *saved_mask)
226 * that any peripheral wake-up events occurring while attempting to 227 * that any peripheral wake-up events occurring while attempting to
227 * clear the PM_WKST_x are detected and cleared. 228 * clear the PM_WKST_x are detected and cleared.
228 */ 229 */
229int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits) 230static int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask)
230{ 231{
231 u32 wkst, fclk, iclk, clken; 232 u32 wkst, fclk, iclk, clken;
232 u16 wkst_off = (regs == 3) ? OMAP3430ES2_PM_WKST3 : PM_WKST1; 233 u16 wkst_off = (regs == 3) ? OMAP3430ES2_PM_WKST3 : PM_WKST1;
@@ -238,7 +239,7 @@ int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
238 239
239 wkst = omap2_prm_read_mod_reg(module, wkst_off); 240 wkst = omap2_prm_read_mod_reg(module, wkst_off);
240 wkst &= omap2_prm_read_mod_reg(module, grpsel_off); 241 wkst &= omap2_prm_read_mod_reg(module, grpsel_off);
241 wkst &= ~ignore_bits; 242 wkst &= wkst_mask;
242 if (wkst) { 243 if (wkst) {
243 iclk = omap2_cm_read_mod_reg(module, iclk_off); 244 iclk = omap2_cm_read_mod_reg(module, iclk_off);
244 fclk = omap2_cm_read_mod_reg(module, fclk_off); 245 fclk = omap2_cm_read_mod_reg(module, fclk_off);
@@ -254,7 +255,7 @@ int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits)
254 omap2_cm_set_mod_reg_bits(clken, module, fclk_off); 255 omap2_cm_set_mod_reg_bits(clken, module, fclk_off);
255 omap2_prm_write_mod_reg(wkst, module, wkst_off); 256 omap2_prm_write_mod_reg(wkst, module, wkst_off);
256 wkst = omap2_prm_read_mod_reg(module, wkst_off); 257 wkst = omap2_prm_read_mod_reg(module, wkst_off);
257 wkst &= ~ignore_bits; 258 wkst &= wkst_mask;
258 c++; 259 c++;
259 } 260 }
260 omap2_cm_write_mod_reg(iclk, module, iclk_off); 261 omap2_cm_write_mod_reg(iclk, module, iclk_off);
@@ -664,10 +665,15 @@ static struct prm_ll_data omap3xxx_prm_ll_data = {
664 .deassert_hardreset = &omap2_prm_deassert_hardreset, 665 .deassert_hardreset = &omap2_prm_deassert_hardreset,
665 .is_hardreset_asserted = &omap2_prm_is_hardreset_asserted, 666 .is_hardreset_asserted = &omap2_prm_is_hardreset_asserted,
666 .reset_system = &omap3xxx_prm_dpll3_reset, 667 .reset_system = &omap3xxx_prm_dpll3_reset,
668 .clear_mod_irqs = &omap3xxx_prm_clear_mod_irqs,
669 .vp_check_txdone = &omap3_prm_vp_check_txdone,
670 .vp_clear_txdone = &omap3_prm_vp_clear_txdone,
667}; 671};
668 672
669int __init omap3xxx_prm_init(void) 673int __init omap3xxx_prm_init(const struct omap_prcm_init_data *data)
670{ 674{
675 omap2_clk_legacy_provider_init(TI_CLKM_PRM,
676 prm_base + OMAP3430_IVA2_MOD);
671 if (omap3_has_io_wakeup()) 677 if (omap3_has_io_wakeup())
672 prm_features |= PRM_HAS_IO_WAKEUP; 678 prm_features |= PRM_HAS_IO_WAKEUP;
673 679
diff --git a/arch/arm/mach-omap2/prm3xxx.h b/arch/arm/mach-omap2/prm3xxx.h
index ed8a3d8b739a..5f095eec339c 100644
--- a/arch/arm/mach-omap2/prm3xxx.h
+++ b/arch/arm/mach-omap2/prm3xxx.h
@@ -132,10 +132,6 @@
132 132
133#ifndef __ASSEMBLER__ 133#ifndef __ASSEMBLER__
134 134
135/* OMAP3-specific VP functions */
136u32 omap3_prm_vp_check_txdone(u8 vp_id);
137void omap3_prm_vp_clear_txdone(u8 vp_id);
138
139/* 135/*
140 * OMAP3 access functions for voltage controller (VC) and 136 * OMAP3 access functions for voltage controller (VC) and
141 * voltage proccessor (VP) in the PRM. 137 * voltage proccessor (VP) in the PRM.
@@ -144,8 +140,7 @@ extern u32 omap3_prm_vcvp_read(u8 offset);
144extern void omap3_prm_vcvp_write(u32 val, u8 offset); 140extern void omap3_prm_vcvp_write(u32 val, u8 offset);
145extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); 141extern u32 omap3_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
146 142
147extern int __init omap3xxx_prm_init(void); 143int __init omap3xxx_prm_init(const struct omap_prcm_init_data *data);
148int omap3xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 ignore_bits);
149void omap3xxx_prm_iva_idle(void); 144void omap3xxx_prm_iva_idle(void);
150void omap3_prm_reset_modem(void); 145void omap3_prm_reset_modem(void);
151int omap3xxx_prm_clear_global_cold_reset(void); 146int omap3xxx_prm_clear_global_cold_reset(void);
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index d6d6bc39e05c..4541700f743a 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -138,7 +138,7 @@ static struct omap4_vp omap4_vp[] = {
138 }, 138 },
139}; 139};
140 140
141u32 omap4_prm_vp_check_txdone(u8 vp_id) 141static u32 omap4_prm_vp_check_txdone(u8 vp_id)
142{ 142{
143 struct omap4_vp *vp = &omap4_vp[vp_id]; 143 struct omap4_vp *vp = &omap4_vp[vp_id];
144 u32 irqstatus; 144 u32 irqstatus;
@@ -149,7 +149,7 @@ u32 omap4_prm_vp_check_txdone(u8 vp_id)
149 return irqstatus & vp->tranxdone_status; 149 return irqstatus & vp->tranxdone_status;
150} 150}
151 151
152void omap4_prm_vp_clear_txdone(u8 vp_id) 152static void omap4_prm_vp_clear_txdone(u8 vp_id)
153{ 153{
154 struct omap4_vp *vp = &omap4_vp[vp_id]; 154 struct omap4_vp *vp = &omap4_vp[vp_id];
155 155
@@ -699,29 +699,31 @@ static struct prm_ll_data omap44xx_prm_ll_data = {
699 .deassert_hardreset = omap4_prminst_deassert_hardreset, 699 .deassert_hardreset = omap4_prminst_deassert_hardreset,
700 .is_hardreset_asserted = omap4_prminst_is_hardreset_asserted, 700 .is_hardreset_asserted = omap4_prminst_is_hardreset_asserted,
701 .reset_system = omap4_prminst_global_warm_sw_reset, 701 .reset_system = omap4_prminst_global_warm_sw_reset,
702 .vp_check_txdone = omap4_prm_vp_check_txdone,
703 .vp_clear_txdone = omap4_prm_vp_clear_txdone,
702}; 704};
703 705
704int __init omap44xx_prm_init(void) 706static const struct omap_prcm_init_data *prm_init_data;
707
708int __init omap44xx_prm_init(const struct omap_prcm_init_data *data)
705{ 709{
706 if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) 710 omap_prm_base_init();
711
712 prm_init_data = data;
713
714 if (data->flags & PRM_HAS_IO_WAKEUP)
707 prm_features |= PRM_HAS_IO_WAKEUP; 715 prm_features |= PRM_HAS_IO_WAKEUP;
708 716
709 if (!soc_is_dra7xx()) 717 if (data->flags & PRM_HAS_VOLTAGE)
710 prm_features |= PRM_HAS_VOLTAGE; 718 prm_features |= PRM_HAS_VOLTAGE;
711 719
720 omap4_prminst_set_prm_dev_inst(data->device_inst_offset);
721
712 return prm_register(&omap44xx_prm_ll_data); 722 return prm_register(&omap44xx_prm_ll_data);
713} 723}
714 724
715static const struct of_device_id omap_prm_dt_match_table[] = {
716 { .compatible = "ti,omap4-prm" },
717 { .compatible = "ti,omap5-prm" },
718 { .compatible = "ti,dra7-prm" },
719 { }
720};
721
722static int omap44xx_prm_late_init(void) 725static int omap44xx_prm_late_init(void)
723{ 726{
724 struct device_node *np;
725 int irq_num; 727 int irq_num;
726 728
727 if (!(prm_features & PRM_HAS_IO_WAKEUP)) 729 if (!(prm_features & PRM_HAS_IO_WAKEUP))
@@ -731,31 +733,23 @@ static int omap44xx_prm_late_init(void)
731 if (!of_have_populated_dt()) 733 if (!of_have_populated_dt())
732 return 0; 734 return 0;
733 735
734 np = of_find_matching_node(NULL, omap_prm_dt_match_table); 736 irq_num = of_irq_get(prm_init_data->np, 0);
735 737 /*
736 if (!np) { 738 * Already have OMAP4 IRQ num. For all other platforms, we need
737 /* Default loaded up with OMAP4 values */ 739 * IRQ numbers from DT
738 if (!cpu_is_omap44xx()) 740 */
739 return 0; 741 if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
740 } else { 742 if (irq_num == -EPROBE_DEFER)
741 irq_num = of_irq_get(np, 0); 743 return irq_num;
742 /* 744
743 * Already have OMAP4 IRQ num. For all other platforms, we need 745 /* Have nothing to do */
744 * IRQ numbers from DT 746 return 0;
745 */ 747 }
746 if (irq_num < 0 && !cpu_is_omap44xx()) { 748
747 if (irq_num == -EPROBE_DEFER) 749 /* Once OMAP4 DT is filled as well */
748 return irq_num; 750 if (irq_num >= 0) {
749 751 omap4_prcm_irq_setup.irq = irq_num;
750 /* Have nothing to do */ 752 omap4_prcm_irq_setup.xlate_irq = NULL;
751 return 0;
752 }
753
754 /* Once OMAP4 DT is filled as well */
755 if (irq_num >= 0) {
756 omap4_prcm_irq_setup.irq = irq_num;
757 omap4_prcm_irq_setup.xlate_irq = NULL;
758 }
759 } 753 }
760 754
761 omap44xx_prm_enable_io_wakeup(); 755 omap44xx_prm_enable_io_wakeup();
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 7db2422faa16..efd6035d0871 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -26,7 +26,6 @@
26#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H 26#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H
27 27
28#include "prm44xx_54xx.h" 28#include "prm44xx_54xx.h"
29#include "prcm-common.h"
30#include "prm.h" 29#include "prm.h"
31 30
32#define OMAP4430_PRM_BASE 0x4a306000 31#define OMAP4430_PRM_BASE 0x4a306000
diff --git a/arch/arm/mach-omap2/prm44xx_54xx.h b/arch/arm/mach-omap2/prm44xx_54xx.h
index 714329565b90..3f139ebc8398 100644
--- a/arch/arm/mach-omap2/prm44xx_54xx.h
+++ b/arch/arm/mach-omap2/prm44xx_54xx.h
@@ -23,13 +23,11 @@
23#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H 23#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H
24#define __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H 24#define __ARCH_ARM_MACH_OMAP2_PRM44XX_54XX_H
25 25
26#include "prcm-common.h"
27
26/* Function prototypes */ 28/* Function prototypes */
27#ifndef __ASSEMBLER__ 29#ifndef __ASSEMBLER__
28 30
29/* OMAP4/OMAP5-specific VP functions */
30u32 omap4_prm_vp_check_txdone(u8 vp_id);
31void omap4_prm_vp_clear_txdone(u8 vp_id);
32
33/* 31/*
34 * OMAP4/OMAP5 access functions for voltage controller (VC) and 32 * OMAP4/OMAP5 access functions for voltage controller (VC) and
35 * voltage proccessor (VP) in the PRM. 33 * voltage proccessor (VP) in the PRM.
@@ -38,7 +36,7 @@ extern u32 omap4_prm_vcvp_read(u8 offset);
38extern void omap4_prm_vcvp_write(u32 val, u8 offset); 36extern void omap4_prm_vcvp_write(u32 val, u8 offset);
39extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset); 37extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
40 38
41extern int __init omap44xx_prm_init(void); 39int __init omap44xx_prm_init(const struct omap_prcm_init_data *data);
42 40
43#endif 41#endif
44 42
diff --git a/arch/arm/mach-omap2/prm54xx.h b/arch/arm/mach-omap2/prm54xx.h
index e4411010309c..1eb22ff087dc 100644
--- a/arch/arm/mach-omap2/prm54xx.h
+++ b/arch/arm/mach-omap2/prm54xx.h
@@ -22,7 +22,6 @@
22#define __ARCH_ARM_MACH_OMAP2_PRM54XX_H 22#define __ARCH_ARM_MACH_OMAP2_PRM54XX_H
23 23
24#include "prm44xx_54xx.h" 24#include "prm44xx_54xx.h"
25#include "prcm-common.h"
26#include "prm.h" 25#include "prm.h"
27 26
28#define OMAP54XX_PRM_BASE 0x4ae06000 27#define OMAP54XX_PRM_BASE 0x4ae06000
diff --git a/arch/arm/mach-omap2/prm7xx.h b/arch/arm/mach-omap2/prm7xx.h
index 4bb50fbf29be..cc1e6a2b97f6 100644
--- a/arch/arm/mach-omap2/prm7xx.h
+++ b/arch/arm/mach-omap2/prm7xx.h
@@ -22,8 +22,8 @@
22#ifndef __ARCH_ARM_MACH_OMAP2_PRM7XX_H 22#ifndef __ARCH_ARM_MACH_OMAP2_PRM7XX_H
23#define __ARCH_ARM_MACH_OMAP2_PRM7XX_H 23#define __ARCH_ARM_MACH_OMAP2_PRM7XX_H
24 24
25#include "prm44xx_54xx.h"
26#include "prcm-common.h" 25#include "prcm-common.h"
26#include "prm44xx_54xx.h"
27#include "prm.h" 27#include "prm.h"
28 28
29#define DRA7XX_PRM_BASE 0x4ae06000 29#define DRA7XX_PRM_BASE 0x4ae06000
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index bfaa7ba595cc..7add7994dbfc 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -32,7 +32,11 @@
32#include "prm2xxx_3xxx.h" 32#include "prm2xxx_3xxx.h"
33#include "prm2xxx.h" 33#include "prm2xxx.h"
34#include "prm3xxx.h" 34#include "prm3xxx.h"
35#include "prm33xx.h"
35#include "prm44xx.h" 36#include "prm44xx.h"
37#include "prm54xx.h"
38#include "prm7xx.h"
39#include "prcm43xx.h"
36#include "common.h" 40#include "common.h"
37#include "clock.h" 41#include "clock.h"
38#include "cm.h" 42#include "cm.h"
@@ -534,6 +538,61 @@ void omap_prm_reset_system(void)
534} 538}
535 539
536/** 540/**
541 * omap_prm_clear_mod_irqs - clear wake-up events from PRCM interrupt
542 * @module: PRM module to clear wakeups from
543 * @regs: register to clear
544 * @wkst_mask: wkst bits to clear
545 *
546 * Clears any wakeup events for the module and register set defined.
547 * Uses SoC specific implementation to do the actual wakeup status
548 * clearing.
549 */
550int omap_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask)
551{
552 if (!prm_ll_data->clear_mod_irqs) {
553 WARN_ONCE(1, "prm: %s: no mapping function defined\n",
554 __func__);
555 return -EINVAL;
556 }
557
558 return prm_ll_data->clear_mod_irqs(module, regs, wkst_mask);
559}
560
561/**
562 * omap_prm_vp_check_txdone - check voltage processor TX done status
563 *
564 * Checks if voltage processor transmission has been completed.
565 * Returns non-zero if a transmission has completed, 0 otherwise.
566 */
567u32 omap_prm_vp_check_txdone(u8 vp_id)
568{
569 if (!prm_ll_data->vp_check_txdone) {
570 WARN_ONCE(1, "prm: %s: no mapping function defined\n",
571 __func__);
572 return 0;
573 }
574
575 return prm_ll_data->vp_check_txdone(vp_id);
576}
577
578/**
579 * omap_prm_vp_clear_txdone - clears voltage processor TX done status
580 *
581 * Clears the status bit for completed voltage processor transmission
582 * returned by prm_vp_check_txdone.
583 */
584void omap_prm_vp_clear_txdone(u8 vp_id)
585{
586 if (!prm_ll_data->vp_clear_txdone) {
587 WARN_ONCE(1, "prm: %s: no mapping function defined\n",
588 __func__);
589 return;
590 }
591
592 prm_ll_data->vp_clear_txdone(vp_id);
593}
594
595/**
537 * prm_register - register per-SoC low-level data with the PRM 596 * prm_register - register per-SoC low-level data with the PRM
538 * @pld: low-level per-SoC OMAP PRM data & function pointers to register 597 * @pld: low-level per-SoC OMAP PRM data & function pointers to register
539 * 598 *
@@ -578,78 +637,175 @@ int prm_unregister(struct prm_ll_data *pld)
578 return 0; 637 return 0;
579} 638}
580 639
581static const struct of_device_id omap_prcm_dt_match_table[] = { 640#ifdef CONFIG_ARCH_OMAP2
582 { .compatible = "ti,am3-prcm" }, 641static struct omap_prcm_init_data omap2_prm_data __initdata = {
583 { .compatible = "ti,am3-scrm" }, 642 .index = TI_CLKM_PRM,
584 { .compatible = "ti,am4-prcm" }, 643 .init = omap2xxx_prm_init,
585 { .compatible = "ti,am4-scrm" },
586 { .compatible = "ti,dm814-prcm" },
587 { .compatible = "ti,dm814-scrm" },
588 { .compatible = "ti,dm816-prcm" },
589 { .compatible = "ti,dm816-scrm" },
590 { .compatible = "ti,omap2-prcm" },
591 { .compatible = "ti,omap2-scrm" },
592 { .compatible = "ti,omap3-prm" },
593 { .compatible = "ti,omap3-cm" },
594 { .compatible = "ti,omap3-scrm" },
595 { .compatible = "ti,omap4-cm1" },
596 { .compatible = "ti,omap4-prm" },
597 { .compatible = "ti,omap4-cm2" },
598 { .compatible = "ti,omap4-scrm" },
599 { .compatible = "ti,omap5-prm" },
600 { .compatible = "ti,omap5-cm-core-aon" },
601 { .compatible = "ti,omap5-scrm" },
602 { .compatible = "ti,omap5-cm-core" },
603 { .compatible = "ti,dra7-prm" },
604 { .compatible = "ti,dra7-cm-core-aon" },
605 { .compatible = "ti,dra7-cm-core" },
606 { }
607}; 644};
645#endif
646
647#ifdef CONFIG_ARCH_OMAP3
648static struct omap_prcm_init_data omap3_prm_data __initdata = {
649 .index = TI_CLKM_PRM,
650 .init = omap3xxx_prm_init,
608 651
609static struct clk_hw_omap memmap_dummy_ck = { 652 /*
610 .flags = MEMMAP_ADDRESSING, 653 * IVA2 offset is a negative value, must offset the prm_base
654 * address by this to get it to positive
655 */
656 .offset = -OMAP3430_IVA2_MOD,
611}; 657};
658#endif
612 659
613static u32 prm_clk_readl(void __iomem *reg) 660#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_TI81XX)
614{ 661static struct omap_prcm_init_data am3_prm_data __initdata = {
615 return omap2_clk_readl(&memmap_dummy_ck, reg); 662 .index = TI_CLKM_PRM,
616} 663 .init = am33xx_prm_init,
664};
665#endif
666
667#ifdef CONFIG_ARCH_OMAP4
668static struct omap_prcm_init_data omap4_prm_data __initdata = {
669 .index = TI_CLKM_PRM,
670 .init = omap44xx_prm_init,
671 .device_inst_offset = OMAP4430_PRM_DEVICE_INST,
672 .flags = PRM_HAS_IO_WAKEUP | PRM_HAS_VOLTAGE | PRM_IRQ_DEFAULT,
673};
674#endif
675
676#ifdef CONFIG_SOC_OMAP5
677static struct omap_prcm_init_data omap5_prm_data __initdata = {
678 .index = TI_CLKM_PRM,
679 .init = omap44xx_prm_init,
680 .device_inst_offset = OMAP54XX_PRM_DEVICE_INST,
681 .flags = PRM_HAS_IO_WAKEUP | PRM_HAS_VOLTAGE,
682};
683#endif
684
685#ifdef CONFIG_SOC_DRA7XX
686static struct omap_prcm_init_data dra7_prm_data __initdata = {
687 .index = TI_CLKM_PRM,
688 .init = omap44xx_prm_init,
689 .device_inst_offset = DRA7XX_PRM_DEVICE_INST,
690 .flags = PRM_HAS_IO_WAKEUP,
691};
692#endif
617 693
618static void prm_clk_writel(u32 val, void __iomem *reg) 694#ifdef CONFIG_SOC_AM43XX
619{ 695static struct omap_prcm_init_data am4_prm_data __initdata = {
620 omap2_clk_writel(val, &memmap_dummy_ck, reg); 696 .index = TI_CLKM_PRM,
621} 697 .init = omap44xx_prm_init,
698 .device_inst_offset = AM43XX_PRM_DEVICE_INST,
699};
700#endif
622 701
623static struct ti_clk_ll_ops omap_clk_ll_ops = { 702#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
624 .clk_readl = prm_clk_readl, 703static struct omap_prcm_init_data scrm_data __initdata = {
625 .clk_writel = prm_clk_writel, 704 .index = TI_CLKM_SCRM,
705};
706#endif
707
708static const struct of_device_id omap_prcm_dt_match_table[] __initconst = {
709#ifdef CONFIG_SOC_AM33XX
710 { .compatible = "ti,am3-prcm", .data = &am3_prm_data },
711#endif
712#ifdef CONFIG_SOC_AM43XX
713 { .compatible = "ti,am4-prcm", .data = &am4_prm_data },
714#endif
715#ifdef CONFIG_SOC_TI81XX
716 { .compatible = "ti,dm814-prcm", .data = &am3_prm_data },
717 { .compatible = "ti,dm816-prcm", .data = &am3_prm_data },
718#endif
719#ifdef CONFIG_ARCH_OMAP2
720 { .compatible = "ti,omap2-prcm", .data = &omap2_prm_data },
721#endif
722#ifdef CONFIG_ARCH_OMAP3
723 { .compatible = "ti,omap3-prm", .data = &omap3_prm_data },
724#endif
725#ifdef CONFIG_ARCH_OMAP4
726 { .compatible = "ti,omap4-prm", .data = &omap4_prm_data },
727 { .compatible = "ti,omap4-scrm", .data = &scrm_data },
728#endif
729#ifdef CONFIG_SOC_OMAP5
730 { .compatible = "ti,omap5-prm", .data = &omap5_prm_data },
731 { .compatible = "ti,omap5-scrm", .data = &scrm_data },
732#endif
733#ifdef CONFIG_SOC_DRA7XX
734 { .compatible = "ti,dra7-prm", .data = &dra7_prm_data },
735#endif
736 { }
626}; 737};
627 738
628int __init of_prcm_init(void) 739/**
740 * omap2_prm_base_init - initialize iomappings for the PRM driver
741 *
742 * Detects and initializes the iomappings for the PRM driver, based
743 * on the DT data. Returns 0 in success, negative error value
744 * otherwise.
745 */
746int __init omap2_prm_base_init(void)
629{ 747{
630 struct device_node *np; 748 struct device_node *np;
749 const struct of_device_id *match;
750 struct omap_prcm_init_data *data;
631 void __iomem *mem; 751 void __iomem *mem;
632 int memmap_index = 0;
633 752
634 ti_clk_ll_ops = &omap_clk_ll_ops; 753 for_each_matching_node_and_match(np, omap_prcm_dt_match_table, &match) {
754 data = (struct omap_prcm_init_data *)match->data;
635 755
636 for_each_matching_node(np, omap_prcm_dt_match_table) {
637 mem = of_iomap(np, 0); 756 mem = of_iomap(np, 0);
638 clk_memmaps[memmap_index] = mem; 757 if (!mem)
639 ti_dt_clk_init_provider(np, memmap_index); 758 return -ENOMEM;
640 memmap_index++; 759
760 if (data->index == TI_CLKM_PRM)
761 prm_base = mem + data->offset;
762
763 data->mem = mem;
764
765 data->np = np;
766
767 if (data->init)
768 data->init(data);
641 } 769 }
642 770
643 return 0; 771 return 0;
644} 772}
645 773
646void __init omap3_prcm_legacy_iomaps_init(void) 774int __init omap2_prcm_base_init(void)
647{ 775{
648 ti_clk_ll_ops = &omap_clk_ll_ops; 776 int ret;
649 777
650 clk_memmaps[TI_CLKM_CM] = cm_base + OMAP3430_IVA2_MOD; 778 ret = omap2_prm_base_init();
651 clk_memmaps[TI_CLKM_PRM] = prm_base + OMAP3430_IVA2_MOD; 779 if (ret)
652 clk_memmaps[TI_CLKM_SCRM] = omap_ctrl_base_get(); 780 return ret;
781
782 return omap2_cm_base_init();
783}
784
785/**
786 * omap_prcm_init - low level init for the PRCM drivers
787 *
788 * Initializes the low level clock infrastructure for PRCM drivers.
789 * Returns 0 in success, negative error value in failure.
790 */
791int __init omap_prcm_init(void)
792{
793 struct device_node *np;
794 const struct of_device_id *match;
795 const struct omap_prcm_init_data *data;
796 int ret;
797
798 for_each_matching_node_and_match(np, omap_prcm_dt_match_table, &match) {
799 data = match->data;
800
801 ret = omap2_clk_provider_init(np, data->index, NULL, data->mem);
802 if (ret)
803 return ret;
804 }
805
806 omap_cm_init();
807
808 return 0;
653} 809}
654 810
655static int __init prm_late_init(void) 811static int __init prm_late_init(void)
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 8adf7b1a1dce..c4859c4d3646 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -47,22 +47,14 @@ void omap_prm_base_init(void)
47 47
48s32 omap4_prmst_get_prm_dev_inst(void) 48s32 omap4_prmst_get_prm_dev_inst(void)
49{ 49{
50 if (prm_dev_inst != PRM_INSTANCE_UNKNOWN)
51 return prm_dev_inst;
52
53 /* This cannot be done way early at boot.. as things are not setup */
54 if (cpu_is_omap44xx())
55 prm_dev_inst = OMAP4430_PRM_DEVICE_INST;
56 else if (soc_is_omap54xx())
57 prm_dev_inst = OMAP54XX_PRM_DEVICE_INST;
58 else if (soc_is_dra7xx())
59 prm_dev_inst = DRA7XX_PRM_DEVICE_INST;
60 else if (soc_is_am43xx())
61 prm_dev_inst = AM43XX_PRM_DEVICE_INST;
62
63 return prm_dev_inst; 50 return prm_dev_inst;
64} 51}
65 52
53void omap4_prminst_set_prm_dev_inst(s32 dev_inst)
54{
55 prm_dev_inst = dev_inst;
56}
57
66/* Read a register in a PRM instance */ 58/* Read a register in a PRM instance */
67u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx) 59u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
68{ 60{
diff --git a/arch/arm/mach-omap2/prminst44xx.h b/arch/arm/mach-omap2/prminst44xx.h
index fb1c9d7a2f9d..0c03d0731d7f 100644
--- a/arch/arm/mach-omap2/prminst44xx.h
+++ b/arch/arm/mach-omap2/prminst44xx.h
@@ -14,6 +14,7 @@
14 14
15#define PRM_INSTANCE_UNKNOWN -1 15#define PRM_INSTANCE_UNKNOWN -1
16extern s32 omap4_prmst_get_prm_dev_inst(void); 16extern s32 omap4_prmst_get_prm_dev_inst(void);
17void omap4_prminst_set_prm_dev_inst(s32 dev_inst);
17 18
18/* 19/*
19 * In an ideal world, we would not export these low-level functions, 20 * In an ideal world, we would not export these low-level functions,
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S
index b84a0122d823..ad1bb9431e94 100644
--- a/arch/arm/mach-omap2/sleep44xx.S
+++ b/arch/arm/mach-omap2/sleep44xx.S
@@ -333,11 +333,9 @@ ENDPROC(omap4_cpu_resume)
333 333
334#endif /* defined(CONFIG_SMP) && defined(CONFIG_PM) */ 334#endif /* defined(CONFIG_SMP) && defined(CONFIG_PM) */
335 335
336#ifndef CONFIG_OMAP4_ERRATA_I688
337ENTRY(omap_bus_sync) 336ENTRY(omap_bus_sync)
338 ret lr 337 ret lr
339ENDPROC(omap_bus_sync) 338ENDPROC(omap_bus_sync)
340#endif
341 339
342ENTRY(omap_do_wfi) 340ENTRY(omap_do_wfi)
343 stmfd sp!, {lr} 341 stmfd sp!, {lr}
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 8333400898fb..e554d9e66a1c 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -71,7 +71,7 @@ static int tusb_set_async_mode(unsigned sysclk_ps)
71 71
72 gpmc_calc_timings(&t, &tusb_async, &dev_t); 72 gpmc_calc_timings(&t, &tusb_async, &dev_t);
73 73
74 return gpmc_cs_set_timings(async_cs, &t); 74 return gpmc_cs_set_timings(async_cs, &t, &tusb_async);
75} 75}
76 76
77static int tusb_set_sync_mode(unsigned sysclk_ps) 77static int tusb_set_sync_mode(unsigned sysclk_ps)
@@ -98,7 +98,7 @@ static int tusb_set_sync_mode(unsigned sysclk_ps)
98 98
99 gpmc_calc_timings(&t, &tusb_sync, &dev_t); 99 gpmc_calc_timings(&t, &tusb_sync, &dev_t);
100 100
101 return gpmc_cs_set_timings(sync_cs, &t); 101 return gpmc_cs_set_timings(sync_cs, &t, &tusb_sync);
102} 102}
103 103
104/* tusb driver calls this when it changes the chip's clocking */ 104/* tusb driver calls this when it changes the chip's clocking */
diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
index 0fdf7080e4a6..7e0829682bd0 100644
--- a/arch/arm/mach-omap2/vp.h
+++ b/arch/arm/mach-omap2/vp.h
@@ -21,15 +21,6 @@
21 21
22struct voltagedomain; 22struct voltagedomain;
23 23
24/*
25 * Voltage Processor (VP) identifiers
26 */
27#define OMAP3_VP_VDD_MPU_ID 0
28#define OMAP3_VP_VDD_CORE_ID 1
29#define OMAP4_VP_VDD_CORE_ID 0
30#define OMAP4_VP_VDD_IVA_ID 1
31#define OMAP4_VP_VDD_MPU_ID 2
32
33/* XXX document */ 24/* XXX document */
34#define VP_IDLE_TIMEOUT 200 25#define VP_IDLE_TIMEOUT 200
35#define VP_TRANXDONE_TIMEOUT 300 26#define VP_TRANXDONE_TIMEOUT 300
diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c
index 1914e026245e..b0590fe6ab01 100644
--- a/arch/arm/mach-omap2/vp3xxx_data.c
+++ b/arch/arm/mach-omap2/vp3xxx_data.c
@@ -28,8 +28,8 @@
28#include "prm2xxx_3xxx.h" 28#include "prm2xxx_3xxx.h"
29 29
30static const struct omap_vp_ops omap3_vp_ops = { 30static const struct omap_vp_ops omap3_vp_ops = {
31 .check_txdone = omap3_prm_vp_check_txdone, 31 .check_txdone = omap_prm_vp_check_txdone,
32 .clear_txdone = omap3_prm_vp_clear_txdone, 32 .clear_txdone = omap_prm_vp_clear_txdone,
33}; 33};
34 34
35/* 35/*
diff --git a/arch/arm/mach-omap2/vp44xx_data.c b/arch/arm/mach-omap2/vp44xx_data.c
index e62f6b018beb..2448bb9a8716 100644
--- a/arch/arm/mach-omap2/vp44xx_data.c
+++ b/arch/arm/mach-omap2/vp44xx_data.c
@@ -28,8 +28,8 @@
28#include "vp.h" 28#include "vp.h"
29 29
30static const struct omap_vp_ops omap4_vp_ops = { 30static const struct omap_vp_ops omap4_vp_ops = {
31 .check_txdone = omap4_prm_vp_check_txdone, 31 .check_txdone = omap_prm_vp_check_txdone,
32 .clear_txdone = omap4_prm_vp_clear_txdone, 32 .clear_txdone = omap_prm_vp_clear_txdone,
33}; 33};
34 34
35/* 35/*
diff --git a/arch/arm/mach-qcom/Kconfig b/arch/arm/mach-qcom/Kconfig
index 48003ea652b9..2256cd1e25d1 100644
--- a/arch/arm/mach-qcom/Kconfig
+++ b/arch/arm/mach-qcom/Kconfig
@@ -22,7 +22,4 @@ config ARCH_MSM8974
22 bool "Enable support for MSM8974" 22 bool "Enable support for MSM8974"
23 select HAVE_ARM_ARCH_TIMER 23 select HAVE_ARM_ARCH_TIMER
24 24
25config QCOM_SCM
26 bool
27
28endif 25endif
diff --git a/arch/arm/mach-qcom/Makefile b/arch/arm/mach-qcom/Makefile
index 8f756ae1ae31..e324375fa919 100644
--- a/arch/arm/mach-qcom/Makefile
+++ b/arch/arm/mach-qcom/Makefile
@@ -1,5 +1,2 @@
1obj-y := board.o 1obj-y := board.o
2obj-$(CONFIG_SMP) += platsmp.o 2obj-$(CONFIG_SMP) += platsmp.o
3obj-$(CONFIG_QCOM_SCM) += scm.o scm-boot.o
4
5CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1)
diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
index 09cffed4c0a4..5cde63a64b34 100644
--- a/arch/arm/mach-qcom/platsmp.c
+++ b/arch/arm/mach-qcom/platsmp.c
@@ -17,10 +17,10 @@
17#include <linux/of_address.h> 17#include <linux/of_address.h>
18#include <linux/smp.h> 18#include <linux/smp.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/qcom_scm.h>
20 21
21#include <asm/smp_plat.h> 22#include <asm/smp_plat.h>
22 23
23#include "scm-boot.h"
24 24
25#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x35a0 25#define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x35a0
26#define SCSS_CPU1CORE_RESET 0x2d80 26#define SCSS_CPU1CORE_RESET 0x2d80
@@ -319,25 +319,10 @@ static int kpssv2_boot_secondary(unsigned int cpu, struct task_struct *idle)
319 319
320static void __init qcom_smp_prepare_cpus(unsigned int max_cpus) 320static void __init qcom_smp_prepare_cpus(unsigned int max_cpus)
321{ 321{
322 int cpu, map; 322 int cpu;
323 unsigned int flags = 0;
324 static const int cold_boot_flags[] = {
325 0,
326 SCM_FLAG_COLDBOOT_CPU1,
327 SCM_FLAG_COLDBOOT_CPU2,
328 SCM_FLAG_COLDBOOT_CPU3,
329 };
330
331 for_each_present_cpu(cpu) {
332 map = cpu_logical_map(cpu);
333 if (WARN_ON(map >= ARRAY_SIZE(cold_boot_flags))) {
334 set_cpu_present(cpu, false);
335 continue;
336 }
337 flags |= cold_boot_flags[map];
338 }
339 323
340 if (scm_set_boot_addr(virt_to_phys(secondary_startup_arm), flags)) { 324 if (qcom_scm_set_cold_boot_addr(secondary_startup_arm,
325 cpu_present_mask)) {
341 for_each_present_cpu(cpu) { 326 for_each_present_cpu(cpu) {
342 if (cpu == smp_processor_id()) 327 if (cpu == smp_processor_id())
343 continue; 328 continue;
diff --git a/arch/arm/mach-qcom/scm-boot.c b/arch/arm/mach-qcom/scm-boot.c
deleted file mode 100644
index e8ff7beb6218..000000000000
--- a/arch/arm/mach-qcom/scm-boot.c
+++ /dev/null
@@ -1,39 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#include <linux/module.h>
19#include <linux/slab.h>
20
21#include "scm.h"
22#include "scm-boot.h"
23
24/*
25 * Set the cold/warm boot address for one of the CPU cores.
26 */
27int scm_set_boot_addr(u32 addr, int flags)
28{
29 struct {
30 __le32 flags;
31 __le32 addr;
32 } cmd;
33
34 cmd.addr = cpu_to_le32(addr);
35 cmd.flags = cpu_to_le32(flags);
36 return scm_call(SCM_SVC_BOOT, SCM_BOOT_ADDR,
37 &cmd, sizeof(cmd), NULL, 0);
38}
39EXPORT_SYMBOL(scm_set_boot_addr);
diff --git a/arch/arm/mach-qcom/scm-boot.h b/arch/arm/mach-qcom/scm-boot.h
deleted file mode 100644
index 3e210fb818bb..000000000000
--- a/arch/arm/mach-qcom/scm-boot.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef __MACH_SCM_BOOT_H
13#define __MACH_SCM_BOOT_H
14
15#define SCM_BOOT_ADDR 0x1
16#define SCM_FLAG_COLDBOOT_CPU1 0x01
17#define SCM_FLAG_COLDBOOT_CPU2 0x08
18#define SCM_FLAG_COLDBOOT_CPU3 0x20
19#define SCM_FLAG_WARMBOOT_CPU0 0x04
20#define SCM_FLAG_WARMBOOT_CPU1 0x02
21#define SCM_FLAG_WARMBOOT_CPU2 0x10
22#define SCM_FLAG_WARMBOOT_CPU3 0x40
23
24int scm_set_boot_addr(u32 addr, int flags);
25
26#endif
diff --git a/arch/arm/mach-qcom/scm.c b/arch/arm/mach-qcom/scm.c
deleted file mode 100644
index 1d9cf18c7091..000000000000
--- a/arch/arm/mach-qcom/scm.c
+++ /dev/null
@@ -1,326 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 */
17
18#include <linux/slab.h>
19#include <linux/io.h>
20#include <linux/module.h>
21#include <linux/mutex.h>
22#include <linux/errno.h>
23#include <linux/err.h>
24
25#include <asm/outercache.h>
26#include <asm/cacheflush.h>
27
28#include "scm.h"
29
30#define SCM_ENOMEM -5
31#define SCM_EOPNOTSUPP -4
32#define SCM_EINVAL_ADDR -3
33#define SCM_EINVAL_ARG -2
34#define SCM_ERROR -1
35#define SCM_INTERRUPTED 1
36
37static DEFINE_MUTEX(scm_lock);
38
39/**
40 * struct scm_command - one SCM command buffer
41 * @len: total available memory for command and response
42 * @buf_offset: start of command buffer
43 * @resp_hdr_offset: start of response buffer
44 * @id: command to be executed
45 * @buf: buffer returned from scm_get_command_buffer()
46 *
47 * An SCM command is laid out in memory as follows:
48 *
49 * ------------------- <--- struct scm_command
50 * | command header |
51 * ------------------- <--- scm_get_command_buffer()
52 * | command buffer |
53 * ------------------- <--- struct scm_response and
54 * | response header | scm_command_to_response()
55 * ------------------- <--- scm_get_response_buffer()
56 * | response buffer |
57 * -------------------
58 *
59 * There can be arbitrary padding between the headers and buffers so
60 * you should always use the appropriate scm_get_*_buffer() routines
61 * to access the buffers in a safe manner.
62 */
63struct scm_command {
64 __le32 len;
65 __le32 buf_offset;
66 __le32 resp_hdr_offset;
67 __le32 id;
68 __le32 buf[0];
69};
70
71/**
72 * struct scm_response - one SCM response buffer
73 * @len: total available memory for response
74 * @buf_offset: start of response data relative to start of scm_response
75 * @is_complete: indicates if the command has finished processing
76 */
77struct scm_response {
78 __le32 len;
79 __le32 buf_offset;
80 __le32 is_complete;
81};
82
83/**
84 * alloc_scm_command() - Allocate an SCM command
85 * @cmd_size: size of the command buffer
86 * @resp_size: size of the response buffer
87 *
88 * Allocate an SCM command, including enough room for the command
89 * and response headers as well as the command and response buffers.
90 *
91 * Returns a valid &scm_command on success or %NULL if the allocation fails.
92 */
93static struct scm_command *alloc_scm_command(size_t cmd_size, size_t resp_size)
94{
95 struct scm_command *cmd;
96 size_t len = sizeof(*cmd) + sizeof(struct scm_response) + cmd_size +
97 resp_size;
98 u32 offset;
99
100 cmd = kzalloc(PAGE_ALIGN(len), GFP_KERNEL);
101 if (cmd) {
102 cmd->len = cpu_to_le32(len);
103 offset = offsetof(struct scm_command, buf);
104 cmd->buf_offset = cpu_to_le32(offset);
105 cmd->resp_hdr_offset = cpu_to_le32(offset + cmd_size);
106 }
107 return cmd;
108}
109
110/**
111 * free_scm_command() - Free an SCM command
112 * @cmd: command to free
113 *
114 * Free an SCM command.
115 */
116static inline void free_scm_command(struct scm_command *cmd)
117{
118 kfree(cmd);
119}
120
121/**
122 * scm_command_to_response() - Get a pointer to a scm_response
123 * @cmd: command
124 *
125 * Returns a pointer to a response for a command.
126 */
127static inline struct scm_response *scm_command_to_response(
128 const struct scm_command *cmd)
129{
130 return (void *)cmd + le32_to_cpu(cmd->resp_hdr_offset);
131}
132
133/**
134 * scm_get_command_buffer() - Get a pointer to a command buffer
135 * @cmd: command
136 *
137 * Returns a pointer to the command buffer of a command.
138 */
139static inline void *scm_get_command_buffer(const struct scm_command *cmd)
140{
141 return (void *)cmd->buf;
142}
143
144/**
145 * scm_get_response_buffer() - Get a pointer to a response buffer
146 * @rsp: response
147 *
148 * Returns a pointer to a response buffer of a response.
149 */
150static inline void *scm_get_response_buffer(const struct scm_response *rsp)
151{
152 return (void *)rsp + le32_to_cpu(rsp->buf_offset);
153}
154
155static int scm_remap_error(int err)
156{
157 pr_err("scm_call failed with error code %d\n", err);
158 switch (err) {
159 case SCM_ERROR:
160 return -EIO;
161 case SCM_EINVAL_ADDR:
162 case SCM_EINVAL_ARG:
163 return -EINVAL;
164 case SCM_EOPNOTSUPP:
165 return -EOPNOTSUPP;
166 case SCM_ENOMEM:
167 return -ENOMEM;
168 }
169 return -EINVAL;
170}
171
172static u32 smc(u32 cmd_addr)
173{
174 int context_id;
175 register u32 r0 asm("r0") = 1;
176 register u32 r1 asm("r1") = (u32)&context_id;
177 register u32 r2 asm("r2") = cmd_addr;
178 do {
179 asm volatile(
180 __asmeq("%0", "r0")
181 __asmeq("%1", "r0")
182 __asmeq("%2", "r1")
183 __asmeq("%3", "r2")
184#ifdef REQUIRES_SEC
185 ".arch_extension sec\n"
186#endif
187 "smc #0 @ switch to secure world\n"
188 : "=r" (r0)
189 : "r" (r0), "r" (r1), "r" (r2)
190 : "r3");
191 } while (r0 == SCM_INTERRUPTED);
192
193 return r0;
194}
195
196static int __scm_call(const struct scm_command *cmd)
197{
198 int ret;
199 u32 cmd_addr = virt_to_phys(cmd);
200
201 /*
202 * Flush the command buffer so that the secure world sees
203 * the correct data.
204 */
205 __cpuc_flush_dcache_area((void *)cmd, cmd->len);
206 outer_flush_range(cmd_addr, cmd_addr + cmd->len);
207
208 ret = smc(cmd_addr);
209 if (ret < 0)
210 ret = scm_remap_error(ret);
211
212 return ret;
213}
214
215static void scm_inv_range(unsigned long start, unsigned long end)
216{
217 u32 cacheline_size, ctr;
218
219 asm volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr));
220 cacheline_size = 4 << ((ctr >> 16) & 0xf);
221
222 start = round_down(start, cacheline_size);
223 end = round_up(end, cacheline_size);
224 outer_inv_range(start, end);
225 while (start < end) {
226 asm ("mcr p15, 0, %0, c7, c6, 1" : : "r" (start)
227 : "memory");
228 start += cacheline_size;
229 }
230 dsb();
231 isb();
232}
233
234/**
235 * scm_call() - Send an SCM command
236 * @svc_id: service identifier
237 * @cmd_id: command identifier
238 * @cmd_buf: command buffer
239 * @cmd_len: length of the command buffer
240 * @resp_buf: response buffer
241 * @resp_len: length of the response buffer
242 *
243 * Sends a command to the SCM and waits for the command to finish processing.
244 *
245 * A note on cache maintenance:
246 * Note that any buffers that are expected to be accessed by the secure world
247 * must be flushed before invoking scm_call and invalidated in the cache
248 * immediately after scm_call returns. Cache maintenance on the command and
249 * response buffers is taken care of by scm_call; however, callers are
250 * responsible for any other cached buffers passed over to the secure world.
251 */
252int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
253 void *resp_buf, size_t resp_len)
254{
255 int ret;
256 struct scm_command *cmd;
257 struct scm_response *rsp;
258 unsigned long start, end;
259
260 cmd = alloc_scm_command(cmd_len, resp_len);
261 if (!cmd)
262 return -ENOMEM;
263
264 cmd->id = cpu_to_le32((svc_id << 10) | cmd_id);
265 if (cmd_buf)
266 memcpy(scm_get_command_buffer(cmd), cmd_buf, cmd_len);
267
268 mutex_lock(&scm_lock);
269 ret = __scm_call(cmd);
270 mutex_unlock(&scm_lock);
271 if (ret)
272 goto out;
273
274 rsp = scm_command_to_response(cmd);
275 start = (unsigned long)rsp;
276
277 do {
278 scm_inv_range(start, start + sizeof(*rsp));
279 } while (!rsp->is_complete);
280
281 end = (unsigned long)scm_get_response_buffer(rsp) + resp_len;
282 scm_inv_range(start, end);
283
284 if (resp_buf)
285 memcpy(resp_buf, scm_get_response_buffer(rsp), resp_len);
286out:
287 free_scm_command(cmd);
288 return ret;
289}
290EXPORT_SYMBOL(scm_call);
291
292u32 scm_get_version(void)
293{
294 int context_id;
295 static u32 version = -1;
296 register u32 r0 asm("r0");
297 register u32 r1 asm("r1");
298
299 if (version != -1)
300 return version;
301
302 mutex_lock(&scm_lock);
303
304 r0 = 0x1 << 8;
305 r1 = (u32)&context_id;
306 do {
307 asm volatile(
308 __asmeq("%0", "r0")
309 __asmeq("%1", "r1")
310 __asmeq("%2", "r0")
311 __asmeq("%3", "r1")
312#ifdef REQUIRES_SEC
313 ".arch_extension sec\n"
314#endif
315 "smc #0 @ switch to secure world\n"
316 : "=r" (r0), "=r" (r1)
317 : "r" (r0), "r" (r1)
318 : "r2", "r3");
319 } while (r0 == SCM_INTERRUPTED);
320
321 version = r1;
322 mutex_unlock(&scm_lock);
323
324 return version;
325}
326EXPORT_SYMBOL(scm_get_version);
diff --git a/arch/arm/mach-qcom/scm.h b/arch/arm/mach-qcom/scm.h
deleted file mode 100644
index 00b31ea58f29..000000000000
--- a/arch/arm/mach-qcom/scm.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef __MACH_SCM_H
13#define __MACH_SCM_H
14
15#define SCM_SVC_BOOT 0x1
16#define SCM_SVC_PIL 0x2
17
18extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
19 void *resp_buf, size_t resp_len);
20
21#define SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
22
23extern u32 scm_get_version(void);
24
25#endif
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index f26fcdca2445..5b4ca3c3c879 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -55,7 +55,7 @@ static int pmu_power_domain_is_on(int pd)
55 return !(val & BIT(pd)); 55 return !(val & BIT(pd));
56} 56}
57 57
58struct reset_control *rockchip_get_core_reset(int cpu) 58static struct reset_control *rockchip_get_core_reset(int cpu)
59{ 59{
60 struct device *dev = get_cpu_device(cpu); 60 struct device *dev = get_cpu_device(cpu);
61 struct device_node *np; 61 struct device_node *np;
@@ -201,7 +201,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
201 return 0; 201 return 0;
202} 202}
203 203
204static struct regmap_config rockchip_pmu_regmap_config = { 204static const struct regmap_config rockchip_pmu_regmap_config = {
205 .reg_bits = 32, 205 .reg_bits = 32,
206 .val_bits = 32, 206 .val_bits = 32,
207 .reg_stride = 4, 207 .reg_stride = 4,
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index 50cb781aaa36..b07d88602073 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -75,9 +75,13 @@ static void rk3288_slp_mode_set(int level)
75 regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON, 75 regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
76 &rk3288_pmu_pwr_mode_con); 76 &rk3288_pmu_pwr_mode_con);
77 77
78 /* set bit 8 so that system will resume to FAST_BOOT_ADDR */ 78 /*
79 * SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
80 * PCLK_WDT_GATE - disable WDT during suspend.
81 */
79 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0, 82 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
80 SGRF_FAST_BOOT_EN | SGRF_FAST_BOOT_EN_WRITE); 83 SGRF_PCLK_WDT_GATE | SGRF_FAST_BOOT_EN
84 | SGRF_PCLK_WDT_GATE_WRITE | SGRF_FAST_BOOT_EN_WRITE);
81 85
82 /* booting address of resuming system is from this register value */ 86 /* booting address of resuming system is from this register value */
83 regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR, 87 regmap_write(sgrf_regmap, RK3288_SGRF_FAST_BOOT_ADDR,
@@ -122,7 +126,8 @@ static void rk3288_slp_mode_set_resume(void)
122 rk3288_pmu_pwr_mode_con); 126 rk3288_pmu_pwr_mode_con);
123 127
124 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0, 128 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
125 rk3288_sgrf_soc_con0 | SGRF_FAST_BOOT_EN_WRITE); 129 rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
130 | SGRF_FAST_BOOT_EN_WRITE);
126} 131}
127 132
128static int rockchip_lpmode_enter(unsigned long arg) 133static int rockchip_lpmode_enter(unsigned long arg)
@@ -209,6 +214,9 @@ static int rk3288_suspend_init(struct device_node *np)
209 memcpy(rk3288_bootram_base, rockchip_slp_cpu_resume, 214 memcpy(rk3288_bootram_base, rockchip_slp_cpu_resume,
210 rk3288_bootram_sz); 215 rk3288_bootram_sz);
211 216
217 regmap_write(pmu_regmap, RK3288_PMU_OSC_CNT, OSC_STABL_CNT_THRESH);
218 regmap_write(pmu_regmap, RK3288_PMU_STABL_CNT, PMU_STABL_CNT_THRESH);
219
212 return 0; 220 return 0;
213} 221}
214 222
diff --git a/arch/arm/mach-rockchip/pm.h b/arch/arm/mach-rockchip/pm.h
index 7c889c04604b..03ff31d8282d 100644
--- a/arch/arm/mach-rockchip/pm.h
+++ b/arch/arm/mach-rockchip/pm.h
@@ -50,6 +50,8 @@ static inline void rockchip_suspend_init(void)
50 50
51#define RK3288_SGRF_SOC_CON0 (0x0000) 51#define RK3288_SGRF_SOC_CON0 (0x0000)
52#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120) 52#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120)
53#define SGRF_PCLK_WDT_GATE BIT(6)
54#define SGRF_PCLK_WDT_GATE_WRITE BIT(22)
53#define SGRF_FAST_BOOT_EN BIT(8) 55#define SGRF_FAST_BOOT_EN BIT(8)
54#define SGRF_FAST_BOOT_EN_WRITE BIT(24) 56#define SGRF_FAST_BOOT_EN_WRITE BIT(24)
55 57
@@ -63,6 +65,10 @@ static inline void rockchip_suspend_init(void)
63/* PMU_WAKEUP_CFG1 bits */ 65/* PMU_WAKEUP_CFG1 bits */
64#define PMU_ARMINT_WAKEUP_EN BIT(0) 66#define PMU_ARMINT_WAKEUP_EN BIT(0)
65 67
68/* wait 30ms for OSC stable and 30ms for pmic stable */
69#define OSC_STABL_CNT_THRESH (32 * 30)
70#define PMU_STABL_CNT_THRESH (32 * 30)
71
66enum rk3288_pwr_mode_con { 72enum rk3288_pwr_mode_con {
67 PMU_PWR_MODE_EN = 0, 73 PMU_PWR_MODE_EN = 0,
68 PMU_CLK_CORE_SRC_GATE_EN, 74 PMU_CLK_CORE_SRC_GATE_EN,
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 79c49ff77f6e..23bec3a85b22 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -39,14 +39,14 @@ config CPU_S3C2412
39 bool "SAMSUNG S3C2412" 39 bool "SAMSUNG S3C2412"
40 select CPU_ARM926T 40 select CPU_ARM926T
41 select S3C2412_COMMON_CLK 41 select S3C2412_COMMON_CLK
42 select S3C2412_PM if PM 42 select S3C2412_PM if PM_SLEEP
43 help 43 help
44 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line 44 Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
45 45
46config CPU_S3C2416 46config CPU_S3C2416
47 bool "SAMSUNG S3C2416/S3C2450" 47 bool "SAMSUNG S3C2416/S3C2450"
48 select CPU_ARM926T 48 select CPU_ARM926T
49 select S3C2416_PM if PM 49 select S3C2416_PM if PM_SLEEP
50 select S3C2443_COMMON_CLK 50 select S3C2443_COMMON_CLK
51 help 51 help
52 Support for the S3C2416 SoC from the S3C24XX line 52 Support for the S3C2416 SoC from the S3C24XX line
@@ -55,7 +55,7 @@ config CPU_S3C2440
55 bool "SAMSUNG S3C2440" 55 bool "SAMSUNG S3C2440"
56 select CPU_ARM920T 56 select CPU_ARM920T
57 select S3C2410_COMMON_CLK 57 select S3C2410_COMMON_CLK
58 select S3C2410_PM if PM 58 select S3C2410_PM if PM_SLEEP
59 help 59 help
60 Support for S3C2440 Samsung Mobile CPU based systems. 60 Support for S3C2440 Samsung Mobile CPU based systems.
61 61
@@ -63,7 +63,7 @@ config CPU_S3C2442
63 bool "SAMSUNG S3C2442" 63 bool "SAMSUNG S3C2442"
64 select CPU_ARM920T 64 select CPU_ARM920T
65 select S3C2410_COMMON_CLK 65 select S3C2410_COMMON_CLK
66 select S3C2410_PM if PM 66 select S3C2410_PM if PM_SLEEP
67 help 67 help
68 Support for S3C2442 Samsung Mobile CPU based systems. 68 Support for S3C2442 Samsung Mobile CPU based systems.
69 69
@@ -228,11 +228,6 @@ config H1940BT
228 This is a simple driver that is able to control 228 This is a simple driver that is able to control
229 the state of built in bluetooth chip on h1940. 229 the state of built in bluetooth chip on h1940.
230 230
231config PM_H1940
232 bool
233 help
234 Internal node for H1940 and related PM
235
236config MACH_N30 231config MACH_N30
237 bool "Acer N30 family" 232 bool "Acer N30 family"
238 select S3C_DEV_NAND 233 select S3C_DEV_NAND
@@ -362,6 +357,7 @@ if CPU_S3C2416
362config S3C2416_PM 357config S3C2416_PM
363 bool 358 bool
364 select S3C2412_PM_SLEEP 359 select S3C2412_PM_SLEEP
360 select SAMSUNG_WAKEMASK
365 help 361 help
366 Internal config node to apply S3C2416 power management 362 Internal config node to apply S3C2416 power management
367 363
@@ -584,6 +580,11 @@ config MACH_SMDK2443
584 580
585endif # CPU_S3C2443 581endif # CPU_S3C2443
586 582
583config PM_H1940
584 bool
585 help
586 Internal node for H1940 and related PM
587
587endmenu # SAMSUNG S3C24XX SoCs Support 588endmenu # SAMSUNG S3C24XX SoCs Support
588 589
589endif # ARCH_S3C24XX 590endif # ARCH_S3C24XX
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index b40a22fe082a..05920c8a5764 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -32,7 +32,8 @@ obj-$(CONFIG_CPU_S3C2443) += s3c2443.o
32 32
33# PM 33# PM
34 34
35obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o 35obj-$(CONFIG_PM) += pm.o
36obj-$(CONFIG_PM_SLEEP) += irq-pm.o sleep.o
36 37
37# common code 38# common code
38 39
diff --git a/arch/arm/mach-s3c24xx/include/mach/pm-core.h b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
index 2eef7e6f7675..69459dbbdcad 100644
--- a/arch/arm/mach-s3c24xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c24xx/include/mach/pm-core.h
@@ -10,6 +10,11 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#include <linux/delay.h>
14#include <linux/io.h>
15
16#include "regs-clock.h"
17#include "regs-irq.h"
13 18
14static inline void s3c_pm_debug_init_uart(void) 19static inline void s3c_pm_debug_init_uart(void)
15{ 20{
@@ -42,8 +47,23 @@ static inline void s3c_pm_arch_stop_clocks(void)
42 __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ 47 __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */
43} 48}
44 49
45static void s3c_pm_show_resume_irqs(int start, unsigned long which, 50/* s3c2410_pm_show_resume_irqs
46 unsigned long mask); 51 *
52 * print any IRQs asserted at resume time (ie, we woke from)
53*/
54static inline void s3c_pm_show_resume_irqs(int start, unsigned long which,
55 unsigned long mask)
56{
57 int i;
58
59 which &= ~mask;
60
61 for (i = 0; i <= 31; i++) {
62 if (which & (1L<<i)) {
63 S3C_PMDBG("IRQ %d asserted at resume\n", start+i);
64 }
65 }
66}
47 67
48static inline void s3c_pm_arch_show_resume_irqs(void) 68static inline void s3c_pm_arch_show_resume_irqs(void)
49{ 69{
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c24xx/pm-s3c2416.c
index 44923895f558..c0e328e37bd6 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2416.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2416.c
@@ -23,6 +23,7 @@
23 23
24#include "s3c2412-power.h" 24#include "s3c2412-power.h"
25 25
26#ifdef CONFIG_PM_SLEEP
26extern void s3c2412_sleep_enter(void); 27extern void s3c2412_sleep_enter(void);
27 28
28static int s3c2416_cpu_suspend(unsigned long arg) 29static int s3c2416_cpu_suspend(unsigned long arg)
@@ -70,7 +71,7 @@ static __init int s3c2416_pm_init(void)
70} 71}
71 72
72arch_initcall(s3c2416_pm_init); 73arch_initcall(s3c2416_pm_init);
73 74#endif
74 75
75static void s3c2416_pm_resume(void) 76static void s3c2416_pm_resume(void)
76{ 77{
diff --git a/arch/arm/mach-s3c24xx/pm.c b/arch/arm/mach-s3c24xx/pm.c
index b19256ec8d40..5d510bca0844 100644
--- a/arch/arm/mach-s3c24xx/pm.c
+++ b/arch/arm/mach-s3c24xx/pm.c
@@ -50,6 +50,7 @@
50 50
51#define PFX "s3c24xx-pm: " 51#define PFX "s3c24xx-pm: "
52 52
53#ifdef CONFIG_PM_SLEEP
53static struct sleep_save core_save[] = { 54static struct sleep_save core_save[] = {
54 /* we restore the timings here, with the proviso that the board 55 /* we restore the timings here, with the proviso that the board
55 * brings the system up in an slower, or equal frequency setting 56 * brings the system up in an slower, or equal frequency setting
@@ -67,6 +68,7 @@ static struct sleep_save core_save[] = {
67 SAVE_ITEM(S3C2410_BANKCON4), 68 SAVE_ITEM(S3C2410_BANKCON4),
68 SAVE_ITEM(S3C2410_BANKCON5), 69 SAVE_ITEM(S3C2410_BANKCON5),
69}; 70};
71#endif
70 72
71/* s3c_pm_check_resume_pin 73/* s3c_pm_check_resume_pin
72 * 74 *
@@ -121,7 +123,7 @@ void s3c_pm_configure_extint(void)
121 } 123 }
122} 124}
123 125
124 126#ifdef CONFIG_PM_SLEEP
125void s3c_pm_restore_core(void) 127void s3c_pm_restore_core(void)
126{ 128{
127 s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save)); 129 s3c_pm_do_restore_core(core_save, ARRAY_SIZE(core_save));
@@ -131,4 +133,4 @@ void s3c_pm_save_core(void)
131{ 133{
132 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save)); 134 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save));
133} 135}
134 136#endif
diff --git a/arch/arm/mach-s3c24xx/s3c2410.c b/arch/arm/mach-s3c24xx/s3c2410.c
index 2a6985a4a0ff..5061d66ca10c 100644
--- a/arch/arm/mach-s3c24xx/s3c2410.c
+++ b/arch/arm/mach-s3c24xx/s3c2410.c
@@ -121,7 +121,7 @@ int __init s3c2410_init(void)
121{ 121{
122 printk("S3C2410: Initialising architecture\n"); 122 printk("S3C2410: Initialising architecture\n");
123 123
124#ifdef CONFIG_PM 124#ifdef CONFIG_PM_SLEEP
125 register_syscore_ops(&s3c2410_pm_syscore_ops); 125 register_syscore_ops(&s3c2410_pm_syscore_ops);
126 register_syscore_ops(&s3c24xx_irq_syscore_ops); 126 register_syscore_ops(&s3c24xx_irq_syscore_ops);
127#endif 127#endif
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index ecf2c77ab88b..64a13605cfc3 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -172,7 +172,7 @@ int __init s3c2412_init(void)
172{ 172{
173 printk("S3C2412: Initialising architecture\n"); 173 printk("S3C2412: Initialising architecture\n");
174 174
175#ifdef CONFIG_PM 175#ifdef CONFIG_PM_SLEEP
176 register_syscore_ops(&s3c2412_pm_syscore_ops); 176 register_syscore_ops(&s3c2412_pm_syscore_ops);
177 register_syscore_ops(&s3c24xx_irq_syscore_ops); 177 register_syscore_ops(&s3c24xx_irq_syscore_ops);
178#endif 178#endif
diff --git a/arch/arm/mach-s3c24xx/s3c2416.c b/arch/arm/mach-s3c24xx/s3c2416.c
index bfd4da86deb8..3f8ca2a3ef17 100644
--- a/arch/arm/mach-s3c24xx/s3c2416.c
+++ b/arch/arm/mach-s3c24xx/s3c2416.c
@@ -98,7 +98,7 @@ int __init s3c2416_init(void)
98 s3c_adc_setname("s3c2416-adc"); 98 s3c_adc_setname("s3c2416-adc");
99 s3c_rtc_setname("s3c2416-rtc"); 99 s3c_rtc_setname("s3c2416-rtc");
100 100
101#ifdef CONFIG_PM 101#ifdef CONFIG_PM_SLEEP
102 register_syscore_ops(&s3c2416_pm_syscore_ops); 102 register_syscore_ops(&s3c2416_pm_syscore_ops);
103 register_syscore_ops(&s3c24xx_irq_syscore_ops); 103 register_syscore_ops(&s3c24xx_irq_syscore_ops);
104 register_syscore_ops(&s3c2416_irq_syscore_ops); 104 register_syscore_ops(&s3c2416_irq_syscore_ops);
diff --git a/arch/arm/mach-s3c24xx/s3c2440.c b/arch/arm/mach-s3c24xx/s3c2440.c
index 03d379f1fc52..eb733555fab5 100644
--- a/arch/arm/mach-s3c24xx/s3c2440.c
+++ b/arch/arm/mach-s3c24xx/s3c2440.c
@@ -57,11 +57,11 @@ int __init s3c2440_init(void)
57 57
58 /* register suspend/resume handlers */ 58 /* register suspend/resume handlers */
59 59
60#ifdef CONFIG_PM 60#ifdef CONFIG_PM_SLEEP
61 register_syscore_ops(&s3c2410_pm_syscore_ops); 61 register_syscore_ops(&s3c2410_pm_syscore_ops);
62 register_syscore_ops(&s3c24xx_irq_syscore_ops); 62 register_syscore_ops(&s3c24xx_irq_syscore_ops);
63#endif
64 register_syscore_ops(&s3c244x_pm_syscore_ops); 63 register_syscore_ops(&s3c244x_pm_syscore_ops);
64#endif
65 65
66 /* register our system device for everything else */ 66 /* register our system device for everything else */
67 67
diff --git a/arch/arm/mach-s3c24xx/s3c2442.c b/arch/arm/mach-s3c24xx/s3c2442.c
index 7b043349f1c8..893998ede022 100644
--- a/arch/arm/mach-s3c24xx/s3c2442.c
+++ b/arch/arm/mach-s3c24xx/s3c2442.c
@@ -60,11 +60,11 @@ int __init s3c2442_init(void)
60{ 60{
61 printk("S3C2442: Initialising architecture\n"); 61 printk("S3C2442: Initialising architecture\n");
62 62
63#ifdef CONFIG_PM 63#ifdef CONFIG_PM_SLEEP
64 register_syscore_ops(&s3c2410_pm_syscore_ops); 64 register_syscore_ops(&s3c2410_pm_syscore_ops);
65 register_syscore_ops(&s3c24xx_irq_syscore_ops); 65 register_syscore_ops(&s3c24xx_irq_syscore_ops);
66#endif
67 register_syscore_ops(&s3c244x_pm_syscore_ops); 66 register_syscore_ops(&s3c244x_pm_syscore_ops);
67#endif
68 68
69 return device_register(&s3c2442_dev); 69 return device_register(&s3c2442_dev);
70} 70}
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 177f97802745..b14119585dc7 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -108,7 +108,7 @@ static int __init s3c2442_core_init(void)
108core_initcall(s3c2442_core_init); 108core_initcall(s3c2442_core_init);
109 109
110 110
111#ifdef CONFIG_PM 111#ifdef CONFIG_PM_SLEEP
112static struct sleep_save s3c244x_sleep[] = { 112static struct sleep_save s3c244x_sleep[] = {
113 SAVE_ITEM(S3C2440_DSC0), 113 SAVE_ITEM(S3C2440_DSC0),
114 SAVE_ITEM(S3C2440_DSC1), 114 SAVE_ITEM(S3C2440_DSC1),
@@ -127,12 +127,9 @@ static void s3c244x_resume(void)
127{ 127{
128 s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep)); 128 s3c_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
129} 129}
130#else
131#define s3c244x_suspend NULL
132#define s3c244x_resume NULL
133#endif
134 130
135struct syscore_ops s3c244x_pm_syscore_ops = { 131struct syscore_ops s3c244x_pm_syscore_ops = {
136 .suspend = s3c244x_suspend, 132 .suspend = s3c244x_suspend,
137 .resume = s3c244x_resume, 133 .resume = s3c244x_resume,
138}; 134};
135#endif
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 26ca2427e53d..eff95e950d81 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -189,6 +189,7 @@ endchoice
189config SMDK6410_WM1190_EV1 189config SMDK6410_WM1190_EV1
190 bool "Support Wolfson Microelectronics 1190-EV1 PMIC card" 190 bool "Support Wolfson Microelectronics 1190-EV1 PMIC card"
191 depends on MACH_SMDK6410 191 depends on MACH_SMDK6410
192 depends on I2C=y
192 select MFD_WM8350_I2C 193 select MFD_WM8350_I2C
193 select REGULATOR 194 select REGULATOR
194 select REGULATOR_WM8350 195 select REGULATOR_WM8350
@@ -203,6 +204,7 @@ config SMDK6410_WM1190_EV1
203config SMDK6410_WM1192_EV1 204config SMDK6410_WM1192_EV1
204 bool "Support Wolfson Microelectronics 1192-EV1 PMIC card" 205 bool "Support Wolfson Microelectronics 1192-EV1 PMIC card"
205 depends on MACH_SMDK6410 206 depends on MACH_SMDK6410
207 depends on I2C=y
206 select MFD_WM831X 208 select MFD_WM831X
207 select MFD_WM831X_I2C 209 select MFD_WM831X_I2C
208 select REGULATOR 210 select REGULATOR
@@ -269,8 +271,8 @@ config MACH_SMARTQ7
269 271
270config MACH_WLF_CRAGG_6410 272config MACH_WLF_CRAGG_6410
271 bool "Wolfson Cragganmore 6410" 273 bool "Wolfson Cragganmore 6410"
274 depends on I2C=y
272 select CPU_S3C6410 275 select CPU_S3C6410
273 select I2C
274 select LEDS_GPIO_REGISTER 276 select LEDS_GPIO_REGISTER
275 select S3C64XX_DEV_SPI0 277 select S3C64XX_DEV_SPI0
276 select S3C64XX_SETUP_FB_24BPP 278 select S3C64XX_SETUP_FB_24BPP
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 12f67b61ca5f..17f4b07ec763 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -16,7 +16,8 @@ obj-$(CONFIG_CPU_S3C6410) += s3c6410.o
16 16
17# PM 17# PM
18 18
19obj-$(CONFIG_PM) += pm.o irq-pm.o sleep.o 19obj-$(CONFIG_PM) += pm.o
20obj-$(CONFIG_PM_SLEEP) += irq-pm.o sleep.o
20obj-$(CONFIG_CPU_IDLE) += cpuidle.o 21obj-$(CONFIG_CPU_IDLE) += cpuidle.o
21 22
22# DMA support 23# DMA support
diff --git a/arch/arm/mach-s3c64xx/crag6410.h b/arch/arm/mach-s3c64xx/crag6410.h
index 7bc66682687e..dcbe17f5e5f8 100644
--- a/arch/arm/mach-s3c64xx/crag6410.h
+++ b/arch/arm/mach-s3c64xx/crag6410.h
@@ -14,6 +14,7 @@
14#include <mach/gpio-samsung.h> 14#include <mach/gpio-samsung.h>
15 15
16#define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START 16#define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START
17#define BANFF_PMIC_IRQ_BASE (IRQ_BOARD_START + 64)
17 18
18#define PCA935X_GPIO_BASE GPIO_BOARD_START 19#define PCA935X_GPIO_BASE GPIO_BOARD_START
19#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8) 20#define CODEC_GPIO_BASE (GPIO_BOARD_START + 8)
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 10b913baab28..65c426bc45f7 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -554,6 +554,7 @@ static struct wm831x_touch_pdata touch_pdata = {
554 554
555static struct wm831x_pdata crag_pmic_pdata = { 555static struct wm831x_pdata crag_pmic_pdata = {
556 .wm831x_num = 1, 556 .wm831x_num = 1,
557 .irq_base = BANFF_PMIC_IRQ_BASE,
557 .gpio_base = BANFF_PMIC_GPIO_BASE, 558 .gpio_base = BANFF_PMIC_GPIO_BASE,
558 .soft_shutdown = true, 559 .soft_shutdown = true,
559 560
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 661eb662d051..b7447a92276e 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -209,7 +209,7 @@ static struct platform_device smdk6410_smsc911x = {
209}; 209};
210 210
211#ifdef CONFIG_REGULATOR 211#ifdef CONFIG_REGULATOR
212static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = { 212static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = {
213 REGULATOR_SUPPLY("PVDD", "0-001b"), 213 REGULATOR_SUPPLY("PVDD", "0-001b"),
214 REGULATOR_SUPPLY("AVDD", "0-001b"), 214 REGULATOR_SUPPLY("AVDD", "0-001b"),
215}; 215};
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index aaf7bea4032f..75b14e756383 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -194,6 +194,7 @@ void s3c_pm_debug_smdkled(u32 set, u32 clear)
194} 194}
195#endif 195#endif
196 196
197#ifdef CONFIG_PM_SLEEP
197static struct sleep_save core_save[] = { 198static struct sleep_save core_save[] = {
198 SAVE_ITEM(S3C64XX_MEM0DRVCON), 199 SAVE_ITEM(S3C64XX_MEM0DRVCON),
199 SAVE_ITEM(S3C64XX_MEM1DRVCON), 200 SAVE_ITEM(S3C64XX_MEM1DRVCON),
@@ -238,6 +239,7 @@ void s3c_pm_save_core(void)
238 s3c_pm_do_save(misc_save, ARRAY_SIZE(misc_save)); 239 s3c_pm_do_save(misc_save, ARRAY_SIZE(misc_save));
239 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save)); 240 s3c_pm_do_save(core_save, ARRAY_SIZE(core_save));
240} 241}
242#endif
241 243
242/* since both s3c6400 and s3c6410 share the same sleep pm calls, we 244/* since both s3c6400 and s3c6410 share the same sleep pm calls, we
243 * put the per-cpu code in here until any new cpu comes along and changes 245 * put the per-cpu code in here until any new cpu comes along and changes
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 2f36c85eec4b..0fb484221c90 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -62,6 +62,10 @@ config ARCH_R8A7740
62 select ARCH_RMOBILE 62 select ARCH_RMOBILE
63 select RENESAS_INTC_IRQPIN 63 select RENESAS_INTC_IRQPIN
64 64
65config ARCH_R8A7778
66 bool "R-Car M1A (R8A77781)"
67 select ARCH_RCAR_GEN1
68
65config ARCH_R8A7779 69config ARCH_R8A7779
66 bool "R-Car H1 (R8A77790)" 70 bool "R-Car H1 (R8A77790)"
67 select ARCH_RCAR_GEN1 71 select ARCH_RCAR_GEN1
@@ -69,15 +73,22 @@ config ARCH_R8A7779
69config ARCH_R8A7790 73config ARCH_R8A7790
70 bool "R-Car H2 (R8A77900)" 74 bool "R-Car H2 (R8A77900)"
71 select ARCH_RCAR_GEN2 75 select ARCH_RCAR_GEN2
76 select I2C
72 77
73config ARCH_R8A7791 78config ARCH_R8A7791
74 bool "R-Car M2-W (R8A77910)" 79 bool "R-Car M2-W (R8A77910)"
75 select ARCH_RCAR_GEN2 80 select ARCH_RCAR_GEN2
81 select I2C
76 82
77config ARCH_R8A7794 83config ARCH_R8A7794
78 bool "R-Car E2 (R8A77940)" 84 bool "R-Car E2 (R8A77940)"
79 select ARCH_RCAR_GEN2 85 select ARCH_RCAR_GEN2
80 86
87config ARCH_SH73A0
88 bool "SH-Mobile AG5 (R8A73A00)"
89 select ARCH_RMOBILE
90 select RENESAS_INTC_IRQPIN
91
81comment "Renesas ARM SoCs Board Type" 92comment "Renesas ARM SoCs Board Type"
82 93
83config MACH_MARZEN 94config MACH_MARZEN
@@ -92,13 +103,6 @@ if ARCH_SHMOBILE_LEGACY
92 103
93comment "Renesas ARM SoCs System Type" 104comment "Renesas ARM SoCs System Type"
94 105
95config ARCH_SH7372
96 bool "SH-Mobile AP4 (SH7372)"
97 select ARCH_RMOBILE
98 select ARCH_WANT_OPTIONAL_GPIOLIB
99 select ARM_CPU_SUSPEND if PM || CPU_IDLE
100 select SH_INTC
101
102config ARCH_SH73A0 106config ARCH_SH73A0
103 bool "SH-Mobile AG5 (R8A73A00)" 107 bool "SH-Mobile AG5 (R8A73A00)"
104 select ARCH_RMOBILE 108 select ARCH_RMOBILE
@@ -108,13 +112,6 @@ config ARCH_SH73A0
108 select SH_INTC 112 select SH_INTC
109 select RENESAS_INTC_IRQPIN 113 select RENESAS_INTC_IRQPIN
110 114
111config ARCH_R8A73A4
112 bool "R-Mobile APE6 (R8A73A40)"
113 select ARCH_RMOBILE
114 select ARCH_WANT_OPTIONAL_GPIOLIB
115 select ARM_GIC
116 select RENESAS_IRQC
117
118config ARCH_R8A7740 115config ARCH_R8A7740
119 bool "R-Mobile A1 (R8A77400)" 116 bool "R-Mobile A1 (R8A77400)"
120 select ARCH_RMOBILE 117 select ARCH_RMOBILE
@@ -136,33 +133,6 @@ config ARCH_R8A7779
136 133
137comment "Renesas ARM SoCs Board Type" 134comment "Renesas ARM SoCs Board Type"
138 135
139config MACH_APE6EVM
140 bool "APE6EVM board"
141 depends on ARCH_R8A73A4
142 select SMSC_PHY if SMSC911X
143 select USE_OF
144
145config MACH_APE6EVM_REFERENCE
146 bool "APE6EVM board - Reference Device Tree Implementation"
147 depends on ARCH_R8A73A4
148 select SMSC_PHY if SMSC911X
149 select USE_OF
150 ---help---
151 Use reference implementation of APE6EVM board support
152 which makes a greater use of device tree at the expense
153 of not supporting a number of devices.
154
155 This is intended to aid developers
156
157config MACH_MACKEREL
158 bool "mackerel board"
159 depends on ARCH_SH7372
160 select ARCH_REQUIRE_GPIOLIB
161 select REGULATOR_FIXED_VOLTAGE if REGULATOR
162 select SMSC_PHY if SMSC911X
163 select SND_SOC_AK4642 if SND_SIMPLE_CARD
164 select USE_OF
165
166config MACH_ARMADILLO800EVA 136config MACH_ARMADILLO800EVA
167 bool "Armadillo-800 EVA board" 137 bool "Armadillo-800 EVA board"
168 depends on ARCH_R8A7740 138 depends on ARCH_R8A7740
@@ -209,20 +179,6 @@ config MACH_KZM9G
209 select SND_SOC_AK4642 if SND_SIMPLE_CARD 179 select SND_SOC_AK4642 if SND_SIMPLE_CARD
210 select USE_OF 180 select USE_OF
211 181
212config MACH_KZM9G_REFERENCE
213 bool "KZM-A9-GT board - Reference Device Tree Implementation"
214 depends on ARCH_SH73A0
215 select ARCH_REQUIRE_GPIOLIB
216 select REGULATOR_FIXED_VOLTAGE if REGULATOR
217 select SND_SOC_AK4642 if SND_SIMPLE_CARD
218 select USE_OF
219 ---help---
220 Use reference implementation of KZM-A9-GT board support
221 which makes as greater use of device tree at the expense
222 of not supporting a number of devices.
223
224 This is intended to aid developers
225
226comment "Renesas ARM SoCs System Configuration" 182comment "Renesas ARM SoCs System Configuration"
227 183
228config CPU_HAS_INTEVT 184config CPU_HAS_INTEVT
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
index d53996e6da97..89e463de4479 100644
--- a/arch/arm/mach-shmobile/Makefile
+++ b/arch/arm/mach-shmobile/Makefile
@@ -6,14 +6,13 @@
6obj-y := timer.o console.o 6obj-y := timer.o console.o
7 7
8# CPU objects 8# CPU objects
9obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o pm-sh7372.o 9obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o pm-sh73a0.o
10obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o pm-sh73a0.o
11obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o 10obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o
12obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o 11obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o pm-r8a7740.o
13obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o 12obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o
14obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o 13obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o pm-r8a7779.o
15obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o pm-r8a7790.o 14obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o
16obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o pm-r8a7791.o 15obj-$(CONFIG_ARCH_R8A7791) += setup-r8a7791.o
17obj-$(CONFIG_ARCH_R8A7794) += setup-r8a7794.o 16obj-$(CONFIG_ARCH_R8A7794) += setup-r8a7794.o
18obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o 17obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o
19obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o 18obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
@@ -21,9 +20,7 @@ obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
21# Clock objects 20# Clock objects
22ifndef CONFIG_COMMON_CLK 21ifndef CONFIG_COMMON_CLK
23obj-y += clock.o 22obj-y += clock.o
24obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o
25obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o 23obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o
26obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o
27obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o 24obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o
28obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o 25obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o
29obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o 26obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o
@@ -35,6 +32,8 @@ cpu-y := platsmp.o headsmp.o
35# Shared SoC family objects 32# Shared SoC family objects
36obj-$(CONFIG_ARCH_RCAR_GEN2) += setup-rcar-gen2.o platsmp-apmu.o $(cpu-y) 33obj-$(CONFIG_ARCH_RCAR_GEN2) += setup-rcar-gen2.o platsmp-apmu.o $(cpu-y)
37CFLAGS_setup-rcar-gen2.o += -march=armv7-a 34CFLAGS_setup-rcar-gen2.o += -march=armv7-a
35obj-$(CONFIG_ARCH_R8A7790) += regulator-quirk-rcar-gen2.o
36obj-$(CONFIG_ARCH_R8A7791) += regulator-quirk-rcar-gen2.o
38 37
39# SMP objects 38# SMP objects
40smp-y := $(cpu-y) 39smp-y := $(cpu-y)
@@ -46,27 +45,20 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
46 45
47# PM objects 46# PM objects
48obj-$(CONFIG_SUSPEND) += suspend.o 47obj-$(CONFIG_SUSPEND) += suspend.o
49obj-$(CONFIG_CPU_IDLE) += cpuidle.o
50obj-$(CONFIG_CPU_FREQ) += cpufreq.o 48obj-$(CONFIG_CPU_FREQ) += cpufreq.o
51obj-$(CONFIG_PM_RCAR) += pm-rcar.o 49obj-$(CONFIG_PM_RCAR) += pm-rcar.o
52obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o 50obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o
53 51obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o
54# special sh7372 handling for IRQ objects and low level sleep code
55obj-$(CONFIG_ARCH_SH7372) += entry-intc.o sleep-sh7372.o
56 52
57# Board objects 53# Board objects
58ifdef CONFIG_ARCH_SHMOBILE_MULTI 54ifdef CONFIG_ARCH_SHMOBILE_MULTI
59obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o 55obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o
60else 56else
61obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
62obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o
63obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
64obj-$(CONFIG_MACH_BOCKW) += board-bockw.o 57obj-$(CONFIG_MACH_BOCKW) += board-bockw.o
65obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o 58obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
66obj-$(CONFIG_MACH_MARZEN) += board-marzen.o 59obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
67obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o 60obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
68obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o 61obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o intc-sh73a0.o
69obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o
70endif 62endif
71 63
72# Framework support 64# Framework support
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
index 02532bea5300..e1ef19cef89c 100644
--- a/arch/arm/mach-shmobile/Makefile.boot
+++ b/arch/arm/mach-shmobile/Makefile.boot
@@ -1,13 +1,9 @@
1# per-board load address for uImage 1# per-board load address for uImage
2loadaddr-y := 2loadaddr-y :=
3loadaddr-$(CONFIG_MACH_APE6EVM) += 0x40008000
4loadaddr-$(CONFIG_MACH_APE6EVM_REFERENCE) += 0x40008000
5loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 3loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000
6loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 4loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
7loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 5loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
8loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 6loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
9loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
10loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
11loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000 7loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000
12 8
13__ZRELADDR := $(sort $(loadaddr-y)) 9__ZRELADDR := $(sort $(loadaddr-y))
diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
deleted file mode 100644
index 3b68370b03a0..000000000000
--- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * APE6EVM board support
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 Magnus Damm
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/gpio.h>
18#include <linux/kernel.h>
19#include <linux/of_platform.h>
20#include <linux/pinctrl/machine.h>
21#include <linux/platform_device.h>
22#include <linux/sh_clk.h>
23
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27#include "common.h"
28#include "r8a73a4.h"
29
30static void __init ape6evm_add_standard_devices(void)
31{
32
33 struct clk *parent;
34 struct clk *mp;
35
36 r8a73a4_clock_init();
37
38 /* MP clock parent = extal2 */
39 parent = clk_get(NULL, "extal2");
40 mp = clk_get(NULL, "mp");
41 BUG_ON(IS_ERR(parent) || IS_ERR(mp));
42
43 clk_set_parent(mp, parent);
44 clk_put(parent);
45 clk_put(mp);
46
47 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
48}
49
50static const char *ape6evm_boards_compat_dt[] __initdata = {
51 "renesas,ape6evm-reference",
52 NULL,
53};
54
55DT_MACHINE_START(APE6EVM_DT, "ape6evm")
56 .init_early = shmobile_init_delay,
57 .init_machine = ape6evm_add_standard_devices,
58 .init_late = shmobile_init_late,
59 .dt_compat = ape6evm_boards_compat_dt,
60MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
deleted file mode 100644
index 444f22d370f0..000000000000
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ /dev/null
@@ -1,306 +0,0 @@
1/*
2 * APE6EVM board support
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 Magnus Damm
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#include <linux/gpio.h>
18#include <linux/gpio_keys.h>
19#include <linux/input.h>
20#include <linux/interrupt.h>
21#include <linux/irqchip.h>
22#include <linux/irqchip/arm-gic.h>
23#include <linux/kernel.h>
24#include <linux/mfd/tmio.h>
25#include <linux/mmc/host.h>
26#include <linux/mmc/sh_mmcif.h>
27#include <linux/mmc/sh_mobile_sdhi.h>
28#include <linux/pinctrl/machine.h>
29#include <linux/platform_device.h>
30#include <linux/regulator/fixed.h>
31#include <linux/regulator/machine.h>
32#include <linux/sh_clk.h>
33#include <linux/smsc911x.h>
34
35#include <asm/mach-types.h>
36#include <asm/mach/arch.h>
37
38#include "common.h"
39#include "irqs.h"
40#include "r8a73a4.h"
41
42/* LEDS */
43static struct gpio_led ape6evm_leds[] = {
44 {
45 .name = "gnss-en",
46 .gpio = 28,
47 .default_state = LEDS_GPIO_DEFSTATE_OFF,
48 }, {
49 .name = "nfc-nrst",
50 .gpio = 126,
51 .default_state = LEDS_GPIO_DEFSTATE_OFF,
52 }, {
53 .name = "gnss-nrst",
54 .gpio = 132,
55 .default_state = LEDS_GPIO_DEFSTATE_OFF,
56 }, {
57 .name = "bt-wakeup",
58 .gpio = 232,
59 .default_state = LEDS_GPIO_DEFSTATE_OFF,
60 }, {
61 .name = "strobe",
62 .gpio = 250,
63 .default_state = LEDS_GPIO_DEFSTATE_OFF,
64 }, {
65 .name = "bbresetout",
66 .gpio = 288,
67 .default_state = LEDS_GPIO_DEFSTATE_OFF,
68 },
69};
70
71static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = {
72 .leds = ape6evm_leds,
73 .num_leds = ARRAY_SIZE(ape6evm_leds),
74};
75
76/* GPIO KEY */
77#define GPIO_KEY(c, g, d, ...) \
78 { .code = c, .gpio = g, .desc = d, .active_low = 1 }
79
80static struct gpio_keys_button gpio_buttons[] = {
81 GPIO_KEY(KEY_0, 324, "S16"),
82 GPIO_KEY(KEY_MENU, 325, "S17"),
83 GPIO_KEY(KEY_HOME, 326, "S18"),
84 GPIO_KEY(KEY_BACK, 327, "S19"),
85 GPIO_KEY(KEY_VOLUMEUP, 328, "S20"),
86 GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
87};
88
89static struct gpio_keys_platform_data ape6evm_keys_pdata __initdata = {
90 .buttons = gpio_buttons,
91 .nbuttons = ARRAY_SIZE(gpio_buttons),
92};
93
94/* Dummy supplies, where voltage doesn't matter */
95static struct regulator_consumer_supply dummy_supplies[] = {
96 REGULATOR_SUPPLY("vddvario", "smsc911x"),
97 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
98};
99
100/* SMSC LAN9220 */
101static const struct resource lan9220_res[] __initconst = {
102 DEFINE_RES_MEM(0x08000000, 0x1000),
103 {
104 .start = irq_pin(40), /* IRQ40 */
105 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH,
106 },
107};
108
109static const struct smsc911x_platform_config lan9220_data __initconst = {
110 .flags = SMSC911X_USE_32BIT,
111 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
112 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
113};
114
115/*
116 * MMC0 power supplies:
117 * Both Vcc and VccQ to eMMC on APE6EVM are supplied by a tps80032 voltage
118 * regulator. Until support for it is added to this file we simulate the
119 * Vcc supply by a fixed always-on regulator
120 */
121static struct regulator_consumer_supply vcc_mmc0_consumers[] =
122{
123 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
124};
125
126/*
127 * SDHI0 power supplies:
128 * Vcc to SDHI0 on APE6EVM is supplied by a GPIO-switchable regulator. VccQ is
129 * provided by the same tps80032 regulator as both MMC0 voltages - see comment
130 * above
131 */
132static struct regulator_consumer_supply vcc_sdhi0_consumers[] =
133{
134 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
135};
136
137static struct regulator_init_data vcc_sdhi0_init_data = {
138 .constraints = {
139 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
140 },
141 .num_consumer_supplies = ARRAY_SIZE(vcc_sdhi0_consumers),
142 .consumer_supplies = vcc_sdhi0_consumers,
143};
144
145static const struct fixed_voltage_config vcc_sdhi0_info __initconst = {
146 .supply_name = "SDHI0 Vcc",
147 .microvolts = 3300000,
148 .gpio = 76,
149 .enable_high = 1,
150 .init_data = &vcc_sdhi0_init_data,
151};
152
153/*
154 * SDHI1 power supplies:
155 * Vcc and VccQ to SDHI1 on APE6EVM are both fixed at 3.3V
156 */
157static struct regulator_consumer_supply vcc_sdhi1_consumers[] =
158{
159 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
160};
161
162/* MMCIF */
163static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = {
164 .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
165 .slave_id_tx = SHDMA_SLAVE_MMCIF0_TX,
166 .slave_id_rx = SHDMA_SLAVE_MMCIF0_RX,
167 .ccs_unsupported = true,
168};
169
170static const struct resource mmcif0_resources[] __initconst = {
171 DEFINE_RES_MEM(0xee200000, 0x100),
172 DEFINE_RES_IRQ(gic_spi(169)),
173};
174
175/* SDHI0 */
176static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = {
177 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
178 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
179};
180
181static const struct resource sdhi0_resources[] __initconst = {
182 DEFINE_RES_MEM(0xee100000, 0x100),
183 DEFINE_RES_IRQ(gic_spi(165)),
184};
185
186/* SDHI1 */
187static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = {
188 .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
189 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
190 MMC_CAP_NEEDS_POLL,
191};
192
193static const struct resource sdhi1_resources[] __initconst = {
194 DEFINE_RES_MEM(0xee120000, 0x100),
195 DEFINE_RES_IRQ(gic_spi(166)),
196};
197
198static const struct pinctrl_map ape6evm_pinctrl_map[] __initconst = {
199 /* SCIFA0 console */
200 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4",
201 "scifa0_data", "scifa0"),
202 /* SMSC */
203 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4",
204 "irqc_irq40", "irqc"),
205 /* MMCIF0 */
206 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4",
207 "mmc0_data8", "mmc0"),
208 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4",
209 "mmc0_ctrl", "mmc0"),
210 /* SDHI0: uSD: no WP */
211 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4",
212 "sdhi0_data4", "sdhi0"),
213 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4",
214 "sdhi0_ctrl", "sdhi0"),
215 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a73a4",
216 "sdhi0_cd", "sdhi0"),
217 /* SDHI1 */
218 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a73a4",
219 "sdhi1_data4", "sdhi1"),
220 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a73a4",
221 "sdhi1_ctrl", "sdhi1"),
222};
223
224static void __init ape6evm_add_standard_devices(void)
225{
226
227 struct clk *parent;
228 struct clk *mp;
229
230 r8a73a4_clock_init();
231
232 /* MP clock parent = extal2 */
233 parent = clk_get(NULL, "extal2");
234 mp = clk_get(NULL, "mp");
235 BUG_ON(IS_ERR(parent) || IS_ERR(mp));
236
237 clk_set_parent(mp, parent);
238 clk_put(parent);
239 clk_put(mp);
240
241 pinctrl_register_mappings(ape6evm_pinctrl_map,
242 ARRAY_SIZE(ape6evm_pinctrl_map));
243 r8a73a4_pinmux_init();
244 r8a73a4_add_standard_devices();
245
246 /* LAN9220 ethernet */
247 gpio_request_one(270, GPIOF_OUT_INIT_HIGH, NULL); /* smsc9220 RESET */
248
249 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
250
251 platform_device_register_resndata(NULL, "smsc911x", -1,
252 lan9220_res, ARRAY_SIZE(lan9220_res),
253 &lan9220_data, sizeof(lan9220_data));
254
255 regulator_register_always_on(1, "MMC0 Vcc", vcc_mmc0_consumers,
256 ARRAY_SIZE(vcc_mmc0_consumers), 2800000);
257 platform_device_register_resndata(NULL, "sh_mmcif", 0,
258 mmcif0_resources, ARRAY_SIZE(mmcif0_resources),
259 &mmcif0_pdata, sizeof(mmcif0_pdata));
260 platform_device_register_data(NULL, "reg-fixed-voltage", 2,
261 &vcc_sdhi0_info, sizeof(vcc_sdhi0_info));
262 platform_device_register_resndata(NULL, "sh_mobile_sdhi", 0,
263 sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
264 &sdhi0_pdata, sizeof(sdhi0_pdata));
265 regulator_register_always_on(3, "SDHI1 Vcc", vcc_sdhi1_consumers,
266 ARRAY_SIZE(vcc_sdhi1_consumers), 3300000);
267 platform_device_register_resndata(NULL, "sh_mobile_sdhi", 1,
268 sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
269 &sdhi1_pdata, sizeof(sdhi1_pdata));
270 platform_device_register_data(NULL, "gpio-keys", -1,
271 &ape6evm_keys_pdata,
272 sizeof(ape6evm_keys_pdata));
273 platform_device_register_data(NULL, "leds-gpio", -1,
274 &ape6evm_leds_pdata,
275 sizeof(ape6evm_leds_pdata));
276}
277
278static void __init ape6evm_legacy_init_time(void)
279{
280 /* Do not invoke DT-based timers via clocksource_of_init() */
281}
282
283static void __init ape6evm_legacy_init_irq(void)
284{
285 void __iomem *gic_dist_base = ioremap_nocache(0xf1001000, 0x1000);
286 void __iomem *gic_cpu_base = ioremap_nocache(0xf1002000, 0x1000);
287
288 gic_init(0, 29, gic_dist_base, gic_cpu_base);
289
290 /* Do not invoke DT-based interrupt code via irqchip_init() */
291}
292
293
294static const char *ape6evm_boards_compat_dt[] __initdata = {
295 "renesas,ape6evm",
296 NULL,
297};
298
299DT_MACHINE_START(APE6EVM_DT, "ape6evm")
300 .init_early = shmobile_init_delay,
301 .init_irq = ape6evm_legacy_init_irq,
302 .init_machine = ape6evm_add_standard_devices,
303 .init_late = shmobile_init_late,
304 .dt_compat = ape6evm_boards_compat_dt,
305 .init_time = ape6evm_legacy_init_time,
306MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index d649ade4a202..9a74efda3d18 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -36,7 +36,9 @@ static void __init bockw_init(void)
36 void __iomem *fpga; 36 void __iomem *fpga;
37 void __iomem *pfc; 37 void __iomem *pfc;
38 38
39#ifndef CONFIG_COMMON_CLK
39 r8a7778_clock_init(); 40 r8a7778_clock_init();
41#endif
40 r8a7778_init_irq_extpin_dt(1); 42 r8a7778_init_irq_extpin_dt(1);
41 r8a7778_add_dt_devices(); 43 r8a7778_add_dt_devices();
42 44
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
deleted file mode 100644
index 2e82e44ab852..000000000000
--- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
+++ /dev/null
@@ -1,62 +0,0 @@
1/*
2 * KZM-A9-GT board support - Reference Device Tree Implementation
3 *
4 * Copyright (C) 2012 Horms Solutions Ltd.
5 *
6 * Based on board-kzm9g.c
7 * Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2 of the License.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#include <linux/delay.h>
20#include <linux/io.h>
21#include <linux/irq.h>
22#include <linux/input.h>
23#include <linux/of_platform.h>
24
25#include <asm/hardware/cache-l2x0.h>
26#include <asm/mach-types.h>
27#include <asm/mach/arch.h>
28
29#include "common.h"
30#include "sh73a0.h"
31
32static void __init kzm_init(void)
33{
34 sh73a0_add_standard_devices_dt();
35
36#ifdef CONFIG_CACHE_L2X0
37 /* Shared attribute override enable, 64K*8way */
38 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
39#endif
40}
41
42#define RESCNT2 IOMEM(0xe6188020)
43static void kzm9g_restart(enum reboot_mode mode, const char *cmd)
44{
45 /* Do soft power on reset */
46 writel((1 << 31), RESCNT2);
47}
48
49static const char *kzm9g_boards_compat_dt[] __initdata = {
50 "renesas,kzm9g-reference",
51 NULL,
52};
53
54DT_MACHINE_START(KZM9G_DT, "kzm9g-reference")
55 .smp = smp_ops(sh73a0_smp_ops),
56 .map_io = sh73a0_map_io,
57 .init_early = shmobile_init_delay,
58 .init_machine = kzm_init,
59 .init_late = shmobile_init_late,
60 .restart = kzm9g_restart,
61 .dt_compat = kzm9g_boards_compat_dt,
62MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
deleted file mode 100644
index a1c1dfb6a67a..000000000000
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ /dev/null
@@ -1,1522 +0,0 @@
1/*
2 * mackerel board support
3 *
4 * Copyright (C) 2010 Renesas Solutions Corp.
5 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
6 *
7 * based on ap4evb
8 * Copyright (C) 2010 Magnus Damm
9 * Copyright (C) 2008 Yoshihiro Shimoda
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; version 2 of the License.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 */
20#include <linux/delay.h>
21#include <linux/kernel.h>
22#include <linux/init.h>
23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/platform_device.h>
26#include <linux/gpio.h>
27#include <linux/input.h>
28#include <linux/io.h>
29#include <linux/i2c.h>
30#include <linux/leds.h>
31#include <linux/mfd/tmio.h>
32#include <linux/mmc/host.h>
33#include <linux/mmc/sh_mmcif.h>
34#include <linux/mmc/sh_mobile_sdhi.h>
35#include <linux/mtd/mtd.h>
36#include <linux/mtd/partitions.h>
37#include <linux/mtd/physmap.h>
38#include <linux/mtd/sh_flctl.h>
39#include <linux/pinctrl/machine.h>
40#include <linux/pinctrl/pinconf-generic.h>
41#include <linux/platform_data/gpio_backlight.h>
42#include <linux/pm_clock.h>
43#include <linux/regulator/fixed.h>
44#include <linux/regulator/machine.h>
45#include <linux/smsc911x.h>
46#include <linux/sh_clk.h>
47#include <linux/tca6416_keypad.h>
48#include <linux/usb/renesas_usbhs.h>
49#include <linux/dma-mapping.h>
50
51#include <video/sh_mobile_hdmi.h>
52#include <video/sh_mobile_lcdc.h>
53#include <media/sh_mobile_ceu.h>
54#include <media/soc_camera.h>
55#include <media/soc_camera_platform.h>
56#include <sound/sh_fsi.h>
57#include <sound/simple_card.h>
58#include <asm/mach/arch.h>
59#include <asm/mach-types.h>
60
61#include "common.h"
62#include "intc.h"
63#include "irqs.h"
64#include "pm-rmobile.h"
65#include "sh-gpio.h"
66#include "sh7372.h"
67
68/*
69 * Address Interface BusWidth note
70 * ------------------------------------------------------------------
71 * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON
72 * 0x0800_0000 user area -
73 * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF
74 * 0x1400_0000 Ether (LAN9220) 16bit
75 * 0x1600_0000 user area - cannot use with NAND
76 * 0x1800_0000 user area -
77 * 0x1A00_0000 -
78 * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit
79 */
80
81/*
82 * CPU mode
83 *
84 * SW4 | Boot Area| Master | Remarks
85 * 1 | 2 | 3 | 4 | 5 | 6 | 8 | | Processor|
86 * ----+-----+-----+-----+-----+-----+-----+----------+----------+--------------
87 * ON | ON | OFF | ON | ON | OFF | OFF | External | System | External ROM
88 * ON | ON | ON | ON | ON | OFF | OFF | External | System | ROM Debug
89 * ON | ON | X | ON | OFF | OFF | OFF | Built-in | System | ROM Debug
90 * X | OFF | X | X | X | X | OFF | Built-in | System | MaskROM
91 * OFF | X | X | X | X | X | OFF | Built-in | System | MaskROM
92 * X | X | X | OFF | X | X | OFF | Built-in | System | MaskROM
93 * OFF | ON | OFF | X | X | OFF | ON | External | System | Standalone
94 * ON | OFF | OFF | X | X | OFF | ON | External | Realtime | Standalone
95*/
96
97/*
98 * NOR Flash ROM
99 *
100 * SW1 | SW2 | SW7 | NOR Flash ROM
101 * bit1 | bit1 bit2 | bit1 | Memory allocation
102 * ------+------------+------+------------------
103 * OFF | ON OFF | ON | Area 0
104 * OFF | ON OFF | OFF | Area 4
105 */
106
107/*
108 * SMSC 9220
109 *
110 * SW1 SMSC 9220
111 * -----------------------
112 * ON access disable
113 * OFF access enable
114 */
115
116/*
117 * NAND Flash ROM
118 *
119 * SW1 | SW2 | SW7 | NAND Flash ROM
120 * bit1 | bit1 bit2 | bit2 | Memory allocation
121 * ------+------------+------+------------------
122 * OFF | ON OFF | ON | FCE 0
123 * OFF | ON OFF | OFF | FCE 1
124 */
125
126/*
127 * External interrupt pin settings
128 *
129 * IRQX | pin setting | device | level
130 * ------+--------------------+--------------------+-------
131 * IRQ0 | ICR1A.IRQ0SA=0010 | SDHI2 card detect | Low
132 * IRQ6 | ICR1A.IRQ6SA=0011 | Ether(LAN9220) | High
133 * IRQ7 | ICR1A.IRQ7SA=0010 | LCD Touch Panel | Low
134 * IRQ8 | ICR2A.IRQ8SA=0010 | MMC/SD card detect | Low
135 * IRQ9 | ICR2A.IRQ9SA=0010 | KEY(TCA6408) | Low
136 * IRQ21 | ICR4A.IRQ21SA=0011 | Sensor(ADXL345) | High
137 * IRQ22 | ICR4A.IRQ22SA=0011 | Sensor(AK8975) | High
138 */
139
140/*
141 * USB
142 *
143 * USB0 : CN22 : Function
144 * USB1 : CN31 : Function/Host *1
145 *
146 * J30 (for CN31) *1
147 * ----------+---------------+-------------
148 * 1-2 short | VBUS 5V | Host
149 * open | external VBUS | Function
150 *
151 * CAUTION
152 *
153 * renesas_usbhs driver can use external interrupt mode
154 * (which come from USB-PHY) or autonomy mode (it use own interrupt)
155 * for detecting connection/disconnection when Function.
156 * USB will be power OFF while it has been disconnecting
157 * if external interrupt mode, and it is always power ON if autonomy mode,
158 *
159 * mackerel can not use external interrupt (IRQ7-PORT167) mode on "USB0",
160 * because Touchscreen is using IRQ7-PORT40.
161 * It is impossible to use IRQ7 demux on this board.
162 */
163
164/*
165 * SDHI0 (CN12)
166 *
167 * SW56 : OFF
168 *
169 */
170
171/* MMC /SDHI1 (CN7)
172 *
173 * I/O voltage : 1.8v
174 *
175 * Power voltage : 1.8v or 3.3v
176 * J22 : select power voltage *1
177 * 1-2 pin : 1.8v
178 * 2-3 pin : 3.3v
179 *
180 * *1
181 * Please change J22 depends the card to be used.
182 * MMC's OCR field set to support either voltage for the card inserted.
183 *
184 * SW1 | SW33
185 * | bit1 | bit2 | bit3 | bit4
186 * -------------+------+------+------+-------
187 * MMC0 OFF | OFF | X | ON | X (Use MMCIF)
188 * SDHI1 OFF | ON | X | OFF | X (Use MFD_SH_MOBILE_SDHI)
189 *
190 */
191
192/*
193 * SDHI2 (CN23)
194 *
195 * microSD card sloct
196 *
197 */
198
199/*
200 * FSI - AK4642
201 *
202 * it needs amixer settings for playing
203 *
204 * amixer set "Headphone Enable" on
205 */
206
207/* Fixed 3.3V and 1.8V regulators to be used by multiple devices */
208static struct regulator_consumer_supply fixed1v8_power_consumers[] =
209{
210 /*
211 * J22 on mackerel switches mmcif.0 and sdhi.1 between 1.8V and 3.3V
212 * Since we cannot support both voltages, we support the default 1.8V
213 */
214 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
215 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
216 REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
217 REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
218};
219
220static struct regulator_consumer_supply fixed3v3_power_consumers[] =
221{
222 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
223 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
224 REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.2"),
225 REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.2"),
226};
227
228/* Dummy supplies, where voltage doesn't matter */
229static struct regulator_consumer_supply dummy_supplies[] = {
230 REGULATOR_SUPPLY("vddvario", "smsc911x"),
231 REGULATOR_SUPPLY("vdd33a", "smsc911x"),
232};
233
234/* MTD */
235static struct mtd_partition nor_flash_partitions[] = {
236 {
237 .name = "loader",
238 .offset = 0x00000000,
239 .size = 512 * 1024,
240 .mask_flags = MTD_WRITEABLE,
241 },
242 {
243 .name = "bootenv",
244 .offset = MTDPART_OFS_APPEND,
245 .size = 512 * 1024,
246 .mask_flags = MTD_WRITEABLE,
247 },
248 {
249 .name = "kernel_ro",
250 .offset = MTDPART_OFS_APPEND,
251 .size = 8 * 1024 * 1024,
252 .mask_flags = MTD_WRITEABLE,
253 },
254 {
255 .name = "kernel",
256 .offset = MTDPART_OFS_APPEND,
257 .size = 8 * 1024 * 1024,
258 },
259 {
260 .name = "data",
261 .offset = MTDPART_OFS_APPEND,
262 .size = MTDPART_SIZ_FULL,
263 },
264};
265
266static struct physmap_flash_data nor_flash_data = {
267 .width = 2,
268 .parts = nor_flash_partitions,
269 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
270};
271
272static struct resource nor_flash_resources[] = {
273 [0] = {
274 .start = 0x20000000, /* CS0 shadow instead of regular CS0 */
275 .end = 0x28000000 - 1, /* needed by USB MASK ROM boot */
276 .flags = IORESOURCE_MEM,
277 }
278};
279
280static struct platform_device nor_flash_device = {
281 .name = "physmap-flash",
282 .dev = {
283 .platform_data = &nor_flash_data,
284 },
285 .num_resources = ARRAY_SIZE(nor_flash_resources),
286 .resource = nor_flash_resources,
287};
288
289/* SMSC */
290static struct resource smc911x_resources[] = {
291 {
292 .start = 0x14000000,
293 .end = 0x16000000 - 1,
294 .flags = IORESOURCE_MEM,
295 }, {
296 .start = evt2irq(0x02c0) /* IRQ6A */,
297 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
298 },
299};
300
301static struct smsc911x_platform_config smsc911x_info = {
302 .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS,
303 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
304 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
305};
306
307static struct platform_device smc911x_device = {
308 .name = "smsc911x",
309 .id = -1,
310 .num_resources = ARRAY_SIZE(smc911x_resources),
311 .resource = smc911x_resources,
312 .dev = {
313 .platform_data = &smsc911x_info,
314 },
315};
316
317/* MERAM */
318static struct sh_mobile_meram_info mackerel_meram_info = {
319 .addr_mode = SH_MOBILE_MERAM_MODE1,
320};
321
322static struct resource meram_resources[] = {
323 [0] = {
324 .name = "regs",
325 .start = 0xe8000000,
326 .end = 0xe807ffff,
327 .flags = IORESOURCE_MEM,
328 },
329 [1] = {
330 .name = "meram",
331 .start = 0xe8080000,
332 .end = 0xe81fffff,
333 .flags = IORESOURCE_MEM,
334 },
335};
336
337static struct platform_device meram_device = {
338 .name = "sh_mobile_meram",
339 .id = 0,
340 .num_resources = ARRAY_SIZE(meram_resources),
341 .resource = meram_resources,
342 .dev = {
343 .platform_data = &mackerel_meram_info,
344 },
345};
346
347/* LCDC and backlight */
348static struct fb_videomode mackerel_lcdc_modes[] = {
349 {
350 .name = "WVGA Panel",
351 .xres = 800,
352 .yres = 480,
353 .left_margin = 220,
354 .right_margin = 110,
355 .hsync_len = 70,
356 .upper_margin = 20,
357 .lower_margin = 5,
358 .vsync_len = 5,
359 .sync = 0,
360 },
361};
362
363static const struct sh_mobile_meram_cfg lcd_meram_cfg = {
364 .icb[0] = {
365 .meram_size = 0x40,
366 },
367 .icb[1] = {
368 .meram_size = 0x40,
369 },
370};
371
372static struct sh_mobile_lcdc_info lcdc_info = {
373 .meram_dev = &mackerel_meram_info,
374 .clock_source = LCDC_CLK_BUS,
375 .ch[0] = {
376 .chan = LCDC_CHAN_MAINLCD,
377 .fourcc = V4L2_PIX_FMT_RGB565,
378 .lcd_modes = mackerel_lcdc_modes,
379 .num_modes = ARRAY_SIZE(mackerel_lcdc_modes),
380 .interface_type = RGB24,
381 .clock_divider = 3,
382 .flags = 0,
383 .panel_cfg = {
384 .width = 152,
385 .height = 91,
386 },
387 .meram_cfg = &lcd_meram_cfg,
388 }
389};
390
391static struct resource lcdc_resources[] = {
392 [0] = {
393 .name = "LCDC",
394 .start = 0xfe940000,
395 .end = 0xfe943fff,
396 .flags = IORESOURCE_MEM,
397 },
398 [1] = {
399 .start = intcs_evt2irq(0x580),
400 .flags = IORESOURCE_IRQ,
401 },
402};
403
404static struct platform_device lcdc_device = {
405 .name = "sh_mobile_lcdc_fb",
406 .num_resources = ARRAY_SIZE(lcdc_resources),
407 .resource = lcdc_resources,
408 .dev = {
409 .platform_data = &lcdc_info,
410 .coherent_dma_mask = DMA_BIT_MASK(32),
411 },
412};
413
414static struct gpio_backlight_platform_data gpio_backlight_data = {
415 .fbdev = &lcdc_device.dev,
416 .gpio = 31,
417 .def_value = 1,
418 .name = "backlight",
419};
420
421static struct platform_device gpio_backlight_device = {
422 .name = "gpio-backlight",
423 .dev = {
424 .platform_data = &gpio_backlight_data,
425 },
426};
427
428/* HDMI */
429static struct sh_mobile_hdmi_info hdmi_info = {
430 .flags = HDMI_SND_SRC_SPDIF,
431};
432
433static struct resource hdmi_resources[] = {
434 [0] = {
435 .name = "HDMI",
436 .start = 0xe6be0000,
437 .end = 0xe6be00ff,
438 .flags = IORESOURCE_MEM,
439 },
440 [1] = {
441 /* There's also an HDMI interrupt on INTCS @ 0x18e0 */
442 .start = evt2irq(0x17e0),
443 .flags = IORESOURCE_IRQ,
444 },
445};
446
447static struct platform_device hdmi_device = {
448 .name = "sh-mobile-hdmi",
449 .num_resources = ARRAY_SIZE(hdmi_resources),
450 .resource = hdmi_resources,
451 .id = -1,
452 .dev = {
453 .platform_data = &hdmi_info,
454 },
455};
456
457static const struct sh_mobile_meram_cfg hdmi_meram_cfg = {
458 .icb[0] = {
459 .meram_size = 0x100,
460 },
461 .icb[1] = {
462 .meram_size = 0x100,
463 },
464};
465
466static struct sh_mobile_lcdc_info hdmi_lcdc_info = {
467 .meram_dev = &mackerel_meram_info,
468 .clock_source = LCDC_CLK_EXTERNAL,
469 .ch[0] = {
470 .chan = LCDC_CHAN_MAINLCD,
471 .fourcc = V4L2_PIX_FMT_RGB565,
472 .interface_type = RGB24,
473 .clock_divider = 1,
474 .flags = LCDC_FLAGS_DWPOL,
475 .meram_cfg = &hdmi_meram_cfg,
476 .tx_dev = &hdmi_device,
477 }
478};
479
480static struct resource hdmi_lcdc_resources[] = {
481 [0] = {
482 .name = "LCDC1",
483 .start = 0xfe944000,
484 .end = 0xfe947fff,
485 .flags = IORESOURCE_MEM,
486 },
487 [1] = {
488 .start = intcs_evt2irq(0x1780),
489 .flags = IORESOURCE_IRQ,
490 },
491};
492
493static struct platform_device hdmi_lcdc_device = {
494 .name = "sh_mobile_lcdc_fb",
495 .num_resources = ARRAY_SIZE(hdmi_lcdc_resources),
496 .resource = hdmi_lcdc_resources,
497 .id = 1,
498 .dev = {
499 .platform_data = &hdmi_lcdc_info,
500 .coherent_dma_mask = DMA_BIT_MASK(32),
501 },
502};
503
504static struct asoc_simple_card_info fsi2_hdmi_info = {
505 .name = "HDMI",
506 .card = "FSI2B-HDMI",
507 .codec = "sh-mobile-hdmi",
508 .platform = "sh_fsi2",
509 .daifmt = SND_SOC_DAIFMT_CBS_CFS,
510 .cpu_dai = {
511 .name = "fsib-dai",
512 },
513 .codec_dai = {
514 .name = "sh_mobile_hdmi-hifi",
515 },
516};
517
518static struct platform_device fsi_hdmi_device = {
519 .name = "asoc-simple-card",
520 .id = 1,
521 .dev = {
522 .platform_data = &fsi2_hdmi_info,
523 .coherent_dma_mask = DMA_BIT_MASK(32),
524 .dma_mask = &fsi_hdmi_device.dev.coherent_dma_mask,
525 },
526};
527
528static void __init hdmi_init_pm_clock(void)
529{
530 struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick");
531 int ret;
532 long rate;
533
534 if (IS_ERR(hdmi_ick)) {
535 ret = PTR_ERR(hdmi_ick);
536 pr_err("Cannot get HDMI ICK: %d\n", ret);
537 goto out;
538 }
539
540 ret = clk_set_parent(&sh7372_pllc2_clk, &sh7372_dv_clki_div2_clk);
541 if (ret < 0) {
542 pr_err("Cannot set PLLC2 parent: %d, %d users\n",
543 ret, sh7372_pllc2_clk.usecount);
544 goto out;
545 }
546
547 pr_debug("PLLC2 initial frequency %lu\n",
548 clk_get_rate(&sh7372_pllc2_clk));
549
550 rate = clk_round_rate(&sh7372_pllc2_clk, 594000000);
551 if (rate <= 0) {
552 pr_err("Cannot get suitable rate: %ld\n", rate);
553 ret = -EINVAL;
554 goto out;
555 }
556
557 ret = clk_set_rate(&sh7372_pllc2_clk, rate);
558 if (ret < 0) {
559 pr_err("Cannot set rate %ld: %d\n", rate, ret);
560 goto out;
561 }
562
563 pr_debug("PLLC2 set frequency %lu\n", rate);
564
565 ret = clk_set_parent(hdmi_ick, &sh7372_pllc2_clk);
566 if (ret < 0)
567 pr_err("Cannot set HDMI parent: %d\n", ret);
568
569out:
570 if (!IS_ERR(hdmi_ick))
571 clk_put(hdmi_ick);
572}
573
574/* USBHS0 is connected to CN22 which takes a USB Mini-B plug
575 *
576 * The sh7372 SoC has IRQ7 set aside for USBHS0 hotplug,
577 * but on this particular board IRQ7 is already used by
578 * the touch screen. This leaves us with software polling.
579 */
580#define USBHS0_POLL_INTERVAL (HZ * 5)
581
582struct usbhs_private {
583 void __iomem *usbphyaddr;
584 void __iomem *usbcrcaddr;
585 struct renesas_usbhs_platform_info info;
586 struct delayed_work work;
587 struct platform_device *pdev;
588};
589
590#define usbhs_get_priv(pdev) \
591 container_of(renesas_usbhs_get_info(pdev), \
592 struct usbhs_private, info)
593
594#define usbhs_is_connected(priv) \
595 (!((1 << 7) & __raw_readw(priv->usbcrcaddr)))
596
597static int usbhs_get_vbus(struct platform_device *pdev)
598{
599 return usbhs_is_connected(usbhs_get_priv(pdev));
600}
601
602static int usbhs_phy_reset(struct platform_device *pdev)
603{
604 struct usbhs_private *priv = usbhs_get_priv(pdev);
605
606 /* init phy */
607 __raw_writew(0x8a0a, priv->usbcrcaddr);
608
609 return 0;
610}
611
612static int usbhs0_get_id(struct platform_device *pdev)
613{
614 return USBHS_GADGET;
615}
616
617static void usbhs0_work_function(struct work_struct *work)
618{
619 struct usbhs_private *priv = container_of(work, struct usbhs_private,
620 work.work);
621
622 renesas_usbhs_call_notify_hotplug(priv->pdev);
623 schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL);
624}
625
626static int usbhs0_hardware_init(struct platform_device *pdev)
627{
628 struct usbhs_private *priv = usbhs_get_priv(pdev);
629
630 priv->pdev = pdev;
631 INIT_DELAYED_WORK(&priv->work, usbhs0_work_function);
632 schedule_delayed_work(&priv->work, USBHS0_POLL_INTERVAL);
633 return 0;
634}
635
636static int usbhs0_hardware_exit(struct platform_device *pdev)
637{
638 struct usbhs_private *priv = usbhs_get_priv(pdev);
639
640 cancel_delayed_work_sync(&priv->work);
641
642 return 0;
643}
644
645static struct usbhs_private usbhs0_private = {
646 .usbcrcaddr = IOMEM(0xe605810c), /* USBCR2 */
647 .info = {
648 .platform_callback = {
649 .hardware_init = usbhs0_hardware_init,
650 .hardware_exit = usbhs0_hardware_exit,
651 .phy_reset = usbhs_phy_reset,
652 .get_id = usbhs0_get_id,
653 .get_vbus = usbhs_get_vbus,
654 },
655 .driver_param = {
656 .buswait_bwait = 4,
657 .d0_tx_id = SHDMA_SLAVE_USB0_TX,
658 .d1_rx_id = SHDMA_SLAVE_USB0_RX,
659 },
660 },
661};
662
663static struct resource usbhs0_resources[] = {
664 [0] = {
665 .name = "USBHS0",
666 .start = 0xe6890000,
667 .end = 0xe68900e6 - 1,
668 .flags = IORESOURCE_MEM,
669 },
670 [1] = {
671 .start = evt2irq(0x1ca0) /* USB0_USB0I0 */,
672 .flags = IORESOURCE_IRQ,
673 },
674};
675
676static struct platform_device usbhs0_device = {
677 .name = "renesas_usbhs",
678 .id = 0,
679 .dev = {
680 .platform_data = &usbhs0_private.info,
681 },
682 .num_resources = ARRAY_SIZE(usbhs0_resources),
683 .resource = usbhs0_resources,
684};
685
686/* USBHS1 is connected to CN31 which takes a USB Mini-AB plug
687 *
688 * Use J30 to select between Host and Function. This setting
689 * can however not be detected by software. Hotplug of USBHS1
690 * is provided via IRQ8.
691 *
692 * Current USB1 works as "USB Host".
693 * - set J30 "short"
694 *
695 * If you want to use it as "USB gadget",
696 * - J30 "open"
697 * - modify usbhs1_get_id() USBHS_HOST -> USBHS_GADGET
698 * - add .get_vbus = usbhs_get_vbus in usbhs1_private
699 * - check usbhs0_device(pio)/usbhs1_device(irq) order in mackerel_devices.
700 */
701#define IRQ8 evt2irq(0x0300)
702#define USB_PHY_MODE (1 << 4)
703#define USB_PHY_INT_EN ((1 << 3) | (1 << 2))
704#define USB_PHY_ON (1 << 1)
705#define USB_PHY_OFF (1 << 0)
706#define USB_PHY_INT_CLR (USB_PHY_ON | USB_PHY_OFF)
707
708static irqreturn_t usbhs1_interrupt(int irq, void *data)
709{
710 struct platform_device *pdev = data;
711 struct usbhs_private *priv = usbhs_get_priv(pdev);
712
713 dev_dbg(&pdev->dev, "%s\n", __func__);
714
715 renesas_usbhs_call_notify_hotplug(pdev);
716
717 /* clear status */
718 __raw_writew(__raw_readw(priv->usbphyaddr) | USB_PHY_INT_CLR,
719 priv->usbphyaddr);
720
721 return IRQ_HANDLED;
722}
723
724static int usbhs1_hardware_init(struct platform_device *pdev)
725{
726 struct usbhs_private *priv = usbhs_get_priv(pdev);
727 int ret;
728
729 /* clear interrupt status */
730 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);
731
732 ret = request_irq(IRQ8, usbhs1_interrupt, IRQF_TRIGGER_HIGH,
733 dev_name(&pdev->dev), pdev);
734 if (ret) {
735 dev_err(&pdev->dev, "request_irq err\n");
736 return ret;
737 }
738
739 /* enable USB phy interrupt */
740 __raw_writew(USB_PHY_MODE | USB_PHY_INT_EN, priv->usbphyaddr);
741
742 return 0;
743}
744
745static int usbhs1_hardware_exit(struct platform_device *pdev)
746{
747 struct usbhs_private *priv = usbhs_get_priv(pdev);
748
749 /* clear interrupt status */
750 __raw_writew(USB_PHY_MODE | USB_PHY_INT_CLR, priv->usbphyaddr);
751
752 free_irq(IRQ8, pdev);
753
754 return 0;
755}
756
757static int usbhs1_get_id(struct platform_device *pdev)
758{
759 return USBHS_HOST;
760}
761
762static u32 usbhs1_pipe_cfg[] = {
763 USB_ENDPOINT_XFER_CONTROL,
764 USB_ENDPOINT_XFER_ISOC,
765 USB_ENDPOINT_XFER_ISOC,
766 USB_ENDPOINT_XFER_BULK,
767 USB_ENDPOINT_XFER_BULK,
768 USB_ENDPOINT_XFER_BULK,
769 USB_ENDPOINT_XFER_INT,
770 USB_ENDPOINT_XFER_INT,
771 USB_ENDPOINT_XFER_INT,
772 USB_ENDPOINT_XFER_BULK,
773 USB_ENDPOINT_XFER_BULK,
774 USB_ENDPOINT_XFER_BULK,
775 USB_ENDPOINT_XFER_BULK,
776 USB_ENDPOINT_XFER_BULK,
777 USB_ENDPOINT_XFER_BULK,
778 USB_ENDPOINT_XFER_BULK,
779};
780
781static struct usbhs_private usbhs1_private = {
782 .usbphyaddr = IOMEM(0xe60581e2), /* USBPHY1INTAP */
783 .usbcrcaddr = IOMEM(0xe6058130), /* USBCR4 */
784 .info = {
785 .platform_callback = {
786 .hardware_init = usbhs1_hardware_init,
787 .hardware_exit = usbhs1_hardware_exit,
788 .get_id = usbhs1_get_id,
789 .phy_reset = usbhs_phy_reset,
790 },
791 .driver_param = {
792 .buswait_bwait = 4,
793 .has_otg = 1,
794 .pipe_type = usbhs1_pipe_cfg,
795 .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg),
796 .d0_tx_id = SHDMA_SLAVE_USB1_TX,
797 .d1_rx_id = SHDMA_SLAVE_USB1_RX,
798 },
799 },
800};
801
802static struct resource usbhs1_resources[] = {
803 [0] = {
804 .name = "USBHS1",
805 .start = 0xe68b0000,
806 .end = 0xe68b00e6 - 1,
807 .flags = IORESOURCE_MEM,
808 },
809 [1] = {
810 .start = evt2irq(0x1ce0) /* USB1_USB1I0 */,
811 .flags = IORESOURCE_IRQ,
812 },
813};
814
815static struct platform_device usbhs1_device = {
816 .name = "renesas_usbhs",
817 .id = 1,
818 .dev = {
819 .platform_data = &usbhs1_private.info,
820 .dma_mask = &usbhs1_device.dev.coherent_dma_mask,
821 .coherent_dma_mask = DMA_BIT_MASK(32),
822 },
823 .num_resources = ARRAY_SIZE(usbhs1_resources),
824 .resource = usbhs1_resources,
825};
826
827/* LED */
828static struct gpio_led mackerel_leds[] = {
829 {
830 .name = "led0",
831 .gpio = 0,
832 .default_state = LEDS_GPIO_DEFSTATE_ON,
833 },
834 {
835 .name = "led1",
836 .gpio = 1,
837 .default_state = LEDS_GPIO_DEFSTATE_ON,
838 },
839 {
840 .name = "led2",
841 .gpio = 2,
842 .default_state = LEDS_GPIO_DEFSTATE_ON,
843 },
844 {
845 .name = "led3",
846 .gpio = 159,
847 .default_state = LEDS_GPIO_DEFSTATE_ON,
848 }
849};
850
851static struct gpio_led_platform_data mackerel_leds_pdata = {
852 .leds = mackerel_leds,
853 .num_leds = ARRAY_SIZE(mackerel_leds),
854};
855
856static struct platform_device leds_device = {
857 .name = "leds-gpio",
858 .id = 0,
859 .dev = {
860 .platform_data = &mackerel_leds_pdata,
861 },
862};
863
864/* FSI */
865#define IRQ_FSI evt2irq(0x1840)
866static struct sh_fsi_platform_info fsi_info = {
867 .port_a = {
868 .tx_id = SHDMA_SLAVE_FSIA_TX,
869 .rx_id = SHDMA_SLAVE_FSIA_RX,
870 },
871 .port_b = {
872 .flags = SH_FSI_CLK_CPG |
873 SH_FSI_FMT_SPDIF,
874 }
875};
876
877static struct resource fsi_resources[] = {
878 [0] = {
879 /* we need 0xFE1F0000 to access DMA
880 * instead of 0xFE3C0000 */
881 .name = "FSI",
882 .start = 0xFE1F0000,
883 .end = 0xFE1F0400 - 1,
884 .flags = IORESOURCE_MEM,
885 },
886 [1] = {
887 .start = IRQ_FSI,
888 .flags = IORESOURCE_IRQ,
889 },
890};
891
892static struct platform_device fsi_device = {
893 .name = "sh_fsi2",
894 .id = -1,
895 .num_resources = ARRAY_SIZE(fsi_resources),
896 .resource = fsi_resources,
897 .dev = {
898 .platform_data = &fsi_info,
899 },
900};
901
902static struct asoc_simple_card_info fsi2_ak4643_info = {
903 .name = "AK4643",
904 .card = "FSI2A-AK4643",
905 .codec = "ak4642-codec.0-0013",
906 .platform = "sh_fsi2",
907 .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
908 .cpu_dai = {
909 .name = "fsia-dai",
910 },
911 .codec_dai = {
912 .name = "ak4642-hifi",
913 .sysclk = 11289600,
914 },
915};
916
917static struct platform_device fsi_ak4643_device = {
918 .name = "asoc-simple-card",
919 .dev = {
920 .platform_data = &fsi2_ak4643_info,
921 .coherent_dma_mask = DMA_BIT_MASK(32),
922 .dma_mask = &fsi_ak4643_device.dev.coherent_dma_mask,
923 },
924};
925
926/* FLCTL */
927static struct mtd_partition nand_partition_info[] = {
928 {
929 .name = "system",
930 .offset = 0,
931 .size = 128 * 1024 * 1024,
932 },
933 {
934 .name = "userdata",
935 .offset = MTDPART_OFS_APPEND,
936 .size = 256 * 1024 * 1024,
937 },
938 {
939 .name = "cache",
940 .offset = MTDPART_OFS_APPEND,
941 .size = 128 * 1024 * 1024,
942 },
943};
944
945static struct resource nand_flash_resources[] = {
946 [0] = {
947 .start = 0xe6a30000,
948 .end = 0xe6a3009b,
949 .flags = IORESOURCE_MEM,
950 },
951 [1] = {
952 .start = evt2irq(0x0d80), /* flstei: status error irq */
953 .flags = IORESOURCE_IRQ,
954 },
955};
956
957static struct sh_flctl_platform_data nand_flash_data = {
958 .parts = nand_partition_info,
959 .nr_parts = ARRAY_SIZE(nand_partition_info),
960 .flcmncr_val = CLK_16B_12L_4H | TYPESEL_SET
961 | SHBUSSEL | SEL_16BIT | SNAND_E,
962 .use_holden = 1,
963};
964
965static struct platform_device nand_flash_device = {
966 .name = "sh_flctl",
967 .resource = nand_flash_resources,
968 .num_resources = ARRAY_SIZE(nand_flash_resources),
969 .dev = {
970 .platform_data = &nand_flash_data,
971 },
972};
973
974/* SDHI0 */
975static struct sh_mobile_sdhi_info sdhi0_info = {
976 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
977 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
978 .tmio_flags = TMIO_MMC_USE_GPIO_CD,
979 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
980 .cd_gpio = 172,
981};
982
983static struct resource sdhi0_resources[] = {
984 {
985 .name = "SDHI0",
986 .start = 0xe6850000,
987 .end = 0xe68500ff,
988 .flags = IORESOURCE_MEM,
989 }, {
990 .name = SH_MOBILE_SDHI_IRQ_SDCARD,
991 .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */,
992 .flags = IORESOURCE_IRQ,
993 }, {
994 .name = SH_MOBILE_SDHI_IRQ_SDIO,
995 .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */,
996 .flags = IORESOURCE_IRQ,
997 },
998};
999
1000static struct platform_device sdhi0_device = {
1001 .name = "sh_mobile_sdhi",
1002 .num_resources = ARRAY_SIZE(sdhi0_resources),
1003 .resource = sdhi0_resources,
1004 .id = 0,
1005 .dev = {
1006 .platform_data = &sdhi0_info,
1007 },
1008};
1009
1010#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1011/* SDHI1 */
1012
1013/* GPIO 41 can trigger IRQ8, but it is used by USBHS1, we have to poll */
1014static struct sh_mobile_sdhi_info sdhi1_info = {
1015 .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX,
1016 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
1017 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_USE_GPIO_CD,
1018 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
1019 MMC_CAP_NEEDS_POLL,
1020 .cd_gpio = 41,
1021};
1022
1023static struct resource sdhi1_resources[] = {
1024 {
1025 .name = "SDHI1",
1026 .start = 0xe6860000,
1027 .end = 0xe68600ff,
1028 .flags = IORESOURCE_MEM,
1029 }, {
1030 .name = SH_MOBILE_SDHI_IRQ_SDCARD,
1031 .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */
1032 .flags = IORESOURCE_IRQ,
1033 }, {
1034 .name = SH_MOBILE_SDHI_IRQ_SDIO,
1035 .start = evt2irq(0x0ec0), /* SDHI1_SDHI1I2 */
1036 .flags = IORESOURCE_IRQ,
1037 },
1038};
1039
1040static struct platform_device sdhi1_device = {
1041 .name = "sh_mobile_sdhi",
1042 .num_resources = ARRAY_SIZE(sdhi1_resources),
1043 .resource = sdhi1_resources,
1044 .id = 1,
1045 .dev = {
1046 .platform_data = &sdhi1_info,
1047 },
1048};
1049#endif
1050
1051/* SDHI2 */
1052
1053/*
1054 * The card detect pin of the top SD/MMC slot (CN23) is active low and is
1055 * connected to GPIO SCIFB_SCK of SH7372 (GPIO 162).
1056 */
1057static struct sh_mobile_sdhi_info sdhi2_info = {
1058 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
1059 .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX,
1060 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_USE_GPIO_CD,
1061 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
1062 MMC_CAP_NEEDS_POLL,
1063 .cd_gpio = 162,
1064};
1065
1066static struct resource sdhi2_resources[] = {
1067 {
1068 .name = "SDHI2",
1069 .start = 0xe6870000,
1070 .end = 0xe68700ff,
1071 .flags = IORESOURCE_MEM,
1072 }, {
1073 .name = SH_MOBILE_SDHI_IRQ_SDCARD,
1074 .start = evt2irq(0x1220), /* SDHI2_SDHI2I1 */
1075 .flags = IORESOURCE_IRQ,
1076 }, {
1077 .name = SH_MOBILE_SDHI_IRQ_SDIO,
1078 .start = evt2irq(0x1240), /* SDHI2_SDHI2I2 */
1079 .flags = IORESOURCE_IRQ,
1080 },
1081};
1082
1083static struct platform_device sdhi2_device = {
1084 .name = "sh_mobile_sdhi",
1085 .num_resources = ARRAY_SIZE(sdhi2_resources),
1086 .resource = sdhi2_resources,
1087 .id = 2,
1088 .dev = {
1089 .platform_data = &sdhi2_info,
1090 },
1091};
1092
1093/* SH_MMCIF */
1094#if IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1095static struct resource sh_mmcif_resources[] = {
1096 [0] = {
1097 .name = "MMCIF",
1098 .start = 0xE6BD0000,
1099 .end = 0xE6BD00FF,
1100 .flags = IORESOURCE_MEM,
1101 },
1102 [1] = {
1103 /* MMC ERR */
1104 .start = evt2irq(0x1ac0),
1105 .flags = IORESOURCE_IRQ,
1106 },
1107 [2] = {
1108 /* MMC NOR */
1109 .start = evt2irq(0x1ae0),
1110 .flags = IORESOURCE_IRQ,
1111 },
1112};
1113
1114static struct sh_mmcif_plat_data sh_mmcif_plat = {
1115 .sup_pclk = 0,
1116 .caps = MMC_CAP_4_BIT_DATA |
1117 MMC_CAP_8_BIT_DATA |
1118 MMC_CAP_NEEDS_POLL,
1119 .use_cd_gpio = true,
1120 /* card detect pin for SD/MMC slot (CN7) */
1121 .cd_gpio = 41,
1122 .slave_id_tx = SHDMA_SLAVE_MMCIF_TX,
1123 .slave_id_rx = SHDMA_SLAVE_MMCIF_RX,
1124};
1125
1126static struct platform_device sh_mmcif_device = {
1127 .name = "sh_mmcif",
1128 .id = 0,
1129 .dev = {
1130 .dma_mask = NULL,
1131 .coherent_dma_mask = 0xffffffff,
1132 .platform_data = &sh_mmcif_plat,
1133 },
1134 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
1135 .resource = sh_mmcif_resources,
1136};
1137#endif
1138
1139static int mackerel_camera_add(struct soc_camera_device *icd);
1140static void mackerel_camera_del(struct soc_camera_device *icd);
1141
1142static int camera_set_capture(struct soc_camera_platform_info *info,
1143 int enable)
1144{
1145 return 0; /* camera sensor always enabled */
1146}
1147
1148static struct soc_camera_platform_info camera_info = {
1149 .format_name = "UYVY",
1150 .format_depth = 16,
1151 .format = {
1152 .code = MEDIA_BUS_FMT_UYVY8_2X8,
1153 .colorspace = V4L2_COLORSPACE_SMPTE170M,
1154 .field = V4L2_FIELD_NONE,
1155 .width = 640,
1156 .height = 480,
1157 },
1158 .mbus_param = V4L2_MBUS_PCLK_SAMPLE_RISING | V4L2_MBUS_MASTER |
1159 V4L2_MBUS_VSYNC_ACTIVE_HIGH | V4L2_MBUS_HSYNC_ACTIVE_HIGH |
1160 V4L2_MBUS_DATA_ACTIVE_HIGH,
1161 .mbus_type = V4L2_MBUS_PARALLEL,
1162 .set_capture = camera_set_capture,
1163};
1164
1165static struct soc_camera_link camera_link = {
1166 .bus_id = 0,
1167 .add_device = mackerel_camera_add,
1168 .del_device = mackerel_camera_del,
1169 .module_name = "soc_camera_platform",
1170 .priv = &camera_info,
1171};
1172
1173static struct platform_device *camera_device;
1174
1175static void mackerel_camera_release(struct device *dev)
1176{
1177 soc_camera_platform_release(&camera_device);
1178}
1179
1180static int mackerel_camera_add(struct soc_camera_device *icd)
1181{
1182 return soc_camera_platform_add(icd, &camera_device, &camera_link,
1183 mackerel_camera_release, 0);
1184}
1185
1186static void mackerel_camera_del(struct soc_camera_device *icd)
1187{
1188 soc_camera_platform_del(icd, camera_device, &camera_link);
1189}
1190
1191static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
1192 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
1193 .max_width = 8188,
1194 .max_height = 8188,
1195};
1196
1197static struct resource ceu_resources[] = {
1198 [0] = {
1199 .name = "CEU",
1200 .start = 0xfe910000,
1201 .end = 0xfe91009f,
1202 .flags = IORESOURCE_MEM,
1203 },
1204 [1] = {
1205 .start = intcs_evt2irq(0x880),
1206 .flags = IORESOURCE_IRQ,
1207 },
1208 [2] = {
1209 /* place holder for contiguous memory */
1210 },
1211};
1212
1213static struct platform_device ceu_device = {
1214 .name = "sh_mobile_ceu",
1215 .id = 0, /* "ceu0" clock */
1216 .num_resources = ARRAY_SIZE(ceu_resources),
1217 .resource = ceu_resources,
1218 .dev = {
1219 .platform_data = &sh_mobile_ceu_info,
1220 .coherent_dma_mask = 0xffffffff,
1221 },
1222};
1223
1224static struct platform_device mackerel_camera = {
1225 .name = "soc-camera-pdrv",
1226 .id = 0,
1227 .dev = {
1228 .platform_data = &camera_link,
1229 },
1230};
1231
1232static struct platform_device *mackerel_devices[] __initdata = {
1233 &nor_flash_device,
1234 &smc911x_device,
1235 &lcdc_device,
1236 &gpio_backlight_device,
1237 &usbhs0_device,
1238 &usbhs1_device,
1239 &leds_device,
1240 &fsi_device,
1241 &fsi_ak4643_device,
1242 &fsi_hdmi_device,
1243 &nand_flash_device,
1244 &sdhi0_device,
1245#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1246 &sdhi1_device,
1247#else
1248 &sh_mmcif_device,
1249#endif
1250 &sdhi2_device,
1251 &ceu_device,
1252 &mackerel_camera,
1253 &hdmi_device,
1254 &hdmi_lcdc_device,
1255 &meram_device,
1256};
1257
1258/* Keypad Initialization */
1259#define KEYPAD_BUTTON(ev_type, ev_code, act_low) \
1260{ \
1261 .type = ev_type, \
1262 .code = ev_code, \
1263 .active_low = act_low, \
1264}
1265
1266#define KEYPAD_BUTTON_LOW(event_code) KEYPAD_BUTTON(EV_KEY, event_code, 1)
1267
1268static struct tca6416_button mackerel_gpio_keys[] = {
1269 KEYPAD_BUTTON_LOW(KEY_HOME),
1270 KEYPAD_BUTTON_LOW(KEY_MENU),
1271 KEYPAD_BUTTON_LOW(KEY_BACK),
1272 KEYPAD_BUTTON_LOW(KEY_POWER),
1273};
1274
1275static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
1276 .buttons = mackerel_gpio_keys,
1277 .nbuttons = ARRAY_SIZE(mackerel_gpio_keys),
1278 .rep = 1,
1279 .use_polling = 0,
1280 .pinmask = 0x000F,
1281};
1282
1283/* I2C */
1284#define IRQ7 evt2irq(0x02e0)
1285#define IRQ9 evt2irq(0x0320)
1286
1287static struct i2c_board_info i2c0_devices[] = {
1288 {
1289 I2C_BOARD_INFO("ak4643", 0x13),
1290 },
1291 /* Keypad */
1292 {
1293 I2C_BOARD_INFO("tca6408-keys", 0x20),
1294 .platform_data = &mackerel_tca6416_keys_info,
1295 .irq = IRQ9,
1296 },
1297 /* Touchscreen */
1298 {
1299 I2C_BOARD_INFO("st1232-ts", 0x55),
1300 .irq = IRQ7,
1301 },
1302};
1303
1304#define IRQ21 evt2irq(0x32a0)
1305
1306static struct i2c_board_info i2c1_devices[] = {
1307 /* Accelerometer */
1308 {
1309 I2C_BOARD_INFO("adxl34x", 0x53),
1310 .irq = IRQ21,
1311 },
1312};
1313
1314static unsigned long pin_pulldown_conf[] = {
1315 PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0),
1316};
1317
1318static const struct pinctrl_map mackerel_pinctrl_map[] = {
1319 /* ADXL34X */
1320 PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372",
1321 "intc_irq21", "intc"),
1322 /* CEU */
1323 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1324 "ceu_data_0_7", "ceu"),
1325 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1326 "ceu_clk_0", "ceu"),
1327 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1328 "ceu_sync", "ceu"),
1329 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_ceu.0", "pfc-sh7372",
1330 "ceu_field", "ceu"),
1331 /* FLCTL */
1332 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1333 "flctl_data", "flctl"),
1334 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1335 "flctl_ce0", "flctl"),
1336 PIN_MAP_MUX_GROUP_DEFAULT("sh_flctl.0", "pfc-sh7372",
1337 "flctl_ctrl", "flctl"),
1338 /* FSIA (AK4643) */
1339 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1340 "fsia_sclk_in", "fsia"),
1341 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1342 "fsia_data_in", "fsia"),
1343 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.0", "pfc-sh7372",
1344 "fsia_data_out", "fsia"),
1345 /* FSIB (HDMI) */
1346 PIN_MAP_MUX_GROUP_DEFAULT("asoc-simple-card.1", "pfc-sh7372",
1347 "fsib_mclk_in", "fsib"),
1348 /* HDMI */
1349 PIN_MAP_MUX_GROUP_DEFAULT("sh-mobile-hdmi", "pfc-sh7372",
1350 "hdmi", "hdmi"),
1351 /* LCDC */
1352 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh7372",
1353 "lcd_data24", "lcd"),
1354 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_lcdc_fb.0", "pfc-sh7372",
1355 "lcd_sync", "lcd"),
1356 /* SCIFA0 */
1357 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-sh7372",
1358 "scifa0_data", "scifa0"),
1359 /* SCIFA2 (GT-720F GPS module) */
1360 PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh7372",
1361 "scifa2_data", "scifa2"),
1362 /* SDHI0 */
1363 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1364 "sdhi0_data4", "sdhi0"),
1365 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1366 "sdhi0_ctrl", "sdhi0"),
1367 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1368 "sdhi0_wp", "sdhi0"),
1369 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372",
1370 "intc_irq26_1", "intc"),
1371 /* SDHI1 */
1372#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1373 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372",
1374 "sdhi1_data4", "sdhi1"),
1375 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh7372",
1376 "sdhi1_ctrl", "sdhi1"),
1377#else
1378 /* MMCIF */
1379 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh7372",
1380 "mmc0_data8_0", "mmc0"),
1381 PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh7372",
1382 "mmc0_ctrl_0", "mmc0"),
1383#endif
1384 /* SDHI2 */
1385 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh7372",
1386 "sdhi2_data4", "sdhi2"),
1387 PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh7372",
1388 "sdhi2_ctrl", "sdhi2"),
1389 /* SMSC911X */
1390 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-sh7372",
1391 "bsc_cs5a", "bsc"),
1392 PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-sh7372",
1393 "intc_irq6_0", "intc"),
1394 /* ST1232 */
1395 PIN_MAP_MUX_GROUP_DEFAULT("0-0055", "pfc-sh7372",
1396 "intc_irq7_0", "intc"),
1397 /* TCA6416 */
1398 PIN_MAP_MUX_GROUP_DEFAULT("0-0020", "pfc-sh7372",
1399 "intc_irq9_0", "intc"),
1400 /* USBHS0 */
1401 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372",
1402 "usb0_vbus", "usb0"),
1403 PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372",
1404 "usb0_vbus", pin_pulldown_conf),
1405 /* USBHS1 */
1406 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372",
1407 "usb1_vbus", "usb1"),
1408 PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372",
1409 "usb1_vbus", pin_pulldown_conf),
1410 PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372",
1411 "usb1_otg_id_0", "usb1"),
1412};
1413
1414#define GPIO_PORT9CR IOMEM(0xE6051009)
1415#define GPIO_PORT10CR IOMEM(0xE605100A)
1416#define SRCR4 IOMEM(0xe61580bc)
1417#define USCCR1 IOMEM(0xE6058144)
1418static void __init mackerel_init(void)
1419{
1420 static struct pm_domain_device domain_devices[] __initdata = {
1421 { "A4LC", &lcdc_device, },
1422 { "A4LC", &hdmi_lcdc_device, },
1423 { "A4LC", &meram_device, },
1424 { "A4MP", &fsi_device, },
1425 { "A3SP", &usbhs0_device, },
1426 { "A3SP", &usbhs1_device, },
1427 { "A3SP", &nand_flash_device, },
1428 { "A3SP", &sdhi0_device, },
1429#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF)
1430 { "A3SP", &sdhi1_device, },
1431#else
1432 { "A3SP", &sh_mmcif_device, },
1433#endif
1434 { "A3SP", &sdhi2_device, },
1435 { "A4R", &ceu_device, },
1436 };
1437 u32 srcr4;
1438 struct clk *clk;
1439
1440 regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
1441 ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
1442 regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
1443 ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
1444 regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
1445
1446 /* External clock source */
1447 clk_set_rate(&sh7372_dv_clki_clk, 27000000);
1448
1449 pinctrl_register_mappings(mackerel_pinctrl_map,
1450 ARRAY_SIZE(mackerel_pinctrl_map));
1451 sh7372_pinmux_init();
1452
1453 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1454
1455 /* FSI2 port A (ak4643) */
1456 gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
1457
1458 gpio_request(9, NULL);
1459 gpio_request(10, NULL);
1460 gpio_direction_none(GPIO_PORT9CR); /* FSIAOBT needs no direction */
1461 gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
1462
1463 intc_set_priority(IRQ_FSI, 3); /* irq priority FSI(3) > SMSC911X(2) */
1464
1465 /* FSI2 port B (HDMI) */
1466 __raw_writew(__raw_readw(USCCR1) & ~(1 << 6), USCCR1); /* use SPDIF */
1467
1468 /* set SPU2 clock to 119.6 MHz */
1469 clk = clk_get(NULL, "spu_clk");
1470 if (!IS_ERR(clk)) {
1471 clk_set_rate(clk, clk_round_rate(clk, 119600000));
1472 clk_put(clk);
1473 }
1474
1475 /* Keypad */
1476 irq_set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
1477
1478 /* Touchscreen */
1479 irq_set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1480
1481 /* Accelerometer */
1482 irq_set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
1483
1484 /* Reset HDMI, must be held at least one EXTALR (32768Hz) period */
1485 srcr4 = __raw_readl(SRCR4);
1486 __raw_writel(srcr4 | (1 << 13), SRCR4);
1487 udelay(50);
1488 __raw_writel(srcr4 & ~(1 << 13), SRCR4);
1489
1490 i2c_register_board_info(0, i2c0_devices,
1491 ARRAY_SIZE(i2c0_devices));
1492 i2c_register_board_info(1, i2c1_devices,
1493 ARRAY_SIZE(i2c1_devices));
1494
1495 sh7372_add_standard_devices();
1496
1497 platform_add_devices(mackerel_devices, ARRAY_SIZE(mackerel_devices));
1498
1499 rmobile_add_devices_to_domains(domain_devices,
1500 ARRAY_SIZE(domain_devices));
1501
1502 hdmi_init_pm_clock();
1503 sh7372_pm_init();
1504 pm_clk_add(&fsi_device.dev, "spu2");
1505 pm_clk_add(&hdmi_lcdc_device.dev, "hdmi");
1506}
1507
1508static const char *mackerel_boards_compat_dt[] __initdata = {
1509 "renesas,mackerel",
1510 NULL,
1511};
1512
1513DT_MACHINE_START(MACKEREL_DT, "mackerel")
1514 .map_io = sh7372_map_io,
1515 .init_early = sh7372_add_early_devices,
1516 .init_irq = sh7372_init_irq,
1517 .handle_irq = shmobile_handle_irq_intc,
1518 .init_machine = mackerel_init,
1519 .init_late = sh7372_pm_init_late,
1520 .init_time = sh7372_earlytimer_init,
1521 .dt_compat = mackerel_boards_compat_dt,
1522MACHINE_END
diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
deleted file mode 100644
index 1cf44dc6d718..000000000000
--- a/arch/arm/mach-shmobile/clock-r8a73a4.c
+++ /dev/null
@@ -1,659 +0,0 @@
1/*
2 * r8a73a4 clock framework support
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 * Copyright (C) 2013 Magnus Damm
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16#include <linux/init.h>
17#include <linux/io.h>
18#include <linux/kernel.h>
19#include <linux/sh_clk.h>
20#include <linux/clkdev.h>
21#include "common.h"
22#include "clock.h"
23
24#define CPG_BASE 0xe6150000
25#define CPG_LEN 0x270
26
27#define SMSTPCR2 0xe6150138
28#define SMSTPCR3 0xe615013c
29#define SMSTPCR4 0xe6150140
30#define SMSTPCR5 0xe6150144
31
32#define FRQCRA 0xE6150000
33#define FRQCRB 0xE6150004
34#define FRQCRC 0xE61500E0
35#define VCLKCR1 0xE6150008
36#define VCLKCR2 0xE615000C
37#define VCLKCR3 0xE615001C
38#define VCLKCR4 0xE6150014
39#define VCLKCR5 0xE6150034
40#define ZBCKCR 0xE6150010
41#define SD0CKCR 0xE6150074
42#define SD1CKCR 0xE6150078
43#define SD2CKCR 0xE615007C
44#define MMC0CKCR 0xE6150240
45#define MMC1CKCR 0xE6150244
46#define FSIACKCR 0xE6150018
47#define FSIBCKCR 0xE6150090
48#define MPCKCR 0xe6150080
49#define SPUVCKCR 0xE6150094
50#define HSICKCR 0xE615026C
51#define M4CKCR 0xE6150098
52#define PLLECR 0xE61500D0
53#define PLL0CR 0xE61500D8
54#define PLL1CR 0xE6150028
55#define PLL2CR 0xE615002C
56#define PLL2SCR 0xE61501F4
57#define PLL2HCR 0xE61501E4
58#define CKSCR 0xE61500C0
59
60#define CPG_MAP(o) ((o - CPG_BASE) + cpg_mapping.base)
61
62static struct clk_mapping cpg_mapping = {
63 .phys = CPG_BASE,
64 .len = CPG_LEN,
65};
66
67static struct clk extalr_clk = {
68 .rate = 32768,
69 .mapping = &cpg_mapping,
70};
71
72static struct clk extal1_clk = {
73 .rate = 26000000,
74 .mapping = &cpg_mapping,
75};
76
77static struct clk extal2_clk = {
78 .rate = 48000000,
79 .mapping = &cpg_mapping,
80};
81
82static struct sh_clk_ops followparent_clk_ops = {
83 .recalc = followparent_recalc,
84};
85
86static struct clk main_clk = {
87 /* .parent will be set r8a73a4_clock_init */
88 .ops = &followparent_clk_ops,
89};
90
91SH_CLK_RATIO(div2, 1, 2);
92SH_CLK_RATIO(div4, 1, 4);
93
94SH_FIXED_RATIO_CLK(main_div2_clk, main_clk, div2);
95SH_FIXED_RATIO_CLK(extal1_div2_clk, extal1_clk, div2);
96SH_FIXED_RATIO_CLK(extal2_div2_clk, extal2_clk, div2);
97SH_FIXED_RATIO_CLK(extal2_div4_clk, extal2_clk, div4);
98
99/* External FSIACK/FSIBCK clock */
100static struct clk fsiack_clk = {
101};
102
103static struct clk fsibck_clk = {
104};
105
106/*
107 * PLL clocks
108 */
109static struct clk *pll_parent_main[] = {
110 [0] = &main_clk,
111 [1] = &main_div2_clk
112};
113
114static struct clk *pll_parent_main_extal[8] = {
115 [0] = &main_div2_clk,
116 [1] = &extal2_div2_clk,
117 [3] = &extal2_div4_clk,
118 [4] = &main_clk,
119 [5] = &extal2_clk,
120};
121
122static unsigned long pll_recalc(struct clk *clk)
123{
124 unsigned long mult = 1;
125
126 if (ioread32(CPG_MAP(PLLECR)) & (1 << clk->enable_bit))
127 mult = (((ioread32(clk->mapped_reg) >> 24) & 0x7f) + 1);
128
129 return clk->parent->rate * mult;
130}
131
132static int pll_set_parent(struct clk *clk, struct clk *parent)
133{
134 u32 val;
135 int i, ret;
136
137 if (!clk->parent_table || !clk->parent_num)
138 return -EINVAL;
139
140 /* Search the parent */
141 for (i = 0; i < clk->parent_num; i++)
142 if (clk->parent_table[i] == parent)
143 break;
144
145 if (i == clk->parent_num)
146 return -ENODEV;
147
148 ret = clk_reparent(clk, parent);
149 if (ret < 0)
150 return ret;
151
152 val = ioread32(clk->mapped_reg) &
153 ~(((1 << clk->src_width) - 1) << clk->src_shift);
154
155 iowrite32(val | i << clk->src_shift, clk->mapped_reg);
156
157 return 0;
158}
159
160static struct sh_clk_ops pll_clk_ops = {
161 .recalc = pll_recalc,
162 .set_parent = pll_set_parent,
163};
164
165#define PLL_CLOCK(name, p, pt, w, s, reg, e) \
166 static struct clk name = { \
167 .ops = &pll_clk_ops, \
168 .flags = CLK_ENABLE_ON_INIT, \
169 .parent = p, \
170 .parent_table = pt, \
171 .parent_num = ARRAY_SIZE(pt), \
172 .src_width = w, \
173 .src_shift = s, \
174 .enable_reg = (void __iomem *)reg, \
175 .enable_bit = e, \
176 .mapping = &cpg_mapping, \
177 }
178
179PLL_CLOCK(pll0_clk, &main_clk, pll_parent_main, 1, 20, PLL0CR, 0);
180PLL_CLOCK(pll1_clk, &main_clk, pll_parent_main, 1, 7, PLL1CR, 1);
181PLL_CLOCK(pll2_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2CR, 2);
182PLL_CLOCK(pll2s_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2SCR, 4);
183PLL_CLOCK(pll2h_clk, &main_div2_clk, pll_parent_main_extal, 3, 5, PLL2HCR, 5);
184
185SH_FIXED_RATIO_CLK(pll1_div2_clk, pll1_clk, div2);
186
187static atomic_t frqcr_lock;
188
189/* Several clocks need to access FRQCRB, have to lock */
190static bool frqcr_kick_check(struct clk *clk)
191{
192 return !(ioread32(CPG_MAP(FRQCRB)) & BIT(31));
193}
194
195static int frqcr_kick_do(struct clk *clk)
196{
197 int i;
198
199 /* set KICK bit in FRQCRB to update hardware setting, check success */
200 iowrite32(ioread32(CPG_MAP(FRQCRB)) | BIT(31), CPG_MAP(FRQCRB));
201 for (i = 1000; i; i--)
202 if (ioread32(CPG_MAP(FRQCRB)) & BIT(31))
203 cpu_relax();
204 else
205 return 0;
206
207 return -ETIMEDOUT;
208}
209
210static int zclk_set_rate(struct clk *clk, unsigned long rate)
211{
212 void __iomem *frqcrc;
213 int ret;
214 unsigned long step, p_rate;
215 u32 val;
216
217 if (!clk->parent || !__clk_get(clk->parent))
218 return -ENODEV;
219
220 if (!atomic_inc_and_test(&frqcr_lock) || !frqcr_kick_check(clk)) {
221 ret = -EBUSY;
222 goto done;
223 }
224
225 /*
226 * Users are supposed to first call clk_set_rate() only with
227 * clk_round_rate() results. So, we don't fix wrong rates here, but
228 * guard against them anyway
229 */
230
231 p_rate = clk_get_rate(clk->parent);
232 if (rate == p_rate) {
233 val = 0;
234 } else {
235 step = DIV_ROUND_CLOSEST(p_rate, 32);
236
237 if (rate > p_rate || rate < step) {
238 ret = -EINVAL;
239 goto done;
240 }
241
242 val = 32 - rate / step;
243 }
244
245 frqcrc = clk->mapped_reg + (FRQCRC - (u32)clk->enable_reg);
246
247 iowrite32((ioread32(frqcrc) & ~(clk->div_mask << clk->enable_bit)) |
248 (val << clk->enable_bit), frqcrc);
249
250 ret = frqcr_kick_do(clk);
251
252done:
253 atomic_dec(&frqcr_lock);
254 __clk_put(clk->parent);
255 return ret;
256}
257
258static long zclk_round_rate(struct clk *clk, unsigned long rate)
259{
260 /*
261 * theoretical rate = parent rate * multiplier / 32,
262 * where 1 <= multiplier <= 32. Therefore we should do
263 * multiplier = rate * 32 / parent rate
264 * rounded rate = parent rate * multiplier / 32.
265 * However, multiplication before division won't fit in 32 bits, so
266 * we sacrifice some precision by first dividing and then multiplying.
267 * To find the nearest divisor we calculate both and pick up the best
268 * one. This avoids 64-bit arithmetics.
269 */
270 unsigned long step, mul_min, mul_max, rate_min, rate_max;
271
272 rate_max = clk_get_rate(clk->parent);
273
274 /* output freq <= parent */
275 if (rate >= rate_max)
276 return rate_max;
277
278 step = DIV_ROUND_CLOSEST(rate_max, 32);
279 /* output freq >= parent / 32 */
280 if (step >= rate)
281 return step;
282
283 mul_min = rate / step;
284 mul_max = DIV_ROUND_UP(rate, step);
285 rate_min = step * mul_min;
286 if (mul_max == mul_min)
287 return rate_min;
288
289 rate_max = step * mul_max;
290
291 if (rate_max - rate < rate - rate_min)
292 return rate_max;
293
294 return rate_min;
295}
296
297static unsigned long zclk_recalc(struct clk *clk)
298{
299 void __iomem *frqcrc = FRQCRC - (u32)clk->enable_reg + clk->mapped_reg;
300 unsigned int max = clk->div_mask + 1;
301 unsigned long val = ((ioread32(frqcrc) >> clk->enable_bit) &
302 clk->div_mask);
303
304 return DIV_ROUND_CLOSEST(clk_get_rate(clk->parent), max) *
305 (max - val);
306}
307
308static struct sh_clk_ops zclk_ops = {
309 .recalc = zclk_recalc,
310 .set_rate = zclk_set_rate,
311 .round_rate = zclk_round_rate,
312};
313
314static struct clk z_clk = {
315 .parent = &pll0_clk,
316 .div_mask = 0x1f,
317 .enable_bit = 8,
318 /* We'll need to access FRQCRB and FRQCRC */
319 .enable_reg = (void __iomem *)FRQCRB,
320 .ops = &zclk_ops,
321};
322
323/*
324 * It seems only 1/2 divider is usable in manual mode. 1/2 / 2/3
325 * switching is only available in auto-DVFS mode
326 */
327SH_FIXED_RATIO_CLK(pll0_div2_clk, pll0_clk, div2);
328
329static struct clk z2_clk = {
330 .parent = &pll0_div2_clk,
331 .div_mask = 0x1f,
332 .enable_bit = 0,
333 /* We'll need to access FRQCRB and FRQCRC */
334 .enable_reg = (void __iomem *)FRQCRB,
335 .ops = &zclk_ops,
336};
337
338static struct clk *main_clks[] = {
339 &extalr_clk,
340 &extal1_clk,
341 &extal1_div2_clk,
342 &extal2_clk,
343 &extal2_div2_clk,
344 &extal2_div4_clk,
345 &main_clk,
346 &main_div2_clk,
347 &fsiack_clk,
348 &fsibck_clk,
349 &pll0_clk,
350 &pll1_clk,
351 &pll1_div2_clk,
352 &pll2_clk,
353 &pll2s_clk,
354 &pll2h_clk,
355 &z_clk,
356 &pll0_div2_clk,
357 &z2_clk,
358};
359
360/* DIV4 */
361static void div4_kick(struct clk *clk)
362{
363 if (!WARN(!atomic_inc_and_test(&frqcr_lock), "FRQCR* lock broken!\n"))
364 frqcr_kick_do(clk);
365 atomic_dec(&frqcr_lock);
366}
367
368static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10};
369
370static struct clk_div_mult_table div4_div_mult_table = {
371 .divisors = divisors,
372 .nr_divisors = ARRAY_SIZE(divisors),
373};
374
375static struct clk_div4_table div4_table = {
376 .div_mult_table = &div4_div_mult_table,
377 .kick = div4_kick,
378};
379
380enum {
381 DIV4_I, DIV4_M3, DIV4_B, DIV4_M1, DIV4_M2,
382 DIV4_ZX, DIV4_ZS, DIV4_HP,
383 DIV4_NR };
384
385static struct clk div4_clks[DIV4_NR] = {
386 [DIV4_I] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 20, 0x0dff, CLK_ENABLE_ON_INIT),
387 [DIV4_M3] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 12, 0x1dff, CLK_ENABLE_ON_INIT),
388 [DIV4_B] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 8, 0x0dff, CLK_ENABLE_ON_INIT),
389 [DIV4_M1] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 4, 0x1dff, 0),
390 [DIV4_M2] = SH_CLK_DIV4(&pll1_clk, FRQCRA, 0, 0x1dff, 0),
391 [DIV4_ZX] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 12, 0x0dff, 0),
392 [DIV4_ZS] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 8, 0x0dff, 0),
393 [DIV4_HP] = SH_CLK_DIV4(&pll1_clk, FRQCRB, 4, 0x0dff, 0),
394};
395
396enum {
397 DIV6_ZB,
398 DIV6_SDHI0, DIV6_SDHI1, DIV6_SDHI2,
399 DIV6_MMC0, DIV6_MMC1,
400 DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_VCK4, DIV6_VCK5,
401 DIV6_FSIA, DIV6_FSIB,
402 DIV6_MP, DIV6_M4, DIV6_HSI, DIV6_SPUV,
403 DIV6_NR };
404
405static struct clk *div6_parents[8] = {
406 [0] = &pll1_div2_clk,
407 [1] = &pll2s_clk,
408 [3] = &extal2_clk,
409 [4] = &main_div2_clk,
410 [6] = &extalr_clk,
411};
412
413static struct clk *fsia_parents[4] = {
414 [0] = &pll1_div2_clk,
415 [1] = &pll2s_clk,
416 [2] = &fsiack_clk,
417};
418
419static struct clk *fsib_parents[4] = {
420 [0] = &pll1_div2_clk,
421 [1] = &pll2s_clk,
422 [2] = &fsibck_clk,
423};
424
425static struct clk *mp_parents[4] = {
426 [0] = &pll1_div2_clk,
427 [1] = &pll2s_clk,
428 [2] = &extal2_clk,
429 [3] = &extal2_clk,
430};
431
432static struct clk *m4_parents[2] = {
433 [0] = &pll2s_clk,
434};
435
436static struct clk *hsi_parents[4] = {
437 [0] = &pll2h_clk,
438 [1] = &pll1_div2_clk,
439 [3] = &pll2s_clk,
440};
441
442/*** FIXME ***
443 * SH_CLK_DIV6_EXT() macro doesn't care .mapping
444 * but, it is necessary on R-Car (= ioremap() base CPG)
445 * The difference between
446 * SH_CLK_DIV6_EXT() <--> SH_CLK_MAP_DIV6_EXT()
447 * is only .mapping
448 */
449#define SH_CLK_MAP_DIV6_EXT(_reg, _flags, _parents, \
450 _num_parents, _src_shift, _src_width) \
451{ \
452 .enable_reg = (void __iomem *)_reg, \
453 .enable_bit = 0, /* unused */ \
454 .flags = _flags | CLK_MASK_DIV_ON_DISABLE, \
455 .div_mask = SH_CLK_DIV6_MSK, \
456 .parent_table = _parents, \
457 .parent_num = _num_parents, \
458 .src_shift = _src_shift, \
459 .src_width = _src_width, \
460 .mapping = &cpg_mapping, \
461}
462
463static struct clk div6_clks[DIV6_NR] = {
464 [DIV6_ZB] = SH_CLK_MAP_DIV6_EXT(ZBCKCR, CLK_ENABLE_ON_INIT,
465 div6_parents, 2, 7, 1),
466 [DIV6_SDHI0] = SH_CLK_MAP_DIV6_EXT(SD0CKCR, 0,
467 div6_parents, 2, 6, 2),
468 [DIV6_SDHI1] = SH_CLK_MAP_DIV6_EXT(SD1CKCR, 0,
469 div6_parents, 2, 6, 2),
470 [DIV6_SDHI2] = SH_CLK_MAP_DIV6_EXT(SD2CKCR, 0,
471 div6_parents, 2, 6, 2),
472 [DIV6_MMC0] = SH_CLK_MAP_DIV6_EXT(MMC0CKCR, 0,
473 div6_parents, 2, 6, 2),
474 [DIV6_MMC1] = SH_CLK_MAP_DIV6_EXT(MMC1CKCR, 0,
475 div6_parents, 2, 6, 2),
476 [DIV6_VCK1] = SH_CLK_MAP_DIV6_EXT(VCLKCR1, 0, /* didn't care bit[6-7] */
477 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
478 [DIV6_VCK2] = SH_CLK_MAP_DIV6_EXT(VCLKCR2, 0, /* didn't care bit[6-7] */
479 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
480 [DIV6_VCK3] = SH_CLK_MAP_DIV6_EXT(VCLKCR3, 0, /* didn't care bit[6-7] */
481 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
482 [DIV6_VCK4] = SH_CLK_MAP_DIV6_EXT(VCLKCR4, 0, /* didn't care bit[6-7] */
483 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
484 [DIV6_VCK5] = SH_CLK_MAP_DIV6_EXT(VCLKCR5, 0, /* didn't care bit[6-7] */
485 div6_parents, ARRAY_SIZE(div6_parents), 12, 3),
486 [DIV6_FSIA] = SH_CLK_MAP_DIV6_EXT(FSIACKCR, 0,
487 fsia_parents, ARRAY_SIZE(fsia_parents), 6, 2),
488 [DIV6_FSIB] = SH_CLK_MAP_DIV6_EXT(FSIBCKCR, 0,
489 fsib_parents, ARRAY_SIZE(fsib_parents), 6, 2),
490 [DIV6_MP] = SH_CLK_MAP_DIV6_EXT(MPCKCR, 0, /* it needs bit[9-11] control */
491 mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
492 /* pll2s will be selected always for M4 */
493 [DIV6_M4] = SH_CLK_MAP_DIV6_EXT(M4CKCR, 0, /* it needs bit[9] control */
494 m4_parents, ARRAY_SIZE(m4_parents), 6, 1),
495 [DIV6_HSI] = SH_CLK_MAP_DIV6_EXT(HSICKCR, 0, /* it needs bit[9] control */
496 hsi_parents, ARRAY_SIZE(hsi_parents), 6, 2),
497 [DIV6_SPUV] = SH_CLK_MAP_DIV6_EXT(SPUVCKCR, 0,
498 mp_parents, ARRAY_SIZE(mp_parents), 6, 2),
499};
500
501/* MSTP */
502enum {
503 MSTP218, MSTP217, MSTP216, MSTP207, MSTP206, MSTP204, MSTP203,
504 MSTP329, MSTP323, MSTP318, MSTP317, MSTP316,
505 MSTP315, MSTP314, MSTP313, MSTP312, MSTP305, MSTP300,
506 MSTP411, MSTP410, MSTP409,
507 MSTP522, MSTP515,
508 MSTP_NR
509};
510
511static struct clk mstp_clks[MSTP_NR] = {
512 [MSTP204] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 4, 0), /* SCIFA0 */
513 [MSTP203] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 3, 0), /* SCIFA1 */
514 [MSTP206] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 6, 0), /* SCIFB0 */
515 [MSTP207] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 7, 0), /* SCIFB1 */
516 [MSTP216] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 16, 0), /* SCIFB2 */
517 [MSTP217] = SH_CLK_MSTP32(&div6_clks[DIV6_MP], SMSTPCR2, 17, 0), /* SCIFB3 */
518 [MSTP218] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC */
519 [MSTP300] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 0, 0), /* IIC2 */
520 [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1],SMSTPCR3, 5, 0), /* MMCIF1 */
521 [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI2],SMSTPCR3, 12, 0), /* SDHI2 */
522 [MSTP313] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI1],SMSTPCR3, 13, 0), /* SDHI1 */
523 [MSTP314] = SH_CLK_MSTP32(&div6_clks[DIV6_SDHI0],SMSTPCR3, 14, 0), /* SDHI0 */
524 [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0],SMSTPCR3, 15, 0), /* MMCIF0 */
525 [MSTP316] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 16, 0), /* IIC6 */
526 [MSTP317] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 17, 0), /* IIC7 */
527 [MSTP318] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 18, 0), /* IIC0 */
528 [MSTP323] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR3, 23, 0), /* IIC1 */
529 [MSTP329] = SH_CLK_MSTP32(&extalr_clk, SMSTPCR3, 29, 0), /* CMT10 */
530 [MSTP409] = SH_CLK_MSTP32(&main_div2_clk, SMSTPCR4, 9, 0), /* IIC5 */
531 [MSTP410] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 10, 0), /* IIC4 */
532 [MSTP411] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR4, 11, 0), /* IIC3 */
533 [MSTP522] = SH_CLK_MSTP32(&extal2_clk, SMSTPCR5, 22, 0), /* Thermal */
534 [MSTP515] = SH_CLK_MSTP32(&div4_clks[DIV4_HP], SMSTPCR5, 15, 0), /* IIC8 */
535};
536
537static struct clk_lookup lookups[] = {
538 /* main clock */
539 CLKDEV_CON_ID("extal1", &extal1_clk),
540 CLKDEV_CON_ID("extal1_div2", &extal1_div2_clk),
541 CLKDEV_CON_ID("extal2", &extal2_clk),
542 CLKDEV_CON_ID("extal2_div2", &extal2_div2_clk),
543 CLKDEV_CON_ID("extal2_div4", &extal2_div4_clk),
544 CLKDEV_CON_ID("fsiack", &fsiack_clk),
545 CLKDEV_CON_ID("fsibck", &fsibck_clk),
546
547 /* pll clock */
548 CLKDEV_CON_ID("pll1", &pll1_clk),
549 CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
550 CLKDEV_CON_ID("pll2", &pll2_clk),
551 CLKDEV_CON_ID("pll2s", &pll2s_clk),
552 CLKDEV_CON_ID("pll2h", &pll2h_clk),
553
554 /* CPU clock */
555 CLKDEV_DEV_ID("cpu0", &z_clk),
556
557 /* DIV6 */
558 CLKDEV_CON_ID("zb", &div6_clks[DIV6_ZB]),
559 CLKDEV_CON_ID("vck1", &div6_clks[DIV6_VCK1]),
560 CLKDEV_CON_ID("vck2", &div6_clks[DIV6_VCK2]),
561 CLKDEV_CON_ID("vck3", &div6_clks[DIV6_VCK3]),
562 CLKDEV_CON_ID("vck4", &div6_clks[DIV6_VCK4]),
563 CLKDEV_CON_ID("vck5", &div6_clks[DIV6_VCK5]),
564 CLKDEV_CON_ID("fsia", &div6_clks[DIV6_FSIA]),
565 CLKDEV_CON_ID("fsib", &div6_clks[DIV6_FSIB]),
566 CLKDEV_CON_ID("mp", &div6_clks[DIV6_MP]),
567 CLKDEV_CON_ID("m4", &div6_clks[DIV6_M4]),
568 CLKDEV_CON_ID("hsi", &div6_clks[DIV6_HSI]),
569 CLKDEV_CON_ID("spuv", &div6_clks[DIV6_SPUV]),
570
571 /* MSTP */
572 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
573 CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]),
574 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
575 CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]),
576 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
577 CLKDEV_DEV_ID("e6c20000.serial", &mstp_clks[MSTP206]),
578 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
579 CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP207]),
580 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
581 CLKDEV_DEV_ID("e6ce0000.serial", &mstp_clks[MSTP216]),
582 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
583 CLKDEV_DEV_ID("e6cf0000.serial", &mstp_clks[MSTP217]),
584 CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
585 CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
586 CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
587 CLKDEV_DEV_ID("e6520000.i2c", &mstp_clks[MSTP300]),
588 CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
589 CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]),
590 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
591 CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]),
592 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
593 CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]),
594 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
595 CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]),
596 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
597 CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
598 CLKDEV_DEV_ID("e6550000.i2c", &mstp_clks[MSTP316]),
599 CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]),
600 CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
601 CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
602 CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
603 CLKDEV_ICK_ID("fck", "e6130000.timer", &mstp_clks[MSTP329]),
604 CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
605 CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
606 CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
607 CLKDEV_DEV_ID("e6570000.i2c", &mstp_clks[MSTP515]),
608
609 /* for DT */
610 CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
611};
612
613void __init r8a73a4_clock_init(void)
614{
615 void __iomem *reg;
616 int k, ret = 0;
617 u32 ckscr;
618
619 atomic_set(&frqcr_lock, -1);
620
621 reg = ioremap_nocache(CKSCR, PAGE_SIZE);
622 BUG_ON(!reg);
623 ckscr = ioread32(reg);
624 iounmap(reg);
625
626 switch ((ckscr >> 28) & 0x3) {
627 case 0:
628 main_clk.parent = &extal1_clk;
629 break;
630 case 1:
631 main_clk.parent = &extal1_div2_clk;
632 break;
633 case 2:
634 main_clk.parent = &extal2_clk;
635 break;
636 case 3:
637 main_clk.parent = &extal2_div2_clk;
638 break;
639 }
640
641 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
642 ret = clk_register(main_clks[k]);
643
644 if (!ret)
645 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
646
647 if (!ret)
648 ret = sh_clk_div6_reparent_register(div6_clks, DIV6_NR);
649
650 if (!ret)
651 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
652
653 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
654
655 if (!ret)
656 shmobile_clk_init();
657 else
658 panic("failed to setup r8a73a4 clocks\n");
659}
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
deleted file mode 100644
index 3bc92f46060e..000000000000
--- a/arch/arm/mach-shmobile/clock-sh7372.c
+++ /dev/null
@@ -1,620 +0,0 @@
1/*
2 * SH7372 clock framework support
3 *
4 * Copyright (C) 2010 Magnus Damm
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15#include <linux/init.h>
16#include <linux/kernel.h>
17#include <linux/io.h>
18#include <linux/sh_clk.h>
19#include <linux/clkdev.h>
20#include "clock.h"
21#include "common.h"
22
23/* SH7372 registers */
24#define FRQCRA IOMEM(0xe6150000)
25#define FRQCRB IOMEM(0xe6150004)
26#define FRQCRC IOMEM(0xe61500e0)
27#define FRQCRD IOMEM(0xe61500e4)
28#define VCLKCR1 IOMEM(0xe6150008)
29#define VCLKCR2 IOMEM(0xe615000c)
30#define VCLKCR3 IOMEM(0xe615001c)
31#define FMSICKCR IOMEM(0xe6150010)
32#define FMSOCKCR IOMEM(0xe6150014)
33#define FSIACKCR IOMEM(0xe6150018)
34#define FSIBCKCR IOMEM(0xe6150090)
35#define SUBCKCR IOMEM(0xe6150080)
36#define SPUCKCR IOMEM(0xe6150084)
37#define VOUCKCR IOMEM(0xe6150088)
38#define HDMICKCR IOMEM(0xe6150094)
39#define DSITCKCR IOMEM(0xe6150060)
40#define DSI0PCKCR IOMEM(0xe6150064)
41#define DSI1PCKCR IOMEM(0xe6150098)
42#define PLLC01CR IOMEM(0xe6150028)
43#define PLLC2CR IOMEM(0xe615002c)
44#define RMSTPCR0 IOMEM(0xe6150110)
45#define RMSTPCR1 IOMEM(0xe6150114)
46#define RMSTPCR2 IOMEM(0xe6150118)
47#define RMSTPCR3 IOMEM(0xe615011c)
48#define RMSTPCR4 IOMEM(0xe6150120)
49#define SMSTPCR0 IOMEM(0xe6150130)
50#define SMSTPCR1 IOMEM(0xe6150134)
51#define SMSTPCR2 IOMEM(0xe6150138)
52#define SMSTPCR3 IOMEM(0xe615013c)
53#define SMSTPCR4 IOMEM(0xe6150140)
54
55#define FSIDIVA 0xFE1F8000
56#define FSIDIVB 0xFE1F8008
57
58/* Platforms must set frequency on their DV_CLKI pin */
59struct clk sh7372_dv_clki_clk = {
60};
61
62/* Fixed 32 KHz root clock from EXTALR pin */
63static struct clk r_clk = {
64 .rate = 32768,
65};
66
67/*
68 * 26MHz default rate for the EXTAL1 root input clock.
69 * If needed, reset this with clk_set_rate() from the platform code.
70 */
71struct clk sh7372_extal1_clk = {
72 .rate = 26000000,
73};
74
75/*
76 * 48MHz default rate for the EXTAL2 root input clock.
77 * If needed, reset this with clk_set_rate() from the platform code.
78 */
79struct clk sh7372_extal2_clk = {
80 .rate = 48000000,
81};
82
83SH_CLK_RATIO(div2, 1, 2);
84
85SH_FIXED_RATIO_CLKg(sh7372_dv_clki_div2_clk, sh7372_dv_clki_clk, div2);
86SH_FIXED_RATIO_CLK(extal1_div2_clk, sh7372_extal1_clk, div2);
87SH_FIXED_RATIO_CLK(extal2_div2_clk, sh7372_extal2_clk, div2);
88SH_FIXED_RATIO_CLK(extal2_div4_clk, extal2_div2_clk, div2);
89
90/* PLLC0 and PLLC1 */
91static unsigned long pllc01_recalc(struct clk *clk)
92{
93 unsigned long mult = 1;
94
95 if (__raw_readl(PLLC01CR) & (1 << 14))
96 mult = (((__raw_readl(clk->enable_reg) >> 24) & 0x3f) + 1) * 2;
97
98 return clk->parent->rate * mult;
99}
100
101static struct sh_clk_ops pllc01_clk_ops = {
102 .recalc = pllc01_recalc,
103};
104
105static struct clk pllc0_clk = {
106 .ops = &pllc01_clk_ops,
107 .flags = CLK_ENABLE_ON_INIT,
108 .parent = &extal1_div2_clk,
109 .enable_reg = (void __iomem *)FRQCRC,
110};
111
112static struct clk pllc1_clk = {
113 .ops = &pllc01_clk_ops,
114 .flags = CLK_ENABLE_ON_INIT,
115 .parent = &extal1_div2_clk,
116 .enable_reg = (void __iomem *)FRQCRA,
117};
118
119/* Divide PLLC1 by two */
120SH_FIXED_RATIO_CLK(pllc1_div2_clk, pllc1_clk, div2);
121
122/* PLLC2 */
123
124/* Indices are important - they are the actual src selecting values */
125static struct clk *pllc2_parent[] = {
126 [0] = &extal1_div2_clk,
127 [1] = &extal2_div2_clk,
128 [2] = &sh7372_dv_clki_div2_clk,
129};
130
131/* Only multipliers 20 * 2 to 46 * 2 are valid, last entry for CPUFREQ_TABLE_END */
132static struct cpufreq_frequency_table pllc2_freq_table[29];
133
134static void pllc2_table_rebuild(struct clk *clk)
135{
136 int i;
137
138 /* Initialise PLLC2 frequency table */
139 for (i = 0; i < ARRAY_SIZE(pllc2_freq_table) - 2; i++) {
140 pllc2_freq_table[i].frequency = clk->parent->rate * (i + 20) * 2;
141 pllc2_freq_table[i].driver_data = i;
142 }
143
144 /* This is a special entry - switching PLL off makes it a repeater */
145 pllc2_freq_table[i].frequency = clk->parent->rate;
146 pllc2_freq_table[i].driver_data = i;
147
148 pllc2_freq_table[++i].frequency = CPUFREQ_TABLE_END;
149 pllc2_freq_table[i].driver_data = i;
150}
151
152static unsigned long pllc2_recalc(struct clk *clk)
153{
154 unsigned long mult = 1;
155
156 pllc2_table_rebuild(clk);
157
158 /*
159 * If the PLL is off, mult == 1, clk->rate will be updated in
160 * pllc2_enable().
161 */
162 if (__raw_readl(PLLC2CR) & (1 << 31))
163 mult = (((__raw_readl(PLLC2CR) >> 24) & 0x3f) + 1) * 2;
164
165 return clk->parent->rate * mult;
166}
167
168static long pllc2_round_rate(struct clk *clk, unsigned long rate)
169{
170 return clk_rate_table_round(clk, clk->freq_table, rate);
171}
172
173static int pllc2_enable(struct clk *clk)
174{
175 int i;
176
177 __raw_writel(__raw_readl(PLLC2CR) | 0x80000000, PLLC2CR);
178
179 for (i = 0; i < 100; i++)
180 if (__raw_readl(PLLC2CR) & 0x80000000) {
181 clk->rate = pllc2_recalc(clk);
182 return 0;
183 }
184
185 pr_err("%s(): timeout!\n", __func__);
186
187 return -ETIMEDOUT;
188}
189
190static void pllc2_disable(struct clk *clk)
191{
192 __raw_writel(__raw_readl(PLLC2CR) & ~0x80000000, PLLC2CR);
193}
194
195static int pllc2_set_rate(struct clk *clk, unsigned long rate)
196{
197 unsigned long value;
198 int idx;
199
200 idx = clk_rate_table_find(clk, clk->freq_table, rate);
201 if (idx < 0)
202 return idx;
203
204 if (rate == clk->parent->rate)
205 return -EINVAL;
206
207 value = __raw_readl(PLLC2CR) & ~(0x3f << 24);
208
209 __raw_writel(value | ((idx + 19) << 24), PLLC2CR);
210
211 clk->rate = clk->freq_table[idx].frequency;
212
213 return 0;
214}
215
216static int pllc2_set_parent(struct clk *clk, struct clk *parent)
217{
218 u32 value;
219 int ret, i;
220
221 if (!clk->parent_table || !clk->parent_num)
222 return -EINVAL;
223
224 /* Search the parent */
225 for (i = 0; i < clk->parent_num; i++)
226 if (clk->parent_table[i] == parent)
227 break;
228
229 if (i == clk->parent_num)
230 return -ENODEV;
231
232 ret = clk_reparent(clk, parent);
233 if (ret < 0)
234 return ret;
235
236 value = __raw_readl(PLLC2CR) & ~(3 << 6);
237
238 __raw_writel(value | (i << 6), PLLC2CR);
239
240 /* Rebiuld the frequency table */
241 pllc2_table_rebuild(clk);
242
243 return 0;
244}
245
246static struct sh_clk_ops pllc2_clk_ops = {
247 .recalc = pllc2_recalc,
248 .round_rate = pllc2_round_rate,
249 .set_rate = pllc2_set_rate,
250 .enable = pllc2_enable,
251 .disable = pllc2_disable,
252 .set_parent = pllc2_set_parent,
253};
254
255struct clk sh7372_pllc2_clk = {
256 .ops = &pllc2_clk_ops,
257 .parent = &extal1_div2_clk,
258 .freq_table = pllc2_freq_table,
259 .nr_freqs = ARRAY_SIZE(pllc2_freq_table) - 1,
260 .parent_table = pllc2_parent,
261 .parent_num = ARRAY_SIZE(pllc2_parent),
262};
263
264/* External input clock (pin name: FSIACK/FSIBCK ) */
265static struct clk fsiack_clk = {
266};
267
268static struct clk fsibck_clk = {
269};
270
271static struct clk *main_clks[] = {
272 &sh7372_dv_clki_clk,
273 &r_clk,
274 &sh7372_extal1_clk,
275 &sh7372_extal2_clk,
276 &sh7372_dv_clki_div2_clk,
277 &extal1_div2_clk,
278 &extal2_div2_clk,
279 &extal2_div4_clk,
280 &pllc0_clk,
281 &pllc1_clk,
282 &pllc1_div2_clk,
283 &sh7372_pllc2_clk,
284 &fsiack_clk,
285 &fsibck_clk,
286};
287
288static void div4_kick(struct clk *clk)
289{
290 unsigned long value;
291
292 /* set KICK bit in FRQCRB to update hardware setting */
293 value = __raw_readl(FRQCRB);
294 value |= (1 << 31);
295 __raw_writel(value, FRQCRB);
296}
297
298static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18,
299 24, 32, 36, 48, 0, 72, 96, 0 };
300
301static struct clk_div_mult_table div4_div_mult_table = {
302 .divisors = divisors,
303 .nr_divisors = ARRAY_SIZE(divisors),
304};
305
306static struct clk_div4_table div4_table = {
307 .div_mult_table = &div4_div_mult_table,
308 .kick = div4_kick,
309};
310
311enum { DIV4_I, DIV4_ZG, DIV4_B, DIV4_M1, DIV4_CSIR,
312 DIV4_ZX, DIV4_HP,
313 DIV4_ISPB, DIV4_S, DIV4_ZB, DIV4_ZB3, DIV4_CP,
314 DIV4_DDRP, DIV4_NR };
315
316#define DIV4(_reg, _bit, _mask, _flags) \
317 SH_CLK_DIV4(&pllc1_clk, _reg, _bit, _mask, _flags)
318
319static struct clk div4_clks[DIV4_NR] = {
320 [DIV4_I] = DIV4(FRQCRA, 20, 0x6fff, CLK_ENABLE_ON_INIT),
321 [DIV4_ZG] = DIV4(FRQCRA, 16, 0x6fff, CLK_ENABLE_ON_INIT),
322 [DIV4_B] = DIV4(FRQCRA, 8, 0x6fff, CLK_ENABLE_ON_INIT),
323 [DIV4_M1] = DIV4(FRQCRA, 4, 0x6fff, CLK_ENABLE_ON_INIT),
324 [DIV4_CSIR] = DIV4(FRQCRA, 0, 0x6fff, 0),
325 [DIV4_ZX] = DIV4(FRQCRB, 12, 0x6fff, 0),
326 [DIV4_HP] = DIV4(FRQCRB, 4, 0x6fff, 0),
327 [DIV4_ISPB] = DIV4(FRQCRC, 20, 0x6fff, 0),
328 [DIV4_S] = DIV4(FRQCRC, 12, 0x6fff, 0),
329 [DIV4_ZB] = DIV4(FRQCRC, 8, 0x6fff, 0),
330 [DIV4_ZB3] = DIV4(FRQCRC, 4, 0x6fff, 0),
331 [DIV4_CP] = DIV4(FRQCRC, 0, 0x6fff, 0),
332 [DIV4_DDRP] = DIV4(FRQCRD, 0, 0x677c, 0),
333};
334
335enum { DIV6_VCK1, DIV6_VCK2, DIV6_VCK3, DIV6_FMSI, DIV6_FMSO,
336 DIV6_SUB, DIV6_SPU,
337 DIV6_VOU, DIV6_DSIT, DIV6_DSI0P, DIV6_DSI1P,
338 DIV6_NR };
339
340static struct clk div6_clks[DIV6_NR] = {
341 [DIV6_VCK1] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR1, 0),
342 [DIV6_VCK2] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR2, 0),
343 [DIV6_VCK3] = SH_CLK_DIV6(&pllc1_div2_clk, VCLKCR3, 0),
344 [DIV6_FMSI] = SH_CLK_DIV6(&pllc1_div2_clk, FMSICKCR, 0),
345 [DIV6_FMSO] = SH_CLK_DIV6(&pllc1_div2_clk, FMSOCKCR, 0),
346 [DIV6_SUB] = SH_CLK_DIV6(&sh7372_extal2_clk, SUBCKCR, 0),
347 [DIV6_SPU] = SH_CLK_DIV6(&pllc1_div2_clk, SPUCKCR, 0),
348 [DIV6_VOU] = SH_CLK_DIV6(&pllc1_div2_clk, VOUCKCR, 0),
349 [DIV6_DSIT] = SH_CLK_DIV6(&pllc1_div2_clk, DSITCKCR, 0),
350 [DIV6_DSI0P] = SH_CLK_DIV6(&pllc1_div2_clk, DSI0PCKCR, 0),
351 [DIV6_DSI1P] = SH_CLK_DIV6(&pllc1_div2_clk, DSI1PCKCR, 0),
352};
353
354enum { DIV6_HDMI, DIV6_FSIA, DIV6_FSIB, DIV6_REPARENT_NR };
355
356/* Indices are important - they are the actual src selecting values */
357static struct clk *hdmi_parent[] = {
358 [0] = &pllc1_div2_clk,
359 [1] = &sh7372_pllc2_clk,
360 [2] = &sh7372_dv_clki_clk,
361 [3] = NULL, /* pllc2_div4 not implemented yet */
362};
363
364static struct clk *fsiackcr_parent[] = {
365 [0] = &pllc1_div2_clk,
366 [1] = &sh7372_pllc2_clk,
367 [2] = &fsiack_clk, /* external input for FSI A */
368 [3] = NULL, /* setting prohibited */
369};
370
371static struct clk *fsibckcr_parent[] = {
372 [0] = &pllc1_div2_clk,
373 [1] = &sh7372_pllc2_clk,
374 [2] = &fsibck_clk, /* external input for FSI B */
375 [3] = NULL, /* setting prohibited */
376};
377
378static struct clk div6_reparent_clks[DIV6_REPARENT_NR] = {
379 [DIV6_HDMI] = SH_CLK_DIV6_EXT(HDMICKCR, 0,
380 hdmi_parent, ARRAY_SIZE(hdmi_parent), 6, 2),
381 [DIV6_FSIA] = SH_CLK_DIV6_EXT(FSIACKCR, 0,
382 fsiackcr_parent, ARRAY_SIZE(fsiackcr_parent), 6, 2),
383 [DIV6_FSIB] = SH_CLK_DIV6_EXT(FSIBCKCR, 0,
384 fsibckcr_parent, ARRAY_SIZE(fsibckcr_parent), 6, 2),
385};
386
387/* FSI DIV */
388enum { FSIDIV_A, FSIDIV_B, FSIDIV_REPARENT_NR };
389
390static struct clk fsidivs[] = {
391 [FSIDIV_A] = SH_CLK_FSIDIV(FSIDIVA, &div6_reparent_clks[DIV6_FSIA]),
392 [FSIDIV_B] = SH_CLK_FSIDIV(FSIDIVB, &div6_reparent_clks[DIV6_FSIB]),
393};
394
395enum { MSTP001, MSTP000,
396 MSTP131, MSTP130,
397 MSTP129, MSTP128, MSTP127, MSTP126, MSTP125,
398 MSTP118, MSTP117, MSTP116, MSTP113,
399 MSTP106, MSTP101, MSTP100,
400 MSTP223,
401 MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207,
402 MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
403 MSTP328, MSTP323, MSTP322, MSTP315, MSTP314, MSTP313, MSTP312,
404 MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406,
405 MSTP405, MSTP404, MSTP403, MSTP400,
406 MSTP_NR };
407
408#define MSTP(_parent, _reg, _bit, _flags) \
409 SH_CLK_MSTP32(_parent, _reg, _bit, _flags)
410
411static struct clk mstp_clks[MSTP_NR] = {
412 [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */
413 [MSTP000] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 0, 0), /* MSIOF0 */
414 [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */
415 [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */
416 [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */
417 [MSTP128] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 28, 0), /* VEU0 */
418 [MSTP127] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 27, 0), /* CEU */
419 [MSTP126] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 26, 0), /* CSI2 */
420 [MSTP125] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 25, 0), /* TMU0 */
421 [MSTP118] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 18, 0), /* DSITX */
422 [MSTP117] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 17, 0), /* LCDC1 */
423 [MSTP116] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 16, 0), /* IIC0 */
424 [MSTP113] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR1, 13, 0), /* MERAM */
425 [MSTP106] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 6, 0), /* JPU */
426 [MSTP101] = MSTP(&div4_clks[DIV4_M1], SMSTPCR1, 1, 0), /* VPU */
427 [MSTP100] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 0, 0), /* LCDC0 */
428 [MSTP223] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR2, 23, 0), /* SPU2 */
429 [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */
430 [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */
431 [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */
432 [MSTP214] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 14, 0), /* USBDMAC */
433 [MSTP208] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 8, 0), /* MSIOF1 */
434 [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */
435 [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */
436 [MSTP205] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 5, 0), /* MSIOF2 */
437 [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */
438 [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */
439 [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */
440 [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */
441 [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */
442 [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */
443 [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */
444 [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */
445 [MSTP315] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 15, 0), /* FLCTL*/
446 [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */
447 [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */
448 [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */
449 [MSTP423] = MSTP(&div4_clks[DIV4_B], SMSTPCR4, 23, 0), /* DSITX1 */
450 [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */
451 [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
452 [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
453 [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */
454 [MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USB-DMAC1 */
455 [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */
456 [MSTP405] = MSTP(&r_clk, SMSTPCR4, 5, 0), /* CMT4 */
457 [MSTP404] = MSTP(&r_clk, SMSTPCR4, 4, 0), /* CMT3 */
458 [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
459 [MSTP400] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* CMT2 */
460};
461
462static struct clk_lookup lookups[] = {
463 /* main clocks */
464 CLKDEV_CON_ID("dv_clki_div2_clk", &sh7372_dv_clki_div2_clk),
465 CLKDEV_CON_ID("r_clk", &r_clk),
466 CLKDEV_CON_ID("extal1", &sh7372_extal1_clk),
467 CLKDEV_CON_ID("extal2", &sh7372_extal2_clk),
468 CLKDEV_CON_ID("extal1_div2_clk", &extal1_div2_clk),
469 CLKDEV_CON_ID("extal2_div2_clk", &extal2_div2_clk),
470 CLKDEV_CON_ID("extal2_div4_clk", &extal2_div4_clk),
471 CLKDEV_CON_ID("pllc0_clk", &pllc0_clk),
472 CLKDEV_CON_ID("pllc1_clk", &pllc1_clk),
473 CLKDEV_CON_ID("pllc1_div2_clk", &pllc1_div2_clk),
474 CLKDEV_CON_ID("pllc2_clk", &sh7372_pllc2_clk),
475 CLKDEV_CON_ID("fsiack", &fsiack_clk),
476 CLKDEV_CON_ID("fsibck", &fsibck_clk),
477
478 /* DIV4 clocks */
479 CLKDEV_CON_ID("i_clk", &div4_clks[DIV4_I]),
480 CLKDEV_CON_ID("zg_clk", &div4_clks[DIV4_ZG]),
481 CLKDEV_CON_ID("b_clk", &div4_clks[DIV4_B]),
482 CLKDEV_CON_ID("m1_clk", &div4_clks[DIV4_M1]),
483 CLKDEV_CON_ID("csir_clk", &div4_clks[DIV4_CSIR]),
484 CLKDEV_CON_ID("zx_clk", &div4_clks[DIV4_ZX]),
485 CLKDEV_CON_ID("hp_clk", &div4_clks[DIV4_HP]),
486 CLKDEV_CON_ID("ispb_clk", &div4_clks[DIV4_ISPB]),
487 CLKDEV_CON_ID("s_clk", &div4_clks[DIV4_S]),
488 CLKDEV_CON_ID("zb_clk", &div4_clks[DIV4_ZB]),
489 CLKDEV_CON_ID("zb3_clk", &div4_clks[DIV4_ZB3]),
490 CLKDEV_CON_ID("cp_clk", &div4_clks[DIV4_CP]),
491 CLKDEV_CON_ID("ddrp_clk", &div4_clks[DIV4_DDRP]),
492
493 /* DIV6 clocks */
494 CLKDEV_CON_ID("vck1_clk", &div6_clks[DIV6_VCK1]),
495 CLKDEV_CON_ID("vck2_clk", &div6_clks[DIV6_VCK2]),
496 CLKDEV_CON_ID("vck3_clk", &div6_clks[DIV6_VCK3]),
497 CLKDEV_CON_ID("fmsi_clk", &div6_clks[DIV6_FMSI]),
498 CLKDEV_CON_ID("fmso_clk", &div6_clks[DIV6_FMSO]),
499 CLKDEV_CON_ID("sub_clk", &div6_clks[DIV6_SUB]),
500 CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]),
501 CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]),
502 CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]),
503
504 /* MSTP32 clocks */
505 CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */
506 CLKDEV_DEV_ID("fff30000.i2c", &mstp_clks[MSTP001]), /* IIC2 */
507 CLKDEV_DEV_ID("spi_sh_msiof.0", &mstp_clks[MSTP000]), /* MSIOF0 */
508 CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */
509 CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */
510 CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */
511 CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */
512 CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */
513 CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */
514 CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */
515 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */
516 CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */
517 CLKDEV_DEV_ID("fff20000.i2c", &mstp_clks[MSTP116]), /* IIC0 */
518 CLKDEV_DEV_ID("sh_mobile_meram.0", &mstp_clks[MSTP113]), /* MERAM */
519 CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */
520 CLKDEV_DEV_ID("uio_pdrv_genirq.0", &mstp_clks[MSTP101]), /* VPU */
521 CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
522 CLKDEV_DEV_ID("uio_pdrv_genirq.6", &mstp_clks[MSTP223]), /* SPU2DSP0 */
523 CLKDEV_DEV_ID("uio_pdrv_genirq.7", &mstp_clks[MSTP223]), /* SPU2DSP1 */
524 CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */
525 CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */
526 CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */
527 CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */
528 CLKDEV_DEV_ID("spi_sh_msiof.1", &mstp_clks[MSTP208]), /* MSIOF1 */
529 CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
530 CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */
531 CLKDEV_DEV_ID("spi_sh_msiof.2", &mstp_clks[MSTP205]), /* MSIOF2 */
532 CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
533 CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
534 CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */
535 CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
536 CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
537 CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */
538 CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */
539 CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), /* IIC1 */
540 CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */
541 CLKDEV_DEV_ID("r8a66597_udc.0", &mstp_clks[MSTP322]), /* USB0 */
542 CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[MSTP322]), /* USB0 */
543 CLKDEV_DEV_ID("sh_flctl.0", &mstp_clks[MSTP315]), /* FLCTL */
544 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */
545 CLKDEV_DEV_ID("e6850000.sdhi", &mstp_clks[MSTP314]), /* SDHI0 */
546 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */
547 CLKDEV_DEV_ID("e6860000.sdhi", &mstp_clks[MSTP313]), /* SDHI1 */
548 CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */
549 CLKDEV_DEV_ID("e6bd0000.mmcif", &mstp_clks[MSTP312]), /* MMC */
550 CLKDEV_DEV_ID("sh-mipi-dsi.1", &mstp_clks[MSTP423]), /* DSITX1 */
551 CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */
552 CLKDEV_DEV_ID("e6870000.sdhi", &mstp_clks[MSTP415]), /* SDHI2 */
553 CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */
554 CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */
555 CLKDEV_DEV_ID("e6d20000.i2c", &mstp_clks[MSTP411]), /* IIC3 */
556 CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */
557 CLKDEV_DEV_ID("e6d30000.i2c", &mstp_clks[MSTP410]), /* IIC4 */
558 CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */
559 CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */
560 CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */
561 CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
562 CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
563
564 /* ICK */
565 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
566 CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]),
567 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]),
568 CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
569 CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1",
570 &div6_reparent_clks[DIV6_HDMI]),
571 CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
572 CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
573 CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),
574 CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
575 CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]),
576 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.4", &mstp_clks[MSTP405]), /* CMT4 */
577 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.3", &mstp_clks[MSTP404]), /* CMT3 */
578 CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.2", &mstp_clks[MSTP400]), /* CMT2 */
579 CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]),
580 CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]),
581 CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk),
582 CLKDEV_ICK_ID("xckb", "sh_fsi2", &fsibck_clk),
583};
584
585void __init sh7372_clock_init(void)
586{
587 int k, ret = 0;
588
589 /* make sure MSTP bits on the RT/SH4AL-DSP side are off */
590 __raw_writel(0xe4ef8087, RMSTPCR0);
591 __raw_writel(0xffffffff, RMSTPCR1);
592 __raw_writel(0x37c7f7ff, RMSTPCR2);
593 __raw_writel(0xffffffff, RMSTPCR3);
594 __raw_writel(0xffe0fffd, RMSTPCR4);
595
596 for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
597 ret = clk_register(main_clks[k]);
598
599 if (!ret)
600 ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
601
602 if (!ret)
603 ret = sh_clk_div6_register(div6_clks, DIV6_NR);
604
605 if (!ret)
606 ret = sh_clk_div6_reparent_register(div6_reparent_clks, DIV6_REPARENT_NR);
607
608 if (!ret)
609 ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
610
611 if (!ret)
612 ret = sh_clk_fsidiv_register(fsidivs, FSIDIV_REPARENT_NR);
613
614 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
615
616 if (!ret)
617 shmobile_clk_init();
618 else
619 panic("failed to setup sh7372 clocks\n");
620}
diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
index 34f056fc3756..68c2d06d0eaa 100644
--- a/arch/arm/mach-shmobile/clock.c
+++ b/arch/arm/mach-shmobile/clock.c
@@ -45,14 +45,3 @@ int __init shmobile_clk_init(void)
45 45
46 return 0; 46 return 0;
47} 47}
48
49int __clk_get(struct clk *clk)
50{
51 return 1;
52}
53EXPORT_SYMBOL(__clk_get);
54
55void __clk_put(struct clk *clk)
56{
57}
58EXPORT_SYMBOL(__clk_put);
diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
index 309025efd4cf..afc60bad6fd6 100644
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -21,10 +21,7 @@ extern void shmobile_smp_scu_cpu_die(unsigned int cpu);
21extern int shmobile_smp_scu_cpu_kill(unsigned int cpu); 21extern int shmobile_smp_scu_cpu_kill(unsigned int cpu);
22struct clk; 22struct clk;
23extern int shmobile_clk_init(void); 23extern int shmobile_clk_init(void);
24extern void shmobile_handle_irq_intc(struct pt_regs *);
25extern struct platform_suspend_ops shmobile_suspend_ops; 24extern struct platform_suspend_ops shmobile_suspend_ops;
26struct cpuidle_driver;
27extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
28 25
29#ifdef CONFIG_SUSPEND 26#ifdef CONFIG_SUSPEND
30int shmobile_suspend_init(void); 27int shmobile_suspend_init(void);
@@ -34,12 +31,6 @@ static inline int shmobile_suspend_init(void) { return 0; }
34static inline void shmobile_smp_apmu_suspend_init(void) { } 31static inline void shmobile_smp_apmu_suspend_init(void) { }
35#endif 32#endif
36 33
37#ifdef CONFIG_CPU_IDLE
38int shmobile_cpuidle_init(void);
39#else
40static inline int shmobile_cpuidle_init(void) { return 0; }
41#endif
42
43#ifdef CONFIG_CPU_FREQ 34#ifdef CONFIG_CPU_FREQ
44int shmobile_cpufreq_init(void); 35int shmobile_cpufreq_init(void);
45#else 36#else
@@ -51,7 +42,6 @@ extern void __iomem *shmobile_scu_base;
51static inline void __init shmobile_init_late(void) 42static inline void __init shmobile_init_late(void)
52{ 43{
53 shmobile_suspend_init(); 44 shmobile_suspend_init();
54 shmobile_cpuidle_init();
55 shmobile_cpufreq_init(); 45 shmobile_cpufreq_init();
56} 46}
57 47
diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c
deleted file mode 100644
index 0afeb5c7061c..000000000000
--- a/arch/arm/mach-shmobile/cpuidle.c
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * CPUIdle support code for SH-Mobile ARM
3 *
4 * Copyright (C) 2011 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/pm.h>
12#include <linux/cpuidle.h>
13#include <linux/suspend.h>
14#include <linux/module.h>
15#include <linux/err.h>
16#include <asm/cpuidle.h>
17#include <asm/io.h>
18
19static struct cpuidle_driver shmobile_cpuidle_default_driver = {
20 .name = "shmobile_cpuidle",
21 .owner = THIS_MODULE,
22 .states[0] = ARM_CPUIDLE_WFI_STATE,
23 .safe_state_index = 0, /* C1 */
24 .state_count = 1,
25};
26
27static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
28
29void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
30{
31 cpuidle_drv = drv;
32}
33
34int __init shmobile_cpuidle_init(void)
35{
36 return cpuidle_register(cpuidle_drv, NULL);
37}
diff --git a/arch/arm/mach-shmobile/entry-intc.S b/arch/arm/mach-shmobile/entry-intc.S
deleted file mode 100644
index 1a1c00ca39a2..000000000000
--- a/arch/arm/mach-shmobile/entry-intc.S
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * ARM Interrupt demux handler using INTC
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2008 Renesas Solutions Corp.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#include <asm/entry-macro-multi.S>
13
14#define INTCA_BASE 0xe6980000
15#define INTFLGA_OFFS 0x00000018 /* accept pending interrupt */
16#define INTEVTA_OFFS 0x00000020 /* vector number of accepted interrupt */
17#define INTLVLA_OFFS 0x00000030 /* priority level of accepted interrupt */
18#define INTLVLB_OFFS 0x00000034 /* previous priority level */
19
20 .macro get_irqnr_preamble, base, tmp
21 ldr \base, =INTCA_BASE
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 /* The single INTFLGA read access below results in the following:
26 *
27 * 1. INTLVLB is updated with old priority value from INTLVLA
28 * 2. Highest priority interrupt is accepted
29 * 3. INTLVLA is updated to contain priority of accepted interrupt
30 * 4. Accepted interrupt vector is stored in INTFLGA and INTEVTA
31 */
32 ldr \irqnr, [\base, #INTFLGA_OFFS]
33
34 /* Restore INTLVLA with the value saved in INTLVLB.
35 * This is required to support interrupt priorities properly.
36 */
37 ldrb \tmp, [\base, #INTLVLB_OFFS]
38 strb \tmp, [\base, #INTLVLA_OFFS]
39
40 /* Handle invalid vector number case */
41 cmp \irqnr, #0
42 beq 1000f
43
44 /* Convert vector to irq number, same as the evt2irq() macro */
45 lsr \irqnr, \irqnr, #0x5
46 subs \irqnr, \irqnr, #16
47
481000:
49 .endm
50
51 .macro test_for_ipi, irqnr, irqstat, base, tmp
52 .endm
53
54 arch_irq_handler shmobile_handle_irq_intc
diff --git a/arch/arm/mach-shmobile/include/mach/clkdev.h b/arch/arm/mach-shmobile/include/mach/clkdev.h
deleted file mode 100644
index 36d0163a857a..000000000000
--- a/arch/arm/mach-shmobile/include/mach/clkdev.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_MACH_CLKDEV_H
2#define __ASM_MACH_CLKDEV_H
3
4int __clk_get(struct clk *clk);
5void __clk_put(struct clk *clk);
6
7#endif /* __ASM_MACH_CLKDEV_H */
diff --git a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
deleted file mode 100644
index 9f134dfeffdc..000000000000
--- a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
+++ /dev/null
@@ -1,93 +0,0 @@
1LIST "partner-jet-setup.txt"
2LIST "(C) Copyright 2010 Renesas Solutions Corp"
3LIST "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>"
4
5LIST "RWT Setting"
6EW 0xE6020004, 0xA500
7EW 0xE6030004, 0xA500
8
9LIST "GPIO Setting"
10EB 0xE6051013, 0xA2
11
12LIST "CPG"
13ED 0xE61500C0, 0x00000002
14
15WAIT 1, 0xFE40009C
16
17LIST "FRQCR"
18ED 0xE6150000, 0x2D1305C3
19ED 0xE61500E0, 0x9E40358E
20ED 0xE6150004, 0x80331050
21
22WAIT 1, 0xFE40009C
23
24ED 0xE61500E4, 0x00002000
25
26WAIT 1, 0xFE40009C
27
28LIST "PLL"
29ED 0xE6150028, 0x00004000
30
31WAIT 1, 0xFE40009C
32
33ED 0xE615002C, 0x93000040
34
35WAIT 1, 0xFE40009C
36
37LIST "SUB/USBClk"
38ED 0xE6150080, 0x00000180
39
40LIST "BSC"
41ED 0xFEC10000, 0x00E0001B
42
43LIST "SBSC1"
44ED 0xFE400354, 0x01AD8000
45ED 0xFE400354, 0x01AD8001
46
47WAIT 5, 0xFE40009C
48
49ED 0xFE400008, 0xBCC90151
50ED 0xFE400040, 0x41774113
51ED 0xFE400044, 0x2712E229
52ED 0xFE400048, 0x20C18505
53ED 0xFE40004C, 0x00110209
54ED 0xFE400010, 0x00000087
55
56WAIT 30, 0xFE40009C
57
58ED 0xFE400084, 0x0000003F
59EB 0xFE500000, 0x00
60
61WAIT 5, 0xFE40009C
62
63ED 0xFE400084, 0x0000FF0A
64EB 0xFE500000, 0x00
65
66WAIT 1, 0xFE40009C
67
68ED 0xFE400084, 0x00002201
69EB 0xFE500000, 0x00
70ED 0xFE400084, 0x00000302
71EB 0xFE500000, 0x00
72EB 0xFE5C0000, 0x00
73ED 0xFE400008, 0xBCC90159
74ED 0xFE40008C, 0x88800004
75ED 0xFE400094, 0x00000004
76ED 0xFE400028, 0xA55A0032
77ED 0xFE40002C, 0xA55A000C
78ED 0xFE400020, 0xA55A2048
79ED 0xFE400008, 0xBCC90959
80
81LIST "Change CPGA setting"
82ED 0xE61500E0, 0x9E40352E
83ED 0xE6150004, 0x80331050
84
85WAIT 1, 0xFE40009C
86
87ED 0xFE400354, 0x01AD8002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0xe1
91EW 0xE6C40000, 0x0000
92EB 0xE6C40004, 0x19
93EW 0xE6C40008, 0x0030
diff --git a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
deleted file mode 100644
index 15d3a9efdec2..000000000000
--- a/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
+++ /dev/null
@@ -1,38 +0,0 @@
1#ifndef MMC_MACKEREL_H
2#define MMC_MACKEREL_H
3
4#define PORT0CR (void __iomem *)0xe6051000
5#define PORT1CR (void __iomem *)0xe6051001
6#define PORT2CR (void __iomem *)0xe6051002
7#define PORT159CR (void __iomem *)0xe605009f
8
9#define PORTR031_000DR (void __iomem *)0xe6055000
10#define PORTL159_128DR (void __iomem *)0xe6054010
11
12static inline void mmc_init_progress(void)
13{
14 /* Initialise LEDS0-3
15 * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
16 * value: 0x10 - enable output
17 */
18 __raw_writeb(0x10, PORT0CR);
19 __raw_writeb(0x10, PORT1CR);
20 __raw_writeb(0x10, PORT2CR);
21 __raw_writeb(0x10, PORT159CR);
22}
23
24static inline void mmc_update_progress(int n)
25{
26 unsigned a = 0, b = 0;
27
28 if (n < 3)
29 a = 1 << n;
30 else
31 b = 1 << 31;
32
33 __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a,
34 PORTR031_000DR);
35 __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
36 PORTL159_128DR);
37}
38#endif /* MMC_MACKEREL_H */
diff --git a/arch/arm/mach-shmobile/include/mach/mmc.h b/arch/arm/mach-shmobile/include/mach/mmc.h
deleted file mode 100644
index e979b8fc1da2..000000000000
--- a/arch/arm/mach-shmobile/include/mach/mmc.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef MMC_H
2#define MMC_H
3
4/**************************************************
5 *
6 * board specific settings
7 *
8 **************************************************/
9
10#ifdef CONFIG_MACH_MACKEREL
11#include "mach/mmc-mackerel.h"
12#else
13#error "unsupported board."
14#endif
15
16#endif /* MMC_H */
diff --git a/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
deleted file mode 100644
index 4a81b01f1e8f..000000000000
--- a/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h
+++ /dev/null
@@ -1,21 +0,0 @@
1#ifndef SDHI_SH7372_H
2#define SDHI_SH7372_H
3
4#define SDGENCNTA 0xfe40009c
5
6/* The countdown of SDGENCNTA is controlled by
7 * ZB3D2CLK which runs at 149.5MHz.
8 * That is 149.5ticks/us. Approximate this as 150ticks/us.
9 */
10static void udelay(int us)
11{
12 __raw_writel(us * 150, SDGENCNTA);
13 while(__raw_readl(SDGENCNTA)) ;
14}
15
16static void msleep(int ms)
17{
18 udelay(ms * 1000);
19}
20
21#endif
diff --git a/arch/arm/mach-shmobile/include/mach/sdhi.h b/arch/arm/mach-shmobile/include/mach/sdhi.h
deleted file mode 100644
index 0ec9e69f2c3b..000000000000
--- a/arch/arm/mach-shmobile/include/mach/sdhi.h
+++ /dev/null
@@ -1,16 +0,0 @@
1#ifndef SDHI_H
2#define SDHI_H
3
4/**************************************************
5 *
6 * CPU specific settings
7 *
8 **************************************************/
9
10#ifdef CONFIG_ARCH_SH7372
11#include "mach/sdhi-sh7372.h"
12#else
13#error "unsupported CPU."
14#endif
15
16#endif /* SDHI_H */
diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
deleted file mode 100644
index 540eaff08f34..000000000000
--- a/arch/arm/mach-shmobile/include/mach/system.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __ASM_ARCH_SYSTEM_H
2#define __ASM_ARCH_SYSTEM_H
3
4#include <asm/system_misc.h>
5
6static inline void arch_reset(char mode, const char *cmd)
7{
8 soft_restart(0);
9}
10
11#endif
diff --git a/arch/arm/mach-shmobile/include/mach/uncompress.h b/arch/arm/mach-shmobile/include/mach/uncompress.h
deleted file mode 100644
index f1aee56781e7..000000000000
--- a/arch/arm/mach-shmobile/include/mach/uncompress.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef __ASM_MACH_UNCOMPRESS_H
2#define __ASM_MACH_UNCOMPRESS_H
3
4/*
5 * This does not append a newline
6 */
7static void putc(int c)
8{
9}
10
11static inline void flush(void)
12{
13}
14
15static void arch_decomp_setup(void)
16{
17}
18
19#endif /* __ASM_MACH_UNCOMPRESS_H */
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h
index 727cc78ac8ec..175ee05465da 100644
--- a/arch/arm/mach-shmobile/include/mach/zboot.h
+++ b/arch/arm/mach-shmobile/include/mach/zboot.h
@@ -9,10 +9,7 @@
9 * 9 *
10 **************************************************/ 10 **************************************************/
11 11
12#ifdef CONFIG_MACH_MACKEREL 12#ifdef CONFIG_MACH_KZM9G
13#define MEMORY_START 0x40000000
14#include "mach/head-mackerel.txt"
15#elif defined(CONFIG_MACH_KZM9G) || defined(CONFIG_MACH_KZM9G_REFERENCE)
16#define MEMORY_START 0x43000000 13#define MEMORY_START 0x43000000
17#include "mach/head-kzm9g.txt" 14#include "mach/head-kzm9g.txt"
18#else 15#else
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
deleted file mode 100644
index 1ccf49cb485f..000000000000
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ /dev/null
@@ -1,672 +0,0 @@
1/*
2 * sh7372 processor support - INTC hardware block
3 *
4 * Copyright (C) 2010 Magnus Damm
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/interrupt.h>
18#include <linux/module.h>
19#include <linux/irq.h>
20#include <linux/io.h>
21#include <asm/mach-types.h>
22#include <asm/mach/arch.h>
23#include "intc.h"
24#include "irqs.h"
25
26enum {
27 UNUSED_INTCA = 0,
28
29 /* interrupt sources INTCA */
30 DIRC,
31 CRYPT_STD,
32 IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1,
33 AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMRX,
34 MFI_MFIM, MFI_MFIS,
35 BBIF1, BBIF2,
36 USBHSDMAC0_USHDMI,
37 _3DG_SGX540,
38 CMT1_CMT10, CMT1_CMT11, CMT1_CMT12, CMT1_CMT13, CMT2, CMT3,
39 KEYSC_KEY,
40 SCIFA0, SCIFA1, SCIFA2, SCIFA3,
41 MSIOF2, MSIOF1,
42 SCIFA4, SCIFA5, SCIFB,
43 FLCTL_FLSTEI, FLCTL_FLTENDI, FLCTL_FLTREQ0I, FLCTL_FLTREQ1I,
44 SDHI0_SDHI0I0, SDHI0_SDHI0I1, SDHI0_SDHI0I2, SDHI0_SDHI0I3,
45 SDHI1_SDHI1I0, SDHI1_SDHI1I1, SDHI1_SDHI1I2,
46 IRREM,
47 IRDA,
48 TPU0,
49 TTI20,
50 DDM,
51 SDHI2_SDHI2I0, SDHI2_SDHI2I1, SDHI2_SDHI2I2, SDHI2_SDHI2I3,
52 RWDT0,
53 DMAC1_1_DEI0, DMAC1_1_DEI1, DMAC1_1_DEI2, DMAC1_1_DEI3,
54 DMAC1_2_DEI4, DMAC1_2_DEI5, DMAC1_2_DADERR,
55 DMAC2_1_DEI0, DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3,
56 DMAC2_2_DEI4, DMAC2_2_DEI5, DMAC2_2_DADERR,
57 DMAC3_1_DEI0, DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3,
58 DMAC3_2_DEI4, DMAC3_2_DEI5, DMAC3_2_DADERR,
59 SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM,
60 HDMI,
61 SPU2_SPU0, SPU2_SPU1,
62 FSI, FMSI,
63 MIPI_HSI,
64 IPMMU_IPMMUD,
65 CEC_1, CEC_2,
66 AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ, AP_ARM_DMAIRQ, AP_ARM_DMASIRQ,
67 MFIS2,
68 CPORTR2S,
69 CMT14, CMT15,
70 MMC_MMC_ERR, MMC_MMC_NOR,
71 IIC4_ALI4, IIC4_TACKI4, IIC4_WAITI4, IIC4_DTEI4,
72 IIC3_ALI3, IIC3_TACKI3, IIC3_WAITI3, IIC3_DTEI3,
73 USB0_USB0I1, USB0_USB0I0,
74 USB1_USB1I1, USB1_USB1I0,
75 USBHSDMAC1_USHDMI,
76
77 /* interrupt groups INTCA */
78 DMAC1_1, DMAC1_2, DMAC2_1, DMAC2_2, DMAC3_1, DMAC3_2, SHWYSTAT,
79 AP_ARM1, AP_ARM2, SPU2, FLCTL, IIC1, SDHI0, SDHI1, SDHI2
80};
81
82static struct intc_vect intca_vectors[] __initdata = {
83 INTC_VECT(DIRC, 0x0560),
84 INTC_VECT(CRYPT_STD, 0x0700),
85 INTC_VECT(IIC1_ALI1, 0x0780), INTC_VECT(IIC1_TACKI1, 0x07a0),
86 INTC_VECT(IIC1_WAITI1, 0x07c0), INTC_VECT(IIC1_DTEI1, 0x07e0),
87 INTC_VECT(AP_ARM_IRQPMU, 0x0800), INTC_VECT(AP_ARM_COMMTX, 0x0840),
88 INTC_VECT(AP_ARM_COMMRX, 0x0860),
89 INTC_VECT(MFI_MFIM, 0x0900), INTC_VECT(MFI_MFIS, 0x0920),
90 INTC_VECT(BBIF1, 0x0940), INTC_VECT(BBIF2, 0x0960),
91 INTC_VECT(USBHSDMAC0_USHDMI, 0x0a00),
92 INTC_VECT(_3DG_SGX540, 0x0a60),
93 INTC_VECT(CMT1_CMT10, 0x0b00), INTC_VECT(CMT1_CMT11, 0x0b20),
94 INTC_VECT(CMT1_CMT12, 0x0b40), INTC_VECT(CMT1_CMT13, 0x0b60),
95 INTC_VECT(CMT2, 0x0b80), INTC_VECT(CMT3, 0x0ba0),
96 INTC_VECT(KEYSC_KEY, 0x0be0),
97 INTC_VECT(SCIFA0, 0x0c00), INTC_VECT(SCIFA1, 0x0c20),
98 INTC_VECT(SCIFA2, 0x0c40), INTC_VECT(SCIFA3, 0x0c60),
99 INTC_VECT(MSIOF2, 0x0c80), INTC_VECT(MSIOF1, 0x0d00),
100 INTC_VECT(SCIFA4, 0x0d20), INTC_VECT(SCIFA5, 0x0d40),
101 INTC_VECT(SCIFB, 0x0d60),
102 INTC_VECT(FLCTL_FLSTEI, 0x0d80), INTC_VECT(FLCTL_FLTENDI, 0x0da0),
103 INTC_VECT(FLCTL_FLTREQ0I, 0x0dc0), INTC_VECT(FLCTL_FLTREQ1I, 0x0de0),
104 INTC_VECT(SDHI0_SDHI0I0, 0x0e00), INTC_VECT(SDHI0_SDHI0I1, 0x0e20),
105 INTC_VECT(SDHI0_SDHI0I2, 0x0e40), INTC_VECT(SDHI0_SDHI0I3, 0x0e60),
106 INTC_VECT(SDHI1_SDHI1I0, 0x0e80), INTC_VECT(SDHI1_SDHI1I1, 0x0ea0),
107 INTC_VECT(SDHI1_SDHI1I2, 0x0ec0),
108 INTC_VECT(IRREM, 0x0f60),
109 INTC_VECT(IRDA, 0x0480),
110 INTC_VECT(TPU0, 0x04a0),
111 INTC_VECT(TTI20, 0x1100),
112 INTC_VECT(DDM, 0x1140),
113 INTC_VECT(SDHI2_SDHI2I0, 0x1200), INTC_VECT(SDHI2_SDHI2I1, 0x1220),
114 INTC_VECT(SDHI2_SDHI2I2, 0x1240), INTC_VECT(SDHI2_SDHI2I3, 0x1260),
115 INTC_VECT(RWDT0, 0x1280),
116 INTC_VECT(DMAC1_1_DEI0, 0x2000), INTC_VECT(DMAC1_1_DEI1, 0x2020),
117 INTC_VECT(DMAC1_1_DEI2, 0x2040), INTC_VECT(DMAC1_1_DEI3, 0x2060),
118 INTC_VECT(DMAC1_2_DEI4, 0x2080), INTC_VECT(DMAC1_2_DEI5, 0x20a0),
119 INTC_VECT(DMAC1_2_DADERR, 0x20c0),
120 INTC_VECT(DMAC2_1_DEI0, 0x2100), INTC_VECT(DMAC2_1_DEI1, 0x2120),
121 INTC_VECT(DMAC2_1_DEI2, 0x2140), INTC_VECT(DMAC2_1_DEI3, 0x2160),
122 INTC_VECT(DMAC2_2_DEI4, 0x2180), INTC_VECT(DMAC2_2_DEI5, 0x21a0),
123 INTC_VECT(DMAC2_2_DADERR, 0x21c0),
124 INTC_VECT(DMAC3_1_DEI0, 0x2200), INTC_VECT(DMAC3_1_DEI1, 0x2220),
125 INTC_VECT(DMAC3_1_DEI2, 0x2240), INTC_VECT(DMAC3_1_DEI3, 0x2260),
126 INTC_VECT(DMAC3_2_DEI4, 0x2280), INTC_VECT(DMAC3_2_DEI5, 0x22a0),
127 INTC_VECT(DMAC3_2_DADERR, 0x22c0),
128 INTC_VECT(SHWYSTAT_RT, 0x1300), INTC_VECT(SHWYSTAT_HS, 0x1320),
129 INTC_VECT(SHWYSTAT_COM, 0x1340),
130 INTC_VECT(HDMI, 0x17e0),
131 INTC_VECT(SPU2_SPU0, 0x1800), INTC_VECT(SPU2_SPU1, 0x1820),
132 INTC_VECT(FSI, 0x1840),
133 INTC_VECT(FMSI, 0x1860),
134 INTC_VECT(MIPI_HSI, 0x18e0),
135 INTC_VECT(IPMMU_IPMMUD, 0x1920),
136 INTC_VECT(CEC_1, 0x1940), INTC_VECT(CEC_2, 0x1960),
137 INTC_VECT(AP_ARM_CTIIRQ, 0x1980),
138 INTC_VECT(AP_ARM_DMAEXTERRIRQ, 0x19a0),
139 INTC_VECT(AP_ARM_DMAIRQ, 0x19c0),
140 INTC_VECT(AP_ARM_DMASIRQ, 0x19e0),
141 INTC_VECT(MFIS2, 0x1a00),
142 INTC_VECT(CPORTR2S, 0x1a20),
143 INTC_VECT(CMT14, 0x1a40), INTC_VECT(CMT15, 0x1a60),
144 INTC_VECT(MMC_MMC_ERR, 0x1ac0), INTC_VECT(MMC_MMC_NOR, 0x1ae0),
145 INTC_VECT(IIC4_ALI4, 0x1b00), INTC_VECT(IIC4_TACKI4, 0x1b20),
146 INTC_VECT(IIC4_WAITI4, 0x1b40), INTC_VECT(IIC4_DTEI4, 0x1b60),
147 INTC_VECT(IIC3_ALI3, 0x1b80), INTC_VECT(IIC3_TACKI3, 0x1ba0),
148 INTC_VECT(IIC3_WAITI3, 0x1bc0), INTC_VECT(IIC3_DTEI3, 0x1be0),
149 INTC_VECT(USB0_USB0I1, 0x1c80), INTC_VECT(USB0_USB0I0, 0x1ca0),
150 INTC_VECT(USB1_USB1I1, 0x1cc0), INTC_VECT(USB1_USB1I0, 0x1ce0),
151 INTC_VECT(USBHSDMAC1_USHDMI, 0x1d00),
152};
153
154static struct intc_group intca_groups[] __initdata = {
155 INTC_GROUP(DMAC1_1, DMAC1_1_DEI0,
156 DMAC1_1_DEI1, DMAC1_1_DEI2, DMAC1_1_DEI3),
157 INTC_GROUP(DMAC1_2, DMAC1_2_DEI4,
158 DMAC1_2_DEI5, DMAC1_2_DADERR),
159 INTC_GROUP(DMAC2_1, DMAC2_1_DEI0,
160 DMAC2_1_DEI1, DMAC2_1_DEI2, DMAC2_1_DEI3),
161 INTC_GROUP(DMAC2_2, DMAC2_2_DEI4,
162 DMAC2_2_DEI5, DMAC2_2_DADERR),
163 INTC_GROUP(DMAC3_1, DMAC3_1_DEI0,
164 DMAC3_1_DEI1, DMAC3_1_DEI2, DMAC3_1_DEI3),
165 INTC_GROUP(DMAC3_2, DMAC3_2_DEI4,
166 DMAC3_2_DEI5, DMAC3_2_DADERR),
167 INTC_GROUP(AP_ARM1, AP_ARM_IRQPMU, AP_ARM_COMMTX, AP_ARM_COMMRX),
168 INTC_GROUP(AP_ARM2, AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ,
169 AP_ARM_DMAIRQ, AP_ARM_DMASIRQ),
170 INTC_GROUP(SPU2, SPU2_SPU0, SPU2_SPU1),
171 INTC_GROUP(FLCTL, FLCTL_FLSTEI, FLCTL_FLTENDI,
172 FLCTL_FLTREQ0I, FLCTL_FLTREQ1I),
173 INTC_GROUP(IIC1, IIC1_ALI1, IIC1_TACKI1, IIC1_WAITI1, IIC1_DTEI1),
174 INTC_GROUP(SDHI0, SDHI0_SDHI0I0, SDHI0_SDHI0I1,
175 SDHI0_SDHI0I2, SDHI0_SDHI0I3),
176 INTC_GROUP(SDHI1, SDHI1_SDHI1I0, SDHI1_SDHI1I1,
177 SDHI1_SDHI1I2),
178 INTC_GROUP(SDHI2, SDHI2_SDHI2I0, SDHI2_SDHI2I1,
179 SDHI2_SDHI2I2, SDHI2_SDHI2I3),
180 INTC_GROUP(SHWYSTAT, SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM),
181};
182
183static struct intc_mask_reg intca_mask_registers[] __initdata = {
184 { 0xe6940080, 0xe69400c0, 8, /* IMR0A / IMCR0A */
185 { DMAC2_1_DEI3, DMAC2_1_DEI2, DMAC2_1_DEI1, DMAC2_1_DEI0,
186 AP_ARM_IRQPMU, 0, AP_ARM_COMMTX, AP_ARM_COMMRX } },
187 { 0xe6940084, 0xe69400c4, 8, /* IMR1A / IMCR1A */
188 { 0, CRYPT_STD, DIRC, 0,
189 DMAC1_1_DEI3, DMAC1_1_DEI2, DMAC1_1_DEI1, DMAC1_1_DEI0 } },
190 { 0xe6940088, 0xe69400c8, 8, /* IMR2A / IMCR2A */
191 { 0, 0, 0, 0,
192 BBIF1, BBIF2, MFI_MFIS, MFI_MFIM } },
193 { 0xe694008c, 0xe69400cc, 8, /* IMR3A / IMCR3A */
194 { DMAC3_1_DEI3, DMAC3_1_DEI2, DMAC3_1_DEI1, DMAC3_1_DEI0,
195 DMAC3_2_DADERR, DMAC3_2_DEI5, DMAC3_2_DEI4, IRDA } },
196 { 0xe6940090, 0xe69400d0, 8, /* IMR4A / IMCR4A */
197 { DDM, 0, 0, 0,
198 0, 0, 0, 0 } },
199 { 0xe6940094, 0xe69400d4, 8, /* IMR5A / IMCR5A */
200 { KEYSC_KEY, DMAC1_2_DADERR, DMAC1_2_DEI5, DMAC1_2_DEI4,
201 SCIFA3, SCIFA2, SCIFA1, SCIFA0 } },
202 { 0xe6940098, 0xe69400d8, 8, /* IMR6A / IMCR6A */
203 { SCIFB, SCIFA5, SCIFA4, MSIOF1,
204 0, 0, MSIOF2, 0 } },
205 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
206 { SDHI0_SDHI0I3, SDHI0_SDHI0I2, SDHI0_SDHI0I1, SDHI0_SDHI0I0,
207 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
208 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
209 { 0, SDHI1_SDHI1I2, SDHI1_SDHI1I1, SDHI1_SDHI1I0,
210 TTI20, USBHSDMAC0_USHDMI, 0, 0 } },
211 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
212 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
213 CMT2, 0, 0, _3DG_SGX540 } },
214 { 0xe69400a8, 0xe69400e8, 8, /* IMR10A / IMCR10A */
215 { 0, DMAC2_2_DADERR, DMAC2_2_DEI5, DMAC2_2_DEI4,
216 0, 0, 0, 0 } },
217 { 0xe69400ac, 0xe69400ec, 8, /* IMR11A / IMCR11A */
218 { IIC1_DTEI1, IIC1_WAITI1, IIC1_TACKI1, IIC1_ALI1,
219 0, 0, IRREM, 0 } },
220 { 0xe69400b0, 0xe69400f0, 8, /* IMR12A / IMCR12A */
221 { 0, 0, TPU0, 0,
222 0, 0, 0, 0 } },
223 { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */
224 { SDHI2_SDHI2I3, SDHI2_SDHI2I2, SDHI2_SDHI2I1, SDHI2_SDHI2I0,
225 0, CMT3, 0, RWDT0 } },
226 { 0xe6950080, 0xe69500c0, 8, /* IMR0A3 / IMCR0A3 */
227 { SHWYSTAT_RT, SHWYSTAT_HS, SHWYSTAT_COM, 0,
228 0, 0, 0, 0 } },
229 { 0xe6950090, 0xe69500d0, 8, /* IMR4A3 / IMCR4A3 */
230 { 0, 0, 0, 0,
231 0, 0, 0, HDMI } },
232 { 0xe6950094, 0xe69500d4, 8, /* IMR5A3 / IMCR5A3 */
233 { SPU2_SPU0, SPU2_SPU1, FSI, FMSI,
234 0, 0, 0, MIPI_HSI } },
235 { 0xe6950098, 0xe69500d8, 8, /* IMR6A3 / IMCR6A3 */
236 { 0, IPMMU_IPMMUD, CEC_1, CEC_2,
237 AP_ARM_CTIIRQ, AP_ARM_DMAEXTERRIRQ,
238 AP_ARM_DMAIRQ, AP_ARM_DMASIRQ } },
239 { 0xe695009c, 0xe69500dc, 8, /* IMR7A3 / IMCR7A3 */
240 { MFIS2, CPORTR2S, CMT14, CMT15,
241 0, 0, MMC_MMC_ERR, MMC_MMC_NOR } },
242 { 0xe69500a0, 0xe69500e0, 8, /* IMR8A3 / IMCR8A3 */
243 { IIC4_ALI4, IIC4_TACKI4, IIC4_WAITI4, IIC4_DTEI4,
244 IIC3_ALI3, IIC3_TACKI3, IIC3_WAITI3, IIC3_DTEI3 } },
245 { 0xe69500a4, 0xe69500e4, 8, /* IMR9A3 / IMCR9A3 */
246 { 0, 0, 0, 0,
247 USB0_USB0I1, USB0_USB0I0, USB1_USB1I1, USB1_USB1I0 } },
248 { 0xe69500a8, 0xe69500e8, 8, /* IMR10A3 / IMCR10A3 */
249 { USBHSDMAC1_USHDMI, 0, 0, 0,
250 0, 0, 0, 0 } },
251};
252
253static struct intc_prio_reg intca_prio_registers[] __initdata = {
254 { 0xe6940000, 0, 16, 4, /* IPRAA */ { DMAC3_1, DMAC3_2, CMT2, 0 } },
255 { 0xe6940004, 0, 16, 4, /* IPRBA */ { IRDA, 0, BBIF1, BBIF2 } },
256 { 0xe6940008, 0, 16, 4, /* IPRCA */ { 0, CRYPT_STD,
257 CMT1_CMT11, AP_ARM1 } },
258 { 0xe694000c, 0, 16, 4, /* IPRDA */ { 0, 0,
259 CMT1_CMT12, 0 } },
260 { 0xe6940010, 0, 16, 4, /* IPREA */ { DMAC1_1, MFI_MFIS,
261 MFI_MFIM, 0 } },
262 { 0xe6940014, 0, 16, 4, /* IPRFA */ { KEYSC_KEY, DMAC1_2,
263 _3DG_SGX540, CMT1_CMT10 } },
264 { 0xe6940018, 0, 16, 4, /* IPRGA */ { SCIFA0, SCIFA1,
265 SCIFA2, SCIFA3 } },
266 { 0xe694001c, 0, 16, 4, /* IPRGH */ { MSIOF2, USBHSDMAC0_USHDMI,
267 FLCTL, SDHI0 } },
268 { 0xe6940020, 0, 16, 4, /* IPRIA */ { MSIOF1, SCIFA4,
269 0/* MSU */, IIC1 } },
270 { 0xe6940024, 0, 16, 4, /* IPRJA */ { DMAC2_1, DMAC2_2,
271 0/* MSUG */, TTI20 } },
272 { 0xe6940028, 0, 16, 4, /* IPRKA */ { 0, CMT1_CMT13, IRREM, SDHI1 } },
273 { 0xe694002c, 0, 16, 4, /* IPRLA */ { TPU0, 0, 0, 0 } },
274 { 0xe6940030, 0, 16, 4, /* IPRMA */ { 0, CMT3, 0, RWDT0 } },
275 { 0xe6940034, 0, 16, 4, /* IPRNA */ { SCIFB, SCIFA5, 0, DDM } },
276 { 0xe6940038, 0, 16, 4, /* IPROA */ { 0, 0, DIRC, SDHI2 } },
277 { 0xe6950000, 0, 16, 4, /* IPRAA3 */ { SHWYSTAT, 0, 0, 0 } },
278 { 0xe6950024, 0, 16, 4, /* IPRJA3 */ { 0, 0, 0, HDMI } },
279 { 0xe6950028, 0, 16, 4, /* IPRKA3 */ { SPU2, 0, FSI, FMSI } },
280 { 0xe695002c, 0, 16, 4, /* IPRLA3 */ { 0, 0, 0, MIPI_HSI } },
281 { 0xe6950030, 0, 16, 4, /* IPRMA3 */ { IPMMU_IPMMUD, 0,
282 CEC_1, CEC_2 } },
283 { 0xe6950034, 0, 16, 4, /* IPRNA3 */ { AP_ARM2, 0, 0, 0 } },
284 { 0xe6950038, 0, 16, 4, /* IPROA3 */ { MFIS2, CPORTR2S,
285 CMT14, CMT15 } },
286 { 0xe695003c, 0, 16, 4, /* IPRPA3 */ { 0, 0,
287 MMC_MMC_ERR, MMC_MMC_NOR } },
288 { 0xe6950040, 0, 16, 4, /* IPRQA3 */ { IIC4_ALI4, IIC4_TACKI4,
289 IIC4_WAITI4, IIC4_DTEI4 } },
290 { 0xe6950044, 0, 16, 4, /* IPRRA3 */ { IIC3_ALI3, IIC3_TACKI3,
291 IIC3_WAITI3, IIC3_DTEI3 } },
292 { 0xe6950048, 0, 16, 4, /* IPRSA3 */ { 0/*ERI*/, 0/*RXI*/,
293 0/*TXI*/, 0/*TEI*/} },
294 { 0xe695004c, 0, 16, 4, /* IPRTA3 */ { USB0_USB0I1, USB0_USB0I0,
295 USB1_USB1I1, USB1_USB1I0 } },
296 { 0xe6950050, 0, 16, 4, /* IPRUA3 */ { USBHSDMAC1_USHDMI, 0, 0, 0 } },
297};
298
299static DECLARE_INTC_DESC(intca_desc, "sh7372-intca",
300 intca_vectors, intca_groups,
301 intca_mask_registers, intca_prio_registers,
302 NULL);
303
304INTC_IRQ_PINS_16(intca_irq_pins_lo, 0xe6900000,
305 INTC_VECT, "sh7372-intca-irq-lo");
306
307INTC_IRQ_PINS_16H(intca_irq_pins_hi, 0xe6900000,
308 INTC_VECT, "sh7372-intca-irq-hi");
309
310enum {
311 UNUSED_INTCS = 0,
312 ENABLED_INTCS,
313
314 /* interrupt sources INTCS */
315
316 /* IRQ0S - IRQ31S */
317 VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3,
318 RTDMAC_1_DEI0, RTDMAC_1_DEI1, RTDMAC_1_DEI2, RTDMAC_1_DEI3,
319 CEU, BEU_BEU0, BEU_BEU1, BEU_BEU2,
320 /* MFI */
321 /* BBIF2 */
322 VPU,
323 TSIF1,
324 /* 3DG */
325 _2DDMAC,
326 IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2,
327 IPMMU_IPMMUR, IPMMU_IPMMUR2,
328 RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR,
329 /* KEYSC */
330 /* TTI20 */
331 MSIOF,
332 IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0,
333 TMU_TUNI0, TMU_TUNI1, TMU_TUNI2,
334 CMT0,
335 TSIF0,
336 /* CMT2 */
337 LMB,
338 CTI,
339 /* RWDT0 */
340 ICB,
341 JPU_JPEG,
342 LCDC,
343 LCRC,
344 RTDMAC2_1_DEI0, RTDMAC2_1_DEI1, RTDMAC2_1_DEI2, RTDMAC2_1_DEI3,
345 RTDMAC2_2_DEI4, RTDMAC2_2_DEI5, RTDMAC2_2_DADERR,
346 ISP,
347 LCDC1,
348 CSIRX,
349 DSITX_DSITX0,
350 DSITX_DSITX1,
351 /* SPU2 */
352 /* FSI */
353 /* FMSI */
354 /* HDMI */
355 TMU1_TUNI0, TMU1_TUNI1, TMU1_TUNI2,
356 CMT4,
357 DSITX1_DSITX1_0,
358 DSITX1_DSITX1_1,
359 MFIS2_INTCS, /* Priority always enabled using ENABLED_INTCS */
360 CPORTS2R,
361 /* CEC */
362 JPU6E,
363
364 /* interrupt groups INTCS */
365 RTDMAC_1, RTDMAC_2, VEU, BEU, IIC0, IPMMU, IIC2,
366 RTDMAC2_1, RTDMAC2_2, TMU1, DSITX,
367};
368
369static struct intc_vect intcs_vectors[] = {
370 /* IRQ0S - IRQ31S */
371 INTCS_VECT(VEU_VEU0, 0x700), INTCS_VECT(VEU_VEU1, 0x720),
372 INTCS_VECT(VEU_VEU2, 0x740), INTCS_VECT(VEU_VEU3, 0x760),
373 INTCS_VECT(RTDMAC_1_DEI0, 0x800), INTCS_VECT(RTDMAC_1_DEI1, 0x820),
374 INTCS_VECT(RTDMAC_1_DEI2, 0x840), INTCS_VECT(RTDMAC_1_DEI3, 0x860),
375 INTCS_VECT(CEU, 0x880), INTCS_VECT(BEU_BEU0, 0x8a0),
376 INTCS_VECT(BEU_BEU1, 0x8c0), INTCS_VECT(BEU_BEU2, 0x8e0),
377 /* MFI */
378 /* BBIF2 */
379 INTCS_VECT(VPU, 0x980),
380 INTCS_VECT(TSIF1, 0x9a0),
381 /* 3DG */
382 INTCS_VECT(_2DDMAC, 0xa00),
383 INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0),
384 INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0),
385 INTCS_VECT(IPMMU_IPMMUR, 0xb00), INTCS_VECT(IPMMU_IPMMUR2, 0xb20),
386 INTCS_VECT(RTDMAC_2_DEI4, 0xb80), INTCS_VECT(RTDMAC_2_DEI5, 0xba0),
387 INTCS_VECT(RTDMAC_2_DADERR, 0xbc0),
388 /* KEYSC */
389 /* TTI20 */
390 INTCS_VECT(MSIOF, 0x0d20),
391 INTCS_VECT(IIC0_ALI0, 0xe00), INTCS_VECT(IIC0_TACKI0, 0xe20),
392 INTCS_VECT(IIC0_WAITI0, 0xe40), INTCS_VECT(IIC0_DTEI0, 0xe60),
393 INTCS_VECT(TMU_TUNI0, 0xe80), INTCS_VECT(TMU_TUNI1, 0xea0),
394 INTCS_VECT(TMU_TUNI2, 0xec0),
395 INTCS_VECT(CMT0, 0xf00),
396 INTCS_VECT(TSIF0, 0xf20),
397 /* CMT2 */
398 INTCS_VECT(LMB, 0xf60),
399 INTCS_VECT(CTI, 0x400),
400 /* RWDT0 */
401 INTCS_VECT(ICB, 0x480),
402 INTCS_VECT(JPU_JPEG, 0x560),
403 INTCS_VECT(LCDC, 0x580),
404 INTCS_VECT(LCRC, 0x5a0),
405 INTCS_VECT(RTDMAC2_1_DEI0, 0x1300), INTCS_VECT(RTDMAC2_1_DEI1, 0x1320),
406 INTCS_VECT(RTDMAC2_1_DEI2, 0x1340), INTCS_VECT(RTDMAC2_1_DEI3, 0x1360),
407 INTCS_VECT(RTDMAC2_2_DEI4, 0x1380), INTCS_VECT(RTDMAC2_2_DEI5, 0x13a0),
408 INTCS_VECT(RTDMAC2_2_DADERR, 0x13c0),
409 INTCS_VECT(ISP, 0x1720),
410 INTCS_VECT(LCDC1, 0x1780),
411 INTCS_VECT(CSIRX, 0x17a0),
412 INTCS_VECT(DSITX_DSITX0, 0x17c0),
413 INTCS_VECT(DSITX_DSITX1, 0x17e0),
414 /* SPU2 */
415 /* FSI */
416 /* FMSI */
417 /* HDMI */
418 INTCS_VECT(TMU1_TUNI0, 0x1900), INTCS_VECT(TMU1_TUNI1, 0x1920),
419 INTCS_VECT(TMU1_TUNI2, 0x1940),
420 INTCS_VECT(CMT4, 0x1980),
421 INTCS_VECT(DSITX1_DSITX1_0, 0x19a0),
422 INTCS_VECT(DSITX1_DSITX1_1, 0x19c0),
423 INTCS_VECT(MFIS2_INTCS, 0x1a00),
424 INTCS_VECT(CPORTS2R, 0x1a20),
425 /* CEC */
426 INTCS_VECT(JPU6E, 0x1a80),
427};
428
429static struct intc_group intcs_groups[] __initdata = {
430 INTC_GROUP(RTDMAC_1, RTDMAC_1_DEI0, RTDMAC_1_DEI1,
431 RTDMAC_1_DEI2, RTDMAC_1_DEI3),
432 INTC_GROUP(RTDMAC_2, RTDMAC_2_DEI4, RTDMAC_2_DEI5, RTDMAC_2_DADERR),
433 INTC_GROUP(VEU, VEU_VEU0, VEU_VEU1, VEU_VEU2, VEU_VEU3),
434 INTC_GROUP(BEU, BEU_BEU0, BEU_BEU1, BEU_BEU2),
435 INTC_GROUP(IIC0, IIC0_ALI0, IIC0_TACKI0, IIC0_WAITI0, IIC0_DTEI0),
436 INTC_GROUP(IPMMU, IPMMU_IPMMUR, IPMMU_IPMMUR2),
437 INTC_GROUP(IIC2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2),
438 INTC_GROUP(RTDMAC2_1, RTDMAC2_1_DEI0, RTDMAC2_1_DEI1,
439 RTDMAC2_1_DEI2, RTDMAC2_1_DEI3),
440 INTC_GROUP(RTDMAC2_2, RTDMAC2_2_DEI4,
441 RTDMAC2_2_DEI5, RTDMAC2_2_DADERR),
442 INTC_GROUP(TMU1, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0),
443 INTC_GROUP(DSITX, DSITX_DSITX0, DSITX_DSITX1),
444};
445
446static struct intc_mask_reg intcs_mask_registers[] = {
447 { 0xffd20184, 0xffd201c4, 8, /* IMR1SA / IMCR1SA */
448 { BEU_BEU2, BEU_BEU1, BEU_BEU0, CEU,
449 VEU_VEU3, VEU_VEU2, VEU_VEU1, VEU_VEU0 } },
450 { 0xffd20188, 0xffd201c8, 8, /* IMR2SA / IMCR2SA */
451 { 0, 0, 0, VPU,
452 0, 0, 0, 0 } },
453 { 0xffd2018c, 0xffd201cc, 8, /* IMR3SA / IMCR3SA */
454 { 0, 0, 0, _2DDMAC,
455 0, 0, 0, ICB } },
456 { 0xffd20190, 0xffd201d0, 8, /* IMR4SA / IMCR4SA */
457 { 0, 0, 0, CTI,
458 JPU_JPEG, 0, LCRC, LCDC } },
459 { 0xffd20194, 0xffd201d4, 8, /* IMR5SA / IMCR5SA */
460 { 0, RTDMAC_2_DADERR, RTDMAC_2_DEI5, RTDMAC_2_DEI4,
461 RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } },
462 { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */
463 { 0, 0, MSIOF, 0,
464 0, 0, 0, 0 } },
465 { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */
466 { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0,
467 0, 0, 0, 0 } },
468 { 0xffd201a4, 0xffd201e4, 8, /* IMR9SA / IMCR9SA */
469 { 0, 0, 0, CMT0,
470 IIC2_DTEI2, IIC2_WAITI2, IIC2_TACKI2, IIC2_ALI2 } },
471 { 0xffd201a8, 0xffd201e8, 8, /* IMR10SA / IMCR10SA */
472 { 0, 0, IPMMU_IPMMUR2, IPMMU_IPMMUR,
473 0, 0, 0, 0 } },
474 { 0xffd201ac, 0xffd201ec, 8, /* IMR11SA / IMCR11SA */
475 { IIC0_DTEI0, IIC0_WAITI0, IIC0_TACKI0, IIC0_ALI0,
476 0, TSIF1, LMB, TSIF0 } },
477 { 0xffd50180, 0xffd501c0, 8, /* IMR0SA3 / IMCR0SA3 */
478 { 0, RTDMAC2_2_DADERR, RTDMAC2_2_DEI5, RTDMAC2_2_DEI4,
479 RTDMAC2_1_DEI3, RTDMAC2_1_DEI2, RTDMAC2_1_DEI1, RTDMAC2_1_DEI0 } },
480 { 0xffd50190, 0xffd501d0, 8, /* IMR4SA3 / IMCR4SA3 */
481 { 0, ISP, 0, 0,
482 LCDC1, CSIRX, DSITX_DSITX0, DSITX_DSITX1 } },
483 { 0xffd50198, 0xffd501d8, 8, /* IMR6SA3 / IMCR6SA3 */
484 { 0, TMU1_TUNI2, TMU1_TUNI1, TMU1_TUNI0,
485 CMT4, DSITX1_DSITX1_0, DSITX1_DSITX1_1, 0 } },
486 { 0xffd5019c, 0xffd501dc, 8, /* IMR7SA3 / IMCR7SA3 */
487 { MFIS2_INTCS, CPORTS2R, 0, 0,
488 JPU6E, 0, 0, 0 } },
489};
490
491/* Priority is needed for INTCA to receive the INTCS interrupt */
492static struct intc_prio_reg intcs_prio_registers[] = {
493 { 0xffd20000, 0, 16, 4, /* IPRAS */ { CTI, 0, _2DDMAC, ICB } },
494 { 0xffd20004, 0, 16, 4, /* IPRBS */ { JPU_JPEG, LCDC, 0, LCRC } },
495 { 0xffd20010, 0, 16, 4, /* IPRES */ { RTDMAC_1, CEU, 0, VPU } },
496 { 0xffd20014, 0, 16, 4, /* IPRFS */ { 0, RTDMAC_2, 0, CMT0 } },
497 { 0xffd20018, 0, 16, 4, /* IPRGS */ { TMU_TUNI0, TMU_TUNI1,
498 TMU_TUNI2, TSIF1 } },
499 { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } },
500 { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } },
501 { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } },
502 { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } },
503 { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } },
504 { 0xffd50000, 0, 16, 4, /* IPRAS3 */ { RTDMAC2_1, 0, 0, 0 } },
505 { 0xffd50004, 0, 16, 4, /* IPRBS3 */ { RTDMAC2_2, 0, 0, 0 } },
506 { 0xffd50020, 0, 16, 4, /* IPRIS3 */ { 0, ISP, 0, 0 } },
507 { 0xffd50024, 0, 16, 4, /* IPRJS3 */ { LCDC1, CSIRX, DSITX, 0 } },
508 { 0xffd50030, 0, 16, 4, /* IPRMS3 */ { TMU1, 0, 0, 0 } },
509 { 0xffd50034, 0, 16, 4, /* IPRNS3 */ { CMT4, DSITX1_DSITX1_0,
510 DSITX1_DSITX1_1, 0 } },
511 { 0xffd50038, 0, 16, 4, /* IPROS3 */ { ENABLED_INTCS, CPORTS2R,
512 0, 0 } },
513 { 0xffd5003c, 0, 16, 4, /* IPRPS3 */ { JPU6E, 0, 0, 0 } },
514};
515
516static struct resource intcs_resources[] __initdata = {
517 [0] = {
518 .start = 0xffd20000,
519 .end = 0xffd201ff,
520 .flags = IORESOURCE_MEM,
521 },
522 [1] = {
523 .start = 0xffd50000,
524 .end = 0xffd501ff,
525 .flags = IORESOURCE_MEM,
526 }
527};
528
529static struct intc_desc intcs_desc __initdata = {
530 .name = "sh7372-intcs",
531 .force_enable = ENABLED_INTCS,
532 .skip_syscore_suspend = true,
533 .resource = intcs_resources,
534 .num_resources = ARRAY_SIZE(intcs_resources),
535 .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers,
536 intcs_prio_registers, NULL, NULL),
537};
538
539static void intcs_demux(unsigned int irq, struct irq_desc *desc)
540{
541 void __iomem *reg = (void *)irq_get_handler_data(irq);
542 unsigned int evtcodeas = ioread32(reg);
543
544 generic_handle_irq(intcs_evt2irq(evtcodeas));
545}
546
547static void __iomem *intcs_ffd2;
548static void __iomem *intcs_ffd5;
549
550void __init sh7372_init_irq(void)
551{
552 void __iomem *intevtsa;
553 int n;
554
555 intcs_ffd2 = ioremap_nocache(0xffd20000, PAGE_SIZE);
556 intevtsa = intcs_ffd2 + 0x100;
557 intcs_ffd5 = ioremap_nocache(0xffd50000, PAGE_SIZE);
558
559 register_intc_controller(&intca_desc);
560 register_intc_controller(&intca_irq_pins_lo_desc);
561 register_intc_controller(&intca_irq_pins_hi_desc);
562 register_intc_controller(&intcs_desc);
563
564 /* setup dummy cascade chip for INTCS */
565 n = evt2irq(0xf80);
566 irq_alloc_desc_at(n, numa_node_id());
567 irq_set_chip_and_handler_name(n, &dummy_irq_chip,
568 handle_level_irq, "level");
569 set_irq_flags(n, IRQF_VALID); /* yuck */
570
571 /* demux using INTEVTSA */
572 irq_set_handler_data(n, (void *)intevtsa);
573 irq_set_chained_handler(n, intcs_demux);
574
575 /* unmask INTCS in INTAMASK */
576 iowrite16(0, intcs_ffd2 + 0x104);
577}
578
579static unsigned short ffd2[0x200];
580static unsigned short ffd5[0x100];
581
582void sh7372_intcs_suspend(void)
583{
584 int k;
585
586 for (k = 0x00; k <= 0x30; k += 4)
587 ffd2[k] = __raw_readw(intcs_ffd2 + k);
588
589 for (k = 0x80; k <= 0xb0; k += 4)
590 ffd2[k] = __raw_readb(intcs_ffd2 + k);
591
592 for (k = 0x180; k <= 0x188; k += 4)
593 ffd2[k] = __raw_readb(intcs_ffd2 + k);
594
595 for (k = 0x00; k <= 0x3c; k += 4)
596 ffd5[k] = __raw_readw(intcs_ffd5 + k);
597
598 for (k = 0x80; k <= 0x9c; k += 4)
599 ffd5[k] = __raw_readb(intcs_ffd5 + k);
600}
601
602void sh7372_intcs_resume(void)
603{
604 int k;
605
606 for (k = 0x00; k <= 0x30; k += 4)
607 __raw_writew(ffd2[k], intcs_ffd2 + k);
608
609 for (k = 0x80; k <= 0xb0; k += 4)
610 __raw_writeb(ffd2[k], intcs_ffd2 + k);
611
612 for (k = 0x180; k <= 0x188; k += 4)
613 __raw_writeb(ffd2[k], intcs_ffd2 + k);
614
615 for (k = 0x00; k <= 0x3c; k += 4)
616 __raw_writew(ffd5[k], intcs_ffd5 + k);
617
618 for (k = 0x80; k <= 0x9c; k += 4)
619 __raw_writeb(ffd5[k], intcs_ffd5 + k);
620}
621
622#define E694_BASE IOMEM(0xe6940000)
623#define E695_BASE IOMEM(0xe6950000)
624
625static unsigned short e694[0x200];
626static unsigned short e695[0x200];
627
628void sh7372_intca_suspend(void)
629{
630 int k;
631
632 for (k = 0x00; k <= 0x38; k += 4)
633 e694[k] = __raw_readw(E694_BASE + k);
634
635 for (k = 0x80; k <= 0xb4; k += 4)
636 e694[k] = __raw_readb(E694_BASE + k);
637
638 for (k = 0x180; k <= 0x1b4; k += 4)
639 e694[k] = __raw_readb(E694_BASE + k);
640
641 for (k = 0x00; k <= 0x50; k += 4)
642 e695[k] = __raw_readw(E695_BASE + k);
643
644 for (k = 0x80; k <= 0xa8; k += 4)
645 e695[k] = __raw_readb(E695_BASE + k);
646
647 for (k = 0x180; k <= 0x1a8; k += 4)
648 e695[k] = __raw_readb(E695_BASE + k);
649}
650
651void sh7372_intca_resume(void)
652{
653 int k;
654
655 for (k = 0x00; k <= 0x38; k += 4)
656 __raw_writew(e694[k], E694_BASE + k);
657
658 for (k = 0x80; k <= 0xb4; k += 4)
659 __raw_writeb(e694[k], E694_BASE + k);
660
661 for (k = 0x180; k <= 0x1b4; k += 4)
662 __raw_writeb(e694[k], E694_BASE + k);
663
664 for (k = 0x00; k <= 0x50; k += 4)
665 __raw_writew(e695[k], E695_BASE + k);
666
667 for (k = 0x80; k <= 0xa8; k += 4)
668 __raw_writeb(e695[k], E695_BASE + k);
669
670 for (k = 0x180; k <= 0x1a8; k += 4)
671 __raw_writeb(e695[k], E695_BASE + k);
672}
diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
deleted file mode 100644
index 80e8d95e54d3..000000000000
--- a/arch/arm/mach-shmobile/pm-r8a7790.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * r8a7790 Power management support
3 *
4 * Copyright (C) 2013 Renesas Electronics Corporation
5 * Copyright (C) 2011 Renesas Solutions Corp.
6 * Copyright (C) 2011 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12
13#include <linux/kernel.h>
14#include <linux/smp.h>
15#include <asm/io.h>
16#include "common.h"
17#include "pm-rcar.h"
18#include "r8a7790.h"
19
20/* RST */
21#define RST 0xe6160000
22#define CA15BAR 0x0020
23#define CA7BAR 0x0030
24#define CA15RESCNT 0x0040
25#define CA7RESCNT 0x0044
26
27/* On-chip RAM */
28#define MERAM 0xe8080000
29
30/* SYSC */
31#define SYSCIER 0x0c
32#define SYSCIMR 0x10
33
34#if defined(CONFIG_SMP)
35
36static void __init r8a7790_sysc_init(void)
37{
38 void __iomem *base = rcar_sysc_init(0xe6180000);
39
40 /* enable all interrupt sources, but do not use interrupt handler */
41 iowrite32(0x0131000e, base + SYSCIER);
42 iowrite32(0, base + SYSCIMR);
43}
44
45#else /* CONFIG_SMP */
46
47static inline void r8a7790_sysc_init(void) {}
48
49#endif /* CONFIG_SMP */
50
51void __init r8a7790_pm_init(void)
52{
53 void __iomem *p;
54 u32 bar;
55 static int once;
56
57 if (once++)
58 return;
59
60 /* MERAM for jump stub, because BAR requires 256KB aligned address */
61 p = ioremap_nocache(MERAM, shmobile_boot_size);
62 memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
63 iounmap(p);
64
65 /* setup reset vectors */
66 p = ioremap_nocache(RST, 0x63);
67 bar = (MERAM >> 8) & 0xfffffc00;
68 writel_relaxed(bar, p + CA15BAR);
69 writel_relaxed(bar, p + CA7BAR);
70 writel_relaxed(bar | 0x10, p + CA15BAR);
71 writel_relaxed(bar | 0x10, p + CA7BAR);
72
73 /* de-assert reset for all CPUs */
74 writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
75 p + CA15RESCNT);
76 writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
77 p + CA7RESCNT);
78 iounmap(p);
79
80 r8a7790_sysc_init();
81 shmobile_smp_apmu_suspend_init();
82}
diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
deleted file mode 100644
index 25f107bb3657..000000000000
--- a/arch/arm/mach-shmobile/pm-r8a7791.c
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * r8a7791 Power management support
3 *
4 * Copyright (C) 2014 Renesas Electronics Corporation
5 * Copyright (C) 2011 Renesas Solutions Corp.
6 * Copyright (C) 2011 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12
13#include <linux/kernel.h>
14#include <linux/smp.h>
15#include <asm/io.h>
16#include "common.h"
17#include "pm-rcar.h"
18#include "r8a7791.h"
19
20#define RST 0xe6160000
21#define CA15BAR 0x0020
22#define CA15RESCNT 0x0040
23#define RAM 0xe6300000
24
25/* SYSC */
26#define SYSCIER 0x0c
27#define SYSCIMR 0x10
28
29#if defined(CONFIG_SMP)
30
31static void __init r8a7791_sysc_init(void)
32{
33 void __iomem *base = rcar_sysc_init(0xe6180000);
34
35 /* enable all interrupt sources, but do not use interrupt handler */
36 iowrite32(0x0131000e, base + SYSCIER);
37 iowrite32(0, base + SYSCIMR);
38}
39
40#else /* CONFIG_SMP */
41
42static inline void r8a7791_sysc_init(void) {}
43
44#endif /* CONFIG_SMP */
45
46void __init r8a7791_pm_init(void)
47{
48 void __iomem *p;
49 u32 bar;
50 static int once;
51
52 if (once++)
53 return;
54
55 /* RAM for jump stub, because BAR requires 256KB aligned address */
56 p = ioremap_nocache(RAM, shmobile_boot_size);
57 memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
58 iounmap(p);
59
60 /* setup reset vectors */
61 p = ioremap_nocache(RST, 0x63);
62 bar = (RAM >> 8) & 0xfffffc00;
63 writel_relaxed(bar, p + CA15BAR);
64 writel_relaxed(bar | 0x10, p + CA15BAR);
65
66 /* enable clocks to all CPUs */
67 writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
68 p + CA15RESCNT);
69 iounmap(p);
70
71 r8a7791_sysc_init();
72 shmobile_smp_apmu_suspend_init();
73}
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c
new file mode 100644
index 000000000000..6815781ad116
--- /dev/null
+++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c
@@ -0,0 +1,115 @@
1/*
2 * R-Car Generation 2 Power management support
3 *
4 * Copyright (C) 2013 - 2015 Renesas Electronics Corporation
5 * Copyright (C) 2011 Renesas Solutions Corp.
6 * Copyright (C) 2011 Magnus Damm
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12
13#include <linux/kernel.h>
14#include <linux/of.h>
15#include <linux/smp.h>
16#include <asm/io.h>
17#include "common.h"
18#include "pm-rcar.h"
19#include "rcar-gen2.h"
20
21/* RST */
22#define RST 0xe6160000
23#define CA15BAR 0x0020
24#define CA7BAR 0x0030
25#define CA15RESCNT 0x0040
26#define CA7RESCNT 0x0044
27
28/* On-chip RAM */
29#define MERAM 0xe8080000
30#define RAM 0xe6300000
31
32/* SYSC */
33#define SYSCIER 0x0c
34#define SYSCIMR 0x10
35
36#if defined(CONFIG_SMP)
37
38static void __init rcar_gen2_sysc_init(u32 syscier)
39{
40 void __iomem *base = rcar_sysc_init(0xe6180000);
41
42 /* enable all interrupt sources, but do not use interrupt handler */
43 iowrite32(syscier, base + SYSCIER);
44 iowrite32(0, base + SYSCIMR);
45}
46
47#else /* CONFIG_SMP */
48
49static inline void rcar_gen2_sysc_init(u32 syscier) {}
50
51#endif /* CONFIG_SMP */
52
53void __init rcar_gen2_pm_init(void)
54{
55 void __iomem *p;
56 u32 bar;
57 static int once;
58 struct device_node *np, *cpus;
59 bool has_a7 = false;
60 bool has_a15 = false;
61 phys_addr_t boot_vector_addr = 0;
62 u32 syscier = 0;
63
64 if (once++)
65 return;
66
67 cpus = of_find_node_by_path("/cpus");
68 if (!cpus)
69 return;
70
71 for_each_child_of_node(cpus, np) {
72 if (of_device_is_compatible(np, "arm,cortex-a15"))
73 has_a15 = true;
74 else if (of_device_is_compatible(np, "arm,cortex-a7"))
75 has_a7 = true;
76 }
77
78 if (of_machine_is_compatible("renesas,r8a7790")) {
79 boot_vector_addr = MERAM;
80 syscier = 0x013111ef;
81
82 } else if (of_machine_is_compatible("renesas,r8a7791")) {
83 boot_vector_addr = RAM;
84 syscier = 0x00111003;
85 }
86
87 /* RAM for jump stub, because BAR requires 256KB aligned address */
88 p = ioremap_nocache(boot_vector_addr, shmobile_boot_size);
89 memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
90 iounmap(p);
91
92 /* setup reset vectors */
93 p = ioremap_nocache(RST, 0x63);
94 bar = (boot_vector_addr >> 8) & 0xfffffc00;
95 if (has_a15) {
96 writel_relaxed(bar, p + CA15BAR);
97 writel_relaxed(bar | 0x10, p + CA15BAR);
98
99 /* de-assert reset for CA15 CPUs */
100 writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) |
101 0xa5a50000, p + CA15RESCNT);
102 }
103 if (has_a7) {
104 writel_relaxed(bar, p + CA7BAR);
105 writel_relaxed(bar | 0x10, p + CA7BAR);
106
107 /* de-assert reset for CA7 CPUs */
108 writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) |
109 0x5a5a0000, p + CA7RESCNT);
110 }
111 iounmap(p);
112
113 rcar_gen2_sysc_init(syscier);
114 shmobile_smp_apmu_suspend_init();
115}
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
deleted file mode 100644
index c0293ae4b013..000000000000
--- a/arch/arm/mach-shmobile/pm-sh7372.c
+++ /dev/null
@@ -1,549 +0,0 @@
1/*
2 * sh7372 Power management support
3 *
4 * Copyright (C) 2011 Magnus Damm
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#include <linux/pm.h>
12#include <linux/suspend.h>
13#include <linux/cpuidle.h>
14#include <linux/module.h>
15#include <linux/list.h>
16#include <linux/err.h>
17#include <linux/slab.h>
18#include <linux/pm_clock.h>
19#include <linux/platform_device.h>
20#include <linux/delay.h>
21#include <linux/irq.h>
22#include <linux/bitrev.h>
23#include <linux/console.h>
24
25#include <asm/cpuidle.h>
26#include <asm/io.h>
27#include <asm/tlbflush.h>
28#include <asm/suspend.h>
29
30#include "common.h"
31#include "pm-rmobile.h"
32#include "sh7372.h"
33
34/* DBG */
35#define DBGREG1 IOMEM(0xe6100020)
36#define DBGREG9 IOMEM(0xe6100040)
37
38/* CPGA */
39#define SYSTBCR IOMEM(0xe6150024)
40#define MSTPSR0 IOMEM(0xe6150030)
41#define MSTPSR1 IOMEM(0xe6150038)
42#define MSTPSR2 IOMEM(0xe6150040)
43#define MSTPSR3 IOMEM(0xe6150048)
44#define MSTPSR4 IOMEM(0xe615004c)
45#define PLLC01STPCR IOMEM(0xe61500c8)
46
47/* SYSC */
48#define SYSC_BASE IOMEM(0xe6180000)
49
50#define SBAR IOMEM(0xe6180020)
51#define WUPRMSK IOMEM(0xe6180028)
52#define WUPSMSK IOMEM(0xe618002c)
53#define WUPSMSK2 IOMEM(0xe6180048)
54#define WUPSFAC IOMEM(0xe6180098)
55#define IRQCR IOMEM(0xe618022c)
56#define IRQCR2 IOMEM(0xe6180238)
57#define IRQCR3 IOMEM(0xe6180244)
58#define IRQCR4 IOMEM(0xe6180248)
59#define PDNSEL IOMEM(0xe6180254)
60
61/* INTC */
62#define ICR1A IOMEM(0xe6900000)
63#define ICR2A IOMEM(0xe6900004)
64#define ICR3A IOMEM(0xe6900008)
65#define ICR4A IOMEM(0xe690000c)
66#define INTMSK00A IOMEM(0xe6900040)
67#define INTMSK10A IOMEM(0xe6900044)
68#define INTMSK20A IOMEM(0xe6900048)
69#define INTMSK30A IOMEM(0xe690004c)
70
71/* MFIS */
72/* FIXME: pointing where? */
73#define SMFRAM 0xe6a70000
74
75/* AP-System Core */
76#define APARMBAREA IOMEM(0xe6f10020)
77
78#ifdef CONFIG_PM
79
80#define PM_DOMAIN_ON_OFF_LATENCY_NS 250000
81
82static int sh7372_a4r_pd_suspend(void)
83{
84 sh7372_intcs_suspend();
85 __raw_writel(0x300fffff, WUPRMSK); /* avoid wakeup */
86 return 0;
87}
88
89static bool a4s_suspend_ready;
90
91static int sh7372_a4s_pd_suspend(void)
92{
93 /*
94 * The A4S domain contains the CPU core and therefore it should
95 * only be turned off if the CPU is not in use. This may happen
96 * during system suspend, when SYSC is going to be used for generating
97 * resume signals and a4s_suspend_ready is set to let
98 * sh7372_enter_suspend() know that it can turn A4S off.
99 */
100 a4s_suspend_ready = true;
101 return -EBUSY;
102}
103
104static void sh7372_a4s_pd_resume(void)
105{
106 a4s_suspend_ready = false;
107}
108
109static int sh7372_a3sp_pd_suspend(void)
110{
111 /*
112 * Serial consoles make use of SCIF hardware located in A3SP,
113 * keep such power domain on if "no_console_suspend" is set.
114 */
115 return console_suspend_enabled ? 0 : -EBUSY;
116}
117
118static struct rmobile_pm_domain sh7372_pm_domains[] = {
119 {
120 .genpd.name = "A4LC",
121 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
122 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
123 .base = SYSC_BASE,
124 .bit_shift = 1,
125 },
126 {
127 .genpd.name = "A4MP",
128 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
129 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
130 .base = SYSC_BASE,
131 .bit_shift = 2,
132 },
133 {
134 .genpd.name = "D4",
135 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
136 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
137 .base = SYSC_BASE,
138 .bit_shift = 3,
139 },
140 {
141 .genpd.name = "A4R",
142 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
143 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
144 .base = SYSC_BASE,
145 .bit_shift = 5,
146 .suspend = sh7372_a4r_pd_suspend,
147 .resume = sh7372_intcs_resume,
148 },
149 {
150 .genpd.name = "A3RV",
151 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
152 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
153 .base = SYSC_BASE,
154 .bit_shift = 6,
155 },
156 {
157 .genpd.name = "A3RI",
158 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
159 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
160 .base = SYSC_BASE,
161 .bit_shift = 8,
162 },
163 {
164 .genpd.name = "A4S",
165 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
166 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
167 .base = SYSC_BASE,
168 .bit_shift = 10,
169 .gov = &pm_domain_always_on_gov,
170 .no_debug = true,
171 .suspend = sh7372_a4s_pd_suspend,
172 .resume = sh7372_a4s_pd_resume,
173 },
174 {
175 .genpd.name = "A3SP",
176 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
177 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
178 .base = SYSC_BASE,
179 .bit_shift = 11,
180 .gov = &pm_domain_always_on_gov,
181 .no_debug = true,
182 .suspend = sh7372_a3sp_pd_suspend,
183 },
184 {
185 .genpd.name = "A3SG",
186 .genpd.power_on_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
187 .genpd.power_off_latency_ns = PM_DOMAIN_ON_OFF_LATENCY_NS,
188 .base = SYSC_BASE,
189 .bit_shift = 13,
190 },
191};
192
193void __init sh7372_init_pm_domains(void)
194{
195 rmobile_init_domains(sh7372_pm_domains, ARRAY_SIZE(sh7372_pm_domains));
196 pm_genpd_add_subdomain_names("A4LC", "A3RV");
197 pm_genpd_add_subdomain_names("A4R", "A4LC");
198 pm_genpd_add_subdomain_names("A4S", "A3SG");
199 pm_genpd_add_subdomain_names("A4S", "A3SP");
200}
201
202#endif /* CONFIG_PM */
203
204#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
205static void sh7372_set_reset_vector(unsigned long address)
206{
207 /* set reset vector, translate 4k */
208 __raw_writel(address, SBAR);
209 __raw_writel(0, APARMBAREA);
210}
211
212static void sh7372_enter_sysc(int pllc0_on, unsigned long sleep_mode)
213{
214 if (pllc0_on)
215 __raw_writel(0, PLLC01STPCR);
216 else
217 __raw_writel(1 << 28, PLLC01STPCR);
218
219 __raw_readl(WUPSFAC); /* read wakeup int. factor before sleep */
220 cpu_suspend(sleep_mode, sh7372_do_idle_sysc);
221 __raw_readl(WUPSFAC); /* read wakeup int. factor after wakeup */
222
223 /* disable reset vector translation */
224 __raw_writel(0, SBAR);
225}
226
227static int sh7372_sysc_valid(unsigned long *mskp, unsigned long *msk2p)
228{
229 unsigned long mstpsr0, mstpsr1, mstpsr2, mstpsr3, mstpsr4;
230 unsigned long msk, msk2;
231
232 /* check active clocks to determine potential wakeup sources */
233
234 mstpsr0 = __raw_readl(MSTPSR0);
235 if ((mstpsr0 & 0x00000003) != 0x00000003) {
236 pr_debug("sh7372 mstpsr0 0x%08lx\n", mstpsr0);
237 return 0;
238 }
239
240 mstpsr1 = __raw_readl(MSTPSR1);
241 if ((mstpsr1 & 0xff079b7f) != 0xff079b7f) {
242 pr_debug("sh7372 mstpsr1 0x%08lx\n", mstpsr1);
243 return 0;
244 }
245
246 mstpsr2 = __raw_readl(MSTPSR2);
247 if ((mstpsr2 & 0x000741ff) != 0x000741ff) {
248 pr_debug("sh7372 mstpsr2 0x%08lx\n", mstpsr2);
249 return 0;
250 }
251
252 mstpsr3 = __raw_readl(MSTPSR3);
253 if ((mstpsr3 & 0x1a60f010) != 0x1a60f010) {
254 pr_debug("sh7372 mstpsr3 0x%08lx\n", mstpsr3);
255 return 0;
256 }
257
258 mstpsr4 = __raw_readl(MSTPSR4);
259 if ((mstpsr4 & 0x00008cf0) != 0x00008cf0) {
260 pr_debug("sh7372 mstpsr4 0x%08lx\n", mstpsr4);
261 return 0;
262 }
263
264 msk = 0;
265 msk2 = 0;
266
267 /* make bitmaps of limited number of wakeup sources */
268
269 if ((mstpsr2 & (1 << 23)) == 0) /* SPU2 */
270 msk |= 1 << 31;
271
272 if ((mstpsr2 & (1 << 12)) == 0) /* MFI_MFIM */
273 msk |= 1 << 21;
274
275 if ((mstpsr4 & (1 << 3)) == 0) /* KEYSC */
276 msk |= 1 << 2;
277
278 if ((mstpsr1 & (1 << 24)) == 0) /* CMT0 */
279 msk |= 1 << 1;
280
281 if ((mstpsr3 & (1 << 29)) == 0) /* CMT1 */
282 msk |= 1 << 1;
283
284 if ((mstpsr4 & (1 << 0)) == 0) /* CMT2 */
285 msk |= 1 << 1;
286
287 if ((mstpsr2 & (1 << 13)) == 0) /* MFI_MFIS */
288 msk2 |= 1 << 17;
289
290 *mskp = msk;
291 *msk2p = msk2;
292
293 return 1;
294}
295
296static void sh7372_icr_to_irqcr(unsigned long icr, u16 *irqcr1p, u16 *irqcr2p)
297{
298 u16 tmp, irqcr1, irqcr2;
299 int k;
300
301 irqcr1 = 0;
302 irqcr2 = 0;
303
304 /* convert INTCA ICR register layout to SYSC IRQCR+IRQCR2 */
305 for (k = 0; k <= 7; k++) {
306 tmp = (icr >> ((7 - k) * 4)) & 0xf;
307 irqcr1 |= (tmp & 0x03) << (k * 2);
308 irqcr2 |= (tmp >> 2) << (k * 2);
309 }
310
311 *irqcr1p = irqcr1;
312 *irqcr2p = irqcr2;
313}
314
315static void sh7372_setup_sysc(unsigned long msk, unsigned long msk2)
316{
317 u16 irqcrx_low, irqcrx_high, irqcry_low, irqcry_high;
318 unsigned long tmp;
319
320 /* read IRQ0A -> IRQ15A mask */
321 tmp = bitrev8(__raw_readb(INTMSK00A));
322 tmp |= bitrev8(__raw_readb(INTMSK10A)) << 8;
323
324 /* setup WUPSMSK from clocks and external IRQ mask */
325 msk = (~msk & 0xc030000f) | (tmp << 4);
326 __raw_writel(msk, WUPSMSK);
327
328 /* propage level/edge trigger for external IRQ 0->15 */
329 sh7372_icr_to_irqcr(__raw_readl(ICR1A), &irqcrx_low, &irqcry_low);
330 sh7372_icr_to_irqcr(__raw_readl(ICR2A), &irqcrx_high, &irqcry_high);
331 __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR);
332 __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR2);
333
334 /* read IRQ16A -> IRQ31A mask */
335 tmp = bitrev8(__raw_readb(INTMSK20A));
336 tmp |= bitrev8(__raw_readb(INTMSK30A)) << 8;
337
338 /* setup WUPSMSK2 from clocks and external IRQ mask */
339 msk2 = (~msk2 & 0x00030000) | tmp;
340 __raw_writel(msk2, WUPSMSK2);
341
342 /* propage level/edge trigger for external IRQ 16->31 */
343 sh7372_icr_to_irqcr(__raw_readl(ICR3A), &irqcrx_low, &irqcry_low);
344 sh7372_icr_to_irqcr(__raw_readl(ICR4A), &irqcrx_high, &irqcry_high);
345 __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR3);
346 __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR4);
347}
348
349static void sh7372_enter_a3sm_common(int pllc0_on)
350{
351 /* use INTCA together with SYSC for wakeup */
352 sh7372_setup_sysc(1 << 0, 0);
353 sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc));
354 sh7372_enter_sysc(pllc0_on, 1 << 12);
355}
356
357static void sh7372_enter_a4s_common(int pllc0_on)
358{
359 sh7372_intca_suspend();
360 sh7372_set_reset_vector(SMFRAM);
361 sh7372_enter_sysc(pllc0_on, 1 << 10);
362 sh7372_intca_resume();
363}
364
365static void sh7372_pm_setup_smfram(void)
366{
367 /* pass physical address of cpu_resume() to assembly resume code */
368 sh7372_cpu_resume = virt_to_phys(cpu_resume);
369
370 memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
371}
372#else
373static inline void sh7372_pm_setup_smfram(void) {}
374#endif /* CONFIG_SUSPEND || CONFIG_CPU_IDLE */
375
376#ifdef CONFIG_CPU_IDLE
377static int sh7372_do_idle_core_standby(unsigned long unused)
378{
379 cpu_do_idle(); /* WFI when SYSTBCR == 0x10 -> Core Standby */
380 return 0;
381}
382
383static int sh7372_enter_core_standby(struct cpuidle_device *dev,
384 struct cpuidle_driver *drv, int index)
385{
386 sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc));
387
388 /* enter sleep mode with SYSTBCR to 0x10 */
389 __raw_writel(0x10, SYSTBCR);
390 cpu_suspend(0, sh7372_do_idle_core_standby);
391 __raw_writel(0, SYSTBCR);
392
393 /* disable reset vector translation */
394 __raw_writel(0, SBAR);
395
396 return 1;
397}
398
399static int sh7372_enter_a3sm_pll_on(struct cpuidle_device *dev,
400 struct cpuidle_driver *drv, int index)
401{
402 sh7372_enter_a3sm_common(1);
403 return 2;
404}
405
406static int sh7372_enter_a3sm_pll_off(struct cpuidle_device *dev,
407 struct cpuidle_driver *drv, int index)
408{
409 sh7372_enter_a3sm_common(0);
410 return 3;
411}
412
413static int sh7372_enter_a4s(struct cpuidle_device *dev,
414 struct cpuidle_driver *drv, int index)
415{
416 unsigned long msk, msk2;
417
418 if (!sh7372_sysc_valid(&msk, &msk2))
419 return sh7372_enter_a3sm_pll_off(dev, drv, index);
420
421 sh7372_setup_sysc(msk, msk2);
422 sh7372_enter_a4s_common(0);
423 return 4;
424}
425
426static struct cpuidle_driver sh7372_cpuidle_driver = {
427 .name = "sh7372_cpuidle",
428 .owner = THIS_MODULE,
429 .state_count = 5,
430 .safe_state_index = 0, /* C1 */
431 .states[0] = ARM_CPUIDLE_WFI_STATE,
432 .states[1] = {
433 .name = "C2",
434 .desc = "Core Standby Mode",
435 .exit_latency = 10,
436 .target_residency = 20 + 10,
437 .enter = sh7372_enter_core_standby,
438 },
439 .states[2] = {
440 .name = "C3",
441 .desc = "A3SM PLL ON",
442 .exit_latency = 20,
443 .target_residency = 30 + 20,
444 .enter = sh7372_enter_a3sm_pll_on,
445 },
446 .states[3] = {
447 .name = "C4",
448 .desc = "A3SM PLL OFF",
449 .exit_latency = 120,
450 .target_residency = 30 + 120,
451 .enter = sh7372_enter_a3sm_pll_off,
452 },
453 .states[4] = {
454 .name = "C5",
455 .desc = "A4S PLL OFF",
456 .exit_latency = 240,
457 .target_residency = 30 + 240,
458 .enter = sh7372_enter_a4s,
459 .disabled = true,
460 },
461};
462
463static void __init sh7372_cpuidle_init(void)
464{
465 shmobile_cpuidle_set_driver(&sh7372_cpuidle_driver);
466}
467#else
468static void __init sh7372_cpuidle_init(void) {}
469#endif
470
471#ifdef CONFIG_SUSPEND
472static int sh7372_enter_suspend(suspend_state_t suspend_state)
473{
474 unsigned long msk, msk2;
475
476 /* check active clocks to determine potential wakeup sources */
477 if (sh7372_sysc_valid(&msk, &msk2) && a4s_suspend_ready) {
478 /* convert INTC mask/sense to SYSC mask/sense */
479 sh7372_setup_sysc(msk, msk2);
480
481 /* enter A4S sleep with PLLC0 off */
482 pr_debug("entering A4S\n");
483 sh7372_enter_a4s_common(0);
484 return 0;
485 }
486
487 /* default to enter A3SM sleep with PLLC0 off */
488 pr_debug("entering A3SM\n");
489 sh7372_enter_a3sm_common(0);
490 return 0;
491}
492
493/**
494 * sh7372_pm_notifier_fn - SH7372 PM notifier routine.
495 * @notifier: Unused.
496 * @pm_event: Event being handled.
497 * @unused: Unused.
498 */
499static int sh7372_pm_notifier_fn(struct notifier_block *notifier,
500 unsigned long pm_event, void *unused)
501{
502 switch (pm_event) {
503 case PM_SUSPEND_PREPARE:
504 /*
505 * This is necessary, because the A4R domain has to be "on"
506 * when suspend_device_irqs() and resume_device_irqs() are
507 * executed during system suspend and resume, respectively, so
508 * that those functions don't crash while accessing the INTCS.
509 */
510 pm_genpd_name_poweron("A4R");
511 break;
512 case PM_POST_SUSPEND:
513 pm_genpd_poweroff_unused();
514 break;
515 }
516
517 return NOTIFY_DONE;
518}
519
520static void sh7372_suspend_init(void)
521{
522 shmobile_suspend_ops.enter = sh7372_enter_suspend;
523 pm_notifier(sh7372_pm_notifier_fn, 0);
524}
525#else
526static void sh7372_suspend_init(void) {}
527#endif
528
529void __init sh7372_pm_init(void)
530{
531 /* enable DBG hardware block to kick SYSC */
532 __raw_writel(0x0000a500, DBGREG9);
533 __raw_writel(0x0000a501, DBGREG9);
534 __raw_writel(0x00000000, DBGREG1);
535
536 /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */
537 __raw_writel(0, PDNSEL);
538
539 sh7372_pm_setup_smfram();
540
541 sh7372_suspend_init();
542 sh7372_cpuidle_init();
543}
544
545void __init sh7372_pm_init_late(void)
546{
547 shmobile_init_late();
548 pm_genpd_name_attach_cpuidle("A4S", 4);
549}
diff --git a/arch/arm/mach-shmobile/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h
deleted file mode 100644
index 70dcd847a86e..000000000000
--- a/arch/arm/mach-shmobile/r8a73a4.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef __ASM_R8A73A4_H__
2#define __ASM_R8A73A4_H__
3
4/* DMA slave IDs */
5enum {
6 SHDMA_SLAVE_INVALID,
7 SHDMA_SLAVE_MMCIF0_TX,
8 SHDMA_SLAVE_MMCIF0_RX,
9 SHDMA_SLAVE_MMCIF1_TX,
10 SHDMA_SLAVE_MMCIF1_RX,
11};
12
13void r8a73a4_add_standard_devices(void);
14void r8a73a4_clock_init(void);
15void r8a73a4_pinmux_init(void);
16
17#endif /* __ASM_R8A73A4_H__ */
diff --git a/arch/arm/mach-shmobile/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h
index bf73a850aaed..1a46d026052c 100644
--- a/arch/arm/mach-shmobile/r8a7790.h
+++ b/arch/arm/mach-shmobile/r8a7790.h
@@ -1,7 +1,6 @@
1#ifndef __ASM_R8A7790_H__ 1#ifndef __ASM_R8A7790_H__
2#define __ASM_R8A7790_H__ 2#define __ASM_R8A7790_H__
3 3
4void r8a7790_pm_init(void);
5extern struct smp_operations r8a7790_smp_ops; 4extern struct smp_operations r8a7790_smp_ops;
6 5
7#endif /* __ASM_R8A7790_H__ */ 6#endif /* __ASM_R8A7790_H__ */
diff --git a/arch/arm/mach-shmobile/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
index 6cf11eb69d10..7ca0b7d0f59b 100644
--- a/arch/arm/mach-shmobile/r8a7791.h
+++ b/arch/arm/mach-shmobile/r8a7791.h
@@ -1,7 +1,6 @@
1#ifndef __ASM_R8A7791_H__ 1#ifndef __ASM_R8A7791_H__
2#define __ASM_R8A7791_H__ 2#define __ASM_R8A7791_H__
3 3
4void r8a7791_pm_init(void);
5extern struct smp_operations r8a7791_smp_ops; 4extern struct smp_operations r8a7791_smp_ops;
6 5
7#endif /* __ASM_R8A7791_H__ */ 6#endif /* __ASM_R8A7791_H__ */
diff --git a/arch/arm/mach-shmobile/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h
index ce53cb5f53a1..8a66b4aae035 100644
--- a/arch/arm/mach-shmobile/rcar-gen2.h
+++ b/arch/arm/mach-shmobile/rcar-gen2.h
@@ -5,5 +5,6 @@ void rcar_gen2_timer_init(void);
5#define MD(nr) BIT(nr) 5#define MD(nr) BIT(nr)
6u32 rcar_gen2_read_mode_pins(void); 6u32 rcar_gen2_read_mode_pins(void);
7void rcar_gen2_reserve(void); 7void rcar_gen2_reserve(void);
8void rcar_gen2_pm_init(void);
8 9
9#endif /* __ASM_RCAR_GEN2_H__ */ 10#endif /* __ASM_RCAR_GEN2_H__ */
diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
new file mode 100644
index 000000000000..384e6e934b87
--- /dev/null
+++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
@@ -0,0 +1,147 @@
1/*
2 * R-Car Generation 2 da9063/da9210 regulator quirk
3 *
4 * The r8a7790/lager and r8a7791/koelsch development boards have da9063 and
5 * da9210 regulators. Both regulators have their interrupt request lines tied
6 * to the same interrupt pin (IRQ2) on the SoC.
7 *
8 * After cold boot or da9063-induced restart, both the da9063 and da9210 seem
9 * to assert their interrupt request lines. Hence as soon as one driver
10 * requests this irq, it gets stuck in an interrupt storm, as it only manages
11 * to deassert its own interrupt request line, and the other driver hasn't
12 * installed an interrupt handler yet.
13 *
14 * To handle this, install a quirk that masks the interrupts in both the
15 * da9063 and da9210. This quirk has to run after the i2c master driver has
16 * been initialized, but before the i2c slave drivers are initialized.
17 *
18 * Copyright (C) 2015 Glider bvba
19 *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; version 2 of the License.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 */
29
30#include <linux/device.h>
31#include <linux/i2c.h>
32#include <linux/init.h>
33#include <linux/io.h>
34#include <linux/notifier.h>
35#include <linux/of.h>
36#include <linux/mfd/da9063/registers.h>
37
38
39#define IRQC_BASE 0xe61c0000
40#define IRQC_MONITOR 0x104 /* IRQn Signal Level Monitor Register */
41
42#define REGULATOR_IRQ_MASK BIT(2) /* IRQ2, active low */
43
44static void __iomem *irqc;
45
46static const u8 da9063_mask_regs[] = {
47 DA9063_REG_IRQ_MASK_A,
48 DA9063_REG_IRQ_MASK_B,
49 DA9063_REG_IRQ_MASK_C,
50 DA9063_REG_IRQ_MASK_D,
51};
52
53/* DA9210 System Control and Event Registers */
54#define DA9210_REG_MASK_A 0x54
55#define DA9210_REG_MASK_B 0x55
56
57static const u8 da9210_mask_regs[] = {
58 DA9210_REG_MASK_A,
59 DA9210_REG_MASK_B,
60};
61
62static void da9xxx_mask_irqs(struct i2c_client *client, const u8 regs[],
63 unsigned int nregs)
64{
65 unsigned int i;
66
67 dev_info(&client->dev, "Masking %s interrupt sources\n", client->name);
68
69 for (i = 0; i < nregs; i++) {
70 int error = i2c_smbus_write_byte_data(client, regs[i], ~0);
71 if (error) {
72 dev_err(&client->dev, "i2c error %d\n", error);
73 return;
74 }
75 }
76}
77
78static int regulator_quirk_notify(struct notifier_block *nb,
79 unsigned long action, void *data)
80{
81 struct device *dev = data;
82 struct i2c_client *client;
83 u32 mon;
84
85 mon = ioread32(irqc + IRQC_MONITOR);
86 dev_dbg(dev, "%s: %ld, IRQC_MONITOR = 0x%x\n", __func__, action, mon);
87 if (mon & REGULATOR_IRQ_MASK)
88 goto remove;
89
90 if (action != BUS_NOTIFY_ADD_DEVICE || dev->type == &i2c_adapter_type)
91 return 0;
92
93 client = to_i2c_client(dev);
94 dev_dbg(dev, "Detected %s\n", client->name);
95
96 if ((client->addr == 0x58 && !strcmp(client->name, "da9063")))
97 da9xxx_mask_irqs(client, da9063_mask_regs,
98 ARRAY_SIZE(da9063_mask_regs));
99 else if (client->addr == 0x68 && !strcmp(client->name, "da9210"))
100 da9xxx_mask_irqs(client, da9210_mask_regs,
101 ARRAY_SIZE(da9210_mask_regs));
102
103 mon = ioread32(irqc + IRQC_MONITOR);
104 if (mon & REGULATOR_IRQ_MASK)
105 goto remove;
106
107 return 0;
108
109remove:
110 dev_info(dev, "IRQ2 is not asserted, removing quirk\n");
111
112 bus_unregister_notifier(&i2c_bus_type, nb);
113 iounmap(irqc);
114 return 0;
115}
116
117static struct notifier_block regulator_quirk_nb = {
118 .notifier_call = regulator_quirk_notify
119};
120
121static int __init rcar_gen2_regulator_quirk(void)
122{
123 u32 mon;
124
125 if (!of_machine_is_compatible("renesas,koelsch") &&
126 !of_machine_is_compatible("renesas,lager"))
127 return -ENODEV;
128
129 irqc = ioremap(IRQC_BASE, PAGE_SIZE);
130 if (!irqc)
131 return -ENOMEM;
132
133 mon = ioread32(irqc + IRQC_MONITOR);
134 if (mon & REGULATOR_IRQ_MASK) {
135 pr_debug("%s: IRQ2 is not asserted, not installing quirk\n",
136 __func__);
137 iounmap(irqc);
138 return 0;
139 }
140
141 pr_info("IRQ2 is asserted, installing da9063/da9210 regulator quirk\n");
142
143 bus_register_notifier(&i2c_bus_type, &regulator_quirk_nb);
144 return 0;
145}
146
147arch_initcall(rcar_gen2_regulator_quirk);
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
index c27682291cbf..446cee611902 100644
--- a/arch/arm/mach-shmobile/setup-r8a73a4.c
+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
@@ -13,280 +13,12 @@
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 */ 15 */
16#include <linux/irq.h> 16
17#include <linux/kernel.h> 17#include <linux/init.h>
18#include <linux/of_platform.h>
19#include <linux/platform_data/irq-renesas-irqc.h>
20#include <linux/serial_sci.h>
21#include <linux/sh_dma.h>
22#include <linux/sh_timer.h>
23 18
24#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
25 20
26#include "common.h" 21#include "common.h"
27#include "dma-register.h"
28#include "irqs.h"
29#include "r8a73a4.h"
30
31static const struct resource pfc_resources[] = {
32 DEFINE_RES_MEM(0xe6050000, 0x9000),
33};
34
35void __init r8a73a4_pinmux_init(void)
36{
37 platform_device_register_simple("pfc-r8a73a4", -1, pfc_resources,
38 ARRAY_SIZE(pfc_resources));
39}
40
41#define R8A73A4_SCIF(scif_type, _scscr, index, baseaddr, irq) \
42static struct plat_sci_port scif##index##_platform_data = { \
43 .type = scif_type, \
44 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
45 .scscr = _scscr, \
46}; \
47 \
48static struct resource scif##index##_resources[] = { \
49 DEFINE_RES_MEM(baseaddr, 0x100), \
50 DEFINE_RES_IRQ(irq), \
51}
52
53#define R8A73A4_SCIFA(index, baseaddr, irq) \
54 R8A73A4_SCIF(PORT_SCIFA, SCSCR_RE | SCSCR_TE | SCSCR_CKE0, \
55 index, baseaddr, irq)
56
57#define R8A73A4_SCIFB(index, baseaddr, irq) \
58 R8A73A4_SCIF(PORT_SCIFB, SCSCR_RE | SCSCR_TE, \
59 index, baseaddr, irq)
60
61R8A73A4_SCIFA(0, 0xe6c40000, gic_spi(144)); /* SCIFA0 */
62R8A73A4_SCIFA(1, 0xe6c50000, gic_spi(145)); /* SCIFA1 */
63R8A73A4_SCIFB(2, 0xe6c20000, gic_spi(148)); /* SCIFB0 */
64R8A73A4_SCIFB(3, 0xe6c30000, gic_spi(149)); /* SCIFB1 */
65R8A73A4_SCIFB(4, 0xe6ce0000, gic_spi(150)); /* SCIFB2 */
66R8A73A4_SCIFB(5, 0xe6cf0000, gic_spi(151)); /* SCIFB3 */
67
68#define r8a73a4_register_scif(index) \
69 platform_device_register_resndata(NULL, "sh-sci", index, \
70 scif##index##_resources, \
71 ARRAY_SIZE(scif##index##_resources), \
72 &scif##index##_platform_data, \
73 sizeof(scif##index##_platform_data))
74
75static const struct renesas_irqc_config irqc0_data = {
76 .irq_base = irq_pin(0), /* IRQ0 -> IRQ31 */
77};
78
79static const struct resource irqc0_resources[] = {
80 DEFINE_RES_MEM(0xe61c0000, 0x200), /* IRQC Event Detector Block_0 */
81 DEFINE_RES_IRQ(gic_spi(0)), /* IRQ0 */
82 DEFINE_RES_IRQ(gic_spi(1)), /* IRQ1 */
83 DEFINE_RES_IRQ(gic_spi(2)), /* IRQ2 */
84 DEFINE_RES_IRQ(gic_spi(3)), /* IRQ3 */
85 DEFINE_RES_IRQ(gic_spi(4)), /* IRQ4 */
86 DEFINE_RES_IRQ(gic_spi(5)), /* IRQ5 */
87 DEFINE_RES_IRQ(gic_spi(6)), /* IRQ6 */
88 DEFINE_RES_IRQ(gic_spi(7)), /* IRQ7 */
89 DEFINE_RES_IRQ(gic_spi(8)), /* IRQ8 */
90 DEFINE_RES_IRQ(gic_spi(9)), /* IRQ9 */
91 DEFINE_RES_IRQ(gic_spi(10)), /* IRQ10 */
92 DEFINE_RES_IRQ(gic_spi(11)), /* IRQ11 */
93 DEFINE_RES_IRQ(gic_spi(12)), /* IRQ12 */
94 DEFINE_RES_IRQ(gic_spi(13)), /* IRQ13 */
95 DEFINE_RES_IRQ(gic_spi(14)), /* IRQ14 */
96 DEFINE_RES_IRQ(gic_spi(15)), /* IRQ15 */
97 DEFINE_RES_IRQ(gic_spi(16)), /* IRQ16 */
98 DEFINE_RES_IRQ(gic_spi(17)), /* IRQ17 */
99 DEFINE_RES_IRQ(gic_spi(18)), /* IRQ18 */
100 DEFINE_RES_IRQ(gic_spi(19)), /* IRQ19 */
101 DEFINE_RES_IRQ(gic_spi(20)), /* IRQ20 */
102 DEFINE_RES_IRQ(gic_spi(21)), /* IRQ21 */
103 DEFINE_RES_IRQ(gic_spi(22)), /* IRQ22 */
104 DEFINE_RES_IRQ(gic_spi(23)), /* IRQ23 */
105 DEFINE_RES_IRQ(gic_spi(24)), /* IRQ24 */
106 DEFINE_RES_IRQ(gic_spi(25)), /* IRQ25 */
107 DEFINE_RES_IRQ(gic_spi(26)), /* IRQ26 */
108 DEFINE_RES_IRQ(gic_spi(27)), /* IRQ27 */
109 DEFINE_RES_IRQ(gic_spi(28)), /* IRQ28 */
110 DEFINE_RES_IRQ(gic_spi(29)), /* IRQ29 */
111 DEFINE_RES_IRQ(gic_spi(30)), /* IRQ30 */
112 DEFINE_RES_IRQ(gic_spi(31)), /* IRQ31 */
113};
114
115static const struct renesas_irqc_config irqc1_data = {
116 .irq_base = irq_pin(32), /* IRQ32 -> IRQ57 */
117};
118
119static const struct resource irqc1_resources[] = {
120 DEFINE_RES_MEM(0xe61c0200, 0x200), /* IRQC Event Detector Block_1 */
121 DEFINE_RES_IRQ(gic_spi(32)), /* IRQ32 */
122 DEFINE_RES_IRQ(gic_spi(33)), /* IRQ33 */
123 DEFINE_RES_IRQ(gic_spi(34)), /* IRQ34 */
124 DEFINE_RES_IRQ(gic_spi(35)), /* IRQ35 */
125 DEFINE_RES_IRQ(gic_spi(36)), /* IRQ36 */
126 DEFINE_RES_IRQ(gic_spi(37)), /* IRQ37 */
127 DEFINE_RES_IRQ(gic_spi(38)), /* IRQ38 */
128 DEFINE_RES_IRQ(gic_spi(39)), /* IRQ39 */
129 DEFINE_RES_IRQ(gic_spi(40)), /* IRQ40 */
130 DEFINE_RES_IRQ(gic_spi(41)), /* IRQ41 */
131 DEFINE_RES_IRQ(gic_spi(42)), /* IRQ42 */
132 DEFINE_RES_IRQ(gic_spi(43)), /* IRQ43 */
133 DEFINE_RES_IRQ(gic_spi(44)), /* IRQ44 */
134 DEFINE_RES_IRQ(gic_spi(45)), /* IRQ45 */
135 DEFINE_RES_IRQ(gic_spi(46)), /* IRQ46 */
136 DEFINE_RES_IRQ(gic_spi(47)), /* IRQ47 */
137 DEFINE_RES_IRQ(gic_spi(48)), /* IRQ48 */
138 DEFINE_RES_IRQ(gic_spi(49)), /* IRQ49 */
139 DEFINE_RES_IRQ(gic_spi(50)), /* IRQ50 */
140 DEFINE_RES_IRQ(gic_spi(51)), /* IRQ51 */
141 DEFINE_RES_IRQ(gic_spi(52)), /* IRQ52 */
142 DEFINE_RES_IRQ(gic_spi(53)), /* IRQ53 */
143 DEFINE_RES_IRQ(gic_spi(54)), /* IRQ54 */
144 DEFINE_RES_IRQ(gic_spi(55)), /* IRQ55 */
145 DEFINE_RES_IRQ(gic_spi(56)), /* IRQ56 */
146 DEFINE_RES_IRQ(gic_spi(57)), /* IRQ57 */
147};
148
149#define r8a73a4_register_irqc(idx) \
150 platform_device_register_resndata(NULL, "renesas_irqc", \
151 idx, irqc##idx##_resources, \
152 ARRAY_SIZE(irqc##idx##_resources), \
153 &irqc##idx##_data, \
154 sizeof(struct renesas_irqc_config))
155
156/* Thermal0 -> Thermal2 */
157static const struct resource thermal0_resources[] = {
158 DEFINE_RES_MEM(0xe61f0000, 0x14),
159 DEFINE_RES_MEM(0xe61f0100, 0x38),
160 DEFINE_RES_MEM(0xe61f0200, 0x38),
161 DEFINE_RES_MEM(0xe61f0300, 0x38),
162 DEFINE_RES_IRQ(gic_spi(69)),
163};
164
165#define r8a73a4_register_thermal() \
166 platform_device_register_simple("rcar_thermal", -1, \
167 thermal0_resources, \
168 ARRAY_SIZE(thermal0_resources))
169
170static struct sh_timer_config cmt1_platform_data = {
171 .channels_mask = 0xff,
172};
173
174static struct resource cmt1_resources[] = {
175 DEFINE_RES_MEM(0xe6130000, 0x1004),
176 DEFINE_RES_IRQ(gic_spi(120)),
177};
178
179#define r8a73a4_register_cmt(idx) \
180 platform_device_register_resndata(NULL, "sh-cmt-48-gen2", \
181 idx, cmt##idx##_resources, \
182 ARRAY_SIZE(cmt##idx##_resources), \
183 &cmt##idx##_platform_data, \
184 sizeof(struct sh_timer_config))
185
186/* DMA */
187static const struct sh_dmae_slave_config dma_slaves[] = {
188 {
189 .slave_id = SHDMA_SLAVE_MMCIF0_TX,
190 .addr = 0xee200034,
191 .chcr = CHCR_TX(XMIT_SZ_32BIT),
192 .mid_rid = 0xd1,
193 }, {
194 .slave_id = SHDMA_SLAVE_MMCIF0_RX,
195 .addr = 0xee200034,
196 .chcr = CHCR_RX(XMIT_SZ_32BIT),
197 .mid_rid = 0xd2,
198 }, {
199 .slave_id = SHDMA_SLAVE_MMCIF1_TX,
200 .addr = 0xee220034,
201 .chcr = CHCR_TX(XMIT_SZ_32BIT),
202 .mid_rid = 0xe1,
203 }, {
204 .slave_id = SHDMA_SLAVE_MMCIF1_RX,
205 .addr = 0xee220034,
206 .chcr = CHCR_RX(XMIT_SZ_32BIT),
207 .mid_rid = 0xe2,
208 },
209};
210
211#define DMAE_CHANNEL(a, b) \
212 { \
213 .offset = (a) - 0x20, \
214 .dmars = (a) - 0x20 + 0x40, \
215 .chclr_bit = (b), \
216 .chclr_offset = 0x80 - 0x20, \
217 }
218
219static const struct sh_dmae_channel dma_channels[] = {
220 DMAE_CHANNEL(0x8000, 0),
221 DMAE_CHANNEL(0x8080, 1),
222 DMAE_CHANNEL(0x8100, 2),
223 DMAE_CHANNEL(0x8180, 3),
224 DMAE_CHANNEL(0x8200, 4),
225 DMAE_CHANNEL(0x8280, 5),
226 DMAE_CHANNEL(0x8300, 6),
227 DMAE_CHANNEL(0x8380, 7),
228 DMAE_CHANNEL(0x8400, 8),
229 DMAE_CHANNEL(0x8480, 9),
230 DMAE_CHANNEL(0x8500, 10),
231 DMAE_CHANNEL(0x8580, 11),
232 DMAE_CHANNEL(0x8600, 12),
233 DMAE_CHANNEL(0x8680, 13),
234 DMAE_CHANNEL(0x8700, 14),
235 DMAE_CHANNEL(0x8780, 15),
236 DMAE_CHANNEL(0x8800, 16),
237 DMAE_CHANNEL(0x8880, 17),
238 DMAE_CHANNEL(0x8900, 18),
239 DMAE_CHANNEL(0x8980, 19),
240};
241
242static const struct sh_dmae_pdata dma_pdata = {
243 .slave = dma_slaves,
244 .slave_num = ARRAY_SIZE(dma_slaves),
245 .channel = dma_channels,
246 .channel_num = ARRAY_SIZE(dma_channels),
247 .ts_low_shift = TS_LOW_SHIFT,
248 .ts_low_mask = TS_LOW_BIT << TS_LOW_SHIFT,
249 .ts_high_shift = TS_HI_SHIFT,
250 .ts_high_mask = TS_HI_BIT << TS_HI_SHIFT,
251 .ts_shift = dma_ts_shift,
252 .ts_shift_num = ARRAY_SIZE(dma_ts_shift),
253 .dmaor_init = DMAOR_DME,
254 .chclr_present = 1,
255 .chclr_bitwise = 1,
256};
257
258static struct resource dma_resources[] = {
259 DEFINE_RES_MEM(0xe6700020, 0x89e0),
260 DEFINE_RES_IRQ(gic_spi(220)),
261 {
262 /* IRQ for channels 0-19 */
263 .start = gic_spi(200),
264 .end = gic_spi(219),
265 .flags = IORESOURCE_IRQ,
266 },
267};
268
269#define r8a73a4_register_dmac() \
270 platform_device_register_resndata(NULL, "sh-dma-engine", 0, \
271 dma_resources, ARRAY_SIZE(dma_resources), \
272 &dma_pdata, sizeof(dma_pdata))
273
274void __init r8a73a4_add_standard_devices(void)
275{
276 r8a73a4_register_cmt(1);
277 r8a73a4_register_scif(0);
278 r8a73a4_register_scif(1);
279 r8a73a4_register_scif(2);
280 r8a73a4_register_scif(3);
281 r8a73a4_register_scif(4);
282 r8a73a4_register_scif(5);
283 r8a73a4_register_irqc(0);
284 r8a73a4_register_irqc(1);
285 r8a73a4_register_thermal();
286 r8a73a4_register_dmac();
287}
288
289#ifdef CONFIG_USE_OF
290 22
291static const char *r8a73a4_boards_compat_dt[] __initdata = { 23static const char *r8a73a4_boards_compat_dt[] __initdata = {
292 "renesas,r8a73a4", 24 "renesas,r8a73a4",
@@ -298,4 +30,3 @@ DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
298 .init_late = shmobile_init_late, 30 .init_late = shmobile_init_late,
299 .dt_compat = r8a73a4_boards_compat_dt, 31 .dt_compat = r8a73a4_boards_compat_dt,
300MACHINE_END 32MACHINE_END
301#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index dd64caf79216..9832e48396a4 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -842,13 +842,6 @@ static void __init r8a7740_generic_init(void)
842 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 842 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
843} 843}
844 844
845#define RESCNT2 IOMEM(0xe6188020)
846static void r8a7740_restart(enum reboot_mode mode, const char *cmd)
847{
848 /* Do soft power on reset */
849 writel(1 << 31, RESCNT2);
850}
851
852static const char *r8a7740_boards_compat_dt[] __initdata = { 845static const char *r8a7740_boards_compat_dt[] __initdata = {
853 "renesas,r8a7740", 846 "renesas,r8a7740",
854 NULL, 847 NULL,
@@ -861,7 +854,6 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
861 .init_machine = r8a7740_generic_init, 854 .init_machine = r8a7740_generic_init,
862 .init_late = shmobile_init_late, 855 .init_late = shmobile_init_late,
863 .dt_compat = r8a7740_boards_compat_dt, 856 .dt_compat = r8a7740_boards_compat_dt,
864 .restart = r8a7740_restart,
865MACHINE_END 857MACHINE_END
866 858
867#endif /* CONFIG_USE_OF */ 859#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index cef8895a9b82..c49aa094fe17 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -15,6 +15,7 @@
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 */ 16 */
17 17
18#include <linux/clk/shmobile.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/io.h> 20#include <linux/io.h>
20#include <linux/irqchip/arm-gic.h> 21#include <linux/irqchip/arm-gic.h>
@@ -41,6 +42,21 @@
41#include "irqs.h" 42#include "irqs.h"
42#include "r8a7778.h" 43#include "r8a7778.h"
43 44
45#define MODEMR 0xffcc0020
46
47#ifdef CONFIG_COMMON_CLK
48static void __init r8a7778_timer_init(void)
49{
50 u32 mode;
51 void __iomem *modemr = ioremap_nocache(MODEMR, 4);
52
53 BUG_ON(!modemr);
54 mode = ioread32(modemr);
55 iounmap(modemr);
56 r8a7778_clocks_init(mode);
57}
58#endif
59
44/* SCIF */ 60/* SCIF */
45#define R8A7778_SCIF(index, baseaddr, irq) \ 61#define R8A7778_SCIF(index, baseaddr, irq) \
46static struct plat_sci_port scif##index##_platform_data = { \ 62static struct plat_sci_port scif##index##_platform_data = { \
@@ -608,6 +624,9 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)")
608 .init_early = shmobile_init_delay, 624 .init_early = shmobile_init_delay,
609 .init_irq = r8a7778_init_irq_dt, 625 .init_irq = r8a7778_init_irq_dt,
610 .init_late = shmobile_init_late, 626 .init_late = shmobile_init_late,
627#ifdef CONFIG_COMMON_CLK
628 .init_time = r8a7778_timer_init,
629#endif
611 .dt_compat = r8a7778_compat_dt, 630 .dt_compat = r8a7778_compat_dt,
612MACHINE_END 631MACHINE_END
613 632
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
index d1fa625e61f5..5d13595aa027 100644
--- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
@@ -21,6 +21,7 @@
21#include <linux/dma-contiguous.h> 21#include <linux/dma-contiguous.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/memblock.h>
24#include <linux/of.h> 25#include <linux/of.h>
25#include <linux/of_fdt.h> 26#include <linux/of_fdt.h>
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -50,9 +51,7 @@ u32 rcar_gen2_read_mode_pins(void)
50 51
51void __init rcar_gen2_timer_init(void) 52void __init rcar_gen2_timer_init(void)
52{ 53{
53#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK)
54 u32 mode = rcar_gen2_read_mode_pins(); 54 u32 mode = rcar_gen2_read_mode_pins();
55#endif
56#ifdef CONFIG_ARM_ARCH_TIMER 55#ifdef CONFIG_ARM_ARCH_TIMER
57 void __iomem *base; 56 void __iomem *base;
58 int extal_mhz = 0; 57 int extal_mhz = 0;
@@ -128,9 +127,7 @@ void __init rcar_gen2_timer_init(void)
128 iounmap(base); 127 iounmap(base);
129#endif /* CONFIG_ARM_ARCH_TIMER */ 128#endif /* CONFIG_ARM_ARCH_TIMER */
130 129
131#ifdef CONFIG_COMMON_CLK
132 rcar_gen2_clocks_init(mode); 130 rcar_gen2_clocks_init(mode);
133#endif
134#ifdef CONFIG_ARCH_SHMOBILE_MULTI 131#ifdef CONFIG_ARCH_SHMOBILE_MULTI
135 clocksource_of_init(); 132 clocksource_of_init();
136#endif 133#endif
@@ -199,7 +196,7 @@ void __init rcar_gen2_reserve(void)
199 196
200 of_scan_flat_dt(rcar_gen2_scan_mem, &mrc); 197 of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
201#ifdef CONFIG_DMA_CMA 198#ifdef CONFIG_DMA_CMA
202 if (mrc.size) 199 if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size))
203 dma_contiguous_reserve_area(mrc.size, mrc.base, 0, 200 dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
204 &rcar_gen2_dma_contiguous, true); 201 &rcar_gen2_dma_contiguous, true);
205#endif 202#endif
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
deleted file mode 100644
index 458a2cfad417..000000000000
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ /dev/null
@@ -1,1016 +0,0 @@
1/*
2 * sh7372 processor support
3 *
4 * Copyright (C) 2010 Magnus Damm
5 * Copyright (C) 2008 Yoshihiro Shimoda
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/interrupt.h>
19#include <linux/irq.h>
20#include <linux/platform_device.h>
21#include <linux/of_platform.h>
22#include <linux/uio_driver.h>
23#include <linux/delay.h>
24#include <linux/input.h>
25#include <linux/io.h>
26#include <linux/serial_sci.h>
27#include <linux/sh_dma.h>
28#include <linux/sh_timer.h>
29#include <linux/pm_domain.h>
30#include <linux/dma-mapping.h>
31#include <linux/platform_data/sh_ipmmu.h>
32
33#include <asm/mach/map.h>
34#include <asm/mach-types.h>
35#include <asm/mach/arch.h>
36#include <asm/mach/time.h>
37
38#include "common.h"
39#include "dma-register.h"
40#include "intc.h"
41#include "irqs.h"
42#include "pm-rmobile.h"
43#include "sh7372.h"
44
45static struct map_desc sh7372_io_desc[] __initdata = {
46 /* create a 1:1 identity mapping for 0xe6xxxxxx
47 * used by CPGA, INTC and PFC.
48 */
49 {
50 .virtual = 0xe6000000,
51 .pfn = __phys_to_pfn(0xe6000000),
52 .length = 256 << 20,
53 .type = MT_DEVICE_NONSHARED
54 },
55};
56
57void __init sh7372_map_io(void)
58{
59 debug_ll_io_init();
60 iotable_init(sh7372_io_desc, ARRAY_SIZE(sh7372_io_desc));
61}
62
63/* PFC */
64static struct resource sh7372_pfc_resources[] = {
65 [0] = {
66 .start = 0xe6050000,
67 .end = 0xe6057fff,
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = 0xe605800c,
72 .end = 0xe6058027,
73 .flags = IORESOURCE_MEM,
74 }
75};
76
77static struct platform_device sh7372_pfc_device = {
78 .name = "pfc-sh7372",
79 .id = -1,
80 .resource = sh7372_pfc_resources,
81 .num_resources = ARRAY_SIZE(sh7372_pfc_resources),
82};
83
84void __init sh7372_pinmux_init(void)
85{
86 platform_device_register(&sh7372_pfc_device);
87}
88
89/* SCIF */
90#define SH7372_SCIF(scif_type, index, baseaddr, irq) \
91static struct plat_sci_port scif##index##_platform_data = { \
92 .type = scif_type, \
93 .flags = UPF_BOOT_AUTOCONF, \
94 .scscr = SCSCR_RE | SCSCR_TE, \
95}; \
96 \
97static struct resource scif##index##_resources[] = { \
98 DEFINE_RES_MEM(baseaddr, 0x100), \
99 DEFINE_RES_IRQ(irq), \
100}; \
101 \
102static struct platform_device scif##index##_device = { \
103 .name = "sh-sci", \
104 .id = index, \
105 .resource = scif##index##_resources, \
106 .num_resources = ARRAY_SIZE(scif##index##_resources), \
107 .dev = { \
108 .platform_data = &scif##index##_platform_data, \
109 }, \
110}
111
112SH7372_SCIF(PORT_SCIFA, 0, 0xe6c40000, evt2irq(0x0c00));
113SH7372_SCIF(PORT_SCIFA, 1, 0xe6c50000, evt2irq(0x0c20));
114SH7372_SCIF(PORT_SCIFA, 2, 0xe6c60000, evt2irq(0x0c40));
115SH7372_SCIF(PORT_SCIFA, 3, 0xe6c70000, evt2irq(0x0c60));
116SH7372_SCIF(PORT_SCIFA, 4, 0xe6c80000, evt2irq(0x0d20));
117SH7372_SCIF(PORT_SCIFA, 5, 0xe6cb0000, evt2irq(0x0d40));
118SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60));
119
120/* CMT */
121static struct sh_timer_config cmt2_platform_data = {
122 .channels_mask = 0x20,
123};
124
125static struct resource cmt2_resources[] = {
126 DEFINE_RES_MEM(0xe6130000, 0x50),
127 DEFINE_RES_IRQ(evt2irq(0x0b80)),
128};
129
130static struct platform_device cmt2_device = {
131 .name = "sh-cmt-32-fast",
132 .id = 2,
133 .dev = {
134 .platform_data = &cmt2_platform_data,
135 },
136 .resource = cmt2_resources,
137 .num_resources = ARRAY_SIZE(cmt2_resources),
138};
139
140/* TMU */
141static struct sh_timer_config tmu0_platform_data = {
142 .channels_mask = 7,
143};
144
145static struct resource tmu0_resources[] = {
146 DEFINE_RES_MEM(0xfff60000, 0x2c),
147 DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
148 DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
149 DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
150};
151
152static struct platform_device tmu0_device = {
153 .name = "sh-tmu",
154 .id = 0,
155 .dev = {
156 .platform_data = &tmu0_platform_data,
157 },
158 .resource = tmu0_resources,
159 .num_resources = ARRAY_SIZE(tmu0_resources),
160};
161
162/* I2C */
163static struct resource iic0_resources[] = {
164 [0] = {
165 .name = "IIC0",
166 .start = 0xFFF20000,
167 .end = 0xFFF20425 - 1,
168 .flags = IORESOURCE_MEM,
169 },
170 [1] = {
171 .start = intcs_evt2irq(0xe00), /* IIC0_ALI0 */
172 .end = intcs_evt2irq(0xe60), /* IIC0_DTEI0 */
173 .flags = IORESOURCE_IRQ,
174 },
175};
176
177static struct platform_device iic0_device = {
178 .name = "i2c-sh_mobile",
179 .id = 0, /* "i2c0" clock */
180 .num_resources = ARRAY_SIZE(iic0_resources),
181 .resource = iic0_resources,
182};
183
184static struct resource iic1_resources[] = {
185 [0] = {
186 .name = "IIC1",
187 .start = 0xE6C20000,
188 .end = 0xE6C20425 - 1,
189 .flags = IORESOURCE_MEM,
190 },
191 [1] = {
192 .start = evt2irq(0x780), /* IIC1_ALI1 */
193 .end = evt2irq(0x7e0), /* IIC1_DTEI1 */
194 .flags = IORESOURCE_IRQ,
195 },
196};
197
198static struct platform_device iic1_device = {
199 .name = "i2c-sh_mobile",
200 .id = 1, /* "i2c1" clock */
201 .num_resources = ARRAY_SIZE(iic1_resources),
202 .resource = iic1_resources,
203};
204
205/* DMA */
206static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = {
207 {
208 .slave_id = SHDMA_SLAVE_SCIF0_TX,
209 .addr = 0xe6c40020,
210 .chcr = CHCR_TX(XMIT_SZ_8BIT),
211 .mid_rid = 0x21,
212 }, {
213 .slave_id = SHDMA_SLAVE_SCIF0_RX,
214 .addr = 0xe6c40024,
215 .chcr = CHCR_RX(XMIT_SZ_8BIT),
216 .mid_rid = 0x22,
217 }, {
218 .slave_id = SHDMA_SLAVE_SCIF1_TX,
219 .addr = 0xe6c50020,
220 .chcr = CHCR_TX(XMIT_SZ_8BIT),
221 .mid_rid = 0x25,
222 }, {
223 .slave_id = SHDMA_SLAVE_SCIF1_RX,
224 .addr = 0xe6c50024,
225 .chcr = CHCR_RX(XMIT_SZ_8BIT),
226 .mid_rid = 0x26,
227 }, {
228 .slave_id = SHDMA_SLAVE_SCIF2_TX,
229 .addr = 0xe6c60020,
230 .chcr = CHCR_TX(XMIT_SZ_8BIT),
231 .mid_rid = 0x29,
232 }, {
233 .slave_id = SHDMA_SLAVE_SCIF2_RX,
234 .addr = 0xe6c60024,
235 .chcr = CHCR_RX(XMIT_SZ_8BIT),
236 .mid_rid = 0x2a,
237 }, {
238 .slave_id = SHDMA_SLAVE_SCIF3_TX,
239 .addr = 0xe6c70020,
240 .chcr = CHCR_TX(XMIT_SZ_8BIT),
241 .mid_rid = 0x2d,
242 }, {
243 .slave_id = SHDMA_SLAVE_SCIF3_RX,
244 .addr = 0xe6c70024,
245 .chcr = CHCR_RX(XMIT_SZ_8BIT),
246 .mid_rid = 0x2e,
247 }, {
248 .slave_id = SHDMA_SLAVE_SCIF4_TX,
249 .addr = 0xe6c80020,
250 .chcr = CHCR_TX(XMIT_SZ_8BIT),
251 .mid_rid = 0x39,
252 }, {
253 .slave_id = SHDMA_SLAVE_SCIF4_RX,
254 .addr = 0xe6c80024,
255 .chcr = CHCR_RX(XMIT_SZ_8BIT),
256 .mid_rid = 0x3a,
257 }, {
258 .slave_id = SHDMA_SLAVE_SCIF5_TX,
259 .addr = 0xe6cb0020,
260 .chcr = CHCR_TX(XMIT_SZ_8BIT),
261 .mid_rid = 0x35,
262 }, {
263 .slave_id = SHDMA_SLAVE_SCIF5_RX,
264 .addr = 0xe6cb0024,
265 .chcr = CHCR_RX(XMIT_SZ_8BIT),
266 .mid_rid = 0x36,
267 }, {
268 .slave_id = SHDMA_SLAVE_SCIF6_TX,
269 .addr = 0xe6c30040,
270 .chcr = CHCR_TX(XMIT_SZ_8BIT),
271 .mid_rid = 0x3d,
272 }, {
273 .slave_id = SHDMA_SLAVE_SCIF6_RX,
274 .addr = 0xe6c30060,
275 .chcr = CHCR_RX(XMIT_SZ_8BIT),
276 .mid_rid = 0x3e,
277 }, {
278 .slave_id = SHDMA_SLAVE_FLCTL0_TX,
279 .addr = 0xe6a30050,
280 .chcr = CHCR_TX(XMIT_SZ_32BIT),
281 .mid_rid = 0x83,
282 }, {
283 .slave_id = SHDMA_SLAVE_FLCTL0_RX,
284 .addr = 0xe6a30050,
285 .chcr = CHCR_RX(XMIT_SZ_32BIT),
286 .mid_rid = 0x83,
287 }, {
288 .slave_id = SHDMA_SLAVE_FLCTL1_TX,
289 .addr = 0xe6a30060,
290 .chcr = CHCR_TX(XMIT_SZ_32BIT),
291 .mid_rid = 0x87,
292 }, {
293 .slave_id = SHDMA_SLAVE_FLCTL1_RX,
294 .addr = 0xe6a30060,
295 .chcr = CHCR_RX(XMIT_SZ_32BIT),
296 .mid_rid = 0x87,
297 }, {
298 .slave_id = SHDMA_SLAVE_SDHI0_TX,
299 .addr = 0xe6850030,
300 .chcr = CHCR_TX(XMIT_SZ_16BIT),
301 .mid_rid = 0xc1,
302 }, {
303 .slave_id = SHDMA_SLAVE_SDHI0_RX,
304 .addr = 0xe6850030,
305 .chcr = CHCR_RX(XMIT_SZ_16BIT),
306 .mid_rid = 0xc2,
307 }, {
308 .slave_id = SHDMA_SLAVE_SDHI1_TX,
309 .addr = 0xe6860030,
310 .chcr = CHCR_TX(XMIT_SZ_16BIT),
311 .mid_rid = 0xc9,
312 }, {
313 .slave_id = SHDMA_SLAVE_SDHI1_RX,
314 .addr = 0xe6860030,
315 .chcr = CHCR_RX(XMIT_SZ_16BIT),
316 .mid_rid = 0xca,
317 }, {
318 .slave_id = SHDMA_SLAVE_SDHI2_TX,
319 .addr = 0xe6870030,
320 .chcr = CHCR_TX(XMIT_SZ_16BIT),
321 .mid_rid = 0xcd,
322 }, {
323 .slave_id = SHDMA_SLAVE_SDHI2_RX,
324 .addr = 0xe6870030,
325 .chcr = CHCR_RX(XMIT_SZ_16BIT),
326 .mid_rid = 0xce,
327 }, {
328 .slave_id = SHDMA_SLAVE_FSIA_TX,
329 .addr = 0xfe1f0024,
330 .chcr = CHCR_TX(XMIT_SZ_32BIT),
331 .mid_rid = 0xb1,
332 }, {
333 .slave_id = SHDMA_SLAVE_FSIA_RX,
334 .addr = 0xfe1f0020,
335 .chcr = CHCR_RX(XMIT_SZ_32BIT),
336 .mid_rid = 0xb2,
337 }, {
338 .slave_id = SHDMA_SLAVE_MMCIF_TX,
339 .addr = 0xe6bd0034,
340 .chcr = CHCR_TX(XMIT_SZ_32BIT),
341 .mid_rid = 0xd1,
342 }, {
343 .slave_id = SHDMA_SLAVE_MMCIF_RX,
344 .addr = 0xe6bd0034,
345 .chcr = CHCR_RX(XMIT_SZ_32BIT),
346 .mid_rid = 0xd2,
347 },
348};
349
350#define SH7372_CHCLR (0x220 - 0x20)
351
352static const struct sh_dmae_channel sh7372_dmae_channels[] = {
353 {
354 .offset = 0,
355 .dmars = 0,
356 .dmars_bit = 0,
357 .chclr_offset = SH7372_CHCLR + 0,
358 }, {
359 .offset = 0x10,
360 .dmars = 0,
361 .dmars_bit = 8,
362 .chclr_offset = SH7372_CHCLR + 0x10,
363 }, {
364 .offset = 0x20,
365 .dmars = 4,
366 .dmars_bit = 0,
367 .chclr_offset = SH7372_CHCLR + 0x20,
368 }, {
369 .offset = 0x30,
370 .dmars = 4,
371 .dmars_bit = 8,
372 .chclr_offset = SH7372_CHCLR + 0x30,
373 }, {
374 .offset = 0x50,
375 .dmars = 8,
376 .dmars_bit = 0,
377 .chclr_offset = SH7372_CHCLR + 0x50,
378 }, {
379 .offset = 0x60,
380 .dmars = 8,
381 .dmars_bit = 8,
382 .chclr_offset = SH7372_CHCLR + 0x60,
383 }
384};
385
386static struct sh_dmae_pdata dma_platform_data = {
387 .slave = sh7372_dmae_slaves,
388 .slave_num = ARRAY_SIZE(sh7372_dmae_slaves),
389 .channel = sh7372_dmae_channels,
390 .channel_num = ARRAY_SIZE(sh7372_dmae_channels),
391 .ts_low_shift = TS_LOW_SHIFT,
392 .ts_low_mask = TS_LOW_BIT << TS_LOW_SHIFT,
393 .ts_high_shift = TS_HI_SHIFT,
394 .ts_high_mask = TS_HI_BIT << TS_HI_SHIFT,
395 .ts_shift = dma_ts_shift,
396 .ts_shift_num = ARRAY_SIZE(dma_ts_shift),
397 .dmaor_init = DMAOR_DME,
398 .chclr_present = 1,
399};
400
401/* Resource order important! */
402static struct resource sh7372_dmae0_resources[] = {
403 {
404 /* Channel registers and DMAOR */
405 .start = 0xfe008020,
406 .end = 0xfe00828f,
407 .flags = IORESOURCE_MEM,
408 },
409 {
410 /* DMARSx */
411 .start = 0xfe009000,
412 .end = 0xfe00900b,
413 .flags = IORESOURCE_MEM,
414 },
415 {
416 .name = "error_irq",
417 .start = evt2irq(0x20c0),
418 .end = evt2irq(0x20c0),
419 .flags = IORESOURCE_IRQ,
420 },
421 {
422 /* IRQ for channels 0-5 */
423 .start = evt2irq(0x2000),
424 .end = evt2irq(0x20a0),
425 .flags = IORESOURCE_IRQ,
426 },
427};
428
429/* Resource order important! */
430static struct resource sh7372_dmae1_resources[] = {
431 {
432 /* Channel registers and DMAOR */
433 .start = 0xfe018020,
434 .end = 0xfe01828f,
435 .flags = IORESOURCE_MEM,
436 },
437 {
438 /* DMARSx */
439 .start = 0xfe019000,
440 .end = 0xfe01900b,
441 .flags = IORESOURCE_MEM,
442 },
443 {
444 .name = "error_irq",
445 .start = evt2irq(0x21c0),
446 .end = evt2irq(0x21c0),
447 .flags = IORESOURCE_IRQ,
448 },
449 {
450 /* IRQ for channels 0-5 */
451 .start = evt2irq(0x2100),
452 .end = evt2irq(0x21a0),
453 .flags = IORESOURCE_IRQ,
454 },
455};
456
457/* Resource order important! */
458static struct resource sh7372_dmae2_resources[] = {
459 {
460 /* Channel registers and DMAOR */
461 .start = 0xfe028020,
462 .end = 0xfe02828f,
463 .flags = IORESOURCE_MEM,
464 },
465 {
466 /* DMARSx */
467 .start = 0xfe029000,
468 .end = 0xfe02900b,
469 .flags = IORESOURCE_MEM,
470 },
471 {
472 .name = "error_irq",
473 .start = evt2irq(0x22c0),
474 .end = evt2irq(0x22c0),
475 .flags = IORESOURCE_IRQ,
476 },
477 {
478 /* IRQ for channels 0-5 */
479 .start = evt2irq(0x2200),
480 .end = evt2irq(0x22a0),
481 .flags = IORESOURCE_IRQ,
482 },
483};
484
485static struct platform_device dma0_device = {
486 .name = "sh-dma-engine",
487 .id = 0,
488 .resource = sh7372_dmae0_resources,
489 .num_resources = ARRAY_SIZE(sh7372_dmae0_resources),
490 .dev = {
491 .platform_data = &dma_platform_data,
492 },
493};
494
495static struct platform_device dma1_device = {
496 .name = "sh-dma-engine",
497 .id = 1,
498 .resource = sh7372_dmae1_resources,
499 .num_resources = ARRAY_SIZE(sh7372_dmae1_resources),
500 .dev = {
501 .platform_data = &dma_platform_data,
502 },
503};
504
505static struct platform_device dma2_device = {
506 .name = "sh-dma-engine",
507 .id = 2,
508 .resource = sh7372_dmae2_resources,
509 .num_resources = ARRAY_SIZE(sh7372_dmae2_resources),
510 .dev = {
511 .platform_data = &dma_platform_data,
512 },
513};
514
515/*
516 * USB-DMAC
517 */
518static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = {
519 {
520 .offset = 0,
521 }, {
522 .offset = 0x20,
523 },
524};
525
526/* USB DMAC0 */
527static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = {
528 {
529 .slave_id = SHDMA_SLAVE_USB0_TX,
530 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
531 }, {
532 .slave_id = SHDMA_SLAVE_USB0_RX,
533 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
534 },
535};
536
537static struct sh_dmae_pdata usb_dma0_platform_data = {
538 .slave = sh7372_usb_dmae0_slaves,
539 .slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves),
540 .channel = sh7372_usb_dmae_channels,
541 .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
542 .ts_low_shift = USBTS_LOW_SHIFT,
543 .ts_low_mask = USBTS_LOW_BIT << USBTS_LOW_SHIFT,
544 .ts_high_shift = USBTS_HI_SHIFT,
545 .ts_high_mask = USBTS_HI_BIT << USBTS_HI_SHIFT,
546 .ts_shift = dma_usbts_shift,
547 .ts_shift_num = ARRAY_SIZE(dma_usbts_shift),
548 .dmaor_init = DMAOR_DME,
549 .chcr_offset = 0x14,
550 .chcr_ie_bit = 1 << 5,
551 .dmaor_is_32bit = 1,
552 .needs_tend_set = 1,
553 .no_dmars = 1,
554 .slave_only = 1,
555};
556
557static struct resource sh7372_usb_dmae0_resources[] = {
558 {
559 /* Channel registers and DMAOR */
560 .start = 0xe68a0020,
561 .end = 0xe68a0064 - 1,
562 .flags = IORESOURCE_MEM,
563 },
564 {
565 /* VCR/SWR/DMICR */
566 .start = 0xe68a0000,
567 .end = 0xe68a0014 - 1,
568 .flags = IORESOURCE_MEM,
569 },
570 {
571 /* IRQ for channels */
572 .start = evt2irq(0x0a00),
573 .end = evt2irq(0x0a00),
574 .flags = IORESOURCE_IRQ,
575 },
576};
577
578static struct platform_device usb_dma0_device = {
579 .name = "sh-dma-engine",
580 .id = 3,
581 .resource = sh7372_usb_dmae0_resources,
582 .num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources),
583 .dev = {
584 .platform_data = &usb_dma0_platform_data,
585 },
586};
587
588/* USB DMAC1 */
589static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = {
590 {
591 .slave_id = SHDMA_SLAVE_USB1_TX,
592 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
593 }, {
594 .slave_id = SHDMA_SLAVE_USB1_RX,
595 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
596 },
597};
598
599static struct sh_dmae_pdata usb_dma1_platform_data = {
600 .slave = sh7372_usb_dmae1_slaves,
601 .slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves),
602 .channel = sh7372_usb_dmae_channels,
603 .channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
604 .ts_low_shift = USBTS_LOW_SHIFT,
605 .ts_low_mask = USBTS_LOW_BIT << USBTS_LOW_SHIFT,
606 .ts_high_shift = USBTS_HI_SHIFT,
607 .ts_high_mask = USBTS_HI_BIT << USBTS_HI_SHIFT,
608 .ts_shift = dma_usbts_shift,
609 .ts_shift_num = ARRAY_SIZE(dma_usbts_shift),
610 .dmaor_init = DMAOR_DME,
611 .chcr_offset = 0x14,
612 .chcr_ie_bit = 1 << 5,
613 .dmaor_is_32bit = 1,
614 .needs_tend_set = 1,
615 .no_dmars = 1,
616 .slave_only = 1,
617};
618
619static struct resource sh7372_usb_dmae1_resources[] = {
620 {
621 /* Channel registers and DMAOR */
622 .start = 0xe68c0020,
623 .end = 0xe68c0064 - 1,
624 .flags = IORESOURCE_MEM,
625 },
626 {
627 /* VCR/SWR/DMICR */
628 .start = 0xe68c0000,
629 .end = 0xe68c0014 - 1,
630 .flags = IORESOURCE_MEM,
631 },
632 {
633 /* IRQ for channels */
634 .start = evt2irq(0x1d00),
635 .end = evt2irq(0x1d00),
636 .flags = IORESOURCE_IRQ,
637 },
638};
639
640static struct platform_device usb_dma1_device = {
641 .name = "sh-dma-engine",
642 .id = 4,
643 .resource = sh7372_usb_dmae1_resources,
644 .num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources),
645 .dev = {
646 .platform_data = &usb_dma1_platform_data,
647 },
648};
649
650/* VPU */
651static struct uio_info vpu_platform_data = {
652 .name = "VPU5HG",
653 .version = "0",
654 .irq = intcs_evt2irq(0x980),
655};
656
657static struct resource vpu_resources[] = {
658 [0] = {
659 .name = "VPU",
660 .start = 0xfe900000,
661 .end = 0xfe900157,
662 .flags = IORESOURCE_MEM,
663 },
664};
665
666static struct platform_device vpu_device = {
667 .name = "uio_pdrv_genirq",
668 .id = 0,
669 .dev = {
670 .platform_data = &vpu_platform_data,
671 },
672 .resource = vpu_resources,
673 .num_resources = ARRAY_SIZE(vpu_resources),
674};
675
676/* VEU0 */
677static struct uio_info veu0_platform_data = {
678 .name = "VEU0",
679 .version = "0",
680 .irq = intcs_evt2irq(0x700),
681};
682
683static struct resource veu0_resources[] = {
684 [0] = {
685 .name = "VEU0",
686 .start = 0xfe920000,
687 .end = 0xfe9200cb,
688 .flags = IORESOURCE_MEM,
689 },
690};
691
692static struct platform_device veu0_device = {
693 .name = "uio_pdrv_genirq",
694 .id = 1,
695 .dev = {
696 .platform_data = &veu0_platform_data,
697 },
698 .resource = veu0_resources,
699 .num_resources = ARRAY_SIZE(veu0_resources),
700};
701
702/* VEU1 */
703static struct uio_info veu1_platform_data = {
704 .name = "VEU1",
705 .version = "0",
706 .irq = intcs_evt2irq(0x720),
707};
708
709static struct resource veu1_resources[] = {
710 [0] = {
711 .name = "VEU1",
712 .start = 0xfe924000,
713 .end = 0xfe9240cb,
714 .flags = IORESOURCE_MEM,
715 },
716};
717
718static struct platform_device veu1_device = {
719 .name = "uio_pdrv_genirq",
720 .id = 2,
721 .dev = {
722 .platform_data = &veu1_platform_data,
723 },
724 .resource = veu1_resources,
725 .num_resources = ARRAY_SIZE(veu1_resources),
726};
727
728/* VEU2 */
729static struct uio_info veu2_platform_data = {
730 .name = "VEU2",
731 .version = "0",
732 .irq = intcs_evt2irq(0x740),
733};
734
735static struct resource veu2_resources[] = {
736 [0] = {
737 .name = "VEU2",
738 .start = 0xfe928000,
739 .end = 0xfe928307,
740 .flags = IORESOURCE_MEM,
741 },
742};
743
744static struct platform_device veu2_device = {
745 .name = "uio_pdrv_genirq",
746 .id = 3,
747 .dev = {
748 .platform_data = &veu2_platform_data,
749 },
750 .resource = veu2_resources,
751 .num_resources = ARRAY_SIZE(veu2_resources),
752};
753
754/* VEU3 */
755static struct uio_info veu3_platform_data = {
756 .name = "VEU3",
757 .version = "0",
758 .irq = intcs_evt2irq(0x760),
759};
760
761static struct resource veu3_resources[] = {
762 [0] = {
763 .name = "VEU3",
764 .start = 0xfe92c000,
765 .end = 0xfe92c307,
766 .flags = IORESOURCE_MEM,
767 },
768};
769
770static struct platform_device veu3_device = {
771 .name = "uio_pdrv_genirq",
772 .id = 4,
773 .dev = {
774 .platform_data = &veu3_platform_data,
775 },
776 .resource = veu3_resources,
777 .num_resources = ARRAY_SIZE(veu3_resources),
778};
779
780/* JPU */
781static struct uio_info jpu_platform_data = {
782 .name = "JPU",
783 .version = "0",
784 .irq = intcs_evt2irq(0x560),
785};
786
787static struct resource jpu_resources[] = {
788 [0] = {
789 .name = "JPU",
790 .start = 0xfe980000,
791 .end = 0xfe9902d3,
792 .flags = IORESOURCE_MEM,
793 },
794};
795
796static struct platform_device jpu_device = {
797 .name = "uio_pdrv_genirq",
798 .id = 5,
799 .dev = {
800 .platform_data = &jpu_platform_data,
801 },
802 .resource = jpu_resources,
803 .num_resources = ARRAY_SIZE(jpu_resources),
804};
805
806/* SPU2DSP0 */
807static struct uio_info spu0_platform_data = {
808 .name = "SPU2DSP0",
809 .version = "0",
810 .irq = evt2irq(0x1800),
811};
812
813static struct resource spu0_resources[] = {
814 [0] = {
815 .name = "SPU2DSP0",
816 .start = 0xfe200000,
817 .end = 0xfe2fffff,
818 .flags = IORESOURCE_MEM,
819 },
820};
821
822static struct platform_device spu0_device = {
823 .name = "uio_pdrv_genirq",
824 .id = 6,
825 .dev = {
826 .platform_data = &spu0_platform_data,
827 },
828 .resource = spu0_resources,
829 .num_resources = ARRAY_SIZE(spu0_resources),
830};
831
832/* SPU2DSP1 */
833static struct uio_info spu1_platform_data = {
834 .name = "SPU2DSP1",
835 .version = "0",
836 .irq = evt2irq(0x1820),
837};
838
839static struct resource spu1_resources[] = {
840 [0] = {
841 .name = "SPU2DSP1",
842 .start = 0xfe300000,
843 .end = 0xfe3fffff,
844 .flags = IORESOURCE_MEM,
845 },
846};
847
848static struct platform_device spu1_device = {
849 .name = "uio_pdrv_genirq",
850 .id = 7,
851 .dev = {
852 .platform_data = &spu1_platform_data,
853 },
854 .resource = spu1_resources,
855 .num_resources = ARRAY_SIZE(spu1_resources),
856};
857
858/* IPMMUI (an IPMMU module for ICB/LMB) */
859static struct resource ipmmu_resources[] = {
860 [0] = {
861 .name = "IPMMUI",
862 .start = 0xfe951000,
863 .end = 0xfe9510ff,
864 .flags = IORESOURCE_MEM,
865 },
866};
867
868static const char * const ipmmu_dev_names[] = {
869 "sh_mobile_lcdc_fb.0",
870 "sh_mobile_lcdc_fb.1",
871 "sh_mobile_ceu.0",
872 "uio_pdrv_genirq.0",
873 "uio_pdrv_genirq.1",
874 "uio_pdrv_genirq.2",
875 "uio_pdrv_genirq.3",
876 "uio_pdrv_genirq.4",
877 "uio_pdrv_genirq.5",
878};
879
880static struct shmobile_ipmmu_platform_data ipmmu_platform_data = {
881 .dev_names = ipmmu_dev_names,
882 .num_dev_names = ARRAY_SIZE(ipmmu_dev_names),
883};
884
885static struct platform_device ipmmu_device = {
886 .name = "ipmmu",
887 .id = -1,
888 .dev = {
889 .platform_data = &ipmmu_platform_data,
890 },
891 .resource = ipmmu_resources,
892 .num_resources = ARRAY_SIZE(ipmmu_resources),
893};
894
895static struct platform_device *sh7372_early_devices[] __initdata = {
896 &scif0_device,
897 &scif1_device,
898 &scif2_device,
899 &scif3_device,
900 &scif4_device,
901 &scif5_device,
902 &scif6_device,
903 &cmt2_device,
904 &tmu0_device,
905 &ipmmu_device,
906};
907
908static struct platform_device *sh7372_late_devices[] __initdata = {
909 &iic0_device,
910 &iic1_device,
911 &dma0_device,
912 &dma1_device,
913 &dma2_device,
914 &usb_dma0_device,
915 &usb_dma1_device,
916 &vpu_device,
917 &veu0_device,
918 &veu1_device,
919 &veu2_device,
920 &veu3_device,
921 &jpu_device,
922 &spu0_device,
923 &spu1_device,
924};
925
926void __init sh7372_add_standard_devices(void)
927{
928 static struct pm_domain_device domain_devices[] __initdata = {
929 { "A3RV", &vpu_device, },
930 { "A4MP", &spu0_device, },
931 { "A4MP", &spu1_device, },
932 { "A3SP", &scif0_device, },
933 { "A3SP", &scif1_device, },
934 { "A3SP", &scif2_device, },
935 { "A3SP", &scif3_device, },
936 { "A3SP", &scif4_device, },
937 { "A3SP", &scif5_device, },
938 { "A3SP", &scif6_device, },
939 { "A3SP", &iic1_device, },
940 { "A3SP", &dma0_device, },
941 { "A3SP", &dma1_device, },
942 { "A3SP", &dma2_device, },
943 { "A3SP", &usb_dma0_device, },
944 { "A3SP", &usb_dma1_device, },
945 { "A4R", &iic0_device, },
946 { "A4R", &veu0_device, },
947 { "A4R", &veu1_device, },
948 { "A4R", &veu2_device, },
949 { "A4R", &veu3_device, },
950 { "A4R", &jpu_device, },
951 { "A4R", &tmu0_device, },
952 };
953
954 sh7372_init_pm_domains();
955
956 platform_add_devices(sh7372_early_devices,
957 ARRAY_SIZE(sh7372_early_devices));
958
959 platform_add_devices(sh7372_late_devices,
960 ARRAY_SIZE(sh7372_late_devices));
961
962 rmobile_add_devices_to_domains(domain_devices,
963 ARRAY_SIZE(domain_devices));
964}
965
966void __init sh7372_earlytimer_init(void)
967{
968 sh7372_clock_init();
969 shmobile_earlytimer_init();
970}
971
972void __init sh7372_add_early_devices(void)
973{
974 early_platform_add_devices(sh7372_early_devices,
975 ARRAY_SIZE(sh7372_early_devices));
976
977 /* setup early console here as well */
978 shmobile_setup_console();
979}
980
981#ifdef CONFIG_USE_OF
982
983void __init sh7372_add_early_devices_dt(void)
984{
985 shmobile_init_delay();
986
987 sh7372_add_early_devices();
988}
989
990void __init sh7372_add_standard_devices_dt(void)
991{
992 /* clocks are setup late during boot in the case of DT */
993 sh7372_clock_init();
994
995 platform_add_devices(sh7372_early_devices,
996 ARRAY_SIZE(sh7372_early_devices));
997
998 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
999}
1000
1001static const char *sh7372_boards_compat_dt[] __initdata = {
1002 "renesas,sh7372",
1003 NULL,
1004};
1005
1006DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
1007 .map_io = sh7372_map_io,
1008 .init_early = sh7372_add_early_devices_dt,
1009 .init_irq = sh7372_init_irq,
1010 .handle_irq = shmobile_handle_irq_intc,
1011 .init_machine = sh7372_add_standard_devices_dt,
1012 .init_late = shmobile_init_late,
1013 .dt_compat = sh7372_boards_compat_dt,
1014MACHINE_END
1015
1016#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index faea74a2151b..fb2ab7590af8 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -30,6 +30,7 @@
30#include <linux/platform_data/sh_ipmmu.h> 30#include <linux/platform_data/sh_ipmmu.h>
31#include <linux/platform_data/irq-renesas-intc-irqpin.h> 31#include <linux/platform_data/irq-renesas-intc-irqpin.h>
32 32
33#include <asm/hardware/cache-l2x0.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -784,22 +785,15 @@ void __init sh73a0_add_early_devices(void)
784 785
785#ifdef CONFIG_USE_OF 786#ifdef CONFIG_USE_OF
786 787
787void __init sh73a0_add_standard_devices_dt(void) 788static void __init sh73a0_generic_init(void)
788{ 789{
789 /* clocks are setup late during boot in the case of DT */ 790#ifdef CONFIG_CACHE_L2X0
790#ifndef CONFIG_COMMON_CLK 791 /* Shared attribute override enable, 64K*8way */
791 sh73a0_clock_init(); 792 l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
792#endif 793#endif
793 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 794 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
794} 795}
795 796
796#define RESCNT2 IOMEM(0xe6188020)
797static void sh73a0_restart(enum reboot_mode mode, const char *cmd)
798{
799 /* Do soft power on reset */
800 writel((1 << 31), RESCNT2);
801}
802
803static const char *sh73a0_boards_compat_dt[] __initdata = { 797static const char *sh73a0_boards_compat_dt[] __initdata = {
804 "renesas,sh73a0", 798 "renesas,sh73a0",
805 NULL, 799 NULL,
@@ -809,9 +803,8 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)")
809 .smp = smp_ops(sh73a0_smp_ops), 803 .smp = smp_ops(sh73a0_smp_ops),
810 .map_io = sh73a0_map_io, 804 .map_io = sh73a0_map_io,
811 .init_early = shmobile_init_delay, 805 .init_early = shmobile_init_delay,
812 .init_machine = sh73a0_add_standard_devices_dt, 806 .init_machine = sh73a0_generic_init,
813 .init_late = shmobile_init_late, 807 .init_late = shmobile_init_late,
814 .restart = sh73a0_restart,
815 .dt_compat = sh73a0_boards_compat_dt, 808 .dt_compat = sh73a0_boards_compat_dt,
816MACHINE_END 809MACHINE_END
817#endif /* CONFIG_USE_OF */ 810#endif /* CONFIG_USE_OF */
diff --git a/arch/arm/mach-shmobile/sh7372.h b/arch/arm/mach-shmobile/sh7372.h
deleted file mode 100644
index 4ad960d5075b..000000000000
--- a/arch/arm/mach-shmobile/sh7372.h
+++ /dev/null
@@ -1,84 +0,0 @@
1/*
2 * Copyright (C) 2010 Renesas Solutions Corp.
3 *
4 * Kuninori Morimoto <morimoto.kuninori@renesas.com>
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#ifndef __ASM_SH7372_H__
12#define __ASM_SH7372_H__
13
14/* DMA slave IDs */
15enum {
16 SHDMA_SLAVE_INVALID,
17 SHDMA_SLAVE_SCIF0_TX,
18 SHDMA_SLAVE_SCIF0_RX,
19 SHDMA_SLAVE_SCIF1_TX,
20 SHDMA_SLAVE_SCIF1_RX,
21 SHDMA_SLAVE_SCIF2_TX,
22 SHDMA_SLAVE_SCIF2_RX,
23 SHDMA_SLAVE_SCIF3_TX,
24 SHDMA_SLAVE_SCIF3_RX,
25 SHDMA_SLAVE_SCIF4_TX,
26 SHDMA_SLAVE_SCIF4_RX,
27 SHDMA_SLAVE_SCIF5_TX,
28 SHDMA_SLAVE_SCIF5_RX,
29 SHDMA_SLAVE_SCIF6_TX,
30 SHDMA_SLAVE_SCIF6_RX,
31 SHDMA_SLAVE_FLCTL0_TX,
32 SHDMA_SLAVE_FLCTL0_RX,
33 SHDMA_SLAVE_FLCTL1_TX,
34 SHDMA_SLAVE_FLCTL1_RX,
35 SHDMA_SLAVE_SDHI0_RX,
36 SHDMA_SLAVE_SDHI0_TX,
37 SHDMA_SLAVE_SDHI1_RX,
38 SHDMA_SLAVE_SDHI1_TX,
39 SHDMA_SLAVE_SDHI2_RX,
40 SHDMA_SLAVE_SDHI2_TX,
41 SHDMA_SLAVE_FSIA_RX,
42 SHDMA_SLAVE_FSIA_TX,
43 SHDMA_SLAVE_MMCIF_RX,
44 SHDMA_SLAVE_MMCIF_TX,
45 SHDMA_SLAVE_USB0_TX,
46 SHDMA_SLAVE_USB0_RX,
47 SHDMA_SLAVE_USB1_TX,
48 SHDMA_SLAVE_USB1_RX,
49};
50
51extern struct clk sh7372_extal1_clk;
52extern struct clk sh7372_extal2_clk;
53extern struct clk sh7372_dv_clki_clk;
54extern struct clk sh7372_dv_clki_div2_clk;
55extern struct clk sh7372_pllc2_clk;
56
57extern void sh7372_init_irq(void);
58extern void sh7372_map_io(void);
59extern void sh7372_earlytimer_init(void);
60extern void sh7372_add_early_devices(void);
61extern void sh7372_add_standard_devices(void);
62extern void sh7372_add_early_devices_dt(void);
63extern void sh7372_add_standard_devices_dt(void);
64extern void sh7372_clock_init(void);
65extern void sh7372_pinmux_init(void);
66extern void sh7372_pm_init(void);
67extern void sh7372_resume_core_standby_sysc(void);
68extern int sh7372_do_idle_sysc(unsigned long sleep_mode);
69extern void sh7372_intcs_suspend(void);
70extern void sh7372_intcs_resume(void);
71extern void sh7372_intca_suspend(void);
72extern void sh7372_intca_resume(void);
73
74extern unsigned long sh7372_cpu_resume;
75
76#ifdef CONFIG_PM
77extern void __init sh7372_init_pm_domains(void);
78#else
79static inline void sh7372_init_pm_domains(void) {}
80#endif
81
82extern void __init sh7372_pm_init_late(void);
83
84#endif /* __ASM_SH7372_H__ */
diff --git a/arch/arm/mach-shmobile/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
index f037c64b14fc..5a80f18b4fa0 100644
--- a/arch/arm/mach-shmobile/sh73a0.h
+++ b/arch/arm/mach-shmobile/sh73a0.h
@@ -77,7 +77,6 @@ extern void sh73a0_map_io(void);
77extern void sh73a0_earlytimer_init(void); 77extern void sh73a0_earlytimer_init(void);
78extern void sh73a0_add_early_devices(void); 78extern void sh73a0_add_early_devices(void);
79extern void sh73a0_add_standard_devices(void); 79extern void sh73a0_add_standard_devices(void);
80extern void sh73a0_add_standard_devices_dt(void);
81extern void sh73a0_clock_init(void); 80extern void sh73a0_clock_init(void);
82extern void sh73a0_pinmux_init(void); 81extern void sh73a0_pinmux_init(void);
83extern void sh73a0_pm_init(void); 82extern void sh73a0_pm_init(void);
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S
deleted file mode 100644
index 146b8de16432..000000000000
--- a/arch/arm/mach-shmobile/sleep-sh7372.S
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 * sh7372 lowlevel sleep code for "Core Standby Mode"
3 *
4 * Copyright (C) 2011 Magnus Damm
5 *
6 * In "Core Standby Mode" the ARM core is off, but L2 cache is still on
7 *
8 * Based on mach-omap2/sleep34xx.S
9 *
10 * (C) Copyright 2007 Texas Instruments
11 * Karthik Dasu <karthik-dp@ti.com>
12 *
13 * (C) Copyright 2004 Texas Instruments, <www.ti.com>
14 * Richard Woodruff <r-woodruff2@ti.com>
15 *
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License as
18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version.
20 *
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the
24 * GNU General Public License for more details.
25 */
26
27#include <linux/linkage.h>
28#include <linux/init.h>
29#include <asm/memory.h>
30#include <asm/assembler.h>
31
32#if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE)
33 .align 12
34 .text
35 .global sh7372_resume_core_standby_sysc
36sh7372_resume_core_standby_sysc:
37 ldr pc, 1f
38
39 .align 2
40 .globl sh7372_cpu_resume
41sh7372_cpu_resume:
421: .space 4
43
44#define SPDCR 0xe6180008
45
46 /* A3SM & A4S power down */
47 .global sh7372_do_idle_sysc
48sh7372_do_idle_sysc:
49 mov r8, r0 /* sleep mode passed in r0 */
50
51 /*
52 * Clear the SCTLR.C bit to prevent further data cache
53 * allocation. Clearing SCTLR.C would make all the data accesses
54 * strongly ordered and would not hit the cache.
55 */
56 mrc p15, 0, r0, c1, c0, 0
57 bic r0, r0, #(1 << 2) @ Disable the C bit
58 mcr p15, 0, r0, c1, c0, 0
59 isb
60
61 /*
62 * Clean and invalidate data cache again.
63 */
64 ldr r1, kernel_flush
65 blx r1
66
67 /* disable L2 cache in the aux control register */
68 mrc p15, 0, r10, c1, c0, 1
69 bic r10, r10, #2
70 mcr p15, 0, r10, c1, c0, 1
71 isb
72
73 /*
74 * The kernel doesn't interwork: v7_flush_dcache_all in particluar will
75 * always return in Thumb state when CONFIG_THUMB2_KERNEL is enabled.
76 * This sequence switches back to ARM. Note that .align may insert a
77 * nop: bx pc needs to be word-aligned in order to work.
78 */
79 THUMB( .thumb )
80 THUMB( .align )
81 THUMB( bx pc )
82 THUMB( nop )
83 .arm
84
85 /* Data memory barrier and Data sync barrier */
86 dsb
87 dmb
88
89 /* SYSC power down */
90 ldr r0, =SPDCR
91 str r8, [r0]
921:
93 b 1b
94
95 .align 2
96kernel_flush:
97 .word v7_flush_dcache_all
98#endif
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 9fc280e24ef4..01f792fcb220 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -124,19 +124,12 @@ static int r8a7779_cpu_kill(unsigned int cpu)
124 124
125 return 0; 125 return 0;
126} 126}
127
128static int r8a7779_cpu_disable(unsigned int cpu)
129{
130 /* only CPU1->3 have power domains, do not allow hotplug of CPU0 */
131 return cpu == 0 ? -EPERM : 0;
132}
133#endif /* CONFIG_HOTPLUG_CPU */ 127#endif /* CONFIG_HOTPLUG_CPU */
134 128
135struct smp_operations r8a7779_smp_ops __initdata = { 129struct smp_operations r8a7779_smp_ops __initdata = {
136 .smp_prepare_cpus = r8a7779_smp_prepare_cpus, 130 .smp_prepare_cpus = r8a7779_smp_prepare_cpus,
137 .smp_boot_secondary = r8a7779_boot_secondary, 131 .smp_boot_secondary = r8a7779_boot_secondary,
138#ifdef CONFIG_HOTPLUG_CPU 132#ifdef CONFIG_HOTPLUG_CPU
139 .cpu_disable = r8a7779_cpu_disable,
140 .cpu_die = shmobile_smp_scu_cpu_die, 133 .cpu_die = shmobile_smp_scu_cpu_die,
141 .cpu_kill = r8a7779_cpu_kill, 134 .cpu_kill = r8a7779_cpu_kill,
142#endif 135#endif
diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index 9c3da1345b8b..930f45cbc08a 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -23,6 +23,7 @@
23#include "common.h" 23#include "common.h"
24#include "platsmp-apmu.h" 24#include "platsmp-apmu.h"
25#include "pm-rcar.h" 25#include "pm-rcar.h"
26#include "rcar-gen2.h"
26#include "r8a7790.h" 27#include "r8a7790.h"
27 28
28static struct rcar_sysc_ch r8a7790_ca15_scu = { 29static struct rcar_sysc_ch r8a7790_ca15_scu = {
@@ -37,11 +38,11 @@ static struct rcar_sysc_ch r8a7790_ca7_scu = {
37 38
38static struct rcar_apmu_config r8a7790_apmu_config[] = { 39static struct rcar_apmu_config r8a7790_apmu_config[] = {
39 { 40 {
40 .iomem = DEFINE_RES_MEM(0xe6152000, 0x88), 41 .iomem = DEFINE_RES_MEM(0xe6152000, 0x188),
41 .cpus = { 0, 1, 2, 3 }, 42 .cpus = { 0, 1, 2, 3 },
42 }, 43 },
43 { 44 {
44 .iomem = DEFINE_RES_MEM(0xe6151000, 0x88), 45 .iomem = DEFINE_RES_MEM(0xe6151000, 0x188),
45 .cpus = { 0x100, 0x0101, 0x102, 0x103 }, 46 .cpus = { 0x100, 0x0101, 0x102, 0x103 },
46 } 47 }
47}; 48};
@@ -54,7 +55,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
54 ARRAY_SIZE(r8a7790_apmu_config)); 55 ARRAY_SIZE(r8a7790_apmu_config));
55 56
56 /* turn on power to SCU */ 57 /* turn on power to SCU */
57 r8a7790_pm_init(); 58 rcar_gen2_pm_init();
58 rcar_sysc_power_up(&r8a7790_ca15_scu); 59 rcar_sysc_power_up(&r8a7790_ca15_scu);
59 rcar_sysc_power_up(&r8a7790_ca7_scu); 60 rcar_sysc_power_up(&r8a7790_ca7_scu);
60} 61}
diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
index 7e49e0a52e32..5e2d1db79afa 100644
--- a/arch/arm/mach-shmobile/smp-r8a7791.c
+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
@@ -27,7 +27,7 @@
27 27
28static struct rcar_apmu_config r8a7791_apmu_config[] = { 28static struct rcar_apmu_config r8a7791_apmu_config[] = {
29 { 29 {
30 .iomem = DEFINE_RES_MEM(0xe6152000, 0x88), 30 .iomem = DEFINE_RES_MEM(0xe6152000, 0x188),
31 .cpus = { 0, 1 }, 31 .cpus = { 0, 1 },
32 } 32 }
33}; 33};
@@ -39,7 +39,7 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
39 r8a7791_apmu_config, 39 r8a7791_apmu_config,
40 ARRAY_SIZE(r8a7791_apmu_config)); 40 ARRAY_SIZE(r8a7791_apmu_config));
41 41
42 r8a7791_pm_init(); 42 rcar_gen2_pm_init();
43} 43}
44 44
45static int r8a7791_smp_boot_secondary(unsigned int cpu, 45static int r8a7791_smp_boot_secondary(unsigned int cpu,
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index c16dbfe9836c..2106d6b76a06 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -33,7 +33,7 @@
33 33
34#define SH73A0_SCU_BASE 0xf0000000 34#define SH73A0_SCU_BASE 0xf0000000
35 35
36#ifdef CONFIG_HAVE_ARM_TWD 36#if defined(CONFIG_HAVE_ARM_TWD) && !defined(CONFIG_ARCH_MULTIPLATFORM)
37static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, SH73A0_SCU_BASE + 0x600, 29); 37static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, SH73A0_SCU_BASE + 0x600, 29);
38void __init sh73a0_register_twd(void) 38void __init sh73a0_register_twd(void)
39{ 39{
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 4be537977040..10f9389572da 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -54,7 +54,7 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
54config ARCH_VEXPRESS_DCSCB 54config ARCH_VEXPRESS_DCSCB
55 bool "Dual Cluster System Control Block (DCSCB) support" 55 bool "Dual Cluster System Control Block (DCSCB) support"
56 depends on MCPM 56 depends on MCPM
57 select ARM_CCI 57 select ARM_CCI400_PORT_CTRL
58 help 58 help
59 Support for the Dual Cluster System Configuration Block (DCSCB). 59 Support for the Dual Cluster System Configuration Block (DCSCB).
60 This is needed to provide CPU and cluster power management 60 This is needed to provide CPU and cluster power management
@@ -72,7 +72,7 @@ config ARCH_VEXPRESS_SPC
72config ARCH_VEXPRESS_TC2_PM 72config ARCH_VEXPRESS_TC2_PM
73 bool "Versatile Express TC2 power management" 73 bool "Versatile Express TC2 power management"
74 depends on MCPM 74 depends on MCPM
75 select ARM_CCI 75 select ARM_CCI400_PORT_CTRL
76 select ARCH_VEXPRESS_SPC 76 select ARCH_VEXPRESS_SPC
77 select ARM_CPU_SUSPEND 77 select ARM_CPU_SUSPEND
78 help 78 help
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c
index 30b993399ed7..5cedcf572104 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-vexpress/dcscb.c
@@ -12,7 +12,6 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/spinlock.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/of_address.h> 16#include <linux/of_address.h>
18#include <linux/vexpress.h> 17#include <linux/vexpress.h>
@@ -36,163 +35,102 @@
36#define KFC_CFG_W 0x2c 35#define KFC_CFG_W 0x2c
37#define DCS_CFG_R 0x30 36#define DCS_CFG_R 0x30
38 37
39/*
40 * We can't use regular spinlocks. In the switcher case, it is possible
41 * for an outbound CPU to call power_down() while its inbound counterpart
42 * is already live using the same logical CPU number which trips lockdep
43 * debugging.
44 */
45static arch_spinlock_t dcscb_lock = __ARCH_SPIN_LOCK_UNLOCKED;
46
47static void __iomem *dcscb_base; 38static void __iomem *dcscb_base;
48static int dcscb_use_count[4][2];
49static int dcscb_allcpus_mask[2]; 39static int dcscb_allcpus_mask[2];
50 40
51static int dcscb_power_up(unsigned int cpu, unsigned int cluster) 41static int dcscb_cpu_powerup(unsigned int cpu, unsigned int cluster)
52{ 42{
53 unsigned int rst_hold, cpumask = (1 << cpu); 43 unsigned int rst_hold, cpumask = (1 << cpu);
54 unsigned int all_mask;
55 44
56 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 45 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
57 if (cpu >= 4 || cluster >= 2) 46 if (cluster >= 2 || !(cpumask & dcscb_allcpus_mask[cluster]))
58 return -EINVAL; 47 return -EINVAL;
59 48
60 all_mask = dcscb_allcpus_mask[cluster]; 49 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
50 rst_hold &= ~(cpumask | (cpumask << 4));
51 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
52 return 0;
53}
61 54
62 /* 55static int dcscb_cluster_powerup(unsigned int cluster)
63 * Since this is called with IRQs enabled, and no arch_spin_lock_irq 56{
64 * variant exists, we need to disable IRQs manually here. 57 unsigned int rst_hold;
65 */
66 local_irq_disable();
67 arch_spin_lock(&dcscb_lock);
68
69 dcscb_use_count[cpu][cluster]++;
70 if (dcscb_use_count[cpu][cluster] == 1) {
71 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
72 if (rst_hold & (1 << 8)) {
73 /* remove cluster reset and add individual CPU's reset */
74 rst_hold &= ~(1 << 8);
75 rst_hold |= all_mask;
76 }
77 rst_hold &= ~(cpumask | (cpumask << 4));
78 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
79 } else if (dcscb_use_count[cpu][cluster] != 2) {
80 /*
81 * The only possible values are:
82 * 0 = CPU down
83 * 1 = CPU (still) up
84 * 2 = CPU requested to be up before it had a chance
85 * to actually make itself down.
86 * Any other value is a bug.
87 */
88 BUG();
89 }
90 58
91 arch_spin_unlock(&dcscb_lock); 59 pr_debug("%s: cluster %u\n", __func__, cluster);
92 local_irq_enable(); 60 if (cluster >= 2)
61 return -EINVAL;
93 62
63 /* remove cluster reset and add individual CPU's reset */
64 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
65 rst_hold &= ~(1 << 8);
66 rst_hold |= dcscb_allcpus_mask[cluster];
67 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
94 return 0; 68 return 0;
95} 69}
96 70
97static void dcscb_power_down(void) 71static void dcscb_cpu_powerdown_prepare(unsigned int cpu, unsigned int cluster)
98{ 72{
99 unsigned int mpidr, cpu, cluster, rst_hold, cpumask, all_mask; 73 unsigned int rst_hold;
100 bool last_man = false, skip_wfi = false;
101
102 mpidr = read_cpuid_mpidr();
103 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
104 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
105 cpumask = (1 << cpu);
106 74
107 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 75 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
108 BUG_ON(cpu >= 4 || cluster >= 2); 76 BUG_ON(cluster >= 2 || !((1 << cpu) & dcscb_allcpus_mask[cluster]));
109
110 all_mask = dcscb_allcpus_mask[cluster];
111
112 __mcpm_cpu_going_down(cpu, cluster);
113
114 arch_spin_lock(&dcscb_lock);
115 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP);
116 dcscb_use_count[cpu][cluster]--;
117 if (dcscb_use_count[cpu][cluster] == 0) {
118 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
119 rst_hold |= cpumask;
120 if (((rst_hold | (rst_hold >> 4)) & all_mask) == all_mask) {
121 rst_hold |= (1 << 8);
122 last_man = true;
123 }
124 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
125 } else if (dcscb_use_count[cpu][cluster] == 1) {
126 /*
127 * A power_up request went ahead of us.
128 * Even if we do not want to shut this CPU down,
129 * the caller expects a certain state as if the WFI
130 * was aborted. So let's continue with cache cleaning.
131 */
132 skip_wfi = true;
133 } else
134 BUG();
135
136 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
137 arch_spin_unlock(&dcscb_lock);
138
139 /* Flush all cache levels for this cluster. */
140 v7_exit_coherency_flush(all);
141
142 /*
143 * A full outer cache flush could be needed at this point
144 * on platforms with such a cache, depending on where the
145 * outer cache sits. In some cases the notion of a "last
146 * cluster standing" would need to be implemented if the
147 * outer cache is shared across clusters. In any case, when
148 * the outer cache needs flushing, there is no concurrent
149 * access to the cache controller to worry about and no
150 * special locking besides what is already provided by the
151 * MCPM state machinery is needed.
152 */
153
154 /*
155 * Disable cluster-level coherency by masking
156 * incoming snoops and DVM messages:
157 */
158 cci_disable_port_by_cpu(mpidr);
159
160 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
161 } else {
162 arch_spin_unlock(&dcscb_lock);
163
164 /* Disable and flush the local CPU cache. */
165 v7_exit_coherency_flush(louis);
166 }
167 77
168 __mcpm_cpu_down(cpu, cluster); 78 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
79 rst_hold |= (1 << cpu);
80 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
81}
169 82
170 /* Now we are prepared for power-down, do it: */ 83static void dcscb_cluster_powerdown_prepare(unsigned int cluster)
171 dsb(); 84{
172 if (!skip_wfi) 85 unsigned int rst_hold;
173 wfi();
174 86
175 /* Not dead at this point? Let our caller cope. */ 87 pr_debug("%s: cluster %u\n", __func__, cluster);
88 BUG_ON(cluster >= 2);
89
90 rst_hold = readl_relaxed(dcscb_base + RST_HOLD0 + cluster * 4);
91 rst_hold |= (1 << 8);
92 writel_relaxed(rst_hold, dcscb_base + RST_HOLD0 + cluster * 4);
176} 93}
177 94
178static const struct mcpm_platform_ops dcscb_power_ops = { 95static void dcscb_cpu_cache_disable(void)
179 .power_up = dcscb_power_up, 96{
180 .power_down = dcscb_power_down, 97 /* Disable and flush the local CPU cache. */
181}; 98 v7_exit_coherency_flush(louis);
99}
182 100
183static void __init dcscb_usage_count_init(void) 101static void dcscb_cluster_cache_disable(void)
184{ 102{
185 unsigned int mpidr, cpu, cluster; 103 /* Flush all cache levels for this cluster. */
104 v7_exit_coherency_flush(all);
186 105
187 mpidr = read_cpuid_mpidr(); 106 /*
188 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); 107 * A full outer cache flush could be needed at this point
189 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 108 * on platforms with such a cache, depending on where the
109 * outer cache sits. In some cases the notion of a "last
110 * cluster standing" would need to be implemented if the
111 * outer cache is shared across clusters. In any case, when
112 * the outer cache needs flushing, there is no concurrent
113 * access to the cache controller to worry about and no
114 * special locking besides what is already provided by the
115 * MCPM state machinery is needed.
116 */
190 117
191 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 118 /*
192 BUG_ON(cpu >= 4 || cluster >= 2); 119 * Disable cluster-level coherency by masking
193 dcscb_use_count[cpu][cluster] = 1; 120 * incoming snoops and DVM messages:
121 */
122 cci_disable_port_by_cpu(read_cpuid_mpidr());
194} 123}
195 124
125static const struct mcpm_platform_ops dcscb_power_ops = {
126 .cpu_powerup = dcscb_cpu_powerup,
127 .cluster_powerup = dcscb_cluster_powerup,
128 .cpu_powerdown_prepare = dcscb_cpu_powerdown_prepare,
129 .cluster_powerdown_prepare = dcscb_cluster_powerdown_prepare,
130 .cpu_cache_disable = dcscb_cpu_cache_disable,
131 .cluster_cache_disable = dcscb_cluster_cache_disable,
132};
133
196extern void dcscb_power_up_setup(unsigned int affinity_level); 134extern void dcscb_power_up_setup(unsigned int affinity_level);
197 135
198static int __init dcscb_init(void) 136static int __init dcscb_init(void)
@@ -213,7 +151,6 @@ static int __init dcscb_init(void)
213 cfg = readl_relaxed(dcscb_base + DCS_CFG_R); 151 cfg = readl_relaxed(dcscb_base + DCS_CFG_R);
214 dcscb_allcpus_mask[0] = (1 << (((cfg >> 16) >> (0 << 2)) & 0xf)) - 1; 152 dcscb_allcpus_mask[0] = (1 << (((cfg >> 16) >> (0 << 2)) & 0xf)) - 1;
215 dcscb_allcpus_mask[1] = (1 << (((cfg >> 16) >> (1 << 2)) & 0xf)) - 1; 153 dcscb_allcpus_mask[1] = (1 << (((cfg >> 16) >> (1 << 2)) & 0xf)) - 1;
216 dcscb_usage_count_init();
217 154
218 ret = mcpm_platform_register(&dcscb_power_ops); 155 ret = mcpm_platform_register(&dcscb_power_ops);
219 if (!ret) 156 if (!ret)
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c
index 2fb78b4648cb..b3328cd46c33 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-vexpress/tc2_pm.c
@@ -18,7 +18,6 @@
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/of_address.h> 19#include <linux/of_address.h>
20#include <linux/of_irq.h> 20#include <linux/of_irq.h>
21#include <linux/spinlock.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/irqchip/arm-gic.h> 22#include <linux/irqchip/arm-gic.h>
24 23
@@ -44,101 +43,36 @@
44 43
45static void __iomem *scc; 44static void __iomem *scc;
46 45
47/*
48 * We can't use regular spinlocks. In the switcher case, it is possible
49 * for an outbound CPU to call power_down() after its inbound counterpart
50 * is already live using the same logical CPU number which trips lockdep
51 * debugging.
52 */
53static arch_spinlock_t tc2_pm_lock = __ARCH_SPIN_LOCK_UNLOCKED;
54
55#define TC2_CLUSTERS 2 46#define TC2_CLUSTERS 2
56#define TC2_MAX_CPUS_PER_CLUSTER 3 47#define TC2_MAX_CPUS_PER_CLUSTER 3
57 48
58static unsigned int tc2_nr_cpus[TC2_CLUSTERS]; 49static unsigned int tc2_nr_cpus[TC2_CLUSTERS];
59 50
60/* Keep per-cpu usage count to cope with unordered up/down requests */ 51static int tc2_pm_cpu_powerup(unsigned int cpu, unsigned int cluster)
61static int tc2_pm_use_count[TC2_MAX_CPUS_PER_CLUSTER][TC2_CLUSTERS];
62
63#define tc2_cluster_unused(cluster) \
64 (!tc2_pm_use_count[0][cluster] && \
65 !tc2_pm_use_count[1][cluster] && \
66 !tc2_pm_use_count[2][cluster])
67
68static int tc2_pm_power_up(unsigned int cpu, unsigned int cluster)
69{ 52{
70 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 53 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
71 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) 54 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster])
72 return -EINVAL; 55 return -EINVAL;
73 56 ve_spc_set_resume_addr(cluster, cpu,
74 /* 57 virt_to_phys(mcpm_entry_point));
75 * Since this is called with IRQs enabled, and no arch_spin_lock_irq 58 ve_spc_cpu_wakeup_irq(cluster, cpu, true);
76 * variant exists, we need to disable IRQs manually here.
77 */
78 local_irq_disable();
79 arch_spin_lock(&tc2_pm_lock);
80
81 if (tc2_cluster_unused(cluster))
82 ve_spc_powerdown(cluster, false);
83
84 tc2_pm_use_count[cpu][cluster]++;
85 if (tc2_pm_use_count[cpu][cluster] == 1) {
86 ve_spc_set_resume_addr(cluster, cpu,
87 virt_to_phys(mcpm_entry_point));
88 ve_spc_cpu_wakeup_irq(cluster, cpu, true);
89 } else if (tc2_pm_use_count[cpu][cluster] != 2) {
90 /*
91 * The only possible values are:
92 * 0 = CPU down
93 * 1 = CPU (still) up
94 * 2 = CPU requested to be up before it had a chance
95 * to actually make itself down.
96 * Any other value is a bug.
97 */
98 BUG();
99 }
100
101 arch_spin_unlock(&tc2_pm_lock);
102 local_irq_enable();
103
104 return 0; 59 return 0;
105} 60}
106 61
107static void tc2_pm_down(u64 residency) 62static int tc2_pm_cluster_powerup(unsigned int cluster)
108{ 63{
109 unsigned int mpidr, cpu, cluster; 64 pr_debug("%s: cluster %u\n", __func__, cluster);
110 bool last_man = false, skip_wfi = false; 65 if (cluster >= TC2_CLUSTERS)
111 66 return -EINVAL;
112 mpidr = read_cpuid_mpidr(); 67 ve_spc_powerdown(cluster, false);
113 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); 68 return 0;
114 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); 69}
115 70
71static void tc2_pm_cpu_powerdown_prepare(unsigned int cpu, unsigned int cluster)
72{
116 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 73 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
117 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); 74 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER);
118 75 ve_spc_cpu_wakeup_irq(cluster, cpu, true);
119 __mcpm_cpu_going_down(cpu, cluster);
120
121 arch_spin_lock(&tc2_pm_lock);
122 BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP);
123 tc2_pm_use_count[cpu][cluster]--;
124 if (tc2_pm_use_count[cpu][cluster] == 0) {
125 ve_spc_cpu_wakeup_irq(cluster, cpu, true);
126 if (tc2_cluster_unused(cluster)) {
127 ve_spc_powerdown(cluster, true);
128 ve_spc_global_wakeup_irq(true);
129 last_man = true;
130 }
131 } else if (tc2_pm_use_count[cpu][cluster] == 1) {
132 /*
133 * A power_up request went ahead of us.
134 * Even if we do not want to shut this CPU down,
135 * the caller expects a certain state as if the WFI
136 * was aborted. So let's continue with cache cleaning.
137 */
138 skip_wfi = true;
139 } else
140 BUG();
141
142 /* 76 /*
143 * If the CPU is committed to power down, make sure 77 * If the CPU is committed to power down, make sure
144 * the power controller will be in charge of waking it 78 * the power controller will be in charge of waking it
@@ -146,55 +80,38 @@ static void tc2_pm_down(u64 residency)
146 * to the CPU by disabling the GIC CPU IF to prevent wfi 80 * to the CPU by disabling the GIC CPU IF to prevent wfi
147 * from completing execution behind power controller back 81 * from completing execution behind power controller back
148 */ 82 */
149 if (!skip_wfi) 83 gic_cpu_if_down();
150 gic_cpu_if_down(); 84}
151
152 if (last_man && __mcpm_outbound_enter_critical(cpu, cluster)) {
153 arch_spin_unlock(&tc2_pm_lock);
154
155 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
156 /*
157 * On the Cortex-A15 we need to disable
158 * L2 prefetching before flushing the cache.
159 */
160 asm volatile(
161 "mcr p15, 1, %0, c15, c0, 3 \n\t"
162 "isb \n\t"
163 "dsb "
164 : : "r" (0x400) );
165 }
166
167 v7_exit_coherency_flush(all);
168
169 cci_disable_port_by_cpu(mpidr);
170
171 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
172 } else {
173 /*
174 * If last man then undo any setup done previously.
175 */
176 if (last_man) {
177 ve_spc_powerdown(cluster, false);
178 ve_spc_global_wakeup_irq(false);
179 }
180
181 arch_spin_unlock(&tc2_pm_lock);
182
183 v7_exit_coherency_flush(louis);
184 }
185
186 __mcpm_cpu_down(cpu, cluster);
187 85
188 /* Now we are prepared for power-down, do it: */ 86static void tc2_pm_cluster_powerdown_prepare(unsigned int cluster)
189 if (!skip_wfi) 87{
190 wfi(); 88 pr_debug("%s: cluster %u\n", __func__, cluster);
89 BUG_ON(cluster >= TC2_CLUSTERS);
90 ve_spc_powerdown(cluster, true);
91 ve_spc_global_wakeup_irq(true);
92}
191 93
192 /* Not dead at this point? Let our caller cope. */ 94static void tc2_pm_cpu_cache_disable(void)
95{
96 v7_exit_coherency_flush(louis);
193} 97}
194 98
195static void tc2_pm_power_down(void) 99static void tc2_pm_cluster_cache_disable(void)
196{ 100{
197 tc2_pm_down(0); 101 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
102 /*
103 * On the Cortex-A15 we need to disable
104 * L2 prefetching before flushing the cache.
105 */
106 asm volatile(
107 "mcr p15, 1, %0, c15, c0, 3 \n\t"
108 "isb \n\t"
109 "dsb "
110 : : "r" (0x400) );
111 }
112
113 v7_exit_coherency_flush(all);
114 cci_disable_port_by_cpu(read_cpuid_mpidr());
198} 115}
199 116
200static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster) 117static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster)
@@ -217,27 +134,21 @@ static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
217 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); 134 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER);
218 135
219 for (tries = 0; tries < TIMEOUT_MSEC / POLL_MSEC; ++tries) { 136 for (tries = 0; tries < TIMEOUT_MSEC / POLL_MSEC; ++tries) {
137 pr_debug("%s(cpu=%u, cluster=%u): RESET_CTRL = 0x%08X\n",
138 __func__, cpu, cluster,
139 readl_relaxed(scc + RESET_CTRL));
140
220 /* 141 /*
221 * Only examine the hardware state if the target CPU has 142 * We need the CPU to reach WFI, but the power
222 * caught up at least as far as tc2_pm_down(): 143 * controller may put the cluster in reset and
144 * power it off as soon as that happens, before
145 * we have a chance to see STANDBYWFI.
146 *
147 * So we need to check for both conditions:
223 */ 148 */
224 if (ACCESS_ONCE(tc2_pm_use_count[cpu][cluster]) == 0) { 149 if (tc2_core_in_reset(cpu, cluster) ||
225 pr_debug("%s(cpu=%u, cluster=%u): RESET_CTRL = 0x%08X\n", 150 ve_spc_cpu_in_wfi(cpu, cluster))
226 __func__, cpu, cluster, 151 return 0; /* success: the CPU is halted */
227 readl_relaxed(scc + RESET_CTRL));
228
229 /*
230 * We need the CPU to reach WFI, but the power
231 * controller may put the cluster in reset and
232 * power it off as soon as that happens, before
233 * we have a chance to see STANDBYWFI.
234 *
235 * So we need to check for both conditions:
236 */
237 if (tc2_core_in_reset(cpu, cluster) ||
238 ve_spc_cpu_in_wfi(cpu, cluster))
239 return 0; /* success: the CPU is halted */
240 }
241 152
242 /* Otherwise, wait and retry: */ 153 /* Otherwise, wait and retry: */
243 msleep(POLL_MSEC); 154 msleep(POLL_MSEC);
@@ -246,72 +157,40 @@ static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
246 return -ETIMEDOUT; /* timeout */ 157 return -ETIMEDOUT; /* timeout */
247} 158}
248 159
249static void tc2_pm_suspend(u64 residency) 160static void tc2_pm_cpu_suspend_prepare(unsigned int cpu, unsigned int cluster)
250{ 161{
251 unsigned int mpidr, cpu, cluster;
252
253 mpidr = read_cpuid_mpidr();
254 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
255 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
256 ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point)); 162 ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point));
257 tc2_pm_down(residency);
258} 163}
259 164
260static void tc2_pm_powered_up(void) 165static void tc2_pm_cpu_is_up(unsigned int cpu, unsigned int cluster)
261{ 166{
262 unsigned int mpidr, cpu, cluster;
263 unsigned long flags;
264
265 mpidr = read_cpuid_mpidr();
266 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
267 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
268
269 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster); 167 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
270 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER); 168 BUG_ON(cluster >= TC2_CLUSTERS || cpu >= TC2_MAX_CPUS_PER_CLUSTER);
271
272 local_irq_save(flags);
273 arch_spin_lock(&tc2_pm_lock);
274
275 if (tc2_cluster_unused(cluster)) {
276 ve_spc_powerdown(cluster, false);
277 ve_spc_global_wakeup_irq(false);
278 }
279
280 if (!tc2_pm_use_count[cpu][cluster])
281 tc2_pm_use_count[cpu][cluster] = 1;
282
283 ve_spc_cpu_wakeup_irq(cluster, cpu, false); 169 ve_spc_cpu_wakeup_irq(cluster, cpu, false);
284 ve_spc_set_resume_addr(cluster, cpu, 0); 170 ve_spc_set_resume_addr(cluster, cpu, 0);
171}
285 172
286 arch_spin_unlock(&tc2_pm_lock); 173static void tc2_pm_cluster_is_up(unsigned int cluster)
287 local_irq_restore(flags); 174{
175 pr_debug("%s: cluster %u\n", __func__, cluster);
176 BUG_ON(cluster >= TC2_CLUSTERS);
177 ve_spc_powerdown(cluster, false);
178 ve_spc_global_wakeup_irq(false);
288} 179}
289 180
290static const struct mcpm_platform_ops tc2_pm_power_ops = { 181static const struct mcpm_platform_ops tc2_pm_power_ops = {
291 .power_up = tc2_pm_power_up, 182 .cpu_powerup = tc2_pm_cpu_powerup,
292 .power_down = tc2_pm_power_down, 183 .cluster_powerup = tc2_pm_cluster_powerup,
184 .cpu_suspend_prepare = tc2_pm_cpu_suspend_prepare,
185 .cpu_powerdown_prepare = tc2_pm_cpu_powerdown_prepare,
186 .cluster_powerdown_prepare = tc2_pm_cluster_powerdown_prepare,
187 .cpu_cache_disable = tc2_pm_cpu_cache_disable,
188 .cluster_cache_disable = tc2_pm_cluster_cache_disable,
293 .wait_for_powerdown = tc2_pm_wait_for_powerdown, 189 .wait_for_powerdown = tc2_pm_wait_for_powerdown,
294 .suspend = tc2_pm_suspend, 190 .cpu_is_up = tc2_pm_cpu_is_up,
295 .powered_up = tc2_pm_powered_up, 191 .cluster_is_up = tc2_pm_cluster_is_up,
296}; 192};
297 193
298static bool __init tc2_pm_usage_count_init(void)
299{
300 unsigned int mpidr, cpu, cluster;
301
302 mpidr = read_cpuid_mpidr();
303 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
304 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
305
306 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
307 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) {
308 pr_err("%s: boot CPU is out of bound!\n", __func__);
309 return false;
310 }
311 tc2_pm_use_count[cpu][cluster] = 1;
312 return true;
313}
314
315/* 194/*
316 * Enable cluster-level coherency, in preparation for turning on the MMU. 195 * Enable cluster-level coherency, in preparation for turning on the MMU.
317 */ 196 */
@@ -323,23 +202,9 @@ static void __naked tc2_pm_power_up_setup(unsigned int affinity_level)
323" b cci_enable_port_for_self "); 202" b cci_enable_port_for_self ");
324} 203}
325 204
326static void __init tc2_cache_off(void)
327{
328 pr_info("TC2: disabling cache during MCPM loopback test\n");
329 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A15) {
330 /* disable L2 prefetching on the Cortex-A15 */
331 asm volatile(
332 "mcr p15, 1, %0, c15, c0, 3 \n\t"
333 "isb \n\t"
334 "dsb "
335 : : "r" (0x400) );
336 }
337 v7_exit_coherency_flush(all);
338 cci_disable_port_by_cpu(read_cpuid_mpidr());
339}
340
341static int __init tc2_pm_init(void) 205static int __init tc2_pm_init(void)
342{ 206{
207 unsigned int mpidr, cpu, cluster;
343 int ret, irq; 208 int ret, irq;
344 u32 a15_cluster_id, a7_cluster_id, sys_info; 209 u32 a15_cluster_id, a7_cluster_id, sys_info;
345 struct device_node *np; 210 struct device_node *np;
@@ -379,14 +244,20 @@ static int __init tc2_pm_init(void)
379 if (!cci_probed()) 244 if (!cci_probed())
380 return -ENODEV; 245 return -ENODEV;
381 246
382 if (!tc2_pm_usage_count_init()) 247 mpidr = read_cpuid_mpidr();
248 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
249 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
250 pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
251 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) {
252 pr_err("%s: boot CPU is out of bound!\n", __func__);
383 return -EINVAL; 253 return -EINVAL;
254 }
384 255
385 ret = mcpm_platform_register(&tc2_pm_power_ops); 256 ret = mcpm_platform_register(&tc2_pm_power_ops);
386 if (!ret) { 257 if (!ret) {
387 mcpm_sync_init(tc2_pm_power_up_setup); 258 mcpm_sync_init(tc2_pm_power_up_setup);
388 /* test if we can (re)enable the CCI on our own */ 259 /* test if we can (re)enable the CCI on our own */
389 BUG_ON(mcpm_loopback(tc2_cache_off) != 0); 260 BUG_ON(mcpm_loopback(tc2_pm_cluster_cache_disable) != 0);
390 pr_info("TC2 power management initialized\n"); 261 pr_info("TC2 power management initialized\n");
391 } 262 }
392 return ret; 263 return ret;
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index e17d871b934c..7f415ce74591 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -43,7 +43,11 @@ extern unsigned long s3c_irqwake_eintmask;
43 43
44/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */ 44/* IRQ masks for IRQs allowed to go to sleep (see irq.c) */
45extern unsigned long s3c_irqwake_intallow; 45extern unsigned long s3c_irqwake_intallow;
46#ifdef CONFIG_PM_SLEEP
46extern unsigned long s3c_irqwake_eintallow; 47extern unsigned long s3c_irqwake_eintallow;
48#else
49#define s3c_irqwake_eintallow 0
50#endif
47 51
48/* per-cpu sleep functions */ 52/* per-cpu sleep functions */
49 53
@@ -58,16 +62,20 @@ extern unsigned long s3c_pm_flags;
58 62
59extern int s3c2410_cpu_suspend(unsigned long); 63extern int s3c2410_cpu_suspend(unsigned long);
60 64
61#ifdef CONFIG_SAMSUNG_PM 65#ifdef CONFIG_PM_SLEEP
62extern int s3c_irq_wake(struct irq_data *data, unsigned int state); 66extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
63extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
64extern void s3c_cpu_resume(void); 67extern void s3c_cpu_resume(void);
65#else 68#else
66#define s3c_irq_wake NULL 69#define s3c_irq_wake NULL
67#define s3c_irqext_wake NULL
68#define s3c_cpu_resume NULL 70#define s3c_cpu_resume NULL
69#endif 71#endif
70 72
73#ifdef CONFIG_SAMSUNG_PM
74extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
75#else
76#define s3c_irqext_wake NULL
77#endif
78
71#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK 79#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
72/** 80/**
73 * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs 81 * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs
diff --git a/arch/arm/plat-samsung/pm-debug.c b/arch/arm/plat-samsung/pm-debug.c
index 39609601f407..64e15da33b42 100644
--- a/arch/arm/plat-samsung/pm-debug.c
+++ b/arch/arm/plat-samsung/pm-debug.c
@@ -23,6 +23,7 @@
23#include <plat/pm-common.h> 23#include <plat/pm-common.h>
24 24
25#ifdef CONFIG_SAMSUNG_ATAGS 25#ifdef CONFIG_SAMSUNG_ATAGS
26#include <plat/pm.h>
26#include <mach/pm-core.h> 27#include <mach/pm-core.h>
27#else 28#else
28static inline void s3c_pm_debug_init_uart(void) {} 29static inline void s3c_pm_debug_init_uart(void) {}
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index f8c0f9797dcf..82777c649774 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -65,26 +65,6 @@ int s3c_irqext_wake(struct irq_data *data, unsigned int state)
65 return 0; 65 return 0;
66} 66}
67 67
68/* s3c2410_pm_show_resume_irqs
69 *
70 * print any IRQs asserted at resume time (ie, we woke from)
71*/
72static void __maybe_unused s3c_pm_show_resume_irqs(int start,
73 unsigned long which,
74 unsigned long mask)
75{
76 int i;
77
78 which &= ~mask;
79
80 for (i = 0; i <= 31; i++) {
81 if (which & (1L<<i)) {
82 S3C_PMDBG("IRQ %d asserted at resume\n", start+i);
83 }
84 }
85}
86
87
88void (*pm_cpu_prep)(void); 68void (*pm_cpu_prep)(void);
89int (*pm_cpu_sleep)(unsigned long); 69int (*pm_cpu_sleep)(unsigned long);
90 70
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index a10297da122b..2ed1b8a922ed 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -526,7 +526,6 @@ ag5evm MACH_AG5EVM AG5EVM 3189
526ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206 526ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206
527wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207 527wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207
528trimslice MACH_TRIMSLICE TRIMSLICE 3209 528trimslice MACH_TRIMSLICE TRIMSLICE 3209
529mackerel MACH_MACKEREL MACKEREL 3211
530kaen MACH_KAEN KAEN 3217 529kaen MACH_KAEN KAEN 3217
531nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220 530nokia_rm680 MACH_NOKIA_RM680 NOKIA_RM680 3220
532msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230 531msm8960_sim MACH_MSM8960_SIM MSM8960_SIM 3230